# arakuma-studio/jasperengine architecture

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

- Interactive diagram: https://gitdiagram.com/arakuma-studio/jasperengine
- Repository: https://github.com/arakuma-studio/jasperengine

## Overview

JasperEngine is a native 2D/3D game engine with a Unity-style visual editor, Lua scripting, and desktop/web export. The main workflow is: an editor user creates and edits a project and scene, previews it in the editor, then cooks and exports a playable build. Distinct branches cover asset authoring, animation, audio, and imported web UI content; CLI and MCP tools provide alternate entry points for selected tasks. The graph combines README-documented capabilities with sampled source references; many feature-specific implementation links were not sampled, so those relationships are omitted.

Main entry points: [`editor/App.cpp`](https://github.com/arakuma-studio/jasperengine/blob/main/editor/App.cpp) (Editor application), [`engine/core/Engine.cpp`](https://github.com/arakuma-studio/jasperengine/blob/main/engine/core/Engine.cpp) (Engine core), [`editor/sceneview/SceneViewController.cpp`](https://github.com/arakuma-studio/jasperengine/blob/main/editor/sceneview/SceneViewController.cpp) (Scene and Game views), [`engine/core/Scene.h`](https://github.com/arakuma-studio/jasperengine/blob/main/engine/core/Scene.h) (Scene and ECS)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_editor["Editor workflow"]
  node_app["Editor application<br/>[App.cpp]"]
  node_sceneview["Scene and Game views"]
  node_project["Project model<br/>[Project.h]"]
  node_search["Editor search<br/>[SearchEngine.cpp]"]
end

subgraph group_authoring["Content authoring"]
  node_assets["Asset management"]
  node_animation["Animation authoring"]
  node_audio["Audio authoring"]
  node_htmlui["HTML UI import"]
  node_noise["Texture synthesis"]
end

subgraph group_engine["Engine runtime"]
  node_engine["Engine core<br/>[Engine.cpp]"]
  node_scene["Scene and ECS<br/>[Scene.h]"]
  node_renderer["Rendering system<br/>[RenderSystem.h]"]
  node_pipeline["GPU pipeline cache"]
  node_fonts["HTML UI fonts<br/>[RmlFontEngine.cpp]"]
end

subgraph group_delivery["Build and tools"]
  node_cook["Scene cooking<br/>[SceneCooker.cpp]"]
  node_export["Game export<br/>[Exporter.cpp]"]
  node_cli["Command-line tools<br/>[CommandLine.cpp]"]
  node_mcp["MCP tools"]
  node_web["Web platform"]
end

node_user(("Editor user"))

node_user -->|"authors in"| node_app
node_app -->|"manages"| node_project
node_app -->|"opens views"| node_sceneview
node_sceneview -->|"edits and previews"| node_scene
node_app -->|"offers search"| node_search
node_app -->|"manages assets"| node_assets
node_app -->|"edits animation"| node_animation
node_app -->|"edits audio"| node_audio
node_app -->|"imports UI content"| node_htmlui
node_app -->|"synthesizes textures"| node_noise
node_sceneview -->|"runs preview"| node_engine
node_engine -->|"updates scenes"| node_scene
node_scene -->|"schedules systems"| node_renderer
node_renderer -.->|"uses pipelines"| node_pipeline
node_engine -.->|"supports HTML UI"| node_fonts
node_user -->|"runs commands"| node_cli
node_user -->|"uses agent tools"| node_mcp
node_app -->|"cooks project"| node_cook
node_cook -.->|"prepares build"| node_export
node_export -->|"targets web"| node_web
node_web -->|"hosts runtime"| node_engine

click node_app "https://github.com/arakuma-studio/jasperengine/blob/main/editor/App.cpp"
click node_sceneview "https://github.com/arakuma-studio/jasperengine/blob/main/editor/sceneview/SceneViewController.cpp"
click node_project "https://github.com/arakuma-studio/jasperengine/blob/main/editor/Project.h"
click node_search "https://github.com/arakuma-studio/jasperengine/blob/main/editor/search/SearchEngine.cpp"
click node_assets "https://github.com/arakuma-studio/jasperengine/tree/main/editor/asset"
click node_animation "https://github.com/arakuma-studio/jasperengine/blob/main/editor/animation/AnimationClipController.cpp"
click node_audio "https://github.com/arakuma-studio/jasperengine/tree/main/editor/audio"
click node_htmlui "https://github.com/arakuma-studio/jasperengine/tree/main/editor/htmlui"
click node_noise "https://github.com/arakuma-studio/jasperengine/blob/main/editor/noise/NoisePreviewService.cpp"
click node_engine "https://github.com/arakuma-studio/jasperengine/blob/main/engine/core/Engine.cpp"
click node_scene "https://github.com/arakuma-studio/jasperengine/blob/main/engine/core/Scene.h"
click node_renderer "https://github.com/arakuma-studio/jasperengine/blob/main/engine/core/subsystem/RenderSystem.h"
click node_pipeline "https://github.com/arakuma-studio/jasperengine/blob/main/engine/renders/sokol/SokolPipelineCache.cpp"
click node_fonts "https://github.com/arakuma-studio/jasperengine/blob/main/engine/core/htmlui/RmlFontEngine.cpp"
click node_cook "https://github.com/arakuma-studio/jasperengine/blob/main/editor/cook/SceneCooker.cpp"
click node_export "https://github.com/arakuma-studio/jasperengine/blob/main/editor/Exporter.cpp"
click node_cli "https://github.com/arakuma-studio/jasperengine/blob/main/editor/cli/CommandLine.cpp"
click node_mcp "https://github.com/arakuma-studio/jasperengine/blob/main/editor/mcp/EngineApiContext.cpp"
click node_web "https://github.com/arakuma-studio/jasperengine/blob/main/engine/platform/emscripten/JasperEngineWeb.cpp"

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_sceneview,node_project,node_search,node_user toneBlue
class node_assets,node_animation,node_audio,node_htmlui,node_noise toneAmber
class node_engine,node_scene,node_renderer,node_pipeline,node_fonts toneMint
class node_cook,node_export,node_cli,node_mcp,node_web toneRose
```

## Components

### Editor workflow

- [Editor application](https://github.com/arakuma-studio/jasperengine/blob/main/editor/App.cpp): `editor/App.cpp`
- [Scene and Game views](https://github.com/arakuma-studio/jasperengine/blob/main/editor/sceneview/SceneViewController.cpp): `editor/sceneview/SceneViewController.cpp`
- [Project model](https://github.com/arakuma-studio/jasperengine/blob/main/editor/Project.h): `editor/Project.h`
- [Editor search](https://github.com/arakuma-studio/jasperengine/blob/main/editor/search/SearchEngine.cpp): `editor/search/SearchEngine.cpp`

### Content authoring

- [Asset management](https://github.com/arakuma-studio/jasperengine/tree/main/editor/asset): `editor/asset`
- [Animation authoring](https://github.com/arakuma-studio/jasperengine/blob/main/editor/animation/AnimationClipController.cpp): `editor/animation/AnimationClipController.cpp`
- [Audio authoring](https://github.com/arakuma-studio/jasperengine/tree/main/editor/audio): `editor/audio`
- [HTML UI import](https://github.com/arakuma-studio/jasperengine/tree/main/editor/htmlui): `editor/htmlui`
- [Texture synthesis](https://github.com/arakuma-studio/jasperengine/blob/main/editor/noise/NoisePreviewService.cpp): `editor/noise/NoisePreviewService.cpp`

### Engine runtime

- [Engine core](https://github.com/arakuma-studio/jasperengine/blob/main/engine/core/Engine.cpp): `engine/core/Engine.cpp`
- [Scene and ECS](https://github.com/arakuma-studio/jasperengine/blob/main/engine/core/Scene.h): `engine/core/Scene.h`
- [Rendering system](https://github.com/arakuma-studio/jasperengine/blob/main/engine/core/subsystem/RenderSystem.h): `engine/core/subsystem/RenderSystem.h`
- [GPU pipeline cache](https://github.com/arakuma-studio/jasperengine/blob/main/engine/renders/sokol/SokolPipelineCache.cpp): `engine/renders/sokol/SokolPipelineCache.cpp`
- [HTML UI fonts](https://github.com/arakuma-studio/jasperengine/blob/main/engine/core/htmlui/RmlFontEngine.cpp): `engine/core/htmlui/RmlFontEngine.cpp`

### Build and tools

- [Scene cooking](https://github.com/arakuma-studio/jasperengine/blob/main/editor/cook/SceneCooker.cpp): `editor/cook/SceneCooker.cpp`
- [Game export](https://github.com/arakuma-studio/jasperengine/blob/main/editor/Exporter.cpp): `editor/Exporter.cpp`
- [Command-line tools](https://github.com/arakuma-studio/jasperengine/blob/main/editor/cli/CommandLine.cpp): `editor/cli/CommandLine.cpp`
- [MCP tools](https://github.com/arakuma-studio/jasperengine/blob/main/editor/mcp/EngineApiContext.cpp): `editor/mcp/EngineApiContext.cpp`
- [Web platform](https://github.com/arakuma-studio/jasperengine/blob/main/engine/platform/emscripten/JasperEngineWeb.cpp): `engine/platform/emscripten/JasperEngineWeb.cpp`

### Other components

- **Editor user**

## Connections

- Editor user → Editor application: authors in
- Editor application → Project model: manages (evidence: `editor/App.cpp`)
- Editor application → Scene and Game views: opens views (evidence: `editor/App.cpp`)
- Scene and Game views → Scene and ECS: edits and previews
- Editor application → Editor search: offers search
- Editor application → Asset management: manages assets
- Editor application → Animation authoring: edits animation
- Editor application → Audio authoring: edits audio
- Editor application → HTML UI import: imports UI content
- Editor application → Texture synthesis: synthesizes textures
- Scene and Game views → Engine core: runs preview
- Engine core → Scene and ECS: updates scenes (evidence: `engine/core/Engine.cpp`)
- Scene and ECS → Rendering system: schedules systems (evidence: `engine/core/Scene.h`)
- Rendering system → GPU pipeline cache: uses pipelines
- Engine core → HTML UI fonts: supports HTML UI
- Editor user → Command-line tools: runs commands
- Editor user → MCP tools: uses agent tools
- Editor application → Scene cooking: cooks project
- Scene cooking → Game export: prepares build
- Game export → Web platform: targets web
- Web platform → Engine core: hosts runtime (evidence: `engine/platform/emscripten/JasperEngineWeb.cpp`)
