Keysim Posted May 17, 2016 Share Posted May 17, 2016 Hi, I'm a beginner with phaser, and I like using spine for my animations. The problem is that I can't find a good tutorial or anything interesting where I can easly understand and configure it. 1st question : Can I load Skeleton Animations of spine into Phaser ? If yes, is there anyone who can explain it clearly to me ? 2nd : I clone phaser lib into Cloud9 (c9.io) but I don't know how to generate the javascript .min.. (I saw that there was a pixi lib for loading spine animations but I don't know how to use it...) 3nd : However, if there is no solutions for the skeleton animation, I tried exporting usual spritesheet with Spine, BUT... Spine export a .atlas file for the positions of the frames, NOT json or xml, the problem is that Phaser don't support it... Is there a solution ? I have a spritesheet with many animations, the json would be very usefull so I don't have to type every positions of sprites in phaser... Thank you guys ! Keysim. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 17, 2016 Share Posted May 17, 2016 Hello, Keysim! Phaser uses pixi-v2, spine plugin was embedded in it. It is out-of-date, so dont be surprised if your exported Spine animation wont work there. Lazer has no support of pixi.js. There's no version of Phaser that works with pixi-v3 or pixi-v4, because @rich decided to drop it. You can try to port https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-js on phaser. As for API, it is the same for all spine runtimes: pixi, phaser, libgdx, pure js. Example of using it with pixi: http://pixijs.github.io/examples/index.html?s=spine&f=spineboy.js&title=Walking%20Animation&plugins=pixi-spine&v=dev Up-to-date pixi-spine plugin: https://github.com/pixijs/pixi-spine API overview: http://esotericsoftware.com/spine-using-runtimes Keysim 1 Quote Link to comment Share on other sites More sharing options...
rich Posted May 17, 2016 Share Posted May 17, 2016 There are various Phaser Spine plugins out there, here's a recent one: https://github.com/orange-games/phaser-spine and a slightly older one: https://github.com/StudioKrok/PhaserSpine There are also a number of Spriter plugins too, such as this one: http://phaser.io/news/2016/03/spriter-player We don't use the Pixi v2 Spine plugin because they abandoned it a long time ago. There is a build of Phaser that uses Pixi v3 internally, if you want to try it. It's unsupported, but you can find the branch in our repo. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 17, 2016 Share Posted May 17, 2016 @rich Yay! Its good that there is phaser plugin for spine. Though it is not updated to spine v3 yet. Btw, I wanted to make a build of phaser with pixi-v4, but i didnt have enough free time yet Quote Link to comment Share on other sites More sharing options...
rich Posted May 17, 2016 Share Posted May 17, 2016 Join the club! Quote Link to comment Share on other sites More sharing options...
Keysim Posted May 17, 2016 Author Share Posted May 17, 2016 (edited) Hi again, thank you for responding so quickly. So... I'm not really sure what's the best way, what do you recommend to do ? This ? http://pixijs.github.io/examples/index.html?s=spine&f=spineboy.js&title=Walking%20Animation&plugins=pixi-spine&v=dev Or orange-games/phaser-spine ? I just try it. It seems very good ! But, will I be able to do the hit boxes / and physical stuff of Phaser with it ? Do you maybe recommend something else than phaser in js that will work better with Spine animations maybe ? I buy Spine unfortunately... Edited May 17, 2016 by Keysim correcting Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 17, 2016 Share Posted May 17, 2016 Spine is one of the best tools for animations, its much better than Spriter. I suggest you to go orange-games repo and create an issue there, I really dont know much about them, except that I saw the code and it wasnt updated to spine v3 yet. Keysim 1 Quote Link to comment Share on other sites More sharing options...
Keysim Posted May 18, 2016 Author Share Posted May 18, 2016 13 hours ago, ivan.popelyshev said: Spine is one of the best tools for animations, its much better than Spriter. I suggest you to go orange-games repo and create an issue there, I really dont know much about them, except that I saw the code and it wasnt updated to spine v3 yet. Thank you very much ! I hope I will find a way. Quote Link to comment Share on other sites More sharing options...
Keysim Posted May 18, 2016 Author Share Posted May 18, 2016 Hi again, Can someone try https://github.com/orange-games/phaser-spine with me so he can maybe explain how to apply gravity and physics to the Spine Object ? Everything is in the git, under the example folder. You just need to do a "npm update" to download de phaser js. Thanks a lot. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 18, 2016 Share Posted May 18, 2016 @rich Can you please move this topic to phaser section? 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.