After successfully creating geometry and functions to manipulate it, I integrated them into a javascript UI library . However, I encountered a problem where the raycaster function was detecting intersections with geometry even when not directly under the mouse. It seems like all the geometries have been displaced from their original positions and the rendering appears distorted.
To demonstrate this issue, I have provided an example at this url: . You can view the complete code in the browser console.
In the live example, you will notice that you can drag the cube even if clicking above it, illustrating the problem faced.