Class: MeshPlane

MeshPlane

The MeshPlane allows you to draw a texture across several points and then manipulate these points

new MeshPlane (options) overrides

Name Type Description
options MeshPlaneOptions

Options to be applied to MeshPlane

Example

 import { Point, MeshPlane, Texture } from 'pixi.js';

 for (let i = 0; i < 20; i++) {
     points.push(new Point(i * 50, 0));
 }
 const MeshPlane = new MeshPlane({ texture: Texture.from('snake.png'), verticesX: points });

Extends

Members

autoResize boolean

The geometry is automatically updated when the texture size changes.

Methods

textureUpdated () void

Method used for overrides, to do something in case texture frame was changed. Meshes based on plane can override it and change more details based on texture.

Inherited Properties

From class Mesh

geometry inherited

Includes vertex positions, face indices, 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.

material inherited

Alias for shader.

roundPixels inherited

Whether or not to round the x/y position of the mesh.

shader inherited

Represents the vertex and fragment shaders that processes the geometry and runs on the GPU. Can be shared between multiple Mesh objects.

texture inherited

The texture that the Mesh uses. Null for non-MeshMaterial shaders