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

/cocosair-gltf

@ed38648
by oahc09oahc09/cocosairjs3 stars
2
Run it yourself

Load glTF/GLB models, extensions, decoder injection and instances. Use for Draco/meshopt/KTX2 deployment, GLTF_DECODER_MISSING, uncoded load errors or animation loops.

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

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

referencestriggers.md

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

Cocos AIR glTF triggers

Source annotations refer to the AIR checkout.

When to use what

  • "load a model from a URL" -> new GLTFLoader().loadAsync(url); the asset manager owns caching and in-flight deduplication (loader-api.md).
  • "load from bytes I already have" -> parseAsync(data, baseUrl) with string | ArrayBuffer; pass baseUrl for a .gltf whose buffers and images are relative, and pass nothing for data:/blob: input (src/air/assets/gltf/loader.ts:115, :200-202).
  • "compressed model" -> inject first, then load; setMeshoptDecoder, setDRACODecoder, setKTX2Transcoder (decoders.md).
  • "does this browser support extension X" -> getExtensionSupport(), and read the five statuses rather than assuming (extensions-matrix.md).
  • "several copies of the same model" -> one GLTFAsset, many instantiate() calls; meshes, materials, textures and skeletons are shared, node and animation state are not (loader-api.md).
  • "loop one clip on one instance" -> instance.setAnimationLoop(true, clipName); omit the name to select every clip of that instance.
  • "why did my load throw with no code" -> it is a plain Error, a DOMException or a tagged TypeError, not a GLTFError (diagnostics.md).
  • "write my own extension handler" -> loader.register(factory); registration order is hook execution order, and the context type is not nameable from the declarations (extensions-matrix.md, loader-api.md).

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
[
  "load a glTF or GLB from URL or bytes",
  "compressed model will not load",
  "which glTF extensions are supported",
  "instance animation will not loop",
  "destroying a model leaves GPU resources"
]
owns
[
  "gltf",
  "glb",
  "decoder-injection",
  "extension-support",
  "model-instancing",
  "gltf-errors"
]
not_for
[
  "generic asset caching -> cocosair-assets",
  "edit imported shared materials -> cocosair-materials-effects",
  "skeleton bind poses or morph weights -> cocosair-skinning-morph"
]
metadata
{
  "author": "oahc09@gmail.com",
  "version": "1.0.0",
  "last-updated": "2026-10-13",
  "description_zh": "加载 glTF 和 GLB,配置解码器、扩展、进度、实例和错误处理。用于模型加载、压缩资源部署和加载器能力诊断。"
}

README badge

README badge for oahc09/cocosairjs/cocosair-gltf