# honxi1/endfield-poser architecture

> Architecture diagram of the GitHub repository honxi1/endfield-poser, 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/honxi1/endfield-poser
- Repository: https://github.com/honxi1/endfield-poser

## Overview

Endfield Poser is an in-game posing plugin for Arknights: Endfield. The main workflow is to open its overlay, freeze a character, select and edit bones, then save or load a pose preset. Separate capabilities cover MMD motion and camera playback, facial controls, multi-character state, cloth-physics enhancements, and browser-based controls. The README documents these product branches; sampled source confirms the plugin entry point, overlay, native SMC facial driver, and cloth runtime, but does not expose every subsystem’s call wiring.

Main entry points: [`src/core/gui_overlay.h`](https://github.com/honxi1/endfield-poser/blob/main/src/core/gui_overlay.h) (GUI overlay), [`src/editor/panel_bones.h`](https://github.com/honxi1/endfield-poser/blob/main/src/editor/panel_bones.h) (Bone panel), [`src/game/mmd_player.h`](https://github.com/honxi1/endfield-poser/blob/main/src/game/mmd_player.h) (MMD playback), [`src/poser.cpp`](https://github.com/honxi1/endfield-poser/blob/main/src/poser.cpp) (Plugin entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Plugin runtime"]
  node_entry["Plugin entry<br/>[poser.cpp]"]
  node_overlay["GUI overlay<br/>[gui_overlay.h]"]
  node_web["Web control<br/>[web_server.h]"]
  node_hooks["Game hooks<br/>[game_hooks.h]"]
end

subgraph group_editing["Pose editing"]
  node_freeze["Pose freeze<br/>[freeze.h]"]
  node_skeleton["Skeleton access<br/>[skeleton.h]"]
  node_selection["Bone selection<br/>[selection.h]"]
  node_gizmo["Rig gizmo<br/>[rig_gizmo.h]"]
  node_bones["Bone panel<br/>[panel_bones.h]"]
  node_poses["Pose files<br/>[pose_file.h]"]
  node_roster["Character roster<br/>[roster.h]"]
end

subgraph group_motion["Motion and face"]
  node_mmd["MMD playback<br/>[mmd_player.h]"]
  node_mmdio["MMD file input<br/>[mmd_io.h]"]
  node_mmdmotion["Motion transforms<br/>[mmd_motion.h]"]
  node_camera["MMD camera<br/>[mmd_camera.h]"]
  node_morph["Face controls<br/>[morph.h]"]
  node_smc["Native SMC face<br/>[smc_morph.h]"]
  node_eyes["Eye gaze<br/>[eye_gaze.h]"]
end

subgraph group_physics["Cloth physics"]
  node_cloth["Cloth enhancement"]
  node_collision["Collision support"]
  node_damping["Ribbon damping"]
end

node_user(("Player"))
node_game(("Endfield game"))
node_browser(("Browser"))

node_user -->|"opens and edits"| node_overlay
node_user -.->|"browser controls"| node_web
node_browser -.->|"sends controls"| node_web
node_entry -->|"starts UI"| node_overlay
node_entry -->|"installs hooks"| node_hooks
node_entry -->|"starts server"| node_web
node_overlay -->|"toggles freeze"| node_freeze
node_overlay -->|"draws panels"| node_bones
node_bones -->|"selects bones"| node_selection
node_bones -->|"edits transforms"| node_gizmo
node_gizmo -->|"updates bones"| node_skeleton
node_freeze -->|"holds pose"| node_skeleton
node_bones -->|"saves and loads"| node_poses
node_freeze -->|"remembers by character"| node_roster
node_overlay -->|"controls playback"| node_mmd
node_mmd -->|"loads files"| node_mmdio
node_mmd -->|"applies motion"| node_mmdmotion
node_mmd -->|"applies camera"| node_camera
node_overlay -->|"adjusts expressions"| node_morph
node_morph -->|"drives native face"| node_smc
node_overlay -->|"adjusts gaze"| node_eyes
node_hooks -->|"services runtime"| node_cloth
node_cloth -->|"enhances contact"| node_collision
node_cloth -->|"reduces flutter"| node_damping
node_hooks -->|"interacts with game"| node_game

click node_entry "https://github.com/honxi1/endfield-poser/blob/main/src/poser.cpp"
click node_overlay "https://github.com/honxi1/endfield-poser/blob/main/src/core/gui_overlay.h"
click node_web "https://github.com/honxi1/endfield-poser/blob/main/src/core/web_server.h"
click node_hooks "https://github.com/honxi1/endfield-poser/blob/main/src/core/game_hooks.h"
click node_freeze "https://github.com/honxi1/endfield-poser/blob/main/src/game/freeze.h"
click node_skeleton "https://github.com/honxi1/endfield-poser/blob/main/src/game/skeleton.h"
click node_selection "https://github.com/honxi1/endfield-poser/blob/main/src/editor/selection.h"
click node_gizmo "https://github.com/honxi1/endfield-poser/blob/main/src/editor/rig_gizmo.h"
click node_bones "https://github.com/honxi1/endfield-poser/blob/main/src/editor/panel_bones.h"
click node_poses "https://github.com/honxi1/endfield-poser/blob/main/src/math/pose_file.h"
click node_roster "https://github.com/honxi1/endfield-poser/blob/main/src/game/roster.h"
click node_mmd "https://github.com/honxi1/endfield-poser/blob/main/src/game/mmd_player.h"
click node_mmdio "https://github.com/honxi1/endfield-poser/blob/main/src/game/mmd_io.h"
click node_mmdmotion "https://github.com/honxi1/endfield-poser/blob/main/src/math/mmd_motion.h"
click node_camera "https://github.com/honxi1/endfield-poser/blob/main/src/math/mmd_camera.h"
click node_morph "https://github.com/honxi1/endfield-poser/blob/main/src/game/morph.h"
click node_smc "https://github.com/honxi1/endfield-poser/blob/main/src/game/smc_morph.h"
click node_eyes "https://github.com/honxi1/endfield-poser/blob/main/src/game/eye_gaze.h"
click node_cloth "https://github.com/honxi1/endfield-poser/blob/main/src/cloth/bonecloth/cloth_bonecloth_runtime.h"
click node_collision "https://github.com/honxi1/endfield-poser/blob/main/src/cloth/collision/cloth_collision_parameters.h"
click node_damping "https://github.com/honxi1/endfield-poser/blob/main/src/cloth/core/cloth_ribbon_damping.h"

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_entry,node_overlay,node_web,node_hooks,node_browser toneBlue
class node_freeze,node_skeleton,node_selection,node_gizmo,node_bones,node_poses,node_roster toneAmber
class node_mmd,node_mmdio,node_mmdmotion,node_camera,node_morph,node_smc,node_eyes toneMint
class node_cloth,node_collision,node_damping toneRose
class node_user,node_game toneIndigo
```

## Components

### Plugin runtime

- [Plugin entry](https://github.com/honxi1/endfield-poser/blob/main/src/poser.cpp): `src/poser.cpp`
- [GUI overlay](https://github.com/honxi1/endfield-poser/blob/main/src/core/gui_overlay.h): `src/core/gui_overlay.h`
- [Web control](https://github.com/honxi1/endfield-poser/blob/main/src/core/web_server.h): `src/core/web_server.h`
- [Game hooks](https://github.com/honxi1/endfield-poser/blob/main/src/core/game_hooks.h): `src/core/game_hooks.h`

### Pose editing

- [Pose freeze](https://github.com/honxi1/endfield-poser/blob/main/src/game/freeze.h): `src/game/freeze.h`
- [Skeleton access](https://github.com/honxi1/endfield-poser/blob/main/src/game/skeleton.h): `src/game/skeleton.h`
- [Bone selection](https://github.com/honxi1/endfield-poser/blob/main/src/editor/selection.h): `src/editor/selection.h`
- [Rig gizmo](https://github.com/honxi1/endfield-poser/blob/main/src/editor/rig_gizmo.h): `src/editor/rig_gizmo.h`
- [Bone panel](https://github.com/honxi1/endfield-poser/blob/main/src/editor/panel_bones.h): `src/editor/panel_bones.h`
- [Pose files](https://github.com/honxi1/endfield-poser/blob/main/src/math/pose_file.h): `src/math/pose_file.h`
- [Character roster](https://github.com/honxi1/endfield-poser/blob/main/src/game/roster.h): `src/game/roster.h`

### Motion and face

- [MMD playback](https://github.com/honxi1/endfield-poser/blob/main/src/game/mmd_player.h): `src/game/mmd_player.h`
- [MMD file input](https://github.com/honxi1/endfield-poser/blob/main/src/game/mmd_io.h): `src/game/mmd_io.h`
- [Motion transforms](https://github.com/honxi1/endfield-poser/blob/main/src/math/mmd_motion.h): `src/math/mmd_motion.h`
- [MMD camera](https://github.com/honxi1/endfield-poser/blob/main/src/math/mmd_camera.h): `src/math/mmd_camera.h`
- [Face controls](https://github.com/honxi1/endfield-poser/blob/main/src/game/morph.h): `src/game/morph.h`
- [Native SMC face](https://github.com/honxi1/endfield-poser/blob/main/src/game/smc_morph.h): `src/game/smc_morph.h`
- [Eye gaze](https://github.com/honxi1/endfield-poser/blob/main/src/game/eye_gaze.h): `src/game/eye_gaze.h`

### Cloth physics

- [Cloth enhancement](https://github.com/honxi1/endfield-poser/blob/main/src/cloth/bonecloth/cloth_bonecloth_runtime.h): `src/cloth/bonecloth/cloth_bonecloth_runtime.h`
- [Collision support](https://github.com/honxi1/endfield-poser/blob/main/src/cloth/collision/cloth_collision_parameters.h): `src/cloth/collision/cloth_collision_parameters.h`
- [Ribbon damping](https://github.com/honxi1/endfield-poser/blob/main/src/cloth/core/cloth_ribbon_damping.h): `src/cloth/core/cloth_ribbon_damping.h`

### Other components

- **Player**
- **Endfield game**
- **Browser**

## Connections

- Player → GUI overlay: opens and edits
- Player → Web control: browser controls
- Browser → Web control: sends controls
- Plugin entry → GUI overlay: starts UI
- Plugin entry → Game hooks: installs hooks
- Plugin entry → Web control: starts server
- GUI overlay → Pose freeze: toggles freeze
- GUI overlay → Bone panel: draws panels
- Bone panel → Bone selection: selects bones
- Bone panel → Rig gizmo: edits transforms
- Rig gizmo → Skeleton access: updates bones
- Pose freeze → Skeleton access: holds pose
- Bone panel → Pose files: saves and loads
- Pose freeze → Character roster: remembers by character
- GUI overlay → MMD playback: controls playback
- MMD playback → MMD file input: loads files
- MMD playback → Motion transforms: applies motion
- MMD playback → MMD camera: applies camera
- GUI overlay → Face controls: adjusts expressions
- Face controls → Native SMC face: drives native face
- GUI overlay → Eye gaze: adjusts gaze
- Game hooks → Cloth enhancement: services runtime
- Cloth enhancement → Collision support: enhances contact
- Cloth enhancement → Ribbon damping: reduces flutter
- Game hooks → Endfield game: interacts with game
