Skip to content

Mesh ​

Creates a Mesh

This component empowers you to have maximum flexibility to render any kind of WebGL visuals you can think of. This component assumes a certain level of WebGL knowledge.

Pretty much all WebGL can be broken down into the following:

  • Geometry - The structure and data for the mesh. This can include anything from positions, uvs, normals, colors etc.
  • Shader - This is the shader that PixiJS will render the geometry with (attributes in the shader must match the geometry)
  • State - This is the state of WebGL required to render the mesh.

API ​

Mesh Attributes ​

NameTypeDefaultDescription
blend-modeBLEND_MODES.NORMALThe blend mode to be applied to the sprite.
draw-mode

number DRAW_MODES

DRAW_MODES.TRIANGLESThe draw mode to be used.
geometryobjectundefinedThe geometry the mesh will use.

more props in Container Props and PIXI.Mesh

Mesh Events ​

NameTypeDescription
renderfunctionCall your drawing functions on the PIXI.Mesh instance here

more events in Container Events