LookLightweight
Voxels
A world made of little cubes.
A world built from little cubes, Minecraft style. Easy to edit block by block and easy for things to collide with. The look stays playful and blocky however it is lit.
- Breaks when
- one mesh per cube dies fast; needs greedy meshing
- Also called
- voxel, Minecraft-style, MagicaVoxel
Prompts
Greedy-meshed terrain chunk
A 32×32×32 voxel chunk in Three.js from a 2D heightmap (simplex, 3 octaves): build one BufferGeometry per chunk containing only exposed faces, merged with greedy meshing along each axis. Per-face ambient occlusion baked into vertex colors (the 4-neighbour method). One MeshLambertMaterial, flat shading. Print triangle count before and after greedy meshing.
Editable voxel canvas
A 16×16×16 voxel editor: raycast the pointer against the voxel grid (DDA traversal, not mesh raycasting), highlight the face under the cursor in yolk, click to add a block on that face, shift-click to remove. Rebuild only the affected chunk. Serialize the grid to a 4,096-byte base64 string in the URL hash.
Isometric voxel scene, 2D canvas
Canvas 2D, no WebGL: draw a 24×24 voxel landscape isometrically with three face shades (top paper, left mint, right ink at 60%), painter’s order back to front. Animate water tiles with a sine offset. Keep all 24×24×8 cubes at 60 fps by pre-rendering each cube shade to an offscreen sprite.
Related
Resources · 1
- three.js example: Minecraft-style voxelsmrdoobsite · code · demoJun 22, 2026