| Name | specular |
||||||||
|---|---|---|---|---|---|---|---|---|---|
| Examples |
settings <- function() {
size(100, 100, P3D)
}
draw <- function() {
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( | ||||||||
| Parameters |
| ||||||||
| Related |
lightSpecular ambient emissive shininess |
Cover
Reference
Tutorials
Bugs
