diff --git a/dist/es5.js b/dist/es5.js index f986f28..19541f7 100644 --- a/dist/es5.js +++ b/dist/es5.js @@ -1,2 +1,2348 @@ -!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var r=n(1),o=i(r),u=n(51),a=i(u),s=n(52),c=i(s),f=n(54),l=i(f),d=n(57),h=i(d),_=n(58),y=i(_),p=n(55),m=i(p),v=n(53),g={Game:o["default"],Entity:a["default"],Sprite:l["default"],Rect:h["default"],Vector2D:c["default"],Color:y["default"],ImageLoader:m["default"]},x={Input:{Keys:v.KeyConsts}};window.MomentumEngine={Classes:g,Consts:x}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=i(r),u=n(14),a=i(u),s=n(15),c=i(s),f=n(19),l=i(f),d=n(44),h=i(d),_=n(51),y=i(_),p=n(53),m=i(p),v=function(t){function e(t){(0,a["default"])(this,e);var n=(0,l["default"])(this,(0,o["default"])(e).call(this));if(t=t||{},t.inputs=t.inputs||{},!t.canvas)throw new Error("MomentumEngine.Classes.Game must be constructed with a canvas");if(n.canvas=t.canvas,!t.width)throw new Error("MomentumEngine.Classes.Game must be constructed with canvas width");if(n.width=t.width,!t.height)throw new Error("MomentumEngine.Classes.Game must be constructed with canvas height");if(n.height=t.height,n.desiredFps=t.desiredFps||60,t.fixRatio){var i=window.devicePixelRatio,r=0;"undefined"!=typeof ejecta?r=1:(n.context=n.canvas.getContext("2d"),r=n.context.webkitBackingStorePixelRatio||n.context.mozBackingStorePixelRatio||n.context.msBackingStorePixelRatio||n.context.oBackingStorePixelRatio||n.context.backingStorePixelRatio||1),n.scale=i/r,n.canvas.width=n.width*n.scale,n.canvas.height=n.height*n.scale,n.canvas.style.width=n.width+"px",n.canvas.style.height=n.height+"px","undefined"!=typeof ejecta&&(n.context=n.canvas.getContext("2d")),n.context.scale(i,i)}else n.canvas.width=n.width,n.canvas.height=n.height,n.context=n.canvas.getContext("2d");return"undefined"!=typeof n.context.imageSmoothingEnabled&&(n.context.imageSmoothingEnabled=t.imageSmoothing||!1),n.frameCounter=0,n.inputs={},t.inputs.keyboard&&(n.inputs.keyboard=new m["default"](n)),n._game=n,n._lastFrameTimestamp=0,n._wantPause=!0,n}return(0,h["default"])(e,t),(0,c["default"])(e,[{key:"step",value:function(t){this.frameCounter++,this._updateEntity(t),this._renderEntity()}},{key:"start",value:function(){var t=this;if(!t._wantPause)return console.log("MomentumEngine.Classes.Game.start called, game instance is already started"),!1;t._wantPause=!1,t._wantPause=!1;var e=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/t.desiredFps)}}();t._lastFrameTimestamp=+new Date,t.startTime=t._lastFrameTimestamp;var n=function i(){if(!t._wantPause){var n=+new Date,r=n-t._lastFrameTimestamp;r=Math.min(r,1e3/t.desiredFps),t._lastFrameTimestamp=n,t.step(r),e(i)}};return n(),!0}},{key:"pause",value:function(){return this._wantPause?(console.log("MomentumEngine.Classes.Game.pause called, game instance is already paused"),!1):(this._wantPause=!0,!0)}}]),e}(y["default"]);e["default"]=v},function(t,e,n){t.exports={"default":n(3),__esModule:!0}},function(t,e,n){n(4),t.exports=n(10).Object.getPrototypeOf},function(t,e,n){var i=n(5);n(7)("getPrototypeOf",function(t){return function(e){return t(i(e))}})},function(t,e,n){var i=n(6);t.exports=function(t){return Object(i(t))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(8),r=n(10),o=n(13);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],u={};u[t]=e(n),i(i.S+i.F*o(function(){n(1)}),"Object",u)}},function(t,e,n){var i=n(9),r=n(10),o=n(11),u="prototype",a=function(t,e,n){var s,c,f,l=t&a.F,d=t&a.G,h=t&a.S,_=t&a.P,y=t&a.B,p=t&a.W,m=d?r:r[e]||(r[e]={}),v=d?i:h?i[e]:(i[e]||{})[u];d&&(n=e);for(s in n)c=!l&&v&&s in v,c&&s in m||(f=c?v[s]:n[s],m[s]=d&&"function"!=typeof v[s]?n[s]:y&&c?o(f,i):p&&v[s]==f?function(t){var e=function(e){return this instanceof t?new t(e):t(e)};return e[u]=t[u],e}(f):_&&"function"==typeof f?o(Function.call,f):f,_&&((m[u]||(m[u]={}))[s]=f))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,t.exports=a},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(12);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e){"use strict";e.__esModule=!0,e["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var r=n(16),o=i(r);e["default"]=function(){function t(t,e){for(var n=0;nr;)U(t,n=i[r++],e[n]);return t},L=function(t,e){return void 0===e?P(t):I(P(t),e)},B=function(t){var e=O.call(this,t);return e||!o(this,t)||!o(j,t)||o(this,k)&&this[k][t]?e:!0},G=function(t,e){var n=b(t=g(t),e);return!n||!o(j,e)||o(t,k)&&t[k][e]||(n.enumerable=!0),n},z=function(t){for(var e,n=S(g(t)),i=[],r=0;n.length>r;)o(j,e=n[r++])||e==k||i.push(e);return i},K=function(t){for(var e,n=S(g(t)),i=[],r=0;n.length>r;)o(j,e=n[r++])&&i.push(j[e]);return i},W=function(t){if(void 0!==t&&!T(t)){for(var e,n,i=[t],r=1,o=arguments;o.length>r;)i.push(o[r++]);return e=i[1],"function"==typeof e&&(n=e),(n||!m(e))&&(e=function(t,e){return n&&(e=n.call(this,t,e)),T(e)?void 0:e}),i[1]=e,A.apply(E,i)}},q=c(function(){var t=M();return"[null]"!=A([t])||"{}"!=A({a:t})||"{}"!=A(Object(t))});D||(M=function(){if(T(this))throw TypeError("Symbol is not a constructor");return F(d(arguments.length>0?arguments[0]:void 0))},s(M.prototype,"toString",function(){return this._k}),T=function(t){return t instanceof M},i.create=L,i.isEnum=B,i.getDesc=G,i.setDesc=U,i.setDescs=I,i.getNames=y.get=z,i.getSymbols=K,u&&!n(42)&&s(N,"propertyIsEnumerable",B,!0));var J={"for":function(t){return o(R,t+="")?R[t]:R[t]=M(t)},keyFor:function(t){return _(R,t)},useSetter:function(){C=!0},useSimple:function(){C=!1}};i.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(t){var e=h(t);J[t]=D?e:F(e)}),C=!0,a(a.G+a.W,{Symbol:M}),a(a.S,"Symbol",J),a(a.S+a.F*!D,"Object",{create:L,defineProperty:U,defineProperties:I,getOwnPropertyDescriptor:G,getOwnPropertyNames:z,getOwnPropertySymbols:K}),E&&a(a.S+a.F*(!D||q),"JSON",{stringify:W}),l(M,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){t.exports=!n(13)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){t.exports=n(27)},function(t,e,n){var i=n(18),r=n(28);t.exports=n(25)?function(t,e,n){return i.setDesc(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(9),r="__core-js_shared__",o=i[r]||(i[r]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e,n){var i=n(18).setDesc,r=n(24),o=n(31)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){var i=n(29)("wks"),r=n(32),o=n(9).Symbol;t.exports=function(t){return i[t]||(i[t]=o&&o[t]||(o||r)("Symbol."+t))}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e,n){var i=n(18),r=n(34);t.exports=function(t,e){for(var n,o=r(t),u=i.getKeys(o),a=u.length,s=0;a>s;)if(o[n=u[s++]]===e)return n}},function(t,e,n){var i=n(35),r=n(6);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(36);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(34),r=n(18).getNames,o={}.toString,u="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return r(t)}catch(e){return u.slice()}};t.exports.get=function(t){return u&&"[object Window]"==o.call(t)?a(t):r(i(t))}},function(t,e,n){var i=n(18);t.exports=function(t){var e=i.getKeys(t),n=i.getSymbols;if(n)for(var r,o=n(t),u=i.isEnum,a=0;o.length>a;)u.call(t,r=o[a++])&&e.push(r);return e}},function(t,e,n){var i=n(36);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){var i=n(41);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=!0},function(t,e){},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var r=n(45),o=i(r),u=n(49),a=i(u),s=n(20),c=i(s);e["default"]=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":(0,c["default"])(e)));t.prototype=(0,a["default"])(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(o["default"]?(0,o["default"])(t,e):t.__proto__=e)}},function(t,e,n){t.exports={"default":n(46),__esModule:!0}},function(t,e,n){n(47),t.exports=n(10).Object.setPrototypeOf},function(t,e,n){var i=n(8);i(i.S,"Object",{setPrototypeOf:n(48).set})},function(t,e,n){var i=n(18).getDesc,r=n(41),o=n(40),u=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(11)(Function.call,i(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(o){e=!0}return function(t,n){return u(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:u}},function(t,e,n){t.exports={"default":n(50),__esModule:!0}},function(t,e,n){var i=n(18);t.exports=function(t,e){return i.create(t,e)}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(14),o=i(r),u=n(15),a=i(u),s=n(52),c=i(s),f=function(){function t(e,n){(0,o["default"])(this,t),this.pos=new c["default"](e||0,n||0),this.state={},this.children=[],this._calculatedPos=this.pos.clone(),this._lastCalculated=0,this._game=null,this._parent=null}return(0,a["default"])(t,[{key:"createChildEntity",value:function(){var e=new t;return e._updateGame(this._game),e._parent=this,this.children.push(e),e}},{key:"addChildEntity",value:function(t){return t._updateGame(this._game),t._parent=this,this.children.push(t),t}},{key:"detachChildEntity",value:function(t){for(var e=0;ee.pos.x&&t.pos.ye.pos.y}}]),t}();e["default"]=f},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=i(r),u=n(14),a=i(u),s=n(15),c=i(s),f=n(19),l=i(f),d=n(44),h=i(d),_=n(51),y=i(_),p=n(52),m=i(p),v=n(56),g=i(v),x=function(t){function e(t,n,i,r,u){(0,a["default"])(this,e);var s=(0,l["default"])(this,(0,o["default"])(e).call(this,t,n));return s.size=new m["default"](i,r),s.color=u,s}return(0,h["default"])(e,t),(0,c["default"])(e,[{key:"isCollidingWith",value:function(t){return t instanceof e?g["default"].AABB(this,t):void 0}},{key:"render",value:function(){return this._game?(this._game.context.fillStyle=this.color.toString(),this._game.context.fillRect(this._calculatedPos.x,this._calculatedPos.y,this.size.x,this.size.y),!0):!1}}]),e}(y["default"]);e["default"]=x},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(14),u=i(o),a=n(15),s=i(a),c=function(){function t(e,n,i,r){(0,u["default"])(this,t),this.r=e||0,this.g=n||0,this.b=i||0,this.a=r||1}return(0,s["default"])(t,[{key:"toString",value:function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.a+")"}},{key:"toHex",value:function(){return"#"+(r<<16|g<<8|b).toString(16)}}]),t}();e["default"]=c}]); +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; +/******/ +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _game = __webpack_require__(1); + + var _game2 = _interopRequireDefault(_game); + + var _emitter = __webpack_require__(66); + + var _emitter2 = _interopRequireDefault(_emitter); + + var _entity = __webpack_require__(63); + + var _entity2 = _interopRequireDefault(_entity); + + var _vector2d = __webpack_require__(64); + + var _vector2d2 = _interopRequireDefault(_vector2d); + + var _sprite = __webpack_require__(67); + + var _sprite2 = _interopRequireDefault(_sprite); + + var _rect = __webpack_require__(70); + + var _rect2 = _interopRequireDefault(_rect); + + var _color = __webpack_require__(71); + + var _color2 = _interopRequireDefault(_color); + + var _imageloader = __webpack_require__(68); + + var _imageloader2 = _interopRequireDefault(_imageloader); + + var _keyboardinput = __webpack_require__(65); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Classes = { + Game: _game2.default, + Emitter: _emitter2.default, + Entity: _entity2.default, + Sprite: _sprite2.default, + Rect: _rect2.default, + Vector2D: _vector2d2.default, + Color: _color2.default, + ImageLoader: _imageloader2.default + }; + + var Consts = { + Input: { + Keys: _keyboardinput.KeyConsts + } + }; + + window.MomentumEngine = { + Classes: Classes, + Consts: Consts + }; + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _getPrototypeOf = __webpack_require__(2); + + var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + var _possibleConstructorReturn2 = __webpack_require__(19); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(56); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _entity = __webpack_require__(63); + + var _entity2 = _interopRequireDefault(_entity); + + var _keyboardinput = __webpack_require__(65); + + var _keyboardinput2 = _interopRequireDefault(_keyboardinput); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Game = function (_Entity) { + (0, _inherits3.default)(Game, _Entity); + + function Game(config) { + (0, _classCallCheck3.default)(this, Game); + // Call entity constructor + + var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(Game).call(this)); + + config = config || {}; + config.inputs = config.inputs || {}; + + // Required params + if (config.canvas) { + _this.canvas = config.canvas; + } else { + throw new Error("MomentumEngine.Classes.Game must be constructed with a canvas"); + } + + if (config.width) { + _this.width = config.width; + } else { + throw new Error("MomentumEngine.Classes.Game must be constructed with canvas width"); + } + + if (config.height) { + _this.height = config.height; + } else { + throw new Error("MomentumEngine.Classes.Game must be constructed with canvas height"); + } + + // Optional params + _this.desiredFps = config.desiredFps || 60; + + if (config.fixRatio) { + + var deviceRatio = window.devicePixelRatio, + backingStoreRatio = 0; + + // Unfortunately Ejecta requires calling getContext last, so we cannot get the backingStorePixelRatio. So for Ejecta's case, we set it to 1, and call getContext later. + if (typeof ejecta !== "undefined") { + backingStoreRatio = 1; + } else { + + _this.context = _this.canvas.getContext("2d"); + + backingStoreRatio = _this.context.webkitBackingStorePixelRatio || _this.context.mozBackingStorePixelRatio || _this.context.msBackingStorePixelRatio || _this.context.oBackingStorePixelRatio || _this.context.backingStorePixelRatio || 1; + } + + _this.scale = deviceRatio / backingStoreRatio; + + _this.canvas.width = _this.width * _this.scale; + _this.canvas.height = _this.height * _this.scale; + + _this.canvas.style.width = _this.width + "px"; + _this.canvas.style.height = _this.height + "px"; + + // Call getContext last for Ejecta only. + if (typeof ejecta !== "undefined") { + _this.context = _this.canvas.getContext("2d"); + } + + _this.context.scale(deviceRatio, deviceRatio); + } else { + + _this.canvas.width = _this.width; + _this.canvas.height = _this.height; + + _this.context = _this.canvas.getContext("2d"); + } + + if (typeof _this.context.imageSmoothingEnabled !== "undefined") { + _this.context.imageSmoothingEnabled = config.imageSmoothing || false; + } + + // Initialize defaults + _this.frameCounter = 0; + + _this.inputs = {}; + if (config.inputs.keyboard) { + _this.inputs.keyboard = new _keyboardinput2.default(_this); + } + + _this._game = _this; + _this._lastFrameTimestamp = 0; + _this._wantPause = true; + + return _this; + } + + (0, _createClass3.default)(Game, [{ + key: "step", + value: function step(delta) { + + this.frameCounter++; + + this._updateEntity(delta); + this._renderEntity(); + } + }, { + key: "start", + value: function start() { + + var self = this; // NK: Hate doing this...better way plz? + + if (self._wantPause) { + self._wantPause = false; + } else { + console.log("MomentumEngine.Classes.Game.start called, game instance is already started"); + return false; // Game is already running + } + + self._wantPause = false; + + var requestFrame = function () { + + return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) { + window.setTimeout(callback, 1000 / self.desiredFps); + }; + }(); + + self._lastFrameTimestamp = +new Date(); + self.startTime = self._lastFrameTimestamp; + + var loop = function loop() { + + if (self._wantPause) { + return; + } + + var currentTimestamp = +new Date(), + delta = currentTimestamp - self._lastFrameTimestamp; + + delta = Math.min(delta, 1000 / self.desiredFps); + self._lastFrameTimestamp = currentTimestamp; + + self.step(delta); + + requestFrame(loop); + }; + + loop(); + return true; + } + }, { + key: "pause", + value: function pause() { + + if (!this._wantPause) { + this._wantPause = true; + return true; + } else { + console.log("MomentumEngine.Classes.Game.pause called, game instance is already paused"); + return false; + } + } + }]); + return Game; + }(_entity2.default); + + exports.default = Game; + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(3), __esModule: true }; + +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(4); + module.exports = __webpack_require__(10).Object.getPrototypeOf; + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.9 Object.getPrototypeOf(O) + var toObject = __webpack_require__(5); + + __webpack_require__(7)('getPrototypeOf', function($getPrototypeOf){ + return function getPrototypeOf(it){ + return $getPrototypeOf(toObject(it)); + }; + }); + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(6); + module.exports = function(it){ + return Object(defined(it)); + }; + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; + }; + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(8) + , core = __webpack_require__(10) + , fails = __webpack_require__(13); + module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); + }; + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(9) + , core = __webpack_require__(10) + , ctx = __webpack_require__(11) + , PROTOTYPE = 'prototype'; + + var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && key in target; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(param){ + return this instanceof C ? new C(param) : C(param); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + module.exports = $export; + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); + if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }, +/* 10 */ +/***/ function(module, exports) { + + var core = module.exports = {version: '1.2.6'}; + if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + // optional / simple context binding + var aFunction = __webpack_require__(12); + module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; + }; + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; + }; + +/***/ }, +/* 13 */ +/***/ function(module, exports) { + + module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } + }; + +/***/ }, +/* 14 */ +/***/ function(module, exports) { + + "use strict"; + + exports.__esModule = true; + + exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + }; + +/***/ }, +/* 15 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + exports.__esModule = true; + + var _defineProperty = __webpack_require__(16); + + var _defineProperty2 = _interopRequireDefault(_defineProperty); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(17), __esModule: true }; + +/***/ }, +/* 17 */ +/***/ function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(18); + module.exports = function defineProperty(it, key, desc){ + return $.setDesc(it, key, desc); + }; + +/***/ }, +/* 18 */ +/***/ function(module, exports) { + + var $Object = Object; + module.exports = { + create: $Object.create, + getProto: $Object.getPrototypeOf, + isEnum: {}.propertyIsEnumerable, + getDesc: $Object.getOwnPropertyDescriptor, + setDesc: $Object.defineProperty, + setDescs: $Object.defineProperties, + getKeys: $Object.keys, + getNames: $Object.getOwnPropertyNames, + getSymbols: $Object.getOwnPropertySymbols, + each: [].forEach + }; + +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + exports.__esModule = true; + + var _typeof2 = __webpack_require__(20); + + var _typeof3 = _interopRequireDefault(_typeof2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; + }; + +/***/ }, +/* 20 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _typeof = typeof _Symbol === "function" && typeof _Symbol$iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _Symbol === "function" && obj.constructor === _Symbol ? "symbol" : typeof obj; }; + + exports.__esModule = true; + + var _iterator = __webpack_require__(21); + + var _iterator2 = _interopRequireDefault(_iterator); + + var _symbol = __webpack_require__(46); + + var _symbol2 = _interopRequireDefault(_symbol); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); + } : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); + }; + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(22), __esModule: true }; + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(23); + __webpack_require__(39); + module.exports = __webpack_require__(36)('iterator'); + +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $at = __webpack_require__(24)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(26)(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; + }); + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + var toInteger = __webpack_require__(25) + , defined = __webpack_require__(6); + // true -> String#at + // false -> String#codePointAt + module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + +/***/ }, +/* 25 */ +/***/ function(module, exports) { + + // 7.1.4 ToInteger + var ceil = Math.ceil + , floor = Math.floor; + module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var LIBRARY = __webpack_require__(27) + , $export = __webpack_require__(8) + , redefine = __webpack_require__(28) + , hide = __webpack_require__(29) + , has = __webpack_require__(32) + , Iterators = __webpack_require__(33) + , $iterCreate = __webpack_require__(34) + , setToStringTag = __webpack_require__(35) + , getProto = __webpack_require__(18).getProto + , ITERATOR = __webpack_require__(36)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + + var returnThis = function(){ return this; }; + + module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , methods, key; + // Fix native + if($native){ + var IteratorPrototype = getProto($default.call(new Base)); + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // FF fix + if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: !DEF_VALUES ? $default : getMethod('entries') + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + +/***/ }, +/* 27 */ +/***/ function(module, exports) { + + module.exports = true; + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(29); + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(18) + , createDesc = __webpack_require__(30); + module.exports = __webpack_require__(31) ? function(object, key, value){ + return $.setDesc(object, key, createDesc(1, value)); + } : function(object, key, value){ + object[key] = value; + return object; + }; + +/***/ }, +/* 30 */ +/***/ function(module, exports) { + + module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; + }; + +/***/ }, +/* 31 */ +/***/ function(module, exports, __webpack_require__) { + + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(13)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; + }); + +/***/ }, +/* 32 */ +/***/ function(module, exports) { + + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function(it, key){ + return hasOwnProperty.call(it, key); + }; + +/***/ }, +/* 33 */ +/***/ function(module, exports) { + + module.exports = {}; + +/***/ }, +/* 34 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $ = __webpack_require__(18) + , descriptor = __webpack_require__(30) + , setToStringTag = __webpack_require__(35) + , IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(29)(IteratorPrototype, __webpack_require__(36)('iterator'), function(){ return this; }); + + module.exports = function(Constructor, NAME, next){ + Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { + + var def = __webpack_require__(18).setDesc + , has = __webpack_require__(32) + , TAG = __webpack_require__(36)('toStringTag'); + + module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); + }; + +/***/ }, +/* 36 */ +/***/ function(module, exports, __webpack_require__) { + + var store = __webpack_require__(37)('wks') + , uid = __webpack_require__(38) + , Symbol = __webpack_require__(9).Symbol; + module.exports = function(name){ + return store[name] || (store[name] = + Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name)); + }; + +/***/ }, +/* 37 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(9) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); + module.exports = function(key){ + return store[key] || (store[key] = {}); + }; + +/***/ }, +/* 38 */ +/***/ function(module, exports) { + + var id = 0 + , px = Math.random(); + module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + +/***/ }, +/* 39 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(40); + var Iterators = __webpack_require__(33); + Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var addToUnscopables = __webpack_require__(41) + , step = __webpack_require__(42) + , Iterators = __webpack_require__(33) + , toIObject = __webpack_require__(43); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(26)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); + }, 'values'); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + +/***/ }, +/* 41 */ +/***/ function(module, exports) { + + module.exports = function(){ /* empty */ }; + +/***/ }, +/* 42 */ +/***/ function(module, exports) { + + module.exports = function(done, value){ + return {value: value, done: !!done}; + }; + +/***/ }, +/* 43 */ +/***/ function(module, exports, __webpack_require__) { + + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(44) + , defined = __webpack_require__(6); + module.exports = function(it){ + return IObject(defined(it)); + }; + +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(45); + module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); + }; + +/***/ }, +/* 45 */ +/***/ function(module, exports) { + + var toString = {}.toString; + + module.exports = function(it){ + return toString.call(it).slice(8, -1); + }; + +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(47), __esModule: true }; + +/***/ }, +/* 47 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(48); + __webpack_require__(55); + module.exports = __webpack_require__(10).Symbol; + +/***/ }, +/* 48 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // ECMAScript 6 symbols shim + var $ = __webpack_require__(18) + , global = __webpack_require__(9) + , has = __webpack_require__(32) + , DESCRIPTORS = __webpack_require__(31) + , $export = __webpack_require__(8) + , redefine = __webpack_require__(28) + , $fails = __webpack_require__(13) + , shared = __webpack_require__(37) + , setToStringTag = __webpack_require__(35) + , uid = __webpack_require__(38) + , wks = __webpack_require__(36) + , keyOf = __webpack_require__(49) + , $names = __webpack_require__(50) + , enumKeys = __webpack_require__(51) + , isArray = __webpack_require__(52) + , anObject = __webpack_require__(53) + , toIObject = __webpack_require__(43) + , createDesc = __webpack_require__(30) + , getDesc = $.getDesc + , setDesc = $.setDesc + , _create = $.create + , getNames = $names.get + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , setter = false + , HIDDEN = wks('_hidden') + , isEnum = $.isEnum + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , useNative = typeof $Symbol == 'function' + , ObjectProto = Object.prototype; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(setDesc({}, 'a', { + get: function(){ return setDesc(this, 'a', {value: 7}).a; } + })).a != 7; + }) ? function(it, key, D){ + var protoDesc = getDesc(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + setDesc(it, key, D); + if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc); + } : setDesc; + + var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol.prototype); + sym._k = tag; + DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, { + configurable: true, + set: function(value){ + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + } + }); + return sym; + }; + + var isSymbol = function(it){ + return typeof it == 'symbol'; + }; + + var $defineProperty = function defineProperty(it, key, D){ + if(D && has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return setDesc(it, key, D); + }; + var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; + }; + var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key); + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] + ? E : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + var D = getDesc(it = toIObject(it), key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = getNames(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key); + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var names = getNames(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]); + return result; + }; + var $stringify = function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , $$ = arguments + , replacer, $replacer; + while($$.length > i)args.push($$[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }; + var buggyJSON = $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; + }); + + // 19.4.1.1 Symbol([description]) + if(!useNative){ + $Symbol = function Symbol(){ + if(isSymbol(this))throw TypeError('Symbol is not a constructor'); + return wrap(uid(arguments.length > 0 ? arguments[0] : undefined)); + }; + redefine($Symbol.prototype, 'toString', function toString(){ + return this._k; + }); + + isSymbol = function(it){ + return it instanceof $Symbol; + }; + + $.create = $create; + $.isEnum = $propertyIsEnumerable; + $.getDesc = $getOwnPropertyDescriptor; + $.setDesc = $defineProperty; + $.setDescs = $defineProperties; + $.getNames = $names.get = $getOwnPropertyNames; + $.getSymbols = $getOwnPropertySymbols; + + if(DESCRIPTORS && !__webpack_require__(27)){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + } + + var symbolStatics = { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + return keyOf(SymbolRegistry, key); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } + }; + // 19.4.2.2 Symbol.hasInstance + // 19.4.2.3 Symbol.isConcatSpreadable + // 19.4.2.4 Symbol.iterator + // 19.4.2.6 Symbol.match + // 19.4.2.8 Symbol.replace + // 19.4.2.9 Symbol.search + // 19.4.2.10 Symbol.species + // 19.4.2.11 Symbol.split + // 19.4.2.12 Symbol.toPrimitive + // 19.4.2.13 Symbol.toStringTag + // 19.4.2.14 Symbol.unscopables + $.each.call(( + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' + + 'species,split,toPrimitive,toStringTag,unscopables' + ).split(','), function(it){ + var sym = wks(it); + symbolStatics[it] = useNative ? sym : wrap(sym); + }); + + setter = true; + + $export($export.G + $export.W, {Symbol: $Symbol}); + + $export($export.S, 'Symbol', symbolStatics); + + $export($export.S + $export.F * !useNative, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify}); + + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + +/***/ }, +/* 49 */ +/***/ function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(18) + , toIObject = __webpack_require__(43); + module.exports = function(object, el){ + var O = toIObject(object) + , keys = $.getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; + }; + +/***/ }, +/* 50 */ +/***/ function(module, exports, __webpack_require__) { + + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(43) + , getNames = __webpack_require__(18).getNames + , toString = {}.toString; + + var windowNames = typeof window == 'object' && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + + var getWindowNames = function(it){ + try { + return getNames(it); + } catch(e){ + return windowNames.slice(); + } + }; + + module.exports.get = function getOwnPropertyNames(it){ + if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it); + return getNames(toIObject(it)); + }; + +/***/ }, +/* 51 */ +/***/ function(module, exports, __webpack_require__) { + + // all enumerable object keys, includes symbols + var $ = __webpack_require__(18); + module.exports = function(it){ + var keys = $.getKeys(it) + , getSymbols = $.getSymbols; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = $.isEnum + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key); + } + return keys; + }; + +/***/ }, +/* 52 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(45); + module.exports = Array.isArray || function(arg){ + return cof(arg) == 'Array'; + }; + +/***/ }, +/* 53 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(54); + module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; + }; + +/***/ }, +/* 54 */ +/***/ function(module, exports) { + + module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + +/***/ }, +/* 55 */ +/***/ function(module, exports) { + + + +/***/ }, +/* 56 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + exports.__esModule = true; + + var _setPrototypeOf = __webpack_require__(57); + + var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); + + var _create = __webpack_require__(61); + + var _create2 = _interopRequireDefault(_create); + + var _typeof2 = __webpack_require__(20); + + var _typeof3 = _interopRequireDefault(_typeof2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; + }; + +/***/ }, +/* 57 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(58), __esModule: true }; + +/***/ }, +/* 58 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(59); + module.exports = __webpack_require__(10).Object.setPrototypeOf; + +/***/ }, +/* 59 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(8); + $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(60).set}); + +/***/ }, +/* 60 */ +/***/ function(module, exports, __webpack_require__) { + + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var getDesc = __webpack_require__(18).getDesc + , isObject = __webpack_require__(54) + , anObject = __webpack_require__(53); + var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = __webpack_require__(11)(Function.call, getDesc(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check + }; + +/***/ }, +/* 61 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(62), __esModule: true }; + +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(18); + module.exports = function create(P, D){ + return $.create(P, D); + }; + +/***/ }, +/* 63 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + var _vector2d = __webpack_require__(64); + + var _vector2d2 = _interopRequireDefault(_vector2d); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Entity = function () { + function Entity(x, y) { + (0, _classCallCheck3.default)(this, Entity); + + + this.pos = new _vector2d2.default(x || 0, y || 0); + this.velocity = new _vector2d2.default(0, 0); + this.acceleration = new _vector2d2.default(0, 0); + + this.state = {}; + this.children = []; + + this._calculatedPos = this.pos.clone(); + this._lastCalculated = 0; + this._game = null; + this._parent = null; + } + + (0, _createClass3.default)(Entity, [{ + key: "setVelocity", + value: function setVelocity(x, y) { + + if (x instanceof _vector2d2.default) { + this.velocity = x; + } else { + this.velocity.x = x; + this.velocity.y = y; + } + } + }, { + key: "setAcceleration", + value: function setAcceleration(x, y) { + + if (x instanceof _vector2d2.default) { + this.acceleration = x; + } else { + this.acceleration.x = x; + this.acceleration.y = y; + } + } + }, { + key: "createChildEntity", + value: function createChildEntity() { + + var child = new Entity(); + + child._updateGame(this._game); + child._parent = this; + this.children.push(child); + + return child; + } + }, { + key: "addChildEntity", + value: function addChildEntity(child) { + + child._updateGame(this._game); + child._parent = this; + this.children.push(child); + + return child; + } + }, { + key: "detachChildEntity", + value: function detachChildEntity(child) { + + for (var i = 0; i < this.children.length; i++) { + if (this.children[i] == child) { + + this.children.splice(i, 1); + return true; + } + } + + return false; + } + }, { + key: "_preprocess", + value: function _preprocess() { + + // NK: The purpose of this function is to calculate the true position of the entity relative to all its parents. It does this recursively, calling the _preprocess method all the way back up the tree and continuously adding the results together. + + // Note there is a limiter, where the last calculated frame is stored, so that if the position has already been calculated for that node in this particular frame, the cached result is used rather than recalculating. + + // When rendering, the draw calls should use this._calculatedPos rather than this.pos in order for the position to be correct. + + if (this._game && this._lastCalculated < this._game.frameCounter) { + + if (this._parent) { + + var parentPos = this._parent._preprocess(); + + this._calculatedPos.x = this.pos.x + parentPos.x; + this._calculatedPos.y = this.pos.y + parentPos.y; + } else { + this._calculatedPos.x = this.pos.x; + this._calculatedPos.y = this.pos.y; + } + + this._lastCalculated = this._game.frameCounter; + } + + return this._calculatedPos; + } + }, { + key: "_updateGame", + value: function _updateGame(game) { + + this._game = game; + + this.children.forEach(function (child) { + child._updateGame(game); + }); + } + }, { + key: "_updateEntity", + value: function _updateEntity(delta) { + + // Calculate new position based on velocity and acceleration if there's one set + if (this.velocity) { + + if (this.acceleration) { + this.velocity.add(this.acceleration); + } + + this.pos.add(this.velocity); + } + + // If there's an update method, call it + var updated = this.update && this.update(delta); + + if (updated || typeof updated == "undefined" || typeof this.update === "undefined") { + + this.children.forEach(function (child) { + child._updateEntity(delta); + }); + } + } + }, { + key: "_renderEntity", + value: function _renderEntity() { + + this._preprocess(); + + var rendered = this.render && this.render(); + + if (rendered || typeof rendered == "undefined" || typeof this.render === "undefined") { + + this.children.forEach(function (child) { + child._renderEntity(); + }); + } + } + }]); + return Entity; + }(); + + exports.default = Entity; + +/***/ }, +/* 64 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Vector2D = function () { + function Vector2D(x, y) { + (0, _classCallCheck3.default)(this, Vector2D); + + this.x = x || 0;this.y = y || 0; + } + + (0, _createClass3.default)(Vector2D, [{ + key: "invert", + value: function invert() { + this.x = -this.x;this.y = -this.y; + return this; + } + }, { + key: "add", + value: function add(val) { + + if (val instanceof Vector2D) { + this.x += val.x;this.y += val.y; + } else { + this.x += val;this.y += val; + } + + return this; + } + }, { + key: "subtract", + value: function subtract(val) { + + if (val instanceof Vector2D) { + this.x -= val.x;this.y -= val.y; + } else { + this.x -= val;this.y -= val; + } + + return this; + } + }, { + key: "multiply", + value: function multiply(val) { + + if (val instanceof Vector2D) { + this.x *= val.x;this.y *= val.y; + } else { + this.x *= val;this.y *= val; + } + + return this; + } + }, { + key: "divide", + value: function divide(val) { + + if (val instanceof Vector2D) { + this.x /= val.x;this.y /= val.y; + } else { + this.x /= val;this.y /= val; + } + + return this; + } + }, { + key: "equals", + value: function equals(val) { + return this.x == val.x && this.y == val.y; + } + }, { + key: "dot", + value: function dot(val) { + return this.x * val.x + this.y * val.y; + } + }, { + key: "length", + value: function length() { + return Math.sqrt(this.dot(this)); + } + }, { + key: "unit", + value: function unit() { + return this.divide(this.length()); + } + }, { + key: "min", + value: function min() { + return Math.min(this.x, this.y); + } + }, { + key: "max", + value: function max() { + return Math.max(this.x, this.y); + } + }, { + key: "degrees", + value: function degrees() { + return Math.atan(this.x, this.y) * 180; + } + }, { + key: "angle", + value: function angle() { + return Math.atan2(this.x, this.y); + } + }, { + key: "toArray", + value: function toArray() { + return [this.x, this.y]; + } + }, { + key: "toString", + value: function toString() { + return "[" + this.x + "}," + this.y + "}]"; + } + }, { + key: "clone", + value: function clone() { + return new Vector2D(this.x, this.y); + } + }], [{ + key: "fromAngle", + value: function fromAngle(angle, length) { + return new Vector2D(length * Math.cos(angle), length * Math.sin(angle)); + } + }]); + return Vector2D; + }(); + + exports.default = Vector2D; + +/***/ }, +/* 65 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.KeyConsts = undefined; + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var KeyConsts = { + SPACE: 32, + BACKSPACE: 8, + TAB: 9, + ENTER: 13, + SHIFT: 16, + CTRL: 17, + ALT: 18, + PAUSE: 19, + CAPS_LOCK: 20, + ESCAPE: 27, + PAGE_UP: 33, + PAGE_DOWN: 34, + END: 35, + HOME: 36, + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40, + INSERT: 45, + DELETE: 46, + NUM_0: 48, + NUM_1: 49, + NUM_2: 50, + NUM_3: 51, + NUM_4: 52, + NUM_5: 53, + NUM_6: 54, + NUM_7: 55, + NUM_8: 56, + NUM_9: 57, + CHAR_A: 65, + CHAR_B: 66, + CHAR_C: 67, + CHAR_D: 68, + CHAR_E: 69, + CHAR_F: 70, + CHAR_G: 71, + CHAR_H: 72, + CHAR_I: 73, + CHAR_J: 74, + CHAR_K: 75, + CHAR_L: 76, + CHAR_M: 77, + CHAR_N: 78, + CHAR_O: 79, + CHAR_P: 80, + CHAR_Q: 81, + CHAR_R: 82, + CHAR_S: 83, + CHAR_T: 84, + CHAR_U: 85, + CHAR_V: 86, + CHAR_W: 87, + CHAR_X: 88, + CHAR_Y: 89, + CHAR_Z: 90, + NUM_PAD_0: 96, + NUM_PAD_1: 97, + NUM_PAD_2: 98, + NUM_PAD_3: 99, + NUM_PAD_4: 100, + NUM_PAD_5: 101, + NUM_PAD_6: 102, + NUM_PAD_7: 103, + NUM_PAD_8: 104, + NUM_PAD_9: 105, + MULTIPLY: 106, + ADD: 107, + SUBTRACT: 109, + DECIMAL: 110, + DIVIDE: 111, + F1: 112, + F2: 113, + F3: 114, + F4: 115, + F5: 116, + F6: 117, + F7: 118, + F8: 119, + F9: 120, + F10: 121, + F11: 122, + F12: 123, + SEMICOLON: 186, + EQUALS: 187, + COMMA: 188, + DASH: 189, + PERIOD: 190, + FORWARD_SLASH: 191, + GRAVE: 192, + OPEN_BRACKET: 219, + BACK_SLASH: 220, + CLOSE_BRACKET: 221, + SINGLE_QUOTE: 222 + }; + + var KeyboardInput = function () { + function KeyboardInput() { + (0, _classCallCheck3.default)(this, KeyboardInput); + + + var self = this; + self._keyState = {}; + + window.addEventListener("keydown", function (event) { + self._keyDownHandler(event); + }, false); + + window.addEventListener("keyup", function (event) { + self._keyUpHandler(event); + }, false); + } + + (0, _createClass3.default)(KeyboardInput, [{ + key: "isPressed", + value: function isPressed(keyCode) { + return !!this._keyState[keyCode]; + } + }, { + key: "_keyDownHandler", + value: function _keyDownHandler(event) { + this._keyState[event.keyCode] = true; + } + }, { + key: "_keyUpHandler", + value: function _keyUpHandler(event) { + this._keyState[event.keyCode] = false; + } + }]); + return KeyboardInput; + }(); + + exports.default = KeyboardInput; + exports.KeyConsts = KeyConsts; + +/***/ }, +/* 66 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _getPrototypeOf = __webpack_require__(2); + + var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + var _possibleConstructorReturn2 = __webpack_require__(19); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(56); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _entity = __webpack_require__(63); + + var _entity2 = _interopRequireDefault(_entity); + + var _vector2d = __webpack_require__(64); + + var _vector2d2 = _interopRequireDefault(_vector2d); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Emitter = function (_Entity) { + (0, _inherits3.default)(Emitter, _Entity); + + function Emitter(x, y, velocity, particle) { + (0, _classCallCheck3.default)(this, Emitter); + + var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(Emitter).call(this, x, y)); + + _this.particleVelocity = velocity; + _this.particleClass = particle; + _this.emitting = false; + + _this.particles = []; + + _this.spread = function () { + return Math.PI / 32; + }; + + return _this; + } + + (0, _createClass3.default)(Emitter, [{ + key: "_emit", + value: function _emit() { + + if (this.emitting) { + + var ParticleClass = this.particleClass; + + var angle = this.particleVelocity.angle() + this.spread() - Math.random() * this.spread() * 2, + magnitude = this.particleVelocity.length(), + velocity = _vector2d2.default.fromAngle(angle, magnitude); + + var particle = new ParticleClass(this.pos.x, this.pos.y); + particle.velocity = velocity; + + this.particles.push(particle); + this._parent.addChildEntity(particle); + } + } + }, { + key: "update", + value: function update() { + this._emit(); + } + }]); + return Emitter; + }(_entity2.default); + + exports.default = Emitter; + +/***/ }, +/* 67 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _getPrototypeOf = __webpack_require__(2); + + var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + var _possibleConstructorReturn2 = __webpack_require__(19); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(56); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _entity = __webpack_require__(63); + + var _entity2 = _interopRequireDefault(_entity); + + var _vector2d = __webpack_require__(64); + + var _vector2d2 = _interopRequireDefault(_vector2d); + + var _imageloader = __webpack_require__(68); + + var _imageloader2 = _interopRequireDefault(_imageloader); + + var _collisionmethods = __webpack_require__(69); + + var _collisionmethods2 = _interopRequireDefault(_collisionmethods); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Sprite = function (_Entity) { + (0, _inherits3.default)(Sprite, _Entity); + + function Sprite(x, y, width, height, image) { + (0, _classCallCheck3.default)(this, Sprite); + + + if (!image instanceof _imageloader2.default) { + throw new Error("MomentumEngine.Classes.Sprite must be instantiated with an ImageLoader instance"); + } + + var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(Sprite).call(this, x, y)); + + _this.size = new _vector2d2.default(width || 0, height || 0); + + _this._image = image; + _this._imagePos = new _vector2d2.default(0, 0); + _this._imageSize = new _vector2d2.default(0, 0); + + return _this; + } + + (0, _createClass3.default)(Sprite, [{ + key: "setImageCoords", + value: function setImageCoords(x, y, width, height) { + + this._imagePos.x = x; + this._imagePos.y = y; + this._imageSize.x = width || 0; + this._imageSize.y = height || 0; + } + }, { + key: "isReady", + value: function isReady() { + return this._image.isLoaded() && !this._image.isError(); + } + }, { + key: "render", + value: function render() { + + if (this.isReady() && this._game) { + + var imageObj = this._image.getImageObj(); + + var subWidth = imageObj.width - this._imagePos.x, + subHeight = imageObj.height - this._imagePos.y; + + this._game.context.drawImage(imageObj, this._imagePos.x, this._imagePos.y, this._imageSize.x || subWidth, this._imageSize.y || subHeight, this._calculatedPos.x, this._calculatedPos.y, this.size.x || subWidth, this.size.y || subHeight); + + return true; + } else { + return false; + } + } + }]); + return Sprite; + }(_entity2.default); + + exports.default = Sprite; + +/***/ }, +/* 68 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var ImageLoader = function () { + function ImageLoader(src) { + var _this = this; + + (0, _classCallCheck3.default)(this, ImageLoader); + + + this._loaded = false; // Default is true, set it to false until the image has loaded + this._error = false; // If the image fails to load, this will contain the reason + + this._imageObj = new Image(); + + this._imageObj.addEventListener("load", function () { + _this._loaded = true; + _this._error = false; + }); + + this._imageObj.addEventListener("_error", function (err) { + _this._loaded = false; + _this._error = err; + }); + + this._imageObj.src = src; + } + + (0, _createClass3.default)(ImageLoader, [{ + key: "getImageObj", + value: function getImageObj() { + + if (this._loaded) { + return this._imageObj; + } else { + return false; + } + } + }, { + key: "isLoaded", + value: function isLoaded() { + return this._loaded; + } + }, { + key: "isError", + value: function isError() { + return this._error; + } + }]); + return ImageLoader; + }(); + + exports.default = ImageLoader; + +/***/ }, +/* 69 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + var _rect = __webpack_require__(70); + + var _rect2 = _interopRequireDefault(_rect); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var CollisionMethods = function () { + function CollisionMethods() { + (0, _classCallCheck3.default)(this, CollisionMethods); + } + + (0, _createClass3.default)(CollisionMethods, null, [{ + key: "AABB", + value: function AABB(entity1, entity2) { + + if (!entity1 instanceof _rect2.default || !entity2 instanceof _rect2.default) { + throw new Error("AABB collisions can only be checked on these entity types: Rect"); + } + + return entity1.pos.x < entity2.pos.x + entity2.size.x && entity1.pos.x + entity1.size.x > entity2.pos.x && entity1.pos.y < entity2.pos.y + entity2.size.y && entity1.size.y + entity1.pos.y > entity2.pos.y; + } + }]); + return CollisionMethods; + }(); + + exports.default = CollisionMethods; + +/***/ }, +/* 70 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _getPrototypeOf = __webpack_require__(2); + + var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + var _possibleConstructorReturn2 = __webpack_require__(19); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(56); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _entity = __webpack_require__(63); + + var _entity2 = _interopRequireDefault(_entity); + + var _vector2d = __webpack_require__(64); + + var _vector2d2 = _interopRequireDefault(_vector2d); + + var _collisionmethods = __webpack_require__(69); + + var _collisionmethods2 = _interopRequireDefault(_collisionmethods); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Rect = function (_Entity) { + (0, _inherits3.default)(Rect, _Entity); + + function Rect(x, y, width, height, color) { + (0, _classCallCheck3.default)(this, Rect); + + var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(Rect).call(this, x, y)); + + _this.size = new _vector2d2.default(width, height); + _this.color = color; + + return _this; + } + + (0, _createClass3.default)(Rect, [{ + key: "isCollidingWith", + value: function isCollidingWith(entity) { + + if (entity instanceof Rect) { + return _collisionmethods2.default.AABB(this, entity); + } + } + }, { + key: "render", + value: function render() { + + if (this._game) { + + this._game.context.fillStyle = this.color.toString(); + this._game.context.fillRect(this._calculatedPos.x, this._calculatedPos.y, this.size.x, this.size.y); + + return true; + } else { + return false; + } + } + }]); + return Rect; + }(_entity2.default); + + exports.default = Rect; + +/***/ }, +/* 71 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Color = function () { + function Color(r, g, b, a) { + (0, _classCallCheck3.default)(this, Color); + + + this.r = r || 0; + this.g = g || 0; + this.b = b || 0; + this.a = a || 1; + } + + (0, _createClass3.default)(Color, [{ + key: "toString", + value: function toString() { + return "rgba(" + this.r + ", " + this.g + ", " + this.b + ", " + this.a + ")"; + } + }, { + key: "toHex", + value: function toHex() { + return "#" + (r << 16 | g << 8 | b).toString(16); + } + }]); + return Color; + }(); + + exports.default = Color; + +/***/ } +/******/ ]); //# sourceMappingURL=es5.js.map \ No newline at end of file diff --git a/dist/es5.js.map b/dist/es5.js.map index 29d755d..68f5a46 100644 --- a/dist/es5.js.map +++ b/dist/es5.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///es5.js","webpack:///webpack/bootstrap 014dcd592af794c60cf3","webpack:///./src/es5.js","webpack:///./src/classes/game.js","webpack:///./~/babel-runtime/core-js/object/get-prototype-of.js","webpack:///./~/babel-runtime/~/core-js/library/fn/object/get-prototype-of.js","webpack:///./~/babel-runtime/~/core-js/library/modules/es6.object.get-prototype-of.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.to-object.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.defined.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.object-sap.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.export.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.global.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.core.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.ctx.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.a-function.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.fails.js","webpack:///./~/babel-runtime/helpers/classCallCheck.js","webpack:///./~/babel-runtime/helpers/createClass.js","webpack:///./~/babel-runtime/core-js/object/define-property.js","webpack:///./~/babel-runtime/~/core-js/library/fn/object/define-property.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.js","webpack:///./~/babel-runtime/helpers/possibleConstructorReturn.js","webpack:///./~/babel-runtime/helpers/typeof.js","webpack:///./~/babel-runtime/core-js/symbol.js","webpack:///./~/babel-runtime/~/core-js/library/fn/symbol/index.js","webpack:///./~/babel-runtime/~/core-js/library/modules/es6.symbol.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.has.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.descriptors.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.redefine.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.hide.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.property-desc.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.shared.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.set-to-string-tag.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.wks.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.uid.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.keyof.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.to-iobject.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.iobject.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.cof.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.get-names.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.enum-keys.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.is-array.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.an-object.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.is-object.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.library.js","webpack:///./~/babel-runtime/helpers/inherits.js","webpack:///./~/babel-runtime/core-js/object/set-prototype-of.js","webpack:///./~/babel-runtime/~/core-js/library/fn/object/set-prototype-of.js","webpack:///./~/babel-runtime/~/core-js/library/modules/es6.object.set-prototype-of.js","webpack:///./~/babel-runtime/~/core-js/library/modules/$.set-proto.js","webpack:///./~/babel-runtime/core-js/object/create.js","webpack:///./~/babel-runtime/~/core-js/library/fn/object/create.js","webpack:///./src/classes/entity.js","webpack:///./src/classes/vector2d.js","webpack:///./src/classes/keyboardinput.js","webpack:///./src/classes/sprite.js","webpack:///./src/classes/imageloader.js","webpack:///./src/libs/collisionmethods.js","webpack:///./src/classes/rect.js","webpack:///./src/classes/color.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","_game","_game2","_entity","_entity2","_vector2d","_vector2d2","_sprite","_sprite2","_rect","_rect2","_color","_color2","_imageloader","_imageloader2","_keyboardinput","Classes","Game","Entity","Sprite","Rect","Vector2D","Color","ImageLoader","Consts","Input","Keys","KeyConsts","window","MomentumEngine","Object","defineProperty","value","_getPrototypeOf","_getPrototypeOf2","_classCallCheck2","_classCallCheck3","_createClass2","_createClass3","_possibleConstructorReturn2","_possibleConstructorReturn3","_inherits2","_inherits3","_keyboardinput2","_Entity","config","this","_this","inputs","canvas","Error","width","height","desiredFps","fixRatio","deviceRatio","devicePixelRatio","backingStoreRatio","ejecta","context","getContext","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","scale","style","imageSmoothingEnabled","imageSmoothing","frameCounter","keyboard","_lastFrameTimestamp","_wantPause","key","delta","_updateEntity","_renderEntity","self","console","log","requestFrame","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","callback","setTimeout","Date","startTime","loop","currentTimestamp","Math","min","step","getPrototypeOf","toObject","$getPrototypeOf","it","defined","undefined","TypeError","$export","core","fails","KEY","exec","fn","exp","S","F","global","ctx","PROTOTYPE","type","name","source","own","out","IS_FORCED","IS_GLOBAL","G","IS_STATIC","IS_PROTO","P","IS_BIND","B","IS_WRAP","W","target","C","param","Function","__g","version","__e","aFunction","that","length","a","b","apply","arguments","e","instance","Constructor","_defineProperty","_defineProperty2","defineProperties","props","i","descriptor","enumerable","configurable","writable","protoProps","staticProps","prototype","$","desc","setDesc","$Object","create","getProto","isEnum","propertyIsEnumerable","getDesc","getOwnPropertyDescriptor","setDescs","getKeys","keys","getNames","getOwnPropertyNames","getSymbols","getOwnPropertySymbols","each","forEach","_typeof2","_typeof3","ReferenceError","_typeof","_Symbol","constructor","_symbol","_symbol2","Symbol","has","DESCRIPTORS","redefine","$fails","shared","setToStringTag","uid","wks","keyOf","$names","enumKeys","isArray","anObject","toIObject","createDesc","_create","get","$Symbol","$JSON","JSON","_stringify","stringify","setter","HIDDEN","SymbolRegistry","AllSymbols","useNative","ObjectProto","setSymbolDesc","D","protoDesc","wrap","tag","sym","_k","set","isSymbol","$defineProperty","$defineProperties","l","$create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","names","result","push","$getOwnPropertySymbols","$stringify","replacer","$replacer","args","$$","buggyJSON","symbolStatics","for","keyFor","useSetter","useSimple","split","hasOwnProperty","object","bitmap","SHARED","store","def","TAG","stat","px","random","concat","toString","el","O","index","IObject","cof","slice","windowNames","getWindowNames","symbols","Array","arg","isObject","_setPrototypeOf","_setPrototypeOf2","_create2","subClass","superClass","__proto__","setPrototypeOf","check","proto","test","buggy","x","y","pos","state","children","_calculatedPos","clone","_lastCalculated","_parent","child","_updateGame","splice","parentPos","_preprocess","game","updated","update","rendered","render","val","sqrt","dot","divide","max","atan","SPACE","BACKSPACE","TAB","ENTER","SHIFT","CTRL","ALT","PAUSE","CAPS_LOCK","ESCAPE","PAGE_UP","PAGE_DOWN","END","HOME","LEFT","UP","RIGHT","DOWN","INSERT","DELETE","NUM_0","NUM_1","NUM_2","NUM_3","NUM_4","NUM_5","NUM_6","NUM_7","NUM_8","NUM_9","CHAR_A","CHAR_B","CHAR_C","CHAR_D","CHAR_E","CHAR_F","CHAR_G","CHAR_H","CHAR_I","CHAR_J","CHAR_K","CHAR_L","CHAR_M","CHAR_N","CHAR_O","CHAR_P","CHAR_Q","CHAR_R","CHAR_S","CHAR_T","CHAR_U","CHAR_V","CHAR_W","CHAR_X","CHAR_Y","CHAR_Z","NUM_PAD_0","NUM_PAD_1","NUM_PAD_2","NUM_PAD_3","NUM_PAD_4","NUM_PAD_5","NUM_PAD_6","NUM_PAD_7","NUM_PAD_8","NUM_PAD_9","MULTIPLY","ADD","SUBTRACT","DECIMAL","DIVIDE","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","SEMICOLON","EQUALS","COMMA","DASH","PERIOD","FORWARD_SLASH","GRAVE","OPEN_BRACKET","BACK_SLASH","CLOSE_BRACKET","SINGLE_QUOTE","KeyboardInput","_keyState","addEventListener","event","_keyDownHandler","_keyUpHandler","keyCode","_collisionmethods","image","size","_image","_imagePos","_imageSize","isLoaded","isError","isReady","imageObj","getImageObj","subWidth","subHeight","drawImage","src","_loaded","_error","_imageObj","Image","err","CollisionMethods","entity1","entity2","_collisionmethods2","color","entity","AABB","fillStyle","fillRect","r","g"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,M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D,EAAoB,IAEpCoD,EAAgBzC,EAAuBwC,G2Dh5DtCf,EAAK,WAGP,QAHEA,GAGW8Z,EAAGC,EAAG1S,EAAGD,I3Dm5DhB,EAAGtG,cAA0BU,K2Dt5DjCxB,GAKEwB,KAAKsY,EAAIA,GAAK,EACdtY,KAAKuY,EAAIA,GAAK,EACdvY,KAAK6F,EAAIA,GAAK,EACd7F,KAAK4F,EAAIA,GAAK,E3Di6DjB,OAXC,EAAGpG,c2D95DHhB,I3D+5DGoD,IAAK,WACL1C,MAAO,W2Dl5DR,cAAec,KAAKsY,EAAC,KAAKtY,KAAKuY,EAAC,KAAKvY,KAAK6F,EAAC,KAAK7F,KAAK4F,EAAC,O3Ds5DrDhE,IAAK,QACL1C,MAAO,W2Dl5DR,WAAaoZ,GAAK,GAAOC,GAAK,EAAK1S,GAAGsH,SAAS,QAnBjD3O,I3D46DLjC,c2Dl5DciC","file":"es5.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _game = __webpack_require__(1);\n\t\n\tvar _game2 = _interopRequireDefault(_game);\n\t\n\tvar _entity = __webpack_require__(51);\n\t\n\tvar _entity2 = _interopRequireDefault(_entity);\n\t\n\tvar _vector2d = __webpack_require__(52);\n\t\n\tvar _vector2d2 = _interopRequireDefault(_vector2d);\n\t\n\tvar _sprite = __webpack_require__(54);\n\t\n\tvar _sprite2 = _interopRequireDefault(_sprite);\n\t\n\tvar _rect = __webpack_require__(57);\n\t\n\tvar _rect2 = _interopRequireDefault(_rect);\n\t\n\tvar _color = __webpack_require__(58);\n\t\n\tvar _color2 = _interopRequireDefault(_color);\n\t\n\tvar _imageloader = __webpack_require__(55);\n\t\n\tvar _imageloader2 = _interopRequireDefault(_imageloader);\n\t\n\tvar _keyboardinput = __webpack_require__(53);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar Classes = {\n\t Game: _game2.default,\n\t Entity: _entity2.default,\n\t Sprite: _sprite2.default,\n\t Rect: _rect2.default,\n\t Vector2D: _vector2d2.default,\n\t Color: _color2.default,\n\t ImageLoader: _imageloader2.default\n\t};\n\t\n\tvar Consts = {\n\t Input: {\n\t Keys: _keyboardinput.KeyConsts\n\t }\n\t};\n\t\n\twindow.MomentumEngine = {\n\t Classes: Classes,\n\t Consts: Consts\n\t};\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _getPrototypeOf = __webpack_require__(2);\n\t\n\tvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\t\n\tvar _classCallCheck2 = __webpack_require__(14);\n\t\n\tvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\t\n\tvar _createClass2 = __webpack_require__(15);\n\t\n\tvar _createClass3 = _interopRequireDefault(_createClass2);\n\t\n\tvar _possibleConstructorReturn2 = __webpack_require__(19);\n\t\n\tvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\t\n\tvar _inherits2 = __webpack_require__(44);\n\t\n\tvar _inherits3 = _interopRequireDefault(_inherits2);\n\t\n\tvar _entity = __webpack_require__(51);\n\t\n\tvar _entity2 = _interopRequireDefault(_entity);\n\t\n\tvar _keyboardinput = __webpack_require__(53);\n\t\n\tvar _keyboardinput2 = _interopRequireDefault(_keyboardinput);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar Game = (function (_Entity) {\n\t (0, _inherits3.default)(Game, _Entity);\n\t\n\t function Game(config) {\n\t (0, _classCallCheck3.default)(this, Game);\n\t // Call entity constructor\n\t\n\t var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(Game).call(this));\n\t\n\t config = config || {};\n\t config.inputs = config.inputs || {};\n\t\n\t // Required params\n\t if (config.canvas) {\n\t _this.canvas = config.canvas;\n\t } else {\n\t throw new Error(\"MomentumEngine.Classes.Game must be constructed with a canvas\");\n\t }\n\t\n\t if (config.width) {\n\t _this.width = config.width;\n\t } else {\n\t throw new Error(\"MomentumEngine.Classes.Game must be constructed with canvas width\");\n\t }\n\t\n\t if (config.height) {\n\t _this.height = config.height;\n\t } else {\n\t throw new Error(\"MomentumEngine.Classes.Game must be constructed with canvas height\");\n\t }\n\t\n\t // Optional params\n\t _this.desiredFps = config.desiredFps || 60;\n\t\n\t if (config.fixRatio) {\n\t\n\t var deviceRatio = window.devicePixelRatio,\n\t backingStoreRatio = 0;\n\t\n\t // Unfortunately Ejecta requires calling getContext last, so we cannot get the backingStorePixelRatio. So for Ejecta's case, we set it to 1, and call getContext later.\n\t if (typeof ejecta !== \"undefined\") {\n\t backingStoreRatio = 1;\n\t } else {\n\t\n\t _this.context = _this.canvas.getContext(\"2d\");\n\t\n\t backingStoreRatio = _this.context.webkitBackingStorePixelRatio || _this.context.mozBackingStorePixelRatio || _this.context.msBackingStorePixelRatio || _this.context.oBackingStorePixelRatio || _this.context.backingStorePixelRatio || 1;\n\t }\n\t\n\t _this.scale = deviceRatio / backingStoreRatio;\n\t\n\t _this.canvas.width = _this.width * _this.scale;\n\t _this.canvas.height = _this.height * _this.scale;\n\t\n\t _this.canvas.style.width = _this.width + \"px\";\n\t _this.canvas.style.height = _this.height + \"px\";\n\t\n\t // Call getContext last for Ejecta only.\n\t if (typeof ejecta !== \"undefined\") {\n\t _this.context = _this.canvas.getContext(\"2d\");\n\t }\n\t\n\t _this.context.scale(deviceRatio, deviceRatio);\n\t } else {\n\t\n\t _this.canvas.width = _this.width;\n\t _this.canvas.height = _this.height;\n\t\n\t _this.context = _this.canvas.getContext(\"2d\");\n\t }\n\t\n\t if (typeof _this.context.imageSmoothingEnabled !== \"undefined\") {\n\t _this.context.imageSmoothingEnabled = config.imageSmoothing || false;\n\t }\n\t\n\t // Initialize defaults\n\t _this.frameCounter = 0;\n\t\n\t _this.inputs = {};\n\t if (config.inputs.keyboard) {\n\t _this.inputs.keyboard = new _keyboardinput2.default(_this);\n\t }\n\t\n\t _this._game = _this;\n\t _this._lastFrameTimestamp = 0;\n\t _this._wantPause = true;\n\t\n\t return _this;\n\t }\n\t\n\t (0, _createClass3.default)(Game, [{\n\t key: \"step\",\n\t value: function step(delta) {\n\t\n\t this.frameCounter++;\n\t\n\t this._updateEntity(delta);\n\t this._renderEntity();\n\t }\n\t }, {\n\t key: \"start\",\n\t value: function start() {\n\t\n\t var self = this; // NK: Hate doing this...better way plz?\n\t\n\t if (self._wantPause) {\n\t self._wantPause = false;\n\t } else {\n\t console.log(\"MomentumEngine.Classes.Game.start called, game instance is already started\");\n\t return false; // Game is already running\n\t }\n\t\n\t self._wantPause = false;\n\t\n\t var requestFrame = (function () {\n\t\n\t return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {\n\t window.setTimeout(callback, 1000 / self.desiredFps);\n\t };\n\t })();\n\t\n\t self._lastFrameTimestamp = +new Date();\n\t self.startTime = self._lastFrameTimestamp;\n\t\n\t var loop = function loop() {\n\t\n\t if (self._wantPause) {\n\t return;\n\t }\n\t\n\t var currentTimestamp = +new Date(),\n\t delta = currentTimestamp - self._lastFrameTimestamp;\n\t\n\t delta = Math.min(delta, 1000 / self.desiredFps);\n\t self._lastFrameTimestamp = currentTimestamp;\n\t\n\t self.step(delta);\n\t\n\t requestFrame(loop);\n\t };\n\t\n\t loop();\n\t return true;\n\t }\n\t }, {\n\t key: \"pause\",\n\t value: function pause() {\n\t\n\t if (!this._wantPause) {\n\t this._wantPause = true;\n\t return true;\n\t } else {\n\t console.log(\"MomentumEngine.Classes.Game.pause called, game instance is already paused\");\n\t return false;\n\t }\n\t }\n\t }]);\n\t return Game;\n\t})(_entity2.default);\n\t\n\texports.default = Game;\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = { \"default\": __webpack_require__(3), __esModule: true };\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(4);\n\tmodule.exports = __webpack_require__(10).Object.getPrototypeOf;\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// 19.1.2.9 Object.getPrototypeOf(O)\n\tvar toObject = __webpack_require__(5);\n\t\n\t__webpack_require__(7)('getPrototypeOf', function($getPrototypeOf){\n\t return function getPrototypeOf(it){\n\t return $getPrototypeOf(toObject(it));\n\t };\n\t});\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// 7.1.13 ToObject(argument)\n\tvar defined = __webpack_require__(6);\n\tmodule.exports = function(it){\n\t return Object(defined(it));\n\t};\n\n/***/ },\n/* 6 */\n/***/ function(module, exports) {\n\n\t// 7.2.1 RequireObjectCoercible(argument)\n\tmodule.exports = function(it){\n\t if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n\t return it;\n\t};\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// most Object methods by ES6 should accept primitives\n\tvar $export = __webpack_require__(8)\n\t , core = __webpack_require__(10)\n\t , fails = __webpack_require__(13);\n\tmodule.exports = function(KEY, exec){\n\t var fn = (core.Object || {})[KEY] || Object[KEY]\n\t , exp = {};\n\t exp[KEY] = exec(fn);\n\t $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);\n\t};\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar global = __webpack_require__(9)\n\t , core = __webpack_require__(10)\n\t , ctx = __webpack_require__(11)\n\t , PROTOTYPE = 'prototype';\n\t\n\tvar $export = function(type, name, source){\n\t var IS_FORCED = type & $export.F\n\t , IS_GLOBAL = type & $export.G\n\t , IS_STATIC = type & $export.S\n\t , IS_PROTO = type & $export.P\n\t , IS_BIND = type & $export.B\n\t , IS_WRAP = type & $export.W\n\t , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n\t , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n\t , key, own, out;\n\t if(IS_GLOBAL)source = name;\n\t for(key in source){\n\t // contains in native\n\t own = !IS_FORCED && target && key in target;\n\t if(own && key in exports)continue;\n\t // export native or passed\n\t out = own ? target[key] : source[key];\n\t // prevent global pollution for namespaces\n\t exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n\t // bind timers to global for call from export context\n\t : IS_BIND && own ? ctx(out, global)\n\t // wrap global constructors for prevent change them in library\n\t : IS_WRAP && target[key] == out ? (function(C){\n\t var F = function(param){\n\t return this instanceof C ? new C(param) : C(param);\n\t };\n\t F[PROTOTYPE] = C[PROTOTYPE];\n\t return F;\n\t // make static versions for prototype methods\n\t })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n\t if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;\n\t }\n\t};\n\t// type bitmap\n\t$export.F = 1; // forced\n\t$export.G = 2; // global\n\t$export.S = 4; // static\n\t$export.P = 8; // proto\n\t$export.B = 16; // bind\n\t$export.W = 32; // wrap\n\tmodule.exports = $export;\n\n/***/ },\n/* 9 */\n/***/ function(module, exports) {\n\n\t// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n\tvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n\t ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\n\tif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n/***/ },\n/* 10 */\n/***/ function(module, exports) {\n\n\tvar core = module.exports = {version: '1.2.6'};\n\tif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// optional / simple context binding\n\tvar aFunction = __webpack_require__(12);\n\tmodule.exports = function(fn, that, length){\n\t aFunction(fn);\n\t if(that === undefined)return fn;\n\t switch(length){\n\t case 1: return function(a){\n\t return fn.call(that, a);\n\t };\n\t case 2: return function(a, b){\n\t return fn.call(that, a, b);\n\t };\n\t case 3: return function(a, b, c){\n\t return fn.call(that, a, b, c);\n\t };\n\t }\n\t return function(/* ...args */){\n\t return fn.apply(that, arguments);\n\t };\n\t};\n\n/***/ },\n/* 12 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function(it){\n\t if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n\t return it;\n\t};\n\n/***/ },\n/* 13 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function(exec){\n\t try {\n\t return !!exec();\n\t } catch(e){\n\t return true;\n\t }\n\t};\n\n/***/ },\n/* 14 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\texports.__esModule = true;\n\t\n\texports.default = function (instance, Constructor) {\n\t if (!(instance instanceof Constructor)) {\n\t throw new TypeError(\"Cannot call a class as a function\");\n\t }\n\t};\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\texports.__esModule = true;\n\t\n\tvar _defineProperty = __webpack_require__(16);\n\t\n\tvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = (function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t var descriptor = props[i];\n\t descriptor.enumerable = descriptor.enumerable || false;\n\t descriptor.configurable = true;\n\t if (\"value\" in descriptor) descriptor.writable = true;\n\t (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n\t }\n\t }\n\t\n\t return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);\n\t if (staticProps) defineProperties(Constructor, staticProps);\n\t return Constructor;\n\t };\n\t})();\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = { \"default\": __webpack_require__(17), __esModule: true };\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar $ = __webpack_require__(18);\n\tmodule.exports = function defineProperty(it, key, desc){\n\t return $.setDesc(it, key, desc);\n\t};\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\tvar $Object = Object;\n\tmodule.exports = {\n\t create: $Object.create,\n\t getProto: $Object.getPrototypeOf,\n\t isEnum: {}.propertyIsEnumerable,\n\t getDesc: $Object.getOwnPropertyDescriptor,\n\t setDesc: $Object.defineProperty,\n\t setDescs: $Object.defineProperties,\n\t getKeys: $Object.keys,\n\t getNames: $Object.getOwnPropertyNames,\n\t getSymbols: $Object.getOwnPropertySymbols,\n\t each: [].forEach\n\t};\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\texports.__esModule = true;\n\t\n\tvar _typeof2 = __webpack_require__(20);\n\t\n\tvar _typeof3 = _interopRequireDefault(_typeof2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (self, call) {\n\t if (!self) {\n\t throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t }\n\t\n\t return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n\t};\n\n/***/ },\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\texports.__esModule = true;\n\t\n\tvar _symbol = __webpack_require__(21);\n\t\n\tvar _symbol2 = _interopRequireDefault(_symbol);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _typeof(obj) { return obj && typeof _Symbol !== \"undefined\" && obj.constructor === _Symbol ? \"symbol\" : typeof obj; }\n\t\n\texports.default = function (obj) {\n\t return obj && typeof _symbol2.default !== \"undefined\" && obj.constructor === _symbol2.default ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n\t};\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = { \"default\": __webpack_require__(22), __esModule: true };\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(23);\n\t__webpack_require__(43);\n\tmodule.exports = __webpack_require__(10).Symbol;\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t// ECMAScript 6 symbols shim\n\tvar $ = __webpack_require__(18)\n\t , global = __webpack_require__(9)\n\t , has = __webpack_require__(24)\n\t , DESCRIPTORS = __webpack_require__(25)\n\t , $export = __webpack_require__(8)\n\t , redefine = __webpack_require__(26)\n\t , $fails = __webpack_require__(13)\n\t , shared = __webpack_require__(29)\n\t , setToStringTag = __webpack_require__(30)\n\t , uid = __webpack_require__(32)\n\t , wks = __webpack_require__(31)\n\t , keyOf = __webpack_require__(33)\n\t , $names = __webpack_require__(37)\n\t , enumKeys = __webpack_require__(38)\n\t , isArray = __webpack_require__(39)\n\t , anObject = __webpack_require__(40)\n\t , toIObject = __webpack_require__(34)\n\t , createDesc = __webpack_require__(28)\n\t , getDesc = $.getDesc\n\t , setDesc = $.setDesc\n\t , _create = $.create\n\t , getNames = $names.get\n\t , $Symbol = global.Symbol\n\t , $JSON = global.JSON\n\t , _stringify = $JSON && $JSON.stringify\n\t , setter = false\n\t , HIDDEN = wks('_hidden')\n\t , isEnum = $.isEnum\n\t , SymbolRegistry = shared('symbol-registry')\n\t , AllSymbols = shared('symbols')\n\t , useNative = typeof $Symbol == 'function'\n\t , ObjectProto = Object.prototype;\n\t\n\t// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n\tvar setSymbolDesc = DESCRIPTORS && $fails(function(){\n\t return _create(setDesc({}, 'a', {\n\t get: function(){ return setDesc(this, 'a', {value: 7}).a; }\n\t })).a != 7;\n\t}) ? function(it, key, D){\n\t var protoDesc = getDesc(ObjectProto, key);\n\t if(protoDesc)delete ObjectProto[key];\n\t setDesc(it, key, D);\n\t if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);\n\t} : setDesc;\n\t\n\tvar wrap = function(tag){\n\t var sym = AllSymbols[tag] = _create($Symbol.prototype);\n\t sym._k = tag;\n\t DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {\n\t configurable: true,\n\t set: function(value){\n\t if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n\t setSymbolDesc(this, tag, createDesc(1, value));\n\t }\n\t });\n\t return sym;\n\t};\n\t\n\tvar isSymbol = function(it){\n\t return typeof it == 'symbol';\n\t};\n\t\n\tvar $defineProperty = function defineProperty(it, key, D){\n\t if(D && has(AllSymbols, key)){\n\t if(!D.enumerable){\n\t if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));\n\t it[HIDDEN][key] = true;\n\t } else {\n\t if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n\t D = _create(D, {enumerable: createDesc(0, false)});\n\t } return setSymbolDesc(it, key, D);\n\t } return setDesc(it, key, D);\n\t};\n\tvar $defineProperties = function defineProperties(it, P){\n\t anObject(it);\n\t var keys = enumKeys(P = toIObject(P))\n\t , i = 0\n\t , l = keys.length\n\t , key;\n\t while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n\t return it;\n\t};\n\tvar $create = function create(it, P){\n\t return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n\t};\n\tvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n\t var E = isEnum.call(this, key);\n\t return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]\n\t ? E : true;\n\t};\n\tvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n\t var D = getDesc(it = toIObject(it), key);\n\t if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n\t return D;\n\t};\n\tvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n\t var names = getNames(toIObject(it))\n\t , result = []\n\t , i = 0\n\t , key;\n\t while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);\n\t return result;\n\t};\n\tvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n\t var names = getNames(toIObject(it))\n\t , result = []\n\t , i = 0\n\t , key;\n\t while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);\n\t return result;\n\t};\n\tvar $stringify = function stringify(it){\n\t if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\n\t var args = [it]\n\t , i = 1\n\t , $$ = arguments\n\t , replacer, $replacer;\n\t while($$.length > i)args.push($$[i++]);\n\t replacer = args[1];\n\t if(typeof replacer == 'function')$replacer = replacer;\n\t if($replacer || !isArray(replacer))replacer = function(key, value){\n\t if($replacer)value = $replacer.call(this, key, value);\n\t if(!isSymbol(value))return value;\n\t };\n\t args[1] = replacer;\n\t return _stringify.apply($JSON, args);\n\t};\n\tvar buggyJSON = $fails(function(){\n\t var S = $Symbol();\n\t // MS Edge converts symbol values to JSON as {}\n\t // WebKit converts symbol values to JSON as null\n\t // V8 throws on boxed symbols\n\t return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n\t});\n\t\n\t// 19.4.1.1 Symbol([description])\n\tif(!useNative){\n\t $Symbol = function Symbol(){\n\t if(isSymbol(this))throw TypeError('Symbol is not a constructor');\n\t return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));\n\t };\n\t redefine($Symbol.prototype, 'toString', function toString(){\n\t return this._k;\n\t });\n\t\n\t isSymbol = function(it){\n\t return it instanceof $Symbol;\n\t };\n\t\n\t $.create = $create;\n\t $.isEnum = $propertyIsEnumerable;\n\t $.getDesc = $getOwnPropertyDescriptor;\n\t $.setDesc = $defineProperty;\n\t $.setDescs = $defineProperties;\n\t $.getNames = $names.get = $getOwnPropertyNames;\n\t $.getSymbols = $getOwnPropertySymbols;\n\t\n\t if(DESCRIPTORS && !__webpack_require__(42)){\n\t redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n\t }\n\t}\n\t\n\tvar symbolStatics = {\n\t // 19.4.2.1 Symbol.for(key)\n\t 'for': function(key){\n\t return has(SymbolRegistry, key += '')\n\t ? SymbolRegistry[key]\n\t : SymbolRegistry[key] = $Symbol(key);\n\t },\n\t // 19.4.2.5 Symbol.keyFor(sym)\n\t keyFor: function keyFor(key){\n\t return keyOf(SymbolRegistry, key);\n\t },\n\t useSetter: function(){ setter = true; },\n\t useSimple: function(){ setter = false; }\n\t};\n\t// 19.4.2.2 Symbol.hasInstance\n\t// 19.4.2.3 Symbol.isConcatSpreadable\n\t// 19.4.2.4 Symbol.iterator\n\t// 19.4.2.6 Symbol.match\n\t// 19.4.2.8 Symbol.replace\n\t// 19.4.2.9 Symbol.search\n\t// 19.4.2.10 Symbol.species\n\t// 19.4.2.11 Symbol.split\n\t// 19.4.2.12 Symbol.toPrimitive\n\t// 19.4.2.13 Symbol.toStringTag\n\t// 19.4.2.14 Symbol.unscopables\n\t$.each.call((\n\t 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +\n\t 'species,split,toPrimitive,toStringTag,unscopables'\n\t).split(','), function(it){\n\t var sym = wks(it);\n\t symbolStatics[it] = useNative ? sym : wrap(sym);\n\t});\n\t\n\tsetter = true;\n\t\n\t$export($export.G + $export.W, {Symbol: $Symbol});\n\t\n\t$export($export.S, 'Symbol', symbolStatics);\n\t\n\t$export($export.S + $export.F * !useNative, 'Object', {\n\t // 19.1.2.2 Object.create(O [, Properties])\n\t create: $create,\n\t // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n\t defineProperty: $defineProperty,\n\t // 19.1.2.3 Object.defineProperties(O, Properties)\n\t defineProperties: $defineProperties,\n\t // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n\t getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n\t // 19.1.2.7 Object.getOwnPropertyNames(O)\n\t getOwnPropertyNames: $getOwnPropertyNames,\n\t // 19.1.2.8 Object.getOwnPropertySymbols(O)\n\t getOwnPropertySymbols: $getOwnPropertySymbols\n\t});\n\t\n\t// 24.3.2 JSON.stringify(value [, replacer [, space]])\n\t$JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});\n\t\n\t// 19.4.3.5 Symbol.prototype[@@toStringTag]\n\tsetToStringTag($Symbol, 'Symbol');\n\t// 20.2.1.9 Math[@@toStringTag]\n\tsetToStringTag(Math, 'Math', true);\n\t// 24.3.3 JSON[@@toStringTag]\n\tsetToStringTag(global.JSON, 'JSON', true);\n\n/***/ },\n/* 24 */\n/***/ function(module, exports) {\n\n\tvar hasOwnProperty = {}.hasOwnProperty;\n\tmodule.exports = function(it, key){\n\t return hasOwnProperty.call(it, key);\n\t};\n\n/***/ },\n/* 25 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// Thank's IE8 for his funny defineProperty\n\tmodule.exports = !__webpack_require__(13)(function(){\n\t return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n\t});\n\n/***/ },\n/* 26 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(27);\n\n/***/ },\n/* 27 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar $ = __webpack_require__(18)\n\t , createDesc = __webpack_require__(28);\n\tmodule.exports = __webpack_require__(25) ? function(object, key, value){\n\t return $.setDesc(object, key, createDesc(1, value));\n\t} : function(object, key, value){\n\t object[key] = value;\n\t return object;\n\t};\n\n/***/ },\n/* 28 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function(bitmap, value){\n\t return {\n\t enumerable : !(bitmap & 1),\n\t configurable: !(bitmap & 2),\n\t writable : !(bitmap & 4),\n\t value : value\n\t };\n\t};\n\n/***/ },\n/* 29 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar global = __webpack_require__(9)\n\t , SHARED = '__core-js_shared__'\n\t , store = global[SHARED] || (global[SHARED] = {});\n\tmodule.exports = function(key){\n\t return store[key] || (store[key] = {});\n\t};\n\n/***/ },\n/* 30 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar def = __webpack_require__(18).setDesc\n\t , has = __webpack_require__(24)\n\t , TAG = __webpack_require__(31)('toStringTag');\n\t\n\tmodule.exports = function(it, tag, stat){\n\t if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n\t};\n\n/***/ },\n/* 31 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar store = __webpack_require__(29)('wks')\n\t , uid = __webpack_require__(32)\n\t , Symbol = __webpack_require__(9).Symbol;\n\tmodule.exports = function(name){\n\t return store[name] || (store[name] =\n\t Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));\n\t};\n\n/***/ },\n/* 32 */\n/***/ function(module, exports) {\n\n\tvar id = 0\n\t , px = Math.random();\n\tmodule.exports = function(key){\n\t return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n\t};\n\n/***/ },\n/* 33 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar $ = __webpack_require__(18)\n\t , toIObject = __webpack_require__(34);\n\tmodule.exports = function(object, el){\n\t var O = toIObject(object)\n\t , keys = $.getKeys(O)\n\t , length = keys.length\n\t , index = 0\n\t , key;\n\t while(length > index)if(O[key = keys[index++]] === el)return key;\n\t};\n\n/***/ },\n/* 34 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// to indexed object, toObject with fallback for non-array-like ES3 strings\n\tvar IObject = __webpack_require__(35)\n\t , defined = __webpack_require__(6);\n\tmodule.exports = function(it){\n\t return IObject(defined(it));\n\t};\n\n/***/ },\n/* 35 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// fallback for non-array-like ES3 and non-enumerable old V8 strings\n\tvar cof = __webpack_require__(36);\n\tmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n\t return cof(it) == 'String' ? it.split('') : Object(it);\n\t};\n\n/***/ },\n/* 36 */\n/***/ function(module, exports) {\n\n\tvar toString = {}.toString;\n\t\n\tmodule.exports = function(it){\n\t return toString.call(it).slice(8, -1);\n\t};\n\n/***/ },\n/* 37 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\n\tvar toIObject = __webpack_require__(34)\n\t , getNames = __webpack_require__(18).getNames\n\t , toString = {}.toString;\n\t\n\tvar windowNames = typeof window == 'object' && Object.getOwnPropertyNames\n\t ? Object.getOwnPropertyNames(window) : [];\n\t\n\tvar getWindowNames = function(it){\n\t try {\n\t return getNames(it);\n\t } catch(e){\n\t return windowNames.slice();\n\t }\n\t};\n\t\n\tmodule.exports.get = function getOwnPropertyNames(it){\n\t if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);\n\t return getNames(toIObject(it));\n\t};\n\n/***/ },\n/* 38 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// all enumerable object keys, includes symbols\n\tvar $ = __webpack_require__(18);\n\tmodule.exports = function(it){\n\t var keys = $.getKeys(it)\n\t , getSymbols = $.getSymbols;\n\t if(getSymbols){\n\t var symbols = getSymbols(it)\n\t , isEnum = $.isEnum\n\t , i = 0\n\t , key;\n\t while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);\n\t }\n\t return keys;\n\t};\n\n/***/ },\n/* 39 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// 7.2.2 IsArray(argument)\n\tvar cof = __webpack_require__(36);\n\tmodule.exports = Array.isArray || function(arg){\n\t return cof(arg) == 'Array';\n\t};\n\n/***/ },\n/* 40 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar isObject = __webpack_require__(41);\n\tmodule.exports = function(it){\n\t if(!isObject(it))throw TypeError(it + ' is not an object!');\n\t return it;\n\t};\n\n/***/ },\n/* 41 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function(it){\n\t return typeof it === 'object' ? it !== null : typeof it === 'function';\n\t};\n\n/***/ },\n/* 42 */\n/***/ function(module, exports) {\n\n\tmodule.exports = true;\n\n/***/ },\n/* 43 */\n/***/ function(module, exports) {\n\n\n\n/***/ },\n/* 44 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\texports.__esModule = true;\n\t\n\tvar _setPrototypeOf = __webpack_require__(45);\n\t\n\tvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\t\n\tvar _create = __webpack_require__(49);\n\t\n\tvar _create2 = _interopRequireDefault(_create);\n\t\n\tvar _typeof2 = __webpack_require__(20);\n\t\n\tvar _typeof3 = _interopRequireDefault(_typeof2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n\t }\n\t\n\t subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n\t constructor: {\n\t value: subClass,\n\t enumerable: false,\n\t writable: true,\n\t configurable: true\n\t }\n\t });\n\t if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n\t};\n\n/***/ },\n/* 45 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = { \"default\": __webpack_require__(46), __esModule: true };\n\n/***/ },\n/* 46 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(47);\n\tmodule.exports = __webpack_require__(10).Object.setPrototypeOf;\n\n/***/ },\n/* 47 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// 19.1.3.19 Object.setPrototypeOf(O, proto)\n\tvar $export = __webpack_require__(8);\n\t$export($export.S, 'Object', {setPrototypeOf: __webpack_require__(48).set});\n\n/***/ },\n/* 48 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// Works with __proto__ only. Old v8 can't work with null proto objects.\n\t/* eslint-disable no-proto */\n\tvar getDesc = __webpack_require__(18).getDesc\n\t , isObject = __webpack_require__(41)\n\t , anObject = __webpack_require__(40);\n\tvar check = function(O, proto){\n\t anObject(O);\n\t if(!isObject(proto) && proto !== null)throw TypeError(proto + \": can't set as prototype!\");\n\t};\n\tmodule.exports = {\n\t set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n\t function(test, buggy, set){\n\t try {\n\t set = __webpack_require__(11)(Function.call, getDesc(Object.prototype, '__proto__').set, 2);\n\t set(test, []);\n\t buggy = !(test instanceof Array);\n\t } catch(e){ buggy = true; }\n\t return function setPrototypeOf(O, proto){\n\t check(O, proto);\n\t if(buggy)O.__proto__ = proto;\n\t else set(O, proto);\n\t return O;\n\t };\n\t }({}, false) : undefined),\n\t check: check\n\t};\n\n/***/ },\n/* 49 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = { \"default\": __webpack_require__(50), __esModule: true };\n\n/***/ },\n/* 50 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar $ = __webpack_require__(18);\n\tmodule.exports = function create(P, D){\n\t return $.create(P, D);\n\t};\n\n/***/ },\n/* 51 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _classCallCheck2 = __webpack_require__(14);\n\t\n\tvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\t\n\tvar _createClass2 = __webpack_require__(15);\n\t\n\tvar _createClass3 = _interopRequireDefault(_createClass2);\n\t\n\tvar _vector2d = __webpack_require__(52);\n\t\n\tvar _vector2d2 = _interopRequireDefault(_vector2d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar Entity = (function () {\n\t function Entity(x, y) {\n\t (0, _classCallCheck3.default)(this, Entity);\n\t\n\t this.pos = new _vector2d2.default(x || 0, y || 0);\n\t\n\t this.state = {};\n\t this.children = [];\n\t\n\t this._calculatedPos = this.pos.clone();\n\t this._lastCalculated = 0;\n\t this._game = null;\n\t this._parent = null;\n\t }\n\t\n\t (0, _createClass3.default)(Entity, [{\n\t key: \"createChildEntity\",\n\t value: function createChildEntity() {\n\t\n\t var child = new Entity();\n\t\n\t child._updateGame(this._game);\n\t child._parent = this;\n\t this.children.push(child);\n\t\n\t return child;\n\t }\n\t }, {\n\t key: \"addChildEntity\",\n\t value: function addChildEntity(child) {\n\t\n\t child._updateGame(this._game);\n\t child._parent = this;\n\t this.children.push(child);\n\t\n\t return child;\n\t }\n\t }, {\n\t key: \"detachChildEntity\",\n\t value: function detachChildEntity(child) {\n\t\n\t for (var i = 0; i < this.children.length; i++) {\n\t if (this.children[i] == child) {\n\t\n\t this.children.splice(i, 1);\n\t return true;\n\t }\n\t }\n\t\n\t return false;\n\t }\n\t }, {\n\t key: \"_preprocess\",\n\t value: function _preprocess() {\n\t\n\t // NK: The purpose of this function is to calculate the true position of the entity relative to all its parents. It does this recursively, calling the _preprocess method all the way back up the tree and continuously adding the results together.\n\t\n\t // Note there is a limiter, where the last calculated frame is stored, so that if the position has already been calculated for that node in this particular frame, the cached result is used rather than recalculating.\n\t\n\t // When rendering, the draw calls should use this._calculatedPos rather than this.pos in order for the position to be correct.\n\t\n\t if (this._game && this._lastCalculated < this._game.frameCounter) {\n\t\n\t if (this._parent) {\n\t\n\t var parentPos = this._parent._preprocess();\n\t\n\t this._calculatedPos.x = this.pos.x + parentPos.x;\n\t this._calculatedPos.y = this.pos.y + parentPos.y;\n\t } else {\n\t this._calculatedPos.x = this.pos.x;\n\t this._calculatedPos.y = this.pos.y;\n\t }\n\t\n\t this._lastCalculated = this._game.frameCounter;\n\t }\n\t\n\t return this._calculatedPos;\n\t }\n\t }, {\n\t key: \"_updateGame\",\n\t value: function _updateGame(game) {\n\t\n\t this._game = game;\n\t\n\t this.children.forEach(function (child) {\n\t child._updateGame(game);\n\t });\n\t }\n\t }, {\n\t key: \"_updateEntity\",\n\t value: function _updateEntity(delta) {\n\t\n\t var updated = this.update && this.update(delta);\n\t\n\t if (updated || typeof updated == \"undefined\" || typeof this.update === \"undefined\") {\n\t\n\t this.children.forEach(function (child) {\n\t child._updateEntity(delta);\n\t });\n\t }\n\t }\n\t }, {\n\t key: \"_renderEntity\",\n\t value: function _renderEntity() {\n\t\n\t this._preprocess();\n\t\n\t var rendered = this.render && this.render();\n\t\n\t if (rendered || typeof rendered == \"undefined\" || typeof this.render === \"undefined\") {\n\t\n\t this.children.forEach(function (child) {\n\t child._renderEntity();\n\t });\n\t }\n\t }\n\t }]);\n\t return Entity;\n\t})();\n\t\n\texports.default = Entity;\n\n/***/ },\n/* 52 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _classCallCheck2 = __webpack_require__(14);\n\t\n\tvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\t\n\tvar _createClass2 = __webpack_require__(15);\n\t\n\tvar _createClass3 = _interopRequireDefault(_createClass2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar Vector2D = (function () {\n\t function Vector2D(x, y) {\n\t (0, _classCallCheck3.default)(this, Vector2D);\n\t\n\t this.x = x || 0;this.y = y || 0;\n\t }\n\t\n\t (0, _createClass3.default)(Vector2D, [{\n\t key: \"invert\",\n\t value: function invert() {\n\t this.x = -this.x;this.y = -this.y;\n\t return this;\n\t }\n\t }, {\n\t key: \"add\",\n\t value: function add(val) {\n\t\n\t if (val instanceof Vector2D) {\n\t this.x += val.x;this.y += val.y;\n\t } else {\n\t this.x += val;this.y += val;\n\t }\n\t\n\t return this;\n\t }\n\t }, {\n\t key: \"subtract\",\n\t value: function subtract(val) {\n\t\n\t if (val instanceof Vector2D) {\n\t this.x -= val.x;this.y -= val.y;\n\t } else {\n\t this.x -= val;this.y -= val;\n\t }\n\t\n\t return this;\n\t }\n\t }, {\n\t key: \"multiply\",\n\t value: function multiply(val) {\n\t\n\t if (val instanceof Vector2D) {\n\t this.x *= val.x;this.y *= val.y;\n\t } else {\n\t this.x *= val;this.y *= val;\n\t }\n\t\n\t return this;\n\t }\n\t }, {\n\t key: \"divide\",\n\t value: function divide(val) {\n\t\n\t if (val instanceof Vector2D) {\n\t this.x /= val.x;this.y /= val.y;\n\t } else {\n\t this.x /= val;this.y /= val;\n\t }\n\t\n\t return this;\n\t }\n\t }, {\n\t key: \"equals\",\n\t value: function equals(val) {\n\t return this.x == val.x && this.y == val.y;\n\t }\n\t }, {\n\t key: \"dot\",\n\t value: function dot(val) {\n\t return this.x * val.x + this.y * val.y;\n\t }\n\t }, {\n\t key: \"length\",\n\t value: function length() {\n\t return Math.sqrt(this.dot(this));\n\t }\n\t }, {\n\t key: \"unit\",\n\t value: function unit() {\n\t return this.divide(this.length());\n\t }\n\t }, {\n\t key: \"min\",\n\t value: function min() {\n\t return Math.min(this.x, this.y);\n\t }\n\t }, {\n\t key: \"max\",\n\t value: function max() {\n\t return Math.max(this.x, this.y);\n\t }\n\t }, {\n\t key: \"degrees\",\n\t value: function degrees() {\n\t return Math.atan(this.x, this.y) * 180;\n\t }\n\t }, {\n\t key: \"toArray\",\n\t value: function toArray() {\n\t return [this.x, this.y];\n\t }\n\t }, {\n\t key: \"toString\",\n\t value: function toString() {\n\t return \"[\" + this.x + \"},\" + this.y + \"}]\";\n\t }\n\t }, {\n\t key: \"clone\",\n\t value: function clone() {\n\t return new Vector2D(this.x, this.y);\n\t }\n\t }]);\n\t return Vector2D;\n\t})();\n\t\n\texports.default = Vector2D;\n\n/***/ },\n/* 53 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.KeyConsts = undefined;\n\t\n\tvar _classCallCheck2 = __webpack_require__(14);\n\t\n\tvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\t\n\tvar _createClass2 = __webpack_require__(15);\n\t\n\tvar _createClass3 = _interopRequireDefault(_createClass2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar KeyConsts = {\n\t SPACE: 32,\n\t BACKSPACE: 8,\n\t TAB: 9,\n\t ENTER: 13,\n\t SHIFT: 16,\n\t CTRL: 17,\n\t ALT: 18,\n\t PAUSE: 19,\n\t CAPS_LOCK: 20,\n\t ESCAPE: 27,\n\t PAGE_UP: 33,\n\t PAGE_DOWN: 34,\n\t END: 35,\n\t HOME: 36,\n\t LEFT: 37,\n\t UP: 38,\n\t RIGHT: 39,\n\t DOWN: 40,\n\t INSERT: 45,\n\t DELETE: 46,\n\t NUM_0: 48,\n\t NUM_1: 49,\n\t NUM_2: 50,\n\t NUM_3: 51,\n\t NUM_4: 52,\n\t NUM_5: 53,\n\t NUM_6: 54,\n\t NUM_7: 55,\n\t NUM_8: 56,\n\t NUM_9: 57,\n\t CHAR_A: 65,\n\t CHAR_B: 66,\n\t CHAR_C: 67,\n\t CHAR_D: 68,\n\t CHAR_E: 69,\n\t CHAR_F: 70,\n\t CHAR_G: 71,\n\t CHAR_H: 72,\n\t CHAR_I: 73,\n\t CHAR_J: 74,\n\t CHAR_K: 75,\n\t CHAR_L: 76,\n\t CHAR_M: 77,\n\t CHAR_N: 78,\n\t CHAR_O: 79,\n\t CHAR_P: 80,\n\t CHAR_Q: 81,\n\t CHAR_R: 82,\n\t CHAR_S: 83,\n\t CHAR_T: 84,\n\t CHAR_U: 85,\n\t CHAR_V: 86,\n\t CHAR_W: 87,\n\t CHAR_X: 88,\n\t CHAR_Y: 89,\n\t CHAR_Z: 90,\n\t NUM_PAD_0: 96,\n\t NUM_PAD_1: 97,\n\t NUM_PAD_2: 98,\n\t NUM_PAD_3: 99,\n\t NUM_PAD_4: 100,\n\t NUM_PAD_5: 101,\n\t NUM_PAD_6: 102,\n\t NUM_PAD_7: 103,\n\t NUM_PAD_8: 104,\n\t NUM_PAD_9: 105,\n\t MULTIPLY: 106,\n\t ADD: 107,\n\t SUBTRACT: 109,\n\t DECIMAL: 110,\n\t DIVIDE: 111,\n\t F1: 112,\n\t F2: 113,\n\t F3: 114,\n\t F4: 115,\n\t F5: 116,\n\t F6: 117,\n\t F7: 118,\n\t F8: 119,\n\t F9: 120,\n\t F10: 121,\n\t F11: 122,\n\t F12: 123,\n\t SEMICOLON: 186,\n\t EQUALS: 187,\n\t COMMA: 188,\n\t DASH: 189,\n\t PERIOD: 190,\n\t FORWARD_SLASH: 191,\n\t GRAVE: 192,\n\t OPEN_BRACKET: 219,\n\t BACK_SLASH: 220,\n\t CLOSE_BRACKET: 221,\n\t SINGLE_QUOTE: 222\n\t};\n\t\n\tvar KeyboardInput = (function () {\n\t function KeyboardInput() {\n\t (0, _classCallCheck3.default)(this, KeyboardInput);\n\t\n\t var self = this;\n\t self._keyState = {};\n\t\n\t window.addEventListener(\"keydown\", function (event) {\n\t self._keyDownHandler(event);\n\t }, false);\n\t\n\t window.addEventListener(\"keyup\", function (event) {\n\t self._keyUpHandler(event);\n\t }, false);\n\t }\n\t\n\t (0, _createClass3.default)(KeyboardInput, [{\n\t key: \"isPressed\",\n\t value: function isPressed(keyCode) {\n\t return !!this._keyState[keyCode];\n\t }\n\t }, {\n\t key: \"_keyDownHandler\",\n\t value: function _keyDownHandler(event) {\n\t this._keyState[event.keyCode] = true;\n\t }\n\t }, {\n\t key: \"_keyUpHandler\",\n\t value: function _keyUpHandler(event) {\n\t this._keyState[event.keyCode] = false;\n\t }\n\t }]);\n\t return KeyboardInput;\n\t})();\n\t\n\texports.default = KeyboardInput;\n\texports.KeyConsts = KeyConsts;\n\n/***/ },\n/* 54 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _getPrototypeOf = __webpack_require__(2);\n\t\n\tvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\t\n\tvar _classCallCheck2 = __webpack_require__(14);\n\t\n\tvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\t\n\tvar _createClass2 = __webpack_require__(15);\n\t\n\tvar _createClass3 = _interopRequireDefault(_createClass2);\n\t\n\tvar _possibleConstructorReturn2 = __webpack_require__(19);\n\t\n\tvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\t\n\tvar _inherits2 = __webpack_require__(44);\n\t\n\tvar _inherits3 = _interopRequireDefault(_inherits2);\n\t\n\tvar _entity = __webpack_require__(51);\n\t\n\tvar _entity2 = _interopRequireDefault(_entity);\n\t\n\tvar _vector2d = __webpack_require__(52);\n\t\n\tvar _vector2d2 = _interopRequireDefault(_vector2d);\n\t\n\tvar _imageloader = __webpack_require__(55);\n\t\n\tvar _imageloader2 = _interopRequireDefault(_imageloader);\n\t\n\tvar _collisionmethods = __webpack_require__(56);\n\t\n\tvar _collisionmethods2 = _interopRequireDefault(_collisionmethods);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar Sprite = (function (_Entity) {\n\t (0, _inherits3.default)(Sprite, _Entity);\n\t\n\t function Sprite(x, y, width, height, image) {\n\t (0, _classCallCheck3.default)(this, Sprite);\n\t\n\t if (!image instanceof _imageloader2.default) {\n\t throw new Error(\"MomentumEngine.Classes.Sprite must be instantiated with an ImageLoader instance\");\n\t }\n\t\n\t var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(Sprite).call(this, x, y));\n\t\n\t _this.size = new _vector2d2.default(width || 0, height || 0);\n\t\n\t _this._image = image;\n\t _this._imagePos = new _vector2d2.default(0, 0);\n\t _this._imageSize = new _vector2d2.default(0, 0);\n\t\n\t return _this;\n\t }\n\t\n\t (0, _createClass3.default)(Sprite, [{\n\t key: \"setImageCoords\",\n\t value: function setImageCoords(x, y, width, height) {\n\t\n\t this._imagePos.x = x;\n\t this._imagePos.y = y;\n\t this._imageSize.x = width || 0;\n\t this._imageSize.y = height || 0;\n\t }\n\t }, {\n\t key: \"isReady\",\n\t value: function isReady() {\n\t return this._image.isLoaded() && !this._image.isError();\n\t }\n\t }, {\n\t key: \"render\",\n\t value: function render() {\n\t\n\t if (this.isReady() && this._game) {\n\t\n\t var imageObj = this._image.getImageObj();\n\t\n\t var subWidth = imageObj.width - this._imagePos.x,\n\t subHeight = imageObj.height - this._imagePos.y;\n\t\n\t this._game.context.drawImage(imageObj, this._imagePos.x, this._imagePos.y, this._imageSize.x || subWidth, this._imageSize.y || subHeight, this._calculatedPos.x, this._calculatedPos.y, this.size.x || subWidth, this.size.y || subHeight);\n\t\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t }\n\t }]);\n\t return Sprite;\n\t})(_entity2.default);\n\t\n\texports.default = Sprite;\n\n/***/ },\n/* 55 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _classCallCheck2 = __webpack_require__(14);\n\t\n\tvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\t\n\tvar _createClass2 = __webpack_require__(15);\n\t\n\tvar _createClass3 = _interopRequireDefault(_createClass2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar ImageLoader = (function () {\n\t function ImageLoader(src) {\n\t var _this = this;\n\t\n\t (0, _classCallCheck3.default)(this, ImageLoader);\n\t\n\t this._loaded = false; // Default is true, set it to false until the image has loaded\n\t this._error = false; // If the image fails to load, this will contain the reason\n\t\n\t this._imageObj = new Image();\n\t\n\t this._imageObj.addEventListener(\"load\", function () {\n\t _this._loaded = true;\n\t _this._error = false;\n\t });\n\t\n\t this._imageObj.addEventListener(\"_error\", function (err) {\n\t _this._loaded = false;\n\t _this._error = err;\n\t });\n\t\n\t this._imageObj.src = src;\n\t }\n\t\n\t (0, _createClass3.default)(ImageLoader, [{\n\t key: \"getImageObj\",\n\t value: function getImageObj() {\n\t\n\t if (this._loaded) {\n\t return this._imageObj;\n\t } else {\n\t return false;\n\t }\n\t }\n\t }, {\n\t key: \"isLoaded\",\n\t value: function isLoaded() {\n\t return this._loaded;\n\t }\n\t }, {\n\t key: \"isError\",\n\t value: function isError() {\n\t return this._error;\n\t }\n\t }]);\n\t return ImageLoader;\n\t})();\n\t\n\texports.default = ImageLoader;\n\n/***/ },\n/* 56 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _classCallCheck2 = __webpack_require__(14);\n\t\n\tvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\t\n\tvar _createClass2 = __webpack_require__(15);\n\t\n\tvar _createClass3 = _interopRequireDefault(_createClass2);\n\t\n\tvar _rect = __webpack_require__(57);\n\t\n\tvar _rect2 = _interopRequireDefault(_rect);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar CollisionMethods = (function () {\n\t function CollisionMethods() {\n\t (0, _classCallCheck3.default)(this, CollisionMethods);\n\t }\n\t\n\t (0, _createClass3.default)(CollisionMethods, null, [{\n\t key: \"AABB\",\n\t value: function AABB(entity1, entity2) {\n\t\n\t if (!entity1 instanceof _rect2.default || !entity2 instanceof _rect2.default) {\n\t throw new Error(\"AABB collisions can only be checked on these entity types: Rect\");\n\t }\n\t\n\t return entity1.pos.x < entity2.pos.x + entity2.size.x && entity1.pos.x + entity1.size.x > entity2.pos.x && entity1.pos.y < entity2.pos.y + entity2.size.y && entity1.size.y + entity1.pos.y > entity2.pos.y;\n\t }\n\t }]);\n\t return CollisionMethods;\n\t})();\n\t\n\texports.default = CollisionMethods;\n\n/***/ },\n/* 57 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _getPrototypeOf = __webpack_require__(2);\n\t\n\tvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\t\n\tvar _classCallCheck2 = __webpack_require__(14);\n\t\n\tvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\t\n\tvar _createClass2 = __webpack_require__(15);\n\t\n\tvar _createClass3 = _interopRequireDefault(_createClass2);\n\t\n\tvar _possibleConstructorReturn2 = __webpack_require__(19);\n\t\n\tvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\t\n\tvar _inherits2 = __webpack_require__(44);\n\t\n\tvar _inherits3 = _interopRequireDefault(_inherits2);\n\t\n\tvar _entity = __webpack_require__(51);\n\t\n\tvar _entity2 = _interopRequireDefault(_entity);\n\t\n\tvar _vector2d = __webpack_require__(52);\n\t\n\tvar _vector2d2 = _interopRequireDefault(_vector2d);\n\t\n\tvar _collisionmethods = __webpack_require__(56);\n\t\n\tvar _collisionmethods2 = _interopRequireDefault(_collisionmethods);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar Rect = (function (_Entity) {\n\t (0, _inherits3.default)(Rect, _Entity);\n\t\n\t function Rect(x, y, width, height, color) {\n\t (0, _classCallCheck3.default)(this, Rect);\n\t\n\t var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(Rect).call(this, x, y));\n\t\n\t _this.size = new _vector2d2.default(width, height);\n\t _this.color = color;\n\t\n\t return _this;\n\t }\n\t\n\t (0, _createClass3.default)(Rect, [{\n\t key: \"isCollidingWith\",\n\t value: function isCollidingWith(entity) {\n\t\n\t if (entity instanceof Rect) {\n\t return _collisionmethods2.default.AABB(this, entity);\n\t }\n\t }\n\t }, {\n\t key: \"render\",\n\t value: function render() {\n\t\n\t if (this._game) {\n\t\n\t this._game.context.fillStyle = this.color.toString();\n\t this._game.context.fillRect(this._calculatedPos.x, this._calculatedPos.y, this.size.x, this.size.y);\n\t\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t }\n\t }]);\n\t return Rect;\n\t})(_entity2.default);\n\t\n\texports.default = Rect;\n\n/***/ },\n/* 58 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _classCallCheck2 = __webpack_require__(14);\n\t\n\tvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\t\n\tvar _createClass2 = __webpack_require__(15);\n\t\n\tvar _createClass3 = _interopRequireDefault(_createClass2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar Color = (function () {\n\t function Color(r, g, b, a) {\n\t (0, _classCallCheck3.default)(this, Color);\n\t\n\t this.r = r || 0;\n\t this.g = g || 0;\n\t this.b = b || 0;\n\t this.a = a || 1;\n\t }\n\t\n\t (0, _createClass3.default)(Color, [{\n\t key: \"toString\",\n\t value: function toString() {\n\t return \"rgba(\" + this.r + \", \" + this.g + \", \" + this.b + \", \" + this.a + \")\";\n\t }\n\t }, {\n\t key: \"toHex\",\n\t value: function toHex() {\n\t return \"#\" + (r << 16 | g << 8 | b).toString(16);\n\t }\n\t }]);\n\t return Color;\n\t})();\n\t\n\texports.default = Color;\n\n/***/ }\n/******/ ]);\n\n\n/** WEBPACK FOOTER **\n ** es5.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 014dcd592af794c60cf3\n **/","\"use strict\";\n\nimport Game from \"./classes/game.js\";\nimport Entity from \"./classes/entity.js\";\nimport Vector2D from \"./classes/vector2d.js\";\nimport Sprite from \"./classes/sprite.js\";\nimport Rect from \"./classes/rect.js\";\nimport Color from \"./classes/color.js\";\nimport ImageLoader from \"./classes/imageloader.js\";\n\nimport {KeyConsts} from \"./classes/keyboardinput.js\";\n\n\nconst Classes = {\n Game: Game,\n Entity: Entity,\n Sprite: Sprite,\n Rect: Rect,\n Vector2D: Vector2D,\n Color: Color,\n ImageLoader: ImageLoader\n};\n\n\nconst Consts = {\n Input: {\n Keys: KeyConsts\n }\n};\n\n\nwindow.MomentumEngine = {\n Classes: Classes,\n Consts: Consts\n};\n\n\n/** WEBPACK FOOTER **\n ** ./src/es5.js\n **/","\"use strict\";\n\nimport Entity from \"./entity.js\";\nimport KeyboardInput from \"./keyboardinput.js\";\n\nclass Game extends Entity {\n\n\n constructor (config) {\n\n super(); // Call entity constructor\n config = config || {};\n config.inputs = config.inputs || {};\n\n\n // Required params\n if (config.canvas) {\n this.canvas = config.canvas;\n } else {\n throw new Error(\"MomentumEngine.Classes.Game must be constructed with a canvas\");\n }\n\n if (config.width) {\n this.width = config.width;\n } else {\n throw new Error(\"MomentumEngine.Classes.Game must be constructed with canvas width\");\n }\n\n if (config.height) {\n this.height = config.height;\n } else {\n throw new Error(\"MomentumEngine.Classes.Game must be constructed with canvas height\");\n }\n\n\n // Optional params\n this.desiredFps = config.desiredFps || 60;\n\n if (config.fixRatio) {\n\n let deviceRatio = window.devicePixelRatio,\n backingStoreRatio = 0;\n\n // Unfortunately Ejecta requires calling getContext last, so we cannot get the backingStorePixelRatio. So for Ejecta's case, we set it to 1, and call getContext later.\n if (typeof ejecta !== \"undefined\") {\n backingStoreRatio = 1;\n } else {\n\n this.context = this.canvas.getContext(\"2d\");\n\n backingStoreRatio = this.context.webkitBackingStorePixelRatio ||\n this.context.mozBackingStorePixelRatio ||\n this.context.msBackingStorePixelRatio ||\n this.context.oBackingStorePixelRatio ||\n this.context.backingStorePixelRatio || 1;\n\n }\n\n this.scale = deviceRatio / backingStoreRatio;\n\n this.canvas.width = this.width * this.scale;\n this.canvas.height = this.height * this.scale;\n\n this.canvas.style.width = this.width + \"px\";\n this.canvas.style.height = this.height + \"px\";\n\n // Call getContext last for Ejecta only.\n if (typeof ejecta !== \"undefined\") {\n this.context = this.canvas.getContext(\"2d\");\n }\n\n this.context.scale(deviceRatio, deviceRatio);\n\n } else {\n\n this.canvas.width = this.width;\n this.canvas.height = this.height;\n\n this.context = this.canvas.getContext(\"2d\");\n\n }\n\n if (typeof this.context.imageSmoothingEnabled !== \"undefined\") {\n this.context.imageSmoothingEnabled = config.imageSmoothing || false;\n }\n\n\n // Initialize defaults\n this.frameCounter = 0;\n\n this.inputs = {};\n if (config.inputs.keyboard) {\n this.inputs.keyboard = new KeyboardInput(this);\n }\n\n this._game = this;\n this._lastFrameTimestamp = 0;\n this._wantPause = true;\n\n }\n\n\n step (delta) {\n\n this.frameCounter++;\n\n this._updateEntity(delta);\n this._renderEntity();\n\n }\n\n\n start () {\n\n var self = this; // NK: Hate doing this...better way plz?\n\n if (self._wantPause) {\n self._wantPause = false;\n } else {\n console.log(\"MomentumEngine.Classes.Game.start called, game instance is already started\");\n return false; // Game is already running\n }\n\n self._wantPause = false;\n\n var requestFrame = (() => {\n\n return (window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n function (callback) {\n window.setTimeout(callback, 1000 / self.desiredFps);\n });\n\n })();\n\n self._lastFrameTimestamp = +(new Date());\n self.startTime = self._lastFrameTimestamp;\n\n var loop = function () {\n\n if (self._wantPause) {\n return;\n }\n\n let currentTimestamp = +(new Date()),\n delta = currentTimestamp - self._lastFrameTimestamp;\n\n delta = Math.min(delta, 1000 / self.desiredFps);\n self._lastFrameTimestamp = currentTimestamp;\n\n self.step(delta);\n\n requestFrame(loop);\n\n };\n\n loop();\n return true;\n\n }\n\n\n pause () {\n\n if (!this._wantPause) {\n this._wantPause = true;\n return true;\n } else {\n console.log(\"MomentumEngine.Classes.Game.pause called, game instance is already paused\");\n return false;\n }\n }\n\n\n}\n\n\nexport default Game;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/game.js\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/get-prototype-of\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/get-prototype-of.js\n ** module id = 2\n ** module chunks = 0\n **/","require('../../modules/es6.object.get-prototype-of');\nmodule.exports = require('../../modules/$.core').Object.getPrototypeOf;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/fn/object/get-prototype-of.js\n ** module id = 3\n ** module chunks = 0\n **/","// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = require('./$.to-object');\n\nrequire('./$.object-sap')('getPrototypeOf', function($getPrototypeOf){\n return function getPrototypeOf(it){\n return $getPrototypeOf(toObject(it));\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.object.get-prototype-of.js\n ** module id = 4\n ** module chunks = 0\n **/","// 7.1.13 ToObject(argument)\nvar defined = require('./$.defined');\nmodule.exports = function(it){\n return Object(defined(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.to-object.js\n ** module id = 5\n ** module chunks = 0\n **/","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.defined.js\n ** module id = 6\n ** module chunks = 0\n **/","// most Object methods by ES6 should accept primitives\nvar $export = require('./$.export')\n , core = require('./$.core')\n , fails = require('./$.fails');\nmodule.exports = function(KEY, exec){\n var fn = (core.Object || {})[KEY] || Object[KEY]\n , exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.object-sap.js\n ** module id = 7\n ** module chunks = 0\n **/","var global = require('./$.global')\n , core = require('./$.core')\n , ctx = require('./$.ctx')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && key in target;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(param){\n return this instanceof C ? new C(param) : C(param);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\nmodule.exports = $export;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.export.js\n ** module id = 8\n ** module chunks = 0\n **/","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.global.js\n ** module id = 9\n ** module chunks = 0\n **/","var core = module.exports = {version: '1.2.6'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.core.js\n ** module id = 10\n ** module chunks = 0\n **/","// optional / simple context binding\nvar aFunction = require('./$.a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.ctx.js\n ** module id = 11\n ** module chunks = 0\n **/","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.a-function.js\n ** module id = 12\n ** module chunks = 0\n **/","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.fails.js\n ** module id = 13\n ** module chunks = 0\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/classCallCheck.js\n ** module id = 14\n ** module chunks = 0\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = (function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n})();\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/createClass.js\n ** module id = 15\n ** module chunks = 0\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/define-property.js\n ** module id = 16\n ** module chunks = 0\n **/","var $ = require('../../modules/$');\nmodule.exports = function defineProperty(it, key, desc){\n return $.setDesc(it, key, desc);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/fn/object/define-property.js\n ** module id = 17\n ** module chunks = 0\n **/","var $Object = Object;\nmodule.exports = {\n create: $Object.create,\n getProto: $Object.getPrototypeOf,\n isEnum: {}.propertyIsEnumerable,\n getDesc: $Object.getOwnPropertyDescriptor,\n setDesc: $Object.defineProperty,\n setDescs: $Object.defineProperties,\n getKeys: $Object.keys,\n getNames: $Object.getOwnPropertyNames,\n getSymbols: $Object.getOwnPropertySymbols,\n each: [].forEach\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.js\n ** module id = 18\n ** module chunks = 0\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/possibleConstructorReturn.js\n ** module id = 19\n ** module chunks = 0\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { return obj && typeof _Symbol !== \"undefined\" && obj.constructor === _Symbol ? \"symbol\" : typeof obj; }\n\nexports.default = function (obj) {\n return obj && typeof _symbol2.default !== \"undefined\" && obj.constructor === _symbol2.default ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/typeof.js\n ** module id = 20\n ** module chunks = 0\n **/","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/symbol.js\n ** module id = 21\n ** module chunks = 0\n **/","require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nmodule.exports = require('../../modules/$.core').Symbol;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/fn/symbol/index.js\n ** module id = 22\n ** module chunks = 0\n **/","'use strict';\n// ECMAScript 6 symbols shim\nvar $ = require('./$')\n , global = require('./$.global')\n , has = require('./$.has')\n , DESCRIPTORS = require('./$.descriptors')\n , $export = require('./$.export')\n , redefine = require('./$.redefine')\n , $fails = require('./$.fails')\n , shared = require('./$.shared')\n , setToStringTag = require('./$.set-to-string-tag')\n , uid = require('./$.uid')\n , wks = require('./$.wks')\n , keyOf = require('./$.keyof')\n , $names = require('./$.get-names')\n , enumKeys = require('./$.enum-keys')\n , isArray = require('./$.is-array')\n , anObject = require('./$.an-object')\n , toIObject = require('./$.to-iobject')\n , createDesc = require('./$.property-desc')\n , getDesc = $.getDesc\n , setDesc = $.setDesc\n , _create = $.create\n , getNames = $names.get\n , $Symbol = global.Symbol\n , $JSON = global.JSON\n , _stringify = $JSON && $JSON.stringify\n , setter = false\n , HIDDEN = wks('_hidden')\n , isEnum = $.isEnum\n , SymbolRegistry = shared('symbol-registry')\n , AllSymbols = shared('symbols')\n , useNative = typeof $Symbol == 'function'\n , ObjectProto = Object.prototype;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function(){\n return _create(setDesc({}, 'a', {\n get: function(){ return setDesc(this, 'a', {value: 7}).a; }\n })).a != 7;\n}) ? function(it, key, D){\n var protoDesc = getDesc(ObjectProto, key);\n if(protoDesc)delete ObjectProto[key];\n setDesc(it, key, D);\n if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);\n} : setDesc;\n\nvar wrap = function(tag){\n var sym = AllSymbols[tag] = _create($Symbol.prototype);\n sym._k = tag;\n DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {\n configurable: true,\n set: function(value){\n if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n }\n });\n return sym;\n};\n\nvar isSymbol = function(it){\n return typeof it == 'symbol';\n};\n\nvar $defineProperty = function defineProperty(it, key, D){\n if(D && has(AllSymbols, key)){\n if(!D.enumerable){\n if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n D = _create(D, {enumerable: createDesc(0, false)});\n } return setSymbolDesc(it, key, D);\n } return setDesc(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P){\n anObject(it);\n var keys = enumKeys(P = toIObject(P))\n , i = 0\n , l = keys.length\n , key;\n while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P){\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n var E = isEnum.call(this, key);\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]\n ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n var D = getDesc(it = toIObject(it), key);\n if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n var names = getNames(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);\n return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n var names = getNames(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);\n return result;\n};\nvar $stringify = function stringify(it){\n if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\n var args = [it]\n , i = 1\n , $$ = arguments\n , replacer, $replacer;\n while($$.length > i)args.push($$[i++]);\n replacer = args[1];\n if(typeof replacer == 'function')$replacer = replacer;\n if($replacer || !isArray(replacer))replacer = function(key, value){\n if($replacer)value = $replacer.call(this, key, value);\n if(!isSymbol(value))return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n};\nvar buggyJSON = $fails(function(){\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n});\n\n// 19.4.1.1 Symbol([description])\nif(!useNative){\n $Symbol = function Symbol(){\n if(isSymbol(this))throw TypeError('Symbol is not a constructor');\n return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));\n };\n redefine($Symbol.prototype, 'toString', function toString(){\n return this._k;\n });\n\n isSymbol = function(it){\n return it instanceof $Symbol;\n };\n\n $.create = $create;\n $.isEnum = $propertyIsEnumerable;\n $.getDesc = $getOwnPropertyDescriptor;\n $.setDesc = $defineProperty;\n $.setDescs = $defineProperties;\n $.getNames = $names.get = $getOwnPropertyNames;\n $.getSymbols = $getOwnPropertySymbols;\n\n if(DESCRIPTORS && !require('./$.library')){\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n}\n\nvar symbolStatics = {\n // 19.4.2.1 Symbol.for(key)\n 'for': function(key){\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key){\n return keyOf(SymbolRegistry, key);\n },\n useSetter: function(){ setter = true; },\n useSimple: function(){ setter = false; }\n};\n// 19.4.2.2 Symbol.hasInstance\n// 19.4.2.3 Symbol.isConcatSpreadable\n// 19.4.2.4 Symbol.iterator\n// 19.4.2.6 Symbol.match\n// 19.4.2.8 Symbol.replace\n// 19.4.2.9 Symbol.search\n// 19.4.2.10 Symbol.species\n// 19.4.2.11 Symbol.split\n// 19.4.2.12 Symbol.toPrimitive\n// 19.4.2.13 Symbol.toStringTag\n// 19.4.2.14 Symbol.unscopables\n$.each.call((\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +\n 'species,split,toPrimitive,toStringTag,unscopables'\n).split(','), function(it){\n var sym = wks(it);\n symbolStatics[it] = useNative ? sym : wrap(sym);\n});\n\nsetter = true;\n\n$export($export.G + $export.W, {Symbol: $Symbol});\n\n$export($export.S, 'Symbol', symbolStatics);\n\n$export($export.S + $export.F * !useNative, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});\n\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.symbol.js\n ** module id = 23\n ** module chunks = 0\n **/","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function(it, key){\n return hasOwnProperty.call(it, key);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.has.js\n ** module id = 24\n ** module chunks = 0\n **/","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./$.fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.descriptors.js\n ** module id = 25\n ** module chunks = 0\n **/","module.exports = require('./$.hide');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.redefine.js\n ** module id = 26\n ** module chunks = 0\n **/","var $ = require('./$')\n , createDesc = require('./$.property-desc');\nmodule.exports = require('./$.descriptors') ? function(object, key, value){\n return $.setDesc(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.hide.js\n ** module id = 27\n ** module chunks = 0\n **/","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.property-desc.js\n ** module id = 28\n ** module chunks = 0\n **/","var global = require('./$.global')\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.shared.js\n ** module id = 29\n ** module chunks = 0\n **/","var def = require('./$').setDesc\n , has = require('./$.has')\n , TAG = require('./$.wks')('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.set-to-string-tag.js\n ** module id = 30\n ** module chunks = 0\n **/","var store = require('./$.shared')('wks')\n , uid = require('./$.uid')\n , Symbol = require('./$.global').Symbol;\nmodule.exports = function(name){\n return store[name] || (store[name] =\n Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.wks.js\n ** module id = 31\n ** module chunks = 0\n **/","var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.uid.js\n ** module id = 32\n ** module chunks = 0\n **/","var $ = require('./$')\n , toIObject = require('./$.to-iobject');\nmodule.exports = function(object, el){\n var O = toIObject(object)\n , keys = $.getKeys(O)\n , length = keys.length\n , index = 0\n , key;\n while(length > index)if(O[key = keys[index++]] === el)return key;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.keyof.js\n ** module id = 33\n ** module chunks = 0\n **/","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./$.iobject')\n , defined = require('./$.defined');\nmodule.exports = function(it){\n return IObject(defined(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.to-iobject.js\n ** module id = 34\n ** module chunks = 0\n **/","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./$.cof');\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.iobject.js\n ** module id = 35\n ** module chunks = 0\n **/","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.cof.js\n ** module id = 36\n ** module chunks = 0\n **/","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./$.to-iobject')\n , getNames = require('./$').getNames\n , toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function(it){\n try {\n return getNames(it);\n } catch(e){\n return windowNames.slice();\n }\n};\n\nmodule.exports.get = function getOwnPropertyNames(it){\n if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);\n return getNames(toIObject(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.get-names.js\n ** module id = 37\n ** module chunks = 0\n **/","// all enumerable object keys, includes symbols\nvar $ = require('./$');\nmodule.exports = function(it){\n var keys = $.getKeys(it)\n , getSymbols = $.getSymbols;\n if(getSymbols){\n var symbols = getSymbols(it)\n , isEnum = $.isEnum\n , i = 0\n , key;\n while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);\n }\n return keys;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.enum-keys.js\n ** module id = 38\n ** module chunks = 0\n **/","// 7.2.2 IsArray(argument)\nvar cof = require('./$.cof');\nmodule.exports = Array.isArray || function(arg){\n return cof(arg) == 'Array';\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.is-array.js\n ** module id = 39\n ** module chunks = 0\n **/","var isObject = require('./$.is-object');\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.an-object.js\n ** module id = 40\n ** module chunks = 0\n **/","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.is-object.js\n ** module id = 41\n ** module chunks = 0\n **/","module.exports = true;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.library.js\n ** module id = 42\n ** module chunks = 0\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = require(\"../core-js/object/set-prototype-of\");\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = require(\"../core-js/object/create\");\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/inherits.js\n ** module id = 44\n ** module chunks = 0\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/set-prototype-of\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/set-prototype-of.js\n ** module id = 45\n ** module chunks = 0\n **/","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/$.core').Object.setPrototypeOf;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/fn/object/set-prototype-of.js\n ** module id = 46\n ** module chunks = 0\n **/","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./$.export');\n$export($export.S, 'Object', {setPrototypeOf: require('./$.set-proto').set});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.object.set-prototype-of.js\n ** module id = 47\n ** module chunks = 0\n **/","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar getDesc = require('./$').getDesc\n , isObject = require('./$.is-object')\n , anObject = require('./$.an-object');\nvar check = function(O, proto){\n anObject(O);\n if(!isObject(proto) && proto !== null)throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function(test, buggy, set){\n try {\n set = require('./$.ctx')(Function.call, getDesc(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch(e){ buggy = true; }\n return function setPrototypeOf(O, proto){\n check(O, proto);\n if(buggy)O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.set-proto.js\n ** module id = 48\n ** module chunks = 0\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/create\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/create.js\n ** module id = 49\n ** module chunks = 0\n **/","var $ = require('../../modules/$');\nmodule.exports = function create(P, D){\n return $.create(P, D);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/fn/object/create.js\n ** module id = 50\n ** module chunks = 0\n **/","\"use strict\";\n\nimport Vector2D from \"./vector2d.js\";\n\nclass Entity {\n\n\n constructor (x, y) {\n\n this.pos = new Vector2D(x || 0, y || 0);\n\n this.state = {};\n this.children = [];\n\n this._calculatedPos = this.pos.clone();\n this._lastCalculated = 0;\n this._game = null;\n this._parent = null;\n\n }\n\n\n createChildEntity () {\n\n let child = new Entity();\n\n child._updateGame(this._game);\n child._parent = this;\n this.children.push(child);\n\n return child;\n\n }\n\n\n addChildEntity (child) {\n\n child._updateGame(this._game);\n child._parent = this;\n this.children.push(child);\n\n return child;\n\n }\n\n\n detachChildEntity (child) {\n\n for (var i = 0; i < this.children.length; i++) {\n if (this.children[i] == child) {\n\n this.children.splice(i, 1);\n return true;\n\n }\n }\n\n return false;\n\n }\n\n\n _preprocess () {\n\n // NK: The purpose of this function is to calculate the true position of the entity relative to all its parents. It does this recursively, calling the _preprocess method all the way back up the tree and continuously adding the results together.\n\n // Note there is a limiter, where the last calculated frame is stored, so that if the position has already been calculated for that node in this particular frame, the cached result is used rather than recalculating.\n\n // When rendering, the draw calls should use this._calculatedPos rather than this.pos in order for the position to be correct.\n\n if (this._game && this._lastCalculated < this._game.frameCounter) {\n\n if (this._parent) {\n\n let parentPos = this._parent._preprocess();\n\n this._calculatedPos.x = this.pos.x + parentPos.x;\n this._calculatedPos.y = this.pos.y + parentPos.y;\n\n } else {\n this._calculatedPos.x = this.pos.x;\n this._calculatedPos.y = this.pos.y;\n }\n\n this._lastCalculated = this._game.frameCounter;\n\n }\n\n return this._calculatedPos;\n\n }\n\n\n _updateGame (game) {\n\n this._game = game;\n\n this.children.forEach((child) => {\n child._updateGame(game);\n });\n\n }\n\n\n _updateEntity (delta) {\n\n var updated = this.update && this.update(delta);\n\n if (updated || (typeof updated == \"undefined\") || (typeof this.update === \"undefined\")) {\n\n this.children.forEach((child) => {\n child._updateEntity(delta);\n });\n\n }\n\n }\n\n\n _renderEntity () {\n\n this._preprocess();\n\n var rendered = this.render && this.render();\n\n if (rendered || (typeof rendered == \"undefined\") || (typeof this.render === \"undefined\")) {\n\n this.children.forEach((child) => {\n child._renderEntity();\n });\n\n }\n\n }\n\n\n}\n\n\nexport default Entity;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/entity.js\n **/","\"use strict\";\n\nclass Vector2D {\n\n\n constructor (x, y) {\n this.x = x || 0; this.y = y || 0;\n }\n\n\n invert () {\n this.x = -this.x; this.y = -this.y;\n return this;\n }\n\n\n add (val) {\n\n if (val instanceof Vector2D) {\n this.x += val.x; this.y += val.y;\n } else {\n this.x += val; this.y += val;\n }\n\n return this;\n\n }\n\n\n subtract (val) {\n\n if (val instanceof Vector2D) {\n this.x -= val.x; this.y -= val.y;\n } else {\n this.x -= val; this.y -= val;\n }\n\n return this;\n\n }\n\n\n multiply (val) {\n\n if (val instanceof Vector2D) {\n this.x *= val.x; this.y *= val.y;\n } else {\n this.x *= val; this.y *= val;\n }\n\n return this;\n\n }\n\n\n divide (val) {\n\n if (val instanceof Vector2D) {\n this.x /= val.x; this.y /= val.y;\n } else {\n this.x /= val; this.y /= val;\n }\n\n return this;\n\n }\n\n\n equals (val) {\n return (this.x == val.x && this.y == val.y);\n }\n\n\n dot (val) {\n return (this.x * val.x + this.y * val.y);\n }\n\n\n length () {\n return Math.sqrt(this.dot(this));\n }\n\n\n unit () {\n return this.divide(this.length());\n }\n\n\n min () {\n return Math.min(this.x, this.y);\n }\n\n\n max () {\n return Math.max(this.x, this.y);\n }\n\n\n degrees () {\n return (Math.atan(this.x, this.y) * 180);\n }\n\n\n toArray () {\n return [this.x, this.y];\n }\n\n\n toString () {\n return `[${this.x}},${this.y}}]`;\n }\n\n\n clone () {\n return new Vector2D(this.x, this.y);\n }\n\n\n}\n\n\nexport default Vector2D;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/vector2d.js\n **/","\"use strict\";\n\n\nconst KeyConsts = {\n SPACE: 32,\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n SHIFT: 16,\n CTRL: 17,\n ALT: 18,\n PAUSE: 19,\n CAPS_LOCK: 20,\n ESCAPE: 27,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n INSERT: 45,\n DELETE: 46,\n NUM_0: 48,\n NUM_1: 49,\n NUM_2: 50,\n NUM_3: 51,\n NUM_4: 52,\n NUM_5: 53,\n NUM_6: 54,\n NUM_7: 55,\n NUM_8: 56,\n NUM_9: 57,\n CHAR_A: 65,\n CHAR_B: 66,\n CHAR_C: 67,\n CHAR_D: 68,\n CHAR_E: 69,\n CHAR_F: 70,\n CHAR_G: 71,\n CHAR_H: 72,\n CHAR_I: 73,\n CHAR_J: 74,\n CHAR_K: 75,\n CHAR_L: 76,\n CHAR_M: 77,\n CHAR_N: 78,\n CHAR_O: 79,\n CHAR_P: 80,\n CHAR_Q: 81,\n CHAR_R: 82,\n CHAR_S: 83,\n CHAR_T: 84,\n CHAR_U: 85,\n CHAR_V: 86,\n CHAR_W: 87,\n CHAR_X: 88,\n CHAR_Y: 89,\n CHAR_Z: 90,\n NUM_PAD_0: 96,\n NUM_PAD_1: 97,\n NUM_PAD_2: 98,\n NUM_PAD_3: 99,\n NUM_PAD_4: 100,\n NUM_PAD_5: 101,\n NUM_PAD_6: 102,\n NUM_PAD_7: 103,\n NUM_PAD_8: 104,\n NUM_PAD_9: 105,\n MULTIPLY: 106,\n ADD: 107,\n SUBTRACT: 109,\n DECIMAL: 110,\n DIVIDE: 111,\n F1: 112,\n F2: 113,\n F3: 114,\n F4: 115,\n F5: 116,\n F6: 117,\n F7: 118,\n F8: 119,\n F9: 120,\n F10: 121,\n F11: 122,\n F12: 123,\n SEMICOLON: 186,\n EQUALS: 187,\n COMMA: 188,\n DASH: 189,\n PERIOD: 190,\n FORWARD_SLASH: 191,\n GRAVE: 192,\n OPEN_BRACKET: 219,\n BACK_SLASH: 220,\n CLOSE_BRACKET: 221,\n SINGLE_QUOTE: 222\n};\n\n\nclass KeyboardInput {\n\n\n constructor () {\n\n var self = this;\n self._keyState = {};\n\n window.addEventListener(\"keydown\", (event) => {\n self._keyDownHandler(event);\n }, false);\n\n window.addEventListener(\"keyup\", (event) => {\n self._keyUpHandler(event);\n }, false);\n\n }\n\n\n isPressed (keyCode) {\n return !!this._keyState[keyCode];\n }\n\n\n _keyDownHandler (event) {\n this._keyState[event.keyCode] = true;\n }\n\n\n _keyUpHandler (event) {\n this._keyState[event.keyCode] = false;\n }\n\n\n}\n\n\nexport default KeyboardInput;\nexport {KeyConsts};\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/keyboardinput.js\n **/","\"use strict\";\n\nimport Entity from \"./entity.js\";\nimport Vector2D from \"./vector2d.js\";\nimport ImageLoader from \"./imageloader.js\";\n\nimport CollisionMethods from \"../libs/collisionmethods.js\";\n\n\nclass Sprite extends Entity {\n\n\n constructor (x, y, width, height, image) {\n\n if (!image instanceof ImageLoader) {\n throw new Error(\"MomentumEngine.Classes.Sprite must be instantiated with an ImageLoader instance\");\n }\n\n super(x, y);\n\n this.size = new Vector2D(width || 0, height || 0);\n\n this._image = image;\n this._imagePos = new Vector2D(0, 0);\n this._imageSize = new Vector2D(0, 0);\n\n }\n\n\n setImageCoords (x, y, width, height) {\n\n this._imagePos.x = x;\n this._imagePos.y = y;\n this._imageSize.x = width || 0;\n this._imageSize.y = height || 0;\n\n }\n\n\n isReady () {\n return (this._image.isLoaded() && !this._image.isError());\n }\n\n\n render () {\n\n if (this.isReady() && this._game) {\n\n var imageObj = this._image.getImageObj();\n\n var subWidth = imageObj.width - this._imagePos.x,\n subHeight = imageObj.height - this._imagePos.y;\n\n this._game.context.drawImage(\n imageObj,\n this._imagePos.x,\n this._imagePos.y,\n this._imageSize.x || subWidth,\n this._imageSize.y || subHeight,\n this._calculatedPos.x,\n this._calculatedPos.y,\n this.size.x || subWidth,\n this.size.y || subHeight\n );\n\n return true;\n\n } else {\n return false;\n }\n\n }\n\n\n}\n\n\nexport default Sprite;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/sprite.js\n **/","\"use strict\";\n\nclass ImageLoader {\n\n\n constructor (src) {\n\n this._loaded = false; // Default is true, set it to false until the image has loaded\n this._error = false; // If the image fails to load, this will contain the reason\n\n this._imageObj = new Image();\n\n this._imageObj.addEventListener(\"load\", () => {\n this._loaded = true;\n this._error = false;\n });\n\n this._imageObj.addEventListener(\"_error\", (err) => {\n this._loaded = false;\n this._error = err;\n });\n\n this._imageObj.src = src;\n\n }\n\n\n getImageObj () {\n\n if (this._loaded) {\n return this._imageObj;\n } else {\n return false;\n }\n\n }\n\n\n isLoaded () {\n return this._loaded;\n }\n\n\n isError () {\n return this._error;\n }\n\n\n}\n\n\nexport default ImageLoader;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/imageloader.js\n **/","import Rect from \"../classes/rect.js\";\n\nclass CollisionMethods {\n\n\n static AABB (entity1, entity2) {\n\n if (!entity1 instanceof Rect || !entity2 instanceof Rect) {\n throw new Error(\"AABB collisions can only be checked on these entity types: Rect\");\n }\n\n return (entity1.pos.x < entity2.pos.x + entity2.size.x &&\n entity1.pos.x + entity1.size.x > entity2.pos.x &&\n entity1.pos.y < entity2.pos.y + entity2.size.y &&\n entity1.size.y + entity1.pos.y > entity2.pos.y);\n\n }\n\n\n}\n\n\nexport default CollisionMethods;\n\n\n/** WEBPACK FOOTER **\n ** ./src/libs/collisionmethods.js\n **/","\"use strict\";\n\nimport Entity from \"./entity.js\";\nimport Vector2D from \"./vector2d.js\";\n\nimport CollisionMethods from \"../libs/collisionmethods.js\";\n\n\nclass Rect extends Entity {\n\n\n constructor (x, y, width, height, color) {\n\n super(x, y);\n\n this.size = new Vector2D(width, height);\n this.color = color;\n\n }\n\n\n isCollidingWith (entity) {\n\n if (entity instanceof Rect) {\n return CollisionMethods.AABB(this, entity);\n }\n\n }\n\n\n render () {\n\n if (this._game) {\n\n this._game.context.fillStyle = this.color.toString();\n this._game.context.fillRect(this._calculatedPos.x, this._calculatedPos.y, this.size.x, this.size.y);\n\n return true;\n\n } else {\n return false;\n }\n\n }\n\n\n}\n\n\nexport default Rect;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/rect.js\n **/","\"use strict\";\n\nclass Color {\n\n\n constructor (r, g, b, a) {\n\n this.r = r || 0;\n this.g = g || 0;\n this.b = b || 0;\n this.a = a || 1;\n\n }\n\n\n toString () {\n return `rgba(${this.r}, ${this.g}, ${this.b}, ${this.a})`;\n }\n\n\n toHex () {\n return `#${((r << 16) | (g << 8) | b).toString(16)}`;\n }\n\n\n}\n\n\nexport default Color;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/color.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap 20ab6ee2169ee2c479ea","webpack:///./src/es5.js","webpack:///./src/classes/game.js","webpack:///./~/babel-runtime/core-js/object/get-prototype-of.js","webpack:///./~/core-js/library/fn/object/get-prototype-of.js","webpack:///./~/core-js/library/modules/es6.object.get-prototype-of.js","webpack:///./~/core-js/library/modules/$.to-object.js","webpack:///./~/core-js/library/modules/$.defined.js","webpack:///./~/core-js/library/modules/$.object-sap.js","webpack:///./~/core-js/library/modules/$.export.js","webpack:///./~/core-js/library/modules/$.global.js","webpack:///./~/core-js/library/modules/$.core.js","webpack:///./~/core-js/library/modules/$.ctx.js","webpack:///./~/core-js/library/modules/$.a-function.js","webpack:///./~/core-js/library/modules/$.fails.js","webpack:///./~/babel-runtime/helpers/classCallCheck.js","webpack:///./~/babel-runtime/helpers/createClass.js","webpack:///./~/babel-runtime/core-js/object/define-property.js","webpack:///./~/core-js/library/fn/object/define-property.js","webpack:///./~/core-js/library/modules/$.js","webpack:///./~/babel-runtime/helpers/possibleConstructorReturn.js","webpack:///./~/babel-runtime/helpers/typeof.js","webpack:///./~/babel-runtime/core-js/symbol/iterator.js","webpack:///./~/core-js/library/fn/symbol/iterator.js","webpack:///./~/core-js/library/modules/es6.string.iterator.js","webpack:///./~/core-js/library/modules/$.string-at.js","webpack:///./~/core-js/library/modules/$.to-integer.js","webpack:///./~/core-js/library/modules/$.iter-define.js","webpack:///./~/core-js/library/modules/$.library.js","webpack:///./~/core-js/library/modules/$.redefine.js","webpack:///./~/core-js/library/modules/$.hide.js","webpack:///./~/core-js/library/modules/$.property-desc.js","webpack:///./~/core-js/library/modules/$.descriptors.js","webpack:///./~/core-js/library/modules/$.has.js","webpack:///./~/core-js/library/modules/$.iterators.js","webpack:///./~/core-js/library/modules/$.iter-create.js","webpack:///./~/core-js/library/modules/$.set-to-string-tag.js","webpack:///./~/core-js/library/modules/$.wks.js","webpack:///./~/core-js/library/modules/$.shared.js","webpack:///./~/core-js/library/modules/$.uid.js","webpack:///./~/core-js/library/modules/web.dom.iterable.js","webpack:///./~/core-js/library/modules/es6.array.iterator.js","webpack:///./~/core-js/library/modules/$.add-to-unscopables.js","webpack:///./~/core-js/library/modules/$.iter-step.js","webpack:///./~/core-js/library/modules/$.to-iobject.js","webpack:///./~/core-js/library/modules/$.iobject.js","webpack:///./~/core-js/library/modules/$.cof.js","webpack:///./~/babel-runtime/core-js/symbol.js","webpack:///./~/core-js/library/fn/symbol/index.js","webpack:///./~/core-js/library/modules/es6.symbol.js","webpack:///./~/core-js/library/modules/$.keyof.js","webpack:///./~/core-js/library/modules/$.get-names.js","webpack:///./~/core-js/library/modules/$.enum-keys.js","webpack:///./~/core-js/library/modules/$.is-array.js","webpack:///./~/core-js/library/modules/$.an-object.js","webpack:///./~/core-js/library/modules/$.is-object.js","webpack:///./~/babel-runtime/helpers/inherits.js","webpack:///./~/babel-runtime/core-js/object/set-prototype-of.js","webpack:///./~/core-js/library/fn/object/set-prototype-of.js","webpack:///./~/core-js/library/modules/es6.object.set-prototype-of.js","webpack:///./~/core-js/library/modules/$.set-proto.js","webpack:///./~/babel-runtime/core-js/object/create.js","webpack:///./~/core-js/library/fn/object/create.js","webpack:///./src/classes/entity.js","webpack:///./src/classes/vector2d.js","webpack:///./src/classes/keyboardinput.js","webpack:///./src/classes/emitter.js","webpack:///./src/classes/sprite.js","webpack:///./src/classes/imageloader.js","webpack:///./src/libs/collisionmethods.js","webpack:///./src/classes/rect.js","webpack:///./src/classes/color.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,KAAM,UAAU;AACZ,yBADY;AAEZ,+BAFY;AAGZ,6BAHY;AAIZ,6BAJY;AAKZ,yBALY;AAMZ,iCANY;AAOZ,2BAPY;AAQZ,uCARY;EAAV;;AAYN,KAAM,SAAS;AACX,YAAO;AACH,uCADG;MAAP;EADE;;AAON,QAAO,cAAP,GAAwB;AACpB,cAAS,OAAT;AACA,aAAQ,MAAR;EAFJ,C;;;;;;ACjCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKM;;;AAGF,cAHE,IAGF,CAAa,MAAb,EAAqB;6CAHnB,MAGmB;;;kGAHnB,kBAGmB;;AAGjB,kBAAS,UAAU,EAAV,CAHQ;AAIjB,gBAAO,MAAP,GAAgB,OAAO,MAAP,IAAiB,EAA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A,G;;;;;;ACJA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA,+BAA8B;AAC9B;AACA;AACA,oDAAmD,OAAO,EAAE;AAC5D,G;;;;;;ACTA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAmE;AACnE,sFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,gEAA+D;AAC/D;AACA;AACA;AACA,eAAc;AACd,eAAc;AACd,eAAc;AACd,eAAc;AACd,gBAAe;AACf,gBAAe;AACf,0B;;;;;;AC7CA;AACA;AACA;AACA,wCAAuC,gC;;;;;;ACHvC,8BAA6B;AAC7B,sCAAqC,gC;;;;;;ACDrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACnBA;AACA;AACA;AACA,G;;;;;;ACHA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,G;;;;;;ACNA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,G;;;;;;ACRA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA,oBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC,G;;;;;;AC1BD,mBAAkB,wD;;;;;;ACAlB;AACA;AACA;AACA,G;;;;;;ACHA;AACA;AACA;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACZA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA;AACA;;AAEA;AACA,G;;;;;;AChBA;;AAEA,uGAAsG,mBAAmB,EAAE,mBAAmB,oGAAoG;;AAElP;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA,EAAC;AACD;AACA,G;;;;;;ACpBA,mBAAkB,wD;;;;;;ACAlB;AACA;AACA,sD;;;;;;ACFA;AACA;;AAEA;AACA;AACA,8BAA6B;AAC7B,eAAc;AACd;AACA,EAAC;AACD;AACA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA,WAAU;AACV,EAAC,E;;;;;;AChBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA4B,aAAa;;AAEzC;AACA;AACA;AACA;AACA;AACA,yCAAwC,oCAAoC;AAC5E,6CAA4C,oCAAoC;AAChF,MAAK,2BAA2B,oCAAoC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAkB,mBAAmB;AACrC;AACA;AACA,oCAAmC,2BAA2B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,G;;;;;;ACjEA,uB;;;;;;ACAA,0C;;;;;;ACAA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA,G;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACPA;AACA;AACA,kCAAiC,QAAQ,gBAAgB,UAAU,GAAG;AACtE,EAAC,E;;;;;;ACHD,wBAAuB;AACvB;AACA;AACA,G;;;;;;ACHA,qB;;;;;;ACAA;AACA;AACA;AACA;AACA;;AAEA;AACA,4FAAkF,aAAa,EAAE;;AAEjG;AACA,wDAAuD,0BAA0B;AACjF;AACA,G;;;;;;ACZA;AACA;AACA;;AAEA;AACA,mEAAkE,+BAA+B;AACjG,G;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACNA;AACA;AACA,oDAAmD;AACnD;AACA,wCAAuC;AACvC,G;;;;;;ACLA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA,iE;;;;;;ACFA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAgC;AAChC,eAAc;AACd,kBAAiB;AACjB;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA,6B;;;;;;ACjCA,6BAA4B,e;;;;;;ACA5B;AACA,WAAU;AACV,G;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACLA;AACA;AACA;AACA;AACA,G;;;;;;ACJA,kBAAiB;;AAEjB;AACA;AACA,G;;;;;;ACJA,mBAAkB,wD;;;;;;ACAlB;AACA;AACA,iD;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA2B;AAC3B,qBAAoB,4BAA4B,SAAS,IAAI;AAC7D,IAAG;AACH,EAAC;AACD;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,+DAA8D;AAC9D;AACA,MAAK;AACL;AACA,uBAAsB,iCAAiC;AACvD,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAoD,KAAK,QAAQ,iCAAiC;AAClG,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH,yBAAwB,eAAe,EAAE;AACzC,yBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA,iCAAgC,gBAAgB;;AAEhD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA,8EAA6E,sBAAsB;;AAEnG;AACA;AACA;AACA;AACA;AACA,2C;;;;;;AClOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACTA;AACA;AACA;AACA,mBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,G;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACbA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA,G;;;;;;;;;;;;ACFA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA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,CAAV,CAAvF,CAHY;;AAKZ,wBAAO,IAAP,CALY;cAAhB,MAOO;AACH,wBAAO,KAAP,CADG;cAPP;;;YAxBF;;;mBAyCS,K;;;;;;ACjDf;;;;;;;;;;;;;;;;KAEM;AAGF,cAHE,KAGF,CAAa,CAAb,EAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB;6CAHvB,OAGuB;;;AAErB,cAAK,CAAL,GAAS,KAAK,CAAL,CAFY;AAGrB,cAAK,CAAL,GAAS,KAAK,CAAL,CAHY;AAIrB,cAAK,CAAL,GAAS,KAAK,CAAL,CAJY;AAKrB,cAAK,CAAL,GAAS,KAAK,CAAL,CALY;MAAzB;;gCAHE;;oCAaU;AACR,8BAAe,KAAK,CAAL,UAAW,KAAK,CAAL,UAAW,KAAK,CAAL,UAAW,KAAK,CAAL,MAAhD,CADQ;;;;iCAKH;AACL,0BAAW,CAAC,CAAC,IAAK,EAAL,GAAY,KAAK,CAAL,GAAU,CAAvB,CAAD,CAA2B,QAA3B,CAAoC,EAApC,CAAX,CADK;;;YAlBP;;;mBA0BS,M","file":"es5.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 20ab6ee2169ee2c479ea\n **/","\"use strict\";\n\nimport Game from \"./classes/game.js\";\nimport Emitter from \"./classes/emitter.js\";\nimport Entity from \"./classes/entity.js\";\nimport Vector2D from \"./classes/vector2d.js\";\nimport Sprite from \"./classes/sprite.js\";\nimport Rect from \"./classes/rect.js\";\nimport Color from \"./classes/color.js\";\nimport ImageLoader from \"./classes/imageloader.js\";\n\nimport {KeyConsts} from \"./classes/keyboardinput.js\";\n\n\nconst Classes = {\n Game: Game,\n Emitter: Emitter,\n Entity: Entity,\n Sprite: Sprite,\n Rect: Rect,\n Vector2D: Vector2D,\n Color: Color,\n ImageLoader: ImageLoader\n};\n\n\nconst Consts = {\n Input: {\n Keys: KeyConsts\n }\n};\n\n\nwindow.MomentumEngine = {\n Classes: Classes,\n Consts: Consts\n};\n\n\n/** WEBPACK FOOTER **\n ** ./src/es5.js\n **/","\"use strict\";\n\nimport Entity from \"./entity.js\";\nimport KeyboardInput from \"./keyboardinput.js\";\n\nclass Game extends Entity {\n\n\n constructor (config) {\n\n super(); // Call entity constructor\n config = config || {};\n config.inputs = config.inputs || {};\n\n\n // Required params\n if (config.canvas) {\n this.canvas = config.canvas;\n } else {\n throw new Error(\"MomentumEngine.Classes.Game must be constructed with a canvas\");\n }\n\n if (config.width) {\n this.width = config.width;\n } else {\n throw new Error(\"MomentumEngine.Classes.Game must be constructed with canvas width\");\n }\n\n if (config.height) {\n this.height = config.height;\n } else {\n throw new Error(\"MomentumEngine.Classes.Game must be constructed with canvas height\");\n }\n\n\n // Optional params\n this.desiredFps = config.desiredFps || 60;\n\n if (config.fixRatio) {\n\n let deviceRatio = window.devicePixelRatio,\n backingStoreRatio = 0;\n\n // Unfortunately Ejecta requires calling getContext last, so we cannot get the backingStorePixelRatio. So for Ejecta's case, we set it to 1, and call getContext later.\n if (typeof ejecta !== \"undefined\") {\n backingStoreRatio = 1;\n } else {\n\n this.context = this.canvas.getContext(\"2d\");\n\n backingStoreRatio = this.context.webkitBackingStorePixelRatio ||\n this.context.mozBackingStorePixelRatio ||\n this.context.msBackingStorePixelRatio ||\n this.context.oBackingStorePixelRatio ||\n this.context.backingStorePixelRatio || 1;\n\n }\n\n this.scale = deviceRatio / backingStoreRatio;\n\n this.canvas.width = this.width * this.scale;\n this.canvas.height = this.height * this.scale;\n\n this.canvas.style.width = this.width + \"px\";\n this.canvas.style.height = this.height + \"px\";\n\n // Call getContext last for Ejecta only.\n if (typeof ejecta !== \"undefined\") {\n this.context = this.canvas.getContext(\"2d\");\n }\n\n this.context.scale(deviceRatio, deviceRatio);\n\n } else {\n\n this.canvas.width = this.width;\n this.canvas.height = this.height;\n\n this.context = this.canvas.getContext(\"2d\");\n\n }\n\n if (typeof this.context.imageSmoothingEnabled !== \"undefined\") {\n this.context.imageSmoothingEnabled = config.imageSmoothing || false;\n }\n\n\n // Initialize defaults\n this.frameCounter = 0;\n\n this.inputs = {};\n if (config.inputs.keyboard) {\n this.inputs.keyboard = new KeyboardInput(this);\n }\n\n this._game = this;\n this._lastFrameTimestamp = 0;\n this._wantPause = true;\n\n }\n\n\n step (delta) {\n\n this.frameCounter++;\n\n this._updateEntity(delta);\n this._renderEntity();\n\n }\n\n\n start () {\n\n var self = this; // NK: Hate doing this...better way plz?\n\n if (self._wantPause) {\n self._wantPause = false;\n } else {\n console.log(\"MomentumEngine.Classes.Game.start called, game instance is already started\");\n return false; // Game is already running\n }\n\n self._wantPause = false;\n\n let requestFrame = (() => {\n\n return (window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n function (callback) {\n window.setTimeout(callback, 1000 / self.desiredFps);\n });\n\n })();\n\n self._lastFrameTimestamp = +(new Date());\n self.startTime = self._lastFrameTimestamp;\n\n var loop = function () {\n\n if (self._wantPause) {\n return;\n }\n\n let currentTimestamp = +(new Date()),\n delta = currentTimestamp - self._lastFrameTimestamp;\n\n delta = Math.min(delta, 1000 / self.desiredFps);\n self._lastFrameTimestamp = currentTimestamp;\n\n self.step(delta);\n\n requestFrame(loop);\n\n };\n\n loop();\n return true;\n\n }\n\n\n pause () {\n\n if (!this._wantPause) {\n this._wantPause = true;\n return true;\n } else {\n console.log(\"MomentumEngine.Classes.Game.pause called, game instance is already paused\");\n return false;\n }\n }\n\n\n}\n\n\nexport default Game;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/game.js\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/get-prototype-of\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/get-prototype-of.js\n ** module id = 2\n ** module chunks = 0 1\n **/","require('../../modules/es6.object.get-prototype-of');\nmodule.exports = require('../../modules/$.core').Object.getPrototypeOf;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/object/get-prototype-of.js\n ** module id = 3\n ** module chunks = 0 1\n **/","// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = require('./$.to-object');\n\nrequire('./$.object-sap')('getPrototypeOf', function($getPrototypeOf){\n return function getPrototypeOf(it){\n return $getPrototypeOf(toObject(it));\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/es6.object.get-prototype-of.js\n ** module id = 4\n ** module chunks = 0 1\n **/","// 7.1.13 ToObject(argument)\nvar defined = require('./$.defined');\nmodule.exports = function(it){\n return Object(defined(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.to-object.js\n ** module id = 5\n ** module chunks = 0 1\n **/","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.defined.js\n ** module id = 6\n ** module chunks = 0 1\n **/","// most Object methods by ES6 should accept primitives\nvar $export = require('./$.export')\n , core = require('./$.core')\n , fails = require('./$.fails');\nmodule.exports = function(KEY, exec){\n var fn = (core.Object || {})[KEY] || Object[KEY]\n , exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.object-sap.js\n ** module id = 7\n ** module chunks = 0 1\n **/","var global = require('./$.global')\n , core = require('./$.core')\n , ctx = require('./$.ctx')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && key in target;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(param){\n return this instanceof C ? new C(param) : C(param);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\nmodule.exports = $export;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.export.js\n ** module id = 8\n ** module chunks = 0 1\n **/","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.global.js\n ** module id = 9\n ** module chunks = 0 1\n **/","var core = module.exports = {version: '1.2.6'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.core.js\n ** module id = 10\n ** module chunks = 0 1\n **/","// optional / simple context binding\nvar aFunction = require('./$.a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.ctx.js\n ** module id = 11\n ** module chunks = 0 1\n **/","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.a-function.js\n ** module id = 12\n ** module chunks = 0 1\n **/","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.fails.js\n ** module id = 13\n ** module chunks = 0 1\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/classCallCheck.js\n ** module id = 14\n ** module chunks = 0 1\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/createClass.js\n ** module id = 15\n ** module chunks = 0 1\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/define-property.js\n ** module id = 16\n ** module chunks = 0 1\n **/","var $ = require('../../modules/$');\nmodule.exports = function defineProperty(it, key, desc){\n return $.setDesc(it, key, desc);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/object/define-property.js\n ** module id = 17\n ** module chunks = 0 1\n **/","var $Object = Object;\nmodule.exports = {\n create: $Object.create,\n getProto: $Object.getPrototypeOf,\n isEnum: {}.propertyIsEnumerable,\n getDesc: $Object.getOwnPropertyDescriptor,\n setDesc: $Object.defineProperty,\n setDescs: $Object.defineProperties,\n getKeys: $Object.keys,\n getNames: $Object.getOwnPropertyNames,\n getSymbols: $Object.getOwnPropertySymbols,\n each: [].forEach\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.js\n ** module id = 18\n ** module chunks = 0 1\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/possibleConstructorReturn.js\n ** module id = 19\n ** module chunks = 0 1\n **/","\"use strict\";\n\nvar _typeof = typeof _Symbol === \"function\" && typeof _Symbol$iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _Symbol === \"function\" && obj.constructor === _Symbol ? \"symbol\" : typeof obj; };\n\nexports.__esModule = true;\n\nvar _iterator = require(\"../core-js/symbol/iterator\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/typeof.js\n ** module id = 20\n ** module chunks = 0 1\n **/","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/symbol/iterator.js\n ** module id = 21\n ** module chunks = 0 1\n **/","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/$.wks')('iterator');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/symbol/iterator.js\n ** module id = 22\n ** module chunks = 0 1\n **/","'use strict';\nvar $at = require('./$.string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./$.iter-define')(String, 'String', function(iterated){\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , index = this._i\n , point;\n if(index >= O.length)return {value: undefined, done: true};\n point = $at(O, index);\n this._i += point.length;\n return {value: point, done: false};\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/es6.string.iterator.js\n ** module id = 23\n ** module chunks = 0 1\n **/","var toInteger = require('./$.to-integer')\n , defined = require('./$.defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function(TO_STRING){\n return function(that, pos){\n var s = String(defined(that))\n , i = toInteger(pos)\n , l = s.length\n , a, b;\n if(i < 0 || i >= l)return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.string-at.js\n ** module id = 24\n ** module chunks = 0 1\n **/","// 7.1.4 ToInteger\nvar ceil = Math.ceil\n , floor = Math.floor;\nmodule.exports = function(it){\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.to-integer.js\n ** module id = 25\n ** module chunks = 0 1\n **/","'use strict';\nvar LIBRARY = require('./$.library')\n , $export = require('./$.export')\n , redefine = require('./$.redefine')\n , hide = require('./$.hide')\n , has = require('./$.has')\n , Iterators = require('./$.iterators')\n , $iterCreate = require('./$.iter-create')\n , setToStringTag = require('./$.set-to-string-tag')\n , getProto = require('./$').getProto\n , ITERATOR = require('./$.wks')('iterator')\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\n\nvar returnThis = function(){ return this; };\n\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\n $iterCreate(Constructor, NAME, next);\n var getMethod = function(kind){\n if(!BUGGY && kind in proto)return proto[kind];\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , DEF_VALUES = DEFAULT == VALUES\n , VALUES_BUG = false\n , proto = Base.prototype\n , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , $default = $native || getMethod(DEFAULT)\n , methods, key;\n // Fix native\n if($native){\n var IteratorPrototype = getProto($default.call(new Base));\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // FF fix\n if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\n // fix Array#{values, @@iterator}.name in V8 / FF\n if(DEF_VALUES && $native.name !== VALUES){\n VALUES_BUG = true;\n $default = function values(){ return $native.call(this); };\n }\n }\n // Define iterator\n if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: !DEF_VALUES ? $default : getMethod('entries')\n };\n if(FORCED)for(key in methods){\n if(!(key in proto))redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.iter-define.js\n ** module id = 26\n ** module chunks = 0 1\n **/","module.exports = true;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.library.js\n ** module id = 27\n ** module chunks = 0 1\n **/","module.exports = require('./$.hide');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.redefine.js\n ** module id = 28\n ** module chunks = 0 1\n **/","var $ = require('./$')\n , createDesc = require('./$.property-desc');\nmodule.exports = require('./$.descriptors') ? function(object, key, value){\n return $.setDesc(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.hide.js\n ** module id = 29\n ** module chunks = 0 1\n **/","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.property-desc.js\n ** module id = 30\n ** module chunks = 0 1\n **/","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./$.fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.descriptors.js\n ** module id = 31\n ** module chunks = 0 1\n **/","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function(it, key){\n return hasOwnProperty.call(it, key);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.has.js\n ** module id = 32\n ** module chunks = 0 1\n **/","module.exports = {};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.iterators.js\n ** module id = 33\n ** module chunks = 0 1\n **/","'use strict';\nvar $ = require('./$')\n , descriptor = require('./$.property-desc')\n , setToStringTag = require('./$.set-to-string-tag')\n , IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./$.hide')(IteratorPrototype, require('./$.wks')('iterator'), function(){ return this; });\n\nmodule.exports = function(Constructor, NAME, next){\n Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.iter-create.js\n ** module id = 34\n ** module chunks = 0 1\n **/","var def = require('./$').setDesc\n , has = require('./$.has')\n , TAG = require('./$.wks')('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.set-to-string-tag.js\n ** module id = 35\n ** module chunks = 0 1\n **/","var store = require('./$.shared')('wks')\n , uid = require('./$.uid')\n , Symbol = require('./$.global').Symbol;\nmodule.exports = function(name){\n return store[name] || (store[name] =\n Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.wks.js\n ** module id = 36\n ** module chunks = 0 1\n **/","var global = require('./$.global')\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.shared.js\n ** module id = 37\n ** module chunks = 0 1\n **/","var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.uid.js\n ** module id = 38\n ** module chunks = 0 1\n **/","require('./es6.array.iterator');\nvar Iterators = require('./$.iterators');\nIterators.NodeList = Iterators.HTMLCollection = Iterators.Array;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/web.dom.iterable.js\n ** module id = 39\n ** module chunks = 0 1\n **/","'use strict';\nvar addToUnscopables = require('./$.add-to-unscopables')\n , step = require('./$.iter-step')\n , Iterators = require('./$.iterators')\n , toIObject = require('./$.to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./$.iter-define')(Array, 'Array', function(iterated, kind){\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , kind = this._k\n , index = this._i++;\n if(!O || index >= O.length){\n this._t = undefined;\n return step(1);\n }\n if(kind == 'keys' )return step(0, index);\n if(kind == 'values')return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/es6.array.iterator.js\n ** module id = 40\n ** module chunks = 0 1\n **/","module.exports = function(){ /* empty */ };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.add-to-unscopables.js\n ** module id = 41\n ** module chunks = 0 1\n **/","module.exports = function(done, value){\n return {value: value, done: !!done};\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.iter-step.js\n ** module id = 42\n ** module chunks = 0 1\n **/","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./$.iobject')\n , defined = require('./$.defined');\nmodule.exports = function(it){\n return IObject(defined(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.to-iobject.js\n ** module id = 43\n ** module chunks = 0 1\n **/","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./$.cof');\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.iobject.js\n ** module id = 44\n ** module chunks = 0 1\n **/","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.cof.js\n ** module id = 45\n ** module chunks = 0 1\n **/","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/symbol.js\n ** module id = 46\n ** module chunks = 0 1\n **/","require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nmodule.exports = require('../../modules/$.core').Symbol;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/symbol/index.js\n ** module id = 47\n ** module chunks = 0 1\n **/","'use strict';\n// ECMAScript 6 symbols shim\nvar $ = require('./$')\n , global = require('./$.global')\n , has = require('./$.has')\n , DESCRIPTORS = require('./$.descriptors')\n , $export = require('./$.export')\n , redefine = require('./$.redefine')\n , $fails = require('./$.fails')\n , shared = require('./$.shared')\n , setToStringTag = require('./$.set-to-string-tag')\n , uid = require('./$.uid')\n , wks = require('./$.wks')\n , keyOf = require('./$.keyof')\n , $names = require('./$.get-names')\n , enumKeys = require('./$.enum-keys')\n , isArray = require('./$.is-array')\n , anObject = require('./$.an-object')\n , toIObject = require('./$.to-iobject')\n , createDesc = require('./$.property-desc')\n , getDesc = $.getDesc\n , setDesc = $.setDesc\n , _create = $.create\n , getNames = $names.get\n , $Symbol = global.Symbol\n , $JSON = global.JSON\n , _stringify = $JSON && $JSON.stringify\n , setter = false\n , HIDDEN = wks('_hidden')\n , isEnum = $.isEnum\n , SymbolRegistry = shared('symbol-registry')\n , AllSymbols = shared('symbols')\n , useNative = typeof $Symbol == 'function'\n , ObjectProto = Object.prototype;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function(){\n return _create(setDesc({}, 'a', {\n get: function(){ return setDesc(this, 'a', {value: 7}).a; }\n })).a != 7;\n}) ? function(it, key, D){\n var protoDesc = getDesc(ObjectProto, key);\n if(protoDesc)delete ObjectProto[key];\n setDesc(it, key, D);\n if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);\n} : setDesc;\n\nvar wrap = function(tag){\n var sym = AllSymbols[tag] = _create($Symbol.prototype);\n sym._k = tag;\n DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {\n configurable: true,\n set: function(value){\n if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n }\n });\n return sym;\n};\n\nvar isSymbol = function(it){\n return typeof it == 'symbol';\n};\n\nvar $defineProperty = function defineProperty(it, key, D){\n if(D && has(AllSymbols, key)){\n if(!D.enumerable){\n if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n D = _create(D, {enumerable: createDesc(0, false)});\n } return setSymbolDesc(it, key, D);\n } return setDesc(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P){\n anObject(it);\n var keys = enumKeys(P = toIObject(P))\n , i = 0\n , l = keys.length\n , key;\n while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P){\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n var E = isEnum.call(this, key);\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]\n ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n var D = getDesc(it = toIObject(it), key);\n if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n var names = getNames(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);\n return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n var names = getNames(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);\n return result;\n};\nvar $stringify = function stringify(it){\n if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\n var args = [it]\n , i = 1\n , $$ = arguments\n , replacer, $replacer;\n while($$.length > i)args.push($$[i++]);\n replacer = args[1];\n if(typeof replacer == 'function')$replacer = replacer;\n if($replacer || !isArray(replacer))replacer = function(key, value){\n if($replacer)value = $replacer.call(this, key, value);\n if(!isSymbol(value))return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n};\nvar buggyJSON = $fails(function(){\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n});\n\n// 19.4.1.1 Symbol([description])\nif(!useNative){\n $Symbol = function Symbol(){\n if(isSymbol(this))throw TypeError('Symbol is not a constructor');\n return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));\n };\n redefine($Symbol.prototype, 'toString', function toString(){\n return this._k;\n });\n\n isSymbol = function(it){\n return it instanceof $Symbol;\n };\n\n $.create = $create;\n $.isEnum = $propertyIsEnumerable;\n $.getDesc = $getOwnPropertyDescriptor;\n $.setDesc = $defineProperty;\n $.setDescs = $defineProperties;\n $.getNames = $names.get = $getOwnPropertyNames;\n $.getSymbols = $getOwnPropertySymbols;\n\n if(DESCRIPTORS && !require('./$.library')){\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n}\n\nvar symbolStatics = {\n // 19.4.2.1 Symbol.for(key)\n 'for': function(key){\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key){\n return keyOf(SymbolRegistry, key);\n },\n useSetter: function(){ setter = true; },\n useSimple: function(){ setter = false; }\n};\n// 19.4.2.2 Symbol.hasInstance\n// 19.4.2.3 Symbol.isConcatSpreadable\n// 19.4.2.4 Symbol.iterator\n// 19.4.2.6 Symbol.match\n// 19.4.2.8 Symbol.replace\n// 19.4.2.9 Symbol.search\n// 19.4.2.10 Symbol.species\n// 19.4.2.11 Symbol.split\n// 19.4.2.12 Symbol.toPrimitive\n// 19.4.2.13 Symbol.toStringTag\n// 19.4.2.14 Symbol.unscopables\n$.each.call((\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +\n 'species,split,toPrimitive,toStringTag,unscopables'\n).split(','), function(it){\n var sym = wks(it);\n symbolStatics[it] = useNative ? sym : wrap(sym);\n});\n\nsetter = true;\n\n$export($export.G + $export.W, {Symbol: $Symbol});\n\n$export($export.S, 'Symbol', symbolStatics);\n\n$export($export.S + $export.F * !useNative, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});\n\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/es6.symbol.js\n ** module id = 48\n ** module chunks = 0 1\n **/","var $ = require('./$')\n , toIObject = require('./$.to-iobject');\nmodule.exports = function(object, el){\n var O = toIObject(object)\n , keys = $.getKeys(O)\n , length = keys.length\n , index = 0\n , key;\n while(length > index)if(O[key = keys[index++]] === el)return key;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.keyof.js\n ** module id = 49\n ** module chunks = 0 1\n **/","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./$.to-iobject')\n , getNames = require('./$').getNames\n , toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function(it){\n try {\n return getNames(it);\n } catch(e){\n return windowNames.slice();\n }\n};\n\nmodule.exports.get = function getOwnPropertyNames(it){\n if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);\n return getNames(toIObject(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.get-names.js\n ** module id = 50\n ** module chunks = 0 1\n **/","// all enumerable object keys, includes symbols\nvar $ = require('./$');\nmodule.exports = function(it){\n var keys = $.getKeys(it)\n , getSymbols = $.getSymbols;\n if(getSymbols){\n var symbols = getSymbols(it)\n , isEnum = $.isEnum\n , i = 0\n , key;\n while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);\n }\n return keys;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.enum-keys.js\n ** module id = 51\n ** module chunks = 0 1\n **/","// 7.2.2 IsArray(argument)\nvar cof = require('./$.cof');\nmodule.exports = Array.isArray || function(arg){\n return cof(arg) == 'Array';\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.is-array.js\n ** module id = 52\n ** module chunks = 0 1\n **/","var isObject = require('./$.is-object');\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.an-object.js\n ** module id = 53\n ** module chunks = 0 1\n **/","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.is-object.js\n ** module id = 54\n ** module chunks = 0 1\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = require(\"../core-js/object/set-prototype-of\");\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = require(\"../core-js/object/create\");\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/inherits.js\n ** module id = 56\n ** module chunks = 0 1\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/set-prototype-of\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/set-prototype-of.js\n ** module id = 57\n ** module chunks = 0 1\n **/","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/$.core').Object.setPrototypeOf;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/object/set-prototype-of.js\n ** module id = 58\n ** module chunks = 0 1\n **/","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./$.export');\n$export($export.S, 'Object', {setPrototypeOf: require('./$.set-proto').set});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/es6.object.set-prototype-of.js\n ** module id = 59\n ** module chunks = 0 1\n **/","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar getDesc = require('./$').getDesc\n , isObject = require('./$.is-object')\n , anObject = require('./$.an-object');\nvar check = function(O, proto){\n anObject(O);\n if(!isObject(proto) && proto !== null)throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function(test, buggy, set){\n try {\n set = require('./$.ctx')(Function.call, getDesc(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch(e){ buggy = true; }\n return function setPrototypeOf(O, proto){\n check(O, proto);\n if(buggy)O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.set-proto.js\n ** module id = 60\n ** module chunks = 0 1\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/create\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/create.js\n ** module id = 61\n ** module chunks = 0 1\n **/","var $ = require('../../modules/$');\nmodule.exports = function create(P, D){\n return $.create(P, D);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/object/create.js\n ** module id = 62\n ** module chunks = 0 1\n **/","\"use strict\";\n\nimport Vector2D from \"./vector2d.js\";\n\nclass Entity {\n\n\n constructor (x, y) {\n\n this.pos = new Vector2D(x || 0, y || 0);\n this.velocity = new Vector2D(0, 0);\n this.acceleration = new Vector2D(0, 0);\n\n this.state = {};\n this.children = [];\n\n this._calculatedPos = this.pos.clone();\n this._lastCalculated = 0;\n this._game = null;\n this._parent = null;\n\n }\n\n\n setVelocity (x, y) {\n\n if (x instanceof Vector2D) {\n this.velocity = x;\n } else {\n this.velocity.x = x;\n this.velocity.y = y;\n }\n\n }\n\n\n setAcceleration (x, y) {\n\n if (x instanceof Vector2D) {\n this.acceleration = x;\n } else {\n this.acceleration.x = x;\n this.acceleration.y = y;\n }\n\n }\n\n\n createChildEntity () {\n\n let child = new Entity();\n\n child._updateGame(this._game);\n child._parent = this;\n this.children.push(child);\n\n return child;\n\n }\n\n\n addChildEntity (child) {\n\n child._updateGame(this._game);\n child._parent = this;\n this.children.push(child);\n\n return child;\n\n }\n\n\n detachChildEntity (child) {\n\n for (let i = 0; i < this.children.length; i++) {\n if (this.children[i] == child) {\n\n this.children.splice(i, 1);\n return true;\n\n }\n }\n\n return false;\n\n }\n\n\n _preprocess () {\n\n // NK: The purpose of this function is to calculate the true position of the entity relative to all its parents. It does this recursively, calling the _preprocess method all the way back up the tree and continuously adding the results together.\n\n // Note there is a limiter, where the last calculated frame is stored, so that if the position has already been calculated for that node in this particular frame, the cached result is used rather than recalculating.\n\n // When rendering, the draw calls should use this._calculatedPos rather than this.pos in order for the position to be correct.\n\n if (this._game && this._lastCalculated < this._game.frameCounter) {\n\n if (this._parent) {\n\n let parentPos = this._parent._preprocess();\n\n this._calculatedPos.x = this.pos.x + parentPos.x;\n this._calculatedPos.y = this.pos.y + parentPos.y;\n\n } else {\n this._calculatedPos.x = this.pos.x;\n this._calculatedPos.y = this.pos.y;\n }\n\n this._lastCalculated = this._game.frameCounter;\n\n }\n\n return this._calculatedPos;\n\n }\n\n\n _updateGame (game) {\n\n this._game = game;\n\n this.children.forEach((child) => {\n child._updateGame(game);\n });\n\n }\n\n\n _updateEntity (delta) {\n\n // Calculate new position based on velocity and acceleration if there's one set\n if (this.velocity) {\n\n if (this.acceleration) {\n this.velocity.add(this.acceleration);\n }\n\n this.pos.add(this.velocity);\n\n }\n\n // If there's an update method, call it\n let updated = this.update && this.update(delta);\n\n if (updated || (typeof updated == \"undefined\") || (typeof this.update === \"undefined\")) {\n\n this.children.forEach((child) => {\n child._updateEntity(delta);\n });\n\n }\n\n }\n\n\n _renderEntity () {\n\n this._preprocess();\n\n let rendered = this.render && this.render();\n\n if (rendered || (typeof rendered == \"undefined\") || (typeof this.render === \"undefined\")) {\n\n this.children.forEach((child) => {\n child._renderEntity();\n });\n\n }\n\n }\n\n\n}\n\n\nexport default Entity;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/entity.js\n **/","\"use strict\";\n\nclass Vector2D {\n\n\n constructor (x, y) {\n this.x = x || 0; this.y = y || 0;\n }\n\n\n invert () {\n this.x = -this.x; this.y = -this.y;\n return this;\n }\n\n\n add (val) {\n\n if (val instanceof Vector2D) {\n this.x += val.x; this.y += val.y;\n } else {\n this.x += val; this.y += val;\n }\n\n return this;\n\n }\n\n\n subtract (val) {\n\n if (val instanceof Vector2D) {\n this.x -= val.x; this.y -= val.y;\n } else {\n this.x -= val; this.y -= val;\n }\n\n return this;\n\n }\n\n\n multiply (val) {\n\n if (val instanceof Vector2D) {\n this.x *= val.x; this.y *= val.y;\n } else {\n this.x *= val; this.y *= val;\n }\n\n return this;\n\n }\n\n\n divide (val) {\n\n if (val instanceof Vector2D) {\n this.x /= val.x; this.y /= val.y;\n } else {\n this.x /= val; this.y /= val;\n }\n\n return this;\n\n }\n\n\n equals (val) {\n return (this.x == val.x && this.y == val.y);\n }\n\n\n dot (val) {\n return (this.x * val.x + this.y * val.y);\n }\n\n\n length () {\n return Math.sqrt(this.dot(this));\n }\n\n\n unit () {\n return this.divide(this.length());\n }\n\n\n min () {\n return Math.min(this.x, this.y);\n }\n\n\n max () {\n return Math.max(this.x, this.y);\n }\n\n\n degrees () {\n return (Math.atan(this.x, this.y) * 180);\n }\n\n\n angle () {\n return Math.atan2(this.x, this.y);\n }\n\n\n toArray () {\n return [this.x, this.y];\n }\n\n\n toString () {\n return `[${this.x}},${this.y}}]`;\n }\n\n\n clone () {\n return new Vector2D(this.x, this.y);\n }\n\n\n static fromAngle (angle, length) {\n return new Vector2D(length * Math.cos(angle), length * Math.sin(angle));\n }\n\n\n}\n\n\nexport default Vector2D;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/vector2d.js\n **/","\"use strict\";\n\n\nconst KeyConsts = {\n SPACE: 32,\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n SHIFT: 16,\n CTRL: 17,\n ALT: 18,\n PAUSE: 19,\n CAPS_LOCK: 20,\n ESCAPE: 27,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n INSERT: 45,\n DELETE: 46,\n NUM_0: 48,\n NUM_1: 49,\n NUM_2: 50,\n NUM_3: 51,\n NUM_4: 52,\n NUM_5: 53,\n NUM_6: 54,\n NUM_7: 55,\n NUM_8: 56,\n NUM_9: 57,\n CHAR_A: 65,\n CHAR_B: 66,\n CHAR_C: 67,\n CHAR_D: 68,\n CHAR_E: 69,\n CHAR_F: 70,\n CHAR_G: 71,\n CHAR_H: 72,\n CHAR_I: 73,\n CHAR_J: 74,\n CHAR_K: 75,\n CHAR_L: 76,\n CHAR_M: 77,\n CHAR_N: 78,\n CHAR_O: 79,\n CHAR_P: 80,\n CHAR_Q: 81,\n CHAR_R: 82,\n CHAR_S: 83,\n CHAR_T: 84,\n CHAR_U: 85,\n CHAR_V: 86,\n CHAR_W: 87,\n CHAR_X: 88,\n CHAR_Y: 89,\n CHAR_Z: 90,\n NUM_PAD_0: 96,\n NUM_PAD_1: 97,\n NUM_PAD_2: 98,\n NUM_PAD_3: 99,\n NUM_PAD_4: 100,\n NUM_PAD_5: 101,\n NUM_PAD_6: 102,\n NUM_PAD_7: 103,\n NUM_PAD_8: 104,\n NUM_PAD_9: 105,\n MULTIPLY: 106,\n ADD: 107,\n SUBTRACT: 109,\n DECIMAL: 110,\n DIVIDE: 111,\n F1: 112,\n F2: 113,\n F3: 114,\n F4: 115,\n F5: 116,\n F6: 117,\n F7: 118,\n F8: 119,\n F9: 120,\n F10: 121,\n F11: 122,\n F12: 123,\n SEMICOLON: 186,\n EQUALS: 187,\n COMMA: 188,\n DASH: 189,\n PERIOD: 190,\n FORWARD_SLASH: 191,\n GRAVE: 192,\n OPEN_BRACKET: 219,\n BACK_SLASH: 220,\n CLOSE_BRACKET: 221,\n SINGLE_QUOTE: 222\n};\n\n\nclass KeyboardInput {\n\n\n constructor () {\n\n var self = this;\n self._keyState = {};\n\n window.addEventListener(\"keydown\", (event) => {\n self._keyDownHandler(event);\n }, false);\n\n window.addEventListener(\"keyup\", (event) => {\n self._keyUpHandler(event);\n }, false);\n\n }\n\n\n isPressed (keyCode) {\n return !!this._keyState[keyCode];\n }\n\n\n _keyDownHandler (event) {\n this._keyState[event.keyCode] = true;\n }\n\n\n _keyUpHandler (event) {\n this._keyState[event.keyCode] = false;\n }\n\n\n}\n\n\nexport default KeyboardInput;\nexport {KeyConsts};\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/keyboardinput.js\n **/","\"use strict\";\n\nimport Entity from \"./entity.js\";\nimport Vector2D from \"./vector2d.js\";\n\n\nclass Emitter extends Entity {\n\n\n constructor (x, y, velocity, particle) {\n\n super(x, y);\n\n this.particleVelocity = velocity;\n this.particleClass = particle;\n this.emitting = false;\n\n this.particles = [];\n\n this.spread = function () {\n return Math.PI / 32;\n }\n\n }\n\n\n _emit () {\n\n if (this.emitting) {\n\n let ParticleClass = this.particleClass;\n\n let angle = this.particleVelocity.angle() + this.spread() - (Math.random() * this.spread() * 2),\n magnitude = this.particleVelocity.length(),\n velocity = Vector2D.fromAngle(angle, magnitude);\n\n let particle = new ParticleClass(this.pos.x, this.pos.y);\n particle.velocity = velocity;\n\n this.particles.push(particle);\n this._parent.addChildEntity(particle);\n\n }\n\n }\n\n\n update () {\n this._emit();\n }\n\n\n}\n\n\nexport default Emitter;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/emitter.js\n **/","\"use strict\";\n\nimport Entity from \"./entity.js\";\nimport Vector2D from \"./vector2d.js\";\nimport ImageLoader from \"./imageloader.js\";\n\nimport CollisionMethods from \"../libs/collisionmethods.js\";\n\n\nclass Sprite extends Entity {\n\n\n constructor (x, y, width, height, image) {\n\n if (!image instanceof ImageLoader) {\n throw new Error(\"MomentumEngine.Classes.Sprite must be instantiated with an ImageLoader instance\");\n }\n\n super(x, y);\n\n this.size = new Vector2D(width || 0, height || 0);\n\n this._image = image;\n this._imagePos = new Vector2D(0, 0);\n this._imageSize = new Vector2D(0, 0);\n\n }\n\n\n setImageCoords (x, y, width, height) {\n\n this._imagePos.x = x;\n this._imagePos.y = y;\n this._imageSize.x = width || 0;\n this._imageSize.y = height || 0;\n\n }\n\n\n isReady () {\n return (this._image.isLoaded() && !this._image.isError());\n }\n\n\n render () {\n\n if (this.isReady() && this._game) {\n\n let imageObj = this._image.getImageObj();\n\n let subWidth = imageObj.width - this._imagePos.x,\n subHeight = imageObj.height - this._imagePos.y;\n\n this._game.context.drawImage(\n imageObj,\n this._imagePos.x,\n this._imagePos.y,\n this._imageSize.x || subWidth,\n this._imageSize.y || subHeight,\n this._calculatedPos.x,\n this._calculatedPos.y,\n this.size.x || subWidth,\n this.size.y || subHeight\n );\n\n return true;\n\n } else {\n return false;\n }\n\n }\n\n\n}\n\n\nexport default Sprite;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/sprite.js\n **/","\"use strict\";\n\nclass ImageLoader {\n\n\n constructor (src) {\n\n this._loaded = false; // Default is true, set it to false until the image has loaded\n this._error = false; // If the image fails to load, this will contain the reason\n\n this._imageObj = new Image();\n\n this._imageObj.addEventListener(\"load\", () => {\n this._loaded = true;\n this._error = false;\n });\n\n this._imageObj.addEventListener(\"_error\", (err) => {\n this._loaded = false;\n this._error = err;\n });\n\n this._imageObj.src = src;\n\n }\n\n\n getImageObj () {\n\n if (this._loaded) {\n return this._imageObj;\n } else {\n return false;\n }\n\n }\n\n\n isLoaded () {\n return this._loaded;\n }\n\n\n isError () {\n return this._error;\n }\n\n\n}\n\n\nexport default ImageLoader;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/imageloader.js\n **/","import Rect from \"../classes/rect.js\";\n\nclass CollisionMethods {\n\n\n static AABB (entity1, entity2) {\n\n if (!entity1 instanceof Rect || !entity2 instanceof Rect) {\n throw new Error(\"AABB collisions can only be checked on these entity types: Rect\");\n }\n\n return (entity1.pos.x < entity2.pos.x + entity2.size.x &&\n entity1.pos.x + entity1.size.x > entity2.pos.x &&\n entity1.pos.y < entity2.pos.y + entity2.size.y &&\n entity1.size.y + entity1.pos.y > entity2.pos.y);\n\n }\n\n\n}\n\n\nexport default CollisionMethods;\n\n\n/** WEBPACK FOOTER **\n ** ./src/libs/collisionmethods.js\n **/","\"use strict\";\n\nimport Entity from \"./entity.js\";\nimport Vector2D from \"./vector2d.js\";\n\nimport CollisionMethods from \"../libs/collisionmethods.js\";\n\n\nclass Rect extends Entity {\n\n\n constructor (x, y, width, height, color) {\n\n super(x, y);\n\n this.size = new Vector2D(width, height);\n this.color = color;\n\n }\n\n\n isCollidingWith (entity) {\n\n if (entity instanceof Rect) {\n return CollisionMethods.AABB(this, entity);\n }\n\n }\n\n\n render () {\n\n if (this._game) {\n\n this._game.context.fillStyle = this.color.toString();\n this._game.context.fillRect(this._calculatedPos.x, this._calculatedPos.y, this.size.x, this.size.y);\n\n return true;\n\n } else {\n return false;\n }\n\n }\n\n\n}\n\n\nexport default Rect;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/rect.js\n **/","\"use strict\";\n\nclass Color {\n\n\n constructor (r, g, b, a) {\n\n this.r = r || 0;\n this.g = g || 0;\n this.b = b || 0;\n this.a = a || 1;\n\n }\n\n\n toString () {\n return `rgba(${this.r}, ${this.g}, ${this.b}, ${this.a})`;\n }\n\n\n toHex () {\n return `#${((r << 16) | (g << 8) | b).toString(16)}`;\n }\n\n\n}\n\n\nexport default Color;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/color.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/examples/particles/dist/particles.js b/examples/particles/dist/particles.js new file mode 100644 index 0000000..aa48730 --- /dev/null +++ b/examples/particles/dist/particles.js @@ -0,0 +1,2423 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; +/******/ +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _getPrototypeOf = __webpack_require__(2); + + var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(19); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(56); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _es = __webpack_require__(72); + + var _es2 = _interopRequireDefault(_es); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var white = new _es2.default.Classes.Color(255, 255, 255); + + var BlueParticle = function (_MomentumEngine$Class) { + (0, _inherits3.default)(BlueParticle, _MomentumEngine$Class); + + function BlueParticle(x, y) { + (0, _classCallCheck3.default)(this, BlueParticle); + return (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(BlueParticle).call(this, x, y, 1, 1, white)); + } + + return BlueParticle; + }(_es2.default.Classes.Rect); + + window.onload = function () { + + var width = 640, + height = 360, + baseSize = width / 64; + + var particles = new _es2.default.Classes.Game({ + canvas: document.getElementById("canvas"), + width: width, + height: height, + fixRatio: true, + desiredFps: 60 + }); + + var black = new _es2.default.Classes.Color(0, 0, 0), + red = new _es2.default.Classes.Color(255, 0, 0); + + var mainScene = new _es2.default.Classes.Rect(0, 0, width, height, black); + particles.addChildEntity(mainScene); + + var rect = new _es2.default.Classes.Rect(width / 2 - baseSize, height / 2 - baseSize, baseSize * 2, baseSize * 2, red), + emitter = new _es2.default.Classes.Emitter(0, 0, new _es2.default.Classes.Vector2D(1, 1), BlueParticle); + + mainScene.addChildEntity(rect); + rect.addChildEntity(emitter); + + emitter.emitting = true; + particles.start(); + }; + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _getPrototypeOf = __webpack_require__(2); + + var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + var _possibleConstructorReturn2 = __webpack_require__(19); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(56); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _entity = __webpack_require__(63); + + var _entity2 = _interopRequireDefault(_entity); + + var _keyboardinput = __webpack_require__(65); + + var _keyboardinput2 = _interopRequireDefault(_keyboardinput); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Game = function (_Entity) { + (0, _inherits3.default)(Game, _Entity); + + function Game(config) { + (0, _classCallCheck3.default)(this, Game); + // Call entity constructor + + var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(Game).call(this)); + + config = config || {}; + config.inputs = config.inputs || {}; + + // Required params + if (config.canvas) { + _this.canvas = config.canvas; + } else { + throw new Error("MomentumEngine.Classes.Game must be constructed with a canvas"); + } + + if (config.width) { + _this.width = config.width; + } else { + throw new Error("MomentumEngine.Classes.Game must be constructed with canvas width"); + } + + if (config.height) { + _this.height = config.height; + } else { + throw new Error("MomentumEngine.Classes.Game must be constructed with canvas height"); + } + + // Optional params + _this.desiredFps = config.desiredFps || 60; + + if (config.fixRatio) { + + var deviceRatio = window.devicePixelRatio, + backingStoreRatio = 0; + + // Unfortunately Ejecta requires calling getContext last, so we cannot get the backingStorePixelRatio. So for Ejecta's case, we set it to 1, and call getContext later. + if (typeof ejecta !== "undefined") { + backingStoreRatio = 1; + } else { + + _this.context = _this.canvas.getContext("2d"); + + backingStoreRatio = _this.context.webkitBackingStorePixelRatio || _this.context.mozBackingStorePixelRatio || _this.context.msBackingStorePixelRatio || _this.context.oBackingStorePixelRatio || _this.context.backingStorePixelRatio || 1; + } + + _this.scale = deviceRatio / backingStoreRatio; + + _this.canvas.width = _this.width * _this.scale; + _this.canvas.height = _this.height * _this.scale; + + _this.canvas.style.width = _this.width + "px"; + _this.canvas.style.height = _this.height + "px"; + + // Call getContext last for Ejecta only. + if (typeof ejecta !== "undefined") { + _this.context = _this.canvas.getContext("2d"); + } + + _this.context.scale(deviceRatio, deviceRatio); + } else { + + _this.canvas.width = _this.width; + _this.canvas.height = _this.height; + + _this.context = _this.canvas.getContext("2d"); + } + + if (typeof _this.context.imageSmoothingEnabled !== "undefined") { + _this.context.imageSmoothingEnabled = config.imageSmoothing || false; + } + + // Initialize defaults + _this.frameCounter = 0; + + _this.inputs = {}; + if (config.inputs.keyboard) { + _this.inputs.keyboard = new _keyboardinput2.default(_this); + } + + _this._game = _this; + _this._lastFrameTimestamp = 0; + _this._wantPause = true; + + return _this; + } + + (0, _createClass3.default)(Game, [{ + key: "step", + value: function step(delta) { + + this.frameCounter++; + + this._updateEntity(delta); + this._renderEntity(); + } + }, { + key: "start", + value: function start() { + + var self = this; // NK: Hate doing this...better way plz? + + if (self._wantPause) { + self._wantPause = false; + } else { + console.log("MomentumEngine.Classes.Game.start called, game instance is already started"); + return false; // Game is already running + } + + self._wantPause = false; + + var requestFrame = function () { + + return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) { + window.setTimeout(callback, 1000 / self.desiredFps); + }; + }(); + + self._lastFrameTimestamp = +new Date(); + self.startTime = self._lastFrameTimestamp; + + var loop = function loop() { + + if (self._wantPause) { + return; + } + + var currentTimestamp = +new Date(), + delta = currentTimestamp - self._lastFrameTimestamp; + + delta = Math.min(delta, 1000 / self.desiredFps); + self._lastFrameTimestamp = currentTimestamp; + + self.step(delta); + + requestFrame(loop); + }; + + loop(); + return true; + } + }, { + key: "pause", + value: function pause() { + + if (!this._wantPause) { + this._wantPause = true; + return true; + } else { + console.log("MomentumEngine.Classes.Game.pause called, game instance is already paused"); + return false; + } + } + }]); + return Game; + }(_entity2.default); + + exports.default = Game; + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(3), __esModule: true }; + +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(4); + module.exports = __webpack_require__(10).Object.getPrototypeOf; + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.9 Object.getPrototypeOf(O) + var toObject = __webpack_require__(5); + + __webpack_require__(7)('getPrototypeOf', function($getPrototypeOf){ + return function getPrototypeOf(it){ + return $getPrototypeOf(toObject(it)); + }; + }); + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(6); + module.exports = function(it){ + return Object(defined(it)); + }; + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; + }; + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(8) + , core = __webpack_require__(10) + , fails = __webpack_require__(13); + module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); + }; + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(9) + , core = __webpack_require__(10) + , ctx = __webpack_require__(11) + , PROTOTYPE = 'prototype'; + + var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && key in target; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(param){ + return this instanceof C ? new C(param) : C(param); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + module.exports = $export; + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); + if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }, +/* 10 */ +/***/ function(module, exports) { + + var core = module.exports = {version: '1.2.6'}; + if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + // optional / simple context binding + var aFunction = __webpack_require__(12); + module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; + }; + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; + }; + +/***/ }, +/* 13 */ +/***/ function(module, exports) { + + module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } + }; + +/***/ }, +/* 14 */ +/***/ function(module, exports) { + + "use strict"; + + exports.__esModule = true; + + exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + }; + +/***/ }, +/* 15 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + exports.__esModule = true; + + var _defineProperty = __webpack_require__(16); + + var _defineProperty2 = _interopRequireDefault(_defineProperty); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(17), __esModule: true }; + +/***/ }, +/* 17 */ +/***/ function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(18); + module.exports = function defineProperty(it, key, desc){ + return $.setDesc(it, key, desc); + }; + +/***/ }, +/* 18 */ +/***/ function(module, exports) { + + var $Object = Object; + module.exports = { + create: $Object.create, + getProto: $Object.getPrototypeOf, + isEnum: {}.propertyIsEnumerable, + getDesc: $Object.getOwnPropertyDescriptor, + setDesc: $Object.defineProperty, + setDescs: $Object.defineProperties, + getKeys: $Object.keys, + getNames: $Object.getOwnPropertyNames, + getSymbols: $Object.getOwnPropertySymbols, + each: [].forEach + }; + +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + exports.__esModule = true; + + var _typeof2 = __webpack_require__(20); + + var _typeof3 = _interopRequireDefault(_typeof2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; + }; + +/***/ }, +/* 20 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _typeof = typeof _Symbol === "function" && typeof _Symbol$iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _Symbol === "function" && obj.constructor === _Symbol ? "symbol" : typeof obj; }; + + exports.__esModule = true; + + var _iterator = __webpack_require__(21); + + var _iterator2 = _interopRequireDefault(_iterator); + + var _symbol = __webpack_require__(46); + + var _symbol2 = _interopRequireDefault(_symbol); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); + } : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); + }; + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(22), __esModule: true }; + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(23); + __webpack_require__(39); + module.exports = __webpack_require__(36)('iterator'); + +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $at = __webpack_require__(24)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(26)(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; + }); + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + var toInteger = __webpack_require__(25) + , defined = __webpack_require__(6); + // true -> String#at + // false -> String#codePointAt + module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + +/***/ }, +/* 25 */ +/***/ function(module, exports) { + + // 7.1.4 ToInteger + var ceil = Math.ceil + , floor = Math.floor; + module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var LIBRARY = __webpack_require__(27) + , $export = __webpack_require__(8) + , redefine = __webpack_require__(28) + , hide = __webpack_require__(29) + , has = __webpack_require__(32) + , Iterators = __webpack_require__(33) + , $iterCreate = __webpack_require__(34) + , setToStringTag = __webpack_require__(35) + , getProto = __webpack_require__(18).getProto + , ITERATOR = __webpack_require__(36)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + + var returnThis = function(){ return this; }; + + module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , methods, key; + // Fix native + if($native){ + var IteratorPrototype = getProto($default.call(new Base)); + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // FF fix + if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: !DEF_VALUES ? $default : getMethod('entries') + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + +/***/ }, +/* 27 */ +/***/ function(module, exports) { + + module.exports = true; + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(29); + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(18) + , createDesc = __webpack_require__(30); + module.exports = __webpack_require__(31) ? function(object, key, value){ + return $.setDesc(object, key, createDesc(1, value)); + } : function(object, key, value){ + object[key] = value; + return object; + }; + +/***/ }, +/* 30 */ +/***/ function(module, exports) { + + module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; + }; + +/***/ }, +/* 31 */ +/***/ function(module, exports, __webpack_require__) { + + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(13)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; + }); + +/***/ }, +/* 32 */ +/***/ function(module, exports) { + + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function(it, key){ + return hasOwnProperty.call(it, key); + }; + +/***/ }, +/* 33 */ +/***/ function(module, exports) { + + module.exports = {}; + +/***/ }, +/* 34 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $ = __webpack_require__(18) + , descriptor = __webpack_require__(30) + , setToStringTag = __webpack_require__(35) + , IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(29)(IteratorPrototype, __webpack_require__(36)('iterator'), function(){ return this; }); + + module.exports = function(Constructor, NAME, next){ + Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { + + var def = __webpack_require__(18).setDesc + , has = __webpack_require__(32) + , TAG = __webpack_require__(36)('toStringTag'); + + module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); + }; + +/***/ }, +/* 36 */ +/***/ function(module, exports, __webpack_require__) { + + var store = __webpack_require__(37)('wks') + , uid = __webpack_require__(38) + , Symbol = __webpack_require__(9).Symbol; + module.exports = function(name){ + return store[name] || (store[name] = + Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name)); + }; + +/***/ }, +/* 37 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(9) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); + module.exports = function(key){ + return store[key] || (store[key] = {}); + }; + +/***/ }, +/* 38 */ +/***/ function(module, exports) { + + var id = 0 + , px = Math.random(); + module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + +/***/ }, +/* 39 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(40); + var Iterators = __webpack_require__(33); + Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var addToUnscopables = __webpack_require__(41) + , step = __webpack_require__(42) + , Iterators = __webpack_require__(33) + , toIObject = __webpack_require__(43); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(26)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); + }, 'values'); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + +/***/ }, +/* 41 */ +/***/ function(module, exports) { + + module.exports = function(){ /* empty */ }; + +/***/ }, +/* 42 */ +/***/ function(module, exports) { + + module.exports = function(done, value){ + return {value: value, done: !!done}; + }; + +/***/ }, +/* 43 */ +/***/ function(module, exports, __webpack_require__) { + + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(44) + , defined = __webpack_require__(6); + module.exports = function(it){ + return IObject(defined(it)); + }; + +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(45); + module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); + }; + +/***/ }, +/* 45 */ +/***/ function(module, exports) { + + var toString = {}.toString; + + module.exports = function(it){ + return toString.call(it).slice(8, -1); + }; + +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(47), __esModule: true }; + +/***/ }, +/* 47 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(48); + __webpack_require__(55); + module.exports = __webpack_require__(10).Symbol; + +/***/ }, +/* 48 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // ECMAScript 6 symbols shim + var $ = __webpack_require__(18) + , global = __webpack_require__(9) + , has = __webpack_require__(32) + , DESCRIPTORS = __webpack_require__(31) + , $export = __webpack_require__(8) + , redefine = __webpack_require__(28) + , $fails = __webpack_require__(13) + , shared = __webpack_require__(37) + , setToStringTag = __webpack_require__(35) + , uid = __webpack_require__(38) + , wks = __webpack_require__(36) + , keyOf = __webpack_require__(49) + , $names = __webpack_require__(50) + , enumKeys = __webpack_require__(51) + , isArray = __webpack_require__(52) + , anObject = __webpack_require__(53) + , toIObject = __webpack_require__(43) + , createDesc = __webpack_require__(30) + , getDesc = $.getDesc + , setDesc = $.setDesc + , _create = $.create + , getNames = $names.get + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , setter = false + , HIDDEN = wks('_hidden') + , isEnum = $.isEnum + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , useNative = typeof $Symbol == 'function' + , ObjectProto = Object.prototype; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(setDesc({}, 'a', { + get: function(){ return setDesc(this, 'a', {value: 7}).a; } + })).a != 7; + }) ? function(it, key, D){ + var protoDesc = getDesc(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + setDesc(it, key, D); + if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc); + } : setDesc; + + var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol.prototype); + sym._k = tag; + DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, { + configurable: true, + set: function(value){ + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + } + }); + return sym; + }; + + var isSymbol = function(it){ + return typeof it == 'symbol'; + }; + + var $defineProperty = function defineProperty(it, key, D){ + if(D && has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return setDesc(it, key, D); + }; + var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; + }; + var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key); + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] + ? E : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + var D = getDesc(it = toIObject(it), key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = getNames(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key); + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var names = getNames(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]); + return result; + }; + var $stringify = function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , $$ = arguments + , replacer, $replacer; + while($$.length > i)args.push($$[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }; + var buggyJSON = $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; + }); + + // 19.4.1.1 Symbol([description]) + if(!useNative){ + $Symbol = function Symbol(){ + if(isSymbol(this))throw TypeError('Symbol is not a constructor'); + return wrap(uid(arguments.length > 0 ? arguments[0] : undefined)); + }; + redefine($Symbol.prototype, 'toString', function toString(){ + return this._k; + }); + + isSymbol = function(it){ + return it instanceof $Symbol; + }; + + $.create = $create; + $.isEnum = $propertyIsEnumerable; + $.getDesc = $getOwnPropertyDescriptor; + $.setDesc = $defineProperty; + $.setDescs = $defineProperties; + $.getNames = $names.get = $getOwnPropertyNames; + $.getSymbols = $getOwnPropertySymbols; + + if(DESCRIPTORS && !__webpack_require__(27)){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + } + + var symbolStatics = { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + return keyOf(SymbolRegistry, key); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } + }; + // 19.4.2.2 Symbol.hasInstance + // 19.4.2.3 Symbol.isConcatSpreadable + // 19.4.2.4 Symbol.iterator + // 19.4.2.6 Symbol.match + // 19.4.2.8 Symbol.replace + // 19.4.2.9 Symbol.search + // 19.4.2.10 Symbol.species + // 19.4.2.11 Symbol.split + // 19.4.2.12 Symbol.toPrimitive + // 19.4.2.13 Symbol.toStringTag + // 19.4.2.14 Symbol.unscopables + $.each.call(( + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' + + 'species,split,toPrimitive,toStringTag,unscopables' + ).split(','), function(it){ + var sym = wks(it); + symbolStatics[it] = useNative ? sym : wrap(sym); + }); + + setter = true; + + $export($export.G + $export.W, {Symbol: $Symbol}); + + $export($export.S, 'Symbol', symbolStatics); + + $export($export.S + $export.F * !useNative, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify}); + + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + +/***/ }, +/* 49 */ +/***/ function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(18) + , toIObject = __webpack_require__(43); + module.exports = function(object, el){ + var O = toIObject(object) + , keys = $.getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; + }; + +/***/ }, +/* 50 */ +/***/ function(module, exports, __webpack_require__) { + + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(43) + , getNames = __webpack_require__(18).getNames + , toString = {}.toString; + + var windowNames = typeof window == 'object' && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + + var getWindowNames = function(it){ + try { + return getNames(it); + } catch(e){ + return windowNames.slice(); + } + }; + + module.exports.get = function getOwnPropertyNames(it){ + if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it); + return getNames(toIObject(it)); + }; + +/***/ }, +/* 51 */ +/***/ function(module, exports, __webpack_require__) { + + // all enumerable object keys, includes symbols + var $ = __webpack_require__(18); + module.exports = function(it){ + var keys = $.getKeys(it) + , getSymbols = $.getSymbols; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = $.isEnum + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key); + } + return keys; + }; + +/***/ }, +/* 52 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(45); + module.exports = Array.isArray || function(arg){ + return cof(arg) == 'Array'; + }; + +/***/ }, +/* 53 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(54); + module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; + }; + +/***/ }, +/* 54 */ +/***/ function(module, exports) { + + module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + +/***/ }, +/* 55 */ +/***/ function(module, exports) { + + + +/***/ }, +/* 56 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + exports.__esModule = true; + + var _setPrototypeOf = __webpack_require__(57); + + var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); + + var _create = __webpack_require__(61); + + var _create2 = _interopRequireDefault(_create); + + var _typeof2 = __webpack_require__(20); + + var _typeof3 = _interopRequireDefault(_typeof2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; + }; + +/***/ }, +/* 57 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(58), __esModule: true }; + +/***/ }, +/* 58 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(59); + module.exports = __webpack_require__(10).Object.setPrototypeOf; + +/***/ }, +/* 59 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(8); + $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(60).set}); + +/***/ }, +/* 60 */ +/***/ function(module, exports, __webpack_require__) { + + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var getDesc = __webpack_require__(18).getDesc + , isObject = __webpack_require__(54) + , anObject = __webpack_require__(53); + var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = __webpack_require__(11)(Function.call, getDesc(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check + }; + +/***/ }, +/* 61 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(62), __esModule: true }; + +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(18); + module.exports = function create(P, D){ + return $.create(P, D); + }; + +/***/ }, +/* 63 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + var _vector2d = __webpack_require__(64); + + var _vector2d2 = _interopRequireDefault(_vector2d); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Entity = function () { + function Entity(x, y) { + (0, _classCallCheck3.default)(this, Entity); + + + this.pos = new _vector2d2.default(x || 0, y || 0); + this.velocity = new _vector2d2.default(0, 0); + this.acceleration = new _vector2d2.default(0, 0); + + this.state = {}; + this.children = []; + + this._calculatedPos = this.pos.clone(); + this._lastCalculated = 0; + this._game = null; + this._parent = null; + } + + (0, _createClass3.default)(Entity, [{ + key: "setVelocity", + value: function setVelocity(x, y) { + + if (x instanceof _vector2d2.default) { + this.velocity = x; + } else { + this.velocity.x = x; + this.velocity.y = y; + } + } + }, { + key: "setAcceleration", + value: function setAcceleration(x, y) { + + if (x instanceof _vector2d2.default) { + this.acceleration = x; + } else { + this.acceleration.x = x; + this.acceleration.y = y; + } + } + }, { + key: "createChildEntity", + value: function createChildEntity() { + + var child = new Entity(); + + child._updateGame(this._game); + child._parent = this; + this.children.push(child); + + return child; + } + }, { + key: "addChildEntity", + value: function addChildEntity(child) { + + child._updateGame(this._game); + child._parent = this; + this.children.push(child); + + return child; + } + }, { + key: "detachChildEntity", + value: function detachChildEntity(child) { + + for (var i = 0; i < this.children.length; i++) { + if (this.children[i] == child) { + + this.children.splice(i, 1); + return true; + } + } + + return false; + } + }, { + key: "_preprocess", + value: function _preprocess() { + + // NK: The purpose of this function is to calculate the true position of the entity relative to all its parents. It does this recursively, calling the _preprocess method all the way back up the tree and continuously adding the results together. + + // Note there is a limiter, where the last calculated frame is stored, so that if the position has already been calculated for that node in this particular frame, the cached result is used rather than recalculating. + + // When rendering, the draw calls should use this._calculatedPos rather than this.pos in order for the position to be correct. + + if (this._game && this._lastCalculated < this._game.frameCounter) { + + if (this._parent) { + + var parentPos = this._parent._preprocess(); + + this._calculatedPos.x = this.pos.x + parentPos.x; + this._calculatedPos.y = this.pos.y + parentPos.y; + } else { + this._calculatedPos.x = this.pos.x; + this._calculatedPos.y = this.pos.y; + } + + this._lastCalculated = this._game.frameCounter; + } + + return this._calculatedPos; + } + }, { + key: "_updateGame", + value: function _updateGame(game) { + + this._game = game; + + this.children.forEach(function (child) { + child._updateGame(game); + }); + } + }, { + key: "_updateEntity", + value: function _updateEntity(delta) { + + // Calculate new position based on velocity and acceleration if there's one set + if (this.velocity) { + + if (this.acceleration) { + this.velocity.add(this.acceleration); + } + + this.pos.add(this.velocity); + } + + // If there's an update method, call it + var updated = this.update && this.update(delta); + + if (updated || typeof updated == "undefined" || typeof this.update === "undefined") { + + this.children.forEach(function (child) { + child._updateEntity(delta); + }); + } + } + }, { + key: "_renderEntity", + value: function _renderEntity() { + + this._preprocess(); + + var rendered = this.render && this.render(); + + if (rendered || typeof rendered == "undefined" || typeof this.render === "undefined") { + + this.children.forEach(function (child) { + child._renderEntity(); + }); + } + } + }]); + return Entity; + }(); + + exports.default = Entity; + +/***/ }, +/* 64 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Vector2D = function () { + function Vector2D(x, y) { + (0, _classCallCheck3.default)(this, Vector2D); + + this.x = x || 0;this.y = y || 0; + } + + (0, _createClass3.default)(Vector2D, [{ + key: "invert", + value: function invert() { + this.x = -this.x;this.y = -this.y; + return this; + } + }, { + key: "add", + value: function add(val) { + + if (val instanceof Vector2D) { + this.x += val.x;this.y += val.y; + } else { + this.x += val;this.y += val; + } + + return this; + } + }, { + key: "subtract", + value: function subtract(val) { + + if (val instanceof Vector2D) { + this.x -= val.x;this.y -= val.y; + } else { + this.x -= val;this.y -= val; + } + + return this; + } + }, { + key: "multiply", + value: function multiply(val) { + + if (val instanceof Vector2D) { + this.x *= val.x;this.y *= val.y; + } else { + this.x *= val;this.y *= val; + } + + return this; + } + }, { + key: "divide", + value: function divide(val) { + + if (val instanceof Vector2D) { + this.x /= val.x;this.y /= val.y; + } else { + this.x /= val;this.y /= val; + } + + return this; + } + }, { + key: "equals", + value: function equals(val) { + return this.x == val.x && this.y == val.y; + } + }, { + key: "dot", + value: function dot(val) { + return this.x * val.x + this.y * val.y; + } + }, { + key: "length", + value: function length() { + return Math.sqrt(this.dot(this)); + } + }, { + key: "unit", + value: function unit() { + return this.divide(this.length()); + } + }, { + key: "min", + value: function min() { + return Math.min(this.x, this.y); + } + }, { + key: "max", + value: function max() { + return Math.max(this.x, this.y); + } + }, { + key: "degrees", + value: function degrees() { + return Math.atan(this.x, this.y) * 180; + } + }, { + key: "angle", + value: function angle() { + return Math.atan2(this.x, this.y); + } + }, { + key: "toArray", + value: function toArray() { + return [this.x, this.y]; + } + }, { + key: "toString", + value: function toString() { + return "[" + this.x + "}," + this.y + "}]"; + } + }, { + key: "clone", + value: function clone() { + return new Vector2D(this.x, this.y); + } + }], [{ + key: "fromAngle", + value: function fromAngle(angle, length) { + return new Vector2D(length * Math.cos(angle), length * Math.sin(angle)); + } + }]); + return Vector2D; + }(); + + exports.default = Vector2D; + +/***/ }, +/* 65 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.KeyConsts = undefined; + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var KeyConsts = { + SPACE: 32, + BACKSPACE: 8, + TAB: 9, + ENTER: 13, + SHIFT: 16, + CTRL: 17, + ALT: 18, + PAUSE: 19, + CAPS_LOCK: 20, + ESCAPE: 27, + PAGE_UP: 33, + PAGE_DOWN: 34, + END: 35, + HOME: 36, + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40, + INSERT: 45, + DELETE: 46, + NUM_0: 48, + NUM_1: 49, + NUM_2: 50, + NUM_3: 51, + NUM_4: 52, + NUM_5: 53, + NUM_6: 54, + NUM_7: 55, + NUM_8: 56, + NUM_9: 57, + CHAR_A: 65, + CHAR_B: 66, + CHAR_C: 67, + CHAR_D: 68, + CHAR_E: 69, + CHAR_F: 70, + CHAR_G: 71, + CHAR_H: 72, + CHAR_I: 73, + CHAR_J: 74, + CHAR_K: 75, + CHAR_L: 76, + CHAR_M: 77, + CHAR_N: 78, + CHAR_O: 79, + CHAR_P: 80, + CHAR_Q: 81, + CHAR_R: 82, + CHAR_S: 83, + CHAR_T: 84, + CHAR_U: 85, + CHAR_V: 86, + CHAR_W: 87, + CHAR_X: 88, + CHAR_Y: 89, + CHAR_Z: 90, + NUM_PAD_0: 96, + NUM_PAD_1: 97, + NUM_PAD_2: 98, + NUM_PAD_3: 99, + NUM_PAD_4: 100, + NUM_PAD_5: 101, + NUM_PAD_6: 102, + NUM_PAD_7: 103, + NUM_PAD_8: 104, + NUM_PAD_9: 105, + MULTIPLY: 106, + ADD: 107, + SUBTRACT: 109, + DECIMAL: 110, + DIVIDE: 111, + F1: 112, + F2: 113, + F3: 114, + F4: 115, + F5: 116, + F6: 117, + F7: 118, + F8: 119, + F9: 120, + F10: 121, + F11: 122, + F12: 123, + SEMICOLON: 186, + EQUALS: 187, + COMMA: 188, + DASH: 189, + PERIOD: 190, + FORWARD_SLASH: 191, + GRAVE: 192, + OPEN_BRACKET: 219, + BACK_SLASH: 220, + CLOSE_BRACKET: 221, + SINGLE_QUOTE: 222 + }; + + var KeyboardInput = function () { + function KeyboardInput() { + (0, _classCallCheck3.default)(this, KeyboardInput); + + + var self = this; + self._keyState = {}; + + window.addEventListener("keydown", function (event) { + self._keyDownHandler(event); + }, false); + + window.addEventListener("keyup", function (event) { + self._keyUpHandler(event); + }, false); + } + + (0, _createClass3.default)(KeyboardInput, [{ + key: "isPressed", + value: function isPressed(keyCode) { + return !!this._keyState[keyCode]; + } + }, { + key: "_keyDownHandler", + value: function _keyDownHandler(event) { + this._keyState[event.keyCode] = true; + } + }, { + key: "_keyUpHandler", + value: function _keyUpHandler(event) { + this._keyState[event.keyCode] = false; + } + }]); + return KeyboardInput; + }(); + + exports.default = KeyboardInput; + exports.KeyConsts = KeyConsts; + +/***/ }, +/* 66 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _getPrototypeOf = __webpack_require__(2); + + var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + var _possibleConstructorReturn2 = __webpack_require__(19); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(56); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _entity = __webpack_require__(63); + + var _entity2 = _interopRequireDefault(_entity); + + var _vector2d = __webpack_require__(64); + + var _vector2d2 = _interopRequireDefault(_vector2d); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Emitter = function (_Entity) { + (0, _inherits3.default)(Emitter, _Entity); + + function Emitter(x, y, velocity, particle) { + (0, _classCallCheck3.default)(this, Emitter); + + var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(Emitter).call(this, x, y)); + + _this.particleVelocity = velocity; + _this.particleClass = particle; + _this.emitting = false; + + _this.particles = []; + + _this.spread = function () { + return Math.PI / 32; + }; + + return _this; + } + + (0, _createClass3.default)(Emitter, [{ + key: "_emit", + value: function _emit() { + + if (this.emitting) { + + var ParticleClass = this.particleClass; + + var angle = this.particleVelocity.angle() + this.spread() - Math.random() * this.spread() * 2, + magnitude = this.particleVelocity.length(), + velocity = _vector2d2.default.fromAngle(angle, magnitude); + + var particle = new ParticleClass(this.pos.x, this.pos.y); + particle.velocity = velocity; + + this.particles.push(particle); + this._parent.addChildEntity(particle); + } + } + }, { + key: "update", + value: function update() { + this._emit(); + } + }]); + return Emitter; + }(_entity2.default); + + exports.default = Emitter; + +/***/ }, +/* 67 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _getPrototypeOf = __webpack_require__(2); + + var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + var _possibleConstructorReturn2 = __webpack_require__(19); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(56); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _entity = __webpack_require__(63); + + var _entity2 = _interopRequireDefault(_entity); + + var _vector2d = __webpack_require__(64); + + var _vector2d2 = _interopRequireDefault(_vector2d); + + var _imageloader = __webpack_require__(68); + + var _imageloader2 = _interopRequireDefault(_imageloader); + + var _collisionmethods = __webpack_require__(69); + + var _collisionmethods2 = _interopRequireDefault(_collisionmethods); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Sprite = function (_Entity) { + (0, _inherits3.default)(Sprite, _Entity); + + function Sprite(x, y, width, height, image) { + (0, _classCallCheck3.default)(this, Sprite); + + + if (!image instanceof _imageloader2.default) { + throw new Error("MomentumEngine.Classes.Sprite must be instantiated with an ImageLoader instance"); + } + + var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(Sprite).call(this, x, y)); + + _this.size = new _vector2d2.default(width || 0, height || 0); + + _this._image = image; + _this._imagePos = new _vector2d2.default(0, 0); + _this._imageSize = new _vector2d2.default(0, 0); + + return _this; + } + + (0, _createClass3.default)(Sprite, [{ + key: "setImageCoords", + value: function setImageCoords(x, y, width, height) { + + this._imagePos.x = x; + this._imagePos.y = y; + this._imageSize.x = width || 0; + this._imageSize.y = height || 0; + } + }, { + key: "isReady", + value: function isReady() { + return this._image.isLoaded() && !this._image.isError(); + } + }, { + key: "render", + value: function render() { + + if (this.isReady() && this._game) { + + var imageObj = this._image.getImageObj(); + + var subWidth = imageObj.width - this._imagePos.x, + subHeight = imageObj.height - this._imagePos.y; + + this._game.context.drawImage(imageObj, this._imagePos.x, this._imagePos.y, this._imageSize.x || subWidth, this._imageSize.y || subHeight, this._calculatedPos.x, this._calculatedPos.y, this.size.x || subWidth, this.size.y || subHeight); + + return true; + } else { + return false; + } + } + }]); + return Sprite; + }(_entity2.default); + + exports.default = Sprite; + +/***/ }, +/* 68 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var ImageLoader = function () { + function ImageLoader(src) { + var _this = this; + + (0, _classCallCheck3.default)(this, ImageLoader); + + + this._loaded = false; // Default is true, set it to false until the image has loaded + this._error = false; // If the image fails to load, this will contain the reason + + this._imageObj = new Image(); + + this._imageObj.addEventListener("load", function () { + _this._loaded = true; + _this._error = false; + }); + + this._imageObj.addEventListener("_error", function (err) { + _this._loaded = false; + _this._error = err; + }); + + this._imageObj.src = src; + } + + (0, _createClass3.default)(ImageLoader, [{ + key: "getImageObj", + value: function getImageObj() { + + if (this._loaded) { + return this._imageObj; + } else { + return false; + } + } + }, { + key: "isLoaded", + value: function isLoaded() { + return this._loaded; + } + }, { + key: "isError", + value: function isError() { + return this._error; + } + }]); + return ImageLoader; + }(); + + exports.default = ImageLoader; + +/***/ }, +/* 69 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + var _rect = __webpack_require__(70); + + var _rect2 = _interopRequireDefault(_rect); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var CollisionMethods = function () { + function CollisionMethods() { + (0, _classCallCheck3.default)(this, CollisionMethods); + } + + (0, _createClass3.default)(CollisionMethods, null, [{ + key: "AABB", + value: function AABB(entity1, entity2) { + + if (!entity1 instanceof _rect2.default || !entity2 instanceof _rect2.default) { + throw new Error("AABB collisions can only be checked on these entity types: Rect"); + } + + return entity1.pos.x < entity2.pos.x + entity2.size.x && entity1.pos.x + entity1.size.x > entity2.pos.x && entity1.pos.y < entity2.pos.y + entity2.size.y && entity1.size.y + entity1.pos.y > entity2.pos.y; + } + }]); + return CollisionMethods; + }(); + + exports.default = CollisionMethods; + +/***/ }, +/* 70 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _getPrototypeOf = __webpack_require__(2); + + var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + var _possibleConstructorReturn2 = __webpack_require__(19); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(56); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _entity = __webpack_require__(63); + + var _entity2 = _interopRequireDefault(_entity); + + var _vector2d = __webpack_require__(64); + + var _vector2d2 = _interopRequireDefault(_vector2d); + + var _collisionmethods = __webpack_require__(69); + + var _collisionmethods2 = _interopRequireDefault(_collisionmethods); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Rect = function (_Entity) { + (0, _inherits3.default)(Rect, _Entity); + + function Rect(x, y, width, height, color) { + (0, _classCallCheck3.default)(this, Rect); + + var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(Rect).call(this, x, y)); + + _this.size = new _vector2d2.default(width, height); + _this.color = color; + + return _this; + } + + (0, _createClass3.default)(Rect, [{ + key: "isCollidingWith", + value: function isCollidingWith(entity) { + + if (entity instanceof Rect) { + return _collisionmethods2.default.AABB(this, entity); + } + } + }, { + key: "render", + value: function render() { + + if (this._game) { + + this._game.context.fillStyle = this.color.toString(); + this._game.context.fillRect(this._calculatedPos.x, this._calculatedPos.y, this.size.x, this.size.y); + + return true; + } else { + return false; + } + } + }]); + return Rect; + }(_entity2.default); + + exports.default = Rect; + +/***/ }, +/* 71 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _classCallCheck2 = __webpack_require__(14); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _createClass2 = __webpack_require__(15); + + var _createClass3 = _interopRequireDefault(_createClass2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Color = function () { + function Color(r, g, b, a) { + (0, _classCallCheck3.default)(this, Color); + + + this.r = r || 0; + this.g = g || 0; + this.b = b || 0; + this.a = a || 1; + } + + (0, _createClass3.default)(Color, [{ + key: "toString", + value: function toString() { + return "rgba(" + this.r + ", " + this.g + ", " + this.b + ", " + this.a + ")"; + } + }, { + key: "toHex", + value: function toHex() { + return "#" + (r << 16 | g << 8 | b).toString(16); + } + }]); + return Color; + }(); + + exports.default = Color; + +/***/ }, +/* 72 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _game = __webpack_require__(1); + + var _game2 = _interopRequireDefault(_game); + + var _emitter = __webpack_require__(66); + + var _emitter2 = _interopRequireDefault(_emitter); + + var _entity = __webpack_require__(63); + + var _entity2 = _interopRequireDefault(_entity); + + var _vector2d = __webpack_require__(64); + + var _vector2d2 = _interopRequireDefault(_vector2d); + + var _sprite = __webpack_require__(67); + + var _sprite2 = _interopRequireDefault(_sprite); + + var _rect = __webpack_require__(70); + + var _rect2 = _interopRequireDefault(_rect); + + var _color = __webpack_require__(71); + + var _color2 = _interopRequireDefault(_color); + + var _imageloader = __webpack_require__(68); + + var _imageloader2 = _interopRequireDefault(_imageloader); + + var _keyboardinput = __webpack_require__(65); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var Classes = { + Game: _game2.default, + Emitter: _emitter2.default, + Entity: _entity2.default, + Sprite: _sprite2.default, + Rect: _rect2.default, + Vector2D: _vector2d2.default, + Color: _color2.default, + ImageLoader: _imageloader2.default + }; + + var Consts = { + Input: { + Keys: _keyboardinput.KeyConsts + } + }; + + exports.default = { + Classes: Classes, + Consts: Consts + }; + +/***/ } +/******/ ]); +//# sourceMappingURL=particles.js.map \ No newline at end of file diff --git a/examples/particles/dist/particles.js.map b/examples/particles/dist/particles.js.map new file mode 100644 index 0000000..ca1afa3 --- /dev/null +++ b/examples/particles/dist/particles.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap 20ab6ee2169ee2c479ea?fb72","webpack:///./examples/particles/particles.js","webpack:///./src/classes/game.js?42ad","webpack:///./~/babel-runtime/core-js/object/get-prototype-of.js?b265","webpack:///./~/core-js/library/fn/object/get-prototype-of.js?5193","webpack:///./~/core-js/library/modules/es6.object.get-prototype-of.js?eaa3","webpack:///./~/core-js/library/modules/$.to-object.js?093c","webpack:///./~/core-js/library/modules/$.defined.js?7087","webpack:///./~/core-js/library/modules/$.object-sap.js?f39d","webpack:///./~/core-js/library/modules/$.export.js?b734","webpack:///./~/core-js/library/modules/$.global.js?4deb","webpack:///./~/core-js/library/modules/$.core.js?7680","webpack:///./~/core-js/library/modules/$.ctx.js?e797","webpack:///./~/core-js/library/modules/$.a-function.js?860b","webpack:///./~/core-js/library/modules/$.fails.js?6c29","webpack:///./~/babel-runtime/helpers/classCallCheck.js?21af","webpack:///./~/babel-runtime/helpers/createClass.js?1dfe","webpack:///./~/babel-runtime/core-js/object/define-property.js?5f70","webpack:///./~/core-js/library/fn/object/define-property.js?b7d8","webpack:///./~/core-js/library/modules/$.js?6ce7","webpack:///./~/babel-runtime/helpers/possibleConstructorReturn.js?aad9","webpack:///./~/babel-runtime/helpers/typeof.js?f4bd","webpack:///./~/babel-runtime/core-js/symbol/iterator.js?d16b","webpack:///./~/core-js/library/fn/symbol/iterator.js?238d","webpack:///./~/core-js/library/modules/es6.string.iterator.js?fe18","webpack:///./~/core-js/library/modules/$.string-at.js?a0b4","webpack:///./~/core-js/library/modules/$.to-integer.js?b29c","webpack:///./~/core-js/library/modules/$.iter-define.js?970f","webpack:///./~/core-js/library/modules/$.library.js?c05f","webpack:///./~/core-js/library/modules/$.redefine.js?2643","webpack:///./~/core-js/library/modules/$.hide.js?2cce","webpack:///./~/core-js/library/modules/$.property-desc.js?e1db","webpack:///./~/core-js/library/modules/$.descriptors.js?8327","webpack:///./~/core-js/library/modules/$.has.js?bcec","webpack:///./~/core-js/library/modules/$.iterators.js?9d0a","webpack:///./~/core-js/library/modules/$.iter-create.js?4401","webpack:///./~/core-js/library/modules/$.set-to-string-tag.js?d0fc","webpack:///./~/core-js/library/modules/$.wks.js?3e04","webpack:///./~/core-js/library/modules/$.shared.js?6ce8","webpack:///./~/core-js/library/modules/$.uid.js?f177","webpack:///./~/core-js/library/modules/web.dom.iterable.js?bf0e","webpack:///./~/core-js/library/modules/es6.array.iterator.js?1e09","webpack:///./~/core-js/library/modules/$.add-to-unscopables.js?af5b","webpack:///./~/core-js/library/modules/$.iter-step.js?76ef","webpack:///./~/core-js/library/modules/$.to-iobject.js?daca","webpack:///./~/core-js/library/modules/$.iobject.js?3ada","webpack:///./~/core-js/library/modules/$.cof.js?74ee","webpack:///./~/babel-runtime/core-js/symbol.js?a70d","webpack:///./~/core-js/library/fn/symbol/index.js?f07a","webpack:///./~/core-js/library/modules/es6.symbol.js?670a","webpack:///./~/core-js/library/modules/$.keyof.js?3b7d","webpack:///./~/core-js/library/modules/$.get-names.js?e4b8","webpack:///./~/core-js/library/modules/$.enum-keys.js?1c2a","webpack:///./~/core-js/library/modules/$.is-array.js?4d69","webpack:///./~/core-js/library/modules/$.an-object.js?2be9","webpack:///./~/core-js/library/modules/$.is-object.js?7453","webpack:///./~/babel-runtime/helpers/inherits.js?0578","webpack:///./~/babel-runtime/core-js/object/set-prototype-of.js?bb00","webpack:///./~/core-js/library/fn/object/set-prototype-of.js?f909","webpack:///./~/core-js/library/modules/es6.object.set-prototype-of.js?b195","webpack:///./~/core-js/library/modules/$.set-proto.js?759b","webpack:///./~/babel-runtime/core-js/object/create.js?aa4b","webpack:///./~/core-js/library/fn/object/create.js?738c","webpack:///./src/classes/entity.js?7862","webpack:///./src/classes/vector2d.js?aacc","webpack:///./src/classes/keyboardinput.js?f4ac","webpack:///./src/classes/emitter.js?708e","webpack:///./src/classes/sprite.js?e426","webpack:///./src/classes/imageloader.js?b2ac","webpack:///./src/libs/collisionmethods.js?439c","webpack:///./src/classes/rect.js?5872","webpack:///./src/classes/color.js?70aa","webpack:///./src/es6.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;;;;;;;;;;;;;;;;;;;;;;;;AAIA,KAAI,QAAQ,IAAI,aAAe,OAAf,CAAuB,KAAvB,CAA6B,GAAjC,EAAsC,GAAtC,EAA2C,GAA3C,CAAR;;KAEE;;;AAEF,cAFE,YAEF,CAAa,CAAb,EAAgB,CAAhB,EAAmB;6CAFjB,cAEiB;6FAFjB,yBAGQ,GAAG,GAAG,GAAG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ADkB;AAElB,wBAAO,IAAP,CAFkB;cAAtB,MAGO;AACH,yBAAQ,GAAR,CAAY,2EAAZ,EADG;AAEH,wBAAO,KAAP,CAFG;cAHP;;;YAhKF;;;mBA6KS,K;;;;;;AClLf,mBAAkB,uD;;;;;;ACAlB;AACA,gE;;;;;;ACDA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA,+BAA8B;AAC9B;AACA;AACA,oDAAmD,OAAO,EAAE;AAC5D,G;;;;;;ACTA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAmE;AACnE,sFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,gEAA+D;AAC/D;AACA;AACA;AACA,eAAc;AACd,eAAc;AACd,eAAc;AACd,eAAc;AACd,gBAAe;AACf,gBAAe;AACf,0B;;;;;;AC7CA;AACA;AACA;AACA,wCAAuC,gC;;;;;;ACHvC,8BAA6B;AAC7B,sCAAqC,gC;;;;;;ACDrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACnBA;AACA;AACA;AACA,G;;;;;;ACHA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,G;;;;;;ACNA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,G;;;;;;ACRA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA,oBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC,G;;;;;;AC1BD,mBAAkB,wD;;;;;;ACAlB;AACA;AACA;AACA,G;;;;;;ACHA;AACA;AACA;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACZA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA;AACA;;AAEA;AACA,G;;;;;;AChBA;;AAEA,uGAAsG,mBAAmB,EAAE,mBAAmB,oGAAoG;;AAElP;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA,EAAC;AACD;AACA,G;;;;;;ACpBA,mBAAkB,wD;;;;;;ACAlB;AACA;AACA,sD;;;;;;ACFA;AACA;;AAEA;AACA;AACA,8BAA6B;AAC7B,eAAc;AACd;AACA,EAAC;AACD;AACA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA,WAAU;AACV,EAAC,E;;;;;;AChBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA4B,aAAa;;AAEzC;AACA;AACA;AACA;AACA;AACA,yCAAwC,oCAAoC;AAC5E,6CAA4C,oCAAoC;AAChF,MAAK,2BAA2B,oCAAoC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAkB,mBAAmB;AACrC;AACA;AACA,oCAAmC,2BAA2B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,G;;;;;;ACjEA,uB;;;;;;ACAA,0C;;;;;;ACAA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA,G;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACPA;AACA;AACA,kCAAiC,QAAQ,gBAAgB,UAAU,GAAG;AACtE,EAAC,E;;;;;;ACHD,wBAAuB;AACvB;AACA;AACA,G;;;;;;ACHA,qB;;;;;;ACAA;AACA;AACA;AACA;AACA;;AAEA;AACA,4FAAkF,aAAa,EAAE;;AAEjG;AACA,wDAAuD,0BAA0B;AACjF;AACA,G;;;;;;ACZA;AACA;AACA;;AAEA;AACA,mEAAkE,+BAA+B;AACjG,G;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACNA;AACA;AACA,oDAAmD;AACnD;AACA,wCAAuC;AACvC,G;;;;;;ACLA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA,iE;;;;;;ACFA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAgC;AAChC,eAAc;AACd,kBAAiB;AACjB;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA,6B;;;;;;ACjCA,6BAA4B,e;;;;;;ACA5B;AACA,WAAU;AACV,G;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACLA;AACA;AACA;AACA;AACA,G;;;;;;ACJA,kBAAiB;;AAEjB;AACA;AACA,G;;;;;;ACJA,mBAAkB,wD;;;;;;ACAlB;AACA;AACA,iD;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA2B;AAC3B,qBAAoB,4BAA4B,SAAS,IAAI;AAC7D,IAAG;AACH,EAAC;AACD;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,+DAA8D;AAC9D;AACA,MAAK;AACL;AACA,uBAAsB,iCAAiC;AACvD,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAoD,KAAK,QAAQ,iCAAiC;AAClG,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH,yBAAwB,eAAe,EAAE;AACzC,yBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA,iCAAgC,gBAAgB;;AAEhD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA,8EAA6E,sBAAsB;;AAEnG;AACA;AACA;AACA;AACA;AACA,2C;;;;;;AClOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACTA;AACA;AACA;AACA,mBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,G;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 20ab6ee2169ee2c479ea\n **/","\"use strict\";\n\nimport MomentumEngine from \"../../src/es6\";\n\nlet white = new MomentumEngine.Classes.Color(255, 255, 255);\n\nclass BlueParticle extends MomentumEngine.Classes.Rect {\n\n constructor (x, y) {\n super(x, y, 1, 1, white);\n }\n\n}\n\n\nwindow.onload = function () {\n\n var width = 640,\n height = 360,\n baseSize = width / 64;\n\n var particles = new MomentumEngine.Classes.Game({\n canvas: document.getElementById(\"canvas\"),\n width: width,\n height: height,\n fixRatio: true,\n desiredFps: 60\n });\n\n var black = new MomentumEngine.Classes.Color(0, 0, 0),\n red = new MomentumEngine.Classes.Color(255, 0, 0);\n\n var mainScene = new MomentumEngine.Classes.Rect(0, 0, width, height, black);\n particles.addChildEntity(mainScene);\n\n var rect = new MomentumEngine.Classes.Rect(width / 2 - baseSize, height / 2 - baseSize, baseSize * 2, baseSize * 2, red),\n emitter = new MomentumEngine.Classes.Emitter(0, 0, new MomentumEngine.Classes.Vector2D(1, 1), BlueParticle);\n\n mainScene.addChildEntity(rect);\n rect.addChildEntity(emitter);\n\n emitter.emitting = true;\n particles.start();\n\n};\n\n\n/** WEBPACK FOOTER **\n ** ./examples/particles/particles.js\n **/","\"use strict\";\n\nimport Entity from \"./entity.js\";\nimport KeyboardInput from \"./keyboardinput.js\";\n\nclass Game extends Entity {\n\n\n constructor (config) {\n\n super(); // Call entity constructor\n config = config || {};\n config.inputs = config.inputs || {};\n\n\n // Required params\n if (config.canvas) {\n this.canvas = config.canvas;\n } else {\n throw new Error(\"MomentumEngine.Classes.Game must be constructed with a canvas\");\n }\n\n if (config.width) {\n this.width = config.width;\n } else {\n throw new Error(\"MomentumEngine.Classes.Game must be constructed with canvas width\");\n }\n\n if (config.height) {\n this.height = config.height;\n } else {\n throw new Error(\"MomentumEngine.Classes.Game must be constructed with canvas height\");\n }\n\n\n // Optional params\n this.desiredFps = config.desiredFps || 60;\n\n if (config.fixRatio) {\n\n let deviceRatio = window.devicePixelRatio,\n backingStoreRatio = 0;\n\n // Unfortunately Ejecta requires calling getContext last, so we cannot get the backingStorePixelRatio. So for Ejecta's case, we set it to 1, and call getContext later.\n if (typeof ejecta !== \"undefined\") {\n backingStoreRatio = 1;\n } else {\n\n this.context = this.canvas.getContext(\"2d\");\n\n backingStoreRatio = this.context.webkitBackingStorePixelRatio ||\n this.context.mozBackingStorePixelRatio ||\n this.context.msBackingStorePixelRatio ||\n this.context.oBackingStorePixelRatio ||\n this.context.backingStorePixelRatio || 1;\n\n }\n\n this.scale = deviceRatio / backingStoreRatio;\n\n this.canvas.width = this.width * this.scale;\n this.canvas.height = this.height * this.scale;\n\n this.canvas.style.width = this.width + \"px\";\n this.canvas.style.height = this.height + \"px\";\n\n // Call getContext last for Ejecta only.\n if (typeof ejecta !== \"undefined\") {\n this.context = this.canvas.getContext(\"2d\");\n }\n\n this.context.scale(deviceRatio, deviceRatio);\n\n } else {\n\n this.canvas.width = this.width;\n this.canvas.height = this.height;\n\n this.context = this.canvas.getContext(\"2d\");\n\n }\n\n if (typeof this.context.imageSmoothingEnabled !== \"undefined\") {\n this.context.imageSmoothingEnabled = config.imageSmoothing || false;\n }\n\n\n // Initialize defaults\n this.frameCounter = 0;\n\n this.inputs = {};\n if (config.inputs.keyboard) {\n this.inputs.keyboard = new KeyboardInput(this);\n }\n\n this._game = this;\n this._lastFrameTimestamp = 0;\n this._wantPause = true;\n\n }\n\n\n step (delta) {\n\n this.frameCounter++;\n\n this._updateEntity(delta);\n this._renderEntity();\n\n }\n\n\n start () {\n\n var self = this; // NK: Hate doing this...better way plz?\n\n if (self._wantPause) {\n self._wantPause = false;\n } else {\n console.log(\"MomentumEngine.Classes.Game.start called, game instance is already started\");\n return false; // Game is already running\n }\n\n self._wantPause = false;\n\n let requestFrame = (() => {\n\n return (window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n function (callback) {\n window.setTimeout(callback, 1000 / self.desiredFps);\n });\n\n })();\n\n self._lastFrameTimestamp = +(new Date());\n self.startTime = self._lastFrameTimestamp;\n\n var loop = function () {\n\n if (self._wantPause) {\n return;\n }\n\n let currentTimestamp = +(new Date()),\n delta = currentTimestamp - self._lastFrameTimestamp;\n\n delta = Math.min(delta, 1000 / self.desiredFps);\n self._lastFrameTimestamp = currentTimestamp;\n\n self.step(delta);\n\n requestFrame(loop);\n\n };\n\n loop();\n return true;\n\n }\n\n\n pause () {\n\n if (!this._wantPause) {\n this._wantPause = true;\n return true;\n } else {\n console.log(\"MomentumEngine.Classes.Game.pause called, game instance is already paused\");\n return false;\n }\n }\n\n\n}\n\n\nexport default Game;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/game.js\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/get-prototype-of\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/get-prototype-of.js\n ** module id = 2\n ** module chunks = 0 1\n **/","require('../../modules/es6.object.get-prototype-of');\nmodule.exports = require('../../modules/$.core').Object.getPrototypeOf;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/object/get-prototype-of.js\n ** module id = 3\n ** module chunks = 0 1\n **/","// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = require('./$.to-object');\n\nrequire('./$.object-sap')('getPrototypeOf', function($getPrototypeOf){\n return function getPrototypeOf(it){\n return $getPrototypeOf(toObject(it));\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/es6.object.get-prototype-of.js\n ** module id = 4\n ** module chunks = 0 1\n **/","// 7.1.13 ToObject(argument)\nvar defined = require('./$.defined');\nmodule.exports = function(it){\n return Object(defined(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.to-object.js\n ** module id = 5\n ** module chunks = 0 1\n **/","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.defined.js\n ** module id = 6\n ** module chunks = 0 1\n **/","// most Object methods by ES6 should accept primitives\nvar $export = require('./$.export')\n , core = require('./$.core')\n , fails = require('./$.fails');\nmodule.exports = function(KEY, exec){\n var fn = (core.Object || {})[KEY] || Object[KEY]\n , exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.object-sap.js\n ** module id = 7\n ** module chunks = 0 1\n **/","var global = require('./$.global')\n , core = require('./$.core')\n , ctx = require('./$.ctx')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && key in target;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(param){\n return this instanceof C ? new C(param) : C(param);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\nmodule.exports = $export;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.export.js\n ** module id = 8\n ** module chunks = 0 1\n **/","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.global.js\n ** module id = 9\n ** module chunks = 0 1\n **/","var core = module.exports = {version: '1.2.6'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.core.js\n ** module id = 10\n ** module chunks = 0 1\n **/","// optional / simple context binding\nvar aFunction = require('./$.a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.ctx.js\n ** module id = 11\n ** module chunks = 0 1\n **/","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.a-function.js\n ** module id = 12\n ** module chunks = 0 1\n **/","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.fails.js\n ** module id = 13\n ** module chunks = 0 1\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/classCallCheck.js\n ** module id = 14\n ** module chunks = 0 1\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/createClass.js\n ** module id = 15\n ** module chunks = 0 1\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/define-property.js\n ** module id = 16\n ** module chunks = 0 1\n **/","var $ = require('../../modules/$');\nmodule.exports = function defineProperty(it, key, desc){\n return $.setDesc(it, key, desc);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/object/define-property.js\n ** module id = 17\n ** module chunks = 0 1\n **/","var $Object = Object;\nmodule.exports = {\n create: $Object.create,\n getProto: $Object.getPrototypeOf,\n isEnum: {}.propertyIsEnumerable,\n getDesc: $Object.getOwnPropertyDescriptor,\n setDesc: $Object.defineProperty,\n setDescs: $Object.defineProperties,\n getKeys: $Object.keys,\n getNames: $Object.getOwnPropertyNames,\n getSymbols: $Object.getOwnPropertySymbols,\n each: [].forEach\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.js\n ** module id = 18\n ** module chunks = 0 1\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/possibleConstructorReturn.js\n ** module id = 19\n ** module chunks = 0 1\n **/","\"use strict\";\n\nvar _typeof = typeof _Symbol === \"function\" && typeof _Symbol$iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _Symbol === \"function\" && obj.constructor === _Symbol ? \"symbol\" : typeof obj; };\n\nexports.__esModule = true;\n\nvar _iterator = require(\"../core-js/symbol/iterator\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/typeof.js\n ** module id = 20\n ** module chunks = 0 1\n **/","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/symbol/iterator.js\n ** module id = 21\n ** module chunks = 0 1\n **/","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/$.wks')('iterator');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/symbol/iterator.js\n ** module id = 22\n ** module chunks = 0 1\n **/","'use strict';\nvar $at = require('./$.string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./$.iter-define')(String, 'String', function(iterated){\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , index = this._i\n , point;\n if(index >= O.length)return {value: undefined, done: true};\n point = $at(O, index);\n this._i += point.length;\n return {value: point, done: false};\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/es6.string.iterator.js\n ** module id = 23\n ** module chunks = 0 1\n **/","var toInteger = require('./$.to-integer')\n , defined = require('./$.defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function(TO_STRING){\n return function(that, pos){\n var s = String(defined(that))\n , i = toInteger(pos)\n , l = s.length\n , a, b;\n if(i < 0 || i >= l)return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.string-at.js\n ** module id = 24\n ** module chunks = 0 1\n **/","// 7.1.4 ToInteger\nvar ceil = Math.ceil\n , floor = Math.floor;\nmodule.exports = function(it){\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.to-integer.js\n ** module id = 25\n ** module chunks = 0 1\n **/","'use strict';\nvar LIBRARY = require('./$.library')\n , $export = require('./$.export')\n , redefine = require('./$.redefine')\n , hide = require('./$.hide')\n , has = require('./$.has')\n , Iterators = require('./$.iterators')\n , $iterCreate = require('./$.iter-create')\n , setToStringTag = require('./$.set-to-string-tag')\n , getProto = require('./$').getProto\n , ITERATOR = require('./$.wks')('iterator')\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\n\nvar returnThis = function(){ return this; };\n\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\n $iterCreate(Constructor, NAME, next);\n var getMethod = function(kind){\n if(!BUGGY && kind in proto)return proto[kind];\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , DEF_VALUES = DEFAULT == VALUES\n , VALUES_BUG = false\n , proto = Base.prototype\n , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , $default = $native || getMethod(DEFAULT)\n , methods, key;\n // Fix native\n if($native){\n var IteratorPrototype = getProto($default.call(new Base));\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // FF fix\n if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\n // fix Array#{values, @@iterator}.name in V8 / FF\n if(DEF_VALUES && $native.name !== VALUES){\n VALUES_BUG = true;\n $default = function values(){ return $native.call(this); };\n }\n }\n // Define iterator\n if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: !DEF_VALUES ? $default : getMethod('entries')\n };\n if(FORCED)for(key in methods){\n if(!(key in proto))redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.iter-define.js\n ** module id = 26\n ** module chunks = 0 1\n **/","module.exports = true;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.library.js\n ** module id = 27\n ** module chunks = 0 1\n **/","module.exports = require('./$.hide');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.redefine.js\n ** module id = 28\n ** module chunks = 0 1\n **/","var $ = require('./$')\n , createDesc = require('./$.property-desc');\nmodule.exports = require('./$.descriptors') ? function(object, key, value){\n return $.setDesc(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.hide.js\n ** module id = 29\n ** module chunks = 0 1\n **/","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.property-desc.js\n ** module id = 30\n ** module chunks = 0 1\n **/","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./$.fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.descriptors.js\n ** module id = 31\n ** module chunks = 0 1\n **/","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function(it, key){\n return hasOwnProperty.call(it, key);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.has.js\n ** module id = 32\n ** module chunks = 0 1\n **/","module.exports = {};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.iterators.js\n ** module id = 33\n ** module chunks = 0 1\n **/","'use strict';\nvar $ = require('./$')\n , descriptor = require('./$.property-desc')\n , setToStringTag = require('./$.set-to-string-tag')\n , IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./$.hide')(IteratorPrototype, require('./$.wks')('iterator'), function(){ return this; });\n\nmodule.exports = function(Constructor, NAME, next){\n Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.iter-create.js\n ** module id = 34\n ** module chunks = 0 1\n **/","var def = require('./$').setDesc\n , has = require('./$.has')\n , TAG = require('./$.wks')('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.set-to-string-tag.js\n ** module id = 35\n ** module chunks = 0 1\n **/","var store = require('./$.shared')('wks')\n , uid = require('./$.uid')\n , Symbol = require('./$.global').Symbol;\nmodule.exports = function(name){\n return store[name] || (store[name] =\n Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.wks.js\n ** module id = 36\n ** module chunks = 0 1\n **/","var global = require('./$.global')\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.shared.js\n ** module id = 37\n ** module chunks = 0 1\n **/","var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.uid.js\n ** module id = 38\n ** module chunks = 0 1\n **/","require('./es6.array.iterator');\nvar Iterators = require('./$.iterators');\nIterators.NodeList = Iterators.HTMLCollection = Iterators.Array;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/web.dom.iterable.js\n ** module id = 39\n ** module chunks = 0 1\n **/","'use strict';\nvar addToUnscopables = require('./$.add-to-unscopables')\n , step = require('./$.iter-step')\n , Iterators = require('./$.iterators')\n , toIObject = require('./$.to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./$.iter-define')(Array, 'Array', function(iterated, kind){\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , kind = this._k\n , index = this._i++;\n if(!O || index >= O.length){\n this._t = undefined;\n return step(1);\n }\n if(kind == 'keys' )return step(0, index);\n if(kind == 'values')return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/es6.array.iterator.js\n ** module id = 40\n ** module chunks = 0 1\n **/","module.exports = function(){ /* empty */ };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.add-to-unscopables.js\n ** module id = 41\n ** module chunks = 0 1\n **/","module.exports = function(done, value){\n return {value: value, done: !!done};\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.iter-step.js\n ** module id = 42\n ** module chunks = 0 1\n **/","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./$.iobject')\n , defined = require('./$.defined');\nmodule.exports = function(it){\n return IObject(defined(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.to-iobject.js\n ** module id = 43\n ** module chunks = 0 1\n **/","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./$.cof');\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.iobject.js\n ** module id = 44\n ** module chunks = 0 1\n **/","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.cof.js\n ** module id = 45\n ** module chunks = 0 1\n **/","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/symbol.js\n ** module id = 46\n ** module chunks = 0 1\n **/","require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nmodule.exports = require('../../modules/$.core').Symbol;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/symbol/index.js\n ** module id = 47\n ** module chunks = 0 1\n **/","'use strict';\n// ECMAScript 6 symbols shim\nvar $ = require('./$')\n , global = require('./$.global')\n , has = require('./$.has')\n , DESCRIPTORS = require('./$.descriptors')\n , $export = require('./$.export')\n , redefine = require('./$.redefine')\n , $fails = require('./$.fails')\n , shared = require('./$.shared')\n , setToStringTag = require('./$.set-to-string-tag')\n , uid = require('./$.uid')\n , wks = require('./$.wks')\n , keyOf = require('./$.keyof')\n , $names = require('./$.get-names')\n , enumKeys = require('./$.enum-keys')\n , isArray = require('./$.is-array')\n , anObject = require('./$.an-object')\n , toIObject = require('./$.to-iobject')\n , createDesc = require('./$.property-desc')\n , getDesc = $.getDesc\n , setDesc = $.setDesc\n , _create = $.create\n , getNames = $names.get\n , $Symbol = global.Symbol\n , $JSON = global.JSON\n , _stringify = $JSON && $JSON.stringify\n , setter = false\n , HIDDEN = wks('_hidden')\n , isEnum = $.isEnum\n , SymbolRegistry = shared('symbol-registry')\n , AllSymbols = shared('symbols')\n , useNative = typeof $Symbol == 'function'\n , ObjectProto = Object.prototype;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function(){\n return _create(setDesc({}, 'a', {\n get: function(){ return setDesc(this, 'a', {value: 7}).a; }\n })).a != 7;\n}) ? function(it, key, D){\n var protoDesc = getDesc(ObjectProto, key);\n if(protoDesc)delete ObjectProto[key];\n setDesc(it, key, D);\n if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);\n} : setDesc;\n\nvar wrap = function(tag){\n var sym = AllSymbols[tag] = _create($Symbol.prototype);\n sym._k = tag;\n DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {\n configurable: true,\n set: function(value){\n if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n }\n });\n return sym;\n};\n\nvar isSymbol = function(it){\n return typeof it == 'symbol';\n};\n\nvar $defineProperty = function defineProperty(it, key, D){\n if(D && has(AllSymbols, key)){\n if(!D.enumerable){\n if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n D = _create(D, {enumerable: createDesc(0, false)});\n } return setSymbolDesc(it, key, D);\n } return setDesc(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P){\n anObject(it);\n var keys = enumKeys(P = toIObject(P))\n , i = 0\n , l = keys.length\n , key;\n while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P){\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n var E = isEnum.call(this, key);\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]\n ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n var D = getDesc(it = toIObject(it), key);\n if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n var names = getNames(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);\n return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n var names = getNames(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);\n return result;\n};\nvar $stringify = function stringify(it){\n if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\n var args = [it]\n , i = 1\n , $$ = arguments\n , replacer, $replacer;\n while($$.length > i)args.push($$[i++]);\n replacer = args[1];\n if(typeof replacer == 'function')$replacer = replacer;\n if($replacer || !isArray(replacer))replacer = function(key, value){\n if($replacer)value = $replacer.call(this, key, value);\n if(!isSymbol(value))return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n};\nvar buggyJSON = $fails(function(){\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n});\n\n// 19.4.1.1 Symbol([description])\nif(!useNative){\n $Symbol = function Symbol(){\n if(isSymbol(this))throw TypeError('Symbol is not a constructor');\n return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));\n };\n redefine($Symbol.prototype, 'toString', function toString(){\n return this._k;\n });\n\n isSymbol = function(it){\n return it instanceof $Symbol;\n };\n\n $.create = $create;\n $.isEnum = $propertyIsEnumerable;\n $.getDesc = $getOwnPropertyDescriptor;\n $.setDesc = $defineProperty;\n $.setDescs = $defineProperties;\n $.getNames = $names.get = $getOwnPropertyNames;\n $.getSymbols = $getOwnPropertySymbols;\n\n if(DESCRIPTORS && !require('./$.library')){\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n}\n\nvar symbolStatics = {\n // 19.4.2.1 Symbol.for(key)\n 'for': function(key){\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key){\n return keyOf(SymbolRegistry, key);\n },\n useSetter: function(){ setter = true; },\n useSimple: function(){ setter = false; }\n};\n// 19.4.2.2 Symbol.hasInstance\n// 19.4.2.3 Symbol.isConcatSpreadable\n// 19.4.2.4 Symbol.iterator\n// 19.4.2.6 Symbol.match\n// 19.4.2.8 Symbol.replace\n// 19.4.2.9 Symbol.search\n// 19.4.2.10 Symbol.species\n// 19.4.2.11 Symbol.split\n// 19.4.2.12 Symbol.toPrimitive\n// 19.4.2.13 Symbol.toStringTag\n// 19.4.2.14 Symbol.unscopables\n$.each.call((\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +\n 'species,split,toPrimitive,toStringTag,unscopables'\n).split(','), function(it){\n var sym = wks(it);\n symbolStatics[it] = useNative ? sym : wrap(sym);\n});\n\nsetter = true;\n\n$export($export.G + $export.W, {Symbol: $Symbol});\n\n$export($export.S, 'Symbol', symbolStatics);\n\n$export($export.S + $export.F * !useNative, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});\n\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/es6.symbol.js\n ** module id = 48\n ** module chunks = 0 1\n **/","var $ = require('./$')\n , toIObject = require('./$.to-iobject');\nmodule.exports = function(object, el){\n var O = toIObject(object)\n , keys = $.getKeys(O)\n , length = keys.length\n , index = 0\n , key;\n while(length > index)if(O[key = keys[index++]] === el)return key;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.keyof.js\n ** module id = 49\n ** module chunks = 0 1\n **/","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./$.to-iobject')\n , getNames = require('./$').getNames\n , toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function(it){\n try {\n return getNames(it);\n } catch(e){\n return windowNames.slice();\n }\n};\n\nmodule.exports.get = function getOwnPropertyNames(it){\n if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);\n return getNames(toIObject(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.get-names.js\n ** module id = 50\n ** module chunks = 0 1\n **/","// all enumerable object keys, includes symbols\nvar $ = require('./$');\nmodule.exports = function(it){\n var keys = $.getKeys(it)\n , getSymbols = $.getSymbols;\n if(getSymbols){\n var symbols = getSymbols(it)\n , isEnum = $.isEnum\n , i = 0\n , key;\n while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);\n }\n return keys;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.enum-keys.js\n ** module id = 51\n ** module chunks = 0 1\n **/","// 7.2.2 IsArray(argument)\nvar cof = require('./$.cof');\nmodule.exports = Array.isArray || function(arg){\n return cof(arg) == 'Array';\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.is-array.js\n ** module id = 52\n ** module chunks = 0 1\n **/","var isObject = require('./$.is-object');\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.an-object.js\n ** module id = 53\n ** module chunks = 0 1\n **/","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.is-object.js\n ** module id = 54\n ** module chunks = 0 1\n **/","\"use strict\";\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = require(\"../core-js/object/set-prototype-of\");\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = require(\"../core-js/object/create\");\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/inherits.js\n ** module id = 56\n ** module chunks = 0 1\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/set-prototype-of\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/set-prototype-of.js\n ** module id = 57\n ** module chunks = 0 1\n **/","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/$.core').Object.setPrototypeOf;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/object/set-prototype-of.js\n ** module id = 58\n ** module chunks = 0 1\n **/","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./$.export');\n$export($export.S, 'Object', {setPrototypeOf: require('./$.set-proto').set});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/es6.object.set-prototype-of.js\n ** module id = 59\n ** module chunks = 0 1\n **/","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar getDesc = require('./$').getDesc\n , isObject = require('./$.is-object')\n , anObject = require('./$.an-object');\nvar check = function(O, proto){\n anObject(O);\n if(!isObject(proto) && proto !== null)throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function(test, buggy, set){\n try {\n set = require('./$.ctx')(Function.call, getDesc(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch(e){ buggy = true; }\n return function setPrototypeOf(O, proto){\n check(O, proto);\n if(buggy)O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.set-proto.js\n ** module id = 60\n ** module chunks = 0 1\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/create\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/create.js\n ** module id = 61\n ** module chunks = 0 1\n **/","var $ = require('../../modules/$');\nmodule.exports = function create(P, D){\n return $.create(P, D);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/object/create.js\n ** module id = 62\n ** module chunks = 0 1\n **/","\"use strict\";\n\nimport Vector2D from \"./vector2d.js\";\n\nclass Entity {\n\n\n constructor (x, y) {\n\n this.pos = new Vector2D(x || 0, y || 0);\n this.velocity = new Vector2D(0, 0);\n this.acceleration = new Vector2D(0, 0);\n\n this.state = {};\n this.children = [];\n\n this._calculatedPos = this.pos.clone();\n this._lastCalculated = 0;\n this._game = null;\n this._parent = null;\n\n }\n\n\n setVelocity (x, y) {\n\n if (x instanceof Vector2D) {\n this.velocity = x;\n } else {\n this.velocity.x = x;\n this.velocity.y = y;\n }\n\n }\n\n\n setAcceleration (x, y) {\n\n if (x instanceof Vector2D) {\n this.acceleration = x;\n } else {\n this.acceleration.x = x;\n this.acceleration.y = y;\n }\n\n }\n\n\n createChildEntity () {\n\n let child = new Entity();\n\n child._updateGame(this._game);\n child._parent = this;\n this.children.push(child);\n\n return child;\n\n }\n\n\n addChildEntity (child) {\n\n child._updateGame(this._game);\n child._parent = this;\n this.children.push(child);\n\n return child;\n\n }\n\n\n detachChildEntity (child) {\n\n for (let i = 0; i < this.children.length; i++) {\n if (this.children[i] == child) {\n\n this.children.splice(i, 1);\n return true;\n\n }\n }\n\n return false;\n\n }\n\n\n _preprocess () {\n\n // NK: The purpose of this function is to calculate the true position of the entity relative to all its parents. It does this recursively, calling the _preprocess method all the way back up the tree and continuously adding the results together.\n\n // Note there is a limiter, where the last calculated frame is stored, so that if the position has already been calculated for that node in this particular frame, the cached result is used rather than recalculating.\n\n // When rendering, the draw calls should use this._calculatedPos rather than this.pos in order for the position to be correct.\n\n if (this._game && this._lastCalculated < this._game.frameCounter) {\n\n if (this._parent) {\n\n let parentPos = this._parent._preprocess();\n\n this._calculatedPos.x = this.pos.x + parentPos.x;\n this._calculatedPos.y = this.pos.y + parentPos.y;\n\n } else {\n this._calculatedPos.x = this.pos.x;\n this._calculatedPos.y = this.pos.y;\n }\n\n this._lastCalculated = this._game.frameCounter;\n\n }\n\n return this._calculatedPos;\n\n }\n\n\n _updateGame (game) {\n\n this._game = game;\n\n this.children.forEach((child) => {\n child._updateGame(game);\n });\n\n }\n\n\n _updateEntity (delta) {\n\n // Calculate new position based on velocity and acceleration if there's one set\n if (this.velocity) {\n\n if (this.acceleration) {\n this.velocity.add(this.acceleration);\n }\n\n this.pos.add(this.velocity);\n\n }\n\n // If there's an update method, call it\n let updated = this.update && this.update(delta);\n\n if (updated || (typeof updated == \"undefined\") || (typeof this.update === \"undefined\")) {\n\n this.children.forEach((child) => {\n child._updateEntity(delta);\n });\n\n }\n\n }\n\n\n _renderEntity () {\n\n this._preprocess();\n\n let rendered = this.render && this.render();\n\n if (rendered || (typeof rendered == \"undefined\") || (typeof this.render === \"undefined\")) {\n\n this.children.forEach((child) => {\n child._renderEntity();\n });\n\n }\n\n }\n\n\n}\n\n\nexport default Entity;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/entity.js\n **/","\"use strict\";\n\nclass Vector2D {\n\n\n constructor (x, y) {\n this.x = x || 0; this.y = y || 0;\n }\n\n\n invert () {\n this.x = -this.x; this.y = -this.y;\n return this;\n }\n\n\n add (val) {\n\n if (val instanceof Vector2D) {\n this.x += val.x; this.y += val.y;\n } else {\n this.x += val; this.y += val;\n }\n\n return this;\n\n }\n\n\n subtract (val) {\n\n if (val instanceof Vector2D) {\n this.x -= val.x; this.y -= val.y;\n } else {\n this.x -= val; this.y -= val;\n }\n\n return this;\n\n }\n\n\n multiply (val) {\n\n if (val instanceof Vector2D) {\n this.x *= val.x; this.y *= val.y;\n } else {\n this.x *= val; this.y *= val;\n }\n\n return this;\n\n }\n\n\n divide (val) {\n\n if (val instanceof Vector2D) {\n this.x /= val.x; this.y /= val.y;\n } else {\n this.x /= val; this.y /= val;\n }\n\n return this;\n\n }\n\n\n equals (val) {\n return (this.x == val.x && this.y == val.y);\n }\n\n\n dot (val) {\n return (this.x * val.x + this.y * val.y);\n }\n\n\n length () {\n return Math.sqrt(this.dot(this));\n }\n\n\n unit () {\n return this.divide(this.length());\n }\n\n\n min () {\n return Math.min(this.x, this.y);\n }\n\n\n max () {\n return Math.max(this.x, this.y);\n }\n\n\n degrees () {\n return (Math.atan(this.x, this.y) * 180);\n }\n\n\n angle () {\n return Math.atan2(this.x, this.y);\n }\n\n\n toArray () {\n return [this.x, this.y];\n }\n\n\n toString () {\n return `[${this.x}},${this.y}}]`;\n }\n\n\n clone () {\n return new Vector2D(this.x, this.y);\n }\n\n\n static fromAngle (angle, length) {\n return new Vector2D(length * Math.cos(angle), length * Math.sin(angle));\n }\n\n\n}\n\n\nexport default Vector2D;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/vector2d.js\n **/","\"use strict\";\n\n\nconst KeyConsts = {\n SPACE: 32,\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n SHIFT: 16,\n CTRL: 17,\n ALT: 18,\n PAUSE: 19,\n CAPS_LOCK: 20,\n ESCAPE: 27,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n INSERT: 45,\n DELETE: 46,\n NUM_0: 48,\n NUM_1: 49,\n NUM_2: 50,\n NUM_3: 51,\n NUM_4: 52,\n NUM_5: 53,\n NUM_6: 54,\n NUM_7: 55,\n NUM_8: 56,\n NUM_9: 57,\n CHAR_A: 65,\n CHAR_B: 66,\n CHAR_C: 67,\n CHAR_D: 68,\n CHAR_E: 69,\n CHAR_F: 70,\n CHAR_G: 71,\n CHAR_H: 72,\n CHAR_I: 73,\n CHAR_J: 74,\n CHAR_K: 75,\n CHAR_L: 76,\n CHAR_M: 77,\n CHAR_N: 78,\n CHAR_O: 79,\n CHAR_P: 80,\n CHAR_Q: 81,\n CHAR_R: 82,\n CHAR_S: 83,\n CHAR_T: 84,\n CHAR_U: 85,\n CHAR_V: 86,\n CHAR_W: 87,\n CHAR_X: 88,\n CHAR_Y: 89,\n CHAR_Z: 90,\n NUM_PAD_0: 96,\n NUM_PAD_1: 97,\n NUM_PAD_2: 98,\n NUM_PAD_3: 99,\n NUM_PAD_4: 100,\n NUM_PAD_5: 101,\n NUM_PAD_6: 102,\n NUM_PAD_7: 103,\n NUM_PAD_8: 104,\n NUM_PAD_9: 105,\n MULTIPLY: 106,\n ADD: 107,\n SUBTRACT: 109,\n DECIMAL: 110,\n DIVIDE: 111,\n F1: 112,\n F2: 113,\n F3: 114,\n F4: 115,\n F5: 116,\n F6: 117,\n F7: 118,\n F8: 119,\n F9: 120,\n F10: 121,\n F11: 122,\n F12: 123,\n SEMICOLON: 186,\n EQUALS: 187,\n COMMA: 188,\n DASH: 189,\n PERIOD: 190,\n FORWARD_SLASH: 191,\n GRAVE: 192,\n OPEN_BRACKET: 219,\n BACK_SLASH: 220,\n CLOSE_BRACKET: 221,\n SINGLE_QUOTE: 222\n};\n\n\nclass KeyboardInput {\n\n\n constructor () {\n\n var self = this;\n self._keyState = {};\n\n window.addEventListener(\"keydown\", (event) => {\n self._keyDownHandler(event);\n }, false);\n\n window.addEventListener(\"keyup\", (event) => {\n self._keyUpHandler(event);\n }, false);\n\n }\n\n\n isPressed (keyCode) {\n return !!this._keyState[keyCode];\n }\n\n\n _keyDownHandler (event) {\n this._keyState[event.keyCode] = true;\n }\n\n\n _keyUpHandler (event) {\n this._keyState[event.keyCode] = false;\n }\n\n\n}\n\n\nexport default KeyboardInput;\nexport {KeyConsts};\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/keyboardinput.js\n **/","\"use strict\";\n\nimport Entity from \"./entity.js\";\nimport Vector2D from \"./vector2d.js\";\n\n\nclass Emitter extends Entity {\n\n\n constructor (x, y, velocity, particle) {\n\n super(x, y);\n\n this.particleVelocity = velocity;\n this.particleClass = particle;\n this.emitting = false;\n\n this.particles = [];\n\n this.spread = function () {\n return Math.PI / 32;\n }\n\n }\n\n\n _emit () {\n\n if (this.emitting) {\n\n let ParticleClass = this.particleClass;\n\n let angle = this.particleVelocity.angle() + this.spread() - (Math.random() * this.spread() * 2),\n magnitude = this.particleVelocity.length(),\n velocity = Vector2D.fromAngle(angle, magnitude);\n\n let particle = new ParticleClass(this.pos.x, this.pos.y);\n particle.velocity = velocity;\n\n this.particles.push(particle);\n this._parent.addChildEntity(particle);\n\n }\n\n }\n\n\n update () {\n this._emit();\n }\n\n\n}\n\n\nexport default Emitter;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/emitter.js\n **/","\"use strict\";\n\nimport Entity from \"./entity.js\";\nimport Vector2D from \"./vector2d.js\";\nimport ImageLoader from \"./imageloader.js\";\n\nimport CollisionMethods from \"../libs/collisionmethods.js\";\n\n\nclass Sprite extends Entity {\n\n\n constructor (x, y, width, height, image) {\n\n if (!image instanceof ImageLoader) {\n throw new Error(\"MomentumEngine.Classes.Sprite must be instantiated with an ImageLoader instance\");\n }\n\n super(x, y);\n\n this.size = new Vector2D(width || 0, height || 0);\n\n this._image = image;\n this._imagePos = new Vector2D(0, 0);\n this._imageSize = new Vector2D(0, 0);\n\n }\n\n\n setImageCoords (x, y, width, height) {\n\n this._imagePos.x = x;\n this._imagePos.y = y;\n this._imageSize.x = width || 0;\n this._imageSize.y = height || 0;\n\n }\n\n\n isReady () {\n return (this._image.isLoaded() && !this._image.isError());\n }\n\n\n render () {\n\n if (this.isReady() && this._game) {\n\n let imageObj = this._image.getImageObj();\n\n let subWidth = imageObj.width - this._imagePos.x,\n subHeight = imageObj.height - this._imagePos.y;\n\n this._game.context.drawImage(\n imageObj,\n this._imagePos.x,\n this._imagePos.y,\n this._imageSize.x || subWidth,\n this._imageSize.y || subHeight,\n this._calculatedPos.x,\n this._calculatedPos.y,\n this.size.x || subWidth,\n this.size.y || subHeight\n );\n\n return true;\n\n } else {\n return false;\n }\n\n }\n\n\n}\n\n\nexport default Sprite;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/sprite.js\n **/","\"use strict\";\n\nclass ImageLoader {\n\n\n constructor (src) {\n\n this._loaded = false; // Default is true, set it to false until the image has loaded\n this._error = false; // If the image fails to load, this will contain the reason\n\n this._imageObj = new Image();\n\n this._imageObj.addEventListener(\"load\", () => {\n this._loaded = true;\n this._error = false;\n });\n\n this._imageObj.addEventListener(\"_error\", (err) => {\n this._loaded = false;\n this._error = err;\n });\n\n this._imageObj.src = src;\n\n }\n\n\n getImageObj () {\n\n if (this._loaded) {\n return this._imageObj;\n } else {\n return false;\n }\n\n }\n\n\n isLoaded () {\n return this._loaded;\n }\n\n\n isError () {\n return this._error;\n }\n\n\n}\n\n\nexport default ImageLoader;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/imageloader.js\n **/","import Rect from \"../classes/rect.js\";\n\nclass CollisionMethods {\n\n\n static AABB (entity1, entity2) {\n\n if (!entity1 instanceof Rect || !entity2 instanceof Rect) {\n throw new Error(\"AABB collisions can only be checked on these entity types: Rect\");\n }\n\n return (entity1.pos.x < entity2.pos.x + entity2.size.x &&\n entity1.pos.x + entity1.size.x > entity2.pos.x &&\n entity1.pos.y < entity2.pos.y + entity2.size.y &&\n entity1.size.y + entity1.pos.y > entity2.pos.y);\n\n }\n\n\n}\n\n\nexport default CollisionMethods;\n\n\n/** WEBPACK FOOTER **\n ** ./src/libs/collisionmethods.js\n **/","\"use strict\";\n\nimport Entity from \"./entity.js\";\nimport Vector2D from \"./vector2d.js\";\n\nimport CollisionMethods from \"../libs/collisionmethods.js\";\n\n\nclass Rect extends Entity {\n\n\n constructor (x, y, width, height, color) {\n\n super(x, y);\n\n this.size = new Vector2D(width, height);\n this.color = color;\n\n }\n\n\n isCollidingWith (entity) {\n\n if (entity instanceof Rect) {\n return CollisionMethods.AABB(this, entity);\n }\n\n }\n\n\n render () {\n\n if (this._game) {\n\n this._game.context.fillStyle = this.color.toString();\n this._game.context.fillRect(this._calculatedPos.x, this._calculatedPos.y, this.size.x, this.size.y);\n\n return true;\n\n } else {\n return false;\n }\n\n }\n\n\n}\n\n\nexport default Rect;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/rect.js\n **/","\"use strict\";\n\nclass Color {\n\n\n constructor (r, g, b, a) {\n\n this.r = r || 0;\n this.g = g || 0;\n this.b = b || 0;\n this.a = a || 1;\n\n }\n\n\n toString () {\n return `rgba(${this.r}, ${this.g}, ${this.b}, ${this.a})`;\n }\n\n\n toHex () {\n return `#${((r << 16) | (g << 8) | b).toString(16)}`;\n }\n\n\n}\n\n\nexport default Color;\n\n\n/** WEBPACK FOOTER **\n ** ./src/classes/color.js\n **/","\"use strict\";\n\nimport Game from \"./classes/game.js\";\nimport Emitter from \"./classes/emitter.js\";\nimport Entity from \"./classes/entity.js\";\nimport Vector2D from \"./classes/vector2d.js\";\nimport Sprite from \"./classes/sprite.js\";\nimport Rect from \"./classes/rect.js\";\nimport Color from \"./classes/color.js\";\nimport ImageLoader from \"./classes/imageloader.js\";\n\nimport {KeyConsts} from \"./classes/keyboardinput.js\";\n\n\nconst Classes = {\n Game: Game,\n Emitter: Emitter,\n Entity: Entity,\n Sprite: Sprite,\n Rect: Rect,\n Vector2D: Vector2D,\n Color: Color,\n ImageLoader: ImageLoader\n};\n\n\nconst Consts = {\n Input: {\n Keys: KeyConsts\n }\n};\n\n\nexport default {\n Classes,\n Consts\n};\n\n\n/** WEBPACK FOOTER **\n ** ./src/es6.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/examples/particles/index.html b/examples/particles/index.html new file mode 100644 index 0000000..ccba0ee --- /dev/null +++ b/examples/particles/index.html @@ -0,0 +1,10 @@ + + + + Particles - MomentumEngine + + + + + + \ No newline at end of file diff --git a/examples/particles/particles.js b/examples/particles/particles.js new file mode 100644 index 0000000..fcc3592 --- /dev/null +++ b/examples/particles/particles.js @@ -0,0 +1,45 @@ +"use strict"; + +import MomentumEngine from "../../src/es6"; + +let white = new MomentumEngine.Classes.Color(255, 255, 255); + +class BlueParticle extends MomentumEngine.Classes.Rect { + + constructor (x, y) { + super(x, y, 1, 1, white); + } + +} + + +window.onload = function () { + + var width = 640, + height = 360, + baseSize = width / 64; + + var particles = new MomentumEngine.Classes.Game({ + canvas: document.getElementById("canvas"), + width: width, + height: height, + fixRatio: true, + desiredFps: 60 + }); + + var black = new MomentumEngine.Classes.Color(0, 0, 0), + red = new MomentumEngine.Classes.Color(255, 0, 0); + + var mainScene = new MomentumEngine.Classes.Rect(0, 0, width, height, black); + particles.addChildEntity(mainScene); + + var rect = new MomentumEngine.Classes.Rect(width / 2 - baseSize, height / 2 - baseSize, baseSize * 2, baseSize * 2, red), + emitter = new MomentumEngine.Classes.Emitter(0, 0, new MomentumEngine.Classes.Vector2D(1, 1), BlueParticle); + + mainScene.addChildEntity(rect); + rect.addChildEntity(emitter); + + emitter.emitting = true; + particles.start(); + +}; \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index e42da1b..57067f6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -26,7 +26,8 @@ var build = function (options, callback) { webpack({ entry: { - "es5": path.join(__dirname, "src", "es5.js") + "es5": path.join(__dirname, "src", "es5.js"), + "particles": path.join(__dirname, "examples/particles", "particles.js") }, bail: !options.watch, watch: options.watch, @@ -41,7 +42,8 @@ var build = function (options, callback) { loader: "babel-loader", test: /\.js$/, include: [ - path.join(__dirname, "src") + path.join(__dirname, "src"), + path.join(__dirname, "examples") ], query: { plugins: ["transform-runtime"], @@ -76,6 +78,15 @@ var build = function (options, callback) { }; +gulp.task("move", () => { + gulp.src([ + "./dist/particles.*" + ], { + base: "./dist" + }).pipe(gulp.dest("examples/particles/dist")); +}); + + gulp.task("build-dev", (callback) => { build({ watch: false, diff --git a/package.json b/package.json index cc7c0b7..bebcb7d 100644 --- a/package.json +++ b/package.json @@ -12,15 +12,15 @@ "node": "^4.2.3" }, "devDependencies": { - "babel-core": "6.3.17", - "babel-loader": "6.2.0", - "babel-plugin-transform-runtime": "6.3.13", - "babel-preset-es2015": "6.3.13", - "babel-preset-stage-0": "6.3.13", - "babel-runtime": "6.3.19", - "gulp": "3.9.0", + "babel-core": "6.5.2", + "babel-loader": "6.2.2", + "babel-plugin-transform-runtime": "6.5.2", + "babel-preset-es2015": "6.5.0", + "babel-preset-stage-0": "6.5.0", + "babel-runtime": "6.5.0", + "gulp": "3.9.1", "gulp-util": "3.0.7", - "webpack": "1.12.9" + "webpack": "1.12.13" }, "dependencies": {} } diff --git a/src/classes/emitter.js b/src/classes/emitter.js new file mode 100644 index 0000000..1755403 --- /dev/null +++ b/src/classes/emitter.js @@ -0,0 +1,56 @@ +"use strict"; + +import Entity from "./entity.js"; +import Vector2D from "./vector2d.js"; + + +class Emitter extends Entity { + + + constructor (x, y, velocity, particle) { + + super(x, y); + + this.particleVelocity = velocity; + this.particleClass = particle; + this.emitting = false; + + this.particles = []; + + this.spread = function () { + return Math.PI / 32; + } + + } + + + _emit () { + + if (this.emitting) { + + let ParticleClass = this.particleClass; + + let angle = this.particleVelocity.angle() + this.spread() - (Math.random() * this.spread() * 2), + magnitude = this.particleVelocity.length(), + velocity = Vector2D.fromAngle(angle, magnitude); + + let particle = new ParticleClass(this.pos.x, this.pos.y); + particle.velocity = velocity; + + this.particles.push(particle); + this._parent.addChildEntity(particle); + + } + + } + + + update () { + this._emit(); + } + + +} + + +export default Emitter; \ No newline at end of file diff --git a/src/classes/entity.js b/src/classes/entity.js index 629cb15..705b028 100644 --- a/src/classes/entity.js +++ b/src/classes/entity.js @@ -8,6 +8,8 @@ class Entity { constructor (x, y) { this.pos = new Vector2D(x || 0, y || 0); + this.velocity = new Vector2D(0, 0); + this.acceleration = new Vector2D(0, 0); this.state = {}; this.children = []; @@ -20,6 +22,30 @@ class Entity { } + setVelocity (x, y) { + + if (x instanceof Vector2D) { + this.velocity = x; + } else { + this.velocity.x = x; + this.velocity.y = y; + } + + } + + + setAcceleration (x, y) { + + if (x instanceof Vector2D) { + this.acceleration = x; + } else { + this.acceleration.x = x; + this.acceleration.y = y; + } + + } + + createChildEntity () { let child = new Entity(); @@ -46,7 +72,7 @@ class Entity { detachChildEntity (child) { - for (var i = 0; i < this.children.length; i++) { + for (let i = 0; i < this.children.length; i++) { if (this.children[i] == child) { this.children.splice(i, 1); @@ -104,7 +130,19 @@ class Entity { _updateEntity (delta) { - var updated = this.update && this.update(delta); + // Calculate new position based on velocity and acceleration if there's one set + if (this.velocity) { + + if (this.acceleration) { + this.velocity.add(this.acceleration); + } + + this.pos.add(this.velocity); + + } + + // If there's an update method, call it + let updated = this.update && this.update(delta); if (updated || (typeof updated == "undefined") || (typeof this.update === "undefined")) { @@ -121,7 +159,7 @@ class Entity { this._preprocess(); - var rendered = this.render && this.render(); + let rendered = this.render && this.render(); if (rendered || (typeof rendered == "undefined") || (typeof this.render === "undefined")) { diff --git a/src/classes/game.js b/src/classes/game.js index 501dc2f..283a47d 100644 --- a/src/classes/game.js +++ b/src/classes/game.js @@ -123,7 +123,7 @@ class Game extends Entity { self._wantPause = false; - var requestFrame = (() => { + let requestFrame = (() => { return (window.requestAnimationFrame || window.webkitRequestAnimationFrame || diff --git a/src/classes/sprite.js b/src/classes/sprite.js index 4a83ca9..3aa0048 100644 --- a/src/classes/sprite.js +++ b/src/classes/sprite.js @@ -46,9 +46,9 @@ class Sprite extends Entity { if (this.isReady() && this._game) { - var imageObj = this._image.getImageObj(); + let imageObj = this._image.getImageObj(); - var subWidth = imageObj.width - this._imagePos.x, + let subWidth = imageObj.width - this._imagePos.x, subHeight = imageObj.height - this._imagePos.y; this._game.context.drawImage( diff --git a/src/classes/vector2d.js b/src/classes/vector2d.js index 507e22e..32309d8 100644 --- a/src/classes/vector2d.js +++ b/src/classes/vector2d.js @@ -101,6 +101,11 @@ class Vector2D { } + angle () { + return Math.atan2(this.x, this.y); + } + + toArray () { return [this.x, this.y]; } @@ -116,6 +121,11 @@ class Vector2D { } + static fromAngle (angle, length) { + return new Vector2D(length * Math.cos(angle), length * Math.sin(angle)); + } + + } diff --git a/src/es5.js b/src/es5.js index d81b8ec..f2bcf63 100644 --- a/src/es5.js +++ b/src/es5.js @@ -1,6 +1,7 @@ "use strict"; import Game from "./classes/game.js"; +import Emitter from "./classes/emitter.js"; import Entity from "./classes/entity.js"; import Vector2D from "./classes/vector2d.js"; import Sprite from "./classes/sprite.js"; @@ -13,6 +14,7 @@ import {KeyConsts} from "./classes/keyboardinput.js"; const Classes = { Game: Game, + Emitter: Emitter, Entity: Entity, Sprite: Sprite, Rect: Rect, diff --git a/src/es6.js b/src/es6.js index 60008dd..5dafa0c 100644 --- a/src/es6.js +++ b/src/es6.js @@ -1,6 +1,7 @@ "use strict"; import Game from "./classes/game.js"; +import Emitter from "./classes/emitter.js"; import Entity from "./classes/entity.js"; import Vector2D from "./classes/vector2d.js"; import Sprite from "./classes/sprite.js"; @@ -13,6 +14,7 @@ import {KeyConsts} from "./classes/keyboardinput.js"; const Classes = { Game: Game, + Emitter: Emitter, Entity: Entity, Sprite: Sprite, Rect: Rect, @@ -29,7 +31,7 @@ const Consts = { }; -export { +export default { Classes, Consts }; \ No newline at end of file