pixijs-scene-container

Manage PixiJS v8 Container children, transforms, render order, and lifecycle.

16|8|Updated May 20, 2020
One-click install
npx skills add https://github.com/encounterplus/web-client --skill pixijs-scene-container-encounterplus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pixijs-scene-container
Source: https://github.com/encounterplus/web-client/tree/main/.agents/skills/pixijs-scene-container
Command: npx skills add https://github.com/encounterplus/web-client --skill pixijs-scene-container-encounterplus

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you correctly group, position, and render PixiJS v8 display objects by using Containers as the scene-graph building block for transforms, ordering, bounds, and lifecycle.

Core Features & Use Cases

  • Hierarchical grouping: Build scene subtrees by adding/removing children while keeping transforms consistent across the branch.
  • Precise transform control: Use position, scale, rotation, pivot, origin, skew, alpha, tint, and blend behavior for whole subtrees.
  • Render ordering & bounds: Manage zIndex with sortableChildren, compute getBounds(), and convert coordinates with toGlobal/toLocal.
  • Performance-aware behavior: Use isRenderGroup, culling options, and boundsArea to reduce per-frame overhead for large scenes.
  • Lifecycle & events: Handle childAdded/childRemoved and container destroyed cleanup without relying on deprecated leaf-child patterns.

Quick Start

Create a PixiJS Container with sortableChildren enabled, add your sprite children, set a pivot/origin for rotation, then add the container to app.stage.

Frequently Asked Questions about pixijs-scene-container

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I group and transform display objects in a PixiJS scene graph?

Group and transform display objects in a PixiJS scene graph by using Containers as building blocks to manage children, position, scale, rotation, and alpha for entire subtrees. This maintains transform consistency across the scene branch.

How do I sort render order by zIndex in PixiJS v8?

Sort render order by zIndex in PixiJS v8 by enabling sortableChildren on a Container. This allows you to manage the rendering sequence of child display objects explicitly within the scene graph.

How do I convert local coordinates to global coordinates in PixiJS?

Convert local coordinates to global coordinates in PixiJS using the toGlobal method, or reverse the conversion using toLocal. You can also compute precise spatial dimensions using the getBounds method.

Can I optimize PixiJS render performance for large scenes?

Optimize PixiJS render performance for large scenes by using isRenderGroup, culling options, and boundsArea. These Container configurations reduce per-frame overhead during real-time rendering pipelines.

How do I handle cleanup and lifecycle events for PixiJS Containers?

Handle cleanup and lifecycle events for PixiJS Containers by using childAdded and childRemoved events, alongside safe destroy semantics. This ensures proper removal without relying on deprecated leaf-child patterns.

What is the best way to configure PixiJS Container properties dynamically?

Configure PixiJS Container properties dynamically using ContainerOptions-driven configuration. This approach applies position, pivot, origin, skew, tint, and blend behavior to whole subtrees for precise transform control.