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.

chore(aot): the engine digest follows the Light layout, and the SDK test fixtures follow the stats they stand in for

yhh005d37a94337
diff --git a/sdk/tests/camera-commit.test.ts b/sdk/tests/camera-commit.test.ts
index cd091ddfb..dba7b34ab 100644
--- a/sdk/tests/camera-commit.test.ts
+++ b/sdk/tests/camera-commit.test.ts
@@ -46,7 +46,7 @@ describe('the camera a frame was drawn with', () => {
setYSortLayers: () => {}, setDepthLayers: () => {}, setTreeSortLayers: () => {}, setCullingMask: () => {},
setViewId: () => {},
lodInspect: () => null, setLodPreview: () => {}, setViewShading: () => {}, setMeshEdgeBuffers: () => {}, setViewSkinWeights: () => {}, lightStatus: () => null, shadowStatus: () => null,
- getStats: () => ({ drawCalls: 0, triangles: 0, sprites: 0, text: 0, skeletal: 0, meshes: 0, culled: 0 }),
+ getStats: () => ({ drawCalls: 0, gpuDraws: 0, triangles: 0, sprites: 0, text: 0, skeletal: 0, meshes: 0, culled: 0 }),
};
}
diff --git a/sdk/tests/camera-render-order.test.ts b/sdk/tests/camera-render-order.test.ts
index 970566b33..d752615ee 100644
--- a/sdk/tests/camera-render-order.test.ts
+++ b/sdk/tests/camera-render-order.test.ts
@@ -66,7 +66,7 @@ describe('render order: transforms resolve before cameras are read', () => {
setYSortLayers: () => {}, setDepthLayers: () => {}, setTreeSortLayers: () => {}, setCullingMask: () => {},
setViewId: () => {},
lodInspect: () => null, setLodPreview: () => {}, setViewShading: () => {}, setMeshEdgeBuffers: () => {}, setViewSkinWeights: () => {}, lightStatus: () => null, shadowStatus: () => null,
- getStats: () => ({ drawCalls: 0, triangles: 0, sprites: 0, text: 0, skeletal: 0, meshes: 0, culled: 0 }),
+ getStats: () => ({ drawCalls: 0, gpuDraws: 0, triangles: 0, sprites: 0, text: 0, skeletal: 0, meshes: 0, culled: 0 }),
};
}
diff --git a/sdk/tests/ragdoll.test.ts b/sdk/tests/ragdoll.test.ts
index 7acb5a5e9..9d07c71aa 100644
--- a/sdk/tests/ragdoll.test.ts
+++ b/sdk/tests/ragdoll.test.ts
@@ -2,6 +2,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
import { afterEach, beforeAll, beforeEach, describe, expect, it } from 'vitest';
import { World } from '../src/ecs/world';
+import type { Entity } from '../src/types';
import { Transform, Name, Parent, getComponent, ensureBuiltinComponentsRegistered } from '../src/ecs/component';
import type { CppRegistry, ESEngineModule } from '../src/wasm';
import { Ragdoll, RagdollProfile, RagdollFacing, classifyBone, BONE_LIMITS, planRagdoll, installRagdolls, type RagdollBone, type RagdollData } from '../src/physics3d/ragdoll';
diff --git a/sdk/tests/stats.test.ts b/sdk/tests/stats.test.ts
index 4b8236a45..b389e148c 100644
--- a/sdk/tests/stats.test.ts
+++ b/sdk/tests/stats.test.ts
@@ -578,7 +578,7 @@ await app.tick(1 / 60);
describe('render stats from Renderer.getStats()', () => {
it('should copy all render stats fields', async () => {
const mockStats: rendererModule.RenderStats = {
- drawCalls: 42, triangles: 8400, sprites: 100,
+ drawCalls: 42, gpuDraws: 42, triangles: 8400, sprites: 100,
text: 12, skeletal: 3, meshes: 5, culled: 7,
};
vi.spyOn(rendererModule.Renderer, 'getStats').mockReturnValue(mockStats);
@@ -599,11 +599,11 @@ await app.tick(1 / 60);
it('should update render stats each tick', async () => {
const tick1: rendererModule.RenderStats = {
- drawCalls: 10, triangles: 2000, sprites: 50,
+ drawCalls: 10, gpuDraws: 10, triangles: 2000, sprites: 50,
text: 5, skeletal: 1, meshes: 2, culled: 3,
};
const tick2: rendererModule.RenderStats = {
- drawCalls: 20, triangles: 4000, sprites: 80,
+ drawCalls: 20, gpuDraws: 20, triangles: 4000, sprites: 80,
text: 8, skeletal: 2, meshes: 4, culled: 6,
};
@@ -697,7 +697,7 @@ describe('StatsOverlay', () => {
fps: 0, frameTimeMs: 0, entityCount: 0,
systemTimings: new Map(),
phaseTimings: new Map(),
- drawCalls: 0, triangles: 0, sprites: 0,
+ drawCalls: 0, gpuDraws: 0, drawCallBudget: 0, triangles: 0, sprites: 0,
text: 0, skeletal: 0, meshes: 0, culled: 0,
...overrides,
};
diff --git a/src/esengine/aot/EngineDigest.generated.h b/src/esengine/aot/EngineDigest.generated.h
index fecaf98c5..c1616a25a 100644
--- a/src/esengine/aot/EngineDigest.generated.h
+++ b/src/esengine/aot/EngineDigest.generated.h
@@ -6,7 +6,7 @@
/* One per address width, because the width is IN the digest: a host that
took the other one would refuse every module built for it. */
-#define ES_ENGINE_ABI_DIGEST_32 0xb81a163f50f16233ULL
-#define ES_ENGINE_ABI_DIGEST_64 0xf32a5f990432930fULL
+#define ES_ENGINE_ABI_DIGEST_32 0x55efaa1800356183ULL
+#define ES_ENGINE_ABI_DIGEST_64 0xa0aa3df7a75dbd67ULL
#define ES_ENGINE_ABI_DIGEST \
(sizeof(es_addr_t) == 8 ? ES_ENGINE_ABI_DIGEST_64 : ES_ENGINE_ABI_DIGEST_32)
diff --git a/tests/aot/generated/move_system_decl.c b/tests/aot/generated/move_system_decl.c
index 721c80f69..248a7cf64 100644
--- a/tests/aot/generated/move_system_decl.c
+++ b/tests/aot/generated/move_system_decl.c
@@ -10,7 +10,7 @@
answer, it is a read of a different field. The address width belongs
to the MACHINE, so it mixes in here rather than in the compiler and a
32-bit artifact cannot load into a 64-bit host. */
-#define ES_ABI_ENGINE_DIGEST 0xf32a5f990432930fULL
+#define ES_ABI_ENGINE_DIGEST 0xa0aa3df7a75dbd67ULL
ES_EXPORT const uint64_t es_abi_hash =
ES_ABI_ENGINE_DIGEST ^ (0x9e3779b97f4a7c15ULL * (uint64_t)sizeof(es_addr_t));
diff --git a/tests/aot/generated/move_system_hash.h b/tests/aot/generated/move_system_hash.h
index 3f1e66d56..6fc8aa0c8 100644
--- a/tests/aot/generated/move_system_hash.h
+++ b/tests/aot/generated/move_system_hash.h
@@ -1,6 +1,6 @@
/* GENERATED by @estella/compiler — do not edit. */
/* The contract half of the handshake. The width half is the harness. */
-#define ES_EXPECTED_CONTRACT_HASH 0xf32a5f990432930fULL
+#define ES_EXPECTED_CONTRACT_HASH 0xa0aa3df7a75dbd67ULL
/* And which BUILD the artifact beside this one is, which the sidecar
written with it has to carry too. */
#define ES_EXPECTED_MODULE_CONTRACT 0x10bf77bb714ea1e3ULL