# wolfgang008/mo-ying-jing-lin architecture

> Architecture diagram of the GitHub repository wolfgang008/mo-ying-jing-lin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wolfgang008/mo-ying-jing-lin
- Repository: https://github.com/wolfgang008/mo-ying-jing-lin

## Overview

墨影惊鳞 is a browser-based fish-school simulation game. The player creates disturbances, currents, bait, and waves; the game records interaction patterns, the AI director selects a group formation, and individual fish respond through personality rules and Boids motion before the scene is rendered. The README also documents adjustable parameters, decision visualization, and a fixed-path comparison mode. The product is a single-file prototype, so these responsibilities share `index.html`. No source excerpts were provided; edges reflect documented architecture and omit uncertain implementation details.

Main entry points: [`index.html`](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html) (AI director)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Player interaction"]
  node_water_input["Water gestures<br/>[index.html]"]
  node_rhythm_profile[("Player rhythm<br/>[index.html]")]
  node_heatmap[("Click heatmap<br/>[index.html]")]
end

subgraph group_director["AI direction"]
  node_director["AI director<br/>[index.html]"]
  node_formation["Formation strategy<br/>[index.html]"]
end

subgraph group_simulation["Fish simulation"]
  node_fish_traits["Fish personalities<br/>[index.html]"]
  node_boids["Boids motion<br/>[index.html]"]
  node_spatial_hash["Neighbor lookup<br/>[index.html]"]
  node_fixed_path["Fixed-path school<br/>[index.html]"]
end

subgraph group_presentation["Display and control"]
  node_parameter_panel["Parameter panel<br/>[index.html]"]
  node_settings[("Behavior settings<br/>[index.html]")]
  node_decision_view["Decision display<br/>[index.html]"]
  node_decision_log[("Decision log<br/>[index.html]")]
  node_comparison["Comparison mode<br/>[index.html]"]
  node_renderer["Canvas renderer<br/>[index.html]"]
  node_scene["Rendered scene<br/>[index.html]"]
end

node_player(("Player"))

node_player -->|"gestures"| node_water_input
node_water_input -->|"records rhythm"| node_rhythm_profile
node_water_input -->|"records locations"| node_heatmap
node_water_input -->|"disturbs fish"| node_boids
node_player -->|"adjusts"| node_parameter_panel
node_parameter_panel -->|"updates"| node_settings
node_rhythm_profile -->|"informs strategy"| node_director
node_heatmap -->|"informs strategy"| node_director
node_settings -->|"configures"| node_director
node_director -->|"selects"| node_formation
node_formation -->|"guides motion"| node_boids
node_fish_traits -->|"modulates response"| node_boids
node_boids -->|"queries neighbors"| node_spatial_hash
node_director -->|"exposes intent"| node_decision_view
node_director -->|"records decisions"| node_decision_log
node_decision_view -->|"shows log"| node_decision_log
node_boids -->|"supplies positions"| node_renderer
node_fixed_path -->|"supplies baseline"| node_comparison
node_boids -->|"supplies AI school"| node_comparison
node_comparison -->|"selects view"| node_renderer
node_renderer -->|"draws"| node_scene

click node_water_input "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_rhythm_profile "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_heatmap "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_parameter_panel "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_settings "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_director "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_formation "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_decision_view "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_decision_log "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_fish_traits "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_boids "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_spatial_hash "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_fixed_path "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_comparison "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_renderer "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"
click node_scene "https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_water_input,node_rhythm_profile,node_heatmap toneBlue
class node_director,node_formation toneAmber
class node_fish_traits,node_boids,node_spatial_hash,node_fixed_path toneMint
class node_parameter_panel,node_settings,node_decision_view,node_decision_log,node_comparison,node_renderer,node_scene toneRose
class node_player toneIndigo
```

## Components

### Player interaction

- [Water gestures](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`
- [Player rhythm](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`
- [Click heatmap](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`

### AI direction

- [AI director](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`
- [Formation strategy](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`

### Fish simulation

- [Fish personalities](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`
- [Boids motion](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`
- [Neighbor lookup](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`
- [Fixed-path school](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`

### Display and control

- [Parameter panel](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`
- [Behavior settings](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`
- [Decision display](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`
- [Decision log](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`
- [Comparison mode](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`
- [Canvas renderer](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`
- [Rendered scene](https://github.com/wolfgang008/mo-ying-jing-lin/blob/main/index.html): `index.html`

### Other components

- **Player**

## Connections

- Player → Water gestures: gestures
- Water gestures → Player rhythm: records rhythm
- Water gestures → Click heatmap: records locations
- Water gestures → Boids motion: disturbs fish
- Player → Parameter panel: adjusts
- Parameter panel → Behavior settings: updates
- Player rhythm → AI director: informs strategy
- Click heatmap → AI director: informs strategy
- Behavior settings → AI director: configures
- AI director → Formation strategy: selects
- Formation strategy → Boids motion: guides motion
- Fish personalities → Boids motion: modulates response
- Boids motion → Neighbor lookup: queries neighbors
- AI director → Decision display: exposes intent
- AI director → Decision log: records decisions
- Decision display → Decision log: shows log
- Boids motion → Canvas renderer: supplies positions
- Fixed-path school → Comparison mode: supplies baseline
- Boids motion → Comparison mode: supplies AI school
- Comparison mode → Canvas renderer: selects view
- Canvas renderer → Rendered scene: draws
