MeshSimple
Creates a MeshSimple
A simplified mesh class that provides an easy way to create and manipulate textured meshes with direct vertex control. Perfect for creating custom shapes, deformable sprites, and simple 2D effects.
API
MeshSimple Attributes
| Name | Type | Default | Description |
|---|---|---|---|
| texture | string object | undefined | The texture to use on the MeshSimple. |
| vertices | object | undefined | Array of vertex positions as x,y pairs. |
| uvs | object | undefined | Array of UV coordinates for texture mapping. |
| indices | object | undefined | Array of indices defining triangles. |
| topology | enum | 'triangle-list' | How vertices are connected to form triangles. |
| auto-update | boolean | true | Whether the vertex buffer auto-updates each frame. |
more props in Container Attributes and MeshSimple
MeshSimple Events
| Name | Type | Description |
|---|---|---|
| effect | function | custom render function |
more events in Container Events