Difference between revisions of "Mesh:setTextureCoordinate"
From GiderosMobile
Line 8: | Line 8: | ||
Mesh:setTextureCoordinate(i,u,v) | Mesh:setTextureCoordinate(i,u,v) | ||
</source> | </source> | ||
− | '''i''': (number) index | + | === Parameters === |
− | '''u''': (number) u coordinate | + | '''i''': (number) index <br/> |
− | '''v''': (number) v coordinate ''''''<br/> | + | '''u''': (number) u coordinate <br/> |
+ | '''v''': (number) v coordinate <br/> | ||
+ | === Examples === | ||
+ | '''Example'''<br/> | ||
+ | <source lang="lua">-- set the first 3 texture coordinates as (0, 0), (100, 0) and (0, 100).<br /> | ||
+ | mesh:setTextureCoordinate(1, 0, 0)<br /> | ||
+ | mesh:setTextureCoordinate(2, 100, 0)<br /> | ||
+ | mesh:setTextureCoordinate(3, 0, 100)<br /></source> |
Revision as of 10:45, 23 August 2018
Available since: Gideros 2012.09
Description
Sets a texture coordinate at texture coordinate array. Indices are start from 1. If the texture coordinate array is not large enough, it's expanded automatically.
Mesh:setTextureCoordinate(i,u,v)
Parameters
i: (number) index
u: (number) u coordinate
v: (number) v coordinate
Examples
Example
-- set the first 3 texture coordinates as (0, 0), (100, 0) and (0, 100).<br />
mesh:setTextureCoordinate(1, 0, 0)<br />
mesh:setTextureCoordinate(2, 100, 0)<br />
mesh:setTextureCoordinate(3, 0, 100)<br />