Cocos AIR 2D subsystem contracts
Stop once you can answer the task. Do not read another same-topic reference for the same question.
Scope: Spine, DragonBones, TiledMap, particle 2D, motion streak and billboards.
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
- Spine runtime data stays null
- Build DragonBones from JSON and textures
- Load or edit runtime tile maps
- Particle emitter stays empty or blends incorrectly
- Motion streak export or texture ownership
- Billboard remains invisible or incorrectly sized
Exact API and symptom mappings: triggers.
Contracts
Create the Canvas component before assigning its camera. Use runtime payloads, not Creator imports. Spine remains backend/asset blocked; particle plist fields and blend factors follow the native runtime contract.
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] Spine is blocked in the default bundle.
- [HIGH] TiledMap edits need the correct redraw path.
- [HIGH] Creator plist blend values need native runtime mapping.
- [MEDIUM] Check exported names and runtime atlas/path conventions.
Read relevant wrong/right examples before implementation.
Reference map
- Spine blocked? - Runtime and asset blockers
- Build DragonBones? - Payloads and pitfalls
- Edit tiles? - Arrays, dirty state and queries
- Empty particles? - Plist, blend and streaks
- Code First 3D emitters or trails? - Native CPU/GPU ParticleSystem
- Invisible billboard? - Size and texture ownership