Index of every page on this site: llms.txt
All skills
oahc09 avatar

/cocosair-2d-subsystems

@ed38648
by oahc09oahc09/cocosairjs3 stars
2
Run it yourself

Build DragonBones, TiledMap, 2D/3D particles and billboards from runtime data. Use for raw asset strings, missing pixels, MotionStreak or Spine backend limits.

  • 12 files
  • 56.9 KB
  • MIT
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/oahc09/cocosairjs/cocosair-2d-subsystems

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescontext.md

≈1.7k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Working context

Use package imports and shipped docs for an application; use source paths and repository commands only in a confirmed AIR checkout. A copied host skill is not a runtime installation.

Read the shared environment rules when locating these roots. If sibling resources are unavailable, use the installed canonical chapter and disclose the limitation. Tool declarations identify workflow capabilities; they do not authorize installation, writes, publication or any action outside the user and host scope.

Related skills

  • cocosair - the router and the Code First discipline this skill applies.
  • cocosair-ui-2d - Canvas, UI camera and layer setup, UITransform sizing and draw order that every subsystem here except Billboard sits on top of.
  • cocosair-assets - assetManager.loadRemote with an explicit extension, Texture2D and SpriteFrame ownership, and the ImageAsset to Texture2D wrap these asset constructors need.
  • cocosair-scene-graph - active toggling that forces a TiledLayer rebuild, deferred destroy(), and the node transforms Billboard and ArmatureDisplay read.
  • cocosair-materials-effects - builtin-billboard and SpineMaterialType sit in the same effect registry; technique and blend-state overrides happen on the material.
  • cocosair-camera - TiledMap culling projects through the camera that resolves at run time, and Billboard needs a 3D camera visibility, not the UI one.
  • cocosair-project-setup - which symbol each entry file exports and how the cocosair importmap alias is wired.

Original entry guidance

The original entry wording below is an on-demand archive, not a second routing source.

Use the environment rules to locate the checkout or installed package; sibling skills are optional direct dependencies, not a recursive load list.

Build Spine, DragonBones, TiledMap, particle and billboard content from strings and bytes at runtime - there is no Creator importer, no uuid dependency graph and no prefab here, and one of these five subsystems cannot run at all in the default bundle.

Read references/quick-start.md when constructing the minimal example. It preserves the complete setup and teardown sequence; select the source-checkout or npm-consumer environment first.

Read references/context.md to select the owner of this step and only its directly needed dependencies. Reuse already loaded skills; this is not a recursive load list.

Original mistake navigation

Before implementing the relevant path, read its wrong/right examples in references/common-mistakes.md:

  • [HIGH] Treating Spine as runnable out of the box
  • [HIGH] Expecting a TiledMap cell edit to redraw itself
  • [HIGH] Copying Creator plist blend values into a code-first emitter
  • [MEDIUM] Importing names the bundle does not export
  • [MEDIUM] Reusing Creator asset conventions for atlas and paths

Original metadata

Description and description_en

The two original fields contained exactly the same value, retained once here.

Drives the Cocos AIR 2D subsystem runtime modules in code-first scenes - the sp namespace and loadWasmModuleSpine plus the BLOCKED Spine backend and asset sourcing state, dragonBones ArmatureDisplay, DragonBonesAsset, DragonBonesAtlasAsset, CCFactory and AnimationCacheMode with realtime versus cached skinning on the vendored dragonbones-js, TiledMap, TiledMapAsset, TiledLayer, TiledObjectGroup and TiledTile built from runtime tmx and tsx strings, ParticleSystem2D and ParticleAsset fed by a generated plist through assetManager.parser.parsePlist, MotionStreak (exported as MotionStreak, there is no MotionStreak2D), and Billboard as a scene.Model whose size and rotation travel through one cc_size_rotation uniform. Use when a Spine skeleton draws nothing without any error, when a TiledMap cell edit or object query does not refresh or resolve, when plist-tuned particles compute but render no pixels, or when a billboard is invisible at its default size.

Keywords

Cocos AIR, cocosair.js, 2d, subsystems

References

  • spine.md - the export surface, the BLOCKED chain end to end, the stubbed wasmUtil list, SkeletonData and Skeleton fields that are already written against, and what an unblocked build would need.
  • dragonbones.md - the three-object construction order, armature key, cache modes and their downgrade rule, factory and slot internals, the vendored dragonbones-js boundary, and the measured API pitfalls.
  • tiledmap.md - asset-array wiring, the parse and build path, culling versus render-data dirty state, the three runtime-edit cases, object layer coordinate rewriting and queries.
  • particle-2d.md - the plist chain end to end, the key dictionary with its silent-zero cases, gfx blend slots, frame and texture ownership, determinism trio, and MotionStreak as its sibling.
  • billboard.md - model and mesh construction, the cc_size_rotation uniform contract, technique clamping and material copy, texture ownership, and the CPU-rotation route from the older manual.

Canonical docs

  • docs/notes/spine-asset-sourcing.md - open for the four empty asset sources, the code-regression versus degradation split, the unblock steps and the owner closure that keeps the shim.
  • docs/notes/dragonbones-notes.md - open for the measured pitfall list: texture wrapping, armature key, setter input types, armature being a method, atlas data shapes and uncovered surface.
  • docs/notes/tiled-map-notes.md - open for parse semantics, the three runtime-edit paths, object class versus geometry type, and the recorded residuals.
  • docs/notes/particle-2d-notes.md - open for the plist pipeline findings, blend enum handling, runtime frames, the determinism trio and the silent zero-particle case.
  • docs/manual/tiled-culling-and-dirty-state.md and docs/manual/tiled-object-queries.md - open for the refresh contract and the object query contract as tested.
  • docs/manual/2d-assets-and-effects.md - open for the subsystem table: export surface present, browser evidence, blockers.
  • docs/manual/billboard.md - open for the native component recipe including the zero default size; docs/manual/billboards.md - open for the CPU rotation route and its white-plane pitfall.
  • docs/reference/web-features.md - open for the source-present, bundled and deployed-assets distinction this skill relies on.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at ed38648. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
layer
subsystem
All 1 allowed tools
Read Edit Write Bash
Other metadata
compatibility
Cocos AIR source checkout or installed cocosair.js package. Browser rendering requires WebGL 2; source tooling requires Node.js >=18. Use the host-provided tools and user-authorized workspace.
when_to_use
[
  "build DragonBones assets from raw JSON strings",
  "TiledMap edits do not redraw or resolve objects",
  "particles compute but render no pixels; createAirParticleSystem 3D emitters/trails CPU/GPU",
  "Spine skeleton stays blank without an error",
  "billboard or motion trail is invisible"
]
owns
[
  "dragonbones",
  "tiledmap",
  "particle-2d",
  "billboard",
  "motion-streak",
  "spine-limits"
]
not_for
[
  "basic UI layout and controls -> cocosair-ui-2d",
  "3D skeleton deformation -> cocosair-skinning-morph",
  "remote asset caching -> cocosair-assets"
]
metadata
{
  "author": "oahc09@gmail.com",
  "version": "1.0.0",
  "last-updated": "2026-10-13",
  "description_zh": "配置 Spine、DragonBones、TiledMap、二维粒子和 Billboard 的原生运行时契约。用于资源构造、空白画面或子系统能力边界问题。"
}

README badge

README badge for oahc09/cocosairjs/cocosair-2d-subsystems