rezoner / CanvasQuery

Canvas for 2d gamedevelopers. Out of box canvas, keyboard, mouse, events.
http://canvasquery.com
586 stars 52 forks source link

Mouselock Movement-Delta unprecise and IExplorer incompatible #43

Open nicoell opened 9 years ago

nicoell commented 9 years ago

I tried working with Mouselock and MovementDelta Feature to move a drawn map around. But i found it to be very unprecise and moreover not working in Internet Explorer (tested with IE 11).

The movementX and movementY values seem to be laggy and very unprecise. Sometimes there are spikes and the moved image "jumps" around. And in general it does not follow the mouse-movement very well. It stays behind or stutters . You can see this clearly in the example( http://canvasquery.com/playground-mouse-lock ) by just moving your cursor in a circle for a while. The image will jump and soon its gone. It works quiite okay in Chrome for me, but Firefox suffers from jumps and stuttering alot.

Additionally i'd like to suggest making the "requestPointerLock" in mouse.lock() optional.