2016-05-23 12:18:30 +00:00
/* Phaser v2.4.9 - http://phaser.io - @photonstorm - (c) 2016 Photon Storm Ltd. */
2015-02-25 02:59:00 +00:00
2016-05-23 12:18:30 +00:00
( function ( ) { var a = this , b = b || { } ; return b . game = null , b . WEBGL _RENDERER = 0 , b . CANVAS _RENDERER = 1 , b . VERSION = "v2.2.9" , b . _UID = 0 , "undefined" != typeof Float32Array ? ( b . Float32Array = Float32Array , b . Uint16Array = Uint16Array , b . Uint32Array = Uint32Array , b . ArrayBuffer = ArrayBuffer ) : ( b . Float32Array = Array , b . Uint16Array = Array ) , b . PI _2 = 2 * Math . PI , b . RAD _TO _DEG = 180 / Math . PI , b . DEG _TO _RAD = Math . PI / 180 , b . RETINA _PREFIX = "@2x" , b . DisplayObject = function ( ) { this . position = new b . Point ( 0 , 0 ) , this . scale = new b . Point ( 1 , 1 ) , this . pivot = new b . Point ( 0 , 0 ) , this . rotation = 0 , this . alpha = 1 , this . visible = ! 0 , this . hitArea = null , this . renderable = ! 1 , this . parent = null , this . stage = null , this . worldAlpha = 1 , this . worldTransform = new b . Matrix , this . worldPosition = new b . Point ( 0 , 0 ) , this . worldScale = new b . Point ( 1 , 1 ) , this . worldRotation = 0 , this . _sr = 0 , this . _cr = 1 , this . filterArea = null , this . _bounds = new b . Rectangle ( 0 , 0 , 1 , 1 ) , this . _currentBounds = null , this . _mask = null , this . _cacheAsBitmap = ! 1 , this . _cacheIsDirty = ! 1 } , b . DisplayObject . prototype . constructor = b . DisplayObject , b . DisplayObject . prototype . destroy = function ( ) { if ( this . children ) { for ( var a = this . children . length ; a -- ; ) this . children [ a ] . destroy ( ) ; this . children = [ ] } this . hitArea = null , this . parent = null , this . stage = null , this . worldTransform = null , this . filterArea = null , this . _bounds = null , this . _currentBounds = null , this . _mask = null , this . renderable = ! 1 , this . _destroyCachedSprite ( ) } , Object . defineProperty ( b . DisplayObject . prototype , "worldVisible" , { get : function ( ) { var a = this ; do { if ( ! a . visible ) return ! 1 ; a = a . parent } while ( a ) ; return ! 0 } } ) , Object . defineProperty ( b . DisplayObject . prototype , "mask" , { get : function ( ) { return this . _mask } , set : function ( a ) { this . _mask && ( this . _mask . isMask = ! 1 ) , this . _mask = a , this . _mask && ( this . _mask . isMask = ! 0 ) } } ) , Object . defineProperty ( b . DisplayObject . prototype , "filters" , { get : function ( ) { return this . _filters } , set : function ( a ) { if ( a ) { for ( var c = [ ] , d = 0 ; d < a . length ; d ++ ) for ( var e = a [ d ] . passes , f = 0 ; f < e . length ; f ++ ) c . push ( e [ f ] ) ; this . _filterBlock = { target : this , filterPasses : c } } this . _filters = a , this . blendMode && this . blendMode === b . blendModes . MULTIPLY && ( this . blendMode = b . blendModes . NORMAL ) } } ) , Object . defineProperty ( b . DisplayObject . prototype , "cacheAsBitmap" , { get : function ( ) { return this . _cacheAsBitmap } , set : function ( a ) { this . _cacheAsBitmap !== a && ( a ? this . _generateCachedSprite ( ) : this . _destroyCachedSprite ( ) , this . _cacheAsBitmap = a ) } } ) , b . DisplayObject . prototype . updateTransform = function ( a ) { if ( a || this . parent || this . game ) { var c = this . parent ; a ? c = a : this . parent || ( c = this . game . world ) ; var d , e , f , g , h , i , j = c . worldTransform , k = this . worldTransform ; this . rotation % b . PI _2 ? ( this . rotation !== this . rotationCache && ( this . rotationCache = this . rotation , this . _sr = Math . sin ( this . rotation ) , this . _cr = Math . cos ( this . rotation ) ) , d = this . _cr * this . scale . x , e = this . _sr * this . scale . x , f = - this . _sr * this . scale . y , g = this . _cr * this . scale . y , h = this . position . x , i = this . position . y , ( this . pivot . x || this . pivot . y ) && ( h -= this . pivot . x * d + this . pivot . y * f , i -= this . pivot . x * e + this . pivot . y * g ) , k . a = d * j . a + e * j . c , k . b = d * j . b + e * j . d , k . c = f * j . a + g * j . c , k . d = f * j . b + g * j . d , k . tx = h * j . a + i * j . c + j . tx , k . ty = h * j . b + i * j . d + j . ty ) : ( d = this . scale . x , g = this . scale . y , h = this . position . x - this . pivot . x * d , i = this . position . y - this . pivot . y * g , k . a = d * j . a , k . b = d * j . b , k . c = g * j . c , k . d = g * j . d , k . tx = h * j . a + i * j . c + j . tx , k . ty = h * j . b + i * j . d + j . ty ) , this . worldAlpha = this . alpha * c . worldAlpha , this . worldPosition . set ( k . tx , k . ty ) , this . worldScale . set ( Math . sqrt ( k . a * k . a + k . b * k . b ) , Math . sqrt ( k . c * k . c + k . d * k . d ) ) , this . worldRotation = Math . atan2 ( k . c , k . d ) , this . _currentBounds = null , this . transformCallback && this . transformCallback . call ( this . transformCallbackContext , k , j ) } } , b . DisplayObject . prototype . displayObjectUpdateTransform = b . DisplayObject . prototype . updateTransform , b . DisplayObject . prototype . getBounds = function ( a ) { return a = a , b . EmptyRectangle } , b . DisplayObject . prototype . getLocalBounds = function ( ) { return this . getBounds ( b . identityMatrix ) } , b . DisplayObject . prototype . setStageReference = function ( a ) { this . stage = a } , b . DisplayObject . prototype . preUpdate = function ( ) { } , b . DisplayObject . prototype . generateTexture = function ( a , c , d ) { var e = this . getLocalBounds ( ) , f = new b . RenderTexture ( 0 | e . width , 0 | e . height , d , c , a ) ; return b . DisplayObject . _tempMatrix . tx = - e . x , b . DisplayObject . _tempMatrix . ty = - e . y , f . render ( this , b . DisplayObject . _tempMatrix ) , f } ,
2016-06-02 15:40:04 +00:00
this . blendModeManager = new b . WebGLBlendModeManager , this . renderSession = { } , this . renderSession . game = this . game , this . renderSession . gl = this . gl , this . renderSession . drawCount = 0 , this . renderSession . shaderManager = this . shaderManager , this . renderSession . maskManager = this . maskManager , this . renderSession . filterManager = this . filterManager , this . renderSession . blendModeManager = this . blendModeManager , this . renderSession . spriteBatch = this . spriteBatch , this . renderSession . stencilManager = this . stencilManager , this . renderSession . renderer = this , this . renderSession . resolution = this . resolution , this . initContext ( ) , this . mapBlendModes ( ) } , b . WebGLRenderer . prototype . constructor = b . WebGLRenderer , b . WebGLRenderer . prototype . initContext = function ( ) { var a = this . view . getContext ( "webgl" , this . _contextOptions ) || this . view . getContext ( "experimental-webgl" , this . _contextOptions ) ; if ( this . gl = a , ! a ) throw new Error ( "This browser does not support webGL. Try using the canvas renderer" ) ; this . glContextId = a . id = b . WebGLRenderer . glContextId ++ , b . glContexts [ this . glContextId ] = a , b . instances [ this . glContextId ] = this , a . disable ( a . DEPTH _TEST ) , a . disable ( a . CULL _FACE ) , a . enable ( a . BLEND ) , this . shaderManager . setContext ( a ) , this . spriteBatch . setContext ( a ) , this . maskManager . setContext ( a ) , this . filterManager . setContext ( a ) , this . blendModeManager . setContext ( a ) , this . stencilManager . setContext ( a ) , this . renderSession . gl = this . gl , this . resize ( this . width , this . height ) } , b . WebGLRenderer . prototype . render = function ( a ) { if ( ! this . contextLost ) { var b = this . gl ; b . viewport ( 0 , 0 , this . width , this . height ) , b . bindFramebuffer ( b . FRAMEBUFFER , null ) , this . game . clearBeforeRender && ( b . clearColor ( a . _bgColor . r , a . _bgColor . g , a . _bgColor . b , a . _bgColor . a ) , b . clear ( b . COLOR _BUFFER _BIT ) ) , this . offset . x = this . game . camera . _shake . x , this . offset . y = this . game . camera . _shake . y , this . renderDisplayObject ( a , this . projection ) } } , b . WebGLRenderer . prototype . renderDisplayObject = function ( a , c , d , e ) { this . renderSession . blendModeManager . setBlendMode ( b . blendModes . NORMAL ) , this . renderSession . drawCount = 0 , this . renderSession . flipY = d ? - 1 : 1 , this . renderSession . projection = c , this . renderSession . offset = this . offset , this . spriteBatch . begin ( this . renderSession ) , this . filterManager . begin ( this . renderSession , d ) , a . _renderWebGL ( this . renderSession , e ) , this . spriteBatch . end ( ) } , b . WebGLRenderer . prototype . resize = function ( a , b ) { this . width = a * this . resolution , this . height = b * this . resolution , this . view . width = this . width , this . view . height = this . height , this . autoResize && ( this . view . style . width = this . width / this . resolution + "px" , this . view . style . height = this . height / this . resolution + "px" ) , this . gl . viewport ( 0 , 0 , this . width , this . height ) , this . projection . x = this . width / 2 / this . resolution , this . projection . y = - this . height / 2 / this . resolution } , b . WebGLRenderer . prototype . updateTexture = function ( a ) { if ( ! a . hasLoaded ) return ! 1 ; var c = this . gl ; return a . _glTextures [ c . id ] || ( a . _glTextures [ c . id ] = c . createTexture ( ) ) , c . bindTexture ( c . TEXTURE _2D , a . _glTextures [ c . id ] ) , c . pixelStorei ( c . UNPACK _PREMULTIPLY _ALPHA _WEBGL , a . premultipliedAlpha ) , c . texImage2D ( c . TEXTURE _2D , 0 , c . RGBA , c . RGBA , c . UNSIGNED _BYTE , a . source ) , c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _MAG _FILTER , a . scaleMode === b . scaleModes . LINEAR ? c . LINEAR : c . NEAREST ) , a . mipmap && b . isPowerOfTwo ( a . width , a . height ) ? ( c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _MIN _FILTER , a . scaleMode === b . scaleModes . LINEAR ? c . LINEAR _MIPMAP _LINEAR : c . NEAREST _MIPMAP _NEAREST ) , c . generateMipmap ( c . TEXTURE _2D ) ) : c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _MIN _FILTER , a . scaleMode === b . scaleModes . LINEAR ? c . LINEAR : c . NEAREST ) , a . _powerOf2 ? ( c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _WRAP _S , c . REPEAT ) , c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _WRAP _T , c . REPEAT ) ) : ( c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _WRAP _S , c . CLAMP _TO _EDGE ) , c . texParameteri ( c . TEXTURE _2D , c . TEXTURE _WRAP _T , c . CLAMP _TO _EDGE ) ) , a . _dirty [ c . id ] = ! 1 , ! 0 } , b . WebGLRenderer . prototype . destroy = function ( ) { b . glContexts [ this . glContextId ] = null , this . projection = null , this . offset = null , this . shaderManager . destroy ( ) , this . spriteBatch . destroy ( ) , this . maskManager . destroy ( ) , this . filterManager . destroy ( ) , this . shaderManager = null , this . spriteBatch = null , this . maskManager = null , this . filterManager = null , this . gl = null , this . renderSession = null , b . CanvasPool . remove ( this ) , b . instances [ this . glContextId ] = null , b
for ( var g = b . hex2rgb ( c ) , h = g [ 0 ] , i = g [ 1 ] , j = g [ 2 ] , k = e . getImageData ( 0 , 0 , f . width , f . height ) , l = k . data , m = 0 ; m < l . length ; m += 4 ) if ( l [ m + 0 ] *= h , l [ m + 1 ] *= i , l [ m + 2 ] *= j , ! b . CanvasTinter . canHandleAlpha ) { var n = l [ m + 3 ] ; l [ m + 0 ] /= 255 / n , l [ m + 1 ] /= 255 / n , l [ m + 2 ] /= 255 / n } e . putImageData ( k , 0 , 0 ) } , b . CanvasTinter . checkInverseAlpha = function ( ) { var a = new b . CanvasBuffer ( 2 , 1 ) ; a . context . fillStyle = "rgba(10, 20, 30, 0.5)" , a . context . fillRect ( 0 , 0 , 1 , 1 ) ; var c = a . context . getImageData ( 0 , 0 , 1 , 1 ) ; if ( null === c ) return ! 1 ; a . context . putImageData ( c , 1 , 0 ) ; var d = a . context . getImageData ( 1 , 0 , 1 , 1 ) ; return d . data [ 0 ] === c . data [ 0 ] && d . data [ 1 ] === c . data [ 1 ] && d . data [ 2 ] === c . data [ 2 ] && d . data [ 3 ] === c . data [ 3 ] } , b . CanvasTinter . canHandleAlpha = b . CanvasTinter . checkInverseAlpha ( ) , b . CanvasTinter . canUseMultiply = b . canUseNewCanvasBlendModes ( ) , b . CanvasTinter . tintMethod = b . CanvasTinter . canUseMultiply ? b . CanvasTinter . tintWithMultiply : b . CanvasTinter . tintWithPerPixel , b . CanvasRenderer = function ( a ) { this . game = a , b . defaultRenderer || ( b . defaultRenderer = this ) , this . type = b . CANVAS _RENDERER , this . resolution = a . resolution , this . clearBeforeRender = a . clearBeforeRender , this . transparent = a . transparent , this . autoResize = ! 1 , this . width = a . width * this . resolution , this . height = a . height * this . resolution , this . view = a . canvas , this . context = this . view . getContext ( "2d" , { alpha : this . transparent } ) , this . refresh = ! 0 , this . count = 0 , this . maskManager = new b . CanvasMaskManager , this . renderSession = { context : this . context , maskManager : this . maskManager , scaleMode : null , smoothProperty : Phaser . Canvas . getSmoothingPrefix ( this . context ) , roundPixels : ! 1 } , this . mapBlendModes ( ) , this . resize ( this . width , this . height ) } , b . CanvasRenderer . prototype . constructor = b . CanvasRenderer , b . CanvasRenderer . prototype . render = function ( a ) { this . context . setTransform ( 1 , 0 , 0 , 1 , 0 , 0 ) , this . context . globalAlpha = 1 , this . renderSession . currentBlendMode = 0 , this . renderSession . shakeX = this . game . camera . _shake . x , this . renderSession . shakeY = this . game . camera . _shake . y , this . context . globalCompositeOperation = "source-over" , navigator . isCocoonJS && this . view . screencanvas && ( this . context . fillStyle = "black" , this . context . clear ( ) ) , this . clearBeforeRender && ( this . transparent ? this . context . clearRect ( 0 , 0 , this . width , this . height ) : ( this . context . fillStyle = a . _bgColor . rgba , this . context . fillRect ( 0 , 0 , this . width , this . height ) ) ) , this . renderDisplayObject ( a ) } , b . CanvasRenderer . prototype . destroy = function ( a ) { void 0 === a && ( a = ! 0 ) , a && this . view . parent && this . view . parent . removeChild ( this . view ) , this . view = null , this . context = null , this . maskManager = null , this . renderSession = null } , b . CanvasRenderer . prototype . resize = function ( a , c ) { this . width = a * this . resolution , this . height = c * this . resolution , this . view . width = this . width , this . view . height = this . height , this . autoResize && ( this . view . style . width = this . width / this . resolution + "px" , this . view . style . height = this . height / this . resolution + "px" ) , this . renderSession . smoothProperty && ( this . context [ this . renderSession . smoothProperty ] = this . renderSession . scaleMode === b . scaleModes . LINEAR ) } , b . CanvasRenderer . prototype . renderDisplayObject = function ( a , b , c ) { this . renderSession . context = b || this . context , this . renderSession . resolution = this . resolution , a . _renderCanvas ( this . renderSession , c ) } , b . CanvasRenderer . prototype . mapBlendModes = function ( ) { if ( ! b . blendModesCanvas ) { var a = [ ] , c = b . blendModes , d = b . canUseNewCanvasBlendModes ( ) ; a [ c . NORMAL ] = "source-over" , a [ c . ADD ] = "lighter" , a [ c . MULTIPLY ] = d ? "multiply" : "source-over" , a [ c . SCREEN ] = d ? "screen" : "source-over" , a [ c . OVERLAY ] = d ? "overlay" : "source-over" , a [ c . DARKEN ] = d ? "darken" : "source-over" , a [ c . LIGHTEN ] = d ? "lighten" : "source-over" , a [ c . COLOR _DODGE ] = d ? "color-dodge" : "source-over" , a [ c . COLOR _BURN ] = d ? "color-burn" : "source-over" , a [ c . HARD _LIGHT ] = d ? "hard-light" : "source-over" , a [ c . SOFT _LIGHT ] = d ? "soft-light" : "source-over" , a [ c . DIFFERENCE ] = d ? "difference" : "source-over" , a [ c . EXCLUSION ] = d ? "exclusion" : "source-over" , a [ c . HUE ] = d ? "hue" : "source-over" , a [ c . SATURATION ] = d ? "saturation" : "source-over" , a [ c . COLOR ] = d ? "color" : "source-over" , a [ c . LUMINOSITY ] = d ? "luminosity" : "source-over" , b . blendModesCanvas = a } } , b . BaseTextureCache = { } , b . BaseTextureCacheIdGenerator = 0 , b . BaseTexture = function ( a , c ) { this . resolution = 1 , this . width = 100 , this . height = 100 , this . scaleMode = c || b . scaleModes . DEFAULT , this . hasLoaded = ! 1 , this . source = a , this . _UID = b . _UID +
d === ! 0 && ( b = c . Math . degToRad ( b ) ) , e . x = a . x + a . radius * Math . cos ( b ) , e . y = a . y + a . radius * Math . sin ( b ) , e } , c . Circle . intersectsRectangle = function ( a , b ) { var c = Math . abs ( a . x - b . x - b . halfWidth ) , d = b . halfWidth + a . radius ; if ( c > d ) return ! 1 ; var e = Math . abs ( a . y - b . y - b . halfHeight ) , f = b . halfHeight + a . radius ; if ( e > f ) return ! 1 ; if ( c <= b . halfWidth || e <= b . halfHeight ) return ! 0 ; var g = c - b . halfWidth , h = e - b . halfHeight , i = g * g , j = h * h , k = a . radius * a . radius ; return k >= i + j } , PIXI . Circle = c . Circle , c . Ellipse = function ( a , b , d , e ) { a = a || 0 , b = b || 0 , d = d || 0 , e = e || 0 , this . x = a , this . y = b , this . width = d , this . height = e , this . type = c . ELLIPSE } , c . Ellipse . prototype = { setTo : function ( a , b , c , d ) { return this . x = a , this . y = b , this . width = c , this . height = d , this } , getBounds : function ( ) { return new c . Rectangle ( this . x - this . width , this . y - this . height , this . width , this . height ) } , copyFrom : function ( a ) { return this . setTo ( a . x , a . y , a . width , a . height ) } , copyTo : function ( a ) { return a . x = this . x , a . y = this . y , a . width = this . width , a . height = this . height , a } , clone : function ( a ) { return void 0 === a || null === a ? a = new c . Ellipse ( this . x , this . y , this . width , this . height ) : a . setTo ( this . x , this . y , this . width , this . height ) , a } , contains : function ( a , b ) { return c . Ellipse . contains ( this , a , b ) } , random : function ( a ) { void 0 === a && ( a = new c . Point ) ; var b = Math . random ( ) * Math . PI * 2 , d = Math . random ( ) ; return a . x = Math . sqrt ( d ) * Math . cos ( b ) , a . y = Math . sqrt ( d ) * Math . sin ( b ) , a . x = this . x + a . x * this . width / 2 , a . y = this . y + a . y * this . height / 2 , a } , toString : function ( ) { return "[{Phaser.Ellipse (x=" + this . x + " y=" + this . y + " width=" + this . width + " height=" + this . height + ")}]" } } , c . Ellipse . prototype . constructor = c . Ellipse , Object . defineProperty ( c . Ellipse . prototype , "left" , { get : function ( ) { return this . x } , set : function ( a ) { this . x = a } } ) , Object . defineProperty ( c . Ellipse . prototype , "right" , { get : function ( ) { return this . x + this . width } , set : function ( a ) { a < this . x ? this . width = 0 : this . width = a - this . x } } ) , Object . defineProperty ( c . Ellipse . prototype , "top" , { get : function ( ) { return this . y } , set : function ( a ) { this . y = a } } ) , Object . defineProperty ( c . Ellipse . prototype , "bottom" , { get : function ( ) { return this . y + this . height } , set : function ( a ) { a < this . y ? this . height = 0 : this . height = a - this . y } } ) , Object . defineProperty ( c . Ellipse . prototype , "empty" , { get : function ( ) { return 0 === this . width || 0 === this . height } , set : function ( a ) { a === ! 0 && this . setTo ( 0 , 0 , 0 , 0 ) } } ) , c . Ellipse . contains = function ( a , b , c ) { if ( a . width <= 0 || a . height <= 0 ) return ! 1 ; var d = ( b - a . x ) / a . width - . 5 , e = ( c - a . y ) / a . height - . 5 ; return d *= d , e *= e , . 25 > d + e } , PIXI . Ellipse = c . Ellipse , c . Line = function ( a , b , d , e ) { a = a || 0 , b = b || 0 , d = d || 0 , e = e || 0 , this . start = new c . Point ( a , b ) , this . end = new c . Point ( d , e ) , this . type = c . LINE } , c . Line . prototype = { setTo : function ( a , b , c , d ) { return this . start . setTo ( a , b ) , this . end . setTo ( c , d ) , this } , fromSprite : function ( a , b , c ) { return void 0 === c && ( c = ! 1 ) , c ? this . setTo ( a . center . x , a . center . y , b . center . x , b . center . y ) : this . setTo ( a . x , a . y , b . x , b . y ) } , fromAngle : function ( a , b , c , d ) { return this . start . setTo ( a , b ) , this . end . setTo ( a + Math . cos ( c ) * d , b + Math . sin ( c ) * d ) , this } , rotate : function ( a , b ) { var c = ( this . start . x + this . end . x ) / 2 , d = ( this . start . y + this . end . y ) / 2 ; return this . start . rotate ( c , d , a , b ) , this . end . rotate ( c , d , a , b ) , this } , rotateAround : function ( a , b , c , d ) { return this . start . rotate ( a , b , c , d ) , this . end . rotate ( a , b , c , d ) , this } , intersects : function ( a , b , d ) { return c . Line . intersectsPoints ( this . start , this . end , a . start , a . end , b , d ) } , reflect : function ( a ) { return c . Line . reflect ( this , a ) } , midPoint : function ( a ) { return void 0 === a && ( a = new c . Point ) , a . x = ( this . start . x + this . end . x ) / 2 , a . y = ( this . start . y + this . end . y ) / 2 , a } , centerOn : function ( a , b ) { var c = ( this . start . x + this . end . x ) / 2 , d = ( this . start . y + this . end . y ) / 2 , e = a - c , f = b - d ; this . start . add ( e , f ) , this . end . add ( e , f ) } , pointOnLine : function ( a , b ) { return ( a - this . start . x ) * ( this . end . y - this . start . y ) === ( this . end . x - this . start . x ) * ( b - this . start . y ) } , pointOnSegment : function ( a , b ) { var c = Math . min ( this . start . x , this . end . x ) , d = Math . max ( this . start . x , this . end . x ) , e = Math . min ( this . start . y , this . end . y ) , f = Math . max ( this . start . y , this . end . y ) ; return this . pointOnLine ( a , b ) && a >= c && d >= a && b >= e && f >= b } , random : function ( a ) { void 0 === a && ( a = new c . Point ) ; var b = Math . 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 ( th
this . onResumedCallback = null , this . onPauseUpdateCallback = null ) , delete this . states [ a ] } , start : function ( a , b , c ) { void 0 === b && ( b = ! 0 ) , void 0 === c && ( c = ! 1 ) , this . checkState ( a ) && ( this . _pendingState = a , this . _clearWorld = b , this . _clearCache = c , arguments . length > 3 && ( this . _args = Array . prototype . splice . call ( arguments , 3 ) ) ) } , restart : function ( a , b ) { void 0 === a && ( a = ! 0 ) , void 0 === b && ( b = ! 1 ) , this . _pendingState = this . current , this . _clearWorld = a , this . _clearCache = b , arguments . length > 2 && ( this . _args = Array . prototype . slice . call ( arguments , 2 ) ) } , dummy : function ( ) { } , preUpdate : function ( ) { if ( this . _pendingState && this . game . isBooted ) { var a = this . current ; if ( this . clearCurrentState ( ) , this . setCurrentState ( this . _pendingState ) , this . onStateChange . dispatch ( this . current , a ) , this . current !== this . _pendingState ) return ; this . _pendingState = null , this . onPreloadCallback ? ( this . game . load . reset ( ! 0 ) , this . onPreloadCallback . call ( this . callbackContext , this . game ) , 0 === this . game . load . totalQueuedFiles ( ) && 0 === this . game . load . totalQueuedPacks ( ) ? this . loadComplete ( ) : this . game . load . start ( ) ) : this . loadComplete ( ) } } , clearCurrentState : function ( ) { this . current && ( this . onShutDownCallback && this . onShutDownCallback . call ( this . callbackContext , this . game ) , this . game . tweens . removeAll ( ) , this . game . camera . reset ( ) , this . game . input . reset ( ! 0 ) , this . game . physics . clear ( ) , this . game . time . removeAll ( ) , this . game . scale . reset ( this . _clearWorld ) , this . game . debug && this . game . debug . reset ( ) , this . _clearWorld && ( this . game . world . shutdown ( ) , this . _clearCache && this . game . cache . destroy ( ) ) ) } , checkState : function ( a ) { return this . states [ a ] ? this . states [ a ] . preload || this . states [ a ] . create || this . states [ a ] . update || this . states [ a ] . render ? ! 0 : ( console . warn ( "Invalid Phaser State object given. Must contain at least a one of the required functions: preload, create, update or render" ) , ! 1 ) : ( console . warn ( "Phaser.StateManager - No state found with the key: " + a ) , ! 1 ) } , link : function ( a ) { this . states [ a ] . game = this . game , this . states [ a ] . add = this . game . add , this . states [ a ] . make = this . game . make , this . states [ a ] . camera = this . game . camera , this . states [ a ] . cache = this . game . cache , this . states [ a ] . input = this . game . input , this . states [ a ] . load = this . game . load , this . states [ a ] . math = this . game . math , this . states [ a ] . sound = this . game . sound , this . states [ a ] . scale = this . game . scale , this . states [ a ] . state = this , this . states [ a ] . stage = this . game . stage , this . states [ a ] . time = this . game . time , this . states [ a ] . tweens = this . game . tweens , this . states [ a ] . world = this . game . world , this . states [ a ] . particles = this . game . particles , this . states [ a ] . rnd = this . game . rnd , this . states [ a ] . physics = this . game . physics , this . states [ a ] . key = a } , unlink : function ( a ) { this . states [ a ] && ( this . states [ a ] . game = null , this . states [ a ] . add = null , this . states [ a ] . make = null , this . states [ a ] . camera = null , this . states [ a ] . cache = null , this . states [ a ] . input = null , this . states [ a ] . load = null , this . states [ a ] . math = null , this . states [ a ] . sound = null , this . states [ a ] . scale = null , this . states [ a ] . state = null , this . states [ a ] . stage = null , this . states [ a ] . time = null , this . states [ a ] . tweens = null , this . states [ a ] . world = null , this . states [ a ] . particles = null , this . states [ a ] . rnd = null , this . states [ a ] . physics = null ) } , setCurrentState : function ( a ) { this . callbackContext = this . states [ a ] , this . link ( a ) , this . onInitCallback = this . states [ a ] . init || this . dummy , this . onPreloadCallback = this . states [ a ] . preload || null , this . onLoadRenderCallback = this . states [ a ] . loadRender || null , this . onLoadUpdateCallback = this . states [ a ] . loadUpdate || null , this . onCreateCallback = this . states [ a ] . create || null , this . onUpdateCallback = this . states [ a ] . update || null , this . onPreRenderCallback = this . states [ a ] . preRender || null , this . onRenderCallback = this . states [ a ] . render || null , this . onResizeCallback = this . states [ a ] . resize || null , this . onPausedCallback = this . states [ a ] . paused || null , this . onResumedCallback = this . states [ a ] . resumed || null , this . onPauseUpdateCallback = this . states [ a ] . pauseUpdate || null , 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 . _cr
e -- } this . updateZ ( ) } } , c . Group . prototype . destroy = function ( a , b ) { null === this . game || this . ignoreDestroy || ( void 0 === a && ( a = ! 0 ) , void 0 === b && ( b = ! 1 ) , this . onDestroy . dispatch ( this , a , b ) , this . removeAll ( a ) , this . cursor = null , this . filters = null , this . pendingDestroy = ! 1 , b || ( this . parent && this . parent . removeChild ( this ) , this . game = null , this . exists = ! 1 ) ) } , Object . defineProperty ( c . Group . prototype , "total" , { get : function ( ) { return this . iterate ( "exists" , ! 0 , c . Group . RETURN _TOTAL ) } } ) , Object . defineProperty ( c . Group . prototype , "length" , { get : function ( ) { return this . children . length } } ) , Object . defineProperty ( c . Group . prototype , "angle" , { get : function ( ) { return c . Math . radToDeg ( this . rotation ) } , set : function ( a ) { this . rotation = c . Math . degToRad ( a ) } } ) , c . World = function ( a ) { c . Group . call ( this , a , null , "__world" , ! 1 ) , this . bounds = new c . Rectangle ( 0 , 0 , a . width , a . height ) , this . camera = null , this . _definedSize = ! 1 , this . _width = a . width , this . _height = a . height , this . game . state . onStateChange . add ( this . stateChange , this ) } , c . World . prototype = Object . create ( c . Group . prototype ) , c . World . prototype . constructor = c . World , c . World . prototype . boot = function ( ) { this . camera = new c . Camera ( this . game , 0 , 0 , 0 , this . game . width , this . game . height ) , this . game . stage . addChild ( this ) , this . camera . boot ( ) } , c . World . prototype . stateChange = function ( ) { this . x = 0 , this . y = 0 , this . camera . reset ( ) } , c . World . prototype . setBounds = function ( a , b , c , d ) { this . _definedSize = ! 0 , this . _width = c , this . _height = d , this . bounds . setTo ( a , b , c , d ) , this . x = a , this . y = b , this . camera . bounds && this . camera . bounds . setTo ( a , b , Math . max ( c , this . game . width ) , Math . max ( d , this . game . height ) ) , this . game . physics . setBoundsToWorld ( ) } , c . World . prototype . resize = function ( a , b ) { this . _definedSize && ( a < this . _width && ( a = this . _width ) , b < this . _height && ( b = this . _height ) ) , this . bounds . width = a , this . bounds . height = b , this . game . camera . setBoundsToWorld ( ) , this . game . physics . setBoundsToWorld ( ) } , c . World . prototype . shutdown = function ( ) { this . destroy ( ! 0 , ! 0 ) } , c . World . prototype . wrap = function ( a , b , c , d , e ) { void 0 === b && ( b = 0 ) , void 0 === c && ( c = ! 1 ) , void 0 === d && ( d = ! 0 ) , void 0 === e && ( e = ! 0 ) , c ? ( a . getBounds ( ) , d && ( a . x + a . _currentBounds . width < this . bounds . x ? a . x = this . bounds . right : a . x > this . bounds . right && ( a . x = this . bounds . left ) ) , e && ( a . y + a . _currentBounds . height < this . bounds . top ? a . y = this . bounds . bottom : a . y > this . bounds . bottom && ( a . y = this . bounds . top ) ) ) : ( d && a . x + b < this . bounds . x ? a . x = this . bounds . right + b : d && a . x - b > this . bounds . right && ( a . x = this . bounds . left - b ) , e && a . y + b < this . bounds . top ? a . y = this . bounds . bottom + b : e && a . y - b > this . bounds . bottom && ( a . y = this . bounds . top - b ) ) } , Object . defineProperty ( c . World . prototype , "width" , { get : function ( ) { return this . bounds . width } , set : function ( a ) { a < this . game . width && ( a = this . game . width ) , this . bounds . width = a , this . _width = a , this . _definedSize = ! 0 } } ) , Object . defineProperty ( c . World . prototype , "height" , { get : function ( ) { return this . bounds . height } , set : function ( a ) { a < this . game . height && ( a = this . game . height ) , this . bounds . height = a , this . _height = a , this . _definedSize = ! 0 } } ) , Object . defineProperty ( c . World . prototype , "centerX" , { get : function ( ) { return this . bounds . halfWidth + this . bounds . x } } ) , Object . defineProperty ( c . World . prototype , "centerY" , { get : function ( ) { return this . bounds . halfHeight + this . bounds . y } } ) , Object . defineProperty ( c . World . prototype , "randomX" , { get : function ( ) { return this . bounds . x < 0 ? this . game . rnd . between ( this . bounds . x , this . bounds . width - Math . abs ( this . bounds . x ) ) : this . game . rnd . between ( this . bounds . x , this . bounds . width ) } } ) , Object . defineProperty ( c . World . prototype , "randomY" , { get : function ( ) { return this . bounds . y < 0 ? this . game . rnd . between ( this . bounds . y , this . bounds . height - Math . abs ( this . bounds . y ) ) : this . game . rnd . between ( this . bounds . y , this . bounds . height ) } } ) , c . Game = function ( a , b , d , e , f , g , h , i ) { return this . id = c . GAMES . push ( this ) - 1 , this . config = null , this . physicsConfig = i , this . parent = "" , this . width = 800 , this . height = 600 , this . resolution = 1 , this . _width = 800 , this . _height = 600 , this . transparent = ! 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 = nu
this . value = 0 , this . buttonCode = b , this . onDown = new c . Signal , this . onUp = new c . Signal , this . onFloat = new c . Signal } , c . DeviceButton . prototype = { start : function ( a , b ) { this . isDown || ( this . isDown = ! 0 , this . isUp = ! 1 , this . timeDown = this . game . time . time , this . repeats = 0 , this . event = a , this . value = b , a && ( this . altKey = a . altKey , this . shiftKey = a . shiftKey , this . ctrlKey = a . ctrlKey ) , this . onDown . dispatch ( this , b ) ) } , stop : function ( a , b ) { this . isUp || ( this . isDown = ! 1 , this . isUp = ! 0 , this . timeUp = this . game . time . time , this . event = a , this . value = b , a && ( this . altKey = a . altKey , this . shiftKey = a . shiftKey , this . ctrlKey = a . ctrlKey ) , this . onUp . dispatch ( this , b ) ) } , padFloat : function ( a ) { this . value = a , this . onFloat . dispatch ( this , a ) } , justPressed : function ( a ) { return a = a || 250 , this . isDown && this . timeDown + a > this . game . time . time } , justReleased : function ( a ) { return a = a || 250 , this . isUp && this . timeUp + a > this . game . time . time } , reset : function ( ) { this . isDown = ! 1 , this . isUp = ! 0 , this . timeDown = this . game . time . time , this . repeats = 0 , this . altKey = ! 1 , this . shiftKey = ! 1 , this . ctrlKey = ! 1 } , destroy : function ( ) { this . onDown . dispose ( ) , this . onUp . dispose ( ) , this . onFloat . dispose ( ) , this . parent = null , this . game = null } } , c . DeviceButton . prototype . constructor = c . DeviceButton , Object . defineProperty ( c . DeviceButton . prototype , "duration" , { get : function ( ) { return this . isUp ? - 1 : this . game . time . time - this . timeDown } } ) , c . Pointer = function ( a , b , d ) { this . game = a , this . id = b , this . type = c . POINTER , this . exists = ! 0 , this . identifier = 0 , this . pointerId = null , this . pointerMode = d || c . PointerMode . CURSOR | c . PointerMode . CONTACT , this . target = null , this . button = null , this . leftButton = new c . DeviceButton ( this , c . Pointer . LEFT _BUTTON ) , this . middleButton = new c . DeviceButton ( this , c . Pointer . MIDDLE _BUTTON ) , this . rightButton = new c . DeviceButton ( this , c . Pointer . RIGHT _BUTTON ) , this . backButton = new c . DeviceButton ( this , c . Pointer . BACK _BUTTON ) , this . forwardButton = new c . DeviceButton ( this , c . Pointer . FORWARD _BUTTON ) , this . eraserButton = new c . DeviceButton ( this , c . Pointer . ERASER _BUTTON ) , this . _holdSent = ! 1 , this . _history = [ ] , this . _nextDrop = 0 , this . _stateReset = ! 1 , this . withinGame = ! 1 , this . clientX = - 1 , this . clientY = - 1 , this . pageX = - 1 , this . pageY = - 1 , this . screenX = - 1 , this . screenY = - 1 , this . rawMovementX = 0 , this . rawMovementY = 0 , this . movementX = 0 , this . movementY = 0 , this . x = - 1 , this . y = - 1 , this . isMouse = 0 === b , this . isDown = ! 1 , this . isUp = ! 0 , this . timeDown = 0 , this . timeUp = 0 , this . previousTapTime = 0 , this . totalTouches = 0 , this . msSinceLastClick = Number . MAX _VALUE , this . targetObject = null , this . 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 || t
if ( a ) { this . _rawPads = [ ] ; for ( var b = ! 1 , c = 0 ; c < a . length && ( typeof a [ c ] !== this . _prevRawGamepadTypes [ c ] && ( b = ! 0 , this . _prevRawGamepadTypes [ c ] = typeof a [ c ] ) , a [ c ] && this . _rawPads . push ( a [ c ] ) , 3 !== c ) ; c ++ ) ; for ( var d = 0 ; d < this . _gamepads . length ; d ++ ) this . _gamepads [ d ] . _rawPad = this . _rawPads [ d ] ; if ( b ) { for ( var e , f = { rawIndices : { } , padIndices : { } } , g = 0 ; g < this . _gamepads . length ; g ++ ) if ( e = this . _gamepads [ g ] , e . connected ) for ( var h = 0 ; h < this . _rawPads . length ; h ++ ) this . _rawPads [ h ] . index === e . index && ( f . rawIndices [ e . index ] = ! 0 , f . padIndices [ g ] = ! 0 ) ; for ( var i = 0 ; i < this . _gamepads . length ; i ++ ) if ( e = this . _gamepads [ i ] , ! f . padIndices [ i ] ) { this . _rawPads . length < 1 && e . disconnect ( ) ; for ( var j = 0 ; j < this . _rawPads . length && ! f . padIndices [ i ] ; j ++ ) { var k = this . _rawPads [ j ] ; if ( k ) { if ( f . rawIndices [ k . index ] ) { e . disconnect ( ) ; continue } e . connect ( k ) , f . rawIndices [ k . index ] = ! 0 , f . padIndices [ i ] = ! 0 } else e . disconnect ( ) } } } } } } , setDeadZones : function ( a ) { for ( var b = 0 ; b < this . _gamepads . length ; b ++ ) this . _gamepads [ b ] . deadZone = a } , stop : function ( ) { this . _active = ! 1 , window . removeEventListener ( "gamepadconnected" , this . _onGamepadConnected ) , window . removeEventListener ( "gamepaddisconnected" , this . _onGamepadDisconnected ) } , reset : function ( ) { this . update ( ) ; for ( var a = 0 ; a < this . _gamepads . length ; a ++ ) this . _gamepads [ a ] . reset ( ) } , justPressed : function ( a , b ) { for ( var c = 0 ; c < this . _gamepads . length ; c ++ ) if ( this . _gamepads [ c ] . justPressed ( a , b ) === ! 0 ) return ! 0 ; return ! 1 } , justReleased : function ( a , b ) { for ( var c = 0 ; c < this . _gamepads . length ; c ++ ) if ( this . _gamepads [ c ] . justReleased ( a , b ) === ! 0 ) return ! 0 ; return ! 1 } , isDown : function ( a ) { for ( var b = 0 ; b < this . _gamepads . length ; b ++ ) if ( this . _gamepads [ b ] . isDown ( a ) === ! 0 ) return ! 0 ; return ! 1 } , destroy : function ( ) { this . stop ( ) ; for ( var a = 0 ; a < this . _gamepads . length ; a ++ ) this . _gamepads [ a ] . destroy ( ) } } , c . Gamepad . prototype . constructor = c . Gamepad , Object . defineProperty ( c . 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 _R
} , c . GameObjectFactory . prototype = { existing : function ( a ) { return this . world . add ( a ) } , image : function ( a , b , d , e , f ) { return void 0 === f && ( f = this . world ) , f . add ( new c . Image ( this . game , a , b , d , e ) ) } , sprite : function ( a , b , c , d , e ) { return void 0 === e && ( e = this . world ) , e . create ( a , b , c , d ) } , creature : function ( a , b , d , e , f ) { void 0 === f && ( f = this . world ) ; var g = new c . Creature ( this . game , a , b , d , e ) ; return f . add ( g ) , g } , tween : function ( a ) { return this . game . tweens . create ( a ) } , group : function ( a , b , d , e , f ) { return new c . Group ( this . game , a , b , d , e , f ) } , physicsGroup : function ( a , b , d , e ) { return new c . Group ( this . game , b , d , e , ! 0 , a ) } , spriteBatch : function ( a , b , d ) { return void 0 === a && ( a = null ) , void 0 === b && ( b = "group" ) , void 0 === d && ( d = ! 1 ) , new c . SpriteBatch ( this . game , a , b , d ) } , audio : function ( a , b , c , d ) { return this . game . sound . add ( a , b , c , d ) } , sound : function ( a , b , c , d ) { return this . game . sound . add ( a , b , c , d ) } , audioSprite : function ( a ) { return this . game . sound . addSprite ( a ) } , tileSprite : function ( a , b , d , e , f , g , h ) { return void 0 === h && ( h = this . world ) , h . add ( new c . TileSprite ( this . game , a , b , d , e , f , g ) ) } , rope : function ( a , b , d , e , f , g ) { return void 0 === g && ( g = this . world ) , g . add ( new c . Rope ( this . game , a , b , d , e , f ) ) } , text : function ( a , b , d , e , f ) { return void 0 === f && ( f = this . world ) , f . add ( new c . Text ( this . game , a , b , d , e ) ) } , button : function ( a , b , d , e , f , g , h , i , j , k ) { return void 0 === k && ( k = this . world ) , k . add ( new c . Button ( this . game , a , b , d , e , f , g , h , i , j ) ) } , graphics : function ( a , b , d ) { return void 0 === d && ( d = this . world ) , d . add ( new c . Graphics ( this . game , a , b ) ) } , emitter : function ( a , b , d ) { return this . game . particles . add ( new c . Particles . Arcade . Emitter ( this . game , a , b , d ) ) } , retroFont : function ( a , b , d , e , f , g , h , i , j ) { return new c . RetroFont ( this . game , a , b , d , e , f , g , h , i , j ) } , bitmapText : function ( a , b , d , e , f , g ) { return void 0 === g && ( g = this . world ) , g . add ( new c . BitmapText ( this . game , a , b , d , 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
this . _prevTint = this . tint ) , this . _cacheAsBitmap ) return ( this . dirty || this . cachedSpriteDirty ) && ( this . _generateCachedSprite ( ) , this . updateCachedSpriteTexture ( ) , this . cachedSpriteDirty = ! 1 , this . dirty = ! 1 ) , this . _cachedSprite . alpha = this . alpha , void PIXI . Sprite . prototype . _renderCanvas . call ( this . _cachedSprite , a ) ; var b = a . context , c = this . worldTransform ; this . blendMode !== a . currentBlendMode && ( a . currentBlendMode = this . blendMode , b . globalCompositeOperation = PIXI . blendModesCanvas [ a . currentBlendMode ] ) , this . _mask && a . maskManager . pushMask ( this . _mask , a ) ; var d = a . resolution , e = c . tx * a . resolution + a . shakeX , f = c . ty * a . resolution + a . shakeY ; b . setTransform ( c . a * d , c . b * d , c . c * d , c . d * d , e , f ) , PIXI . CanvasGraphics . renderGraphics ( this , b ) ; for ( var g = 0 ; g < this . children . length ; g ++ ) this . children [ g ] . _renderCanvas ( a ) ; this . _mask && a . maskManager . popMask ( a ) } } , PIXI . Graphics . prototype . getBounds = function ( a ) { if ( ! this . _currentBounds ) { if ( ! this . renderable ) return PIXI . EmptyRectangle ; this . dirty && ( this . updateLocalBounds ( ) , this . webGLDirty = ! 0 , this . cachedSpriteDirty = ! 0 , this . dirty = ! 1 ) ; var b = this . _localBounds , c = b . x , d = b . width + b . x , e = b . y , f = b . height + b . y , g = a || this . worldTransform , h = g . a , i = g . b , j = g . c , k = g . d , l = g . tx , m = g . ty , n = h * d + j * f + l , o = k * f + i * d + m , p = h * c + j * f + l , q = k * f + i * c + m , r = h * c + j * e + l , s = k * e + i * c + m , t = h * d + j * e + l , u = k * e + i * d + m , v = n , w = o , x = n , y = o ; x = x > p ? p : x , x = x > r ? r : x , x = x > t ? t : x , y = y > q ? q : y , y = y > s ? s : y , y = y > u ? u : y , v = p > v ? p : v , v = r > v ? r : v , v = t > v ? t : v , w = q > w ? q : w , w = s > w ? s : w , w = u > w ? u : w , this . _bounds . x = x , this . _bounds . width = v - x , this . _bounds . y = y , this . _bounds . height = w - y , this . _currentBounds = this . _bounds } return this . _currentBounds } , PIXI . Graphics . prototype . containsPoint = function ( a ) { this . worldTransform . applyInverse ( a , tempPoint ) ; for ( var b = this . graphicsData , c = 0 ; c < b . length ; c ++ ) { var d = b [ c ] ; if ( d . fill && d . shape && d . shape . contains ( tempPoint . x , 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 , th
this . context . scale ( this . _res , this . _res ) , navigator . isCocoonJS && this . context . clearRect ( 0 , 0 , this . canvas . width , this . canvas . height ) , this . style . backgroundColor && ( this . context . fillStyle = this . style . backgroundColor , this . context . fillRect ( 0 , 0 , this . canvas . width , this . canvas . height ) ) , this . context . fillStyle = this . style . fill , this . context . font = this . style . font , this . context . strokeStyle = this . style . stroke , this . context . textBaseline = "alphabetic" , this . context . lineWidth = this . style . strokeThickness , this . context . lineCap = "round" , this . context . lineJoin = "round" ; var r , s ; for ( this . _charCount = 0 , h = 0 ; g > h ; h ++ ) r = this . style . strokeThickness / 2 , s = this . style . strokeThickness / 2 + h * o + f . ascent , h > 0 && ( s += q * h ) , "right" === this . style . align ? r += e - d [ h ] : "center" === this . style . align && ( r += ( e - d [ h ] ) / 2 ) , this . autoRound && ( r = Math . round ( r ) , s = Math . round ( s ) ) , this . colors . length > 0 || this . strokeColors . length > 0 || this . fontWeights . length > 0 || this . fontStyles . length > 0 ? this . updateLine ( b [ h ] , r , s ) : ( this . style . stroke && this . style . strokeThickness && ( this . updateShadow ( this . style . shadowStroke ) , 0 === c ? this . context . strokeText ( b [ h ] , r , s ) : this . renderTabLine ( b [ h ] , r , s , ! 1 ) ) , this . style . fill && ( this . updateShadow ( this . style . shadowFill ) , 0 === c ? this . context . fillText ( b [ h ] , r , s ) : this . renderTabLine ( b [ h ] , r , s , ! 0 ) ) ) ; this . updateTexture ( ) } , c . Text . prototype . renderTabLine = function ( a , b , c , d ) { var e = a . split ( /(?:\t)/ ) , f = this . style . tabs , g = 0 ; if ( Array . isArray ( f ) ) for ( var h = 0 , i = 0 ; i < e . length ; i ++ ) i > 0 && ( h += f [ i - 1 ] ) , g = b + h , d ? this . context . fillText ( e [ i ] , g , c ) : this . context . strokeText ( e [ i ] , g , c ) ; else for ( var i = 0 ; i < e . length ; i ++ ) { var j = Math . ceil ( this . context . measureText ( e [ i ] ) . width ) ; g = this . game . math . snapToCeil ( b , f ) , d ? this . context . fillText ( e [ i ] , g , c ) : this . context . strokeText ( e [ i ] , g , c ) , b = g + j } } , c . Text . prototype . updateShadow = function ( a ) { a ? ( this . context . shadowOffsetX = this . style . shadowOffsetX , this . context . shadowOffsetY = this . style . shadowOffsetY , this . context . shadowColor = this . style . shadowColor , this . context . shadowBlur = this . style . shadowBlur ) : ( this . context . shadowOffsetX = 0 , this . context . shadowOffsetY = 0 , this . context . shadowColor = 0 , this . context . shadowBlur = 0 ) } , c . Text . prototype . measureLine = function ( a ) { for ( var b = 0 , c = 0 ; c < a . length ; c ++ ) { var d = a [ c ] ; if ( this . fontWeights . length > 0 || this . fontStyles . length > 0 ) { var e = this . fontToComponents ( this . context . font ) ; this . fontStyles [ this . _charCount ] && ( e . fontStyle = this . fontStyles [ this . _charCount ] ) , this . fontWeights [ this . _charCount ] && ( e . fontWeight = this . fontWeights [ this . _charCount ] ) , this . context . font = this . componentsToFont ( e ) } this . style . stroke && this . style . strokeThickness && ( this . strokeColors [ this . _charCount ] && ( this . context . strokeStyle = this . strokeColors [ this . _charCount ] ) , this . updateShadow ( this . style . shadowStroke ) ) , this . style . fill && ( this . colors [ this . _charCount ] && ( this . context . fillStyle = this . colors [ this . _charCount ] ) , this . updateShadow ( this . style . shadowFill ) ) , b += this . context . measureText ( d ) . width , this . _charCount ++ } return Math . ceil ( b ) } , c . Text . prototype . updateLine = function ( a , b , c ) { for ( var d = 0 ; d < a . length ; d ++ ) { 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 .
( l . windowsPhone || /Windows NT/i . test ( a ) && /Touch/i . test ( a ) ) && ( l . desktop = ! 1 ) } function b ( ) { l . canvas = ! ! window . CanvasRenderingContext2D || l . cocoonJS ; try { l . localStorage = ! ! localStorage . getItem } catch ( a ) { l . localStorage = ! 1 } l . file = ! ! ( window . File && window . FileReader && window . FileList && window . Blob ) , l . fileSystem = ! ! window . requestFileSystem , l . webGL = function ( ) { try { var a = document . createElement ( "canvas" ) ; return a . screencanvas = ! 1 , ! ! window . WebGLRenderingContext && ( a . getContext ( "webgl" ) || a . getContext ( "experimental-webgl" ) ) } catch ( b ) { return ! 1 } } ( ) , l . webGL = ! ! l . webGL , l . worker = ! ! window . Worker , l . pointerLock = "pointerLockElement" in document || "mozPointerLockElement" in document || "webkitPointerLockElement" in document , l . quirksMode = "CSS1Compat" === document . compatMode ? ! 1 : ! 0 , navigator . getUserMedia = navigator . getUserMedia || navigator . webkitGetUserMedia || navigator . mozGetUserMedia || navigator . msGetUserMedia || navigator . oGetUserMedia , window . URL = window . URL || window . webkitURL || window . mozURL || window . msURL , l . getUserMedia = l . getUserMedia && ! ! navigator . getUserMedia && ! ! window . URL , l . firefox && l . firefoxVersion < 21 && ( l . getUserMedia = ! 1 ) , ! l . iOS && ( l . ie || l . firefox || l . chrome ) && ( l . canvasBitBltShift = ! 0 ) , ( l . safari || l . mobileSafari ) && ( l . canvasBitBltShift = ! 1 ) } function c ( ) { ( "ontouchstart" in document . documentElement || window . navigator . maxTouchPoints && window . navigator . maxTouchPoints >= 1 ) && ( l . touch = ! 0 ) , ( window . navigator . msPointerEnabled || window . navigator . pointerEnabled ) && ( l . mspointer = ! 0 ) , l . cocoonJS || ( "onwheel" in window || l . ie && "WheelEvent" in window ? l . wheelEvent = "wheel" : "onmousewheel" in window ? l . wheelEvent = "mousewheel" : l . firefox && "MouseScrollEvent" in window && ( l . wheelEvent = "DOMMouseScroll" ) ) } function d ( ) { for ( var a = [ "requestFullscreen" , "requestFullScreen" , "webkitRequestFullscreen" , "webkitRequestFullScreen" , "msRequestFullscreen" , "msRequestFullScreen" , "mozRequestFullScreen" , "mozRequestFullscreen" ] , b = document . createElement ( "div" ) , c = 0 ; c < a . length ; c ++ ) if ( b [ a [ c ] ] ) { l . fullscreen = ! 0 , l . requestFullscreen = a [ c ] ; break } var d = [ "cancelFullScreen" , "exitFullscreen" , "webkitCancelFullScreen" , "webkitExitFullscreen" , "msCancelFullScreen" , "msExitFullscreen" , "mozCancelFullScreen" , "mozExitFullscreen" ] ; if ( l . fullscreen ) for ( var c = 0 ; c < d . length ; c ++ ) if ( document [ d [ c ] ] ) { l . cancelFullscreen = d [ c ] ; break } window . Element && Element . ALLOW _KEYBOARD _INPUT && ( l . fullscreenKeyboard = ! 0 ) } function e ( ) { var a = navigator . userAgent ; if ( /Arora/ . test ( a ) ? l . arora = ! 0 : /Edge\/\d+/ . test ( a ) ? l . edge = ! 0 : /Chrome\/(\d+)/ . test ( a ) && ! l . windowsPhone ? ( l . chrome = ! 0 , l . chromeVersion = parseInt ( RegExp . $1 , 10 ) ) : /Epiphany/ . test ( a ) ? l . epiphany = ! 0 : /Firefox\D+(\d+)/ . test ( a ) ? ( l . firefox = ! 0 , l . firefoxVersion = parseInt ( RegExp . $1 , 10 ) ) : /AppleWebKit/ . test ( a ) && l . iOS ? l . mobileSafari = ! 0 : /MSIE (\d+\.\d+);/ . test ( a ) ? ( l . ie = ! 0 , l . ieVersion = parseInt ( RegExp . $1 , 10 ) ) : /Midori/ . test ( a ) ? l . midori = ! 0 : /Opera/ . test ( a ) ? l . opera = ! 0 : /Safari\/(\d+)/ . test ( a ) && ! l . windowsPhone ? ( l . safari = ! 0 , /Version\/(\d+)\./ . test ( a ) && ( l . safariVersion = parseInt ( RegExp . $1 , 10 ) ) ) : /Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/ . test ( a ) && ( l . ie = ! 0 , 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 ) ) } catc
if ( a < this . startTime ) return c . TweenData . RUNNING } else { if ( ! ( a >= this . startTime ) ) return c . TweenData . PENDING ; this . isRunning = ! 0 } var b = this . parent . frameBased ? this . game . time . physicsElapsedMS : this . game . time . elapsedMS ; this . parent . reverse ? ( this . dt -= b * this . parent . timeScale , this . dt = Math . max ( this . dt , 0 ) ) : ( this . dt += b * this . parent . timeScale , this . dt = Math . min ( this . dt , this . duration ) ) , this . percent = this . dt / this . duration , this . value = this . easingFunction ( this . percent ) ; for ( var d in this . vEnd ) { var e = this . vStart [ d ] , f = this . vEnd [ d ] ; Array . isArray ( f ) ? this . parent . target [ d ] = this . interpolationFunction . call ( this . interpolationContext , f , this . value ) : this . parent . target [ d ] = e + ( f - e ) * this . value } return ! this . parent . reverse && 1 === this . percent || this . parent . reverse && 0 === this . percent ? this . repeat ( ) : c . TweenData . RUNNING } , generateData : function ( a ) { this . parent . reverse ? this . dt = this . duration : this . dt = 0 ; var b = [ ] , c = ! 1 , d = 1 / a * 1e3 ; do { this . parent . reverse ? ( this . dt -= d , this . dt = Math . max ( this . dt , 0 ) ) : ( this . dt += d , this . dt = Math . min ( this . dt , this . duration ) ) , this . percent = this . dt / this . duration , this . value = this . easingFunction ( this . percent ) ; var e = { } ; for ( var f in this . vEnd ) { var g = this . vStart [ f ] , h = this . vEnd [ f ] ; Array . isArray ( h ) ? e [ f ] = this . interpolationFunction ( h , this . value ) : e [ f ] = g + ( h - g ) * this . value } b . push ( e ) , ( ! this . parent . reverse && 1 === this . percent || this . parent . reverse && 0 === this . percent ) && ( c = ! 0 ) } while ( ! c ) ; if ( this . yoyo ) { var i = b . slice ( ) ; i . reverse ( ) , b = b . concat ( i ) } return b } , repeat : function ( ) { if ( this . yoyo ) { if ( this . inReverse && 0 === this . repeatCounter ) { for ( var a in this . vStartCache ) this . vStart [ a ] = this . vStartCache [ a ] , this . vEnd [ a ] = this . vEndCache [ a ] ; return this . inReverse = ! 1 , c . TweenData . COMPLETE } this . inReverse = ! this . inReverse } else if ( 0 === this . repeatCounter ) return c . TweenData . COMPLETE ; if ( this . inReverse ) for ( var a in this . vStartCache ) this . vStart [ a ] = this . vEndCache [ a ] , this . vEnd [ a ] = this . vStartCache [ a ] ; else { for ( var a in this . vStartCache ) this . vStart [ a ] = this . vStartCache [ a ] , this . vEnd [ a ] = this . vEndCache [ a ] ; this . repeatCounter > 0 && this . repeatCounter -- } return this . startTime = this . game . time . time , this . yoyo && this . inReverse ? this . startTime += this . yoyoDelay : this . inReverse || ( this . startTime += this . repeatDelay ) , this . parent . reverse ? this . dt = this . duration : this . dt = 0 , c . TweenData . LOOPED } } , c . TweenData . prototype . constructor = c . TweenData , c . Easing = { Linear : { None : function ( a ) { return a } } , Quadratic : { In : function ( a ) { return a * a } , Out : function ( a ) { return a * ( 2 - a ) } , InOut : function ( a ) { return ( a *= 2 ) < 1 ? . 5 * a * a : - . 5 * ( -- a * ( a - 2 ) - 1 ) } } , Cubic : { In : function ( a ) { return a * a * a } , Out : function ( a ) { return -- a * a * a + 1 } , InOut : function ( a ) { return ( a *= 2 ) < 1 ? . 5 * a * a * a : . 5 * ( ( a -= 2 ) * a * a + 2 ) } } , Quartic : { In : function ( a ) { return a * a * a * a } , Out : function ( a ) { return 1 - -- a * a * a * a } , InOut : function ( a ) { return ( a *= 2 ) < 1 ? . 5 * a * a * a * a : - . 5 * ( ( a -= 2 ) * a * a * a - 2 ) } } , Quintic : { In : function ( a ) { return a * a * a * a * a } , Out : function ( a ) { return -- a * a * a * a * a + 1 } , InOut : function ( a ) { return ( a *= 2 ) < 1 ? . 5 * a * a * a * a * a : . 5 * ( ( a -= 2 ) * a * a * a * a + 2 ) } } , Sinusoidal : { In : function ( a ) { return 0 === a ? 0 : 1 === a ? 1 : 1 - Math . cos ( a * Math . PI / 2 ) } , Out : function ( a ) { return 0 === a ? 0 : 1 === a ? 1 : Math . sin ( a * Math . PI / 2 ) } , 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 : functio
PIXI . TextureCache . _ _missing = new PIXI . Texture ( b . base ) } , addSound : function ( a , b , c , d , e ) { void 0 === d && ( d = ! 0 , e = ! 1 ) , void 0 === e && ( d = ! 1 , e = ! 0 ) ; var f = ! 1 ; e && ( f = ! 0 ) , this . _cache . sound [ a ] = { url : b , data : c , isDecoding : ! 1 , decoded : f , webAudio : d , audioTag : e , locked : this . game . sound . touchLocked } , this . _resolveURL ( b , this . _cache . sound [ a ] ) } , addText : function ( a , b , c ) { this . _cache . text [ a ] = { url : b , data : c } , this . _resolveURL ( b , this . _cache . text [ a ] ) } , addPhysicsData : function ( a , b , c , d ) { this . _cache . physics [ a ] = { url : b , data : c , format : d } , this . _resolveURL ( b , this . _cache . physics [ a ] ) } , addTilemap : function ( a , b , c , d ) { this . _cache . tilemap [ a ] = { url : b , data : c , format : d } , this . _resolveURL ( b , this . _cache . tilemap [ a ] ) } , addBinary : function ( a , b ) { this . _cache . binary [ a ] = b } , addBitmapData : function ( a , b , d ) { return b . key = a , void 0 === d && ( d = new c . FrameData , d . addFrame ( b . textureFrame ) ) , this . _cache . bitmapData [ a ] = { data : b , frameData : d } , b } , addBitmapFont : function ( a , b , d , e , f , g , h ) { var i = { url : b , data : d , font : null , base : new PIXI . BaseTexture ( d ) } ; void 0 === g && ( g = 0 ) , void 0 === h && ( h = 0 ) , "json" === f ? i . font = c . LoaderParser . jsonBitmapFont ( e , i . base , g , h ) : i . font = c . LoaderParser . xmlBitmapFont ( e , i . base , g , h ) , this . _cache . bitmapFont [ a ] = i , this . _resolveURL ( b , i ) } , addJSON : function ( a , b , c ) { this . _cache . json [ a ] = { url : b , data : c } , this . _resolveURL ( b , this . _cache . json [ a ] ) } , addXML : function ( a , b , c ) { this . _cache . xml [ a ] = { url : b , data : c } , this . _resolveURL ( b , this . _cache . xml [ a ] ) } , addVideo : function ( a , b , c , d ) { this . _cache . video [ a ] = { url : b , data : c , isBlob : d , locked : ! 0 } , this . _resolveURL ( b , this . _cache . video [ a ] ) } , addShader : function ( a , b , c ) { this . _cache . shader [ a ] = { url : b , data : c } , this . _resolveURL ( b , this . _cache . shader [ a ] ) } , addRenderTexture : function ( a , b ) { this . _cache . renderTexture [ a ] = { texture : b , frame : new c . Frame ( 0 , 0 , 0 , b . width , b . height , "" , "" ) } } , addSpriteSheet : function ( a , b , d , e , f , g , h , i ) { void 0 === g && ( g = - 1 ) , void 0 === h && ( h = 0 ) , void 0 === i && ( i = 0 ) ; var j = { key : a , url : b , data : d , frameWidth : e , frameHeight : f , margin : h , spacing : i , base : new PIXI . BaseTexture ( d ) , frameData : c . AnimationParser . spriteSheet ( this . game , d , e , f , g , h , i ) } ; this . _cache . image [ a ] = j , this . _resolveURL ( b , j ) } , addTextureAtlas : function ( a , b , d , e , f ) { var g = { key : a , url : b , data : d , base : new PIXI . BaseTexture ( d ) } ; f === c . Loader . TEXTURE _ATLAS _XML _STARLING ? g . frameData = c . AnimationParser . XMLData ( this . game , e , a ) : f === c . Loader . TEXTURE _ATLAS _JSON _PYXEL ? g . frameData = c . AnimationParser . JSONDataPyxel ( this . game , e , a ) : Array . isArray ( e . frames ) ? g . frameData = c . AnimationParser . JSONData ( this . game , e , a ) : g . frameData = c . AnimationParser . JSONDataHash ( this . game , e , a ) , this . _cache . image [ a ] = g , this . _resolveURL ( b , g ) } , reloadSound : function ( a ) { var b = this , c = this . getSound ( a ) ; c && ( c . data . src = c . url , c . data . addEventListener ( "canplaythrough" , function ( ) { return b . reloadSoundComplete ( a ) } , ! 1 ) , c . data . load ( ) ) } , reloadSoundComplete : function ( a ) { var b = this . getSound ( a ) ; b && ( b . locked = ! 1 , this . onSoundUnlock . dispatch ( a ) ) } , updateSound : function ( a , b , c ) { var d = this . getSound ( a ) ; d && ( d [ b ] = c ) } , decodedSound : function ( a , b ) { var c = this . getSound ( a ) ; c . data = b , c . decoded = ! 0 , c . isDecoding = ! 1 } , isSoundDecoded : function ( a ) { var b = this . getItem ( a , c . Cache . SOUND , "isSoundDecoded" ) ; return b ? b . decoded : void 0 } , isSoundReady : function ( a ) { var b = this . getItem ( a , c . Cache . SOUND , "isSoundDecoded" ) ; return b ? b . decoded && ! this . game . sound . touchLocked : void 0 } , checkKey : function ( a , b ) { return this . _cacheMap [ a ] [ b ] ? ! 0 : ! 1 } , checkURL : function ( a ) { return this . _urlMap [ this . _resolveURL ( a ) ] ? ! 0 : ! 1 } , checkCanvasKey : function ( a ) { return this . checkKey ( c . Cache . CANVAS , a ) } , checkImageKey : function ( a ) { return this . checkKey ( c . Cache . IMAGE , a ) } , checkTextureKey : function ( a ) { return this . checkKey ( c . Cache . TEXTURE , a ) } , checkSoundKey : function ( a ) { 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 ) } , checkVide
e . chars [ m ] . kerning [ l ] = n } return this . finalizeBitmapFont ( b , e ) } , jsonBitmapFont : function ( a , b , c , d ) { var e = { font : a . font . info . _face , size : parseInt ( a . font . info . _size , 10 ) , lineHeight : parseInt ( a . font . common . _lineHeight , 10 ) + d , chars : { } } ; return a . font . chars [ "char" ] . forEach ( function ( a ) { var b = parseInt ( a . _id , 10 ) ; e . chars [ b ] = { x : parseInt ( a . _x , 10 ) , y : parseInt ( a . _y , 10 ) , width : parseInt ( a . _width , 10 ) , height : parseInt ( a . _height , 10 ) , xOffset : parseInt ( a . _xoffset , 10 ) , yOffset : parseInt ( a . _yoffset , 10 ) , xAdvance : parseInt ( a . _xadvance , 10 ) + c , kerning : { } } } ) , a . font . kernings && a . font . kernings . kerning && a . font . kernings . kerning . forEach ( function ( a ) { e . chars [ a . _second ] . kerning [ a . _first ] = parseInt ( a . _amount , 10 ) } ) , this . finalizeBitmapFont ( b , e ) } , finalizeBitmapFont : function ( a , b ) { return Object . keys ( b . chars ) . forEach ( function ( d ) { var e = b . chars [ d ] ; e . texture = new PIXI . Texture ( a , new c . Rectangle ( e . x , e . y , e . width , e . height ) ) } ) , b } } , c . AudioSprite = function ( a , b ) { this . game = a , this . key = b , this . config = this . game . cache . getJSON ( b + "-audioatlas" ) , this . autoplayKey = null , this . autoplay = ! 1 , this . sounds = { } ; for ( var c in this . config . spritemap ) { var d = this . config . spritemap [ c ] , e = this . game . add . sound ( this . key ) ; e . addMarker ( c , d . start , d . end - d . start , null , d . loop ) , this . sounds [ c ] = e } this . config . autoplay && ( this . autoplayKey = this . config . autoplay , this . play ( this . autoplayKey ) , this . autoplay = this . sounds [ this . autoplayKey ] ) } , c . AudioSprite . prototype = { play : function ( a , b ) { return void 0 === b && ( b = 1 ) , this . sounds [ a ] . play ( a , null , b ) } , stop : function ( a ) { if ( a ) this . sounds [ a ] . stop ( ) ; else for ( var b in this . sounds ) this . sounds [ b ] . stop ( ) } , get : function ( a ) { return this . sounds [ a ] } } , c . AudioSprite . prototype . constructor = c . AudioSprite , c . Sound = function ( a , b , d , e , f ) { void 0 === d && ( d = 1 ) , void 0 === e && ( e = ! 1 ) , void 0 === f && ( f = a . sound . connectToMaster ) , this . game = a , this . name = b , this . key = b , this . loop = e , this . volume = d , this . markers = { } , this . context = null , this . autoplay = ! 1 , this . totalDuration = 0 , this . startTime = 0 , this . currentTime = 0 , this . duration = 0 , this . durationMS = 0 , this . position = 0 , this . stopTime = 0 , this . paused = ! 1 , this . pausedPosition = 0 , this . pausedTime = 0 , this . isPlaying = ! 1 , this . currentMarker = "" , this . fadeTween = null , this . pendingPlayback = ! 1 , this . override = ! 1 , this . allowMultiple = ! 1 , this . usingWebAudio = this . game . sound . usingWebAudio , this . usingAudioTag = this . game . sound . usingAudioTag , this . externalNode = null , this . masterGainNode = null , this . gainNode = null , this . _sound = null , this . usingWebAudio ? ( this . context = this . game . sound . context , this . masterGainNode = this . game . sound . masterGain , void 0 === this . context . createGain ? this . gainNode = this . context . createGainNode ( ) : this . gainNode = this . context . createGain ( ) , this . gainNode . gain . value = d * this . game . sound . volume , f && this . gainNode . connect ( this . masterGainNode ) ) : this . usingAudioTag && ( this . game . cache . getSound ( b ) && this . game . cache . isSoundReady ( b ) ? ( this . _sound = this . game . cache . getSoundData ( b ) , this . totalDuration = 0 , this . _sound . duration && ( this . totalDuration = this . _sound . duration ) ) : this . game . cache . onSoundUnlock . add ( this . soundHasUnlocked , this ) ) , this . onDecoded = new c . Signal , this . onPlay = new c . Signal , this . onPause = new c . Signal , this . onResume = new c . Signal , this . onLoop = new c . Signal , this . onStop = new c . Signal , this . onMute = new c . Signal , this . onMarkerComplete = new c . Signal , this . onFadeComplete = new c . Signal , this . _volume = d , this . _buffer = null , this . _muted = ! 1 , this . _tempMarker = 0 , this . _tempPosition = 0 , this . _tempVolume = 0 , this . _tempPause = 0 , this . _muteVolume = 0 , this . _tempLoop = 0 , this . _paused = ! 1 , this . _onDecodedEventDispatched = ! 1 } , c . Sound . prototype = { soundHasUnlocked : function ( a ) { a === this . key && ( this . _sound = this . game . cache . getSoundData ( this . key ) , this . totalDuration = this . _sound . duration ) } , addMarker : function ( a , b , c , d , e ) { ( void 0 === c || null === c ) && ( c = 1 ) , ( 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 && thi
! 0 } , stopFullScreen : function ( ) { return this . isFullScreen && this . compatibility . supportsFullScreen ? ( document [ this . game . device . cancelFullscreen ] ( ) , ! 0 ) : ! 1 } , cleanupCreatedTarget : function ( ) { var a = this . _createdFullScreenTarget ; if ( a && a . parentNode ) { var b = a . parentNode ; b . insertBefore ( this . game . canvas , a ) , b . removeChild ( a ) } this . _createdFullScreenTarget = null } , prepScreenMode : function ( a ) { var b = ! ! this . _createdFullScreenTarget , d = this . _createdFullScreenTarget || this . fullScreenTarget ; a ? ( b || this . fullScreenScaleMode === c . ScaleManager . EXACT _FIT ) && d !== this . game . canvas && ( this . _fullScreenRestore = { targetWidth : d . style . width , targetHeight : d . style . height } , d . style . width = "100%" , d . style . height = "100%" ) : ( this . _fullScreenRestore && ( d . style . width = this . _fullScreenRestore . targetWidth , d . style . height = this . _fullScreenRestore . targetHeight , this . _fullScreenRestore = null ) , this . updateDimensions ( this . _gameSize . width , this . _gameSize . height , ! 0 ) , this . resetCanvas ( ) ) } , fullScreenChange : function ( a ) { this . event = a , this . isFullScreen ? ( this . prepScreenMode ( ! 0 ) , this . updateLayout ( ) , this . queueUpdate ( ! 0 ) ) : ( this . prepScreenMode ( ! 1 ) , this . cleanupCreatedTarget ( ) , this . updateLayout ( ) , this . queueUpdate ( ! 0 ) ) , this . onFullScreenChange . dispatch ( this , this . width , this . height ) } , fullScreenError : function ( a ) { this . event = a , this . cleanupCreatedTarget ( ) , console . warn ( "Phaser.ScaleManager: requestFullscreen failed or device does not support the Fullscreen API" ) , this . onFullScreenError . dispatch ( this ) } , scaleSprite : function ( a , b , c , d ) { if ( void 0 === b && ( b = this . width ) , void 0 === c && ( c = this . height ) , void 0 === d && ( d = ! 1 ) , ! a || ! a . scale ) return a ; if ( a . scale . x = 1 , a . scale . y = 1 , a . width <= 0 || a . height <= 0 || 0 >= b || 0 >= c ) return a ; var e = b , f = a . height * b / a . width , g = a . width * c / a . height , h = c , i = g > b ; return i = i ? d : ! d , i ? ( a . width = Math . floor ( e ) , a . height = Math . floor ( f ) ) : ( a . width = Math . floor ( g ) , a . height = Math . floor ( h ) ) , a } , destroy : function ( ) { this . game . onResume . remove ( this . _gameResumed , this ) , window . removeEventListener ( "orientationchange" , this . _orientationChange , ! 1 ) , window . removeEventListener ( "resize" , this . _windowResize , ! 1 ) , this . compatibility . supportsFullScreen && ( document . removeEventListener ( "webkitfullscreenchange" , this . _fullScreenChange , ! 1 ) , document . removeEventListener ( "mozfullscreenchange" , this . _fullScreenChange , ! 1 ) , document . removeEventListener ( "MSFullscreenChange" , this . _fullScreenChange , ! 1 ) , document . removeEventListener ( "fullscreenchange" , this . _fullScreenChange , ! 1 ) , document . removeEventListener ( "webkitfullscreenerror" , this . _fullScreenError , ! 1 ) , document . removeEventListener ( "mozfullscreenerror" , this . _fullScreenError , ! 1 ) , document . removeEventListener ( "MSFullscreenError" , this . _fullScreenError , ! 1 ) , document . removeEventListener ( "fullscreenerror" , this . _fullScreenError , ! 1 ) ) } } , c . ScaleManager . prototype . constructor = c . ScaleManager , Object . defineProperty ( c . ScaleManager . prototype , "boundingParent" , { get : function ( ) { if ( this . parentIsWindow || this . isFullScreen && ! this . _createdFullScreenTarget ) return null ; var a = this . game . canvas && this . game . canvas . parentNode ; return a || null } } ) , Object . defineProperty ( c . ScaleManager . prototype , "scaleMode" , { get : function ( ) { return this . _scaleMode } , set : function ( a ) { return a !== this . _scaleMode && ( this . isFullScreen || ( this . updateDimensions ( this . _gameSize . width , this . _gameSize . height , ! 0 ) , this . queueUpdate ( ! 0 ) ) , this . _scaleMode = a ) , this . _scaleMode } } ) , Object . defineProperty ( c . ScaleManager . prototype , "fullScreenScaleMode" , { get : function ( ) { return this . _fullScreenScaleMode } , set : function ( a ) { return a !== this . _fullScreenScaleMode && ( this . isFullScreen ? ( this . prepScreenMode ( ! 1 ) , this . _fullScreenScaleMode = a , this . prepScreenMode ( ! 0 ) , this . queueUpdate ( ! 0 ) ) : this . _fullScreenScaleMode = a ) , this . _fullScreenScaleMode } } ) , Object . defineProperty ( c . ScaleManager . prototype , "currentScaleMode" , { get : function ( ) { return this . isFullScreen ? this . _fullScreenScaleMode : this . _scaleMode } } ) , 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 : funct
"string" == typeof a ) return 0 === a . indexOf ( "rgb" ) ? c . Color . webToColor ( a , b ) : ( b . a = 1 , c . Color . hexToColor ( a , b ) ) ; if ( "number" == typeof a ) { var d = c . Color . getRGB ( a ) ; return b . r = d . r , b . g = d . g , b . b = d . b , b . a = d . a / 255 , b } return b } , componentToHex : function ( a ) { var b = a . toString ( 16 ) ; return 1 == b . length ? "0" + b : b } , HSVColorWheel : function ( a , b ) { void 0 === a && ( a = 1 ) , void 0 === b && ( b = 1 ) ; for ( var d = [ ] , e = 0 ; 359 >= e ; e ++ ) d . push ( c . Color . HSVtoRGB ( e / 359 , a , b ) ) ; return d } , HSLColorWheel : function ( a , b ) { void 0 === a && ( a = . 5 ) , void 0 === b && ( b = . 5 ) ; for ( var d = [ ] , e = 0 ; 359 >= e ; e ++ ) d . push ( c . Color . HSLtoRGB ( e / 359 , a , b ) ) ; return d } , interpolateColor : function ( a , b , d , e , f ) { void 0 === f && ( f = 255 ) ; var g = c . Color . getRGB ( a ) , h = c . Color . getRGB ( b ) , i = ( h . red - g . red ) * e / d + g . red , j = ( h . green - g . green ) * e / d + g . green , k = ( h . blue - g . blue ) * e / d + g . blue ; return c . Color . getColor32 ( f , i , j , k ) } , interpolateColorWithRGB : function ( a , b , d , e , f , g ) { var h = c . Color . getRGB ( a ) , i = ( b - h . red ) * g / f + h . red , j = ( d - h . green ) * g / f + h . green , k = ( e - h . blue ) * g / f + h . blue ; return c . Color . getColor ( i , j , k ) } , interpolateRGB : function ( a , b , d , e , f , g , h , i ) { var j = ( e - a ) * i / h + a , k = ( f - b ) * i / h + b , l = ( g - d ) * i / h + d ; return c . Color . getColor ( j , k , l ) } , getRandomColor : function ( a , b , d ) { if ( void 0 === a && ( a = 0 ) , void 0 === b && ( b = 255 ) , void 0 === d && ( d = 255 ) , b > 255 || a > b ) return c . Color . getColor ( 255 , 255 , 255 ) ; var e = a + Math . round ( Math . random ( ) * ( b - a ) ) , f = a + Math . round ( Math . random ( ) * ( b - a ) ) , g = a + Math . round ( Math . random ( ) * ( b - a ) ) ; return c . Color . getColor32 ( d , e , f , g ) } , getRGB : function ( a ) { return a > 16777215 ? { alpha : a >>> 24 , red : a >> 16 & 255 , green : a >> 8 & 255 , blue : 255 & a , a : a >>> 24 , r : a >> 16 & 255 , g : a >> 8 & 255 , b : 255 & a } : { alpha : 255 , red : a >> 16 & 255 , green : a >> 8 & 255 , blue : 255 & a , a : 255 , r : a >> 16 & 255 , g : a >> 8 & 255 , b : 255 & a } } , getWebRGB : function ( a ) { if ( "object" == typeof a ) return "rgba(" + a . r . toString ( ) + "," + a . g . toString ( ) + "," + a . b . toString ( ) + "," + ( a . a / 255 ) . toString ( ) + ")" ; var b = c . Color . getRGB ( a ) ; return "rgba(" + b . r . toString ( ) + "," + b . g . toString ( ) + "," + b . b . toString ( ) + "," + ( b . a / 255 ) . toString ( ) + ")" } , getAlpha : function ( a ) { return a >>> 24 } , getAlphaFloat : function ( a ) { return ( a >>> 24 ) / 255 } , getRed : function ( a ) { return a >> 16 & 255 } , getGreen : function ( a ) { return a >> 8 & 255 } , getBlue : function ( a ) { return 255 & a } , blendNormal : function ( a ) { return a } , blendLighten : function ( a , b ) { return b > a ? b : a } , blendDarken : function ( a , b ) { return b > a ? a : b } , blendMultiply : function ( a , b ) { return a * b / 255 } , blendAverage : function ( a , b ) { return ( a + b ) / 2 } , blendAdd : function ( a , b ) { return Math . min ( 255 , a + b ) } , blendSubtract : function ( a , b ) { return Math . max ( 0 , a + b - 255 ) } , blendDifference : function ( a , b ) { return Math . abs ( a - b ) } , blendNegation : function ( a , b ) { return 255 - Math . abs ( 255 - a - b ) } , blendScreen : function ( a , b ) { return 255 - ( ( 255 - a ) * ( 255 - b ) >> 8 ) } , blendExclusion : function ( a , b ) { return a + b - 2 * a * b / 255 } , blendOverlay : function ( a , b ) { return 128 > b ? 2 * a * b / 255 : 255 - 2 * ( 255 - a ) * ( 255 - b ) / 255 } , blendSoftLight : function ( a , b ) { return 128 > b ? 2 * ( ( a >> 1 ) + 64 ) * ( b / 255 ) : 255 - 2 * ( 255 - ( ( a >> 1 ) + 64 ) ) * ( 255 - b ) / 255 } , blendHardLight : function ( a , b ) { return c . Color . blendOverlay ( b , a ) } , blendColorDodge : function ( a , b ) { return 255 === b ? b : Math . min ( 255 , ( a << 8 ) / ( 255 - b ) ) } , blendColorBurn : function ( a , b ) { return 0 === b ? b : Math . max ( 0 , 255 - ( 255 - a << 8 ) / b ) } , blendLinearDodge : function ( a , b ) { return c . Color . blendAdd ( a , b ) } , blendLinearBurn : function ( a , b ) { return c . Color . blendSubtract ( a , b ) } , blendLinearLight : function ( a , b ) { return 128 > b ? c . Color . blendLinearBurn ( a , 2 * b ) : c . Color . blendLinearDodge ( a , 2 * ( b - 128 ) ) } , blendVividLight : function ( a , b ) { return 128 > b ? c . Color . blendColorBurn ( a , 2 * b ) : c . Color . blendColorDodge ( a , 2 * ( b - 128 ) ) } , blendPinLight : function ( a , b ) { return 128 > b ? c . Color . blendDarken ( a , 2 * b ) : c . Color . blendLighten ( a , 2 * ( b - 128 ) ) } , blendHardMix : function ( a , b ) { return c . Color . blendVividLight ( a , b ) < 128 ? 0 : 255 } , blendReflect : function ( a , b ) { return 255 === b ? b : Math . min ( 255 , a * a / ( 255 - b ) ) } , blendGlow : function ( a , b ) { return c . Color . blendReflect ( b , a ) } , blendPhoenix : function ( a , b ) { return Math . min ( a , b ) - Math . max ( a , b ) + 255 } } , c . Physics = function ( a , b ) { b = b || { } , this . game = a , 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 . ha
2015-02-25 02:59:00 +00:00
//# sourceMappingURL=phaser-no-physics.map