We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I was searching around to find a way to specify the location the p5.js canvas will have on the page but i didn't find anything. I've called the sketch in this way:
< script language=" javascript " src="sketch.js" >< /script >
and the canvas gets automatically drawn after all the HTML elements in the body section. I would like to position it somewhere between my other html elements. Could anyone help me on how to do this?
Thanks in advance.
Answers
http://forum.processing.org/two/discussion/7726/anyone-know-how-to-make-a-transparent-background
you could use .position to position the canvas relative to the upper left corner of the window (http://localhost:8000/docs/reference/#p5.Element/position). note that you will need to include the p5.dom library to use this function.