samedi 28 février 2015

how to update the mouseposition on screen event on window resize?


What i need is to update the trackball controls to detect the mouse position event to a different screen size. I have an on click event which shows the position clicked point on screen with a yellow mark. If i refresh and try this event everything works fine, the event.x and event.y coordinates are correct referring at the window.innerWidth - window.innerHeight. When i resize the window the mark has an offset similar with the distortion of the resizing. If i resize the width only the mark has an offset at the axe(x). everything works using trackball controls. I am aware of the handleResize() function but it does not solved my problem.





Aucun commentaire:

Enregistrer un commentaire