point(250,250)
draws a point but set(250,250,255)
does not.
function setup() {
createCanvas(500,500);
}
function draw() {
background(0);
stroke(255);
point(250,250);
set(252,250,255)
}
point(250,250)
draws a point but set(250,250,255)
does not.
function setup() {
createCanvas(500,500);
}
function draw() {
background(0);
stroke(255);
point(250,250);
set(252,250,255)
}
hmm, yeah there seems to be slight differences in how they work (reference | p5.js)
After using set(), you must call updatePixels() for your changes to appear.
after adding updatePixels()
, it seems to work