1.0.1 • Published 9 years ago
touch-input v1.0.1
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
- Immediate using state – State-based renderer using 2D Canvas
- DOM-based using events – DOM-based renderer using 2D Canvas