Name |
texture()纹理 |
||
Examples |
size(100, 100, P3D); noStroke(); PImage img = loadImage(“laDefense.jpg”); beginShape(); texture(img); vertex(10, 20, 0, 0); vertex(80, 5, 100, 0); vertex(95, 90, 100, 100); vertex(40, 95, 0, 100); endShape(); |
||
Description |
Sets a texture to be applied to vertex points. The texture() function must be called between beginShape() and endShape() and before any calls to vertex(). This function only works with the P2D and P3D renderers. 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. 设置要应用于顶点点的纹理。必须在 beginShape () 和 endShape () 和任何对顶点 () 的调用之前调用纹理 () 函数。此函数仅适用于 P2D 和 P3D 器。
在使用纹理时, 填充颜色将被忽略。而是使用淡色 () 来指定纹理应用于形状时的颜色。 |
||
Syntax |
texture(image) |
||
Parameters |
|
||
Returns |
void |
||
Related |
textureMode() |
- 本文固定链接: http://iprocessing.cn/2017/08/09/texture纹理/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表