TsunagiBoardLook型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a board is made of: every part a CSS colour.
インポート
import type { TsunagiBoardLook } from "@johnmorrisdotca/tsunagi/draw";
定義
type TsunagiBoardLook = {
paper: string | readonly [
string,
string
];
frame: string;
grid: string;
ink: string;
coordinate: string;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
paper | string | readonly [string, string] | The playing surface: one colour, or two, a light and a deep one, laid as a soft gradient. |
frame | string | The frame round the surface. |
grid | string | The rules between cells, and the dashed rim of a board that wraps. |
ink | string | Walls, blocked cells and a bridge's rails. |
coordinate | string | The letters and numbers down the sides, where they are drawn. |
例
import type { TsunagiBoardLook } from "@johnmorrisdotca/tsunagi/draw";
import { tsunagiBoardLook } from "@johnmorrisdotca/tsunagi/draw";
const value: TsunagiBoardLook = tsunagiBoardLook("paper");
console.log(value);{
paper: '#fbf8f1',
frame: '#a98954',
grid: '#cfc6b2',
ink: '#1f2320',
coordinate: '#7c5a30'
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。