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(release): isolate compositor capture and preserve GPU diagnostics
yhha4b7133d6e07
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.ymlindex c92b32111..8b8c4cd7f 100644--- a/.github/workflows/release-desktop.yml+++ b/.github/workflows/release-desktop.yml@@ -137,6 +137,17 @@ jobs:- name: Capture the shipped example for the websiterun: node tools/capture-release-frame.mjs out/release-site-frame+ - name: Keep compositor and game-canvas capture diagnostics+ if: always()+ uses: actions/upload-artifact@v7+ with:+ name: release-capture-diagnostics+ path: |+ out/release-site-frame/*.png+ out/release-site-frame/capture.log+ if-no-files-found: warn+ retention-days: 3+- name: Upload the real game frame and provenanceuses: actions/upload-artifact@v7with:diff --git a/desktop b/desktopindex b970a59d1..c9623c35c 160000--- a/desktop+++ b/desktop@@ -1 +1 @@-Subproject commit b970a59d17d37ab2e2723325cba4167ac2635e4d+Subproject commit c9623c35c4c37be544d7918bb3c9e179bf8fdd77diff --git a/tools/capture-release-frame.mjs b/tools/capture-release-frame.mjsindex bb13a6725..266e31f48 100644--- a/tools/capture-release-frame.mjs+++ b/tools/capture-release-frame.mjs@@ -5,7 +5,7 @@ import {mkdirSync, readFileSync, writeFileSync} from 'node:fs';import path from 'node:path';import {fileURLToPath} from 'node:url';import {createHash} from 'node:crypto';-import {runElectron} from './lib/electronRun.mjs';+import {runElectron, NEEDS_XVFB} from './lib/electronRun.mjs';const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..');const out=path.resolve(root,process.argv[2]??'out/release-site-frame');@@ -15,11 +15,22 @@ const exported=spawnSync(process.execPath,['pipeline/bin/estella.mjs','export',''--platform','web','--out',subject],{cwd:root,encoding:'utf8'});if(exported.status!==0)throw Error(`Site subject export failed: ${exported.stderr}`);const frame=path.join(out,'celestial-heights-frame.png');+const canvasFrame=path.join(out,'celestial-heights-canvas.png');+// Isolate the page compositor from the software WebGL device on a virtual+// display. Failed runs showed one-copy SharedImage allocation failures followed+// by a lost context; keep both captures and still demand an error-free game.+const softwareCompositor=NEEDS_XVFB||process.argv.includes('--software-compositor');const capture=runElectron(['tools/launchers/launch-export.mjs','--dir',subject,'--w','1280','--h','720',- '--settle','60','--timeout','120000','--out',frame],{cwd:root,encoding:'utf8'});+ '--settle','60','--timeout','120000','--out',frame,'--canvas-out',canvasFrame,+ ...(softwareCompositor?['--disable-gpu-compositing']:[])],{cwd:root,encoding:'utf8'});+writeFileSync(path.join(out,'capture.log'),`${capture.stdout??''}\n${capture.stderr??''}`);if(capture.status!==0)throw Error(`Site subject capture failed: ${capture.stdout}\n${capture.stderr}`);+console.log((capture.stdout??'').trim());const provenance={schema:1,project:'examples/celestial-heights',version:JSON.parse(readFileSync(path.join(root,'package.json'),'utf8')).version,gitSha:execFileSync('git',['rev-parse','HEAD'],{cwd:root,encoding:'utf8'}).trim(),- sha256:createHash('sha256').update(readFileSync(frame)).digest('hex'),capture:'exported Web game, hidden Electron, 60 settled frames',width:1280,height:720};+ sha256:createHash('sha256').update(readFileSync(frame)).digest('hex'),+ canvasSha256:createHash('sha256').update(readFileSync(canvasFrame)).digest('hex'),+ compositor:softwareCompositor?'software':'default',+ capture:'exported Web game, hidden Electron, 60 settled frames',width:1280,height:720};writeFileSync(path.join(out,'hero-provenance.json'),JSON.stringify(provenance,null,2)+'\n');console.log(JSON.stringify(provenance));diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex 2768d622b..85643badf 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -28,6 +28,8 @@ export const NOTES_FLOOR = 'v0.65.0';* the reader recognises anyway.*/export const NOTED = {+ 'chore(release): isolate compositor capture and preserve GPU diagnostics':+ { internal: 'Release-only capture separates the virtual-display compositor from software WebGL, retains game-canvas/window images and logs, and continues to fail on any game error; runtime behavior is unchanged.' },'fix(editor): resolve the installed macOS executable from its bundle metadata':{ note: 'The installed macOS MCP entry launches the bundled editor.' },'fix(editor): preserve prefab painter order when saving scenes':