add-stereo-exp1 #1

Merged
godber merged 4 commits from add-stereo-exp1 into main 2024-04-19 08:25:13 -07:00
3 changed files with 893 additions and 126 deletions
Showing only changes of commit e17a4e90ea - Show all commits

File diff suppressed because it is too large Load Diff

View File

@ -12,9 +12,10 @@
"vite": "^5.2.8" "vite": "^5.2.8"
}, },
"dependencies": { "dependencies": {
"@react-three/drei": "^9.105.4",
"@react-three/fiber": "^8.16.2",
"react": "18.2", "react": "18.2",
"react-dom": "18.2", "react-dom": "18.2",
"@react-three/fiber": "^8.16.2",
"three": "^0.163.0" "three": "^0.163.0"
} }
} }

View File

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