Mesh:setTextureCoordinate

From GiderosMobile
Revision as of 14:28, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")

Available since: Gideros 2012.09
Class: Mesh

Description

Sets a texture coordinate at texture coordinate array. <syntaxhighlight lang="lua"> Mesh:setTextureCoordinate(i,u,v) </source>

Indices start from 1. If the texture coordinate array is not large enough, it is automatically expanded.

Parameters

i: (number) index
u: (number) u coordinate
v: (number) v coordinate

Example

Setting a texture coordinate <syntaxhighlight lang="lua"> -- set the first 3 texture coordinates as (0, 0), (100, 0) and (0, 100) mesh:setTextureCoordinate(1, 0, 0) mesh:setTextureCoordinate(2, 100, 0) mesh:setTextureCoordinate(3, 0, 100) </source>