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

soundTimesfunction

When each of count sounds starts, in milliseconds from the first: one every gap, and no more than MOST_SOUNDS_AT_ONCE, spread over the same time.

Import it

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

Definition

function soundTimes(count: number, gap?: number): number[]

Parameters

NameTypeDescription
countnumber

The requested number of tile sounds.

gap (optional)number

Milliseconds between consecutive tile sounds.

Returns

number[]

When each of count sounds starts, in milliseconds from the first: one every gap, and no more than MOST_SOUNDS_AT_ONCE, spread over the same time.

Examples

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

console.log(soundTimes(4,85));
[ 0, 85, 170, 255 ]

What it prints (run when this page was built)

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