You should not constantly create new objects in animate.
new THREE.Raycaster()
(new THREE.Vector3(x, 0, 0), new THREE.Vector3(0, 1, 0))
You can create them once and then use them.
Take a look at the beginner example step 10 from the collection.
You should not constantly create new objects in animate.
new THREE.Raycaster()
(new THREE.Vector3(x, 0, 0), new THREE.Vector3(0, 1, 0))
You can create them once and then use them.
Take a look at the beginner example step 10 from the collection.