PixiJS and Fable
I have been working quite some time using PixiJS. So it was quite obvious for me to port PixiJS to Fable. I started in 2016 with PixiJS v3.x. And this year, with the help of the Fable community I ported the brand new v4.x.x APIs.
So how one is getting started with PixiJS on Fable? That’s very simple.
So for all your PixiJS based projects you can easily add the dependency using our beloved Paket tool:
Wrappers are great but we obviously need samples and proper documentation. Regarding the latter, I haven’t had enough time to start but it’s something that’s planned for 2018.
For instance, here’s the adaptation of the very first basic pixi sample for Fable
And even small gaming experiments like this one:
Fable Pixi Template!
Ah! And there’s a great new project to easily get started using Pixi and Fable. Thanks to the amazing work of Mike Janger.
So grab the template, start a new project, copy and paste some code from samples-pixi and have fun!
Animejs and Fable
There too, we’ve prepared bindings in the fable-import repository.
Now here’s my gift for you: Click here to see it in action!
Of course the source code is available for you. It’s fully documented. I’ve spent a lot of time tweaking things to easy up things. It’s a very small project involving PixiJS and AnimeJS yet it is complete: we’re using a preloader, we’re using layers, sprites, particles, a little Async based state machine to process events and a very easy to understand rendering state machine.
So there’s plenty of things to learn and who knows… You could easily tweak this project to build a complete game…
fsharp_advent_2017 - Fable based entry for fsharp advent calendar 2017
Last but not least
2017 has been a great #fsharp year for me with FableConf and all the projects I did using Fable.
It seems that, for very special reasons, 2018 will also be a great #fsharp #fable year too. Now that our pixi repo is ready I will try to work on the documentation part to make this much more practical for you and who knows… Maybe we’ll see great animations or games popping on twitter with the hashtag #fablepixi
I would like to thank the whole Fable and Fsharp community for their kind help.
And particularly Alfonso & Maxime for their patience, their messages full of kawaii emojis and their invaluable help on setting up the sample-pixi and fable-import repositories as well as NuGet packages.
Fsharp rocks! And don’t forget:
Fable: if it compiles it works.