phaser/v3/src/phaser.js

67 lines
1.2 KiB
JavaScript
Raw Normal View History

2016-11-22 03:11:33 +00:00
require('./polyfills');
var CONST = require('./const');
var Extend = require('./utils/object/Extend');
// This object is exported globally
2016-11-22 03:11:33 +00:00
var Phaser = {
2016-11-22 03:11:33 +00:00
DOM: require('./dom/'),
Game: require('./boot/Game'),
Event: require('./events/Event'),
EventDispatcher: require('./events/EventDispatcher'),
Math: require('./math'),
Geom: require('./geom'),
GameObjects: {
Factory: require('./gameobjects/FactoryContainer')
},
Loader: {
ImageFile: require('./loader/filetypes/ImageFile')
},
Sound: require('./sound'),
Utils: {
Array: require('./utils/array/'),
Objects: require('./utils/object/'),
String: require('./utils/string/')
}
};
// Required, but don't need Phaser level exports
2017-01-24 12:55:45 +00:00
require('./gameobjects/blitter/BlitterFactory');
require('./gameobjects/image/ImageFactory');
2017-01-24 18:08:56 +00:00
require('./gameobjects/sprite/SpriteFactory');
require('./gameobjects/container/ContainerFactory');
// Merge in the consts
Phaser = Extend(false, Phaser, CONST);
// 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
*/