I am trying to create a code if mouse goes outside for example I move my mouse outside right and my mouse comes back on the left side like in Blender.
var x, y;
function handleMouse(e) {
if (x && y) {
window.scrollBy(e.clientX - x, e.clientY - y);
}
x = e.clientX;
y = e.clientY;
/* That code I need goes here... */
}
document.onmousemove = handleMouse;
I am a bit desperately.