phaser/src/scale/index.js

51 lines
1.7 KiB
JavaScript
Raw Normal View History

/**
* @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}
*/
var Extend = require('../utils/object/Extend');
var CONST = require('./const');
/**
* @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
*/
var Scale = {
Center: require('./const/CENTER_CONST'),
2019-01-31 12:19:01 +00:00
Events: require('./events'),
Orientation: require('./const/ORIENTATION_CONST'),
ScaleManager: require('./ScaleManager'),
ScaleModes: require('./const/SCALE_MODE_CONST'),
Zoom: require('./const/ZOOM_CONST')
};
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);
module.exports = Scale;