# saking-tech/mesh2motion-app architecture

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

- Interactive diagram: https://gitdiagram.com/saking-tech/mesh2motion-app
- Repository: https://github.com/saking-tech/mesh2motion-app

## Overview

Mesh2Motion is a browser-based 3D character animation tool: users load a model, choose and fit a skeleton, preview animations, select clips, and export an animated model. The main workflow is documented in the README; source-index references support the retargeting and scene/UI relationships shown. Some implementation details were not sampled, so the graph omits uncertain calls and treats the workflow edges as documented stages rather than verified internal dispatch.

Main entry points: [`src/Mesh2MotionEngine.ts`](https://github.com/saking-tech/mesh2motion-app/blob/main/src/Mesh2MotionEngine.ts) (Application Engine), [`src/lib/processes/animations-listing/StepAnimationsListing.ts`](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/animations-listing/StepAnimationsListing.ts) (Animation Listing), [`src/lib/processes/load-model/StepLoadModel.ts`](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/load-model/StepLoadModel.ts) (Load Model), [`src/lib/processes/load-skeleton/StepLoadSkeleton.ts`](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/load-skeleton/StepLoadSkeleton.ts) (Load Skeleton)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Model Workflow"]
  node_engine["Application Engine"]
  node_model_load["Load Model<br/>[StepLoadModel.ts]"]
  node_rig_config["Rig Catalog<br/>[RigConfig.ts]"]
  node_skeleton_load["Load Skeleton"]
  node_preview_skeleton["Skeleton Preview"]
  node_skeleton_edit["Edit Skeleton"]
  node_weight_skin["Skin Weights<br/>[StepWeightSkin.ts]"]
  node_solvers["Weight Solvers"]
  node_export["Export Animation"]
end

subgraph group_animation["Animation &amp; Retargeting"]
  node_animation_list["Animation Listing"]
  node_animation_tools["Animation Utilities"]
  node_props["Prop Attachments<br/>[PropsManager.ts]"]
  node_retarget_mapping["Bone Mapping<br/>[StepBoneMapping.ts]"]
  node_automap["Bone Auto-Mapping<br/>[BoneAutoMapper.ts]"]
  node_retarget_service["Retarget Service"]
  node_retarget_core["Human Retargeting<br/>[Retargeter.ts]"]
end

subgraph group_runtime["Scene &amp; Interface"]
  node_scene["Scene Controls"]
  node_ui["Application UI<br/>[UI.ts]"]
  node_theme["Theme Manager<br/>[ThemeManager.ts]"]
end

subgraph group_preview["Preview Generation"]
  node_preview_generator["Video Preview Tool"]
  node_recorder["Video Recorders<br/>[webm-recorder.ts]"]
  node_mp4_recorder["MP4 Recorder<br/>[mp4-recorder.ts]"]
end

node_user(("User"))
node_download["Exported Model"]

node_user -->|"uses"| node_engine
node_engine -->|"starts with"| node_model_load
node_model_load -.->|"selects rig"| node_rig_config
node_model_load -->|"continues to"| node_skeleton_load
node_skeleton_load -->|"previews skeleton"| node_preview_skeleton
node_skeleton_load -->|"continues to"| node_skeleton_edit
node_skeleton_edit -.->|"prepares weights"| node_weight_skin
node_weight_skin -.->|"uses"| node_solvers
node_skeleton_edit -->|"continues to"| node_animation_list
node_animation_list -->|"uses"| node_animation_tools
node_animation_list -->|"manages props"| node_props
node_animation_list -->|"exports selection"| node_export
node_export -->|"produces"| node_download
node_retarget_mapping -->|"uses"| node_automap
node_retarget_mapping -->|"configures"| node_retarget_service
node_retarget_service -->|"retargets with"| node_retarget_core
node_engine -.->|"configures scene"| node_scene
node_scene -->|"uses theme"| node_theme
node_engine -.->|"initializes UI"| node_ui
node_preview_generator -->|"records with"| node_recorder
node_preview_generator -->|"selects recorder"| node_mp4_recorder

click node_engine "https://github.com/saking-tech/mesh2motion-app/blob/main/src/Mesh2MotionEngine.ts"
click node_model_load "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/load-model/StepLoadModel.ts"
click node_rig_config "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/RigConfig.ts"
click node_skeleton_load "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/load-skeleton/StepLoadSkeleton.ts"
click node_preview_skeleton "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/load-skeleton/PreviewSkeletonManager.ts"
click node_skeleton_edit "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/edit-skeleton/StepEditSkeleton.ts"
click node_weight_skin "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/weight-skin/StepWeightSkin.ts"
click node_solvers "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/solvers/SkinningAlgorithm.ts"
click node_animation_list "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/animations-listing/StepAnimationsListing.ts"
click node_animation_tools "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/animations-listing/AnimationUtility.ts"
click node_props "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/animations-listing/props/PropsManager.ts"
click node_export "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/export-to-file/StepExportToFile.ts"
click node_retarget_mapping "https://github.com/saking-tech/mesh2motion-app/blob/main/src/retarget/steps/StepBoneMapping.ts"
click node_automap "https://github.com/saking-tech/mesh2motion-app/blob/main/src/retarget/bone-automap/BoneAutoMapper.ts"
click node_retarget_service "https://github.com/saking-tech/mesh2motion-app/blob/main/src/retarget/AnimationRetargetService.ts"
click node_retarget_core "https://github.com/saking-tech/mesh2motion-app/blob/main/src/retarget/human-retargeting/Retargeter.ts"
click node_scene "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/SceneEnvironmentManager.ts"
click node_ui "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/UI.ts"
click node_theme "https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/ThemeManager.ts"
click node_preview_generator "https://github.com/saking-tech/mesh2motion-app/blob/main/src/preview-generator/preview-generator.ts"
click node_recorder "https://github.com/saking-tech/mesh2motion-app/blob/main/src/preview-generator/webm-recorder.ts"
click node_mp4_recorder "https://github.com/saking-tech/mesh2motion-app/blob/main/src/preview-generator/mp4-recorder.ts"

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_engine,node_model_load,node_rig_config,node_skeleton_load,node_preview_skeleton,node_skeleton_edit,node_weight_skin,node_solvers,node_export,node_user toneBlue
class node_animation_list,node_animation_tools,node_props,node_retarget_mapping,node_automap,node_retarget_service,node_retarget_core toneAmber
class node_scene,node_ui,node_theme toneMint
class node_preview_generator,node_recorder,node_mp4_recorder toneRose
class node_download toneIndigo
```

## Components

### Model Workflow

- [Application Engine](https://github.com/saking-tech/mesh2motion-app/blob/main/src/Mesh2MotionEngine.ts): `src/Mesh2MotionEngine.ts`
- [Load Model](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/load-model/StepLoadModel.ts): `src/lib/processes/load-model/StepLoadModel.ts`
- [Rig Catalog](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/RigConfig.ts): `src/lib/RigConfig.ts`
- [Load Skeleton](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/load-skeleton/StepLoadSkeleton.ts): `src/lib/processes/load-skeleton/StepLoadSkeleton.ts`
- [Skeleton Preview](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/load-skeleton/PreviewSkeletonManager.ts): `src/lib/processes/load-skeleton/PreviewSkeletonManager.ts`
- [Edit Skeleton](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/edit-skeleton/StepEditSkeleton.ts): `src/lib/processes/edit-skeleton/StepEditSkeleton.ts`
- [Skin Weights](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/weight-skin/StepWeightSkin.ts): `src/lib/processes/weight-skin/StepWeightSkin.ts`
- [Weight Solvers](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/solvers/SkinningAlgorithm.ts): `src/lib/solvers/SkinningAlgorithm.ts`
- [Export Animation](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/export-to-file/StepExportToFile.ts): `src/lib/processes/export-to-file/StepExportToFile.ts`

### Animation & Retargeting

- [Animation Listing](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/animations-listing/StepAnimationsListing.ts): `src/lib/processes/animations-listing/StepAnimationsListing.ts`
- [Animation Utilities](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/animations-listing/AnimationUtility.ts): `src/lib/processes/animations-listing/AnimationUtility.ts`
- [Prop Attachments](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/processes/animations-listing/props/PropsManager.ts): `src/lib/processes/animations-listing/props/PropsManager.ts`
- [Bone Mapping](https://github.com/saking-tech/mesh2motion-app/blob/main/src/retarget/steps/StepBoneMapping.ts): `src/retarget/steps/StepBoneMapping.ts`
- [Bone Auto-Mapping](https://github.com/saking-tech/mesh2motion-app/blob/main/src/retarget/bone-automap/BoneAutoMapper.ts): `src/retarget/bone-automap/BoneAutoMapper.ts`
- [Retarget Service](https://github.com/saking-tech/mesh2motion-app/blob/main/src/retarget/AnimationRetargetService.ts): `src/retarget/AnimationRetargetService.ts`
- [Human Retargeting](https://github.com/saking-tech/mesh2motion-app/blob/main/src/retarget/human-retargeting/Retargeter.ts): `src/retarget/human-retargeting/Retargeter.ts`

### Scene & Interface

- [Scene Controls](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/SceneEnvironmentManager.ts): `src/lib/SceneEnvironmentManager.ts`
- [Application UI](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/UI.ts): `src/lib/UI.ts`
- [Theme Manager](https://github.com/saking-tech/mesh2motion-app/blob/main/src/lib/ThemeManager.ts): `src/lib/ThemeManager.ts`

### Preview Generation

- [Video Preview Tool](https://github.com/saking-tech/mesh2motion-app/blob/main/src/preview-generator/preview-generator.ts): `src/preview-generator/preview-generator.ts`
- [Video Recorders](https://github.com/saking-tech/mesh2motion-app/blob/main/src/preview-generator/webm-recorder.ts): `src/preview-generator/webm-recorder.ts`
- [MP4 Recorder](https://github.com/saking-tech/mesh2motion-app/blob/main/src/preview-generator/mp4-recorder.ts): `src/preview-generator/mp4-recorder.ts`

### Other components

- **User**
- **Exported Model**

## Connections

- User → Application Engine: uses (evidence: `README.md`)
- Application Engine → Load Model: starts with (evidence: `README.md`)
- Load Model → Rig Catalog: selects rig
- Load Model → Load Skeleton: continues to (evidence: `README.md`)
- Load Skeleton → Skeleton Preview: previews skeleton (evidence: `src/lib/processes/load-skeleton/PreviewSkeletonManager.ts`)
- Load Skeleton → Edit Skeleton: continues to (evidence: `README.md`)
- Edit Skeleton → Skin Weights: prepares weights
- Skin Weights → Weight Solvers: uses
- Edit Skeleton → Animation Listing: continues to (evidence: `README.md`)
- Animation Listing → Animation Utilities: uses (evidence: `src/lib/processes/animations-listing/AnimationUtility.ts`)
- Animation Listing → Prop Attachments: manages props (evidence: `src/lib/processes/animations-listing/props/PropsManager.ts`)
- Animation Listing → Export Animation: exports selection (evidence: `README.md`)
- Export Animation → Exported Model: produces (evidence: `README.md`)
- Bone Mapping → Bone Auto-Mapping: uses (evidence: `src/retarget/steps/StepBoneMapping.ts`)
- Bone Mapping → Retarget Service: configures (evidence: `src/retarget/steps/StepBoneMapping.ts`)
- Retarget Service → Human Retargeting: retargets with (evidence: `src/retarget/AnimationRetargetService.ts`)
- Application Engine → Scene Controls: configures scene (evidence: `src/Mesh2MotionEngine.ts`)
- Scene Controls → Theme Manager: uses theme (evidence: `src/lib/SceneEnvironmentManager.ts`)
- Application Engine → Application UI: initializes UI (evidence: `src/Mesh2MotionEngine.ts`)
- Video Preview Tool → Video Recorders: records with (evidence: `src/preview-generator/preview-generator.ts`)
- Video Preview Tool → MP4 Recorder: selects recorder (evidence: `src/preview-generator/preview-generator.ts`)
