Py5Shape.set_emissive()#

Sets a Py5Shape object’s emissive color.

Examples#

example picture for set_emissive()
 1def setup():
 2    py5.size(100, 100, py5.P3D)
 3    py5.background(0)
 4    py5.directional_light(200, 200, 200, .5, 0, -1)
 5    py5.no_stroke()
 6    s = py5.create_shape(py5.SPHERE, 20)
 7
 8    s.set_emissive("#003264")
 9    py5.shape(s, 50, 25)
10    s.set_emissive("#643200")
11    py5.shape(s, 50, 75)

Description#

Sets a Py5Shape object’s emissive color. This is part of the material properties of a Py5Shape object.

The emissive parameter can be applied to the entire Py5Shape object or to a single vertex.

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

Underlying Processing method: PShape.setEmissive

Syntax#

set_emissive(emissive: int, /) -> None
set_emissive(index: int, emissive: int, /) -> None

Parameters#

  • emissive: int - any color value

  • index: int - vertex index

Updated on November 12, 2021 11:30:58am UTC