Life on a cube, drawn with three.js in WebGL as solid, lit cubes. Every cell has 26 neighbors (the cells around it in all three directions) instead of eight, and the rule is written as before: B lists the neighbour counts that bring a dead cell to life and S the counts that let a live cell survive, with commas and ranges such as B7/S4-8. A random lump of cells starts in the middle of the cube; press Play, then drag to turn the cube, scroll or pinch to zoom, and right-drag to move it.

Loading three.js. If this note stays, the browser could not load or start it (WebGL may be switched off: Settings > System > "Use graphics acceleration when available").

This is the only page on the site that loads three.js: release 0.170.0 from jsdelivr, about 265 KB over the wire, as an ES module through an import map, with integrity hashes for the two files. The rest of the site stays plain scripts. The cells come from the site's PointCloud helper (lib/larsi.org/three/): one InstancedMesh in whichever shape the menu says, so thousands of cells are a single draw call, colored per instance by age and lit, with the depth buffer hiding what is behind; Dots switches to plain THREE.Points, the cheapest of all. Carter Bays proposed Life-like rules for three dimensions in the late 1980s, and found that the right counts are surprisingly narrow. The seven rules in the menu are ones my own search found keep changing from a random start (they have no names, and the well-known 3D Life rules I tried from memory died out on this grid). Many are busy: after a while a fifth to a third of the cube is alive and boiling. A rule that dies out or freezes stops by itself, and one that settles into a cycle shows a note and keeps running. Each generation rewrites the instance matrices for the live cells that can be seen; on a 32 x 32 x 32 cube that is a few thousand cubes.

This page was created with Claude Code.