Skip to the content

Kyuubuキューブ

Turn CSS 3D cubes by touch, keys or notation, reproduce a scramble from a seed, and follow a solve one named step at a time.

Kyuubu (キューブ) is the Japanese spelling of cube. About the name

Contents

Reference · Cuboid engine

cuboidPastCommitfunction

Whether a held layer is past its point of no return: letting go now, at rest, makes a move.

Import it

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

Definition

function cuboidPastCommit(angle: number, halfOnly: boolean, commitAngle?: number): boolean

Parameters

NameTypeDescription
anglenumber

The signed drag angle in degrees.

halfOnlyboolean

Whether the layer can only make a half turn.

commitAngle (optional)number

The drag angle in degrees at which a resting release commits a turn.

Returns

boolean

Whether a held layer is past its point of no return: letting go now, at rest, makes a move.

Examples

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

console.log(cuboidPastCommit(100, true));
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kyuubu 1.14.1.