Skip to content
AI & Agents
Skill

/pixijs

PixiJS v8 (pixi.js) reference. Use it before writing, fixing or porting any PixiJS code, from a one-line fix to a whole app or game. Routes to topic files: Application (app.init, resizeTo, resolution), Container scene graph (addChild, zIndex, RenderLayer, mask, destroy), Sprite,

From plugin
pixijs-skills
3722 skills

Claude Code

$ npx -y skills add pixijs/pixijs-skills --skill pixijs --agent claude-code

SKILL.md

pixijs.SKILL.md
name: pixijs
description: "PixiJS v8 (pixi.js) reference. Use it before writing, fixing or porting any PixiJS code, from a one-line fix to a whole app or game. Routes to topic files: Application (app.init, resizeTo, resolution), Container scene graph (addChild, zIndex, RenderLayer, mask, destroy), Sprite, Texture, AnimatedSprite, TilingSprite, NineSliceSprite, Graphics (fill, stroke, FillGradient, SVG, SmoothGraphics), Text, BitmapText, HTMLText, SplitText, Mesh, MeshRope, ParticleContainer, Assets (load, bundles, Spritesheet, fonts, video), Ticker and onRender, events (eventMode, pointertap, drag, hitArea), filters and shaders (BlurFilter, Filter.from, GlProgram), blendMode and erasing into a RenderTexture, generateTexture, cacheAsTexture, Color, Point, Matrix, DOMContainer, GifSprite, HTMLSource, accessibility, performance and teardown, WebGL/WebGPU/Canvas renderers, Web Workers, custom builds, project setup, migration from v7."
license: MIT

Read before you write

1. **List the files.** Write down every router row below that your task touches: each class you construct, options object you pass, effect you build and symptom you fix. A whole app usually lists four to eight (an eraser paint app: application, assets, scene-sprite, events, blend-modes; a game: application, assets, scene-sprite, events, ticker, scene-text). 2. **Read each listed file before you write the code for that part**, even for a one-line change. Open the file itself; a Grep hit is a fragment that drops the rule and the exception beside it. Each topic file links to its sub-pages for rarer branches. 3. **Done when every file on your list has been opened.** Then check your code against the pitfall group below for each feature you built.

No row fits: scan [references/index.md](references/index.md) (sub-pages, long-tail keywords, error strings), then the project's local PixiJS docs.

For a signature or option this skill doesn't cover, fetch the class's API page: `https://pixijs.download/release/docs/<module>.<Class>.html.md` (`app.Application`, `scene.Graphics`, `rendering.Texture`, `assets.Assets`). To find a class's module, look it up in `https://pixijs.download/release/docs/llms.txt`.

Pitfalls that fail silently

Each line is the fix; its link owns the rule and the code. These run without errors and draw the wrong thing, and a Vite build doesn't type-check, so run `npx tsc --noEmit` to catch wrong option names.

**App setup and the frame loop**

  • `const app = new Application(); await app.init({ ... })`. Constructor options are ignored; until `init` resolves `app.renderer` is `undefined` and `app.canvas`/`app.screen` throw. [application](references/application.md#lifecycle-construct-init-render-destroy)
  • Top-level `await` fails `vite build` on Vite 6 and older; wrap init in an async IIFE. [create](references/create.md#top-level-await-appinit-in-vite-production-builds)
  • With `resizeTo`, lay out in `app.renderer.on('resize', (w, h) => ...)`; your own `window` resize listener reads the old `app.screen`. An element target also needs `new ResizeObserver(() => app.queueResize())`. [application](references/application.md#resizeplugin)
  • Ticker callbacks receive the `Ticker`: `app.ticker.add((t) => (s.x += 2 * t.deltaTime))`. `deltaTime` is ~1 per 60 fps frame, `deltaMS` is milliseconds. [ticker](references/ticker.md#time-units)
  • `app.ticker.update()` already renders, even with `autoStart: false`; skip the extra `app.render()`. [ticker](references/ticker.md#app-lifecycle-and-manual-rendering)
  • Per-object frame logic: `obj.onRender = () => { ... }` (replaces v7 `updateTransform` overrides); it also runs while the object is invisible. Name subclass methods anything but `_onRender`. [ticker](references/ticker.md#per-object-onrender-hook)
  • Read canvas pixels from a listener at `UPDATE_PRIORITY.UTILITY`, which runs after the render. [ticker](references/ticker.md#frame-order)

**Loading assets and textures**

  • `await Assets.init({ basePath, manifest })` before the first `load`, `loadBundle` or `backgroundLoad`; a later `init` is dropped. [assets](references/assets.md#init-order)
  • `Assets.load([a, b])` resolves an object keyed by URL or alias: read `res[a]`. [assets](references/assets.md#load-results-and-keys)
  • A URL with no file extension (`?id=`, `blob:`, API route) needs `Assets.load({ src, parser: 'texture' })`; without it the result is `null` with only a warning. Audio files have no loader and also resolve `null`; play sound with `@pixi/sound` or `HTMLAudioElement`. [assets](references/assets.md#forcing-a-parser-with-parser)
  • `Texture.from(url)` and `Sprite.from(url)` read the cache only (v7 fetched): `await Assets.load(url)` first. [scene-sprite](references/scene-sprite.md#loading-before-creating)
  • Wrap a `TextureSource` (`CanvasSource`, `texture.source`): `Sprite.from(source)` or `new Sprite(Texture.from(source))`; `new Sprite(source)` draws nothing. [scene-sprite](references/scene-sprite.md#loading-before-creating)
  • Show another region with `sprite.texture = new Texture({ source, frame: new Rectangle(...) })`, or create the texture with `dynamic: true` and call `texture.update()`. [scene-sprite](references/scene-sprite.md#sub-textures-and-frames)
  • After drawing into a source canvas, call `texture.source.update()`. [sprite](references/scene-sprite/sprite.md#canvas-and-video-textures)
  • Per-asset `data` (`scaleMode`, `resolution`) applies on the first load of a `src` only; set `texture.source.scaleMode` on the result instead. [assets](references/assets.md#data-per-asset)

**Sprites and animation**

  • `AnimatedSprite`: `animationSpeed` is frames per 60 fps tick (12 fps is `0.2`), and it needs `autoPlay: true` or `play()`. It runs on `Ticker.shared`, so `app.ticker.stop()` doesn't pause it. [animated-sprite](references/scene-sprite/animated-sprite.md#options)
  • Call `play()` after each `anim.textures = ...` swap; replay a finished one-shot with `gotoAndPlay(0)`. [animated-sprite](references/scene-sprite/a
Read more
@pixijs
Ships withpixijs-skills

Official AI skills for PixiJS. These skills teach AI coding agents how to correctly use PixiJS

Stars on GitHub

Momentum

stars in total
372
Star history of pixijs/pixijs-skills on GitHub, a chart by star-history.com

Other skills on pixijs-skills.

pixijs-3d

pixijs-3d

Use this skill whenever writing or editing code that uses PixiJS 3D (@pixi/3d): scenes, View3D, Mesh3D, Model3D, lights, shadows,…

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw2w393k
@openclaw@openclawInstall Skill

Questions about pixijs.

Which coding agents can use pixijs?
pixijs installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.