I'll create a stylized 3D scene with a rotating low-poly earth featuring forests, castles, rivers, animals, birds, and clouds in a charming fairy-tale aesthetic. Let me start by exploring the project structure.
I'll install Three.js and React Three Fiber to create a beautiful 3D stylized rotating earth.
Now let me update the HTML title and create the main App component with the 3D scene.
Now let me create the main Earth component and supporting components. I'll build a procedural low-poly world on a sphere.
Now let me create the Earth sphere with procedural terrain and biomes. I'll use a custom approach with low-poly geometry.
Let me fix the unused variable warnings.
Now let me create the prop placement components: trees, castle, animals, river, and clouds.
Let me view and properly handle that unused variable.
Now let me create the main App component that ties everything together.
Now let me check main.tsx to make sure the index.css is being imported.
Let me try building the project to see what happens.
The project builds successfully. Let me verify there are no issues by also checking that the earth surface will properly include the entire planet (not just one side). I want to enhance the scene a bit more — let me also add lighting tweaks and make sure the scene looks better. Let me check the current state by viewing the App once more.
The project is built. Let me consider the visuals: the project builds and the components are in place. Let me also fix a small issue: the useMemo in the Earth component for the onReady callback won't re-fire on re-renders properly. Let me fix it using a useEffect instead.
Let me also remove the duplicate import of useRef in Props.tsx and move it to the top.
Let me check what's happening at lines 443-444.
Now I can remove the duplicate imports.
Let me also fix a potential issue with the elevation variable in the River function being unused.
Let me also look at the elevation issue:
I see, the void elevation was added but the elevation is now actually used. Let me clean that up:
The project builds successfully. Let me summarize what I've created:
Summary
I've built a 童话小镇 (Fairy-Tale Town) — Stylized Rotating Earth web application using React, Vite, Three.js (via React Three Fiber), and Tailwind CSS. The scene features:
🌍 Core 3D Scene
- A procedural low-poly earth built from an IcosahedronGeometry with 6 levels of detail, where each triangle gets biome-driven vertex colors and gentle height displacement (using multi-octave fbm noise) for a hand-painted, low-poly look
- Six biomes painted in warm, painterly colors: ocean (turquoise), beach (sandy beige), grass (fresh green), forest (deep green), mountain (warm taupe), and snow (cream)
🏰 Procedural Props
- A castle with a main keep, four corner towers with cone roofs, a tiny flag, crenellated walls, and a wooden door — placed on a flat grassy area
- A forest of ~240 stylized trees with stacked cone foliage in 4 foliage colors, randomly distributed on grass/forest biomes and oriented to follow the surface normal
- A winding river that follows the gradient of the terrain from inland down to the ocean, rendered as a smooth tube
- 18 cute low-poly animals (sheep, deer, and foxes) wandering on the surface
- 8 flying birds with flapping wings orbiting the earth
- 14 fluffy clouds made from clustered low-poly spheres floating above the planet
🎨 Aesthetic
- Warm, sunset palette with a radial gradient sky (peach → rose → mauve)
- Soft 3-point lighting (warm key, cool fill, hemisphere ambient) with a
sunset HDRI for stylized reflections
- Painterly hand-jittered vertex colors per face for the hand-crafted look
- ACES filmic tone mapping
- Floating glassmorphism title and control buttons
🕹️ Interactions
- Orbit controls: drag to rotate the camera, scroll to zoom
- Pause/Resume the earth rotation
- Toggle the title overlay
Everything is generated procedurally from a seeded RNG, so the world is consistent and deterministic on every load.
Files built: index.html, src/index.css, src/utils/noise.ts, src/utils/biomeColors.ts, src/components/Earth.tsx, src/components/Props.tsx, src/App.tsx