mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
16 lines
545 B
JavaScript
16 lines
545 B
JavaScript
// Please note: When loading paper as a normal module installed in node_modules,
|
|
// you would use this instead:
|
|
// var paper = require('paper-jsdom-canvas');
|
|
var paper = require('../../dist/paper-full.js');
|
|
var scope = require('./Tadpoles.pjs')(new paper.Size(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);
|
|
}
|
|
});
|