Skip to main content

GET GOING

Scaffold a project in seconds.

npm create pixi.js@latest

or add it to an app: npm install pixi.js

TAKE THE TOUR

See it running.

Each tab runs live beside the code that draws it.

main.tspixi.js
import { Assets, Sprite } from 'pixi.js';


const texture = await Assets.load('bunny.png');


// one texture, so every bunny shares a batch
const bunnies = Array.from({ length: 300 }, () =>
  app.stage.addChild(new Sprite(texture)),
);


app.ticker.add(({ lastTime }) => {
  bunnies.forEach((bunny, i) => {
    const hop = Math.sin(lastTime / 300 + i);


    bunny.x = (i * 37) % app.screen.width;
    bunny.y = 400 - Math.abs(hop) * 300;
  });
});

Click to add 200 bunnies.Tap to add 200 bunnies.

FEATURES

The whole 2D toolbox.

  • Meshes & shaders

    MeshRope, MeshPlane, PerspectiveMesh or geometry of your own, with shaders in GLSL and WGSL.

  • Sprites

    Sprite, AnimatedSprite for frame animation, TilingSprite for repeating patterns and NineSliceSprite for panels that scale.

  • Graphics

    Shapes, curves, holes, gradients and texture fills on the GPU. Import and export SVG.

  • Filters & blend modes

    Blur, colour matrix, displacement and noise are built in, with nearly 40 more in pixi-filters. Blend modes include screen, overlay and luminosity.

  • Text

    Text for rich styles, BitmapText for speed, HTMLText for markup and SplitText to animate each letter.

  • Masks & render textures

    Mask with a sprite, a shape or a colour channel. Render any container into a texture, or cache it as one.

  • Events & accessibility

    Pointer events that bubble like the DOM, with hit areas and cursors. Screen reader support is built in.

  • Assets

    Assets loads textures, spritesheets, fonts, SVG, video and compressed textures, one by one or in bundles.

  • WebGPU or WebGL

    Ask for WebGPU and PixiJS falls back to WebGL where it isn't there. An experimental Canvas renderer covers the rest.

PERFORMANCE

A million particles at 60 fps.

  • 1,000,000particles at 60 fps in one ParticleContainer
  • 200,000sprites at 60 fps in a plain Container
  • 0.12msof CPU a frame for 100,000 sprites at rest

Your first sprite is a minute away.

Scaffold a project, load a texture and add it to the stage.