-
Notifications
You must be signed in to change notification settings - Fork 7.1k
/
Copy pathCENTER_CONST.js
80 lines (72 loc) · 2.32 KB
/
CENTER_CONST.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
* @author Richard Davey <[email protected]>
* @copyright 2013-2025 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* Phaser Scale Manager constants for centering the game canvas.
*
* @namespace Phaser.Scale.Center
* @memberof Phaser.Scale
* @since 3.16.0
*/
/**
* Phaser Scale Manager constants for centering the game canvas.
*
* To find out what each mode does please see [Phaser.Scale.Center]{@link Phaser.Scale.Center}.
*
* @typedef {Phaser.Scale.Center} Phaser.Scale.CenterType
* @memberof Phaser.Scale
* @since 3.16.0
*/
module.exports = {
/**
* The game canvas is not centered within the parent by Phaser.
* You can still center it yourself via CSS.
*
* @name Phaser.Scale.Center.NO_CENTER
* @type {number}
* @const
* @since 3.16.0
*/
NO_CENTER: 0,
/**
* The game canvas is centered both horizontally and vertically within the parent.
* To do this, the parent has to have a bounds that can be calculated and not be empty.
*
* Centering is achieved by setting the margin left and top properties of the
* game canvas, and does not factor in any other CSS styles you may have applied.
*
* @name Phaser.Scale.Center.CENTER_BOTH
* @type {number}
* @const
* @since 3.16.0
*/
CENTER_BOTH: 1,
/**
* The game canvas is centered horizontally within the parent.
* To do this, the parent has to have a bounds that can be calculated and not be empty.
*
* Centering is achieved by setting the margin left and top properties of the
* game canvas, and does not factor in any other CSS styles you may have applied.
*
* @name Phaser.Scale.Center.CENTER_HORIZONTALLY
* @type {number}
* @const
* @since 3.16.0
*/
CENTER_HORIZONTALLY: 2,
/**
* The game canvas is centered both vertically within the parent.
* To do this, the parent has to have a bounds that can be calculated and not be empty.
*
* Centering is achieved by setting the margin left and top properties of the
* game canvas, and does not factor in any other CSS styles you may have applied.
*
* @name Phaser.Scale.Center.CENTER_VERTICALLY
* @type {number}
* @const
* @since 3.16.0
*/
CENTER_VERTICALLY: 3
};