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

rackPlacesfunction

Where each of count tiles lies, in order: the first at x 0, each a step on, groups set apart, raised tiles lifted.

Import it

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

Definition

function rackPlaces(count: number, options?: RackLayoutOptions): RackPlace[]

Parameters

NameTypeDescription
countnumber

The number of rack tiles or sounds requested.

options (optional)RackLayoutOptions

Native game, SVG, sound or presentation options.

Returns

RackPlace[]

Where each of count tiles lies, in order: the first at x 0, each a step on, groups set apart, raised tiles lifted.

Examples

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

console.log(rackPlaces(3,{breaks:[1]}));
[ { x: 0, y: 0 }, { x: 1.47, y: 0 }, { x: 2.49, y: 0 } ]

What it prints (run when this page was built)

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