kotsoft / particle_based_viscoelastic_fluid

Implementation of Particle-based Viscoelastic Fluid Simulation
https://kotsoft.github.io/particle_based_viscoelastic_fluid/
Other
115 stars 8 forks source link

Switch to PointerEvents to support Mobile #3

Closed zalo closed 5 months ago

zalo commented 5 months ago

@kotsoft PointerEvents are the general abstraction between MouseEvents and TouchEvents, so they'll let mobile devices automagically work.

Since there are no pointermove events before touchdown, the previous frame positions need to be set upon pointerdown to prevent big jumps in velocity.