How soumyak4/shan-shui-infinite works
Shan Shui is a browser-based, seed-driven landscape generator. Users navigate an endless landscape, adjust or share its seed, and export the current view as SVG. The main flow runs from navigation and seed controls through scene preparation to landscape generation and display; a worker and preview caches support smooth scrolling. The README documents the major capabilities, while source excerpts show the app and renderer boundary. Several internal generation and export details are unsampled, so those relationships are not expanded beyond documented behavior.
Main entry points: app.js App controller · landscape.js Procedural generator · index.html Navigation controls
Components 15
Navigation and settings
- Navigation controls
index.html - App controller
scripts/app.js - Auto-scroll
scripts/app.js
Scene rendering
- Scene preparation
scripts/app.js - Preview cache
scripts/app.js - Viewport display
scripts/app.js
Landscape generation
- Renderer service
scripts/landscape.js - Drawing worker
scripts/landscape.js - Procedural generator
scripts/landscape.js - Mountains and terrain
scripts/landscape.js - Trees and foliage
scripts/landscape.js - Buildings and boats
scripts/landscape.js
Sharing and export
- Seed and URL
scripts/app.js - SVG export
scripts/app.js
Other components
- Visitor
Connections 14
- Visitor → Navigation controls: navigates and configures
README.md - Navigation controls → App controller: provides input
scripts/app.js - App controller → Renderer service: requests scenes
scripts/app.js - App controller → Scene preparation: prepares scenes
scripts/app.js - Scene preparation → Preview cache: caches chunks
scripts/app.js - Scene preparation → Viewport display: presents scenes
scripts/app.js - App controller → Auto-scroll: starts and pauses
scripts/app.js - Auto-scroll → App controller: advances position
scripts/app.js - App controller → Seed and URL: reads and updates
scripts/app.js - App controller → SVG export: downloads current view
README.md - Renderer service → Drawing worker: dispatches drawing
scripts/landscape.js - Procedural generator → Mountains and terrain: generates terrain
README.md - Procedural generator → Trees and foliage: generates vegetation
README.md - Procedural generator → Buildings and boats: generates structures
README.md