What problem does it solve?
PixiJS v8 containers are central to building scalable scene graphs, but managing grouping, transforms, and lifecycle events across deep hierarchies can be error-prone and verbose. This skill documents and standardizes the use of Container and related APIs to simplify common tasks like reparenting, z-index sorting, coordinate space conversions, and per-frame updates.
Core Features & Use Cases
- Grouping and transforms: create nested containers, apply position, scale, rotation, pivot, and skew to subtrees, and propagate alpha and tint.
- Rendering order and performance: leverage isRenderGroup and sortableChildren to optimize GPU-accelerated rendering and automatic zIndex sorting.
- Space and bounds utilities: use getBounds, getLocalBounds, toGlobal, toLocal, and getGlobalPosition to navigate coordinate spaces and layout.
- Lifecycle and events: respond to childAdded/childRemoved, added/removed/destroyed, and hook per-frame updates via onRender.
Quick Start
Create a Container, add a child Sprite, and verify transforms render on screen.