Mesh:setVertices
Replaces a range of vertices in the Mesh with new ones. The total number of vertices in a Mesh cannot be changed after it has been created. This is often more efficient than calling Mesh:setVertex in a loop.
Mesh:setVertices( vertices, startvertex, count )
vertices table The table filled with vertex information tables for each vertex, in the form of {vertex, ...} where each vertex is a table in the form of {attributecomponent, ...}.
vertices.attributecomponent number The first component of the first vertex attribute in the vertex.
vertices.... number Additional components of all vertex attributes in the vertex.
startvertex (1) number The index of the first vertex to replace.
count (all) number Amount of vertices to replace.
Mesh:setVertices( data, startvertex )
data Data A Data object to copy from. The contents of the Data must match the layout of this Mesh's vertex format.
startvertex (1) number The index of the first vertex to replace.
Mesh:setVertices( vertices )
vertices table The table filled with vertex information tables for each vertex as follows:
vertices.1 number The position of the vertex on the x-axis.
vertices.2 number The position of the vertex on the y-axis.
vertices.3 number The horizontal component of the texture coordinate. Texture coordinates are normally in the range of 1, but can be greater or less (see WrapMode).
vertices.4 number The vertical component of the texture coordinate. Texture coordinates are normally in the range of 1, but can be greater or less (see WrapMode).
vertices.5 (1) number The red color component.
vertices.6 (1) number The green color component.
vertices.7 (1) number The blue color component.
vertices.8 (1) number The alpha color component.