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: one structural rule, and a gate that holds it

yhh8492bf8417fd
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 5c28d1746..a6004007d 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -54,6 +54,12 @@ jobs:
working-directory: docs/astro
run: npm run verify:imports
+ # Reads source, so it runs before the build: a page in no sidebar group, or
+ # one that exists in only one language, fails here rather than shipping.
+ - name: Verify the sidebar, the filesystem and both locales agree
+ working-directory: docs/astro
+ run: npm run verify:structure
+
- name: Build Astro Site
working-directory: docs/astro
run: npm run build
diff --git a/docs/SITE.md b/docs/SITE.md
index 1a367dd05..62bcc6275 100644
--- a/docs/SITE.md
+++ b/docs/SITE.md
@@ -83,16 +83,25 @@ This will:
## Writing Documentation
+### The one structural rule
+
+**A page's directory path is its sidebar path is its URL.** A sidebar group is a
+directory (`editor/`, `scripting/`, `graphics/`, …); a subgroup inside one is a
+directory inside it (`gameplay/ai/`); and a group's general page is
+`<dir>/overview.mdx`, labelled **Overview** in the sidebar because the group
+header already says the topic — its `title` stays descriptive, since that is the
+page's own heading. Nothing else decides where a file goes.
+
+Depth is free: images are referenced through the `@/` alias
+(`![](@/assets/guides/en/foo.png)`), not by counting `../`, so a page can move
+between levels without its pictures going dark.
+
### Adding a New Guide
-1. Create a new `.mdx` file under the section it belongs to —
- `astro/src/content/docs/<section>/`, where `<section>` is one of
+1. Create the `.mdx` under the group it belongs to — sections today are
`getting-started`, `editor`, `core-concepts`, `scripting`, `graphics`,
`animation`, `gameplay`, `ui`, `world`, `assets`, `publishing`,
- `performance` or `extending`. A page's directory IS its sidebar group and
- its URL: keep them the same, and keep every page exactly one level deep
- (`<section>/<page>.mdx`) so the relative `../../../../assets/` image paths
- resolve.
+ `performance`, `extending` and `reference`.
2. Add frontmatter:
```mdx
---
@@ -102,14 +111,23 @@ This will:
Your content here...
```
-3. Add to the matching sidebar group in `astro/astro.config.mjs`, and write the
- Simplified Chinese page at `astro/src/content/docs/zh-cn/<section>/<page>.mdx`
-4. If you rename or move a page, add its old path to `redirects` in
- `astro/astro.config.mjs` — published URLs must keep working
-4. Keep code samples accurate: every symbol a guide imports from the main `esengine`
- barrel must be a real SDK export. `npm run verify:imports` (from `docs/astro/`)
- checks this against the exports declared in `sdk/src` and runs in CI before the
- site build, so a renamed or fabricated API fails the docs deploy.
+3. Add it to the matching sidebar group in `astro/astro.config.mjs`, and write the
+ Simplified Chinese page at `astro/src/content/docs/zh-cn/<same path>.mdx`.
+4. If you move or rename a page, append its old path to `MOVED` in
+ `astro/astro.config.mjs`. That map is append-only — a URL published once keeps
+ resolving.
+
+### The gates
+
+Three checks keep the site honest; all three run in CI, and all three are worth
+running locally before a docs PR.
+
+| Check | Run from | Catches |
+|---|---|---|
+| `npm run verify:imports` | `docs/astro` | A guide importing a symbol the SDK does not export — a renamed or invented API. Runs before the build. |
+| `npm run verify:structure` | `docs/astro` | The rule above going soft: a page in no sidebar group, a sidebar entry with no page, a group page not labelled Overview, or a page that exists in only one language. Runs before the build. |
+| `npm run verify:links` | `docs/astro` | Any in-site link or `#anchor` that does not resolve against the pages the build emitted, including a root-relative link that forgot the `/docs` base. Runs **after** the build. |
+| `node tools/component-reference.mjs --check` | repo root | The component reference disagreeing with the engine's component registry, or a component with no entry in `src/data/componentDocs.ts`. Part of `pnpm run verify`, so pre-push catches it. Refresh with `--update` after building the SDK. |
### Available Components
diff --git a/docs/astro/astro.config.mjs b/docs/astro/astro.config.mjs
index b1fe4e20d..af7b62b8e 100644
--- a/docs/astro/astro.config.mjs
+++ b/docs/astro/astro.config.mjs
@@ -1,16 +1,29 @@
// @ts-check
+import { fileURLToPath } from 'node:url';
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightTypeDoc, { typeDocSidebarGroup } from 'starlight-typedoc';
const SITE = 'https://estellaengine.com';
-// Pages that used to live in one flat `guides/` folder, and now live in the
-// section the sidebar shows them under — a page's directory is its URL. Every
-// old address stays reachable: Astro emits a redirect page for each entry, in
-// both locales. Never delete a line from here; moving a page again means adding
-// one, so a URL published once keeps resolving.
-const MOVED_GUIDES = {
+// Every address this site has published that is not where its page lives now.
+// A page's directory path IS its sidebar path IS its URL — that is the rule the
+// structure follows, and this map is the cost of having changed it. Append-only:
+// moving a page again means adding lines here, never editing or deleting them,
+// so a URL published once keeps resolving. Astro emits a redirect page per entry
+// in both locales.
+const MOVED = {
+ // The AI guide grew into a chapter of its own.
+ 'gameplay/ai': 'gameplay/ai/overview',
+ 'gameplay/ai-perception': 'gameplay/ai/perception',
+ 'gameplay/ai-navigation': 'gameplay/ai/navigation',
+ 'gameplay/ai-state-machines': 'gameplay/ai/state-machines',
+ 'gameplay/ai-behavior-trees': 'gameplay/ai/behavior-trees',
+ 'gameplay/ai-blackboard': 'gameplay/ai/blackboard',
+ 'gameplay/ai-authoring': 'gameplay/ai/authoring',
+ 'gameplay/ai-advanced': 'gameplay/ai/advanced',
+
+ // One flat `guides/` folder became one directory per sidebar group.
'guides/editor': 'editor/overview',
'guides/scripting': 'scripting/overview',
'guides/input': 'scripting/input',
@@ -31,7 +44,7 @@ const MOVED_GUIDES = {
'guides/dragonbones': 'animation/dragonbones',
'guides/physics': 'gameplay/physics',
'guides/markers': 'gameplay/markers',
- 'guides/ai': 'gameplay/ai',
+ 'guides/ai': 'gameplay/ai/overview',
'guides/ui': 'ui/overview',
'guides/ui-layout': 'ui/layout',
'guides/ui-text': 'ui/text',
@@ -66,11 +79,21 @@ export default defineConfig({
site: SITE,
base: '/docs',
outDir: './dist',
+ // `@/` is src, the same alias the editor uses. An image referenced as
+ // `../../../assets/…` encodes how deep its page sits, so a page could not move
+ // between directory levels without every picture on it going dark — which is
+ // why the guides were pinned one level deep. The alias is what lets the
+ // structure be chosen for the reader instead of for the asset paths.
+ vite: {
+ resolve: {
+ alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) },
+ },
+ },
// Astro prepends `base` to a redirect's SOURCE but not to its destination, so
// the destination carries /docs itself — without it every old URL lands on a
// 404 at the site root.
redirects: Object.fromEntries(
- Object.entries(MOVED_GUIDES).flatMap(([from, to]) => [
+ Object.entries(MOVED).flatMap(([from, to]) => [
[`/${from}`, `/docs/${to}/`],
[`/zh-cn/${from}`, `/docs/zh-cn/${to}/`],
]),
@@ -166,7 +189,7 @@ export default defineConfig({
translations: { 'zh-CN': '脚本' },
collapsed: true,
items: [
- { label: 'Scripting', translations: { 'zh-CN': '脚本' }, slug: 'scripting/overview' },
+ { label: 'Overview', translations: { 'zh-CN': '总览' }, slug: 'scripting/overview' },
{ label: 'Input', translations: { 'zh-CN': '输入' }, slug: 'scripting/input' },
{ label: 'Event Binding', translations: { 'zh-CN': '事件绑定' }, slug: 'scripting/events' },
{ label: 'Saving & Loading', translations: { 'zh-CN': '存档与读档' }, slug: 'scripting/save' },
@@ -193,7 +216,7 @@ export default defineConfig({
translations: { 'zh-CN': '动画' },
collapsed: true,
items: [
- { label: 'Animation', translations: { 'zh-CN': '动画' }, slug: 'animation/overview' },
+ { label: 'Overview', translations: { 'zh-CN': '总览' }, slug: 'animation/overview' },
{ label: 'Timeline', translations: { 'zh-CN': '时间轴' }, slug: 'animation/timeline' },
{ label: 'Spine Animation', translations: { 'zh-CN': 'Spine 动画' }, slug: 'animation/spine' },
{ label: 'DragonBones Animation', translations: { 'zh-CN': 'DragonBones 动画' }, slug: 'animation/dragonbones' },
@@ -211,14 +234,14 @@ export default defineConfig({
translations: { 'zh-CN': '游戏 AI' },
collapsed: true,
items: [
- { label: 'Overview', translations: { 'zh-CN': '总览' }, slug: 'gameplay/ai' },
- { label: 'Perception', translations: { 'zh-CN': '感知' }, slug: 'gameplay/ai-perception' },
- { label: 'Navigation', translations: { 'zh-CN': '导航' }, slug: 'gameplay/ai-navigation' },
- { label: 'State Machines', translations: { 'zh-CN': '状态机' }, slug: 'gameplay/ai-state-machines' },
- { label: 'Behavior Trees', translations: { 'zh-CN': '行为树' }, slug: 'gameplay/ai-behavior-trees' },
- { label: 'The Blackboard', translations: { 'zh-CN': '黑板' }, slug: 'gameplay/ai-blackboard' },
- { label: 'Authoring in the Editor', translations: { 'zh-CN': '在编辑器里编排' }, slug: 'gameplay/ai-authoring' },
- { label: 'Below the Components', translations: { 'zh-CN': '组件层之下' }, slug: 'gameplay/ai-advanced' },
+ { label: 'Overview', translations: { 'zh-CN': '总览' }, slug: 'gameplay/ai/overview' },
+ { label: 'Perception', translations: { 'zh-CN': '感知' }, slug: 'gameplay/ai/perception' },
+ { label: 'Navigation', translations: { 'zh-CN': '导航' }, slug: 'gameplay/ai/navigation' },
+ { label: 'State Machines', translations: { 'zh-CN': '状态机' }, slug: 'gameplay/ai/state-machines' },
+ { label: 'Behavior Trees', translations: { 'zh-CN': '行为树' }, slug: 'gameplay/ai/behavior-trees' },
+ { label: 'The Blackboard', translations: { 'zh-CN': '黑板' }, slug: 'gameplay/ai/blackboard' },
+ { label: 'Authoring in the Editor', translations: { 'zh-CN': '在编辑器里编排' }, slug: 'gameplay/ai/authoring' },
+ { label: 'Below the Components', translations: { 'zh-CN': '组件层之下' }, slug: 'gameplay/ai/advanced' },
],
},
],
@@ -255,7 +278,7 @@ export default defineConfig({
translations: { 'zh-CN': '资源' },
collapsed: true,
items: [
- { label: 'Assets', translations: { 'zh-CN': '资源' }, slug: 'assets/overview' },
+ { label: 'Overview', translations: { 'zh-CN': '总览' }, slug: 'assets/overview' },
{ label: 'Audio', translations: { 'zh-CN': '音频' }, slug: 'assets/audio' },
{ label: 'Localization', translations: { 'zh-CN': '本地化' }, slug: 'assets/localization' },
],
@@ -265,7 +288,7 @@ export default defineConfig({
translations: { 'zh-CN': '发布' },
collapsed: true,
items: [
- { label: 'Building & Exporting', translations: { 'zh-CN': '构建与导出' }, slug: 'publishing/overview' },
+ { label: 'Overview', translations: { 'zh-CN': '总览' }, slug: 'publishing/overview' },
{ label: 'Android & iOS', translations: { 'zh-CN': 'Android 与 iOS' }, slug: 'publishing/android-ios' },
{ label: 'WeChat MiniGame', translations: { 'zh-CN': '微信小游戏' }, slug: 'publishing/wechat' },
{ label: 'Mini-Game Platforms', translations: { 'zh-CN': '小游戏平台' }, slug: 'publishing/minigame-platforms' },
diff --git a/docs/astro/package.json b/docs/astro/package.json
index 6b15c14a5..29e4cb02b 100644
--- a/docs/astro/package.json
+++ b/docs/astro/package.json
@@ -9,6 +9,7 @@
"preview": "astro preview",
"check": "astro check",
"verify:imports": "node scripts/verify-doc-imports.mjs",
+ "verify:structure": "node scripts/verify-doc-structure.mjs",
"verify:links": "node scripts/verify-doc-links.mjs"
},
"dependencies": {
diff --git a/docs/astro/scripts/verify-doc-structure.mjs b/docs/astro/scripts/verify-doc-structure.mjs
new file mode 100644
index 000000000..5ec633a4b
--- /dev/null
+++ b/docs/astro/scripts/verify-doc-structure.mjs
@@ -0,0 +1,88 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
+/**
+ * @file verify-doc-structure.mjs
+ * @brief Enforce the site's one structural rule.
+ *
+ * A page's directory path is its sidebar path is its URL. That rule is what
+ * makes a URL say where a page lives, and it only holds while three things
+ * agree: the sidebar in `astro.config.mjs`, the files on disk, and the two
+ * locales. Nothing else notices when they drift — Astro fails on a sidebar entry
+ * naming a page that does not exist, but a page in no sidebar group builds
+ * happily and is reachable only by search, and an English page with no Chinese
+ * translation silently serves English to a Chinese reader.
+ *
+ * Run from `docs/astro/`, before or after the build — it reads source, not dist:
+ *
+ * node scripts/verify-doc-structure.mjs
+ */
+import { readFileSync, readdirSync, existsSync } from 'node:fs';
+import { fileURLToPath } from 'node:url';
+import { dirname, join, relative, sep } from 'node:path';
+
+const here = dirname(fileURLToPath(import.meta.url));
+const ROOT = join(here, '..');
+const DOCS = join(ROOT, 'src', 'content', 'docs');
+const CONFIG = join(ROOT, 'astro.config.mjs');
+
+/** Generated by TypeDoc, and not ours to organise. */
+const GENERATED = 'api-ts';
+/** The splash page, which is the site root rather than a sidebar entry. */
+const ROOT_PAGE = 'index';
+
+/** Every .mdx under `dir`, as slugs relative to it. */
+function pages(dir) {
+ const out = [];
+ const walk = (d) => {
+ for (const e of readdirSync(d, { withFileTypes: true })) {
+ const p = join(d, e.name);
+ if (e.isDirectory()) {
+ if (e.name !== GENERATED && e.name !== 'zh-cn') walk(p);
+ } else if (e.name.endsWith('.mdx')) {
+ out.push(relative(dir, p).split(sep).join('/').replace(/\.mdx$/, ''));
+ }
+ }
+ };
+ walk(dir);
+ return out;
+}
+
+const config = readFileSync(CONFIG, 'utf8');
+const slugs = [...config.matchAll(/slug: '([a-z0-9/-]+)'/g)].map((m) => m[1]);
+const problems = [];
+
+// The sidebar names pages that exist, in both locales.
+for (const slug of slugs) {
+ for (const [label, prefix] of [['English', ''], ['Chinese', 'zh-cn/']]) {
+ if (!existsSync(join(DOCS, `${prefix}${slug}.mdx`))) {
+ problems.push(`the sidebar lists "${slug}", which has no ${label} page`);
+ }
+ }
+}
+
+// Every page is somewhere in the sidebar. A page reachable only by search is a
+// page nobody browsing the manual will find.
+const seen = new Set(slugs);
+for (const p of pages(DOCS)) {
+ if (p !== ROOT_PAGE && !seen.has(p)) problems.push(`page "${p}" is in no sidebar group`);
+}
+
+// A group's general page is `<dir>/overview` and is labelled Overview — the
+// group header already says the topic. (Its `title` stays descriptive.)
+for (const m of config.matchAll(/\{ label: '([^']+)',[^}]*slug: '([a-z0-9/-]+\/overview)'/g)) {
+ if (m[1] !== 'Overview') problems.push(`"${m[2]}" is labelled "${m[1]}" in the sidebar, not Overview`);
+}
+
+// The locales are mirrors: same tree, same names.
+const en = new Set(pages(DOCS));
+const zh = new Set(pages(join(DOCS, 'zh-cn')));
+for (const p of en) if (!zh.has(p)) problems.push(`no Chinese page for "${p}"`);
+for (const p of zh) if (!en.has(p)) problems.push(`no English page for "${p}"`);
+
+if (problems.length) {
+ console.error(`doc structure: ${problems.length} problem(s)`);
+ for (const p of problems) console.error(` ${p}`);
+ console.error('\n The rule: a page\'s directory path is its sidebar path is its URL (docs/SITE.md).');
+ process.exit(1);
+}
+console.log(`doc structure: ${en.size} pages × 2 locales — sidebar, filesystem and translations agree.`);
diff --git a/docs/astro/src/components/ComponentReference.astro b/docs/astro/src/components/ComponentReference.astro
index 60f1da836..0e7a96b7c 100644
--- a/docs/astro/src/components/ComponentReference.astro
+++ b/docs/astro/src/components/ComponentReference.astro
@@ -3,8 +3,8 @@
// its fields, types and authoring defaults. The field data is derived from the
// engine's own registry (tools/component-reference.mjs), so it cannot drift from
// the code; the summary and the link to the guide come from the curated table.
-import { COMPONENT_DOCS, CATEGORY_LABELS, type ComponentCategory } from '../data/componentDocs';
-import snapshot from '../data/components.generated.json';
+import { COMPONENT_DOCS, CATEGORY_LABELS, type ComponentCategory } from '@/data/componentDocs';
+import snapshot from '@/data/components.generated.json';
interface Props {
category: ComponentCategory;
diff --git a/docs/astro/src/content/docs/animation/dragonbones.mdx b/docs/astro/src/content/docs/animation/dragonbones.mdx
index 50e74388e..d2b42c136 100644
--- a/docs/astro/src/content/docs/animation/dragonbones.mdx
+++ b/docs/astro/src/content/docs/animation/dragonbones.mdx
@@ -44,7 +44,7 @@ You do not need to reference it anywhere.
Add it with **Create → DragonBones**, or add the component to an existing entity.
It lives in the main `esengine` package.
-![The DragonBonesAnimation component in the Details panel — asset slots for the skeleton and atlas, and Armature and Animation dropdowns filled from the file](../../../assets/guides/en/dragonbones-inspector.png)
+![The DragonBonesAnimation component in the Details panel — asset slots for the skeleton and atlas, and Armature and Animation dropdowns filled from the file](@/assets/guides/en/dragonbones-inspector.png)
| Property | Type | Default | Description |
|---|---|---|---|
@@ -164,7 +164,7 @@ Nothing is required to opt in — it follows from the pair the components refere
Per-entity properties stay per entity, so a shared skeleton can still be scaled,
flipped and tinted independently:
-![Two DragonBoy armatures from one file — the second scaled down and mirrored through component fields alone](../../../assets/guides/en/dragonbones-shared.png)
+![Two DragonBoy armatures from one file — the second scaled down and mirrored through component fields alone](@/assets/guides/en/dragonbones-shared.png)
## What ships in a build
diff --git a/docs/astro/src/content/docs/animation/overview.mdx b/docs/astro/src/content/docs/animation/overview.mdx
index 048127f08..95dc5425c 100644
--- a/docs/astro/src/content/docs/animation/overview.mdx
+++ b/docs/astro/src/content/docs/animation/overview.mdx
@@ -16,7 +16,7 @@ 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 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.*
@@ -187,7 +187,7 @@ const registerRun = defineSystem([Res(Assets), Res(SpriteAnimation)], async (ass
### Driving clips from a state machine — no code
-The [FSM/BT built-ins](/docs/gameplay/ai/) drive flipbooks as data. An action's
+The [FSM/BT built-ins](/docs/gameplay/ai/overview/) drive flipbooks as data. An action's
optional **argument** carries the clip, so idle/run/attack switching is pure
`.esfsm` on the existing state-machine canvas:
@@ -243,7 +243,7 @@ const animate = defineSystem([Res(Tween)], (tween) => {
(`EaseIn*` / `EaseOut*` / `EaseInOut*`), `EaseOutBounce`, `Step`, and `CubicBezier`
— use a custom bezier with the handle's `.bezier(p1x, p1y, p2x, p2y)`.
-![Every EasingType plotted as a curve from 0 to 1](../../../assets/guides/tween-easings.svg)
+![Every EasingType plotted as a curve from 0 to 1](@/assets/guides/tween-easings.svg)
*Each easing plotted (progress `t` left→right, eased value bottom→top) — these are the engine's exact curves. `Back` and `Elastic` overshoot past the 0–1 band; `Step` holds until the end.*
@@ -314,7 +314,7 @@ 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 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.*
@@ -370,7 +370,7 @@ parameter and `eq` / `neq`.
### Blend trees
-![A 1D blend on speed selecting idle / walk / run by threshold](../../../assets/guides/blend-tree.svg)
+![A 1D blend on speed selecting idle / walk / run by threshold](@/assets/guides/blend-tree.svg)
*A 1D blend: a float parameter picks the clip whose threshold is the highest one at or below it — here `idle` / `walk` / `run` as `speed` rises, with no transitions between them.*
diff --git a/docs/astro/src/content/docs/animation/timeline.mdx b/docs/astro/src/content/docs/animation/timeline.mdx
index 5bfc4ad9a..ccfb37a75 100644
--- a/docs/astro/src/content/docs/animation/timeline.mdx
+++ b/docs/astro/src/content/docs/animation/timeline.mdx
@@ -39,7 +39,7 @@ const attach = defineSystem([Commands()], (cmds) => {
The component flags **are** the playback control: the engine reconciles them into
its internal clock every frame, so anything that flips `playing` — your code, the
-inspector, an [AI action](/docs/gameplay/ai/#built-in-names) — drives the
+inspector, an [AI action](/docs/gameplay/ai/overview/#built-in-names) — drives the
clip through the same channel.
## Control playback
@@ -77,7 +77,7 @@ These methods write through to the `TimelinePlayer` flags — `timeline.play(e)`
For a **code-free cutscene**, pair the component with a state machine: the
built-in `timeline.play` action and `timeline.finished` condition make an FSM
state that plays a clip on enter and transitions out when it completes. See
- [AI — built-in names](/docs/gameplay/ai/#built-in-names).
+ [AI — built-in names](/docs/gameplay/ai/overview/#built-in-names).
</Aside>
## Track types
@@ -119,14 +119,14 @@ it in the **Sequencer** — the editor for keyframe animation. The **dope sheet*
every track and its keys along a shared, scrubbable playhead; add tracks, drag keys,
then **Save**.
-![The Sequencer dope sheet — tracks and keyframes for a cutscene timeline](../../../assets/guides/en/seq-dopesheet.png)
+![The Sequencer dope sheet — tracks and keyframes for a cutscene timeline](@/assets/guides/en/seq-dopesheet.png)
*The dope sheet: one row per track (here a Transform's `position.x` / `position.y` plus two letterbox activation tracks), keyframes as diamonds, a scrubbable playhead, and the transport up top.*
Switch to the **Curves** tab to shape the interpolation between keys — drag the value
curves and their tangent handles for eases the dope sheet can't express:
-![The Sequencer curve editor — value curves with tangent handles](../../../assets/guides/en/seq-curves.png)
+![The Sequencer curve editor — value curves with tangent handles](@/assets/guides/en/seq-curves.png)
*The curve editor: each keyframed channel becomes an editable curve (here `position.x` easing in, `position.y` bobbing), with per-key tangent handles.*
diff --git a/docs/astro/src/content/docs/assets/localization.mdx b/docs/astro/src/content/docs/assets/localization.mdx
index fef9ff96c..eef580ccc 100644
--- a/docs/astro/src/content/docs/assets/localization.mdx
+++ b/docs/astro/src/content/docs/assets/localization.mdx
@@ -71,7 +71,7 @@ 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 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.*
diff --git a/docs/astro/src/content/docs/assets/overview.mdx b/docs/astro/src/content/docs/assets/overview.mdx
index 8f57d0437..c66e95e94 100644
--- a/docs/astro/src/content/docs/assets/overview.mdx
+++ b/docs/astro/src/content/docs/assets/overview.mdx
@@ -161,7 +161,7 @@ way it can:
them into atlas pages (with the frame UVs written into the manifest), so many
small sprites ship as one texture and batch in one draw call.
-![The Inspector's Platform Overrides strip — a tab per platform, Android selected with Max Size, Compress and Format](../../../assets/guides/en/import-platform-overrides.png)
+![The Inspector's Platform Overrides strip — a tab per platform, Android selected with Max Size, Compress and Format](@/assets/guides/en/import-platform-overrides.png)
*A texture's **Platform Overrides**: each target gets its own tab, and a platform that overrides nothing follows the Default settings above it.*
@@ -177,7 +177,7 @@ Declare the folder instead. In the **Content Browser**, right-click it and pick
**Delivery → Always include in builds** — the same menu that sets local /
subpackage / remote delivery, writing to the same `.esengine/asset-groups.json`:
-![The Content Browser folder menu — Delivery, with Local / Subpackage / Remote and Always include in builds](../../../assets/guides/en/hot-update-delivery-menu.png)
+![The Content Browser folder menu — Delivery, with Local / Subpackage / Remote and Always include in builds](@/assets/guides/en/hot-update-delivery-menu.png)
*Right-click a folder → **Delivery**. The three modes decide where an asset ships from; **Always include in builds** decides whether it ships at all.*
diff --git a/docs/astro/src/content/docs/core-concepts/plugins-resources.mdx b/docs/astro/src/content/docs/core-concepts/plugins-resources.mdx
index 4018e711c..6f9ecdb9b 100644
--- a/docs/astro/src/content/docs/core-concepts/plugins-resources.mdx
+++ b/docs/astro/src/content/docs/core-concepts/plugins-resources.mdx
@@ -37,7 +37,7 @@ Every subsystem's imperative API is reached the same way:
| Timers | `Res(TimerRes)` | [Scripting](/docs/scripting/overview/) |
| Timeline | `Res(Timeline)` | [Timeline](/docs/animation/timeline/) |
| Prefabs | `Res(Prefabs)` | [Prefabs](/docs/world/prefabs/) |
-| Navigation / AI | `Res(Nav)` | [Gameplay AI](/docs/gameplay/ai/) |
+| Navigation / AI | `Res(Nav)` | [Gameplay AI](/docs/gameplay/ai/overview/) |
| Localization | `Res(Localization)` | [Localization](/docs/assets/localization/) |
| Camera view | `Res(CameraView)` | [Camera](/docs/graphics/camera/) |
| UI events | `Res(UIEvents)` | [UI](/docs/ui/overview/) |
diff --git a/docs/astro/src/content/docs/core-concepts/screen.mdx b/docs/astro/src/content/docs/core-concepts/screen.mdx
index 79c6c2d65..c165b5759 100644
--- a/docs/astro/src/content/docs/core-concepts/screen.mdx
+++ b/docs/astro/src/content/docs/core-concepts/screen.mdx
@@ -66,7 +66,7 @@ const readCanvas = defineSystem([GetWorld()], (world) => {
## Scale modes
-![On a 4:3 screen, FixedWidth/Expand reveal extra world above and below the 16:9 design box, while FixedHeight/Shrink fill the height and crop the sides](../../../assets/guides/scale-modes.svg)
+![On a 4:3 screen, FixedWidth/Expand reveal extra world above and below the 16:9 design box, while FixedHeight/Shrink fill the height and crop the sides](@/assets/guides/scale-modes.svg)
The fit math is one pure function, exported as `computeEffectiveOrthoSize`. Given
the design box and the actual screen aspect it produces the **effective ortho
diff --git a/docs/astro/src/content/docs/editor/asset-editors.mdx b/docs/astro/src/content/docs/editor/asset-editors.mdx
index b024252bb..4c112811b 100644
--- a/docs/astro/src/content/docs/editor/asset-editors.mdx
+++ b/docs/astro/src/content/docs/editor/asset-editors.mdx
@@ -22,7 +22,7 @@ Double-click an asset in the Content Browser to open its editor in a document ta
frame thumbnails to **reorder**, or set the whole loop to **one uniform duration**, with
a live preview.
- **State Machine** (`.esfsm`) and **Behavior Tree** (`.esbt`) editors — visual graphs
- for AI. See [Gameplay AI](/docs/gameplay/ai/).
+ for AI. See [Gameplay AI](/docs/gameplay/ai/overview/).
- **Material Graph** (`.esmatgraph`) — a node editor that compiles to a shader. See
[Materials & Shaders](/docs/graphics/materials/).
diff --git a/docs/astro/src/content/docs/editor/overview.mdx b/docs/astro/src/content/docs/editor/overview.mdx
index 0eaac832b..ce5720935 100644
--- a/docs/astro/src/content/docs/editor/overview.mdx
+++ b/docs/astro/src/content/docs/editor/overview.mdx
@@ -36,7 +36,7 @@ renaming a file doesn't break references.
## The workspace
-![The Estella editor with a platformer scene — viewport, World Outliner, Details, and Content Browser](../../../assets/guides/en/editor-overview.png)
+![The Estella editor with a platformer scene — viewport, World Outliner, Details, and Content Browser](@/assets/guides/en/editor-overview.png)
*The default workspace: the viewport in the centre, the World Outliner and Details on the right, the Content Browser along the bottom, and the Play controls up top.*
diff --git a/docs/astro/src/content/docs/editor/scenes.mdx b/docs/astro/src/content/docs/editor/scenes.mdx
index aea8b65ea..c507ddb43 100644
--- a/docs/astro/src/content/docs/editor/scenes.mdx
+++ b/docs/astro/src/content/docs/editor/scenes.mdx
@@ -64,7 +64,7 @@ widget** — most of them for UI nodes:
a project `.esshader` — see
[Materials & Shaders](/docs/graphics/materials/#choosing--sharing-shaders-in-the-editor).
-![The Details panel showing the anchor grid and layout controls for a UI node](../../../assets/guides/en/inspector-flex.png)
+![The Details panel showing the anchor grid and layout controls for a UI node](@/assets/guides/en/inspector-flex.png)
*A UI node's inspector: the **In Layout / Absolute** toggle, the clickable **3×3 anchor grid** (with per-axis Stretch), and `Display: Flex` — visual controls in place of raw numbers.*
@@ -81,4 +81,4 @@ reach every place the texture is drawn: the edit viewport, Play (in the viewport
the Game panel), and a packaged build. A frame that slices correctly while you author it
slices correctly in the shipped game.
-![Dragging the 9-slice border guides on a texture in the asset inspector](../../../assets/guides/en/nine-slice-drag.png)
+![Dragging the 9-slice border guides on a texture in the asset inspector](@/assets/guides/en/nine-slice-drag.png)
diff --git a/docs/astro/src/content/docs/editor/viewport.mdx b/docs/astro/src/content/docs/editor/viewport.mdx
index 3c8c3972d..a1437351f 100644
--- a/docs/astro/src/content/docs/editor/viewport.mdx
+++ b/docs/astro/src/content/docs/editor/viewport.mdx
@@ -85,7 +85,7 @@ real device and both the edit overlay and the running game commit to its shape
project authored for a phone is never only ever *run* at whatever aspect the dock
happened to be dragged to.
-![A scene running in the viewport, framed to the selected target screen rather than to the panel's own shape](../../../assets/guides/en/game-target-screen.png)
+![A scene running in the viewport, framed to the selected target screen rather than to the panel's own shape](@/assets/guides/en/game-target-screen.png)
### Project screen presets
@@ -102,7 +102,7 @@ portrait size, and it joins the dropdown for everyone who opens the project.
pixels. Leave them at zero and nothing is written to the project file — the viewport's
*Safe area* overlay then has nothing to draw for that screen.
-![Project Settings showing a screen preset row with its safe-area insets expanded](../../../assets/guides/en/settings-screen-presets.png)
+![Project Settings showing a screen preset row with its safe-area insets expanded](@/assets/guides/en/settings-screen-presets.png)
Presets live in `project.esproject`, so they are shared through version control:
diff --git a/docs/astro/src/content/docs/extending/built-in-agent.mdx b/docs/astro/src/content/docs/extending/built-in-agent.mdx
index 19441135f..520ac3124 100644
--- a/docs/astro/src/content/docs/extending/built-in-agent.mdx
+++ b/docs/astro/src/content/docs/extending/built-in-agent.mdx
@@ -21,7 +21,7 @@ your Undo takes them back, and you can take the mouse at any moment.
The editor ships no key and calls nothing on its own. Open **Settings ▸ AI Agents**
and configure one provider — that is the whole setup.
-![Settings ▸ AI Agents — a key field per provider, plus the custom endpoint and model list](../../../assets/guides/en/agent-settings.png)
+![Settings ▸ AI Agents — a key field per provider, plus the custom endpoint and model list](@/assets/guides/en/agent-settings.png)
<Steps>
@@ -48,7 +48,7 @@ Open the command palette (`Ctrl/Cmd+Shift+P`) and run **Agent: Open**. Or skip t
type your question straight into the palette. Anything that reads as a sentence
rather than a command offers **Hand to Agent**, and `Enter` sends it.
-![A finished agent run: the question, two tool calls, and the answer](../../../assets/guides/en/agent-turn.png)
+![A finished agent run: the question, two tool calls, and the answer](@/assets/guides/en/agent-turn.png)
A run reads top to bottom:
@@ -88,7 +88,7 @@ One undoable tool still stops to ask, and not for safety: `apply_scene_ops` auth
a whole subtree in a single call, and a hundred-node edit is worth seeing before it
lands rather than reading back afterwards.
-![The preview of a bulk scene edit: six changes listed, each strikeable, with Apply all / Allow for this run / Skip](../../../assets/guides/en/agent-preview.png)
+![The preview of a bulk scene edit: six changes listed, each strikeable, with Apply all / Allow for this run / Skip](@/assets/guides/en/agent-preview.png)
Every line is one change. Click one to **strike it out** — striking a new entity also
strikes whatever refers to it — then **Apply** the rest. **Allow for this run** stops
diff --git a/docs/astro/src/content/docs/gameplay/ai/advanced.mdx b/docs/astro/src/content/docs/gameplay/ai/advanced.mdx
index 07c3726a9..3e7392771 100644
--- a/docs/astro/src/content/docs/gameplay/ai/advanced.mdx
+++ b/docs/astro/src/content/docs/gameplay/ai/advanced.mdx
@@ -58,7 +58,7 @@ const grid = navGridFromTiles((x, y) => level.tiles[y][x], {
| `BuildNavGridOptions` field | Description |
|---|---|
-| `width` / `height` / `cellSize` / `origin?` | Same as the `NavGrid` options (see [Building a grid](/docs/gameplay/ai-navigation/#building-a-grid)). |
+| `width` / `height` / `cellSize` / `origin?` | Same as the `NavGrid` options (see [Building a grid](/docs/gameplay/ai/navigation/#building-a-grid)). |
| `blockedTileIds?` | Exact set of tile ids that block movement. |
| `isBlocked?` | Custom predicate over the tile id (`0` = empty); overrides `blockedTileIds`. With neither given, any non-empty tile blocks. |
diff --git a/docs/astro/src/content/docs/gameplay/ai/behavior-trees.mdx b/docs/astro/src/content/docs/gameplay/ai/behavior-trees.mdx
index f0283b99a..7c2ced7c1 100644
--- a/docs/astro/src/content/docs/gameplay/ai/behavior-trees.mdx
+++ b/docs/astro/src/content/docs/gameplay/ai/behavior-trees.mdx
@@ -3,7 +3,7 @@ title: Behavior trees
description: "Running an .esbt graph: selectors, sequences, decorators and leaves, and how a tick resolves."
---
-![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 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.*
diff --git a/docs/astro/src/content/docs/gameplay/ai/overview.mdx b/docs/astro/src/content/docs/gameplay/ai/overview.mdx
index 7e8ea8a9f..19eca71b2 100644
--- a/docs/astro/src/content/docs/gameplay/ai/overview.mdx
+++ b/docs/astro/src/content/docs/gameplay/ai/overview.mdx
@@ -36,7 +36,7 @@ editor, not hardcoded. Perception feeds the decision; the decision drives naviga
Everything here is pure TypeScript in the `esengine` core (no WebAssembly
side-module). All four plugins — perception, FSM, BT, and navigation — are added
automatically by the editor and the web runtime. You only wire plugins yourself in
- a bare `new App()` (see [Custom app setup](/docs/gameplay/ai-advanced/#custom-app-setup)).
+ a bare `new App()` (see [Custom app setup](/docs/gameplay/ai/advanced/#custom-app-setup)).
</Aside>
## The shared registry
@@ -68,7 +68,7 @@ is the same programming model as a [`defineBehavior`](/docs/scripting/overview/)
| `ctx.dt` | `number` | Frame delta in seconds. |
| `ctx.world` | `World` | Full world access for cross-entity reads. |
| `ctx.commands` | `Commands` | Deferred spawn/despawn, safe mid-tick. |
-| `ctx.blackboard` | `Blackboard` | This agent's AI data plane (see [Blackboard](/docs/gameplay/ai-blackboard/)). |
+| `ctx.blackboard` | `Blackboard` | This agent's AI data plane (see [Blackboard](/docs/gameplay/ai/blackboard/)). |
| `ctx.get(Comp)` | `ComponentData` | Read another component on **this** entity. |
| `ctx.set(Comp, data)` | `void` | Write a component on **this** entity. |
| `ctx.has(Comp)` | `boolean` | Whether this entity has `Comp`. |
@@ -152,13 +152,13 @@ unlocks when it completes, and R replays it — with zero registered actions.
## The four pieces
<CardGrid>
- <LinkCard title="Perception" href="/docs/gameplay/ai-perception/" description="Sight cones, and what an agent currently sees." />
- <LinkCard title="Navigation" href="/docs/gameplay/ai-navigation/" description="A navigation grid, A* paths, and moving an agent along one." />
- <LinkCard title="State machines" href="/docs/gameplay/ai-state-machines/" description="States, guarded transitions, and one-shot triggers." />
- <LinkCard title="Behavior trees" href="/docs/gameplay/ai-behavior-trees/" description="Selectors, sequences, decorators and leaves." />
- <LinkCard title="The blackboard" href="/docs/gameplay/ai-blackboard/" description="The per-agent data plane both paradigms read and write." />
- <LinkCard title="Authoring in the editor" href="/docs/gameplay/ai-authoring/" description="Register the leaves in code, build the graphs visually." />
- <LinkCard title="Below the components" href="/docs/gameplay/ai-advanced/" description="Pathfinding by hand, perception internals, and bare-App wiring." />
+ <LinkCard title="Perception" href="/docs/gameplay/ai/perception/" description="Sight cones, and what an agent currently sees." />
+ <LinkCard title="Navigation" href="/docs/gameplay/ai/navigation/" description="A navigation grid, A* paths, and moving an agent along one." />
+ <LinkCard title="State machines" href="/docs/gameplay/ai/state-machines/" description="States, guarded transitions, and one-shot triggers." />
+ <LinkCard title="Behavior trees" href="/docs/gameplay/ai/behavior-trees/" description="Selectors, sequences, decorators and leaves." />
+ <LinkCard title="The blackboard" href="/docs/gameplay/ai/blackboard/" description="The per-agent data plane both paradigms read and write." />
+ <LinkCard title="Authoring in the editor" href="/docs/gameplay/ai/authoring/" description="Register the leaves in code, build the graphs visually." />
+ <LinkCard title="Below the components" href="/docs/gameplay/ai/advanced/" description="Pathfinding by hand, perception internals, and bare-App wiring." />
</CardGrid>
## Putting it together
diff --git a/docs/astro/src/content/docs/gameplay/ai/state-machines.mdx b/docs/astro/src/content/docs/gameplay/ai/state-machines.mdx
index c1f6195c2..73e96d8f9 100644
--- a/docs/astro/src/content/docs/gameplay/ai/state-machines.mdx
+++ b/docs/astro/src/content/docs/gameplay/ai/state-machines.mdx
@@ -3,7 +3,7 @@ title: State machines
description: "Running an .esfsm graph: states with enter/update/exit hooks, guarded transitions, and one-shot triggers."
---
-![The FSM editor — Patrol and Chase states linked by guarded transitions](../../../assets/guides/en/ai-fsm.png)
+![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`).*
@@ -27,7 +27,7 @@ cmds.spawn()
| `current` | Active state name, written each tick (read-only; visible in the inspector). |
The recommended path is to **author the graph in the editor** as an `.esfsm` asset
-(see [Authoring in the editor](/docs/gameplay/ai-authoring/)). The states reference your
+(see [Authoring in the editor](/docs/gameplay/ai/authoring/)). The states reference your
registered action/condition names by string. You can also build a machine in code:
```typescript
diff --git a/docs/astro/src/content/docs/gameplay/markers.mdx b/docs/astro/src/content/docs/gameplay/markers.mdx
index 60fddb1a9..447dcd0b9 100644
--- a/docs/astro/src/content/docs/gameplay/markers.mdx
+++ b/docs/astro/src/content/docs/gameplay/markers.mdx
@@ -57,7 +57,7 @@ In the Inspector, set the marker's **Type** and add any number of custom
**properties** (a key→value map — `targetScene: "level2"`, `team: "red"`, and so on).
Both survive save/load and travel into the build.
-![The Marker component in the Inspector — a Type field and a key→value Properties map with an Add-property button](../../../assets/guides/en/marker-inspector.png)
+![The Marker component in the Inspector — a Type field and a key→value Properties map with an Add-property button](@/assets/guides/en/marker-inspector.png)
*A `spawn` marker in the Inspector: the **Type** drives `Query(Marker)`, and each
**Properties** row is one entry of the free-form string→string map.*
diff --git a/docs/astro/src/content/docs/gameplay/physics.mdx b/docs/astro/src/content/docs/gameplay/physics.mdx
index efbe2600a..af9e292c0 100644
--- a/docs/astro/src/content/docs/gameplay/physics.mdx
+++ b/docs/astro/src/content/docs/gameplay/physics.mdx
@@ -57,7 +57,7 @@ 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 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.*
@@ -120,7 +120,7 @@ are in meters.
## Collision filtering
-![Project Settings → Physics — collision layer names and the collision matrix](../../../assets/guides/en/collision-matrix.png)
+![Project Settings → Physics — collision layer names and the collision matrix](@/assets/guides/en/collision-matrix.png)
*Project Settings → Physics: name your 16 collision layers, then toggle which pairs collide in the matrix (alongside the solver tuning below).*
@@ -242,7 +242,7 @@ const onHit = defineSystem([Res(PhysicsEvents)], (events) => {
## Joints
-![The joint types and what each constrains — Revolute, Distance, Prismatic, Weld, Wheel, Motor](../../../assets/guides/physics-joints.svg)
+![The joint types and what each constrains — Revolute, Distance, Prismatic, Weld, Wheel, Motor](@/assets/guides/physics-joints.svg)
*What each joint constrains: a **Revolute** hinge (rotate about a pin), a **Distance** spring/rod, a **Prismatic** slider (one axis), a rigid **Weld**, a **Wheel** (suspension + free spin), and a **Motor** (driven toward a target velocity).*
@@ -320,7 +320,7 @@ means "solid top". Set `enabled: false` to turn the platform back into a normal
In the editor, a one-way platform's collider gizmo grows an arrow along the solid-side
normal, so which way it carries is visible at a glance.
-![A one-way platform with an upward normal: a body coming from below passes through, a body coming from above lands on top](../../../assets/guides/oneway-platform.svg)
+![A one-way platform with an upward normal: a body coming from below passes through, a body coming from above lands on top](@/assets/guides/oneway-platform.svg)
## Mouse / drag joint
diff --git a/docs/astro/src/content/docs/graphics/camera.mdx b/docs/astro/src/content/docs/graphics/camera.mdx
index 98f0a8c68..1e53a6ab3 100644
--- a/docs/astro/src/content/docs/graphics/camera.mdx
+++ b/docs/astro/src/content/docs/graphics/camera.mdx
@@ -110,7 +110,7 @@ Add a `FollowTarget` to the camera and point it at an entity. The follow is a
frame-rate-independent damped move with a dead zone, so the camera drifts smoothly
and ignores tiny movements:
-![The camera holds the target at a fixed offset from the view centre; the target roams free inside a deadzone circle and the camera eases after it once it leaves](../../../assets/guides/camera-follow.svg)
+![The camera holds the target at a fixed offset from the view centre; the target roams free inside a deadzone circle and the camera eases after it once it leaves](@/assets/guides/camera-follow.svg)
```typescript
import { defineSystem, Query, Commands, Camera, FollowTarget } from 'esengine';
diff --git a/docs/astro/src/content/docs/graphics/lighting.mdx b/docs/astro/src/content/docs/graphics/lighting.mdx
index bf734fbd5..fbe33b2a2 100644
--- a/docs/astro/src/content/docs/graphics/lighting.mdx
+++ b/docs/astro/src/content/docs/graphics/lighting.mdx
@@ -199,7 +199,7 @@ 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 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).*
diff --git a/docs/astro/src/content/docs/graphics/materials.mdx b/docs/astro/src/content/docs/graphics/materials.mdx
index c89ec506e..79d573e78 100644
--- a/docs/astro/src/content/docs/graphics/materials.mdx
+++ b/docs/astro/src/content/docs/graphics/materials.mdx
@@ -47,7 +47,7 @@ Select a material in the Content Browser and the Details panel opens its inspect
built-in template (as *Built-in · Unlit*, *Built-in · Lit*, …) alongside every `.esshader`
in your project — pick one to rebind the material.
-![The material inspector's Shader section and parameter list](../../../assets/guides/en/material-shader.png)
+![The material inspector's Shader section and parameter list](@/assets/guides/en/material-shader.png)
*The material inspector: the **Shader** section with its picker (here `dissolve.esshader`), above the **Parameters** reflected from that shader's `#pragma param`s.*
diff --git a/docs/astro/src/content/docs/graphics/sprites.mdx b/docs/astro/src/content/docs/graphics/sprites.mdx
index 271602225..ce16b7d1f 100644
--- a/docs/astro/src/content/docs/graphics/sprites.mdx
+++ b/docs/astro/src/content/docs/graphics/sprites.mdx
@@ -70,7 +70,7 @@ Scale on the `Transform` multiplies on top of it. `pivot` is the normalized anch
bottom-left corner, `{0.5, 0}` pins the bottom-center (handy for characters standing on
the ground).
-![The same sprite rotated about three different pivots — the pivot dot stays fixed while the quad swings around it: center spins in place, a corner swings out, bottom-center pins the feet](../../../assets/guides/sprite-pivot.svg)
+![The same sprite rotated about three different pivots — the pivot dot stays fixed while the quad swings around it: center spins in place, a corner swings out, bottom-center pins the feet](@/assets/guides/sprite-pivot.svg)
## Units & coordinates
@@ -96,7 +96,7 @@ layer** (`sprite.layer`) — a named layer list you define in **Project Settings
Rendering**, so the inspector shows a dropdown of *Background*, *Default*, *Foreground*,
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)
+![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). The names are suggestions — type a number the list doesn't
@@ -189,7 +189,7 @@ so a sprite at z = -400 is grabbable where it is drawn.
How a texture is sampled is set **per texture handle**, not per sprite:
-![The same 16×16 texture magnified: Nearest keeps hard pixel edges, Linear blends them into a smooth gradient](../../../assets/guides/texture-filter.png)
+![The same 16×16 texture magnified: Nearest keeps hard pixel edges, Linear blends them into a smooth gradient](@/assets/guides/texture-filter.png)
*The same tiny texture magnified ~15×. **Nearest** keeps texel edges hard (pixel
art); **Linear** interpolates between texels for a smooth look (the default).*
@@ -215,7 +215,7 @@ setTextureParams(tex.handle, TextureFilter.Nearest, TextureFilter.Nearest,
surface — separate minification/magnification filters and per-axis wrap. `Repeat`
is what makes `tileSize` tiling and UV-scroll effects seamless.
-![How each wrap mode samples UVs outside 0–1: Repeat tiles the texture, Clamp to edge extends the border pixel, Mirror flips every other tile](../../../assets/guides/texture-wrap.png)
+![How each wrap mode samples UVs outside 0–1: Repeat tiles the texture, Clamp to edge extends the border pixel, Mirror flips every other tile](@/assets/guides/texture-wrap.png)
*What each wrap mode does with UVs outside the 0–1 range (centre tile = the
texture): **Repeat** tiles it, **Clamp to edge** stretches the border pixel, and
diff --git a/docs/astro/src/content/docs/index.mdx b/docs/astro/src/content/docs/index.mdx
index 4b6397e90..052e004c0 100644
--- a/docs/astro/src/content/docs/index.mdx
+++ b/docs/astro/src/content/docs/index.mdx
@@ -52,6 +52,6 @@ import { Card, CardGrid, LinkCard } from '@astrojs/starlight/components';
<LinkCard title="The Editor" href="/docs/editor/overview/" description="A tour of the visual editor and its panels." />
<LinkCard title="Sprites & Rendering" href="/docs/graphics/sprites/" description="Draw images — tint, size, sort, and layer them." />
<LinkCard title="Physics" href="/docs/gameplay/physics/" description="Rigid bodies, colliders, joints, and spatial queries." />
- <LinkCard title="Gameplay AI" href="/docs/gameplay/ai/" description="Navigation, perception, state machines, behavior trees." />
+ <LinkCard title="Gameplay AI" href="/docs/gameplay/ai/overview/" description="Navigation, perception, state machines, behavior trees." />
<LinkCard title="Building & Exporting" href="/docs/publishing/overview/" description="Ship to web, desktop, WeChat, playable ads, Android and iOS." />
</CardGrid>
diff --git a/docs/astro/src/content/docs/publishing/hot-update.mdx b/docs/astro/src/content/docs/publishing/hot-update.mdx
index 0a40e7204..1273df2f2 100644
--- a/docs/astro/src/content/docs/publishing/hot-update.mdx
+++ b/docs/astro/src/content/docs/publishing/hot-update.mdx
@@ -65,7 +65,7 @@ In the **Content Browser**, right-click any folder and pick **Delivery → Remot
(CDN / hot-update)**. That's the whole authoring step — the folder's every asset
(recursively) now ships from the CDN instead of the package.
-![Right-clicking a folder in the Content Browser and choosing Delivery → Remote (CDN / hot-update)](../../../assets/guides/en/hot-update-delivery-menu.png)
+![Right-clicking a folder in the Content Browser and choosing Delivery → Remote (CDN / hot-update)](@/assets/guides/en/hot-update-delivery-menu.png)
*Content Browser → right-click a folder → **Delivery** → **Local / Subpackage / Remote (CDN / hot-update)**. The choice is written to `.esengine/asset-groups.json`.*
@@ -77,7 +77,7 @@ A folder assigned to a Subpackage or Remote group carries a corner **badge** so
you can see the delivery layout at a glance — `CDN` (blue) for remote, `PKG`
(purple) for subpackage.
-![A folder tile in the Content Browser showing the blue CDN delivery badge](../../../assets/guides/en/hot-update-cdn-badge.png)
+![A folder tile in the Content Browser showing the blue CDN delivery badge](@/assets/guides/en/hot-update-cdn-badge.png)
*The `cdn` folder wears a blue **CDN** badge — its assets are delivered remotely and can be hot-updated.*
@@ -93,7 +93,7 @@ profile** setting, so `dev` and `prod` can point at different CDNs, and the
export bakes the active profile's root into the shipped game. Set it in the
**Package Project** dialog (**File → Build…**), under **Advanced**:
-![The Package dialog's Advanced group — the CDN root field, source maps, and open-output-folder](../../../assets/guides/en/hot-update-build-cdn.png)
+![The Package dialog's Advanced group — the CDN root field, source maps, and open-output-folder](@/assets/guides/en/hot-update-build-cdn.png)
*The **CDN root** field writes the active profile's `remoteRoot` to `asset-groups.json`. Leave it empty to load remote assets same-origin (e.g. for local testing).*
diff --git a/docs/astro/src/content/docs/publishing/overview.mdx b/docs/astro/src/content/docs/publishing/overview.mdx
index 387c48f3f..6eb9b314f 100644
--- a/docs/astro/src/content/docs/publishing/overview.mdx
+++ b/docs/astro/src/content/docs/publishing/overview.mdx
@@ -12,7 +12,7 @@ so what you shipped is what you tested (*play == ship*).
## Exporting from the editor
-![The Package Project dialog — the target list, build configuration, output folder, and scenes in build](../../../assets/guides/en/build-dialog.png)
+![The Package Project dialog — the target list, build configuration, output folder, and scenes in build](@/assets/guides/en/build-dialog.png)
*The Package Project dialog: pick a **target** from the categorized list, a configuration, the output folder, and the [cook options](#asset-cook-options) — then Package.*
diff --git a/docs/astro/src/content/docs/reference/components/animation.mdx b/docs/astro/src/content/docs/reference/components/animation.mdx
index a76715e8b..4b1ff14f2 100644
--- a/docs/astro/src/content/docs/reference/components/animation.mdx
+++ b/docs/astro/src/content/docs/reference/components/animation.mdx
@@ -4,7 +4,7 @@ description: "Flipbook clips, animator controllers, timelines and skeletal runti
tableOfContents: false
---
-import ComponentReference from '../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
Every field below is derived from the engine's own component registry — the same
one the editor's **Details** panel reads — so the types and defaults here are the
diff --git a/docs/astro/src/content/docs/reference/components/core.mdx b/docs/astro/src/content/docs/reference/components/core.mdx
index d13df5f77..912fd9772 100644
--- a/docs/astro/src/content/docs/reference/components/core.mdx
+++ b/docs/astro/src/content/docs/reference/components/core.mdx
@@ -4,7 +4,7 @@ description: "Transforms, hierarchy, naming and the tags the engine itself reads
tableOfContents: false
---
-import ComponentReference from '../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
Every field below is derived from the engine's own component registry — the same
one the editor's **Details** panel reads — so the types and defaults here are the
diff --git a/docs/astro/src/content/docs/reference/components/gameplay.mdx b/docs/astro/src/content/docs/reference/components/gameplay.mdx
index d9ff913be..a0871b0c1 100644
--- a/docs/astro/src/content/docs/reference/components/gameplay.mdx
+++ b/docs/astro/src/content/docs/reference/components/gameplay.mdx
@@ -4,7 +4,7 @@ description: "AI agents, event wiring, audio emitters and network replication."
tableOfContents: false
---
-import ComponentReference from '../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
Every field below is derived from the engine's own component registry — the same
one the editor's **Details** panel reads — so the types and defaults here are the
diff --git a/docs/astro/src/content/docs/reference/components/graphics.mdx b/docs/astro/src/content/docs/reference/components/graphics.mdx
index c45a0bd56..c7a52f91f 100644
--- a/docs/astro/src/content/docs/reference/components/graphics.mdx
+++ b/docs/astro/src/content/docs/reference/components/graphics.mdx
@@ -4,7 +4,7 @@ description: "Everything that draws: sprites, shapes, meshes, cameras, lights an
tableOfContents: false
---
-import ComponentReference from '../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
Every field below is derived from the engine's own component registry — the same
one the editor's **Details** panel reads — so the types and defaults here are the
diff --git a/docs/astro/src/content/docs/reference/components/physics.mdx b/docs/astro/src/content/docs/reference/components/physics.mdx
index a7fb48b7e..13af89199 100644
--- a/docs/astro/src/content/docs/reference/components/physics.mdx
+++ b/docs/astro/src/content/docs/reference/components/physics.mdx
@@ -4,7 +4,7 @@ description: "Bodies, collider shapes, the character controller and every joint.
tableOfContents: false
---
-import ComponentReference from '../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
Every field below is derived from the engine's own component registry — the same
one the editor's **Details** panel reads — so the types and defaults here are the
diff --git a/docs/astro/src/content/docs/reference/components/ui.mdx b/docs/astro/src/content/docs/reference/components/ui.mdx
index 20ba4c88a..78838fd0c 100644
--- a/docs/astro/src/content/docs/reference/components/ui.mdx
+++ b/docs/astro/src/content/docs/reference/components/ui.mdx
@@ -4,7 +4,7 @@ description: "The UI box model, its visuals, and the widgets built on top of the
tableOfContents: false
---
-import ComponentReference from '../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
Every field below is derived from the engine's own component registry — the same
one the editor's **Details** panel reads — so the types and defaults here are the
diff --git a/docs/astro/src/content/docs/reference/components/world.mdx b/docs/astro/src/content/docs/reference/components/world.mdx
index 38051e03e..01246dd45 100644
--- a/docs/astro/src/content/docs/reference/components/world.mdx
+++ b/docs/astro/src/content/docs/reference/components/world.mdx
@@ -4,7 +4,7 @@ description: "Tilemaps, particles and the markers you place in a scene."
tableOfContents: false
---
-import ComponentReference from '../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
Every field below is derived from the engine's own component registry — the same
one the editor's **Details** panel reads — so the types and defaults here are the
diff --git a/docs/astro/src/content/docs/scripting/events.mdx b/docs/astro/src/content/docs/scripting/events.mdx
index 032b3e4e1..824e3125e 100644
--- a/docs/astro/src/content/docs/scripting/events.mdx
+++ b/docs/astro/src/content/docs/scripting/events.mdx
@@ -16,11 +16,11 @@ click ─▶ ui.setPage(badge, on) on "Card"
Wires are deliberately **not** a visual programming language. A row has no branches and no
expressions; when something genuinely needs logic, the row names an action that hands off to
-[a state machine](/docs/gameplay/ai/) — the editor Estella already has for graphs.
+[a state machine](/docs/gameplay/ai/overview/) — the editor Estella already has for graphs.
## A wire in the inspector
-![The Events section of the Details inspector](../../../assets/guides/en/events-section.png)
+![The Events section of the Details inspector](@/assets/guides/en/events-section.png)
*Two wires on a button: both fire on `click`, one switches a controller on the button's own
ancestor chain, the other targets the `Card` entity by name.*
@@ -81,7 +81,7 @@ runtime instead of failing silently.
An action is a named function in the shared registry — the same one `.esfsm` state hooks and
`.esbt` leaves resolve against. Register once, and the name shows up in all three palettes.
-![The action palette, grouped by namespace](../../../assets/guides/en/events-palette.png)
+![The action palette, grouped by namespace](@/assets/guides/en/events-palette.png)
*The palette groups by `namespace.`, and the engine's own actions carry a one-line
description.*
@@ -166,14 +166,14 @@ app.getResource(EntityEvents).emit(chest, 'looted', { gold: 12 });
A row runs one action; it has no "if" and no sequence. That is a deliberate ceiling, and
`fsm.fire` is the way through it — the click fires a trigger, and the entity's
-[state machine](/docs/gameplay/ai/) decides what it means:
+[state machine](/docs/gameplay/ai/overview/) decides what it means:
```
click ─▶ fsm.fire(start) on "Hint" → Idle ──start──▶ Running
onEnter: property.set(…)
```
-![A state hook's declared parameters in the state machine editor](../../../assets/guides/en/events-fsm.png)
+![A state hook's declared parameters in the state machine editor](@/assets/guides/en/events-fsm.png)
*The same parameter controls, in the state-machine editor: `property.set` declares `path`
and `value`, so the hook shows two fields instead of one opaque string.*
diff --git a/docs/astro/src/content/docs/scripting/input.mdx b/docs/astro/src/content/docs/scripting/input.mdx
index a67f62f24..c026b4122 100644
--- a/docs/astro/src/content/docs/scripting/input.mdx
+++ b/docs/astro/src/content/docs/scripting/input.mdx
@@ -81,7 +81,7 @@ buttons; gamepad edges are frame-granular.</Aside>
## Input actions (`InputMap`)
-![The Input Map editor — named actions with keyboard and gamepad bindings](../../../assets/guides/en/input-map.png)
+![The Input Map editor — named actions with keyboard and gamepad bindings](@/assets/guides/en/input-map.png)
*The Input Map editor: named actions (Move / Jump / Fire), each with as many keyboard, mouse, and gamepad bindings as you like.*
diff --git a/docs/astro/src/content/docs/scripting/overview.mdx b/docs/astro/src/content/docs/scripting/overview.mdx
index 1fa8eaa17..08b0e9e1c 100644
--- a/docs/astro/src/content/docs/scripting/overview.mdx
+++ b/docs/astro/src/content/docs/scripting/overview.mdx
@@ -356,7 +356,7 @@ one `defineSystem`. Reach for `defineBehavior` when your logic is naturally
coordinating across entities.
The hook signature — `entity`, `world`, `commands`, plus `self` — is also the same
-programming model used by the [Gameplay AI](/docs/gameplay/ai/) layer's actions and
+programming model used by the [Gameplay AI](/docs/gameplay/ai/overview/) layer's actions and
behavior-tree leaves, so moving logic between a behavior and an AI action is
straightforward.
diff --git a/docs/astro/src/content/docs/ui/controllers.mdx b/docs/astro/src/content/docs/ui/controllers.mdx
index 1ee136cdc..f36f270c3 100644
--- a/docs/astro/src/content/docs/ui/controllers.mdx
+++ b/docs/astro/src/content/docs/ui/controllers.mdx
@@ -120,7 +120,7 @@ label — all four states, one mechanism.
## Authoring in the editor
-![The inline Controllers strip in the inspector](../../../assets/guides/en/controllers-strip.png)
+![The inline Controllers strip in the inspector](@/assets/guides/en/controllers-strip.png)
*The Controllers strip: the active controller (here `theme`, inherited from the Canvas), its **pages** as chips (`sky` / `rose`), and **Gears on this entity** — every field bound to a controller.*
@@ -172,7 +172,7 @@ runs `ui.setPage` when it is clicked, targeting the entity that owns the control
```
**From a state machine** — the `ui.setPage` action lets a data-driven
-[FSM / behavior tree](/docs/gameplay/ai/) (`.esfsm` / `.esbt`) switch a page with no code.
+[FSM / behavior tree](/docs/gameplay/ai/overview/) (`.esfsm` / `.esbt`) switch a page with no code.
Its argument is `"controller:page"`:
```json
@@ -200,5 +200,5 @@ controller state → gear presentation.
- [UI](/docs/ui/overview/) — the flexbox component model gears drive.
- [UI Components](/docs/ui/widgets/) — the widget factories.
- [Timeline](/docs/animation/timeline/) — keyframed transitions; gears use the same field addressing.
-- [Gameplay AI](/docs/gameplay/ai/) — the `.esfsm` / `.esbt` that can call `ui.setPage`.
+- [Gameplay AI](/docs/gameplay/ai/overview/) — the `.esfsm` / `.esbt` that can call `ui.setPage`.
- [Event Binding](/docs/scripting/events/) — wire a click straight to `ui.setPage`, no code.
diff --git a/docs/astro/src/content/docs/ui/layout.mdx b/docs/astro/src/content/docs/ui/layout.mdx
index f1ca99735..75e30400e 100644
--- a/docs/astro/src/content/docs/ui/layout.mdx
+++ b/docs/astro/src/content/docs/ui/layout.mdx
@@ -25,7 +25,7 @@ interface. See [Screen & Resolution](/docs/core-concepts/screen/) and
## Dimensions: `px`, `percent`, `auto`
-![px is a fixed size, percent is a fraction of the parent, auto is content-sized](../../../assets/guides/ui-units.svg)
+![px is a fixed size, percent is a fraction of the parent, auto is content-sized](@/assets/guides/ui-units.svg)
*The three length units: `px` is a fixed design-pixel size, `percent` is a fraction of the parent's axis, and `auto` shrinks to content (or is stretched by the container).*
@@ -111,27 +111,27 @@ CSS-flexbox namesake — the engine runs Yoga, so if you know flexbox, you know
**`direction`** — the main axis, and the order children flow in:
-![The four FlexDirection values: Row, RowReverse, Column, ColumnReverse](../../../assets/guides/flex-direction.svg)
+![The four FlexDirection values: Row, RowReverse, Column, ColumnReverse](@/assets/guides/flex-direction.svg)
-![The same four boxes laid out live in the editor as a Row and as a Column](../../../assets/guides/flex-live.png)
+![The same four boxes laid out live in the editor as a Row and as a Column](@/assets/guides/flex-live.png)
*The same four boxes rendered live in the editor — a `Row` container and a `Column` one. The diagrams here aren't an approximation: they're exactly what the engine draws.*
**`justifyContent`** — how children pack along the **main axis**, and how any leftover
space is shared out:
-![The six JustifyContent values: Start, Center, End, SpaceBetween, SpaceAround, SpaceEvenly](../../../assets/guides/flex-justify.svg)
+![The six JustifyContent values: Start, Center, End, SpaceBetween, SpaceAround, SpaceEvenly](@/assets/guides/flex-justify.svg)
**`alignItems`** — how children line up across the **cross axis**. `Stretch` (the
default) grows only the items whose cross-size is `auto`; items with a fixed size keep it:
-![The four AlignItems values: Start, Center, End, Stretch](../../../assets/guides/flex-align.svg)
+![The four AlignItems values: Start, Center, End, Stretch](@/assets/guides/flex-align.svg)
**`wrap`** — when the children don't fit the main axis, `NoWrap` shrinks them onto one
line (via `flexShrink`); `Wrap` keeps their size and flows the overflow onto new lines
(those lines are then distributed by `alignContent`):
-![The two FlexWrap values: NoWrap shrinks to one line, Wrap flows to new lines](../../../assets/guides/flex-wrap.svg)
+![The two FlexWrap values: NoWrap shrinks to one line, Wrap flows to new lines](@/assets/guides/flex-wrap.svg)
```typescript
import { FlexContainer, FlexDirection, JustifyContent, AlignItems } from 'esengine';
@@ -147,7 +147,7 @@ world.insert(panel, FlexContainer, {
## Absolute positioning
-![Relative nodes flow and share space; an Absolute node is pinned by insets and ignores its siblings](../../../assets/guides/ui-position.svg)
+![Relative nodes flow and share space; an Absolute node is pinned by insets and ignores its siblings](@/assets/guides/ui-position.svg)
*`Relative` nodes flow in the layout and share the space with their siblings; an `Absolute` node is lifted out of the flow and pinned by its insets, floating over the rest.*
@@ -199,7 +199,7 @@ const panel = spawnUIEntity({
## Anchor presets in code
-![The nine point anchors in a 3×3 grid (corners, edge midpoints, centre), plus per-axis Stretch](../../../assets/guides/ui-anchor.svg)
+![The nine point anchors in a 3×3 grid (corners, edge midpoints, centre), plus per-axis Stretch](@/assets/guides/ui-anchor.svg)
*The anchor picker's nine point anchors — each pins the box to a corner, an edge midpoint, or the centre of its parent — plus a per-axis **Stretch** that makes the box fill that axis.*
diff --git a/docs/astro/src/content/docs/ui/overview.mdx b/docs/astro/src/content/docs/ui/overview.mdx
index 879797862..0061cc2e4 100644
--- a/docs/astro/src/content/docs/ui/overview.mdx
+++ b/docs/astro/src/content/docs/ui/overview.mdx
@@ -123,7 +123,7 @@ cannot fix it by drawing a second image for every button size in the game.
9-slice cuts the image into a 3×3 grid and scales each piece differently:
-![A source button texture stretched wide smears its corners; cut into a 3×3 grid the corners stay 1:1, the edges stretch along one axis and only the middle stretches both ways](../../../assets/guides/nine-slice.svg)
+![A source button texture stretched wide smears its corners; cut into a 3×3 grid the corners stay 1:1, the edges stretch along one axis and only the middle stretches both ways](@/assets/guides/nine-slice.svg)
`sliceBorder` is those four numbers: how far in from each edge the "do not stretch" band
reaches. Corners keep their exact pixels at any size, so one 100×112 texture serves a tiny
@@ -143,7 +143,7 @@ the node's **box** — a rectangle. That is enough for a list viewport, but it i
circular avatar frame used to still cut a square: the mask graphic was round, the clip
was not. `alphaCutoff` above 0 switches the clip to the shape the mask actually draws.
-![A square photo under a circular mask: clipped to the box it stays square; with alphaCutoff above zero it is clipped to the circle](../../../assets/guides/ui-mask.svg)
+![A square photo under a circular mask: clipped to the box it stays square; with alphaCutoff above zero it is clipped to the circle](@/assets/guides/ui-mask.svg)
`UIVisual.enabled` hides this entity's visual only; `UINode.display = None`
removes the node **and its whole subtree** from layout, rendering, and
@@ -155,7 +155,7 @@ until the whole image fits (the box keeps its layout size); `Cover` keeps the bo
crops the UV instead. Neither ever distorts the artwork. `NineSlice` and `Tiled` ignore
it — adapting to the box is their whole job.
-![Wide art in a square slot: Fill squashes it, Contain shrinks the whole image inside the box, Cover fills the box and crops the overflow](../../../assets/guides/object-fit.svg)
+![Wide art in a square slot: Fill squashes it, Contain shrinks the whole image inside the box, Cover fills the box and crops the overflow](@/assets/guides/object-fit.svg)
**`UIMask.alphaCutoff` — clip to the shape, not the box.** A stencil mask clips to the
mask's *rectangle*, so a circular avatar frame still cut a square. Above `0` it clips to
@@ -220,7 +220,7 @@ parts — the clipped box, the oversized child — without the one fact that it
## Editor or code
-![A UI Canvas laid out in the editor viewport](../../../assets/guides/en/ui-screen.png)
+![A UI Canvas laid out in the editor viewport](@/assets/guides/en/ui-screen.png)
*A UI Canvas in the editor — laid out against the design frame, with the selected node's gizmo. The same widgets author from code or the editor.*
diff --git a/docs/astro/src/content/docs/ui/text.mdx b/docs/astro/src/content/docs/ui/text.mdx
index 670c931d0..6261aed32 100644
--- a/docs/astro/src/content/docs/ui/text.mdx
+++ b/docs/astro/src/content/docs/ui/text.mdx
@@ -101,7 +101,7 @@ Defaults below are the component defaults (what the inspector shows).
## Alignment — with and without a box
-![The nine text-alignment combinations: align Left/Center/Right by verticalAlign Top/Middle/Bottom](../../../assets/guides/text-align.svg)
+![The nine text-alignment combinations: align Left/Center/Right by verticalAlign Top/Middle/Bottom](@/assets/guides/text-align.svg)
*`align` (Left / Center / Right) and `verticalAlign` (Top / Middle / Bottom) place the text block within its box — the nine combinations.*
diff --git a/docs/astro/src/content/docs/ui/widgets.mdx b/docs/astro/src/content/docs/ui/widgets.mdx
index 349b4f0d8..33e5a71f0 100644
--- a/docs/astro/src/content/docs/ui/widgets.mdx
+++ b/docs/astro/src/content/docs/ui/widgets.mdx
@@ -32,7 +32,7 @@ with `focusable: false`.
per-page field bindings, authorable in the editor.
</Aside>
-![The built-in widgets running — a Button, Toggle, Slider, Progress bar, a Dialog trigger, and more, in one panel](../../../assets/guides/en/widgets-gallery.png)
+![The built-in widgets running — a Button, Toggle, Slider, Progress bar, a Dialog trigger, and more, in one panel](@/assets/guides/en/widgets-gallery.png)
*The built-in widgets (from the `ui-controls` example): a **Button**, a **Toggle**, a
**Slider**, a **Progress** bar, and buttons that open a **Dialog** and cycle an accent
diff --git a/docs/astro/src/content/docs/world/particles.mdx b/docs/astro/src/content/docs/world/particles.mdx
index 28d52e579..beb08bd4d 100644
--- a/docs/astro/src/content/docs/world/particles.mdx
+++ b/docs/astro/src/content/docs/world/particles.mdx
@@ -208,7 +208,7 @@ 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](@/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).*
diff --git a/docs/astro/src/content/docs/world/prefabs.mdx b/docs/astro/src/content/docs/world/prefabs.mdx
index 6170e37f3..7002e69d1 100644
--- a/docs/astro/src/content/docs/world/prefabs.mdx
+++ b/docs/astro/src/content/docs/world/prefabs.mdx
@@ -47,7 +47,7 @@ never reaches the saved asset.
Not yet supported in Prefab Mode: editing a **nested** prefab in place, or a variant whose
base isn't flat. Play and *Save As* are disabled while you're editing a prefab.
-![The editor in Prefab Mode, editing a Coin prefab in isolation](../../../assets/guides/en/prefab-mode.png)
+![The editor in Prefab Mode, editing a Coin prefab in isolation](@/assets/guides/en/prefab-mode.png)
*Prefab Mode: the **Editing Prefab** banner with **Save Prefab** / **Back to scene**, the prefab opened as its own entity tree — every instance updates when you save.*
diff --git a/docs/astro/src/content/docs/world/tilemaps.mdx b/docs/astro/src/content/docs/world/tilemaps.mdx
index 96069f27d..c807f0502 100644
--- a/docs/astro/src/content/docs/world/tilemaps.mdx
+++ b/docs/astro/src/content/docs/world/tilemaps.mdx
@@ -24,7 +24,7 @@ natively in the editor, or import it from a Tiled file with no extra setup.
## Paint in the editor
-![The Tilemap painter open beside an isometric map in the Estella editor](../../../assets/guides/en/tilemap-overview.png)
+![The Tilemap painter open beside an isometric map in the Estella editor](@/assets/guides/en/tilemap-overview.png)
*Select a `TilemapLayer` and the **Tilemap painter** opens on the left — tools on top, the tileset palette below. Paint straight into the viewport.*
@@ -47,7 +47,7 @@ viewport — a stamp ghost previews every stroke:
While a paint tool is active, `H` / `V` flip the stamp and `R` rotates it 90°.
`Q`, `W`, or `Esc` leave paint mode and hand the keys back to the transform tools.
-![Close-up of the Tilemap painter panel — tool row and tile palette](../../../assets/guides/en/tilemap-tools.png)
+![Close-up of the Tilemap painter panel — tool row and tile palette](@/assets/guides/en/tilemap-tools.png)
*The painter panel up close: the tool row (brush, erase, rectangle, ellipse, line, bucket, select, eyedropper, terrain), the active tileset tab, and the tile palette you stamp from.*
@@ -76,17 +76,17 @@ same fields afterwards. The viewport follows the layer: the grid overlay,
brush ghost, hover/selection highlights, and every paint tool work on the
diamond or hex grid exactly as they do on squares.
-![The New Tilemap dialog — orientation picker and tileset list](../../../assets/guides/en/tilemap-new.png)
+![The New Tilemap dialog — orientation picker and tileset list](@/assets/guides/en/tilemap-new.png)
*The **New Tilemap** dialog picks the orientation and the tileset up front.*
The same map painted on a hexagonal and a staggered grid:
-![A hexagonal tilemap in the viewport](../../../assets/guides/en/orient-hex.png)
+![A hexagonal tilemap in the viewport](@/assets/guides/en/orient-hex.png)
*Hexagonal — the grid, brush ghost, and every tool follow the hex layout.*
-![A staggered-isometric tilemap in the viewport](../../../assets/guides/en/orient-staggered.png)
+![A staggered-isometric tilemap in the viewport](@/assets/guides/en/orient-staggered.png)
*Staggered isometric — alternate rows shift by half a cell.*
@@ -201,7 +201,7 @@ tiles carry a ▶ mark in the atlas. The frames are saved into the `.estileset`,
every layer that uses the tileset plays them automatically — in the editor viewport
and at runtime, no code required.
-![The Tileset editor in Animation mode — a tile's frame strip with per-frame durations](../../../assets/guides/en/tileset-animation.png)
+![The Tileset editor in Animation mode — a tile's frame strip with per-frame durations](@/assets/guides/en/tileset-animation.png)
*Animation mode: pick a tile (here #34), click atlas tiles to append frames, and set each frame's duration in ms. The strip loops as a live preview.*
@@ -227,7 +227,7 @@ tilemap.setChunkTiles(layer, chunkX, chunkY, tiles, 32, 32);
## Terrain autotiling
-![The Tileset editor in Terrain mode — a corner-Wang set with Grass / Sand / Water colors](../../../assets/guides/en/tileset-terrain.png)
+![The Tileset editor in Terrain mode — a corner-Wang set with Grass / Sand / Water colors](@/assets/guides/en/tileset-terrain.png)
*Terrain mode with a **corner-Wang** set: define terrain colors (Grass / Sand / Water), then paint each tile's corners — the `T` brush later resolves the right tile from the neighbours.*
@@ -260,7 +260,7 @@ The engine's first-class tileset asset is **`.estileset`** — it references an
texture and carries per-tile collision, animation, terrain/auto-tile data, and
custom key/value properties.
-![The Tileset editor in Collision mode — shape tabs, modifiers, slope presets, and collision overlays on the atlas](../../../assets/guides/en/tileset-collision.png)
+![The Tileset editor in Collision mode — shape tabs, modifiers, slope presets, and collision overlays on the atlas](@/assets/guides/en/tileset-collision.png)
*The **Tileset editor**'s Collision mode: pick a shape (**Box / Polygon / Circle**), toggle **one-way / sensor** and set friction / bounce / density, drop **slope** presets — the green overlay marks each tile's collider.*
@@ -312,7 +312,7 @@ colliders, exactly like per-tile collision.
seeds a 32 px grid, and opens the painter with the collision palette instead of a
tileset.
-![The collision-brush palette — Solid, ramps, half-tiles, One-way, and Trigger brushes, with per-layer friction and bounce fields](../../../assets/guides/en/collision-palette.png)
+![The collision-brush palette — Solid, ramps, half-tiles, One-way, and Trigger brushes, with per-layer friction and bounce fields](@/assets/guides/en/collision-palette.png)
*The **collision palette** replaces the tileset: pick **Solid**, a **ramp** or
**half-tile**, **One-way ↑**, or **Trigger**, then paint over your background. The
diff --git a/docs/astro/src/content/docs/zh-cn/animation/dragonbones.mdx b/docs/astro/src/content/docs/zh-cn/animation/dragonbones.mdx
index e459e47dc..9b3aff244 100644
--- a/docs/astro/src/content/docs/zh-cn/animation/dragonbones.mdx
+++ b/docs/astro/src/content/docs/zh-cn/animation/dragonbones.mdx
@@ -37,7 +37,7 @@ DragonBones 导出的是三个文件,Estella 把它们作为同一种资源类
用 **创建 → DragonBones** 添加,或者给已有实体加这个组件。组件本身在主 `esengine` 包里。
-![细节面板里的 DragonBonesAnimation 组件——骨骼与图集的资源槽,以及从文件读出来填充的骨架和动画下拉框](../../../../assets/guides/zh/dragonbones-inspector.png)
+![细节面板里的 DragonBonesAnimation 组件——骨骼与图集的资源槽,以及从文件读出来填充的骨架和动画下拉框](@/assets/guides/zh/dragonbones-inspector.png)
| 属性 | 类型 | 默认 | 说明 |
|---|---|---|---|
@@ -143,7 +143,7 @@ const bounds = dragonBones.getBounds(entity); // { x, y, width, height } |
这不需要你做任何开关——它由组件引用的那一对文件自然决定。每实体的属性仍然是每实体的,所以共用
骨架照样可以各自缩放、翻转、着色:
-![同一个文件里的两个 DragonBoy 骨架——第二个仅通过组件字段就缩小并镜像了](../../../../assets/guides/zh/dragonbones-shared.png)
+![同一个文件里的两个 DragonBoy 骨架——第二个仅通过组件字段就缩小并镜像了](@/assets/guides/zh/dragonbones-shared.png)
## 打包时会带上什么
diff --git a/docs/astro/src/content/docs/zh-cn/animation/overview.mdx b/docs/astro/src/content/docs/zh-cn/animation/overview.mdx
index 715b0716f..d6f5282d5 100644
--- a/docs/astro/src/content/docs/zh-cn/animation/overview.mdx
+++ b/docs/astro/src/content/docs/zh-cn/animation/overview.mdx
@@ -15,7 +15,7 @@ Estella 有三套动画系统,各司其职:
## 精灵动画
-![翻页书编辑器——4 帧行走片段,带逐帧时长与实时预览](../../../../assets/guides/zh/flipbook.png)
+![翻页书编辑器——4 帧行走片段,带逐帧时长与实时预览](@/assets/guides/zh/flipbook.png)
*翻页书编辑器:一个 4 帧行走片段、逐帧时长,以及带 FPS / 循环 / 洋葱皮的实时预览。*
@@ -173,7 +173,7 @@ const registerRun = defineSystem([Res(Assets), Res(SpriteAnimation)], async (ass
### 用状态机驱动剪辑——零代码
-[FSM/BT 内置](/docs/zh-cn/gameplay/ai/)以数据驱动翻页动画。动作的可选**参数**
+[FSM/BT 内置](/docs/zh-cn/gameplay/ai/overview/)以数据驱动翻页动画。动作的可选**参数**
携带剪辑,所以 idle/run/attack 切换是纯 `.esfsm` 数据,画在现有状态机画布上:
| 名称 | 类型 | 说明 |
@@ -228,7 +228,7 @@ const animate = defineSystem([Res(Tween)], (tween) => {
`EaseInOut*`)、`EaseOutBounce`、`Step` 和 `CubicBezier`——自定义贝塞尔用句柄的
`.bezier(p1x, p1y, p2x, p2y)`。
-![每种 EasingType 从 0 到 1 的曲线](../../../../assets/guides/tween-easings.svg)
+![每种 EasingType 从 0 到 1 的曲线](@/assets/guides/tween-easings.svg)
*每条缓动曲线(进度 `t` 从左到右,缓动后的值从下到上)——这就是引擎的精确曲线。`Back` 和 `Elastic` 会冲出 0–1 区间;`Step` 一直保持到末尾才跳变。*
@@ -295,7 +295,7 @@ tween.sequence([
## 动画状态机
-![动画控制器编辑器——Idle / Move / Hop 状态,带条件与参数面板](../../../../assets/guides/zh/animator-graph.png)
+![动画控制器编辑器——Idle / Move / Hop 状态,带条件与参数面板](@/assets/guides/zh/animator-graph.png)
*动画控制器:状态(Idle / Move / Hop)、带条件的转移(`speed>20`、`hop` 触发器),以及驱动它们的**参数**面板。*
@@ -345,7 +345,7 @@ const drive = defineSystem([Query(Animator), Res(AnimatorController)], (q, anim)
### 混合树
-![一维 blend 按 speed 阈值在 idle / walk / run 之间选择](../../../../assets/guides/blend-tree.svg)
+![一维 blend 按 speed 阈值在 idle / walk / run 之间选择](@/assets/guides/blend-tree.svg)
*一维 blend:float 参数挑出「阈值 ≤ 它」中最高的那个片段——这里随 `speed` 上升在 `idle` / `walk` / `run` 之间切换,彼此不做过渡。*
diff --git a/docs/astro/src/content/docs/zh-cn/animation/timeline.mdx b/docs/astro/src/content/docs/zh-cn/animation/timeline.mdx
index 6d6bb1637..0b0fa7d41 100644
--- a/docs/astro/src/content/docs/zh-cn/animation/timeline.mdx
+++ b/docs/astro/src/content/docs/zh-cn/animation/timeline.mdx
@@ -36,7 +36,7 @@ const attach = defineSystem([Commands()], (cmds) => {
| `finished` | boolean | `false` | `'once'` 片段播完时闩为 true;下次播放时清除。运行时只读。 |
组件旗标**就是**播放控制本身:引擎每帧把它们调和进内部时钟,所以任何翻动
-`playing` 的一方——你的代码、检视器、[AI 动作](/docs/zh-cn/gameplay/ai/#内建名字)——
+`playing` 的一方——你的代码、检视器、[AI 动作](/docs/zh-cn/gameplay/ai/overview/#内建名字)——
都经同一条通道驱动片段。
## 控制播放
@@ -73,7 +73,7 @@ const control = defineSystem([Query(TimelinePlayer), Res(Timeline)], (q, timelin
<Aside type="tip">
想做**零代码过场**,把组件和状态机配对:内建的 `timeline.play` 动作 +
`timeline.finished` 条件就是一个"进入即播放、播完即转出"的 FSM 状态。见
- [AI——内建名字](/docs/zh-cn/gameplay/ai/#内建名字)。
+ [AI——内建名字](/docs/zh-cn/gameplay/ai/overview/#内建名字)。
</Aside>
## 轨道类型
@@ -111,13 +111,13 @@ const control = defineSystem([Query(TimelinePlayer), Res(Timeline)], (q, timelin
创作它。**摊开表(dope sheet)**把每条轨道及其关键帧沿一条共享、可拖动的播放头排开;加轨道、
拖关键帧,然后 **Save**。
-![Sequencer 摊开表——一段过场时间轴的轨道与关键帧](../../../../assets/guides/zh/seq-dopesheet.png)
+![Sequencer 摊开表——一段过场时间轴的轨道与关键帧](@/assets/guides/zh/seq-dopesheet.png)
*摊开表:一轨一行(这里是某 Transform 的 `position.x` / `position.y`,加两条黑边激活轨道),关键帧是菱形,播放头可拖动,顶部是走带控制。*
切到 **Curves** 标签可塑形关键帧之间的插值——拖动值曲线及其切线手柄,做出摊开表表达不了的缓动:
-![Sequencer 曲线编辑器——带切线手柄的值曲线](../../../../assets/guides/zh/seq-curves.png)
+![Sequencer 曲线编辑器——带切线手柄的值曲线](@/assets/guides/zh/seq-curves.png)
*曲线编辑器:每个关键帧通道变成一条可编辑曲线(这里 `position.x` 缓入、`position.y` 起伏),每个关键帧带切线手柄。*
diff --git a/docs/astro/src/content/docs/zh-cn/assets/localization.mdx b/docs/astro/src/content/docs/zh-cn/assets/localization.mdx
index 887d6efa3..62fc6b36a 100644
--- a/docs/astro/src/content/docs/zh-cn/assets/localization.mdx
+++ b/docs/astro/src/content/docs/zh-cn/assets/localization.mdx
@@ -66,7 +66,7 @@ i18n.t('apples', { count: 3 }); // "3 apples"
## 字符串表(`.eslocale`)
-![检视器里的 .eslocale 字符串表——key 与它们的值](../../../../assets/guides/zh/localization.png)
+![检视器里的 .eslocale 字符串表——key 与它们的值](@/assets/guides/zh/localization.png)
*检视器里的 `.eslocale` 表:每个 key 在当前语言下的值,下方以另一种语言作为翻译提示。*
diff --git a/docs/astro/src/content/docs/zh-cn/assets/overview.mdx b/docs/astro/src/content/docs/zh-cn/assets/overview.mdx
index cc664c268..29121d80a 100644
--- a/docs/astro/src/content/docs/zh-cn/assets/overview.mdx
+++ b/docs/astro/src/content/docs/zh-cn/assets/overview.mdx
@@ -139,7 +139,7 @@ const { failed } = await assets.preload(
- **自动图集** —— 把零散的 PNG 放进 `<name>.atlas/` 文件夹,烘焙时会把它们打包成图集页
(帧 UV 写进清单),于是许多小精灵作为一张纹理发布、在一次绘制里合批。
-![检视面板的「平台覆盖」条——每个平台一个页签,选中 Android 时显示 Max Size、压缩与格式](../../../../assets/guides/zh/import-platform-overrides.png)
+![检视面板的「平台覆盖」条——每个平台一个页签,选中 Android 时显示 Max Size、压缩与格式](@/assets/guides/zh/import-platform-overrides.png)
*一张纹理的**平台覆盖**:每个目标各有页签;没有覆盖任何东西的平台,沿用上方的默认设置。*
@@ -153,7 +153,7 @@ const { failed } = await assets.preload(
就是那个设置本地 / 分包 / 远端交付的同一个菜单,写进同一份
`.esengine/asset-groups.json`:
-![内容浏览器的文件夹菜单——交付方式,含本地 / 分包 / 远端与"总是打进构建"](../../../../assets/guides/zh/hot-update-delivery-menu.png)
+![内容浏览器的文件夹菜单——交付方式,含本地 / 分包 / 远端与"总是打进构建"](@/assets/guides/zh/hot-update-delivery-menu.png)
*右键文件夹 → **交付方式**。三种模式决定资产从哪里发布;**总是打进构建**决定它到底发不发。*
diff --git a/docs/astro/src/content/docs/zh-cn/core-concepts/plugins-resources.mdx b/docs/astro/src/content/docs/zh-cn/core-concepts/plugins-resources.mdx
index 78aa8515b..ffb0fd4e8 100644
--- a/docs/astro/src/content/docs/zh-cn/core-concepts/plugins-resources.mdx
+++ b/docs/astro/src/content/docs/zh-cn/core-concepts/plugins-resources.mdx
@@ -35,7 +35,7 @@ defineSystem([Res(Audio)], (audio) => {
| 计时器 | `Res(TimerRes)` | [脚本](/docs/zh-cn/scripting/overview/) |
| 时间轴 | `Res(Timeline)` | [时间轴](/docs/zh-cn/animation/timeline/) |
| 预制体 | `Res(Prefabs)` | [预制体](/docs/zh-cn/world/prefabs/) |
-| 导航 / AI | `Res(Nav)` | [游戏 AI](/docs/zh-cn/gameplay/ai/) |
+| 导航 / AI | `Res(Nav)` | [游戏 AI](/docs/zh-cn/gameplay/ai/overview/) |
| 本地化 | `Res(Localization)` | [本地化](/docs/zh-cn/assets/localization/) |
| 相机视图 | `Res(CameraView)` | [相机](/docs/zh-cn/graphics/camera/) |
| UI 事件 | `Res(UIEvents)` | [UI](/docs/zh-cn/ui/overview/) |
diff --git a/docs/astro/src/content/docs/zh-cn/core-concepts/screen.mdx b/docs/astro/src/content/docs/zh-cn/core-concepts/screen.mdx
index a76612e0b..db3bbd419 100644
--- a/docs/astro/src/content/docs/zh-cn/core-concepts/screen.mdx
+++ b/docs/astro/src/content/docs/zh-cn/core-concepts/screen.mdx
@@ -60,7 +60,7 @@ const readCanvas = defineSystem([GetWorld()], (world) => {
## 缩放模式
-![在 4:3 屏幕上,FixedWidth/Expand 在 16:9 设计盒的上下露出额外世界,而 FixedHeight/Shrink 填满高度并裁掉两侧](../../../../assets/guides/scale-modes.svg)
+![在 4:3 屏幕上,FixedWidth/Expand 在 16:9 设计盒的上下露出额外世界,而 FixedHeight/Shrink 填满高度并裁掉两侧](@/assets/guides/scale-modes.svg)
适配数学是一个纯函数,导出为 `computeEffectiveOrthoSize`。给定设计盒与实际屏幕宽高比,
它产出**有效正交半高**——相机将显示的世界盒高度的一半,单位是世界单位(设计像素)。
diff --git a/docs/astro/src/content/docs/zh-cn/editor/asset-editors.mdx b/docs/astro/src/content/docs/zh-cn/editor/asset-editors.mdx
index c614adefe..25a100ba9 100644
--- a/docs/astro/src/content/docs/zh-cn/editor/asset-editors.mdx
+++ b/docs/astro/src/content/docs/zh-cn/editor/asset-editors.mdx
@@ -16,7 +16,7 @@ description: "双击资产打开的各个文档编辑器:Sequencer、瓦片画
**角 Wang**)、逐瓦片**概率**权重与属性,以及**动画瓦片**——拖动帧缩略图**重排**,或把整段
循环设成**一个统一时长**,带实时预览。
- **状态机**(`.esfsm`)和**行为树**(`.esbt`)编辑器 — AI 的可视化图。见
- [游戏 AI](/docs/zh-cn/gameplay/ai/)。
+ [游戏 AI](/docs/zh-cn/gameplay/ai/overview/)。
- **材质图**(`.esmatgraph`) — 编译成着色器的节点编辑器。见
[材质与着色器](/docs/zh-cn/graphics/materials/)。
diff --git a/docs/astro/src/content/docs/zh-cn/editor/overview.mdx b/docs/astro/src/content/docs/zh-cn/editor/overview.mdx
index 84403ce7c..eeaf47239 100644
--- a/docs/astro/src/content/docs/zh-cn/editor/overview.mdx
+++ b/docs/astro/src/content/docs/zh-cn/editor/overview.mdx
@@ -33,7 +33,7 @@ Estella 编辑器是一个桌面应用(Electron + React),带 UE5 风格的**可
## 工作区
-![Estella 编辑器与一个平台跳跃场景——视口、世界大纲、细节、内容浏览器](../../../../assets/guides/zh/editor-overview.png)
+![Estella 编辑器与一个平台跳跃场景——视口、世界大纲、细节、内容浏览器](@/assets/guides/zh/editor-overview.png)
*默认工作区:视口居中,世界大纲与细节在右侧,内容浏览器在底部,运行控制在顶部。*
diff --git a/docs/astro/src/content/docs/zh-cn/editor/scenes.mdx b/docs/astro/src/content/docs/zh-cn/editor/scenes.mdx
index 36a13624e..a5e0f6d89 100644
--- a/docs/astro/src/content/docs/zh-cn/editor/scenes.mdx
+++ b/docs/astro/src/content/docs/zh-cn/editor/scenes.mdx
@@ -48,7 +48,7 @@ Details 是选中项的检视器。它列出实体上的每个组件及其字段
- 对**材质**,一个 **Shader** 选择器,用于切换绑定的着色器——内置模板或项目里的 `.esshader`——见
[材质与着色器](/docs/zh-cn/graphics/materials/#在编辑器里选取与共享着色器)。
-![细节面板显示某个 UI 节点的锚点网格与布局控件](../../../../assets/guides/zh/inspector-flex.png)
+![细节面板显示某个 UI 节点的锚点网格与布局控件](@/assets/guides/zh/inspector-flex.png)
*一个 UI 节点的检视器:**布局内 / 绝对**切换、可点击的 **3×3 锚点网格**(每轴带 Stretch),以及 `Display: Flex`——用可视化控件取代裸数字。*
@@ -63,4 +63,4 @@ Details 同时是**资产检视器**:在内容浏览器里选中一个资产,即
编辑视口、运行时(视口内运行与游戏面板)、以及打包后的构建。创作时切片正确的框,在发布的
游戏里同样正确。
-![在资产检视器中拖动纹理的九宫格参考线](../../../../assets/guides/zh/nine-slice-drag.png)
+![在资产检视器中拖动纹理的九宫格参考线](@/assets/guides/zh/nine-slice-drag.png)
diff --git a/docs/astro/src/content/docs/zh-cn/editor/viewport.mdx b/docs/astro/src/content/docs/zh-cn/editor/viewport.mdx
index e195224fd..66c4f5499 100644
--- a/docs/astro/src/content/docs/zh-cn/editor/viewport.mdx
+++ b/docs/astro/src/content/docs/zh-cn/editor/viewport.mdx
@@ -67,7 +67,7 @@ UI Canvas 也能在真机上预览。场景里有 Canvas 时,UI 会额外按其
桌面创作时想要的。选中任何真实设备,编辑时的叠加层和运行中的游戏都会遵守它的形状——于是一个为手机
创作的项目,不会只能在"面板恰好被拖成的比例"下运行。
-![在视口内运行的场景,按选定的目标屏幕取景,而不是按面板自身的形状](../../../../assets/guides/zh/game-target-screen.png)
+![在视口内运行的场景,按选定的目标屏幕取景,而不是按面板自身的形状](@/assets/guides/zh/game-target-screen.png)
### 项目屏幕预设
@@ -80,7 +80,7 @@ UI Canvas 也能在真机上预览。场景里有 Canvas 时,UI 会额外按其
- **安全区域**(行尾的 ▸ 展开)以设备像素设置刘海 / Home 条的内缩。全部留空则不会写入项目文件——
视口的 *安全区域* 叠加层对该屏幕也就没有东西可画。
-![项目设置中展开了安全区域的屏幕预设行](../../../../assets/guides/zh/settings-screen-presets.png)
+![项目设置中展开了安全区域的屏幕预设行](@/assets/guides/zh/settings-screen-presets.png)
预设保存在 `project.esproject` 中,因此可以随版本控制共享:
diff --git a/docs/astro/src/content/docs/zh-cn/extending/built-in-agent.mdx b/docs/astro/src/content/docs/zh-cn/extending/built-in-agent.mdx
index 382686fe3..e8894af7b 100644
--- a/docs/astro/src/content/docs/zh-cn/extending/built-in-agent.mdx
+++ b/docs/astro/src/content/docs/zh-cn/extending/built-in-agent.mdx
@@ -20,7 +20,7 @@ import { Aside, Steps } from '@astrojs/starlight/components';
编辑器不附带任何密钥,也不会自己发起任何调用。打开**设置 ▸ AI 代理**,
配好一个提供方,配置就算做完了。
-![设置 ▸ AI 代理——每个提供方一个密钥字段,外加自定义接口地址与模型列表](../../../../assets/guides/zh/agent-settings.png)
+![设置 ▸ AI 代理——每个提供方一个密钥字段,外加自定义接口地址与模型列表](@/assets/guides/zh/agent-settings.png)
<Steps>
@@ -46,7 +46,7 @@ import { Aside, Steps } from '@astrojs/starlight/components';
直接把问题打进命令面板。凡是读起来像一句话而不像命令的输入,面板都会给出
**交给 Agent**,按 `Enter` 就发出去了。
-![一轮跑完的 Agent 对话:问题、两次工具调用,以及回答](../../../../assets/guides/zh/agent-turn.png)
+![一轮跑完的 Agent 对话:问题、两次工具调用,以及回答](@/assets/guides/zh/agent-turn.png)
一轮对话从上往下读:
@@ -81,7 +81,7 @@ import { Aside, Steps } from '@astrojs/starlight/components';
一次调用就能搭出一整棵子树,上百个节点的改动值得在落地**之前**看一眼,
而不是事后再读回来。
-![一批场景改动的预览:列出 6 项改动,每一行都能划掉,下面是全部应用 / 本轮都允许 / 跳过](../../../../assets/guides/zh/agent-preview.png)
+![一批场景改动的预览:列出 6 项改动,每一行都能划掉,下面是全部应用 / 本轮都允许 / 跳过](@/assets/guides/zh/agent-preview.png)
每一行就是一项改动。点一行可以**划掉**它——划掉一个新建实体时,
引用它的行会一并划掉——然后应用剩下的。**本轮都允许**会让它在这一轮里
diff --git a/docs/astro/src/content/docs/zh-cn/gameplay/ai/advanced.mdx b/docs/astro/src/content/docs/zh-cn/gameplay/ai/advanced.mdx
index 99797594d..00cb09e4c 100644
--- a/docs/astro/src/content/docs/zh-cn/gameplay/ai/advanced.mdx
+++ b/docs/astro/src/content/docs/zh-cn/gameplay/ai/advanced.mdx
@@ -54,7 +54,7 @@ const grid = navGridFromTiles((x, y) => level.tiles[y][x], {
| `BuildNavGridOptions` 字段 | 说明 |
|---|---|
-| `width` / `height` / `cellSize` / `origin?` | 与 `NavGrid` 选项相同(见[构建网格](/docs/zh-cn/gameplay/ai-navigation/#构建网格))。 |
+| `width` / `height` / `cellSize` / `origin?` | 与 `NavGrid` 选项相同(见[构建网格](/docs/zh-cn/gameplay/ai/navigation/#构建网格))。 |
| `blockedTileIds?` | 阻挡移动的瓦片 id 的精确集合。 |
| `isBlocked?` | 针对瓦片 id 的自定义谓词(`0` = 空);覆盖 `blockedTileIds`。二者都不给时,任何非空瓦片都阻挡。 |
diff --git a/docs/astro/src/content/docs/zh-cn/gameplay/ai/behavior-trees.mdx b/docs/astro/src/content/docs/zh-cn/gameplay/ai/behavior-trees.mdx
index a92648477..e130c933c 100644
--- a/docs/astro/src/content/docs/zh-cn/gameplay/ai/behavior-trees.mdx
+++ b/docs/astro/src/content/docs/zh-cn/gameplay/ai/behavior-trees.mdx
@@ -3,7 +3,7 @@ title: 行为树
description: "运行 .esbt 图:选择、序列、装饰器与叶子,以及一次 tick 如何求值。"
---
-![行为树编辑器——Selector 之下是 Sequence 与一个兜底动作](../../../../assets/guides/zh/ai-bt.png)
+![行为树编辑器——Selector 之下是 Sequence 与一个兜底动作](@/assets/guides/zh/ai-bt.png)
*行为树编辑器:**Selector** 根之下是一个 **Sequence**(Condition `seesPlayer` → Action `chase`),外加兜底的 `patrol` 动作。*
diff --git a/docs/astro/src/content/docs/zh-cn/gameplay/ai/overview.mdx b/docs/astro/src/content/docs/zh-cn/gameplay/ai/overview.mdx
index 0f632ff7a..2078049df 100644
--- a/docs/astro/src/content/docs/zh-cn/gameplay/ai/overview.mdx
+++ b/docs/astro/src/content/docs/zh-cn/gameplay/ai/overview.mdx
@@ -30,7 +30,7 @@ Estella 的 AI 层把一个实体变成会**感知**、会**决策**、会**移
<Aside type="note">
这里的一切都是 `esengine` 内核里的纯 TypeScript(没有 WebAssembly 侧模块)。感知、FSM、BT、
导航这四个插件都由编辑器和 Web 运行时**自动**加入。只有当你从一个裸的 `new App()` 起步时,
- 才需要自己加插件(见[自定义应用](/docs/zh-cn/gameplay/ai-advanced/#自定义应用))。
+ 才需要自己加插件(见[自定义应用](/docs/zh-cn/gameplay/ai/advanced/#自定义应用))。
</Aside>
## 共享注册表
@@ -60,7 +60,7 @@ registerAction('chase', (ctx) => {
| `ctx.dt` | `number` | 帧间隔(秒)。 |
| `ctx.world` | `World` | 完整世界访问,用于跨实体读取。 |
| `ctx.commands` | `Commands` | 延迟的 spawn/despawn,tick 中调用安全。 |
-| `ctx.blackboard` | `Blackboard` | 该 agent 的 AI 数据面(见[黑板](/docs/zh-cn/gameplay/ai-blackboard/))。 |
+| `ctx.blackboard` | `Blackboard` | 该 agent 的 AI 数据面(见[黑板](/docs/zh-cn/gameplay/ai/blackboard/))。 |
| `ctx.get(Comp)` | `ComponentData` | 读取**本**实体上的另一个组件。 |
| `ctx.set(Comp, data)` | `void` | 写入**本**实体上的一个组件。 |
| `ctx.has(Comp)` | `boolean` | 本实体是否拥有 `Comp`。 |
@@ -135,13 +135,13 @@ registerFsm('intro', {
## 四个部分
<CardGrid>
- <LinkCard title="感知" href="/docs/zh-cn/gameplay/ai-perception/" description="视锥,以及一个 agent 此刻看到了什么。" />
- <LinkCard title="导航" href="/docs/zh-cn/gameplay/ai-navigation/" description="导航网格、A* 路径,以及让 agent 沿路径移动。" />
- <LinkCard title="状态机" href="/docs/zh-cn/gameplay/ai-state-machines/" description="状态、带守卫的转移,以及一次性触发器。" />
- <LinkCard title="行为树" href="/docs/zh-cn/gameplay/ai-behavior-trees/" description="选择、序列、装饰器与叶子。" />
- <LinkCard title="黑板" href="/docs/zh-cn/gameplay/ai-blackboard/" description="两种范式共同读写的每-agent 数据面。" />
- <LinkCard title="在编辑器里编排" href="/docs/zh-cn/gameplay/ai-authoring/" description="叶子在代码里注册,图在编辑器里搭。" />
- <LinkCard title="组件层之下" href="/docs/zh-cn/gameplay/ai-advanced/" description="手动寻路、感知内幕,以及裸 App 接线。" />
+ <LinkCard title="感知" href="/docs/zh-cn/gameplay/ai/perception/" description="视锥,以及一个 agent 此刻看到了什么。" />
+ <LinkCard title="导航" href="/docs/zh-cn/gameplay/ai/navigation/" description="导航网格、A* 路径,以及让 agent 沿路径移动。" />
+ <LinkCard title="状态机" href="/docs/zh-cn/gameplay/ai/state-machines/" description="状态、带守卫的转移,以及一次性触发器。" />
+ <LinkCard title="行为树" href="/docs/zh-cn/gameplay/ai/behavior-trees/" description="选择、序列、装饰器与叶子。" />
+ <LinkCard title="黑板" href="/docs/zh-cn/gameplay/ai/blackboard/" description="两种范式共同读写的每-agent 数据面。" />
+ <LinkCard title="在编辑器里编排" href="/docs/zh-cn/gameplay/ai/authoring/" description="叶子在代码里注册,图在编辑器里搭。" />
+ <LinkCard title="组件层之下" href="/docs/zh-cn/gameplay/ai/advanced/" description="手动寻路、感知内幕,以及裸 App 接线。" />
</CardGrid>
## 组合起来
diff --git a/docs/astro/src/content/docs/zh-cn/gameplay/ai/state-machines.mdx b/docs/astro/src/content/docs/zh-cn/gameplay/ai/state-machines.mdx
index bcb2c51e7..a9b8e9105 100644
--- a/docs/astro/src/content/docs/zh-cn/gameplay/ai/state-machines.mdx
+++ b/docs/astro/src/content/docs/zh-cn/gameplay/ai/state-machines.mdx
@@ -3,7 +3,7 @@ title: 状态机
description: "运行 .esfsm 图:带 enter/update/exit 钩子的状态、带守卫的转移,以及一次性触发器。"
---
-![状态机编辑器——Patrol 与 Chase 状态由带守卫的转移连接](../../../../assets/guides/zh/ai-fsm.png)
+![状态机编辑器——Patrol 与 Chase 状态由带守卫的转移连接](@/assets/guides/zh/ai-fsm.png)
*状态机编辑器:状态(Patrol / Chase)由带守卫的转移(`?seesPlayer`、`?lostPlayer`)连接。*
@@ -25,7 +25,7 @@ cmds.spawn()
| `fsm` | 要运行的机器的 key:一个 `registerFsm` 名字**或**一个 `.esfsm` 资产路径。 |
| `current` | 当前激活状态名,每 tick 写入(只读;在检视面板可见)。 |
-推荐做法是**在编辑器里把图编排成 `.esfsm` 资产**(见[在编辑器里编排](/docs/zh-cn/gameplay/ai-authoring/))。
+推荐做法是**在编辑器里把图编排成 `.esfsm` 资产**(见[在编辑器里编排](/docs/zh-cn/gameplay/ai/authoring/))。
状态用字符串引用你注册的动作/条件名。你也可以用代码构建一台机器:
```typescript
diff --git a/docs/astro/src/content/docs/zh-cn/gameplay/markers.mdx b/docs/astro/src/content/docs/zh-cn/gameplay/markers.mdx
index 4fd3861f9..868b4181a 100644
--- a/docs/astro/src/content/docs/zh-cn/gameplay/markers.mdx
+++ b/docs/astro/src/content/docs/zh-cn/gameplay/markers.mdx
@@ -50,7 +50,7 @@ app.addPlugin(new PhysicsPlugin('physics.js'));
在 Inspector 里设置标记的 **Type**,并添加任意多个自定义 **properties**(一个键→值映射——
`targetScene: "level2"`、`team: "red"` 等等)。二者都能存/读并进入构建。
-![Inspector 里的 Marker 组件——一个 Type 字段和一个键→值 Properties 映射,带“添加属性”按钮](../../../../assets/guides/zh/marker-inspector.png)
+![Inspector 里的 Marker 组件——一个 Type 字段和一个键→值 Properties 映射,带“添加属性”按钮](@/assets/guides/zh/marker-inspector.png)
*Inspector 里的一个 `spawn` 标记:**Type** 驱动 `Query(Marker)`,每一行 **Properties** 就是
自由形式 string→string 映射里的一条。*
diff --git a/docs/astro/src/content/docs/zh-cn/gameplay/physics.mdx b/docs/astro/src/content/docs/zh-cn/gameplay/physics.mdx
index 5e8002670..2b741ec15 100644
--- a/docs/astro/src/content/docs/zh-cn/gameplay/physics.mdx
+++ b/docs/astro/src/content/docs/zh-cn/gameplay/physics.mdx
@@ -51,7 +51,7 @@ physics.applyImpulse(e, { x: 0, y: jumpPx / ppu }); // px/s → m/s
## 刚体与碰撞体
-![编辑器视口里的碰撞体 gizmo——选中的 Ground 轮廓加墙体与斜坡](../../../../assets/guides/zh/physics-collider.png)
+![编辑器视口里的碰撞体 gizmo——选中的 Ground 轮廓加墙体与斜坡](@/assets/guides/zh/physics-collider.png)
*视口里的碰撞体 gizmo:选中的 **Ground** 的盒形轮廓(琥珀色),以及墙体与斜坡。用视口的物理显示开关切换。*
@@ -112,7 +112,7 @@ const spawnBall = defineSystem([Commands()], (cmds) => {
## 碰撞过滤
-![项目设置 → 物理——碰撞层名字与碰撞矩阵](../../../../assets/guides/zh/collision-matrix.png)
+![项目设置 → 物理——碰撞层名字与碰撞矩阵](@/assets/guides/zh/collision-matrix.png)
*项目设置 → 物理:给 16 个碰撞层命名,再在矩阵里切换哪些层两两相撞(下方还有求解器调参)。*
@@ -230,7 +230,7 @@ const onHit = defineSystem([Res(PhysicsEvents)], (events) => {
## 关节
-![各关节类型及其约束——Revolute、Distance、Prismatic、Weld、Wheel、Motor](../../../../assets/guides/physics-joints.svg)
+![各关节类型及其约束——Revolute、Distance、Prismatic、Weld、Wheel、Motor](@/assets/guides/physics-joints.svg)
*每种关节约束什么:**Revolute** 铰链(绕销钉转动)、**Distance** 弹簧/连杆、**Prismatic** 滑轨(单轴滑动)、刚性 **Weld** 焊接、**Wheel** 车轮(悬挂 + 自由旋转),以及 **Motor** 马达(驱向目标速度)。*
@@ -303,7 +303,7 @@ world.spawn(
让平台恢复为普通实心体。在编辑器里,单向平台的碰撞体 gizmo 会沿实心侧法线多画一支箭头,
朝向一眼可辨。
-![法线朝上的单向平台:从下方来的物体穿过,从上方来的物体落在上面](../../../../assets/guides/oneway-platform.svg)
+![法线朝上的单向平台:从下方来的物体穿过,从上方来的物体落在上面](@/assets/guides/oneway-platform.svg)
## 鼠标 / 拖拽关节
diff --git a/docs/astro/src/content/docs/zh-cn/graphics/camera.mdx b/docs/astro/src/content/docs/zh-cn/graphics/camera.mdx
index 197526856..4043f3025 100644
--- a/docs/astro/src/content/docs/zh-cn/graphics/camera.mdx
+++ b/docs/astro/src/content/docs/zh-cn/graphics/camera.mdx
@@ -100,7 +100,7 @@ const zoomIn = defineSystem([Res(Tween)], (tween) => {
给相机加一个 `FollowTarget` 并指向一个实体。跟随是帧率无关的阻尼移动,带一个死区,所以相机
平滑漂移并忽略细小移动:
-![相机把目标保持在离视图中心固定的 offset;目标在死区圆内自由漫游,一旦离开相机就阻尼跟上](../../../../assets/guides/camera-follow.svg)
+![相机把目标保持在离视图中心固定的 offset;目标在死区圆内自由漫游,一旦离开相机就阻尼跟上](@/assets/guides/camera-follow.svg)
```typescript
import { defineSystem, Query, Commands, Camera, FollowTarget } from 'esengine';
diff --git a/docs/astro/src/content/docs/zh-cn/graphics/lighting.mdx b/docs/astro/src/content/docs/zh-cn/graphics/lighting.mdx
index 21076eb3d..48017bdf6 100644
--- a/docs/astro/src/content/docs/zh-cn/graphics/lighting.mdx
+++ b/docs/astro/src/content/docs/zh-cn/graphics/lighting.mdx
@@ -189,7 +189,7 @@ const app = createWebApp(module, { colorSpace: 'linear' });
## 在编辑器里
-![编辑器视口里的 2D 光——它的照射范围与投射的阴影](../../../../assets/guides/zh/lighting.png)
+![编辑器视口里的 2D 光——它的照射范围与投射的阴影](@/assets/guides/zh/lighting.png)
*编辑器里预览的 `Light2D`——它的照射光池,以及柱子投出的阴影(开 **Preview FX** 可在编辑态点亮场景)。*
diff --git a/docs/astro/src/content/docs/zh-cn/graphics/materials.mdx b/docs/astro/src/content/docs/zh-cn/graphics/materials.mdx
index 26a414168..f1f789cd5 100644
--- a/docs/astro/src/content/docs/zh-cn/graphics/materials.mdx
+++ b/docs/astro/src/content/docs/zh-cn/graphics/materials.mdx
@@ -40,7 +40,7 @@ std140 uniform 块,于是 CPU 能按名字设置、并安全地送到 GPU。一
**Shader** 下拉框列出每个内置模板(显示为 *Built-in · Unlit*、*Built-in · Lit* ……)以及项目里
每个 `.esshader`——选一个即可给材质重新绑定着色器。
-![材质检视器的 Shader 区与参数列表](../../../../assets/guides/zh/material-shader.png)
+![材质检视器的 Shader 区与参数列表](@/assets/guides/zh/material-shader.png)
*材质检视器:**Shader** 区及其选择器(这里是 `dissolve.esshader`),下方是从该着色器 `#pragma param` 反射出的**参数**。*
diff --git a/docs/astro/src/content/docs/zh-cn/graphics/sprites.mdx b/docs/astro/src/content/docs/zh-cn/graphics/sprites.mdx
index fbdb9edf6..38b6423b5 100644
--- a/docs/astro/src/content/docs/zh-cn/graphics/sprites.mdx
+++ b/docs/astro/src/content/docs/zh-cn/graphics/sprites.mdx
@@ -63,7 +63,7 @@ sprite.color = { r: 1, g: 1, b: 1, a: 0.5 }; // 50% 透明
1:1,或设成别的值来缩放。`Transform` 上的缩放会再乘上去。`pivot` 是精灵旋转/缩放所绕的归一化
轴心(0–1):`{0.5, 0.5}` 居中,`{0, 0}` 是左下角,`{0.5, 0}` 钉住底部中心(适合站在地面上的角色)。
-![同一个精灵绕三个不同轴心旋转——轴心点(黄点)保持不动、四边形绕它摆动:居中=原地旋转,角点=甩出去,底部中心=钉住脚下](../../../../assets/guides/sprite-pivot.svg)
+![同一个精灵绕三个不同轴心旋转——轴心点(黄点)保持不动、四边形绕它摆动:居中=原地旋转,角点=甩出去,底部中心=钉住脚下](@/assets/guides/sprite-pivot.svg)
## 单位与坐标
@@ -86,7 +86,7 @@ sprite.color = { r: 1, g: 1, b: 1, a: 0.5 }; // 50% 透明
**项目设置 → 渲染**里定义的命名层列表,于是检视器显示 *Background*、*Default*、*Foreground* 等
下拉,而不是裸数字。较低的层先画(在后面)。
-![左:三个排序层堆叠,更高的层画在前面。右:在 Y-排序层上,屏幕上更靠下的精灵画在更靠上的前面。](../../../../assets/guides/sprite-sort.svg)
+![左:三个排序层堆叠,更高的层画在前面。右:在 Y-排序层上,屏幕上更靠下的精灵画在更靠上的前面。](@/assets/guides/sprite-sort.svg)
命名是为了可读性,不是层数上限:你可以命名最多三十二个槽位(槽位的下标**就是**它的 z 序)。
名字只是建议——直接敲一个列表里没有的数字,字段照样接受;一个名字都不填时,`layer` 就是
@@ -162,7 +162,7 @@ world.applyEntityOrder([other, another, card]);
纹理的采样方式按**纹理句柄**设置,而非按精灵:
-![同一张 16×16 纹理放大:Nearest 保留硬像素边缘,Linear 把它们混成平滑渐变](../../../../assets/guides/texture-filter.png)
+![同一张 16×16 纹理放大:Nearest 保留硬像素边缘,Linear 把它们混成平滑渐变](@/assets/guides/texture-filter.png)
*同一张小纹理放大约 15×。**Nearest(最近邻)** 保留硬的纹素边缘(像素画);**Linear(线性)**
在纹素间插值,得到平滑外观(默认)。*
@@ -188,7 +188,7 @@ setTextureParams(tex.handle, TextureFilter.Nearest, TextureFilter.Nearest,
缩小/放大过滤分开,环绕逐轴设置。`tileSize` 平铺和 UV 滚动效果要无缝,靠的就是
`Repeat`。
-![各环绕模式对 0–1 之外 UV 的采样:Repeat 平铺纹理,Clamp to edge 拉伸边缘像素,Mirror 每隔一块翻转](../../../../assets/guides/texture-wrap.png)
+![各环绕模式对 0–1 之外 UV 的采样:Repeat 平铺纹理,Clamp to edge 拉伸边缘像素,Mirror 每隔一块翻转](@/assets/guides/texture-wrap.png)
*各环绕模式如何处理 0–1 之外的 UV(中间那块 = 纹理本身):**Repeat** 平铺,**Clamp to edge**
拉伸边缘像素,**Mirror** 每隔一块镜像翻转。*
diff --git a/docs/astro/src/content/docs/zh-cn/index.mdx b/docs/astro/src/content/docs/zh-cn/index.mdx
index e623ff5ef..2861298f9 100644
--- a/docs/astro/src/content/docs/zh-cn/index.mdx
+++ b/docs/astro/src/content/docs/zh-cn/index.mdx
@@ -48,6 +48,6 @@ import { Card, CardGrid, LinkCard } from '@astrojs/starlight/components';
<LinkCard title="编辑器" href="/docs/zh-cn/editor/overview/" description="可视化编辑器及其各面板导览。" />
<LinkCard title="精灵与渲染" href="/docs/zh-cn/graphics/sprites/" description="绘制图像——着色、尺寸、排序与分层。" />
<LinkCard title="物理" href="/docs/zh-cn/gameplay/physics/" description="刚体、碰撞体、关节与空间查询。" />
- <LinkCard title="游戏 AI" href="/docs/zh-cn/gameplay/ai/" description="导航、感知、状态机、行为树。" />
+ <LinkCard title="游戏 AI" href="/docs/zh-cn/gameplay/ai/overview/" description="导航、感知、状态机、行为树。" />
<LinkCard title="构建与导出" href="/docs/zh-cn/publishing/overview/" description="发布到 Web、桌面、微信、Playable 广告、Android 与 iOS。" />
</CardGrid>
diff --git a/docs/astro/src/content/docs/zh-cn/publishing/hot-update.mdx b/docs/astro/src/content/docs/zh-cn/publishing/hot-update.mdx
index 492ad3dbb..aa2eac487 100644
--- a/docs/astro/src/content/docs/zh-cn/publishing/hot-update.mdx
+++ b/docs/astro/src/content/docs/zh-cn/publishing/hot-update.mdx
@@ -47,7 +47,7 @@ Estella 的热更新是**内容寻址**、**原子**(要么全成、要么回
在**内容浏览器**中右键任意文件夹,选择 **交付方式 → 远端(CDN / 热更)**。这就是全部的配置动作——该文件夹下的每个资产(递归)从此改由 CDN 交付,而不再打进包内。
-![在内容浏览器右键文件夹并选择 交付方式 → 远端(CDN / 热更)](../../../../assets/guides/zh/hot-update-delivery-menu.png)
+![在内容浏览器右键文件夹并选择 交付方式 → 远端(CDN / 热更)](@/assets/guides/zh/hot-update-delivery-menu.png)
*内容浏览器 → 右键文件夹 → **交付方式** → **本地 / 分包 / 远端(CDN / 热更)**。选择会写入 `.esengine/asset-groups.json`。*
@@ -56,7 +56,7 @@ Estella 的热更新是**内容寻址**、**原子**(要么全成、要么回
被指派到分包或远端组的文件夹会带一个角标**徽标**,让你一眼看清交付布局——`CDN`(蓝)表示远端,`分包`(紫)表示分包。
-![内容浏览器中一个文件夹图块,带蓝色 CDN 交付徽标](../../../../assets/guides/zh/hot-update-cdn-badge.png)
+![内容浏览器中一个文件夹图块,带蓝色 CDN 交付徽标](@/assets/guides/zh/hot-update-cdn-badge.png)
*`cdn` 文件夹带着蓝色 **CDN** 徽标——它的资产以远端方式交付,可被热更新。*
@@ -66,7 +66,7 @@ Estella 的热更新是**内容寻址**、**原子**(要么全成、要么回
远端组资产需要一个**根 URL** 来拉取——你的 CDN。它是一个**构建 profile** 设置,因此 `dev` 与 `prod` 可以指向不同的 CDN,导出时会把活动 profile 的根地址烘进发布的游戏里。在**打包项目**对话框(**文件 → 构建…**)的**高级**里设置:
-![打包对话框的「高级」分组——CDN 地址、源码映射与完成后打开输出文件夹](../../../../assets/guides/zh/hot-update-build-cdn.png)
+![打包对话框的「高级」分组——CDN 地址、源码映射与完成后打开输出文件夹](@/assets/guides/zh/hot-update-build-cdn.png)
***CDN 地址** 字段会把活动 profile 的 `remoteRoot` 写入 `asset-groups.json`。留空则远端资产从游戏同源加载(例如本地测试时)。*
diff --git a/docs/astro/src/content/docs/zh-cn/publishing/overview.mdx b/docs/astro/src/content/docs/zh-cn/publishing/overview.mdx
index 3028ca618..f5e9ee092 100644
--- a/docs/astro/src/content/docs/zh-cn/publishing/overview.mdx
+++ b/docs/astro/src/content/docs/zh-cn/publishing/overview.mdx
@@ -11,7 +11,7 @@ import { Aside, Steps } from '@astrojs/starlight/components';
## 从编辑器导出
-![打包项目对话框——目标列表、构建配置、输出目录与构建场景](../../../../assets/guides/zh/build-dialog.png)
+![打包项目对话框——目标列表、构建配置、输出目录与构建场景](@/assets/guides/zh/build-dialog.png)
*打包项目对话框:从分组的列表里选一个**目标**、一个配置、输出目录,以及 [cook 选项](#资产烘焙选项)——然后 Package。*
diff --git a/docs/astro/src/content/docs/zh-cn/reference/components/animation.mdx b/docs/astro/src/content/docs/zh-cn/reference/components/animation.mdx
index 074a3d58e..38df10732 100644
--- a/docs/astro/src/content/docs/zh-cn/reference/components/animation.mdx
+++ b/docs/astro/src/content/docs/zh-cn/reference/components/animation.mdx
@@ -4,7 +4,7 @@ description: "逐帧动画、动画状态机、时间轴与骨骼运行时。"
tableOfContents: false
---
-import ComponentReference from '../../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
下面每个字段都由引擎自身的组件注册表推导而来——就是编辑器 **Details** 面板读的那一份——
所以这里的类型和默认值就是你添加组件时真正拿到的值,且不可能与代码脱节。讲*怎么用*的正文在
diff --git a/docs/astro/src/content/docs/zh-cn/reference/components/core.mdx b/docs/astro/src/content/docs/zh-cn/reference/components/core.mdx
index 86ba42cb5..ab45ee07f 100644
--- a/docs/astro/src/content/docs/zh-cn/reference/components/core.mdx
+++ b/docs/astro/src/content/docs/zh-cn/reference/components/core.mdx
@@ -4,7 +4,7 @@ description: "变换、层级、命名,以及引擎自身读取的标签。"
tableOfContents: false
---
-import ComponentReference from '../../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
下面每个字段都由引擎自身的组件注册表推导而来——就是编辑器 **Details** 面板读的那一份——
所以这里的类型和默认值就是你添加组件时真正拿到的值,且不可能与代码脱节。讲*怎么用*的正文在
diff --git a/docs/astro/src/content/docs/zh-cn/reference/components/gameplay.mdx b/docs/astro/src/content/docs/zh-cn/reference/components/gameplay.mdx
index e31526463..43c6859b5 100644
--- a/docs/astro/src/content/docs/zh-cn/reference/components/gameplay.mdx
+++ b/docs/astro/src/content/docs/zh-cn/reference/components/gameplay.mdx
@@ -4,7 +4,7 @@ description: "AI 代理、事件连线、音频发声体与网络复制。"
tableOfContents: false
---
-import ComponentReference from '../../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
下面每个字段都由引擎自身的组件注册表推导而来——就是编辑器 **Details** 面板读的那一份——
所以这里的类型和默认值就是你添加组件时真正拿到的值,且不可能与代码脱节。讲*怎么用*的正文在
diff --git a/docs/astro/src/content/docs/zh-cn/reference/components/graphics.mdx b/docs/astro/src/content/docs/zh-cn/reference/components/graphics.mdx
index c22e09cac..7c1452a0a 100644
--- a/docs/astro/src/content/docs/zh-cn/reference/components/graphics.mdx
+++ b/docs/astro/src/content/docs/zh-cn/reference/components/graphics.mdx
@@ -4,7 +4,7 @@ description: "所有会绘制的东西:精灵、图形、网格、相机、光
tableOfContents: false
---
-import ComponentReference from '../../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
下面每个字段都由引擎自身的组件注册表推导而来——就是编辑器 **Details** 面板读的那一份——
所以这里的类型和默认值就是你添加组件时真正拿到的值,且不可能与代码脱节。讲*怎么用*的正文在
diff --git a/docs/astro/src/content/docs/zh-cn/reference/components/physics.mdx b/docs/astro/src/content/docs/zh-cn/reference/components/physics.mdx
index 12bc45c25..53147e7b2 100644
--- a/docs/astro/src/content/docs/zh-cn/reference/components/physics.mdx
+++ b/docs/astro/src/content/docs/zh-cn/reference/components/physics.mdx
@@ -4,7 +4,7 @@ description: "刚体、碰撞体形状、角色控制器与全部关节。"
tableOfContents: false
---
-import ComponentReference from '../../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
下面每个字段都由引擎自身的组件注册表推导而来——就是编辑器 **Details** 面板读的那一份——
所以这里的类型和默认值就是你添加组件时真正拿到的值,且不可能与代码脱节。讲*怎么用*的正文在
diff --git a/docs/astro/src/content/docs/zh-cn/reference/components/ui.mdx b/docs/astro/src/content/docs/zh-cn/reference/components/ui.mdx
index 71f8ecbe8..e05025d5b 100644
--- a/docs/astro/src/content/docs/zh-cn/reference/components/ui.mdx
+++ b/docs/astro/src/content/docs/zh-cn/reference/components/ui.mdx
@@ -4,7 +4,7 @@ description: "UI 盒模型、外观,以及在其之上构建的控件。"
tableOfContents: false
---
-import ComponentReference from '../../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
下面每个字段都由引擎自身的组件注册表推导而来——就是编辑器 **Details** 面板读的那一份——
所以这里的类型和默认值就是你添加组件时真正拿到的值,且不可能与代码脱节。讲*怎么用*的正文在
diff --git a/docs/astro/src/content/docs/zh-cn/reference/components/world.mdx b/docs/astro/src/content/docs/zh-cn/reference/components/world.mdx
index 01b27a794..8a8c205b9 100644
--- a/docs/astro/src/content/docs/zh-cn/reference/components/world.mdx
+++ b/docs/astro/src/content/docs/zh-cn/reference/components/world.mdx
@@ -4,7 +4,7 @@ description: "瓦片地图、粒子,以及你在场景里摆放的标记。"
tableOfContents: false
---
-import ComponentReference from '../../../../../components/ComponentReference.astro';
+import ComponentReference from '@/components/ComponentReference.astro';
下面每个字段都由引擎自身的组件注册表推导而来——就是编辑器 **Details** 面板读的那一份——
所以这里的类型和默认值就是你添加组件时真正拿到的值,且不可能与代码脱节。讲*怎么用*的正文在
diff --git a/docs/astro/src/content/docs/zh-cn/scripting/events.mdx b/docs/astro/src/content/docs/zh-cn/scripting/events.mdx
index 635bbe2ad..902198626 100644
--- a/docs/astro/src/content/docs/zh-cn/scripting/events.mdx
+++ b/docs/astro/src/content/docs/zh-cn/scripting/events.mdx
@@ -15,11 +15,11 @@ click ─▶ ui.setPage(badge, on) 目标「Card」
```
连线**刻意不是**可视化编程语言。一行里没有分支、没有表达式;真的需要逻辑时,这行会指向一个
-把控制权交给[状态机](/docs/zh-cn/gameplay/ai/)的动作——Estella 已经有图编辑器了。
+把控制权交给[状态机](/docs/zh-cn/gameplay/ai/overview/)的动作——Estella 已经有图编辑器了。
## 检视器里的一根线
-![细节检视器中的「事件」区域](../../../../assets/guides/zh/events-section.png)
+![细节检视器中的「事件」区域](@/assets/guides/zh/events-section.png)
*按钮上的两根线:都在 `click` 时触发,一根切换按钮自身祖先链上的控制器,另一根按名字指向
`Card` 实体。*
@@ -78,7 +78,7 @@ world.insert(button, EventBinding, {
动作是共享注册表里的一个具名函数——`.esfsm` 状态钩子和 `.esbt` 叶子解析的是**同一个**
注册表。注册一次,三个候选列表里都能看到。
-![按命名空间分组的动作候选列表](../../../../assets/guides/zh/events-palette.png)
+![按命名空间分组的动作候选列表](@/assets/guides/zh/events-palette.png)
*候选按 `namespace.` 分组,引擎自带的动作还带一行说明。*
@@ -156,14 +156,14 @@ app.getResource(EntityEvents).emit(chest, 'looted', { gold: 12 });
## 当一根线需要逻辑时
一行只跑一个动作,没有"如果",也没有先后序列。这是**刻意**设的天花板,而 `fsm.fire` 就是
-突破口——点击发出一个触发器,实体的[状态机](/docs/zh-cn/gameplay/ai/)来决定它意味着什么:
+突破口——点击发出一个触发器,实体的[状态机](/docs/zh-cn/gameplay/ai/overview/)来决定它意味着什么:
```
click ─▶ fsm.fire(start) 目标「Hint」 → Idle ──start──▶ Running
onEnter: property.set(…)
```
-![状态机编辑器中,状态钩子的声明式参数](../../../../assets/guides/zh/events-fsm.png)
+![状态机编辑器中,状态钩子的声明式参数](@/assets/guides/zh/events-fsm.png)
*同一套参数控件,出现在状态机编辑器里:`property.set` 声明了 `path` 和 `value`,于是钩子
显示两个字段,而不是一个含义不明的字符串。*
diff --git a/docs/astro/src/content/docs/zh-cn/scripting/input.mdx b/docs/astro/src/content/docs/zh-cn/scripting/input.mdx
index 683af93fc..da7425645 100644
--- a/docs/astro/src/content/docs/zh-cn/scripting/input.mdx
+++ b/docs/astro/src/content/docs/zh-cn/scripting/input.mdx
@@ -76,7 +76,7 @@ const jump = defineSystem([Query(Mut(CharacterController)), Res(Input)], (player
## 输入动作(`InputMap`)
-![输入映射编辑器——命名动作及其键盘与手柄绑定](../../../../assets/guides/zh/input-map.png)
+![输入映射编辑器——命名动作及其键盘与手柄绑定](@/assets/guides/zh/input-map.png)
*输入映射编辑器:命名动作(Move / Jump / Fire),每个都能挂任意多个键盘、鼠标、手柄绑定。*
diff --git a/docs/astro/src/content/docs/zh-cn/scripting/overview.mdx b/docs/astro/src/content/docs/zh-cn/scripting/overview.mdx
index b96d6df98..4d4cb3311 100644
--- a/docs/astro/src/content/docs/zh-cn/scripting/overview.mdx
+++ b/docs/astro/src/content/docs/zh-cn/scripting/overview.mdx
@@ -319,7 +319,7 @@ world.spawn()
天然是*每实体*的(巡逻、抛射物、拾取物)时,用 `defineBehavior`;当你要一次处理整个查询、或在实体
间协调时,用一个普通[系统](/docs/zh-cn/core-concepts/systems/)。
-钩子签名——`entity`、`world`、`commands`,外加 `self`——也和[游戏 AI](/docs/zh-cn/gameplay/ai/) 层
+钩子签名——`entity`、`world`、`commands`,外加 `self`——也和[游戏 AI](/docs/zh-cn/gameplay/ai/overview/) 层
的动作与行为树叶子是同一套编程模型,所以在 behavior 和 AI 动作之间搬逻辑很顺手。
## 热重载
diff --git a/docs/astro/src/content/docs/zh-cn/ui/controllers.mdx b/docs/astro/src/content/docs/zh-cn/ui/controllers.mdx
index 6f232c7b3..ee827752e 100644
--- a/docs/astro/src/content/docs/zh-cn/ui/controllers.mdx
+++ b/docs/astro/src/content/docs/zh-cn/ui/controllers.mdx
@@ -114,7 +114,7 @@ world.insert(btn, UIGear, {
## 在编辑器里授权
-![检视器里的内联控制器条](../../../../assets/guides/zh/controllers-strip.png)
+![检视器里的内联控制器条](@/assets/guides/zh/controllers-strip.png)
*控制器条:当前激活的控制器(这里是从 Canvas 继承来的 `theme`)、以芯片形式排列的**翻页**(`sky` / `rose`),以及**此实体的绑定**——每个绑定到控制器的字段。*
@@ -160,7 +160,7 @@ activeTab.set('shop'); // 翻页,所有被绑定的元素重排
```
**从状态机** —— `ui.setPage` 动作让数据驱动的
-[FSM / 行为树](/docs/zh-cn/gameplay/ai/)(`.esfsm` / `.esbt`)无需写码就切页。参数是 `"controller:page"`:
+[FSM / 行为树](/docs/zh-cn/gameplay/ai/overview/)(`.esfsm` / `.esbt`)无需写码就切页。参数是 `"controller:page"`:
```json
{ "onEnter": { "name": "ui.setPage", "arg": "hud:alert" } }
@@ -181,5 +181,5 @@ activeTab.set('shop'); // 翻页,所有被绑定的元素重排
- [UI](/docs/zh-cn/ui/overview/) —— 绑定所驱动的 flexbox 组件模型。
- [UI 控件](/docs/zh-cn/ui/widgets/) —— 控件工厂。
- [时间轴](/docs/zh-cn/animation/timeline/) —— 关键帧过渡;绑定用的是同一套字段寻址。
-- [游戏 AI](/docs/zh-cn/gameplay/ai/) —— 能调用 `ui.setPage` 的 `.esfsm` / `.esbt`。
+- [游戏 AI](/docs/zh-cn/gameplay/ai/overview/) —— 能调用 `ui.setPage` 的 `.esfsm` / `.esbt`。
- [事件绑定](/docs/zh-cn/scripting/events/) —— 把点击直接接到 `ui.setPage`,不写代码。
diff --git a/docs/astro/src/content/docs/zh-cn/ui/layout.mdx b/docs/astro/src/content/docs/zh-cn/ui/layout.mdx
index d9b7b6cd7..0d06c7421 100644
--- a/docs/astro/src/content/docs/zh-cn/ui/layout.mdx
+++ b/docs/astro/src/content/docs/zh-cn/ui/layout.mdx
@@ -20,7 +20,7 @@ UI 布局里的每个 `px` 都是**设计像素**——项目设计分辨率(Pro
## 维度:`px`、`percent`、`auto`
-![px 是固定尺寸,percent 是父项的比例,auto 由内容决定](../../../../assets/guides/ui-units.svg)
+![px 是固定尺寸,percent 是父项的比例,auto 由内容决定](@/assets/guides/ui-units.svg)
*三种长度单位:`px` 是固定的设计像素尺寸,`percent` 是父项对应轴的比例,`auto` 收缩到内容大小(或被容器拉伸)。*
@@ -100,25 +100,25 @@ flex 容器沿一条**主轴**(由 `direction` 决定)排布子项,**交叉轴**
**`direction`** —— 主轴,以及子项流动的顺序:
-![FlexDirection 的四个值:Row、RowReverse、Column、ColumnReverse](../../../../assets/guides/flex-direction.svg)
+![FlexDirection 的四个值:Row、RowReverse、Column、ColumnReverse](@/assets/guides/flex-direction.svg)
-![同样四个盒子在编辑器里的真实渲染——一个 Row 容器和一个 Column 容器](../../../../assets/guides/flex-live.png)
+![同样四个盒子在编辑器里的真实渲染——一个 Row 容器和一个 Column 容器](@/assets/guides/flex-live.png)
*同样四个盒子在编辑器里的真实渲染——一个 `Row` 容器、一个 `Column` 容器。上面的示意图不是近似:引擎画出来就是这样。*
**`justifyContent`** —— 子项沿**主轴**如何排布,以及多出来的空间如何分配:
-![JustifyContent 的六个值:Start、Center、End、SpaceBetween、SpaceAround、SpaceEvenly](../../../../assets/guides/flex-justify.svg)
+![JustifyContent 的六个值:Start、Center、End、SpaceBetween、SpaceAround、SpaceEvenly](@/assets/guides/flex-justify.svg)
**`alignItems`** —— 子项沿**交叉轴**如何对齐。`Stretch`(默认)只拉伸交叉轴尺寸为 `auto` 的子项;
有固定尺寸的子项保持不变:
-![AlignItems 的四个值:Start、Center、End、Stretch](../../../../assets/guides/flex-align.svg)
+![AlignItems 的四个值:Start、Center、End、Stretch](@/assets/guides/flex-align.svg)
**`wrap`** —— 当子项在主轴上放不下时,`NoWrap` 通过 `flexShrink` 把它们压缩进一行;`Wrap` 保持
其尺寸、把溢出流到新行(这些行再由 `alignContent` 分配):
-![FlexWrap 的两个值:NoWrap 压进一行,Wrap 流到新行](../../../../assets/guides/flex-wrap.svg)
+![FlexWrap 的两个值:NoWrap 压进一行,Wrap 流到新行](@/assets/guides/flex-wrap.svg)
```typescript
import { FlexContainer, FlexDirection, JustifyContent, AlignItems } from 'esengine';
@@ -134,7 +134,7 @@ world.insert(panel, FlexContainer, {
## 绝对定位
-![Relative 节点参与排布、与兄弟共享空间;Absolute 节点由内偏移钉住、忽略兄弟](../../../../assets/guides/ui-position.svg)
+![Relative 节点参与排布、与兄弟共享空间;Absolute 节点由内偏移钉住、忽略兄弟](@/assets/guides/ui-position.svg)
*`Relative` 节点参与排布、与兄弟共享空间;`Absolute` 节点被抬出排布流、由内偏移(inset)钉住,浮在其余内容之上。*
@@ -180,7 +180,7 @@ const panel = spawnUIEntity({
## 代码里的锚点预设
-![九个点锚排成 3×3 网格(四角、边中点、中心),外加每轴的 Stretch](../../../../assets/guides/ui-anchor.svg)
+![九个点锚排成 3×3 网格(四角、边中点、中心),外加每轴的 Stretch](@/assets/guides/ui-anchor.svg)
*锚点选择器的九个点锚——各自把盒子钉到父项的某个角、边中点或正中心——外加每轴一个 **Stretch**,让盒子沿该轴铺满。*
diff --git a/docs/astro/src/content/docs/zh-cn/ui/overview.mdx b/docs/astro/src/content/docs/zh-cn/ui/overview.mdx
index 953529111..2b94d9974 100644
--- a/docs/astro/src/content/docs/zh-cn/ui/overview.mdx
+++ b/docs/astro/src/content/docs/zh-cn/ui/overview.mdx
@@ -116,7 +116,7 @@ addStartupSystem(buildPauseMenu);
九宫格把图切成 3×3 的网格,每一块按不同方式缩放:
-![原图被直接拉宽后四角糊掉;切成 3×3 后四角保持 1:1,四边只沿一个轴拉伸,只有中间双向拉伸](../../../../assets/guides/nine-slice.svg)
+![原图被直接拉宽后四角糊掉;切成 3×3 后四角保持 1:1,四边只沿一个轴拉伸,只有中间双向拉伸](@/assets/guides/nine-slice.svg)
`sliceBorder` 就是那四个数字:从每条边往内多远是"不该拉伸"的区带。四角在任何尺寸下都保留自己
的精确像素,于是同一张 100×112 的纹理既能做小提示框,也能做通栏横幅。这个边框属于**图像**本身,
@@ -132,7 +132,7 @@ addStartupSystem(buildPauseMenu);
这对列表视口足够了,但也正是圆形头像框以前仍然裁出方形的原因:遮罩图形是圆的,裁剪范围不是。
`alphaCutoff` 大于 0 时,裁剪范围切换为遮罩实际绘制出的形状。
-![方形照片配圆形遮罩:按外框裁剪时仍是方的;alphaCutoff 大于 0 后被裁成圆形](../../../../assets/guides/ui-mask.svg)
+![方形照片配圆形遮罩:按外框裁剪时仍是方的;alphaCutoff 大于 0 后被裁成圆形](@/assets/guides/ui-mask.svg)
`UIVisual.enabled` 只隐藏本实体的视觉;`UINode.display = None` 把该节点**连同整棵
子树**从布局、渲染和命中测试中移除。给节点加 `UIMask` 可把子项裁剪到盒内。
@@ -142,7 +142,7 @@ addStartupSystem(buildPauseMenu);
`Cover` 保持盒子、改为裁剪 UV。两者都不会让美术变形。`NineSlice` 和 `Tiled` 会忽略它——
适配盒子本来就是它们的职责。
-![宽图放进方形槽位:Fill 把它压扁,Contain 缩小到整张图放得下,Cover 填满盒子并裁掉溢出部分](../../../../assets/guides/object-fit.svg)
+![宽图放进方形槽位:Fill 把它压扁,Contain 缩小到整张图放得下,Cover 填满盒子并裁掉溢出部分](@/assets/guides/object-fit.svg)
**`UIMask.alphaCutoff` —— 按形状裁剪,而不是按外框。** 模板遮罩裁剪的是遮罩的*矩形*,所以
圆形头像框裁出来仍是方的。大于 `0` 时它按遮罩实际绘制的形状裁剪,判定用的是**精灵**的 alpha
@@ -202,7 +202,7 @@ world.insert(viewport, UIScroll, { vertical: true }); // content 缺省取第
## 编辑器还是代码
-![在编辑器视口里排好的一个 UI Canvas](../../../../assets/guides/zh/ui-screen.png)
+![在编辑器视口里排好的一个 UI Canvas](@/assets/guides/zh/ui-screen.png)
*编辑器里的一个 UI Canvas——依据设计框排布,带选中节点的 gizmo。同一套控件既能从代码写,也能在编辑器里排。*
diff --git a/docs/astro/src/content/docs/zh-cn/ui/text.mdx b/docs/astro/src/content/docs/zh-cn/ui/text.mdx
index 8c8d82ac3..c5455b9e1 100644
--- a/docs/astro/src/content/docs/zh-cn/ui/text.mdx
+++ b/docs/astro/src/content/docs/zh-cn/ui/text.mdx
@@ -94,7 +94,7 @@ const pulseBanner = defineSystem([Query(Mut(Transform), Text), Res(Time)], (q, t
## 对齐——有盒与无盒
-![九种文本对齐组合:align 左/中/右 × verticalAlign 上/中/下](../../../../assets/guides/text-align.svg)
+![九种文本对齐组合:align 左/中/右 × verticalAlign 上/中/下](@/assets/guides/text-align.svg)
*`align`(Left / Center / Right)和 `verticalAlign`(Top / Middle / Bottom)把文本块定位在它的盒内——九种组合。*
diff --git a/docs/astro/src/content/docs/zh-cn/ui/widgets.mdx b/docs/astro/src/content/docs/zh-cn/ui/widgets.mdx
index 65f2a60cd..cad78928e 100644
--- a/docs/astro/src/content/docs/zh-cn/ui/widgets.mdx
+++ b/docs/astro/src/content/docs/zh-cn/ui/widgets.mdx
@@ -28,7 +28,7 @@ Tab 能到达、Enter/Space 能点击、方向键能驱动滑块——用 `focus
绑定,可在编辑器里授权。
</Aside>
-![内置控件运行中——一个按钮、开关、滑块、进度条、一个对话框触发按钮等,同在一个面板里](../../../../assets/guides/zh/widgets-gallery.png)
+![内置控件运行中——一个按钮、开关、滑块、进度条、一个对话框触发按钮等,同在一个面板里](@/assets/guides/zh/widgets-gallery.png)
*内置控件(取自 `ui-controls` 示例):一个 **Button(按钮)**、一个 **Toggle(开关)**、一个
**Slider(滑块)**、一个 **Progress(进度条)**,以及打开 **Dialog(对话框)** 和切换强调色的
diff --git a/docs/astro/src/content/docs/zh-cn/world/particles.mdx b/docs/astro/src/content/docs/zh-cn/world/particles.mdx
index 03f1c3647..19aa7c2d1 100644
--- a/docs/astro/src/content/docs/zh-cn/world/particles.mdx
+++ b/docs/astro/src/content/docs/zh-cn/world/particles.mdx
@@ -199,7 +199,7 @@ const spawnEmbers = defineSystem([Commands()], (cmds) => {
## 发射器形状
-![视口里的发射器形状 gizmo——锥形、圆形、矩形](../../../../assets/guides/zh/particle-view.png)
+![视口里的发射器形状 gizmo——锥形、圆形、矩形](@/assets/guides/zh/particle-view.png)
*视口里的发射器形状 gizmo——锥形、圆形、矩形,各自画在粒子生成的位置(开 **Preview FX** 可在编辑态看它们运行)。*
diff --git a/docs/astro/src/content/docs/zh-cn/world/prefabs.mdx b/docs/astro/src/content/docs/zh-cn/world/prefabs.mdx
index abbdda75f..3c799aca0 100644
--- a/docs/astro/src/content/docs/zh-cn/world/prefabs.mdx
+++ b/docs/astro/src/content/docs/zh-cn/world/prefabs.mdx
@@ -37,7 +37,7 @@ import { Aside } from '@astrojs/starlight/components';
Prefab Mode 暂不支持:就地编辑**嵌套**预制体,或基不是扁平的变体。编辑预制体时 Play 与 *Save As* 被禁用。
-![编辑器处于 Prefab Mode,单独编辑一个 Coin 预制体](../../../../assets/guides/zh/prefab-mode.png)
+![编辑器处于 Prefab Mode,单独编辑一个 Coin 预制体](@/assets/guides/zh/prefab-mode.png)
*Prefab Mode:**Editing Prefab** 横幅带 **Save Prefab** / **Back to scene**,预制体作为它自己的实体树打开——保存后每个实例都会更新。*
diff --git a/docs/astro/src/content/docs/zh-cn/world/tilemaps.mdx b/docs/astro/src/content/docs/zh-cn/world/tilemaps.mdx
index bd58ccc51..646477b83 100644
--- a/docs/astro/src/content/docs/zh-cn/world/tilemaps.mdx
+++ b/docs/astro/src/content/docs/zh-cn/world/tilemaps.mdx
@@ -21,7 +21,7 @@ Tiled 文件导入,无需额外设置。
## 在编辑器里绘制
-![Estella 编辑器里,瓦片画笔面板与一张等距地图并排](../../../../assets/guides/zh/tilemap-overview.png)
+![Estella 编辑器里,瓦片画笔面板与一张等距地图并排](@/assets/guides/zh/tilemap-overview.png)
*选中一个 `TilemapLayer`,**瓦片画笔**就在左侧打开——上面是工具,下面是图集调色板。直接在视口里作画。*
@@ -43,7 +43,7 @@ Tiled 文件导入,无需额外设置。
绘制工具激活期间,`H` / `V` 翻转印章,`R` 旋转 90°。按 `Q`、`W` 或 `Esc` 离开绘制模式,
键位交还给变换工具。
-![瓦片画笔面板特写——工具行与瓦片调色板](../../../../assets/guides/zh/tilemap-tools.png)
+![瓦片画笔面板特写——工具行与瓦片调色板](@/assets/guides/zh/tilemap-tools.png)
*画笔面板特写:工具行(画笔、橡皮、矩形、椭圆、直线、油漆桶、框选、吸管、地形)、当前图集标签,以及你用来盖章的瓦片调色板。*
@@ -64,17 +64,17 @@ Tiled 文件导入,无需额外设置。
轴/起始行与六边形边长;之后 Inspector 编辑同一组字段。视口完全跟随图层:网格覆盖层、
画笔虚影、悬停/选区高亮和所有绘制工具在菱形或六边形网格上的表现与方格完全一致。
-![新建瓦片地图对话框——朝向选择器与图集列表](../../../../assets/guides/zh/tilemap-new.png)
+![新建瓦片地图对话框——朝向选择器与图集列表](@/assets/guides/zh/tilemap-new.png)
***新建瓦片地图**对话框在最开始就选好朝向与图集。*
同一张地图画在六边形与交错网格上:
-![视口里的六边形瓦片地图](../../../../assets/guides/zh/orient-hex.png)
+![视口里的六边形瓦片地图](@/assets/guides/zh/orient-hex.png)
*六边形——网格、画笔虚影和所有工具都跟随六边形布局。*
-![视口里的交错等距瓦片地图](../../../../assets/guides/zh/orient-staggered.png)
+![视口里的交错等距瓦片地图](@/assets/guides/zh/orient-staggered.png)
*交错等距——隔行平移半格。*
@@ -182,7 +182,7 @@ tilemap.setTilesets(layer, [
(毫秒)和删除/清空操作;带动画的瓦片在图集里有 ▶ 标记。帧数据保存进 `.estileset`,
所有使用该图集的图层都会自动播放——编辑器视口和运行时皆然,无需一行代码。
-![图集编辑器的动画模式——某个瓦片的帧条带与逐帧时长](../../../../assets/guides/zh/tileset-animation.png)
+![图集编辑器的动画模式——某个瓦片的帧条带与逐帧时长](@/assets/guides/zh/tileset-animation.png)
*动画模式:选一个瓦片(这里是 #34),点击图集瓦片追加帧,并以毫秒设置每帧时长。条带作为实时预览循环播放。*
@@ -207,7 +207,7 @@ tilemap.setChunkTiles(layer, chunkX, chunkY, tiles, 32, 32);
## 地形自动拼接
-![图集编辑器的地形模式——带 Grass / Sand / Water 颜色的角 Wang 集](../../../../assets/guides/zh/tileset-terrain.png)
+![图集编辑器的地形模式——带 Grass / Sand / Water 颜色的角 Wang 集](@/assets/guides/zh/tileset-terrain.png)
*地形模式里的**角 Wang** 集:定义地形颜色(Grass / Sand / Water),再给每个瓦片的四角上色——之后 `T` 画笔据此从邻居解析出正确的瓦片。*
@@ -232,7 +232,7 @@ tilemap.setChunkTiles(layer, chunkX, chunkY, tiles, 32, 32);
引擎的一等图集资源是 **`.estileset`**——它引用一张图集纹理,并携带逐瓦片的碰撞、动画、
地形/自动拼接(auto-tile)数据与自定义键值属性。
-![图集编辑器的碰撞模式——形状标签、修饰、斜坡预设,以及图集上的碰撞覆盖](../../../../assets/guides/zh/tileset-collision.png)
+![图集编辑器的碰撞模式——形状标签、修饰、斜坡预设,以及图集上的碰撞覆盖](@/assets/guides/zh/tileset-collision.png)
***图集编辑器**的碰撞模式:选形状(**盒 / 多边形 / 圆**)、切换**单向 / 传感器**并设置摩擦 / 弹性 / 密度、放置**斜坡**预设——绿色覆盖标出每个瓦片的碰撞体。*
@@ -271,7 +271,7 @@ Tiled 地图享受同等待遇:在 **Tiled 瓦片碰撞编辑器** 里画的形
**Create → 2D → Collision Layer**(或 *New Collision Layer* 命令)创建一个,预置 32px
网格,并打开画笔面板——此时调色板是碰撞笔刷而非图集。
-![碰撞笔刷调色板——实心、斜坡、半砖、单向、触发器,以及逐层的摩擦力与弹性字段](../../../../assets/guides/zh/collision-palette.png)
+![碰撞笔刷调色板——实心、斜坡、半砖、单向、触发器,以及逐层的摩擦力与弹性字段](@/assets/guides/zh/collision-palette.png)
***碰撞调色板**取代了图集:挑 **实心**、一个**斜坡**或**半砖**、**单向 ↑** 或
**触发器**,然后在背景上刷。**摩擦力** 和 **弹性** 字段为整个图层设一份物理材质。*
diff --git a/docs/astro/src/data/componentDocs.ts b/docs/astro/src/data/componentDocs.ts
index dcee81dd2..4408da8b1 100644
--- a/docs/astro/src/data/componentDocs.ts
+++ b/docs/astro/src/data/componentDocs.ts
@@ -129,12 +129,12 @@ export const COMPONENT_DOCS: Record<string, ComponentDoc> = {
Marker: { category: 'world', summary: 'A named point or region of gameplay interest — spawn point, waypoint, trigger zone — queryable like any component.', doc: 'gameplay/markers', anchor: 'marker-component-reference', anchorZh: 'marker-组件参考' },
// ── Gameplay ───────────────────────────────────────────────────────────────
- NavAgent: { category: 'gameplay', summary: 'Steers an entity along a path found on the navigation grid.', doc: 'gameplay/ai-navigation' },
- Perceiver: { category: 'gameplay', summary: 'Senses nearby perception targets within a sight cone and range.', doc: 'gameplay/ai-perception' },
- Perception: { category: 'gameplay', summary: "What a perceiver currently sees — written each frame for the entity's own logic to read.", doc: 'gameplay/ai-perception' },
- PerceptionTarget: { category: 'gameplay', summary: 'Tag: perceivers can see this entity.', doc: 'gameplay/ai-perception' },
- StateMachineAgent: { category: 'gameplay', summary: 'Runs a gameplay state machine asset, calling registry actions as states enter, update and exit.', doc: 'gameplay/ai-state-machines' },
- BehaviorTreeAgent: { category: 'gameplay', summary: 'Ticks a behavior tree asset against a blackboard, calling registry actions at its leaves.', doc: 'gameplay/ai-behavior-trees' },
+ NavAgent: { category: 'gameplay', summary: 'Steers an entity along a path found on the navigation grid.', doc: 'gameplay/ai/navigation' },
+ Perceiver: { category: 'gameplay', summary: 'Senses nearby perception targets within a sight cone and range.', doc: 'gameplay/ai/perception' },
+ Perception: { category: 'gameplay', summary: "What a perceiver currently sees — written each frame for the entity's own logic to read.", doc: 'gameplay/ai/perception' },
+ PerceptionTarget: { category: 'gameplay', summary: 'Tag: perceivers can see this entity.', doc: 'gameplay/ai/perception' },
+ StateMachineAgent: { category: 'gameplay', summary: 'Runs a gameplay state machine asset, calling registry actions as states enter, update and exit.', doc: 'gameplay/ai/state-machines' },
+ BehaviorTreeAgent: { category: 'gameplay', summary: 'Ticks a behavior tree asset against a blackboard, calling registry actions at its leaves.', doc: 'gameplay/ai/behavior-trees' },
EventBinding: { category: 'gameplay', summary: 'Wires an event on this entity to named actions — gameplay authored in the inspector, with no script.', doc: 'scripting/events', anchor: 'the-data', anchorZh: '数据本身' },
AudioSource: { category: 'gameplay', summary: 'Declarative playback attached to an entity, attenuated by distance when spatial.', doc: 'assets/audio', anchor: 'declarative-playback--audiosource', anchorZh: '声明式播放--audiosource' },
AudioListener: { category: 'gameplay', summary: 'The ear spatial audio is mixed relative to — usually the camera or the player.', doc: 'assets/audio', anchor: 'spatial-audio', anchorZh: '空间音频' },
diff --git a/docs/astro/tsconfig.json b/docs/astro/tsconfig.json
index 8bf91d3bb..990abae73 100644
--- a/docs/astro/tsconfig.json
+++ b/docs/astro/tsconfig.json
@@ -1,5 +1,11 @@
{
"extends": "astro/tsconfigs/strict",
"include": [".astro/types.d.ts", "**/*"],
- "exclude": ["dist"]
+ "exclude": ["dist"],
+ "compilerOptions": {
+ "baseUrl": ".",
+ "paths": {
+ "@/*": ["src/*"]
+ }
+ }
}