Hello.
I want to check spine with base character in js environment. I took base example:
(I used latest versions: "pixi-spine": "4.0.4", "pixi.js": "7.4.0")
import * as PIXI from 'pixi.js';
import { Spine } from 'pixi-spine';
const app = new PIXI.Application();
document.body.appendChild(app.view);
PIXI.Assets.load("./assets/spineboy2/spineboy-pro.json").then((resource) => {
const animation = new Spine(resource.spineData);
app.stage.addChild(animation);
// add the animation to the scene and render...
app.stage.addChild(animation);
if (animation.state.hasAnimation('walk')) {
// run forever, little boy!
animation.state.setAnimation(0, 'walk', true);
// dont run too fast
animation.state.timeScale = 0.1;
// update yourself
animation.autoUpdate = true;
}
});
And something seemed to go wrong.