Open whitneyland opened 10 years ago
it's not necessary to call createCanvas, but the default size is 100x100. I was thinking it could be nice to use the displayWidth x displayHeight... one issue with this is that most browsers have auto-padding that will leave you with a scrollbar if the sketch is the full width and height of the window. maybe just a larger default size is needed?
of course, with the IDE, there is an opportunity to be more custom. maybe it starts up with a sketch that has a createCanvas line matching the window size and a padding:0 line in the html?
Ok, if it's not actually needed that's great, but part of the benefit of this is to also remove it from the tutorials. Once your first tutorial step becomes one line of code instead of two it becomes more beautiful, and clears the users mind more to learn about p5.
Would definitely make the default an order of magnitude bigger. 1000x1000? Nowadays that resolution even fits on most new phones and tablets.
Having the editor change the default behavior of the language seems like a horrible idea. I could see moving this request to the language itself, but it doesn't belong in the editor.
Shouldn’t have to explicitly call createCanvas() for simple apps. Why not do it by default to match the current window size?
If there is some reason this allows more efficiency maybe you could still make the call hidden/implicit, but then allow it explicitly later as needed.