Geometric Primitives

# Cube

export function Cube(x, y, z, color = [1,1,1,1]) { const cube = new Triangles(); x /= 2; y /= 2; z /= 2; cube.addFace( […] ); […] return cube; }

# Sphere

This yields more equal-sized triangles that the typical normalization approach For more info see: http://mathproofs.blogspot.com/2005/07/mapping-cube-to-sphere.html And: https://medium.com/game-dev-daily/four-ways-to-create-a-mesh-for-a-sphere-d7956b825db4