<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged pixijs</title>
<link>https://coderlegion.com/tag/pixijs</link>
<description>Powered by Question2Answer</description>
<item>
<title>Why PixiJS Is A Renderer And Not A Game Engine</title>
<link>https://coderlegion.com/26261/why-pixijs-is-a-renderer-and-not-a-game-engine</link>
<description>&lt;p&gt;A lot of the web game questions that land on here come down to picking a library before working out what kind of problem you actually have. This one catches people often enough that it is worth writing down for anyone about to start a browser game.&lt;/p&gt;
&lt;p&gt;PixiJS does exactly one job: it draws 2D to a canvas, through WebGL, WebGPU, or Canvas 2D as a fallback, and it does that faster than almost anything else on the web. It manages a scene graph of display objects, sprites, text, graphics primitives and containers in a parent and child hierarchy, and renders that whole tree every frame.&lt;/p&gt;
&lt;p&gt;What it does not ship is everything a framework bundles around a renderer. No physics engine, no scene manager in the game sense, no input abstraction, no audio system, no asset pipeline past texture loading, no editor. Those are not gaps. They are the reason it is fast.&lt;/p&gt;
&lt;h3 id=&quot;the-v8-trap&quot;&gt;The v8 trap&lt;/h3&gt;
&lt;p&gt;v8 was a rewrite rather than a version bump. The renderer was restructured, WebGPU became a first class backend alongside WebGL, and a fair amount of the older API surface moved. The practical effect is that much of the PixiJS material online is now quietly wrong. Guides written against v6 or v7 read correct and then fail in ways that look like your mistake rather than a version mismatch. Check the target version on anything you follow, before you follow it.&lt;/p&gt;
&lt;h3 id=&quot;where-the-performance-actually-goes&quot;&gt;Where the performance actually goes&lt;/h3&gt;
&lt;p&gt;Optimization in Pixi almost always reduces to two things: how many draw calls you are issuing, and whether your textures live in atlases so they can batch. Objects sharing a texture batch into a single call. The library is fast by default and the ways to make it slow are specific and learnable.&lt;/p&gt;
&lt;h3 id=&quot;the-actual-decision&quot;&gt;The actual decision&lt;/h3&gt;
&lt;p&gt;Reach for PixiJS when rendering is the hard part and structure is not. A card game, a board game, a large 2D map, a data heavy interactive. Reach for a full framework like Phaser when you need physics, scenes, input and audio and would rather not assemble them yourself. Phaser used Pixi internally for years, so this is less a rivalry than a question of where you want the boundary between what you are handed and what you build.&lt;/p&gt;
&lt;p&gt;The longer version is in this &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.abratabia.com/pixijs/&quot;&gt;full guide to PixiJS game development&lt;/a&gt;, which covers the v8 architecture, the scene graph, animation and input, filters and shaders, the optimization work, and the comparison against full frameworks.&lt;/p&gt;
&lt;p&gt;If you can describe your game as a rendering problem, use the renderer. If you cannot, use the framework.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/26261/why-pixijs-is-a-renderer-and-not-a-game-engine</guid>
<pubDate>Sat, 05 Sep 2026 13:22:38 +0000</pubDate>
</item>
<item>
<title>How I Brought My Illustrations to Life with PixiJS: Parallax, Particles, and Sound in the Browser</title>
<link>https://coderlegion.com/25133/how-brought-my-illustrations-to-life-with-pixijs-parallax-particles-and-sound-the-browser</link>
<description>&lt;h2 id=&quot;how-i-brought-my-illustrations-to-life-with-pixijs-parallax-particles-and-sound-in-the-browser&quot;&gt;How I Brought My Illustrations to Life with PixiJS: Parallax, Particles, and Sound in the Browser&lt;/h2&gt;
&lt;p&gt;I'm a book illustrator by trade. In 2012 I drew a piece called &lt;em&gt;After Picasso&lt;/em&gt; — and at some point I realized a static image wasn't the end of the story for me. A side experiment with WebGL grew into a series I call &lt;strong&gt;Living Illustrations&lt;/strong&gt;: finished illustrations, reopened — this time with depth, wind, and time inside them.&lt;/p&gt;
&lt;h3 id=&quot;what-is-a-living-illustration-&quot;&gt;What is a &quot;living illustration&quot;?&lt;/h3&gt;
&lt;p&gt;Not a video, not a GIF. It's an interactive scene that responds to the visitor:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mouse movement (or touch) drives the parallax&lt;/li&gt;
&lt;li&gt;The scene has &quot;sleep&quot; and &quot;awake&quot; states&lt;/li&gt;
&lt;li&gt;Audio only starts on a user gesture — which conveniently sidesteps browser autoplay policies&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;anatomy-of-a-scene-dissecting-after-picasso-&quot;&gt;Anatomy of a scene: dissecting &quot;After Picasso&quot;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Layers.&lt;/strong&gt; The illustration is cut into 6 PNG layers — background, midground, shadow, body, hand, foreground — each with its own &lt;code&gt;zIndex&lt;/code&gt; and parallax coefficient, from &lt;code&gt;0.02&lt;/code&gt; (background) to &lt;code&gt;0.12&lt;/code&gt; (foreground). The closer the layer, the harder it reacts to the cursor. That coefficient gradient is what sells the depth.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Breathing.&lt;/strong&gt; The body and hand layers slowly scale and shift on a sine curve, so the character appears to breathe. Cheap to compute, surprisingly effective.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The bird.&lt;/strong&gt; Three flight frames, orbiting a point at &lt;code&gt;(750, 420)&lt;/code&gt; with a ~500 px radius.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Particles.&lt;/strong&gt; Up to 150 dust particles, color-locked to whichever zone of the artwork they rise from.&lt;/p&gt;
&lt;h3 id=&quot;twelve-years-later-pilot-2024-&quot;&gt;Twelve years later: &quot;Pilot&quot; (2024)&lt;/h3&gt;
&lt;p&gt;Same idea, different league:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The campfire is a sprite sheet (8×4 frames) driven by a full state machine: &lt;code&gt;sleep → invite → awake → active → peak → fade&lt;/code&gt;, with spark bursts in the active phase&lt;/li&gt;
&lt;li&gt;8 parallax layers, including two moons at different depths&lt;/li&gt;
&lt;li&gt;A soundscape: campfire, dusk in the woods, wind&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;the-stack&quot;&gt;The stack&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PixiJS (WebGL)&lt;/strong&gt; for rendering — with a static-image fallback when WebGL isn't available&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vite&lt;/strong&gt; for the build (hashed assets)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Howler / Tone.js&lt;/strong&gt; for audio&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A custom shader&lt;/strong&gt; with subtle noise (&lt;code&gt;uNoiseIntensity: 0.01&lt;/code&gt;) and chromatic aberration, so the scene feels alive even when nothing is moving&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;what-this-taught-me-as-an-artist&quot;&gt;What this taught me as an artist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Draw in layers from day one.&lt;/strong&gt; If you might animate an illustration later, separate it into planes while drawing, not after.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance is part of the composition.&lt;/strong&gt; 150 particles isn't arbitrary — it's a budget.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Side projects with no deadlines are the best way to learn a new tool.&lt;/strong&gt; This whole series started as an experiment that refused to stay small.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Fun fact: the section is deliberately hidden from search engines (&lt;code&gt;noindex&lt;/code&gt;) and removed from my site's navigation — a private lab I've decided to open up a little.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Try the scenes yourself:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://vimark.art/living-illustrations.html&quot;&gt;vimark.art/living-illustrations&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/25133/how-brought-my-illustrations-to-life-with-pixijs-parallax-particles-and-sound-the-browser</guid>
<pubDate>Sat, 22 Aug 2026 10:55:09 +0000</pubDate>
</item>
</channel>
</rss>