INNER CODE UNIT · JavaScript
createWindow
jjppof/goldensun_html5 · electron/main.js:12
function createWindow() {
const is_dev_env = process.argv[2] !== undefined && process.argv[2] == "dev";
const win = new BrowserWindow({
width: 240,
height: 160,
resizable: is_dev_env ? true : false,
center: true,
useContentSize: true,
autoHideMenuBar: true,
maximizable: false,
backgroundColor: '#000000',
title: "Golden Sun Engine - HTML5",
icon: path.join(__dirname, "../static/favicon.ico"),
show: false,
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
webgl: true,
webgl2: true,