![](https://watataku-artist-katsuyaku.com/wp-content/uploads/2024/03/watataku-hukidashi-light-blue.png)
今回の記事の目的はProcessingの「frameCount
」を理解し、自分なりに使ってみること。
この記事を書いた人
![](https://watataku-artist-katsuyaku.com/wp-content/uploads/2024/03/watataku-user-profile-illustrationi-light-blue.png)
![](https://watataku-artist-katsuyaku.com/wp-content/uploads/2024/03/watataku-user-profile-illustrationi-light-blue.png)
- クリエイティブコーディングで制作した作品と、上達のためにやったこと・学習過程を発信
- コンセプトは「クリエイティブコーディング1万時間の歩き方」
- 2024年にProcessingの構文のアウトプットを終え、2025年から作品制作開始(クリエイティブコーディングで作成した作品集)
目次
【Processing】frameCountについて
- frameCountは英語で「フレーム数」という意味
- frameCountは、プログラムが動いている間に、どれだけの絵が表示されたかを数えるためのもの
【Processing】frameCountの使い方【画像とコード】
![](https://watataku-artist-katsuyaku.com/wp-content/uploads/2024/11/processing-framecount-usage-counting-frames-while-program-runs1.gif)
![](https://watataku-artist-katsuyaku.com/wp-content/uploads/2024/11/processing-framecount-usage-counting-frames-while-program-runs1.gif)
void setup() {
size(400, 400); // キャンバスの大きさを決める
PFont font = createFont("Meiryo", 50); textFont(font);
}
void draw() {
background(255); // 背景を白くする
fill(0); // 色を黒にする
textSize(32); // テキストの大きさを設定する
text("フレーム数: " + frameCount, 10, 40); // 左上にframeCountを表示する
}
【Processing】frameCountを使ってみた感想
めっちゃいっぱいフレームって実行されてるんやなぁ。
![](https://watataku-artist-katsuyaku.com/wp-content/uploads/2024/03/watataku-hukidashi-light-blue.png)
![](https://watataku-artist-katsuyaku.com/wp-content/uploads/2024/03/watataku-hukidashi-light-blue.png)
![](https://watataku-artist-katsuyaku.com/wp-content/uploads/2024/03/watataku-hukidashi-light-blue.png)
それでは今日もレッツワクワクコーディング。