Skip to content

Commit e0fdc33

Browse files
committed
SM mock
1 parent 94540e1 commit e0fdc33

1 file changed

Lines changed: 72 additions & 0 deletions

File tree

src/boot/ScaleManager.js

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
* @author Richard Davey <rich@photonstorm.com>
3+
* @copyright 2018 Photon Storm Ltd.
4+
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
5+
*/
6+
7+
var Class = require('../utils/Class');
8+
var GetValue = require('../utils/object/GetValue');
9+
10+
/*
11+
12+
scale: {
13+
width: 800,
14+
height: 600,
15+
resolution: window.devicePixelRatio,
16+
},
17+
18+
Canvas width / height in the element
19+
Canvas CSS width / height in the style
20+
21+
Detect orientation
22+
Lock orientation (Android only?)
23+
Full-screen support
24+
25+
Scale Mode -
26+
27+
28+
*/
29+
30+
/**
31+
* @classdesc
32+
* [description]
33+
*
34+
* @class ScaleManager
35+
* @memberOf Phaser.Boot
36+
* @constructor
37+
* @since 3.12.0
38+
*
39+
* @param {Phaser.Game} game - A reference to the Phaser.Game instance.
40+
* @param {ScaleManagerConfig} config
41+
*/
42+
var ScaleManager = new Class({
43+
44+
initialize:
45+
46+
function ScaleManager (game, config)
47+
{
48+
/**
49+
* A reference to the Phaser.Game instance.
50+
*
51+
* @name Phaser.Boot.ScaleManager#game
52+
* @type {Phaser.Game}
53+
* @readOnly
54+
* @since 3.12.0
55+
*/
56+
this.game = game;
57+
},
58+
59+
/**
60+
* Destroys the ScaleManager.
61+
*
62+
* @method Phaser.Boot.ScaleManager#destroy
63+
* @since 3.12.0
64+
*/
65+
destroy: function ()
66+
{
67+
this.game = null;
68+
}
69+
70+
});
71+
72+
module.exports = ScaleManager;

0 commit comments

Comments
 (0)