feat: electron desktop packaging, CDN asset migration, production docs, scene JSON spec

This commit is contained in:
2026-06-09 23:20:27 +08:00
parent 48fb89449a
commit 3a7dd2f405
35 changed files with 900 additions and 135 deletions

13
electron/main.js Normal file
View File

@@ -0,0 +1,13 @@
const { app, BrowserWindow } = require('electron')
const path = require('path')
app.whenReady().then(() => {
const win = new BrowserWindow({
fullscreen: true,
autoHideMenuBar: true,
webPreferences: { nodeIntegration: false, contextIsolation: true }
})
win.loadFile(path.join(__dirname, '..', 'dist', 'index.html'))
})
app.on('window-all-closed', () => app.quit())

13
electron/package.json Normal file
View File

@@ -0,0 +1,13 @@
{
"name": "mygame-electron",
"private": true,
"version": "1.0.0",
"main": "main.js",
"scripts": {
"start": "electron ."
},
"devDependencies": {
"electron": "^30.0.0",
"@electron/packager": "^18.0.0"
}
}