# panxinmiao/myth architecture

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

- Interactive diagram: https://gitdiagram.com/panxinmiao/myth
- Repository: https://github.com/panxinmiao/myth

## Overview

Myth is a cross-platform Rust 3D rendering engine. An application enters through the App/Engine runtime, loads or creates assets and a scene, then prepares frames for the renderer; the render graph schedules graphics and post-processing work for GPU output. The repository also provides animation, Python bindings, and an optional egui integration. The README documents the broader rendering capabilities; the sampled source confirms engine initialization, frame composition, asset loading, and selected Python operations, but not every internal pass connection.

Main entry points: [`crates/myth_app/src/engine.rs`](https://github.com/panxinmiao/myth/blob/main/crates/myth_app/src/engine.rs) (Engine coordinator), [`crates/myth_render/src/renderer.rs`](https://github.com/panxinmiao/myth/blob/main/crates/myth_render/src/renderer.rs) (Renderer), [`crates/myth_app/src/app.rs`](https://github.com/panxinmiao/myth/blob/main/crates/myth_app/src/app.rs) (App lifecycle), [`crates/myth_scene/src/scene.rs`](https://github.com/panxinmiao/myth/blob/main/crates/myth_scene/src/scene.rs) (Scene and camera)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Engine runtime"]
  node_app["App lifecycle<br/>[app.rs]"]
  node_engine["Engine coordinator<br/>[engine.rs]"]
  node_platform["Window and input<br/>[platform.rs]"]
end

subgraph group_content["Scene and assets"]
  node_scene["Scene and camera<br/>[scene.rs]"]
  node_animation["Animation system<br/>[system.rs]"]
  node_asset_server["Asset loading<br/>[server.rs]"]
  node_asset_loaders["Format loaders<br/>[mod.rs]"]
  node_asset_storage[("Asset storage<br/>[storage.rs]")]
  node_resources["Render resources<br/>[lib.rs]"]
end

subgraph group_render["Rendering"]
  node_renderer["Renderer<br/>[renderer.rs]"]
  node_render_graph["Render graph<br/>[graph.rs]"]
  node_render_passes["Graphics and effects<br/>[mod.rs]"]
  node_pipeline["Pipeline cache<br/>[cache.rs]"]
  node_gpu_context["GPU context<br/>[context.rs]"]
end

subgraph group_integrations["Integrations"]
  node_python["Python bindings<br/>[lib.rs]"]
  node_python_proxy["Python engine proxy<br/>[engine_proxy.rs]"]
  node_egui["egui integration<br/>[lib.rs]"]
end

node_developer(("Application developer"))
node_display(("Window or target"))

node_developer -->|"starts app"| node_app
node_app -->|"drives lifecycle"| node_engine
node_app -->|"uses window"| node_platform
node_engine -->|"initializes renderer"| node_renderer
node_engine -->|"composes frame"| node_scene
node_engine -->|"provides assets"| node_asset_server
node_asset_server -->|"loads formats"| node_asset_loaders
node_asset_server -->|"stores assets"| node_asset_storage
node_scene -->|"references resources"| node_resources
node_scene -->|"supports animation"| node_animation
node_renderer -->|"builds frame graph"| node_render_graph
node_render_graph -->|"schedules passes"| node_render_passes
node_render_graph -->|"requests pipelines"| node_pipeline
node_renderer -->|"uses GPU context"| node_gpu_context
node_renderer -->|"renders output"| node_display
node_python -->|"exposes API"| node_python_proxy
node_python_proxy -->|"controls engine"| node_engine
node_egui -.->|"integrates UI"| node_renderer

click node_app "https://github.com/panxinmiao/myth/blob/main/crates/myth_app/src/app.rs"
click node_engine "https://github.com/panxinmiao/myth/blob/main/crates/myth_app/src/engine.rs"
click node_platform "https://github.com/panxinmiao/myth/blob/main/crates/myth_app/src/platform.rs"
click node_scene "https://github.com/panxinmiao/myth/blob/main/crates/myth_scene/src/scene.rs"
click node_animation "https://github.com/panxinmiao/myth/blob/main/crates/myth_animation/src/system.rs"
click node_asset_server "https://github.com/panxinmiao/myth/blob/main/crates/myth_assets/src/server.rs"
click node_asset_loaders "https://github.com/panxinmiao/myth/blob/main/crates/myth_assets/src/loaders/mod.rs"
click node_asset_storage "https://github.com/panxinmiao/myth/blob/main/crates/myth_assets/src/storage.rs"
click node_resources "https://github.com/panxinmiao/myth/blob/main/crates/myth_resources/src/lib.rs"
click node_renderer "https://github.com/panxinmiao/myth/blob/main/crates/myth_render/src/renderer.rs"
click node_render_graph "https://github.com/panxinmiao/myth/blob/main/crates/myth_render/src/graph/core/graph.rs"
click node_render_passes "https://github.com/panxinmiao/myth/blob/main/crates/myth_render/src/graph/passes/mod.rs"
click node_pipeline "https://github.com/panxinmiao/myth/blob/main/crates/myth_render/src/pipeline/cache.rs"
click node_gpu_context "https://github.com/panxinmiao/myth/blob/main/crates/myth_render/src/core/context.rs"
click node_python "https://github.com/panxinmiao/myth/blob/main/bindings/python/src/lib.rs"
click node_python_proxy "https://github.com/panxinmiao/myth/blob/main/bindings/python/src/engine_proxy.rs"
click node_egui "https://github.com/panxinmiao/myth/blob/main/crates/myth_egui/src/lib.rs"

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_app,node_engine,node_platform toneBlue
class node_scene,node_animation,node_asset_server,node_asset_loaders,node_asset_storage,node_resources toneAmber
class node_renderer,node_render_graph,node_render_passes,node_pipeline,node_gpu_context toneMint
class node_python,node_python_proxy,node_egui toneRose
class node_developer,node_display toneIndigo
```

## Components

### Engine runtime

- [App lifecycle](https://github.com/panxinmiao/myth/blob/main/crates/myth_app/src/app.rs): `crates/myth_app/src/app.rs`
- [Engine coordinator](https://github.com/panxinmiao/myth/blob/main/crates/myth_app/src/engine.rs): `crates/myth_app/src/engine.rs`
- [Window and input](https://github.com/panxinmiao/myth/blob/main/crates/myth_app/src/platform.rs): `crates/myth_app/src/platform.rs`

### Scene and assets

- [Scene and camera](https://github.com/panxinmiao/myth/blob/main/crates/myth_scene/src/scene.rs): `crates/myth_scene/src/scene.rs`
- [Animation system](https://github.com/panxinmiao/myth/blob/main/crates/myth_animation/src/system.rs): `crates/myth_animation/src/system.rs`
- [Asset loading](https://github.com/panxinmiao/myth/blob/main/crates/myth_assets/src/server.rs): `crates/myth_assets/src/server.rs`
- [Format loaders](https://github.com/panxinmiao/myth/blob/main/crates/myth_assets/src/loaders/mod.rs): `crates/myth_assets/src/loaders/mod.rs`
- [Asset storage](https://github.com/panxinmiao/myth/blob/main/crates/myth_assets/src/storage.rs): `crates/myth_assets/src/storage.rs`
- [Render resources](https://github.com/panxinmiao/myth/blob/main/crates/myth_resources/src/lib.rs): `crates/myth_resources/src/lib.rs`

### Rendering

- [Renderer](https://github.com/panxinmiao/myth/blob/main/crates/myth_render/src/renderer.rs): `crates/myth_render/src/renderer.rs`
- [Render graph](https://github.com/panxinmiao/myth/blob/main/crates/myth_render/src/graph/core/graph.rs): `crates/myth_render/src/graph/core/graph.rs`
- [Graphics and effects](https://github.com/panxinmiao/myth/blob/main/crates/myth_render/src/graph/passes/mod.rs): `crates/myth_render/src/graph/passes/mod.rs`
- [Pipeline cache](https://github.com/panxinmiao/myth/blob/main/crates/myth_render/src/pipeline/cache.rs): `crates/myth_render/src/pipeline/cache.rs`
- [GPU context](https://github.com/panxinmiao/myth/blob/main/crates/myth_render/src/core/context.rs): `crates/myth_render/src/core/context.rs`

### Integrations

- [Python bindings](https://github.com/panxinmiao/myth/blob/main/bindings/python/src/lib.rs): `bindings/python/src/lib.rs`
- [Python engine proxy](https://github.com/panxinmiao/myth/blob/main/bindings/python/src/engine_proxy.rs): `bindings/python/src/engine_proxy.rs`
- [egui integration](https://github.com/panxinmiao/myth/blob/main/crates/myth_egui/src/lib.rs): `crates/myth_egui/src/lib.rs`

### Other components

- **Application developer**
- **Window or target**

## Connections

- Application developer → App lifecycle: starts app
- App lifecycle → Engine coordinator: drives lifecycle
- App lifecycle → Window and input: uses window
- Engine coordinator → Renderer: initializes renderer
- Engine coordinator → Scene and camera: composes frame
- Engine coordinator → Asset loading: provides assets
- Asset loading → Format loaders: loads formats
- Asset loading → Asset storage: stores assets
- Scene and camera → Render resources: references resources
- Scene and camera → Animation system: supports animation
- Renderer → Render graph: builds frame graph
- Render graph → Graphics and effects: schedules passes
- Render graph → Pipeline cache: requests pipelines
- Renderer → GPU context: uses GPU context
- Renderer → Window or target: renders output
- Python bindings → Python engine proxy: exposes API
- Python engine proxy → Engine coordinator: controls engine
- egui integration → Renderer: integrates UI
