UNPKG

@achirita/blox

Version:

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

18 lines (17 loc) 776 B
import { Plane, Vector } from '../math'; import { Face } from '../modeling'; /** * Creates a ellipse based on the specified parameters. * @param {Object} parameters - The parameters for the ellipse. * @param {Plane} [parameters.plane=Plane.XY] - The plane in which the ellipse is constructed. * @param {Vector} [parameters.center=Vector.ZERO] - The center of the ellipse. * @param {number} parameters.xRadius - The radius of the ellipse along the X-axis. * @param {number} parameters.yRadius - The radius of the ellipse along the Y-axis. * @returns {Face} A `Face` object representing the constructed ellipse. */ export function Ellipse({ plane, center, xRadius, yRadius }: { plane?: Plane; center?: Vector; xRadius: number; yRadius: number; }): Face;