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

TileSoundsOptionstype

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

Import it

import type { TileSoundsOptions } from "@johnmorrisdotca/jarajara/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/jarajara/tile-sounds";

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

What it prints (run when this page was built)

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