Google News
logo
p5.js - Interview Questions
What is the noCanvas() Function in p5.js?
If, for some reason, your p5.js sketch does not require a canvas, explicitly call the noCanvas() function to stop the p5.js library from creating a canvas at the start of the program.
 
function setup() {
  // No canvas element will be created for this p5.js sketch
    noCanvas();
}
Advertisement