// Animation-role resolver for Arknights battle Spine models (research 07 §5.4). // // Model animation names vary a lot (Attack vs Attack_Begin/Loop/End vs Combat, // Skill_2_Loop vs Skill2_Loop vs Skill_2, Die missing on Back models, enemies // with several "forms" such as A_Idle/B_Idle or Idle_grey/Idle_red, …). The // renderer should not guess at runtime, so tools/fetch-assets.mjs resolves each // model once and stores the result in data/assets.json. // // A "clip" is { begin: string|null, loop: string, end: string|null, via?: string }: // play `begin` once (if any), then `loop` (once per attack / repeatedly while a // skill or move lasts), then `end` (if any). `via` is set when the clip is a // fallback borrowed from another role ('combat', 'attackAny', 'skill', 'idle', // 'attack'), so the renderer can add e.g. a flash when an attack is just Idle. // // Resolution order (names matched exactly first, then case-insensitively; the // research order comes first, the generic patterns after it are extensions for // models the research table did not cover): // idle : Idle → first idle-like (Idle_A, A_Idle, Idle01; not Skill/Stun; animated ones first when // durations are given) → Default → first animation // deploy : Start →