How to use the @pixi/mesh.MeshGeometry function in @pixi/mesh

To help you get started, we’ve selected a few @pixi/mesh examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pixijs / pixi.js / packages / mesh-extras / src / SimpleMesh.js View on Github external
constructor(texture = Texture.EMPTY, vertices, uvs, indices, drawMode)
    {
        const geometry = new MeshGeometry(vertices, uvs, indices);

        geometry.getBuffer('aVertexPosition').static = false;

        const meshMaterial = new MeshMaterial(texture);

        super(geometry, meshMaterial, null, drawMode);

        /**
         * upload vertices buffer each frame
         * @member {boolean}
         */
        this.autoUpdate = true;
    }

@pixi/mesh

Core Mesh functionality

MIT
Latest version published 8 months ago

Package Health Score

88 / 100
Full package analysis