pixijs-core-concepts
pixijs/pixijs-skills
Understand PixiJS v8 renderer architecture, render loop, and environment adaptation.
What is pixijs-core-concepts?
This skill explains how PixiJS v8 gets pixels on screen through its systems-and-pipes renderer, per-frame render loop, and environment abstraction layer. Use it when working with renderer selection (WebGL/WebGPU/Canvas), the render pipeline, ticker integration, or adapting to non-browser contexts like Web Workers and SSR.
- Explains renderer backend selection via autoDetectRenderer and preference hints
- Describes the systems-and-pipes architecture (Systems for lifecycle, RenderPipes for per-renderable instructions)
- Documents the render loop and ticker integration, including priority ordering
- Covers environment abstraction via DOMAdapter for browser, Web Worker, and SSR contexts
- Provides decision guidance for manual rendering, physics integration, and custom renderables
- Identifies common mistakes like accessing renderer before init() or setting DOMAdapter too late
How to install pixijs-core-concepts
npx skills add https://github.com/pixijs/pixijs-skills --skill pixijs-core-concepts- PixiJS v8 installed
- Understanding of async/await (Application.init is async)
- Familiarity with the Application class (see pixijs-application skill)
How to use pixijs-core-concepts
- 1.Check app.renderer.name after await app.init() to confirm which backend is active
- 2.Register per-frame callbacks with app.ticker.add(fn) at appropriate UPDATE_PRIORITY levels
- 3.Set DOMAdapter before Application.init if targeting Web Workers or custom environments
- 4.Call app.renderer.render({ container: app.stage }) manually only if autoStart: false
- 5.Branch on app.renderer.name when using backend-specific features like WebGPU-only APIs
Use cases
- Choosing between WebGL, WebGPU, and Canvas renderers based on browser support
- Integrating physics or custom update logic into the render loop at specific priorities
- Running PixiJS in a Web Worker or SSR environment by swapping the DOMAdapter
- Writing custom renderables by implementing a RenderPipe
- Manually controlling frame rendering with autoStart: false
- PixiJS developers building rendering pipelines
- Graphics engineers integrating physics or custom logic
- Teams deploying to Web Workers or server-side rendering
- Developers implementing custom renderable types
pixijs-core-concepts FAQ
Application.init() is async. You must await app.init({ width, height }) before accessing app.renderer, app.canvas, or app.screen.
Pass preference: ['webgpu', 'webgl'] to app.init(). WebGPU is fastest where available; WebGL is the reliable fallback. Always check app.renderer.name to confirm which backend was selected, as preference is a hint, not a guarantee.
Set DOMAdapter.set(WebWorkerAdapter) before creating the Application. If you set it after init(), the wrong adapter is already baked into the renderer.
Use app.ticker.add(fn) at UPDATE_PRIORITY.HIGH or NORMAL. The TickerPlugin registers the render at UPDATE_PRIORITY.LOW, so your callbacks run first. For manual control, set autoStart: false and call app.renderer.render() yourself.
Systems are lifecycle services (textures, buffers, state, filters, masks). RenderPipes are per-renderable instruction builders (sprite, graphics, mesh, text). To add a custom renderable, implement a RenderPipe and register it via extensions.
Full instructions (SKILL.md)
Source of truth, from pixijs/pixijs-skills.
name: pixijs-core-concepts description: "Use this skill when understanding how PixiJS v8 renders frames: the systems-and-pipes renderer, the render loop, and how the library adapts to different environments. Covers WebGLRenderer/WebGPURenderer/CanvasRenderer selection, renderer.render() pipeline, environment detection, and pointers to per-topic deep dives. Triggers on: renderer, WebGL, WebGPU, Canvas, render loop, render pipeline, systems, environments, autoDetectRenderer." license: MIT
Foundational model for how PixiJS v8 gets pixels on the screen: the renderer decides which GPU backend to use, the render loop drives per-frame work, and the environment layer adapts the library to browser, Web Worker, or SSR contexts. For the scene graph itself (Containers, transforms, destroy), see pixijs-scene-core-concepts.
Quick Start
console.log(app.renderer.name); // 'webgl' | 'webgpu' | 'canvas'
app.ticker.add((ticker) => {
sprite.rotation += 0.01 * ticker.deltaTime;
});
const tex = app.renderer.extract.texture({ target: app.stage });
app.renderer.render({ container: app.stage });
app.renderer is the WebGLRenderer, WebGPURenderer, or CanvasRenderer chosen by autoDetectRenderer. The TickerPlugin drives renderer.render() automatically; call it manually only with autoStart: false. Backend selection happens in Application.init({ preference }); see pixijs-application for setup.
Related skills: pixijs-application (Application construction and lifecycle), pixijs-ticker (per-frame logic, priorities, FPS capping), pixijs-environments (Web Worker, SSR, strict CSP), pixijs-custom-rendering (writing a RenderPipe), pixijs-scene-core-concepts (scene graph basics).
Topics
| Topic | Reference | When |
|---|---|---|
| Choosing a backend | references/renderers.md | Preference forms, per-renderer options, systems and pipes |
| Per-frame execution | references/render-loop.md | Priority order, time units, manual rendering |
For deep dives into any single topic, open the corresponding reference file. Non-browser targets (DOMAdapter, WebWorkerAdapter, custom adapters, strict CSP) are covered in the pixijs-environments skill.
Decision guide
- Setting up an Application? Start with
pixijs-application. This skill explains what the renderer does under the hood. - Choosing between WebGL and WebGPU? Use
['webgpu', 'webgl']as your preference array. WebGPU is fastest where available; WebGL is the reliable fallback. Seereferences/renderers.md. - Running in a Web Worker? Set
DOMAdapter.set(WebWorkerAdapter)beforeapp.init. See thepixijs-environmentsskill for complete setup. - Need manual control over when rendering happens? Set
autoStart: falseand callapp.renderer.render(app.stage)from your own loop. Seereferences/render-loop.md. - Integrating with a physics library? Add your update at
UPDATE_PRIORITY.HIGHso physics runs before the render atLOW. Seereferences/render-loop.md. - Writing a custom renderable? Implement a
RenderPipe. Seepixijs-custom-renderingskill. - Running under strict CSP? Import
'pixi.js/unsafe-eval'. See thepixijs-environmentsskill.
Quick concepts
Renderer = systems + pipes
Each renderer is composed of Systems (lifecycle services: textures, buffers, state, filters, masks) and RenderPipes (per-renderable instruction builders: sprite, graphics, mesh, particle, text, tiling). Writing a custom renderable means implementing a RenderPipe and registering it via extensions.
The render loop
app.ticker.add(fn) registers a callback that runs every frame. The TickerPlugin registers app.render() at UPDATE_PRIORITY.LOW, so ticker callbacks at NORMAL or HIGH run before the draw. Disable the plugin with autoStart: false for manual control.
Environments
DOMAdapter abstracts every DOM call PixiJS makes (canvas creation, image loading, fetch, XML parsing). Swap with DOMAdapter.set(WebWorkerAdapter) for Workers or implement a custom Adapter for Node/SSR. Must be done before Application.init.
Common Mistakes
[HIGH] Accessing app.renderer before init() resolves
Wrong:
const app = new Application();
app.init({ width: 800, height: 600 });
console.log(app.renderer.name); // undefined — init() is async
Correct:
const app = new Application();
await app.init({ width: 800, height: 600 });
console.log(app.renderer.name); // 'webgl' | 'webgpu' | 'canvas'
Application.init() is async. app.renderer, app.canvas, and app.screen do not exist until after the promise resolves.
[HIGH] Setting DOMAdapter after Application.init
Wrong:
const app = new Application();
await app.init({ width: 800, height: 600 });
DOMAdapter.set(WebWorkerAdapter); // too late — init already allocated resources
Correct:
DOMAdapter.set(WebWorkerAdapter);
const app = new Application();
await app.init({ width: 800, height: 600 });
The adapter abstracts DOM calls the renderer makes during construction (canvas creation, image loading, fetch). Swap it before init() or the wrong adapter is baked into the renderer.
[MEDIUM] Treating preference as a guarantee
Wrong:
await app.init({ preference: "webgpu" });
// assume WebGPU is active
useWebGPUOnlyFeature(app.renderer);
Correct:
await app.init({ preference: "webgpu" });
if (app.renderer.name === "webgpu") {
useWebGPUOnlyFeature(app.renderer);
}
preference is a hint, not a demand. If the browser lacks WebGPU support, PixiJS falls back to WebGL (or Canvas). Always branch on renderer.name for backend-specific code.
API Reference
Related skills
More from pixijs/pixijs-skills and the wider catalog.

pixijs-create
Scaffold a new PixiJS v8 project or add PixiJS to an existing one with create-pixi CLI.

pixijs-custom-rendering
Write custom shaders, uniforms, filters, and batchers in PixiJS v8 with WebGL and WebGPU support.

pixijs-environments
Run PixiJS v8 outside the browser: Web Workers, OffscreenCanvas, Node/SSR, and CSP-restricted contexts.

pixijs-events
Handle pointer, mouse, touch, and wheel input in PixiJS v8 with federated events.

pixijs-filters
Apply visual effects to PixiJS v8 containers using built-in and custom filters with GLSL/WGSL shaders.

pixijs-html-source
Use this skill when rendering live HTML/DOM elements (or frozen snapshots of them) as PixiJS v8 textures via the EXPERIMENTAL HTML-in-Canvas browser APIs. Covers the pixi.js/html-source side-effect import, feature-detection with canvas.requestPaint, HTMLSource for a live, repainting element kept interactive in the browser (autoLayout/autoUpdate/autoRequestPaint, requestPaint, isReady, the direct-child-of-canvas + layoutsubtree requirement), ElementImageSource for an immutable captureElementImage() snapshot (autoClose, ready immediately), using the source on a Sprite/Texture/Mesh, fallback-only auto-detection via Texture.from at priority -10, and destroy/cleanup. Triggers on: HTMLSource, ElementImageSource, pixi.js/html-source, requestPaint, captureElementImage, ElementImage, layoutsubtree, autoRequestPaint, autoUpdate, autoClose, HTML in canvas, render DOM to texture, HTMLSourceOptions, ElementImageSourceOptions, HTMLSourceCanvas, experimental.