本文へ移動

Kyuubuキューブ

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

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

目次

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

ReplayStatus型

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

What a replay tells whoever is showing it.

インポート

import type { ReplayStatus } from "@johnmorrisdotca/kyuubu";

定義

type ReplayStatus = {
    position: number;
    total: number;
    playing: boolean;
    ended: boolean;
    scrambleAt: number;
    scrambleTotal: number;
    speed: number;
    loop: boolean;
    elapsedMs: number;
};

メンバー

名前型説明
positionnumber

How many steps have been made: 0 on the scrambled cube, total at the end.

totalnumber

How many steps the solve has.

playingboolean

Whether it is running.

endedboolean

Whether it has reached the end.

scrambleAtnumber

How many steps of the scramble have been made: all of them (scrambleTotal) unless the viewer has gone back into it.

scrambleTotalnumber

How many steps the scramble has.

speednumber

The speed it runs at: 1 is the solve's own pace.

loopboolean

Whether it begins again when it ends.

elapsedMsnumber

The time into the solve at its own pace, in milliseconds.

例

import type { ReplayStatus } from "@johnmorrisdotca/kyuubu";


const value: ReplayStatus = { position: 0, total: 2, playing: false, ended: false, scrambleAt: 1, scrambleTotal: 1, speed: 1, loop: false, elapsedMs: 0 };
console.log(value.position);
0

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

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

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