API

Icospheres

Icosphere

This is a sphere based on an icosahedron with 20 triangular faces that can be subdivided into smaller triangles.

MeshBuilder

Usage:

import { MeshBuilder } from "@babylonjs/core/Meshes/meshBuilder";
const icosphere = MeshBuilder.CreateIcoSphere("icosphere", options, scene);
optionsvaluedefault value
radius
(number) radius
1
radiusX
(number) the X radius, overwrites the radius value
radius
radiusY
(Vector3) the Y radius, overwrites the radius value
radius
radiusZ
(number) the Z radius, overwrites the radius value
radius
subdivisions
(number) the number of subdivisions
4
flat
(boolean) if true, the mesh faces have their own normals
true
updatable
(boolean) true if the mesh is updatable
false
sideOrientation
(number) side orientation
DEFAULTSIDE

Examples

Icosphere: Creating An Icosphere
Smoothed Icosphere: Creating A Smoothed Icosphere
Less subdivisions and changed radii: Icosphere With Less Subdivisions
Icosphere with animation over subdivisions: Icosphere With Animation Over Subdivisions

Mesh

Usage:

import { Mesh } from "@babylonjs/core/Meshes/mesh";
const icosphere = Mesh.CreateIcoSphere("icosphere", options, scene);

This is the same format as that for MeshBuilder.