Reference · SVG faces and looks
tileFaceSymbolsfunction
Every face as a <symbol> in one <defs>, ids <prefix>-<code>, so a board
of 144 tiles draws 42 pictures and places each with a <use>. A design with
a plate of its own adds it as <prefix>-body, and its red fives are
<prefix>-<code>-red.
Import it
import { tileFaceSymbols } from "@johnmorrisdotca/jarajara/faces";
Definition
function tileFaceSymbols(prefix: string, options?: TileSymbolOptions): string
Parameters
| Name | Type | Description |
|---|---|---|
prefix | string | The identifier prefix of the generated SVG symbols. |
options (optional) | TileSymbolOptions | Native game, SVG, sound or presentation options. |
Returns
string
Every face as a <symbol> in one <defs>, ids <prefix>-<code>, so a board of 144 tiles draws 42 pictures and places each with a <use>. A design with a plate of its own adds it as <prefix>-body, and its red fives are <prefix>-<code>-red.
Examples
import { tileFaceSymbols } from "@johnmorrisdotca/jarajara/faces";
console.log(tileFaceSymbols("article",{faces:["a","F"]}).length);970What it prints (run when this page was built)