Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Spine v4.2 #549

Open
st0nerhat opened this issue May 10, 2024 · 2 comments
Open

Support for Spine v4.2 #549

st0nerhat opened this issue May 10, 2024 · 2 comments

Comments

@st0nerhat
Copy link

st0nerhat commented May 10, 2024

Spine v4.2 was officially released April 18, 2024

With the 4.1 loader we get:

Spine 4.1 loader cant load version 4.2.20. Please configure your pixi-spine bundle

With the uni loader we get:

Unsupported version of spine model 4.2.20, please update pixi-spine

@BernsteinA
Copy link

BernsteinA commented May 11, 2024

Hey @st0nerhat not sure if this will help you but fyi you can use the other package @esotericsoftware/spine-pixi instead.
Hope this saves you some time

import * as pixiSpine from "@esotericsoftware/spine-pixi";

(async ()=>{
  let imagesToLoad = require('./assets/spine/*.png');
  PIXI.Assets.addBundle('spineImages', imagesToLoad); // name of bundle doesn't matter
  await PIXI.Assets.loadBundle('spineImages');
  PIXI.Assets.add({alias: 'skeleton', src: require("./assets/spine/background.json")});
  PIXI.Assets.add({alias: 'atlas', src: require("./assets/spine/spine.atlas")});
  await PIXI.Assets.load(['skeleton', 'atlas']);
  const boy = pixiSpine.Spine.from('skeleton', 'atlas', {autoUpdate: true});

/* add to stage etc normal PIXI business */

})()

@st0nerhat
Copy link
Author

That’s a hot lead. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants