Touch

ceramic.Touch (Class)

Represents a single touch point in a multi-touch interaction.

Touch contains information about a finger or stylus touching the screen, including its position and movement. Each touch has a unique index that persists throughout the touch lifetime (from touchdown to touchup).

Touch instances are managed by the Screen class and accessed through screen.touches or multi-touch events.

Instance Members

index: Int

Unique identifier for this touch point. The index remains constant throughout the touch lifetime.


Current X coordinate of the touch in screen space.


Current Y coordinate of the touch in screen space.


deltaX: Float

Change in X position since the last frame.


deltaY: Float

Change in Y position since the last frame.


new(index: Int, x: Float, y: Float, deltaX: Float, deltaY: Float): Void
Name Type Description
index Int * Unique identifier for this touch point. The index remains constant throughout the touch lifetime.
x Float * Current X coordinate of the touch in screen space.
y Float * Current Y coordinate of the touch in screen space.
deltaX Float * Change in X position since the last frame.
deltaY Float * Change in Y position since the last frame.

Private Members

toString(): String

Returns a string representation of this touch.

Returns Description
String String showing all touch properties

Metadata

Name Parameters
:structInit -
:allow ceramic.Screen