PointerEnter

View source

Captures the pointer data emitted by a browser pointerenter event.

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

Examples

const enter = new PointerEnter(event)
console.log(enter.id, enter.pointerType, enter.position)

Constructor


constructor(event: PointerEvent)

View source

Copies pointerId to id, preserves pointerType, and maps the event’s offsetX and offsetY values to position.x and position.y.

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