UNPKG

@achirita/blox

Version:

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

17 lines (16 loc) 712 B
import { Plane, Vector } from '../math'; /** * Creates a rectangle based on the specified parameters. * @param {Object} parameters - The parameters for the rectangle. * @param {Plane} [parameters.plane=Plane.XY] - The plane in which the rectangle is constructed. * @param {Vector} [parameters.center=Vector.ZERO] - The center of the rectangle. * @param {number} parameters.width - The width of the rectangle. * @param {number} parameters.height - The height of the rectangle. * @returns {Face} A `Face` object representing the constructed rectangle. */ export function Rectangle({ plane, center, width, height }: { plane?: Plane; center?: Vector; width: number; height: number; }): Face;