Skip to content

Commit

Permalink
Trim trailing whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Wesselhoeft committed Mar 25, 2014
1 parent 12c5a1b commit 61f18b6
Show file tree
Hide file tree
Showing 142 changed files with 1,396 additions and 1,396 deletions.
4 changes: 2 additions & 2 deletions filters/BinarySerpents.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Phaser.Filter.BinarySerpents = function (game) {
this.uniforms.march = { type: '1i', value: 100 };
this.uniforms.maxDistance = { type: '1f', value: 5.0 };
this.uniforms.fog = { type: '1f', value: 5.0 };

this.fragmentSrc = [

"precision mediump float;",
Expand Down Expand Up @@ -65,7 +65,7 @@ Phaser.Filter.BinarySerpents = function (game) {
"float r = Texture3D(ray, 33.);",
"gl_FragColor = result * (step(r, .3) + r * .2 + .1);",
"}"
];
];

};

Expand Down
4 changes: 2 additions & 2 deletions filters/BlurX.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Phaser.Filter.BlurX = function (game) {
Phaser.Filter.call(this, game);

this.uniforms.blur = { type: '1f', value: 1 / 512 };

this.fragmentSrc = [

"precision mediump float;",
Expand All @@ -27,7 +27,7 @@ Phaser.Filter.BlurX = function (game) {
"sum += texture2D(uSampler, vec2(vTextureCoord.x + 2.0*blur, vTextureCoord.y)) * 0.12;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x + 3.0*blur, vTextureCoord.y)) * 0.09;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x + 4.0*blur, vTextureCoord.y)) * 0.05;",

"gl_FragColor = sum;",

"}"
Expand Down
4 changes: 2 additions & 2 deletions filters/BlurY.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Phaser.Filter.BlurY = function (game) {
Phaser.Filter.call(this, game);

this.uniforms.blur = { type: '1f', value: 1 / 512 };

this.fragmentSrc = [

"precision mediump float;",
Expand All @@ -27,7 +27,7 @@ Phaser.Filter.BlurY = function (game) {
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + 2.0*blur)) * 0.12;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + 3.0*blur)) * 0.09;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + 4.0*blur)) * 0.05;",

"gl_FragColor = sum;",

"}"
Expand Down
2 changes: 1 addition & 1 deletion filters/CheckerWave.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Phaser.Filter.CheckerWave = function (game) {
this.uniforms.vrp = { type: '3f', value: { x: 0.0, y: -5.0, z: 0.0 }};
this.uniforms.color1 = { type: '3f', value: { x: 0, y: 1, z: 1 }};
this.uniforms.color2 = { type: '3f', value: { x: 1, y: 1, z: 1 }};

this.fragmentSrc = [

"precision mediump float;",
Expand Down
8 changes: 4 additions & 4 deletions filters/ColorBars.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Phaser.Filter.ColorBars = function (game) {

this.uniforms.alpha = { type: '1f', value: 1 }
// this.uniforms.origin = { type: '1f', value: 2.0 }

this.fragmentSrc = [

"// bars - [email protected]",
"// rotation and color mix modifications by malc ([email protected])",
"// modified by @hintz 2013-04-30",
Expand Down Expand Up @@ -58,8 +58,8 @@ Phaser.Filter.ColorBars = function (game) {
"color.a = alpha;",
"gl_FragColor = color;",
"}"
];

];

};

Expand Down
6 changes: 3 additions & 3 deletions filters/Fire.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Phaser.Filter.Fire = function (game) {
"vec3 c = mix(c1, c2, fbm(p + r)) + mix(c3, c4, r.x) - mix(c5, c6, r.y);",
"gl_FragColor = vec4(c * cos(shift * gl_FragCoord.y / resolution.y), alpha);",
"}"
];
];

};

Expand All @@ -65,11 +65,11 @@ Phaser.Filter.Fire.prototype.init = function (width, height, alpha, shift) {

this.setResolution(width, height);

if (typeof alpha !== 'undefined') {
if (typeof alpha !== 'undefined') {
this.uniforms.alpha.value = alpha;
}

if (typeof shift !== 'undefined') {
if (typeof shift !== 'undefined') {
this.uniforms.shift.value = shift;
}

Expand Down
2 changes: 1 addition & 1 deletion filters/Gray.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Phaser.Filter.Gray = function (game) {
Phaser.Filter.call(this, game);

this.uniforms.gray = { type: '1f', value: 1.0 };

this.fragmentSrc = [

"precision mediump float;",
Expand Down
2 changes: 1 addition & 1 deletion filters/HueRotate.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Phaser.Filter.HueRotate = function (game) {
this.uniforms.alpha = { type: '1f', value: 1.0 };
this.uniforms.size = { type: '1f', value: 0.03 };
this.uniforms.iChannel0 = { type: 'sampler2D', value: null, textureData: { repeat: true } }

this.fragmentSrc = [

"precision mediump float;",
Expand Down
10 changes: 5 additions & 5 deletions filters/LightBeam.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Phaser.Filter.LightBeam = function (game) {
this.uniforms.red = { type: '1f', value: 2.0 }
this.uniforms.green = { type: '1f', value: 1.0 }
this.uniforms.blue = { type: '1f', value: 1.0 }

this.fragmentSrc = [

"precision mediump float;",
Expand All @@ -28,9 +28,9 @@ Phaser.Filter.LightBeam = function (game) {
"void main(void) {",

"vec2 uPos = (gl_FragCoord.xy / resolution.xy);",

"uPos.y -= 0.50;",

"float vertColor = 0.0;",

"for (float i = 0.0; i < 1.0; i++)",
Expand All @@ -40,11 +40,11 @@ Phaser.Filter.LightBeam = function (game) {
"float fTemp = abs(1.0 / uPos.y / thickness);",
"vertColor += fTemp;",
"}",

"vec4 color = vec4(vertColor * red, vertColor * green, vertColor * blue, alpha);",
"gl_FragColor = color;",
"}"
];
];

};

Expand Down
2 changes: 1 addition & 1 deletion filters/Marble.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Phaser.Filter.Marble = function (game) {
this.uniforms.fluid_speed = { type: '1f', value: 10.0 }

this.uniforms.color_intensity = { type: '1f', value: 0.30 }

// The fragment shader source
this.fragmentSrc = [

Expand Down
6 changes: 3 additions & 3 deletions filters/Plasma.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Phaser.Filter.Plasma = function (game) {
this.uniforms.redShift = { type: '1f', value: 0.5 };
this.uniforms.greenShift = { type: '1f', value: 0.5 };
this.uniforms.blueShift = { type: '1f', value: 0.9 };

this.fragmentSrc = [

"precision mediump float;",
Expand Down Expand Up @@ -52,11 +52,11 @@ Phaser.Filter.Plasma.prototype.init = function (width, height, alpha, size) {

this.setResolution(width, height);

if (typeof alpha !== 'undefined') {
if (typeof alpha !== 'undefined') {
this.uniforms.alpha.value = alpha;
}

if (typeof size !== 'undefined') {
if (typeof size !== 'undefined') {
this.uniforms.size.value = size;
}

Expand Down
4 changes: 2 additions & 2 deletions filters/Tunnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Phaser.Filter.Tunnel = function (game) {
this.uniforms.alpha = { type: '1f', value: 1 }
this.uniforms.origin = { type: '1f', value: 2.0 }
this.uniforms.iChannel0 = { type: 'sampler2D', value: null, textureData: { repeat: true } }

this.fragmentSrc = [

"precision mediump float;",
Expand All @@ -30,7 +30,7 @@ Phaser.Filter.Tunnel = function (game) {
"gl_FragColor = vec4(c / (t.y + 0.5), alpha);",
"}"

];
];

};

Expand Down
2 changes: 1 addition & 1 deletion src/Outro.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
} else {
root.Phaser = Phaser;
}
}).call(this);
}).call(this);
4 changes: 2 additions & 2 deletions src/animation/Animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loop)
// Set-up some event listeners
this.game.onPause.add(this.onPause, this);
this.game.onResume.add(this.onResume, this);

};

Phaser.Animation.prototype = {
Expand Down Expand Up @@ -338,7 +338,7 @@ Phaser.Animation.prototype = {
this._parent.tilingTexture = false;
}
}

this.loopCount++;
this._parent.events.onAnimationLoop.dispatch(this._parent, this);
this.onLoop.dispatch(this._parent, this);
Expand Down
16 changes: 8 additions & 8 deletions src/animation/AnimationManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Phaser.AnimationManager = function (sprite) {
* @default
*/
this.currentFrame = null;

/**
* @property {boolean} updateIfVisible - Should the animation data continue to update even if the Sprite.visible is set to false.
* @default
Expand Down Expand Up @@ -183,7 +183,7 @@ Phaser.AnimationManager.prototype = {
/**
* Play an animation based on the given key. The animation should previously have been added via sprite.animations.add()
* If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.
*
*
* @method Phaser.AnimationManager#play
* @param {string} name - The name of the animation to be played, e.g. "fire", "walk", "jump".
* @param {number} [frameRate=null] - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.
Expand Down Expand Up @@ -245,7 +245,7 @@ Phaser.AnimationManager.prototype = {

/**
* The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events.
*
*
* @method Phaser.AnimationManager#update
* @protected
* @return {boolean} True if a new animation frame has been set, otherwise false.
Expand Down Expand Up @@ -343,7 +343,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, 'frameData', {
* @readonly
*/
Object.defineProperty(Phaser.AnimationManager.prototype, 'frameTotal', {

get: function () {

if (this._frameData)
Expand Down Expand Up @@ -390,20 +390,20 @@ Object.defineProperty(Phaser.AnimationManager.prototype, 'frame', {
{
return this._frameIndex;
}

},

set: function (value) {

if (typeof value === 'number' && this._frameData && this._frameData.getFrame(value) !== null)
{
this.currentFrame = this._frameData.getFrame(value);

if (this.currentFrame)
{
this._frameIndex = value;
this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);

if (this.sprite.__tilePattern)
{
this.__tilePattern = false;
Expand Down Expand Up @@ -441,7 +441,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, 'frameName', {
{
this._frameIndex = this.currentFrame.index;
this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);

if (this.sprite.__tilePattern)
{
this.__tilePattern = false;
Expand Down
12 changes: 6 additions & 6 deletions src/animation/AnimationParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Phaser.AnimationParser = {
var row = Math.floor((width - margin) / (frameWidth + spacing));
var column = Math.floor((height - margin) / (frameHeight + spacing));
var total = row * column;

if (frameMax !== -1)
{
total = frameMax;
Expand Down Expand Up @@ -115,11 +115,11 @@ Phaser.AnimationParser = {

// Let's create some frames then
var data = new Phaser.FrameData();

// By this stage frames is a fully parsed array
var frames = json['frames'];
var newFrame;

for (var i = 0; i < frames.length; i++)
{
var uuid = game.rnd.uuid();
Expand Down Expand Up @@ -180,15 +180,15 @@ Phaser.AnimationParser = {
console.log(json);
return;
}

// Let's create some frames then
var data = new Phaser.FrameData();

// By this stage frames is a fully parsed array
var frames = json['frames'];
var newFrame;
var i = 0;

for (var key in frames)
{
var uuid = game.rnd.uuid();
Expand Down Expand Up @@ -266,7 +266,7 @@ Phaser.AnimationParser = {
var frameY;
var frameWidth;
var frameHeight;

for (var i = 0; i < frames.length; i++)
{
uuid = game.rnd.uuid();
Expand Down
2 changes: 1 addition & 1 deletion src/animation/Frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Phaser.Frame = function (index, x, y, width, height, name, uuid) {
* @property {number} index - The index of this Frame within the FrameData set it is being added to.
*/
this.index = index;

/**
* @property {number} x - X position within the image to cut from.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/animation/FrameData.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Phaser.FrameData.prototype = {
}

return true;

},

/**
Expand All @@ -115,7 +115,7 @@ Phaser.FrameData.prototype = {
* @return {Array} An array of Frames between the start and end index values, or an empty array if none were found.
*/
getFrameRange: function (start, end, output) {

if (typeof output === "undefined") { output = []; }

for (var i = start; i <= end; i++)
Expand Down
Loading

0 comments on commit 61f18b6

Please sign in to comment.