aboutsummaryrefslogtreecommitdiff
path: root/src/components/ground.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ground.jsx')
-rw-r--r--src/components/ground.jsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/ground.jsx b/src/components/ground.jsx
index 9aced45..2426f2a 100644
--- a/src/components/ground.jsx
+++ b/src/components/ground.jsx
@@ -5,14 +5,15 @@ import { useGLTF } from '@react-three/drei';
import terrainModelURL from '../assets/terrain.glb';
export default function Ground() {
- const meshRef = useRef();
- const { nodes } = useGLTF(terrainModelURL);
-
+ const { nodes, materials } = useGLTF(terrainModelURL);
return (
<RigidBody type='fixed' colliders="trimesh">
- <mesh ref={meshRef} position={[0, 0, 0]} rotation={[-Math.PI / 2, 0, 0]} geometry={nodes.Plane.geometry} name='ground'>
+ <mesh position={[0, 0, 0]} geometry={nodes.ground.geometry} name='ground'>
<meshStandardMaterial color={everforest.yellow}/>
</mesh>
+ <mesh geometry={nodes.pyramid.geometry} name='ground'>
+ <meshStandardMaterial color={everforest.bg2}/>
+ </mesh>
</RigidBody>
);
}