frameCount

def setup
  frameRate(30)
  textSize(30)
  textAlign(CENTER)
end

def draw
  background(200)
  text(frameCount, width / 2, height / 2)
end

p5.jsリファレンス(参考情報)

[p5.js] frameCount

概要

プログラム開始以降の描画フレーム数が格納されているシステム変数です。

書式

frameCount

備考

関連