Open Richacinas opened 7 years ago
Use different tracks. 0 is the number of track, just use 1 for second animation and it'll be ok ;)
Do I need to use spine runtimes at all?
What do you mean? pixi-spine is runtime integrated with pixi. You can look at https://github.com/pixijs/pixi-spine/tree/master/examples to understand how to use it
I can't find on those examples a way to add animations to different tracks.. is the first parameter of addAnimationByName the track where we want to add it?
yep
var otto = new PIXI.spine.Spine(res.otto.spineData);
otto.state.setAnimation(0, 'speak', true);
otto.state.setAnimation(1, 'moveHair', true);
Thanks a lot 👍 I'll test it and let you know!
It could be a problem with some of my animations exported from DragonBones... When I try speak animation alone, the mouth disappears, and I don't know why. I have to debug that and then when it works alone I'm sure that they will work together the way you say!
If you have any idea about why some sprites could disappear when you animate them, please let me know.
Cheers,
Ricardo
It'll be a problem, I have to dig out OLD version of pixi-spine for spine3.2, because dragonbones cant export properly.
I'm using the latest versions of pixi, pixi-spine and DragonBones
What about https://github.com/DragonBones/DragonBonesJS , does that work?
It was my first option, however I have no idea how to play multiple animations simultaneously using that library either...
I am facing a Similar requirement for my project, I need to play 2 animations but they are exported as separate json. Can i load multiple Json(spine) on to a single pixi spine object ?. How can merge and play the animation from 2 or 3 Json ? any pointers or help is much appreciated. Thanks in advance @ivanpopelyshev popelyshev please help
@bharathasdev I know that its possible and its not that difficult if you read how AnimationState and animation json data are created. How much time did you spent on it? I'm currently very limited in my words because of vacation :)
Something like "I've spent 3 hours and understood X Y Z but so far no answer for playing multiple animations", then I'll look into it.
Hi Ivan Popelyshev,
Thank you vvery much for replying during your vactaion.
I am new to Pixi and new to Spine. I have spent couple of hours but that for letting me it is achievable. I will dig deeper to make ti work.
I was confused whether it is achievable or do i need to ask graphic artist to expost all the animations into one json. I will start exploring more.
Thanks,
On Wed, May 1, 2019 at 3:14 PM Ivan Popelyshev notifications@github.com wrote:
@bharathasdev https://github.com/bharathasdev I know that its possible and its not that difficult if you read how AnimationState and animation json data are created. How many times did you spent on it? I'm currently very limited in my words because of vacation :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pixijs/pixi-spine/issues/178#issuecomment-488293387, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPR6AHSWE435KZMBLNYOGLPTGQUBANCNFSM4DP5YVQQ .
Hello there,
I have been searching and testing a lot, and not being able to play, let's say, two animations together.
I read somewhere that spine-runtime is what we needed in order to manage the states and add animations from our JSON than can animate different parts at the same time, however, it is not working.
Here is some code:
What is happening is that it is not playing any of our animations at all. If we just call setAnimation with passing either of them, it does work.
This is the library we are loading so we wet that window.spine object:
https://github.com/EsotericSoftware/spine-runtimes/blob/spine-js/spine-js/spine.js
Any ideas how to play more than one animation at the same time?
Thanks a lot