Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pixi/filter-rgb-split

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/filter-rgb-split - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

86

lib/filter-rgb-split.es.js
/*!
* @pixi/filter-rgb-split - v2.2.0
* Compiled Wed, 18 Oct 2017 20:55:16 UTC
* @pixi/filter-rgb-split - v2.3.0
* Compiled Tue, 31 Oct 2017 18:03:27 UTC
*

@@ -8,83 +8,3 @@ * pixi-filters is licensed under the MIT License.

*/
if (typeof PIXI === 'undefined' || typeof PIXI.filters === 'undefined') { throw 'PixiJS is required'; }
var vertex = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}";
var fragment = "precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nvoid main(void)\n{\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\n}\n";
/**
* An RGB Split Filter.
* ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/rgb.png)
*
* @class
* @extends PIXI.Filter
* @memberof PIXI.filters
* @param {PIXI.Point} [red=[-10,0]] Red channel offset
* @param {PIXI.Point} [green=[0, 10]] Green channel offset
* @param {PIXI.Point} [blue=[0, 0]] Blue channel offset
*/
var RGBSplitFilter = (function (superclass) {
function RGBSplitFilter(red, green, blue) {
if ( red === void 0 ) red = [-10, 0];
if ( green === void 0 ) green = [0, 10];
if ( blue === void 0 ) blue = [0, 0];
superclass.call(this, vertex, fragment);
this.red = red;
this.green = green;
this.blue = blue;
}
if ( superclass ) RGBSplitFilter.__proto__ = superclass;
RGBSplitFilter.prototype = Object.create( superclass && superclass.prototype );
RGBSplitFilter.prototype.constructor = RGBSplitFilter;
var prototypeAccessors = { red: {},green: {},blue: {} };
/**
* Red channel offset.
*
* @member {PIXI.Point}
*/
prototypeAccessors.red.get = function () {
return this.uniforms.red;
};
prototypeAccessors.red.set = function (value) {
this.uniforms.red = value;
};
/**
* Green channel offset.
*
* @member {PIXI.Point}
*/
prototypeAccessors.green.get = function () {
return this.uniforms.green;
};
prototypeAccessors.green.set = function (value) {
this.uniforms.green = value;
};
/**
* Blue offset.
*
* @member {PIXI.Point}
*/
prototypeAccessors.blue.get = function () {
return this.uniforms.blue;
};
prototypeAccessors.blue.set = function (value) {
this.uniforms.blue = value;
};
Object.defineProperties( RGBSplitFilter.prototype, prototypeAccessors );
return RGBSplitFilter;
}(PIXI.Filter));
// Export to PixiJS namespace
PIXI.filters.RGBSplitFilter = RGBSplitFilter;
export { RGBSplitFilter };
var vertex="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",fragment="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nvoid main(void)\n{\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\n}\n",RGBSplitFilter=function(e){function r(r,t,n){void 0===r&&(r=[-10,0]),void 0===t&&(t=[0,10]),void 0===n&&(n=[0,0]),e.call(this,vertex,fragment),this.red=r,this.green=t,this.blue=n}e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r;var t={red:{configurable:!0},green:{configurable:!0},blue:{configurable:!0}};return t.red.get=function(){return this.uniforms.red},t.red.set=function(e){this.uniforms.red=e},t.green.get=function(){return this.uniforms.green},t.green.set=function(e){this.uniforms.green=e},t.blue.get=function(){return this.uniforms.blue},t.blue.set=function(e){this.uniforms.blue=e},Object.defineProperties(r.prototype,t),r}(PIXI.Filter);PIXI.filters.RGBSplitFilter=RGBSplitFilter;export{RGBSplitFilter};
//# sourceMappingURL=filter-rgb-split.es.js.map
/*!
* @pixi/filter-rgb-split - v2.2.0
* Compiled Wed, 18 Oct 2017 20:55:15 UTC
* @pixi/filter-rgb-split - v2.3.0
* Compiled Tue, 31 Oct 2017 18:03:28 UTC
*

@@ -8,93 +8,3 @@ * pixi-filters is licensed under the MIT License.

*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.__filter_rgb_split = {})));
}(this, (function (exports) { 'use strict';
if (typeof PIXI === 'undefined' || typeof PIXI.filters === 'undefined') { throw 'PixiJS is required'; }
var vertex = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}";
var fragment = "precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nvoid main(void)\n{\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\n}\n";
/**
* An RGB Split Filter.
* ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/rgb.png)
*
* @class
* @extends PIXI.Filter
* @memberof PIXI.filters
* @param {PIXI.Point} [red=[-10,0]] Red channel offset
* @param {PIXI.Point} [green=[0, 10]] Green channel offset
* @param {PIXI.Point} [blue=[0, 0]] Blue channel offset
*/
var RGBSplitFilter = (function (superclass) {
function RGBSplitFilter(red, green, blue) {
if ( red === void 0 ) red = [-10, 0];
if ( green === void 0 ) green = [0, 10];
if ( blue === void 0 ) blue = [0, 0];
superclass.call(this, vertex, fragment);
this.red = red;
this.green = green;
this.blue = blue;
}
if ( superclass ) RGBSplitFilter.__proto__ = superclass;
RGBSplitFilter.prototype = Object.create( superclass && superclass.prototype );
RGBSplitFilter.prototype.constructor = RGBSplitFilter;
var prototypeAccessors = { red: {},green: {},blue: {} };
/**
* Red channel offset.
*
* @member {PIXI.Point}
*/
prototypeAccessors.red.get = function () {
return this.uniforms.red;
};
prototypeAccessors.red.set = function (value) {
this.uniforms.red = value;
};
/**
* Green channel offset.
*
* @member {PIXI.Point}
*/
prototypeAccessors.green.get = function () {
return this.uniforms.green;
};
prototypeAccessors.green.set = function (value) {
this.uniforms.green = value;
};
/**
* Blue offset.
*
* @member {PIXI.Point}
*/
prototypeAccessors.blue.get = function () {
return this.uniforms.blue;
};
prototypeAccessors.blue.set = function (value) {
this.uniforms.blue = value;
};
Object.defineProperties( RGBSplitFilter.prototype, prototypeAccessors );
return RGBSplitFilter;
}(PIXI.Filter));
// Export to PixiJS namespace
PIXI.filters.RGBSplitFilter = RGBSplitFilter;
exports.RGBSplitFilter = RGBSplitFilter;
Object.defineProperty(exports, '__esModule', { value: true });
})));
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.__filter_rgb_split={})}(this,function(e){"use strict";var r="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",t="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nvoid main(void)\n{\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\n}\n",n=function(e){function n(n,o,i){void 0===n&&(n=[-10,0]),void 0===o&&(o=[0,10]),void 0===i&&(i=[0,0]),e.call(this,r,t),this.red=n,this.green=o,this.blue=i}e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n;var o={red:{configurable:!0},green:{configurable:!0},blue:{configurable:!0}};return o.red.get=function(){return this.uniforms.red},o.red.set=function(e){this.uniforms.red=e},o.green.get=function(){return this.uniforms.green},o.green.set=function(e){this.uniforms.green=e},o.blue.get=function(){return this.uniforms.blue},o.blue.set=function(e){this.uniforms.blue=e},Object.defineProperties(n.prototype,o),n}(PIXI.Filter);PIXI.filters.RGBSplitFilter=n,e.RGBSplitFilter=n,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=filter-rgb-split.js.map

17

package.json
{
"name": "@pixi/filter-rgb-split",
"version": "2.2.0",
"main": "lib/filter-rgb-split.min.js",
"version": "2.3.0",
"main": "lib/filter-rgb-split.js",
"description": "Display filter render as rgb-split text",

@@ -10,3 +10,3 @@ "author": "Mat Groves",

],
"module": "lib/filter-rgb-split.es.min.js",
"module": "lib/filter-rgb-split.es.js",
"types": "types.d.ts",

@@ -24,5 +24,5 @@ "homepage": "http://pixijs.com/",

"scripts": {
"build:umd": "rollup -c -f umd && rollup -cp -f umd",
"build:es": "rollup -c && rollup -cp",
"build": "npm run build:umd && npm run build:es",
"build:dev": "rollup -c && rollup -c -f umd",
"build": "rollup -cp && rollup -cp -f umd",
"watch": "rollup -cw",
"postversion": "npm run build"

@@ -38,6 +38,7 @@ },

"devDependencies": {
"@tools/build": "^2.0.1",
"@tools/build": "^2.3.0",
"@tools/fragments": "^2.0.0",
"rollup": "^0.45.2"
"rollup": "^0.45.2",
"rollup-watch": "^4.3.1"
}
}
/// <reference types="pixi.js" />
declare namespace PIXI.filters {
class RGBSplitFilter extends PIXI.Filter {
class RGBSplitFilter extends PIXI.Filter<{}> {
constructor(red?:PIXI.Point, green?:PIXI.Point, blue?:PIXI.Point);

@@ -5,0 +5,0 @@ red:PIXI.Point;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc