提交 66863f32 编写于 作者: M Mr.doob

Editor: Removed Electron

上级 a5bf724f
const electron = require( 'electron' );
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const path = require( 'path' );
const url = require( 'url' );
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;
function createWindow() {
mainWindow = new BrowserWindow( { webPreferences: {
nodeIntegration: false
} } );
mainWindow.maximize();
mainWindow.setMenu( null );
mainWindow.loadURL( url.format( {
pathname: path.join( __dirname, 'index.html' ),
protocol: 'file:',
slashes: true
} ) );
mainWindow.on( 'closed', function () {
mainWindow = null;
} );
}
app.on( 'ready', createWindow );
app.on( 'window-all-closed', function () {
if ( process.platform !== 'darwin' ) {
app.quit();
}
} );
app.on( 'activate', function () {
if ( mainWindow === null ) {
createWindow();
}
} );
此差异已折叠。
......@@ -40,8 +40,7 @@
"start": "npm run dev",
"lint": "eslint src",
"test": "npm run build-test && qunit test/unit/three.source.unit.js",
"travis": "npm run lint && npm test",
"editor": "electron ./editor/main.js"
"travis": "npm run lint && npm test"
},
"keywords": [
"three",
......@@ -57,7 +56,6 @@
"homepage": "https://threejs.org/",
"devDependencies": {
"concurrently": "^4.1.0",
"electron": "^4.0.6",
"eslint": "^5.15.0",
"eslint-config-mdcs": "^4.2.3",
"eslint-plugin-html": "^5.0.3",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册