Skip to content

Commit 8aeb9c4

Browse files
committed
docs: add v0.10.0 changelog and update timeline, spine, input guides
fix: remove brittle timeline version assertion in test
1 parent 6c4f83d commit 8aeb9c4

10 files changed

Lines changed: 415 additions & 1 deletion

File tree

docs/astro/astro.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ export default defineConfig({
153153
label: 'Changelog',
154154
translations: { 'zh-CN': '更新日志' },
155155
items: [
156+
{ label: 'v0.10.0', slug: 'changelog-v0100' },
156157
{ label: 'v0.9.2', slug: 'changelog-v092' },
157158
{ label: 'v0.9.1', slug: 'changelog-v091' },
158159
{ label: 'v0.9.0', slug: 'changelog-v090' },
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: v0.10.0
3+
description: Estella v0.10.0 release notes
4+
---
5+
6+
import { Aside } from '@astrojs/starlight/components';
7+
8+
<Aside type="tip">
9+
v0.10.0 is a major feature release: AI-powered editor integration via MCP, visual timeline enhancements, expanded physics/spine/tilemap capabilities, and a new pivot point system.
10+
</Aside>
11+
12+
## MCP Server: AI-Assisted Editor Integration
13+
14+
Estella now includes a built-in MCP (Model Context Protocol) bridge that enables AI assistants like Claude to directly interact with the running editor. The bridge starts automatically and exposes a comprehensive API for:
15+
16+
- **Scene inspection**: read entity hierarchy, component data, asset lists
17+
- **Entity operations**: create, delete, rename, reparent entities; add/remove components
18+
- **Property editing**: modify component properties with full undo support
19+
- **Timeline control**: read/write timeline data, control playback
20+
- **Play mode**: start/stop/pause play mode, adjust playback speed
21+
- **Asset management**: read/write asset files, manage asset metadata
22+
23+
A standalone MCP server (`tools/mcp-server/`) wraps the bridge for use with any MCP-compatible client.
24+
25+
## Timeline: AnimFrames Track
26+
27+
A new `animFrames` track type displays individual sprite frames as colored, resizable blocks on the timeline. Each frame has its own duration that can be adjusted by dragging the block edges, enabling precise control over frame timing without splitting into multiple clips.
28+
29+
### Live Playhead Sync
30+
31+
When entering Play Mode, the timeline automatically switches to **LIVE** mode: the playhead tracks the runtime animation position in real-time (polled at 60fps from the C++ timeline system). A red blinking "LIVE" indicator appears in the toolbar. Editor playback controls are disabled during live mode and restore when exiting Play Mode.
32+
33+
### Timeline Editing Improvements
34+
35+
- **Multi-select keyframes**: Ctrl+click to toggle, Shift+click for range select, rubber-band box select
36+
- **Batch operations**: move or delete multiple selected keyframes as a single undo step
37+
- **Interpolation presets**: right-click keyframes to apply Linear, EaseIn, EaseOut, EaseInOut, or Step
38+
- **Marker & custom event tracks**: new track types for placing markers and custom events on the timeline
39+
- **Grid snap**: toggle snap-to-grid in the toolbar; keyframes snap to grid lines during drag
40+
- **Playback controls**: step forward/back by frame, speed control (0.25x–4x), wrap mode cycling (Once/Loop/PingPong)
41+
- **Duration editing**: double-click the time display to edit total timeline duration
42+
- **Track management**: drag to reorder, right-click for rename/delete, type-colored sidebar indicators
43+
44+
## Physics: Joints, Raycasting & Queries
45+
46+
### Joint Types
47+
48+
Five joint types are now available for connecting physics bodies:
49+
50+
- **Distance Joint**: maintains a fixed distance between two bodies
51+
- **Revolute Joint**: hinge rotation around a shared anchor point, with optional motor and angle limits
52+
- **Prismatic Joint**: linear sliding along an axis, with optional motor and translation limits
53+
- **Weld Joint**: rigidly bonds two bodies together
54+
- **Wheel Joint**: combines revolute and prismatic behavior for vehicle suspensions
55+
56+
### Spatial Queries
57+
58+
- **Raycast**: cast a ray through the physics world and get all hit results (point, normal, distance, entity)
59+
- **Overlap queries**: test a circle against the world to find overlapping bodies
60+
- **Compound shapes**: attach multiple collision shapes to a single physics body
61+
62+
### Editor Integration
63+
64+
A new physics editor plugin provides visual configuration of joints and shapes directly in the Inspector.
65+
66+
## Spine: Mixing, Events & IK
67+
68+
- **Animation mixing**: crossfade between Spine animations with configurable mix duration
69+
- **Event system**: listen for Spine animation events (start, end, complete, custom) via `SpineModuleController`
70+
- **Attachment control**: show/hide slots and swap attachments at runtime via `SpineController`
71+
- **IK constraints**: configure inverse kinematics constraints in Spine skeletons
72+
- **Slot color**: tint individual Spine slots programmatically
73+
74+
Performance improvements:
75+
- Mesh extraction results are cached across multi-camera renders
76+
- Mesh allocations batched to 2 per frame maximum
77+
- Transform matrix computation moved to C++ for reduced overhead
78+
79+
## Tilemap: Animated Tiles & Isometric
80+
81+
- **Animated tiles**: tiles can reference animation sequences that play automatically
82+
- **Tile properties**: access custom properties defined in Tiled on individual tiles
83+
- **Flip & rotate**: tiles support horizontal/vertical flip and 90-degree rotation
84+
- **Isometric grid**: native isometric tilemap rendering alongside orthogonal
85+
- **Debug visualization**: toggle tilemap grid overlay for debugging tile placement
86+
- **Tilemap API**: new `tilemapAPI` module for runtime tile manipulation (setTile, getTile, fillRect, etc.)
87+
88+
## Pivot & Anchor Points
89+
90+
Sprites now support configurable pivot points that affect rotation, scaling, and positioning. The editor displays a draggable pivot overlay in the Scene View. Bounds calculation accounts for non-center pivots.
91+
92+
## Editor Improvements
93+
94+
- **Asset picker dialog**: reusable modal for selecting assets by type, with grid preview and search
95+
- **Settings validation**: project settings now validate against a JSON schema, surfacing configuration errors early
96+
- **Improved inspectors**: AnimClip and BitmapFont inspectors redesigned with better UX
97+
- **Content browser**: asset grid supports additional preview modes
98+
99+
## Engine Internals
100+
101+
- Entity destruction cleanup hooks in the C++ Registry
102+
- Blend state moved from file-static to RenderCommand class member
103+
- Physics and Spine global state encapsulated into context structs
104+
- `App.physicsInitPromise` for awaiting async physics initialization

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,31 @@ if (input.isMouseButtonReleased(0)) {
104104
}
105105
```
106106

107+
<Aside type="caution">
108+
`getMousePosition()` returns **screen coordinates** (CSS pixels relative to the canvas element), not world coordinates. If you need to interact with entities in the scene, use `UICameraInfo` to get world coordinates — see [Screen to World Coordinates](#screen-to-world-coordinates) below.
109+
</Aside>
110+
111+
### Screen to World Coordinates
112+
113+
When using UI plugins (included by default via `createWebApp`), `UICameraInfo` automatically converts mouse position to world coordinates each frame:
114+
115+
```typescript
116+
import { defineSystem, addSystem, Res, Input, UICameraInfo } from 'esengine';
117+
118+
addSystem(defineSystem(
119+
[Res(Input), Res(UICameraInfo)],
120+
(input, camera) => {
121+
if (input.isMouseButtonPressed(0)) {
122+
// World coordinates, ready to use for scene interaction
123+
const wx = camera.worldMouseX;
124+
const wy = camera.worldMouseY;
125+
spawnBullet(wx, wy);
126+
}
127+
}
128+
));
129+
```
130+
131+
107132
## Scroll Input
108133

109134
```typescript

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

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,58 @@ addSystem(defineSystem(
138138
));
139139
```
140140

141+
## Animation Mixing
142+
143+
Crossfade between animations with configurable mix duration via `SpineManager`:
144+
145+
```typescript
146+
import { SpineManager } from 'esengine';
147+
148+
const manager = app.getResource(SpineManager);
149+
150+
// Set default mix duration for all transitions
151+
manager.setDefaultMix(entity, 0.2);
152+
153+
// Set mix duration for a specific transition pair
154+
manager.setMixDuration(entity, 'idle', 'run', 0.15);
155+
manager.setMixDuration(entity, 'run', 'idle', 0.3);
156+
```
157+
158+
## Attachment Control
159+
160+
Show/hide slots and swap attachments at runtime:
161+
162+
```typescript
163+
const manager = app.getResource(SpineManager);
164+
165+
// Hide a slot
166+
manager.setAttachment(entity, 'weapon', '');
167+
168+
// Swap to a different attachment
169+
manager.setAttachment(entity, 'weapon', 'sword');
170+
```
171+
172+
## IK Constraints
173+
174+
Configure inverse kinematics constraints on Spine skeletons. IK targets can be positioned programmatically:
175+
176+
```typescript
177+
const manager = app.getResource(SpineManager);
178+
179+
// mix: 0.0 = no effect, 1.0 = full IK
180+
manager.setIKTarget(entity, 'aim-ik', targetX, targetY, 1.0);
181+
```
182+
183+
## Slot Color
184+
185+
Tint individual Spine slots:
186+
187+
```typescript
188+
const manager = app.getResource(SpineManager);
189+
190+
manager.setSlotColor(entity, 'body', 1, 0.5, 0.5, 1);
191+
```
192+
141193
## Multi-Version Architecture
142194

143195
Estella supports Spine versions **3.8**, **4.1**, and **4.2** simultaneously. The engine automatically detects the Spine version from the skeleton data and selects the appropriate runtime backend.

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,34 @@ The **Timeline** system drives multi-track animations that coordinate property c
2626
| Property | Animate any numeric component property (position, scale, color, etc.) with keyframe interpolation |
2727
| Spine | Trigger Spine animation clips on a SpineAnimation component |
2828
| Sprite Animation | Play sprite animation clips |
29+
| AnimFrames | Visual frame track — each sprite frame is a colored, resizable block with its own duration |
2930
| Audio | Trigger audio events at specific times |
3031
| Activation | Enable/disable entities over time ranges |
32+
| Marker | Place named markers at specific times |
33+
| Custom Event | Trigger custom events at specific times |
34+
35+
### Keyboard Shortcuts
36+
37+
| Shortcut | Action |
38+
|----------|--------|
39+
| `Space` | Play / Pause |
40+
| `,` / `.` | Step backward / forward one frame |
41+
| `K` | Add keyframe at playhead |
42+
| `Delete` | Delete selected keyframes |
43+
| `Ctrl+Click` | Toggle keyframe selection |
44+
| `Shift+Click` | Range select keyframes |
45+
46+
### Toolbar Controls
47+
48+
- **Record**: Toggle auto-keyframe mode — changes to properties are automatically recorded as keyframes
49+
- **Speed**: Cycle playback speed (0.25x, 0.5x, 1x, 2x, 4x)
50+
- **Wrap Mode**: Cycle between Once, Loop, and PingPong
51+
- **Snap**: Toggle grid snapping during keyframe drag
52+
- **Duration**: Double-click the time display to edit total timeline duration
53+
54+
### Live Playhead Sync
55+
56+
When entering Play Mode, the timeline automatically switches to **LIVE** mode. The playhead tracks the runtime animation position in real-time, and a red "LIVE" indicator appears in the toolbar. Editor playback controls are disabled during live mode and restore when exiting Play Mode.
3157

3258
## TimelinePlayer Component
3359

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: v0.10.0
3+
description: Estella v0.10.0 更新日志
4+
---
5+
6+
import { Aside } from '@astrojs/starlight/components';
7+
8+
<Aside type="tip">
9+
v0.10.0 是一个重要的功能版本:AI 驱动的编辑器集成(MCP)、可视化时间轴增强、扩展的物理/Spine/Tilemap 能力,以及新的锚点系统。
10+
</Aside>
11+
12+
## MCP Server:AI 辅助编辑器集成
13+
14+
Estella 现在内置 MCP(Model Context Protocol)桥接器,允许 Claude 等 AI 助手直接与运行中的编辑器交互。桥接器自动启动,提供全面的 API:
15+
16+
- **场景检查**:读取实体层级、组件数据、资产列表
17+
- **实体操作**:创建、删除、重命名、重新父级实体;添加/移除组件
18+
- **属性编辑**:修改组件属性,完整支持撤销
19+
- **时间轴控制**:读写时间轴数据,控制播放
20+
- **Play 模式**:启动/停止/暂停 Play 模式,调整播放速度
21+
- **资产管理**:读写资产文件,管理资产元数据
22+
23+
独立的 MCP 服务器(`tools/mcp-server/`)封装了桥接器,可与任何 MCP 兼容客户端配合使用。
24+
25+
## 时间轴:AnimFrames 帧轨道
26+
27+
新增 `animFrames` 轨道类型,将精灵帧显示为时间轴上带颜色、可调整大小的色块。每帧有独立的时长,可通过拖拽色块边缘调整,实现对帧时序的精细控制。
28+
29+
### 实时播放头同步
30+
31+
进入 Play 模式时,时间轴自动切换到 **LIVE** 模式:播放头实时跟踪运行时动画位置(以 60fps 从 C++ 时间轴系统轮询)。工具栏显示红色闪烁的"LIVE"指示器。LIVE 模式下编辑器播放控件被禁用,退出 Play 模式后恢复。
32+
33+
### 时间轴编辑改进
34+
35+
- **多选关键帧**:Ctrl+点击切换选择、Shift+点击范围选择、框选
36+
- **批量操作**:批量移动或删除选中的关键帧,作为单次撤销步骤
37+
- **插值预设**:右键关键帧可应用 Linear、EaseIn、EaseOut、EaseInOut 或 Step
38+
- **标记与事件轨道**:新增标记和自定义事件轨道类型
39+
- **网格吸附**:工具栏切换网格吸附;拖拽时关键帧吸附到网格线
40+
- **播放控制**:逐帧前进/后退、速度控制(0.25x–4x)、循环模式切换(Once/Loop/PingPong)
41+
- **时长编辑**:双击时间显示可编辑总时长
42+
- **轨道管理**:拖拽排序、右键重命名/删除、类型颜色标识
43+
44+
## 物理:关节、射线检测与查询
45+
46+
### 关节类型
47+
48+
五种关节类型可用于连接物理体:
49+
50+
- **Distance Joint**:保持两个物理体之间的固定距离
51+
- **Revolute Joint**:围绕共享锚点的铰链旋转,支持可选马达和角度限制
52+
- **Prismatic Joint**:沿轴线线性滑动,支持可选马达和平移限制
53+
- **Weld Joint**:将两个物理体刚性绑定
54+
- **Wheel Joint**:组合旋转和平移行为,适用于车辆悬挂
55+
56+
### 空间查询
57+
58+
- **射线检测**:在物理世界中投射射线,获取所有命中结果(碰撞点、法线、距离、实体)
59+
- **重叠查询**:用圆形测试世界中的重叠物理体
60+
- **复合形状**:在单个物理体上附加多个碰撞形状
61+
62+
### 编辑器集成
63+
64+
新增物理编辑器插件,可在 Inspector 中直接可视化配置关节和形状。
65+
66+
## Spine:混合、事件与 IK
67+
68+
- **动画混合**:Spine 动画之间可配置混合时长的交叉淡入淡出
69+
- **事件系统**:通过 `SpineModuleController` 监听 Spine 动画事件(start、end、complete、custom)
70+
- **附件控制**:通过 `SpineController` 在运行时显示/隐藏插槽和替换附件
71+
- **IK 约束**:在 Spine 骨架中配置反向动力学约束
72+
- **插槽颜色**:以编程方式为单个 Spine 插槽着色
73+
74+
性能改进:
75+
- 多相机渲染时缓存网格提取结果
76+
- 网格分配每帧最多批处理为 2 次
77+
- 变换矩阵计算移至 C++ 以减少开销
78+
79+
## Tilemap:动画瓦片与等距视角
80+
81+
- **动画瓦片**:瓦片可引用自动播放的动画序列
82+
- **瓦片属性**:访问 Tiled 中定义的自定义瓦片属性
83+
- **翻转与旋转**:瓦片支持水平/垂直翻转和 90 度旋转
84+
- **等距网格**:支持等距瓦片地图渲染
85+
- **调试可视化**:切换瓦片地图网格覆盖层用于调试
86+
- **Tilemap API**:新增 `tilemapAPI` 模块用于运行时瓦片操作(setTile、getTile、fillRect 等)
87+
88+
## 锚点支持
89+
90+
精灵现在支持可配置的锚点(pivot),影响旋转、缩放和定位。编辑器在 Scene View 中显示可拖拽的锚点覆盖层。边界计算考虑非中心锚点。
91+
92+
## 编辑器改进
93+
94+
- **资产选择对话框**:可复用的资产选择模态框,支持按类型筛选、网格预览和搜索
95+
- **设置验证**:项目设置现在基于 JSON Schema 验证,提前暴露配置错误
96+
- **改进的检查器**:AnimClip 和 BitmapFont 检查器重新设计,UX 更佳
97+
- **内容浏览器**:资产网格支持额外的预览模式
98+
99+
## 引擎内部
100+
101+
- C++ Registry 新增实体销毁清理钩子
102+
- 混合状态从文件级静态变量移至 RenderCommand 类成员
103+
- 物理和 Spine 全局状态封装为上下文结构体
104+
- `App.physicsInitPromise` 用于等待异步物理初始化

docs/astro/src/content/docs/zh/guides/input.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,31 @@ if (input.isMouseButtonReleased(0)) {
104104
}
105105
```
106106

107+
<Aside type="caution">
108+
`getMousePosition()` 返回的是**屏幕坐标**(相对于 Canvas 元素的 CSS 像素),不是世界坐标。如果需要与场景中的实体交互,请使用 `UICameraInfo` 获取世界坐标——参见下方[屏幕坐标转世界坐标](#屏幕坐标转世界坐标)
109+
</Aside>
110+
111+
### 屏幕坐标转世界坐标
112+
113+
使用 UI 插件时(`createWebApp` 默认包含),`UICameraInfo` 每帧自动将鼠标位置转换为世界坐标:
114+
115+
```typescript
116+
import { defineSystem, addSystem, Res, Input, UICameraInfo } from 'esengine';
117+
118+
addSystem(defineSystem(
119+
[Res(Input), Res(UICameraInfo)],
120+
(input, camera) => {
121+
if (input.isMouseButtonPressed(0)) {
122+
// 世界坐标,可直接用于场景交互
123+
const wx = camera.worldMouseX;
124+
const wy = camera.worldMouseY;
125+
spawnBullet(wx, wy);
126+
}
127+
}
128+
));
129+
```
130+
131+
107132
## 滚轮输入
108133

109134
```typescript

0 commit comments

Comments
 (0)