drawTsunagiMarble関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One marble on its own, as SVG text: for a legend or an icon. pair is which of the board's pairs it is, from 0.
インポート
import { drawTsunagiMarble } from "@johnmorrisdotca/tsunagi/draw";
定義
function drawTsunagiMarble(pair: number, options?: { marks?: TsunagiMarks; colours?: TsunagiColourSetName | readonly TsunagiColour[]; label?: string; style?: boolean; id?: string; }): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
pair | number | The zero-based pair index. |
options (省略可) | { marks?: TsunagiMarks; colours?: TsunagiColourSetName | readonly TsunagiColour[]; label?: string; style?: boolean; id?: string; } | Native drawing, geometry, game or mount settings. |
戻り値
string
One marble on its own, as SVG text: for a legend or an icon. pair is which of the board's pairs it is, from 0.
例
import { drawTsunagiMarble } from "@johnmorrisdotca/tsunagi/draw";
console.log(drawTsunagiMarble(0,{marks:"numbers"}).length);529出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。