
i used the THREE.js raycaster, which u can use to get the set of meshes, respective world positions etc. that the cursor intersects with. i used the starting world position of the mouse movement, then the difference between frames’ world positions over the course of a few frames to calculate the avg of that distance, then use the starting position and direction of the mouse movement in the scene to determine which face/direction of the cube the user intends to rotate