PointerMove

View source

Captures the pointer data emitted by a browser pointermove event.

The DOM pointer bridge creates this event value with the browser pointer’s identity and device type, its local offset as Vector2 position, and its movement since the previous event as Vector2 delta.

Examples

const move = new PointerMove(event)
console.log(move.id, move.pointerType, move.position, move.delta)

Constructor


constructor(event: PointerEvent)

View source

Copies pointerId to id, pointerType to pointerType, and maps the event offsets and movement values to position and delta.

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: ...

readonlydelta: Vector2

View source

Pointer movement copied from movementX and movementY.

Default: ...