Reputation: 25
Can someone tell me how I can combine three.js code with react-three-fiber? I saw that tag is useful in such cases but still can't understand how.
Upvotes: 0
Views: 398
Reputation: 427
Import Three to use related stuff, like this
import * as THREE from 'three'
Then you can access THREE stuff such as THREE.Vector3
ideally you would want to write your three code in a hook like useEffec or useFrame or in any another way whichever is relevant.
Upvotes: 1