ikkleh Posted February 22, 2018 Share Posted February 22, 2018 Hello, I'm attempted to load a spine animation (v3.5.51) into the current version of pixie-spine (as it states that it's only compatible with Spine 3.5.x I'm not using the Pixi loader, instead I'm just passing in the loaded Spine JSON in the constructor. It's valid JSON with the bones/animation properties in there (so not a string etc) However, what I'm getting is a crash 'Cannot read property 'children' of undefined at new Skeleton': for (var i = 0; i < data.bones.length; i++) { var boneData = data.bones[i]; var bone = void 0; if (boneData.parent == null) bone = new core.Bone(boneData, this, null); else { var parent_1 = this.bones[boneData.parent.index]; bone = new core.Bone(boneData, this, parent_1); parent_1.children.push(bone); <-- ERROR/CRASH HERE } this.bones.push(bone); } The exported JSON is v3.5.51: "skeleton": { "hash": "m3kYx9f3hy1R9hSrlYyJs6o/0fk", "spine": "3.5.51", "width": 202.11, "height": 317.08, "images": "" }, Any ideas? Quote Link to comment Share on other sites More sharing options...
PsichiX Posted February 22, 2018 Share Posted February 22, 2018 please, provide whole exported JSON, not just it's part Quote Link to comment Share on other sites More sharing options...
ikkleh Posted February 22, 2018 Author Share Posted February 22, 2018 Attached Actually, I'm being a bit dumb as I haven't loaded the texture for the Spine animation at that point (which I suppose wouldn't help) ... however, if you could take a look to see if there are any issues before I do that, that would be great test.atlas Quote Link to comment Share on other sites More sharing options...
ikkleh Posted February 22, 2018 Author Share Posted February 22, 2018 Ignore my requests, I hadn't followed the instructions correctly. For anyone else who has this issue, you need to follow these instructions if you're loading the atlas, JSON and texture outside of the Pixi Loader: https://github.com/pixijs/pixi-spine/blob/master/examples/preloaded_json.md Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.