text: /**
   * Engine2D game engine v2.0.0
   * License: http://git.io/vlp11
   * @author jackdalton
   */
  var Engine2D={VERSION:"2.0.0",TYPE:{RECT:1,CIRCLE:2},EXTENSIONS:{},Vector2:function(a,b){a="number"==typeof a?a:0;b="number"==typeof b?b:0;this.setPosition=function(c,d){if("object"==typeof c)a=c.x||a,b=c.y||b;else if("number"==typeof c&&"number"==typeof d)a=c||a,b=d||b;else throw new TypeError("Vector2 position can only be an object or two numbers.");return{x:a,y:b}};this.setX=function(b){a=b};this.setY=function(a){b=a};this.getX=function(){return a};this.getY=function(){return b};this.getPos=function(){return{x:a,
  y:b}};this.distanceTo=function(c){return Math.sqrt(Math.pow(c.getX()-a,2)+Math.pow(c.getY()-b,2))};this.midpoint=function(c){return new Engine2D.Vector2((a+c.getX())/2,(b+c.getY())/2)};this.translate=function(c,d){if("object"==typeof c)a+=c.x||0,b+=c.y||0;else if("number"==typeof c&&"number"==typeof d)a+=c||0,b+=d||0;else throw new TypeError("Vector2 must be translated using an object or two numbers");};this.rotate=function(c){if("number"==typeof c)return{x:+(a*Math.cos(c)-b*Math.sin(c)).toPrecision(4),
  y:+(a*Math.sin(c)+b*Math.cos(c)).toPrecision(4)};throw new TypeError("Vector2 must be rotated using a number");}},GameScene:function(){console.log("Engine2D v"+Engine2D.VERSION+".");var a=this;a.objects={};for(var b in Engine2D.EXTENSIONS)Engine2D.EXTENSIONS[b].exec(),console.log("Engine2D loaded "+Engine2D.EXTENSIONS[b].extensionName+" v"+Engine2D.EXTENSIONS[b].version+", by "+Engine2D.EXTENSIONS[b].author+".");var c=function(b){var c,e;for(e in a.objects)a.objects[e].id==b&&(c=!0);return c?!0:!1};
  a.addObject=function(b){var c,e;for(e in Engine2D.TYPE)b.type==Engine2D.TYPE[e]&&(c=!0);if(c)return a.objects[b.id]=b,b.id;throw new TypeError('"'+b.type+'" is not a valid Engine2D game object type.');};a.disableObject=function(b){if(c(b))a.objects[b].alive=!1;else throw new ReferenceError('Object "'+b+"\" either doesn't exist, or hasn't been added to the scene.");};a.enableObject=function(b){if(c(b))a.objects[b].alive=!0;else throw new ReferenceError('Object "'+b+"\" either doesn't exist, or hasn't been added to the scene.");
  };a.destroyObject=function(b){if(c(b))delete a.objects[b];else throw new ReferenceError('Object "'+b+"\" either doesn't exist, or hasn't been added to the scene.");}},Rect:function(a){a=a||{};this.id=a.id||Engine2D.randomID();this.type=Engine2D.TYPE.RECT;this.alive=a.alive||!0;this.size={};this.position={};this.size.width=a.width||0;this.size.height=a.height||0;this.position=a.position||new Engine2D.Vector2(0,0)},Circle:function(a){a=a||{};this.id=a.id||Engine2D.randomID();this.type=Engine2D.TYPE.CIRCLE;
  this.alive=a.alive||!0;this.size={};this.position={};this.size.radius=a.radius||0;this.position=a.position||new Engine2D.Vector2(0,0)},randomID:function(){for(var a="",b=0;5>b;)b++,a+="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[Math.floor(36*Math.random())];return a},nextAvailableTypeAddress:function(){var a=0,b;for(b in Engine2D.TYPE)a=Engine2D.TYPE[b];a++;return a},registerExtension:function(a){var b={};a=a||{};b.id="ext"+Engine2D.randomID();b.extensionName=a.extensionName||b.id;b.author=a.author||"an anonymous contributor";
  b.version=a.version||"0.0.0";b.exec=a.exec||null;Engine2D.EXTENSIONS[b.id]=b;return b.id}};"undefined"!==typeof module?module.exports=Engine2D:window.Engine2D=Engine2D;