milliseconds.pde
来自「This is processing for java examples.」· PDE 代码 · 共 27 行
PDE
27 行
/** * 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 + =
减小字号Ctrl + -
显示快捷键?