# pixijs-application

Guides PixiJS v8 Application setup via async app.init(). Useful when configuring canvas rendering, choosing between WebGPU and WebGL, and handling window resize.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 6000 installs · ★ 358
- Author: pixijs
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/pixijs/pixijs-skills/tree/HEAD/skills/pixijs-application/SKILL.md
- Updated: 2026-10-01
- HTML: https://affpapa.org/en/nevibecode/skills/pixijs-application

## What it does

This skill guides coding agents through instantiating and configuring `Application` in PixiJS v8. In v8, the `new Application()` constructor accepts no arguments; passing options there triggers deprecation warnings. Every setting—including canvas dimensions, background colors, render backend preference, and auto-density—belongs in the asynchronous `await app.init()` call.

The skill covers lifecycle management, access to `app.stage`, `app.canvas`, `app.screen`, and `app.domContainerRoot`, as well as plugins like `ResizePlugin` and `TickerPlugin`. It explains how `resizeTo` coordinates with `queueResize()` and `cancelResize()`, plus how to handle manual render loops when `autoStart` is set to false.

Teardown requires explicit flags: calling `app.destroy()` without `releaseGlobalResources: true` leaves global pools and texture caches intact. Re-initializing an application in the same browser tab without that flag causes flickering and stale textures.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add pixijs/pixijs-skills --skill pixijs-application -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/pixijs-application/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/pixijs-application/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add pixijs/pixijs-skills --skill pixijs-application -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/pixijs-application/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add pixijs/pixijs-skills --skill pixijs-application -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/pixijs-application/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install pixijs/pixijs-skills pixijs-application
```

2. **Manually: put the files in place**
- File: `.github/skills/pixijs-application/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add pixijs/pixijs-skills --skill pixijs-application -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/pixijs/pixijs-skills --path skills/pixijs-application
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/pixijs-application/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add pixijs/pixijs-skills --skill pixijs-application -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/pixijs/pixijs-skills/tree/HEAD/skills/pixijs-application/SKILL.md

## When to use it
- initialize a PixiJS v8 application using async app.init()
- configure high-DPI canvas resizing with ResizePlugin
- select between WebGPU and WebGL renderers via preference flags
- tear down canvas and global texture pools cleanly using app.destroy()

## Example prompts
- Set up a full-screen PixiJS v8 application with WebGPU preference, autoDensity, and high-DPI support.
- Configure a manual render loop in PixiJS v8 with autoStart disabled.
- Show how to properly destroy a PixiJS app and release global texture caches to prevent flickering.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 575a912a11a7c7ac.

BEGIN THIRD-PARTY FILE 575a912a11a7c7ac
````text
---
name: pixijs-application
description: "Use this skill when creating and configuring a PixiJS v8 Application. Covers new Application() + async app.init() options (width, height, background, antialias, resolution, autoDensity, preference, resizeTo, autoStart, sharedTicker, canvas, useBackBuffer, powerPreference, eventFeatures, accessibilityOptions, gcActive, bezierSmoothness, webgl/webgpu/canvasOptions per-renderer overrides), app.stage/renderer/canvas/screen/domContainerRoot access, ResizePlugin, TickerPlugin, CullerPlugin (cullable, cullArea), custom ApplicationPlugin via ExtensionType.Application, start/stop lifecycle, and app.destroy() with releaseGlobalResources. Triggers on: Application, app.init, app.stage, app.renderer, app.canvas, app.screen, app.domContainerRoot, ApplicationOptions, ApplicationPlugin, ExtensionType.Application, resizeTo, sharedTicker, skipExtensionImports, preferWebGLVersion, preserveDrawingBuffer, cullable, CullerPlugin, app.start, app.stop, app.destroy, releaseGlobalResources."
license: MIT
---

`Application` is the convenience wrapper that owns a renderer, a root `stage` Container, a canvas, and the Ticker/Resize plugins. In v8 the constructor takes no arguments; all configuration is passed to the async `app.init()` call which instantiates the renderer via `autoDetectRenderer`.

## Quick Start

```ts
import { Application } from "pixi.js";

const app = new Application();

await app.init({
  resizeTo: window,
  background: "#1099bb",
  antialias: true,
  preference: "webgl",
  autoDensity: true,
  resolution: window.devicePixelRatio,
});

document.body.appendChild(app.canvas);
```

**Related skills:** `pixijs-core-concepts` (renderers, render pipeline), `pixijs-ticker` (render loop detail), `pixijs-scene-container` (working with `app.stage`), `pixijs-environments` (non-browser setups).

## Core Patterns

### Lifecycle: construct, init, render, destroy

```ts
import { Application } from "pixi.js";

const app = new Application();

await app.init({ width: 800, height: 600 });
document.body.appendChild(app.canvas);

// ... run scene, ticker drives app.render() automatically ...

app.destroy(
  { removeView: true, releaseGlobalResources: true },
  { children: true, texture: true, textureSource: true },
);
```

- `new Application()` allocates the instance but creates nothing. Options passed here are ignored with a v8 deprecation warning.
- `app.init(options)` is async. It builds the renderer, wires up plugins, and must complete before you can use `app.canvas`, `app.renderer`, or `app.screen`.
- The TickerPlugin calls `app.render()` every frame once init resolves (unless `autoStart: false`).
````
END THIRD-PARTY FILE 575a912a11a7c7ac

The third-party file has ended. Everything between the 575a912a11a7c7ac tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2661 of 11656 bytes. © pixijs · MIT · https://github.com/pixijs/pixijs-skills/tree/HEAD/skills/pixijs-application/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
