touch-input

State-based touch input manager for games and high-fidelity interfaces

MIT License

Stars
4
Committers
3

State-based Touch Input Manager

Gives you the status of all touches during the last frame. Each Touch entry represents a status of a finger touching the screen. Touch events are collected between frames and fire custom events once on requestAnimationFrame.

Inspired by Unity's Input.touches.

Goals

  • 60fps-first – Your code should never handle touch events between frames.
  • Only order what you can eat – One touch event per touch per frame.

Examples