本文へ移動

Kyuubuキューブ

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

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

目次

リファレンス · 直方体のエンジン

CuboidPreset型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

THE NAMED CUBOIDS: the shapes people know, each with a name, the way it is best seen, and a line on what makes it different. The name is the package's own for the plainer shapes; the shapes themselves are nobody's. Any a × b × c from 1 to 7 is a cuboid whether or not it has a name here.

dims is as the puzzle is first drawn (flat shapes face the reader, tall ones stand); label is its sides in order, so 3×3×2 and 2×3×3 are one shape and are listed once.

インポート

import type { CuboidPreset } from "@johnmorrisdotca/kyuubu/cuboid";

定義

type CuboidPreset = {
    key: string;
    label: string;
    dims: CuboidDims;
    name: Readonly<Record<KyuubuLanguage, string>>;
    says: Readonly<Record<KyuubuLanguage, string>>;
};

メンバー

名前型説明
keystring

A kebab-case key: floppy, tall-pillar.

labelstring

Its sides, smallest first: 2×3×3.

dimsCuboidDims

How it is first drawn: width, height and depth.

nameReadonly<Record<KyuubuLanguage, string>>

Its name, and what is special about it, in each language.

saysReadonly<Record<KyuubuLanguage, string>>

例

import type { CuboidPreset } from "@johnmorrisdotca/kyuubu/cuboid";
import { CUBOID_PRESETS } from "@johnmorrisdotca/kyuubu/cuboid";

const value: CuboidPreset = CUBOID_PRESETS[0]!;
console.log(value.dims);
[ 3, 2, 1 ]

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

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

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