play.core
play.core copied to clipboard
Change pointer position on touch events.
While the pointerup
and pointerdown
work with touch, pointermoved
does not get called, which means cursor coordinates stay at {x: 0, y: 0}
making it impossible to react on clicks on specific part of the canvas.
This commit adds listeners for touchmove
, touchstart
and touchend
to update the cursor position.