201708-05 endCamera()关闭相机 NameendCamera()关闭相机 Examples size(100, 100, P3D); noFill(); beginCamera(); camera(); rotateX(-PI/6); endCamera(); translate(50, 50, 0); ro.... Read More >
201708-05 camera()设置相机位置 Namecamera()设置相机位置 Examples size(100, 100, P3D); noFill(); background(204); camera(70.0, 35.0, 120.0, 50.0, 50.0, 0.0, 0.0, 1.0, 0.0);.... Read More >
201708-05 beginCamera()开始相机 NamebeginCamera()开始相机 Examples size(100, 100, P3D); noFill(); beginCamera(); camera(); rotateX(-PI/6); endCamera(); translate(50, 50, 0); .... Read More >
201708-05 spotLight()聚光灯 NamespotLight()聚光灯 Examples size(100, 100, P3D); background(0); noStroke(); spotLight(51, 102, 126, 80, 20, 40, -1, 0, 0, PI/2, 2); translate(.... Read More >
201708-05 pointLight()添加点光源 NamepointLight()添加点光源 Examples size(100, 100, P3D); background(0); noStroke(); pointLight(51, 102, 126, 35, 40, 36); translate(80, 50, 0); sph.... Read More >
201708-05 normal()设置当前正常向量 Namenormal()设置当前正常向量 Examples size(100, 100, P3D); noStroke(); background(0); pointLight(150, 250, 150, 10, 30, 50); beginShape(); normal(0, 0.... Read More >
201708-05 noLights()禁用照明 NamenoLights()禁用照明 DescriptionDisable all lighting. Lighting is turned off by default and enabled with the lights() function. This function can be used to disable lighting so that 2D geometry (which .... Read More >
201708-05 lightSpecular()光镜面 NamelightSpecular()光镜面 Examples size(100, 100, P3D); background(0); noStroke(); directionalLight(102, 102, 102, 0, 0, -1); lightSpecular(204, .... Read More >
201708-04 发放第三期BOSS的源代码 FlowField flow; ArrayList<Vehicle> vlist; PVector center; void setup() { size(1200, 600); flow = new FlowField(); vlist = new ArrayList<Vehicle>(); for (int i = 0; i<70; i++).... Read More >
201708-02 lights()设置默认光源参数 Name lights()设置默认光源参数 Examples size(100, 100, P3D); background(0); noStroke(); // Sets the default ambient //.... Read More >
201708-02 lightFalloff()光源衰减率 Name lightFalloff()光源衰减率 Examples size(100, 100, P3D); noStroke(); background(0); lightFalloff(1.0, 0.001, 0.0);.... Read More >
201708-02 directionalLight()定向光源 Name directionalLight()定向光源 Examples size(100, 100, P3D); background(0); noStroke(); directionalLight.... Read More >
201708-02 ambientLight()环境光源 NameambientLight()环境光源 Examples size(100, 100, P3D); background(0); noStroke(); // The spheres are white by default so // the ambient light ch.... Read More >
201708-02 selectOutput()选择输出 NameselectOutput()选择输出 Examplesvoid setup() { selectOutput("Select a file to write to:", "fileSelected"); } void fileSelected(File selection) { if (selection == null) { println("Window was .... Read More >
201708-02 saveXML()保存XML对象 NamesaveXML()保存XML对象 Examples// The following short XML file called "mammals.xml" is parsed // in the code below. It must be in the project's "data" folder. // // <?xml version="1.0"?> // <.... Read More >
201708-02 saveTable()保存表 NamesaveTable()保存表 ExamplesTable table; void setup() { table = new Table(); table.addColumn("id"); table.addColumn("species"); table.addColumn("name"); TableRow newRow = table.a.... Read More >
201708-02 saveStrings()保存字符串 NamesaveStrings()保存字符串 ExamplesString words = "apple bear cat dog"; String[] list = split(words, ' '); // Writes the strings to a file, each on a separate line saveStrings("nouns.txt", list);Descri.... Read More >
201708-02 saveStream()保存流文件 NamesaveStream()保存流文件 Examples DescriptionSave the contents of a stream to a file in the sketch folder. This is basically saveBytes(blah, loadBytes()), but done more efficiently (and with less confus.... Read More >