Difference between revisions of "Mesh:setTextureCoordinates"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''<translate>Available since</translate>:''' Gideros 2012.09<br/>
+
'''Available since:''' Gideros 2012.09<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/>
+
'''Class:''' [[Mesh]]<br/>
=== <translate>Description</translate> ===
+
 
<translate><br /></translate>
+
=== Description ===
<source lang="lua">
+
Sets zero or more texture coordinates with a single function call.
Mesh:setTextureCoordinates(textureCoordinates)
+
<syntaxhighlight lang="lua">
</source>
+
Mesh:setTextureCoordinates(textureCoordinates)
=== <translate>Parameters</translate> ===
+
</syntaxhighlight>
'''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/>
+
 
=== <translate>Examples</translate> ===
+
=== Parameters ===
'''Example'''<br/>
+
'''textureCoordinates''': (any) multiple values or a Lua array<br/>
<source lang="lua">-- set 3 texture coordinates with seperate function calls
+
 
 +
=== Examples ===
 +
'''Texture coordinates function calls'''
 +
<syntaxhighlight lang="lua">
 +
-- sets 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
+
-- sets 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)
  
Line 24: Line 28:
 
-- these two functions do nothing
 
-- these two functions do nothing
 
mesh:setTextureCoordinates()
 
mesh:setTextureCoordinates()
mesh:setTextureCoordinates{}</source>
+
mesh:setTextureCoordinates{}
 +
</syntaxhighlight>
 +
 
 +
{{Mesh}}

Latest revision as of 15:31, 13 July 2023

Available since: Gideros 2012.09
Class: Mesh

Description

Sets zero or more texture coordinates with a single function call.

Mesh:setTextureCoordinates(textureCoordinates)

Parameters

textureCoordinates: (any) multiple values or a Lua array

Examples

Texture coordinates function calls

-- sets 3 texture coordinates with seperate function calls
mesh:setTextureCoordinate(1, 0, 0)
mesh:setTextureCoordinate(2, 100, 0)
mesh:setTextureCoordinate(3, 0, 100)

-- sets 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{}