Cocos AIR skill router
Stop once you can answer the task. Do not read another same-topic reference for the same question.
Choose one owner and required direct dependencies. Reuse loaded skills.
Environment: environment.
Quick Start
Siblings: owners and direct dependencies.
Triggers
- Choose the owner of an AIR task
- Adapt Creator knowledge to Code First
- Separate API exports from usable capabilities
Mappings: triggers.
Code First discipline
- Original APIs first: use the engine's
Scene,Node,Camera,Component,Material,Texture2DandSprite; AIR helpers compose these objects. Do not invent parallel scene, node or material abstractions. - Browser rendering requires WebGL 2 and nothing else; unsupported contexts reject startup with
WEBGL2_REQUIRED. WebGL 1, Canvas and WebGPU are not supported renderer fallbacks. HEADLESS tests produce no rendered pixels. - Use only the browser main entry
cocosair.js. Main import before canvas creation is supported; pass canvas and pixelRatioCap to createAirApp. For deferred loading, dynamically import the main entry in the application. Startup and HTML texture helpers share the main declarations; there are no bootstrap/html-source package subpaths. - Native material property writes require declared properties and matching value types;
USE_TEXTUREmust match whether the effect samples a texture. - Keep ownership explicit. Detach renderers and bindings before destroying their textures; borrow shared assets and release only resources the feature owns.
- Skeletal joints use full paths relative to the skinning root. For glTF decoders and Spine, inspect their documented deployment and license boundaries.
Contracts
Keep source-exported, bundle-reachable, configured and browser-verified claims separate. Feature membership alone is not reachability. Default and AIR_FEATURES variant builds are different candidates; verification requires PASS on the current candidate. A typecheck or API declaration does not prove rendering, interaction or lifecycle behavior. See full qualifiers.
Common Mistakes
- [HIGH] Check canvas admission against the current main-entry contract.
- [HIGH] AIR has no Creator resources bundle pipeline.
- [MEDIUM] A docs mention is not capability evidence.
Read wrong/right examples; note historical warnings.
No route matched
Use current main-entry declarations and canonical docs in the located package or checkout. Disclose missing resources; do not invent APIs or roots. Clarify only consequential missing context.
Reference map
- Before visual work; black/invisible?
- Which owner? - Direct dependencies
- Which environment? - Roots and prerequisites
- Legacy route terms? - Compatibility index