PixiJS
~150kb min / ~45kb gzippedThe fastest 2D WebGL renderer for the web.
See It in Action
Colorful shapes bouncing around the canvas — shows basic PixiJS graphics, containers, and the animation ticker.
What is PixiJS?
PixiJS is the fastest 2D rendering engine for the web. It uses WebGL to hardware-accelerate 2D graphics, delivering performance that raw Canvas 2D can't match — while providing a clean, expressive API for sprites, text, graphics, and filters.
Used by companies like Google, Disney, and BBC, PixiJS powers everything from games to data visualizations to interactive ads. It handles sprite batching, texture management, and WebGL state automatically, so you focus on what to draw rather than how to draw it efficiently. V8 is the latest major version with a modernized API.
When to Use PixiJS
How PixiJS Compares
PixiJS is for 2D, Three.js is for 3D. PixiJS renders 2D sprites much faster than Three.js can. Choose based on dimension.
PixiJS uses WebGL for hardware acceleration, making it orders of magnitude faster for complex scenes. Use raw Canvas 2D only for simple drawing.
Phaser is a game framework built on PixiJS (v2) / its own renderer. PixiJS is just a renderer — lighter and more flexible. Choose Phaser for games with physics/audio needs.
Get Started with PixiJS
npm install pixi.js
yarn add pixi.js
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/pixi.min.js"></script>
import { Application, Graphics, Text } from "pixi.js";
const app = new Application();
await app.init({ width: 640, height: 480, background: "#1a1a2e" });
document.body.appendChild(app.canvas);
// Draw a circle
const circle = new Graphics()
.circle(320, 240, 50)
.fill({ color: 0x4ecdc4 });
app.stage.addChild(circle);
// Add text
const text = new Text({ text: "Hello PixiJS!", style: { fill: "#ffffff", fontSize: 24 } });
text.anchor.set(0.5);
text.position.set(320, 340);
app.stage.addChild(text);
// Animate
app.ticker.add((delta) => {
circle.rotation += 0.01 * delta.deltaTime;
});