How to use @pixi/particles - 1 common examples

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

/**
 * Renders the object using the Canvas renderer
 * @method renderCanvas
 * @memberof PIXI.ParticleContainer#
 * @private
 * @param {PIXI.CanvasRenderer} renderer - a reference to the canvas renderer
 */
ParticleContainer.prototype.renderCanvas = function renderCanvas(renderer)
{
    if (!this.visible || this.worldAlpha <= 0 || !this.children.length || !this.renderable)
    {
        return;
    }

    const context = renderer.context;
    const transform = this.worldTransform;
    let isRotated = true;

    let positionX = 0;
    let positionY = 0;

    let finalWidth = 0;
    let finalHeight = 0;

@pixi/particles

Render many sprite particles as efficiently as possible

MIT
Latest version published 3 years ago

Package Health Score

67 / 100
Full package analysis

Popular @pixi/particles functions