Table of Contents

Mesh:setTextureCoordinate

Available since version: 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.

Syntax:

Mesh:setTextureCoordinate(i, u, v)

Parameters:

  • i: (number) index
  • u: (number) u coordinate
  • v: (number) v coordinate

Examples:

-- set the first 3 texture coordinates as (0, 0), (100, 0) and (0, 100).
mesh:setTextureCoordinate(1, 0, 0)
mesh:setTextureCoordinate(2, 100, 0)
mesh:setTextureCoordinate(3, 0, 100)