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

/cocosair

@ed38648
by oahc09oahc09/cocosairjs3 stars
2
Run it yourself

Route AIR tasks by subsystem or visual symptom; choose direct dependencies and check capabilities.

  • 10 files
  • 72.8 KB
  • MIT
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/oahc09/cocosairjs/cocosair

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

referencestask-recipes.md

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

AIR task cookbook

中文入口:粒子与点精灵、无后处理辉光、拾取与 HUD、动态网格、天空与环境。

Choose the task first, then follow only the needed owner links. These are composition routes; exact contracts remain in their existing references. Use the visual loop to check the result. Neither a route nor a copied shader establishes visual acceptance.

Each subsystem Quick Start is a standalone example and repeats app/scene/camera setup. When combining recipes in an already working page, reuse those objects and read the topic needed for the next change. Use an app or camera Quick Start when that setup is still missing; loading another subsystem does not require assembling another complete page.

Particles and point sprites

Choose Billboard for camera-facing textured quads, ParticleSystem2D for that subsystem, or a custom POINT_LIST mesh via mesh layout and custom GLSL. For points write gl_PointSize; do not assume a thick-line or billboard route is equivalent. Check size, texture ownership, topology and a visible pixel result before scaling the particle count. For many repeated meshes, choose batching after the small case renders.

Glow without post-processing

Start with visible opaque geometry, then add a soft alpha texture or shader falloff using numeric blend states. Read material instances and map macros before animating brightness. This route simulates luminous surfaces/halos; it does not spread HDR highlights across the rendered image like Bloom. If the task allows real post-processing, the owner is HDR/Bloom. Verify ordering, depth/occlusion and saturation in the final frame rather than compensating for a black object with higher intensity.

Picking and HUD

Choose native input, convert screen coordinates with the camera ray contract, then use the appropriate hit test and present the selected result through the UI owner. Do not mix DOM CSS pixels, framebuffer pixels and UI local coordinates. For wheel-controlled cameras, choose the native MOUSE_WHEEL route or an explicitly owned DOM listener; keep page-scroll capture scoped to the interaction surface. Check focus and default-event policy for action adapters rather than assuming every backend captures wheel or prevents scrolling. Remove listeners on disposal.

Dynamic mesh

Use the creation/update checklist, pair it with the complete effect template only if a custom shader is needed, then frame the bounds. First verify a few vertices and one update. Choose batching when actual workload measurements justify it; a missing draw is not a batching diagnosis.

For continuous deformation, go directly to the Component.update(dt) example. For controlled captures, use the step clock. The implementation loop and the capture clock serve different steps; a mesh animation alone does not require reading the tween/clip examples.

Instances, particles and GPU shapes

Choose by data/lifetime ownership rather than by the word "particle":

Task Read first
Repeated fixed meshes without per-instance Nodes Explicit instance batches
Ordinary shared-material MeshRenderer auto-batching Native instancing
Emission, lifetime and CPU trails Native 3D ParticleSystem
Text/image/mesh point or voxel shape transitions GPU morph fields
glTF mesh Morph weights or skeletal deformation Skinning and Morph

For a dull AirMorphField, inspect its own surface mode and normals: setSurface('polished', 0.18) enables a procedural studio reflection, not native scene lights or full PBR/IBL. Check actual highlight changes when roughness/camera changes before adding exposure. Original native material workflows keep their existing owners; do not swap a field's private material for builtin-standard or add native USE_INSTANCING to its managed stream.

Sky and environment

Choose scene globals for skybox, fog and ambient configuration, lighting units for exposure/physical magnitudes, and camera framing for scene scale. Confirm a readable scene with fog and extra effects disabled, then tune the environment incrementally. A dark frame does not identify a missing light, excessive fog or exposure on its own; compare the symptom checks.

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
router
All 1 allowed tools
Read 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
[
  "which skill owns this AIR task",
  "choose only the dependencies needed for this step",
  "adapt Creator knowledge to code-first AIR",
  "distinguish source exports from proven browser capabilities"
]
owns
[
  "skill-routing",
  "primary-owner",
  "direct-dependencies",
  "code-first",
  "capability-layers"
]
not_for
[
  "startup errors -> cocosair-application",
  "material property failures -> cocosair-materials-effects"
]
metadata
{
  "author": "oahc09@gmail.com",
  "version": "1.0.0",
  "last-updated": "2026-10-13",
  "description_zh": "为 Cocos AIR 任务选择主技能和直接依赖,并遵循原生 API、启动时序与能力证据分层。用于开始 AIR 开发、定位能力归属或选择技能。"
}

README badge

README badge for oahc09/cocosairjs/cocosair