Let me install the necessary 3D rendering packages first.
Now let me update the HTML title and create all the component files for this 3D scene.
Now let me create the main App component with the 3D canvas setup:
Type errors are expected since the component files don't exist yet. Let me create the Bear component:
Now the Salmon component with jump animation and splash particles:
Now let me create the Water component with custom shaders:
Let me fix the Salmon's bufferAttribute issue and create the Environment component:
Now let me create the comprehensive Environment component with trees, rocks, mountains, and ground:
All component files are created. Let me now build the project to check for any errors:
The build succeeded! The project compiles and produces a working 1.14 MB single-file HTML page. Let me verify the overall structure is complete:
The project is complete and builds successfully! Here's a summary of what was created:
🐻 河边捕食跃起鲑鱼的熊 — 3D Interactive Scene
Architecture
src/App.tsx — Main canvas with Three.js scene, lighting (ambient + directional shadows + hemisphere), Sky, fog, OrbitControls with auto-rotate, and elegant UI overlays
src/components/Bear.tsx — Procedural grizzly bear built from ~30 meshes (spheres, cylinders, boxes), standing on hind legs in a catching pose, with 3 synced animations: breathing, paw-reaching, and head-tracking the salmon
src/components/Salmon.tsx — Procedural salmon with detailed body (fins, tail, eyes, scales), parabolic jump animation that orients the fish along its velocity vector naturally, tail wiggle, and a splash particle system triggered when exiting water
src/components/Water.tsx — Custom GLSL shader water with 5-layer wave displacement, depth coloring, foam, sun sparkle reflections, flow lines, translucent surface, riverbed with rocks, and floating flow particles
src/components/Environment.tsx — Rich environment with ground, river banks, sandy beaches, 18+ pine trees with wind-sway animation, rocks, bushes, fallen logs, snow-capped mountains, circling birds, and river mist
Key Features
- 🎬 Continuous animation cycle: Salmon leaps from the river in a realistic arc every 4 seconds while the bear reaches for it
- 🖱️ Full interactivity: Drag to orbit, scroll to zoom, right-click to pan
- 🔄 Auto-rotate camera for a cinematic initial view
- 💧 Custom water shader with animated waves, foam, and sparkle
- 🌲 Living environment with swaying trees, flying birds, and drifting mist
- 🌓 Dynamic lighting with shadows and atmospheric fog
Files built: index.html, src/App.tsx, src/components/Bear.tsx, src/components/Salmon.tsx, src/components/Water.tsx, src/components/Environment.tsx