Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

icosphere

hughsk1.2kMIT1.0.0

Generates icosphere meshes of varying levels of complexity

icosphere, icosahedron, sphere, generate, mesh, webgl, 3d, model

readme

icosphere experimental

Generates icosphere meshes of varying levels of complexity – implementation sourced from this article.

icosphere

Usage

NPM

mesh = icosphere(subdivisions)

Creates a new icosphere mesh object. You'll want to keep subdivisions within the range of 0 and 5 or it starts to get really costly. The mesh object has the following properties:

  • cells: an indexed list of each triangle's positions.
  • positions: a list of positions for each vertex.

See Also

License

MIT. See LICENSE.md for details.