CubeTheme型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
How a cube looks: its six colours, its plastic, and the shape of a sticker. Everything may be left out, and what is left out stays as it was.
インポート
import type { CubeTheme } from "@johnmorrisdotca/kyuubu";
定義
type CubeTheme = {
colours?: Partial<Record<CubeFace, string>>;
plastic?: string;
stickerInset?: string;
stickerRadius?: string;
cornerRadius?: string;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
colours (省略可) | Partial<Record<"U" | "R" | "F" | "D" | "L" | "B", string>> | undefined | Colours for the six faces, by the letter a solved face carries. Any CSS colour. |
plastic (省略可) | string | undefined | The colour of the plastic between stickers and inside the cube. |
stickerInset (省略可) | string | undefined | How far a sticker sits in from the edge of its square, as a CSS length or percentage of the square. |
stickerRadius (省略可) | string | undefined | How round a sticker's corners are, as a CSS length or percentage. |
cornerRadius (省略可) | string | undefined | How round the cube's own corners are, as a CSS length on a cube drawn 300px across (it grows and shrinks with the cube): |
例
import type { CubeTheme } from "@johnmorrisdotca/kyuubu";
import { CUBE_THEMES } from "@johnmorrisdotca/kyuubu";
const value: CubeTheme = CUBE_THEMES.paper;
console.log(value.plastic);#1f2320出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。