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
chore(api): refresh the surface snapshots for the composition seam
esengined0b4a321134a
diff --git a/sdk/etc/index.native.api.md b/sdk/etc/index.native.api.mdindex 50ccf9be1..9552c7358 100644--- a/sdk/etc/index.native.api.md+++ b/sdk/etc/index.native.api.md@@ -6501,7 +6501,7 @@ static prototype: QueryInstance<any>## REGISTRY_BINDINGS — const @experimental```-{ readonly createEntity: "es_createEntity"; readonly destroyEntity: "es_destroyEntity"; readonly setParent: "es_setParent"; readonly hasParent: "es_hasParent"; readonly getParent: "es_getParent"; readonly removeParent: "es_removeParent"; readonly hasChildren: "es_hasChildren"; readonly getChildren: "es_getChildren"; readonly getMeshSkinJoints: "es_getMeshSkinJoints"; readonly setMeshSkinJoints: "es_setMeshSkinJoints"; readonly layoutEpoch: "es_registryLayoutEpoch"; }+{ readonly createEntity: "es_createEntity"; readonly destroyEntity: "es_destroyEntity"; readonly setParent: "es_setParent"; readonly hasParent: "es_hasParent"; readonly getParent: "es_getParent"; readonly removeParent: "es_removeParent"; readonly hasChildren: "es_hasChildren"; readonly getChildren: "es_getChildren"; readonly getMeshSkinJoints: "es_getMeshSkinJoints"; readonly setMeshSkinJoints: "es_setMeshSkinJoints"; readonly layoutEpoch: "es_registryLayoutEpoch"; readonly transformEpoch: "es_transformEpochBuffer"; readonly ensureComposed: "es_transformEnsureComposed"; }```## RENAMED_COMPONENT_TYPES — const @experimentaldiff --git a/sdk/etc/wasm.api.md b/sdk/etc/wasm.api.mdindex 2bef30215..33bb67279 100644--- a/sdk/etc/wasm.api.md+++ b/sdk/etc/wasm.api.md@@ -423,6 +423,7 @@ tilemap_setTile: ((entity: number, x: number, y: number, tileId: number) => voidtilemap_setTiles: ((entity: number, tilesPtr: number, count: number) => void) | undefinedtrail_clear: ((registry: CppRegistry, entity: number) => void) | undefinedtrail_update: ((registry: CppRegistry, dt: number) => void) | undefined+transform_composeCollecting: ((registry: CppRegistry) => { ran: boolean; visited: number; changed: number; ptr: number; }) | undefinedtransform_ensureComposed: ((registry: CppRegistry) => void) | undefinedtransform_epochAddress: (() => number) | undefinedtransform_update: (registry: CppRegistry) => voiddiff --git a/sdk/src/physics/PhysicsSystem.ts b/sdk/src/physics/PhysicsSystem.tsindex 46b7de4fc..ee53493c5 100644--- a/sdk/src/physics/PhysicsSystem.ts+++ b/sdk/src/physics/PhysicsSystem.ts@@ -483,17 +483,15 @@ export function applyPhysics2DTransforms(// paths get from the registry for free: the body may name an entity that// is gone, or one that never carried a Transform.if (!app.world.valid(entityId) || !app.world.has(entityId, Transform)) continue;- // This path REPLACES the whole component, so the composed fields have to- // be carried across as they stand: a value from this loop would be this- // path authoring them.+ // This path REPLACES the whole component, so the composed fields ride+ // along as they stand rather than being authored here. Copied, because+ // editing what `get` answered is a write nothing observes.const current = app.world.get(entityId, Transform) as TransformData;- current.position.x = localX;- current.position.y = localY;- current.rotation.w = cosH;- current.rotation.x = 0;- current.rotation.y = 0;- current.rotation.z = sinH;- addFn!(entityId, current);+ addFn!(entityId, {+ ...current,+ position: { x: localX, y: localY, z: 0 },+ rotation: { w: cosH, x: 0, y: 0, z: sinH },+ });}}