Sets a texture to be applied to vertex points.


Sets a texture to be applied to vertex points. The texture() method must be called between Py5Graphics.begin_shape() and Py5Graphics.end_shape() and before any calls to Py5Graphics.vertex(). This method only works with the P2D and P3D renderers.

When textures are in use, the fill color is ignored. Instead, use Py5Graphics.tint() to specify the color of the texture as it is applied to the shape.

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

Underlying Processing method: PGraphics.texture


texture(image: Py5Image, /) -> None


  • image: Py5Image - reference to a Py5Image object

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