PIXI.MeshGeometry
class MeshGeometry extends PIXI.Geometry
Standard 2D geometry used in PixiJS.
Geometry can be defined without passing in a style or data if required.
const geometry = new PIXI.Geometry();
geometry.addAttribute('positions', [0, 0, 100, 0, 100, 100, 0, 100], 2);
geometry.addAttribute('uvs', [0,0,1,0,1,1,0,1], 2);
geometry.addIndex([0,1,2,1,3,2]);
Constructor
new PIXI.MeshGeometry(vertices: Float32Array | number<Array>, uvs: Float32Array | number<Array>, index: Uint16Array | number<Array>) → {}
Name | Type | Attributes | Description |
---|---|---|---|
vertices | Float32Array | number<Array> |
<optional> |
Positional data on geometry. |
uvs | Float32Array | number<Array> |
<optional> |
Texture UVs. |
index | Uint16Array | number<Array> |
<optional> |
IndexBuffer |
Summary
Properties inherited from Geometry
object |
|
number |
|
boolean |
Whether the geometry is instanced. |
number |
Count of existing (not destroyed) meshes that reference this geometry. |
Methods inherited from Geometry
this |
|
PIXI.Geometry |
|
PIXI.Geometry |
|
void |
Destroys the geometry. |
void |
Disposes WebGL resources that are connected to this geometry. |
PIXI.Attribute |
|
PIXI.Buffer |
|
PIXI.Buffer |
|
number |
Get the size of the geometries, in vertices. |
PIXI.Geometry |
|