refactor(M03): extract M2 animated scene finalizer

This commit is contained in:
2026-07-18 01:14:17 +04:00
parent 03ba129a52
commit 1b450dc580
11 changed files with 581 additions and 95 deletions
@@ -14,8 +14,9 @@
Own cross-frame bookkeeping between a successful animated M2 ResourceLoader
request, terminal polling and budgeted main-thread scene finalization. This is
an exact state extraction; animation eligibility, loading and Node lifecycle
remain in `StreamingWorldLoader` and `M2PrototypeCacheState`.
an exact state extraction; animation eligibility and loading remain in
`StreamingWorldLoader`, while scene finalization and retained Node lifecycle
belong to `M2AnimatedSceneFinalizer` and `M2PrototypeCacheState`.
## Non-goals
@@ -178,8 +179,9 @@ no rebake or migration is required.
## Extension points
ResourceLoader polling or animated-scene finalization may later move behind
separate adapters without changing this value-only state contract.
ResourceLoader polling may later move behind a separate adapter without
changing this value-only state contract. Animated-scene finalization is now a
sibling service.
## Capability status
@@ -200,12 +202,14 @@ separate adapters without changing this value-only state contract.
| Path | Responsibility |
|---|---|
| `src/render/m2/m2_animation_load_pipeline_state.gd` | Pending records, completion FIFO and metrics |
| `src/render/m2/m2_animated_scene_finalizer.gd` | Candidate instantiation, material repair and player validation |
| `src/render/m2/m2_prototype_cache_state.gd` | Animated prototype/static-only outcomes |
| `src/scenes/streaming/streaming_world_loader.gd` | Eligibility, I/O, permits, instantiation and adoption |
| `src/tools/verify_m2_animation_load_pipeline_state.gd` | Lifecycle/boundary/timing regression |
## Related decisions and references
- [`m2-animated-scene-finalizer.md`](m2-animated-scene-finalizer.md)
- [`m2-prototype-cache-state.md`](m2-prototype-cache-state.md)
- [`m2-mesh-load-pipeline-state.md`](m2-mesh-load-pipeline-state.md)
- [`world-renderer.md`](world-renderer.md)