lights1.pde

来自「This is processing for java examples.」· PDE 代码 · 共 30 行

PDE
30
字号
/** * Lights 1.  *  * Uses the default lights to show a simple box. The lights() function * is used to turn on the default lighting. */ float spin = 0.0;void setup() {  size(640, 360, P3D);  noStroke();}void draw() {  background(51);  lights();    spin += 0.01;    pushMatrix();  translate(width/2, height/2, 0);  rotateX(PI/9);  rotateY(PI/5 + spin);  box(150);  popMatrix();}

⌨️ 快捷键说明

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