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