首页 > 文档 > specular()镜面
2017
08-07

specular()镜面

Name

specular()镜面

   

Examples

specular()镜面 - 第1张  | Processing编程艺术specular()镜面 - 第2张  | Processing编程艺术specular()镜面 - 第3张  | Processing编程艺术

size(100, 100, P3D);

background(0);

noStroke();

background(0);

fill(0, 51, 102);

lightSpecular(255, 255, 255);

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

translate(20, 50, 0);

specular(255, 255, 255);

sphere(30);

translate(60, 0, 0);

specular(204, 102, 0);

sphere(30);

Description

Sets the specular color of the materials used for shapes drawn to the screen, which sets the color of highlights. Specular refers to light which bounces off a surface in a preferred direction (rather than bouncing in all directions like a diffuse light). Used in combination with emissive()ambient(), and shininess() in setting the material properties of shapes.

设置绘制到屏幕上的形状所用材料的镜面颜色, 以设置突出显示的颜色。镜面是指光线从一个方向反射到一个表面 (而不是像漫射光那样在所有方向上弹跳)。在设置形状的材料属性时与放射 ()、环境 () 和光泽 () 组合使用。

Syntax

specular(rgb)

specular(gray)

specular(v1, v2, v3)

Parameters

rgb

int: color to set

要设置的颜色

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

lightSpecular()
ambient()
emissive()
shininess()



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

留下一个回复

你的email不会被公开。