properly import assets
This commit is contained in:
parent
b9509422dd
commit
acf41b45c3
@ -6,6 +6,8 @@ import { Html } from '@react-three/drei';
|
|||||||
import { AppContext } from '../App';
|
import { AppContext } from '../App';
|
||||||
import Color from 'color';
|
import Color from 'color';
|
||||||
import { Vector3 } from 'three';
|
import { Vector3 } from 'three';
|
||||||
|
import messageBubbleModelURL from '../../assets/message-bubble.glb';
|
||||||
|
import { meta } from '@eslint/js';
|
||||||
|
|
||||||
export default function ChatBubble({ id, position, text }) {
|
export default function ChatBubble({ id, position, text }) {
|
||||||
const meshRef = useRef();
|
const meshRef = useRef();
|
||||||
@ -74,7 +76,7 @@ export default function ChatBubble({ id, position, text }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, -2);
|
}, -2);
|
||||||
const { nodes } = useGLTF('../assets/message-bubble.glb');
|
const { nodes } = useGLTF(messageBubbleModelURL);
|
||||||
|
|
||||||
let color = Color(active ? everforest.blue : everforest.purple);
|
let color = Color(active ? everforest.blue : everforest.purple);
|
||||||
if (activatable) {
|
if (activatable) {
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
|
import terrainModelURL from '../../assets/terrain.glb'
|
||||||
import * as everforest from '../_everforest.module.scss'
|
import * as everforest from '../_everforest.module.scss'
|
||||||
import { RigidBody } from '@react-three/rapier';
|
import { RigidBody } from '@react-three/rapier';
|
||||||
import { useGLTF } from '@react-three/drei';
|
import { useGLTF } from '@react-three/drei';
|
||||||
|
|
||||||
export default function Ground() {
|
export default function Ground() {
|
||||||
const meshRef = useRef();
|
const meshRef = useRef();
|
||||||
const { nodes } = useGLTF('../assets/terrain.glb');
|
const { nodes } = useGLTF(terrainModelURL);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RigidBody type='fixed' colliders="trimesh">
|
<RigidBody type='fixed' colliders="trimesh">
|
||||||
|
@ -9,4 +9,7 @@ export default defineConfig({
|
|||||||
'/api': 'http://localhost:5000',
|
'/api': 'http://localhost:5000',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
assetsInclude: [
|
||||||
|
'**/*.glb',
|
||||||
|
],
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user