Derived from src/exports/spine.ts, src/cocos/spine/index.ts, src/cocos/spine/skeleton.ts, src/cocos/spine/skeleton-data.ts, src/cocos/spine/skeleton-cache.ts, src/cocos/spine/assembler/simple.ts, src/cocos/spine/lib/spine-core.js, src/cocos/spine/lib/spine-core.d.ts, src/cocos/spine/lib/spine-define.ts, src/cocos/spine/lib/instantiated.ts, src/cocos/spine/lib/air-spine-instantiate-js.ts, cc.config.json module overrides, docs/notes/spine-asset-sourcing.md, docs/notes/port-spine-and-billboard-decisions.md, docs/manual/2d-assets-and-effects.md, docs/reference/web-features.md, build/cocosair.module.js (as of 2026-10-10).
What is actually shipped
Three names reach the application: sp (the namespace alias emitted as index$2 as sp), loadWasmModuleSpine, and through sp the real classes Skeleton, SkeletonData, SpineAnimationCacheMode, SpineMaterialType, SpineSocket, vertexEffectDelegate and the assembler. They resolve in the single export { ... } block of build/cocosair.module.js (currently :161574). Wiring is thin and official: src/exports/spine.ts:3 exports sp, :5 re-exports loadWasmModuleSpine, and src/cocos/spine/index.ts:48-52 re-exports ./skeleton, ./skeleton-data, ./vertex-effect-delegate, ./assembler and ./lib/spine-version, with :54 exporting the spine lib object itself.
That is the whole honest story: the code closure and the type surface are in, the runtime backend is not.
The BLOCKED chain, end to end
- The web path has only a wasm/asm backend.
src/cocos/spine/lib/spine-core.jsis 177 lines containing enums and stubs (MixBlend,MathUtilsand friends) with zero occurrences ofSpineWasmUtilorwasmUtil; the complete type face, includingclass wasmUtil, lives insrc/cocos/spine/lib/spine-core.d.ts(1498 lines) as a declaration-only artifact.docs/notes/spine-asset-sourcing.md:16-20records those measurements against the upstream baseline. - Real injection happens only after emscripten instantiation.
src/cocos/spine/lib/spine-define.ts:91-94isoverrideClass(wasm), which assignsspine.wasmUtil = wasm.SpineWasmUtil, setsspine.wasmUtil.wasm = wasmand callsspineWasmInit();:328-329exposeoverrideSpineDefine(wasm). Nothing in the default AIR build ever calls them. - The emscripten artifacts are absent from the snapshot.
docs/notes/spine-asset-sourcing.md:25-34checks four sources -cocos/spine/lib/, the repositoryexternal/root,native/external/emscripten/(the target of theexternal:emscripten/*virtual modules) and installed@cocos/*packages - and finds no.wasm,.asm.jsor.js.memin any of them. - The build swaps the entry rather than failing. The module override table in
cc.config.jsonmapscocos/spine/lib/spine-instantiate.tstosrc/cocos/spine/lib/air-spine-instantiate-js.ts; the four official filesspine-instantiate.ts,spine-instantiate-3.8.ts,spine-instantiate-4.2.ts,spine-instantiate-dynamic.tsstay byte-identical in the repository but outside the default closure. Without the override, rollup fails on the missing external file. - The shim degrades every call.
src/cocos/spine/lib/air-spine-instantiate-js.ts:26-52installsspine.wasmUtilas a table whose methods are allnoopThenNull(:31-34: warn once, return null) and whosewasmfield is{ HEAPU8: new Uint8Array(0) }(:36). Stubbed names,:37-50:spineWasmInit,spineWasmDestroy,freeStoreMemory,createStoreMemory,querySpineSkeletonDataByUUID,createSpineSkeletonDataWithJson,createSpineSkeletonDataWithBinary,registerSpineSkeletonDataWithUUID,destroySpineSkeletonDataWithUUID,destroySpineSkeleton,getCurrentListenerID,getCurrentEventType,getCurrentTrackEntry,getCurrentEvent.:54runs the install at import time;:56-64exportswaitForSpineWasmInstantiation()which optionally applies_CC_SPINE_VERSIONthroughsetSpineVersionwhen the build exposes it, warns and resolves. - The warning exists because the upstream call sites have no guards.
src/cocos/spine/skeleton-data.ts:212callsquerySpineSkeletonDataByUUIDbare,:224callscreateSpineSkeletonDataWithJson, the binary branch at:226-234callscreateStoreMemory, indexesspine.wasmUtil.wasm.HEAPU8and callscreateSpineSkeletonDataWithBinary;src/cocos/spine/skeleton-cache.ts:173cachesspine.wasmUtil.wasm.HEAPU8at module scope and:383,:473calldestroySpineSkeleton;src/cocos/spine/assembler/simple.ts:180touchesHEAPU8directly. The stub object exists precisely so those lines keep type-checking and evaluating.
Observable result: SkeletonData.getRuntimeData() (src/cocos/spine/skeleton-data.ts:199-237) returns null - the cache lookup misses, the json branch gets null, the binary branch writes into a zero-length HEAPU8 view and still gets null - and Skeleton._updateSkeletonData() returns at src/cocos/spine/skeleton.ts:791 (if (!this._runtimeData) return;) with no exception, no log beyond the one warning, and no draw list. The node, the component and the editor-visible properties all behave normally, which is why the failure reads as "the skeleton is silently empty".
loadWasmModuleSpine is not a fix
src/cocos/spine/index.ts:127-136 gates everything on BUILD && LOAD_SPINE_MANUALLY; the flag is declared false in cc.config.json, so the default build returns Promise.resolve() immediately and never reaches waitForSpineWasmInstantiation. Even with the flag on, the awaited function is the shim at :56-64, which resolves after warning. Separately, src/cocos/spine/lib/instantiated.ts:30-32 registers waitForSpineWasmInstantiation on the game post-infrastructure delegate when !JSB && (!BUILD || !LOAD_SPINE_MANUALLY), and src/cocos/game/game.ts:499 declares that delegate with :817 dispatching it, so in a normal web boot the warning fires once during startup whether or not you ever add a skeleton. Treat "awaited the spine loader and it resolved" as no evidence at all; docs/reference/web-features.md:13 is the general rule - source present, bundled and deployed assets are three different claims.
API that is already written against
Useful when an unblocked build arrives, and accurate today for anything that does not touch wasmUtil.
sp.SkeletonData(src/cocos/spine/skeleton-data.ts:40-41, registered assp.SkeletonData) is anAsset.skeletonJsonStr(:54-59) is the raw text,skeletonJson(:65-79) accepts a JSON string or a parsed object, resets the cache, and when the uuid is still empty takes it fromvalue.skeleton.hash(:76-77) - the manual-creation channel, so set the json before anything that keys off the uuid.atlasText(:85-91) resets as well.textures: Texture2D[](:99) andtextureNames: string[](:108) must be parallel and non-empty,scale(:126) multiplies the runtime data,_nativeAsset(:131-137) is the binary-skeleton payload consumed at:226-234.getSkinsEnum()(:242) andisEmpty()(:307-308) are pure-JS helpers;getRuntimeData(quiet)(:199-237) errors withno textures found!when frames are missing (:204) which is the one failure that does print.sp.Skeleton(src/cocos/spine/skeleton.ts:206,:210) extendsUIRenderer, so it batches with the 2D pipeline and inheritssrcBlendFactoranddstBlendFactorfromsrc/cocos/2d/framework/ui-renderer.ts:246-247. Cache mode enumSpineAnimationCacheModeisUNSET = -1,REALTIME = 0,SHARED_CACHE = 1,PRIVATE_CACHE = 2(:75-90); the field default isREALTIME(:234) anddefaultCacheModeis:487-493.premultipliedAlphadefaults totrue(:228, accessor:500-503).loopdefaults totrue(:515),timeScale(:522-527) multiplies against the module constanttimeScale = 1.0(:64).defaultSkin(:217) anddefaultAnimation(:219) are applied in_updateSkeletonDatain skin-then-animation order (:800-811), and the socket helper attaches at:816.- Playback and inspection surface, all in
src/cocos/spine/skeleton.ts:animationgetter and setter (:625-636, the setter beingsetAnimation(0, value, this.loop)),getState()(:697),setAnimation(:945),addAnimation(:999),findAnimation(:1023),getCurrent(:1037),clearAnimation(:753),clearAnimations(:764),setSkin(:1059),setSlotsRange(:879),getAttachment(:902),setAttachment(:920),getTextureAtlas(:935),findBone(:1468),findSlot(:1485),setMix(:1502),querySockets(:1621),isAnimationCached(:1377),setAnimationCacheMode(:1392),invalidAnimationCache(:1449),setToSetupPose(:1436),setBonesToSetupPose(:1422),setSlotsToSetupPose(:1408), debug togglesdebugSlots(:582),debugBones(:596),debugMesh(:610),customMaterial(:643). Lifecycle:__preloadpulls the runtime data (:674-681),onEnableregisters withSkeletonSystem(:705-710),onDisable(:715-719),onDestroy(:721-728). - Supporting enums:
ATTACHMENT_TYPEwithREGION = 0,BOUNDING_BOX = 1,MESH = 2,SKINNED_MESH = 3(src/cocos/spine/index.ts:74-79),SpineMaterialType.COLORED_TEXTURED = 0andTWO_COLORED = 1(src/cocos/spine/skeleton.ts:127-128), andAnimationEventTypeSTART = 0throughEVENT = 5(src/cocos/spine/index.ts:87-122). - Events use the 3.x listener family, not the 2.x registrar.
registerSpineEventHandlerandunregisterSpineEventHandlermatch nothing insrc/cocos/spine; the entry points aresetStartListener(src/cocos/spine/skeleton.ts:1781),setInterruptListener(:1791),setEndListener(:1801),setDisposeListener(:1811),setCompleteListener(:1821),setEventListener(:1831) and the six per-track variantssetTrackStartListener(:1842) throughsetTrackEventListener(:1904), each taking aspine.TrackEntrythat only the real backend can hand out._ensureListener(:1768-1774) allocates theTrackEntryListenersand passes its id to the instance,onDestroyremoves it (:723), realtime dispatch readsthis._listener.startat:1121-1122andcomplete/endat:1154-1157, and the cached path binds throughsrc/cocos/spine/skeleton-cache.ts:257-268. So no spine callback can fire today, and the reason is the missing backend rather than a missing method.
Unblock checklist
docs/notes/spine-asset-sourcing.md:43-47 states it in order: obtain the emscripten artifacts matching the baseline (per version, spine.wasm.js, spine.wasm, spine.asm.js, spine.js.mem), place them as deployed assets next to the bundle instead of inside it, then delete the spine override rule and src/cocos/spine/lib/air-spine-instantiate-js.ts to return to official behaviour, and only then add a spine-basic example with the json, atlas and texture trio loaded by loadRemote plus animation, skin and event assertions and a three-browser matrix. :51-56 records the owner closure: the same external-binary gap as the physics and webgpu backends, closed as "product surface verified, example surface not delivered", with the shim kept deliberately. docs/notes/port-spine-and-billboard-decisions.md:5 is the ruling itself. docs/manual/2d-assets-and-effects.md carries the subsystem table row that says export surface present, browser evidence none.
Nothing above changes if you set LOAD_SPINE_MANUALLY to true in a private build; it only moves which warning you get.