()
| 6 | import { GLTFLoader } from 'three/examples/jsm/Addons.js'; |
| 7 | |
| 8 | function Mesh() { |
| 9 | const meshRef = useRef(); |
| 10 | |
| 11 | useFrame((state, delta) => { |
| 12 | meshRef.current.rotation.y += 0.1; |
| 13 | }); |
| 14 | |
| 15 | function clickHandler() { |
| 16 | meshRef.current.material.color.set('blue'); |
| 17 | } |
| 18 | |
| 19 | return <mesh ref={meshRef} onClick={clickHandler}> |
| 20 | <boxGeometry args={[100, 100, 100]}/> |
| 21 | <meshPhongMaterial color={'orange'}/> |
| 22 | </mesh> |
| 23 | } |
| 24 | |
| 25 | function App() { |
| 26 | return <Canvas camera={{ |
nothing calls this directly
no outgoing calls
no test coverage detected