A playable, self-contained Minecraft clone that runs in the browser with no build step. Pure ES modules + Three.js via CDN, procedurally-generated textures and sound (no binary assets).
npm install # only needed once (dev server)
npm run serve # serves on http://localhost:8080Open http://localhost:8080 and click the screen to lock the mouse.
| Action | Key |
|---|---|
| Move | W A S D |
| Look | Mouse |
| Jump / Fly toggle | Space (double-tap to fly) |
| Sprint | Shift |
| Mine / Attack | Left click |
| Place / Eat / Open station | Right click |
| Pick block | Middle click |
| Select hotbar | 1–9 / scroll |
| Inventory + crafting | E |
| Creative toggle | G |
| Respawn | R |
- Chunked voxel world with face-culled meshing
- Procedural terrain: 4 biomes (plains/forest/desert/snowy), caves, water, trees, cacti
- 5 ores (coal/iron/gold/diamond/redstone) with tool-tier harvest rules
- Full item/tool registry (16 tools), block hardness + mining times, drops
- Crafting (2×2 + 3×3 table, shaped/shapeless), furnace smelting
- Survival: health, hunger, saturation, fall damage, regen, eating, death/respawn
- Mobs: pig/cow/sheep (passive) + zombie (hostile, burns in daylight); dropped-item pickups
- Procedural Web Audio SFX; day/night cycle, clouds, night stars
- All textures and item icons drawn procedurally to canvas
node test/logic.mjs # 32 headless logic checks (noise, meshing, physics,
# raycast, crafting, inventory, mob AI, ...)Rendering was verified in real headless Chrome (software WebGL) — world renders,
HUD/biome/position update live, inventory toggles, no console errors. See
.libs/probe*.mjs for the harness.
index.html entry, import map, UI overlay, hotbar
src/main.js bootstrap + game loop
src/world.js chunk storage, terrain gen, meshing
src/player.js controls, physics, raycast interaction
src/blocks.js block definitions src/items.js item/tool registry
src/inventory.js inventory + crafting + furnace
src/entities.js mobs + dropped items
src/textures.js procedural textures src/noise.js noise functions
src/sound.js procedural audio src/styles.css