},exists:function(a){returnthis.list.indexOf(a)>-1},reset:function(){this.list.length=0,this.total=0},remove:function(a){varb=this.list.indexOf(a);returnb>-1?(this.list.splice(b,1),this.total--,a):void0},setAll:function(a,b){for(varc=this.list.length;c--;)this.list[c]&&this.list[c][a]&&(this.list[c][a]=b)},callAll:function(a){for(varb=Array.prototype.splice.call(arguments,1),c=this.list.length;c--;)this.list[c]&&this.list[c][a]&&this.list[c][a].apply(this.list[c],b)}},Object.defineProperty(b.ArrayList.prototype,"first",{get:function(){returnthis.position=0,this.total>0?this.list[0]:null}}),Object.defineProperty(b.ArrayList.prototype,"next",{get:function(){returnthis.position<this.total?(this.position++,this.list[this.position]):null}}),b.ArrayList.prototype.constructor=b.ArrayList,b.Signal=function(){this._bindings=[],this._prevParams=null;vara=this;this.dispatch=function(){b.Signal.prototype.dispatch.apply(a,arguments)},this.memorize=!1,this._shouldPropagate=!0,this.active=!0},b.Signal.prototype={validateListener:function(a,b){if("function"!=typeofa)thrownewError("Phaser.Signal: listener is a required param of {fn}() and should be a Function.".replace("{fn}",b))},_registerListener:function(a,c,d,e){varf,g=this._indexOfListener(a,d);if(-1!==g){if(f=this._bindings[g],f.isOnce()!==c)thrownewError("You cannot add"+(c?"":"Once")+"() then add"+(c?"Once":"")+"() the same listener without removing the relationship first.")}elsef=newb.SignalBinding(this,a,c,d,e),this._addBinding(f);returnthis.memorize&&this._prevParams&&f.execute(this._prevParams),f},_addBinding:function(a){varb=this._bindings.length;dob--;while(this._bindings[b]&&a._priority<=this._bindings[b]._priority);this._bindings.splice(b+1,0,a)},_indexOfListener:function(a,b){for(varc,d=this._bindings.length;d--;)if(c=this._bindings[d],c._listener===a&&c.context===b)returnd;return-1},has:function(a,b){return-1!==this._indexOfListener(a,b)},add:function(a,b,c){returnthis.validateListener(a,"add"),this._registerListener(a,!1,b,c)},addOnce:function(a,b,c){returnthis.validateListener(a,"addOnce"),this._registerListener(a,!0,b,c)},remove:function(a,b){this.validateListener(a,"remove");varc=this._indexOfListener(a,b);return-1!==c&&(this._bindings[c]._destroy(),this._bindings.splice(c,1)),a},removeAll:function(a){"undefined"==typeofa&&(a=null);for(varb=this._bindings.length;b--;)a?this._bindings[b].context===a&&(this._bindings[b]._destroy(),this._bindings.splice(b,1)):this._bindings[b]._destroy();a||(this._bindings.length=0)},getNumListeners:function(){returnthis._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(){if(this.active){vara,b=Array.prototype.slice.call(arguments),c=this._bindings.length;if(this.memorize&&(this._prevParams=b),c){a=this._bindings.slice(),this._shouldPropagate=!0;doc--;while(a[c]&&this._shouldPropagate&&a[c].execute(b)!==!1)}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),deletethis._bindings,deletethis._prevParams},toString:function(){return"[Phaser.Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}},b.Signal.prototype.constructor=b.Signal,b.SignalBinding=function(a,b,c,d,e){this._listener=b,this._isOnce=c,this.context=d,this._signal=a,this._priority=e||0,this.callCount=0,this.active=!0,this.params=null},b.SignalBinding.prototype={execute:function(a){varb,c;returnthis.active&&this._listener&&(c=this.params?this.params.concat(a):a,b=this._listener.apply(this.context,c),this.callCount++,this._isOnce&&this.detach()),b},detach:function(){returnthis.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return!!this._signal&&!!this._listener},isOnce:function(){returnthis._isOnce},getListener:function(){returnthis._listener},getSignal:function(){returnthis._signal},_destroy:function(){deletethis._signal,deletethis._listener,deletethis.context},toString:function(){return"[Phaser.SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}},b.SignalBinding.prototype.constructor=
},b.TileSprite.prototype=Object.create(PIXI.TilingSprite.prototype),b.TileSprite.prototype.constructor=b.TileSprite,b.TileSprite.prototype.preUpdate=function(){if(1===this._cache[4]&&this.exists)returnthis.world.setTo(this.parent.position.x+this.position.x,this.parent.position.y+this.position.y),this.worldTransform.tx=this.world.x,this.worldTransform.ty=this.world.y,this._cache[0]=this.world.x,this._cache[1]=this.world.y,this._cache[2]=this.rotation,this.body&&this.body.preUpdate(),this._cache[4]=0,!1;if(this._cache[0]=this.world.x,this._cache[1]=this.world.y,this._cache[2]=this.rotation,!this.exists||!this.parent.exists)returnthis._cache[3]=-1,!1;(this.autoCull||this.checkWorldBounds)&&this._bounds.copyFrom(this.getBounds()),this.autoCull&&(this.renderable=this.game.world.camera.screenView.intersects(this._bounds)),this.checkWorldBounds&&(1===this._cache[5]&&this.game.world.bounds.intersects(this._bounds)?(this._cache[5]=0,this.events.onEnterBounds.dispatch(this)):0!==this._cache[5]||this.game.world.bounds.intersects(this._bounds)||(this._cache[5]=1,this.events.onOutOfBounds.dispatch(this))),this.world.setTo(this.game.camera.x+this.worldTransform.tx,this.game.camera.y+this.worldTransform.ty),this.visible&&(this._cache[3]=this.game.stage.currentRenderOrderID++),this.animations.update(),0!==this._scroll.x&&(this.tilePosition.x+=this._scroll.x*this.game.time.physicsElapsed),0!==this._scroll.y&&(this.tilePosition.y+=this._scroll.y*this.game.time.physicsElapsed),this.body&&this.body.preUpdate();for(vara=0,b=this.children.length;b>a;a++)this.children[a].preUpdate();return!0},b.TileSprite.prototype.update=function(){},b.TileSprite.prototype.postUpdate=function(){this.exists&&this.body&&this.body.postUpdate(),1===this._cache[7]&&(this.position.x=this.game.camera.view.x+this.cameraOffset.x,this.position.y=this.game.camera.view.y+this.cameraOffset.y);for(vara=0,b=this.children.length;b>a;a++)this.children[a].postUpdate()},b.TileSprite.prototype.autoScroll=function(a,b){this._scroll.set(a,b)},b.TileSprite.prototype.stopScroll=function(){this._scroll.set(0,0)},b.TileSprite.prototype.loadTexture=function(a,c){c=c||0,this.key=a,ainstanceofb.RenderTexture?(this.key=a.key,this.setTexture(a)):ainstanceofb.BitmapData?this.setTexture(a.texture):ainstanceofPIXI.Texture?this.setTexture(a):null===a||"undefined"==typeofa?(this.key="__default",this.setTexture(PIXI.TextureCache[this.key])):"string"!=typeofa||this.game.cache.checkImageKey(a)?(this.setTexture(newPIXI.Texture(PIXI.BaseTextureCache[a])),this.animations.loadFrameData(this.game.cache.getFrameData(a),c)):(console.warn("Texture with key '"+a+"' not found."),this.key="__missing",this.setTexture(PIXI.TextureCache[this.key])),this.texture.baseTexture.dirty()},b.TileSprite.prototype.setFrame=function(a){this.texture.frame.x=a.x,this.texture.frame.y=a.y,this.texture.frame.width=a.width,this.texture.frame.height=a.height,this.texture.crop.x=a.x,this.texture.crop.y=a.y,this.texture.crop.width=a.width,this.texture.crop.height=a.height,a.trimmed?(this.texture.trim?(this.texture.trim.x=a.spriteSourceSizeX,this.texture.trim.y=a.spriteSourceSizeY,this.texture.trim.width=a.sourceSizeW,this.texture.trim.height=a.sourceSizeH):this.texture.trim={x:a.spriteSourceSizeX,y:a.spriteSourceSizeY,width:a.sourceSizeW,height:a.sourceSizeH},this.texture.width=a.sourceSizeW,this.texture.height=a.sourceSizeH,this.texture.frame.width=a.sourceSizeW,this.texture.frame.height=a.sourceSizeH):!a.trimmed&&this.texture.trim&&(this.texture.trim=null),this.texture._updateUvs()},b.TileSprite.prototype.destroy=function(a){if(null!==this.game&&!this.destroyPhase){"undefined"==typeofa&&(a=!0),this._cache[8]=1,this.events&&this.events.onDestroy.dispatch(this),this.filters&&(this.filters=null),this.parent&&(this.parentinstanceofb.Group?this.parent.remove(this):this.parent.removeChild(this)),this.animations.destroy(),this.events.destroy();varc=this.children.length;if(a)for(;c--;)this.children[c].destroy(a);elsefor(;c--;)this.removeChild(this.children[c]);this.exists=!1,this.visible=!1,this.alive=!1,this.filters=
},isInteresting:function(a,b){returna&&b?this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.faceTop||this.faceBottom||this.faceLeft||this.faceRight||this.collisionCallback:a?this.collideLeft||this.collideRight||this.collideUp||this.collideDown:b?this.faceTop||this.faceBottom||this.faceLeft||this.faceRight:!1},copy:function(a){this.index=a.index,this.alpha=a.alpha,this.properties=a.properties,this.collideUp=a.collideUp,this.collideDown=a.collideDown,this.collideLeft=a.collideLeft,this.collideRight=a.collideRight,this.collisionCallback=a.collisionCallback,this.collisionCallbackContext=a.collisionCallbackContext}},b.Tile.prototype.constructor=b.Tile,Object.defineProperty(b.Tile.prototype,"collides",{get:function(){returnthis.collideLeft||this.collideRight||this.collideUp||this.collideDown}}),Object.defineProperty(b.Tile.prototype,"canCollide",{get:function(){returnthis.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}}),Object.defineProperty(b.Tile.prototype,"left",{get:function(){returnthis.worldX}}),Object.defineProperty(b.Tile.prototype,"right",{get:function(){returnthis.worldX+this.width}}),Object.defineProperty(b.Tile.prototype,"top",{get:function(){returnthis.worldY}}),Object.defineProperty(b.Tile.prototype,"bottom",{get:function(){returnthis.worldY+this.height}}),b.Tilemap=function(a,c,d,e,f,g){this.game=a,this.key=c;varh=b.TilemapParser.parse(this.game,c,d,e,f,g);null!==h&&(this.width=h.width,this.height=h.height,this.tileWidth=h.tileWidth,this.tileHeight=h.tileHeight,this.orientation=h.orientation,this.format=h.format,this.version=h.version,this.properties=h.properties,this.widthInPixels=h.widthInPixels,this.heightInPixels=h.heightInPixels,this.layers=h.layers,this.tilesets=h.tilesets,this.tiles=h.tiles,this.objects=h.objects,this.collideIndexes=[],this.collision=h.collision,this.images=h.images,this.currentLayer=0,this.debugMap=[],this._results=[],this._tempA=0,this._tempB=0)},b.Tilemap.CSV=0,b.Tilemap.TILED_JSON=1,b.Tilemap.NORTH=0,b.Tilemap.EAST=1,b.Tilemap.SOUTH=2,b.Tilemap.WEST=3,b.Tilemap.prototype={create:function(a,b,c,d,e,f){return"undefined"==typeoff&&(f=this.game.world),this.width=b,this.height=c,this.setTileSize(d,e),this.layers.length=0,this.createBlankLayer(a,b,c,d,e,f)},setTileSize:function(a,b){this.tileWidth=a,this.tileHeight=b,this.widthInPixels=this.width*a,this.heightInPixels=this.height*b},addTilesetImage:function(a,c,d,e,f,g,h){if("undefined"==typeofd&&(d=this.tileWidth),"undefined"==typeofe&&(e=this.tileHeight),"undefined"==typeoff&&(f=0),"undefined"==typeofg&&(g=0),"undefined"==typeofh&&(h=0),0===d&&(d=32),0===e&&(e=32),"undefined"==typeofc){if("string"!=typeofa)returnnull;if(c=a,!this.game.cache.checkImageKey(c))returnconsole.warn('Phaser.Tilemap.addTilesetImage: Invalid image key given: "'+c+'"'),null}if("string"==typeofa&&(a=this.getTilesetIndex(a),null===a&&this.format===b.Tilemap.TILED_JSON))returnconsole.warn('Phaser.Tilemap.addTilesetImage: No data found in the JSON matching the tileset name: "'+c+'"'),null;if(this.tilesets[a])returnthis.tilesets[a].setImage(this.game.cache.getImage(c)),this.tilesets[a];vari=newb.Tileset(c,h,d,e,f,g,{});i.setImage(this.game.cache.getImage(c)),this.tilesets.push(i);for(varj=this.tilesets.length-1,k=f,l=f,m=0,n=0,o=0,p=h;p<h+i.total&&(this.tiles[p]=[k,l,j],k+=d+g,m++,m!==i.total)&&(n++,n!==i.columns||(k=f,l+=e+g,n=0,o++,o!==i.rows));p++);returni},createFromObjects:function(a,c,d,e,f,g,h,i,j){if("undefined"==typeoff&&(f=!0),"undefined"==typeofg&&(g=!1),"undefined"==typeofh&&(h=this.game.world),"undefined"==typeofi&&(i=b.Sprite),"undefined"==typeofj&&(j=!0),!this.objects[a])returnvoidconsole.warn("Tilemap.createFromObjects: Invalid objectgroup name given: "+a);for(vark,l=0,m=this.objects[a].length;m>l;l++)if(this.objects[a][l].gid===c){k=newi(this.game,this.objects[a][l].x,this.objects[a][l].y,d,e),k.name=this.objects[a][l].name,k.visible=this.objects[a][l].visible,k.autoCull=g,k.exists=f,j&&(k.y-=k.height),h.add(k);for(varninthis.objects[a][l].propertie
else"string"===c&&f.write(a,0,b);returnf}functione(a,b,c,e){c=Number(c)||0;varf=a.length-c;e?(e=Number(e),e>f&&(e=f)):e=f;varg=b.length;if(g%2!==0)thrownewError("Invalid hex string");e>g/2&&(e=g/2);for(varh=0;e>h;h++){vari=parseInt(b.substr(2*h,2),16);if(isNaN(i))thrownewError("Invalid hex string");a[c+h]=i}returnd._charsWritten=2*h,h}functionf(a,b,c,e){returnd._charsWritten=tb(qb(b),a,c,e)}functiong(a,b,c,e){returnd._charsWritten=tb(rb(b),a,c,e)}functionh(a,b,c,d){returng(a,b,c,d)}functioni(a,b,c,e){returnd._charsWritten=tb(sb(b),a,c,e)}functionj(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void0);else{varj=d;d=b,b=c,c=j}b=Number(b)||0;vark=this.length-b;switch(c?(c=Number(c),c>k&&(c=k)):c=k,d=String(d||"utf8").toLowerCase()){case"hex":returne(this,a,b,c);case"utf8":case"utf-8":returnf(this,a,b,c);case"ascii":returng(this,a,b,c);case"binary":returnh(this,a,b,c);case"base64":returni(this,a,b,c);default:thrownewError("Unknown encoding")}}functionk(a,b,c){vard=thisinstanceofkb?this._proxy:this;if(a=String(a||"utf8").toLowerCase(),b=Number(b)||0,c=void0!==c?Number(c):c=d.length,c===b)return"";switch(a){case"hex":returnr(d,b,c);case"utf8":case"utf-8":returno(d,b,c);case"ascii":returnp(d,b,c);case"binary":returnq(d,b,c);case"base64":returnn(d,b,c);default:thrownewError("Unknown encoding")}}functionl(){return{type:"Buffer",data:Array.prototype.slice.call(this,0)}}functionm(a,b,c,d){vare=this;if(c||(c=0),d||0===d||(d=this.length),b||(b=0),d!==c&&0!==a.length&&0!==e.length){if(c>d)thrownewError("sourceEnd < sourceStart");if(0>b||b>=a.length)thrownewError("targetStart out of bounds");if(0>c||c>=e.length)thrownewError("sourceStart out of bounds");if(0>d||d>e.length)thrownewError("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-b<d-c&&(d=a.length-b+c);for(varf=0;d-c>f;f++)a[f+b]=this[f+c]}}functionn(b,c,d){vare=b.slice(c,d);returna("base64-js").fromByteArray(e)}functiono(a,b,c){for(vard=a.slice(b,c),e="",f="",g=0;g<d.length;)d[g]<=127?(e+=ub(f)+String.fromCharCode(d[g]),f=""):f+="%"+d[g].toString(16),g++;returne+ub(f)}functionp(a,b,c){for(vard=a.slice(b,c),e="",f=0;f<d.length;f++)e+=String.fromCharCode(d[f]);returne}functionq(a,b,c){returnp(a,b,c)}functionr(a,b,c){vard=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(vare="",f=b;c>f;f++)e+=pb(a[f]);returne}functions(a,b){varc=this.length;returna=mb(a,c,0),b=mb(b,c,c),lb(this.subarray(a,b))}functiont(a,b){varc=this;returnb||(yb(void0!==a&&null!==a,"missing offset"),yb(a<c.length,"Trying to read beyond buffer length")),a>=c.length?void0:c[a]}functionu(a,b,c,d){d||(yb("boolean"==typeofc,"missing or invalid endian"),yb(void0!==b&&null!==b,"missing offset"),yb(b+1<a.length,"Trying to read beyond buffer length"));vare=a.length;if(!(b>=e)){if(b+1===e){varf=newAb(newBb(2));returnf.setUint8(0,a[e-1]),f.getUint16(0,c)}returna._dataview.getUint16(b,c)}}functionv(a,b){returnu(this,a,!0,b)}functionw(a,b){returnu(this,a,!1,b)}functionx(a,b,c,d){d||(yb("boolean"==typeofc,"missing or invalid endian"),yb(void0!==b&&null!==b,"missing offset"),yb(b+3<a.length,"Trying to read beyond buffer length"));vare=a.length;if(!(b>=e)){if(b+3>=e){for(varf=newAb(newBb(4)),g=0;e>g+b;g++)f.setUint8(g,a[g+b]);returnf.getUint32(0,c)}returna._dataview.getUint32(b,c)}}functiony(a,b){returnx(this,a,!0,b)}functionz(a,b){returnx(this,a,!1,b)}functionA(a,b){varc=this;returnb||(yb(void0!==a&&null!==a,"missing offset"),yb(a<c.length,"Trying to read beyond buffer length")),a>=c.length?void0:c._dataview.getInt8(a)}functionB(a,b,c,d){d||(yb("boolean"==typeofc,"missing or invalid endian"),yb(void0!==b&&null!==b,"missing offset"),yb(b+1<a.length,"Trying to read beyond buffer length"));vare=a.length;if(!(b>=e)){if(b+1===e){varf=newAb(newBb(2));returnf.setUint8(0,a[e-1]),f.getInt16(0,c)}returna._dataview.getInt16(b,c)}}functionC(a,b){returnB(this,a,!0,b)}functionD(a,b){returnB(this,a,!1,b)}functionE(a,b,c,d){d||(yb("boolean"==typeofc,"missing or invalid endian"),yb(void0!==b&&null!==b,"mis
returnb}},{"./Line":3,"./Point":4,"./Scalar":6,__browserify_Buffer:1,__browserify_process:2}],6:[function(a,b){functionc(){}a("__browserify_process"),a("__browserify_Buffer");b.exports=c,c.eq=function(a,b,c){returnc=c||0,Math.abs(a-b)<c}},{__browserify_Buffer:1,__browserify_process:2}],7:[function(a,b){a("__browserify_process"),a("__browserify_Buffer");b.exports={Polygon:a("./Polygon"),Point:a("./Point")}},{"./Point":4,"./Polygon":5,__browserify_Buffer:1,__browserify_process:2}],8:[function(a,b){a("__browserify_process"),a("__browserify_Buffer");b.exports={name:"p2",version:"0.6.0",description:"A JavaScript 2D physics engine.",author:"Stefan Hedman <schteppe@gmail.com> (http://steffe.se)",keywords:["p2.js","p2","physics","engine","2d"],main:"./src/p2.js",engines:{node:"*"},repository:{type:"git",url:"https://github.com/schteppe/p2.js.git"},bugs:{url:"https://github.com/schteppe/p2.js/issues"},licenses:[{type:"MIT"}],devDependencies:{grunt:"~0.4.0","grunt-contrib-jshint":"~0.9.2","grunt-contrib-nodeunit":"~0.1.2","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"~0.5.0","grunt-browserify":"~2.0.1","grunt-contrib-concat":"^0.4.0"},dependencies:{"poly-decomp":"0.1.0"}}},{__browserify_Buffer:1,__browserify_process:2}],9:[function(a,b){functionc(a){this.lowerBound=d.create(),a&&a.lowerBound&&d.copy(this.lowerBound,a.lowerBound),this.upperBound=d.create(),a&&a.upperBound&&d.copy(this.upperBound,a.upperBound)}{vard=(a("__browserify_process"),a("__browserify_Buffer"),a("../math/vec2"));a("../utils/Utils")}b.exports=c;vare=d.create();c.prototype.setFromPoints=function(a,b,c,f){varg=this.lowerBound,h=this.upperBound;"number"!=typeofc&&(c=0),0!==c?d.rotate(g,a[0],c):d.copy(g,a[0]),d.copy(h,g);for(vari=Math.cos(c),j=Math.sin(c),k=1;k<a.length;k++){varl=a[k];if(0!==c){varm=l[0],n=l[1];e[0]=i*m-j*n,e[1]=j*m+i*n,l=e}for(varo=0;2>o;o++)l[o]>h[o]&&(h[o]=l[o]),l[o]<g[o]&&(g[o]=l[o])}b&&(d.add(this.lowerBound,this.lowerBound,b),d.add(this.upperBound,this.upperBound,b)),f&&(this.lowerBound[0]-=f,this.lowerBound[1]-=f,this.upperBound[0]+=f,this.upperBound[1]+=f)},c.prototype.copy=function(a){d.copy(this.lowerBound,a.lowerBound),d.copy(this.upperBound,a.upperBound)},c.prototype.extend=function(a){for(varb=2;b--;){varc=a.lowerBound[b];this.lowerBound[b]>c&&(this.lowerBound[b]=c);vard=a.upperBound[b];this.upperBound[b]<d&&(this.upperBound[b]=d)}},c.prototype.overlaps=function(a){varb=this.lowerBound,c=this.upperBound,d=a.lowerBound,e=a.upperBound;return(d[0]<=c[0]&&c[0]<=e[0]||b[0]<=e[0]&&e[0]<=c[0])&&(d[1]<=c[1]&&c[1]<=e[1]||b[1]<=e[1]&&e[1]<=c[1])}},{"../math/vec2":31,"../utils/Utils":50,__browserify_Buffer:1,__browserify_process:2}],10:[function(a,b){functionc(a){this.type=a,this.result=[],this.world=null,this.boundingVolumeType=c.AABB}vard=(a("__browserify_process"),a("__browserify_Buffer"),a("../math/vec2")),e=a("../objects/Body");b.exports=c,c.AABB=1,c.BOUNDING_CIRCLE=2,c.prototype.setWorld=function(a){this.world=a},c.prototype.getCollisionPairs=function(){thrownewError("getCollisionPairs must be implemented in a subclass!")};varf=d.create();c.boundingRadiusCheck=function(a,b){d.sub(f,a.position,b.position);varc=d.squaredLength(f),e=a.boundingRadius+b.boundingRadius;returne*e>=c},c.aabbCheck=function(a,b){returna.getAABB().overlaps(b.getAABB())},c.prototype.boundingVolumeCheck=function(a,b){vard;switch(this.boundingVolumeType){casec.BOUNDING_CIRCLE:d=c.boundingRadiusCheck(a,b);break;casec.AABB:d=c.aabbCheck(a,b);break;default:thrownewError("Bounding volume type not recognized: "+this.boundingVolumeType)}returnd},c.canCollide=function(a,b){returna.type===e.STATIC&&b.type===e.STATIC?!1:a.type===e.KINEMATIC&&b.type===e.STATIC||a.type===e.STATIC&&b.type===e.KINEMATIC?!1:a.type===e.KINEMATIC&&b.type===e.KINEMATIC?!1:a.sleepState===e.SLEEPING&&b.sleepState===e.SLEEPING?!1:a.sleepState===e.SLEEPING&&b.type===e.STATIC||b.sleepState===e.SLEEPING&&a.type===e.STATIC?!1:!0},c.NAIVE=1,c.SAP=2},{"../math/vec2":31,"../objects/Body":32,__browserify_Buffer:1,__browserify_process:2}],11:[function(a,b){functionc(a){d.ap
},{"../package.json":8,"./collision/AABB":9,"./collision/Broadphase":10,"./collision/GridBroadphase":11,"./collision/NaiveBroadphase":12,"./collision/Narrowphase":13,"./collision/SAPBroadphase":14,"./constraints/Constraint":15,"./constraints/DistanceConstraint":16,"./constraints/GearConstraint":17,"./constraints/LockConstraint":18,"./constraints/PrismaticConstraint":19,"./constraints/RevoluteConstraint":20,"./equations/AngleLockEquation":21,"./equations/ContactEquation":22,"./equations/Equation":23,"./equations/FrictionEquation":24,"./equations/RotationalVelocityEquation":26,"./events/EventEmitter":27,"./material/ContactMaterial":28,"./material/Material":29,"./math/vec2":31,"./objects/Body":32,"./objects/LinearSpring":33,"./objects/RotationalSpring":34,"./objects/Spring":35,"./shapes/Capsule":37,"./shapes/Circle":38,"./shapes/Convex":39,"./shapes/Heightfield":40,"./shapes/Line":41,"./shapes/Particle":42,"./shapes/Plane":43,"./shapes/Rectangle":44,"./shapes/Shape":45,"./solver/GSSolver":46,"./solver/Solver":47,"./utils/Utils":50,"./world/World":54,__browserify_Buffer:1,__browserify_process:2}],37:[function(a,b){functionc(a,b){this.length=a||1,this.radius=b||1,d.call(this,d.CAPSULE)}vard=(a("__browserify_process"),a("__browserify_Buffer"),a("./Shape")),e=a("../math/vec2");b.exports=c,c.prototype=newd,c.prototype.computeMomentOfInertia=function(a){varb=this.radius,c=this.length+b,d=2*b;returna*(d*d+c*c)/12},c.prototype.updateBoundingRadius=function(){this.boundingRadius=this.radius+this.length/2},c.prototype.updateArea=function(){this.area=Math.PI*this.radius*this.radius+2*this.radius*this.length};varf=e.create();c.prototype.computeAABB=function(a,b,c){vard=this.radius;e.set(f,this.length/2,0),0!==c&&e.rotate(f,f,c),e.set(a.upperBound,Math.max(f[0]+d,-f[0]+d),Math.max(f[1]+d,-f[1]+d)),e.set(a.lowerBound,Math.min(f[0]-d,-f[0]-d),Math.min(f[1]-d,-f[1]-d)),e.add(a.lowerBound,a.lowerBound,b),e.add(a.upperBound,a.upperBound,b)}},{"../math/vec2":31,"./Shape":45,__browserify_Buffer:1,__browserify_process:2}],38:[function(a,b){functionc(a){this.radius=a||1,d.call(this,d.CIRCLE)}vard=(a("__browserify_process"),a("__browserify_Buffer"),a("./Shape")),e=a("../math/vec2");b.exports=c,c.prototype=newd,c.prototype.computeMomentOfInertia=function(a){varb=this.radius;returna*b*b/2},c.prototype.updateBoundingRadius=function(){this.boundingRadius=this.radius},c.prototype.updateArea=function(){this.area=Math.PI*this.radius*this.radius},c.prototype.computeAABB=function(a,b){varc=this.radius;e.set(a.upperBound,c,c),e.set(a.lowerBound,-c,-c),b&&(e.add(a.lowerBound,a.lowerBound,b),e.add(a.upperBound,a.upperBound,b))}},{"../math/vec2":31,"./Shape":45,__browserify_Buffer:1,__browserify_process:2}],39:[function(a,b){functionc(a,b){this.vertices=[],this.axes=[];for(varc=0;c<a.length;c++){varf=e.create();e.copy(f,a[c]),this.vertices.push(f)}if(b)for(varc=0;c<b.length;c++){varg=e.create();e.copy(g,b[c]),this.axes.push(g)}elsefor(varc=0;c<a.length;c++){varh=a[c],i=a[(c+1)%a.length],j=e.create();e.sub(j,i,h),e.rotate90cw(j,j),e.normalize(j,j),this.axes.push(j)}if(this.centerOfMass=e.fromValues(0,0),this.triangles=[],this.vertices.length&&(this.updateTriangles(),this.updateCenterOfMass()),this.boundingRadius=0,d.call(this,d.CONVEX),this.updateBoundingRadius(),this.updateArea(),this.area<0)thrownewError("Convex vertices must be given in conter-clockwise winding.")}{vard=(a("__browserify_process"),a("__browserify_Buffer"),a("./Shape")),e=a("../math/vec2"),f=a("../math/polyk");a("poly-decomp")}b.exports=c,c.prototype=newd;varg=e.create(),h=e.create();c.prototype.projectOntoLocalAxis=function(a,b){for(varc,d,f=null,h=null,a=g,i=0;i<this.vertices.length;i++)c=this.vertices[i],d=e.dot(c,a),(null===f||d>f)&&(f=d),(null===h||h>d)&&(h=d);if(h>f){varj=h;h=f,f=j}e.set(b,h,f)},c.prototype.projectOntoWorldAxis=function(a,b,c,d){varf=h;this.projectOntoLocalAxis(a,d),0!==c?e.rotate(f,a,c):f=a;varg=e.dot(b,f);e.set(d,d[0]+g,d[1]+g)},c.prototype.updateTriangles=function(){this.triangles.length=0;for(vara=[],b=0;b<this.vertices.length;b++){va