Phase 2.7 : animation registry + tick handler + placeholder assets

TiedUpAnimationRegistry.CONTEXT_STAND_IDLE instancié au FMLCommonSetupEvent
via DirectStaticAnimation + armature BIPED. Placeholder JSON 2-keyframes
identity (joueur statique) à assets/tiedup/animmodels/animations/ jusqu'à
ce qu'un export Blender authored remplace. biped.json de même (hiérarchie
identity) placé dans assets/tiedup/armatures/ — parse via JsonAssetLoader
mais pas encore chargé au runtime (l'armature reste procédurale côté Java).

RigAnimationTickHandler tick chaque player visible côté client (phase END) :
- patch.getAnimator().tick() → avance les layers EF
- trigger playAnimation(CONTEXT_STAND_IDLE, 0.2f) quand motion=IDLE et anim
  courante ≠ CONTEXT_STAND_IDLE (idempotent)
- try/catch per-entity avec dedup des erreurs par UUID (pattern
  TiedUpRenderEngine.loggedRenderErrors)
- skip si level null / paused

PlayerPatch.initAnimator bind désormais IDLE → CONTEXT_STAND_IDLE quand le
registry est prêt (fallback EMPTY_ANIMATION si patch construit avant setup).

Voir docs/plans/rig/ASSETS_NEEDED.md pour la spec des assets authored
définitifs (anim idle swing respiration 3 keyframes + offsets biped
anatomiques).
This commit is contained in:
notevil
2026-04-23 00:07:32 +02:00
parent 73264db3c6
commit 08808dbcc1
6 changed files with 653 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
{
"_comment": "PLACEHOLDER Phase 2.7 — animation idle 2-keyframes identity (joueur statique, pas de balancement). Boucle 2 secondes. DOIT parser avec JsonAssetLoader.loadClipForAnimation(). À remplacer par un export Blender authored (respiration/balancement subtle) quand dispo. Voir docs/plans/rig/ASSETS_NEEDED.md section 2.",
"format": "ATTRIBUTES",
"armature": "tiedup:biped",
"animation": [
{
"name": "Root",
"time": [0.0, 2.0],
"transform": [
{ "loc": [0.0, 0.0, 0.0], "rot": [1.0, 0.0, 0.0, 0.0], "sca": [1.0, 1.0, 1.0] },
{ "loc": [0.0, 0.0, 0.0], "rot": [1.0, 0.0, 0.0, 0.0], "sca": [1.0, 1.0, 1.0] }
]
}
]
}

View File

@@ -0,0 +1,225 @@
{
"_comment": "PLACEHOLDER Phase 2.7 — identity transforms (joints empilés à l'origine). Doit parser avec JsonAssetLoader.loadArmature() mais n'est PAS encore utilisé au runtime (TiedUpArmatures.BIPED est construit proceduralement en Java). À remplacer par un export Blender addon Antikythera-Studios quand dispo. Voir docs/plans/rig/ASSETS_NEEDED.md section 1.",
"armature": {
"armature_format": "ATTRIBUTES",
"joints": [
"Root",
"Thigh_R",
"Leg_R",
"Knee_R",
"Thigh_L",
"Leg_L",
"Knee_L",
"Torso",
"Chest",
"Head",
"Shoulder_R",
"Arm_R",
"Hand_R",
"Tool_R",
"Elbow_R",
"Shoulder_L",
"Arm_L",
"Hand_L",
"Tool_L",
"Elbow_L"
],
"hierarchy": [
{
"name": "Root",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Thigh_R",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Leg_R",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Knee_R",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": []
}
]
}
]
},
{
"name": "Thigh_L",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Leg_L",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Knee_L",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": []
}
]
}
]
},
{
"name": "Torso",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Chest",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Head",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": []
},
{
"name": "Shoulder_R",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Arm_R",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Elbow_R",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Hand_R",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Tool_R",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": []
}
]
}
]
}
]
}
]
},
{
"name": "Shoulder_L",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Arm_L",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Elbow_L",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Hand_L",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": [
{
"name": "Tool_L",
"transform": {
"loc": [0.0, 0.0, 0.0],
"rot": [1.0, 0.0, 0.0, 0.0],
"sca": [1.0, 1.0, 1.0]
},
"children": []
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
}