SugorokuPositionOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Host data and all native SVG drawing choices for a position.
インポート
import type { SugorokuPositionOptions } from "@johnmorrisdotca/sugoroku/element";
ほかのエクスポート元: @johnmorrisdotca/sugoroku/element/define
定義
type SugorokuPositionOptions = SugorokuDrawOptions & {
position?: Position;
onChange?: (position: Position) => void;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
variant (省略可) | VariantKey | VariantSpec | undefined | The variant, for how its sides' points line up. Default |
view (省略可) | Side | undefined | Whose home board is at the bottom of the drawing. Default white. |
home (省略可) | "left" | "right" | undefined | Which end of the board the trays are at. Default right. |
orientation (省略可) | Orientation | undefined | Lying across the page (default) or standing up, a better shape for a phone. |
numbers (省略可) | boolean | undefined | Put the numbers of the points beside them, counted for the side |
board (省略可) | SugorokuBoardName | undefined | A named board, whose surfaces are used; |
checkers (省略可) | SugorokuCheckerSetName | undefined | A named pair of checkers. Left out, the theme's own. |
colours (省略可) | Partial<SugorokuColours> | undefined | Any colours to use instead, each a CSS colour. |
theme (省略可) | "auto" | "light" | "dark" | undefined |
|
dice (省略可) | { side: Side; values: readonly number[]; spent?: readonly boolean[]; } | null | undefined | The dice rolled: white's are shown on its half of the board, black's on the other. |
cube (省略可) | { value: number; owner: Side | null; } | null | undefined | The doubling cube, or null (the default) for a game without one, which then has no rail for it. |
highlight (省略可) | { side: Side; from?: number | null; targets?: readonly number[]; movable?: readonly number[]; } | null | undefined | The checker picked up and where it may go, in |
label (省略可) | string | undefined | A description for screen readers. |
style (省略可) | boolean | undefined | Put |
position (省略可) | Position | undefined | |
onChange (省略可) | ((position: Position) => void) | undefined |
例
import type { SugorokuPositionOptions } from "@johnmorrisdotca/sugoroku/element";
const options: SugorokuPositionOptions = {};
console.log(Object.keys(options).length); // 00出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。