Skip to content

Commit 7557e4e

Browse files
committed
Phaser 2.1.3
1 parent f3f022b commit 7557e4e

12 files changed

+192
-52
lines changed

build/custom/phaser-arcade-physics.js

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:26:25
10+
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:33:03
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -1068,7 +1068,11 @@ PIXI.DisplayObject.prototype.generateTexture = function(resolution, scaleMode, r
10681068
var bounds = this.getLocalBounds();
10691069

10701070
var renderTexture = new PIXI.RenderTexture(bounds.width | 0, bounds.height | 0, renderer, scaleMode, resolution);
1071-
renderTexture.render(this, new PIXI.Point(-bounds.x, -bounds.y) );
1071+
1072+
PIXI.DisplayObject._tempMatrix.tx = -bounds.x;
1073+
PIXI.DisplayObject._tempMatrix.ty = -bounds.y;
1074+
1075+
renderTexture.render(this, PIXI.DisplayObject._tempMatrix);
10721076

10731077
return renderTexture;
10741078
};
@@ -2634,6 +2638,7 @@ PIXI.Text.prototype.updateText = function()
26342638
this.context.strokeStyle = this.style.stroke;
26352639
this.context.lineWidth = this.style.strokeThickness;
26362640
this.context.textBaseline = 'alphabetic';
2641+
this.context.lineJoin = 'round';
26372642

26382643
var linePositionX;
26392644
var linePositionY;
@@ -7550,7 +7555,7 @@ PIXI.WebGLSpriteBatch.prototype.destroy = function()
75507555
* @class WebGLFastSpriteBatch
75517556
* @constructor
75527557
*/
7553-
PIXI.WebGLFastSpriteBatch = function()
7558+
PIXI.WebGLFastSpriteBatch = function(gl)
75547559
{
75557560
/**
75567561
* @property vertSize
@@ -7660,6 +7665,7 @@ PIXI.WebGLFastSpriteBatch = function()
76607665
*/
76617666
this.matrix = null;
76627667

7668+
this.setContext(gl);
76637669
};
76647670

76657671
PIXI.WebGLFastSpriteBatch.prototype.constructor = PIXI.WebGLFastSpriteBatch;
@@ -7895,7 +7901,7 @@ PIXI.WebGLFastSpriteBatch.prototype.flush = function()
78957901

78967902
// bind the current texture
78977903

7898-
if(!this.currentBaseTexture._glTextures[gl.id])PIXI.createWebGLTexture(this.currentBaseTexture, gl);
7904+
if(!this.currentBaseTexture._glTextures[gl.id])this.renderSession.renderer.updateTexture(this.currentBaseTexture, gl);
78997905

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

@@ -9116,6 +9122,28 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
91169122
}
91179123
};
91189124

9125+
/**
9126+
* Removes everything from the renderer and optionally removes the Canvas DOM element.
9127+
*
9128+
* @method destroy
9129+
* @param [removeView=true] {boolean} Removes the Canvas element from the DOM.
9130+
*/
9131+
PIXI.CanvasRenderer.prototype.destroy = function(removeView)
9132+
{
9133+
if (typeof removeView === "undefined") { removeView = true; }
9134+
9135+
if (removeView && this.view.parent)
9136+
{
9137+
this.view.parent.removeChild(this.view);
9138+
}
9139+
9140+
this.view = null;
9141+
this.context = null;
9142+
this.maskManager = null;
9143+
this.renderSession = null;
9144+
9145+
};
9146+
91199147
/**
91209148
* Resizes the canvas view to the specified width and height
91219149
*
@@ -11554,7 +11582,7 @@ PIXI.AbstractFilter.prototype.apply = function(frameBuffer)
1155411582
*
1155511583
* Phaser - http://phaser.io
1155611584
*
11557-
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:26:25
11585+
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:33:03
1155811586
*
1155911587
* By Richard Davey http://www.photonstorm.com @photonstorm
1156011588
*

build/custom/phaser-arcade-physics.min.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-ninja-physics.js

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:26:25
10+
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:33:03
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -1068,7 +1068,11 @@ PIXI.DisplayObject.prototype.generateTexture = function(resolution, scaleMode, r
10681068
var bounds = this.getLocalBounds();
10691069

10701070
var renderTexture = new PIXI.RenderTexture(bounds.width | 0, bounds.height | 0, renderer, scaleMode, resolution);
1071-
renderTexture.render(this, new PIXI.Point(-bounds.x, -bounds.y) );
1071+
1072+
PIXI.DisplayObject._tempMatrix.tx = -bounds.x;
1073+
PIXI.DisplayObject._tempMatrix.ty = -bounds.y;
1074+
1075+
renderTexture.render(this, PIXI.DisplayObject._tempMatrix);
10721076

10731077
return renderTexture;
10741078
};
@@ -2634,6 +2638,7 @@ PIXI.Text.prototype.updateText = function()
26342638
this.context.strokeStyle = this.style.stroke;
26352639
this.context.lineWidth = this.style.strokeThickness;
26362640
this.context.textBaseline = 'alphabetic';
2641+
this.context.lineJoin = 'round';
26372642

26382643
var linePositionX;
26392644
var linePositionY;
@@ -7550,7 +7555,7 @@ PIXI.WebGLSpriteBatch.prototype.destroy = function()
75507555
* @class WebGLFastSpriteBatch
75517556
* @constructor
75527557
*/
7553-
PIXI.WebGLFastSpriteBatch = function()
7558+
PIXI.WebGLFastSpriteBatch = function(gl)
75547559
{
75557560
/**
75567561
* @property vertSize
@@ -7660,6 +7665,7 @@ PIXI.WebGLFastSpriteBatch = function()
76607665
*/
76617666
this.matrix = null;
76627667

7668+
this.setContext(gl);
76637669
};
76647670

76657671
PIXI.WebGLFastSpriteBatch.prototype.constructor = PIXI.WebGLFastSpriteBatch;
@@ -7895,7 +7901,7 @@ PIXI.WebGLFastSpriteBatch.prototype.flush = function()
78957901

78967902
// bind the current texture
78977903

7898-
if(!this.currentBaseTexture._glTextures[gl.id])PIXI.createWebGLTexture(this.currentBaseTexture, gl);
7904+
if(!this.currentBaseTexture._glTextures[gl.id])this.renderSession.renderer.updateTexture(this.currentBaseTexture, gl);
78997905

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

@@ -9116,6 +9122,28 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
91169122
}
91179123
};
91189124

9125+
/**
9126+
* Removes everything from the renderer and optionally removes the Canvas DOM element.
9127+
*
9128+
* @method destroy
9129+
* @param [removeView=true] {boolean} Removes the Canvas element from the DOM.
9130+
*/
9131+
PIXI.CanvasRenderer.prototype.destroy = function(removeView)
9132+
{
9133+
if (typeof removeView === "undefined") { removeView = true; }
9134+
9135+
if (removeView && this.view.parent)
9136+
{
9137+
this.view.parent.removeChild(this.view);
9138+
}
9139+
9140+
this.view = null;
9141+
this.context = null;
9142+
this.maskManager = null;
9143+
this.renderSession = null;
9144+
9145+
};
9146+
91199147
/**
91209148
* Resizes the canvas view to the specified width and height
91219149
*
@@ -11554,7 +11582,7 @@ PIXI.AbstractFilter.prototype.apply = function(frameBuffer)
1155411582
*
1155511583
* Phaser - http://phaser.io
1155611584
*
11557-
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:26:25
11585+
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:33:03
1155811586
*
1155911587
* By Richard Davey http://www.photonstorm.com @photonstorm
1156011588
*

build/custom/phaser-ninja-physics.min.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-no-libs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:26:25
10+
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:33:03
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*

build/custom/phaser-no-physics.js

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:26:25
10+
* v2.1.3 "Ravinda" - Built: Thu Oct 23 2014 12:33:03
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -1068,7 +1068,11 @@ PIXI.DisplayObject.prototype.generateTexture = function(resolution, scaleMode, r
10681068
var bounds = this.getLocalBounds();
10691069

10701070
var renderTexture = new PIXI.RenderTexture(bounds.width | 0, bounds.height | 0, renderer, scaleMode, resolution);
1071-
renderTexture.render(this, new PIXI.Point(-bounds.x, -bounds.y) );
1071+
1072+
PIXI.DisplayObject._tempMatrix.tx = -bounds.x;
1073+
PIXI.DisplayObject._tempMatrix.ty = -bounds.y;
1074+
1075+
renderTexture.render(this, PIXI.DisplayObject._tempMatrix);
10721076

10731077
return renderTexture;
10741078
};
@@ -2634,6 +2638,7 @@ PIXI.Text.prototype.updateText = function()
26342638
this.context.strokeStyle = this.style.stroke;
26352639
this.context.lineWidth = this.style.strokeThickness;
26362640
this.context.textBaseline = 'alphabetic';
2641+
this.context.lineJoin = 'round';
26372642

26382643
var linePositionX;
26392644
var linePositionY;
@@ -7550,7 +7555,7 @@ PIXI.WebGLSpriteBatch.prototype.destroy = function()
75507555
* @class WebGLFastSpriteBatch
75517556
* @constructor
75527557
*/
7553-
PIXI.WebGLFastSpriteBatch = function()
7558+
PIXI.WebGLFastSpriteBatch = function(gl)
75547559
{
75557560
/**
75567561
* @property vertSize
@@ -7660,6 +7665,7 @@ PIXI.WebGLFastSpriteBatch = function()
76607665
*/
76617666
this.matrix = null;
76627667

7668+
this.setContext(gl);
76637669
};
76647670

76657671
PIXI.WebGLFastSpriteBatch.prototype.constructor = PIXI.WebGLFastSpriteBatch;
@@ -7895,7 +7901,7 @@ PIXI.WebGLFastSpriteBatch.prototype.flush = function()
78957901

78967902
// bind the current texture
78977903

7898-
if(!this.currentBaseTexture._glTextures[gl.id])PIXI.createWebGLTexture(this.currentBaseTexture, gl);
7904+
if(!this.currentBaseTexture._glTextures[gl.id])this.renderSession.renderer.updateTexture(this.currentBaseTexture, gl);
78997905

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

@@ -9116,6 +9122,28 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
91169122
}
91179123
};
91189124

9125+
/**
9126+
* Removes everything from the renderer and optionally removes the Canvas DOM element.
9127+
*
9128+
* @method destroy
9129+
* @param [removeView=true] {boolean} Removes the Canvas element from the DOM.
9130+
*/
9131+
PIXI.CanvasRenderer.prototype.destroy = function(removeView)
9132+
{
9133+
if (typeof removeView === "undefined") { removeView = true; }
9134+
9135+
if (removeView && this.view.parent)
9136+
{
9137+
this.view.parent.removeChild(this.view);
9138+
}
9139+
9140+
this.view = null;
9141+
this.context = null;
9142+
this.maskManager = null;
9143+
this.renderSession = null;
9144+
9145+
};
9146+
91199147
/**
91209148
* Resizes the canvas view to the specified width and height
91219149
*

build/custom/phaser-no-physics.min.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/pixi.js

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,11 @@ PIXI.DisplayObject.prototype.generateTexture = function(resolution, scaleMode, r
10381038
var bounds = this.getLocalBounds();
10391039

10401040
var renderTexture = new PIXI.RenderTexture(bounds.width | 0, bounds.height | 0, renderer, scaleMode, resolution);
1041-
renderTexture.render(this, new PIXI.Point(-bounds.x, -bounds.y) );
1041+
1042+
PIXI.DisplayObject._tempMatrix.tx = -bounds.x;
1043+
PIXI.DisplayObject._tempMatrix.ty = -bounds.y;
1044+
1045+
renderTexture.render(this, PIXI.DisplayObject._tempMatrix);
10421046

10431047
return renderTexture;
10441048
};
@@ -2604,6 +2608,7 @@ PIXI.Text.prototype.updateText = function()
26042608
this.context.strokeStyle = this.style.stroke;
26052609
this.context.lineWidth = this.style.strokeThickness;
26062610
this.context.textBaseline = 'alphabetic';
2611+
this.context.lineJoin = 'round';
26072612

26082613
var linePositionX;
26092614
var linePositionY;
@@ -7520,7 +7525,7 @@ PIXI.WebGLSpriteBatch.prototype.destroy = function()
75207525
* @class WebGLFastSpriteBatch
75217526
* @constructor
75227527
*/
7523-
PIXI.WebGLFastSpriteBatch = function()
7528+
PIXI.WebGLFastSpriteBatch = function(gl)
75247529
{
75257530
/**
75267531
* @property vertSize
@@ -7630,6 +7635,7 @@ PIXI.WebGLFastSpriteBatch = function()
76307635
*/
76317636
this.matrix = null;
76327637

7638+
this.setContext(gl);
76337639
};
76347640

76357641
PIXI.WebGLFastSpriteBatch.prototype.constructor = PIXI.WebGLFastSpriteBatch;
@@ -7865,7 +7871,7 @@ PIXI.WebGLFastSpriteBatch.prototype.flush = function()
78657871

78667872
// bind the current texture
78677873

7868-
if(!this.currentBaseTexture._glTextures[gl.id])PIXI.createWebGLTexture(this.currentBaseTexture, gl);
7874+
if(!this.currentBaseTexture._glTextures[gl.id])this.renderSession.renderer.updateTexture(this.currentBaseTexture, gl);
78697875

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

@@ -9086,6 +9092,28 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
90869092
}
90879093
};
90889094

9095+
/**
9096+
* Removes everything from the renderer and optionally removes the Canvas DOM element.
9097+
*
9098+
* @method destroy
9099+
* @param [removeView=true] {boolean} Removes the Canvas element from the DOM.
9100+
*/
9101+
PIXI.CanvasRenderer.prototype.destroy = function(removeView)
9102+
{
9103+
if (typeof removeView === "undefined") { removeView = true; }
9104+
9105+
if (removeView && this.view.parent)
9106+
{
9107+
this.view.parent.removeChild(this.view);
9108+
}
9109+
9110+
this.view = null;
9111+
this.context = null;
9112+
this.maskManager = null;
9113+
this.renderSession = null;
9114+
9115+
};
9116+
90899117
/**
90909118
* Resizes the canvas view to the specified width and height
90919119
*

build/custom/pixi.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)