Revamp to use terminalizer-player for rendering
This commit is contained in:
@@ -11,9 +11,19 @@ var path = require('path'),
|
||||
ipcMain = require('electron').ipcMain,
|
||||
os = require('os');
|
||||
|
||||
// Set as global to be read by the web page
|
||||
/**
|
||||
* The step option
|
||||
* To reduce the number of rendered frames (step > 1)
|
||||
* @type {Number}
|
||||
*/
|
||||
global.step = process.argv[2] || 1;
|
||||
|
||||
/**
|
||||
* The temporary rendering directory's path
|
||||
* @type {String}
|
||||
*/
|
||||
global.renderDir = path.join(__dirname, 'frames');
|
||||
|
||||
// Set the display scale factor to 1
|
||||
app.commandLine.appendSwitch('force-device-scale-factor', 1);
|
||||
|
||||
@@ -55,10 +65,11 @@ ipcMain.on('captured', function(event, recordIndex) {
|
||||
* A callback function for the event:
|
||||
* When something unexpected happened
|
||||
*
|
||||
* @param {String} errorMsg
|
||||
* @param {Object} event
|
||||
* @param {String} error
|
||||
*/
|
||||
ipcMain.on('error', function(errorMsg) {
|
||||
ipcMain.on('error', function(event, error) {
|
||||
|
||||
console.error(errorMsg);
|
||||
process.stderr.write(error);
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user