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
modeint: either CLAMP or REPEAT
Related texture()
textureMode()
Updated on Tue Jul 11 06:52:24 2017.
Creative Commons License