The shapes
- Pentagonal a pyramid with a 5-sided base and 5 triangular faces rising to the tip.
- Dodecahedron 12 pentagonal faces; its 20 vertices come from the golden ratio.
- Octahedron 8 triangular faces; besides spinning, it bobs up and down.
Three solids built vertex by vertex in WebGL, with no 3D library: a pyramid with a pentagonal base, a dodecahedron and an octahedron, each spinning on its own axis.
Space pauses too
Each shape is a list of vertices, one color per face and a list of indices saying which vertices make each triangle. Pentagons are split into three triangles.
Plain WebGL with hand-written shaders and gl-matrix for the matrices: a 45° perspective projection and one rotation per shape every frame. At 1x they turn once every 5 seconds.