A Touch object represents a single contact point on the screen. Touch objects are immutable and read-only. This closely matches the ‘Touch’ interface described in the W3 Touch Events specification.
Summary
A unique number used to identify touch. Persistent over the touch lifetime.
Syntax
var identifier = touch.identifier;
Summary
The horizontal position of the touch relative to the left of the game area (in pixels).
Syntax
var positionX = touch.positionX;
Summary
The vertical position of the touch relative to the top of the game area (in pixels).
Syntax
var positionY = touch.positionY;
Summary
The radius of the ellipse which most closely circumscribes the touch area along the x-axis (in pixels). 1 if no value is known. Always positive.
Syntax
var radiusX = touch.radiusX;
Summary
The radius of the ellipse which most closely circumscribes the touch area along the y-axis (in pixels). 1 if no value is known. Always positive.
Syntax
var radiusY = touch.radiusY;
Summary
The angle (in degrees) that the ellipse described by radiusX and radiusY is rotated clockwise about its center. 0 if no value is known, otherwise between 0 and 90.
Syntax
var rotationAngle = touch.rotationAngle;
Summary
The pressure of the touch, between 0 and 1 where 0 is no pressure, and 1 is maximum pressure. Defaults to 0 when unsupported by the device.
Syntax
var force = touch.force;
Summary
True if the touch started in the game area, false otherwise.
Syntax
var didStartInGameArea = touch.isGameTouch;