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
feat(export): the build says what the start screen's logo costs the page
esengine86a15ea938e7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex d14dda3e5..231c01ceb 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -16,6 +16,8 @@ published separately; it ships inside the editor.### Added+- **The build says what the start screen's logo costs the page.** Inlined, the logo IS `index.html`, so a size report files it as page rather than as art — a start screen could quietly take a share of a main-package limit with nothing naming it. The export now states both numbers: the image on disk, and what it weighs in the page after base64.+- **You can tell the editor which models your account has seen take an image.** A vendor that documents nothing leaves its models at "nobody has said", and no picture is sent to one of those — which used to mean waiting for us to ship a build. Settings › AI Agents now has a box per provider for the model names you have confirmed yourself.### Fixeddiff --git a/pipeline/src/export/exportGame.ts b/pipeline/src/export/exportGame.tsindex eba57bdf9..5492c2716 100644--- a/pipeline/src/export/exportGame.ts+++ b/pipeline/src/export/exportGame.ts@@ -359,7 +359,13 @@ async function splashLook(warnings.push(`The splash logo ${splash.logo} does not exist — shown as the game's title instead.`);return look;}- look.logo = `data:${mime};base64,${(await readFile(file)).toString('base64')}`;+ const bytes = await readFile(file);+ look.logo = `data:${mime};base64,${bytes.toString('base64')}`;+ // Said out loud because the page swallows it: inlined, the logo IS index.html,+ // so a size report files it as page rather than art. Base64 is the cost —+ // a third more than the file on disk.+ warnings.push(`The start screen's logo ${splash.logo} is inlined into the page:`+ + ` ${bytes.length} bytes of image, ${look.logo.length} in the page.`);return look;}diff --git a/pipeline/tests/export-splash.test.ts b/pipeline/tests/export-splash.test.tsindex 25b0ec2cf..df7f50a75 100644--- a/pipeline/tests/export-splash.test.ts+++ b/pipeline/tests/export-splash.test.ts@@ -77,7 +77,8 @@ describe('the exported page’s start screen', () => {it('carries the logo IN the page, not as a request that races the engine', async () => {const { html, warnings } = await page({ logo: 'assets/logo.png' });- expect(warnings.join('\n')).not.toContain('logo');+ // Nothing REFUSED it. What it costs the page is said separately, below.+ expect(warnings.join('\n')).not.toMatch(/does not exist|not an image/);expect(html).toContain('class="es-splash-logo"');expect(html).toContain(`src="data:image/png;base64,${PNG.toString('base64')}"`);// The path itself must not survive into the page: a start screen that@@ -85,6 +86,17 @@ describe('the exported page’s start screen', () => {expect(html).not.toContain('assets/logo.png');}, 180_000);+ // Inlined, the logo is page bytes: a size report files it under the html and a+ // start screen can take a share of a main-package limit with nothing saying so.+ it('says what the logo costs the page, since the page hides it', async () => {+ const { warnings } = await page({ logo: 'assets/logo.png' });+ const said = warnings.find((w) => w.includes('assets/logo.png'));+ expect(said, 'the inlined logo cost nothing was told about').toBeDefined();+ expect(said).toContain(`${PNG.length} bytes`);+ // …and the base64 tax, which is the part a file listing cannot show.+ expect(said).toMatch(/\b\d+ in the page/);+ }, 180_000);+it('says so and ships anyway when the logo is not there', async () => {const { html, warnings } = await page({ logo: 'assets/missing.png' });expect(warnings.join('\n')).toContain('assets/missing.png');diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex 1bfde577a..0bd8a8740 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -700,6 +700,8 @@ export const NOTED = {{ internal: "the editor's preview page names the same subpaths it always did" },'fix(settings): the module page reads the same asset table the build installs from':{ note: 'The Engine Modules page no longer calls a module unused that the build then carries.' },+ 'feat(export): the build says what the start screen\'s logo costs the page':+ { note: "The build says what the start screen's logo costs the page." },'feat(agent): a person can record which models their account has seen take an image':{ note: 'You can tell the editor which models your account has seen take an image.' },'fix(agent): nothing claims a model cannot see when nobody has said so':