add drei to template

This commit is contained in:
2024-04-14 10:34:55 -07:00
parent b0e9724451
commit e17a4e90ea
3 changed files with 893 additions and 126 deletions

View File

@ -1,7 +1,5 @@
import { useThree, extend } from '@react-three/fiber'
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
extend({ OrbitControls })
import { OrbitControls } from '@react-three/drei'
export default function Experience()
{
@ -9,7 +7,7 @@ export default function Experience()
return <>
<orbitControls args={ [ camera, gl.domElement ] } />
<OrbitControls />
<directionalLight position={ [ 1, 2, 3 ] } intensity={ 4.5 } />
<ambientLight intensity={ 1.5 } />
@ -21,7 +19,7 @@ export default function Experience()
<mesh position-y={ - 1 } rotation-x={ - Math.PI * 0.5 } scale={ 10 }>
<planeGeometry />
<meshStandardMaterial color="greenyellow" />
<meshStandardMaterial color="grey" />
</mesh>
</>