How to use @pixi/filter-kawase-blur - 4 common examples

To help you get started, we’ve selected a few @pixi/filter-kawase-blur 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-filters / filters / advanced-bloom / src / AdvancedBloomFilter.js View on Github external
/**
         * The brightness, lower value is more subtle brightness, higher value is blown-out.
         *
         * @member {number}
         * @default 1.0
         */
        this.brightness = options.brightness;

        const { kernels, blur, quality, pixelSize, resolution } = options;

        this._extractFilter = new ExtractBrightnessFilter(options.threshold);
        this._extractFilter.resolution = resolution;
        this._blurFilter = kernels ?
            new KawaseBlurFilter(kernels) :
            new KawaseBlurFilter(blur, quality);
        this.pixelSize = pixelSize;
        this.resolution = resolution;
    }
github pixijs / pixi-filters / filters / drop-shadow / src / DropShadowFilter.js View on Github external
blur: 2,
            quality: 3,
            pixelSize: 1,
            resolution: settings.RESOLUTION,
        }, options);

        super();

        const { kernels, blur, quality, pixelSize, resolution } = options;

        this._tintFilter = new Filter(vertex, fragment);
        this._tintFilter.uniforms.color = new Float32Array(4);
        this._tintFilter.uniforms.shift = new Point();
        this._tintFilter.resolution = resolution;
        this._blurFilter = kernels ?
            new KawaseBlurFilter(kernels) :
            new KawaseBlurFilter(blur, quality);

        this.pixelSize = pixelSize;
        this.resolution = resolution;

        const { shadowOnly, rotation, distance, alpha, color } = options;

        this.shadowOnly = shadowOnly;
        this.rotation = rotation;
        this.distance = distance;
        this.alpha = alpha;
        this.color = color;

        this._updatePadding();
    }
github pixijs / pixi-filters / filters / advanced-bloom / src / AdvancedBloomFilter.js View on Github external
this.bloomScale = options.bloomScale;

        /**
         * The brightness, lower value is more subtle brightness, higher value is blown-out.
         *
         * @member {number}
         * @default 1.0
         */
        this.brightness = options.brightness;

        const { kernels, blur, quality, pixelSize, resolution } = options;

        this._extractFilter = new ExtractBrightnessFilter(options.threshold);
        this._extractFilter.resolution = resolution;
        this._blurFilter = kernels ?
            new KawaseBlurFilter(kernels) :
            new KawaseBlurFilter(blur, quality);
        this.pixelSize = pixelSize;
        this.resolution = resolution;
    }
github pixijs / pixi-filters / filters / drop-shadow / src / DropShadowFilter.js View on Github external
quality: 3,
            pixelSize: 1,
            resolution: settings.RESOLUTION,
        }, options);

        super();

        const { kernels, blur, quality, pixelSize, resolution } = options;

        this._tintFilter = new Filter(vertex, fragment);
        this._tintFilter.uniforms.color = new Float32Array(4);
        this._tintFilter.uniforms.shift = new Point();
        this._tintFilter.resolution = resolution;
        this._blurFilter = kernels ?
            new KawaseBlurFilter(kernels) :
            new KawaseBlurFilter(blur, quality);

        this.pixelSize = pixelSize;
        this.resolution = resolution;

        const { shadowOnly, rotation, distance, alpha, color } = options;

        this.shadowOnly = shadowOnly;
        this.rotation = rotation;
        this.distance = distance;
        this.alpha = alpha;
        this.color = color;

        this._updatePadding();
    }

@pixi/filter-kawase-blur

PixiJS filter to apply an alternative, fast blur effect to Gaussian

MIT
Latest version published 2 months ago

Package Health Score

84 / 100
Full package analysis

Popular @pixi/filter-kawase-blur functions

Similar packages