2016-05-23 12:18:30 +00:00
/* Phaser v2.4.9 - http://phaser.io - @photonstorm - (c) 2016 Photon Storm Ltd. */
2015-02-25 02:59:00 +00:00
2016-06-09 16:13:31 +00:00
( function ( ) { var a = this , b = b || { } ; return b . game = null , b . WEBGL _RENDERER = 0 , b . CANVAS _RENDERER = 1 , b . VERSION = "v2.2.9" , b . _UID = 0 , "undefined" != typeof Float32Array ? ( b . Float32Array = Float32Array , b . Uint16Array = Uint16Array , b . Uint32Array = Uint32Array , b . ArrayBuffer = ArrayBuffer ) : ( b . Float32Array = Array , b . Uint16Array = Array ) , b . PI _2 = 2 * Math . PI , b . RAD _TO _DEG = 180 / Math . PI , b . DEG _TO _RAD = Math . PI / 180 , b . RETINA _PREFIX = "@2x" , b . DisplayObject = function ( ) { this . position = new b . Point ( 0 , 0 ) , this . scale = new b . Point ( 1 , 1 ) , this . pivot = new b . Point ( 0 , 0 ) , this . rotation = 0 , this . alpha = 1 , this . visible = ! 0 , this . hitArea = null , this . renderable = ! 1 , this . parent = null , this . stage = null , this . worldAlpha = 1 , this . worldTransform = new b . Matrix , this . worldPosition = new b . Point ( 0 , 0 ) , this . worldScale = new b . Point ( 1 , 1 ) , this . worldRotation = 0 , this . _sr = 0 , this . _cr = 1 , this . filterArea = null , this . _bounds = new b . Rectangle ( 0 , 0 , 1 , 1 ) , this . _currentBounds = null , this . _mask = null , this . _cacheAsBitmap = ! 1 , this . _cacheIsDirty = ! 1 } , b . DisplayObject . prototype . constructor = b . DisplayObject , b . DisplayObject . prototype . destroy = function ( ) { if ( this . children ) { for ( var a = this . children . length ; a -- ; ) this . children [ a ] . destroy ( ) ; this . children = [ ] } this . hitArea = null , this . parent = null , this . stage = null , this . worldTransform = null , this . filterArea = null , this . _bounds = null , this . _currentBounds = null , this . _mask = null , this . renderable = ! 1 , this . _destroyCachedSprite ( ) } , Object . defineProperty ( b . DisplayObject . prototype , "worldVisible" , { get : function ( ) { var a = this ; do { if ( ! a . visible ) return ! 1 ; a = a . parent } while ( a ) ; return ! 0 } } ) , Object . defineProperty ( b . DisplayObject . prototype , "mask" , { get : function ( ) { return this . _mask } , set : function ( a ) { this . _mask && ( this . _mask . isMask = ! 1 ) , this . _mask = a , this . _mask && ( this . _mask . isMask = ! 0 ) } } ) , Object . defineProperty ( b . DisplayObject . prototype , "filters" , { get : function ( ) { return this . _filters } , set : function ( a ) { if ( a ) { for ( var c = [ ] , d = 0 ; d < a . length ; d ++ ) for ( var e = a [ d ] . passes , f = 0 ; f < e . length ; f ++ ) c . push ( e [ f ] ) ; this . _filterBlock = { target : this , filterPasses : c } } this . _filters = a , this . blendMode && this . blendMode === b . blendModes . MULTIPLY && ( this . blendMode = b . blendModes . NORMAL ) } } ) , Object . defineProperty ( b . DisplayObject . prototype , "cacheAsBitmap" , { get : function ( ) { return this . _cacheAsBitmap } , set : function ( a ) { this . _cacheAsBitmap !== a && ( a ? this . _generateCachedSprite ( ) : this . _destroyCachedSprite ( ) , this . _cacheAsBitmap = a ) } } ) , b . DisplayObject . prototype . updateTransform = function ( a ) { if ( a || this . parent || this . game ) { var c = this . parent ; a ? c = a : this . parent || ( c = this . game . world ) ; var d , e , f , g , h , i , j = c . worldTransform , k = this . worldTransform ; this . rotation % b . PI _2 ? ( this . rotation !== this . rotationCache && ( this . rotationCache = this . rotation , this . _sr = Math . sin ( this . rotation ) , this . _cr = Math . cos ( this . rotation ) ) , d = this . _cr * this . scale . x , e = this . _sr * this . scale . x , f = - this . _sr * this . scale . y , g = this . _cr * this . scale . y , h = this . position . x , i = this . position . y , ( this . pivot . x || this . pivot . y ) && ( h -= this . pivot . x * d + this . pivot . y * f , i -= this . pivot . x * e + this . pivot . y * g ) , k . a = d * j . a + e * j . c , k . b = d * j . b + e * j . d , k . c = f * j . a + g * j . c , k . d = f * j . b + g * j . d , k . tx = h * j . a + i * j . c + j . tx , k . ty = h * j . b + i * j . d + j . ty ) : ( d = this . scale . x , g = this . scale . y , h = this . position . x - this . pivot . x * d , i = this . position . y - this . pivot . y * g , k . a = d * j . a , k . b = d * j . b , k . c = g * j . c , k . d = g * j . d , k . tx = h * j . a + i * j . c + j . tx , k . ty = h * j . b + i * j . d + j . ty ) , this . worldAlpha = this . alpha * c . worldAlpha , this . worldPosition . set ( k . tx , k . ty ) , this . worldScale . set ( Math . sqrt ( k . a * k . a + k . b * k . b ) , Math . sqrt ( k . c * k . c + k . d * k . d ) ) , this . worldRotation = Math . atan2 ( k . c , k . d ) , this . _currentBounds = null , this . transformCallback && this . transformCallback . call ( this . transformCallbackContext , k , j ) } } , b . DisplayObject . prototype . displayObjectUpdateTransform = b . DisplayObject . prototype . updateTransform , b . DisplayObject . prototype . getBounds = function ( a ) { return a = a , b . EmptyRectangle } , b . DisplayObject . prototype . getLocalBounds = function ( ) { return this . getBounds ( b . identityMatrix ) } , b . DisplayObject . prototype . setStageReference = function ( a ) { this . stage = a } , b . DisplayObject . prototype . preUpdate = function ( ) { } , b . DisplayObject . prototype . generateTexture = function ( a , c , d ) { var e = this . getLocalBounds ( ) , f = new b . RenderTexture ( 0 | e . width , 0 | e . height , d , c , a ) ; return b . DisplayObject . _tempMatrix . tx = - e . x , b . DisplayObject . _tempMatrix . ty = - e . y , f . render ( this , b . DisplayObject . _tempMatrix ) , f } ,
2016-06-02 15:40:04 +00:00
this . blendModeManager = new b . WebGLBlendModeManager , this . renderSession = { } , this . renderSession . game = this . game , this . renderSession . gl = this . gl , this . renderSession . drawCount = 0 , this . renderSession . shaderManager = this . shaderManager , this . renderSession . maskManager = this . maskManager , this . renderSession . filterManager = this . filterManager , this . renderSession . blendModeManager = this . blendModeManager , this . renderSession . spriteBatch = this . spriteBatch , this . renderSession . stencilManager = this . stencilManager , this . renderSession . renderer = this , this . renderSession . resolution = this . resolution , this . initContext ( ) , this . mapBlendModes ( ) } , b . WebGLRenderer . prototype . constructor = b . WebGLRenderer , b . WebGLRenderer . prototype . initContext = function ( ) { var a = this . view . getContext ( "webgl" , this . _contextOptions ) || this . view . getContext ( "experimental-webgl" , this . _contextOptions ) ; if ( this . gl = a , ! a ) throw new Error ( "This browser does not support webGL. Try using the canvas renderer" ) ; this . glContextId = a . id = b . WebGLRenderer . glContextId ++ , b . glContexts [ this . glContextId ] = a , b . instances [ this . glContextId ] = this , a . disable ( a . DEPTH _TEST ) , a . disable ( a . CULL _FACE ) , a . enable ( a . BLEND ) , this . shaderManager . setContext ( a ) , this . spriteBatch . setContext ( a ) , this . maskManager . setContext ( a ) , this . filterManager . setContext ( a ) , this . blendModeManager . setContext ( a ) , this . stencilManager . setContext ( a ) , this . renderSession . gl = this . gl , this . resize ( this . width , this . height ) } , b . WebGLRenderer . prototype . render = function ( a ) { if ( ! this . contextLost ) { var b = this . gl ; b . viewport ( 0 , 0 , this . width , this . height ) , b . bindFramebuffer ( b . FRAMEBUFFER , null ) , this . game . clearBeforeRender && ( b . clearColor ( a . _bgColor . r , a . _bgColor . g , a . _bgColor . b , a . _bgColor . a ) , b . clear ( b . COLOR _BUFFER _BIT ) ) , this . offset . x = this . game . camera . _shake . x , this . offset . y = this . game . camera . _shake . y , this . renderDisplayObject ( a , this . projection ) } } , b . WebGLRenderer . prototype . renderDisplayObject = function ( a , c , d , e ) { this . renderSession . blendModeManager . setBlendMode ( b . blendModes . NORMAL ) , this . renderSession . drawCount = 0 , this . renderSession . flipY = d ? - 1 : 1 , this . renderSession . projection = c , this . renderSession . offset = this . offset , this . spriteBatch . begin ( this . renderSession ) , this . filterManager . begin ( this . renderSession , d ) , a . _renderWebGL ( this . renderSession , e ) , this . spriteBatch . end ( ) } , b . WebGLRenderer . prototype . resize = function ( a , b ) { this . width = a * this . resolution , this . height = b * this . resolution , this . view . width = this . width , this . view . height = this . height , this . autoResize && ( this . view . style . width = this . width / this . resolution + "px" , this . view . style . height = this . height / this . resolution + "px" ) , this . gl . viewport ( 0 , 0 , this . width , this . height ) , this . projection . x = this . width / 2 / this . resolution , this . projection . y = - this . height / 2 / this . resolution } , b . WebGLRenderer . prototype . updateTexture = function ( a ) { if ( ! a . hasLoaded ) return ! 1 ; var c = this . gl ; return a . _glTextures [ c . id ] || ( a . _glTextures [ c . id ] = c . createTexture ( ) ) , c . bindTexture ( c . TEXTURE _2D , a . _glTextures [ c . id ] ) , c . pixelStorei ( c . UNPACK _PREMULTIPLY _ALPHA _WEBGL , a . premultipliedAlpha ) , c . texImage2D ( c . TEXTURE _2D , 0 , c . RGBA , c . RGBA , c . UNSIGNED _BYTE , a . source ) , c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _MAG _FILTER , a . scaleMode === b . scaleModes . LINEAR ? c . LINEAR : c . NEAREST ) , a . mipmap && b . isPowerOfTwo ( a . width , a . height ) ? ( c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _MIN _FILTER , a . scaleMode === b . scaleModes . LINEAR ? c . LINEAR _MIPMAP _LINEAR : c . NEAREST _MIPMAP _NEAREST ) , c . generateMipmap ( c . TEXTURE _2D ) ) : c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _MIN _FILTER , a . scaleMode === b . scaleModes . LINEAR ? c . LINEAR : c . NEAREST ) , a . _powerOf2 ? ( c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _WRAP _S , c . REPEAT ) , c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _WRAP _T , c . REPEAT ) ) : ( c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _WRAP _S , c . CLAMP _TO _EDGE ) , c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _WRAP _T , c . CLAMP _TO _EDGE ) ) , a . _dirty [ c . id ] = ! 1 , ! 0 } , b . WebGLRenderer . prototype . destroy = function ( ) { b . glContexts [ this . glContextId ] = null , this . projection = null , this . offset = null , this . shaderManager . destroy ( ) , this . spriteBatch . destroy ( ) , this . maskManager . destroy ( ) , this . filterManager . destroy ( ) , this . shaderManager = null , this . spriteBatch = null , this . maskManager = null , this . filterManager = null , this . gl = null , this . renderSession = null , b . CanvasPool . remove ( this ) , b . instances [ this . glContextId ] = null , b
2016-06-10 15:22:54 +00:00
for ( var g = b . hex2rgb ( c ) , h = g [ 0 ] , i = g [ 1 ] , j = g [ 2 ] , k = e . getImageData ( 0 , 0 , f . width , f . height ) , l = k . data , m = 0 ; m < l . length ; m += 4 ) if ( l [ m + 0 ] *= h , l [ m + 1 ] *= i , l [ m + 2 ] *= j , ! b . CanvasTinter . canHandleAlpha ) { var n = l [ m + 3 ] ; l [ m + 0 ] /= 255 / n , l [ m + 1 ] /= 255 / n , l [ m + 2 ] /= 255 / n } e . putImageData ( k , 0 , 0 ) } , b . CanvasTinter . checkInverseAlpha = function ( ) { var a = new b . CanvasBuffer ( 2 , 1 ) ; a . context . fillStyle = "rgba(10, 20, 30, 0.5)" , a . context . fillRect ( 0 , 0 , 1 , 1 ) ; var c = a . context . getImageData ( 0 , 0 , 1 , 1 ) ; if ( null === c ) return ! 1 ; a . context . putImageData ( c , 1 , 0 ) ; var d = a . context . getImageData ( 1 , 0 , 1 , 1 ) ; return d . data [ 0 ] === c . data [ 0 ] && d . data [ 1 ] === c . data [ 1 ] && d . data [ 2 ] === c . data [ 2 ] && d . data [ 3 ] === c . data [ 3 ] } , b . CanvasTinter . canHandleAlpha = b . CanvasTinter . checkInverseAlpha ( ) , b . CanvasTinter . canUseMultiply = b . canUseNewCanvasBlendModes ( ) , b . CanvasTinter . tintMethod = b . CanvasTinter . canUseMultiply ? b . CanvasTinter . tintWithMultiply : b . CanvasTinter . tintWithPerPixel , b . CanvasRenderer = function ( a ) { this . game = a , b . defaultRenderer || ( b . defaultRenderer = this ) , this . type = b . CANVAS _RENDERER , this . resolution = a . resolution , this . clearBeforeRender = a . clearBeforeRender , this . transparent = a . transparent , this . autoResize = ! 1 , this . width = a . width * this . resolution , this . height = a . height * this . resolution , this . view = a . canvas , this . context = this . view . getContext ( "2d" , { alpha : this . transparent } ) , this . refresh = ! 0 , this . count = 0 , this . maskManager = new b . CanvasMaskManager , this . renderSession = { context : this . context , maskManager : this . maskManager , scaleMode : null , smoothProperty : Phaser . Canvas . getSmoothingPrefix ( this . context ) , roundPixels : ! 1 } , this . mapBlendModes ( ) , this . resize ( this . width , this . height ) } , b . CanvasRenderer . prototype . constructor = b . CanvasRenderer , b . CanvasRenderer . prototype . render = function ( a ) { this . context . setTransform ( 1 , 0 , 0 , 1 , 0 , 0 ) , this . context . globalAlpha = 1 , this . renderSession . currentBlendMode = 0 , this . renderSession . shakeX = this . game . camera . _shake . x , this . renderSession . shakeY = this . game . camera . _shake . y , this . context . globalCompositeOperation = "source-over" , navigator . isCocoonJS && this . view . screencanvas && ( this . context . fillStyle = "black" , this . context . clear ( ) ) , this . clearBeforeRender && ( this . transparent ? this . context . clearRect ( 0 , 0 , this . width , this . height ) : ( this . context . fillStyle = a . _bgColor . rgba , this . context . fillRect ( 0 , 0 , this . width , this . height ) ) ) , this . renderDisplayObject ( a ) } , b . CanvasRenderer . prototype . destroy = function ( a ) { void 0 === a && ( a = ! 0 ) , a && this . view . parent && this . view . parent . removeChild ( this . view ) , this . view = null , this . context = null , this . maskManager = null , this . renderSession = null } , b . CanvasRenderer . prototype . resize = function ( a , c ) { this . width = a * this . resolution , this . height = c * this . resolution , this . view . width = this . width , this . view . height = this . height , this . autoResize && ( this . view . style . width = this . width / this . resolution + "px" , this . view . style . height = this . height / this . resolution + "px" ) , this . renderSession . smoothProperty && ( this . context [ this . renderSession . smoothProperty ] = this . renderSession . scaleMode === b . scaleModes . LINEAR ) } , b . CanvasRenderer . prototype . renderDisplayObject = function ( a , b , c ) { this . renderSession . context = b || this . context , this . renderSession . resolution = this . resolution , a . _renderCanvas ( this . renderSession , c ) } , b . CanvasRenderer . prototype . mapBlendModes = function ( ) { if ( ! b . blendModesCanvas ) { var a = [ ] , c = b . blendModes , d = b . canUseNewCanvasBlendModes ( ) ; a [ c . NORMAL ] = "source-over" , a [ c . ADD ] = "lighter" , a [ c . MULTIPLY ] = d ? "multiply" : "source-over" , a [ c . SCREEN ] = d ? "screen" : "source-over" , a [ c . OVERLAY ] = d ? "overlay" : "source-over" , a [ c . DARKEN ] = d ? "darken" : "source-over" , a [ c . LIGHTEN ] = d ? "lighten" : "source-over" , a [ c . COLOR _DODGE ] = d ? "color-dodge" : "source-over" , a [ c . COLOR _BURN ] = d ? "color-burn" : "source-over" , a [ c . HARD _LIGHT ] = d ? "hard-light" : "source-over" , a [ c . SOFT _LIGHT ] = d ? "soft-light" : "source-over" , a [ c . DIFFERENCE ] = d ? "difference" : "source-over" , a [ c . EXCLUSION ] = d ? "exclusion" : "source-over" , a [ c . HUE ] = d ? "hue" : "source-over" , a [ c . SATURATION ] = d ? "saturation" : "source-over" , a [ c . COLOR ] = d ? "color" : "source-over" , a [ c . LUMINOSITY ] = d ? "luminosity" : "source-over" , b . blendModesCanvas = a } } , b . BaseTextureCache = { } , b . BaseTextureCacheIdGenerator = 0 , b . BaseTexture = function ( a , c ) { this . resolution = 1 , this . width = 100 , this . height = 100 , this . scaleMode = c || b . scaleModes . DEFAULT , this . hasLoaded = ! 1 , this . source = a , this . _UID = b . _UID +
2016-06-09 16:13:31 +00:00
} , c . Circle . intersects = function ( a , b ) { return c . Math . distance ( a . x , a . y , b . x , b . y ) <= a . radius + b . radius } , c . Circle . circumferencePoint = function ( a , b , d , e ) { return void 0 === d && ( d = ! 1 ) , void 0 === e && ( e = new c . Point ) , d === ! 0 && ( b = c . Math . degToRad ( b ) ) , e . x = a . x + a . radius * Math . cos ( b ) , e . y = a . y + a . radius * Math . sin ( b ) , e } , c . Circle . intersectsRectangle = function ( a , b ) { var c = Math . abs ( a . x - b . x - b . halfWidth ) , d = b . halfWidth + a . radius ; if ( c > d ) return ! 1 ; var e = Math . abs ( a . y - b . y - b . halfHeight ) , f = b . halfHeight + a . radius ; if ( e > f ) return ! 1 ; if ( c <= b . halfWidth || e <= b . halfHeight ) return ! 0 ; var g = c - b . halfWidth , h = e - b . halfHeight , i = g * g , j = h * h , k = a . radius * a . radius ; return k >= i + j } , PIXI . Circle = c . Circle , c . Ellipse = function ( a , b , d , e ) { a = a || 0 , b = b || 0 , d = d || 0 , e = e || 0 , this . x = a , this . y = b , this . width = d , this . height = e , this . type = c . ELLIPSE } , c . Ellipse . prototype = { setTo : function ( a , b , c , d ) { return this . x = a , this . y = b , this . width = c , this . height = d , this } , getBounds : function ( ) { return new c . Rectangle ( this . x - this . width , this . y - this . height , this . width , this . height ) } , copyFrom : function ( a ) { return this . setTo ( a . x , a . y , a . width , a . height ) } , copyTo : function ( a ) { return a . x = this . x , a . y = this . y , a . width = this . width , a . height = this . height , a } , clone : function ( a ) { return void 0 === a || null === a ? a = new c . Ellipse ( this . x , this . y , this . width , this . height ) : a . setTo ( this . x , this . y , this . width , this . height ) , a } , contains : function ( a , b ) { return c . Ellipse . contains ( this , a , b ) } , random : function ( a ) { void 0 === a && ( a = new c . Point ) ; var b = Math . random ( ) * Math . PI * 2 , d = Math . random ( ) ; return a . x = Math . sqrt ( d ) * Math . cos ( b ) , a . y = Math . sqrt ( d ) * Math . sin ( b ) , a . x = this . x + a . x * this . width / 2 , a . y = this . y + a . y * this . height / 2 , a } , toString : function ( ) { return "[{Phaser.Ellipse (x=" + this . x + " y=" + this . y + " width=" + this . width + " height=" + this . height + ")}]" } } , c . Ellipse . prototype . constructor = c . Ellipse , Object . defineProperty ( c . Ellipse . prototype , "left" , { get : function ( ) { return this . x } , set : function ( a ) { this . x = a } } ) , Object . defineProperty ( c . Ellipse . prototype , "right" , { get : function ( ) { return this . x + this . width } , set : function ( a ) { a < this . x ? this . width = 0 : this . width = a - this . x } } ) , Object . defineProperty ( c . Ellipse . prototype , "top" , { get : function ( ) { return this . y } , set : function ( a ) { this . y = a } } ) , Object . defineProperty ( c . Ellipse . prototype , "bottom" , { get : function ( ) { return this . y + this . height } , set : function ( a ) { a < this . y ? this . height = 0 : this . height = a - this . y } } ) , Object . defineProperty ( c . Ellipse . prototype , "empty" , { get : function ( ) { return 0 === this . width || 0 === this . height } , set : function ( a ) { a === ! 0 && this . setTo ( 0 , 0 , 0 , 0 ) } } ) , c . Ellipse . contains = function ( a , b , c ) { if ( a . width <= 0 || a . height <= 0 ) return ! 1 ; var d = ( b - a . x ) / a . width - . 5 , e = ( c - a . y ) / a . height - . 5 ; return d *= d , e *= e , . 25 > d + e } , PIXI . Ellipse = c . Ellipse , c . Line = function ( a , b , d , e ) { a = a || 0 , b = b || 0 , d = d || 0 , e = e || 0 , this . start = new c . Point ( a , b ) , this . end = new c . Point ( d , e ) , this . type = c . LINE } , c . Line . prototype = { setTo : function ( a , b , c , d ) { return this . start . setTo ( a , b ) , this . end . setTo ( c , d ) , this } , fromSprite : function ( a , b , c ) { return void 0 === c && ( c = ! 1 ) , c ? this . setTo ( a . center . x , a . center . y , b . center . x , b . center . y ) : this . setTo ( a . x , a . y , b . x , b . y ) } , fromAngle : function ( a , b , c , d ) { return this . start . setTo ( a , b ) , this . end . setTo ( a + Math . cos ( c ) * d , b + Math . sin ( c ) * d ) , this } , rotate : function ( a , b ) { var c = ( this . start . x + this . end . x ) / 2 , d = ( this . start . y + this . end . y ) / 2 ; return this . start . rotate ( c , d , a , b ) , this . end . rotate ( c , d , a , b ) , this } , rotateAround : function ( a , b , c , d ) { return this . start . rotate ( a , b , c , d ) , this . end . rotate ( a , b , c , d ) , this } , intersects : function ( a , b , d ) { return c . Line . intersectsPoints ( this . start , this . end , a . start , a . end , b , d ) } , reflect : function ( a ) { return c . Line . reflect ( this , a ) } , midPoint : function ( a ) { return void 0 === a && ( a = new c . Point ) , a . x = ( this . start . x + this . end . x ) / 2 , a . y = ( this . start . y + this . end . y ) / 2 , a } , centerOn : function ( a , b ) { var c = ( this . start . x + this . end . x ) / 2 , d = ( this . start . y + this . end . y ) / 2 , e = a - c , f = b - d ; this . start . add ( e , f ) , this . end . add ( e , f ) } , pointOnLine : function ( a , b ) { return ( a - this . start . x ) * ( this . end . y - this . start . y ) === ( this . end . x - this . start . x ) * ( b - this . start . y ) } , pointOnSegment : function ( a , b ) { var c = Math . min ( this . start . x , this . end . x ) , d = Math . max ( this . start . x , this . end . x ) , e = Math . min ( this . start . y , this . end . y ) , f = Math . max ( this . start . y , this . end . y ) ; return this . pointOnLine ( a , b ) && a >= c && d >= a && b >= e && f >= b } , random : function ( a ) { void 0 === a && ( a = new c . Point ) ; var b = Math . r
2016-06-10 15:22:54 +00:00
this . current === a && ( this . callbackContext = null , this . onInitCallback = null , this . onShutDownCallback = null , this . onPreloadCallback = null , this . onLoadRenderCallback = null , this . onLoadUpdateCallback = null , this . onCreateCallback = null , this . onUpdateCallback = null , this . onPreRenderCallback = null , this . onRenderCallback = null , this . onResizeCallback = null , this . onPausedCallback = null , this . onResumedCallback = null , this . onPauseUpdateCallback = null ) , delete this . states [ a ] } , start : function ( a , b , c ) { void 0 === b && ( b = ! 0 ) , void 0 === c && ( c = ! 1 ) , this . checkState ( a ) && ( this . _pendingState = a , this . _clearWorld = b , this . _clearCache = c , arguments . length > 3 && ( this . _args = Array . prototype . splice . call ( arguments , 3 ) ) ) } , restart : function ( a , b ) { void 0 === a && ( a = ! 0 ) , void 0 === b && ( b = ! 1 ) , this . _pendingState = this . current , this . _clearWorld = a , this . _clearCache = b , arguments . length > 2 && ( this . _args = Array . prototype . slice . call ( arguments , 2 ) ) } , dummy : function ( ) { } , preUpdate : function ( ) { if ( this . _pendingState && this . game . isBooted ) { var a = this . current ; if ( this . clearCurrentState ( ) , this . setCurrentState ( this . _pendingState ) , this . onStateChange . dispatch ( this . current , a ) , this . current !== this . _pendingState ) return ; this . _pendingState = null , this . onPreloadCallback ? ( this . game . load . reset ( ! 0 ) , this . onPreloadCallback . call ( this . callbackContext , this . game ) , 0 === this . game . load . totalQueuedFiles ( ) && 0 === this . game . load . totalQueuedPacks ( ) ? this . loadComplete ( ) : this . game . load . start ( ) ) : this . loadComplete ( ) } } , clearCurrentState : function ( ) { this . current && ( this . onShutDownCallback && this . onShutDownCallback . call ( this . callbackContext , this . game ) , this . game . tweens . removeAll ( ) , this . game . camera . reset ( ) , this . game . input . reset ( ! 0 ) , this . game . physics . clear ( ) , this . game . time . removeAll ( ) , this . game . scale . reset ( this . _clearWorld ) , this . game . debug && this . game . debug . reset ( ) , this . _clearWorld && ( this . game . world . shutdown ( ) , this . _clearCache && this . game . cache . destroy ( ) ) ) } , checkState : function ( a ) { return this . states [ a ] ? this . states [ a ] . preload || this . states [ a ] . create || this . states [ a ] . update || this . states [ a ] . render ? ! 0 : ( console . warn ( "Invalid Phaser State object given. Must contain at least a one of the required functions: preload, create, update or render" ) , ! 1 ) : ( console . warn ( "Phaser.StateManager - No state found with the key: " + a ) , ! 1 ) } , link : function ( a ) { this . states [ a ] . game = this . game , this . states [ a ] . add = this . game . add , this . states [ a ] . make = this . game . make , this . states [ a ] . camera = this . game . camera , this . states [ a ] . cache = this . game . cache , this . states [ a ] . input = this . game . input , this . states [ a ] . load = this . game . load , this . states [ a ] . math = this . game . math , this . states [ a ] . sound = this . game . sound , this . states [ a ] . scale = this . game . scale , this . states [ a ] . state = this , this . states [ a ] . stage = this . game . stage , this . states [ a ] . time = this . game . time , this . states [ a ] . tweens = this . game . tweens , this . states [ a ] . world = this . game . world , this . states [ a ] . particles = this . game . particles , this . states [ a ] . rnd = this . game . rnd , this . states [ a ] . physics = this . game . physics , this . states [ a ] . key = a } , unlink : function ( a ) { this . states [ a ] && ( this . states [ a ] . game = null , this . states [ a ] . add = null , this . states [ a ] . make = null , this . states [ a ] . camera = null , this . states [ a ] . cache = null , this . states [ a ] . input = null , this . states [ a ] . load = null , this . states [ a ] . math = null , this . states [ a ] . sound = null , this . states [ a ] . scale = null , this . states [ a ] . state = null , this . states [ a ] . stage = null , this . states [ a ] . time = null , this . states [ a ] . tweens = null , this . states [ a ] . world = null , this . states [ a ] . particles = null , this . states [ a ] . rnd = null , this . states [ a ] . physics = null ) } , setCurrentState : function ( a ) { this . callbackContext = this . states [ a ] , this . link ( a ) , this . onInitCallback = this . states [ a ] . init || this . dummy , this . onPreloadCallback = this . states [ a ] . preload || null , this . onLoadRenderCallback = this . states [ a ] . loadRender || null , this . onLoadUpdateCallback = this . states [ a ] . loadUpdate || null , this . onCreateCallback = this . states [ a ] . create || null , this . onUpdateCallback = this . states [ a ] . update || null , this . onPreRenderCallback = this . states [ a ] . preRender || null , this . onRenderCallback = this . states [ a ] . render || null , this . onResizeCallback = this . states [ a ] . resize || null , this . onPausedCallback = this . states [ a ] . paused || null , this . onResumedCallback = this . states [ a ] . resumed || null , this . onPauseUpdateCallback = this . states [ a ] . pauseUpdate || null ,
void 0 === d && ( d = ! 1 ) , 0 !== this . children . length ) { if ( a > b || 0 > a || b > this . children . length ) return ! 1 ; for ( var e = b ; e >= a ; ) { ! d && this . children [ e ] . events && this . children [ e ] . events . onRemovedFromGroup$dispatch ( this . children [ e ] , this ) ; var f = this . removeChild ( this . children [ e ] ) ; this . removeFromHash ( f ) , c && f && f . destroy ( ! 0 ) , this . cursor === this . children [ e ] && ( this . cursor = null ) , e -- } this . updateZ ( ) } } , c . Group . prototype . destroy = function ( a , b ) { null === this . game || this . ignoreDestroy || ( void 0 === a && ( a = ! 0 ) , void 0 === b && ( b = ! 1 ) , this . onDestroy . dispatch ( this , a , b ) , this . removeAll ( a ) , this . cursor = null , this . filters = null , this . pendingDestroy = ! 1 , b || ( this . parent && this . parent . removeChild ( this ) , this . game = null , this . exists = ! 1 ) ) } , Object . defineProperty ( c . Group . prototype , "total" , { get : function ( ) { return this . iterate ( "exists" , ! 0 , c . Group . RETURN _TOTAL ) } } ) , Object . defineProperty ( c . Group . prototype , "length" , { get : function ( ) { return this . children . length } } ) , Object . defineProperty ( c . Group . prototype , "angle" , { get : function ( ) { return c . Math . radToDeg ( this . rotation ) } , set : function ( a ) { this . rotation = c . Math . degToRad ( a ) } } ) , c . World = function ( a ) { c . Group . call ( this , a , null , "__world" , ! 1 ) , this . bounds = new c . Rectangle ( 0 , 0 , a . width , a . height ) , this . camera = null , this . _definedSize = ! 1 , this . _width = a . width , this . _height = a . height , this . game . state . onStateChange . add ( this . stateChange , this ) } , c . World . prototype = Object . create ( c . Group . prototype ) , c . World . prototype . constructor = c . World , c . World . prototype . boot = function ( ) { this . camera = new c . Camera ( this . game , 0 , 0 , 0 , this . game . width , this . game . height ) , this . game . stage . addChild ( this ) , this . camera . boot ( ) } , c . World . prototype . stateChange = function ( ) { this . x = 0 , this . y = 0 , this . camera . reset ( ) } , c . World . prototype . setBounds = function ( a , b , c , d ) { this . _definedSize = ! 0 , this . _width = c , this . _height = d , this . bounds . setTo ( a , b , c , d ) , this . x = a , this . y = b , this . camera . bounds && this . camera . bounds . setTo ( a , b , Math . max ( c , this . game . width ) , Math . max ( d , this . game . height ) ) , this . game . physics . setBoundsToWorld ( ) } , c . World . prototype . resize = function ( a , b ) { this . _definedSize && ( a < this . _width && ( a = this . _width ) , b < this . _height && ( b = this . _height ) ) , this . bounds . width = a , this . bounds . height = b , this . game . camera . setBoundsToWorld ( ) , this . game . physics . setBoundsToWorld ( ) } , c . World . prototype . shutdown = function ( ) { this . destroy ( ! 0 , ! 0 ) } , c . World . prototype . wrap = function ( a , b , c , d , e ) { void 0 === b && ( b = 0 ) , void 0 === c && ( c = ! 1 ) , void 0 === d && ( d = ! 0 ) , void 0 === e && ( e = ! 0 ) , c ? ( a . getBounds ( ) , d && ( a . x + a . _currentBounds . width < this . bounds . x ? a . x = this . bounds . right : a . x > this . bounds . right && ( a . x = this . bounds . left ) ) , e && ( a . y + a . _currentBounds . height < this . bounds . top ? a . y = this . bounds . bottom : a . y > this . bounds . bottom && ( a . y = this . bounds . top ) ) ) : ( d && a . x + b < this . bounds . x ? a . x = this . bounds . right + b : d && a . x - b > this . bounds . right && ( a . x = this . bounds . left - b ) , e && a . y + b < this . bounds . top ? a . y = this . bounds . bottom + b : e && a . y - b > this . bounds . bottom && ( a . y = this . bounds . top - b ) ) } , Object . defineProperty ( c . World . prototype , "width" , { get : function ( ) { return this . bounds . width } , set : function ( a ) { a < this . game . width && ( a = this . game . width ) , this . bounds . width = a , this . _width = a , this . _definedSize = ! 0 } } ) , Object . defineProperty ( c . World . prototype , "height" , { get : function ( ) { return this . bounds . height } , set : function ( a ) { a < this . game . height && ( a = this . game . height ) , this . bounds . height = a , this . _height = a , this . _definedSize = ! 0 } } ) , Object . defineProperty ( c . World . prototype , "centerX" , { get : function ( ) { return this . bounds . halfWidth + this . bounds . x } } ) , Object . defineProperty ( c . World . prototype , "centerY" , { get : function ( ) { return this . bounds . halfHeight + this . bounds . y } } ) , Object . defineProperty ( c . World . prototype , "randomX" , { get : function ( ) { return this . bounds . x < 0 ? this . game . rnd . between ( this . bounds . x , this . bounds . width - Math . abs ( this . bounds . x ) ) : this . game . rnd . between ( this . bounds . x , this . bounds . width ) } } ) , Object . defineProperty ( c . World . prototype , "randomY" , { get : function ( ) { return this . bounds . y < 0 ? this . game . rnd . between ( this . bounds . y , this . bounds . height - Math . abs ( this . bounds . y ) ) : this . game . rnd . between ( this . bounds . y , this . bounds . height ) } } ) , c . Game = function ( a , b , d , e , f , g , h , i ) { return this . id = c . GAMES . push ( this ) - 1 , this . config = null , this . physicsConfig = i , this . parent = "" , this . width = 800 , this . height = 600 , this . resolution = 1 , this . _width = 800 , this . _height = 600 , this . transparent = !
a . removeEventListener ( "MSPointerOut" , this . _onMSPointerOut , ! 0 ) , window . removeEventListener ( "pointerup" , this . _onMSPointerUpGlobal , ! 0 ) , a . removeEventListener ( "pointerover" , this . _onMSPointerOver , ! 0 ) , a . removeEventListener ( "pointerout" , this . _onMSPointerOut , ! 0 ) } } , c . MSPointer . prototype . constructor = c . MSPointer , c . DeviceButton = function ( a , b ) { this . parent = a , this . game = a . game , this . event = null , this . isDown = ! 1 , this . isUp = ! 0 , this . timeDown = 0 , this . timeUp = 0 , this . repeats = 0 , this . altKey = ! 1 , this . shiftKey = ! 1 , this . ctrlKey = ! 1 , this . value = 0 , this . buttonCode = b , this . onDown = new c . Signal , this . onUp = new c . Signal , this . onFloat = new c . Signal } , c . DeviceButton . prototype = { start : function ( a , b ) { this . isDown || ( this . isDown = ! 0 , this . isUp = ! 1 , this . timeDown = this . game . time . time , this . repeats = 0 , this . event = a , this . value = b , a && ( this . altKey = a . altKey , this . shiftKey = a . shiftKey , this . ctrlKey = a . ctrlKey ) , this . onDown . dispatch ( this , b ) ) } , stop : function ( a , b ) { this . isUp || ( this . isDown = ! 1 , this . isUp = ! 0 , this . timeUp = this . game . time . time , this . event = a , this . value = b , a && ( this . altKey = a . altKey , this . shiftKey = a . shiftKey , this . ctrlKey = a . ctrlKey ) , this . onUp . dispatch ( this , b ) ) } , padFloat : function ( a ) { this . value = a , this . onFloat . dispatch ( this , a ) } , justPressed : function ( a ) { return a = a || 250 , this . isDown && this . timeDown + a > this . game . time . time } , justReleased : function ( a ) { return a = a || 250 , this . isUp && this . timeUp + a > this . game . time . time } , reset : function ( ) { this . isDown = ! 1 , this . isUp = ! 0 , this . timeDown = this . game . time . time , this . repeats = 0 , this . altKey = ! 1 , this . shiftKey = ! 1 , this . ctrlKey = ! 1 } , destroy : function ( ) { this . onDown . dispose ( ) , this . onUp . dispose ( ) , this . onFloat . dispose ( ) , this . parent = null , this . game = null } } , c . DeviceButton . prototype . constructor = c . DeviceButton , Object . defineProperty ( c . DeviceButton . prototype , "duration" , { get : function ( ) { return this . isUp ? - 1 : this . game . time . time - this . timeDown } } ) , c . Pointer = function ( a , b , d ) { this . game = a , this . id = b , this . type = c . POINTER , this . exists = ! 0 , this . identifier = 0 , this . pointerId = null , this . pointerMode = d || c . PointerMode . CURSOR | c . PointerMode . CONTACT , this . target = null , this . button = null , this . leftButton = new c . DeviceButton ( this , c . Pointer . LEFT _BUTTON ) , this . middleButton = new c . DeviceButton ( this , c . Pointer . MIDDLE _BUTTON ) , this . rightButton = new c . DeviceButton ( this , c . Pointer . RIGHT _BUTTON ) , this . backButton = new c . DeviceButton ( this , c . Pointer . BACK _BUTTON ) , this . forwardButton = new c . DeviceButton ( this , c . Pointer . FORWARD _BUTTON ) , this . eraserButton = new c . DeviceButton ( this , c . Pointer . ERASER _BUTTON ) , this . _holdSent = ! 1 , this . _history = [ ] , this . _nextDrop = 0 , this . _stateReset = ! 1 , this . withinGame = ! 1 , this . clientX = - 1 , this . clientY = - 1 , this . pageX = - 1 , this . pageY = - 1 , this . screenX = - 1 , this . screenY = - 1 , this . rawMovementX = 0 , this . rawMovementY = 0 , this . movementX = 0 , this . movementY = 0 , this . x = - 1 , this . y = - 1 , this . isMouse = 0 === b , this . isDown = ! 1 , this . isUp = ! 0 , this . timeDown = 0 , this . timeUp = 0 , this . previousTapTime = 0 , this . totalTouches = 0 , this . msSinceLastClick = Number . MAX _VALUE , this . targetObject = null , this . interactiveCandidates = [ ] , this . active = ! 1 , this . dirty = ! 1 , this . position = new c . Point , this . positionDown = new c . Point , this . positionUp = new c . Point , this . circle = new c . Circle ( 0 , 0 , 44 ) , this . _clickTrampolines = null , this . _trampolineTargetObject = null } , c . Pointer . NO _BUTTON = 0 , c . Pointer . LEFT _BUTTON = 1 , c . Pointer . RIGHT _BUTTON = 2 , c . Pointer . MIDDLE _BUTTON = 4 , c . Pointer . BACK _BUTTON = 8 , c . Pointer . FORWARD _BUTTON = 16 , c . Pointer . ERASER _BUTTON = 32 , c . Pointer . prototype = { resetButtons : function ( ) { this . isDown = ! 1 , this . isUp = ! 0 , this . isMouse && ( this . leftButton . reset ( ) , this . middleButton . reset ( ) , this . rightButton . reset ( ) , this . backButton . reset ( ) , this . forwardButton . reset ( ) , this . eraserButton . reset ( ) ) } , processButtonsDown : function ( a , b ) { c . Pointer . LEFT _BUTTON & a && this . leftButton . start ( b ) , c . Pointer . RIGHT _BUTTON & a && this . rightButton . start ( b ) , c . Pointer . MIDDLE _BUTTON & a && this . middleButton . start ( b ) , c . Pointer . BACK _BUTTON & a && this . backButton . start ( b ) , c . Pointer . FORWARD _BUTTON & a && this . forwardButton . start ( b ) , c . Pointer . ERASER _BUTTON & a && this . eraserButton . start ( b ) } , processButtonsUp : function ( a , b ) { a === c . Mouse . LEFT _BUTTON && this . leftButton . stop ( b ) , a === c . Mouse . RIGHT _BUTTON && this . rightButton . stop ( b ) , a === c . Mouse . MIDDLE _BUTTON && this . middleButton . stop ( b ) , a === c . Mouse . BACK _BUTTON && this . backButton . stop ( b ) , a === c .
} } , c . InputHandler . prototype . constructor = c . InputHandler , c . Gamepad = function ( a ) { this . game = a , this . _gamepadIndexMap = { } , this . _rawPads = [ ] , this . _active = ! 1 , this . enabled = ! 0 , this . _gamepadSupportAvailable = ! ! navigator . webkitGetGamepads || ! ! navigator . webkitGamepads || - 1 != navigator . userAgent . indexOf ( "Firefox/" ) || ! ! navigator . getGamepads , this . _prevRawGamepadTypes = [ ] , this . _prevTimestamps = [ ] , this . callbackContext = this , this . onConnectCallback = null , this . onDisconnectCallback = null , this . onDownCallback = null , this . onUpCallback = null , this . onAxisCallback = null , this . onFloatCallback = null , this . _ongamepadconnected = null , this . _gamepaddisconnected = null , this . _gamepads = [ new c . SinglePad ( a , this ) , new c . SinglePad ( a , this ) , new c . SinglePad ( a , this ) , new c . SinglePad ( a , this ) ] } , c . Gamepad . prototype = { addCallbacks : function ( a , b ) { "undefined" != typeof b && ( this . onConnectCallback = "function" == typeof b . onConnect ? b . onConnect : this . onConnectCallback , this . onDisconnectCallback = "function" == typeof b . onDisconnect ? b . onDisconnect : this . onDisconnectCallback , this . onDownCallback = "function" == typeof b . onDown ? b . onDown : this . onDownCallback , this . onUpCallback = "function" == typeof b . onUp ? b . onUp : this . onUpCallback , this . onAxisCallback = "function" == typeof b . onAxis ? b . onAxis : this . onAxisCallback , this . onFloatCallback = "function" == typeof b . onFloat ? b . onFloat : this . onFloatCallback , this . callbackContext = a ) } , start : function ( ) { if ( ! this . _active ) { this . _active = ! 0 ; var a = this ; this . _onGamepadConnected = function ( b ) { return a . onGamepadConnected ( b ) } , this . _onGamepadDisconnected = function ( b ) { return a . onGamepadDisconnected ( b ) } , window . addEventListener ( "gamepadconnected" , this . _onGamepadConnected , ! 1 ) , window . addEventListener ( "gamepaddisconnected" , this . _onGamepadDisconnected , ! 1 ) } } , onGamepadConnected : function ( a ) { var b = a . gamepad ; this . _rawPads . push ( b ) , this . _gamepads [ b . index ] . connect ( b ) } , onGamepadDisconnected : function ( a ) { var b = a . gamepad ; for ( var c in this . _rawPads ) this . _rawPads [ c ] . index === b . index && this . _rawPads . splice ( c , 1 ) ; this . _gamepads [ b . index ] . disconnect ( ) } , update : function ( ) { this . _pollGamepads ( ) , this . pad1 . pollStatus ( ) , this . pad2 . pollStatus ( ) , this . pad3 . pollStatus ( ) , this . pad4 . pollStatus ( ) } , _pollGamepads : function ( ) { if ( this . _active ) { if ( navigator . getGamepads ) var a = navigator . getGamepads ( ) ; else if ( navigator . webkitGetGamepads ) var a = navigator . webkitGetGamepads ( ) ; else if ( navigator . webkitGamepads ) var a = navigator . webkitGamepads ( ) ; if ( a ) { this . _rawPads = [ ] ; for ( var b = ! 1 , c = 0 ; c < a . length && ( typeof a [ c ] !== this . _prevRawGamepadTypes [ c ] && ( b = ! 0 , this . _prevRawGamepadTypes [ c ] = typeof a [ c ] ) , a [ c ] && this . _rawPads . push ( a [ c ] ) , 3 !== c ) ; c ++ ) ; for ( var d = 0 ; d < this . _gamepads . length ; d ++ ) this . _gamepads [ d ] . _rawPad = this . _rawPads [ d ] ; if ( b ) { for ( var e , f = { rawIndices : { } , padIndices : { } } , g = 0 ; g < this . _gamepads . length ; g ++ ) if ( e = this . _gamepads [ g ] , e . connected ) for ( var h = 0 ; h < this . _rawPads . length ; h ++ ) this . _rawPads [ h ] . index === e . index && ( f . rawIndices [ e . index ] = ! 0 , f . padIndices [ g ] = ! 0 ) ; for ( var i = 0 ; i < this . _gamepads . length ; i ++ ) if ( e = this . _gamepads [ i ] , ! f . padIndices [ i ] ) { this . _rawPads . length < 1 && e . disconnect ( ) ; for ( var j = 0 ; j < this . _rawPads . length && ! f . padIndices [ i ] ; j ++ ) { var k = this . _rawPads [ j ] ; if ( k ) { if ( f . rawIndices [ k . index ] ) { e . disconnect ( ) ; continue } e . connect ( k ) , f . rawIndices [ k . index ] = ! 0 , f . padIndices [ i ] = ! 0 } else e . disconnect ( ) } } } } } } , setDeadZones : function ( a ) { for ( var b = 0 ; b < this . _gamepads . length ; b ++ ) this . _gamepads [ b ] . deadZone = a } , stop : function ( ) { this . _active = ! 1 , window . removeEventListener ( "gamepadconnected" , this . _onGamepadConnected ) , window . removeEventListener ( "gamepaddisconnected" , this . _onGamepadDisconnected ) } , reset : function ( ) { this . update ( ) ; for ( var a = 0 ; a < this . _gamepads . length ; a ++ ) this . _gamepads [ a ] . reset ( ) } , justPressed : function ( a , b ) { for ( var c = 0 ; c < this . _gamepads . length ; c ++ ) if ( this . _gamepads [ c ] . justPressed ( a , b ) === ! 0 ) return ! 0 ; return ! 1 } , justReleased : function ( a , b ) { for ( var c = 0 ; c < this . _gamepads . length ; c ++ ) if ( this . _gamepads [ c ] . justReleased ( a , b ) === ! 0 ) return ! 0 ; return ! 1 } , isDown : function ( a ) { for ( var b = 0 ; b < this . _gamepads . length ; b ++ ) if ( this . _gamepads [ b ] . isDown ( a ) === ! 0 ) return ! 0 ; return ! 1 } , destroy : function ( ) { this . stop ( ) ; for ( var a = 0 ; a < this . _gamepads . length ; a ++ ) this . _gamepads [ a ] . destroy ( ) } } , c . Gamepad . prototype . constructor = c . Gamepad , Object . defineProperty ( c . Gamepa
this . worldTransform . tx = this . world . x , this . worldTransform . ty = this . world . y , this . previousPosition . set ( this . world . x , this . world . y ) , this . previousRotation = this . rotation , this . body && this . body . preUpdate ( ) , this . fresh = ! 1 , ! 1 ) : ( this . previousPosition . set ( this . world . x , this . world . y ) , this . previousRotation = this . rotation , this . _exists && this . parent . exists ? ! 0 : ( this . renderOrderID = - 1 , ! 1 ) ) } , c . Component . PhysicsBody . postUpdate = function ( ) { this . exists && this . body && this . body . postUpdate ( ) } , c . Component . PhysicsBody . prototype = { body : null , x : { get : function ( ) { return this . position . x } , set : function ( a ) { this . position . x = a , this . body && ! this . body . dirty && ( this . body . _reset = ! 0 ) } } , y : { get : function ( ) { return this . position . y } , set : function ( a ) { this . position . y = a , this . body && ! this . body . dirty && ( this . body . _reset = ! 0 ) } } } , c . Component . Reset = function ( ) { } , c . Component . Reset . prototype . reset = function ( a , b , c ) { return void 0 === c && ( c = 1 ) , this . world . set ( a , b ) , this . position . set ( a , b ) , this . fresh = ! 0 , this . exists = ! 0 , this . visible = ! 0 , this . renderable = ! 0 , this . components . InWorld && ( this . _outOfBoundsFired = ! 1 ) , this . components . LifeSpan && ( this . alive = ! 0 , this . health = c ) , this . components . PhysicsBody && this . body && this . body . reset ( a , b , ! 1 , ! 1 ) , this } , c . Component . ScaleMinMax = function ( ) { } , c . Component . ScaleMinMax . prototype = { transformCallback : null , transformCallbackContext : this , scaleMin : null , scaleMax : null , checkTransform : function ( a ) { this . scaleMin && ( a . a < this . scaleMin . x && ( a . a = this . scaleMin . x ) , a . d < this . scaleMin . y && ( a . d = this . scaleMin . y ) ) , this . scaleMax && ( a . a > this . scaleMax . x && ( a . a = this . scaleMax . x ) , a . d > this . scaleMax . y && ( a . d = this . scaleMax . y ) ) } , setScaleMinMax : function ( a , b , d , e ) { void 0 === b ? b = d = e = a : void 0 === d && ( d = e = b , b = a ) , null === a ? this . scaleMin = null : this . scaleMin ? this . scaleMin . set ( a , b ) : this . scaleMin = new c . Point ( a , b ) , null === d ? this . scaleMax = null : this . scaleMax ? this . scaleMax . set ( d , e ) : this . scaleMax = new c . Point ( d , e ) , null === this . scaleMin ? this . transformCallback = null : ( this . transformCallback = this . checkTransform , this . transformCallbackContext = this ) } } , c . Component . Smoothed = function ( ) { } , c . Component . Smoothed . prototype = { smoothed : { get : function ( ) { return ! this . texture . baseTexture . scaleMode } , set : function ( a ) { a ? this . texture && ( this . texture . baseTexture . scaleMode = 0 ) : this . texture && ( this . texture . baseTexture . scaleMode = 1 ) } } } , c . GameObjectFactory = function ( a ) { this . game = a , this . world = this . game . world } , c . GameObjectFactory . prototype = { existing : function ( a ) { return this . world . add ( a ) } , weapon : function ( a , b , d , e ) { var f = this . game . plugins . add ( c . Weapon ) ; return f . createBullets ( a , b , d , e ) , f } , image : function ( a , b , d , e , f ) { return void 0 === f && ( f = this . world ) , f . add ( new c . Image ( this . game , a , b , d , e ) ) } , sprite : function ( a , b , c , d , e ) { return void 0 === e && ( e = this . world ) , e . create ( a , b , c , d ) } , creature : function ( a , b , d , e , f ) { void 0 === f && ( f = this . world ) ; var g = new c . Creature ( this . game , a , b , d , e ) ; return f . add ( g ) , g } , tween : function ( a ) { return this . game . tweens . create ( a ) } , group : function ( a , b , d , e , f ) { return new c . Group ( this . game , a , b , d , e , f ) } , physicsGroup : function ( a , b , d , e ) { return new c . Group ( this . game , b , d , e , ! 0 , a ) } , spriteBatch : function ( a , b , d ) { return void 0 === a && ( a = null ) , void 0 === b && ( b = "group" ) , void 0 === d && ( d = ! 1 ) , new c . SpriteBatch ( this . game , a , b , d ) } , audio : function ( a , b , c , d ) { return this . game . sound . add ( a , b , c , d ) } , sound : function ( a , b , c , d ) { return this . game . sound . add ( a , b , c , d ) } , audioSprite : function ( a ) { return this . game . sound . addSprite ( a ) } , tileSprite : function ( a , b , d , e , f , g , h ) { return void 0 === h && ( h = this . world ) , h . add ( new c . TileSprite ( this . game , a , b , d , e , f , g ) ) } , rope : function ( a , b , d , e , f , g ) { return void 0 === g && ( g = this . world ) , g . add ( new c . Rope ( this . game , a , b , d , e , f ) ) } , text : function ( a , b , d , e , f ) { return void 0 === f && ( f = this . world ) , f . add ( new c . Text ( this . game , a , b , d , e ) ) } , button : function ( a , b , d , e , f , g , h , i , j , k ) { return void 0 === k && ( k = this . world ) , k . add ( new c . Button ( this . game , a , b , d , e , f , g , h , i , j ) ) } , graphics : function ( a , b , d ) { return void 0 === d && ( d = this . world ) , d . add ( new c . Graphics ( this . game , a , b ) ) } , emitter : function ( a , b , d ) { return this . game . particles . add ( new c . Particles . Arcade . Emitter ( this . game , a , b , d ) ) } , retroFont : function ( a , b , d , e , f , g , h , i , j ) { return new c . RetroFont ( this . game , a , b , d , e , f , g , h , i , j ) } , bitmapText : function ( a , b , d , e , f , g ) { return void 0 === g && ( g = this . world ) , g . add ( new c . BitmapText ( this . game , a , b , d ,
return this . drawShape ( new PIXI . RoundedRectangle ( a , b , c , d , e ) ) , this } , PIXI . Graphics . prototype . drawCircle = function ( a , b , c ) { return this . drawShape ( new PIXI . Circle ( a , b , c ) ) , this } , PIXI . Graphics . prototype . drawEllipse = function ( a , b , c , d ) { return this . drawShape ( new PIXI . Ellipse ( a , b , c , d ) ) , this } , PIXI . Graphics . prototype . drawPolygon = function ( a ) { ( a instanceof c . Polygon || a instanceof PIXI . Polygon ) && ( a = a . points ) ; var b = a ; if ( ! Array . isArray ( b ) ) { b = new Array ( arguments . length ) ; for ( var d = 0 ; d < b . length ; ++ d ) b [ d ] = arguments [ d ] } return this . drawShape ( new c . Polygon ( b ) ) , this } , PIXI . Graphics . prototype . clear = function ( ) { return this . lineWidth = 0 , this . filling = ! 1 , this . dirty = ! 0 , this . clearDirty = ! 0 , this . graphicsData = [ ] , this } , PIXI . Graphics . prototype . generateTexture = function ( a , b , c ) { void 0 === a && ( a = 1 ) , void 0 === b && ( b = PIXI . scaleModes . DEFAULT ) , void 0 === c && ( c = 0 ) ; var d = this . getBounds ( ) ; d . width += c , d . height += c ; var e = new PIXI . CanvasBuffer ( d . width * a , d . height * a ) , f = PIXI . Texture . fromCanvas ( e . canvas , b ) ; return f . baseTexture . resolution = a , e . context . scale ( a , a ) , e . context . translate ( - d . x , - d . y ) , PIXI . CanvasGraphics . renderGraphics ( this , e . context ) , f } , PIXI . Graphics . prototype . _renderWebGL = function ( a ) { if ( this . visible !== ! 1 && 0 !== this . alpha && this . isMask !== ! 0 ) { if ( this . _cacheAsBitmap ) return ( this . dirty || this . cachedSpriteDirty ) && ( this . _generateCachedSprite ( ) , this . updateCachedSpriteTexture ( ) , this . cachedSpriteDirty = ! 1 , this . dirty = ! 1 ) , this . _cachedSprite . worldAlpha = this . worldAlpha , void PIXI . Sprite . prototype . _renderWebGL . call ( this . _cachedSprite , a ) ; if ( a . spriteBatch . stop ( ) , a . blendModeManager . setBlendMode ( this . blendMode ) , this . _mask && a . maskManager . pushMask ( this . _mask , a ) , this . _filters && a . filterManager . pushFilter ( this . _filterBlock ) , this . blendMode !== a . spriteBatch . currentBlendMode ) { a . spriteBatch . currentBlendMode = this . blendMode ; var b = PIXI . blendModesWebGL [ a . spriteBatch . currentBlendMode ] ; a . spriteBatch . gl . blendFunc ( b [ 0 ] , b [ 1 ] ) } if ( this . webGLDirty && ( this . dirty = ! 0 , this . webGLDirty = ! 1 ) , PIXI . WebGLGraphics . renderGraphics ( this , a ) , this . children . length ) { a . spriteBatch . start ( ) ; for ( var c = 0 ; c < this . children . length ; c ++ ) this . children [ c ] . _renderWebGL ( a ) ; a . spriteBatch . stop ( ) } this . _filters && a . filterManager . popFilter ( ) , this . _mask && a . maskManager . popMask ( this . mask , a ) , a . drawCount ++ , a . spriteBatch . start ( ) } } , PIXI . Graphics . prototype . _renderCanvas = function ( a ) { if ( this . visible !== ! 1 && 0 !== this . alpha && this . isMask !== ! 0 ) { if ( this . _prevTint !== this . tint && ( this . dirty = ! 0 , this . _prevTint = this . tint ) , this . _cacheAsBitmap ) return ( this . dirty || this . cachedSpriteDirty ) && ( this . _generateCachedSprite ( ) , this . updateCachedSpriteTexture ( ) , this . cachedSpriteDirty = ! 1 , this . dirty = ! 1 ) , this . _cachedSprite . alpha = this . alpha , void PIXI . Sprite . prototype . _renderCanvas . call ( this . _cachedSprite , a ) ; var b = a . context , c = this . worldTransform ; this . blendMode !== a . currentBlendMode && ( a . currentBlendMode = this . blendMode , b . globalCompositeOperation = PIXI . blendModesCanvas [ a . currentBlendMode ] ) , this . _mask && a . maskManager . pushMask ( this . _mask , a ) ; var d = a . resolution , e = c . tx * a . resolution + a . shakeX , f = c . ty * a . resolution + a . shakeY ; b . setTransform ( c . a * d , c . b * d , c . c * d , c . d * d , e , f ) , PIXI . CanvasGraphics . renderGraphics ( this , b ) ; for ( var g = 0 ; g < this . children . length ; g ++ ) this . children [ g ] . _renderCanvas ( a ) ; this . _mask && a . maskManager . popMask ( a ) } } , PIXI . Graphics . prototype . getBounds = function ( a ) { if ( ! this . _currentBounds ) { if ( ! this . renderable ) return PIXI . EmptyRectangle ; this . dirty && ( this . updateLocalBounds ( ) , this . webGLDirty = ! 0 , this . cachedSpriteDirty = ! 0 , this . dirty = ! 1 ) ; var b = this . _localBounds , c = b . x , d = b . width + b . x , e = b . y , f = b . height + b . y , g = a || this . worldTransform , h = g . a , i = g . b , j = g . c , k = g . d , l = g . tx , m = g . ty , n = h * d + j * f + l , o = k * f + i * d + m , p = h * c + j * f + l , q = k * f + i * c + m , r = h * c + j * e + l , s = k * e + i * c + m , t = h * d + j * e + l , u = k * e + i * d + m , v = n , w = o , x = n , y = o ; x = x > p ? p : x , x = x > r ? r : x , x = x > t ? t : x , y = y > q ? q : y , y = y > s ? s : y , y = y > u ? u : y , v = p > v ? p : v , v = r > v ? r : v , v = t > v ? t : v , w = q > w ? q : w , w = s > w ? s : w , w = u > w ? u : w , this . _bounds . x = x , this . _bounds . width = v - x , this . _bounds . y = y , this . _bounds . height = w - y , this . _currentBounds = this . _bounds } return this . _currentBounds } , PIXI . Graphics . prototype . containsPoint = function ( a ) { this . worldTransform . applyInverse ( a , tempPoint ) ; for ( var b = this . graphicsData , c = 0 ; c < b . length ; c ++ ) { var d = b [ c ] ; if ( d . fill && d . shape && d . shape . contains ( tempPoint . x , tem
a . fill = a . fill || "black" , a . align = a . align || "left" , a . boundsAlignH = a . boundsAlignH || "left" , a . boundsAlignV = a . boundsAlignV || "top" , a . stroke = a . stroke || "black" , a . strokeThickness = a . strokeThickness || 0 , a . wordWrap = a . wordWrap || ! 1 , a . wordWrapWidth = a . wordWrapWidth || 100 , a . maxLines = a . maxLines || 0 , a . shadowOffsetX = a . shadowOffsetX || 0 , a . shadowOffsetY = a . shadowOffsetY || 0 , a . shadowColor = a . shadowColor || "rgba(0,0,0,0)" , a . shadowBlur = a . shadowBlur || 0 , a . tabs = a . tabs || 0 ; var c = this . fontToComponents ( a . font ) ; return a . fontStyle && ( c . fontStyle = a . fontStyle ) , a . fontVariant && ( c . fontVariant = a . fontVariant ) , a . fontWeight && ( c . fontWeight = a . fontWeight ) , a . fontSize && ( "number" == typeof a . fontSize && ( a . fontSize = a . fontSize + "px" ) , c . fontSize = a . fontSize ) , this . _fontComponents = c , a . font = this . componentsToFont ( this . _fontComponents ) , this . style = a , this . dirty = ! 0 , b && this . updateText ( ) , this } , c . Text . prototype . updateText = function ( ) { this . texture . baseTexture . resolution = this . _res , this . context . font = this . style . font ; var a = this . text ; this . style . wordWrap && ( a = this . runWordWrap ( this . text ) ) ; var b = a . split ( /(?:\r\n|\r|\n)/ ) , c = this . style . tabs , d = [ ] , e = 0 , f = this . determineFontProperties ( this . style . font ) , g = b . length ; this . style . maxLines > 0 && this . style . maxLines < b . length && ( g = this . style . maxLines ) , this . _charCount = 0 ; for ( var h = 0 ; g > h ; h ++ ) { if ( 0 === c ) { var i = this . style . strokeThickness + this . padding . x ; i += this . colors . length > 0 || this . strokeColors . length > 0 || this . fontWeights . length > 0 || this . fontStyles . length > 0 ? this . measureLine ( b [ h ] ) : this . context . measureText ( b [ h ] ) . width , this . style . wordWrap && ( i -= this . context . measureText ( " " ) . width ) } else { var j = b [ h ] . split ( /(?:\t)/ ) , i = this . padding . x + this . style . strokeThickness ; if ( Array . isArray ( c ) ) for ( var k = 0 , l = 0 ; l < j . length ; l ++ ) { var m = 0 ; m = this . colors . length > 0 || this . strokeColors . length > 0 || this . fontWeights . length > 0 || this . fontStyles . length > 0 ? this . measureLine ( j [ l ] ) : Math . ceil ( this . context . measureText ( j [ l ] ) . width ) , l > 0 && ( k += c [ l - 1 ] ) , i = k + m } else for ( var l = 0 ; l < j . length ; l ++ ) { i += this . colors . length > 0 || this . strokeColors . length > 0 || this . fontWeights . length > 0 || this . fontStyles . length > 0 ? this . measureLine ( j [ l ] ) : Math . ceil ( this . context . measureText ( j [ l ] ) . width ) ; var n = this . game . math . snapToCeil ( i , c ) - i ; i += n } } d [ h ] = Math . ceil ( i ) , e = Math . max ( e , d [ h ] ) } this . canvas . width = e * this . _res ; var o = f . fontSize + this . style . strokeThickness + this . padding . y , p = o * g , q = this . _lineSpacing ; 0 > q && Math . abs ( q ) > o && ( q = - o ) , 0 !== q && ( p += q > 0 ? q * b . length : q * ( b . length - 1 ) ) , this . canvas . height = p * this . _res , this . context . scale ( this . _res , this . _res ) , navigator . isCocoonJS && this . context . clearRect ( 0 , 0 , this . canvas . width , this . canvas . height ) , this . style . backgroundColor && ( this . context . fillStyle = this . style . backgroundColor , this . context . fillRect ( 0 , 0 , this . canvas . width , this . canvas . height ) ) , this . context . fillStyle = this . style . fill , this . context . font = this . style . font , this . context . strokeStyle = this . style . stroke , this . context . textBaseline = "alphabetic" , this . context . lineWidth = this . style . strokeThickness , this . context . lineCap = "round" , this . context . lineJoin = "round" ; var r , s ; for ( this . _charCount = 0 , h = 0 ; g > h ; h ++ ) r = this . style . strokeThickness / 2 , s = this . style . strokeThickness / 2 + h * o + f . ascent , h > 0 && ( s += q * h ) , "right" === this . style . align ? r += e - d [ h ] : "center" === this . style . align && ( r += ( e - d [ h ] ) / 2 ) , this . autoRound && ( r = Math . round ( r ) , s = Math . round ( s ) ) , this . colors . length > 0 || this . strokeColors . length > 0 || this . fontWeights . length > 0 || this . fontStyles . length > 0 ? this . updateLine ( b [ h ] , r , s ) : ( this . style . stroke && this . style . strokeThickness && ( this . updateShadow ( this . style . shadowStroke ) , 0 === c ? this . context . strokeText ( b [ h ] , r , s ) : this . renderTabLine ( b [ h ] , r , s , ! 1 ) ) , this . style . fill && ( this . updateShadow ( this . style . shadowFill ) , 0 === c ? this . context . fillText ( b [ h ] , r , s ) : this . renderTabLine ( b [ h ] , r , s , ! 0 ) ) ) ; this . updateTexture ( ) } , c . Text . prototype . renderTabLine = function ( a , b , c , d ) { var e = a . split ( /(?:\t)/ ) , f = this . style . tabs , g = 0 ; if ( Array . isArray ( f ) ) for ( var h = 0 , i = 0 ; i < e . length ; i ++ ) i > 0 && ( h += f [ i - 1 ] ) , g = b + h , d ? this . context . fillText ( e [ i ] , g , c ) : this . context . strokeText ( e [ i ] , g , c ) ; else for ( var i = 0 ; i < e . length ; i ++ ) { var j = Math . ceil ( this . context . measureText ( e [ i ] ) . width ) ; g = this . game . math . snapToCeil ( b , f ) , d ? this . context . fillText ( e [ i ] , g , c ) : this . context . strokeText ( e [ i ] , g , c ) , b = g + j } } , c . Text . prototype . updateShadow = function ( a ) { a
this . edge = ! 1 , this . mobileSafari = ! 1 , this . midori = ! 1 , this . opera = ! 1 , this . safari = ! 1 , this . safariVersion = 0 , this . webApp = ! 1 , this . silk = ! 1 , this . audioData = ! 1 , this . webAudio = ! 1 , this . ogg = ! 1 , this . opus = ! 1 , this . mp3 = ! 1 , this . wav = ! 1 , this . m4a = ! 1 , this . webm = ! 1 , this . dolby = ! 1 , this . oggVideo = ! 1 , this . h264Video = ! 1 , this . mp4Video = ! 1 , this . webmVideo = ! 1 , this . vp9Video = ! 1 , this . hlsVideo = ! 1 , this . iPhone = ! 1 , this . iPhone4 = ! 1 , this . iPad = ! 1 , this . pixelRatio = 0 , this . littleEndian = ! 1 , this . LITTLE _ENDIAN = ! 1 , this . support32bit = ! 1 , this . fullscreen = ! 1 , this . requestFullscreen = "" , this . cancelFullscreen = "" , this . fullscreenKeyboard = ! 1 } , c . Device = new c . Device , c . Device . onInitialized = new c . Signal , c . Device . whenReady = function ( a , b , c ) { var d = this . _readyCheck ; if ( this . deviceReadyAt || ! d ) a . call ( b , this ) ; else if ( d . _monitor || c ) d . _queue = d . _queue || [ ] , d . _queue . push ( [ a , b ] ) ; else { d . _monitor = d . bind ( this ) , d . _queue = d . _queue || [ ] , d . _queue . push ( [ a , b ] ) ; var e = "undefined" != typeof window . cordova , f = navigator . isCocoonJS ; "complete" === document . readyState || "interactive" === document . readyState ? window . setTimeout ( d . _monitor , 0 ) : e && ! f ? document . addEventListener ( "deviceready" , d . _monitor , ! 1 ) : ( document . addEventListener ( "DOMContentLoaded" , d . _monitor , ! 1 ) , window . addEventListener ( "load" , d . _monitor , ! 1 ) ) } } , c . Device . _readyCheck = function ( ) { var a = this . _readyCheck ; if ( document . body ) { if ( ! this . deviceReadyAt ) { this . deviceReadyAt = Date . now ( ) , document . removeEventListener ( "deviceready" , a . _monitor ) , document . removeEventListener ( "DOMContentLoaded" , a . _monitor ) , window . removeEventListener ( "load" , a . _monitor ) , this . _initialize ( ) , this . initialized = ! 0 , this . onInitialized . dispatch ( this ) ; for ( var b ; b = a . _queue . shift ( ) ; ) { var c = b [ 0 ] , d = b [ 1 ] ; c . call ( d , this ) } this . _readyCheck = null , this . _initialize = null , this . onInitialized = null } } else window . setTimeout ( a . _monitor , 20 ) } , c . Device . _initialize = function ( ) { function a ( ) { var a = navigator . userAgent ; /Playstation Vita/ . test ( a ) ? l . vita = ! 0 : /Kindle/ . test ( a ) || /\bKF[A-Z][A-Z]+/ . test ( a ) || /Silk.*Mobile Safari/ . test ( a ) ? l . kindle = ! 0 : /Android/ . test ( a ) ? l . android = ! 0 : /CrOS/ . test ( a ) ? l . chromeOS = ! 0 : /iP[ao]d|iPhone/i . test ( a ) ? ( l . iOS = ! 0 , navigator . appVersion . match ( /OS (\d+)/ ) , l . iOSVersion = parseInt ( RegExp . $1 , 10 ) ) : /Linux/ . test ( a ) ? l . linux = ! 0 : /Mac OS/ . test ( a ) ? l . macOS = ! 0 : /Windows/ . test ( a ) && ( l . windows = ! 0 ) , ( /Windows Phone/i . test ( a ) || /IEMobile/i . test ( a ) ) && ( l . android = ! 1 , l . iOS = ! 1 , l . macOS = ! 1 , l . windows = ! 0 , l . windowsPhone = ! 0 ) ; var b = /Silk/ . test ( a ) ; ( l . windows || l . macOS || l . linux && ! b || l . chromeOS ) && ( l . desktop = ! 0 ) , ( l . windowsPhone || /Windows NT/i . test ( a ) && /Touch/i . test ( a ) ) && ( l . desktop = ! 1 ) } function b ( ) { l . canvas = ! ! window . CanvasRenderingContext2D || l . cocoonJS ; try { l . localStorage = ! ! localStorage . getItem } catch ( a ) { l . localStorage = ! 1 } l . file = ! ! ( window . File && window . FileReader && window . FileList && window . Blob ) , l . fileSystem = ! ! window . requestFileSystem , l . webGL = function ( ) { try { var a = document . createElement ( "canvas" ) ; return a . screencanvas = ! 1 , ! ! window . WebGLRenderingContext && ( a . getContext ( "webgl" ) || a . getContext ( "experimental-webgl" ) ) } catch ( b ) { return ! 1 } } ( ) , l . webGL = ! ! l . webGL , l . worker = ! ! window . Worker , l . pointerLock = "pointerLockElement" in document || "mozPointerLockElement" in document || "webkitPointerLockElement" in document , l . quirksMode = "CSS1Compat" === document . compatMode ? ! 1 : ! 0 , navigator . getUserMedia = navigator . getUserMedia || navigator . webkitGetUserMedia || navigator . mozGetUserMedia || navigator . msGetUserMedia || navigator . oGetUserMedia , window . URL = window . URL || window . webkitURL || window . mozURL || window . msURL , l . getUserMedia = l . getUserMedia && ! ! navigator . getUserMedia && ! ! window . URL , l . firefox && l . firefoxVersion < 21 && ( l . getUserMedia = ! 1 ) , ! l . iOS && ( l . ie || l . firefox || l . chrome ) && ( l . canvasBitBltShift = ! 0 ) , ( l . safari || l . mobileSafari ) && ( l . canvasBitBltShift = ! 1 ) } function c ( ) { ( "ontouchstart" in document . documentElement || window . navigator . maxTouchPoints && window . navigator . maxTouchPoints >= 1 ) && ( l . touch = ! 0 ) , ( window . navigator . msPointerEnabled || window . navigator . pointerEnabled ) && ( l . mspointer = ! 0 ) , l . cocoonJS || ( "onwheel" in window || l . ie && "WheelEvent" in window ? l . wheelEvent = "wheel" : "onmousewheel" in window ? l . wheelEvent = "mousewheel" : l . firefox && "MouseScrollEvent" in window && ( l . wheelEvent = "DOMMouseScroll" ) ) } function d ( ) { for ( var a = [ "requestFullscreen" , "requestFullScreen" , "
! 0 ) } } , generateData : function ( a , b ) { if ( null === this . game || null === this . target ) return null ; void 0 === a && ( a = 60 ) , void 0 === b && ( b = [ ] ) ; for ( var c = 0 ; c < this . timeline . length ; c ++ ) for ( var d in this . timeline [ c ] . vEnd ) this . properties [ d ] = this . target [ d ] || 0 , Array . isArray ( this . properties [ d ] ) || ( this . properties [ d ] *= 1 ) ; for ( var c = 0 ; c < this . timeline . length ; c ++ ) this . timeline [ c ] . loadValues ( ) ; for ( var c = 0 ; c < this . timeline . length ; c ++ ) b = b . concat ( this . timeline [ c ] . generateData ( a ) ) ; return b } } , Object . defineProperty ( c . Tween . prototype , "totalDuration" , { get : function ( ) { for ( var a = 0 , b = 0 ; b < this . timeline . length ; b ++ ) a += this . timeline [ b ] . duration ; return a } } ) , c . Tween . prototype . constructor = c . Tween , c . TweenData = function ( a ) { this . parent = a , this . game = a . game , this . vStart = { } , this . vStartCache = { } , this . vEnd = { } , this . vEndCache = { } , this . duration = 1e3 , this . percent = 0 , this . value = 0 , this . repeatCounter = 0 , this . repeatDelay = 0 , this . repeatTotal = 0 , this . interpolate = ! 1 , this . yoyo = ! 1 , this . yoyoDelay = 0 , this . inReverse = ! 1 , this . delay = 0 , this . dt = 0 , this . startTime = null , this . easingFunction = c . Easing . Default , this . interpolationFunction = c . Math . linearInterpolation , this . interpolationContext = c . Math , this . isRunning = ! 1 , this . isFrom = ! 1 } , c . TweenData . PENDING = 0 , c . TweenData . RUNNING = 1 , c . TweenData . LOOPED = 2 , c . TweenData . COMPLETE = 3 , c . TweenData . prototype = { to : function ( a , b , c , d , e , f ) { return this . vEnd = a , this . duration = b , this . easingFunction = c , this . delay = d , this . repeatTotal = e , this . yoyo = f , this . isFrom = ! 1 , this } , from : function ( a , b , c , d , e , f ) { return this . vEnd = a , this . duration = b , this . easingFunction = c , this . delay = d , this . repeatTotal = e , this . yoyo = f , this . isFrom = ! 0 , this } , start : function ( ) { if ( this . startTime = this . game . time . time + this . delay , this . parent . reverse ? this . dt = this . duration : this . dt = 0 , this . delay > 0 ? this . isRunning = ! 1 : this . isRunning = ! 0 , this . isFrom ) for ( var a in this . vStartCache ) this . vStart [ a ] = this . vEndCache [ a ] , this . vEnd [ a ] = this . vStartCache [ a ] , this . parent . target [ a ] = this . vStart [ a ] ; return this . value = 0 , this . yoyoCounter = 0 , this . repeatCounter = this . repeatTotal , this } , loadValues : function ( ) { for ( var a in this . parent . properties ) { if ( this . vStart [ a ] = this . parent . properties [ a ] , Array . isArray ( this . vEnd [ a ] ) ) { if ( 0 === this . vEnd [ a ] . length ) continue ; 0 === this . percent && ( this . vEnd [ a ] = [ this . vStart [ a ] ] . concat ( this . vEnd [ a ] ) ) } "undefined" != typeof this . vEnd [ a ] ? ( "string" == typeof this . vEnd [ a ] && ( this . vEnd [ a ] = this . vStart [ a ] + parseFloat ( this . vEnd [ a ] , 10 ) ) , this . parent . properties [ a ] = this . vEnd [ a ] ) : this . vEnd [ a ] = this . vStart [ a ] , this . vStartCache [ a ] = this . vStart [ a ] , this . vEndCache [ a ] = this . vEnd [ a ] } return this } , update : function ( a ) { if ( this . isRunning ) { if ( a < this . startTime ) return c . TweenData . RUNNING } else { if ( ! ( a >= this . startTime ) ) return c . TweenData . PENDING ; this . isRunning = ! 0 } var b = this . parent . frameBased ? this . game . time . physicsElapsedMS : this . game . time . elapsedMS ; this . parent . reverse ? ( this . dt -= b * this . parent . timeScale , this . dt = Math . max ( this . dt , 0 ) ) : ( this . dt += b * this . parent . timeScale , this . dt = Math . min ( this . dt , this . duration ) ) , this . percent = this . dt / this . duration , this . value = this . easingFunction ( this . percent ) ; for ( var d in this . vEnd ) { var e = this . vStart [ d ] , f = this . vEnd [ d ] ; Array . isArray ( f ) ? this . parent . target [ d ] = this . interpolationFunction . call ( this . interpolationContext , f , this . value ) : this . parent . target [ d ] = e + ( f - e ) * this . value } return ! this . parent . reverse && 1 === this . percent || this . parent . reverse && 0 === this . percent ? this . repeat ( ) : c . TweenData . RUNNING } , generateData : function ( a ) { this . parent . reverse ? this . dt = this . duration : this . dt = 0 ; var b = [ ] , c = ! 1 , d = 1 / a * 1e3 ; do { this . parent . reverse ? ( this . dt -= d , this . dt = Math . max ( this . dt , 0 ) ) : ( this . dt += d , this . dt = Math . min ( this . dt , this . duration ) ) , this . percent = this . dt / this . duration , this . value = this . easingFunction ( this . percent ) ; var e = { } ; for ( var f in this . vEnd ) { var g = this . vStart [ f ] , h = this . vEnd [ f ] ; Array . isArray ( h ) ? e [ f ] = this . interpolationFunction ( h , this . value ) : e [ f ] = g + ( h - g ) * this . value } b . push ( e ) , ( ! this . parent . reverse && 1 === this . percent || this . parent . reverse && 0 === this . percent ) && ( c = ! 0 ) } while ( ! c ) ; if ( this . yoyo ) { var i = b . slice ( ) ; i . reverse ( ) , b = b . concat ( i ) } return b } , repeat : function ( ) { if ( this . yoyo ) { if ( this . inReverse && 0 === this . repeatCounter ) { for ( var a in this . vStartCache ) this . vStart [ a ] = this . vStartCache [ a ] , this . vEnd [ a ] = this . vEndCache [ a ] ; return this . inReverse = ! 1 , c .
text : { } , json : { } , xml : { } , physics : { } , tilemap : { } , binary : { } , bitmapData : { } , bitmapFont : { } , shader : { } , renderTexture : { } } , this . _urlMap = { } , this . _urlResolver = new Image , this . _urlTemp = null , this . onSoundUnlock = new c . Signal , this . _cacheMap = [ ] , this . _cacheMap [ c . Cache . CANVAS ] = this . _cache . canvas , this . _cacheMap [ c . Cache . IMAGE ] = this . _cache . image , this . _cacheMap [ c . Cache . TEXTURE ] = this . _cache . texture , this . _cacheMap [ c . Cache . SOUND ] = this . _cache . sound , this . _cacheMap [ c . Cache . TEXT ] = this . _cache . text , this . _cacheMap [ c . Cache . PHYSICS ] = this . _cache . physics , this . _cacheMap [ c . Cache . TILEMAP ] = this . _cache . tilemap , this . _cacheMap [ c . Cache . BINARY ] = this . _cache . binary , this . _cacheMap [ c . Cache . BITMAPDATA ] = this . _cache . bitmapData , this . _cacheMap [ c . Cache . BITMAPFONT ] = this . _cache . bitmapFont , this . _cacheMap [ c . Cache . JSON ] = this . _cache . json , this . _cacheMap [ c . Cache . XML ] = this . _cache . xml , this . _cacheMap [ c . Cache . VIDEO ] = this . _cache . video , this . _cacheMap [ c . Cache . SHADER ] = this . _cache . shader , this . _cacheMap [ c . Cache . RENDER _TEXTURE ] = this . _cache . renderTexture , this . addDefaultImage ( ) , this . addMissingImage ( ) } , c . Cache . CANVAS = 1 , c . Cache . IMAGE = 2 , c . Cache . TEXTURE = 3 , c . Cache . SOUND = 4 , c . Cache . TEXT = 5 , c . Cache . PHYSICS = 6 , c . Cache . TILEMAP = 7 , c . Cache . BINARY = 8 , c . Cache . BITMAPDATA = 9 , c . Cache . BITMAPFONT = 10 , c . Cache . JSON = 11 , c . Cache . XML = 12 , c . Cache . VIDEO = 13 , c . Cache . SHADER = 14 , c . Cache . RENDER _TEXTURE = 15 , c . Cache . prototype = { addCanvas : function ( a , b , c ) { void 0 === c && ( c = b . getContext ( "2d" ) ) , this . _cache . canvas [ a ] = { canvas : b , context : c } } , addImage : function ( a , b , d ) { this . checkImageKey ( a ) && this . removeImage ( a ) ; var e = { key : a , url : b , data : d , base : new PIXI . BaseTexture ( d ) , frame : new c . Frame ( 0 , 0 , 0 , d . width , d . height , a ) , frameData : new c . FrameData } ; return e . frameData . addFrame ( new c . Frame ( 0 , 0 , 0 , d . width , d . height , b ) ) , this . _cache . image [ a ] = e , this . _resolveURL ( b , e ) , e } , addDefaultImage : function ( ) { var a = new Image ; a . src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg==" ; var b = this . addImage ( "__default" , null , a ) ; b . base . skipRender = ! 0 , PIXI . TextureCache . _ _default = new PIXI . Texture ( b . base ) } , addMissingImage : function ( ) { var a = new Image ; a . src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==" ; var b = this . addImage ( "__missing" , null , a ) ; PIXI . TextureCache . _ _missing = new PIXI . Texture ( b . base ) } , addSound : function ( a , b , c , d , e ) { void 0 === d && ( d = ! 0 , e = ! 1 ) , void 0 === e && ( d = ! 1 , e = ! 0 ) ; var f = ! 1 ; e && ( f = ! 0 ) , this . _cache . sound [ a ] = { url : b , data : c , isDecoding : ! 1 , decoded : f , webAudio : d , audioTag : e , locked : this . game . sound . touchLocked } , this . _resolveURL ( b , this . _cache . sound [ a ] ) } , addText : function ( a , b , c ) { this . _cache . text [ a ] = { url : b , data : c } , this . _resolveURL ( b , this . _cache . text [ a ] ) } , addPhysicsData : function ( a , b , c , d ) { this . _cache . physics [ a ] = { url : b , data : c , format : d } , this . _resolveURL ( b , this . _cache . physics [ a ] ) } , addTilemap : function ( a , b , c , d ) { this . _cache . tilemap [ a ] = { url : b , data : c , format : d } , this . _resolveURL ( b , this . _cache . tilemap [ a ] ) } , addBinary : function ( a , b ) { this . _cache . binary [ a ] = b } , addBitmapData : function ( a , b , d ) { return b . key = a , void 0 === d && ( d = new c . FrameData , d . addFrame ( b . textureFrame ) ) , this . _cache . bitmapData [ a ] = { data : b , frameData : d } , b } , addBitmapFont : function ( a , b , d , e , f , g , h ) { var i = { url : b , data : d , font : null , base : new PIXI . BaseTexture ( d ) } ; void 0 === g && ( g = 0 ) , void 0 === h && ( h = 0 ) , "json" === f ? i . font = c . LoaderParser . jsonBitmapFont ( e , i . base , g , h ) : i . font = c . LoaderParser . xmlBitmapFont ( e , i . base , g , h ) , this . _cache . bitmapFont [ a ] = i , this . _resolveURL ( b , i ) } , addJSON : function ( a , b , c ) { this . _cache . json [ a ] = { url : b , data : c } , this . _resolveURL ( b , this . _cache . json [ a ] ) } , addXML : function ( a , b , c ) { this . _cache . xml [ a ] = { url : b , data : c } , this . _resolveURL ( b , this . _cache . xml [ a ] ) } , addVideo : function ( a , b , c , d ) { this . _cache . video [ a ] = { url : b , data : c , isBlob : d , locked : ! 0 } , this . _resolveURL ( b , this . _cache . video [ a ] ) } , addShader : function ( a , b , c ) { this . _cache . shader [ a ] = { url : b , data : c } , this . _resolveURL ( b , this . _cache
return console . warn ( "Phaser.Loader - " + a . key + ": invalid XML (" + e + ")" ) , void this . asyncComplete ( a , "invalid XML" ) } "bitmapfont" === a . type ? this . cache . addBitmapFont ( a . key , a . url , a . data , d , a . atlasType , a . xSpacing , a . ySpacing ) : "textureatlas" === a . type ? this . cache . addTextureAtlas ( a . key , a . url , a . data , d , a . format ) : "xml" === a . type && this . cache . addXML ( a . key , a . url , d ) , this . asyncComplete ( a ) } , parseXml : function ( a ) { var b ; try { if ( window . DOMParser ) { var c = new DOMParser ; b = c . parseFromString ( a , "text/xml" ) } else b = new ActiveXObject ( "Microsoft.XMLDOM" ) , b . async = "false" , b . loadXML ( a ) } catch ( d ) { b = null } return b && b . documentElement && ! b . getElementsByTagName ( "parsererror" ) . length ? b : null } , updateProgress : function ( ) { this . preloadSprite && ( 0 === this . preloadSprite . direction ? this . preloadSprite . rect . width = Math . floor ( this . preloadSprite . width / 100 * this . progress ) : this . preloadSprite . rect . height = Math . floor ( this . preloadSprite . height / 100 * this . progress ) , this . preloadSprite . sprite ? this . preloadSprite . sprite . updateCrop ( ) : this . preloadSprite = null ) } , totalLoadedFiles : function ( ) { return this . _loadedFileCount } , totalQueuedFiles : function ( ) { return this . _totalFileCount - this . _loadedFileCount } , totalLoadedPacks : function ( ) { return this . _totalPackCount } , totalQueuedPacks : function ( ) { return this . _totalPackCount - this . _loadedPackCount } } , Object . defineProperty ( c . Loader . prototype , "progressFloat" , { get : function ( ) { var a = this . _loadedFileCount / this . _totalFileCount * 100 ; return c . Math . clamp ( a || 0 , 0 , 100 ) } } ) , Object . defineProperty ( c . Loader . prototype , "progress" , { get : function ( ) { return Math . round ( this . progressFloat ) } } ) , c . Loader . prototype . constructor = c . Loader , c . LoaderParser = { bitmapFont : function ( a , b , c , d ) { return this . xmlBitmapFont ( a , b , c , d ) } , xmlBitmapFont : function ( a , b , c , d ) { var e = { } , f = a . getElementsByTagName ( "info" ) [ 0 ] , g = a . getElementsByTagName ( "common" ) [ 0 ] ; e . font = f . getAttribute ( "face" ) , e . size = parseInt ( f . getAttribute ( "size" ) , 10 ) , e . lineHeight = parseInt ( g . getAttribute ( "lineHeight" ) , 10 ) + d , e . chars = { } ; for ( var h = a . getElementsByTagName ( "char" ) , i = 0 ; i < h . length ; i ++ ) { var j = parseInt ( h [ i ] . getAttribute ( "id" ) , 10 ) ; e . chars [ j ] = { x : parseInt ( h [ i ] . getAttribute ( "x" ) , 10 ) , y : parseInt ( h [ i ] . getAttribute ( "y" ) , 10 ) , width : parseInt ( h [ i ] . getAttribute ( "width" ) , 10 ) , height : parseInt ( h [ i ] . getAttribute ( "height" ) , 10 ) , xOffset : parseInt ( h [ i ] . getAttribute ( "xoffset" ) , 10 ) , yOffset : parseInt ( h [ i ] . getAttribute ( "yoffset" ) , 10 ) , xAdvance : parseInt ( h [ i ] . getAttribute ( "xadvance" ) , 10 ) + c , kerning : { } } } var k = a . getElementsByTagName ( "kerning" ) ; for ( i = 0 ; i < k . length ; i ++ ) { var l = parseInt ( k [ i ] . getAttribute ( "first" ) , 10 ) , m = parseInt ( k [ i ] . getAttribute ( "second" ) , 10 ) , n = parseInt ( k [ i ] . getAttribute ( "amount" ) , 10 ) ; e . chars [ m ] . kerning [ l ] = n } return this . finalizeBitmapFont ( b , e ) } , jsonBitmapFont : function ( a , b , c , d ) { var e = { font : a . font . info . _face , size : parseInt ( a . font . info . _size , 10 ) , lineHeight : parseInt ( a . font . common . _lineHeight , 10 ) + d , chars : { } } ; return a . font . chars [ "char" ] . forEach ( function ( a ) { var b = parseInt ( a . _id , 10 ) ; e . chars [ b ] = { x : parseInt ( a . _x , 10 ) , y : parseInt ( a . _y , 10 ) , width : parseInt ( a . _width , 10 ) , height : parseInt ( a . _height , 10 ) , xOffset : parseInt ( a . _xoffset , 10 ) , yOffset : parseInt ( a . _yoffset , 10 ) , xAdvance : parseInt ( a . _xadvance , 10 ) + c , kerning : { } } } ) , a . font . kernings && a . font . kernings . kerning && a . font . kernings . kerning . forEach ( function ( a ) { e . chars [ a . _second ] . kerning [ a . _first ] = parseInt ( a . _amount , 10 ) } ) , this . finalizeBitmapFont ( b , e ) } , finalizeBitmapFont : function ( a , b ) { return Object . keys ( b . chars ) . forEach ( function ( d ) { var e = b . chars [ d ] ; e . texture = new PIXI . Texture ( a , new c . Rectangle ( e . x , e . y , e . width , e . height ) ) } ) , b } } , c . AudioSprite = function ( a , b ) { this . game = a , this . key = b , this . config = this . game . cache . getJSON ( b + "-audioatlas" ) , this . autoplayKey = null , this . autoplay = ! 1 , this . sounds = { } ; for ( var c in this . config . spritemap ) { var d = this . config . spritemap [ c ] , e = this . game . add . sound ( this . key ) ; e . addMarker ( c , d . start , d . end - d . start , null , d . loop ) , this . sounds [ c ] = e } this . config . autoplay && ( this . autoplayKey = this . config . autoplay , this . play ( this . autoplayKey ) , this . autoplay = this . sounds [ this . autoplayKey ] ) } , c . AudioSprite . prototype = { play : function ( a , b ) { return void 0 === b && ( b = 1 ) , this . sounds [ a ] . play ( a , null , b ) } , stop : function ( a ) { if ( a ) this . sounds [ a ] . stop ( ) ; else for ( var b in this . sounds ) this . sounds [ b ] . stop ( ) } , get : func
this . height = c . Math . clamp ( this . height , this . minHeight || 0 , this . maxHeight || this . height ) ) , this . resetCanvas ( ) , this . compatibility . noMargins || ( this . isFullScreen && this . _createdFullScreenTarget ? this . alignCanvas ( ! 0 , ! 0 ) : this . alignCanvas ( this . pageAlignHorizontally , this . pageAlignVertically ) ) , this . updateScalingAndBounds ( ) } , resetCanvas : function ( a , b ) { void 0 === a && ( a = this . width + "px" ) , void 0 === b && ( b = this . height + "px" ) ; var c = this . game . canvas ; this . compatibility . noMargins || ( c . style . marginLeft = "" , c . style . marginTop = "" , c . style . marginRight = "" , c . style . marginBottom = "" ) , c . style . width = a , c . style . height = b } , queueUpdate : function ( a ) { a && ( this . _parentBounds . width = 0 , this . _parentBounds . height = 0 ) , this . _updateThrottle = this . _updateThrottleReset } , reset : function ( a ) { a && this . grid && this . grid . reset ( ) } , setMaximum : function ( ) { this . width = this . dom . visualBounds . width , this . height = this . dom . visualBounds . height } , setShowAll : function ( a ) { var b , c = this . getParentBounds ( this . _tempBounds ) , d = c . width , e = c . height ; b = a ? Math . max ( e / this . game . height , d / this . game . width ) : Math . min ( e / this . game . height , d / this . game . width ) , this . width = Math . round ( this . game . width * b ) , this . height = Math . round ( this . game . height * b ) } , setExactFit : function ( ) { var a = this . getParentBounds ( this . _tempBounds ) ; this . width = a . width , this . height = a . height , this . isFullScreen || ( this . maxWidth && ( this . width = Math . min ( this . width , this . maxWidth ) ) , this . maxHeight && ( this . height = Math . min ( this . height , this . maxHeight ) ) ) } , createFullScreenTarget : function ( ) { var a = document . createElement ( "div" ) ; return a . style . margin = "0" , a . style . padding = "0" , a . style . background = "#000" , a } , startFullScreen : function ( a , b ) { if ( this . isFullScreen ) return ! 1 ; if ( ! this . compatibility . supportsFullScreen ) { var d = this ; return void setTimeout ( function ( ) { d . fullScreenError ( ) } , 10 ) } if ( "when-not-mouse" === this . compatibility . clickTrampoline ) { var e = this . game . input ; if ( e . activePointer && e . activePointer !== e . mousePointer && ( b || b !== ! 1 ) ) return void e . activePointer . addClickTrampoline ( "startFullScreen" , this . startFullScreen , this , [ a , ! 1 ] ) } "undefined" != typeof a && this . game . renderType === c . CANVAS && ( this . game . stage . smoothed = a ) ; var f = this . fullScreenTarget ; f || ( this . cleanupCreatedTarget ( ) , this . _createdFullScreenTarget = this . createFullScreenTarget ( ) , f = this . _createdFullScreenTarget ) ; var g = { targetElement : f } ; if ( this . onFullScreenInit . dispatch ( this , g ) , this . _createdFullScreenTarget ) { var h = this . game . canvas , i = h . parentNode ; i . insertBefore ( f , h ) , f . appendChild ( h ) } return this . game . device . fullscreenKeyboard ? f [ this . game . device . requestFullscreen ] ( Element . ALLOW _KEYBOARD _INPUT ) : f [ this . game . device . requestFullscreen ] ( ) , ! 0 } , stopFullScreen : function ( ) { return this . isFullScreen && this . compatibility . supportsFullScreen ? ( document [ this . game . device . cancelFullscreen ] ( ) , ! 0 ) : ! 1 } , cleanupCreatedTarget : function ( ) { var a = this . _createdFullScreenTarget ; if ( a && a . parentNode ) { var b = a . parentNode ; b . insertBefore ( this . game . canvas , a ) , b . removeChild ( a ) } this . _createdFullScreenTarget = null } , prepScreenMode : function ( a ) { var b = ! ! this . _createdFullScreenTarget , d = this . _createdFullScreenTarget || this . fullScreenTarget ; a ? ( b || this . fullScreenScaleMode === c . ScaleManager . EXACT _FIT ) && d !== this . game . canvas && ( this . _fullScreenRestore = { targetWidth : d . style . width , targetHeight : d . style . height } , d . style . width = "100%" , d . style . height = "100%" ) : ( this . _fullScreenRestore && ( d . style . width = this . _fullScreenRestore . targetWidth , d . style . height = this . _fullScreenRestore . targetHeight , this . _fullScreenRestore = null ) , this . updateDimensions ( this . _gameSize . width , this . _gameSize . height , ! 0 ) , this . resetCanvas ( ) ) } , fullScreenChange : function ( a ) { this . event = a , this . isFullScreen ? ( this . prepScreenMode ( ! 0 ) , this . updateLayout ( ) , this . queueUpdate ( ! 0 ) ) : ( this . prepScreenMode ( ! 1 ) , this . cleanupCreatedTarget ( ) , this . updateLayout ( ) , this . queueUpdate ( ! 0 ) ) , this . onFullScreenChange . dispatch ( this , this . width , this . height ) } , fullScreenError : function ( a ) { this . event = a , this . cleanupCreatedTarget ( ) , console . warn ( "Phaser.ScaleManager: requestFullscreen failed or device does not support the Fullscreen API" ) , this . onFullScreenError . dispatch ( this ) } , scaleSprite : function ( a , b , c , d ) { if ( void 0 === b && ( b = this . width ) , void 0 === c && ( c = this . height ) , void 0 === d && ( d = ! 1 ) , ! a || ! a . scale ) return a ; if ( a . scale . x = 1 , a . scal
d /= 255 ; var f = Math . min ( a , b , d ) , g = Math . max ( a , b , d ) ; if ( e . h = 0 , e . s = 0 , e . l = ( g + f ) / 2 , g !== f ) { var h = g - f ; e . s = e . l > . 5 ? h / ( 2 - g - f ) : h / ( g + f ) , g === a ? e . h = ( b - d ) / h + ( d > b ? 6 : 0 ) : g === b ? e . h = ( d - a ) / h + 2 : g === d && ( e . h = ( a - b ) / h + 4 ) , e . h /= 6 } return e } , HSLtoRGB : function ( a , b , d , e ) { if ( e ? ( e . r = d , e . g = d , e . b = d ) : e = c . Color . createColor ( d , d , d ) , 0 !== b ) { var f = . 5 > d ? d * ( 1 + b ) : d + b - d * b , g = 2 * d - f ; e . r = c . Color . hueToColor ( g , f , a + 1 / 3 ) , e . g = c . Color . hueToColor ( g , f , a ) , e . b = c . Color . hueToColor ( g , f , a - 1 / 3 ) } return e . r = Math . floor ( 255 * e . r | 0 ) , e . g = Math . floor ( 255 * e . g | 0 ) , e . b = Math . floor ( 255 * e . b | 0 ) , c . Color . updateColor ( e ) , e } , RGBtoHSV : function ( a , b , d , e ) { e || ( e = c . Color . createColor ( a , b , d , 255 ) ) , a /= 255 , b /= 255 , d /= 255 ; var f = Math . min ( a , b , d ) , g = Math . max ( a , b , d ) , h = g - f ; return e . h = 0 , e . s = 0 === g ? 0 : h / g , e . v = g , g !== f && ( g === a ? e . h = ( b - d ) / h + ( d > b ? 6 : 0 ) : g === b ? e . h = ( d - a ) / h + 2 : g === d && ( e . h = ( a - b ) / h + 4 ) , e . h /= 6 ) , e } , HSVtoRGB : function ( a , b , d , e ) { void 0 === e && ( e = c . Color . createColor ( 0 , 0 , 0 , 1 , a , b , 0 , d ) ) ; var f , g , h , i = Math . floor ( 6 * a ) , j = 6 * a - i , k = d * ( 1 - b ) , l = d * ( 1 - j * b ) , m = d * ( 1 - ( 1 - j ) * b ) ; switch ( i % 6 ) { case 0 : f = d , g = m , h = k ; break ; case 1 : f = l , g = d , h = k ; break ; case 2 : f = k , g = d , h = m ; break ; case 3 : f = k , g = l , h = d ; break ; case 4 : f = m , g = k , h = d ; break ; case 5 : f = d , g = k , h = l } return e . r = Math . floor ( 255 * f ) , e . g = Math . floor ( 255 * g ) , e . b = Math . floor ( 255 * h ) , c . Color . updateColor ( e ) , e } , hueToColor : function ( a , b , c ) { return 0 > c && ( c += 1 ) , c > 1 && ( c -= 1 ) , 1 / 6 > c ? a + 6 * ( b - a ) * c : . 5 > c ? b : 2 / 3 > c ? a + ( b - a ) * ( 2 / 3 - c ) * 6 : a } , createColor : function ( a , b , d , e , f , g , h , i ) { var j = { r : a || 0 , g : b || 0 , b : d || 0 , a : e || 1 , h : f || 0 , s : g || 0 , l : h || 0 , v : i || 0 , color : 0 , color32 : 0 , rgba : "" } ; return c . Color . updateColor ( j ) } , updateColor : function ( a ) { return a . rgba = "rgba(" + a . r . toString ( ) + "," + a . g . toString ( ) + "," + a . b . toString ( ) + "," + a . a . toString ( ) + ")" , a . color = c . Color . getColor ( a . r , a . g , a . b ) , a . color32 = c . Color . getColor32 ( 255 * a . a , a . r , a . g , a . b ) , a } , getColor32 : function ( a , b , c , d ) { return a << 24 | b << 16 | c << 8 | d } , getColor : function ( a , b , c ) { return a << 16 | b << 8 | c } , RGBtoString : function ( a , b , d , e , f ) { return void 0 === e && ( e = 255 ) , void 0 === f && ( f = "#" ) , "#" === f ? "#" + ( ( 1 << 24 ) + ( a << 16 ) + ( b << 8 ) + d ) . toString ( 16 ) . slice ( 1 ) : "0x" + c . Color . componentToHex ( e ) + c . Color . componentToHex ( a ) + c . Color . componentToHex ( b ) + c . Color . componentToHex ( d ) } , hexToRGB : function ( a ) { var b = c . Color . hexToColor ( a ) ; return b ? c . Color . getColor32 ( b . a , b . r , b . g , b . b ) : void 0 } , hexToColor : function ( a , b ) { a = a . replace ( /^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i , function ( a , b , c , d ) { return b + b + c + c + d + d } ) ; var d = /^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i . exec ( a ) ; if ( d ) { var e = parseInt ( d [ 1 ] , 16 ) , f = parseInt ( d [ 2 ] , 16 ) , g = parseInt ( d [ 3 ] , 16 ) ; b ? ( b . r = e , b . g = f , b . b = g ) : b = c . Color . createColor ( e , f , g ) } return b } , webToColor : function ( a , b ) { b || ( b = c . Color . createColor ( ) ) ; var d = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/ . exec ( a ) ; return d && ( b . r = parseInt ( d [ 1 ] , 10 ) , b . g = parseInt ( d [ 2 ] , 10 ) , b . b = parseInt ( d [ 3 ] , 10 ) , b . a = void 0 !== d [ 4 ] ? parseFloat ( d [ 4 ] ) : 1 , c . Color . updateColor ( b ) ) , b } , valueToColor : function ( a , b ) { if ( b || ( b = c . Color . createColor ( ) ) , "string" == typeof a ) return 0 === a . indexOf ( "rgb" ) ? c . Color . webToColor ( a , b ) : ( b . a = 1 , c . Color . hexToColor ( a , b ) ) ; if ( "number" == typeof a ) { var d = c . Color . getRGB ( a ) ; return b . r = d . r , b . g = d . g , b . b = d . b , b . a = d . a / 255 , b } return b } , componentToHex : function ( a ) { var b = a . toString ( 16 ) ; return 1 == b . length ? "0" + b : b } , HSVColorWheel : function ( a , b ) { void 0 === a && ( a = 1 ) , void 0 === b && ( b = 1 ) ; for ( var d = [ ] , e = 0 ; 359 >= e ; e ++ ) d . push ( c . Color . HSVtoRGB ( e / 359 , a , b ) ) ; return d } , HSLColorWheel : function ( a , b ) { void 0 === a && ( a = . 5 ) , void 0 === b && ( b = . 5 ) ; for ( var d = [ ] , e = 0 ; 359 >= e ; e ++ ) d . push ( c . Color . HSLtoRGB ( e / 359 , a , b ) ) ; return d } , interpolateColor : function ( a , b , d , e , f ) { void 0 === f && ( f = 255 ) ; var g = c . Color . getRGB ( a ) , h = c . Color . getRGB ( b ) , i = ( h . red - g . red ) * e / d + g . red , j = ( h . green - g . green ) * e / d + g . green , k = ( h . blue - g . blue ) * e / d + g . blue ; return c . Color . getColor32 ( f , i , j , k ) } , interpolateColorWithRGB : function ( a , b , d , e , f , g ) { var h = c . Color . getRGB ( a ) , i = ( b - h . red ) * g / f + h . red , j = ( d - h . green ) * g / f + h . green , k = ( e - h . blue ) * g / f + h . blue ; return c . Color . getColor ( i , j , k ) } , interpolateRGB : function ( a , b , d , e , f , g , h , i ) { var j = ( e - a ) * i / h + a , k = ( f - b ) * i / h + b , l = ( g - d ) * i / h + d ; return c . Color . getColor ( j , k , l ) } , getRandomColor : function ( a , b , d ) { if ( void 0 === a && ( a = 0 ) , void 0 === b && ( b = 255 ) , void 0 === d && ( d = 255 ) , b > 255 || a > b ) return c . Color . getColor ( 255 , 255 , 255 ) ; var e = a + Math . round ( Math . random ( ) * ( b - a ) ) , f = a + Math . round ( Math . random ( ) * ( b - a ) ) , g = a
2015-02-25 02:59:00 +00:00
//# sourceMappingURL=phaser-no-physics.map