I’m going to inspect the project dependencies and base styles so I can wire up a performant voxel renderer and full-screen game shell correctly.
I’m going to install Three.js so I can build the voxel renderer, lighting, chunk meshes, and first-person camera system without editing package.json directly.
Three.js is installed successfully.
I’m going to add a procedural block texture atlas so the voxel world has crisp Minecraft-style textures without needing image assets.
I’m going to install the Three.js type definitions so the new rendering files compile cleanly in TypeScript.
The Three.js TypeScript definitions are installed successfully.
I’m going to add the core voxel world engine: seeded terrain and forest generation, chunk streaming, face-culling mesh building, water flow, block data, and utility methods for collision and interaction.
I’m going to replace the placeholder app with the full voxel game shell: renderer setup, first-person controls, daylight cycle, survival/spectator modes, chunk-distance UI, hotbar, collision, and block interaction.
I’m going to update the global stylesheet so the app fills the viewport cleanly, keeps the canvas crisp, and feels like a game instead of a document page.
The global game-oriented styles are in place.
I’m going to rename the document title so the built app is branded as the voxel sandbox instead of the starter template.
The page title has been updated successfully.
I’m going to build the project now to catch any TypeScript or bundling issues in the voxel engine and UI before finishing.
I’m going to make the hotbar selection update the live game ref immediately so block switching is instant even between React renders.
The hotbar now updates the active block immediately.
I’m going to run one final build after the hotbar interaction tweak to verify everything still compiles cleanly.
Built a Minecraft-style voxel sandbox in React + Three.js.
What I changed:
- Replaced
src/App.tsx with a full first-person voxel game
- Added a procedural texture atlas in
src/game/textureAtlas.ts
- Added a chunked voxel engine in
src/game/voxelWorld.ts
- Updated
src/index.css for fullscreen game styling
- Updated
index.html title to ForestCraft Voxel Survival
Implemented features:
- Day/night cycle with dynamic sky, fog, sun, and moon lighting
- Random seeded terrain with forests
- Two different tree shapes/types
- 9 selectable block types, including water
- Delayed block breaking based on block hardness
- Block placing
- Spectator mode toggle
- Double-W sprint
- Adjustable chunk render distance
- Chunk streaming and face-culling mesh generation for large visible worlds
- Water flow behavior when placed/exposed
- Player collision so you don’t phase through blocks
- Hotbar, HUD, seed display, and regenerate-world button
Performance-oriented parts included:
- Chunk-based world streaming
- Mesh generation from only visible faces
- Separate water mesh/material
- Limited per-frame chunk loading/remeshing
- Reduced renderer pixel ratio and no heavy shadows
Build status:
npm run build completed successfully.
Files built: src/game/textureAtlas.ts, src/game/voxelWorld.ts, src/App.tsx, src/index.css, index.html