Skip to content

Commit 8406e8f

Browse files
committed
docs: add v0.11.0 changelog and update guides for new features
Add EN/ZH changelogs, StateMachine guide with blend states and input control, rewrite Timeline guide with tutorial, update MCP/UI/scenes docs.
1 parent b9d51bf commit 8406e8f

15 files changed

Lines changed: 1618 additions & 78 deletions

File tree

docs/astro/astro.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export default defineConfig({
7676
{ label: 'Tween Animation', translations: { 'zh-CN': '补间动画' }, slug: 'guides/tween' },
7777
{ label: 'Spine Animation', translations: { 'zh-CN': 'Spine 动画' }, slug: 'guides/spine' },
7878
{ label: 'Timeline', translations: { 'zh-CN': '时间轴' }, slug: 'guides/timeline' },
79+
{ label: 'State Machine', translations: { 'zh-CN': '状态机' }, slug: 'guides/state-machine' },
7980
{ label: 'Bitmap Text', translations: { 'zh-CN': '位图文本' }, slug: 'guides/bitmap-text' },
8081
{ label: 'Custom Draw', translations: { 'zh-CN': '自定义绘制' }, slug: 'guides/custom-draw' },
8182
{ label: 'Post-Processing', translations: { 'zh-CN': '后处理效果' }, slug: 'guides/post-processing' },
@@ -154,6 +155,7 @@ export default defineConfig({
154155
label: 'Changelog',
155156
translations: { 'zh-CN': '更新日志' },
156157
items: [
158+
{ label: 'v0.11.0', slug: 'changelog-v0110' },
157159
{ label: 'v0.10.0', slug: 'changelog-v0100' },
158160
{ label: 'v0.9.2', slug: 'changelog-v092' },
159161
{ label: 'v0.9.1', slug: 'changelog-v091' },
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
title: v0.11.0
3+
description: Estella v0.11.0 release notes
4+
---
5+
6+
import { Aside } from '@astrojs/starlight/components';
7+
8+
<Aside type="tip">
9+
v0.11.0 introduces a full visual StateMachine system, replaces the layout engine with Yoga, ships a custom dock system, and delivers numerous editor UX improvements.
10+
</Aside>
11+
12+
## StateMachine: Visual State Management
13+
14+
A complete state machine system for driving animations and game logic, with a visual node-graph editor inspired by Rive and Unity Animator.
15+
16+
### Component & Asset
17+
18+
The new `StateMachine` component references a `.statemachine` asset and supports `autoPlay`. Define named states (Idle, Run, Attack…), each linked to a timeline clip, and connect them with condition-based transitions using user-defined parameters (float, int, bool, trigger).
19+
20+
### Node Graph Editor
21+
22+
A dedicated panel provides a full node-graph editing experience:
23+
24+
- Drag between state nodes to create transitions
25+
- Click transitions to configure conditions (parameter comparisons, exit time)
26+
- Right-click canvas to add states or set the default state
27+
- Multi-layer tabs for switching between layers
28+
29+
### Multi-Layer, Blend State & Exit State
30+
31+
- **Multiple layers**: each layer runs its own state graph independently with configurable weight (0.0–1.0) and blend mode (Override / Additive)
32+
- **Blend State**: blends between multiple timeline clips via a 1D blend tree — define motion entries at threshold values and the runtime interpolates between the two nearest motions
33+
- **Exit State**: a special node that signals a layer has finished, useful for one-shot animations
34+
35+
### Timeline Integration
36+
37+
Selecting a state in the graph opens its timeline clip in the Timeline panel for direct editing. StateMachine timeline handles are managed independently from regular timeline handles. Timeline assets are preloaded when entering Play Mode to prevent missing animation data.
38+
39+
### Inspector
40+
41+
Collapsible parameter and layer editors with persistent collapse state. Add, remove, and rename parameters; configure layer weights and blend modes — all inline in the Inspector.
42+
43+
## Yoga Layout Engine
44+
45+
The hand-written CSS Flexbox implementation has been replaced with **Yoga**, Facebook's battle-tested cross-platform layout engine (used by React Native). This brings more correct handling of edge cases in flex layout.
46+
47+
- `FlexContainer`: flexDirection, justifyContent, alignItems, alignContent, flexWrap, gap, padding, overflow
48+
- `FlexItem`: flexGrow, flexShrink, flexBasis, alignSelf, width/height, min/max dimensions, margin, aspectRatio, position (relative/absolute), positionInsets
49+
50+
Properties are now organized into groups (Layout, Alignment, Spacing, Sizing, Position) with human-readable display names in the Inspector.
51+
52+
## Custom Dock System
53+
54+
The third-party dockview library has been replaced with a fully custom dock system:
55+
56+
- **Drag-and-drop tabs**: reorder within a dock area or move panels between areas
57+
- **Split layouts**: drop tabs on edge indicators to split horizontally or vertically
58+
- **Resizable splitters**: drag borders between dock areas
59+
- **Floating panels**: pop out any panel as a floating window
60+
- **Persistent layout**: saved to localStorage and restored on reload, with a menu option to reset to defaults
61+
62+
## Add Component Popup
63+
64+
The "Add Component" button now opens a redesigned anchored panel:
65+
66+
- **Fuzzy search**: type to filter components with fuzzy matching
67+
- **Categorized list**: components organized by category (Rendering, UI, Physics, Audio, Layout, Animation, etc.)
68+
- **Keyboard navigation**: arrow keys to navigate, Enter to select
69+
70+
## spawn(name) API
71+
72+
- `world.spawn(name?)` creates a new entity with an optional name
73+
- `world.getEntityByName(name)` provides O(1) name-based entity lookup via an internal name index
74+
- The Hierarchy panel displays tag badges next to entity names for quick visual identification
75+
76+
## Enhanced Selection & Gizmo Cursors
77+
78+
- **Context-aware cursors**: move arrows show directional cursor, scale handles show resize cursor, rotate ring shows rotation cursor
79+
- **Hover highlighting**: gizmo handles highlight on hover with color feedback
80+
- **Click-through prevention**: gizmos take priority over entity selection when overlapping
81+
82+
## Multiple Output Handlers
83+
84+
`OutputService` now supports registering multiple output handlers via `addOutputHandler()` / `removeOutputHandler()`. Handlers are called in sequence, enabling scenarios like writing to file, sending to preview, and logging to console simultaneously.
85+
86+
## MCP Enhancements
87+
88+
- UI template instantiation route for creating UI hierarchies from templates
89+
- Improved screenshot capture with timeout, panel content selector, and html2canvas integration
90+
- MCP server extracted to a standalone repository as a git submodule
91+
92+
## Bug Fixes
93+
94+
- Fixed preview server port binding failure on Windows
95+
- Fixed MCP bridge file not created on Windows
96+
- Fixed popup and dropdown menus overflowing viewport bounds — positions are now clamped
97+
- Fixed padding editor style inconsistency with vec editor
98+
- Fixed Canvas missing UIRect when creating a new scene

docs/astro/src/content/docs/core-concepts/systems.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ defineSystem([Commands()], (cmds) => {
130130

131131
| Method | Returns | Description |
132132
|--------|---------|-------------|
133-
| `cmds.spawn()` | `EntityCommands` | Create a new entity, returns a builder |
133+
| `cmds.spawn(name?)` | `EntityCommands` | Create a new entity with an optional name, returns a builder |
134134
| `cmds.entity(entity)` | `EntityCommands` | Get a builder for an existing entity |
135135
| `cmds.despawn(entity)` | `this` | Queue entity for destruction |
136136
| `cmds.insertResource(res, value)` | `this` | Insert or overwrite a resource |

docs/astro/src/content/docs/guides/mcp.mdx

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Estella editor includes a built-in **MCP (Model Context Protocol)** bridge t
1313

1414
## Prerequisites
1515

16-
- Estella editor v0.10.0 or later
16+
- Estella editor v0.11.0 or later
1717
- Node.js 18+
1818
- An MCP-compatible AI client (e.g., Claude Desktop, Claude Code, Cursor)
1919

@@ -136,12 +136,40 @@ AI Client ←→ MCP Server (stdio) ←→ HTTP Bridge ←→ Estella Editor
136136
| `pause` | Pause/resume play mode |
137137
| `set_play_speed` | Adjust playback speed |
138138

139+
### UI Creation
140+
141+
Create fully configured UI widget hierarchies with a single tool call. Entities are auto-parented under the Canvas.
142+
143+
| Tool | Description |
144+
|------|-------------|
145+
| `create_text` | Create a text label with content, fontSize, color, and alignment |
146+
| `create_image` | Create an image element with tint color and size |
147+
| `create_panel` | Create a panel with background and mask |
148+
| `create_button` | Create a button with background and interactable |
149+
| `create_input_field` | Create a text input field with placeholder and initial value |
150+
| `create_toggle` | Create a toggle/checkbox |
151+
| `create_slider` | Create a slider with fill bar and handle |
152+
| `create_progress_bar` | Create a progress bar with fill |
153+
| `create_scroll_view` | Create a scrollable container |
154+
| `create_dropdown` | Create a dropdown/select with options |
155+
156+
### Editor State
157+
158+
| Tool | Description |
159+
|------|-------------|
160+
| `get_console_logs` | Get recent console logs, optionally filtered by level |
161+
| `get_panel_layout` | Get editor panel positions |
162+
| `get_project_settings` | Get project settings |
163+
| `get_build_status` | Get recent build history |
164+
| `get_render_stats` | Get frame timing and performance data |
165+
| `get_asset_info` | Get detailed info about an asset by UUID or path |
166+
139167
### Visual
140168

141169
| Tool | Description |
142170
|------|-------------|
143-
| `screenshot` | Capture a screenshot of the current viewport |
144-
| `screenshot_diff` | Compare two screenshots pixel-by-pixel |
171+
| `capture_editor` | Capture a screenshot of the editor (whole window or specific panel) |
172+
| `capture_diff` | Compare two screenshots pixel-by-pixel |
145173

146174
## Example Prompts
147175

docs/astro/src/content/docs/guides/scenes.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,18 @@ After building your project, the engine automatically loads the scene, resolves
4848

4949
### By Name
5050

51-
Every entity loaded from a scene receives a built-in `Name` component with the name assigned in the editor. Query `Name` to find entities:
51+
Use `findEntityByName()` for O(1) name-based lookup:
52+
53+
```typescript
54+
import { findEntityByName } from 'esengine';
55+
56+
const player = findEntityByName(world, 'Player');
57+
if (player) {
58+
// found the player entity
59+
}
60+
```
61+
62+
Alternatively, query the `Name` component to iterate over named entities:
5263

5364
```typescript
5465
import { defineSystem, addStartupSystem, Query, Name, Transform } from 'esengine';

0 commit comments

Comments
 (0)