UNPKG

@achirita/blox

Version:

A CAD library for building 3D models in the browser.

20 lines (19 loc) 874 B
import { Plane, Vector } from '../math'; import { Solid } from '../modeling'; /** * Creates a cuboid based on the specified parameters. * @param {Object} parameters - The parameters for the cuboid. * @param {Plane} [parameters.plane=Plane.XY] - The plane in which the cuboid is constructed. * @param {Vector} [parameters.center=Vector.ZERO] - The center of the cuboid. * @param {number} parameters.width - The width of the cuboid (along the X-axis). * @param {number} parameters.height - The height of the cuboid (along the Y-axis). * @param {number} parameters.depth - The depth of the cuboid (along the Z-axis). * @returns {Solid} A `Solid` object representing the constructed cuboid. */ export function Cuboid({ plane, center, width, height, depth }: { plane?: Plane; center?: Vector; width: number; height: number; depth: number; }): Solid;