# alchaincyf/huashu-art-motion architecture

> Architecture diagram of the GitHub repository alchaincyf/huashu-art-motion, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alchaincyf/huashu-art-motion
- Repository: https://github.com/alchaincyf/huashu-art-motion

## Overview

huashu-art-motion is a coding-agent skill and code toolkit for creating animated films. Its main workflow is to analyze a reference or choose a style and narration grammar, author timed scenes or a parameterized clip, render frames into a film, and optionally synthesize music. The README also documents long-scroll films and QA. Source excerpts show the gallery engine drawing era scenes and the clip renderer’s rendering model; unsampled integrations and several subsystem links are represented only where the README documents them.

Main entry points: [`scripts/engine/scenes`](https://github.com/alchaincyf/huashu-art-motion/tree/main/scripts/engine/scenes) (Style scenes), [`scripts/engine/engine.js`](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/engine.js) (Gallery engine), [`scripts/engine/render.py`](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/render.py) (Render command), [`scripts/analyze/breakdown.py`](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/analyze/breakdown.py) (Reference breakdown)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Analysis and review"]
  node_breakdown["Reference breakdown<br/>[breakdown.py]"]
  node_qa["Animation QA<br/>[qa.py]"]
end

subgraph group_authoring["Animation authoring"]
  node_era_data["Era timeline<br/>[eras.js]"]
  node_style_scenes["Style scenes"]
  node_grammar_clips["Grammar clips"]
  node_film_examples["Film examples"]
  node_transitions["Transitions<br/>[transitions.js]"]
  node_rig["Character rig<br/>[rig.js]"]
end

subgraph group_runtime["Rendering runtime"]
  node_render_lib["Canvas rendering<br/>[render.js]"]
  node_drawing_lib["Drawing toolkit<br/>[paint.js]"]
  node_diagram_lib["Diagram toolkit<br/>[diagram.js]"]
  node_gallery_engine["Gallery engine<br/>[engine.js]"]
  node_clip_engine["Clip engine<br/>[clip.js]"]
  node_render_entry["Render command<br/>[render.py]"]
end

subgraph group_media["Media output"]
  node_audio["Music synthesis<br/>[synth_艺术史速通.py]"]
  node_film["Rendered animation"]
end

node_creator(("Creator or agent"))

node_creator -->|"analyzes reference"| node_breakdown
node_breakdown -->|"guides recreation"| node_style_scenes
node_creator -->|"chooses style"| node_style_scenes
node_creator -->|"supplies spec"| node_grammar_clips
node_creator -->|"authors long-scroll"| node_film_examples
node_gallery_engine -->|"selects eras"| node_era_data
node_gallery_engine -->|"draws scenes"| node_style_scenes
node_gallery_engine -.->|"applies transitions"| node_transitions
node_style_scenes -.->|"uses character poses"| node_rig
node_style_scenes -.->|"uses drawing tools"| node_drawing_lib
node_style_scenes -.->|"uses renderer"| node_render_lib
node_film_examples -.->|"uses diagram tools"| node_diagram_lib
node_clip_engine -.->|"renders clips"| node_grammar_clips
node_render_entry -->|"renders gallery"| node_gallery_engine
node_render_entry -->|"renders spec"| node_clip_engine
node_render_entry -->|"produces film"| node_film
node_creator -->|"synthesizes music"| node_audio
node_creator -->|"checks output"| node_qa
node_qa -->|"measures animation"| node_film

click node_breakdown "https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/analyze/breakdown.py"
click node_qa "https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/qa.py"
click node_era_data "https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/eras.js"
click node_style_scenes "https://github.com/alchaincyf/huashu-art-motion/tree/main/scripts/engine/scenes"
click node_grammar_clips "https://github.com/alchaincyf/huashu-art-motion/tree/main/scripts/engine/clips"
click node_film_examples "https://github.com/alchaincyf/huashu-art-motion/tree/main/scripts/engine/reference_films/spacex"
click node_transitions "https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/transitions.js"
click node_rig "https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/lib/rig.js"
click node_render_lib "https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/lib/render.js"
click node_drawing_lib "https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/lib/paint.js"
click node_diagram_lib "https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/lib/diagram.js"
click node_gallery_engine "https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/engine.js"
click node_clip_engine "https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/clip.js"
click node_render_entry "https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/render.py"
click node_audio "https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/audio/synth_%E8%89%BA%E6%9C%AF%E5%8F%B2%E9%80%9F%E9%80%9A.py"

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_breakdown,node_qa toneBlue
class node_era_data,node_style_scenes,node_grammar_clips,node_film_examples,node_transitions,node_rig toneAmber
class node_render_lib,node_drawing_lib,node_diagram_lib,node_gallery_engine,node_clip_engine,node_render_entry toneMint
class node_audio,node_film toneRose
class node_creator toneIndigo
```

## Components

### Analysis and review

- [Reference breakdown](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/analyze/breakdown.py): `scripts/analyze/breakdown.py`
- [Animation QA](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/qa.py): `scripts/qa.py`

### Animation authoring

- [Era timeline](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/eras.js): `scripts/engine/eras.js`
- [Style scenes](https://github.com/alchaincyf/huashu-art-motion/tree/main/scripts/engine/scenes): `scripts/engine/scenes`
- [Grammar clips](https://github.com/alchaincyf/huashu-art-motion/tree/main/scripts/engine/clips): `scripts/engine/clips`
- [Film examples](https://github.com/alchaincyf/huashu-art-motion/tree/main/scripts/engine/reference_films/spacex): `scripts/engine/reference_films/spacex`
- [Transitions](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/transitions.js): `scripts/engine/transitions.js`
- [Character rig](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/lib/rig.js): `scripts/engine/lib/rig.js`

### Rendering runtime

- [Canvas rendering](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/lib/render.js): `scripts/engine/lib/render.js`
- [Drawing toolkit](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/lib/paint.js): `scripts/engine/lib/paint.js`
- [Diagram toolkit](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/lib/diagram.js): `scripts/engine/lib/diagram.js`
- [Gallery engine](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/engine.js): `scripts/engine/engine.js`
- [Clip engine](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/clip.js): `scripts/engine/clip.js`
- [Render command](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/engine/render.py): `scripts/engine/render.py`

### Media output

- [Music synthesis](https://github.com/alchaincyf/huashu-art-motion/blob/main/scripts/audio/synth_%E8%89%BA%E6%9C%AF%E5%8F%B2%E9%80%9F%E9%80%9A.py): `scripts/audio/synth_艺术史速通.py`
- **Rendered animation**

### Other components

- **Creator or agent**

## Connections

- Creator or agent → Reference breakdown: analyzes reference (evidence: `README.md`)
- Reference breakdown → Style scenes: guides recreation (evidence: `README.md`)
- Creator or agent → Style scenes: chooses style (evidence: `README.md`)
- Creator or agent → Grammar clips: supplies spec (evidence: `README.md`)
- Creator or agent → Film examples: authors long-scroll (evidence: `README.md`)
- Gallery engine → Era timeline: selects eras (evidence: `scripts/engine/engine.js`)
- Gallery engine → Style scenes: draws scenes (evidence: `scripts/engine/engine.js`)
- Gallery engine → Transitions: applies transitions
- Style scenes → Character rig: uses character poses
- Style scenes → Drawing toolkit: uses drawing tools
- Style scenes → Canvas rendering: uses renderer
- Film examples → Diagram toolkit: uses diagram tools
- Clip engine → Grammar clips: renders clips
- Render command → Gallery engine: renders gallery (evidence: `README.md`)
- Render command → Clip engine: renders spec (evidence: `README.md`)
- Render command → Rendered animation: produces film (evidence: `README.md`)
- Creator or agent → Music synthesis: synthesizes music (evidence: `README.md`)
- Creator or agent → Animation QA: checks output (evidence: `README.md`)
- Animation QA → Rendered animation: measures animation (evidence: `scripts/qa.py`)
