p5.js center canvas code example
Example 1: p5.js put canvas in specific place
var myCanvas = createCanvas(winWidth, winHeight);
myCanvas.parent("idnameofdiv");
Example 2: p5js add canvas in middle
function setup() {
createCanvas(windowWidth, windowHeight);
background(255, 0, 200);
}