Skip to the content

Dominoドミノ

Deal seeded dominoes, play Mexican Train with native rules and computers, and replay a saved game.

Domino is the Japanese borrowed word ドミノ for dominoes. About the name

Contents

Reference · Sound controls

TileSoundsOptionstype

How a table's sounds are made. Every field may be left out.

Import it

import type { TileSoundsOptions } from "@johnmorrisdotca/domino/tile-sounds";

Definition

type TileSoundsOptions = {
    muted?: boolean;
    volume?: number;
    load?: () => Promise<{
        TILE_SOUND_DATA: TileSoundData;
    }>;
    window?: TileSoundWindow | null;
};

Members

NameTypeDescription
muted (optional)boolean | undefined

Start muted: nothing plays, and nothing is fetched, until setMuted(false). Unless said, not muted.

volume (optional)number | undefined

How loud, from 0 to 1. Unless said, 0.6.

load (optional)(() => Promise<{ TILE_SOUND_DATA: TileSoundData; }>) | undefined

Where the recordings come from: the package's own module unless another is handed in.

window (optional)TileSoundWindow | null | undefined

The window to make sound in: the page's own unless another is handed in (a test's, or none for silence).

Examples

import type { TileSoundsOptions } from "@johnmorrisdotca/domino/tile-sounds";

const value: TileSoundsOptions = {muted:true,window:null};
console.log(value);
{ muted: true, window: null }

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/domino 1.1.4.