p5.clickable
p5.clickable copied to clipboard
Make the librarie works in instance mode ?
Is the librarie works in instance mode ? I tried it without success.
I have the following error :
Uncaught ReferenceError: fill is not defined
draw http://localhost/.../p5.clickable.js:117
Here a link of what instance mode looks like : https://p5js.org/examples/instance-mode-instantiation.html
let sketch = function(p) {
let x = 100;
let y = 100;
p.setup = function() {
p.createCanvas(700, 410);
};
p.draw = function() {
p.background(0);
p.fill(255);
p.rect(x, y, 50, 50);
};
};
let myp5 = new p5(sketch);