def setup frameRate(30) textSize(30) textAlign(CENTER) end def draw background(200) text(frameCount, width / 2, height / 2) end
[p5.js] frameCount
プログラム開始以降の描画フレーム数が格納されているシステム変数です。