リファレンス
SVGの盤と素材
import { … } from "@johnmorrisdotca/tobiishi/draw";
最小化と gzip 圧縮をしたサイズは 1.1 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
boundsOf | 関数 | Returns the SVG view box size for the board. |
draw | 関数 | A self-contained board drawing; no browser globals and no random SVG ids. |
escapeXml | 関数 | Escapes text for safe inclusion in XML attributes and content. |
Material | 型 | Built-in board and peg palettes. |
MATERIALS | 定数 | Built-in palette names in player-menu order. |
pointOf | 関数 | Maps a board cell index to its SVG centre point. |
Theme | 型 | SVG color properties that can be partially overridden by a caller. |
THEMES | 定数 | Palette values used by the SVG renderer. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。