⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scale.pde

📁 This is processing for java examples.
💻 PDE
字号:
/** * Scale  * by Denis Grutze.  *  * Paramenters for the scale() function are values specified  * as decimal percentages. For example, the method call scale(2.0)  * will increase the dimension of the shape by 200 percent.  * Objects always scale from the origin.  */ float a = 0.0;float s = 0.0;void setup(){  size(200,200);  noStroke();  rectMode(CENTER);  frameRate(30);}void draw(){  background(102);    a = a + 0.04;  s = cos(a)*2;    translate(width/2, height/2);  scale(s);   fill(51);  rect(0, 0, 50, 50);     translate(75, 0);  fill(255);  scale(s);  rect(0, 0, 50, 50);       }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -