build me a voxel map of suburb city with threejs
- User
build me a voxel map of suburb city with threejs
Assistant
I'll build a voxel suburb city with Three.js. Let me first explore the project structure.
I'll install Three.js and build the voxel suburb city. Let me install packages first.
Now I'll create the voxel city scene module with Three.js.
Now the App component with the UI overlay:
Now let me build the project to confirm everything works.
The build succeeded. I've created a fully functional voxel suburb city using Three.js.
What I built
A procedurally generated voxel suburb rendered in real-time 3D:
The city itself
- A 46×46 tile neighborhood with a road grid (with painted lane markings), sidewalks bordering the streets, and grassy lots.
- Houses built voxel-by-voxel with colored walls, blue windows, doors, and proper gable roofs, in a variety of pastel wall colors and roof tones.
- Trees with trunks and rounded leaf canopies, swimming pools, small parks, and parked cars scattered along the roads.
- Everything is rendered efficiently as a single
InstancedMeshwith per-voxel colors (typically ~15–20k voxels), so it stays smooth.
Lighting & atmosphere
- A gradient sky dome shader, hemisphere + directional sun lighting, soft shadows (PCF), and distance fog.
- A time-of-day slider that moves the sun, shifts sky colors from warm dawn → bright noon → deep blue night, and dims the lighting accordingly.
Controls / UI
- Orbit controls: drag to rotate, scroll to zoom, right-drag to pan.
- A "New City" button to regenerate an entirely new random layout.
- An auto-spin toggle and live stats (voxels, houses, trees).
You can drag to explore, generate new neighborhoods, and slide through a full day/night cycle.
Files built:
index.html,src/scene.ts,src/App.tsx
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.