Skip to content

Commit

Permalink
Phaser 2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
photonstorm committed Oct 23, 2014
1 parent f3f022b commit 7557e4e
Show file tree
Hide file tree
Showing 12 changed files with 192 additions and 52 deletions.
38 changes: 33 additions & 5 deletions build/custom/phaser-arcade-physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Phaser - http://phaser.io
*
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:26:25
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:33:03
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
Expand Down Expand Up @@ -1068,7 +1068,11 @@ PIXI.DisplayObject.prototype.generateTexture = function(resolution, scaleMode, r
var bounds = this.getLocalBounds();

var renderTexture = new PIXI.RenderTexture(bounds.width | 0, bounds.height | 0, renderer, scaleMode, resolution);
renderTexture.render(this, new PIXI.Point(-bounds.x, -bounds.y) );

PIXI.DisplayObject._tempMatrix.tx = -bounds.x;
PIXI.DisplayObject._tempMatrix.ty = -bounds.y;

renderTexture.render(this, PIXI.DisplayObject._tempMatrix);

return renderTexture;
};
Expand Down Expand Up @@ -2634,6 +2638,7 @@ PIXI.Text.prototype.updateText = function()
this.context.strokeStyle = this.style.stroke;
this.context.lineWidth = this.style.strokeThickness;
this.context.textBaseline = 'alphabetic';
this.context.lineJoin = 'round';

var linePositionX;
var linePositionY;
Expand Down Expand Up @@ -7550,7 +7555,7 @@ PIXI.WebGLSpriteBatch.prototype.destroy = function()
* @class WebGLFastSpriteBatch
* @constructor
*/
PIXI.WebGLFastSpriteBatch = function()
PIXI.WebGLFastSpriteBatch = function(gl)
{
/**
* @property vertSize
Expand Down Expand Up @@ -7660,6 +7665,7 @@ PIXI.WebGLFastSpriteBatch = function()
*/
this.matrix = null;

this.setContext(gl);
};

PIXI.WebGLFastSpriteBatch.prototype.constructor = PIXI.WebGLFastSpriteBatch;
Expand Down Expand Up @@ -7895,7 +7901,7 @@ PIXI.WebGLFastSpriteBatch.prototype.flush = function()

// bind the current texture

if(!this.currentBaseTexture._glTextures[gl.id])PIXI.createWebGLTexture(this.currentBaseTexture, gl);
if(!this.currentBaseTexture._glTextures[gl.id])this.renderSession.renderer.updateTexture(this.currentBaseTexture, gl);

gl.bindTexture(gl.TEXTURE_2D, this.currentBaseTexture._glTextures[gl.id]);

Expand Down Expand Up @@ -9116,6 +9122,28 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
}
};

/**
* Removes everything from the renderer and optionally removes the Canvas DOM element.
*
* @method destroy
* @param [removeView=true] {boolean} Removes the Canvas element from the DOM.
*/
PIXI.CanvasRenderer.prototype.destroy = function(removeView)
{
if (typeof removeView === "undefined") { removeView = true; }

if (removeView && this.view.parent)
{
this.view.parent.removeChild(this.view);
}

this.view = null;
this.context = null;
this.maskManager = null;
this.renderSession = null;

};

/**
* Resizes the canvas view to the specified width and height
*
Expand Down Expand Up @@ -11554,7 +11582,7 @@ PIXI.AbstractFilter.prototype.apply = function(frameBuffer)
*
* Phaser - http://phaser.io
*
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:26:25
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:33:03
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
Expand Down
12 changes: 6 additions & 6 deletions build/custom/phaser-arcade-physics.min.js

Large diffs are not rendered by default.

38 changes: 33 additions & 5 deletions build/custom/phaser-ninja-physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Phaser - http://phaser.io
*
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:26:25
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:33:03
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
Expand Down Expand Up @@ -1068,7 +1068,11 @@ PIXI.DisplayObject.prototype.generateTexture = function(resolution, scaleMode, r
var bounds = this.getLocalBounds();

var renderTexture = new PIXI.RenderTexture(bounds.width | 0, bounds.height | 0, renderer, scaleMode, resolution);
renderTexture.render(this, new PIXI.Point(-bounds.x, -bounds.y) );

PIXI.DisplayObject._tempMatrix.tx = -bounds.x;
PIXI.DisplayObject._tempMatrix.ty = -bounds.y;

renderTexture.render(this, PIXI.DisplayObject._tempMatrix);

return renderTexture;
};
Expand Down Expand Up @@ -2634,6 +2638,7 @@ PIXI.Text.prototype.updateText = function()
this.context.strokeStyle = this.style.stroke;
this.context.lineWidth = this.style.strokeThickness;
this.context.textBaseline = 'alphabetic';
this.context.lineJoin = 'round';

var linePositionX;
var linePositionY;
Expand Down Expand Up @@ -7550,7 +7555,7 @@ PIXI.WebGLSpriteBatch.prototype.destroy = function()
* @class WebGLFastSpriteBatch
* @constructor
*/
PIXI.WebGLFastSpriteBatch = function()
PIXI.WebGLFastSpriteBatch = function(gl)
{
/**
* @property vertSize
Expand Down Expand Up @@ -7660,6 +7665,7 @@ PIXI.WebGLFastSpriteBatch = function()
*/
this.matrix = null;

this.setContext(gl);
};

PIXI.WebGLFastSpriteBatch.prototype.constructor = PIXI.WebGLFastSpriteBatch;
Expand Down Expand Up @@ -7895,7 +7901,7 @@ PIXI.WebGLFastSpriteBatch.prototype.flush = function()

// bind the current texture

if(!this.currentBaseTexture._glTextures[gl.id])PIXI.createWebGLTexture(this.currentBaseTexture, gl);
if(!this.currentBaseTexture._glTextures[gl.id])this.renderSession.renderer.updateTexture(this.currentBaseTexture, gl);

gl.bindTexture(gl.TEXTURE_2D, this.currentBaseTexture._glTextures[gl.id]);

Expand Down Expand Up @@ -9116,6 +9122,28 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
}
};

/**
* Removes everything from the renderer and optionally removes the Canvas DOM element.
*
* @method destroy
* @param [removeView=true] {boolean} Removes the Canvas element from the DOM.
*/
PIXI.CanvasRenderer.prototype.destroy = function(removeView)
{
if (typeof removeView === "undefined") { removeView = true; }

if (removeView && this.view.parent)
{
this.view.parent.removeChild(this.view);
}

this.view = null;
this.context = null;
this.maskManager = null;
this.renderSession = null;

};

/**
* Resizes the canvas view to the specified width and height
*
Expand Down Expand Up @@ -11554,7 +11582,7 @@ PIXI.AbstractFilter.prototype.apply = function(frameBuffer)
*
* Phaser - http://phaser.io
*
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:26:25
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:33:03
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
Expand Down
12 changes: 6 additions & 6 deletions build/custom/phaser-ninja-physics.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/custom/phaser-no-libs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Phaser - http://phaser.io
*
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:26:25
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:33:03
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
Expand Down
36 changes: 32 additions & 4 deletions build/custom/phaser-no-physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Phaser - http://phaser.io
*
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:26:25
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:33:03
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
Expand Down Expand Up @@ -1068,7 +1068,11 @@ PIXI.DisplayObject.prototype.generateTexture = function(resolution, scaleMode, r
var bounds = this.getLocalBounds();

var renderTexture = new PIXI.RenderTexture(bounds.width | 0, bounds.height | 0, renderer, scaleMode, resolution);
renderTexture.render(this, new PIXI.Point(-bounds.x, -bounds.y) );

PIXI.DisplayObject._tempMatrix.tx = -bounds.x;
PIXI.DisplayObject._tempMatrix.ty = -bounds.y;

renderTexture.render(this, PIXI.DisplayObject._tempMatrix);

return renderTexture;
};
Expand Down Expand Up @@ -2634,6 +2638,7 @@ PIXI.Text.prototype.updateText = function()
this.context.strokeStyle = this.style.stroke;
this.context.lineWidth = this.style.strokeThickness;
this.context.textBaseline = 'alphabetic';
this.context.lineJoin = 'round';

var linePositionX;
var linePositionY;
Expand Down Expand Up @@ -7550,7 +7555,7 @@ PIXI.WebGLSpriteBatch.prototype.destroy = function()
* @class WebGLFastSpriteBatch
* @constructor
*/
PIXI.WebGLFastSpriteBatch = function()
PIXI.WebGLFastSpriteBatch = function(gl)
{
/**
* @property vertSize
Expand Down Expand Up @@ -7660,6 +7665,7 @@ PIXI.WebGLFastSpriteBatch = function()
*/
this.matrix = null;

this.setContext(gl);
};

PIXI.WebGLFastSpriteBatch.prototype.constructor = PIXI.WebGLFastSpriteBatch;
Expand Down Expand Up @@ -7895,7 +7901,7 @@ PIXI.WebGLFastSpriteBatch.prototype.flush = function()

// bind the current texture

if(!this.currentBaseTexture._glTextures[gl.id])PIXI.createWebGLTexture(this.currentBaseTexture, gl);
if(!this.currentBaseTexture._glTextures[gl.id])this.renderSession.renderer.updateTexture(this.currentBaseTexture, gl);

gl.bindTexture(gl.TEXTURE_2D, this.currentBaseTexture._glTextures[gl.id]);

Expand Down Expand Up @@ -9116,6 +9122,28 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
}
};

/**
* Removes everything from the renderer and optionally removes the Canvas DOM element.
*
* @method destroy
* @param [removeView=true] {boolean} Removes the Canvas element from the DOM.
*/
PIXI.CanvasRenderer.prototype.destroy = function(removeView)
{
if (typeof removeView === "undefined") { removeView = true; }

if (removeView && this.view.parent)
{
this.view.parent.removeChild(this.view);
}

this.view = null;
this.context = null;
this.maskManager = null;
this.renderSession = null;

};

/**
* Resizes the canvas view to the specified width and height
*
Expand Down
12 changes: 6 additions & 6 deletions build/custom/phaser-no-physics.min.js

Large diffs are not rendered by default.

34 changes: 31 additions & 3 deletions build/custom/pixi.js
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,11 @@ PIXI.DisplayObject.prototype.generateTexture = function(resolution, scaleMode, r
var bounds = this.getLocalBounds();

var renderTexture = new PIXI.RenderTexture(bounds.width | 0, bounds.height | 0, renderer, scaleMode, resolution);
renderTexture.render(this, new PIXI.Point(-bounds.x, -bounds.y) );

PIXI.DisplayObject._tempMatrix.tx = -bounds.x;
PIXI.DisplayObject._tempMatrix.ty = -bounds.y;

renderTexture.render(this, PIXI.DisplayObject._tempMatrix);

return renderTexture;
};
Expand Down Expand Up @@ -2604,6 +2608,7 @@ PIXI.Text.prototype.updateText = function()
this.context.strokeStyle = this.style.stroke;
this.context.lineWidth = this.style.strokeThickness;
this.context.textBaseline = 'alphabetic';
this.context.lineJoin = 'round';

var linePositionX;
var linePositionY;
Expand Down Expand Up @@ -7520,7 +7525,7 @@ PIXI.WebGLSpriteBatch.prototype.destroy = function()
* @class WebGLFastSpriteBatch
* @constructor
*/
PIXI.WebGLFastSpriteBatch = function()
PIXI.WebGLFastSpriteBatch = function(gl)
{
/**
* @property vertSize
Expand Down Expand Up @@ -7630,6 +7635,7 @@ PIXI.WebGLFastSpriteBatch = function()
*/
this.matrix = null;

this.setContext(gl);
};

PIXI.WebGLFastSpriteBatch.prototype.constructor = PIXI.WebGLFastSpriteBatch;
Expand Down Expand Up @@ -7865,7 +7871,7 @@ PIXI.WebGLFastSpriteBatch.prototype.flush = function()

// bind the current texture

if(!this.currentBaseTexture._glTextures[gl.id])PIXI.createWebGLTexture(this.currentBaseTexture, gl);
if(!this.currentBaseTexture._glTextures[gl.id])this.renderSession.renderer.updateTexture(this.currentBaseTexture, gl);

gl.bindTexture(gl.TEXTURE_2D, this.currentBaseTexture._glTextures[gl.id]);

Expand Down Expand Up @@ -9086,6 +9092,28 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
}
};

/**
* Removes everything from the renderer and optionally removes the Canvas DOM element.
*
* @method destroy
* @param [removeView=true] {boolean} Removes the Canvas element from the DOM.
*/
PIXI.CanvasRenderer.prototype.destroy = function(removeView)
{
if (typeof removeView === "undefined") { removeView = true; }

if (removeView && this.view.parent)
{
this.view.parent.removeChild(this.view);
}

this.view = null;
this.context = null;
this.maskManager = null;
this.renderSession = null;

};

/**
* Resizes the canvas view to the specified width and height
*
Expand Down
8 changes: 4 additions & 4 deletions build/custom/pixi.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 7557e4e

Please sign in to comment.