Upgrade electron
This commit is contained in:
2912
package-lock.json
generated
2912
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -46,7 +46,7 @@
|
|||||||
"chalk": "^2.4.1",
|
"chalk": "^2.4.1",
|
||||||
"death": "^1.1.0",
|
"death": "^1.1.0",
|
||||||
"deepmerge": "^2.1.0",
|
"deepmerge": "^2.1.0",
|
||||||
"electron": "^2.0.8",
|
"electron": "^7.1.2",
|
||||||
"flowa": "^4.0.2",
|
"flowa": "^4.0.2",
|
||||||
"fs-extra": "^5.0.0",
|
"fs-extra": "^5.0.0",
|
||||||
"gif-encoder": "^0.6.1",
|
"gif-encoder": "^0.6.1",
|
||||||
|
|||||||
@@ -44,7 +44,10 @@ function createWindow() {
|
|||||||
var win = new BrowserWindow({
|
var win = new BrowserWindow({
|
||||||
show: false,
|
show: false,
|
||||||
width: 8000,
|
width: 8000,
|
||||||
height: 8000
|
height: 8000,
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: true
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Load index.html
|
// Load index.html
|
||||||
|
|||||||
@@ -116,14 +116,18 @@ function capture(frameIndex, callback) {
|
|||||||
|
|
||||||
stepsCounter = (stepsCounter + 1) % step;
|
stepsCounter = (stepsCounter + 1) % step;
|
||||||
|
|
||||||
capturePage(captureRect, function(img) {
|
capturePage(captureRect).then((img) => {
|
||||||
|
|
||||||
var outputPath = path.join(renderDir, frameIndex + '.png');
|
var outputPath = path.join(renderDir, frameIndex + '.png');
|
||||||
|
|
||||||
fs.writeFileSync(outputPath, img.toPNG());
|
fs.writeFileSync(outputPath, img.toPNG());
|
||||||
ipcRenderer.send('captured', frameIndex);
|
ipcRenderer.send('captured', frameIndex);
|
||||||
callback();
|
callback();
|
||||||
|
|
||||||
|
}).catch((err) => {
|
||||||
|
|
||||||
|
throw new err;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user