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.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
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.pngnew file mode 100644index 000000000..74db77ee0Binary files /dev/null and b/docs/astro/src/assets/guides/en/ai-bt.png differdiff --git a/docs/astro/src/assets/guides/en/ai-fsm.png b/docs/astro/src/assets/guides/en/ai-fsm.pngnew file mode 100644index 000000000..36983d4acBinary files /dev/null and b/docs/astro/src/assets/guides/en/ai-fsm.png differdiff --git a/docs/astro/src/assets/guides/en/animator-graph.png b/docs/astro/src/assets/guides/en/animator-graph.pngnew file mode 100644index 000000000..11bcf706bBinary files /dev/null and b/docs/astro/src/assets/guides/en/animator-graph.png differdiff --git a/docs/astro/src/assets/guides/en/build-dialog.png b/docs/astro/src/assets/guides/en/build-dialog.pngnew file mode 100644index 000000000..a4c8f3964Binary files /dev/null and b/docs/astro/src/assets/guides/en/build-dialog.png differdiff --git a/docs/astro/src/assets/guides/en/flipbook.png b/docs/astro/src/assets/guides/en/flipbook.pngnew file mode 100644index 000000000..74d5a42a1Binary files /dev/null and b/docs/astro/src/assets/guides/en/flipbook.png differdiff --git a/docs/astro/src/assets/guides/en/lighting.png b/docs/astro/src/assets/guides/en/lighting.pngnew file mode 100644index 000000000..dba9dec96Binary files /dev/null and b/docs/astro/src/assets/guides/en/lighting.png differdiff --git a/docs/astro/src/assets/guides/en/localization.png b/docs/astro/src/assets/guides/en/localization.pngnew file mode 100644index 000000000..54987d23eBinary files /dev/null and b/docs/astro/src/assets/guides/en/localization.png differdiff --git a/docs/astro/src/assets/guides/en/particle-view.png b/docs/astro/src/assets/guides/en/particle-view.pngnew file mode 100644index 000000000..eb3178dd9Binary files /dev/null and b/docs/astro/src/assets/guides/en/particle-view.png differdiff --git a/docs/astro/src/assets/guides/en/physics-collider.png b/docs/astro/src/assets/guides/en/physics-collider.pngnew file mode 100644index 000000000..0240d16c0Binary files /dev/null and b/docs/astro/src/assets/guides/en/physics-collider.png differdiff --git a/docs/astro/src/assets/guides/zh/ai-bt.png b/docs/astro/src/assets/guides/zh/ai-bt.pngnew file mode 100644index 000000000..7cd45b7d8Binary files /dev/null and b/docs/astro/src/assets/guides/zh/ai-bt.png differdiff --git a/docs/astro/src/assets/guides/zh/ai-fsm.png b/docs/astro/src/assets/guides/zh/ai-fsm.pngnew file mode 100644index 000000000..41f99857fBinary files /dev/null and b/docs/astro/src/assets/guides/zh/ai-fsm.png differdiff --git a/docs/astro/src/assets/guides/zh/animator-graph.png b/docs/astro/src/assets/guides/zh/animator-graph.pngnew file mode 100644index 000000000..39adb819fBinary files /dev/null and b/docs/astro/src/assets/guides/zh/animator-graph.png differdiff --git a/docs/astro/src/assets/guides/zh/build-dialog.png b/docs/astro/src/assets/guides/zh/build-dialog.pngnew file mode 100644index 000000000..a3d75ce28Binary files /dev/null and b/docs/astro/src/assets/guides/zh/build-dialog.png differdiff --git a/docs/astro/src/assets/guides/zh/flipbook.png b/docs/astro/src/assets/guides/zh/flipbook.pngnew file mode 100644index 000000000..c08dbda78Binary files /dev/null and b/docs/astro/src/assets/guides/zh/flipbook.png differdiff --git a/docs/astro/src/assets/guides/zh/lighting.png b/docs/astro/src/assets/guides/zh/lighting.pngnew file mode 100644index 000000000..2a695e79aBinary files /dev/null and b/docs/astro/src/assets/guides/zh/lighting.png differdiff --git a/docs/astro/src/assets/guides/zh/localization.png b/docs/astro/src/assets/guides/zh/localization.pngnew file mode 100644index 000000000..da79ecdc7Binary files /dev/null and b/docs/astro/src/assets/guides/zh/localization.png differdiff --git a/docs/astro/src/assets/guides/zh/particle-view.png b/docs/astro/src/assets/guides/zh/particle-view.pngnew file mode 100644index 000000000..244bdbe2cBinary files /dev/null and b/docs/astro/src/assets/guides/zh/particle-view.png differdiff --git a/docs/astro/src/assets/guides/zh/physics-collider.png b/docs/astro/src/assets/guides/zh/physics-collider.pngnew file mode 100644index 000000000..bd82b7bd8Binary files /dev/null and b/docs/astro/src/assets/guides/zh/physics-collider.png differdiff --git a/docs/astro/src/content/docs/guides/ai.mdx b/docs/astro/src/content/docs/guides/ai.mdxindex 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 state-machine editor: states (Patrol / Chase) linked by guarded transitions (`?seesPlayer`, `?lostPlayer`).*+A state machine is a set of **states** connected by guarded **transitions**. Exactlyone state is active; each tick, its outgoing transitions are checked in order and thefirst 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** 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`. Compositenodes control flow; decorators transform one child's result; leaves are yourregistered 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.mdxindex 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, 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: 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, and1D blend trees driven by named **parameters**. Author it in the editor (orregister one in code), attach an `Animator` component naming the controller, thendiff --git a/docs/astro/src/content/docs/guides/build-export.mdx b/docs/astro/src/content/docs/guides/build-export.mdxindex 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: 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.mdxindex 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 `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 existingentity in the Details panel.- Lights are drawn as **gizmos** in edit mode — an icon plus the reach circle and thediff --git a/docs/astro/src/content/docs/guides/localization.mdx b/docs/astro/src/content/docs/guides/localization.mdxindex 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` 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 ONElocale'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.mdxindex 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, 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.mdxindex 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 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.mdxindex 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)由带守卫的转移(`?seesPlayer`、`?lostPlayer`)连接。*+状态机是一组由带守卫的**转移**连接起来的**状态**。任一时刻恰好一个状态处于激活;每个 tick,它的出边按顺序被检查,第一条满足条件的被采用。加一个 `StateMachineAgent` 并指向一个图:@@ -294,6 +298,10 @@ registerFsm('guard', {## 行为树+++*行为树编辑器:**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.mdxindex 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 帧行走片段、逐帧时长,以及带 FPS / 循环 / 洋葱皮的实时预览。*+`SpriteAnimator` 组件播放命名的精灵表片段(作为 `anim-clip` 资源编辑)。通过 `Mut` 查询写组件来切换片段:@@ -233,6 +237,10 @@ tween.sequence([## 动画状态机+++*动画控制器:状态(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.mdxindex 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';## 从编辑器导出+++*打包对话框:选一个**平台**(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.mdxindex 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' });## 在编辑器里+++*编辑器里预览的 `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.mdxindex 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 在当前语言下的值,下方以另一种语言作为翻译提示。*+翻译可以作为**数据**发布,而不是写死在代码里:一个 `.eslocale` 资产装着一种语言的目录,游戏只加载它需要的语言。diff --git a/docs/astro/src/content/docs/zh-cn/guides/particle.mdx b/docs/astro/src/content/docs/zh-cn/guides/particle.mdxindex 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——锥形、圆形、矩形,各自画在粒子生成的位置(开 **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.mdxindex 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** 的盒形轮廓(琥珀色),以及墙体与斜坡。用视口的物理显示开关切换。*+加一个 `RigidBody` 再加一个碰撞体形状。**碰撞体尺寸以米计,不是像素**——把像素尺寸除以你的每单位像素数(见[单位](#单位))。从一个取 `Commands()` 的系统里生成: