Hey, I'm trying to center the position of the canvas of my game with your library (and tips here) instead of CSS but it doesn't work, the var returned by createCanvas(x,y) doesn't have the function 'position' defined.
Error :
Uncaught TypeError: canvas.position is not a function
at centerCanvas (game.js:105)
Code is available here :
https://github.com/NinoDLC/Nodino/blob/canvas_position_not_function/public/game/game.js#L105
You need to include a link to the p5.dom library in your html file, more info here:
https://p5js.org/reference/#/p5.Element/position
The github issues are just for bugs with p5.js, please use the forum for general programming questions and help in the future:
https://forum.processing.org
Most helpful comment
You need to include a link to the p5.dom library in your html file, more info here:
https://p5js.org/reference/#/p5.Element/position
The github issues are just for bugs with p5.js, please use the forum for general programming questions and help in the future:
https://forum.processing.org