Does set() work differently in P5.JS than it does in Processing?

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)
  
}
1 Like

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

5 Likes