Mesh:setColors: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
'''Available since:''' Gideros 2012.09<br/>
'''<translate>Available since</translate>:''' Gideros 2012.09<br/>
=== Description ===
=== <translate>Description</translate> ===
<translate><br />
<translate><br />
Sets zero or more colors at color array with a single function call. It accepts multiple values or a Lua array.<br />
Sets zero or more colors at color array with a single function call. It accepts multiple values or a Lua array.<br />
Line 8: Line 8:
  Mesh:setColors(colors)
  Mesh:setColors(colors)
</source>
</source>
=== Parameters ===
=== <translate>Parameters</translate> ===
'''colors''': (any) <translate></translate> <br/>
'''colors''': (any) <translate></translate> <br/>
=== Examples ===
=== <translate>Examples</translate> ===
'''Example'''<br/>
'''Example'''<br/>
<source lang="lua">-- set 3 colors with seperate function calls
<source lang="lua">-- set 3 colors with seperate function calls

Revision as of 06:26, 24 August 2018

Available since: Gideros 2012.09

Description


Sets zero or more colors at color array with a single function call. It accepts multiple values or a Lua array.

 Mesh:setColors(colors)

Parameters

colors: (any)

Examples

Example

-- set 3 colors with seperate function calls
mesh:setColor(1, 0xff0000, 0.5)
mesh:setColor(2, 0x00ff00, 0.7)
mesh:setColor(3, 0x0000ff)

-- set 3 colors with one function call
mesh:setColors(1, 0xff0000, 0.5, 2, 0x00ff00, 0.7, 3, 0x0000ff, 1.0)

-- same as above
mesh:setColors{1, 0xff0000, 0.5, 2, 0x00ff00, 0.7, 3, 0x0000ff, 1.0}

-- these two functions do nothing
mesh:setColors()
mesh:setColors{}