pixijsrendering

Skill dedicated to PixijsRendering to help an AI Agent efficiently complete tasks related to PixiJS rendering.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "pixijsrendering" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-b34c55003c7c130d4999a4858e3bc1e0db8a7a98133e533bb640bed31844e5a2. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/pixijs-rendering-00k4 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Skill dedicated to PixijsRendering to help an AI Agent efficiently complete tasks related to PixiJS rendering.

0 Downloads

Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference

SkillPi interpretation

Tasks
Set up and structure a PixiJS **v8** application: the async `Application`, asset loading via `Assets`, the `Container`/`Sprite` scene graph, the ticker loop, pointer events, and render groups. Pins the v8 API (async `init`, unified `Assets`, `eventMode`).
Audience
Use when starting a PixiJS v8 project, fixing a blank canvas, structuring the display list, loading textures, animating via the ticker, or handling pointer input. Use when `package.json` depends on `pixi.js` (v8) and code does `import { 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.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: Pixijsrendering
slug: pixijs-rendering
version: 1.0.0
displayName: Pixijsrendering
description: >
  PixijsRendering专用技能,帮助AI Agent高效完成相关任务。
summary: "PixijsRendering专用技能,帮助AI Agent高效完成相关任务。"
license: Apache-2.0
category: 游戏开发
framework:
  - Claude Code
  - Codex
  - Hermes Agent
  - OpenClaw
  - QClaw
  - WorkBuddy
platform: multi-platform
homepage: https://github.com/1991513ccie-png
repository: https://github.com/1991513ccie-png

PixiJS v8 Rendering

Set up and structure a PixiJS v8 application: the async Application, asset loading via Assets, the Container/Sprite scene graph, the ticker loop, pointer events, and render groups. Pins the v8 API (async init, unified Assets, eventMode).

When to use

  • Use when starting a PixiJS v8 project, fixing a blank canvas, structuring the display list, loading textures, animating via the ticker, or handling pointer input.
  • Use when package.json depends on pixi.js (v8) and code does import { 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.

Core workflow

  1. Create and 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.
  2. Load assets with Assets. await Assets.load(url) returns a Texture. For many assets, register a manifest/bundle and load by name. There is no v7 Loader.
  3. Build the scene graph. Everything descends from app.stage (a Container). Group related objects in Containers; child transforms are relative to the parent. Draw order = insertion order (later = on top).
  4. Animate with the ticker. app.ticker.add((ticker) => {...}). Scale motion by ticker.deltaTime (frames, ~1 at 60fps) or ticker.deltaMS (milliseconds) so speed is frame-rate independent.
  5. Enable events per object by setting eventMode = 'static' (or 'dynamic'), then obj.on('pointerdown', ...). Federated pointer events cover mouse/touch/pen.
  6. Promote big static subtrees to render groups (isRenderGroup: true) so the GPU caches their transforms. Profile before and after; confirm pixels on screen.

Patterns

1. Async Application boot (the v8 entry point)

import { 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);
})();

2. Containers for a relative-transform scene graph

import { 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

3. The ticker loop (frame-rate independent)

let 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;
});

4. Pointer events (federated)

bunny.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));

5. Loading many assets by name (bundles)

import { 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);

6. Render groups for large static layers

// 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.

Pitfalls

  • Blank canvas / "app.stage is undefined" → you didn't await app.init(), or you configured the constructor. In v8 the constructor is empty; all options go to init().
  • app.view is undefined → v8 renamed it to app.canvas.
  • v7 code throwing → interactive = true → eventMode = 'static'; Loader/ loader.add → Assets.load; synchronous new Application({...}) → async init.
  • Top-level await build error (Vite ≤6.0.6) → wrap boot in (async () => { ... })().
  • Speed varies with frame rate → multiply movement by ticker.deltaTime (or use deltaMS); never assume 60fps.
  • Clicks do nothing → the object's eventMode is still 'none' (the default); set it to 'static' or 'dynamic'.
  • Textures look blurry on pixel art → set texture.source.scaleMode = 'nearest' (or pass it when loading).
  • Memory grows → removeChild does not free GPU memory; call sprite.destroy() and Assets.unload(url) for assets you're done with.

References

  • For the texture/asset pipeline (sprite sheets/atlases, Assets.add, background loading, unloading) and Graphics/Text/TilingSprite/ParticleContainer plus filters, read references/assets-and-display.md.

Related skills

  • 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).

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供 PixiJS v8 完整应用搭建指南,解决空白画布、结构混乱等实际问题
  • 涵盖 Application 初始化、资源加载、场景图、动画循环、事件处理和渲染组优化
  • 面向游戏开发领域,具有明确的实用价值和广泛受众
Trigger Precision90/100

Highlights

  • 触发词精准完整,明确适用于 PixiJS v8 项目启动、修复空白画布等场景
  • 边界清晰,明确排除 Phaser、Three.js、PixiJS v7 及更早版本
Structure and Standards95/100

Highlights

  • 结构清晰完整,包含使用场景、核心流程、6个具体模式、陷阱说明和相关技能
  • 每个模式都有完整可运行的代码示例,frontmatter 完整规范
Execution Reliability90/100

Highlights

  • 代码示例基于 PixiJS v8 官方 API,参数正确可靠
  • 覆盖主要异常情况并提供具体解决方案,包括空白画布、事件失效、内存泄漏等
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com
  • pixijs.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.