mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
New Scale Manager stub added. Removes all Scale Manager handling from Phaser! But saves 75KB in the process. If you know you don't need to scale the Phaser canvas, or are handling that externally, then you can safely stub it out in a custom build.
This commit is contained in:
parent
c1d0ec0f34
commit
884acb0616
1 changed files with 28 additions and 0 deletions
28
src/stubs/ScaleManager.js
Normal file
28
src/stubs/ScaleManager.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2015 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* This is a stub for the Phaser ScaleManager.
|
||||
* It allows you to exclude the default Scale Manager from your build, without making Game crash.
|
||||
*/
|
||||
|
||||
Phaser.ScaleManager = function () {
|
||||
|
||||
/**
|
||||
* The bounds of the scaled game. The x/y will match the offset of the canvas element and the width/height the scaled width and height.
|
||||
* @property {Phaser.Rectangle} bounds
|
||||
* @readonly
|
||||
*/
|
||||
this.bounds = new Phaser.Rectangle();
|
||||
|
||||
};
|
||||
|
||||
Phaser.ScaleManager.prototype.boot = function () {};
|
||||
Phaser.ScaleManager.prototype.preUpdate = function () {};
|
||||
Phaser.ScaleManager.prototype.pauseUpdate = function () {};
|
||||
Phaser.ScaleManager.prototype.destroy = function () {};
|
||||
|
||||
Phaser.ScaleManager.prototype.constructor = Phaser.ScaleManager;
|
Loading…
Reference in a new issue