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 · SVG faces and looks

TileSvgOptionstype

How a tile on its own is drawn.

Import it

import type { TileSvgOptions } from "@johnmorrisdotca/jarajara/faces";

Definition

type TileSvgOptions = {
    design?: TileDesign;
    red?: boolean;
    title?: string;
    flat?: boolean;
    bare?: boolean;
    mirror?: TileMirror;
};

Members

NameTypeDescription
design (optional)TileDesign | undefined

A design's drawing instead of Jarajara's own.

red (optional)boolean | undefined

The red five of a design that has one, for a five.

title (optional)string | undefined

What a screen reader says. Unless said, the tile's name in English. An empty string makes the picture decoration.

flat (optional)boolean | undefined

The old look: the face with a sliver of its side, in the 32 by 42 box. Unless said, the tile is drawn solid.

bare (optional)boolean | undefined

Only the face, no thickness, in a box of exactly 30 by 40: for a page that gives the tile its thickness itself, as the turning elements do.

mirror (optional)"none" | "horizontal" | "vertical" | "both" | undefined

Which way the thickness shows. Unless said, below and to the left.

Examples

import type { TileSvgOptions } from "@johnmorrisdotca/jarajara/faces";

const value: TileSvgOptions = {title:"One of characters",mirror:"horizontal"};
console.log(value);
{ title: 'One of characters', mirror: 'horizontal' }

What it prints (run when this page was built)

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