Finding UV coordinates of a point on material rendered on 3D cube in threejs
问题 I want to calculate the UV co-ordinates of a single point of a material rendered on 3D cube. I am finding the mouse pointer intersection with the camera ray using THREE.Raycaster as: mouse.x = (event.clientX / window.innerWidth) * 2 - 1; mouse.y = -(event.clientY / window.innerHeight) * 2 + 1; var vector = new THREE.Vector3(mouse.x, mouse.y, 1); vector.unproject(camera); var raycaster = new THREE.Raycaster(camera.position, vector.sub(camera.position).normalize()); var intersects = raycaster