Created
December 23, 2025 07:14
-
-
Save yoggy/0a45780f821581014c5144cebac1fd2d to your computer and use it in GitHub Desktop.
キャプチャ時のディレイを計測するときに使用したスケッチ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() | |
| { | |
| size(600, 600); | |
| frameRate(30); | |
| textSize(60); | |
| textAlign(CENTER); | |
| } | |
| void draw() | |
| { | |
| background(0, 0, 0); | |
| int f = frameCount % 30; | |
| int s = (frameCount / 30) % 60; | |
| int m = (frameCount / 30) / 60; | |
| float t = f / 30.0; | |
| arc(width/2, height/2, 400, 400, -PI/2, 2 * PI * t-PI/2); | |
| var time_text = String.format("%02d:%02d.%02d", m, s, f); | |
| text(time_text, width/2, 570); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
表示は分:秒.フレーム