How to use the @pixi/mesh-extras.SimpleRope.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 / SimpleRope.js View on Github external
import { SimpleRope } from '@pixi/mesh-extras';

/**
 * Renders the object using the Canvas renderer
 *
 * @protected
 * @method _renderCanvas
 * @memberof PIXI.Mesh#
 * @param {PIXI.CanvasRenderer} renderer - The canvas renderer.
 */
SimpleRope.prototype._renderCanvas = function _renderCanvas(renderer)
{
    if (this.autoUpdate
        || this.geometry.width !== this.shader.texture.height)
    {
        this.geometry.width = this.shader.texture.height;
        this.geometry.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 1 month ago

Package Health Score

95 / 100
Full package analysis

Similar packages