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

SpinOptionstype

How a tile is spun.

Import it

import type { SpinOptions } from "@johnmorrisdotca/jarajara/element";

Definition

type SpinOptions = {
    direction?: "clockwise" | "anticlockwise";
    turns?: number;
    ms?: number;
};

Members

NameTypeDescription
direction (optional)"clockwise" | "anticlockwise" | undefined

Which way it spins. Unless said, clockwise.

turns (optional)number | undefined

How many whole turns before it comes to rest where it lay. Unless said, 3; at most 20.

ms (optional)number | undefined

How long the spin takes, in milliseconds. Unless said, 700 and 420 a turn.

Examples

import type { SpinOptions } from "@johnmorrisdotca/jarajara/element";

const value: SpinOptions = {direction:"clockwise",turns:1,ms:300};
console.log(value);
{ direction: 'clockwise', turns: 1, ms: 300 }

What it prints (run when this page was built)

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