Skip to content

Commit

Permalink
updated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
the-simian committed May 3, 2015
1 parent 68980a8 commit 8002ff0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"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.",
"main": "index.js",
"scripts": {
Expand All @@ -26,7 +26,7 @@
},
"homepage": "https://github.com/the-simian/phaser-glsl-loader",
"dependencies": {
"lodash": "3.7.x"
"lodash": "3.8.x"
},
"devDependencies": {
"chai": "2.x.x",
Expand All @@ -36,7 +36,6 @@
"gulp-mocha": "2.x.x",
"gulp-plato": "1.x.x",
"mocha": "2.2.x",
"mocha-lcov-reporter": "*",
"run-sequence": "1.x.x",
"webpack": "1.x.x"
}
Expand Down
12 changes: 6 additions & 6 deletions test/main.js
Expand Up @@ -9,19 +9,19 @@ var webpack = require('webpack'),
fixtures = path.join(__dirname, 'fixtures');


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 );","}"];'

expect(phaserGlslLoader.call({}, rawStuff))
.to
.be
.equal(expectedResult)
.equal(expectedResult);
});
});
});
});

0 comments on commit 8002ff0

Please sign in to comment.