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

tileSvgfunction

One tile on its own, as a whole <svg>: a solid block, the face on its ivory over a back plate whose thickness shows on two sides, named for a screen reader. Its width and height are the caller's, through CSS; the picture keeps its box (TILE_BOX). With flat, the old look (a sliver of its side in 32 by 42), and with bare the face alone in 30 by 40. Null for a letter that is no face.

Import it

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

Definition

function tileSvg(code: string, options?: TileSvgOptions): string | null

Parameters

NameTypeDescription
codestring

The one-character face code or tile identifier.

options (optional)TileSvgOptions

Native game, SVG, sound or presentation options.

Returns

string | null

A complete SVG tile string, or null for an unknown face code.

Examples

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

console.log(tileSvg("a",{title:"One of characters"})?.startsWith("<svg"));
true

What it prints (run when this page was built)

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