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

blockSvgfunction

The block drawn behind a face: the back plate and the ivory layer in steps from the far side to the face, and the shading of the sides (the side the light falls on lighter, the other darker). The face is drawn over it by the caller. For a tile seen from its back (side: "back") the back plate is the near layer and the ivory the far one.

Import it

import { blockSvg } from "@johnmorrisdotca/jarajara/faces";

Definition

function blockSvg(colours: BlockColours, direction: BlockDirection, side?: "face" | "back"): string

Parameters

NameTypeDescription
coloursBlockColours

The solid tile block’s colours.

directionBlockDirection

The horizontal and vertical orientation of the block.

side (optional)"face" | "back"

Whether to show the face or the back.

Returns

string

The block drawn behind a face: the back plate and the ivory layer in steps from the far side to the face, and the shading of the sides (the side the light falls on lighter, the other darker). The face is drawn over it by the caller. For a tile seen from its back (side: "back") the back plate is the near layer and the ivory the far one.

Examples

import { blockColours, blockSvg } from "@johnmorrisdotca/jarajara/faces";

console.log(blockSvg(blockColours(),{x:1,y:1}).length);
537

What it prints (run when this page was built)

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