Skip to content

PointerProvider

Defined in: src/modules/input/pointer-provider.ts:187

DOM pointer adapter. Reports button down/up events as raw InputRawEvents keyed by Pointer.* codes (so they plug into createInput action maps identically to keyboard codes) and exposes a continuous position surface on this.state.

Position tracking uses Pointer Events, which unify mouse, touch, and pen inputs — single-touch “just works” without a separate touch provider. Multi-touch and gestures are out of scope in v1.

Buttons that release outside the target still fire up events because the pointerup listener is attached to the window; this matches how real games want held-button state to behave (releasing LMB off-canvas should stop firing).

new PointerProvider(options): PointerProvider

Defined in: src/modules/input/pointer-provider.ts:209

PointerProviderOptions

PointerProvider

readonly state: PointerState

Defined in: src/modules/input/pointer-provider.ts:198

dispose(): void

Defined in: src/modules/input/pointer-provider.ts:278

void

InputProvider.dispose


subscribe(handler): () => void

Defined in: src/modules/input/pointer-provider.ts:293

(raw) => void

() => void

InputProvider.subscribe