UNPKG

1.12 kBTypeScriptView Raw
1import { PolyhedronGeometry } from "./PolyhedronGeometry.js";
2
3/**
4 * A class for generating an icosahedron geometry.
5 * @see {@link https://threejs.org/docs/index.html#api/en/geometries/IcosahedronGeometry | Official Documentation}
6 * @see {@link https://github.com/mrdoob/three.js/blob/master/src/geometries/IcosahedronGeometry.js | Source}
7 */
8export class IcosahedronGeometry extends PolyhedronGeometry {
9 /**
10 * Create a new instance of {@link IcosahedronGeometry}
11 * @param radius Expects a `Float`. Default `1`
12 * @param detail Setting this to a value greater than 0 adds more vertices making it no longer an icosahedron.
13 * When detail is greater than 1, it's effectively a sphere. Expects a `Integer`. Default `0`
14 */
15 constructor(radius?: number, detail?: number);
16
17 /**
18 * A Read-only _string_ to check if `this` object type.
19 * @remarks Sub-classes will update this value.
20 * @defaultValue `IcosahedronGeometry`
21 */
22 override readonly type: string | "IcosahedronGeometry";
23
24 /** @internal */
25 static fromJSON(data: {}): IcosahedronGeometry;
26}