Skip to main content
Version: 0.12.0 (latest)

UeIcosahedronGeometry

Represents a 3D icosahedron geometry.
The icosahedron is a polyhedron with 20 equilateral triangular faces. By increasing the detail parameter, the geometry is recursively subdivided by projecting the vertices onto a sphere, transforming it into a geodesic sphere.

new UeIcosahedronGeometry(radius = 1, detail = 0, data = {})

Inherits from UeGeometry

Constructor Parameters​

ParameterTypeDefaultDescription
radiusnumber1Radius of the icosahedron
detailnumber0Subdivision level. > 0 transforms the icosahedron into a geodesic sphere.
data.colorColorc_whiteOptional base color for the vertices (GML format)
data.alphanumber1Optional base alpha for the vertices

Example​

// Creates a simple icosahedron
var geo = new UeIcosahedronGeometry(10, 0);

// Creates a detailed geodesic sphere
var sphereGeo = new UeIcosahedronGeometry(10, 2);