mirror of
https://github.com/wassname/phaser.git
synced 2026-08-08 11:23:41 +08:00
Updates across the board moving Stage.canvas to Game.canvas
This commit is contained in:
+2
-2
@@ -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
@@ -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%';
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user