rive-app / rive-wasm

Wasm/JS runtime for Rive
MIT License
669 stars 46 forks source link

feature: support touch events for listeners #299

Closed zplata closed 1 year ago

zplata commented 1 year ago

Adding support for touch interactions (specifically to be able to support touch and drag on mobile devices)

Thinking of bumping a minor version with this. There's a slight side effect where now if you are slowly dragging your finger on the canvas, you may have scrolling disabled, due to calling event.preventDefault() on touchmove events. If you drag on the canvas rapidly, sometimes the browser scroll will still take, but not always.