@achirita/blox
Version:
A CAD library for building 3D models in the browser.
15 lines (14 loc) • 580 B
TypeScript
import { Plane, Vector } from '../math';
/**
* Creates a cube based on the specified parameters.
* @param {Object} parameters - The parameters for the cube.
* @param {Plane} [parameters.plane=Plane.XY] - The plane in which the cube is constructed.
* @param {Vector} [parameters.center=Vector.ZERO] - The center of the cube.
* @param {number} parameters.size - The size of the cube.
* @returns {Solid} A `Solid` object representing the constructed cube.
*/
export function Cube({ plane, center, size }: {
plane?: Plane;
center?: Vector;
size: number;
}): Solid;