Reference · Cube engine and views
DragPicktype
The layer a drag has picked: its axis and layer, and the way across the screen (a unit vector, x right and y down) that turns it forwards by the right-hand rule. also is the layer beside it that turns with it, where the drag began on the seam between the two.
Import it
import type { DragPick } from "@johnmorrisdotca/kyuubu";
Definition
type DragPick = {
axis: CubeAxis;
layer: number;
along: [
number,
number
];
also?: number;
};
Members
| Name | Type | Description |
|---|---|---|
axis | CubeAxis | |
layer | number | |
along | [number, number] | |
also (optional) | number | undefined |
Examples
import type { DragPick } from "@johnmorrisdotca/kyuubu";
const value: DragPick = { axis: 0, layer: 2, along: [1, 0] };
console.log(value.layer);2What it prints (run when this page was built)