Difference between revisions of "Mesh:setTextureCoordinates"
From GiderosMobile
Line 6: | Line 6: | ||
Mesh:setTextureCoordinates(textureCoordinates) | Mesh:setTextureCoordinates(textureCoordinates) | ||
</source> | </source> | ||
− | '''textureCoordinates''': (any) Sets zero or more texture coordinates at texture coordinate array with a single function call. It accepts multiple values or a Lua array. ''''''<br/> | + | === Parameters === |
+ | '''textureCoordinates''': (any) Sets zero or more texture coordinates at texture coordinate array with a single function call. It accepts multiple values or a Lua array. <br/> | ||
+ | === Examples === | ||
+ | '''Example'''<br/> | ||
+ | <source lang="lua">-- set 3 texture coordinates with seperate function calls<br /> | ||
+ | mesh:setTextureCoordinate(1, 0, 0)<br /> | ||
+ | mesh:setTextureCoordinate(2, 100, 0)<br /> | ||
+ | mesh:setTextureCoordinate(3, 0, 100)<br /> | ||
+ | <br /> | ||
+ | -- set 3 texture coordinates with one function call<br /> | ||
+ | mesh:setTextureCoordinates(1, 0, 0, 2, 100, 0, 3, 0, 100)<br /> | ||
+ | <br /> | ||
+ | -- same as above<br /> | ||
+ | mesh:setTextureCoordinates{1, 0, 0, 2, 100, 0, 3, 0, 100}<br /> | ||
+ | <br /> | ||
+ | -- these two functions do nothing<br /> | ||
+ | mesh:setTextureCoordinates()<br /> | ||
+ | mesh:setTextureCoordinates{}<br /></source> |
Revision as of 10:45, 23 August 2018
Available since: Gideros 2012.09
Description
Mesh:setTextureCoordinates(textureCoordinates)
Parameters
textureCoordinates: (any) Sets zero or more texture coordinates at texture coordinate array with a single function call. It accepts multiple values or a Lua array.
Examples
Example
-- set 3 texture coordinates with seperate function calls<br />
mesh:setTextureCoordinate(1, 0, 0)<br />
mesh:setTextureCoordinate(2, 100, 0)<br />
mesh:setTextureCoordinate(3, 0, 100)<br />
<br />
-- set 3 texture coordinates with one function call<br />
mesh:setTextureCoordinates(1, 0, 0, 2, 100, 0, 3, 0, 100)<br />
<br />
-- same as above<br />
mesh:setTextureCoordinates{1, 0, 0, 2, 100, 0, 3, 0, 100}<br />
<br />
-- these two functions do nothing<br />
mesh:setTextureCoordinates()<br />
mesh:setTextureCoordinates{}<br />