Cocos AIR skinning and morph contracts
Stop once you can answer the task. Do not read another same-topic reference for the same question.
Scope: Code-built skeleton binding, bind-pose restoration, realtime/baked poses and morphs.
Environment: use package imports in apps; source paths require an AIR checkout. See context.
Quick Start
For complete setup and teardown, read Quick Start.
Siblings: direct dependencies; reuse loaded skills.
Triggers
- Build and bind a skeleton from joint paths
- Restore the original bind pose
- Animate bone nodes in realtime mode
- Select baked animation for fixed clips
- Author and apply morph target weights
- Diagnose AIR_E_SKINNING_* binding or capacity errors
- Invalidate stale bindpose caches and rebind
Exact API and symptom mappings: triggers.
Contracts
Joint paths are relative to the skinning root and must be complete. Capture/restore bind pose deliberately; distinguish skeletal deformation, morph weights and baked-animation selection.
Read references/contracts.md only when the task needs exact option rules, limits, error behavior or source annotations. Prefer the topic references below for a narrower question.
Common Mistakes
- [HIGH] Use complete joint paths relative to the skinning root.
- [HIGH] Bone-node edits do not drive baked animation.
- [MEDIUM] restoreBindPose does not reorder the joints array.
- [MEDIUM] A weight setter call alone does not prove deformation.
Read relevant wrong/right examples before implementation.
Reference map
- Why did binding fail? - Paths and capacity
- Why is bind pose stale? - Restore and rebind
- Why did weights not apply? - Morph data and lifecycle
- GPU point/voxel transitions instead? - Different from mesh weights