Updates across the board moving Stage.canvas to Game.canvas

This commit is contained in:
photonstorm
2014-02-13 12:55:58 +00:00
parent 0786e86ee5
commit e9fb8f6389
8 changed files with 24 additions and 23 deletions
+2 -2
View File
@@ -532,7 +532,7 @@ Phaser.Game.prototype = {
this.renderType = Phaser.CANVAS;
}
this.renderer = new PIXI.CanvasRenderer(this.width, this.height, this.stage.canvas, this.transparent);
this.renderer = new PIXI.CanvasRenderer(this.width, this.height, this.canvas, this.transparent);
Phaser.Canvas.setSmoothingEnabled(this.renderer.context, this.antialias);
this.canvas = this.renderer.view;
this.context = this.renderer.context;
@@ -546,7 +546,7 @@ Phaser.Game.prototype = {
{
// They requested WebGL, and their browser supports it
this.renderType = Phaser.WEBGL;
this.renderer = new PIXI.WebGLRenderer(this.width, this.height, this.stage.canvas, this.transparent, this.antialias);
this.renderer = new PIXI.WebGLRenderer(this.width, this.height, this.canvas, this.transparent, this.antialias);
this.canvas = this.renderer.view;
this.context = null;
}
+2 -2
View File
@@ -62,8 +62,8 @@ Phaser.Stage = function (game, width, height) {
}
else
{
this.canvas = Phaser.Canvas.create(width, height);
this.canvas.style['-webkit-full-screen'] = 'width: 100%; height: 100%';
this.game.canvas = Phaser.Canvas.create(width, height);
this.game.canvas.style['-webkit-full-screen'] = 'width: 100%; height: 100%';
}
};
+1
View File
@@ -334,6 +334,7 @@ Phaser.StateManager.prototype = {
this.states[key].load = this.game.load;
this.states[key].math = this.game.math;
this.states[key].sound = this.game.sound;
this.states[key].scale = this.game.scale;
this.states[key].stage = this.game.stage;
this.states[key].time = this.game.time;
this.states[key].tweens = this.game.tweens;