Skip to the content

Jarajaraジャラジャラ

Draw mahjong tiles, arrange racks and stacked boards, and play seeded Awase alone or at a shared table.

Jarajara is the Japanese sound of mahjong tiles rattling together. 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/jarajara/tile-sounds";

Definition

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

Parameters

NameTypeDescription
countnumber

The number of rack tiles or sounds requested.

gap (optional)number

The delay or spacing between successive 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/jarajara/tile-sounds";

console.log(soundTimes(3,100));
[ 0, 100, 200 ]

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/jarajara 1.7.0.