I work on a little project where i have to create plane with mouse detection. For moment i just make some test on a cube from a simple exemple found on the web.
The detection is good and accurate but the container has to be scaled when mouse wheel in order to make zoom.
(i also have to make a zoom on some images, the purpose is to superimpose images with some 3D forms in order to create an accurate detection on my images, these images are scaled with css transform so i guess the simple way is to do the same with the canvas container)
The problem come after scalling this canvas container (using css transform), the raycasting doesnt remain exact and i dont really know how to fix it, i tried to change some value but in a random way. I guess there is something to do with the scale factor applied on the container but i dont understand which variable i have to modify.
I will try to scale the canvas using three.js directly and following the scale that i apply on my images but i dont know if that would be easier.
Here is my test : http://pixelreseller.com/src_pixelreseller/projets/three-test/
You can see code by the code source but if you prefer that i copy/paste code here, let me know.