Skip to content

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 ​

NameTypeDefaultDescription
texturestring objectundefinedThe texture to use on the MeshSimple.
verticesobjectundefinedArray of vertex positions as x,y pairs.
uvsobjectundefinedArray of UV coordinates for texture mapping.
indicesobjectundefinedArray of indices defining triangles.
topologyenum'triangle-list'How vertices are connected to form triangles.
auto-updatebooleantrueWhether the vertex buffer auto-updates each frame.

more props in Container Attributes and MeshSimple

MeshSimple Events ​

NameTypeDescription
effectfunctioncustom render function

more events in Container Events