Skip to content

1681-engine / index / RumbleOptions

Interface: RumbleOptions ​

Defined in: src/input/rumble.ts:7

Gamepad rumble through the Gamepad Extensions' vibrationActuator ('dual-rumble': Chrome, Edge, Firefox behind a flag, Safari 16.4+). A pad without one, a browser without the API, or a refusal is a silent no-op that resolves false: rumble is seasoning, never something a game should wait on or crash over.

Properties ​

durationMs? ​

ts
optional durationMs?: number;

Defined in: src/input/rumble.ts:13

How long it shakes (ms, default 200).


startDelayMs? ​

ts
optional startDelayMs?: number;

Defined in: src/input/rumble.ts:15

Wait before starting (ms, default 0).


strong? ​

ts
optional strong?: number;

Defined in: src/input/rumble.ts:9

The low-frequency (heavy) motor, 0–1 (default 0).


weak? ​

ts
optional weak?: number;

Defined in: src/input/rumble.ts:11

The high-frequency (light) motor, 0–1 (default 0).

Released under the MIT License.