Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Build a PixiJS v8 render layer: create the async Application, load textures with Assets, compose the scene graph with Container and Sprite, drive the ticker loop, wire pointer events, and group draws with render groups. Use when building or debugging PixiJS v8 — when the user mentions PixiJS, Pixi, Application, app.stage, Container, Sprite, Assets.load, app.ticker, or eventMode. Pins the v8 async init() API.
.claude/skills/gamedev-skills-pixijs-rendering/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-21 | ✓→✓ | = Same ✓ | 82% | 0% |
| case-20 | ✓→✓ | = Same ✓ | 65% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 99% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 144% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 103% | 0% |
Set up and structure a PixiJS 8.19 application: the async Application, asset loading via Assets, the Container/Sprite scene graph, the ticker loop, pointer events, and render groups. Pins the 8.19 API (async init, unified Assets, eventMode).
display list, loading textures, animating via the ticker, or handling pointer input.
package.json depends on pixi.js (v8) and code doesimport { Application } from 'pixi.js'.
When not to use: Phaser's scene/loader model → phaser-core. 3D scenes → threejs-scene-setup. PixiJS v7-and-earlier code (synchronous new Application({...}), Loader, interactive = true) needs the v8 migration first; this skill targets v8 only.
await the Application. In v8, new Application() is empty;configuration happens in await app.init({...}). Append app.canvas (not app.view) to the DOM. Wrap top-level await in an async function for bundlers.
Assets. await Assets.load(url) returns a Texture. Formany assets, register a manifest/bundle and load by name. There is no v7 Loader.
app.stage (a Container).Group related objects in Containers; child transforms are relative to the parent. Draw order = insertion order (later = on top).
app.ticker.add((ticker) => {...}). Scale motion byticker.deltaTime (frames, ~1 at 60fps) or ticker.deltaMS (milliseconds) so speed is frame-rate independent.
eventMode = 'static' (or 'dynamic'),then obj.on('pointerdown', ...). Federated pointer events cover mouse/touch/pen.
isRenderGroup: true) so theGPU caches their transforms. Profile before and after; confirm pixels on screen.
jsimport { Application, Assets, Sprite } from 'pixi.js'; (async () => { // v8: construct empty, then await init(). Config does NOT go in the constructor. const app = new Application(); await app.init({ background: '#1099bb', resizeTo: window, // track the window size antialias: true, // preference: 'webgpu', // opt into WebGPU; default 'webgl' }); document.body.appendChild(app.canvas); // v8 uses app.canvas, not app.view const texture = await Assets.load('https://pixijs.com/assets/bunny.png'); const bunny = new Sprite(texture); bunny.anchor.set(0.5); bunny.position.set(app.screen.width / 2, app.screen.height / 2); app.stage.addChild(bunny); })();
jsimport { Container, Sprite } from 'pixi.js'; const world = new Container(); app.stage.addChild(world); // Children are positioned relative to `world`; move/scale/rotate the whole group // by transforming the parent. for (let i = 0; i < 10; i++) { const coin = new Sprite(coinTexture); coin.x = i * 40; world.addChild(coin); } world.position.set(100, 100); world.scale.set(2); // every coin scales with the container
jslet elapsed = 0; app.ticker.add((ticker) => { // deltaTime ≈ 1 at 60fps; deltaMS is milliseconds since last frame. elapsed += ticker.deltaMS; bunny.rotation += 0.05 * ticker.deltaTime; // smooth at any frame rate bunny.y = app.screen.height / 2 + Math.sin(elapsed / 500) * 50; });
jsbunny.eventMode = 'static'; // 'static' = interactive, doesn't move on its own bunny.cursor = 'pointer'; bunny.on('pointerdown', (event) => { bunny.tint = 0xff0000; // event.global is the pointer position in stage space. }); bunny.on('pointerover', () => bunny.scale.set(1.1)); bunny.on('pointerout', () => bunny.scale.set(1.0));
jsimport { Assets } from 'pixi.js'; await Assets.init({ manifest: { bundles: [{ name: 'level-1', assets: [ { alias: 'hero', src: 'assets/hero.png' }, { alias: 'tiles', src: 'assets/tiles.png' }, ], }], }, }); const bundle = await Assets.loadBundle('level-1'); // { hero: Texture, tiles: Texture } const hero = new Sprite(bundle.hero);
js// A big, rarely-changing background subtree: let the GPU cache its transforms. const background = new Container({ isRenderGroup: true }); app.stage.addChild(background); // Add hundreds of static tiles to `background`. Moving `background` itself stays // cheap; constantly re-adding/removing children negates the benefit.
await app.init(), or youconfigured the constructor. In v8 the constructor is empty; all options go to init().
app.view is undefined → v8 renamed it to app.canvas.interactive = true → eventMode = 'static'; Loader/loader.add → Assets.load; synchronous new Application({...}) → async init.
(async () => { ... })().ticker.deltaTime (or usedeltaMS); never assume 60fps.
eventMode is still 'none' (the default);set it to 'static' or 'dynamic'.
texture.source.scaleMode = 'nearest' (or pass it when loading).
removeChild does not free GPU memory; callsprite.destroy() and Assets.unload(url) for assets you're done with.
Assets.add, backgroundloading, unloading) and Graphics/Text/TilingSprite/ParticleContainer plus filters, read references/assets-and-display.md.
phaser-core — a batteries-included 2D framework (scenes, physics, input).threejs-scene-setup — 3D in the browser with three.js.prototype-fast — greybox a playable slice quickly (often cites PixiJS).| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-21 | pass→pass | 18,517 | 27,862 | +50% | 1 | 1 | 0% | 2,650 | 4,824 | +82% | 0 | 0 | — |
case-01 | fail→fail | 28,223 | 27,726 | -2% | 1 | 1 | 0% | 4,642 | 4,298 | -7% | 0 | 0 | — |
case-20 | pass→pass | 11,725 | 8,974 | -23% | 1 | 1 | 0% | 2,175 | 3,589 | +65% | 0 | 0 | — |
case-02 | pass→pass | 11,992 | 8,659 | -28% | 1 | 1 | 0% | 1,321 | 2,628 | +99% | 0 | 0 | — |
case-03 | fail→fail | 16,273 | 13,811 | -15% | 1 | 1 | 0% | 2,045 | 3,632 | +78% | 0 | 0 | — |
case-04 | pass→pass | 6,087 | 10,027 | +65% | 1 | 1 | 0% | 1,196 | 2,919 | +144% | 0 | 0 | — |
case-05 | pass→pass | 13,381 | 11,533 | -14% | 1 | 1 | 0% | 1,634 | 3,325 | +103% | 0 | 0 | — |
case-06 | pass→pass | 10,630 | 13,493 | +27% | 1 | 1 | 0% | 1,914 | 3,432 | +79% | 0 | 0 | — |
case-07 | pass→pass | 8,468 | 8,313 | -2% | 1 | 1 | 0% | 1,714 | 3,478 | +103% | 0 | 0 | — |
case-08 | pass→pass | 18,438 | 11,744 | -36% | 1 | 1 | 0% | 2,748 | 4,260 | +55% | 0 | 0 | — |
case-09 | fail→fail | 20,350 | 9,298 | -54% | 1 | 1 | 0% | 2,745 | 3,583 | +31% | 0 | 0 | — |
case-10 | pass→pass | 6,889 | 9,642 | +40% | 1 | 1 | 0% | 1,454 | 2,824 | +94% | 0 | 0 | — |
case-11 | pass→pass | 12,129 | 5,218 | -57% | 1 | 1 | 0% | 1,277 | 2,886 | +126% | 0 | 0 | — |
case-12 | pass→pass | 5,270 | 3,868 | -27% | 1 | 1 | 0% | 997 | 2,579 | +159% | 0 | 0 | — |
case-13 | pass→pass | 10,654 | 7,546 | -29% | 1 | 1 | 0% | 1,892 | 3,212 | +70% | 0 | 0 | — |
case-14 | pass→pass | 17,860 | 10,707 | -40% | 1 | 1 | 0% | 2,120 | 3,908 | +84% | 0 | 0 | — |
case-15 | pass→pass | 13,875 | 9,666 | -30% | 1 | 1 | 0% | 2,148 | 3,882 | +81% | 0 | 0 | — |
case-16 | pass→pass | 6,223 | 6,155 | -1% | 1 | 1 | 0% | 1,234 | 3,116 | +153% | 0 | 0 | — |
case-17 | pass→pass | 15,065 | 10,985 | -27% | 1 | 1 | 0% | 2,623 | 3,975 | +52% | 0 | 0 | — |
case-18 | pass→pass | 7,123 | 7,761 | +9% | 1 | 1 | 0% | 1,390 | 3,390 | +144% | 0 | 0 | — |
case-19 | pass→pass | 10,007 | 6,271 | -37% | 1 | 1 | 0% | 1,951 | 3,146 | +61% | 0 | 0 | — |
case-22 | pass→pass | 9,921 | 6,478 | -35% | 1 | 1 | 0% | 1,921 | 3,283 | +71% | 0 | 0 | — |
case-23 | pass→pass | 7,820 | 4,767 | -39% | 1 | 1 | 0% | 1,483 | 2,678 | +81% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of 0 percentage points is the difference between those two pass rates over the 23 comparable cases.
Other measured skills in the registry, with their headline benchmark lift.