emissive()#

Sets the emissive color of the material used for drawing shapes drawn to the screen.

Examples#

example picture for emissive()
1def setup():
2    py5.size(100, 100, py5.P3D)
3    py5.background(0)
4    py5.no_stroke()
5    py5.background(0)
6    py5.directional_light(204, 204, 204, .5, 0, -1)
7    py5.emissive(0, 26, 51)
8    py5.translate(70, 50, 0)
9    py5.sphere(30)

Description#

Sets the emissive color of the material used for drawing shapes drawn to the screen. Use in combination with ambient(), specular(), and shininess() to set the material properties of shapes.

Underlying Processing method: emissive

Syntax#

emissive(gray: float, /) -> None
emissive(rgb: int, /) -> None
emissive(v1: float, v2: float, v3: float, /) -> None

Parameters#

  • gray: float - value between black and white, by default 0 to 255

  • 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)

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