How to use the @pixi/mesh-extras.SimpleMesh.prototype function in @pixi/mesh-extras

To help you get started, we’ve selected a few @pixi/mesh-extras 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 / canvas / canvas-mesh / src / SimpleMesh.js View on Github external
import { SimpleMesh } from '@pixi/mesh-extras';

/**
 * Renders the object using the Canvas renderer
 *
 * @private
 * @method _renderCanvas
 * @memberof PIXI.Mesh#
 * @param {PIXI.CanvasRenderer} renderer - The canvas renderer.
 */
SimpleMesh.prototype._renderCanvas = function _renderCanvas(renderer)
{
    if (this.autoUpdate)
    {
        this.geometry.getBuffer('aVertexPosition').update();
    }

    if (this.shader.update)
    {
        this.shader.update();
    }

    this.calculateUvs();

    this.material._renderCanvas(renderer, this);
};

@pixi/mesh-extras

Custom Mesh display objects, like Rope and SimplePlane

MIT
Latest version published 8 months ago

Package Health Score

91 / 100
Full package analysis

Similar packages