📄 milliseconds.pde
字号:
/** * Milliseconds. * * A millisecond is 1/1000 of a second. * Processing keeps track of the number of milliseconds a program has run. * By modifying this number with the modulo(%) operator, * different patterns in time are created. */ float scale;void setup(){ size(200, 200); noStroke(); scale = width/10;}void draw(){ for(int i=0; i<scale; i++) { colorMode(RGB, (i+1) * scale * 10); fill(millis()%((i+1) * scale * 10) ); rect(i*scale, 0, scale, height); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -