首页 > 文档 > lightSpecular()光镜面
2017
08-05

lightSpecular()光镜面

Name

lightSpecular()光镜面

   

Examples

lightSpecular()光镜面 - 第1张  | Processing编程艺术

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);

Description

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.

设置光源的镜面颜色。与填充 () 一样, 它只影响在代码中创建的元素。镜面是指光线从一个方向反射到一个表面 (而不是像漫反射光那样在所有方向上弹跳), 并用于创建亮点。光的镜面质量与通过镜面 () 和光泽 () 函数设置的镜面材质品质相互作用。

Syntax

lightSpecular(v1, v2, v3)

Parameters

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)

蓝色或亮度值 (取决于当前颜色模式)

Returns

void

Related

specular()
lights()
ambientLight()
pointLight()
spotLight()



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。