Examples
-You can view more examples of using Milligram.
--
-
-
- Getting Started -
- Typography -
- Blockquotes -
- Buttons -
- Lists -
- Forms -
- Tables -
- Grids -
- Codes -
- Utilities -
- Tips -
- Browser Support -
diff --git a/tools/gopher-kart/.gitignore b/tools/gopher-kart/.gitignore
deleted file mode 100644
index c667e8f..0000000
--- a/tools/gopher-kart/.gitignore
+++ /dev/null
@@ -1,27 +0,0 @@
-# General
-.DS_Store
-.AppleDouble
-.LSOverride
-
-# Icon must end with two \r
-Icon
-
-
-# Thumbnails
-._*
-
-# Files that might appear in the root of a volume
-.DocumentRevisions-V100
-.fseventsd
-.Spotlight-V100
-.TemporaryItems
-.Trashes
-.VolumeIcon.icns
-.com.apple.timemachine.donotpresent
-
-# Directories potentially created on remote AFP share
-.AppleDB
-.AppleDesktop
-Network Trash Folder
-Temporary Items
-.apdisk
\ No newline at end of file
diff --git a/tools/gopher-kart/Dockerfile b/tools/gopher-kart/Dockerfile
deleted file mode 100644
index 230d739..0000000
--- a/tools/gopher-kart/Dockerfile
+++ /dev/null
@@ -1,7 +0,0 @@
-FROM httpd
-
-# Copy Apache config.
-COPY httpd.conf /usr/local/apache2/conf/httpd.conf
-
-# Copy source files.
-COPY . /usr/local/apache2/htdocs/
diff --git a/tools/gopher-kart/Makefile b/tools/gopher-kart/Makefile
deleted file mode 100644
index af707df..0000000
--- a/tools/gopher-kart/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-build:
- @docker build -t quay.io/ardanlabs/ardan-labs-racing-game .
-
-run: build
- @docker run -p 8080:80 quay.io/ardanlabs/ardan-labs-racing-game
-
-push: build
- @docker push quay.io/ardanlabs/ardan-labs-racing-game
-
-deploy: push
- @curl -X POST -d "" https://hooks.cloud66.com/stacks/redeploy/103c4c9d8e625f05551c9d64256a30b6/2c366231dcab8d579e51077d21157ac0?services=ardan-labs-api,ardan-labs-hugo
-
-open:
- @open http://localhost:8080
diff --git a/tools/gopher-kart/README.md b/tools/gopher-kart/README.md
deleted file mode 100644
index 696788d..0000000
--- a/tools/gopher-kart/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# GopherCon Racing Game
-
-Created by Jamilet Zelaya with very little help from Erick Zelaya.
-
-# Run
-
-You can simply double click on `index.html`.
-
-Additionally you can also run with Docker (naturally it's required for this).
-Apache will start and log all the requests.
-
-```
-make run
-```
-
-You can now go to http://localhost:8080 or use make.
-
-```
-make open
-```
-
diff --git a/tools/gopher-kart/assets/back-button.png b/tools/gopher-kart/assets/back-button.png
deleted file mode 100644
index 9effb1a..0000000
Binary files a/tools/gopher-kart/assets/back-button.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/beige-gopher.png b/tools/gopher-kart/assets/beige-gopher.png
deleted file mode 100644
index 1bb23e4..0000000
Binary files a/tools/gopher-kart/assets/beige-gopher.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/bg-color.png b/tools/gopher-kart/assets/bg-color.png
deleted file mode 100644
index 46cdc93..0000000
Binary files a/tools/gopher-kart/assets/bg-color.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/black-gopher.png b/tools/gopher-kart/assets/black-gopher.png
deleted file mode 100644
index e9173d6..0000000
Binary files a/tools/gopher-kart/assets/black-gopher.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/blue-crawl.png b/tools/gopher-kart/assets/blue-crawl.png
deleted file mode 100644
index bea4113..0000000
Binary files a/tools/gopher-kart/assets/blue-crawl.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/bottom-rail-long.png b/tools/gopher-kart/assets/bottom-rail-long.png
deleted file mode 100644
index 912665e..0000000
Binary files a/tools/gopher-kart/assets/bottom-rail-long.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/bottom-rail.png b/tools/gopher-kart/assets/bottom-rail.png
deleted file mode 100644
index c489d27..0000000
Binary files a/tools/gopher-kart/assets/bottom-rail.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/burgundy-gopher.png b/tools/gopher-kart/assets/burgundy-gopher.png
deleted file mode 100644
index b663e30..0000000
Binary files a/tools/gopher-kart/assets/burgundy-gopher.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/character-select-bg.png b/tools/gopher-kart/assets/character-select-bg.png
deleted file mode 100644
index ee26431..0000000
Binary files a/tools/gopher-kart/assets/character-select-bg.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/character-select-loops.png b/tools/gopher-kart/assets/character-select-loops.png
deleted file mode 100644
index 4952441..0000000
Binary files a/tools/gopher-kart/assets/character-select-loops.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/city-re-colored.png b/tools/gopher-kart/assets/city-re-colored.png
deleted file mode 100644
index e711d39..0000000
Binary files a/tools/gopher-kart/assets/city-re-colored.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/city-scape.png b/tools/gopher-kart/assets/city-scape.png
deleted file mode 100644
index b629bd2..0000000
Binary files a/tools/gopher-kart/assets/city-scape.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/city.png b/tools/gopher-kart/assets/city.png
deleted file mode 100644
index daef05c..0000000
Binary files a/tools/gopher-kart/assets/city.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/clouds-re-colored.png b/tools/gopher-kart/assets/clouds-re-colored.png
deleted file mode 100644
index 6235b2a..0000000
Binary files a/tools/gopher-kart/assets/clouds-re-colored.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/clouds.png b/tools/gopher-kart/assets/clouds.png
deleted file mode 100644
index 9239063..0000000
Binary files a/tools/gopher-kart/assets/clouds.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/coin-shadow.png b/tools/gopher-kart/assets/coin-shadow.png
deleted file mode 100644
index 8fce9dd..0000000
Binary files a/tools/gopher-kart/assets/coin-shadow.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/coin.png b/tools/gopher-kart/assets/coin.png
deleted file mode 100644
index ddca33a..0000000
Binary files a/tools/gopher-kart/assets/coin.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/controls-animation.png b/tools/gopher-kart/assets/controls-animation.png
deleted file mode 100644
index 3ac49df..0000000
Binary files a/tools/gopher-kart/assets/controls-animation.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/controls-button.png b/tools/gopher-kart/assets/controls-button.png
deleted file mode 100644
index 4efa8bb..0000000
Binary files a/tools/gopher-kart/assets/controls-button.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/count-down.png b/tools/gopher-kart/assets/count-down.png
deleted file mode 100644
index 58c0cb8..0000000
Binary files a/tools/gopher-kart/assets/count-down.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/explosion.png b/tools/gopher-kart/assets/explosion.png
deleted file mode 100644
index 0caa15d..0000000
Binary files a/tools/gopher-kart/assets/explosion.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/fonts/bitmapFonts/pixelFont.png b/tools/gopher-kart/assets/fonts/bitmapFonts/pixelFont.png
deleted file mode 100644
index b05cbe4..0000000
Binary files a/tools/gopher-kart/assets/fonts/bitmapFonts/pixelFont.png and /dev/null differ
diff --git a/tools/gopher-kart/assets/fonts/bitmapFonts/pixelFont.xml b/tools/gopher-kart/assets/fonts/bitmapFonts/pixelFont.xml
deleted file mode 100644
index ce54875..0000000
--- a/tools/gopher-kart/assets/fonts/bitmapFonts/pixelFont.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
- You can view more examples of using Milligram.
- Examples
-
-
-
Want to contribute? Follow these recommendations.
-<h1>
4.6rem (46px)<h2>
3.6rem (36px)<h3>
2.8rem (28px)<h4>
2.2rem (22px)<h5>
1.8rem (18px)<h6>
1.6rem (16px)Lorem ipsum dolor sit amet, consectetur adipisicing elit.
-Obcaecati error a, quas fugit hic, accusantium autem necessitatibus praesentium placeat, iusto et soluta expedita! Quisquam repellendus voluptatem, tempora iste culpa fuga, !
Quisquam nobis, ad. Iusto, repudiandae. Autem ipsa blanditiis, quae, fugit nobis perspiciatis in beatae vitae numquam illo, architecto hic dolor molestiae aliquid
.
Yeah!! Milligram is amazing.
--Yeah!! Milligram is amazing.
-
Name | -Age | -Height | -Location | -
---|---|---|---|
Kevin Durant | -27 | -2.06 | -Washington, DC | -
Stephen Curry | -27 | -1,91 | -Akron, OH | -
Klay Thompson | -25 | -2,01 | -Los Angeles, CA | -
Draymond Green | -26 | -2,01 | -Saginaw, MI | -
Andre Iguodala | -32 | -1,98 | -Springfield, IL | -
Anderson Varejão | -33 | -2,08 | -Colatina, ES | -
Shaun Livingston | -30 | -2,01 | -Peoria, CA | -
.milligram {
- color: #9b4dca;
-}
- -
>1;if(e<3)return[];for(var i=[],n=[],r=0;r=this.right?this.width=0:this.width=this.right-t,this.x=t}}),Object.defineProperty(i.Rectangle.prototype,"right",{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}}),Object.defineProperty(i.Rectangle.prototype,"volume",{get:function(){return this.width*this.height}}),Object.defineProperty(i.Rectangle.prototype,"perimeter",{get:function(){return 2*this.width+2*this.height}}),Object.defineProperty(i.Rectangle.prototype,"centerX",{get:function(){return this.x+this.halfWidth},set:function(t){this.x=t-this.halfWidth}}),Object.defineProperty(i.Rectangle.prototype,"centerY",{get:function(){return this.y+this.halfHeight},set:function(t){this.y=t-this.halfHeight}}),Object.defineProperty(i.Rectangle.prototype,"randomX",{get:function(){return this.x+Math.random()*this.width}}),Object.defineProperty(i.Rectangle.prototype,"randomY",{get:function(){return this.y+Math.random()*this.height}}),Object.defineProperty(i.Rectangle.prototype,"top",{get:function(){return this.y},set:function(t){t>=this.bottom?(this.height=0,this.y=t):this.height=this.bottom-t}}),Object.defineProperty(i.Rectangle.prototype,"topLeft",{get:function(){return new i.Point(this.x,this.y)},set:function(t){this.x=t.x,this.y=t.y}}),Object.defineProperty(i.Rectangle.prototype,"topRight",{get:function(){return new i.Point(this.x+this.width,this.y)},set:function(t){this.right=t.x,this.y=t.y}}),Object.defineProperty(i.Rectangle.prototype,"empty",{get:function(){return!this.width||!this.height},set:function(t){!0===t&&this.setTo(0,0,0,0)}}),i.Rectangle.prototype.constructor=i.Rectangle,i.Rectangle.inflate=function(t,e,i){return t.x-=e,t.width+=2*e,t.y-=i,t.height+=2*i,t},i.Rectangle.inflatePoint=function(t,e){return i.Rectangle.inflate(t,e.x,e.y)},i.Rectangle.size=function(t,e){return void 0===e||null===e?e=new i.Point(t.width,t.height):e.setTo(t.width,t.height),e},i.Rectangle.clone=function(t,e){return void 0===e||null===e?e=new i.Rectangle(t.x,t.y,t.width,t.height):e.setTo(t.x,t.y,t.width,t.height),e},i.Rectangle.createFromBounds=function(t,e){return void 0!==e&&null!==e||(e=new i.Rectangle(t.x,t.y,t.width,t.height)),e.copyFromBounds(t)},i.Rectangle.contains=function(t,e,i){return!(t.width<=0||t.height<=0)&&(e>=t.x&&e0&&t instanceof i.Group){do{t.add(this.children[0],e)}while(this.children.length>0);this.hash=[],this.cursor=null}return t},i.Group.prototype.removeAll=function(t,e,i){if(void 0===t&&(t=!1),void 0===e&&(e=!1),void 0===i&&(i=!1),0!==this.children.length){do{!e&&this.children[0].events&&this.children[0].events.onRemovedFromGroup$dispatch(this.children[0],this);var s=this.removeChild(this.children[0]);this.removeFromHash(s),t&&s&&s.destroy(!0,i)}while(this.children.length>0);this.hash=[],this.cursor=null}},i.Group.prototype.removeBetween=function(t,e,i,s){if(void 0===e&&(e=this.children.length-1),void 0===i&&(i=!1),void 0===s&&(s=!1),0!==this.children.length){if(t>e||t<0||e>this.children.length)return!1;for(var n=e;n>=t;){!s&&this.children[n].events&&this.children[n].events.onRemovedFromGroup$dispatch(this.children[n],this);var r=this.removeChild(this.children[n]);this.removeFromHash(r),i&&r&&r.destroy(!0),this.cursor===this.children[n]&&(this.cursor=null),n--}this.updateZ()}},i.Group.prototype.scatter=function(t,e){null==t&&(t=this.game.world.bounds),this.forEach(function(e){e.position.set(t.randomX,t.randomY)},null,e)},i.Group.prototype.shuffle=function(){i.ArrayUtils.shuffle(this.children),this.updateZ()},i.Group.prototype.destroy=function(t,e){null===this.game||this.ignoreDestroy||(void 0===t&&(t=!0),void 0===e&&(e=!1),this.onDestroy.dispatch(this,t,e),this.removeAll(t),this.cursor=null,this.filters=null,this.pendingDestroy=!1,e||(this.parent&&this.parent.removeChild(this),this.game=null,this.exists=!1))},Object.defineProperty(i.Group.prototype,"total",{get:function(){return this.iterate("exists",!0,i.Group.RETURN_TOTAL)}}),Object.defineProperty(i.Group.prototype,"length",{get:function(){return this.children.length}}),Object.defineProperty(i.Group.prototype,"angle",{get:function(){return i.Math.radToDeg(this.rotation)},set:function(t){this.rotation=i.Math.degToRad(t)}}),Object.defineProperty(i.Group.prototype,"centerX",{get:function(){return this.getBounds(this.parent).centerX},set:function(t){var e=this.getBounds(this.parent),i=this.x-e.x;this.x=t+i-e.halfWidth}}),Object.defineProperty(i.Group.prototype,"centerY",{get:function(){return this.getBounds(this.parent).centerY},set:function(t){var e=this.getBounds(this.parent),i=this.y-e.y;this.y=t+i-e.halfHeight}}),Object.defineProperty(i.Group.prototype,"left",{get:function(){return this.getBounds(this.parent).left},set:function(t){var e=this.getBounds(this.parent),i=this.x-e.x;this.x=t+i}}),Object.defineProperty(i.Group.prototype,"right",{get:function(){return this.getBounds(this.parent).right},set:function(t){var e=this.getBounds(this.parent),i=this.x-e.x;this.x=t+i-e.width}}),Object.defineProperty(i.Group.prototype,"top",{get:function(){return this.getBounds(this.parent).top},set:function(t){var e=this.getBounds(this.parent),i=this.y-e.y;this.y=t+i}}),Object.defineProperty(i.Group.prototype,"bottom",{get:function(){return this.getBounds(this.parent).bottom},set:function(t){var e=this.getBounds(this.parent),i=this.y-e.y;this.y=t+i-e.height}}),i.World=function(t){i.Group.call(this,t,null,"__world",!1),this.bounds=new i.Rectangle(0,0,t.width,t.height),this.camera=null,this._definedSize=!1,this._width=t.width,this._height=t.height,this.game.state.onStateChange.add(this.stateChange,this)},i.World.prototype=Object.create(i.Group.prototype),i.World.prototype.constructor=i.World,i.World.prototype.boot=function(){this.camera=new i.Camera(this.game,0,0,0,this.game.width,this.game.height),this.game.stage.addChild(this),this.camera.boot()},i.World.prototype.stateChange=function(){this.x=0,this.y=0,this.camera.reset()},i.World.prototype.setBounds=function(t,e,i,s){this._definedSize=!0,this._width=i,this._height=s,this.bounds.setTo(t,e,i,s),this.x=t,this.y=e,this.camera.bounds&&this.camera.bounds.setTo(t,e,Math.max(i,this.game.width),Math.max(s,this.game.height)),this.game.physics.setBoundsToWorld()},i.World.prototype.resize=function(t,e){this._definedSize&&(t0)for(o=e;o=e;o-=n)h=i.EarCut.insertNode(o,t[o],t[o+1],h);return h},i.EarCut.filterPoints=function(t,e){if(!t)return t;e||(e=t);var s,n=t;do{if(s=!1,n.steiner||!i.EarCut.equals(n,n.next)&&0!==i.EarCut.area(n.prev,n,n.next))n=n.next;else{if(i.EarCut.removeNode(n),(n=e=n.prev)===n.next)return null;s=!0}}while(s||n!==e);return e},i.EarCut.earcutLinked=function(t,e,s,n,r,o,a){if(t){!a&&o&&i.EarCut.indexCurve(t,n,r,o);for(var h,l,c=t;t.prev!==t.next;)if(h=t.prev,l=t.next,o?i.EarCut.isEarHashed(t,n,r,o):i.EarCut.isEar(t))e.push(h.i/s),e.push(t.i/s),e.push(l.i/s),i.EarCut.removeNode(t),t=l.next,c=l.next;else if((t=l)===c){a?1===a?(t=i.EarCut.cureLocalIntersections(t,e,s),i.EarCut.earcutLinked(t,e,s,n,r,o,2)):2===a&&i.EarCut.splitEarcut(t,e,s,n,r,o):i.EarCut.earcutLinked(i.EarCut.filterPoints(t),e,s,n,r,o,1);break}}},i.EarCut.isEar=function(t){var e=t.prev,s=t,n=t.next;if(i.EarCut.area(e,s,n)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(i.EarCut.pointInTriangle(e.x,e.y,s.x,s.y,n.x,n.y,r.x,r.y)&&i.EarCut.area(r.prev,r,r.next)>=0)return!1;r=r.next}return!0},i.EarCut.isEarHashed=function(t,e,s,n){var r=t.prev,o=t,a=t.next;if(i.EarCut.area(r,o,a)>=0)return!1;for(var h=r.xP?P:T,e.moveTo(x,b+T),e.lineTo(x,b+w-T),e.quadraticCurveTo(x,b+w,x+T,b+w),e.lineTo(x+_-T,b+w),e.quadraticCurveTo(x+_,b+w,x+_,b+w-T),e.lineTo(x+_,b+T),e.quadraticCurveTo(x+_,b,x+_-T,b),e.lineTo(x+T,b),e.quadraticCurveTo(x,b,x,b+T),e.closePath()}}}},PIXI.CanvasGraphics.updateGraphicsTint=function(t){if(16777215!==t.tint)for(var e=(t.tint>>16&255)/255,i=(t.tint>>8&255)/255,s=(255&t.tint)/255,n=0;nn?h+c:n;else if(p===i.CIRCLE)a=r.x,h=r.y,l=r.radius+f/2,c=r.radius+f/2,t=a-ln?h+c:n;else if(p===i.ELLIPSE)a=r.x,h=r.y,l=r.width+f/2,c=r.height+f/2,t=a-ln?h+c:n;else{o=r.points;for(var g=0;gn?h+f:n}}else t=0,e=0,s=0,n=0;var m=this.boundsPadding;this._localBounds.x=t-m,this._localBounds.width=e-t+2*m,this._localBounds.y=s-m,this._localBounds.height=n-s+2*m},i.Graphics.prototype._generateCachedSprite=function(){var t=this.getLocalBounds();if(this._cachedSprite)this._cachedSprite.buffer.resize(t.width,t.height);else{var e=new PIXI.CanvasBuffer(t.width,t.height),i=PIXI.Texture.fromCanvas(e.canvas);this._cachedSprite=new PIXI.Sprite(i),this._cachedSprite.buffer=e,this._cachedSprite.worldTransform=this.worldTransform}this._cachedSprite.anchor.x=-t.x/t.width,this._cachedSprite.anchor.y=-t.y/t.height,this._cachedSprite.buffer.context.translate(-t.x,-t.y),this.worldAlpha=1,PIXI.CanvasGraphics.renderGraphics(this,this._cachedSprite.buffer.context),this._cachedSprite.alpha=this.alpha},i.Graphics.prototype.updateCachedSpriteTexture=function(){var t=this._cachedSprite,e=t.texture,i=t.buffer.canvas;e.baseTexture.width=i.width,e.baseTexture.height=i.height,e.crop.width=e.frame.width=i.width,e.crop.height=e.frame.height=i.height,t._width=i.width,t._height=i.height,e.baseTexture.dirty()},i.Graphics.prototype.destroyCachedSprite=function(){this._cachedSprite.texture.destroy(!0),this._cachedSprite=null},i.Graphics.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null,t instanceof i.Polygon&&(t=t.clone()).flatten();var e=new i.GraphicsData(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,t);return this.graphicsData.push(e),e.type===i.POLYGON&&(e.shape.closed=this.filling,this.currentPath=e),this.dirty=!0,this._boundsDirty=!0,e},Object.defineProperty(i.Graphics.prototype,"cacheAsBitmap",{get:function(){return this._cacheAsBitmap},set:function(t){this._cacheAsBitmap=t,this._cacheAsBitmap?this._generateCachedSprite():this.destroyCachedSprite(),this.dirty=!0,this.webGLDirty=!0}}),i.RenderTexture=function(t,e,s,n,r,o,a,h){if(void 0===e&&(e=100),void 0===s&&(s=100),void 0===n&&(n=""),void 0===r&&(r=i.scaleModes.DEFAULT),void 0===o&&(o=1),void 0===a&&(a=PIXI.defaultRenderer),void 0===h&&(h=0),this.game=t,this.key=n,this.type=i.RENDERTEXTURE,this._tempMatrix=new i.Matrix,this.width=e,this.height=s,this.resolution=o,this.frame=new i.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.crop=this.frame.clone(),this.baseTexture=new PIXI.BaseTexture,this.baseTexture.width=this.width*this.resolution,this.baseTexture.height=this.height*this.resolution,this.baseTexture._glTextures=[],this.baseTexture.resolution=this.resolution,this.baseTexture.scaleMode=r,this.baseTexture.hasLoaded=!0,PIXI.Texture.call(this,this.baseTexture,this.frame.clone()),this.renderer=a,this.renderer.type===i.WEBGL){var l=this.renderer.gl;this.baseTexture.textureIndex=h,this.baseTexture._dirty[l.id]=!1,this.textureBuffer=new PIXI.FilterTexture(l,this.width,this.height,this.baseTexture.scaleMode,h),this.baseTexture._glTextures[l.id]=this.textureBuffer.texture,this.projection=new i.Point(.5*this.width,.5*-this.height)}else this.textureBuffer=new PIXI.CanvasBuffer(this.width*this.resolution,this.height*this.resolution),this.baseTexture.source=this.textureBuffer.canvas;this.valid=!0,this.tempMatrix=new i.Matrix,this._updateUvs()},i.RenderTexture.prototype=Object.create(PIXI.Texture.prototype),i.RenderTexture.prototype.constructor=i.RenderTexture,i.RenderTexture.prototype.renderXY=function(t,e,s,n){t.updateTransform(),this._tempMatrix.copyFrom(t.worldTransform),this._tempMatrix.tx=e,this._tempMatrix.ty=s,this.renderer.type===i.WEBGL?this._renderWebGL(t,this._tempMatrix,n):this._renderCanvas(t,this._tempMatrix,n)},i.RenderTexture.prototype.renderRawXY=function(t,e,s,n){this._tempMatrix.identity().translate(e,s),this.renderer.type===i.WEBGL?this._renderWebGL(t,this._tempMatrix,n):this._renderCanvas(t,this._tempMatrix,n)},i.RenderTexture.prototype.render=function(t,e,s){void 0===e||null===e?this._tempMatrix.copyFrom(t.worldTransform):this._tempMatrix.copyFrom(e),this.renderer.type===i.WEBGL?this._renderWebGL(t,this._tempMatrix,s):this._renderCanvas(t,this._tempMatrix,s)},i.RenderTexture.prototype.resize=function(t,e,s){t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=t,this.height=e,this.frame.width=this.crop.width=t*this.resolution,this.frame.height=this.crop.height=e*this.resolution,s&&(this.baseTexture.width=this.width*this.resolution,this.baseTexture.height=this.height*this.resolution),this.renderer.type===i.WEBGL&&(this.projection.x=this.width/2,this.projection.y=-this.height/2),this.valid&&this.textureBuffer.resize(this.width,this.height))},i.RenderTexture.prototype.clear=function(){this.valid&&(this.renderer.type===i.WEBGL&&this.renderer.gl.bindFramebuffer(this.renderer.gl.FRAMEBUFFER,this.textureBuffer.frameBuffer),this.textureBuffer.clear())},i.RenderTexture.prototype._renderWebGL=function(t,e,i){if(this.valid&&0!==t.alpha){var s=t.worldTransform;s.identity(),s.translate(0,2*this.projection.y),e&&s.append(e),s.scale(1,-1);for(var n=0;nt[i]&&(i=e);return t[i]},minProperty:function(t){if(2===arguments.length&&"object"==typeof arguments[1])e=arguments[1];else var e=arguments.slice(1);for(var i=1,s=0,n=e.length;i=s;h--)a=t+(a="number"==typeof r?i.Utils.pad(h.toString(),r,"0",1):h.toString())+n,o.push(a);return o},i.Frame=function(t,e,s,n,r,o){this.index=t,this.x=e,this.y=s,this.width=n,this.height=r,0!==this.width&&0!==this.height||console.warn('Phaser.Frame: Frame "'+this.name+'" has a width or height of zero'),this.name=o,this.centerX=Math.floor(n/2),this.centerY=Math.floor(r/2),this.distance=i.Math.distance(0,0,n,r),this.rotated=!1,this.trimmed=!1,this.sourceSizeW=n,this.sourceSizeH=r,this.spriteSourceSizeX=0,this.spriteSourceSizeY=0,this.spriteSourceSizeW=0,this.spriteSourceSizeH=0,this.right=this.x+this.width,this.bottom=this.y+this.height},i.Frame.prototype={resize:function(t,e){this.width=t,this.height=e,this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2),this.distance=i.Math.distance(0,0,t,e),this.sourceSizeW=t,this.sourceSizeH=e,this.right=this.x+t,this.bottom=this.y+e},setTrim:function(t,e,i,s,n,r,o){this.trimmed=t,t&&(this.sourceSizeW=e,this.sourceSizeH=i,this.centerX=Math.floor(e/2),this.centerY=Math.floor(i/2),this.spriteSourceSizeX=s,this.spriteSourceSizeY=n,this.spriteSourceSizeW=r,this.spriteSourceSizeH=o)},clone:function(){var t=new i.Frame(this.index,this.x,this.y,this.width,this.height,this.name);for(var e in this)this.hasOwnProperty(e)&&(t[e]=this[e]);return t},getRect:function(t){return void 0===t?t=new i.Rectangle(this.x,this.y,this.width,this.height):t.setTo(this.x,this.y,this.width,this.height),t}},i.Frame.prototype.constructor=i.Frame,i.FrameData=function(){this._frames=[],this._frameNames=[]},i.FrameData.prototype={addFrame:function(t){return t.index=this._frames.length,this._frames.push(t),""!==t.name&&(this._frameNames[t.name]=t.index),t},getFrame:function(t){return t>=this._frames.length&&(t=0),this._frames[t]},getFrameByName:function(t){return"number"==typeof this._frameNames[t]?this._frames[this._frameNames[t]]:null},checkFrameName:function(t){return null!=this._frameNames[t]},clone:function(){for(var t=new i.FrameData,e=0;ec&&(f=o,g+=n+a);return p},JSONData:function(t,e){if(!e.frames)return console.warn("Phaser.AnimationParser.JSONData: Invalid Texture Atlas JSON given, missing 'frames' array"),void console.log(e);for(var s,n=new i.FrameData,r=e.frames,o=0;o1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},createColor:function(t,e,s,n,r,o,a,h){var l={r:t||0,g:e||0,b:s||0,a:n||1,h:r||0,s:o||0,l:a||0,v:h||0,color:0,color32:0,rgba:""};return i.Color.updateColor(l)},updateColor:function(t){return t.rgba="rgba("+t.r.toFixed()+","+t.g.toFixed()+","+t.b.toFixed()+","+t.a.toString()+")",t.color=i.Color.getColor(t.r,t.g,t.b),t.color32=i.Color.getColor32(255*t.a,t.r,t.g,t.b),t},getColor32:function(t,e,i,s){return t<<24|e<<16|i<<8|s},getColor:function(t,e,i){return t<<16|e<<8|i},RGBtoString:function(t,e,s,n,r){return void 0===n&&(n=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+s).toString(16).slice(1):"0x"+i.Color.componentToHex(n)+i.Color.componentToHex(t)+i.Color.componentToHex(e)+i.Color.componentToHex(s)},hexToRGB:function(t){var e=i.Color.hexToColor(t);if(e)return i.Color.getColor32(e.a,e.r,e.g,e.b)},hexToColor:function(t,e){t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,s){return e+e+i+i+s+s});var s=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(s){var n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16);e?(e.r=n,e.g=r,e.b=o):e=i.Color.createColor(n,r,o)}return e},webToColor:function(t,e){e||(e=i.Color.createColor());var s=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t);return s&&(e.r=~~Number(s[1]),e.g=~~Number(s[2]),e.b=~~Number(s[3]),e.a=void 0!==s[4]?Number(s[4]):1,i.Color.updateColor(e)),e},valueToColor:function(t,e){if(e||(e=i.Color.createColor()),"string"==typeof t)return 0===t.indexOf("rgb")?i.Color.webToColor(t,e):(e.a=1,i.Color.hexToColor(t,e));if("number"==typeof t){var s=i.Color.getRGB(t);return e.r=s.r,e.g=s.g,e.b=s.b,e.a=s.a/255,e}return e},componentToHex:function(t){var e=t.toString(16);return 1===e.length?"0"+e:e},HSVColorWheel:function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var s=[],n=0;n<=359;n++)s.push(i.Color.HSVtoRGB(n/359,t,e));return s},HSLColorWheel:function(t,e){void 0===t&&(t=.5),void 0===e&&(e=.5);for(var s=[],n=0;n<=359;n++)s.push(i.Color.HSLtoRGB(n/359,t,e));return s},interpolateColor:function(t,e,s,n,r,o){void 0===r&&(r=255),void 0===o&&(o=0);var a=i.Color.getRGB(t),h=i.Color.getRGB(e);if(0===o)var l=(h.red-a.red)*n/s+a.red,c=(h.green-a.green)*n/s+a.green,u=(h.blue-a.blue)*n/s+a.blue;if(1===o){var d,p=i.Color.RGBtoHSV(a.r,a.g,a.b),f=i.Color.RGBtoHSV(h.r,h.g,h.b),g=f.h-p.h;if(p.h>f.h){var m=f.h;f.h=p.h,p.h=m,g=-g,n=s-n}g>.5&&(p.h=p.h+1,d=((f.h-p.h)*n/s+p.h)%1),g<=.5&&(d=(f.h-p.h)*n/s+p.h);var y=(f.s-p.s)*n/s+p.s,v=(f.v-p.v)*n/s+p.v,x=i.Color.HSVtoRGB(d,y,v,x),l=x.r,c=x.g,u=x.b}return i.Color.getColor32(r,l,c,u)},interpolateColorWithRGB:function(t,e,s,n,r,o){var a=i.Color.getRGB(t),h=(e-a.red)*o/r+a.red,l=(s-a.green)*o/r+a.green,c=(n-a.blue)*o/r+a.blue;return i.Color.getColor(h,l,c)},interpolateRGB:function(t,e,s,n,r,o,a,h){var l=(n-t)*h/a+t,c=(r-e)*h/a+e,u=(o-s)*h/a+s;return i.Color.getColor(l,c,u)},linear:function(t,e,i){return this.interpolateColor(t,e,1,i)},linearInterpolation:function(t,e){var s=i.Math.linear(0,t.length-1,e),n=t[Math.floor(s)],r=t[Math.ceil(s)];return this.linear(n,r,s%1)},getRandomColor:function(t,e,s){if(void 0===t&&(t=0),void 0===e&&(e=255),void 0===s&&(s=255),e>255||t>e)return i.Color.getColor(255,255,255);var n=t+Math.round(Math.random()*(e-t)),r=t+Math.round(Math.random()*(e-t)),o=t+Math.round(Math.random()*(e-t));return i.Color.getColor32(s,n,r,o)},getRGB:function(t){return t>16777215?{alpha:t>>>24,red:t>>16&255,green:t>>8&255,blue:255&t,a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{alpha:255,red:t>>16&255,green:t>>8&255,blue:255&t,a:255,r:t>>16&255,g:t>>8&255,b:255&t}},getWebRGB:function(t){if("object"==typeof t)return"rgba("+t.r.toString()+","+t.g.toString()+","+t.b.toString()+","+(t.a/255).toString()+")";var e=i.Color.getRGB(t);return"rgba("+e.r.toString()+","+e.g.toString()+","+e.b.toString()+","+(e.a/255).toString()+")"},getAlpha:function(t){return t>>>24},getAlphaFloat:function(t){return(t>>>24)/255},getRed:function(t){return t>>16&255},getGreen:function(t){return t>>8&255},getBlue:function(t){return 255&t},blendNormal:function(t){return t},blendLighten:function(t,e){return e>t?e:t},blendDarken:function(t,e){return e>t?t:e},blendMultiply:function(t,e){return t*e/255},blendAverage:function(t,e){return(t+e)/2},blendAdd:function(t,e){return Math.min(255,t+e)},blendSubtract:function(t,e){return Math.max(0,t+e-255)},blendDifference:function(t,e){return Math.abs(t-e)},blendNegation:function(t,e){return 255-Math.abs(255-t-e)},blendScreen:function(t,e){return 255-((255-t)*(255-e)>>8)},blendExclusion:function(t,e){return t+e-2*t*e/255},blendOverlay:function(t,e){return e<128?2*t*e/255:255-2*(255-t)*(255-e)/255},blendSoftLight:function(t,e){return e<128?2*(64+(t>>1))*(e/255):255-2*(255-(64+(t>>1)))*(255-e)/255},blendHardLight:function(t,e){return i.Color.blendOverlay(e,t)},blendColorDodge:function(t,e){return 255===e?e:Math.min(255,(t<<8)/(255-e))},blendColorBurn:function(t,e){return 0===e?e:Math.max(0,255-(255-t<<8)/e)},blendLinearDodge:function(t,e){return i.Color.blendAdd(t,e)},blendLinearBurn:function(t,e){return i.Color.blendSubtract(t,e)},blendLinearLight:function(t,e){return e<128?i.Color.blendLinearBurn(t,2*e):i.Color.blendLinearDodge(t,2*(e-128))},blendVividLight:function(t,e){return e<128?i.Color.blendColorBurn(t,2*e):i.Color.blendColorDodge(t,2*(e-128))},blendPinLight:function(t,e){return e<128?i.Color.blendDarken(t,2*e):i.Color.blendLighten(t,2*(e-128))},blendHardMix:function(t,e){return i.Color.blendVividLight(t,e)<128?0:255},blendReflect:function(t,e){return 255===e?e:Math.min(255,t*t/(255-e))},blendGlow:function(t,e){return i.Color.blendReflect(e,t)},blendPhoenix:function(t,e){return Math.min(t,e)-Math.max(t,e)+255}},i.Physics=function(t,e){e=e||{},this.game=t,this.config=e,this.arcade=null,this.p2=null,this.ninja=null,this.box2d=null,this.chipmunk=null,this.matter=null,this.parseConfig()},i.Physics.ARCADE=0,i.Physics.P2JS=1,i.Physics.NINJA=2,i.Physics.BOX2D=3,i.Physics.CHIPMUNK=4,i.Physics.MATTERJS=5,i.Physics.prototype={parseConfig:function(){this.config.hasOwnProperty("arcade")&&!0!==this.config.arcade||!i.Physics.hasOwnProperty("Arcade")||(this.arcade=new i.Physics.Arcade(this.game)),this.config.hasOwnProperty("ninja")&&!0===this.config.ninja&&i.Physics.hasOwnProperty("Ninja")&&(this.ninja=new i.Physics.Ninja(this.game)),this.config.hasOwnProperty("p2")&&!0===this.config.p2&&i.Physics.hasOwnProperty("P2")&&(this.p2=new i.Physics.P2(this.game,this.config)),this.config.hasOwnProperty("box2d")&&!0===this.config.box2d&&i.Physics.hasOwnProperty("BOX2D")&&(this.box2d=new i.Physics.BOX2D(this.game,this.config)),this.config.hasOwnProperty("matter")&&!0===this.config.matter&&i.Physics.hasOwnProperty("Matter")&&(this.matter=new i.Physics.Matter(this.game,this.config))},startSystem:function(t){t===i.Physics.ARCADE?this.arcade=new i.Physics.Arcade(this.game):t===i.Physics.P2JS?null===this.p2?this.p2=new i.Physics.P2(this.game,this.config):this.p2.reset():t===i.Physics.NINJA?this.ninja=new i.Physics.Ninja(this.game):t===i.Physics.BOX2D?null===this.box2d?this.box2d=new i.Physics.Box2D(this.game,this.config):this.box2d.reset():t===i.Physics.MATTERJS&&(null===this.matter?this.matter=new i.Physics.Matter(this.game,this.config):this.matter.reset())},enable:function(t,e,s){void 0===e&&(e=i.Physics.ARCADE),void 0===s&&(s=!1),e===i.Physics.ARCADE?this.arcade.enable(t):e===i.Physics.P2JS&&this.p2?this.p2.enable(t,s):e===i.Physics.NINJA&&this.ninja?this.ninja.enableAABB(t):e===i.Physics.BOX2D&&this.box2d?this.box2d.enable(t):e===i.Physics.MATTERJS&&this.matter?this.matter.enable(t):console.warn(t.key+" is attempting to enable a physics body using an unknown physics system.")},preUpdate:function(){this.p2&&this.p2.preUpdate(),this.box2d&&this.box2d.preUpdate(),this.matter&&this.matter.preUpdate()},update:function(){this.p2&&this.p2.update(),this.box2d&&this.box2d.update(),this.matter&&this.matter.update()},setBoundsToWorld:function(){this.arcade&&this.arcade.setBoundsToWorld(),this.ninja&&this.ninja.setBoundsToWorld(),this.p2&&this.p2.setBoundsToWorld(),this.box2d&&this.box2d.setBoundsToWorld(),this.matter&&this.matter.setBoundsToWorld()},clear:function(){this.p2&&this.p2.clear(),this.box2d&&this.box2d.clear(),this.matter&&this.matter.clear()},reset:function(){this.p2&&this.p2.reset(),this.box2d&&this.box2d.reset(),this.matter&&this.matter.reset()},destroy:function(){this.p2&&this.p2.destroy(),this.box2d&&this.box2d.destroy(),this.matter&&this.matter.destroy(),this.arcade=null,this.ninja=null,this.p2=null,this.box2d=null,this.matter=null}},i.Physics.prototype.constructor=i.Physics,i.Physics.Arcade=function(t){this.game=t,this.gravity=new i.Point,this.bounds=new i.Rectangle(0,0,t.world.width,t.world.height),this.checkCollision={up:!0,down:!0,left:!0,right:!0},this.maxObjects=10,this.maxLevels=4,this.OVERLAP_BIAS=4,this.forceX=!1,this.sortDirection=i.Physics.Arcade.LEFT_RIGHT,this.skipQuadTree=!0,this.isPaused=!1,this.quadTree=new i.QuadTree(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this._total=0,this.setBoundsToWorld()},i.Physics.Arcade.prototype.constructor=i.Physics.Arcade,i.Physics.Arcade.SORT_NONE=0,i.Physics.Arcade.LEFT_RIGHT=1,i.Physics.Arcade.RIGHT_LEFT=2,i.Physics.Arcade.TOP_BOTTOM=3,i.Physics.Arcade.BOTTOM_TOP=4,i.Physics.Arcade.prototype={setBounds:function(t,e,i,s){this.bounds.setTo(t,e,i,s)},setBoundsToWorld:function(){this.bounds.copyFrom(this.game.world.bounds)},enable:function(t,e){void 0===e&&(e=!0);var s=1;if(Array.isArray(t))for(s=t.length;s--;)t[s]instanceof i.Group?this.enable(t[s].children,e):(this.enableBody(t[s]),e&&t[s].hasOwnProperty("children")&&t[s].children.length>0&&this.enable(t[s],!0));else t instanceof i.Group?this.enable(t.children,e):(this.enableBody(t),e&&t.hasOwnProperty("children")&&t.children.length>0&&this.enable(t.children,!0))},enableBody:function(t){t.hasOwnProperty("body")&&null===t.body&&(t.body=new i.Physics.Arcade.Body(t),t.parent&&t.parent instanceof i.Group&&t.parent.addToHash(t))},updateMotion:function(t){if(t.allowRotation){var e=this.computeVelocity(0,t,t.angularVelocity,t.angularAcceleration,t.angularDrag,t.maxAngular)-t.angularVelocity;t.angularVelocity+=e,t.rotation+=t.angularVelocity*this.game.time.physicsElapsed}t.velocity.x=this.computeVelocity(1,t,t.velocity.x,t.acceleration.x,t.drag.x,t.maxVelocity.x),t.velocity.y=this.computeVelocity(2,t,t.velocity.y,t.acceleration.y,t.drag.y,t.maxVelocity.y)},computeVelocity:function(t,e,i,s,n,r){return void 0===r&&(r=1e4),1===t&&e.allowGravity?i+=(this.gravity.x+e.gravity.x)*this.game.time.physicsElapsed:2===t&&e.allowGravity&&(i+=(this.gravity.y+e.gravity.y)*this.game.time.physicsElapsed),s?i+=s*this.game.time.physicsElapsed:n&&e.allowDrag&&(i-(n*=this.game.time.physicsElapsed)>0?i-=n:i+n<0?i+=n:i=0),i>r?i=r:i<-r&&(i=-r),i},overlap:function(t,e,i,s,n){return i=i||null,s=s||null,n=n||i,this._total=0,this.collideObjects(t,e,i,s,n,!0),this._total>0},collide:function(t,e,i,s,n){return i=i||null,s=s||null,n=n||i,this._total=0,this.collideObjects(t,e,i,s,n,!1),this._total>0},sortLeftRight:function(t,e){return t.body&&e.body?t.body.x-e.body.x:0},sortRightLeft:function(t,e){return t.body&&e.body?e.body.x-t.body.x:0},sortTopBottom:function(t,e){return t.body&&e.body?t.body.y-e.body.y:0},sortBottomTop:function(t,e){return t.body&&e.body?e.body.y-t.body.y:0},sort:function(t,e){null!==t.physicsSortDirection?e=t.physicsSortDirection:void 0===e&&(e=this.sortDirection),e===i.Physics.Arcade.LEFT_RIGHT?t.hash.sort(this.sortLeftRight):e===i.Physics.Arcade.RIGHT_LEFT?t.hash.sort(this.sortRightLeft):e===i.Physics.Arcade.TOP_BOTTOM?t.hash.sort(this.sortTopBottom):e===i.Physics.Arcade.BOTTOM_TOP&&t.hash.sort(this.sortBottomTop)},collideObjects:function(t,e,i,s,n,r){if(!Array.isArray(t)&&Array.isArray(e))for(o=0;o