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.
Usage
API
Props
Name | Description |
---|---|
drawMode | PIXI.DRAW_MODES The way the Mesh should be drawn, can be any of the PIXI.DRAW_MODES constants. |
geometry | PIXI.Geometry Includes vertex positions, face indices, normals, colors, UVs, and custom attributes within buffers, reducing the cost of passing all this data to the GPU. Can be shared between multiple Mesh objects. |
instance | PIXI.Mesh The PIXI.Mesh instance. Can be set or bound to. |
shader | PIXI.Shader PIXI.MeshMaterial Represents the vertex and fragment shaders that processes the geometry and runs on the GPU. Can be shared between multiple Mesh objects. |
state | PIXI.State Represents the WebGL state the Mesh required to render, excludes shader and geometry. E.g., blend mode, culling, depth testing, direction of rendering triangles, backface, etc. |
Additional props are passed on to Container
Slots
Name | Props | Fallback |
---|---|---|
default | {} |
Events
Name | Type | Detail |
---|---|---|
added | forwarded | |
click | forwarded | |
create | forwarded | |
globalmousemove | forwarded | |
globalpointermove | forwarded | |
globaltouchmove | forwarded | |
mousedown | forwarded | |
mousemove | forwarded | |
mouseout | forwarded | |
mouseover | forwarded | |
mouseup | forwarded | |
mouseupoutside | forwarded | |
pointercancel | forwarded | |
pointerdown | forwarded | |
pointermove | forwarded | |
pointerout | forwarded | |
pointerover | forwarded | |
pointertap | forwarded | |
pointerup | forwarded | |
pointerupoutside | forwarded | |
removed | forwarded | |
removedFrom | forwarded | |
rightclick | forwarded | |
rightdown | forwarded | |
rightup | forwarded | |
rightupoutside | forwarded | |
tap | forwarded | |
touchcancel | forwarded | |
touchend | forwarded | |
touchendoutside | forwarded | |
touchmove | forwarded | |
touchstart | forwarded |