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.

fix(gates): a start screen that faded is not one that never did

esengined913312a5c4a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e504f7e3c..e271f370c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,12 @@ published separately; it ships inside the editor.
### Fixed
+- **A web build no longer carries the mini-game and native SDKs.** The SDK ships every
+ target's build in one directory, and staging copied all of it — plus whatever an earlier
+ build had left there, since the build never cleaned up after itself. A web package now
+ carries the entry the page loads and the chunks that entry reaches: 412KB less for the
+ space-shooter example, and the same for every web build.
+
- **The build's size panel marks which files are in a subpackage.** Now that the engine binary
can move into one, a reader could not tell the bytes a 4MB cap is judged on from the bytes it
is not: the composition bar is 100% of the whole package and said so nowhere, and a
diff --git a/pipeline/tests/ships-to-browser.test.ts b/pipeline/tests/ships-to-browser.test.ts
index 3052cfc37..9b0d74bae 100644
--- a/pipeline/tests/ships-to-browser.test.ts
+++ b/pipeline/tests/ships-to-browser.test.ts
@@ -41,7 +41,7 @@ beforeAll(() => {
writeFileSync(at('chunks.json'), JSON.stringify(manifest));
});
-afterAll(() => rmSync(DIST, { recursive: true, force: true }));
+afterAll(() => rmSync(DIST, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 }));
describe('what a web export stages from sdk/dist', () => {
it('keeps exactly the entries the import map names', () => {
@@ -77,6 +77,6 @@ describe('what a web export stages from sdk/dist', () => {
it('refuses a dist with no manifest rather than falling back to shipping it all', () => {
const bare = mkdtempSync(path.join(tmpdir(), 'bare-'));
expect(() => shipsToBrowser(false, bare)).toThrow(/chunks\.json/);
- rmSync(bare, { recursive: true, force: true });
+ rmSync(bare, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 });
});
});
diff --git a/tools/launchers/launch-export.mjs b/tools/launchers/launch-export.mjs
index 2ba362953..37504f445 100644
--- a/tools/launchers/launch-export.mjs
+++ b/tools/launchers/launch-export.mjs
@@ -309,10 +309,11 @@ const SCENE = flag('scene', '');
}
// A start screen that outlived its boot covers the game with something that
- // looks like a game still loading, and every other check here still passes:
- // the canvas painted underneath it, the frame is not flat, nothing errored.
+ // looks like a game still loading, and every other check here passes. Faded,
+ // not removed: `done()` drops the node 400ms later, long after boot ended.
const splashLeft = await win.webContents.executeJavaScript(
- "!!document.getElementById('es-splash')",
+ "(() => { const e = document.getElementById('es-splash');"
+ + " return !!e && !e.classList.contains('es-splash-gone'); })()",
).catch(() => false);
const image = await win.webContents.capturePage();
diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjs
index 0ba7d9b60..29019f659 100644
--- a/tools/releaseNotes.mjs
+++ b/tools/releaseNotes.mjs
@@ -672,4 +672,8 @@ export const NOTED = {
{ internal: 'the check runner\'s argument parsing' },
'fix(automation): a capture waits as long as the package it is compared to':
{ internal: 'a verifier\'s timing, not the engine\'s' },
+ 'fix(export): a web package ships the chunks its entries reach':
+ { note: 'A web build no longer carries the mini-game and native SDKs.' },
+ 'refactor(sdk): four modules named support.ts, one flat chunk namespace':
+ { internal: 'the names inside the SDK build\'s own chunk output' },
};