Shrani spremembe - 2026-02-02: Čiščenje kode, Electron build setup, GrassScene popravki

This commit is contained in:
2026-02-02 08:44:51 +01:00
parent 6b134fe0b8
commit e0be842c85
7 changed files with 252779 additions and 114 deletions

View File

@@ -0,0 +1,37 @@
const { app, BrowserWindow } = require('electron');
const path = require('path');
function createWindow() {
const win = new BrowserWindow({
width: 1280,
height: 720,
webPreferences: {
nodeIntegration: false,
contextIsolation: true,
webSecurity: false, // DISABLE SECURITY to allow local file loading
// preload: path.join(__dirname, 'preload.js') // Optional
},
icon: path.join(__dirname, 'assets/DEMO_FAZA1/Characters/gronk_walk_sheet.png')
});
win.loadFile('index.html');
// Uncomment to open DevTools by default
win.webContents.openDevTools();
}
app.whenReady().then(() => {
createWindow();
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});
});
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});