Py5Shape.get_shininess()

Get the shininess setting for one of a Py5Shape object’s vertices.

Examples

example picture for get_shininess()
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
def setup():
    py5.size(100, 100, py5.P3D)
    py5.background(0)
    py5.ambient_light(102, 102, 102)
    py5.light_specular(204, 204, 204)
    py5.directional_light(150, 150, 150, .5, 0, -1)
    py5.shininess(5)
    py5.no_stroke()
    s = py5.create_shape(py5.SPHERE, 30)

    py5.shape(s, 50, 50)
    py5.println(s.get_shininess(0))

Description

Get the shininess setting for one of a Py5Shape object’s vertices. Use Py5Shape.set_shininess() to change the setting.

This method can only be used for a complete Py5Shape object, and never within a Py5Shape.begin_shape() and Py5Shape.end_shape() pair.

Underlying Java method: PShape.getShininess

Syntax

get_shininess(index: int, /) -> float

Parameters

  • index: int - vertex index

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