I'll build a beautiful voxel-based 3D scene of Japan using Three.js. Let me start by exploring the project structure.
Let me examine the project configuration files to understand the setup.
This is a React + Vite + Tailwind project. I'll build a beautiful voxel 3D scene of Japan featuring Mount Fuji, cherry blossoms, a floating torii gate, a pagoda, a mirror lake, falling petals, and a day/night cycle with bloom. Let me start by installing Three.js and setting up the core files.
Now let me create the voxel builder utility — the foundation that merges thousands of voxels into efficient meshes.
Now the model library — all the iconic Japanese landmarks built as voxel structures: Mount Fuji with snow streaks, sakura & pine trees, torii gates, a pagoda, lanterns, and clouds.
Now the heart of it — the scene orchestrator with golden-hour lighting, a gradient sky, a mirror lake (Reflector), bloom post-processing, falling petals, drifting clouds, and a smooth day/night transition.
Now the React UI layer — an elegant, Japanese-inspired overlay with title, day/night toggle, and controls over the fullscreen 3D canvas.
The core files are in place. Now let me refine the lake layout and a few details. First, I'll fix the water size/placement so the lake sits cleanly between the viewer and Mount Fuji (so shore objects aren't submerged).
Now I'll simplify the ground (remove the ring that could appear over the water) and refine the world layout so everything sits on proper land or water zones.
Now the refined world layout — Fuji behind the lake, floating torii in the shallows, a torii path and pagoda on the back ridge, and a village with lanterns & sakura on the front shore:
Now let me fix the redundant directional-light position lines in applyMode.
Let me clean up an unused leftover, then build to verify everything compiles.
Let me remove the now-unused tmpColor field declaration.
Now let me build the project to confirm everything compiles and bundles correctly.
The build succeeded — a single inlined index.html (~213 KB gzipped, including Three.js). Let me verify there are no dangling references in the scene file.
The scene file is clean. Let me make a small UX refinement so the control panel container doesn't block orbit-drag in its padded area.
Let me do a final build to confirm everything still compiles cleanly after the UI tweak.
The build is clean. Let me do a final review of the scene orchestrator to catch any runtime issues.
The implementation looks solid. Let me verify the animation loop and lifecycle methods are correct.
The build is clean and the implementation is complete. Here's what I created — a fully procedural, interactive voxel Japan diorama powered by Three.js:
🗻 The Scene
A living miniature of Japan at golden hour, built voxel-by-voxel:
- Mount Fuji — a symmetrical cone with a snow cap and its famous streaked snow valleys, rising behind the water
- Mirror lake — a real-time
Reflector plane that mirrors Fuji, the torii, clouds and sky
- Floating torii gate — a grand vermillion gate standing in the shallows (Itsukushima-style)
- Fushimi-Inari path — a row of smaller torii climbing the right ridge toward a five-tier pagoda
- Village, stone lanterns, sakura & pine trees, plus foreground rocks and bushes for framing
✨ Atmosphere & Motion
- Custom gradient sky shader (deep blue → pink → peach horizon)
- Golden-hour lighting with soft shadows from a low sun
- Bloom post-processing for a dreamy glow on the sun, lanterns and stars
- Falling cherry-blossom petals (460 drifting points) and slowly drifting clouds
- A smooth day ⇄ night transition — lanterns glow brighter, stars appear, the sun becomes a cool moon
🎛️ Controls (glassmorphism UI)
- Time of Day: Golden hour / Night
- Auto-orbit toggle
- Sakura petals toggle
- Drag to orbit · scroll to zoom
🛠️ Architecture
src/three/voxelBuilder.ts — merges thousands of voxels per color into a handful of efficient meshes (with emissive support for glowing lanterns)
src/three/models.ts — all the landmark builders (Fuji, trees, torii, pagoda, etc.)
src/three/VoxelScene.ts — scene orchestration, lighting, water, bloom, day/night
src/App.tsx — React UI overlay
The project builds successfully into a single self-contained index.html. Everything is generated procedurally (no image assets), so it loads instantly and looks crisp at any resolution.
Files built: index.html, src/three/voxelBuilder.ts, src/three/models.ts, src/three/VoxelScene.ts, src/App.tsx