paper.js/examples/Node.js/Tadpoles.js
Jürg Lehni f97056e4b7 Change the way PaperScripts are executed in Node.js
Requiring a PaperScript returns an initialize method which receives the Canvas argument.
2013-12-29 16:36:23 +01:00

13 lines
340 B
JavaScript

var paper = require('paper');
var scope = require('./Tadpoles.pjs')(new paper.Canvas(1024, 768));
scope.view.exportFrames({
amount: 400,
directory: __dirname,
onComplete: function() {
console.log('Done exporting.');
},
onProgress: function(event) {
console.log(event.percentage + '% complete, frame took: ' + event.delta);
}
});