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 · Tile and table elements

setPageSoundsfunction

Give every element on the page another player for its sounds: a page's own, or a test's stand-in that only records what was asked. Pass null to go back to the package's own, made again when next needed.

Import it

import { setPageSounds } from "@johnmorrisdotca/jarajara/element";

Definition

function setPageSounds(next: TileSounds | null): void

Parameters

NameTypeDescription
nextTileSounds | null

The page sound handle, or null to clear and close it.

Examples

import { createTileSounds } from "@johnmorrisdotca/jarajara/tile-sounds";
import { setPageSounds } from "@johnmorrisdotca/jarajara/element";

const sounds = createTileSounds({muted:true,window:null});
setPageSounds(sounds);
setPageSounds(null);
console.log(sounds.muted);
true

What it prints (run when this page was built)

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