Fun with PixiJs


PixiJs is a 2D Javascript graphics rendering library which utilises the power of WebGL. WebGL uses your devices graphics card which can be blazingly fast to render compared to your devices CPU. For browsers that currently do not support WebGL, Pixi falls back to the standard canvas (and therefore the CPU) which is good to go on pretty much every browser, including IE9 and above! Pixi is fast becoming my favourite Javascript library - it bring’s a smile to my face because it reminds me of how much fun Flash/AS3 was to write back in the day.

Pixi vs Flash

Pixi has some syntactic similarities with Actionscript; Classes named DisplayObject, MovieClip and Sprite for example, and how you append children to Pixi’s display list with addChild, addChildAt etc, and also down to how you apply filters to it’s display objects. Like a lot of Flash developers I wasn’t ready to give up on Flash, but this library certainly helps to move on. PixiJs is to Javascript what Starling was to Actionscript, which makes it perfect for 2D game developers to create fun, fast and great looking games and apps.

Wrap up

I knocked up a quick particle experiment using Pixi, which can also be seen on my home page. It’s a joy to work with so far, Macdonalds seem to love it as well!

Tagged with
pixi , Javascript , webgl