Py5Graphics.light_specular()

Sets the specular color for lights.

Description

Sets the specular color for lights. Like Py5Graphics.fill(), it affects only the elements which are created after it in the code. Specular refers to light which bounces off a surface in a preferred direction (rather than bouncing in all directions like a diffuse light) and is used for creating highlights. The specular quality of a light interacts with the specular material qualities set through the Py5Graphics.specular() and Py5Graphics.shininess() functions.

This method is the same as light_specular() but linked to a Py5Graphics object. To see example code for how it can be used, see light_specular().

Underlying Java method: PGraphics.lightSpecular

Syntax

light_specular(v1: float, v2: float, v3: float, /) -> None

Parameters

  • 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 September 11, 2021 16:51:34pm UTC