New to p5.js how come my default color is black when i run it in chrome? using brackets
function setup() {
createCanvas(480,120);
}
function draw() {
rect(180, 60, 220, 40);
}
New to p5.js how come my default color is black when i run it in chrome? using brackets
function setup() {
createCanvas(480,120);
}
function draw() {
rect(180, 60, 220, 40);
}
Use fill command eg
fill(210);
or fill(255,0,0); before rect() command
Hello,
I tried this on a W10 Pro PC with the p5.js editor and the p5.js mode with Processing IDE and used Google Chrome and got the same results:
I do not know why the default is black in your case.
What version are you using?
For example:
https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js
I assume you have the latest Google Chrome.
Running on PC, Chromebook, tablet or phone?
:)
I’m using Brackets1.14.2 on wind 10
But when i remove createCanvas it became white
Hello,
I do not use Brackets and can’t comment further on this.
References:
learn | p5.js < The Using a local server section comments on Brackets.
:)