We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ada09de + a7a441b commit 8aa3aa2Copy full SHA for 8aa3aa2
js/app_p5.js
@@ -1376,11 +1376,19 @@ function preload() {
1376
1377
function setup() {
1378
frameRate(60);
1379
- var cnv = createCanvas(resx, resy);
+ cnv = createCanvas(resx, resy);
1380
+ centerCanvas();
1381
+ background(200);
1382
+}
1383
+
1384
+function centerCanvas() {
1385
var x = (windowWidth - width) / 2;
- var y = (windowHeight + 50 - height) / 2;
1386
+ var y = (windowHeight + 25 - height) / 2;
1387
cnv.position(x, y);
- background(200);
1388
1389
1390
+function windowResized() {
1391
1392
}
1393
1394
function draw() {
0 commit comments