Engine Integration
Use Bone3 2D Skeletal Animations in Cocos Creator (sp.Skeleton)
Bone3 exports both Spine 3.8 and Spine 4.2 packages (.json / .skel + .atlas + PNG) so Cocos Creator 2.x and 3.x projects can load animations directly in sp.Skeleton components.
Export Spine 3.8 for Cocos Creator 2.x / 3.x legacy runtimes, or Spine 4.2 for Cocos Creator 3.8+.
Compact binary .skel and single-page texture atlases help mini-games stay under strict bundle budgets.
Supports draw order keyframes, skins, mesh deformation, and audio/event triggers.
Step-by-Step Workflow
- 1
Check Your Cocos Creator Spine Runtime Version
Confirm whether your Cocos Creator version uses Spine 3.8 or Spine 4.2 in Project Settings.
- 2
Export Matching Format from Bone3
Choose Spine 3.8 or 4.2 in Bone3's Export panel and download the .json/.skel, .atlas, and .png bundle.
- 3
Import into Cocos Creator Assets
Drag all three files into your assets folder; Cocos Creator recognizes them as a sp.SkeletonData asset automatically.
- 4
Assign to sp.Skeleton and Play in TypeScript
Attach a sp.Skeleton component to a Node, assign skeletonData, and control animations via setAnimation.
Runtime Integration Example
import { _decorator, Component, sp } from "cc";
const { ccclass, property } = _decorator;
@ccclass("HeroSpine")
export class HeroSpine extends Component {
@property(sp.Skeleton)
skeleton: sp.Skeleton | null = null;
start() {
this.skeleton?.setAnimation(0, "idle", true);
}
playAttack() {
this.skeleton?.setAnimation(0, "attack", false);
this.skeleton?.addAnimation(0, "idle", true, 0);
}
}Frequently Asked Questions
- Which Spine version should I pick for Cocos Creator?
- Cocos Creator 2.x and early 3.x default to Spine 3.8, while Cocos Creator 3.8+ supports Spine 4.2. Bone3 exports both versions cleanly.
- Does Bone3 export work in WeChat / TikTok Mini Games built with Cocos?
- Yes. Standard Spine 3.8 / 4.2 exports run natively in Cocos Creator's mini-game runtime targets.
Related Guides & Integrations
Bone3 vs Spine 2D: Browser-Based Spine 3.8 & 4.2 Alternative
Compare Bone3 and Esoteric Software Spine 2D across browser workflow, PSD import, mesh & IK constraints, pricing, and verified Spine 3.8 / 4.2 runtime compatibility.
PSD to 2D Skeletal Animation Directly in Your Browser
Import layered Photoshop PSD files directly in the browser, preserve layer hierarchy and coordinates, rig bones and meshes, and export Spine 3.8 / 4.2 assets.
Use Bone3 2D Skeletal Animations in Unity (spine-unity)
Use Bone3 browser-based 2D skeletal animations in Unity. Export contract-tested Spine 3.8 & 4.2 .skel/.json + .atlas packages directly into official spine-unity.
Use Bone3 2D Skeletal Animations in PixiJS (spine-pixi)
Animate in Bone3 and render 60fps 2D skeletal animations in PixiJS HTML5 / WebGL games using @esotericsoftware/spine-pixi-v8 or pixi-spine.