Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

docs: the sorting-layer names are suggestions, not the whole list

yhhdda95e683617
diff --git a/docs/astro/src/content/docs/guides/editor.mdx b/docs/astro/src/content/docs/guides/editor.mdx
index de49e7819..6e562020e 100644
--- a/docs/astro/src/content/docs/guides/editor.mdx
+++ b/docs/astro/src/content/docs/guides/editor.mdx
@@ -370,8 +370,8 @@ Open settings with **Ctrl / ⌘ + ,** or the Activity Bar's gear. Settings are g
matrix, plus solver tuning (fixed timestep, sub-steps, contact Hz/damping/push
speed, sleeping, continuous collision). See [Physics](/docs/guides/physics/).
- **Rendering** — up to thirty-two named sorting layers that populate the inspector's
- layer dropdown, and which of them y-sort. Naming is optional: with no names, a
- render `layer` stays a free number.
+ layer dropdown, and which of them y-sort. The names are suggestions, not a limit:
+ a render `layer` still accepts a number outside them.
- **Packaging** — per-target metadata: WeChat AppID, Desktop app id / product name.
### Editor language
diff --git a/docs/astro/src/content/docs/guides/sprites.mdx b/docs/astro/src/content/docs/guides/sprites.mdx
index 6600bc477..1d1489ae5 100644
--- a/docs/astro/src/content/docs/guides/sprites.mdx
+++ b/docs/astro/src/content/docs/guides/sprites.mdx
@@ -99,8 +99,9 @@ etc. instead of a raw number. Lower layers draw first (behind).
![Left: three sorting layers stacked so a higher layer draws in front. Right: on a Y-sorted layer a sprite lower on screen draws in front of one higher up.](../../../assets/guides/sprite-sort.svg)
Naming is a readability feature, not a limit: name up to thirty-two slots (a slot's
-index *is* its z-order), or name none and the inspector leaves `layer` a plain number
-field. The renderer itself sorts on any integer either way.
+index *is* its z-order). The names are suggestions — type a number the list doesn't
+offer and the field takes it, and with no names at all `layer` is a plain number
+field. The renderer sorts on any integer either way.
```typescript
sprite.layer = 0; // e.g. "Background"
diff --git a/docs/astro/src/content/docs/zh-cn/guides/editor.mdx b/docs/astro/src/content/docs/zh-cn/guides/editor.mdx
index 364988073..1651d122f 100644
--- a/docs/astro/src/content/docs/zh-cn/guides/editor.mdx
+++ b/docs/astro/src/content/docs/zh-cn/guides/editor.mdx
@@ -297,7 +297,7 @@ Details 同时是**资产检视器**:在内容浏览器里选中一个资产,即
- **物理** — 启用、重力、十六个碰撞层名字和一个 16×16 碰撞矩阵,以及解算器调参(固定时间步、
子步、接触 Hz/阻尼/推出速度、允许睡眠、连续碰撞)。见 [物理](/docs/zh-cn/guides/physics/)。
- **渲染** — 最多三十二个命名排序层,填充检视器里的层下拉,以及其中哪些参与 Y 轴排序。
- 命名是可选的:一个名字都不填时,渲染组件的 `layer` 仍是自由数字。
+ 名字只是建议,不是上限:渲染组件的 `layer` 照样接受名单以外的数字。
- **打包** — 每目标元数据:微信 AppID、桌面应用 id / 产品名。
### 编辑器语言
diff --git a/docs/astro/src/content/docs/zh-cn/guides/sprites.mdx b/docs/astro/src/content/docs/zh-cn/guides/sprites.mdx
index aea293520..f171fdaaa 100644
--- a/docs/astro/src/content/docs/zh-cn/guides/sprites.mdx
+++ b/docs/astro/src/content/docs/zh-cn/guides/sprites.mdx
@@ -88,8 +88,9 @@ sprite.color = { r: 1, g: 1, b: 1, a: 0.5 }; // 50% 透明
![左:三个排序层堆叠,更高的层画在前面。右:在 Y-排序层上,屏幕上更靠下的精灵画在更靠上的前面。](../../../../assets/guides/sprite-sort.svg)
-命名是为了可读性,不是层数上限:你可以命名最多三十二个槽位(槽位的下标**就是**它的 z 序),
-也可以一个都不命名——那样检视器把 `layer` 留成普通数字输入框。两种情况下渲染器都按任意整数排序。
+命名是为了可读性,不是层数上限:你可以命名最多三十二个槽位(槽位的下标**就是**它的 z 序)。
+名字只是建议——直接敲一个列表里没有的数字,字段照样接受;一个名字都不填时,`layer` 就是
+普通数字输入框。两种情况下渲染器都按任意整数排序。
```typescript
sprite.layer = 0; // 例如 "Background"