pixijs-scene-core-concepts

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
This skill is the shared mental model referenced by all
pixijs-scene-*
leaves. It explains what the scene graph is in PixiJS v8, how a
Container
differs from a leaf, and where each concept lives. It does not go deep on any single API; it frames the pieces and points to the skill or reference file that does.
本技能是所有
pixijs-scene-*
叶子节点技能的通用参考模型。它解释了PixiJS v8中的场景图是什么、
Container
与叶子节点的区别,以及各个概念的定位。本技能不会深入讲解单个API,而是梳理各个组件的关系,并指向对应的技能或参考文档。

Quick Start

快速入门

ts
const world = new Container({ isRenderGroup: true });
app.stage.addChild(world);

const hero = new Container({ label: "hero" });
hero.addChild(new Sprite(bodyTexture));
hero.addChild(new Sprite(faceTexture));
world.addChild(hero);

const mask = new Graphics().rect(0, 0, 800, 600).fill(0xffffff);
world.mask = mask;
world.addChild(mask);

hero.position.set(world.width / 2, world.height / 2);
Related skills:
pixijs-scene-container
(Container API in detail), the leaf skills (
pixijs-scene-sprite
,
pixijs-scene-graphics
,
pixijs-scene-text
,
pixijs-scene-mesh
,
pixijs-scene-particle-container
,
pixijs-scene-dom-container
,
pixijs-scene-gif
),
pixijs-events
(hit testing traverses the scene graph),
pixijs-performance
(cache, culling, render groups),
pixijs-math
(Matrix, toGlobal/toLocal detail).
ts
const world = new Container({ isRenderGroup: true });
app.stage.addChild(world);

const hero = new Container({ label: "hero" });
hero.addChild(new Sprite(bodyTexture));
hero.addChild(new Sprite(faceTexture));
world.addChild(hero);

const mask = new Graphics().rect(0, 0, 800, 600).fill(0xffffff);
world.mask = mask;
world.addChild(mask);

hero.position.set(world.width / 2, world.height / 2);
相关技能:
pixijs-scene-container
(详细讲解Container API)、叶子节点技能(
pixijs-scene-sprite
pixijs-scene-graphics
pixijs-scene-text
pixijs-scene-mesh
pixijs-scene-particle-container
pixijs-scene-dom-container
pixijs-scene-gif
)、
pixijs-events
(点击测试会遍历场景图)、
pixijs-performance
(缓存、剔除、渲染组)、
pixijs-math
(Matrix、toGlobal/toLocal细节)。

Core Concepts

核心概念

What the scene graph is

什么是场景图

The PixiJS scene graph is a tree of display objects rooted at
app.stage
. Each node has a parent, a transform (position, scale, rotation, pivot, skew) relative to its parent, and optional visual state (alpha, tint, blendMode, visibility). Each frame the renderer walks the tree, composes transforms and visual state down to world-space, culls what's offscreen, and emits draw calls. The scene graph is both the layout model and the render order: earlier siblings draw behind later siblings.
Every display object in v8 is a
Container
subclass.
DisplayObject
from earlier versions was removed.
PixiJS场景图是以
app.stage
为根节点的显示对象树。每个节点都有父节点、相对于父节点的变换(位置、缩放、旋转、轴心、倾斜),以及可选的视觉状态(透明度、色调、混合模式、可见性)。渲染器每帧都会遍历该树,将变换和视觉状态组合为世界空间状态,剔除屏幕外的对象,然后发出绘制调用。场景图既是布局模型,也是渲染顺序:先添加的兄弟节点会绘制在后续兄弟节点的后方。
v8中的所有显示对象都是
Container
的子类。旧版本中的
DisplayObject
已被移除。

Container vs leaf (CRITICAL)

容器 vs 叶子节点(关键)

There are two roles in the tree:
  • Containers: nodes that hold children. Use a
    Container
    (or
    RenderLayer
    ) for any node that groups, positions, or transforms other nodes.
  • Leaves: nodes that draw something and have no children. Use
    Sprite
    ,
    Graphics
    ,
    Text
    ,
    Mesh
    ,
    ParticleContainer
    's
    Particle
    ,
    DOMContainer
    , or
    GifSprite
    as leaves.
In PixiJS v8, leaves must not have children. Adding children to a
Sprite
/
Graphics
/
Text
/
Mesh
logs a deprecation warning and is scheduled to become a hard error. The rule is: use
Container
for any node that needs children; do not nest children inside leaf scene objects.
If you need to group a leaf with other leaves, wrap them in a
Container
.
This distinction is why the
pixijs-scene-*
skills are split the way they are:
pixijs-scene-container
covers the grouping node, and each leaf gets its own skill focused on its draw behavior.
树中有两种角色:
  • 容器:用于容纳子节点的节点。当你需要对其他节点进行分组、定位或变换时,使用
    Container
    (或
    RenderLayer
    )。
  • 叶子节点:用于绘制内容且没有子节点的节点。叶子节点可使用
    Sprite
    Graphics
    Text
    Mesh
    ParticleContainer
    Particle
    DOMContainer
    GifSprite
在PixiJS v8中,叶子节点不能拥有子节点。如果给
Sprite
/
Graphics
/
Text
/
Mesh
添加子节点,会输出弃用警告,未来会变为硬性错误。规则是:任何需要子节点的节点都使用
Container
;不要在叶子节点内嵌套子节点
。如果需要将一个叶子节点与其他叶子节点分组,用
Container
包裹它们。
这种区分也是
pixijs-scene-*
技能拆分的原因:
pixijs-scene-container
讲解分组节点,每个叶子节点都有专注于其绘制行为的独立技能。

Transforms and coordinate spaces

变换与坐标空间

Every container composes a
localTransform
(a
Matrix
) from its
position
,
scale
,
rotation
,
pivot
, and
skew
. The renderer multiplies parents' local transforms together to produce the
worldTransform
(and
groupTransform
if a render group is in the chain), which maps local points to scene-root space. Use
toGlobal(point)
and
toLocal(point, from?)
to convert between spaces, and
getGlobalPosition()
for this object's world position. Full Matrix detail lives in
pixijs-math
; transform setters and
toLocal
/
toGlobal
live in
pixijs-scene-container
.
每个容器都会根据自身的
position
scale
rotation
pivot
skew
生成
localTransform
(一个
Matrix
)。渲染器会将父节点的局部变换相乘,生成
worldTransform
(如果链中有渲染组,则还会生成
groupTransform
),用于将局部点映射到场景根空间。使用
toGlobal(point)
toLocal(point, from?)
进行空间转换,使用
getGlobalPosition()
获取对象的世界位置。完整的Matrix细节在
pixijs-math
中;变换设置器和
toLocal
/
toGlobal
pixijs-scene-container
中。

Render order and explicit z-ordering

渲染顺序与显式Z轴排序

Children render in array order: index 0 first, last index last. For explicit z-ordering on a single container, set
sortableChildren = true
and assign
zIndex
values to children. For render order that is decoupled from the logical hierarchy (e.g., a character's parent is a game world but its drawing happens on a UI layer), use
RenderLayer
. Deep detail, including when to prefer sortable children vs RenderLayer, is in
references/scene-management.md
.
子节点按数组顺序渲染:索引0最先渲染,最后一个索引最后渲染。如果要对单个容器进行显式Z轴排序,设置
sortableChildren = true
并为子节点分配
zIndex
值。如果需要与逻辑层级解耦的渲染顺序(例如,角色的父节点是游戏世界,但绘制在UI层),使用
RenderLayer
。包括何时优先使用可排序子节点或RenderLayer的详细内容,可查看
references/scene-management.md

Render groups

渲染组

Flagging a container with
isRenderGroup: true
(or calling
container.enableRenderGroup()
) tells PixiJS to apply its transform on the GPU as a single matrix instead of recomputing every descendant's world transform on the CPU each frame. Use render groups on large, stable sub-trees such as worlds, UI layers, or parallax strips. Deep detail in
references/scene-management.md
.
给容器标记
isRenderGroup: true
(或调用
container.enableRenderGroup()
)会告诉PixiJS在GPU上以单个矩阵的形式应用其变换,而不是每帧在CPU上重新计算每个后代的世界变换。在大型、稳定的子树(如游戏世界、UI层或视差条)上使用渲染组。详细内容在
references/scene-management.md
中。

Culling

剔除

cullable = true
+ a
cullArea: Rectangle
tells the
CullerPlugin
(or any culling pass) to skip rendering objects that fall outside the visible area.
cullableChildren = false
short-circuits recursive culling for a sub-tree whose children are always on screen. Culling is a performance topic;
pixijs-performance
and
references/scene-management.md
cover the trade-offs.
设置
cullable = true
+
cullArea: Rectangle
会告诉
CullerPlugin
(或任何剔除流程)跳过渲染可见区域外的对象。
cullableChildren = false
会终止子树的递归剔除,适用于子节点始终在屏幕上的情况。剔除是性能优化相关话题;
pixijs-performance
references/scene-management.md
会讲解其权衡。

Masking

遮罩

Set
container.mask
to another display object to clip its rendering. PixiJS picks the mask type automatically: a
Graphics
or
Container
mask uses a stencil buffer, a
Sprite
mask uses an alpha filter, and a number selects a
ColorMask
. All four mask types (AlphaMask, StencilMask, ScissorMask, ColorMask) are covered in
references/masking.md
.
container.mask
设置为另一个显示对象即可裁剪其渲染内容。PixiJS会自动选择遮罩类型:
Graphics
Container
遮罩使用模板缓冲区,
Sprite
遮罩使用透明度滤镜,数字则选择
ColorMask
。所有四种遮罩类型(AlphaMask、StencilMask、ScissorMask、ColorMask)的详细内容在
references/masking.md
中。

Visibility, alpha, tint, and blend mode

可见性、透明度、色调与混合模式

visible = false
skips rendering and transform updates;
renderable = false
skips rendering but still updates transforms (use when hit-testing or bounds queries need to stay live).
alpha
and
tint
multiply down through the sub-tree;
blendMode
controls how this container's draw instructions composite against what is already on the target. See
pixijs-blend-modes
for the full blend-mode list and
pixijs-scene-container
for per-node state.
visible = false
会跳过渲染和变换更新;
renderable = false
会跳过渲染但仍更新变换(适用于需要保持点击测试或边界查询可用的场景)。
alpha
tint
会向下传递到子树;
blendMode
控制该容器的绘制指令如何与目标上已有的内容合成。完整的混合模式列表可查看
pixijs-blend-modes
,每个节点的状态可查看
pixijs-scene-container

Destroy semantics

销毁语义

container.destroy()
unlinks one node.
container.destroy({ children: true })
recursively destroys the whole sub-tree; always use this for killing a branch.
texture: true
and
textureSource: true
additionally tear down GPU resources owned by leaves. If
cacheAsTexture
is on, disable it before destroying.
pixijs-scene-container
documents the full signature.
container.destroy()
会解除单个节点的链接。
container.destroy({ children: true })
会递归销毁整个子树;销毁分支时请务必使用此方式。
texture: true
textureSource: true
还会销毁叶子节点拥有的GPU资源。如果开启了
cacheAsTexture
,请在销毁前禁用它。完整的签名文档在
pixijs-scene-container
中。

Lifecycle events

生命周期事件

Containers emit events for hierarchy and visibility changes:
childAdded
/
childRemoved
on the parent,
added
/
removed
on the child, plus
visibleChanged
and
destroyed
on the container itself. Useful for wiring reactive UI updates or resource bookkeeping. Full details in
references/container-hierarchy.md
.
容器会针对层级和可见性变化触发事件:父节点触发
childAdded
/
childRemoved
,子节点触发
added
/
removed
,容器自身还会触发
visibleChanged
destroyed
。这些事件可用于响应式UI更新或资源记账。详细内容在
references/container-hierarchy.md
中。

Leaf comparison: which skill covers which object

叶子节点对比:不同对象对应的技能

LeafPrimary useSkill
Sprite
Draw a single texture at a position (with variants
NineSliceSprite
for resizable UI panels and
TilingSprite
for repeating backgrounds).
pixijs-scene-sprite
Text
/
BitmapText
/
HTMLText
/
SplitText
/
SplitBitmapText
Render text. Canvas-based
Text
for general use,
BitmapText
for high-volume cheap text,
HTMLText
for rich HTML/CSS layout, split variants for per-character animation.
pixijs-scene-text
Graphics
Vector drawing: shapes, lines, paths, fills, strokes. Backed by a
GraphicsContext
.
pixijs-scene-graphics
Mesh
/
MeshSimple
/
MeshPlane
/
MeshRope
/
PerspectiveMesh
Custom geometry with a shader or texture. Use
MeshRope
for textured path-following ribbons and
PerspectiveMesh
for 2D perspective.
pixijs-scene-mesh
ParticleContainer
+
Particle
Thousands of lightweight sprites with a restricted transform set, for high-throughput particle effects.
pixijs-scene-particle-container
DOMContainer
Render an HTML element positioned inside the scene graph (useful for inputs, iframes, accessibility overlays).
pixijs-scene-dom-container
GifSprite
Animated GIF playback as a display object. Requires
pixi.js/gif
.
pixijs-scene-gif
Container
itself is covered in
pixijs-scene-container
and is the node every leaf lives inside.
叶子节点主要用途技能
Sprite
在指定位置绘制单个纹理(包含变体
NineSliceSprite
用于可调整大小的UI面板,
TilingSprite
用于重复背景)。
pixijs-scene-sprite
Text
/
BitmapText
/
HTMLText
/
SplitText
/
SplitBitmapText
渲染文本。基于Canvas的
Text
用于通用场景,
BitmapText
用于大量低成本文本,
HTMLText
用于富HTML/CSS布局,拆分变体用于逐字符动画。
pixijs-scene-text
Graphics
矢量绘制:形状、线条、路径、填充、描边。由
GraphicsContext
支持。
pixijs-scene-graphics
Mesh
/
MeshSimple
/
MeshPlane
/
MeshRope
/
PerspectiveMesh
带有着色器或纹理的自定义几何体。使用
MeshRope
实现纹理路径跟随的带状效果,使用
PerspectiveMesh
实现2D透视效果。
pixijs-scene-mesh
ParticleContainer
+
Particle
数千个轻量级精灵,具有受限的变换集,用于高吞吐量的粒子效果。
pixijs-scene-particle-container
DOMContainer
在场景图中定位渲染HTML元素(适用于输入框、iframe、无障碍覆盖层)。
pixijs-scene-dom-container
GifSprite
将GIF动画作为显示对象播放。需要依赖
pixi.js/gif
pixijs-scene-gif
Container
本身由
pixijs-scene-container
覆盖,是所有叶子节点的父容器。

When to use what (quick decisions)

场景决策速查

  • "I want to group and transform some display objects" →
    Container
    , see
    pixijs-scene-container
    .
  • "I want to draw a texture" →
    Sprite
    , see
    pixijs-scene-sprite
    .
  • "I want to draw vector shapes or paths" →
    Graphics
    , see
    pixijs-scene-graphics
    .
  • "I want to draw text" →
    Text
    /
    BitmapText
    /
    HTMLText
    , see
    pixijs-scene-text
    .
  • "I want thousands of cheap sprites" →
    ParticleContainer
    , see
    pixijs-scene-particle-container
    .
  • "I want a custom-geometry mesh or a deformed sprite" →
    Mesh
    or one of its variants, see
    pixijs-scene-mesh
    .
  • "I want to clip a sub-tree" → set
    .mask
    , see
    references/masking.md
    .
  • "I want a decoupled render order" →
    RenderLayer
    , see
    references/scene-management.md
    .
  • "I want GPU-level transforms for a big stable sub-tree" →
    isRenderGroup: true
    , see
    references/scene-management.md
    .
  • "I want to skip offscreen rendering" →
    cullable = true
    +
    CullerPlugin
    , see
    pixijs-performance
    .
  • "我想对一些显示对象进行分组和变换" → 使用
    Container
    ,查看
    pixijs-scene-container
  • "我想绘制纹理" → 使用
    Sprite
    ,查看
    pixijs-scene-sprite
  • "我想绘制矢量形状或路径" → 使用
    Graphics
    ,查看
    pixijs-scene-graphics
  • "我想绘制文本" → 使用
    Text
    /
    BitmapText
    /
    HTMLText
    ,查看
    pixijs-scene-text
  • "我需要数千个低成本精灵" → 使用
    ParticleContainer
    ,查看
    pixijs-scene-particle-container
  • "我需要自定义几何体网格或变形精灵" → 使用
    Mesh
    或其变体,查看
    pixijs-scene-mesh
  • "我想裁剪子树" → 设置
    .mask
    ,查看
    references/masking.md
  • "我需要解耦的渲染顺序" → 使用
    RenderLayer
    ,查看
    references/scene-management.md
  • "我想为大型稳定子树启用GPU级变换" → 设置
    isRenderGroup: true
    ,查看
    references/scene-management.md
  • "我想跳过屏幕外渲染" → 设置
    cullable = true
    +
    CullerPlugin
    ,查看
    pixijs-performance

References

参考文档

  • references/constructor-options.md: the ~30 fields inherited by every
    Container
    -derived node (transform, display, hierarchy, sorting, layout, effects, callbacks), with defaults, types, and when line-by-line assignment is appropriate. Shared reference for all leaf skills.
  • references/container-hierarchy.md: add/remove/swap children, reparenting with transform preservation, label navigation, destroy sub-trees.
  • references/transforms.md: position, scale, rotation, pivot, origin, skew, toGlobal/toLocal, the three matrices (local/group/world), bounds.
  • references/masking.md: AlphaMask, StencilMask, ScissorMask, ColorMask, inverse masking, cost comparison.
  • references/layers.md:
    RenderLayer
    , attach/detach, sorted layers, layer + logical parent split.
  • references/render-groups.md:
    isRenderGroup
    , GPU-level transforms, when to use, render-groups vs
    cacheAsTexture
    .
  • references/scene-management.md: combined view; render groups,
    RenderLayer
    , culling, zIndex sorting,
    boundsArea
    .
  • references/constructor-options.md:所有
    Container
    派生节点继承的约30个字段(变换、显示、层级、排序、布局、效果、回调),包含默认值、类型以及逐行赋值的适用场景。是所有叶子节点技能的通用参考。
  • references/container-hierarchy.md:添加/移除/交换子节点、保留变换的重父化、标签导航、销毁子树。
  • references/transforms.md:位置、缩放、旋转、轴心、原点、倾斜、toGlobal/toLocal、三种矩阵(局部/组/世界)、边界。
  • references/masking.md:AlphaMask、StencilMask、ScissorMask、ColorMask、反向遮罩、成本对比。
  • references/layers.md
    RenderLayer
    、附加/分离、排序层、层与逻辑父节点拆分。
  • references/render-groups.md
    isRenderGroup
    、GPU级变换、使用场景、渲染组与
    cacheAsTexture
    对比。
  • references/scene-management.md:综合视图;渲染组、
    RenderLayer
    、剔除、zIndex排序、
    boundsArea

Common Mistakes

常见错误

[CRITICAL] Adding children to a leaf display object

[关键] 给叶子显示对象添加子节点

Wrong:
ts
const sprite = new Sprite(texture);
sprite.addChild(new Graphics().rect(0, 0, 10, 10).fill(0xff0000));
Correct:
ts
const group = new Container();
group.addChild(new Sprite(texture));
group.addChild(new Graphics().rect(0, 0, 10, 10).fill(0xff0000));
In v8 leaves (
Sprite
,
Graphics
,
Text
,
Mesh
,
ParticleContainer
,
DOMContainer
,
GifSprite
) technically extend
Container
but should not hold children. Adding children to a leaf produces undefined rendering behavior. Wrap the leaf in a
Container
when you need grouping.
错误示例:
ts
const sprite = new Sprite(texture);
sprite.addChild(new Graphics().rect(0, 0, 10, 10).fill(0xff0000));
正确示例:
ts
const group = new Container();
group.addChild(new Sprite(texture));
group.addChild(new Graphics().rect(0, 0, 10, 10).fill(0xff0000));
在v8中,叶子节点(
Sprite
Graphics
Text
Mesh
ParticleContainer
DOMContainer
GifSprite
)虽然技术上继承自
Container
,但不应包含子节点。给叶子节点添加子节点会导致未定义的渲染行为。需要分组时,用
Container
包裹叶子节点。

[CRITICAL] Referencing DisplayObject

[关键] 引用DisplayObject

Wrong:
ts
import { DisplayObject } from "pixi.js"; // no such export in v8
function moveNode(node: DisplayObject) {
  node.x += 1;
}
Correct:
ts
import { Container } from "pixi.js";
function moveNode(node: Container) {
  node.x += 1;
}
DisplayObject
was removed in v8. Every display object — including
Sprite
,
Graphics
,
Text
,
Mesh
— is a
Container
subclass now. Use
Container
as the base type.
错误示例:
ts
import { DisplayObject } from "pixi.js"; // v8中无此导出
function moveNode(node: DisplayObject) {
  node.x += 1;
}
正确示例:
ts
import { Container } from "pixi.js";
function moveNode(node: Container) {
  node.x += 1;
}
DisplayObject
在v8中已被移除。所有显示对象——包括
Sprite
Graphics
Text
Mesh
——都是
Container
的子类。使用
Container
作为基础类型。

[HIGH] Forgetting isRenderGroup on large static subtrees

[高风险] 大型静态子树未设置isRenderGroup

Wrong:
ts
const world = new Container();
for (let i = 0; i < 5000; i++) {
  world.addChild(new Sprite(texture));
}
app.stage.addChild(world);
Correct:
ts
const world = new Container({ isRenderGroup: true });
for (let i = 0; i < 5000; i++) {
  world.addChild(new Sprite(texture));
}
app.stage.addChild(world);
Without
isRenderGroup: true
, the renderer recomposes every child's transform against its parents every frame. Marking the subtree as a render group caches transforms and draw state until a child changes, which is essential for large or mostly-static trees.
错误示例:
ts
const world = new Container();
for (let i = 0; i < 5000; i++) {
  world.addChild(new Sprite(texture));
}
app.stage.addChild(world);
正确示例:
ts
const world = new Container({ isRenderGroup: true });
for (let i = 0; i < 5000; i++) {
  world.addChild(new Sprite(texture));
}
app.stage.addChild(world);
如果不设置
isRenderGroup: true
,渲染器每帧都会重新计算每个子节点相对于父节点的变换。将子树标记为渲染组会缓存变换和绘制状态,直到子节点发生变化,这对大型或基本静态的树至关重要。

[HIGH] Treating child.x as world space

[高风险] 将child.x视为世界空间坐标

Wrong:
ts
const enemy = new Container();
enemy.x = 500;
world.addChild(enemy);
world.x = 200;
console.log(enemy.x); // 500 (local), not 700 (world)
Correct:
ts
const worldPos = enemy.toGlobal({ x: 0, y: 0 });
console.log(worldPos.x); // 700
Container.x/y/scale/rotation
are LOCAL to the parent. Use
toGlobal(point)
to compute world-space coordinates, or
getGlobalPosition()
for the container's origin in world space. The world transform is not exposed as a simple
x/y
pair.
错误示例:
ts
const enemy = new Container();
enemy.x = 500;
world.addChild(enemy);
world.x = 200;
console.log(enemy.x); // 500(局部坐标),不是700(世界坐标)
正确示例:
ts
const worldPos = enemy.toGlobal({ x: 0, y: 0 });
console.log(worldPos.x); // 700
Container.x/y/scale/rotation
是相对于父节点的局部坐标。使用
toGlobal(point)
计算世界空间坐标,或使用
getGlobalPosition()
获取容器原点的世界坐标。世界变换不会以简单的
x/y
对形式暴露。

[MEDIUM] sortableChildren without zIndex

[中风险] 设置sortableChildren但未配置zIndex

Wrong:
ts
const layer = new Container();
layer.sortableChildren = true;
layer.addChild(bg); // no zIndex
layer.addChild(mid); // no zIndex
layer.addChild(fg); // no zIndex
// order is unchanged — all zIndex default to 0
Correct:
ts
const layer = new Container();
layer.sortableChildren = true;
bg.zIndex = 0;
mid.zIndex = 10;
fg.zIndex = 20;
layer.addChild(bg, mid, fg);
sortableChildren
re-sorts children by
zIndex
before rendering, but only takes effect when children actually have distinct
zIndex
values. Setting only the parent flag has no visible effect.
错误示例:
ts
const layer = new Container();
layer.sortableChildren = true;
layer.addChild(bg); // 无zIndex
layer.addChild(mid); // 无zIndex
layer.addChild(fg); // 无zIndex
// 顺序不变——所有zIndex默认值为0
正确示例:
ts
const layer = new Container();
layer.sortableChildren = true;
bg.zIndex = 0;
mid.zIndex = 10;
fg.zIndex = 20;
layer.addChild(bg, mid, fg);
sortableChildren
会在渲染前按
zIndex
重新排序子节点,但只有当子节点具有不同的
zIndex
值时才会生效。仅设置父节点的标志不会产生可见效果。

Tooling

工具

The PixiJS Devtools Chrome extension lets you inspect and manipulate a running scene graph in real time. Install it for any non-trivial layout or render-order debugging.
PixiJS Devtools Chrome扩展允许你实时检查和操作运行中的场景图。进行任何非 trivial 的布局或渲染顺序调试时,请安装此扩展。

API Reference

API参考