Skip to content

Commit

Permalink
Fix springy-boxes demo (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
rndexe authored Aug 3, 2024
1 parent 9fa6495 commit 7cadbac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions demos/springy-boxes/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ function Content() {
useEffect(() => void setInterval(() => set((i) => ({ ...random(i), delay: i * 40 })), 3000), [])
return data.map((d, index) => (
<a.mesh key={index} {...springs[index]} castShadow receiveShadow>
<boxBufferGeometry args={d.args} />
<boxGeometry args={d.args} />
<a.meshStandardMaterial color={springs[index].color} roughness={0.75} metalness={0.5} />
</a.mesh>
))
}

createRoot(document.getElementById('root')).render(
<Canvas flat shadows camera={{ position: [0, 0, 100], fov: 100 }}>
<pointLight intensity={0.5} />
<ambientLight intensity={1.85} />
<spotLight castShadow intensity={0.2} angle={Math.PI / 7} position={[150, 150, 250]} penumbra={1} shadow-mapSize={2048} />
<pointLight decay={0} intensity={0.5 * Math.PI} />
<ambientLight intensity={1.85 * Math.PI} />
<spotLight castShadow decay={0} intensity={0.2 * Math.PI} angle={Math.PI / 7} position={[150, 150, 250]} penumbra={1} shadow-mapSize={2048} />
<Content />
</Canvas>
)

0 comments on commit 7cadbac

Please sign in to comment.