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(gates): the static gates behind the stale digest pass, with the release notes caught up
yhh80d7200e3c57
diff --git a/build-tools/tasks/nativeDeps.js b/build-tools/tasks/nativeDeps.jsindex fa90579c3..a1adc5780 100644--- a/build-tools/tasks/nativeDeps.js+++ b/build-tools/tasks/nativeDeps.js@@ -180,9 +180,9 @@ export async function fetchV8(platform, options = {}) {logger.info(`V8 ${pin.version} (${platform}) already fetched`);return dir;}- await rm(dir, { recursive: true, force: true });+ await rm(dir, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 });const scratch = path.join(deps, `v8-${platform}.download`);- await rm(scratch, { recursive: true, force: true });+ await rm(scratch, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 });await mkdir(scratch, { recursive: true });if (platform === 'windows') {@@ -215,7 +215,7 @@ export async function fetchV8(platform, options = {}) {if (platform === 'android' && !existsSync(path.join(dir, 'snapshot', 'arm64-v8a', 'snapshot_blob.bin'))) {throw new Error(`V8 (android): the archive carried no startup snapshot under ${dir}/snapshot`);}- await rm(scratch, { recursive: true, force: true });+ await rm(scratch, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 });await writeFile(stamp, want);logger.success(`V8 ${pin.version} (${platform}): ${dir}`);return dir;diff --git a/desktop b/desktopindex 4ea260fc4..cdcaa2259 160000--- a/desktop+++ b/desktop@@ -1 +1 @@-Subproject commit 4ea260fc471392d4f191ea3ecb060d55f41b1e9b+Subproject commit cdcaa22598ba02447f7ade755f3ac845ae3fc844diff --git a/pipeline/tests/physics3d-backend.test.ts b/pipeline/tests/physics3d-backend.test.tsindex ac3c8fc43..b01c0ced4 100644--- a/pipeline/tests/physics3d-backend.test.ts+++ b/pipeline/tests/physics3d-backend.test.ts@@ -40,7 +40,7 @@ describe('3D physics backend', () => {expect([...physx]).toEqual(['physics3d:physx']);expect(sideModuleFiles(physx).files).toEqual([{ id: 'physics3d:physx', file: 'physics3d-physx' }]);} finally {- rmSync(root, { recursive: true, force: true });+ rmSync(root, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 });}});});diff --git a/sdk/src/spline/splineComponent.ts b/sdk/src/spline/splineComponent.tsnew file mode 100644index 000000000..62fcbe2c1--- /dev/null+++ b/sdk/src/spline/splineComponent.ts@@ -0,0 +1,31 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file splineComponent.ts+ * @brief The Spline component alone, which the plugin that drives it and what is built from it both read.+ */+import { defineComponent, type ComponentDef } from '../ecs/component';+import type { SplinePoint } from './curve';++/** The fields of the `Spline` component. @experimental */+export interface SplineData {+ /** The points the curve passes through, in the entity's own space, in order, each with the width of whatever follows it there. */+ points: SplinePoint[];+ /** Whether the curve joins its end to its start. Needs three points. */+ closed: boolean;+}++/**+ * A curve through points. It is read by what follows it (a river's `WaterBody` on the same entity, a {@link PathFollower} on another).+ *+ * @experimental+ */+export const Spline: ComponentDef<SplineData> = defineComponent<SplineData>('Spline', {+ points: [{ x: -10, y: 0, z: 0, width: 4 }, { x: 10, y: 0, z: 0, width: 4 }] as SplinePoint[],+ closed: false,+}, {+ fields: {+ points: { category: 'Shape', tooltip: 'The points the curve passes through, in order, in the entity\'s own space. Each carries the width of whatever follows the curve there.' },+ closed: { category: 'Shape', tooltip: 'Join the end of the curve to its start (three points or more).' },+ },+});diff --git a/sdk/src/spline/splinePlugin.ts b/sdk/src/spline/splinePlugin.tsindex c20a98553..cf0dc4dbc 100644--- a/sdk/src/spline/splinePlugin.ts+++ b/sdk/src/spline/splinePlugin.ts@@ -15,29 +15,9 @@ import { playModeOnly } from '../ecs/env';import { defineComponent, Transform, type ComponentDef, type TransformData } from '../ecs/component';import { SplineCurve, type SplinePoint } from './curve';import { installTerrainBands } from './terrainBand2D';+import { Spline, type SplineData } from './splineComponent';-/** The fields of the `Spline` component. @experimental */-export interface SplineData {- /** The points the curve passes through, in the entity's own space, in order, each with the width of whatever follows it there. */- points: SplinePoint[];- /** Whether the curve joins its end to its start. Needs three points. */- closed: boolean;-}--/**- * A curve through points. It is read by what follows it (a river's `WaterBody` on the same entity, a {@link PathFollower} on another).- *- * @experimental- */-export const Spline: ComponentDef<SplineData> = defineComponent<SplineData>('Spline', {- points: [{ x: -10, y: 0, z: 0, width: 4 }, { x: 10, y: 0, z: 0, width: 4 }] as SplinePoint[],- closed: false,-}, {- fields: {- points: { category: 'Shape', tooltip: 'The points the curve passes through, in order, in the entity\'s own space. Each carries the width of whatever follows the curve there.' },- closed: { category: 'Shape', tooltip: 'Join the end of the curve to its start (three points or more).' },- },-});+export { Spline, type SplineData } from './splineComponent';/** What a {@link PathFollower} does at the end of the curve. */export const PathMode = { Once: 0, Loop: 1, PingPong: 2 } as const;diff --git a/sdk/src/spline/terrainBand2D.ts b/sdk/src/spline/terrainBand2D.tsindex 85124f787..3d69ba738 100644--- a/sdk/src/spline/terrainBand2D.ts+++ b/sdk/src/spline/terrainBand2D.ts@@ -20,7 +20,7 @@ import { MeshRenderers } from '../render/meshRenderer';import { triangulateRing } from '../render/vectorPath';import { ChainCollider2D, type ChainCollider2DData } from '../physics/PhysicsComponents';import { SplineCurve, type SplinePoint } from './curve';-import { Spline, type SplineData } from './splinePlugin';+import { Spline, type SplineData } from './splineComponent';import { Parent } from '../ecs/component';import { Transform } from '../ecs/component';diff --git a/tools/baselines/core-carries-options.json b/tools/baselines/core-carries-options.jsonindex 23af4b4de..988a5019e 100644--- a/tools/baselines/core-carries-options.json+++ b/tools/baselines/core-carries-options.json@@ -15,6 +15,7 @@"core-runtime.ts -> ./physics3d/Physics3DComponents","core-runtime.ts -> ./physics3d/Physics3DDebugDraw","core-runtime.ts -> ./physics3d/Physics3DJoints",+ "core-runtime.ts -> ./physics3d/ragdoll","platform/minigame/adapter.ts -> ../../video/WasmVideoBackend","platform/web.ts -> ../video/WebVideoBackend","runtime/packagedRuntime.ts -> ../video/VideoAPI",diff --git a/tools/check-project-settings.mjs b/tools/check-project-settings.mjsindex d1a754879..178ff660a 100644--- a/tools/check-project-settings.mjs+++ b/tools/check-project-settings.mjs@@ -81,6 +81,9 @@ const DECLARED_GAPS = {physicsEnabled: {editor: 'edit mode does not simulate — bodies are authored, not stepped',},+ physics3dBackend: {+ editor: 'edit mode does not simulate — see physicsEnabled',+ },physicsConfig: {editor: 'edit mode does not simulate — see physicsEnabled',},@@ -119,6 +122,7 @@ const PARSE_KEY = {steamAppId: 'dt.steam',physicsEnabled: 'p.enabled',physicsConfig: 'physics',+ physics3dBackend: 'backend3d',audioConfig: 'parseAudioProjectConfig',runtime: 'parseRuntimeBuildConfig',uiTheme: 'u.theme',@@ -143,6 +147,7 @@ const AUTHORING = {achievements: { ui: 'project.packaging.achievements' },steamAppId: { ui: 'project.packaging.desktop.steam.appId' },physicsEnabled: { ui: 'project.physics.enabled' },+ physics3dBackend: { ui: 'project.physics.backend3d' },physicsConfig: { ui: ['project.physics.gravityX', 'project.physics.gravityY', 'project.physics.fixedTimestep'] },audioConfig: { ui: ['project.audio.maxVoices', 'project.audio.buses', 'project.audio.effects'] },runtime: { ui: ['project.runtime.'] },diff --git a/tools/check-tilemap-realm.mjs b/tools/check-tilemap-realm.mjsindex 6f0280740..53726f3a4 100644--- a/tools/check-tilemap-realm.mjs+++ b/tools/check-tilemap-realm.mjs@@ -17,7 +17,8 @@* records no dependency.* 3. No module-level mutable "active" binding in the tilemap sources: an* editor world and a play world are two apps, and a pointer answers one.- * 4. `TilemapPlugin` holds no state. What it installs is per app.+ * 4. `TilemapPlugin` holds no state. What it installs is per app. Its name and the fixed+ * list of components it activates on (`activeWhen`) are what it is, not state.** Run: node tools/check-tilemap-realm.mjs (exit 1 on violation)*/@@ -86,7 +87,7 @@ if (!cls) {console.error('check-tilemap-realm: cannot read TilemapPlugin — this guard parses its body.');process.exit(1);}-const field = /^\s{4}(?:private |readonly |private readonly )*(\w+)\s*[:=]/m.exec(cls[1].replace(/^\s*name = 'tilemap';$/m, ''));+const field = /^\s{4}(?:private |readonly |private readonly )*(\w+)\s*[:=]/m.exec(cls[1].replace(/^\s*name = 'tilemap';$/m, '').replace(/^\s*readonly activeWhen = \[[^\]]*\];$/m, ''));if (field && field[1] !== 'name') {findings.push(`sdk/src/tilemap/tilemapPlugin.ts TilemapPlugin holds \`${field[1]}\` — one plugin object installs into many apps, and every collection here is World-local.`);}diff --git a/tools/check-tool-calls.mjs b/tools/check-tool-calls.mjsindex e90603583..068ad5c1b 100644--- a/tools/check-tool-calls.mjs+++ b/tools/check-tool-calls.mjs@@ -61,12 +61,15 @@ function scripts(dir, out = []) {const problems = [];let checked = 0;+/** What the MCP front answers itself, ahead of the catalog. */+const FRONT_TOOLS = new Set(['enable_tools']);for (const file of SCANNED.flatMap((d) => scripts(d))) {const source = readFileSync(file, 'utf8');const where = path.relative(ROOT, file);for (const [, tool, args] of source.matchAll(CALL)) {const known = declared.get(tool);+ if (FRONT_TOOLS.has(tool)) continue;if (!known) {problems.push(`${where}: no tool named "${tool}"`);continue;@@ -86,7 +89,6 @@ for (const file of SCANNED.flatMap((d) => scripts(d))) {* underscore in backticks is one too, apart from what the front itself answers (`enable_tools`) and shader names.*/const SHADER_IDENT = /^[uv]_/;-const FRONT_TOOLS = new Set(['enable_tools']);const GUIDES = [path.join(ROOT, 'docs', 'astro', 'src', 'content', 'docs', 'agents', 'mcp.mdx'),path.join(ROOT, 'docs', 'astro', 'src', 'content', 'docs', 'zh-cn', 'agents', 'mcp.mdx'),diff --git a/tools/tests/native-bytecode.test.ts b/tools/tests/native-bytecode.test.tsindex 094262549..9d9bd7503 100644--- a/tools/tests/native-bytecode.test.ts+++ b/tools/tests/native-bytecode.test.ts@@ -25,7 +25,7 @@ describe('native bytecode source identity', () => {describe('which SDK a template embeds, whichever engine it runs', () => {const bundle = Buffer.from('globalThis.ESEngine = {};');let dir: string | null = null;- afterEach(() => { if (dir) rmSync(dir, { recursive: true, force: true }); dir = null; });+ afterEach(() => { if (dir) rmSync(dir, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 }); dir = null; });const template = (files: Record<string, string | Buffer>) => {dir = mkdtempSync(path.join(tmpdir(), 'es-embeds-'));for (const [name, body] of Object.entries(files)) writeFileSync(path.join(dir, name), body);