Skip to content

PointerPressInfo

Defined in: types.ts:194

Pointer-down edge retained for the current rendered frame.

readonly button: number

Defined in: types.ts:182

The button whose state changed for the event this snapshot was delivered with: 0=left/primary, 1=middle, 2=right. -1 when not applicable — onPointerMove, pointercancel-driven up notifications, and query snapshots from InputManager.getPointers / getPointer.

Use this — not buttons — to filter by button inside an onPointerDown / onPointerUp listener: those listeners are notified before the edge is drained into buttons, so buttons does not yet reflect this event.

PointerInfo.button


readonly buttons: ReadonlySet<number>

Defined in: types.ts:169

Currently-held button indices (0=left/primary, 1=middle, 2=right).

PointerInfo.buttons


readonly consumed: boolean

Defined in: types.ts:198

Whether UI or another pointer listener claimed this press.


readonly generation: number

Defined in: types.ts:161

Monotonic identity of this pointer press cycle.

PointerInfo.generation


readonly id: number

Defined in: types.ts:159

Browser-assigned PointerEvent.pointerId, or the synthetic id passed via firePointer*.

PointerInfo.id


readonly isDown: boolean

Defined in: types.ts:171

Convenience mirror of buttons.size > 0.

PointerInfo.isDown


readonly isPrimary: boolean

Defined in: types.ts:167

Whether the browser flagged this as the primary pointer (PointerEvent.isPrimary).

PointerInfo.isPrimary


readonly screenPos: Vec2

Defined in: types.ts:163

Position in screen-space pixels (already routed through canvasToVirtual if available).

PointerInfo.screenPos


readonly type: PointerType

Defined in: types.ts:165

Source device class.

PointerInfo.type


readonly worldPos: Vec2

Defined in: types.ts:196

Position converted through the camera when the press was applied, or screenPos when unset.