Skip to content

Instantly share code, notes, and snippets.

@beatorizu
Created July 5, 2020 19:52
Show Gist options
  • Select an option

  • Save beatorizu/66658fbe4450afb659ef9bd56621b90f to your computer and use it in GitHub Desktop.

Select an option

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