| Name | textureWrap() |
||
|---|---|---|---|
| Examples |
size(150, 150, P2D)
img = loadImage("rockies.jpg")
textureMode(NORMAL)
background(0)
textureWrap(REPEAT)
beginShape()
texture(img)
vertex(0, 0, 0, 0)
vertex(150, 0, 2, 0)
vertex(150, 150, 2, 2)
vertex(0, 150, 0, 2)
endShape()
size(150, 150, P2D)
img = loadImage("rockies.jpg")
textureMode(NORMAL)
background(0)
textureWrap(CLAMP)
beginShape()
texture(img)
vertex(0, 0, 0, 0)
vertex(150, 0, 2, 0)
vertex(150, 150, 2, 2)
vertex(0, 150, 0, 2)
endShape()
| ||
| Description | Defines if textures repeat or draw once within a texture map. The two parameters are CLAMP (the default behavior) and REPEAT. This function only works with the P2D and P3D renderers. | ||
| Syntax | textureWrap(mode) | ||
| Parameters |
| ||
| Related |
texture() textureMode() |
Updated on Tue Feb 27 14:07:12 2024.
If you see any errors or have comments, please let us know.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License