# medelbou3/sm-engine architecture

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

- Interactive diagram: https://gitdiagram.com/medelbou3/sm-engine
- Repository: https://github.com/medelbou3/sm-engine
- Video tour (about a minute): https://gitdiagram.com/medelbou3/sm-engine/video

## Overview

SM Engine is a desktop 3D creation and game-development platform. The principal workflow is to author and edit a scene, persist it in a project, run it through gameplay and rendering systems, then export a playable build. Its documented branches include modeling and sculpting, animation, environments, virtual-production capture, assets, and plugins. The graph combines README-level capability descriptions with sampled source; many subsystem links are therefore omitted where the actual caller was not sampled.

Main entry points: [`js/core/engine-core-functions.js`](https://github.com/medelbou3/sm-engine/blob/main/js/core/engine-core-functions.js) (Editor Workspace), [`engine/game-play/SMGameModeRuntime.js`](https://github.com/medelbou3/sm-engine/blob/main/engine/game-play/SMGameModeRuntime.js) (Gameplay Runtime), [`engine/project/SMProjectManager.js`](https://github.com/medelbou3/sm-engine/blob/main/engine/project/SMProjectManager.js) (Project Manager), [`engine/logic/Managers/AssetStorageManager.js`](https://github.com/medelbou3/sm-engine/blob/main/engine/logic/Managers/AssetStorageManager.js) (Asset Library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Scene Authoring"]
  node_editor["Editor Workspace"]
  node_modeling["Mesh Modeling"]
  node_sculpting["Mesh Sculpting<br/>[sculpt_engine.cpp]"]
  node_architecture["Building Tools"]
  node_animation["Animation Tools"]
  node_two_d["2D Animation"]
end

subgraph group_content["Content Systems"]
  node_assets["Asset Library"]
  node_asset_pipeline["Asset Pipeline"]
  node_environment["Environment Systems"]
  node_plugins["Plugin System<br/>[SMPluginManager.js]"]
end

subgraph group_runtime["Runtime and Render"]
  node_runtime["Gameplay Runtime"]
  node_player["Player Systems<br/>[SMPlayerSystem.js]"]
  node_render["Render Pipeline"]
  node_performance["Performance Control"]
end

subgraph group_production["Media and Export"]
  node_capture["Live Capture<br/>[SMCaptureSystem.js]"]
  node_export["Build and Export"]
end

subgraph group_platform["Project Platform"]
  node_project["Project Manager"]
  node_project_store[("Project Storage")]
  node_shell["Desktop Shell<br/>[electron-main.js]"]
  node_loader["Script Loader"]
end

node_creator(("Creator"))

node_creator -->|"authors in"| node_editor
node_editor -->|"edits meshes"| node_modeling
node_editor -->|"sculpts meshes"| node_sculpting
node_editor -->|"uses tools"| node_architecture
node_editor -->|"edits animation"| node_animation
node_editor -->|"creates 2D"| node_two_d
node_editor -->|"manages project"| node_project
node_project -->|"persists data"| node_project_store
node_editor -->|"manages assets"| node_assets
node_assets -->|"imports assets"| node_asset_pipeline
node_editor -->|"configures environment"| node_environment
node_editor -.->|"extends editor"| node_plugins
node_project -->|"loads project"| node_runtime
node_runtime -->|"runs player"| node_player
node_runtime -->|"renders scene"| node_render
node_render -->|"reports performance"| node_performance
node_creator -->|"provides media"| node_capture
node_creator -->|"requests build"| node_export
node_export -->|"packages runtime"| node_runtime
node_shell -->|"hosts editor"| node_editor
node_loader -->|"loads scripts"| node_editor

click node_editor "https://github.com/medelbou3/sm-engine/blob/main/js/core/engine-core-functions.js"
click node_modeling "https://github.com/medelbou3/sm-engine/blob/main/processing/smengine-modeling.js"
click node_sculpting "https://github.com/medelbou3/sm-engine/blob/main/sculpting/wasm/sculpt_engine.cpp"
click node_architecture "https://github.com/medelbou3/sm-engine/tree/main/engine/architecture-builder"
click node_animation "https://github.com/medelbou3/sm-engine/tree/main/editor/animation"
click node_two_d "https://github.com/medelbou3/sm-engine/tree/main/engine/2d/2D-animation"
click node_assets "https://github.com/medelbou3/sm-engine/blob/main/engine/logic/Managers/AssetStorageManager.js"
click node_asset_pipeline "https://github.com/medelbou3/sm-engine/tree/main/engine/asset-pipeline"
click node_environment "https://github.com/medelbou3/sm-engine/blob/main/engine/2d/SM2DEnvironmentSystem.js"
click node_plugins "https://github.com/medelbou3/sm-engine/blob/main/engine/plugins/core/SMPluginManager.js"
click node_project "https://github.com/medelbou3/sm-engine/blob/main/engine/project/SMProjectManager.js"
click node_project_store "https://github.com/medelbou3/sm-engine/blob/main/engine/project/SMProjectStorage.js"
click node_runtime "https://github.com/medelbou3/sm-engine/blob/main/engine/game-play/SMGameModeRuntime.js"
click node_player "https://github.com/medelbou3/sm-engine/blob/main/engine/player/SMPlayerSystem.js"
click node_render "https://github.com/medelbou3/sm-engine/blob/main/rendering/SMRenderPipeline.js"
click node_performance "https://github.com/medelbou3/sm-engine/blob/main/engine/optimization/PerformanceManager.js"
click node_capture "https://github.com/medelbou3/sm-engine/blob/main/engine/capture/core/SMCaptureSystem.js"
click node_export "https://github.com/medelbou3/sm-engine/blob/main/engine/export/SMExportPipeline.js"
click node_shell "https://github.com/medelbou3/sm-engine/blob/main/electron-main.js"
click node_loader "https://github.com/medelbou3/sm-engine/blob/main/js/SMEngineScriptLoader.js"

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_editor,node_modeling,node_sculpting,node_architecture,node_animation,node_two_d toneBlue
class node_assets,node_asset_pipeline,node_environment,node_plugins toneAmber
class node_runtime,node_player,node_render,node_performance toneMint
class node_capture,node_export toneRose
class node_project,node_project_store,node_shell,node_loader,node_creator toneIndigo
```

## Components

### Scene Authoring

- [Editor Workspace](https://github.com/medelbou3/sm-engine/blob/main/js/core/engine-core-functions.js): `js/core/engine-core-functions.js`
- [Mesh Modeling](https://github.com/medelbou3/sm-engine/blob/main/processing/smengine-modeling.js): `processing/smengine-modeling.js`
- [Mesh Sculpting](https://github.com/medelbou3/sm-engine/blob/main/sculpting/wasm/sculpt_engine.cpp): `sculpting/wasm/sculpt_engine.cpp`
- [Building Tools](https://github.com/medelbou3/sm-engine/tree/main/engine/architecture-builder): `engine/architecture-builder`
- [Animation Tools](https://github.com/medelbou3/sm-engine/tree/main/editor/animation): `editor/animation`
- [2D Animation](https://github.com/medelbou3/sm-engine/tree/main/engine/2d/2D-animation): `engine/2d/2D-animation`

### Content Systems

- [Asset Library](https://github.com/medelbou3/sm-engine/blob/main/engine/logic/Managers/AssetStorageManager.js): `engine/logic/Managers/AssetStorageManager.js`
- [Asset Pipeline](https://github.com/medelbou3/sm-engine/tree/main/engine/asset-pipeline): `engine/asset-pipeline`
- [Environment Systems](https://github.com/medelbou3/sm-engine/blob/main/engine/2d/SM2DEnvironmentSystem.js): `engine/2d/SM2DEnvironmentSystem.js`
- [Plugin System](https://github.com/medelbou3/sm-engine/blob/main/engine/plugins/core/SMPluginManager.js): `engine/plugins/core/SMPluginManager.js`

### Runtime and Render

- [Gameplay Runtime](https://github.com/medelbou3/sm-engine/blob/main/engine/game-play/SMGameModeRuntime.js): `engine/game-play/SMGameModeRuntime.js`
- [Player Systems](https://github.com/medelbou3/sm-engine/blob/main/engine/player/SMPlayerSystem.js): `engine/player/SMPlayerSystem.js`
- [Render Pipeline](https://github.com/medelbou3/sm-engine/blob/main/rendering/SMRenderPipeline.js): `rendering/SMRenderPipeline.js`
- [Performance Control](https://github.com/medelbou3/sm-engine/blob/main/engine/optimization/PerformanceManager.js): `engine/optimization/PerformanceManager.js`

### Media and Export

- [Live Capture](https://github.com/medelbou3/sm-engine/blob/main/engine/capture/core/SMCaptureSystem.js): `engine/capture/core/SMCaptureSystem.js`
- [Build and Export](https://github.com/medelbou3/sm-engine/blob/main/engine/export/SMExportPipeline.js): `engine/export/SMExportPipeline.js`

### Project Platform

- [Project Manager](https://github.com/medelbou3/sm-engine/blob/main/engine/project/SMProjectManager.js): `engine/project/SMProjectManager.js`
- [Project Storage](https://github.com/medelbou3/sm-engine/blob/main/engine/project/SMProjectStorage.js): `engine/project/SMProjectStorage.js`
- [Desktop Shell](https://github.com/medelbou3/sm-engine/blob/main/electron-main.js): `electron-main.js`
- [Script Loader](https://github.com/medelbou3/sm-engine/blob/main/js/SMEngineScriptLoader.js): `js/SMEngineScriptLoader.js`

### Other components

- **Creator**

## Connections

- Creator → Editor Workspace: authors in
- Editor Workspace → Mesh Modeling: edits meshes
- Editor Workspace → Mesh Sculpting: sculpts meshes
- Editor Workspace → Building Tools: uses tools
- Editor Workspace → Animation Tools: edits animation
- Editor Workspace → 2D Animation: creates 2D
- Editor Workspace → Project Manager: manages project
- Project Manager → Project Storage: persists data
- Editor Workspace → Asset Library: manages assets
- Asset Library → Asset Pipeline: imports assets
- Editor Workspace → Environment Systems: configures environment
- Editor Workspace → Plugin System: extends editor
- Project Manager → Gameplay Runtime: loads project
- Gameplay Runtime → Player Systems: runs player
- Gameplay Runtime → Render Pipeline: renders scene
- Render Pipeline → Performance Control: reports performance
- Creator → Live Capture: provides media
- Creator → Build and Export: requests build
- Build and Export → Gameplay Runtime: packages runtime
- Desktop Shell → Editor Workspace: hosts editor
- Script Loader → Editor Workspace: loads scripts
