本文へ移動

Kyuubuキューブ

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

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

目次

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

planCuboidReplay関数

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

A scramble and a solve read, checked and timed. A solve that does not end on a solved puzzle is still planned, with solved: false; only text that cannot be read is refused, with the piece and what is wrong with it.

インポート

import { planCuboidReplay } from "@johnmorrisdotca/kyuubu/cuboid";

定義

function planCuboidReplay(source: CuboidReplaySource): { ok: true; plan: CuboidReplayPlan; } | { ok: false; fault: CuboidReplayFault; }

引数

名前型説明
sourceCuboidReplaySource

The scramble and solution to plan, or the guide’s explicit moves or solving method.

戻り値

{ ok: true; plan: CuboidReplayPlan; } | { ok: false; fault: CuboidReplayFault; }

A scramble and a solve read, checked and timed. A solve that does not end on a solved puzzle is still planned, with solved: false; only text that cannot be read is refused, with the piece and what is wrong with it.

例

import { planCuboidReplay } from "@johnmorrisdotca/kyuubu/cuboid";

const dims = [2, 3, 3] as const;
console.log(planCuboidReplay({ dims: [2, 3, 3], scramble: "R", solution: "R'", timeMs: 1000 }));
{
  ok: true,
  plan: {
    dims: [ 2, 3, 3 ],
    size: 3,
    scramble: [ [Object] ],
    steps: [ [Object] ],
    start: 'UFUFUFRRRRRRRRRFDFDFDDBDBDBLLLLLLLLLUBUBUB',
    scrambleStates: [
      'UUUUUURRRRRRRRRFFFFFFDDDDDDLLLLLLLLLBBBBBB',
      'UFUFUFRRRRRRRRRFDFDFDDBDBDBLLLLLLLLLUBUBUB'
    ],
    states: [
      'UFUFUFRRRRRRRRRFDFDFDDBDBDBLLLLLLLLLUBUBUB',
      'UUUUUURRRRRRRRRFFFFFFDDDDDDLLLLLLLLLBBBBBB'
    ],
    solved: true,
    stepMs: [ 1000 ],
    totalMs: 1000,
    pace: 'spread'
  }
}

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

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

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