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 ​
| Parameter | Type |
|---|---|
gaps | HapticGaps<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 ​
| Parameter | Type |
|---|---|
kind | K |
now | number |
Returns ​
boolean
reset() ​
ts
reset(): void;Defined in: src/input/haptics.ts:27
Forgets every kind's last buzz.
Returns ​
void