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