Difference between revisions of "love.graphics.newMesh"
(Created page) |
m (Added object creation notice) |
||
Line 1: | Line 1: | ||
{{newin|[[0.9.0]]|090|type=function}} | {{newin|[[0.9.0]]|090|type=function}} | ||
Creates a new [[Mesh]]. | Creates a new [[Mesh]]. | ||
− | + | {{newobjectnotice}} | |
== Function == | == Function == | ||
=== Synopsis === | === Synopsis === |
Revision as of 08:22, 8 October 2013
Available since LÖVE 0.9.0 |
This function is not supported in earlier versions. |
Creates a new Mesh.
This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused! |
Function
Synopsis
mesh = love.graphics.newMesh( vertices, image, mode )
Arguments
table vertices
- The table filled with vertex information tables for each vertex as follows:
number [1]
- The position of the vertex on the x-axis.
number [2]
- The position of the vertex on the y-axis.
number [3]
- The u texture coordinate. Texture coordinates are normally in the range of [0, 1], but can be greater or less (see WrapMode.)
number [4]
- The v texture coordinate. Texture coordinates are normally in the range of [0, 1], but can be greater or less (see WrapMode.)
number [5] (255)
- The red color component.
number [6] (255)
- The green color component.
number [7] (255)
- The blue color component.
number [8] (255)
- The alpha color component.
Image image (nil)
- The image to use when drawing the Mesh. May be nil to use no image.
MeshDrawMode mode ("fan")
- How the vertices are used when drawing. The default mode "fan" is sufficient for simple convex polygons.
Returns
Mesh mesh
- The new mesh.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info