How can I use Wade Game Engine with 5p.js ?
p5.js
echar August 15th, 2016
All 3 Comments
Gio August 15th, 2016
It sounds like it should definitely be possible. What do you want to achieve exactly with p5?
If you wanted to create sprites with p5 and use them in your WADE game, you would create a canvas with p5 (without adding it to the screen) to draw your shapes into, then you would do something like this:
wade.setImage('myShape', p5canvas);
var mySprite = new Sprite('myShape');
echar August 15th, 2016
var p5canvas;
function setup() {
p5canvas=createCanvas(100,100);
rect(50,50,10,10);
}
Where shall i put this p5.js Code?
Gio August 16th, 2016
I am not familiar with that library, but it is my understanding that it expects a global function called setup(). In that case, you probably want to put that code in app.js, not inside the App function, just at the very top or at the very bottom of the file.
Post a reply
Add Attachment
Submit Reply
Login to Reply