UNPKG

@achirita/blox

Version:

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

14 lines (13 loc) 551 B
import { Plane } from '../math'; import { Face } from '../modeling'; /** * Creates a polygon based on the specified parameters. * @param {Object} parameters - The parameters for the polygon. * @param {Plane} [parameters.plane=Plane.XY] - The plane in which the polygon is constructed. * @param {Vector[]} parameters.vertices - An array of vertices defining the polygon. * @returns {Face} A `Face` object representing the constructed polygon. */ export function Polygon({ plane, vertices }: { plane?: Plane; vertices: Vector[]; }): Face;