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 · Cube engine and views

faceOfNormalfunction

The face whose outward normal this is.

Import it

import { faceOfNormal } from "@johnmorrisdotca/kyuubu";

Definition

function faceOfNormal(normal: Vec3): CubeFace

Parameters

NameTypeDescription
normalVec3

The outward face normal in model coordinates.

Returns

"U" | "R" | "F" | "D" | "L" | "B"

The face whose outward normal this is.

Examples

import { faceOfNormal } from "@johnmorrisdotca/kyuubu";

console.log(faceOfNormal([0, 1, 0]));
U

What it prints (run when this page was built)

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