2018-02-12 16:01:20 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
2022-02-28 14:29:51 +00:00
|
|
|
* @copyright 2022 Photon Storm Ltd.
|
2019-05-10 15:15:04 +00:00
|
|
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
2018-02-12 16:01:20 +00:00
|
|
|
*/
|
|
|
|
|
2018-03-30 13:38:58 +00:00
|
|
|
/**
|
2019-05-09 10:41:35 +00:00
|
|
|
* Global constants.
|
2020-07-13 10:25:27 +00:00
|
|
|
*
|
2018-03-30 13:38:58 +00:00
|
|
|
* @ignore
|
|
|
|
*/
|
|
|
|
|
2016-11-22 03:11:33 +00:00
|
|
|
var CONST = {
|
|
|
|
|
2018-02-09 13:46:04 +00:00
|
|
|
/**
|
|
|
|
* Phaser Release Version
|
2020-07-13 10:25:27 +00:00
|
|
|
*
|
2018-02-09 13:46:04 +00:00
|
|
|
* @name Phaser.VERSION
|
2019-02-12 15:01:54 +00:00
|
|
|
* @const
|
2018-02-09 13:46:04 +00:00
|
|
|
* @type {string}
|
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
2022-12-09 18:24:54 +00:00
|
|
|
VERSION: '3.60.0-beta.18',
|
2016-11-22 03:11:33 +00:00
|
|
|
|
2019-05-10 11:27:59 +00:00
|
|
|
BlendModes: require('./renderer/BlendModes'),
|
|
|
|
|
|
|
|
ScaleModes: require('./renderer/ScaleModes'),
|
|
|
|
|
2018-02-09 13:46:04 +00:00
|
|
|
/**
|
2020-09-22 16:00:02 +00:00
|
|
|
* This setting will auto-detect if the browser is capable of suppporting WebGL.
|
|
|
|
* If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.
|
2020-07-13 10:25:27 +00:00
|
|
|
*
|
2018-02-09 13:46:04 +00:00
|
|
|
* @name Phaser.AUTO
|
2019-02-12 15:01:54 +00:00
|
|
|
* @const
|
2020-11-23 10:22:13 +00:00
|
|
|
* @type {number}
|
2018-02-09 13:46:04 +00:00
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
2016-11-22 03:11:33 +00:00
|
|
|
AUTO: 0,
|
2018-02-09 13:46:04 +00:00
|
|
|
|
|
|
|
/**
|
2020-09-22 16:00:02 +00:00
|
|
|
* Forces Phaser to only use the Canvas Renderer, regardless if the browser supports
|
|
|
|
* WebGL or not.
|
2020-07-13 10:25:27 +00:00
|
|
|
*
|
2018-02-09 13:46:04 +00:00
|
|
|
* @name Phaser.CANVAS
|
2019-02-12 15:01:54 +00:00
|
|
|
* @const
|
2020-11-23 10:22:13 +00:00
|
|
|
* @type {number}
|
2018-02-09 13:46:04 +00:00
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
2016-11-22 03:11:33 +00:00
|
|
|
CANVAS: 1,
|
2018-02-09 13:46:04 +00:00
|
|
|
|
|
|
|
/**
|
2020-09-22 16:00:02 +00:00
|
|
|
* Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is
|
|
|
|
* no fallback to Canvas with this setting, so you should trap it and display a suitable
|
|
|
|
* message to the user.
|
2020-07-13 10:25:27 +00:00
|
|
|
*
|
2018-02-09 13:46:04 +00:00
|
|
|
* @name Phaser.WEBGL
|
2019-02-12 15:01:54 +00:00
|
|
|
* @const
|
2020-11-23 10:22:13 +00:00
|
|
|
* @type {number}
|
2018-02-09 13:46:04 +00:00
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
2017-03-21 20:25:15 +00:00
|
|
|
WEBGL: 2,
|
2018-02-09 13:46:04 +00:00
|
|
|
|
|
|
|
/**
|
2020-09-22 16:00:02 +00:00
|
|
|
* A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still
|
|
|
|
* absolutely relies on the DOM being present and available. This mode is meant for unit testing,
|
|
|
|
* not for running Phaser on the server, which is something you really shouldn't do.
|
2020-07-13 10:25:27 +00:00
|
|
|
*
|
2018-02-09 13:46:04 +00:00
|
|
|
* @name Phaser.HEADLESS
|
2019-02-12 15:01:54 +00:00
|
|
|
* @const
|
2020-11-23 10:22:13 +00:00
|
|
|
* @type {number}
|
2018-02-09 13:46:04 +00:00
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
2017-06-27 01:35:38 +00:00
|
|
|
HEADLESS: 3,
|
|
|
|
|
2018-02-09 13:46:04 +00:00
|
|
|
/**
|
|
|
|
* In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead
|
|
|
|
* to help you remember what the value is doing in your code.
|
2020-07-13 10:25:27 +00:00
|
|
|
*
|
2018-02-09 13:46:04 +00:00
|
|
|
* @name Phaser.FOREVER
|
2019-02-12 15:01:54 +00:00
|
|
|
* @const
|
2020-11-23 10:22:13 +00:00
|
|
|
* @type {number}
|
2018-02-09 13:46:04 +00:00
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
2017-08-02 16:06:27 +00:00
|
|
|
FOREVER: -1,
|
|
|
|
|
2018-02-09 13:46:04 +00:00
|
|
|
/**
|
|
|
|
* Direction constant.
|
2020-07-13 10:25:27 +00:00
|
|
|
*
|
2018-02-09 13:46:04 +00:00
|
|
|
* @name Phaser.NONE
|
2019-02-12 15:01:54 +00:00
|
|
|
* @const
|
2020-11-23 10:22:13 +00:00
|
|
|
* @type {number}
|
2018-02-09 13:46:04 +00:00
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
2017-06-27 01:35:38 +00:00
|
|
|
NONE: 4,
|
2018-02-09 13:46:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Direction constant.
|
2020-07-13 10:25:27 +00:00
|
|
|
*
|
2018-02-09 13:46:04 +00:00
|
|
|
* @name Phaser.UP
|
2019-02-12 15:01:54 +00:00
|
|
|
* @const
|
2020-11-23 10:22:13 +00:00
|
|
|
* @type {number}
|
2018-02-09 13:46:04 +00:00
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
2017-06-27 01:35:38 +00:00
|
|
|
UP: 5,
|
2018-02-09 13:46:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Direction constant.
|
2020-07-13 10:25:27 +00:00
|
|
|
*
|
2018-02-09 13:46:04 +00:00
|
|
|
* @name Phaser.DOWN
|
2019-02-12 15:01:54 +00:00
|
|
|
* @const
|
2020-11-23 10:22:13 +00:00
|
|
|
* @type {number}
|
2018-02-09 13:46:04 +00:00
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
2017-06-27 01:35:38 +00:00
|
|
|
DOWN: 6,
|
2018-02-09 13:46:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Direction constant.
|
2020-07-13 10:25:27 +00:00
|
|
|
*
|
2018-02-09 13:46:04 +00:00
|
|
|
* @name Phaser.LEFT
|
2019-02-12 15:01:54 +00:00
|
|
|
* @const
|
2020-11-23 10:22:13 +00:00
|
|
|
* @type {number}
|
2018-02-09 13:46:04 +00:00
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
2017-06-27 01:35:38 +00:00
|
|
|
LEFT: 7,
|
2018-02-09 13:46:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Direction constant.
|
2020-07-13 10:25:27 +00:00
|
|
|
*
|
2018-02-09 13:46:04 +00:00
|
|
|
* @name Phaser.RIGHT
|
2019-02-12 15:01:54 +00:00
|
|
|
* @const
|
2020-11-23 10:22:13 +00:00
|
|
|
* @type {number}
|
2018-02-09 13:46:04 +00:00
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
2020-10-02 08:48:44 +00:00
|
|
|
RIGHT: 8
|
2016-11-22 03:11:33 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = CONST;
|