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