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

/cocosair-physics

@ed38648
by oahc09oahc09/cocosairjs3 stars
2
Run it yourself

Choose builtin, cannon or Box2D physics; wire rigid bodies, colliders and raycasts. Use for missing gravity, trigger filters, backend limits or material error 9642.

  • 9 files
  • 37.8 KB
  • MIT
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/oahc09/cocosairjs/cocosair-physics

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

referencestriggers.md

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

physics contracts triggers

For original references to the contracts below, see Contracts. Source annotations refer to the AIR checkout.

When to use what

  • "queries, triggers, collision callbacks only" -> default physics: 'builtin'; zero external dependencies, real raycasts, no simulation.
  • "gravity, falling, stacking, forces" -> createAirApp({ physics: 'cannon' }); pure-JS cannon from the vendored @cocos/cannon, both backends already in the default bundle (tools/build/build.cjs:41).
  • "2D rigid bodies and queries" -> box2d is the default 2D backend (src/cocos/physics-2d/box2d/instantiate.ts:43); PhysicsSystem2D.raycast/testPoint/testAABB (src/cocos/physics-2d/framework/physics-system.ts:362, :370, :378), see 2d-box2d.md.
  • "ammo / physx / box2d-wasm" -> not shipped; the Emscripten artifacts do not exist in this repository (docs/notes/physics-asset-sourcing.md:11-17), see backend-selection.md.
  • "why did my trigger stop firing after setGroup" -> the mask half of the pair is still 1; fix both sides (docs/notes/physics-3d-notes.md:56-63).

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
[
  "dynamic bodies do not fall or stack",
  "triggers stop firing after changing collision groups",
  "choose builtin or cannon before startup",
  "query 2D bodies with raycasts or overlap tests",
  "physics material error 9642 appears"
]
owns
[
  "builtin-physics",
  "cannon",
  "box2d",
  "collision-filter",
  "rigid-body",
  "physics-queries"
]
not_for
[
  "camera pixel-to-ray conversion -> cocosair-camera",
  "node hierarchy and transforms -> cocosair-scene-graph",
  "non-physics startup errors -> cocosair-application"
]
metadata
{
  "author": "oahc09@gmail.com",
  "version": "1.0.0",
  "last-updated": "2026-10-13",
  "description_zh": "选择 builtin 或 cannon,并区分碰撞检测、运动积分和二维 Box2D 的能力。用于刚体、触发器、射线查询或物理后端问题。"
}

README badge

README badge for oahc09/cocosairjs/cocosair-physics