This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int rectSize = 100; | |
void setup() { | |
size(500, 500); | |
} | |
void draw() { | |
// This will draw a rectangle with a top-left corner where your mouse cursor is. | |
rect(mouseX, mouseY, rectSize, rectSize); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This file is slightly adapted from the template used by beesandbombs (https://gist.github.com/beesandbombs) | |
Many thanks to him for sharing his work with the rest of us! | |
*/ | |
void drawFPS() { | |
if (frameCount % 30 == 0) { | |
surface.setTitle(this.getClass().getName() + " | FPS : " + nf(frameRate, 2, 2) + " | Runtime: " + frameCount + " | t: " + nf(t, 1, 5)); | |
} | |
} |