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(gates): a glyph drawn as an icon says so, and raw font-size banks zero
esengine22a1b3664751
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5420e3d97..b9e9ca746 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -28,6 +28,8 @@ published separately; it ships inside the editor.### Fixed+- **The Inspector's light and LOD explanations are readable.** Why a light was left out of a frame, or why an LOD held its level, was set at 11px — a size the editor's type scale does not have — and in Chinese the denser characters blurred at it. They now use the Inspector's body size and stay quieter than the values above them by colour, not by being smaller. The last few sizes that sat between two steps now sit on one: the profiler's headline numbers step up to the title size, and the start-up task list and a toast's repeat count step down.+- **A game started paused is handed the scene already held.** Asking the editor to start a game paused — what the built-in agent and the automation surface do to read a world that is standing still — waited for the game to report ready and paused it then, so it ran for however long that round trip took. On the physics playground the cart had already driven 6px up its ramp in three runs out of four, and in the fourth it had not moved at all: the state you read was never quite the state your scene authored. The pause now travels with the scene, and the world holds at its authored positions every time.- **Pressing Play while the editor is still warming up no longer loses the engine.** The editor brings the play realm's engine up in the background so the first Play is quick. "Is the engine up" is false for the whole of that bring-up, so a Play that landed inside it was treated as a cold start and reloaded the page that was doing the work — and the replacement then waited on a load the abandoned one still held. It waits for the warm-up it is about to use instead. This is likeliest on a loaded machine, where the warm-up takes longer than it takes you to click.diff --git a/desktop b/desktopindex 36c6886bf..6f21b9826 160000--- a/desktop+++ b/desktop@@ -1 +1 @@-Subproject commit 36c6886bfcca318e713dfa2e8e36e07bfb824c56+Subproject commit 6f21b982679e5794c957e508c3a6073b52edef4ediff --git a/tools/baselines/theme-drift.json b/tools/baselines/theme-drift.jsonindex 2050cd090..43eae9d88 100644--- a/tools/baselines/theme-drift.json+++ b/tools/baselines/theme-drift.json@@ -71,15 +71,7 @@"tileset/TilesetCommands.ts": 8,"tools/tileMath.ts": 6},- "rawFontSize": {- "app.css": 7,- "controls.css": 1,- "launcher.css": 1,- "profiler.css": 1,- "sequencer.css": 1,- "tileset.css": 1,- "viewport.css": 1- },+ "rawFontSize": {},"iconScale": {"sizes": ["8",diff --git a/tools/check-theme.mjs b/tools/check-theme.mjsindex 2cc724cd6..17011d0cf 100644--- a/tools/check-theme.mjs+++ b/tools/check-theme.mjs@@ -235,11 +235,45 @@ const colourLiteralsByFile = () => {return out;};+/**+ * Glyphs that are drawn as ICONS, each with the reason. Their size is set by the+ * shape they sit in, not by the reading ramp, so a step of the type scale would+ * be a wrong answer rather than a tidier one. Keyed by file, then selector.+ */+const NOT_TYPE = {+ 'launcher.css': {+ '.proj-card__glyph': 'a project\'s initial standing in for its thumbnail, sized to the card',+ },+ 'viewport.css': {+ '.vp-axes .va-end text': 'an axis letter inside its 84px gizmo knob, sized to the circle',+ },+ 'tileset.css': {+ '.ts-acell.has-anim::after': 'the ▶ badge in a tile cell\'s corner, sized to the cell',+ },+ 'controls.css': {+ '.dirty-dot': 'the ● unsaved marker, relative so it follows whatever title it sits in',+ },+};+/** A font-size given as a number rather than a step of the type scale. */const rawFontSizeByFile = () => {const out = {};for (const f of readdirSync(THEME_DIR).filter((n) => n.endsWith('.css') && n !== 'tokens.css')) {- const n = readFileSync(path.join(THEME_DIR, f), 'utf8').match(/font-size:\s*\d/g)?.length ?? 0;+ const text = uncomment(readFileSync(path.join(THEME_DIR, f), 'utf8'));+ const exempt = NOT_TYPE[f] ?? {};+ const seen = new Set();+ let n = 0;+ for (const m of text.matchAll(/font-size:\s*\d/g)) {+ const selector = selectorAt(text, m.index);+ if (selector in exempt) seen.add(selector);+ else n += 1;+ }+ for (const selector of Object.keys(exempt)) {+ if (!seen.has(selector)) {+ problems.push(`desktop/src/theme/${f}: ${selector} is declared an icon glyph but sets no raw `+ + 'font-size any more — drop it from NOT_TYPE');+ }+ }if (n > 0) out[f] = n;}return out;@@ -432,7 +466,8 @@ console.log(+ `${Object.values(colours).reduce((a, b) => a + b, 0)} colour literal(s) in theme `+ `and ${Object.values(colourCode).reduce((a, b) => a + b, 0)} in code `+ `(${Object.keys(NOT_THE_PALETTE).length} file(s) declared not the palette's), `- + `${Object.values(fontSizes).reduce((a, b) => a + b, 0)} raw font-size(s), `+ + `${Object.values(fontSizes).reduce((a, b) => a + b, 0)} raw font-size(s) `+ + `(${Object.values(NOT_TYPE).reduce((a, o) => a + Object.keys(o).length, 0)} declared icon glyph(s)), `+ `${icons.sizes.length} icon size(s) / ${icons.strokes.length} stroke width(s), `+ `${Object.values(handRolled).reduce((a, b) => a + b, 0)} hand-rolled control(s).`,);