Framecount

function setup() {
  createCanvas(400, 400);
  textAlign(CENTER, CENTER)
  frameRate(10)
}

function draw() {
  background(220);
  
  //frameRate
  /*fill(225, 0, 100)
  stroke("black")
  strokeWeight(2)
  textSize(36)
  var fps = frameRate()
  text("frameRate" + parseInt(fps, 10), width/2, height/2)*/
  
  //frameCount
  fill(225, 0, 100)
  stroke("black")
  strokeWeight(2)
  textSize(36)
  text("frameCount: " + frameCount, width/2, height/2)
}


Leave a Reply