2018-02-13 03:43:12 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
2019-01-15 16:20:22 +00:00
|
|
|
* @copyright 2019 Photon Storm Ltd.
|
2019-05-10 15:15:04 +00:00
|
|
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
2018-02-13 03:43:12 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
require('./polyfills');
|
|
|
|
|
|
|
|
var CONST = require('./const');
|
|
|
|
var Extend = require('./utils/object/Extend');
|
|
|
|
|
|
|
|
/**
|
2018-04-13 16:05:24 +00:00
|
|
|
* @namespace Phaser
|
|
|
|
*/
|
2018-02-13 03:43:12 +00:00
|
|
|
|
2019-05-09 10:45:01 +00:00
|
|
|
/**
|
|
|
|
* The root types namespace.
|
|
|
|
*
|
|
|
|
* @namespace Phaser.Types
|
|
|
|
* @since 3.17.0
|
|
|
|
*/
|
|
|
|
|
2018-02-13 03:43:12 +00:00
|
|
|
var Phaser = {
|
|
|
|
|
|
|
|
Actions: require('./actions'),
|
2019-01-15 14:37:40 +00:00
|
|
|
Animations: require('./animations'),
|
2018-02-13 03:43:12 +00:00
|
|
|
Cache: require('./cache'),
|
|
|
|
Cameras: require('./cameras'),
|
2019-01-15 16:17:04 +00:00
|
|
|
Core: require('./core'),
|
2018-02-13 03:43:12 +00:00
|
|
|
Class: require('./utils/Class'),
|
|
|
|
Create: require('./create'),
|
|
|
|
Curves: require('./curves'),
|
|
|
|
Data: require('./data'),
|
|
|
|
Display: require('./display'),
|
|
|
|
DOM: require('./dom'),
|
2018-05-16 13:53:15 +00:00
|
|
|
Events: require('./events'),
|
2019-01-23 23:46:45 +00:00
|
|
|
Game: require('./core/Game'),
|
2018-02-13 03:43:12 +00:00
|
|
|
GameObjects: require('./gameobjects'),
|
|
|
|
Geom: require('./geom'),
|
|
|
|
Input: require('./input'),
|
|
|
|
Loader: require('./loader'),
|
|
|
|
Math: require('./math'),
|
|
|
|
Physics: {
|
|
|
|
Arcade: require('./physics/arcade')
|
|
|
|
},
|
2018-05-16 13:53:15 +00:00
|
|
|
Plugins: require('./plugins'),
|
2019-01-29 15:42:27 +00:00
|
|
|
Scale: require('./scale'),
|
2018-02-13 03:43:12 +00:00
|
|
|
Scene: require('./scene/Scene'),
|
|
|
|
Scenes: require('./scene'),
|
|
|
|
Structs: require('./structs'),
|
|
|
|
Textures: require('./textures'),
|
|
|
|
Tilemaps: require('./tilemaps'),
|
|
|
|
Time: require('./time'),
|
|
|
|
Tweens: require('./tweens'),
|
|
|
|
Utils: require('./utils')
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
// Merge in the consts
|
|
|
|
|
|
|
|
Phaser = Extend(false, Phaser, CONST);
|
|
|
|
|
2019-04-24 11:23:21 +00:00
|
|
|
if (typeof FEATURE_SOUND)
|
|
|
|
{
|
|
|
|
Phaser.Sound = require('./sound');
|
|
|
|
}
|
|
|
|
|
2018-02-13 03:43:12 +00:00
|
|
|
// Export it
|
|
|
|
|
|
|
|
module.exports = Phaser;
|
|
|
|
|
|
|
|
global.Phaser = Phaser;
|
|
|
|
|
|
|
|
/*
|
2018-04-13 16:05:24 +00:00
|
|
|
* "Documentation is like pizza: when it is good, it is very, very good;
|
2018-02-13 03:43:12 +00:00
|
|
|
* and when it is bad, it is better than nothing."
|
|
|
|
* -- Dick Brandon
|
|
|
|
*/
|