本文へ移動

Kyuubuキューブ

CSS 3Dのキューブをタッチ、キー、回転記号で回します。シードでスクランブルを再現し、名前付きの手順で解き方を追えます。

「キューブ」は、英語のcubeを表す日本語の表記です。 名前について(英語)

目次

リファレンス · キューブのエンジンと表示

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. "6%" when left out.

stickerRadius (省略可)string | undefined

How round a sticker's corners are, as a CSS length or percentage. "14%" when left out.

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): "15px" when left out, "0" for square. Never more than nearly half a sticker.

例

import type { CubeTheme } from "@johnmorrisdotca/kyuubu";
import { CUBE_THEMES } from "@johnmorrisdotca/kyuubu";

const value: CubeTheme = CUBE_THEMES.paper;
console.log(value.plastic);
#1f2320

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/kyuubu 1.14.1 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。