Skip to content

Commit

Permalink
Fix bvh demo
Browse files Browse the repository at this point in the history
  • Loading branch information
rndexe committed Aug 9, 2024
1 parent 51fdbc6 commit 26598b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion demos/bvh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dev": "vite --host",
"dev3": "e2e-dev $npm_package_name",
"build": "tsc && vite build",
"bbuild2": "tsc && e2e-build $npm_package_name",
"build2": "tsc && e2e-build $npm_package_name",
"preview": "vite preview"
},
"browserslist": [
Expand Down
4 changes: 2 additions & 2 deletions demos/bvh/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { useRef } from 'react'
import { Canvas, useFrame } from '@react-three/fiber'
import { Bvh, OrbitControls, useHelper } from '@react-three/drei'
import { MeshBVHVisualizer } from 'three-mesh-bvh'
import { MeshBVHHelper } from 'three-mesh-bvh'
import { Perf } from 'r3f-perf'
import { useControls } from 'leva'
import { Rays } from './Rays'

function Torus(props) {
const mesh = useRef()
const sphere = useRef()
useHelper(mesh, MeshBVHVisualizer)
useHelper(mesh, MeshBVHHelper)
useFrame((state, delta) => (mesh.current.rotation.x = mesh.current.rotation.y += delta))
return (
<mesh
Expand Down

0 comments on commit 26598b2

Please sign in to comment.