sliceOffunction
The two axes a layer across axis is a slice of, and so what its slice measures: the other two sides.
Import it
import { sliceOf } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
function sliceOf(dims: CuboidDims, axis: CubeAxis): [number, number]
Parameters
| Name | Type | Description |
|---|---|---|
dims | CuboidDims | The cuboid’s x, y and z dimensions, in that order. |
axis | CubeAxis | The model axis: 0 for x, 1 for y, or 2 for z. |
Returns
[number, number]
The two axes a layer across axis is a slice of, and so what its slice measures: the other two sides.
Examples
import { sliceOf } from "@johnmorrisdotca/kyuubu/cuboid";
const dims = [2, 3, 3] as const;
console.log(sliceOf(dims, 0));[ 3, 3 ]What it prints (run when this page was built)