2018-02-12 16:01:20 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
2023-01-02 17:36:27 +00:00
|
|
|
* @copyright 2013-2023 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
|
|
|
*/
|
|
|
|
|
2023-04-11 16:02:09 +00:00
|
|
|
require('./polyfills/requestVideoFrame');
|
|
|
|
|
2017-01-16 22:43:46 +00:00
|
|
|
var CONST = require('./const');
|
|
|
|
var Extend = require('./utils/object/Extend');
|
|
|
|
|
2018-01-31 13:54:44 +00:00
|
|
|
/**
|
2018-04-13 16:05:59 +00:00
|
|
|
* @namespace Phaser
|
|
|
|
*/
|
2016-11-22 03:11:33 +00:00
|
|
|
|
2016-12-13 16:12:25 +00:00
|
|
|
var Phaser = {
|
2016-11-22 03:11:33 +00:00
|
|
|
|
2018-01-18 05:19:17 +00:00
|
|
|
Actions: require('./actions'),
|
2019-01-15 14:37:40 +00:00
|
|
|
Animations: require('./animations'),
|
2019-05-09 16:13:25 +00:00
|
|
|
BlendModes: require('./renderer/BlendModes'),
|
2018-01-18 05:19:17 +00:00
|
|
|
Cache: require('./cache'),
|
|
|
|
Cameras: require('./cameras'),
|
2019-01-15 16:17:04 +00:00
|
|
|
Core: require('./core'),
|
2018-01-16 22:28:29 +00:00
|
|
|
Class: require('./utils/Class'),
|
2018-01-18 05:19:17 +00:00
|
|
|
Create: require('./create'),
|
|
|
|
Curves: require('./curves'),
|
2018-01-30 00:55:27 +00:00
|
|
|
Data: require('./data'),
|
2018-01-18 05:19:17 +00:00
|
|
|
Display: require('./display'),
|
|
|
|
DOM: require('./dom'),
|
2018-05-11 13:05:34 +00:00
|
|
|
Events: require('./events'),
|
2023-02-16 23:49:35 +00:00
|
|
|
FX: require('./fx'),
|
2019-01-15 16:17:04 +00:00
|
|
|
Game: require('./core/Game'),
|
2018-01-18 05:19:17 +00:00
|
|
|
GameObjects: require('./gameobjects'),
|
|
|
|
Geom: require('./geom'),
|
|
|
|
Input: require('./input'),
|
|
|
|
Loader: require('./loader'),
|
|
|
|
Math: require('./math'),
|
|
|
|
Physics: require('./physics'),
|
2018-05-10 16:14:52 +00:00
|
|
|
Plugins: require('./plugins'),
|
2018-03-05 14:29:48 +00:00
|
|
|
Renderer: require('./renderer'),
|
2019-01-29 15:42:27 +00:00
|
|
|
Scale: require('./scale'),
|
2019-05-09 16:13:25 +00:00
|
|
|
ScaleModes: require('./renderer/ScaleModes'),
|
2018-01-16 22:28:29 +00:00
|
|
|
Scene: require('./scene/Scene'),
|
2018-01-18 05:19:17 +00:00
|
|
|
Scenes: require('./scene'),
|
|
|
|
Structs: require('./structs'),
|
|
|
|
Textures: require('./textures'),
|
2018-02-07 17:10:01 +00:00
|
|
|
Tilemaps: require('./tilemaps'),
|
2018-01-18 05:19:17 +00:00
|
|
|
Time: require('./time'),
|
|
|
|
Tweens: require('./tweens'),
|
|
|
|
Utils: require('./utils')
|
2016-12-13 16:12:25 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2020-09-30 14:09:57 +00:00
|
|
|
// Merge in the optional plugins and WebGL only features
|
|
|
|
|
2019-04-24 11:23:21 +00:00
|
|
|
if (typeof FEATURE_SOUND)
|
|
|
|
{
|
|
|
|
Phaser.Sound = require('./sound');
|
|
|
|
}
|
|
|
|
|
2018-08-23 14:30:21 +00:00
|
|
|
if (typeof PLUGIN_CAMERA3D)
|
|
|
|
{
|
|
|
|
Phaser.Cameras.Sprite3D = require('../plugins/camera3d/src');
|
|
|
|
Phaser.GameObjects.Sprite3D = require('../plugins/camera3d/src/sprite3d/Sprite3D');
|
|
|
|
Phaser.GameObjects.Factories.Sprite3D = require('../plugins/camera3d/src/sprite3d/Sprite3DFactory');
|
|
|
|
Phaser.GameObjects.Creators.Sprite3D = require('../plugins/camera3d/src/sprite3d/Sprite3DCreator');
|
|
|
|
}
|
|
|
|
|
2018-09-20 13:14:29 +00:00
|
|
|
if (typeof PLUGIN_FBINSTANT)
|
|
|
|
{
|
|
|
|
Phaser.FacebookInstantGamesPlugin = require('../plugins/fbinstant/src/FacebookInstantGamesPlugin');
|
|
|
|
}
|
|
|
|
|
2017-01-16 22:43:46 +00:00
|
|
|
// Merge in the consts
|
|
|
|
|
|
|
|
Phaser = Extend(false, Phaser, CONST);
|
|
|
|
|
2019-05-09 16:13:25 +00:00
|
|
|
/**
|
|
|
|
* The root types namespace.
|
2020-08-24 13:47:53 +00:00
|
|
|
*
|
2019-05-09 16:13:25 +00:00
|
|
|
* @namespace Phaser.Types
|
|
|
|
* @since 3.17.0
|
|
|
|
*/
|
|
|
|
|
2016-12-13 16:12:25 +00:00
|
|
|
// Export it
|
|
|
|
|
|
|
|
module.exports = Phaser;
|
|
|
|
|
2020-09-09 16:07:40 +00:00
|
|
|
global.Phaser = Phaser;
|
|
|
|
|
2017-01-05 17:06:57 +00:00
|
|
|
/*
|
2018-03-26 22:17:06 +00:00
|
|
|
* "Documentation is like pizza: when it is good, it is very, very good;
|
2017-04-05 00:15:53 +00:00
|
|
|
* and when it is bad, it is better than nothing."
|
|
|
|
* -- Dick Brandon
|
|
|
|
*/
|