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: add editor screenshots across AI, physics, particle, animation, localization, lighting, and build (en + zh)

yhh8f40affd1e4b
diff --git a/docs/astro/src/assets/guides/en/ai-bt.png b/docs/astro/src/assets/guides/en/ai-bt.png
new file mode 100644
index 000000000..74db77ee0
Binary files /dev/null and b/docs/astro/src/assets/guides/en/ai-bt.png differ
diff --git a/docs/astro/src/assets/guides/en/ai-fsm.png b/docs/astro/src/assets/guides/en/ai-fsm.png
new file mode 100644
index 000000000..36983d4ac
Binary files /dev/null and b/docs/astro/src/assets/guides/en/ai-fsm.png differ
diff --git a/docs/astro/src/assets/guides/en/animator-graph.png b/docs/astro/src/assets/guides/en/animator-graph.png
new file mode 100644
index 000000000..11bcf706b
Binary files /dev/null and b/docs/astro/src/assets/guides/en/animator-graph.png differ
diff --git a/docs/astro/src/assets/guides/en/build-dialog.png b/docs/astro/src/assets/guides/en/build-dialog.png
new file mode 100644
index 000000000..a4c8f3964
Binary files /dev/null and b/docs/astro/src/assets/guides/en/build-dialog.png differ
diff --git a/docs/astro/src/assets/guides/en/flipbook.png b/docs/astro/src/assets/guides/en/flipbook.png
new file mode 100644
index 000000000..74d5a42a1
Binary files /dev/null and b/docs/astro/src/assets/guides/en/flipbook.png differ
diff --git a/docs/astro/src/assets/guides/en/lighting.png b/docs/astro/src/assets/guides/en/lighting.png
new file mode 100644
index 000000000..dba9dec96
Binary files /dev/null and b/docs/astro/src/assets/guides/en/lighting.png differ
diff --git a/docs/astro/src/assets/guides/en/localization.png b/docs/astro/src/assets/guides/en/localization.png
new file mode 100644
index 000000000..54987d23e
Binary files /dev/null and b/docs/astro/src/assets/guides/en/localization.png differ
diff --git a/docs/astro/src/assets/guides/en/particle-view.png b/docs/astro/src/assets/guides/en/particle-view.png
new file mode 100644
index 000000000..eb3178dd9
Binary files /dev/null and b/docs/astro/src/assets/guides/en/particle-view.png differ
diff --git a/docs/astro/src/assets/guides/en/physics-collider.png b/docs/astro/src/assets/guides/en/physics-collider.png
new file mode 100644
index 000000000..0240d16c0
Binary files /dev/null and b/docs/astro/src/assets/guides/en/physics-collider.png differ
diff --git a/docs/astro/src/assets/guides/zh/ai-bt.png b/docs/astro/src/assets/guides/zh/ai-bt.png
new file mode 100644
index 000000000..7cd45b7d8
Binary files /dev/null and b/docs/astro/src/assets/guides/zh/ai-bt.png differ
diff --git a/docs/astro/src/assets/guides/zh/ai-fsm.png b/docs/astro/src/assets/guides/zh/ai-fsm.png
new file mode 100644
index 000000000..41f99857f
Binary files /dev/null and b/docs/astro/src/assets/guides/zh/ai-fsm.png differ
diff --git a/docs/astro/src/assets/guides/zh/animator-graph.png b/docs/astro/src/assets/guides/zh/animator-graph.png
new file mode 100644
index 000000000..39adb819f
Binary files /dev/null and b/docs/astro/src/assets/guides/zh/animator-graph.png differ
diff --git a/docs/astro/src/assets/guides/zh/build-dialog.png b/docs/astro/src/assets/guides/zh/build-dialog.png
new file mode 100644
index 000000000..a3d75ce28
Binary files /dev/null and b/docs/astro/src/assets/guides/zh/build-dialog.png differ
diff --git a/docs/astro/src/assets/guides/zh/flipbook.png b/docs/astro/src/assets/guides/zh/flipbook.png
new file mode 100644
index 000000000..c08dbda78
Binary files /dev/null and b/docs/astro/src/assets/guides/zh/flipbook.png differ
diff --git a/docs/astro/src/assets/guides/zh/lighting.png b/docs/astro/src/assets/guides/zh/lighting.png
new file mode 100644
index 000000000..2a695e79a
Binary files /dev/null and b/docs/astro/src/assets/guides/zh/lighting.png differ
diff --git a/docs/astro/src/assets/guides/zh/localization.png b/docs/astro/src/assets/guides/zh/localization.png
new file mode 100644
index 000000000..da79ecdc7
Binary files /dev/null and b/docs/astro/src/assets/guides/zh/localization.png differ
diff --git a/docs/astro/src/assets/guides/zh/particle-view.png b/docs/astro/src/assets/guides/zh/particle-view.png
new file mode 100644
index 000000000..244bdbe2c
Binary files /dev/null and b/docs/astro/src/assets/guides/zh/particle-view.png differ
diff --git a/docs/astro/src/assets/guides/zh/physics-collider.png b/docs/astro/src/assets/guides/zh/physics-collider.png
new file mode 100644
index 000000000..bd82b7bd8
Binary files /dev/null and b/docs/astro/src/assets/guides/zh/physics-collider.png differ
diff --git a/docs/astro/src/content/docs/guides/ai.mdx b/docs/astro/src/content/docs/guides/ai.mdx
index e8196b81d..f640434c6 100644
--- a/docs/astro/src/content/docs/guides/ai.mdx
+++ b/docs/astro/src/content/docs/guides/ai.mdx
@@ -259,6 +259,10 @@ only replans when the target actually moves or `repathInterval` elapses. Read
## State machines
+![The FSM editor — Patrol and Chase states linked by guarded transitions](../../../assets/guides/en/ai-fsm.png)
+
+*The state-machine editor: states (Patrol / Chase) linked by guarded transitions (`?seesPlayer`, `?lostPlayer`).*
+
A state machine is a set of **states** connected by guarded **transitions**. Exactly
one state is active; each tick, its outgoing transitions are checked in order and the
first enabled one is taken. Attach a `StateMachineAgent` and point it at a graph:
@@ -319,6 +323,10 @@ Guards compare a blackboard key with `==`, `!=`, `<`, `<=`, `>`, `>=`, `truthy`,
## Behavior trees
+![The behavior-tree editor — a Selector over a Sequence and a fallback action](../../../assets/guides/en/ai-bt.png)
+
+*The behavior-tree editor: a **Selector** root over a **Sequence** (Condition `seesPlayer` → Action `chase`) with a fallback `patrol` action.*
+
A behavior tree ticks from its **root** every frame and returns a `Status`. Composite
nodes control flow; decorators transform one child's result; leaves are your
registered actions and conditions. Attach a `BehaviorTreeAgent`:
diff --git a/docs/astro/src/content/docs/guides/animation.mdx b/docs/astro/src/content/docs/guides/animation.mdx
index 03d4ffe12..a42f86939 100644
--- a/docs/astro/src/content/docs/guides/animation.mdx
+++ b/docs/astro/src/content/docs/guides/animation.mdx
@@ -16,6 +16,10 @@ element while a sprite loops.
## Sprite animation
+![The flipbook editor — a 4-frame walk clip with per-frame timing and a live preview](../../../assets/guides/en/flipbook.png)
+
+*The flipbook editor: a 4-frame walk clip, per-frame durations, and a live preview with FPS / loop / onion-skin.*
+
The `SpriteAnimator` component plays named sprite-sheet clips (authored as
`anim-clip` assets). Switch clips by writing the component through a `Mut` query:
@@ -248,6 +252,10 @@ storing a handle to pause, cancel, or observe the composition later.
## Animator state machine
+![The animator editor — Idle / Move / Hop states with conditions and a parameters panel](../../../assets/guides/en/animator-graph.png)
+
+*The animator: states (Idle / Move / Hop), transitions with conditions (`speed>20`, the `hop` trigger), and the **Parameters** panel that drives them.*
+
For character animation, an **animator controller** holds states, transitions, and
1D blend trees driven by named **parameters**. Author it in the editor (or
register one in code), attach an `Animator` component naming the controller, then
diff --git a/docs/astro/src/content/docs/guides/build-export.mdx b/docs/astro/src/content/docs/guides/build-export.mdx
index 67f94ed3b..683f53807 100644
--- a/docs/astro/src/content/docs/guides/build-export.mdx
+++ b/docs/astro/src/content/docs/guides/build-export.mdx
@@ -12,6 +12,10 @@ the **same runtime you played in the editor**, so what you shipped is what you t
## Exporting from the editor
+![The Build dialog — platform picker, configuration, output, and cook options](../../../assets/guides/en/build-dialog.png)
+
+*The Build dialog: pick a **platform** (Web / Desktop / WeChat / Playable), a configuration, the output folder, and the cook options — then Build.*
+
<Steps>
1. Open **File → Build…** to bring up the **Package Project** dialog.
diff --git a/docs/astro/src/content/docs/guides/lighting.mdx b/docs/astro/src/content/docs/guides/lighting.mdx
index 675133a23..ef9b0a14e 100644
--- a/docs/astro/src/content/docs/guides/lighting.mdx
+++ b/docs/astro/src/content/docs/guides/lighting.mdx
@@ -199,6 +199,10 @@ const app = createWebApp(module, { colorSpace: 'linear' });
## In the editor
+![A 2D light in the editor viewport — its reach and the shadows its casters throw](../../../assets/guides/en/lighting.png)
+
+*A `Light2D` previewed in the editor — its reach pool and the shadows the pillars cast (turn on **Preview FX** to light the scene in edit mode).*
+
- **Add a light** via **Create… → Light**, or add a `Light2D` component to an existing
entity in the Details panel.
- Lights are drawn as **gizmos** in edit mode — an icon plus the reach circle and the
diff --git a/docs/astro/src/content/docs/guides/localization.mdx b/docs/astro/src/content/docs/guides/localization.mdx
index 6a6bcc74e..d0d0aa2a2 100644
--- a/docs/astro/src/content/docs/guides/localization.mdx
+++ b/docs/astro/src/content/docs/guides/localization.mdx
@@ -71,6 +71,10 @@ i18n.t('apples', { count: 3 }); // "3 apples"
## String tables (`.eslocale`)
+![A .eslocale string table in the inspector — keys with their values](../../../assets/guides/en/localization.png)
+
+*A `.eslocale` table in the inspector: each key's value for this locale, with the other locale shown beneath as a translation hint.*
+
Translations can ship as **data** instead of code: a `.eslocale` asset carries ONE
locale's catalog, so a game loads only the languages it needs.
diff --git a/docs/astro/src/content/docs/guides/particle.mdx b/docs/astro/src/content/docs/guides/particle.mdx
index ca2630b66..482fd28a0 100644
--- a/docs/astro/src/content/docs/guides/particle.mdx
+++ b/docs/astro/src/content/docs/guides/particle.mdx
@@ -208,6 +208,10 @@ See [Per-particle trails](#per-particle-trails) below.
## Emitter shapes
+![Emitter shape gizmos in the viewport — a cone, a circle, and a rectangle](../../../assets/guides/en/particle-view.png)
+
+*Emitter shape gizmos in the viewport — a cone, a circle, and a rectangle, each drawn where its particles spawn (turn on **Preview FX** to see them run in edit mode).*
+
`EmitterShape` sets the spawn region and initial direction:
| Shape | Uses | Behavior |
diff --git a/docs/astro/src/content/docs/guides/physics.mdx b/docs/astro/src/content/docs/guides/physics.mdx
index 54b5379a7..bb1f92cbe 100644
--- a/docs/astro/src/content/docs/guides/physics.mdx
+++ b/docs/astro/src/content/docs/guides/physics.mdx
@@ -57,6 +57,10 @@ queries and the character controller = pixels.**
## Bodies & colliders
+![Collider gizmos in the editor viewport — the selected Ground's outline plus walls and a ramp](../../../assets/guides/en/physics-collider.png)
+
+*Collider gizmos in the viewport: the selected **Ground**'s box outline (amber) plus the walls and ramp. Toggle them with the viewport's Physics show-flag.*
+
Attach a `RigidBody` plus one collider shape. **Collider dimensions are in meters,
not pixels** — divide pixel sizes by your pixels-per-unit (see [Units](#units)).
Spawn from a system that takes `Commands()`:
diff --git a/docs/astro/src/content/docs/zh-cn/guides/ai.mdx b/docs/astro/src/content/docs/zh-cn/guides/ai.mdx
index d42eac693..626fc7d4e 100644
--- a/docs/astro/src/content/docs/zh-cn/guides/ai.mdx
+++ b/docs/astro/src/content/docs/zh-cn/guides/ai.mdx
@@ -237,6 +237,10 @@ stopNavAgent(world, entity);
## 状态机
+![状态机编辑器——Patrol 与 Chase 状态由带守卫的转移连接](../../../../assets/guides/zh/ai-fsm.png)
+
+*状态机编辑器:状态(Patrol / Chase)由带守卫的转移(`?seesPlayer`、`?lostPlayer`)连接。*
+
状态机是一组由带守卫的**转移**连接起来的**状态**。任一时刻恰好一个状态处于激活;每个 tick,
它的出边按顺序被检查,第一条满足条件的被采用。加一个 `StateMachineAgent` 并指向一个图:
@@ -294,6 +298,10 @@ registerFsm('guard', {
## 行为树
+![行为树编辑器——Selector 之下是 Sequence 与一个兜底动作](../../../../assets/guides/zh/ai-bt.png)
+
+*行为树编辑器:**Selector** 根之下是一个 **Sequence**(Condition `seesPlayer` → Action `chase`),外加兜底的 `patrol` 动作。*
+
行为树每帧从**根**开始 tick 并返回一个 `Status`。组合节点控制流程;装饰器变换其唯一子节点的
结果;叶子是你注册的动作和条件。加一个 `BehaviorTreeAgent`:
diff --git a/docs/astro/src/content/docs/zh-cn/guides/animation.mdx b/docs/astro/src/content/docs/zh-cn/guides/animation.mdx
index d4856765b..56efe99fe 100644
--- a/docs/astro/src/content/docs/zh-cn/guides/animation.mdx
+++ b/docs/astro/src/content/docs/zh-cn/guides/animation.mdx
@@ -15,6 +15,10 @@ Estella 有三套动画系统,各司其职:
## 精灵动画
+![翻页书编辑器——4 帧行走片段,带逐帧时长与实时预览](../../../../assets/guides/zh/flipbook.png)
+
+*翻页书编辑器:一个 4 帧行走片段、逐帧时长,以及带 FPS / 循环 / 洋葱皮的实时预览。*
+
`SpriteAnimator` 组件播放命名的精灵表片段(作为 `anim-clip` 资源编辑)。通过 `Mut` 查询
写组件来切换片段:
@@ -233,6 +237,10 @@ tween.sequence([
## 动画状态机
+![动画控制器编辑器——Idle / Move / Hop 状态,带条件与参数面板](../../../../assets/guides/zh/animator-graph.png)
+
+*动画控制器:状态(Idle / Move / Hop)、带条件的转移(`speed>20`、`hop` 触发器),以及驱动它们的**参数**面板。*
+
角色动画用一个**动画控制器**:它持有状态、转移和由命名**参数**驱动的 1D 混合树。在编辑器
里编辑它(或用代码注册),给实体加一个指明控制器名的 `Animator` 组件,然后每帧通过
`Res(AnimatorController)` 设置参数——控制器会解析出当前状态、片段与混合:
diff --git a/docs/astro/src/content/docs/zh-cn/guides/build-export.mdx b/docs/astro/src/content/docs/zh-cn/guides/build-export.mdx
index 8cf54b7ad..f6355acce 100644
--- a/docs/astro/src/content/docs/zh-cn/guides/build-export.mdx
+++ b/docs/astro/src/content/docs/zh-cn/guides/build-export.mdx
@@ -11,6 +11,10 @@ import { Aside, Steps } from '@astrojs/starlight/components';
## 从编辑器导出
+![打包对话框——平台选择器、配置、输出与 cook 选项](../../../../assets/guides/zh/build-dialog.png)
+
+*打包对话框:选一个**平台**(Web / 桌面 / 微信 / Playable)、一个配置、输出目录,以及 cook 选项——然后构建。*
+
<Steps>
1. 打开 **文件 → Build…** 调出 **打包项目(Package Project)** 对话框。
diff --git a/docs/astro/src/content/docs/zh-cn/guides/lighting.mdx b/docs/astro/src/content/docs/zh-cn/guides/lighting.mdx
index e60895c09..c8a83cb60 100644
--- a/docs/astro/src/content/docs/zh-cn/guides/lighting.mdx
+++ b/docs/astro/src/content/docs/zh-cn/guides/lighting.mdx
@@ -189,6 +189,10 @@ const app = createWebApp(module, { colorSpace: 'linear' });
## 在编辑器里
+![编辑器视口里的 2D 光——它的照射范围与投射的阴影](../../../../assets/guides/zh/lighting.png)
+
+*编辑器里预览的 `Light2D`——它的照射光池,以及柱子投出的阴影(开 **Preview FX** 可在编辑态点亮场景)。*
+
- 通过 **创建… → 光** 添加光源,或在 Details 面板里给已有实体加一个 `Light2D` 组件。
- 光源在编辑模式下画成 **gizmo**——图标加上其范围圈和朝向/锥——所以你能凭眼睛瞄准和调尺寸。见
[编辑器](/docs/zh-cn/guides/editor/)。
diff --git a/docs/astro/src/content/docs/zh-cn/guides/localization.mdx b/docs/astro/src/content/docs/zh-cn/guides/localization.mdx
index e696a73d2..2f444a377 100644
--- a/docs/astro/src/content/docs/zh-cn/guides/localization.mdx
+++ b/docs/astro/src/content/docs/zh-cn/guides/localization.mdx
@@ -66,6 +66,10 @@ i18n.t('apples', { count: 3 }); // "3 apples"
## 字符串表(`.eslocale`)
+![检视器里的 .eslocale 字符串表——key 与它们的值](../../../../assets/guides/zh/localization.png)
+
+*检视器里的 `.eslocale` 表:每个 key 在当前语言下的值,下方以另一种语言作为翻译提示。*
+
翻译可以作为**数据**发布,而不是写死在代码里:一个 `.eslocale` 资产装着一种语言的目录,
游戏只加载它需要的语言。
diff --git a/docs/astro/src/content/docs/zh-cn/guides/particle.mdx b/docs/astro/src/content/docs/zh-cn/guides/particle.mdx
index af8e59d43..b9fadebb7 100644
--- a/docs/astro/src/content/docs/zh-cn/guides/particle.mdx
+++ b/docs/astro/src/content/docs/zh-cn/guides/particle.mdx
@@ -199,6 +199,10 @@ const spawnEmbers = defineSystem([Commands()], (cmds) => {
## 发射器形状
+![视口里的发射器形状 gizmo——锥形、圆形、矩形](../../../../assets/guides/zh/particle-view.png)
+
+*视口里的发射器形状 gizmo——锥形、圆形、矩形,各自画在粒子生成的位置(开 **Preview FX** 可在编辑态看它们运行)。*
+
`EmitterShape` 设定生成区域与初始方向:
| 形状 | 使用 | 行为 |
diff --git a/docs/astro/src/content/docs/zh-cn/guides/physics.mdx b/docs/astro/src/content/docs/zh-cn/guides/physics.mdx
index f73d3c982..02eea8018 100644
--- a/docs/astro/src/content/docs/zh-cn/guides/physics.mdx
+++ b/docs/astro/src/content/docs/zh-cn/guides/physics.mdx
@@ -51,6 +51,10 @@ physics.applyImpulse(e, { x: 0, y: jumpPx / ppu }); // px/s → m/s
## 刚体与碰撞体
+![编辑器视口里的碰撞体 gizmo——选中的 Ground 轮廓加墙体与斜坡](../../../../assets/guides/zh/physics-collider.png)
+
+*视口里的碰撞体 gizmo:选中的 **Ground** 的盒形轮廓(琥珀色),以及墙体与斜坡。用视口的物理显示开关切换。*
+
加一个 `RigidBody` 再加一个碰撞体形状。**碰撞体尺寸以米计,不是像素**——把像素尺寸除以你的
每单位像素数(见[单位](#单位))。从一个取 `Commands()` 的系统里生成: