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

tileFaceSvgfunction

One face's drawing, in the tile's own 30 by 40, with no tile under it: the inside of a <symbol> or a <g>, for a board that draws its own tiles. Null for a letter that is no face. With a design, that design's drawing of the face (fitted to the 30 by 40), or Jarajara's own where it has none.

Import it

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

Definition

function tileFaceSvg(code: string, design?: TileDesign, red?: boolean): string | null

Parameters

NameTypeDescription
codestring

The one-character face code or tile identifier.

design (optional)TileDesign | undefined

The optional tile artwork design.

red (optional)boolean

Whether a supported five uses its red face drawing.

Returns

string | null

One face's drawing, in the tile's own 30 by 40, with no tile under it: the inside of a <symbol> or a <g>, for a board that draws its own tiles. null for a letter that is no face. With a design, that design's drawing of the face (fitted to the 30 by 40), or Jarajara's own where it has none.

Examples

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

console.log(tileFaceSvg("a")?.length);
628

What it prints (run when this page was built)

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