MCPcopy Index your code
hub / github.com/RedContritio/shan_shui_inf

github.com/RedContritio/shan_shui_inf @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
256 symbols 592 edges 30 files 3 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

{Shan, Shui}*

English | 中文

Procedurally-understandably-generated vector-format infinitely-scrolling Chinese landscape for the browser.

This project is based on react framework, and use typescript to code.

Support downloading svg image of any range (without background).

The algorithm is based on page of {Shan, Shui}* coded by Lingdong Huang

[TOC]

Install

sudo apt-get install nodejs
npm install # or `yarn`

Usage

npm start

Render Components

man

man

water

water

architecture

arch01

arch01

green - hut

red - box

pink - rail

arch02

arch02

black - deco

red - box

arch03

arch03

blue - pagroof

red - box

pink - rail

arch04

arch04

blue - pagroot

red - box

pink - rail

boat01

boat01

transmissionTower01

tower01

tree

tree01

tree01

tree02

tree02

tree03

tree03

tree04

tree04

tree05

tree05

tree06

tree06

tree07

tree07

tree08

tree08

mountain

mountain

mountain

flatmountain

flatmountain

distmountain

distmountain

TODO

  • [ ] Add airplane
  • [ ] Deploy to GitHub Pages via GitHub Actions
  • [ ] More smooth autoscroll

Extension points exported contracts — how you extend this code

ISvgElement (Interface)
(no doc) [3 implementers]
src/render/svg/interfaces.ts
AppState (Interface)
(no doc)
src/App.tsx
IProps (Interface)
(no doc)
src/ui/SettingPanel.tsx
IPoint (Interface)
(no doc) [2 implementers]
src/render/basic/point.ts
State (Interface)
(no doc)
src/ui/SettingPanel.tsx
IChunk (Interface)
(no doc) [1 implementers]
src/render/basic/chunk.ts
IProps (Interface)
(no doc)
src/ui/ButtonSet.tsx
IPoint (Interface)
(no doc) [1 implementers]
src/render/svg/types.ts

Core symbols most depended-on inside this repo

random
called by 145
src/render/basic/PRNG.ts
div
called by 50
src/render/parts/brushes.ts
noise
called by 44
src/render/basic/perlinNoise.ts
normRand
called by 35
src/render/basic/utils.ts
poly
called by 31
src/render/basic/utils.ts
stroke
called by 24
src/render/parts/brushes.ts
randChoice
called by 24
src/render/basic/utils.ts
quickstroke
called by 12
src/render/parts/arch.ts

Shape

Function 103
Method 92
Class 40
Interface 21

Languages

TypeScript100%

Modules by API surface

src/render/basic/point.ts23 symbols
src/render/parts/tree.ts20 symbols
src/render/parts/arch.ts19 symbols
src/render/svg/types.ts18 symbols
src/App.tsx17 symbols
src/ui/Menu.tsx16 symbols
src/render/parts/man.ts15 symbols
src/ui/ScrollableCanvas.tsx13 symbols
src/render/basic/range.ts13 symbols
src/render/basic/polytools.ts12 symbols
src/render/parts/mountain.ts10 symbols
src/ui/ButtonSource.tsx9 symbols

For agents

$ claude mcp add shan_shui_inf \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact