Hi, i have some events driven by the mouse position. When you play the game , and you drag your mouse outside the layout window , all events driven by mouse continue to progress. How to bound the mouse movement to the layout?
Develop games in your browser. Powerful, performant & highly capable.
You could use clamp to constrain the x and y positions. See the attached capx.
You are welcome
Plz , download this capx and try to run it in node webkit preview. Then move the mouse out of the screen. :-/
Again, you need to use clamp for the rest of the events.