Skip to content

About

Spine 4.3 runtime for PixiJS 6.5 with animation, skins, physics, asset loading, and dark tint support.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

spine-pixi-v6

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.

Compatibility

  • 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.

Install

npm install spine-pixi-v6 pixi.js@6.5

Use

import { 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.

Examples

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.

PixiJS 6 differences

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, and inspectAssets replace the PixiJS 7 asset pipeline.
  • applySkins and resolveSkins provide atomic and combined skin changes.
  • Spine.unloadFromCache and spine.unloadFromCache() remove parsed skeleton data from the runtime cache.
  • ESM imports pixi.js; IIFE uses the global PIXI object.
  • 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.

Development

npm ci
npm test

npm 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.

License

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.

About

Spine 4.3 runtime for PixiJS 6.5 with animation, skins, physics, asset loading, and dark tint support.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages