Changes

Jump to: navigation, search

P5js-desktop-and-mobile

336 bytes added, 17:41, 19 April 2020
no edit summary
Add this to your Html Headerheader
<pre>
<meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width">
background-image: url('stripe.png');
}
</pre>
 
 
Add this to your p5js code
<pre>
// go 16:9
if (windowWidth < windowHeight) {
// if portrait=mobil then use the full display height
createCanvas(displayHeight * 0.5625, displayHeight);
} else {
// if landscape=dektop then use the full window height
createCanvas(windowHeight * 0.5625, windowHeight);
}
</pre>

Navigation menu