Spine 4.3 runtime for PixiJS 6.5. This community-maintained package derives from and adapts @esotericsoftware/spine-pixi-v7; it is not an Esoteric Software product.
- Spine runtime and exported data: 4.3
- PixiJS:
>=6.5.0 <6.6.0 - ESM, IIFE, and TypeScript declarations
- Browsers with
fetch,URL, promises, and typed arrays
Skeleton data exported by other Spine major/minor versions is not compatible.
npm install spine-pixi-v6 pixi.js@6.5import { Application } from "pixi.js";
import { Spine, loadAssets } from "spine-pixi-v6";
const app = new Application({ width: 800, height: 600 });
await loadAssets({
skeleton: "spineboyData",
skeletonUrl: "/assets/spineboy-pro.skel",
atlas: "spineboyAtlas",
atlasUrl: "/assets/spineboy-pma.atlas",
});
const spineboy = Spine.from({
skeleton: "spineboyData",
atlas: "spineboyAtlas",
scale: 0.5,
});
spineboy.state.setAnimation(0, "walk", true);
app.stage.addChild(spineboy);For IIFE usage, load PixiJS 6.5 before dist/iife/spine-pixi-v6.js. The package is exposed as window.spine.
Run npm run build, serve the repository root over HTTP, and open examples/. The examples cover loading, bounds, animation events, skins, physics, physics movement, and display objects attached to slots.
The display-object API follows @esotericsoftware/spine-pixi-v7@4.3.13, including bounds providers, slot objects, debug rendering, dark tint, animation updates, and SkeletonPhysicsMovement.
Assets,loadAssets,unloadAssets, andinspectAssetsreplace the PixiJS 7 asset pipeline.applySkinsandresolveSkinsprovide atomic and combined skin changes.Spine.unloadFromCacheandspine.unloadFromCache()remove parsed skeleton data from the runtime cache.- ESM imports
pixi.js; IIFE uses the globalPIXIobject. - Color conversion, dark tint, typed arrays, and interaction use PixiJS 6 APIs.
- The positional
Spine.from(skeleton, atlas, options)overload remains available but is deprecated.
PixiJS 4, 5, and 7 and CanvasRenderer-only environments are outside the supported range.
npm ci
npm testnpm run build writes declarations, unbundled modules, and ESM/IIFE bundles to dist/. Tests cover the public API, skins, asset loading and cleanup, examples, browser rendering, package contents, and parity with the v7 runtime.
This package contains derivative work from the Spine Runtimes and is distributed under the Spine Runtimes License Agreement. Redistribution must include that license and its copyright notice. Use of the Spine Runtimes is also subject to the Spine Editor licensing terms described in the Spine Editor License Agreement.
The sample assets in examples/assets/ come from the Esoteric Software spine-runtimes repository, are covered by the same Spine license, and are excluded from the npm package. PixiJS is an unbundled peer dependency distributed under its MIT license.