Created
July 5, 2020 19:52
-
-
Save beatorizu/66658fbe4450afb659ef9bd56621b90f to your computer and use it in GitHub Desktop.
Show frame rate on p5 js canvas
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
let fps = frameRate(); | |
virtualCanvas.textSize(30); | |
virtualCanvas.fill(255); | |
virtualCanvas.stroke(0); | |
virtualCanvas.text(fps.toFixed(2), width - 30, 50); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment