首页 > 文档 > texture()纹理
2017
08-09

texture()纹理

Name

texture()纹理

   

Examples

texture()纹理 - 第1张  | Processing编程艺术texture()纹理 - 第2张  | Processing编程艺术texture()纹理 - 第3张  | Processing编程艺术

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

image

PImage: reference to a PImage object

PImage 对象的引用

Returns

void

Related

textureMode()
textureWrap()
beginShape()
endShape()
vertex()



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。