Reference
SVG boards and materials
import { … } from "@johnmorrisdotca/tobiishi/draw";
1.1 kB minified and gzipped, with everything it imports (measured with esbuild)
Exports
| Name | Kind | What it is |
|---|---|---|
boundsOf | function | Returns the SVG view box size for the board. |
draw | function | A self-contained board drawing; no browser globals and no random SVG ids. |
escapeXml | function | Escapes text for safe inclusion in XML attributes and content. |
Material | type | Built-in board and peg palettes. |
MATERIALS | constant | Built-in palette names in player-menu order. |
pointOf | function | Maps a board cell index to its SVG centre point. |
Theme | type | SVG color properties that can be partially overridden by a caller. |
THEMES | constant | Palette values used by the SVG renderer. |