primitive-geometry
Version:
Geometries for 3D rendering, including normals, UVs and cell indices (faces). Perfect if you want to supercharge your dependency folder... with 30KB of geometries.
22 lines (17 loc) • 482 B
JavaScript
/** @module icosahedron */
import icosphere from "./icosphere.js";
import { checkArguments } from "./utils.js";
/**
* @typedef {object} IcosahedronOptions
* @property {number} [radius=0.5]
*/
/**
* @alias module:icosahedron
* @param {IcosahedronOptions} [options={}]
* @returns {import("../types.js").SimplicialComplex}
*/
function icosahedron({ radius } = {}) {
checkArguments(arguments);
return icosphere({ subdivisions: 0, radius });
}
export default icosahedron;