All MicroEvals
Act as an expert Three.js developer and 3D technical artist....
Create MicroEval

Act as an expert Three.js developer and 3D technical artist....

Prompt

Act as an expert Three.js developer and 3D technical artist. Create a complete, self-contained, single-file HTML application (`index.html`) that renders an interactive, procedurally generated 3D Japanese Voxel Garden using Three.js (loaded via ES module CDN). ### 1. Architecture & Performance - **Zero External Assets:** Do not rely on external `.gltf` models, textures, or audio files. Everything must be 100% procedurally generated in code so there are no CORS or broken-link issues. - **Instanced Rendering:** Strictly use `THREE.InstancedMesh` (grouped by material typeβ€”matte, water/translucent, and emissive) to render thousands of voxels smoothly at 60 FPS. - **Voxel Helper Engine:** Write clean utility functions (e.g., `setVoxel(x, y, z, color, materialType)`, `fillBox(...)`, `createLine(...)`) on a ~48x48 grid base so the scene is modular and easy to read. ### 2. Scene Composition (Floating Diorama Island) Build a cutaway floating island diorama with layered stone and dark earth visible along the bottom edges, topped with the following Japanese garden landmarks: - **Zen Sand Garden (Karesansui):** Light gray/cream gravel voxels arranged with subtle raised ridges (raked patterns) surrounding mossy granite boulders. - **Koi Pond & Arched Bridge:** A recessed pond filled with semi-transparent teal/blue water voxels. Span the pond with a curved vermilion-red and dark-wood arched bridge (*Taiko-bashi*). Populate the pond with voxel lily pads and 4–5 multi-colored voxel koi fish (orange, white, black). - **Traditional Tea House / Pavilion:** Positioned in one corner with cedar pillars, warm glowing shoji paper walls, and a tiered, curved dark-slate voxel roof. - **Sakura (Cherry Blossom) Trees & Bamboo:** 2–3 gnarled dark-wood trunks topped with lush, organic clusters of multi-toned pink and white voxel blossoms (`#ffb7c5`, `#ff8fa3`, `#fff0f3`), paired with tall green voxel bamboo stalks in the background. - **Stone Lanterns (Tōrō) & Stepping Stones:** Place mossy stone lanterns along the pathways with glowing warm-amber cores, connected by flat stepping stones. ### 3. Animation & Atmosphere - **Falling Sakura Petals:** Create a lightweight particle system of small pink voxel petals drifting downward with gentle sine-wave wind sway, resetting seamlessly when they hit the ground or water. - **Dynamic Water & Koi:** Gently bob the water surface voxels or shimmer their opacity, and animate the voxel koi fish swimming smoothly along curved paths under the bridge. - **Lighting & Shadows:** Enable `PCFSoftShadowMap`. Use a warm directional sun light casting crisp shadows, a soft hemisphere light for sky/ground bounce, and localized `PointLight`s at the tea house and stone lanterns. ### 4. Camera & Interactive HUD - **Controls:** Configure `OrbitControls` with smooth damping, zoom limits, and polar angle constraints so the camera orbits cleanly around the floating island. - **Minimal UI Overlay:** Add a sleek, translucent floating control panel in the corner allowing the user to: 1. Switch lighting presets: **Golden Hour**, **Serene Night** (deep indigo sky where lanterns and shoji screens glow brightly), and **Misty Morning** (soft exponential fog). 2. Toggle **Auto-Rotate** camera. 3. Toggle **Petal Fall** density.

A system prompt was added to support web rendering

Response not available

Drag to resize
Drag to resize
Drag to resize