What it is
PixiJS is an open-source 2D rendering library for the web, described in its README as the HTML5 Creation Engine. It ships WebGL and WebGPU renderers and is written in TypeScript, distributed under the MIT license from the pixijs/pixijs repository, which has been developed for fourteen years and holds roughly 48,000 stars across about 5,000 forks. The project lives in the JavaScript and TypeScript ecosystem: it is installed through npm and driven from browser code, with GLSL shaders, canvas, canvas2d, and rendering-engine listed among its topics. Its homepage is pixijs.com, and the repository carries the Data and Analytics / Business Intelligence and Reporting category alongside tags such as game, data-visualization, and rendering-2d-graphics.
The concrete problem it solves is drawing large amounts of interactive 2D content in a browser at speed. Instead of hand-writing canvas or raw WebGL calls, a developer writes a scene graph of sprites, text, and primitives, and PixiJS handles the draw calls through its WebGL or WebGPU backend. It combines the asset loader, dynamic textures, masking, filters, blend modes, and full mouse and multi-touch input into one API, so a project does not need to stitch together separate libraries for loading images, animating them, and reacting to pointer events. Ticker-driven updates keep motion frame-independent, which matters for games, visualizations, and other continuously animating interfaces.
Key capabilities
- WebGL and WebGPU renderers selectable as the drawing backend.
- Application class with initialization options such as background color and resize-to-window behavior.
- Assets loader that fetches textures, as shown loading a bunny.png texture by URL.
- Sprite class with anchor, position, and rotation properties for scene-graph placement.
- Ticker for animation updates, exposing deltaTime so transformations stay frame-independent.
- Text rendering, described as flexible, plus primitive and SVG drawing.
- Masking, filters, advanced blend modes, and dynamic textures.
Who uses it and how
- Browser games built on the sprite, ticker, and input features, consistent with the game topic.
- Data visualizations that render many elements per frame, consistent with the data-visualization topic.
- Cross-platform web applications that need graphics to run across all devices, as the README states.
- Interactive graphic experiences that combine asset loading, filters, and masking on top of a canvas element appended to the document body.
- Projects bundling the library through npm into an existing frontend rather than starting from a fresh scaffold.
Getting started
For a new project, run npm create pixi.js@latest to use the PixiJS Create CLI; to add it to an existing project, run npm install pixi.js. The README then imports Application, Assets, and Sprite from pixi.js, initializes the application, appends app.canvas to the document
project readme (upstream, from github) — read inline
Guides | Tutorials | Examples | API Docs | Discord | Bluesky | 𝕏
PixiJS ⚡️
Next-Generation, Fastest HTML5 Creation Engine for the Web
- 🚀 WebGL & WebGPU Renderers
- ⚡️ Unmatched Performance & Speed
- 🎨 Easy to use, yet powerful API
- 📦 Asset Loader
- ✋ Full Mouse & Multi-touch Support
- ✍️ Flexible Text Rendering
- 📐 Versatile Primitive and SVG Drawing
- 🖼️ Dynamic Textures
- 🎭 Masking
- 🪄 Powerful Filters
- 🌈 Advanced Blend Modes
PixiJS is the fastest, most lightweight 2D library available for the web, working
across all devices and allowing you to create rich, interactive graphics and cross-platform applications using WebGL and WebGPU.
Setup
It's easy to get started with PixiJS! Just use our PixiJS Create CLI and get set up in just one command:
npm create pixi.js@latest
or to add it to an existing project:
npm install pixi.js
Usage
import { Application, Assets, Sprite } from 'pixi.js';
(async () =>
{
// Create a new application
const app = new Application();
// Initialize the application
await app.init({ background: '#1099bb', resizeTo: window });
// Append the application canvas to the document body
document.body.appendChild(app.canvas);
// Load the bunny texture
const texture = await Assets.load('https://pixijs.com/assets/bunny.png');
// Create a bunny Sprite
const bunny = new Sprite(texture);
// Center the sprite's anchor point
bunny.anchor.set(0.5);
// Move the sprite to the center of the screen
bunny.x = app.screen.width / 2;
bunny.y = app.screen.height / 2;
app.stage.addChild(bunny);
// Listen for animate update
app.ticker.add((time) =>
{
// Just for fun, let's rotate mr rabbit a little.
// * Delta is 1 if running at 100% performance *
// * Creates frame-independent transformation *
bunny.rotation += 0.1 * time.deltaTime;
});
})();
Contribute
Want to be part of the PixiJS project? Great! All are welcome! We will get there quicker
together :) Whether you find a bug, have a great feature request, or you fancy owning a task
from the road map above, feel free to get in touch.
Make sure to read the Contributing Guide
before submitting changes.
License
This content is released under the MIT License.
Change Log
Releases
Support
We're passionate about making PixiJS the best graphics library possible. Our dedication comes from our love for the project and community. If you'd like to support our efforts, please consider contributing to our open collective.