2019-01-29 15:42:27 +00:00
|
|
|
/**
|
2024-02-19 17:12:18 +00:00
|
|
|
* @author Richard Davey <rich@phaser.io>
|
|
|
|
* @copyright 2013-2024 Phaser Studio Inc.
|
2019-05-10 15:15:04 +00:00
|
|
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
2019-01-29 15:42:27 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
var Extend = require('../utils/object/Extend');
|
2019-01-31 11:11:35 +00:00
|
|
|
var CONST = require('./const');
|
2019-01-29 15:42:27 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @namespace Phaser.Scale
|
2022-02-28 14:29:51 +00:00
|
|
|
*
|
2019-02-04 11:45:17 +00:00
|
|
|
* @borrows Phaser.Scale.Center.NO_CENTER as NO_CENTER
|
|
|
|
* @borrows Phaser.Scale.Center.CENTER_BOTH as CENTER_BOTH
|
|
|
|
* @borrows Phaser.Scale.Center.CENTER_HORIZONTALLY as CENTER_HORIZONTALLY
|
|
|
|
* @borrows Phaser.Scale.Center.CENTER_VERTICALLY as CENTER_VERTICALLY
|
2022-02-28 14:29:51 +00:00
|
|
|
*
|
2019-02-04 11:45:17 +00:00
|
|
|
* @borrows Phaser.Scale.Orientation.LANDSCAPE as LANDSCAPE
|
|
|
|
* @borrows Phaser.Scale.Orientation.PORTRAIT as PORTRAIT
|
2022-02-28 14:29:51 +00:00
|
|
|
*
|
2019-02-04 11:45:17 +00:00
|
|
|
* @borrows Phaser.Scale.ScaleModes.NONE as NONE
|
|
|
|
* @borrows Phaser.Scale.ScaleModes.WIDTH_CONTROLS_HEIGHT as WIDTH_CONTROLS_HEIGHT
|
|
|
|
* @borrows Phaser.Scale.ScaleModes.HEIGHT_CONTROLS_WIDTH as HEIGHT_CONTROLS_WIDTH
|
|
|
|
* @borrows Phaser.Scale.ScaleModes.FIT as FIT
|
|
|
|
* @borrows Phaser.Scale.ScaleModes.ENVELOP as ENVELOP
|
|
|
|
* @borrows Phaser.Scale.ScaleModes.RESIZE as RESIZE
|
2022-02-28 14:29:51 +00:00
|
|
|
*
|
2019-02-04 11:45:17 +00:00
|
|
|
* @borrows Phaser.Scale.Zoom.NO_ZOOM as NO_ZOOM
|
|
|
|
* @borrows Phaser.Scale.Zoom.ZOOM_2X as ZOOM_2X
|
|
|
|
* @borrows Phaser.Scale.Zoom.ZOOM_4X as ZOOM_4X
|
|
|
|
* @borrows Phaser.Scale.Zoom.MAX_ZOOM as MAX_ZOOM
|
2019-01-29 15:42:27 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
var Scale = {
|
|
|
|
|
2019-01-31 11:11:35 +00:00
|
|
|
Center: require('./const/CENTER_CONST'),
|
2019-01-31 12:19:01 +00:00
|
|
|
Events: require('./events'),
|
2019-01-31 11:11:35 +00:00
|
|
|
Orientation: require('./const/ORIENTATION_CONST'),
|
|
|
|
ScaleManager: require('./ScaleManager'),
|
|
|
|
ScaleModes: require('./const/SCALE_MODE_CONST'),
|
|
|
|
Zoom: require('./const/ZOOM_CONST')
|
2019-01-29 15:42:27 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2019-01-31 11:11:35 +00:00
|
|
|
Scale = Extend(false, Scale, CONST.CENTER);
|
|
|
|
Scale = Extend(false, Scale, CONST.ORIENTATION);
|
|
|
|
Scale = Extend(false, Scale, CONST.SCALE_MODE);
|
|
|
|
Scale = Extend(false, Scale, CONST.ZOOM);
|
2019-01-29 15:42:27 +00:00
|
|
|
|
|
|
|
module.exports = Scale;
|