2016-11-22 03:11:33 +00:00
|
|
|
require('./polyfills');
|
|
|
|
|
2017-01-16 22:43:46 +00:00
|
|
|
var CONST = require('./const');
|
|
|
|
var Extend = require('./utils/object/Extend');
|
|
|
|
|
2016-12-13 16:12:25 +00:00
|
|
|
// This object is exported globally
|
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
|
|
|
|
2016-12-13 16:12:25 +00:00
|
|
|
Game: require('./boot/Game'),
|
|
|
|
|
|
|
|
Event: require('./events/Event'),
|
|
|
|
EventDispatcher: require('./events/EventDispatcher'),
|
|
|
|
|
|
|
|
Math: require('./math'),
|
|
|
|
|
2016-12-22 01:32:21 +00:00
|
|
|
Geom: require('./geom'),
|
|
|
|
|
2016-12-13 16:12:25 +00:00
|
|
|
GameObjects: {
|
|
|
|
|
2016-12-22 01:32:21 +00:00
|
|
|
Factory: require('./gameobjects/FactoryContainer')
|
2016-12-13 16:12:25 +00:00
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
Loader: {
|
|
|
|
|
|
|
|
ImageFile: require('./loader/filetypes/ImageFile')
|
|
|
|
|
2016-12-15 17:15:47 +00:00
|
|
|
},
|
|
|
|
|
2017-01-11 04:38:15 +00:00
|
|
|
Sound: require('./sound'),
|
|
|
|
|
2016-12-15 17:15:47 +00:00
|
|
|
Utils: {
|
|
|
|
|
|
|
|
Array: require('./utils/array/'),
|
2016-12-20 16:34:47 +00:00
|
|
|
Objects: require('./utils/object/')
|
2016-12-15 17:15:47 +00:00
|
|
|
|
2016-12-13 16:12:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
// Required, but don't need Phaser level exports
|
|
|
|
|
2017-01-24 12:55:45 +00:00
|
|
|
require('./gameobjects/blitter/BlitterFactory');
|
2016-12-13 16:12:25 +00:00
|
|
|
require('./gameobjects/image/ImageFactory');
|
|
|
|
require('./gameobjects/container/ContainerFactory');
|
|
|
|
|
2017-01-16 22:43:46 +00:00
|
|
|
// Merge in the consts
|
|
|
|
|
|
|
|
Phaser = Extend(false, Phaser, CONST);
|
|
|
|
|
2016-12-13 16:12:25 +00:00
|
|
|
// Export it
|
|
|
|
|
|
|
|
module.exports = Phaser;
|
|
|
|
|
|
|
|
global.Phaser = Phaser;
|
2017-01-05 17:06:57 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* “Sometimes, the elegant implementation is just a function.
|
|
|
|
* Not a method. Not a class. Not a framework. Just a function.”
|
|
|
|
* - John Carmack
|
|
|
|
*/
|