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): a token may not be another token's second name
esengine829d171db623
diff --git a/desktop b/desktopindex 967cc2a4d..c8f61230a 160000--- a/desktop+++ b/desktop@@ -1 +1 @@-Subproject commit 967cc2a4da72fe3e620ef5619a8734caa671436f+Subproject commit c8f61230ac43a53e244f1549f62a17a349a275d0diff --git a/docs/astro/src/content/docs/extending/editor-plugins.mdx b/docs/astro/src/content/docs/extending/editor-plugins.mdxindex 1a06b8cf5..62c9e8de7 100644--- a/docs/astro/src/content/docs/extending/editor-plugins.mdx+++ b/docs/astro/src/content/docs/extending/editor-plugins.mdx@@ -222,8 +222,8 @@ ctx.commands.register({`mount` gets a plain host element and returns its teardown. The editor owns thetab, the error boundary and pop-out. Style against the editor's CSS variables —-`--srf-2` for the panel body, `--text` / `--text-dim` for copy, `--acc` for the-accent, `--border` for edges, `--fs-sm` for body size — and the panel matches the+`--srf-2` for the panel body, `--text` / `--text-dim` for copy, `--star` for the+accent, `--groove` for edges, `--fs-sm` for body size — and the panel matches thesurrounding chrome. Use a variable that exists: CSS has no unknown-variableerror, so a misspelled one simply does not draw.@@ -302,7 +302,7 @@ ctx.overlays.register({if (id == null) return;const p = ctx.scene.getFieldValue(id, 'Transform', 'position');if (!Array.isArray(p)) return;- g.circle({ x: p[0], y: p[1] }, 120, { color: 'var(--acc)', dashed: true });+ g.circle({ x: p[0], y: p[1] }, 120, { color: 'var(--star)', dashed: true });},});```diff --git a/docs/astro/src/content/docs/zh-cn/extending/editor-plugins.mdx b/docs/astro/src/content/docs/zh-cn/extending/editor-plugins.mdxindex b5dea7f0a..1df465489 100644--- a/docs/astro/src/content/docs/zh-cn/extending/editor-plugins.mdx+++ b/docs/astro/src/content/docs/zh-cn/extending/editor-plugins.mdx@@ -201,7 +201,7 @@ ctx.commands.register({`mount` 拿到一个普通的宿主元素,返回它的拆卸函数。标签页、错误边界和弹出窗口由编辑器负责。用编辑器的 CSS 变量写样式——面板底色 `--srf-2`、正文 `--text` /-`--text-dim`、强调色 `--acc`、描边 `--border`、正文字号 `--fs-sm`——面板就与周围+`--text-dim`、强调色 `--star`、描边 `--groove`、正文字号 `--fs-sm`——面板就与周围的界面一致。**要用真实存在的变量**:CSS 没有「未知变量」这种错误,名字写错的那条声明不会报错,只是什么都不画。@@ -278,7 +278,7 @@ ctx.overlays.register({if (id == null) return;const p = ctx.scene.getFieldValue(id, 'Transform', 'position');if (!Array.isArray(p)) return;- g.circle({ x: p[0], y: p[1] }, 120, { color: 'var(--acc)', dashed: true });+ g.circle({ x: p[0], y: p[1] }, 120, { color: 'var(--star)', dashed: true });},});```diff --git a/plugins/audio-mixer/src/style.ts b/plugins/audio-mixer/src/style.tsindex c5ec1c321..bb6f5c562 100644--- a/plugins/audio-mixer/src/style.ts+++ b/plugins/audio-mixer/src/style.ts@@ -9,45 +9,45 @@*/export const CSS = `.mixer { display: flex; gap: 8px; padding: 10px; overflow-x: auto; align-items: flex-start; height: 100%; }-.mixer-empty { padding: 16px; color: var(--text-mute); font-size: var(--fs-sm); }+.mixer-empty { padding: 16px; color: var(--text-faint); font-size: var(--fs-sm); }.mixer-strip {display: flex; flex-direction: column; gap: 6px;min-width: 190px; padding: 8px;- background: var(--srf-2); border: 1px solid var(--border); border-radius: 6px;+ background: var(--srf-2); border: 1px solid var(--groove); border-radius: 6px;}.mixer-head { display: flex; align-items: center; gap: 6px; }.mixer-name { flex: 1; font-size: var(--fs-sm); font-weight: 500; color: var(--text); }.mixer-row { display: flex; align-items: center; gap: 6px; }-.mixer-row input[type='range'] { flex: 1; min-width: 0; accent-color: var(--acc); }-.mixer-num { width: 26px; text-align: right; font-family: var(--mono); font-size: var(--fs-2xs); color: var(--text-mute); }-.mixer-label { font-size: var(--fs-2xs); color: var(--text-mute); }+.mixer-row input[type='range'] { flex: 1; min-width: 0; accent-color: var(--star); }+.mixer-num { width: 26px; text-align: right; font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-faint); }+.mixer-label { font-size: var(--fs-2xs); color: var(--text-faint); }.mixer-icon {display: grid; place-items: center; width: 22px; height: 22px;- background: none; border: 0; border-radius: 4px; color: var(--text-mute); cursor: pointer;+ background: none; border: 0; border-radius: 4px; color: var(--text-faint); cursor: pointer;}.mixer-icon:hover { background: var(--srf-3); color: var(--text); }-.mixer-icon.is-on { color: var(--acc); }+.mixer-icon.is-on { color: var(--star); }.mixer-select {background: var(--inset); color: var(--text);- border: 1px solid var(--border); border-radius: 4px;+ border: 1px solid var(--groove); border-radius: 4px;font-size: var(--fs-2xs); padding: 2px 4px; min-width: 0;}.mixer-fx {display: flex; flex-wrap: wrap; align-items: center; gap: 4px;padding: 4px; background: var(--srf-3); border-radius: 4px;}-.mixer-num-field { display: flex; align-items: center; gap: 3px; font-size: var(--fs-2xs); color: var(--text-mute); }+.mixer-num-field { display: flex; align-items: center; gap: 3px; font-size: var(--fs-2xs); color: var(--text-faint); }.mixer-num-field input {width: 52px; background: var(--inset); color: var(--text);- border: 1px solid var(--border); border-radius: 4px; font-size: var(--fs-2xs); padding: 2px 4px;+ border: 1px solid var(--groove); border-radius: 4px; font-size: var(--fs-2xs); padding: 2px 4px;}.mixer-add {display: flex; align-items: center; gap: 5px; align-self: stretch;padding: 8px 12px; background: none; cursor: pointer;- border: 1px dashed var(--border); border-radius: 6px;- color: var(--text-mute); font-size: var(--fs-sm); white-space: nowrap;+ border: 1px dashed var(--groove); border-radius: 6px;+ color: var(--text-faint); font-size: var(--fs-sm); white-space: nowrap;}-.mixer-add:hover { color: var(--text); border-color: var(--acc); }+.mixer-add:hover { color: var(--text); border-color: var(--star); }`;/** The rail glyph: three faders at three settings. `currentColor`, so the raildiff --git a/tools/check-theme.mjs b/tools/check-theme.mjsindex a30e376ff..065a41380 100644--- a/tools/check-theme.mjs+++ b/tools/check-theme.mjs@@ -110,6 +110,17 @@ for (const { name, hex, sat } of content) {}}+/**+ * A token whose whole value is `var(--other)` is a second name for a value that+ * already has one. Three such vocabularies had grown over this palette, and one+ * of them put `--border` (the dark groove) beside `--border-line` (the light+ * hairline) — one word over two roles the real names keep apart.+ */+for (const m of css.matchAll(/^\s*(--[a-z0-9-]+)\s*:\s*var\(\s*(--[a-z0-9-]+)\s*\)\s*;/gm)) {+ problems.push(`${TOKENS}: ${m[1]} is only another name for ${m[2]} — `+ + 'one value, one name; use the one that holds it');+}+/*** An identity token names a thing, not a role: `--ax-x` is the X axis,* `--gizmo-collider` is a collider, `--sel` is the selection. Colouring anythingdiff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex f3177f44d..3f3759f16 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -28,6 +28,9 @@ export const NOTES_FLOOR = 'v0.65.0';* the reader recognises anyway.*/export const NOTED = {+ 'refactor(theme): one name per value — three alias vocabularies collapse into one':+ { internal: "Editor token names only; the editor looks pixel-identical and no creator writes them." },+"fix(export): a web package no longer carries another host's SDK":{ note: "A web build stops shipping the WeChat SDK entries next to the one its page loads." },