PointerInfo
Defined in: types.ts:180
Read-only view of a tracked pointer. Returned from InputManager.getPointers and the per-pointer event hooks. Treat as immutable — fields reflect the pointer’s state at query time and are not retained between frames.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”button
Section titled “button”
readonlybutton:number
Defined in: types.ts:205
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.
buttons
Section titled “buttons”
readonlybuttons:ReadonlySet<number>
Defined in: types.ts:192
Currently-held button indices (0=left/primary, 1=middle, 2=right).
generation
Section titled “generation”
readonlygeneration:number
Defined in: types.ts:184
Monotonic identity of this pointer press cycle.
readonlyid:number
Defined in: types.ts:182
Browser-assigned PointerEvent.pointerId, or the synthetic id passed via firePointer*.
isDown
Section titled “isDown”
readonlyisDown:boolean
Defined in: types.ts:194
Convenience mirror of buttons.size > 0.
isPrimary
Section titled “isPrimary”
readonlyisPrimary:boolean
Defined in: types.ts:190
Whether the browser flagged this as the primary pointer (PointerEvent.isPrimary).
screenPos
Section titled “screenPos”
readonlyscreenPos:Vec2
Defined in: types.ts:186
Position in screen-space pixels (already routed through canvasToVirtual if available).
readonlytype:PointerType
Defined in: types.ts:188
Source device class.
Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/input.md.