shininess()

Sets the amount of gloss in the surface of shapes.

Examples

example picture for shininess()
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
def setup():
    py5.size(100, 100, py5.P3D)
    py5.background(0)
    py5.no_stroke()
    py5.background(0)
    py5.fill(0, 51, 102)
    py5.ambient_light(102, 102, 102)
    py5.light_specular(204, 204, 204)
    py5.directional_light(102, 102, 102, 0, 0, -1)
    py5.specular(255, 255, 255)
    py5.translate(30, 50, 0)
    py5.shininess(1.0)
    py5.sphere(20)  # left sphere
    py5.translate(40, 0, 0)
    py5.shininess(5.0)
    py5.sphere(20)  # right sphere

Description

Sets the amount of gloss in the surface of shapes. Use in combination with ambient(), specular(), and emissive() to set the material properties of shapes.

Underlying Java method: shininess

Syntax

shininess(shine: float, /) -> None

Parameters

  • shine: float - degree of shininess

Updated on September 11, 2021 16:51:34pm UTC