Reference setWrapMode()

setWrapMode()

Sets the texture wrapping mode. This controls how textures behave when their uv's go outside of the 0 - 1 range. There are three options: CLAMP, REPEAT, and MIRROR. REPEAT & MIRROR are only available if the texture is a power of two size (128, 256, 512, 1024, etc.).

Examples

Syntax

setWrapMode(wrapX, wrapY)

Parameters

wrapX
String: Controls the horizontal texture wrapping behavior
wrapY
String: Controls the vertical texture wrapping behavior
Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/p5.Texture.js and open a pull request!

Related References