PointerCancel

View source

Captures the pointer data emitted by a browser pointercancel event.

The value preserves the pointer identity and device type, and stores the event’s local offset as a reusable Vector2 position.

Examples

const cancel = new PointerCancel(event)
console.log(cancel.id, cancel.pointerType, cancel.position)

Constructor


constructor(event: PointerEvent)

View source

Copies pointerId to id and pointerType to pointerType. The position is set from the event’s offsetX and offsetY.

Parameters

NameDescriptionDefault
event

Browser pointer event to capture.

—

Properties


readonlypointerType: string

View source

The browser pointerType, such as mouse, pen, or touch.

readonlyposition: Vector2

View source

Local pointer coordinates copied from offsetX and offsetY.

Default: ...