Skip to content

Type Alias: SoundThrow ​

ts
type SoundThrow = object;

Defined in: src/ui/sound.ts:9

The sound of a roll: a shake while the dice tumble and a knock as each one lands. The recordings are real dice (see SOUNDS.md), loaded the first time a tray with its sound on rolls and never before, so a page that stays silent never fetches them. Where they cannot be loaded or decoded, a short knock made in the browser stands in. Nothing here throws: a platform with no audio, a blocked context or a failed decode is simply silent.

Properties ​

dice ​

ts
dice: number;

Defined in: src/ui/sound.ts:11

How many dice were thrown.


ms ​

ts
ms: number;

Defined in: src/ui/sound.ts:13

How long the tumble lasts, in milliseconds. Nought when the dice land at once.


landings ​

ts
landings: number[];

Defined in: src/ui/sound.ts:15

When each die lands, in milliseconds from the throw, in the order thrown.

MIT © John Morris