CuboidDragPicktype
The layer a drag has picked: its axis and layer, the way across the screen (a unit vector, x right and y down) that turns it forwards by the right-hand rule, and whether it can only be turned by a half turn.
Import it
import type { CuboidDragPick } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
type CuboidDragPick = {
axis: CubeAxis;
layer: number;
along: [
number,
number
];
halfOnly: boolean;
};
Members
| Name | Type | Description |
|---|---|---|
axis | CubeAxis | |
layer | number | |
along | [number, number] | |
halfOnly | boolean |
Examples
import type { CuboidDragPick } from "@johnmorrisdotca/kyuubu/cuboid";
const value: CuboidDragPick = { axis: 1, layer: 0, along: [1, 0], halfOnly: true };
console.log(value.halfOnly);trueWhat it prints (run when this page was built)