2016-04-14 12:23:44 +00:00
/* Phaser v2.4.7 - http://phaser.io - @photonstorm - (c) 2016 Photon Storm Ltd. */
2015-02-25 02:59:00 +00:00
2016-04-22 13:45:11 +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 }
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 ) { a . updateTransform ( ) ; 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 . WebGLRenderer . glContextId -- } , b . WebGLRenderer . protot
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 ) { a . updateTransform ( ) , 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 ++ , this . premultipliedAlpha = ! 0 , this . _glTextures = [ ] , this . mipmap = ! 1 , this . _dirty = [ ! 0 , ! 0 , ! 0 , ! 0 ] , a && ( ( this . sourc
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 . random ( ) ; return a . x = this . start . x + b * ( this . end . x - this . start . x ) , a . y = this . start . y + b * ( this . end . y - this . start . y ) , a } , coordinatesOnLine : function ( a , b ) { void 0 === a && ( a = 1 ) , void 0 === b && ( b = [ ] ) ; var c = Math . round ( this . start . x ) , d = Math . round ( this . start . y ) , e = Math . round ( this . end . x ) , f = Math . round ( this . end . y ) ,
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 , this . onShutDownCallback = this . states [ a ] . shutdown || this . dummy , "" !== this . current && this . game . physics . reset ( ) , this . current = a , this . _created = ! 1 , this . onInitCallback . apply ( this . callbackContext , this . _args ) , a === this . _pendingState && ( this . _args = [ ] ) , this . game . _kickstart = ! 0 } , getCurrentState : function ( ) { return this . states [ this . current ] } , loadComplete : function ( ) { this . _created === ! 1 && this . onLoadUpdateCallback && this . onLoadUpdateCallback . call ( this . callbackContext , this . game ) , this . _created === ! 1 && this . onCreateCallback ? ( this . _created = ! 0 , this . onCreateCallback . call ( this . callbackContext , this . game ) ) : this . _created = ! 0 } , pause : function ( ) { this . _created && this . onPausedCallback && this . onPausedCallback . call ( this . callbackContext , this . game ) } , resume : function ( ) { this . _created && this . onResumedCallback && this . onResumedCallback . call ( this . callbackContext , this . game ) } , update : function ( ) { this . _created ? this . onUpdateCallback && this . onUpdateCallback . call ( this . callbackContext , this . game ) : this . onLoadUpdateCallback && this . onLoadUpdateCallback . call ( this . callbackContext , this . game ) } , pauseUpdate : function ( ) { this . _created ? this . onPauseUpdateCallback && this . onPauseUpdateCallback . call ( this . callbackContext , this . game ) : this . onLoadUpdateCallback &
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 = ! 1 , this . antialias = ! 0 , this . preserveDrawingBuffer = ! 1 , this . clearBeforeRender = ! 0 , this . renderer = null , this . renderType = c . AUTO , this . state = null , this . isBooted = ! 1 , this . isRunning = ! 1 , this . raf = null , this . add = null , this . make = null , this . cache = null , this . input = null , this . load = null , this . math = null , this . net = null , this . scale = null , this . sound = null , this . stage = null , this . time = null , this . tweens = null , this . world = null , this . physics = null , this . plugins = null , this . rnd = null , this . device = c . Device , this . camera = null , this . canvas = null , this . context = null , this . debug = null , this . particles = null , this . create = null , this . lockRender = ! 1 , this . stepping = ! 1 , this . pendingStep = ! 1 , this . stepCount = 0 , this . onPause = null , this . onResume = null , this . onBlur = null , this . onFocus = null , this . _paused = ! 1 , this . _codePaused = ! 1 , this . currentUpdateID = 0 , this . updatesThisFrame = 1 , this . _deltaTime = 0 , this . _lastCount = 0 , this . _spiraling = 0 , this . _kickstart = ! 0 , this . fpsProblemNotifier = new c . Signal , this . forceSingleUpdate = ! 0 , this . _nextFpsNotification = 0 , 1 === arguments . length && "object" == typeof arguments [ 0 ] ? this . parseConfig ( arguments [ 0 ] ) : ( this . config = { enableDebug : ! 0 } , "undefined" != typeof a && ( this . _width = a ) , "undefined" != typeof b && ( this . _height = b ) , "undefined" != typeof d && ( this . renderType = d ) , "undefined" != typeof e && ( this . parent = e ) , "undefined" != typeof g && ( this . transparent = g ) , "undefined" != typeof h && ( this . antialias = h ) , this . rnd = new c . RandomDataGenerator ( [ ( Date . now ( ) * Math . random ( ) ) . toString (
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 . 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 . Mouse . FORWARD _BUTTON && this . forwardButton . stop ( b ) , 5 === a && this . eraserButton . stop ( b ) } , updateButtons : function ( a ) { this . button = a . button ; var b = "down" === a . type . toLowerCase ( ) . substr ( - 4 ) ; void 0 !== a . buttons ? b ? this . processButtonsDown ( a . buttons , a ) : this . processButtonsUp ( a . button , a ) : b ? this . leftButton . start ( a ) : ( this . leftButton . stop ( a ) , this . rightButton . stop ( a ) ) , 1 === a . buttons && a . ctrlKey && this . leftButton . isDown && ( this . leftButton . stop ( a ) , this . rightButton . start ( a ) ) , this . isUp = ! 0 , this . isDown = ! 1 , ( this . leftButton . isDown || this . rightButton . isDown || this . middleButton . isDown || this . backButton . isDown || this . forwardButton . isDown || this . eraserButton . isDown ) && ( this . isUp = ! 1 , this . isDown = ! 0 ) } , start : function ( a ) { var b = this . game . input ; return a . pointerId && ( this . pointerId = a . pointerId ) , this . identifier = a . identifier , this . target = a . target , this . isMouse ? this . updateButtons ( a ) : ( this . isDown = ! 0 , this . isUp = ! 1 ) , this . active = ! 0 , this . withinGame = ! 0 , this . dirty = ! 1 , this . _history = [ ] , this . _clickTrampolines = null , this . _trampolineTargetObject = null , this . msSinceLastClick = this . game . time . time - this . timeDown , this . timeDown = this . game . time . time , this . _holdSent = ! 1 , this . move ( a , ! 0 ) , this . positionDown . setTo ( this . x , this . y ) , ( b . multiInputOverride === c . Input . MOUSE _OVERRIDES _TOUCH || b . multiInputOverride === c . Input . MOUSE _TOUCH _COMBINE || b . multiInputOverride === c . Input . TOUCH _OVERRIDES _MOUSE && 0 === b . totalActivePointers ) && ( b . x = this . x , b . y = this . y , b . position . setTo ( this . x , this . y ) , b . onDown . dispatch ( this , a ) , b . resetSpeed ( this . x , this . y ) ) , this . _stateReset = ! 1 , this . totalTouches ++ , null !== this . targetObject && this . targetObject . _touchedHandler ( this ) , this } , update : function ( ) { var a = this . game . input ; t
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 . Gamepad . prototype , "active" , { get : function ( ) { return this . _active } } ) , Object . defineProperty ( c . Gamepad . prototype , "supported" , { get : function ( ) { return this . _gamepadSupportAvailable } } ) , Object . defineProperty ( c . Gamepad . prototype , "padsConnected" , { get : function ( ) { return this . _rawPads . length } } ) , Object . defineProperty ( c . Gamepad . prototype , "pad1" , { get : function ( ) { return this . _gamepads [ 0 ] } } ) , Object . defineProperty ( c . Gamepad . prototype , "pad2" , { get : function ( ) { return this . _gamepads [ 1 ] } } ) , Object . defineProperty ( c . Gamepad . prototype , "pad3" , { get : function ( ) { return this . _gamepads [ 2 ] } } ) , Object . defineProperty ( c . Gamepad . prototype , "pad4" , { get : function ( ) { return this . _gamepads [ 3 ] } } ) , c . Gamepad . BUTTON _0 = 0 , c . Gamepad . BUTTON _1 = 1 , c . Gamepad . BUTTON _2 = 2 , c . Gamepad . BUTTON _3 = 3 , c . Gamepad . BUTTON _4 = 4 , c . Gamepad . BUTTON _5 = 5 , c . Gamepad . BUTTON _6 = 6 , c . Gamepad . BUTTON _7 = 7 , c . Gamepad . BUTTON _8 = 8 , c . Gamepad . BUTTON _9 = 9 , c . Gamepad . BUTTON _10 = 10 , c . Gamepad . BUTTON _11 = 11 , c . Gamepad . BUTTON _12 = 12 , c . Gamepad . BUTTON _13 = 13 , c . Gamepad . BUTTON _14 = 14 , c . Gamepad . BUTTON _15 = 15 , c . Gamepad . AXIS _0 = 0 , c . Gamepad . AXIS _1 = 1 , c . Gamepad . AXIS _2 = 2 , c . Gamepad . AXIS _3 = 3 , c . Gamepad . AXIS _4 = 4 , c . Gamepad . AXIS _5 = 5 , c . Gamepad . AXIS _6 = 6 , c . Gamepad . AXIS _7 = 7 , c . Gamepad . AXIS _8 = 8 , c . Gamepad . AXIS _9 = 9 , c . Gamepad . XBOX360 _A = 0 , c . Gamepad . XBOX360 _B = 1 , c . Gamepad . XBOX360 _X = 2 , c . Gamepad . XBOX360 _Y = 3 , c . Gamepad . XBOX360 _LEFT _BUMPER = 4 , c . Gamepad . XBOX360 _RIGHT _BUMPER = 5 , c . Gamepad . XBOX360 _LEFT _TRIGGER = 6 , c . Gamepad . XBOX360 _RIGHT _TRIGGER = 7 , c . Gamepad . XBOX360 _BACK = 8 , c . Gamepad . XBOX360 _START = 9 , c . Gamepad . XBOX360 _STICK _LEFT _BUTTON = 10 , c . Gamepad . XBOX360 _STICK _RIGHT _BUTTON = 11 , c . Gamepad . XBOX360 _DPAD _LEFT = 14 , c . Gamepad . XBOX360 _DPAD _RIGHT = 15 , c . Gamepad . XBOX360 _DPAD _UP = 12 , c . Gamepad . XBOX360 _DPAD _DOWN = 13 , c . Gamepad . XBOX360 _STICK _LEFT _X = 0 , c . Gamepad . XBOX360 _STICK _LEFT _Y = 1 , c . Gamepad . XBOX360 _STICK _RIGHT _X = 2 , c . Gamepad . XBOX360 _STICK _RIGHT _Y = 3 , c . Gamepad . PS3XC _X = 0 , c . Gamepad . PS3XC _CIRCLE = 1 , c . Gamepad . PS3XC _SQUARE = 2 , c . Gamepad . PS3XC _TRIANGLE = 3 , c . Gamepad . PS3XC _L1 = 4 , c . Gamepad . PS3XC _R1 = 5 , c . Gamepad . PS3XC _L2 = 6 , c . Gamepad . PS3XC _R2 = 7 , c . Gamepad . PS3XC _SELECT = 8 , c . Gamepad . PS3XC _START = 9 , c . Gamepad . PS3XC _STICK _LEFT _BUTTON = 10 , c . Gamepad . PS3XC _STICK _RIGHT _BUTTON = 11 , c . Gamepad . PS3XC _DPAD _UP = 12 , c . Gamepad . PS3XC _DPAD _DOWN = 13 , c . Gamepad . PS3XC _DPAD _LEFT = 14 , c . Gamepad . PS3XC _DPAD _RIGHT = 15 , c . Gamepad . PS3XC _STICK _LEFT _X = 0 , c . Gamepad . PS3XC _STICK _LEFT _Y = 1 , c . Gamepad . PS3XC _STICK _RIGHT _X = 2 , c . Gamepad . PS3XC _STICK _RIGHT _Y = 3 , c . SinglePad = function ( a , b ) { this . game = a , this . index = null , this . connected = ! 1 , this . callbackContext = this , this . onConnectCallback = null , this . onDisconnectCallback = null , this . onDownCallback = null , this . onUpCallback = null , this . onAxisCallback = null , this . onFloatCallback = null , this . deadZone = . 26 , this . _padParent = b , this . _rawPad = null , this . _prevTimestamp = null , this . _buttons = [ ] , this . _buttonsLen = 0 , this . _axes = [ ] , this . _axesLen = 0 } , c . SinglePad . 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 ) } , getButton : function ( a ) { return this . _buttons [ a ] ? this . _buttons [ a ] : null } , pollStatus : function ( ) { if ( this . connected && this . game . input . enabled && this . game . input . gamepad . enabled && ( ! this . _rawPad . timestamp || this . _rawPad . timestamp !== this . _prevTimestamp ) ) { for ( var a = 0 ; a < this . _buttonsLen ; a ++ ) { var b = isNaN ( this . _rawPad . buttons [ a ] ) ? this . _rawPad . buttons [
} , 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 , e , f ) ) } , tilemap : function ( a , b , d , e , f ) { return new c . Tilemap ( this . game , a , b , d , e , f ) } , renderTexture : function ( a , b , d , e ) { ( void 0 === d || "" === d ) && ( d = this . game . rnd . uuid ( ) ) , void 0 === e && ( e = ! 1 ) ; var f = new c . RenderTexture ( this . game , a , b , d ) ; return e && this . game . cache . addRenderTexture ( d , f ) , f } , video : function ( a , b ) { return new c . Video ( this . game , a , b ) } , bitmapData : function ( a , b , d , e ) { void 0 === e && ( e = ! 1 ) , ( void 0 === d || "" === d ) && ( d = this . game . rnd . uuid ( ) ) ; var f = new c . BitmapData ( this . game , d , a , b ) ; return e && this . game . cache . addBitmapData ( d , f ) , f } , filter : function ( a ) { var b = Array . prototype . slice . call ( arguments , 1 ) , a = new c . Filter [ a ] ( this . game ) ; return a . init . apply ( a , b ) , a } , plugin : function ( a ) { return this . game . plugins . add ( a ) } } , c . GameObjectFactory . prototype . constructor = c . GameObjectFactory , c . GameObjectCreator = function ( a ) { this . game = a , this . world = this . game . world } , c . GameObjectCreator . prototype = { image : function ( a , b , d , e ) { return new c . Image ( this . game , a , b , d , e ) } , sprite : function ( a , b , d , e ) { return new c . Sprite ( this . game , a , b , d , e ) } , tween : function ( a ) { return new c . Tween ( a , this . game , this . game . tweens ) } , group : function ( a , b , d , e , f ) { return new c . Group ( this . game , a , b , d , e , f ) } , spriteBatch : function ( a , b , d ) { return 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 ) } , audioSprite : function ( a ) { return this . game . sound . addSprite ( a ) } , sound : function ( a , b , c , d ) { return this . game . sound . add ( a , b , c , d ) } , tileSprite : function ( a , b , d , e , f , g ) { return new c . TileSprite ( this . game , a , b , d , e , f , g ) } , rope : function ( a , b , d , e , f ) { return new c . Rope ( this . game , a , b , d , e , f ) } , text : function ( a , b , d , e ) { return new c . Text ( this . game , a , b , d , e ) } , button : function ( a , b , d , e , f , g , h , i , j ) { return new c . Button ( this . game , a , b , d , e , f , g , h , i , j ) } , graphics : function ( a , b ) { return new c . Graphics ( this . game , a , b ) } , emitter : function ( a , b , d ) { return 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 new c . BitmapText ( this . game , a , b , d , e , f , g ) } , tilemap : function ( a , b , d , e , f ) { return new c . Tilemap ( this . game , a , b , d , e , f ) } , renderTexture : function ( a , b , d , e ) { ( void 0 === d || "" === d ) && ( d = this . game . rnd . uuid ( ) ) , void 0 === e && ( e = ! 1 ) ; var f = new c . RenderTexture ( this . game , a , b , d ) ; return e && this . game . cache . addRenderTexture ( d , f ) , f } , bitmapData : function ( a , b , d , e ) { void 0 === e && ( e = ! 1 ) , ( void 0 === d || "" === d ) && ( d = this . game . rnd . uuid ( ) ) ; var f = new c . BitmapData ( this . game , d , a , b ) ; return e && this . game . cache . addBitmapData ( d , f ) , f } , filter : function ( a ) { var b = Array . prototype . slice . call ( arguments , 1 ) , a = new c . Filter [ a ] ( this . game ) ; return a . init . apply ( a , b ) , a } } , c . GameObjectCreator . prototype . constructor = c . GameObjectCreator , c . Sprite = function ( a , b , d , e , f ) { b = b || 0 , d = d || 0 , e = e || null , f = f || null , this . type = c . SPRITE , this . physicsType = c . SPRITE , PIXI . Sprite . call ( this , PIXI . TextureCache . _ _default ) , c . Component . Core . init . call ( this , a , b , d , e , f ) } , c . Sprite . prototype = Object . create ( PIXI . Sprite . prototype ) , c . Sprite . prototype . constructor = c . Sprite , c . Component . Core . install . call ( c . Sprite . prototype , [ "Angle" , "Animation" , "AutoCull" , "Bounds" , "BringToTop" , "Crop" , "Delta" , "Destroy" , "FixedToCamera" , "Health" , "InCamera" , "InputEnabled" , "InWorld" , "LifeSpan" , "LoadTexture" , "Overlap" , "PhysicsBody" , "Reset" , "ScaleMinMax" , "Smoothed" ] ) , c . Sprite . prototype . preUpdatePhysics = c . Component . PhysicsBody . preUpdate , c . Sprite . prototype . preUpdateLifeSpan = c . Component . LifeSpan . preUpdate , c . Sprite . prototype . preUpdateInWorld = c . Component . InWorld . preUpdate , c . Sprite . prototype . preUpdateCore = c . Component . Core . preUpdate , c . Sprite . prototype . preUpdate = function ( ) { return this . preUpdatePhysics ( ) && this . preUpdateLifeSpan ( ) && this . preUpdateInWorld ( ) ? this . preUpdateCore ( ) : ! 1 } , c . Image = function ( a , b , d , e , f ) { b = b || 0 , d = d || 0 , e = e || null , f = f || null , this .
var d = b [ c ] ; if ( d . fill && d . shape && d . shape . contains ( tempPoint . x , tempPoint . y ) ) return ! 0 } return ! 1 } , PIXI . Graphics . prototype . updateLocalBounds = function ( ) { var a = 1 / 0 , b = - ( 1 / 0 ) , d = 1 / 0 , e = - ( 1 / 0 ) ; if ( this . graphicsData . length ) for ( var f , g , h , i , j , k , l = 0 ; l < this . graphicsData . length ; l ++ ) { var m = this . graphicsData [ l ] , n = m . type , o = m . lineWidth ; if ( f = m . shape , n === PIXI . Graphics . RECT || n === PIXI . Graphics . RREC ) h = f . x - o / 2 , i = f . y - o / 2 , j = f . width + o , k = f . height + o , a = a > h ? h : a , b = h + j > b ? h + j : b , d = d > i ? i : d , e = i + k > e ? i + k : e ; else if ( n === PIXI . Graphics . CIRC ) h = f . x , i = f . y , j = f . radius + o / 2 , k = f . radius + o / 2 , a = a > h - j ? h - j : a , b = h + j > b ? h + j : b , d = d > i - k ? i - k : d , e = i + k > e ? i + k : e ; else if ( n === PIXI . Graphics . ELIP ) h = f . x , i = f . y , j = f . width + o / 2 , k = f . height + o / 2 , a = a > h - j ? h - j : a , b = h + j > b ? h + j : b , d = d > i - k ? i - k : d , e = i + k > e ? i + k : e ; else { g = f . points ; for ( var p = 0 ; p < g . length ; p ++ ) g [ p ] instanceof c . Point ? ( h = g [ p ] . x , i = g [ p ] . y ) : ( h = g [ p ] , i = g [ p + 1 ] , p < g . length - 1 && p ++ ) , a = a > h - o ? h - o : a , b = h + o > b ? h + o : b , d = d > i - o ? i - o : d , e = i + o > e ? i + o : e } } else a = 0 , b = 0 , d = 0 , e = 0 ; var q = this . boundsPadding ; this . _localBounds . x = a - q , this . _localBounds . width = b - a + 2 * q , this . _localBounds . y = d - q , this . _localBounds . height = e - d + 2 * q } , PIXI . Graphics . prototype . _generateCachedSprite = function ( ) { var a = this . getLocalBounds ( ) ; if ( this . _cachedSprite ) this . _cachedSprite . buffer . resize ( a . width , a . height ) ; else { var b = new PIXI . CanvasBuffer ( a . width , a . height ) , c = PIXI . Texture . fromCanvas ( b . canvas ) ; this . _cachedSprite = new PIXI . Sprite ( c ) , this . _cachedSprite . buffer = b , this . _cachedSprite . worldTransform = this . worldTransform } this . _cachedSprite . anchor . x = - ( a . x / a . width ) , this . _cachedSprite . anchor . y = - ( a . y / a . height ) , this . _cachedSprite . buffer . context . translate ( - a . x , - a . y ) , this . worldAlpha = 1 , PIXI . CanvasGraphics . renderGraphics ( this , this . _cachedSprite . buffer . context ) , this . _cachedSprite . alpha = this . alpha } , PIXI . Graphics . prototype . updateCachedSpriteTexture = function ( ) { var a = this . _cachedSprite , b = a . texture , c = a . buffer . canvas ; b . baseTexture . width = c . width , b . baseTexture . height = c . height , b . crop . width = b . frame . width = c . width , b . crop . height = b . frame . height = c . height , a . _width = c . width , a . _height = c . height , b . baseTexture . dirty ( ) } , PIXI . Graphics . prototype . destroyCachedSprite = function ( ) { this . _cachedSprite . texture . destroy ( ! 0 ) , this . _cachedSprite = null } , PIXI . Graphics . prototype . drawShape = function ( a ) { this . currentPath && this . currentPath . shape . points . length <= 2 && this . graphicsData . pop ( ) , this . currentPath = null , a instanceof c . Polygon && ( a = a . clone ( ) , a . flatten ( ) ) ; var b = new PIXI . GraphicsData ( this . lineWidth , this . lineColor , this . lineAlpha , this . fillColor , this . fillAlpha , this . filling , a ) ; return this . graphicsData . push ( b ) , b . type === PIXI . Graphics . POLY && ( b . shape . closed = this . filling , this . currentPath = b ) , this . dirty = ! 0 , b } , Object . defineProperty ( PIXI . Graphics . prototype , "cacheAsBitmap" , { get : function ( ) { return this . _cacheAsBitmap } , set : function ( a ) { this . _cacheAsBitmap = a , this . _cacheAsBitmap ? this . _generateCachedSprite ( ) : this . destroyCachedSprite ( ) , this . dirty = ! 0 , this . webGLDirty = ! 0 } } ) , PIXI . GraphicsData = function ( a , b , c , d , e , f , g ) { this . lineWidth = a , this . lineColor = b , this . lineAlpha = c , this . _lineTint = b , this . fillColor = d , this . fillAlpha = e , this . _fillTint = d , this . fill = f , this . shape = g , this . type = g . type } , PIXI . GraphicsData . prototype . constructor = PIXI . GraphicsData , PIXI . GraphicsData . prototype . clone = function ( ) { return new GraphicsData ( this . lineWidth , this . lineColor , this . lineAlpha , this . fillColor , this . fillAlpha , this . fill , this . shape ) } , PIXI . PolyK = { } , PIXI . PolyK . Triangulate = function ( a ) { var b = ! 0 , c = a . length >> 1 ; if ( 3 > c ) return [ ] ; for ( var d = [ ] , e = [ ] , f = 0 ; c > f ; f ++ ) e . push ( f ) ; f = 0 ; for ( var g = c ; g > 3 ; ) { var h = e [ ( f + 0 ) % g ] , i = e [ ( f + 1 ) % g ] , j = e [ ( f + 2 ) % g ] , k = a [ 2 * h ] , l = a [ 2 * h + 1 ] , m = a [ 2 * i ] , n = a [ 2 * i + 1 ] , o = a [ 2 * j ] , p = a [ 2 * j + 1 ] , q = ! 1 ; if ( PIXI . PolyK . _convex ( k , l , m , n , o , p , b ) ) { q = ! 0 ; for ( var r = 0 ; g > r ; r ++ ) { var s = e [ r ] ; if ( s !== h && s !== i && s !== j && PIXI . PolyK . _PointInTriangle ( a [ 2 * s ] , a [ 2 * s + 1 ] , k , l , m , n , o , p ) ) { q = ! 1 ; break } } } if ( q ) d . push ( h , i , j ) , e . splice ( ( f + 1 ) % g , 1 ) , g -- , f = 0 ; else if ( f ++ > 3 * g ) { if ( ! b ) return null ; for ( d = [ ] , e = [ ] , f = 0 ; c > f ; f ++ ) e . push ( f ) ; f = 0 , g = c , b = ! 1 } } return d . push ( e [ 0 ] , e [ 1 ] , e [ 2 ] ) , d } , PIXI . PolyK . _PointInTriangle = function ( a , b , c , d , e , f , g , h ) { var i = g - c , j = h - d , k = e - c , l = f - d , m = a - c , n = b - d , o = i * i + j * j , p = i * k + j * l , q = i * m + j * n , r = k * k + l * l , s = k * m + l * n , t = 1 / ( o * r - p * p ) , u = ( r * q - p * s ) * t , v = ( o * s - p * q ) * t ; return u >= 0 && v >= 0 && 1 > u + v } , PIXI . PolyK . _convex = function ( a , b , c
var e = a [ d ] ; if ( this . fontWeights . length > 0 || this . fontStyles . length > 0 ) { var f = this . fontToComponents ( this . context . font ) ; this . fontStyles [ this . _charCount ] && ( f . fontStyle = this . fontStyles [ this . _charCount ] ) , this . fontWeights [ this . _charCount ] && ( f . fontWeight = this . fontWeights [ this . _charCount ] ) , this . context . font = this . componentsToFont ( f ) } this . style . stroke && this . style . strokeThickness && ( this . strokeColors [ this . _charCount ] && ( this . context . strokeStyle = this . strokeColors [ this . _charCount ] ) , this . updateShadow ( this . style . shadowStroke ) , this . context . strokeText ( e , b , c ) ) , this . style . fill && ( this . colors [ this . _charCount ] && ( this . context . fillStyle = this . colors [ this . _charCount ] ) , this . updateShadow ( this . style . shadowFill ) , this . context . fillText ( e , b , c ) ) , b += this . context . measureText ( e ) . width , this . _charCount ++ } } , c . Text . prototype . clearColors = function ( ) { return this . colors = [ ] , this . strokeColors = [ ] , this . dirty = ! 0 , this } , c . Text . prototype . clearFontValues = function ( ) { return this . fontStyles = [ ] , this . fontWeights = [ ] , this . dirty = ! 0 , this } , c . Text . prototype . addColor = function ( a , b ) { return this . colors [ b ] = a , this . dirty = ! 0 , this } , c . Text . prototype . addStrokeColor = function ( a , b ) { return this . strokeColors [ b ] = a , this . dirty = ! 0 , this } , c . Text . prototype . addFontStyle = function ( a , b ) { return this . fontStyles [ b ] = a , this . dirty = ! 0 , this } , c . Text . prototype . addFontWeight = function ( a , b ) { return this . fontWeights [ b ] = a , this . dirty = ! 0 , this } , c . Text . prototype . precalculateWordWrap = function ( a ) { this . texture . baseTexture . resolution = this . _res , this . context . font = this . style . font ; var b = this . runWordWrap ( a ) ; return b . split ( /(?:\r\n|\r|\n)/ ) } , c . Text . prototype . runWordWrap = function ( a ) { return this . useAdvancedWrap ? this . advancedWordWrap ( a ) : this . basicWordWrap ( a ) } , c . Text . prototype . advancedWordWrap = function ( a ) { for ( var b = this . context , c = this . style . wordWrapWidth , d = "" , e = a . replace ( / +/gi , " " ) . split ( /\r?\n/gi ) , f = e . length , g = 0 ; f > g ; g ++ ) { var h = e [ g ] , i = "" ; h = h . replace ( /^ *|\s*$/gi , "" ) ; var j = b . measureText ( h ) . width ; if ( c > j ) d += h + "\n" ; else { for ( var k = c , l = h . split ( " " ) , m = 0 ; m < l . length ; m ++ ) { var n = l [ m ] , o = n + " " , p = b . measureText ( o ) . width ; if ( p > k ) { if ( 0 === m ) { for ( var q = o ; q . length && ( q = q . slice ( 0 , - 1 ) , p = b . measureText ( q ) . width , ! ( k >= p ) ) ; ) ; if ( ! q . length ) throw new Error ( "This text's wordWrapWidth setting is less than a single character!" ) ; var r = n . substr ( q . length ) ; l [ m ] = r , i += q } var s = l [ m ] . length ? m : m + 1 , t = l . slice ( s ) . join ( " " ) . replace ( /[ \n]*$/gi , "" ) ; e [ g + 1 ] = t + " " + ( e [ g + 1 ] || "" ) , f = e . length ; break } i += o , k -= p } d += i . replace ( /[ \n]*$/gi , "" ) + "\n" } } return d = d . replace ( /[\s|\n]*$/gi , "" ) } , c . Text . prototype . basicWordWrap = function ( a ) { for ( var b = "" , c = a . split ( "\n" ) , d = 0 ; d < c . length ; d ++ ) { for ( var e = this . style . wordWrapWidth , f = c [ d ] . split ( " " ) , g = 0 ; g < f . length ; g ++ ) { var h = this . context . measureText ( f [ g ] ) . width , i = h + this . context . measureText ( " " ) . width ; i > e ? ( g > 0 && ( b += "\n" ) , b += f [ g ] + " " , e = this . style . wordWrapWidth - h ) : ( e -= i , b += f [ g ] + " " ) } d < c . length - 1 && ( b += "\n" ) } return b } , c . Text . prototype . updateFont = function ( a ) { var b = this . componentsToFont ( a ) ; this . style . font !== b && ( this . style . font = b , this . dirty = ! 0 , this . parent && this . updateTransform ( ) ) } , c . Text . prototype . fontToComponents = function ( a ) { var b = a . match ( /^\s*(?:\b(normal|italic|oblique|inherit)?\b)\s*(?:\b(normal|small-caps|inherit)?\b)\s*(?:\b(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit)?\b)\s*(?:\b(xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller|0|\d*(?:[.]\d*)?(?:%|[a-z]{2,5}))?\b)\s*(.*)\s*$/ ) ; if ( b ) { var c = b [ 5 ] . trim ( ) ; return /^(?:inherit|serif|sans-serif|cursive|fantasy|monospace)$/ . exec ( c ) || /['",]/ . exec ( c ) || ( c = "'" + c + "'" ) , { font : a , fontStyle : b [ 1 ] || "normal" , fontVariant : b [ 2 ] || "normal" , fontWeight : b [ 3 ] || "normal" , fontSize : b [ 4 ] || "medium" , fontFamily : c } } return console . warn ( "Phaser.Text - unparsable CSS font: " + a ) , { font : a } } , c . Text . prototype . componentsToFont = function ( a ) { var b , c = [ ] ; return b = a . fontStyle , b && "normal" !== b && c . push ( b ) , b = a . fontVariant , b && "normal" !== b && c . push ( b ) , b = a . fontWeight , b && "normal" !== b && c . push ( b ) , b = a . fontSize , b && "medium" !== b && c . push ( b ) , b = a . fontFamily , b && c . push ( b ) , c . length || c . push ( a . font ) , c . join ( " " ) } , c . Text . prototype . setText = function ( a ) { return this . text = a . toString ( ) || "" , this . dirty = ! 0 , this } , c . Text . prototype . parseList = function ( a ) { if ( ! Array . isArray ( a ) ) retu
l . trident = ! 0 , l . tridentVersion = parseInt ( RegExp . $1 , 10 ) , l . ieVersion = parseInt ( RegExp . $3 , 10 ) ) , /Silk/ . test ( a ) && ( l . silk = ! 0 ) , navigator . standalone && ( l . webApp = ! 0 ) , "undefined" != typeof window . cordova && ( l . cordova = ! 0 ) , "undefined" != typeof process && "undefined" != typeof require && ( l . node = ! 0 ) , l . node && "object" == typeof process . versions && ( l . nodeWebkit = ! ! process . versions [ "node-webkit" ] , l . electron = ! ! process . versions . electron ) , navigator . isCocoonJS && ( l . cocoonJS = ! 0 ) , l . cocoonJS ) try { l . cocoonJSApp = "undefined" != typeof CocoonJS } catch ( b ) { l . cocoonJSApp = ! 1 } "undefined" != typeof window . ejecta && ( l . ejecta = ! 0 ) , /Crosswalk/ . test ( a ) && ( l . crosswalk = ! 0 ) } function f ( ) { var a = document . createElement ( "video" ) , b = ! 1 ; try { ( b = ! ! a . canPlayType ) && ( a . canPlayType ( 'video/ogg; codecs="theora"' ) . replace ( /^no$/ , "" ) && ( l . oggVideo = ! 0 ) , a . canPlayType ( 'video/mp4; codecs="avc1.42E01E"' ) . replace ( /^no$/ , "" ) && ( l . h264Video = ! 0 , l . mp4Video = ! 0 ) , a . canPlayType ( 'video/webm; codecs="vp8, vorbis"' ) . replace ( /^no$/ , "" ) && ( l . webmVideo = ! 0 ) , a . canPlayType ( 'video/webm; codecs="vp9"' ) . replace ( /^no$/ , "" ) && ( l . vp9Video = ! 0 ) , a . canPlayType ( 'application/x-mpegURL; codecs="avc1.42E01E"' ) . replace ( /^no$/ , "" ) && ( l . hlsVideo = ! 0 ) ) } catch ( c ) { } } function g ( ) { l . audioData = ! ! window . Audio , l . webAudio = ! ( ! window . AudioContext && ! window . webkitAudioContext ) ; var a = document . createElement ( "audio" ) , b = ! 1 ; try { if ( ( b = ! ! a . canPlayType ) && ( a . canPlayType ( 'audio/ogg; codecs="vorbis"' ) . replace ( /^no$/ , "" ) && ( l . ogg = ! 0 ) , ( a . canPlayType ( 'audio/ogg; codecs="opus"' ) . replace ( /^no$/ , "" ) || a . canPlayType ( "audio/opus;" ) . replace ( /^no$/ , "" ) ) && ( l . opus = ! 0 ) , a . canPlayType ( "audio/mpeg;" ) . replace ( /^no$/ , "" ) && ( l . mp3 = ! 0 ) , a . canPlayType ( 'audio/wav; codecs="1"' ) . replace ( /^no$/ , "" ) && ( l . wav = ! 0 ) , ( a . canPlayType ( "audio/x-m4a;" ) || a . canPlayType ( "audio/aac;" ) . replace ( /^no$/ , "" ) ) && ( l . m4a = ! 0 ) , a . canPlayType ( 'audio/webm; codecs="vorbis"' ) . replace ( /^no$/ , "" ) && ( l . webm = ! 0 ) , "" !== a . canPlayType ( 'audio/mp4;codecs="ec-3"' ) ) ) if ( l . edge ) l . dolby = ! 0 ; else if ( l . safari && l . safariVersion >= 9 && /Mac OS X (\d+)_(\d+)/ . test ( navigator . userAgent ) ) { var c = parseInt ( RegExp . $1 , 10 ) , d = parseInt ( RegExp . $2 , 10 ) ; ( 10 === c && d >= 11 || c > 10 ) && ( l . dolby = ! 0 ) } } catch ( e ) { } } function h ( ) { l . pixelRatio = window . devicePixelRatio || 1 , l . iPhone = - 1 != navigator . userAgent . toLowerCase ( ) . indexOf ( "iphone" ) , l . iPhone4 = 2 == l . pixelRatio && l . iPhone , l . iPad = - 1 != navigator . userAgent . toLowerCase ( ) . indexOf ( "ipad" ) , "undefined" != typeof Int8Array ? l . typedArray = ! 0 : l . typedArray = ! 1 , "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array && "undefined" != typeof Uint32Array && ( l . littleEndian = i ( ) , l . LITTLE _ENDIAN = l . littleEndian ) , l . support32bit = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8ClampedArray && "undefined" != typeof Int32Array && null !== l . littleEndian && j ( ) , navigator . vibrate = navigator . vibrate || navigator . webkitVibrate || navigator . mozVibrate || navigator . msVibrate , navigator . vibrate && ( l . vibration = ! 0 ) } function i ( ) { var a = new ArrayBuffer ( 4 ) , b = new Uint8Array ( a ) , c = new Uint32Array ( a ) ; return b [ 0 ] = 161 , b [ 1 ] = 178 , b [ 2 ] = 195 , b [ 3 ] = 212 , 3569595041 == c [ 0 ] ? ! 0 : 2712847316 == c [ 0 ] ? ! 1 : null } function j ( ) { if ( void 0 === Uint8ClampedArray ) return ! 1 ; var a = PIXI . CanvasPool . create ( this , 1 , 1 ) , b = a . getContext ( "2d" ) ; if ( ! b ) return ! 1 ; var c = b . createImageData ( 1 , 1 ) ; return PIXI . CanvasPool . remove ( this ) , c . data instanceof Uint8ClampedArray } function k ( ) { var a , b = document . createElement ( "p" ) , c = { webkitTransform : "-webkit-transform" , OTransform : "-o-transform" , msTransform : "-ms-transform" , MozTransform : "-moz-transform" , transform : "transform" } ; document . body . insertBefore ( b , null ) ; for ( var d in c ) void 0 !== b . style [ d ] && ( b . style [ d ] = "translate3d(1px,1px,1px)" , a = window . getComputedStyle ( b ) . getPropertyValue ( c [ d ] ) ) ; document . body . removeChild ( b ) , l . css3D = void 0 !== a && a . length > 0 && "none" !== a } var l = this ; a ( ) , e ( ) , g ( ) , f ( ) , k ( ) , h ( ) , b ( ) , d ( ) , c ( ) } , c . Device . canPlayAudio = function ( a ) { return "mp3" === a && this . mp3 ? ! 0 : "ogg" === a && ( this . ogg || this . opus ) ? ! 0 : "m4a" === a && this . m4a ? ! 0 : "opus" === a && this . opus ? ! 0 : "wav" === a && this . wav ? ! 0 : "webm" === a && this . webm ? ! 0 : "mp4" === a && this . dolby ? ! 0 : ! 1 } , c . Device . canPlayVideo = function ( a ) { return "webm" === a && ( this . webmVideo || this . vp9Video ) ? ! 0 : "mp4" === a && ( this . mp4Video || this . h264Video ) ? ! 0 : "ogg" !== a && "ogv" !== a || ! this . oggVideo ? "mpeg" === a && this . hlsVideo ? ! 0 : ! 1 : !
} , InOut : function ( a ) { return 0 === a ? 0 : 1 === a ? 1 : . 5 * ( 1 - Math . cos ( Math . PI * a ) ) } } , Exponential : { In : function ( a ) { return 0 === a ? 0 : Math . pow ( 1024 , a - 1 ) } , Out : function ( a ) { return 1 === a ? 1 : 1 - Math . pow ( 2 , - 10 * a ) } , InOut : function ( a ) { return 0 === a ? 0 : 1 === a ? 1 : ( a *= 2 ) < 1 ? . 5 * Math . pow ( 1024 , a - 1 ) : . 5 * ( - Math . pow ( 2 , - 10 * ( a - 1 ) ) + 2 ) } } , Circular : { In : function ( a ) { return 1 - Math . sqrt ( 1 - a * a ) } , Out : function ( a ) { return Math . sqrt ( 1 - -- a * a ) } , InOut : function ( a ) { return ( a *= 2 ) < 1 ? - . 5 * ( Math . sqrt ( 1 - a * a ) - 1 ) : . 5 * ( Math . sqrt ( 1 - ( a -= 2 ) * a ) + 1 ) } } , Elastic : { In : function ( a ) { var b , c = . 1 , d = . 4 ; return 0 === a ? 0 : 1 === a ? 1 : ( ! c || 1 > c ? ( c = 1 , b = d / 4 ) : b = d * Math . asin ( 1 / c ) / ( 2 * Math . PI ) , - ( c * Math . pow ( 2 , 10 * ( a -= 1 ) ) * Math . sin ( ( a - b ) * ( 2 * Math . PI ) / d ) ) ) } , Out : function ( a ) { var b , c = . 1 , d = . 4 ; return 0 === a ? 0 : 1 === a ? 1 : ( ! c || 1 > c ? ( c = 1 , b = d / 4 ) : b = d * Math . asin ( 1 / c ) / ( 2 * Math . PI ) , c * Math . pow ( 2 , - 10 * a ) * Math . sin ( ( a - b ) * ( 2 * Math . PI ) / d ) + 1 ) } , InOut : function ( a ) { var b , c = . 1 , d = . 4 ; return 0 === a ? 0 : 1 === a ? 1 : ( ! c || 1 > c ? ( c = 1 , b = d / 4 ) : b = d * Math . asin ( 1 / c ) / ( 2 * Math . PI ) , ( a *= 2 ) < 1 ? - . 5 * ( c * Math . pow ( 2 , 10 * ( a -= 1 ) ) * Math . sin ( ( a - b ) * ( 2 * Math . PI ) / d ) ) : c * Math . pow ( 2 , - 10 * ( a -= 1 ) ) * Math . sin ( ( a - b ) * ( 2 * Math . PI ) / d ) * . 5 + 1 ) } } , Back : { In : function ( a ) { var b = 1.70158 ; return a * a * ( ( b + 1 ) * a - b ) } , Out : function ( a ) { var b = 1.70158 ; return -- a * a * ( ( b + 1 ) * a + b ) + 1 } , InOut : function ( a ) { var b = 2.5949095 ; return ( a *= 2 ) < 1 ? . 5 * ( a * a * ( ( b + 1 ) * a - b ) ) : . 5 * ( ( a -= 2 ) * a * ( ( b + 1 ) * a + b ) + 2 ) } } , Bounce : { In : function ( a ) { return 1 - c . Easing . Bounce . Out ( 1 - a ) } , Out : function ( a ) { return 1 / 2.75 > a ? 7.5625 * a * a : 2 / 2.75 > a ? 7.5625 * ( a -= 1.5 / 2.75 ) * a + . 75 : 2.5 / 2.75 > a ? 7.5625 * ( a -= 2.25 / 2.75 ) * a + . 9375 : 7.5625 * ( a -= 2.625 / 2.75 ) * a + . 984375 } , InOut : function ( a ) { return . 5 > a ? . 5 * c . Easing . Bounce . In ( 2 * a ) : . 5 * c . Easing . Bounce . Out ( 2 * a - 1 ) + . 5 } } } , c . Easing . Default = c . Easing . Linear . None , c . Easing . Power0 = c . Easing . Linear . None , c . Easing . Power1 = c . Easing . Quadratic . Out , c . Easing . Power2 = c . Easing . Cubic . Out , c . Easing . Power3 = c . Easing . Quartic . Out , c . Easing . Power4 = c . Easing . Quintic . Out , c . Time = function ( a ) { this . game = a , this . time = 0 , this . prevTime = 0 , this . now = 0 , this . elapsed = 0 , this . elapsedMS = 0 , this . physicsElapsed = 1 / 60 , this . physicsElapsedMS = 1 / 60 * 1e3 , this . desiredFpsMult = 1 / 60 , this . _desiredFps = 60 , this . suggestedFps = this . desiredFps , this . slowMotion = 1 , this . advancedTiming = ! 1 , this . frames = 0 , this . fps = 0 , this . fpsMin = 1e3 , this . fpsMax = 0 , this . msMin = 1e3 , this . msMax = 0 , this . pauseDuration = 0 , this . timeToCall = 0 , this . timeExpected = 0 , this . events = new c . Timer ( this . game , ! 1 ) , this . _frameCount = 0 , this . _elapsedAccumulator = 0 , this . _started = 0 , this . _timeLastSecond = 0 , this . _pauseStarted = 0 , this . _justResumed = ! 1 , this . _timers = [ ] } , c . Time . prototype = { boot : function ( ) { this . _started = Date . now ( ) , this . time = Date . now ( ) , this . events . start ( ) , this . timeExpected = this . time } , add : function ( a ) { return this . _timers . push ( a ) , a } , create : function ( a ) { void 0 === a && ( a = ! 0 ) ; var b = new c . Timer ( this . game , a ) ; return this . _timers . push ( b ) , b } , removeAll : function ( ) { for ( var a = 0 ; a < this . _timers . length ; a ++ ) this . _timers [ a ] . destroy ( ) ; this . _timers = [ ] , this . events . removeAll ( ) } , refresh : function ( ) { var a = this . time ; this . time = Date . now ( ) , this . elapsedMS = this . time - a } , update : function ( a ) { var b = this . time ; this . time = Date . now ( ) , this . elapsedMS = this . time - b , this . prevTime = this . now , this . now = a , this . elapsed = this . now - this . prevTime , this . game . raf . _isSetTimeOut && ( this . timeToCall = Math . floor ( Math . max ( 0 , 1e3 / this . _desiredFps - ( this . timeExpected - a ) ) ) , this . timeExpected = a + this . timeToCall ) , this . advancedTiming && this . updateAdvancedTiming ( ) , this . game . paused || ( this . events . update ( this . time ) , this . _timers . length && this . updateTimers ( ) ) } , updateTimers : function ( ) { for ( var a = 0 , b = this . _timers . length ; b > a ; ) this . _timers [ a ] . update ( this . time ) ? a ++ : ( this . _timers . splice ( a , 1 ) , b -- ) } , updateAdvancedTiming : function ( ) { this . _frameCount ++ , this . _elapsedAccumulator += this . elapsed , this . _frameCount >= 2 * this . _desiredFps && ( this . suggestedFps = 5 * Math . floor ( 200 / ( this . _elapsedAccumulator / this . _frameCount ) ) , this . _frameCount = 0 , this . _elapsedAccumulator = 0 ) , this . msMin = Math . min ( this . msMin , this . elapsed ) , this . msMax = Math . max ( this . msMax , this . elapsed ) , this . frames ++ , this . now > this . _timeLastSecond + 1e3 && ( this . fps = Math . round ( 1e3 * this . frames / ( this . now - this . _timeLastSecond ) ) , this . fpsMin = Math . min ( this . fpsMin , this . fps ) , this . fpsMax = Math . max ( this . fpsMax , this . fps ) , this . _timeLastSecond = this . now , this . frames = 0 ) } , gamePaused : function ( ) { this . _pauseStart
return this . checkKey ( c . Cache . SOUND , a ) } , checkTextKey : function ( a ) { return this . checkKey ( c . Cache . TEXT , a ) } , checkPhysicsKey : function ( a ) { return this . checkKey ( c . Cache . PHYSICS , a ) } , checkTilemapKey : function ( a ) { return this . checkKey ( c . Cache . TILEMAP , a ) } , checkBinaryKey : function ( a ) { return this . checkKey ( c . Cache . BINARY , a ) } , checkBitmapDataKey : function ( a ) { return this . checkKey ( c . Cache . BITMAPDATA , a ) } , checkBitmapFontKey : function ( a ) { return this . checkKey ( c . Cache . BITMAPFONT , a ) } , checkJSONKey : function ( a ) { return this . checkKey ( c . Cache . JSON , a ) } , checkXMLKey : function ( a ) { return this . checkKey ( c . Cache . XML , a ) } , checkVideoKey : function ( a ) { return this . checkKey ( c . Cache . VIDEO , a ) } , checkShaderKey : function ( a ) { return this . checkKey ( c . Cache . SHADER , a ) } , checkRenderTextureKey : function ( a ) { return this . checkKey ( c . Cache . RENDER _TEXTURE , a ) } , getItem : function ( a , b , c , d ) { return this . checkKey ( b , a ) ? void 0 === d ? this . _cacheMap [ b ] [ a ] : this . _cacheMap [ b ] [ a ] [ d ] : ( c && console . warn ( "Phaser.Cache." + c + ': Key "' + a + '" not found in Cache.' ) , null ) } , getCanvas : function ( a ) { return this . getItem ( a , c . Cache . CANVAS , "getCanvas" , "canvas" ) } , getImage : function ( a , b ) { ( void 0 === a || null === a ) && ( a = "__default" ) , void 0 === b && ( b = ! 1 ) ; var d = this . getItem ( a , c . Cache . IMAGE , "getImage" ) ; return null === d && ( d = this . getItem ( "__missing" , c . Cache . IMAGE , "getImage" ) ) , b ? d : d . data } , getTextureFrame : function ( a ) { return this . getItem ( a , c . Cache . TEXTURE , "getTextureFrame" , "frame" ) } , getSound : function ( a ) { return this . getItem ( a , c . Cache . SOUND , "getSound" ) } , getSoundData : function ( a ) { return this . getItem ( a , c . Cache . SOUND , "getSoundData" , "data" ) } , getText : function ( a ) { return this . getItem ( a , c . Cache . TEXT , "getText" , "data" ) } , getPhysicsData : function ( a , b , d ) { var e = this . getItem ( a , c . Cache . PHYSICS , "getPhysicsData" , "data" ) ; if ( null === e || void 0 === b || null === b ) return e ; if ( e [ b ] ) { var f = e [ b ] ; if ( ! f || ! d ) return f ; for ( var g in f ) if ( g = f [ g ] , g . fixtureKey === d ) return g ; console . warn ( 'Phaser.Cache.getPhysicsData: Could not find given fixtureKey: "' + d + " in " + a + '"' ) } else console . warn ( 'Phaser.Cache.getPhysicsData: Invalid key/object: "' + a + " / " + b + '"' ) ; return null } , getTilemapData : function ( a ) { return this . getItem ( a , c . Cache . TILEMAP , "getTilemapData" ) } , getBinary : function ( a ) { return this . getItem ( a , c . Cache . BINARY , "getBinary" ) } , getBitmapData : function ( a ) { return this . getItem ( a , c . Cache . BITMAPDATA , "getBitmapData" , "data" ) } , getBitmapFont : function ( a ) { return this . getItem ( a , c . Cache . BITMAPFONT , "getBitmapFont" ) } , getJSON : function ( a , b ) { var d = this . getItem ( a , c . Cache . JSON , "getJSON" , "data" ) ; return d ? b ? c . Utils . extend ( ! 0 , d ) : d : null } , getXML : function ( a ) { return this . getItem ( a , c . Cache . XML , "getXML" , "data" ) } , getVideo : function ( a ) { return this . getItem ( a , c . Cache . VIDEO , "getVideo" ) } , getShader : function ( a ) { return this . getItem ( a , c . Cache . SHADER , "getShader" , "data" ) } , getRenderTexture : function ( a ) { return this . getItem ( a , c . Cache . RENDER _TEXTURE , "getRenderTexture" ) } , getBaseTexture : function ( a , b ) { return void 0 === b && ( b = c . Cache . IMAGE ) , this . getItem ( a , b , "getBaseTexture" , "base" ) } , getFrame : function ( a , b ) { return void 0 === b && ( b = c . Cache . IMAGE ) , this . getItem ( a , b , "getFrame" , "frame" ) } , getFrameCount : function ( a , b ) { var c = this . getFrameData ( a , b ) ; return c ? c . total : 0 } , getFrameData : function ( a , b ) { return void 0 === b && ( b = c . Cache . IMAGE ) , this . getItem ( a , b , "getFrameData" , "frameData" ) } , hasFrameData : function ( a , b ) { return void 0 === b && ( b = c . Cache . IMAGE ) , null !== this . getItem ( a , b , "" , "frameData" ) } , updateFrameData : function ( a , b , d ) { void 0 === d && ( d = c . Cache . IMAGE ) , this . _cacheMap [ d ] [ a ] && ( this . _cacheMap [ d ] [ a ] . frameData = b ) } , getFrameByIndex : function ( a , b , c ) { var d = this . getFrameData ( a , c ) ; return d ? d . getFrame ( b ) : null } , getFrameByName : function ( a , b , c ) { var d = this . getFrameData ( a , c ) ; return d ? d . getFrameByName ( b ) : null } , getPixiTexture : function ( a ) { if ( PIXI . TextureCache [ a ] ) return PIXI . TextureCache [ a ] ; var b = this . getPixiBaseTexture ( a ) ; return b ? new PIXI . Texture ( b ) : null } , getPixiBaseTexture : function ( a ) { if ( PIXI . BaseTextureCache [ a ] ) return PIXI . BaseTextureCache [ a ] ; var b = this . getItem ( a , c . Cache . IMAGE , "getPixiBaseTexture" ) ; return null !== b ? b . base : null } , getURL : function ( a ) { var a = this . _resolveURL ( a ) ; return a ? this . _urlMap [ a ] : ( console . warn ( 'Phaser.Cache.getUrl: Invalid url: "' + a + '" or Cache.autoResolveURL was false' ) , null ) } , getKeys : funct
} , addMarker : function ( a , b , c , d , e ) { ( void 0 === d || null === d ) && ( d = 1 ) , void 0 === e && ( e = ! 1 ) , this . markers [ a ] = { name : a , start : b , stop : b + c , volume : d , duration : c , durationMS : 1e3 * c , loop : e } } , removeMarker : function ( a ) { delete this . markers [ a ] } , onEndedHandler : function ( ) { this . _sound . onended = null , this . isPlaying = ! 1 , this . currentTime = this . durationMS , this . stop ( ) } , update : function ( ) { return this . game . cache . checkSoundKey ( this . key ) ? ( this . isDecoded && ! this . _onDecodedEventDispatched && ( this . onDecoded . dispatch ( this ) , this . _onDecodedEventDispatched = ! 0 ) , this . pendingPlayback && this . game . cache . isSoundReady ( this . key ) && ( this . pendingPlayback = ! 1 , this . play ( this . _tempMarker , this . _tempPosition , this . _tempVolume , this . _tempLoop ) ) , void ( this . isPlaying && ( this . currentTime = this . game . time . time - this . startTime , this . currentTime >= this . durationMS && ( this . usingWebAudio ? this . loop ? ( this . onLoop . dispatch ( this ) , "" === this . currentMarker ? ( this . currentTime = 0 , this . startTime = this . game . time . time ) : ( this . onMarkerComplete . dispatch ( this . currentMarker , this ) , this . play ( this . currentMarker , 0 , this . volume , ! 0 , ! 0 ) ) ) : "" !== this . currentMarker && this . stop ( ) : this . loop ? ( this . onLoop . dispatch ( this ) , this . play ( this . currentMarker , 0 , this . volume , ! 0 , ! 0 ) ) : this . stop ( ) ) ) ) ) : void this . destroy ( ) } , loopFull : function ( a ) { this . play ( null , 0 , a , ! 0 ) } , play : function ( a , b , c , d , e ) { if ( ( void 0 === a || a === ! 1 || null === a ) && ( a = "" ) , void 0 === e && ( e = ! 0 ) , this . isPlaying && ! this . allowMultiple && ! e && ! this . override ) return this ; if ( this . _sound && this . isPlaying && ! this . allowMultiple && ( this . override || e ) ) if ( this . usingWebAudio ) { if ( void 0 === this . _sound . stop ) this . _sound . noteOff ( 0 ) ; else try { this . _sound . stop ( 0 ) } catch ( f ) { } this . externalNode ? this . _sound . disconnect ( this . externalNode ) : this . _sound . disconnect ( this . gainNode ) } else this . usingAudioTag && ( this . _sound . pause ( ) , this . _sound . currentTime = 0 ) ; if ( "" === a && Object . keys ( this . markers ) . length > 0 ) return this ; if ( "" !== a ) { if ( this . currentMarker = a , ! this . markers [ a ] ) return this ; this . position = this . markers [ a ] . start , this . volume = this . markers [ a ] . volume , this . loop = this . markers [ a ] . loop , this . duration = this . markers [ a ] . duration , this . durationMS = this . markers [ a ] . durationMS , "undefined" != typeof c && ( this . volume = c ) , "undefined" != typeof d && ( this . loop = d ) , this . _tempMarker = a , this . _tempPosition = this . position , this . _tempVolume = this . volume , this . _tempLoop = this . loop } else b = b || 0 , void 0 === c && ( c = this . _volume ) , void 0 === d && ( d = this . loop ) , this . position = Math . max ( 0 , b ) , this . volume = c , this . loop = d , this . duration = 0 , this . durationMS = 0 , this . _tempMarker = a , this . _tempPosition = b , this . _tempVolume = c , this . _tempLoop = d ; return this . usingWebAudio ? this . game . cache . isSoundDecoded ( this . key ) ? ( this . _sound = this . context . createBufferSource ( ) , this . externalNode ? this . _sound . connect ( this . externalNode ) : this . _sound . connect ( this . gainNode ) , this . _buffer = this . game . cache . getSoundData ( this . key ) , this . _sound . buffer = this . _buffer , this . loop && "" === a && ( this . _sound . loop = ! 0 ) , this . loop || "" !== a || ( this . _sound . onended = this . onEndedHandler . bind ( this ) ) , this . totalDuration = this . _sound . buffer . duration , 0 === this . duration && ( this . duration = this . totalDuration , this . durationMS = Math . ceil ( 1e3 * this . totalDuration ) ) , void 0 === this . _sound . start ? this . _sound . noteGrainOn ( 0 , this . position , this . duration ) : this . loop && "" === a ? this . _sound . start ( 0 , 0 ) : this . _sound . start ( 0 , this . position , this . duration ) , this . isPlaying = ! 0 , this . startTime = this . game . time . time , this . currentTime = 0 , this . stopTime = this . startTime + this . durationMS , this . onPlay . dispatch ( this ) ) : ( this . pendingPlayback = ! 0 , this . game . cache . getSound ( this . key ) && this . game . cache . getSound ( this . key ) . isDecoding === ! 1 && this . game . sound . decode ( this . key , this ) ) : this . game . cache . getSound ( this . key ) && this . game . cache . getSound ( this . key ) . locked ? ( this . game . cache . reloadSound ( this . key ) , this . pendingPlayback = ! 0 ) : this . _sound && ( this . game . device . cocoonJS || 4 === this . _sound . readyState ) ? ( this . _sound . play ( ) , this . totalDuration = this . _sound . duration , 0 === this . duration && ( this . duration = this . totalDuration , this . durationMS = 1e3 * this . totalDuration ) , this . _sound . currentTime = this . position , this . _sound . muted = this . _muted , this . _muted || this . game . sound . mute ? this . _sound . volume = 0 : this . _sound . volume = this . _volume , this . isPlaying = ! 0 , this . startTime = this . game . time . time , this . currentTime = 0 , this . st
} } ) , Object . defineProperty ( c . ScaleManager . prototype , "pageAlignHorizontally" , { get : function ( ) { return this . _pageAlignHorizontally } , set : function ( a ) { a !== this . _pageAlignHorizontally && ( this . _pageAlignHorizontally = a , this . queueUpdate ( ! 0 ) ) } } ) , Object . defineProperty ( c . ScaleManager . prototype , "pageAlignVertically" , { get : function ( ) { return this . _pageAlignVertically } , set : function ( a ) { a !== this . _pageAlignVertically && ( this . _pageAlignVertically = a , this . queueUpdate ( ! 0 ) ) } } ) , Object . defineProperty ( c . ScaleManager . prototype , "isFullScreen" , { get : function ( ) { return ! ! ( document . fullscreenElement || document . webkitFullscreenElement || document . mozFullScreenElement || document . msFullscreenElement ) } } ) , Object . defineProperty ( c . ScaleManager . prototype , "isPortrait" , { get : function ( ) { return "portrait" === this . classifyOrientation ( this . screenOrientation ) } } ) , Object . defineProperty ( c . ScaleManager . prototype , "isLandscape" , { get : function ( ) { return "landscape" === this . classifyOrientation ( this . screenOrientation ) } } ) , Object . defineProperty ( c . ScaleManager . prototype , "isGamePortrait" , { get : function ( ) { return this . height > this . width } } ) , Object . defineProperty ( c . ScaleManager . prototype , "isGameLandscape" , { get : function ( ) { return this . width > this . height } } ) , c . Utils . Debug = function ( a ) { this . game = a , this . sprite = null , this . bmd = null , this . canvas = null , this . context = null , this . font = "14px Courier" , this . columnWidth = 100 , this . lineHeight = 16 , this . renderShadow = ! 0 , this . currentX = 0 , this . currentY = 0 , this . currentAlpha = 1 , this . dirty = ! 1 } , c . Utils . Debug . prototype = { boot : function ( ) { this . game . renderType === c . CANVAS ? this . context = this . game . context : ( this . bmd = this . game . make . bitmapData ( this . game . width , this . game . height ) , this . sprite = this . game . make . image ( 0 , 0 , this . bmd ) , this . game . stage . addChild ( this . sprite ) , this . game . scale . onSizeChange . add ( this . resize , this ) , this . canvas = PIXI . CanvasPool . create ( this , this . game . width , this . game . height ) , this . context = this . canvas . getContext ( "2d" ) ) } , resize : function ( a , b , c ) { this . bmd . resize ( b , c ) , this . canvas . width = b , this . canvas . height = c } , preUpdate : function ( ) { this . dirty && this . sprite && ( this . bmd . clear ( ) , this . bmd . draw ( this . canvas , 0 , 0 ) , this . context . clearRect ( 0 , 0 , this . game . width , this . game . height ) , this . dirty = ! 1 ) } , reset : function ( ) { this . context && this . context . clearRect ( 0 , 0 , this . game . width , this . game . height ) , this . sprite && this . bmd . clear ( ) } , start : function ( a , b , c , d ) { "number" != typeof a && ( a = 0 ) , "number" != typeof b && ( b = 0 ) , c = c || "rgb(255,255,255)" , void 0 === d && ( d = 0 ) , this . currentX = a , this . currentY = b , this . currentColor = c , this . columnWidth = d , this . dirty = ! 0 , this . context . save ( ) , this . context . setTransform ( 1 , 0 , 0 , 1 , 0 , 0 ) , this . context . strokeStyle = c , this . context . fillStyle = c , this . context . font = this . font , this . context . globalAlpha = this . currentAlpha } , stop : function ( ) { this . context . restore ( ) } , line : function ( ) { for ( var a = this . currentX , b = 0 ; b < arguments . length ; b ++ ) this . renderShadow && ( this . context . fillStyle = "rgb(0,0,0)" , this . context . fillText ( arguments [ b ] , a + 1 , this . currentY + 1 ) , this . context . fillStyle = this . currentColor ) , this . context . fillText ( arguments [ b ] , a , this . currentY ) , a += this . columnWidth ; this . currentY += this . lineHeight } , soundInfo : function ( a , b , c , d ) { this . start ( b , c , d ) , this . line ( "Sound: " + a . key + " Locked: " + a . game . sound . touchLocked ) , this . line ( "Is Ready?: " + this . game . cache . isSoundReady ( a . key ) + " Pending Playback: " + a . pendingPlayback ) , this . line ( "Decoded: " + a . isDecoded + " Decoding: " + a . isDecoding ) , this . line ( "Total Duration: " + a . totalDuration + " Playing: " + a . isPlaying ) , this . line ( "Time: " + a . currentTime ) , this . line ( "Volume: " + a . volume + " Muted: " + a . mute ) , this . line ( "WebAudio: " + a . usingWebAudio + " Audio: " + a . usingAudioTag ) , "" !== a . currentMarker && ( this . line ( "Marker: " + a . currentMarker + " Duration: " + a . duration + " (ms: " + a . durationMS + ")" ) , this . line ( "Start: " + a . markers [ a . currentMarker ] . start + " Stop: " + a . markers [ a . currentMarker ] . stop ) , this . line ( "Position: " + a . position ) ) , this . stop ( ) } , cameraInfo : function ( a , b , c , d ) { this . start ( b , c , d ) , this . line ( "Camera (" + a . width + " x " + a . height + ")" ) , this . line ( "X: " + a . x + " Y: " + a . y ) , a . bounds && this . line ( "Bounds x: " + a . bounds . x + " Y: " + a . bounds . y + " w: " + a . bounds . width + " h: " + a . bounds . height ) , this . line ( "View x: " + a . view . x + " Y: " + a . view . y + " w: " + a . view . width + " h: " + a . view . height ) , this . line ( " Tota
this . config = b , this . arcade = null , this . p2 = null , this . ninja = null , this . box2d = null , this . chipmunk = null , this . matter = null , this . parseConfig ( ) } , c . Physics . ARCADE = 0 , c . Physics . P2JS = 1 , c . Physics . NINJA = 2 , c . Physics . BOX2D = 3 , c . Physics . CHIPMUNK = 4 , c . Physics . MATTERJS = 5 , c . Physics . prototype = { parseConfig : function ( ) { this . config . hasOwnProperty ( "arcade" ) && this . config . arcade !== ! 0 || ! c . Physics . hasOwnProperty ( "Arcade" ) || ( this . arcade = new c . Physics . Arcade ( this . game ) ) , this . config . hasOwnProperty ( "ninja" ) && this . config . ninja === ! 0 && c . Physics . hasOwnProperty ( "Ninja" ) && ( this . ninja = new c . Physics . Ninja ( this . game ) ) , this . config . hasOwnProperty ( "p2" ) && this . config . p2 === ! 0 && c . Physics . hasOwnProperty ( "P2" ) && ( this . p2 = new c . Physics . P2 ( this . game , this . config ) ) , this . config . hasOwnProperty ( "box2d" ) && this . config . box2d === ! 0 && c . Physics . hasOwnProperty ( "BOX2D" ) && ( this . box2d = new c . Physics . BOX2D ( this . game , this . config ) ) , this . config . hasOwnProperty ( "matter" ) && this . config . matter === ! 0 && c . Physics . hasOwnProperty ( "Matter" ) && ( this . matter = new c . Physics . Matter ( this . game , this . config ) ) } , startSystem : function ( a ) { a === c . Physics . ARCADE ? this . arcade = new c . Physics . Arcade ( this . game ) : a === c . Physics . P2JS ? null === this . p2 ? this . p2 = new c . Physics . P2 ( this . game , this . config ) : this . p2 . reset ( ) : a === c . Physics . NINJA ? this . ninja = new c . Physics . Ninja ( this . game ) : a === c . Physics . BOX2D ? null === this . box2d ? this . box2d = new c . Physics . Box2D ( this . game , this . config ) : this . box2d . reset ( ) : a === c . Physics . MATTERJS && ( null === this . matter ? this . matter = new c . Physics . Matter ( this . game , this . config ) : this . matter . reset ( ) ) } , enable : function ( a , b , d ) { void 0 === b && ( b = c . Physics . ARCADE ) , void 0 === d && ( d = ! 1 ) , b === c . Physics . ARCADE ? this . arcade . enable ( a ) : b === c . Physics . P2JS && this . p2 ? this . p2 . enable ( a , d ) : b === c . Physics . NINJA && this . ninja ? this . ninja . enableAABB ( a ) : b === c . Physics . BOX2D && this . box2d ? this . box2d . enable ( a ) : b === c . Physics . MATTERJS && this . matter ? this . matter . enable ( a ) : console . warn ( a . key + " is attempting to enable a physics body using an unknown physics system." ) } , preUpdate : function ( ) { this . p2 && this . p2 . preUpdate ( ) , this . box2d && this . box2d . preUpdate ( ) , this . matter && this . matter . preUpdate ( ) } , update : function ( ) { this . p2 && this . p2 . update ( ) , this . box2d && this . box2d . update ( ) , this . matter && this . matter . update ( ) } , setBoundsToWorld : function ( ) { this . arcade && this . arcade . setBoundsToWorld ( ) , this . ninja && this . ninja . setBoundsToWorld ( ) , this . p2 && this . p2 . setBoundsToWorld ( ) , this . box2d && this . box2d . setBoundsToWorld ( ) , this . matter && this . matter . setBoundsToWorld ( ) } , clear : function ( ) { this . p2 && this . p2 . clear ( ) , this . box2d && this . box2d . clear ( ) , this . matter && this . matter . clear ( ) } , reset : function ( ) { this . p2 && this . p2 . reset ( ) , this . box2d && this . box2d . reset ( ) , this . matter && this . matter . reset ( ) } , destroy : function ( ) { this . p2 && this . p2 . destroy ( ) , this . box2d && this . box2d . destroy ( ) , this . matter && this . matter . destroy ( ) , this . arcade = null , this . ninja = null , this . p2 = null , this . box2d = null , this . matter = null } } , c . Physics . prototype . constructor = c . Physics , c . Particles = function ( a ) { this . game = a , this . emitters = { } , this . ID = 0 } , c . Particles . prototype = { add : function ( a ) { return this . emitters [ a . name ] = a , a } , remove : function ( a ) { delete this . emitters [ a . name ] } , update : function ( ) { for ( var a in this . emitters ) this . emitters [ a ] . exists && this . emitters [ a ] . update ( ) } } , c . Particles . prototype . constructor = c . Particles , c . Video = function ( a , b , d ) { if ( void 0 === b && ( b = null ) , void 0 === d && ( d = null ) , this . game = a , this . key = b , this . width = 0 , this . height = 0 , this . type = c . VIDEO , this . disableTextureUpload = ! 1 , this . touchLocked = ! 1 , this . onPlay = new c . Signal , this . onChangeSource = new c . Signal , this . onComplete = new c . Signal , this . onAccess = new c . Signal , this . onError = new c . Signal , this . onTimeout = new c . Signal , this . timeout = 15e3 , this . _timeOutID = null , this . video = null , this . videoStream = null , this . isStreaming = ! 1 , this . retryLimit = 20 , this . retry = 0 , this . retryInterval = 500 , this . _retryID = null , this . _codeMuted = ! 1 , this . _muted = ! 1 , this . _codePaused = ! 1 , this . _paused = ! 1 , this . _pending = ! 1 , this . _autoplay = ! 1 , this . _endCallback = null , this . _playCallback = null , b && this . game . cache . checkVideoKey ( b ) ) { var e = this . game . cache . getVideo ( b ) ; e . isBlob ? this . createVideoFromBlob ( e . data ) : this . video = e . data , this . width = this . video . videoWidth , this . height = this . video . videoHeight } else d && this . createVideoFromURL (
2015-02-25 02:59:00 +00:00
//# sourceMappingURL=phaser-no-physics.map