I’ve been trying multiple tactics to let my sketch open with a full screen.
With processing you just put fullScreen(); in setup and the sketch occupies the entire screen. With p5js this does not work.
The only way I manage in p5js is with this code:
function mousePressed() {
let fs = fullscreen();
fullscreen(!fs);
}
This however means that I can’t use the mouse any more.
I’m sure there is a better way.
Any help is appreciated.
Cheers,
Adrian.
If I use " createCanvas(displayWidth, displayHeight);" it does open a window the size of my screen but it does not fill the screen. I still have to use sliders to scroll through the image.
The keyPressed function also works but first I have to click the image to make the keyPressed function work.
The reason for me to work with p5js in stead of processing is that it has nice shader editors. If I use the screen as a buffer then the initial screen does need to be full size.
There must be a smart way to open the screen full size.
Thanks for your help.