From fd4cb2318262300bcc0073f5a2a247fa245349c8 Mon Sep 17 00:00:00 2001 From: Mottributo <87079566+Mottributo@users.noreply.github.com> Date: Thu, 23 Mar 2023 17:22:33 +0300 Subject: [PATCH] minor formatting --- sketch.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/sketch.js b/sketch.js index c9a2d02..0bfc512 100644 --- a/sketch.js +++ b/sketch.js @@ -291,10 +291,10 @@ function draw() { else if (flagpole.isReached) text("Level complete. Press space to continue...", 0, height / 2); if (showDebugData) { - text(gameChar.curGroundPosYIndex, 99, 99); - text(gameChar.getCurGroundPosY(), 188, 99); - text(gameChar.sprite, 277, 99); - drawFps(); + text(gameChar.curGroundPosYIndex, 99, 99); + text(gameChar.getCurGroundPosY(), 188, 99); + text(gameChar.sprite, 277, 99); + drawFps(); } pop(); } @@ -585,7 +585,7 @@ function drawClouds() { translate((frameCount / clouds[i].y) * 20, 0); // imitating clouds movement, upper ones should go faster // Adding counter-translating to implement parallax, the feeling of depth translate(cameraPosX / 1.1, 0); - + noStroke(); fill(palette.cloud0); ellipse( @@ -785,12 +785,10 @@ function checkPlayerDie() { } function drawFps() { push(); - - fps = Math.round(frameRate() * 10) / 10; - if (fps_recent_values.length < 200) fps_recent_values.push(fps); - else fps_recent_values.shift(); - fps_recent_values.push(fps); - + fps = Math.round(frameRate() * 10) / 10; + if (fps_recent_values.length < 200) fps_recent_values.push(fps); + else fps_recent_values.shift(); + fps_recent_values.push(fps); fill("red"); text(fps, 400, 99); stroke("black");