A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
docs: standardize on Transform (canonical) over the LocalTransform alias
yhhe59cdd5b91c7
diff --git a/docs/astro/src/content/docs/core-concepts/components.mdx b/docs/astro/src/content/docs/core-concepts/components.mdxindex 9ddb5057d..2c2b930b4 100644--- a/docs/astro/src/content/docs/core-concepts/components.mdx+++ b/docs/astro/src/content/docs/core-concepts/components.mdx@@ -21,7 +21,7 @@ lives in [systems](/docs/core-concepts/systems/).The SDK ships engine components you query alongside your own, for example:-- `LocalTransform` — position, rotation, and scale.+- `Transform` — position, rotation, and scale.- `Sprite` — a textured quad.- `Camera` — a view into the world.@@ -32,8 +32,8 @@ when a system writes to it, so change detection and the renderer know the datawas touched:```typescript-Query(Mut(LocalTransform), Speed)-// LocalTransform is written; Speed is read-only+Query(Mut(Transform), Speed)+// Transform is written; Speed is read-only```<br />diff --git a/docs/astro/src/content/docs/core-concepts/ecs.mdx b/docs/astro/src/content/docs/core-concepts/ecs.mdxindex 7a951d3ea..0dcdf34cf 100644--- a/docs/astro/src/content/docs/core-concepts/ecs.mdx+++ b/docs/astro/src/content/docs/core-concepts/ecs.mdx@@ -17,7 +17,7 @@ lives in systems that run over that data.## Why data-orientedComponents are stored in a single cache-friendly layer (a sparse set) so that a-system iterating "all entities with a `LocalTransform` and a `Speed`" walks+system iterating "all entities with a `Transform` and a `Speed`" walkscontiguous memory. Storage lives in the C++/WebAssembly core, and the SDK readsit with zero copies through a generated, hash-checked memory layout — so theTypeScript and C++ views of a component can never silently drift apart.diff --git a/docs/astro/src/content/docs/core-concepts/systems.mdx b/docs/astro/src/content/docs/core-concepts/systems.mdxindex ee7941042..79c249fc2 100644--- a/docs/astro/src/content/docs/core-concepts/systems.mdx+++ b/docs/astro/src/content/docs/core-concepts/systems.mdx@@ -12,13 +12,13 @@ exactly those, in the schedule.```typescriptimport {defineComponent, defineSystem, addSystem,- Query, Mut, Res, Time, LocalTransform+ Query, Mut, Res, Time, Transform} from 'esengine';const Speed = defineComponent('Speed', { value: 200 });addSystem(defineSystem(- [Res(Time), Query(Mut(LocalTransform), Speed)],+ [Res(Time), Query(Mut(Transform), Speed)],(time, query) => {for (const [entity, transform, speed] of query) {transform.position.x += speed.value * time.delta;diff --git a/docs/astro/src/content/docs/getting-started/quick-start.mdx b/docs/astro/src/content/docs/getting-started/quick-start.mdxindex e47c3848f..96228ade4 100644--- a/docs/astro/src/content/docs/getting-started/quick-start.mdx+++ b/docs/astro/src/content/docs/getting-started/quick-start.mdx@@ -14,7 +14,7 @@ with a system written in TypeScript.click **Create**. You get a default scene with a Camera entity.2. **Add an entity.** In the scene hierarchy, add an entity and give it a- `Sprite` and a `LocalTransform` component in the inspector.+ `Sprite` and a `Transform` component in the inspector.3. **Write a system.** Add a TypeScript file to your project's scripts andregister a system that moves everything with a `Speed` component:@@ -22,13 +22,13 @@ with a system written in TypeScript.```typescriptimport {defineComponent, defineSystem, addSystem,- Query, Mut, Res, Time, LocalTransform+ Query, Mut, Res, Time, Transform} from 'esengine';const Speed = defineComponent('Speed', { value: 200 });addSystem(defineSystem(- [Res(Time), Query(Mut(LocalTransform), Speed)],+ [Res(Time), Query(Mut(Transform), Speed)],(time, query) => {for (const [entity, transform, speed] of query) {transform.position.x += speed.value * time.delta;diff --git a/docs/astro/src/content/docs/zh-cn/core-concepts/components.mdx b/docs/astro/src/content/docs/zh-cn/core-concepts/components.mdxindex d11121f1a..2d8e50aed 100644--- a/docs/astro/src/content/docs/zh-cn/core-concepts/components.mdx+++ b/docs/astro/src/content/docs/zh-cn/core-concepts/components.mdx@@ -20,7 +20,7 @@ const Health = defineComponent('Health', { current: 100, max: 100 });SDK 自带一批引擎组件,你可以和自己的组件一起查询,例如:-- `LocalTransform` —— 位置、旋转与缩放。+- `Transform` —— 位置、旋转与缩放。- `Sprite` —— 一个带贴图的四边形。- `Camera` —— 观察世界的视图。@@ -30,8 +30,8 @@ SDK 自带一批引擎组件,你可以和自己的组件一起查询,例如和渲染器就知道这块数据被改动过:```typescript-Query(Mut(LocalTransform), Speed)-// LocalTransform 会被写入;Speed 只读+Query(Mut(Transform), Speed)+// Transform 会被写入;Speed 只读```<br />diff --git a/docs/astro/src/content/docs/zh-cn/core-concepts/ecs.mdx b/docs/astro/src/content/docs/zh-cn/core-concepts/ecs.mdxindex 8f8e6d8f1..7fd63e5da 100644--- a/docs/astro/src/content/docs/zh-cn/core-concepts/ecs.mdx+++ b/docs/astro/src/content/docs/zh-cn/core-concepts/ecs.mdx@@ -15,7 +15,7 @@ Estella 构建在 **Entity-Component-System**(ECS,实体-组件-系统)架## 为什么要数据导向组件存放在单一、缓存友好的存储层(稀疏集,sparse set)里,因此一个系统遍历-「所有同时拥有 `LocalTransform` 与 `Speed` 的实体」时走的是连续内存。存储位于+「所有同时拥有 `Transform` 与 `Speed` 的实体」时走的是连续内存。存储位于C++/WebAssembly 内核中,SDK 通过一份生成并经哈希校验的内存布局**零拷贝**读取它——于是同一个组件的 TypeScript 视图与 C++ 视图永远不会悄悄地对不上。diff --git a/docs/astro/src/content/docs/zh-cn/core-concepts/systems.mdx b/docs/astro/src/content/docs/zh-cn/core-concepts/systems.mdxindex e54512474..189d75ab4 100644--- a/docs/astro/src/content/docs/zh-cn/core-concepts/systems.mdx+++ b/docs/astro/src/content/docs/zh-cn/core-concepts/systems.mdx@@ -11,13 +11,13 @@ Estella 就会在调度中用恰好这些参数调用它。```typescriptimport {defineComponent, defineSystem, addSystem,- Query, Mut, Res, Time, LocalTransform+ Query, Mut, Res, Time, Transform} from 'esengine';const Speed = defineComponent('Speed', { value: 200 });addSystem(defineSystem(- [Res(Time), Query(Mut(LocalTransform), Speed)],+ [Res(Time), Query(Mut(Transform), Speed)],(time, query) => {for (const [entity, transform, speed] of query) {transform.position.x += speed.value * time.delta;diff --git a/docs/astro/src/content/docs/zh-cn/getting-started/quick-start.mdx b/docs/astro/src/content/docs/zh-cn/getting-started/quick-start.mdxindex 642c7d950..455de0c28 100644--- a/docs/astro/src/content/docs/zh-cn/getting-started/quick-start.mdx+++ b/docs/astro/src/content/docs/zh-cn/getting-started/quick-start.mdx@@ -14,7 +14,7 @@ import { Steps, Aside } from '@astrojs/starlight/components';一个带相机实体的默认场景。2. **添加实体。** 在场景层级里新建一个实体,在检视面板中给它加上 `Sprite` 与- `LocalTransform` 组件。+ `Transform` 组件。3. **编写系统。** 在项目的脚本里新建一个 TypeScript 文件,注册一个系统,让所有带`Speed` 组件的实体移动:@@ -22,13 +22,13 @@ import { Steps, Aside } from '@astrojs/starlight/components';```typescriptimport {defineComponent, defineSystem, addSystem,- Query, Mut, Res, Time, LocalTransform+ Query, Mut, Res, Time, Transform} from 'esengine';const Speed = defineComponent('Speed', { value: 200 });addSystem(defineSystem(- [Res(Time), Query(Mut(LocalTransform), Speed)],+ [Res(Time), Query(Mut(Transform), Speed)],(time, query) => {for (const [entity, transform, speed] of query) {transform.position.x += speed.value * time.delta;