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(); } });