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 Mon Sep 21 15:53:26 2020.
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