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

@pixi/filter-simple-lightmap

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/filter-simple-lightmap - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

7

lib/filter-simple-lightmap.es.js
/*!
* @pixi/filter-simple-lightmap - v2.0.0
* Compiled Wed, 26 Jul 2017 17:02:50 UTC
* Compiled Fri, 08 Sep 2017 16:02:09 UTC
*

@@ -9,2 +9,4 @@ * pixi-filters is licensed under the MIT License.

if (typeof PIXI === 'undefined' || typeof PIXI.filters === 'undefined') { throw 'PixiJS is required'; }
var vertex = "precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float thickness;\nuniform vec4 outlineColor;\nuniform float pixelWidth;\nuniform float pixelHeight;\nvec2 px = vec2(pixelWidth, pixelHeight);\n\nvoid main(void) {\n const float PI = 3.14159265358979323846264;\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n for (float angle = 0.; angle < PI * 2.; angle += + (1 / thickness).toFixed(7) + ) {\n curColor = texture2D(uSampler, vec2(vTextureCoord.x + thickness * px.x * cos(angle), vTextureCoord.y + thickness * px.y * sin(angle)));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n";

@@ -90,3 +92,6 @@

// Export to PixiJS namespace
PIXI.filters.SimpleLightmapFilter = SimpleLightmapFilter;
export { SimpleLightmapFilter };
//# sourceMappingURL=filter-simple-lightmap.es.js.map

4

lib/filter-simple-lightmap.es.min.js
/*!
* @pixi/filter-simple-lightmap - v2.0.0
* Compiled Wed, 26 Jul 2017 17:02:51 UTC
* Compiled Fri, 08 Sep 2017 16:02:09 UTC
*

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

*/
var vertex="precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float thickness;\nuniform vec4 outlineColor;\nuniform float pixelWidth;\nuniform float pixelHeight;\nvec2 px = vec2(pixelWidth, pixelHeight);\n\nvoid main(void) {\n const float PI = 3.14159265358979323846264;\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n for (float angle = 0.; angle < PI * 2.; angle += + (1 / thickness).toFixed(7) + ) {\n curColor = texture2D(uSampler, vec2(vTextureCoord.x + thickness * px.x * cos(angle), vTextureCoord.y + thickness * px.y * sin(angle)));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n",fragment="varying vec4 vColor;\nvarying vec2 vTextureCoord;\nuniform sampler2D u_texture; //diffuse map\nuniform sampler2D u_lightmap; //light map\nuniform vec2 resolution; //resolution of screen\nuniform vec4 ambientColor; //ambient RGB, alpha channel is intensity\nvoid main() {\n vec4 diffuseColor = texture2D(u_texture, vTextureCoord);\n vec2 lighCoord = (gl_FragCoord.xy / resolution.xy);\n vec4 light = texture2D(u_lightmap, vTextureCoord);\n vec3 ambient = ambientColor.rgb * ambientColor.a;\n vec3 intensity = ambient + light.rgb;\n vec3 finalColor = diffuseColor.rgb * intensity;\n gl_FragColor = vColor * vec4(finalColor, diffuseColor.a);\n}\n",SimpleLightmapFilter=function(o){function e(e,r,n){void 0===n&&(n=[1,1]),o.call(this,vertex,fragment),this.uniforms.u_lightmap=e,this.uniforms.resolution=new Float32Array(n),this.uniforms.ambientColor=new Float32Array(r)}o&&(e.__proto__=o),(e.prototype=Object.create(o&&o.prototype)).constructor=e;var r={texture:{},color:{},resolution:{}};return r.texture.get=function(){return this.uniforms.u_lightmap},r.texture.set=function(o){this.uniforms.u_lightmap=o},r.color.get=function(){return this.uniforms.ambientColor},r.color.set=function(o){this.uniforms.ambientColor=new Float32Array(o)},r.resolution.get=function(){return this.uniforms.resolution},r.resolution.set=function(o){this.uniforms.resolution=new Float32Array(o)},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);export{SimpleLightmapFilter};
var vertex="precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float thickness;\nuniform vec4 outlineColor;\nuniform float pixelWidth;\nuniform float pixelHeight;\nvec2 px = vec2(pixelWidth, pixelHeight);\n\nvoid main(void) {\n const float PI = 3.14159265358979323846264;\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n for (float angle = 0.; angle < PI * 2.; angle += + (1 / thickness).toFixed(7) + ) {\n curColor = texture2D(uSampler, vec2(vTextureCoord.x + thickness * px.x * cos(angle), vTextureCoord.y + thickness * px.y * sin(angle)));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n",fragment="varying vec4 vColor;\nvarying vec2 vTextureCoord;\nuniform sampler2D u_texture; //diffuse map\nuniform sampler2D u_lightmap; //light map\nuniform vec2 resolution; //resolution of screen\nuniform vec4 ambientColor; //ambient RGB, alpha channel is intensity\nvoid main() {\n vec4 diffuseColor = texture2D(u_texture, vTextureCoord);\n vec2 lighCoord = (gl_FragCoord.xy / resolution.xy);\n vec4 light = texture2D(u_lightmap, vTextureCoord);\n vec3 ambient = ambientColor.rgb * ambientColor.a;\n vec3 intensity = ambient + light.rgb;\n vec3 finalColor = diffuseColor.rgb * intensity;\n gl_FragColor = vColor * vec4(finalColor, diffuseColor.a);\n}\n",SimpleLightmapFilter=function(o){function e(e,r,t){void 0===t&&(t=[1,1]),o.call(this,vertex,fragment),this.uniforms.u_lightmap=e,this.uniforms.resolution=new Float32Array(t),this.uniforms.ambientColor=new Float32Array(r)}o&&(e.__proto__=o),(e.prototype=Object.create(o&&o.prototype)).constructor=e;var r={texture:{},color:{},resolution:{}};return r.texture.get=function(){return this.uniforms.u_lightmap},r.texture.set=function(o){this.uniforms.u_lightmap=o},r.color.get=function(){return this.uniforms.ambientColor},r.color.set=function(o){this.uniforms.ambientColor=new Float32Array(o)},r.resolution.get=function(){return this.uniforms.resolution},r.resolution.set=function(o){this.uniforms.resolution=new Float32Array(o)},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.SimpleLightmapFilter=SimpleLightmapFilter;export{SimpleLightmapFilter};
//# sourceMappingURL=filter-simple-lightmap.es.min.js.map
/*!
* @pixi/filter-simple-lightmap - v2.0.0
* Compiled Wed, 26 Jul 2017 17:02:48 UTC
* Compiled Fri, 08 Sep 2017 16:02:07 UTC
*

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

if (typeof PIXI.Filter === 'undefined') { throw 'PixiJS is required'; }
if (typeof PIXI === 'undefined' || typeof PIXI.filters === 'undefined') { throw 'PixiJS is required'; }

@@ -98,2 +98,5 @@ var vertex = "precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float thickness;\nuniform vec4 outlineColor;\nuniform float pixelWidth;\nuniform float pixelHeight;\nvec2 px = vec2(pixelWidth, pixelHeight);\n\nvoid main(void) {\n const float PI = 3.14159265358979323846264;\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n for (float angle = 0.; angle < PI * 2.; angle += + (1 / thickness).toFixed(7) + ) {\n curColor = texture2D(uSampler, vec2(vTextureCoord.x + thickness * px.x * cos(angle), vTextureCoord.y + thickness * px.y * sin(angle)));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n";

// Export to PixiJS namespace
PIXI.filters.SimpleLightmapFilter = SimpleLightmapFilter;
exports.SimpleLightmapFilter = SimpleLightmapFilter;

@@ -103,5 +106,3 @@

Object.assign(PIXI.filters, exports);
})));
//# sourceMappingURL=filter-simple-lightmap.js.map
/*!
* @pixi/filter-simple-lightmap - v2.0.0
* Compiled Wed, 26 Jul 2017 17:02:49 UTC
* Compiled Fri, 08 Sep 2017 16:02:08 UTC
*

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

*/
!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(o.__filter_simple_lightmap={})}(this,function(o){"use strict";if(void 0===PIXI.Filter)throw"PixiJS is required";var e="precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float thickness;\nuniform vec4 outlineColor;\nuniform float pixelWidth;\nuniform float pixelHeight;\nvec2 px = vec2(pixelWidth, pixelHeight);\n\nvoid main(void) {\n const float PI = 3.14159265358979323846264;\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n for (float angle = 0.; angle < PI * 2.; angle += + (1 / thickness).toFixed(7) + ) {\n curColor = texture2D(uSampler, vec2(vTextureCoord.x + thickness * px.x * cos(angle), vTextureCoord.y + thickness * px.y * sin(angle)));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n",t="varying vec4 vColor;\nvarying vec2 vTextureCoord;\nuniform sampler2D u_texture; //diffuse map\nuniform sampler2D u_lightmap; //light map\nuniform vec2 resolution; //resolution of screen\nuniform vec4 ambientColor; //ambient RGB, alpha channel is intensity\nvoid main() {\n vec4 diffuseColor = texture2D(u_texture, vTextureCoord);\n vec2 lighCoord = (gl_FragCoord.xy / resolution.xy);\n vec4 light = texture2D(u_lightmap, vTextureCoord);\n vec3 ambient = ambientColor.rgb * ambientColor.a;\n vec3 intensity = ambient + light.rgb;\n vec3 finalColor = diffuseColor.rgb * intensity;\n gl_FragColor = vColor * vec4(finalColor, diffuseColor.a);\n}\n",n=function(o){function n(n,r,i){void 0===i&&(i=[1,1]),o.call(this,e,t),this.uniforms.u_lightmap=n,this.uniforms.resolution=new Float32Array(i),this.uniforms.ambientColor=new Float32Array(r)}o&&(n.__proto__=o),(n.prototype=Object.create(o&&o.prototype)).constructor=n;var r={texture:{},color:{},resolution:{}};return r.texture.get=function(){return this.uniforms.u_lightmap},r.texture.set=function(o){this.uniforms.u_lightmap=o},r.color.get=function(){return this.uniforms.ambientColor},r.color.set=function(o){this.uniforms.ambientColor=new Float32Array(o)},r.resolution.get=function(){return this.uniforms.resolution},r.resolution.set=function(o){this.uniforms.resolution=new Float32Array(o)},Object.defineProperties(n.prototype,r),n}(PIXI.Filter);o.SimpleLightmapFilter=n,Object.defineProperty(o,"__esModule",{value:!0}),Object.assign(PIXI.filters,o)});
!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(o.__filter_simple_lightmap={})}(this,function(o){"use strict";var e="precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float thickness;\nuniform vec4 outlineColor;\nuniform float pixelWidth;\nuniform float pixelHeight;\nvec2 px = vec2(pixelWidth, pixelHeight);\n\nvoid main(void) {\n const float PI = 3.14159265358979323846264;\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n for (float angle = 0.; angle < PI * 2.; angle += + (1 / thickness).toFixed(7) + ) {\n curColor = texture2D(uSampler, vec2(vTextureCoord.x + thickness * px.x * cos(angle), vTextureCoord.y + thickness * px.y * sin(angle)));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n",t="varying vec4 vColor;\nvarying vec2 vTextureCoord;\nuniform sampler2D u_texture; //diffuse map\nuniform sampler2D u_lightmap; //light map\nuniform vec2 resolution; //resolution of screen\nuniform vec4 ambientColor; //ambient RGB, alpha channel is intensity\nvoid main() {\n vec4 diffuseColor = texture2D(u_texture, vTextureCoord);\n vec2 lighCoord = (gl_FragCoord.xy / resolution.xy);\n vec4 light = texture2D(u_lightmap, vTextureCoord);\n vec3 ambient = ambientColor.rgb * ambientColor.a;\n vec3 intensity = ambient + light.rgb;\n vec3 finalColor = diffuseColor.rgb * intensity;\n gl_FragColor = vColor * vec4(finalColor, diffuseColor.a);\n}\n",n=function(o){function n(n,r,i){void 0===i&&(i=[1,1]),o.call(this,e,t),this.uniforms.u_lightmap=n,this.uniforms.resolution=new Float32Array(i),this.uniforms.ambientColor=new Float32Array(r)}o&&(n.__proto__=o),(n.prototype=Object.create(o&&o.prototype)).constructor=n;var r={texture:{},color:{},resolution:{}};return r.texture.get=function(){return this.uniforms.u_lightmap},r.texture.set=function(o){this.uniforms.u_lightmap=o},r.color.get=function(){return this.uniforms.ambientColor},r.color.set=function(o){this.uniforms.ambientColor=new Float32Array(o)},r.resolution.get=function(){return this.uniforms.resolution},r.resolution.set=function(o){this.uniforms.resolution=new Float32Array(o)},Object.defineProperties(n.prototype,r),n}(PIXI.Filter);PIXI.filters.SimpleLightmapFilter=n,o.SimpleLightmapFilter=n,Object.defineProperty(o,"__esModule",{value:!0})});
//# sourceMappingURL=filter-simple-lightmap.min.js.map
{
"name": "@pixi/filter-simple-lightmap",
"version": "2.0.0",
"version": "2.0.1",
"main": "lib/filter-simple-lightmap.min.js",

@@ -33,3 +33,3 @@ "description": "Display filter render as simple-lightmap text",

"devDependencies": {
"@tools/build": "^2.0.0",
"@tools/build": "^2.0.1",
"@tools/fragments": "^2.0.0",

@@ -36,0 +36,0 @@ "rollup": "^0.45.2"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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