This command allows you to modify the texture coordinate of a specific vertex in the On-The-Fly object. The index is a number that can start from 0 and go up to, but not including, the number of vertices in the object.
Note: If you are frequently changing the texture coordinate of a vertex, then use the <node3d:onthefly>.dynamic command to speed up rendering.
#Create a textured triangle
viz.startLayer(viz.TRIANGLES)
viz.texCoord(0,0)
viz.vertex(-1,0,0)
viz.texCoord(0,1)
viz.vertex(1,0,0)
viz.texCoord(1,0)
viz.vertex(0,1,0)
triangle = viz.endLayer()
#Apply a texture
triangle.texture(viz.add('image.jpg'))
.
.
.
#Change the texture coordinate of the first vertex
triangle.setTexCoord(0,1,1)