Input · interface
InputOptions
Explained in Moving things.
interface InputOptionsimport type { InputOptions } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
sourcesreadonlyoptional | Partial<Record<InputSourceName, boolean>> | Turn a device off. Absent means on.MoreA disabled source is inert, not absent: its state stops updating, it never takes the prompts, and — for the gamepad — the poll stops outright, so an application that does not want controllers pays for no snapshot at all. |
autoPollreadonlyoptional | boolean | Whether to poll the gamepad on an animation frame of this source's own. Defaults to true.MoreTrue is what makes support seamless: a consumer that wired nothing still gets a working
controller. Pass |
deadzonereadonlyoptional | number | How far a stick travels before it is moving. See DEFAULT_DEADZONE. |