Skip to content

1681-engine / index / HapticGate

Class: HapticGate<K> ​

Defined in: src/input/haptics.ts:12

One buzz per kind per its gap. Pure, so the rule is tested.

Type Parameters ​

Type Parameter
K extends string

Constructors ​

Constructor ​

ts
new HapticGate<K>(gaps?): HapticGate<K>;

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

Parameters ​

ParameterType
gapsHapticGaps<K>

Returns ​

HapticGate<K>

Methods ​

allow() ​

ts
allow(kind, now): boolean;

Defined in: src/input/haptics.ts:18

Whether a buzz of kind at now (ms) may go; one that may is counted.

Parameters ​

ParameterType
kindK
nownumber

Returns ​

boolean


reset() ​

ts
reset(): void;

Defined in: src/input/haptics.ts:27

Forgets every kind's last buzz.

Returns ​

void

Released under the MIT License.