Sets a texture to be applied to vertex points.
def setup(): py5.size(100, 100, py5.P3D) py5.no_stroke() img = py5.load_image("laDefense.jpg") py5.begin_shape() py5.texture(img) py5.vertex(10, 20, 0, 0) py5.vertex(80, 5, 100, 0) py5.vertex(95, 90, 100, 100) py5.vertex(40, 95, 0, 100) py5.end_shape()
Sets a texture to be applied to vertex points. The
texture() method must be called between begin_shape() and end_shape() and before any calls to vertex(). This method only works with the
When textures are in use, the fill color is ignored. Instead, use tint() to specify the color of the texture as it is applied to the shape.
Underlying Processing method: texture
texture( image: Py5Image, # reference to a Py5Image object /, ) -> None
Updated on September 01, 2022 16:36:02pm UTC