mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-16 16:09:33 -04:00
Change the way PaperScripts are executed in Node.js
Requiring a PaperScript returns an initialize method which receives the Canvas argument.
This commit is contained in:
parent
976b24b34c
commit
f97056e4b7
3 changed files with 18 additions and 14 deletions
examples/Node.js
|
@ -1,7 +1,7 @@
|
|||
require('paper');
|
||||
var paper = require('./Tadpoles.pjs');
|
||||
var paper = require('paper');
|
||||
var scope = require('./Tadpoles.pjs')(new paper.Canvas(1024, 768));
|
||||
|
||||
paper.view.exportFrames({
|
||||
scope.view.exportFrames({
|
||||
amount: 400,
|
||||
directory: __dirname,
|
||||
onComplete: function() {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
paper.setup(new Canvas(1024, 768));
|
||||
|
||||
// Adapted from Flocking Processing example by Daniel Schiffman:
|
||||
// http://processing.org/learning/topics/flocking.html
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue