jdnichollsc Posted January 12, 2015 Share Posted January 12, 2015 ¿Anyone know how I can create an addon for exporting Blender animations 2D to Phaser? Regards, Nicholls Link to comment Share on other sites More sharing options...
PixelPicoSean Posted January 12, 2015 Share Posted January 12, 2015 So you have an addon that exports Blender animations to Phaser? It shouldn't be too hard, but I don't know much about Blender Python API, you'd better ask Blender forums for help. Link to comment Share on other sites More sharing options...
jdnichollsc Posted January 12, 2015 Author Share Posted January 12, 2015 but to build it first needs to know how to do an animation from a json... How could I do this with Phaser? I think it is to make a timeline as the following example: http://flashvhtml.com/ PD: I need ideas please to do it Regards, Nicholls Link to comment Share on other sites More sharing options...
Daniel Belohlavek Posted January 12, 2015 Share Posted January 12, 2015 Please check this Phaser example "Local json Object": http://examples.phaser.io/_site/view_full.html?d=animation&f=local+json+object.js&t=local%20json%20object Anyhow, I've seen a video *somewhere* where they show how to use Spine animation to animate a logo. PIXI (Phaser's renderer) seems to support Spine animations: http://docs.phaser.io/PIXI.Spine.html Also, there is Dragonbones which is similar to Spine but exports animations from Flash instead: http://examples.phaser.io/_site/view_full.html?d=animation&f=dragonBones.js&t=dragonBones Both these tools should allow you to have a timeline just like you asked in your other post. Hope it helps! EDIT: Forgot about Blender. The easiest way to export Blender animations is frame by frame. This technique is used a lot in isometric games such as those powered by Flare Engine, jdnichollsc 1 Link to comment Share on other sites More sharing options...
jdnichollsc Posted January 12, 2015 Author Share Posted January 12, 2015 Hi Belohlavek, thanks for your answer! I'm sorry, I wasn't clear with the idea. I mean a timeline for rotation, translation and scaling for objects such as http://flashvhtml.com/ (advance in the timeline when you scroll down the page) Regards, Nicholls Link to comment Share on other sites More sharing options...
Daniel Belohlavek Posted January 12, 2015 Share Posted January 12, 2015 Ok, I have never done something like that before, but I'm going to give you a couple of good news:That site uses PIXI and Tweens. Phaser uses PIXI and supports tweens.The source code is easy to beautify but it will take time to understand it completely.Can it be done? Yes. But (as you realized) it would be a pain in the ass to do manually. I doubt there are any blender plugins out there, so I guess your options are to try and export an animation from Flash (or) to try and export an animation from Edge Animate (or) to try and figure out how to port FlashVHtml's system to Phaser. I've seen other sites that do similar stuff in pure HTML5/CSS3 with DOM manipulation. You could check out that alternative too. I think Edge Animate is the best HTML5 alternative out there. Good luck and sorry I couldn't be of any help! Link to comment Share on other sites More sharing options...
PixelPicoSean Posted January 13, 2015 Share Posted January 13, 2015 Phaser now has a powerful tween animation engine which support timeline, you can load JSON animation data and generate tweens for use. You have to design your own JSON data format and write a plugin to export animations out. Good luck with that. jdnichollsc 1 Link to comment Share on other sites More sharing options...
Recommended Posts