Reference · SVG faces and looks
LayoutSvgOptionstype
Native tile, highlight, artwork, cloth and layout-view choices for SVG rendering.
Import it
import type { LayoutSvgOptions } from "@johnmorrisdotca/jarajara/faces";
Definition
type LayoutSvgOptions = {
chosen?: number | null;
hinted?: readonly number[];
matching?: readonly number[];
found?: {
free: readonly number[];
blocked: readonly number[];
};
showFree?: boolean;
hideBlocked?: boolean;
marked?: readonly number[];
prefix?: string;
design?: TileDesign;
redFives?: boolean;
redFrom?: string;
cloth?: Cloth | string;
symbols?: boolean;
margin?: number;
mirror?: TileMirror | string;
};
Members
| Name | Type | Description |
|---|---|---|
chosen (optional) | number | null | undefined | The slot chosen, ringed and tinted. |
hinted (optional) | readonly number[] | undefined | Slots ringed as a hint. |
matching (optional) | readonly number[] | undefined | Slots ringed softly: the tiles that match the one chosen, when a page lights them. |
found (optional) | { free: readonly number[]; blocked: readonly number[]; } | undefined | What Find lights, as |
showFree (optional) | boolean | undefined | Wash every blocked tile darker, so the free ones stand out. |
hideBlocked (optional) | boolean | undefined | Draw a blocked tile blank, its face not shown, as in the blackout challenge: only a free tile shows what it is. |
marked (optional) | readonly number[] | undefined | Slots marked for a challenge (a gold tile, a target suit): a gold ring and corner. |
prefix (optional) | string | undefined | The prefix of the face symbols' ids: one a board, when a page draws several. |
design (optional) | TileDesign | undefined | A design's drawings instead of Jarajara's own, as |
redFives (optional) | boolean | undefined | Draw the red fives of a design that has them: the first five of each suit in slot order is red. |
redFrom (optional) | string | undefined | The tiles that decide which fives are red, when it is not the ones drawn: a game's tiles as first dealt, so the red five stays the same tile as the others are taken. Unless said, the tiles drawn. |
cloth (optional) | string | undefined | Lay the layout on a cloth, a felt behind it with a margin: |
symbols (optional) | boolean | undefined | Put the faces' symbols in the picture (unless said). A page that draws a board again and again keeps them once, in a |
margin (optional) | number | undefined | Frame the drawing on the tiles' drawn extent plus this margin ( |
mirror (optional) | string | undefined | The view: |
Examples
import type { LayoutSvgOptions } from "@johnmorrisdotca/jarajara/faces";
const value: LayoutSvgOptions = {showFree:true,cloth:"green"};
console.log(value);{ showFree: true, cloth: 'green' }What it prints (run when this page was built)