Pixijs
-
Crash Course in PixiJS
Beginner
If you’ve been through the JavaScript crash course, you’ve got the language basics down. Now we need a way to actually draw things on screen. That’s where PixiJS comes in. Let’s look at what it is, why it’s a great fit for tile-based games, and how to get something on screen with just a few lines of code.
Why PixiJS?
Browsers have a built-in way to draw 2D graphics called the Canvas API. You can draw rectangles, images, and paths with it. It works fine for simple stuff, but it runs on the CPU — your computer’s main processor — and for games with lots of tiles updating every frame, that becomes slow pretty quickly.