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

phaser-glsl-loader

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phaser-glsl-loader - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

5

package.json
{
"name": "phaser-glsl-loader",
"version": "0.0.4",
"version": "0.0.5",
"description": "A shader loader for webpack that allows you to keep your glsl files external when working in phaser.",

@@ -29,3 +29,3 @@ "main": "index.js",

"dependencies": {
"lodash": "3.7.x"
"lodash": "3.8.x"
},

@@ -40,3 +40,2 @@ "devDependencies": {

"mocha": "2.2.x",
"mocha-lcov-reporter": "*",
"run-sequence": "1.x.x",

@@ -43,0 +42,0 @@ "webpack": "1.x.x"

12

test/main.js

@@ -12,9 +12,9 @@ 'use strict'

describe('Given a phaser-glsl-loader', function() {
describe('When I provide a valid filepath', function() {
it('Should convert the glsl file into a format consumable by phaser', function() {
describe('Given a phaser-glsl-loader', function () {
describe('When I provide a valid filepath', function () {
it('Should convert the glsl file into a format consumable by phaser', function () {
var testFile = path.join(fixtures, 'testshader.frag');
var rawStuff = fs.readFileSync(testFile, "utf-8");
var expectedResult = 'module.exports=["#ifdef GL_ES","precision mediump float;","#endif","uniform float time;","uniform vec2 mouse;","uniform vec2 resolution;","void main( void ) {","float treshhold = 200.;","vec2 position = gl_FragCoord.xy - mouse.xy * resolution.xy;","float rad = sqrt(position.x * position.x + position.y * position.y) ;","float amp = (treshhold-rad)/treshhold;","if(amp<0.0){ amp=0.0;}","float gray = (sin(rad/ 10. - time * 3.)+0.5)*amp;","gl_FragColor = vec4(gray,gray,gray, 1.0 );","}"];'

@@ -25,5 +25,5 @@

.be
.equal(expectedResult)
.equal(expectedResult);
});
});
});
});
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