lightSpecular()

本参考资料用于Processing 3.0+。 如果你使用的是前一版本,请在使用软件帮助菜单内的参考资料。. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.

名称

lightSpecular()

示例
 size(100, 100, P3D);

background(0);

noStroke();

directionalLight(102, 102, 102, 0, 0, -1);

lightSpecular(204, 204, 204);

directionalLight(102, 102, 102, 0, 1, -1);

lightSpecular(102, 102, 102);

translate(20, 50, 0);

specular(51, 51, 51);

sphere(30);

translate(60, 0, 0);

specular(102, 102, 102);

sphere(30);

描述 Sets the specular color for lights. Like fill(), it affects only the elements which are created after it in the code. Specular refers to light which bounces off a surface in a preferred direction (rather than bouncing in all directions like a diffuse light) and is used for creating highlights. The specular quality of a light interacts with the specular material qualities set through the specular() and shininess() functions.
语法
lightSpecular(v1, v2, v3)
参数
v1 float: red or hue value (depending on current color mode)
v2 float: green or saturation value (depending on current color mode)
v3 float: blue or brightness value (depending on current color mode)
返回值 void
相关 specular()
lights()
ambientLight()
pointLight()
spotLight()

Updated on October 2, 2018 05:02:10pm EDT

lightSpecular()