本文へ移動

Kyuubuキューブ

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

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

目次

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

KeepScramblingHandle型

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

What a running loop can be told.

インポート

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

定義

type KeepScramblingHandle = {
    start(): void;
    stop(): void;
    setPace(pace: number | ScramblePace): void;
    readonly running: boolean;
    destroy(): void;
};

メンバー

名前型説明
start(): void

Carry on, or begin. Does nothing while the page is hidden or motion is reduced; it starts when they allow it.

stop(): void

Stop turning. The cube stays as it is.

setPace(pace: number | ScramblePace): void

Change how often it turns, at once.

runningboolean

Whether it has been asked to run and nothing is holding it back.

destroy(): void

Stop for good and let go of the page.

例

import type { KeepScramblingHandle } from "@johnmorrisdotca/kyuubu";
import { keepScrambling } from "@johnmorrisdotca/kyuubu";

const value: KeepScramblingHandle = keepScrambling({ size: 3, busy: false, turn: () => {} }, { autoplay: false });
console.log(value.running);

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

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