Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

This article needs a technical review. How you can help.

This article is for Touch Event Horizon and A Game Related To It

Touch Gestures and Events

Link

The example game

Github repository

Live demo

Setting up the canvas

Counting the taps

touchstart, touchend

Collecting the bonus

touchmove

Future developments

Summary

This tutorial shows how to use Touch Events to create a game on a <canvas>. This is a multi-player game relying on the Tap and Drag gestures.

 

Document Tags and Contributors

 Last updated by: chrisdavidmills,