Skip to content

Instantly share code, notes, and snippets.

@beatorizu
Created July 5, 2020 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beatorizu/66658fbe4450afb659ef9bd56621b90f to your computer and use it in GitHub Desktop.
Save beatorizu/66658fbe4450afb659ef9bd56621b90f to your computer and use it in GitHub Desktop.
Show frame rate on p5 js canvas
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