3d-spinner and beyond: shading & materials

Every shape takes an optional material (ambient Ka, specular Ks/Ns, and emissive Ke), applied to all its faces. Flat shading is the baseline; a material scales the ambient fill, then layers a Blinn-Phong highlight and an additive glow. Specular reads best on the WebGL and WebGPU backends (per-pixel highlight); Canvas 2D approximates it per face.

Material presets

Playground