aboutsummaryrefslogtreecommitdiffstats
path: root/pixi.min.js.map
blob: 9a8a89a9b3c0ffe32afb36fd7635dd4505529e52 (plain)
1
{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/bit-twiddle/twiddle.js","node_modules/earcut/src/earcut.js","node_modules/eventemitter3/index.js","node_modules/ismobilejs/isMobile.js","node_modules/mini-signals/lib/mini-signals.js","node_modules/object-assign/index.js","node_modules/parse-uri/index.js","node_modules/path-browserify/index.js","node_modules/pixi-gl-core/src/GLBuffer.js","node_modules/pixi-gl-core/src/GLFramebuffer.js","node_modules/pixi-gl-core/src/GLShader.js","node_modules/pixi-gl-core/src/GLTexture.js","node_modules/pixi-gl-core/src/VertexArrayObject.js","node_modules/pixi-gl-core/src/createContext.js","node_modules/pixi-gl-core/src/index.js","node_modules/pixi-gl-core/src/setVertexAttribArrays.js","node_modules/pixi-gl-core/src/shader/compileProgram.js","node_modules/pixi-gl-core/src/shader/defaultValue.js","node_modules/pixi-gl-core/src/shader/extractAttributes.js","node_modules/pixi-gl-core/src/shader/extractUniforms.js","node_modules/pixi-gl-core/src/shader/generateUniformAccessObject.js","node_modules/pixi-gl-core/src/shader/index.js","node_modules/pixi-gl-core/src/shader/mapSize.js","node_modules/pixi-gl-core/src/shader/mapType.js","node_modules/pixi-gl-core/src/shader/setPrecision.js","node_modules/process/browser.js","node_modules/punycode/punycode.js","node_modules/querystring-es3/decode.js","node_modules/querystring-es3/encode.js","node_modules/querystring-es3/index.js","node_modules/remove-array-items/index.js","node_modules/resource-loader/lib/Loader.js","node_modules/resource-loader/lib/Resource.js","node_modules/resource-loader/lib/async.js","node_modules/resource-loader/lib/b64.js","node_modules/resource-loader/lib/index.js","node_modules/resource-loader/lib/middlewares/parsing/blob.js","node_modules/url/url.js","node_modules/url/util.js","src/accessibility/AccessibilityManager.js","src/accessibility/accessibleTarget.js","src/accessibility/index.js","src/core/Application.js","src/core/Shader.js","src/core/autoDetectRenderer.js","src/core/const.js","src/core/display/Bounds.js","src/core/display/Container.js","src/core/display/DisplayObject.js","src/core/display/Transform.js","src/core/display/TransformBase.js","src/core/display/TransformStatic.js","src/core/graphics/Graphics.js","src/core/graphics/GraphicsData.js","src/core/graphics/canvas/CanvasGraphicsRenderer.js","src/core/graphics/utils/bezierCurveTo.js","src/core/graphics/webgl/GraphicsRenderer.js","src/core/graphics/webgl/WebGLGraphicsData.js","src/core/graphics/webgl/shaders/PrimitiveShader.js","src/core/graphics/webgl/utils/buildCircle.js","src/core/graphics/webgl/utils/buildLine.js","src/core/graphics/webgl/utils/buildPoly.js","src/core/graphics/webgl/utils/buildRectangle.js","src/core/graphics/webgl/utils/buildRoundedRectangle.js","src/core/index.js","src/core/math/GroupD8.js","src/core/math/Matrix.js","src/core/math/ObservablePoint.js","src/core/math/Point.js","src/core/math/index.js","src/core/math/shapes/Circle.js","src/core/math/shapes/Ellipse.js","src/core/math/shapes/Polygon.js","src/core/math/shapes/Rectangle.js","src/core/math/shapes/RoundedRectangle.js","src/core/renderers/SystemRenderer.js","src/core/renderers/canvas/CanvasRenderer.js","src/core/renderers/canvas/utils/CanvasMaskManager.js","src/core/renderers/canvas/utils/CanvasRenderTarget.js","src/core/renderers/canvas/utils/canUseNewCanvasBlendModes.js","src/core/renderers/canvas/utils/mapCanvasBlendModesToPixi.js","src/core/renderers/webgl/TextureGarbageCollector.js","src/core/renderers/webgl/TextureManager.js","src/core/renderers/webgl/WebGLRenderer.js","src/core/renderers/webgl/WebGLState.js","src/core/renderers/webgl/filters/Filter.js","src/core/renderers/webgl/filters/extractUniformsFromSrc.js","src/core/renderers/webgl/filters/filterTransforms.js","src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js","src/core/renderers/webgl/managers/FilterManager.js","src/core/renderers/webgl/managers/MaskManager.js","src/core/renderers/webgl/managers/StencilManager.js","src/core/renderers/webgl/managers/WebGLManager.js","src/core/renderers/webgl/utils/ObjectRenderer.js","src/core/renderers/webgl/utils/Quad.js","src/core/renderers/webgl/utils/RenderTarget.js","src/core/renderers/webgl/utils/checkMaxIfStatmentsInShader.js","src/core/renderers/webgl/utils/mapWebGLBlendModesToPixi.js","src/core/renderers/webgl/utils/mapWebGLDrawModesToPixi.js","src/core/renderers/webgl/utils/validateContext.js","src/core/settings.js","src/core/sprites/Sprite.js","src/core/sprites/canvas/CanvasSpriteRenderer.js","src/core/sprites/canvas/CanvasTinter.js","src/core/sprites/webgl/BatchBuffer.js","src/core/sprites/webgl/SpriteRenderer.js","src/core/sprites/webgl/generateMultiTextureShader.js","src/core/text/Text.js","src/core/text/TextMetrics.js","src/core/text/TextStyle.js","src/core/textures/BaseRenderTexture.js","src/core/textures/BaseTexture.js","src/core/textures/RenderTexture.js","src/core/textures/Spritesheet.js","src/core/textures/Texture.js","src/core/textures/TextureUvs.js","src/core/textures/VideoBaseTexture.js","src/core/ticker/Ticker.js","src/core/ticker/TickerListener.js","src/core/ticker/index.js","src/core/utils/canUploadSameBuffer.js","src/core/utils/createIndicesForQuads.js","src/core/utils/determineCrossOrigin.js","src/core/utils/index.js","src/core/utils/mapPremultipliedBlendModes.js","src/core/utils/maxRecommendedTextures.js","src/core/utils/mixin.js","src/core/utils/pluginTarget.js","src/core/utils/trimCanvas.js","src/deprecation.js","src/extract/canvas/CanvasExtract.js","src/extract/webgl/WebGLExtract.js","src/extras/AnimatedSprite.js","src/extras/BitmapText.js","src/extras/TextureTransform.js","src/extras/TilingSprite.js","src/extras/cacheAsBitmap.js","src/extras/getChildByName.js","src/extras/getGlobalPosition.js","src/extras/index.js","src/extras/webgl/TilingSpriteRenderer.js","src/filters/blur/BlurFilter.js","src/filters/blur/BlurXFilter.js","src/filters/blur/BlurYFilter.js","src/filters/blur/generateBlurFragSource.js","src/filters/blur/generateBlurVertSource.js","src/filters/blur/getMaxBlurKernelSize.js","src/filters/colormatrix/ColorMatrixFilter.js","src/filters/displacement/DisplacementFilter.js","src/filters/fxaa/FXAAFilter.js","src/filters/index.js","src/filters/noise/NoiseFilter.js","src/filters/void/VoidFilter.js","src/interaction/InteractionData.js","src/interaction/InteractionEvent.js","src/interaction/InteractionManager.js","src/interaction/InteractionTrackingData.js","src/interaction/interactiveTarget.js","src/loaders/bitmapFontParser.js","src/loaders/index.js","src/loaders/loader.js","src/loaders/spritesheetParser.js","src/loaders/textureParser.js","src/mesh/Mesh.js","src/mesh/NineSlicePlane.js","src/mesh/Plane.js","src/mesh/Rope.js","src/mesh/canvas/CanvasMeshRenderer.js","src/mesh/webgl/MeshRenderer.js","src/particles/ParticleContainer.js","src/particles/webgl/ParticleBuffer.js","src/particles/webgl/ParticleRenderer.js","src/particles/webgl/ParticleShader.js","src/polyfill/Math.sign.js","src/polyfill/index.js","src/polyfill/requestAnimationFrame.js","src/prepare/BasePrepare.js","src/prepare/canvas/CanvasPrepare.js","src/prepare/limiters/CountLimiter.js","src/prepare/limiters/TimeLimiter.js","src/prepare/webgl/WebGLPrepare.js","src/index.js"],"names":["f","exports","module","define","amd","g","window","global","self","this","PIXI","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","countTrailingZeros","v","c","INT_BITS","INT_MAX","INT_MIN","sign","abs","mask","min","x","y","max","isPow2","log2","shift","log10","popCount","nextPow2","prevPow2","parity","REVERSE_TABLE","Array","tab","reverse","interleave2","deinterleave2","interleave3","z","deinterleave3","nextCombination","earcut","data","holeIndices","dim","hasHoles","outerLen","outerNode","linkedList","triangles","minX","minY","maxX","maxY","size","eliminateHoles","Math","earcutLinked","start","end","clockwise","last","signedArea","insertNode","equals","next","removeNode","filterPoints","again","p","steiner","area","prev","ear","pass","indexCurve","stop","isEarHashed","isEar","push","cureLocalIntersections","splitEarcut","b","pointInTriangle","minTX","minTY","maxTX","maxTY","minZ","zOrder","maxZ","nextZ","prevZ","intersects","locallyInside","isValidDiagonal","splitPolygon","len","list","queue","getLeftmost","sort","compareX","eliminateHole","hole","findHoleBridge","m","hx","hy","qx","Infinity","tan","mx","my","tanMin","sortLinked","q","tail","numMerges","pSize","qSize","inSize","leftmost","ax","ay","bx","by","cx","cy","px","py","intersectsPolygon","middleInside","p1","p2","q1","q2","inside","a2","Node","b2","an","bp","sum","j","deviation","polygonArea","trianglesArea","flatten","result","vertices","holes","dimensions","holeIndex","d","Events","EE","fn","context","once","EventEmitter","_events","_eventsCount","has","Object","prototype","hasOwnProperty","prefix","create","__proto__","eventNames","events","name","names","slice","getOwnPropertySymbols","concat","listeners","event","exists","evt","available","ee","emit","a1","a3","a4","a5","args","arguments","removeListener","undefined","apply","on","listener","removeAllListeners","off","addListener","setMaxListeners","prefixed","apple_phone","apple_ipod","apple_tablet","android_phone","android_tablet","amazon_phone","amazon_tablet","windows_phone","windows_tablet","other_blackberry","other_blackberry_10","other_opera","other_chrome","other_firefox","seven_inch","RegExp","match","regex","userAgent","test","IsMobileClass","ua","navigator","tmp","split","apple","phone","ipod","tablet","device","amazon","android","windows","other","blackberry","blackberry10","opera","firefox","chrome","any","instantiate","IM","Class","isMobile","_classCallCheck","instance","Constructor","TypeError","_addMiniSignalBinding","node","_head","_tail","_next","_prev","_owner","defineProperty","value","_createClass","defineProperties","target","props","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","MiniSignalBinding","thisArg","_fn","_once","_thisArg","detach","MiniSignal","toObject","val","propIsEnumerable","propertyIsEnumerable","assign","test1","String","getOwnPropertyNames","test2","fromCharCode","map","join","test3","forEach","letter","keys","err","source","from","symbols","to","str","opts","parser","strict","loose","strictMode","exec","uri","replace","$0","$1","$2","normalizeArray","parts","allowAboveRoot","up","splice","unshift","filter","xs","res","splitPathRe","splitPath","filename","resolve","resolvedPath","resolvedAbsolute","path","process","cwd","charAt","normalize","isAbsolute","trailingSlash","substr","paths","index","relative","trim","arr","fromParts","toParts","samePartsLength","outputParts","sep","delimiter","dirname","root","dir","basename","ext","extname","EMPTY_ARRAY_BUFFER","ArrayBuffer","Buffer","gl","type","drawType","buffer","createBuffer","ARRAY_BUFFER","STATIC_DRAW","upload","_updateID","offset","dontBind","bind","byteLength","bufferSubData","bufferData","bindBuffer","createVertexBuffer","createIndexBuffer","ELEMENT_ARRAY_BUFFER","destroy","deleteBuffer","Texture","Framebuffer","width","height","framebuffer","createFramebuffer","stencil","texture","enableTexture","framebufferTexture2D","FRAMEBUFFER","COLOR_ATTACHMENT0","TEXTURE_2D","enableStencil","createRenderbuffer","bindRenderbuffer","RENDERBUFFER","framebufferRenderbuffer","DEPTH_STENCIL_ATTACHMENT","renderbufferStorage","DEPTH_STENCIL","clear","clearColor","COLOR_BUFFER_BIT","DEPTH_BUFFER_BIT","bindFramebuffer","unbind","resize","uploadData","deleteFramebuffer","createRGBA","fromData","enableNearestScaling","enableWrapClamp","fbo","createFloat32","compileProgram","extractAttributes","extractUniforms","setPrecision","generateUniformAccessObject","Shader","vertexSrc","fragmentSrc","precision","attributeLocations","program","attributes","uniformData","uniforms","useProgram","deleteProgram","format","createTexture","mipmap","premultiplyAlpha","RGBA","UNSIGNED_BYTE","pixelStorei","UNPACK_PREMULTIPLY_ALPHA_WEBGL","newWidth","videoWidth","newHeight","videoHeight","texImage2D","texSubImage2D","FLOATING_POINT_AVAILABLE","Float32Array","getExtension","FLOAT","location","activeTexture","TEXTURE0","bindTexture","minFilter","linear","texParameteri","TEXTURE_MIN_FILTER","LINEAR_MIPMAP_LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR","NEAREST","magFilter","TEXTURE_MAG_FILTER","enableMipmap","generateMipmap","enableLinearScaling","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","enableWrapRepeat","REPEAT","enableWrapMirrorRepeat","MIRRORED_REPEAT","deleteTexture","fromSource","VertexArrayObject","state","nativeVaoExtension","FORCE_NATIVE","nativeState","nativeVao","createVertexArrayOES","maxAttribs","getParameter","MAX_VERTEX_ATTRIBS","tempAttribState","attribState","indexBuffer","dirty","setVertexAttribArrays","constructor","bindVertexArrayOES","activate","lastBuffer","attrib","vertexAttribPointer","attribute","normalized","stride","addAttribute","addIndex","draw","drawElements","UNSIGNED_SHORT","drawArrays","getSize","deleteVertexArrayOES","createContext","canvas","options","getContext","GLBuffer","GLFramebuffer","GLShader","GLTexture","shader","glCore","attribs","enableVertexAttribArray","disableVertexAttribArray","glVertShader","compileShader","VERTEX_SHADER","glFragShader","FRAGMENT_SHADER","createProgram","attachShader","bindAttribLocation","linkProgram","getProgramParameter","LINK_STATUS","console","error","VALIDATE_STATUS","getError","getProgramInfoLog","warn","deleteShader","src","createShader","shaderSource","getShaderParameter","COMPILE_STATUS","log","getShaderInfoLog","defaultValue","Int32Array","booleanArray","array","mapType","mapSize","totalAttributes","ACTIVE_ATTRIBUTES","attribData","getActiveAttrib","getAttribLocation","pointer","totalUniforms","ACTIVE_UNIFORMS","getActiveUniform","getUniformLocation","uniformKeys","fullName","nameTokens","uniformGroup","getUniformGroup","uniform","get","generateGetter","set","generateSetter","template","getterTemplate","Function","setTemplate","setterTemplate","GLSL_TO_SINGLE_SETTERS","GLSL_TO_ARRAY_SETTERS","cur","float","vec2","vec3","vec4","int","ivec2","ivec3","ivec4","bool","bvec2","bvec3","bvec4","mat2","mat3","mat4","sampler2D","GLSL_TO_SIZE","GL_TABLE","typeNames","GL_TO_GLSL_TYPES","tn","FLOAT_VEC2","FLOAT_VEC3","FLOAT_VEC4","INT","INT_VEC2","INT_VEC3","INT_VEC4","BOOL","BOOL_VEC2","BOOL_VEC3","BOOL_VEC4","FLOAT_MAT2","FLOAT_MAT3","FLOAT_MAT4","SAMPLER_2D","substring","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","setTimeout","runClearTimeout","marker","cachedClearTimeout","clearTimeout","cleanUpNextTick","draining","currentQueue","queueIndex","drainQueue","timeout","run","Item","noop","nextTick","title","browser","env","argv","version","versions","prependListener","prependOnceListener","binding","chdir","umask","RangeError","errors","mapDomain","string","regexSeparators","ucs2decode","extra","output","counter","charCodeAt","ucs2encode","stringFromCharCode","basicToDigit","codePoint","base","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","floor","damp","baseMinusTMin","tMax","skew","decode","input","out","basic","oldi","w","baseMinusT","inputLength","initialN","bias","initialBias","lastIndexOf","maxInt","tMin","encode","handledCPCount","basicLength","currentValue","handledCPCountPlusOne","qMinusT","toUnicode","regexPunycode","toLowerCase","toASCII","regexNonASCII","freeExports","nodeType","freeModule","freeGlobal","punycode","overflow","not-basic","invalid-input","ucs2","obj","prop","qs","eq","regexp","maxKeys","kstr","vstr","idx","indexOf","decodeURIComponent","isArray","toString","stringifyPrimitive","isFinite","objectKeys","ks","encodeURIComponent","parse","stringify","startIdx","removeCount","_interopRequireDefault","__esModule","default","_typeof","Symbol","iterator","_miniSignals","_miniSignals2","_parseUri","_parseUri2","_async","async","newObj","_Resource","_Resource2","rgxExtractUrlHash","Loader","_this","baseUrl","concurrency","progress","loading","defaultQueryString","_beforeMiddleware","_afterMiddleware","_resourcesParsing","_boundLoadResource","_loadResource","_queue","pause","resources","onProgress","onError","onLoad","onStart","onComplete","add","url","cb","callback","parentResource","_prepareUrl","onAfterMiddleware","parent","incompleteChildren","_i","children","isComplete","fullChunk","progressChunk","eachChunk","_i2","pre","use","reset","kill","_onLoadBinding","isLoading","abort","load","chunk","_tasks","dispatch","resume","parsedUrl","protocol","hash","resource","dequeue","_this2","_dequeue","eachSeries","_onLoad","_onComplete","_this3","idle","_noop","setExtMap","reqType","xhr","useXdr","XDomainRequest","XMLHttpRequest","tempAnchor","Resource","_flags","_setFlag","STATUS_FLAGS","DATA_URL","extension","_getExtension","crossOrigin","loadType","_determineLoadType","xhrType","metadata","TYPE","UNKNOWN","_boundComplete","complete","_boundOnError","_onError","_boundOnProgress","_onProgress","_boundXhrOnError","_xhrOnError","_boundXhrOnAbort","_xhrOnAbort","_boundXhrOnLoad","_xhrOnLoad","_boundXdrOnTimeout","_xdrOnTimeout","setExtensionLoadType","_loadTypeMap","setExtensionXhrType","_xhrTypeMap","removeEventListener","onerror","ontimeout","onprogress","onload","COMPLETE","LOADING","message","xdr","EMPTY_GIF","firstChild","removeChild","_determineCrossOrigin","LOAD_TYPE","IMAGE","_loadElement","AUDIO","_loadSourceElement","VIDEO","XHR","_loadXdr","_loadXhr","_hasFlag","loadElement","Image","document","createElement","skipSource","addEventListener","Audio","isCocoonJS","mimeTypes","mimeType","appendChild","_createSource","_mimeTypes","_determineXhrType","open","XHR_RESPONSE_TYPE","JSON","DOCUMENT","responseType","TEXT","send","mime","nodeName","lengthComputable","loaded","total","status","statusText","text","responseText","responseURL","DOMParser","domparser","parseFromString","div","innerHTML","XML","response","loc","href","samePort","port","host","hostname","isDataUrl","slashIndex","queryStart","hashStart","_getMimeFromXhrType","BUFFER","BLOB","DEFAULT","NONE","gif","png","bmp","jpg","jpeg","tif","tiff","webp","tga","svg","svg+xml","mp3","ogg","wav","mp4","webm","xhtml","html","htm","xml","tmx","tsx","json","txt","ttf","otf","deferNext","onlyOnce","callFn","worker","_insert","insertAtFront","started","drain","item","task","workers","unsaturated","saturated","empty","paused","running","encodeBinary","inx","bytebuffer","encodedCharIndexes","jnx","_jnx","_keyStr","b64","base64","blobMiddlewareFactory","Blob","_ret","Url","createObjectURL","blob","revokeObjectURL","getResponseHeader","_b2","_b","URL","webkitURL","slashes","auth","search","query","pathname","urlParse","parseQueryString","slashesDenoteHost","util","isObject","urlFormat","isString","urlResolve","urlResolveObject","resolveObject","protocolPattern","portPattern","simplePathPattern","delims","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","javascript:","hostlessProtocol","slashedProtocol","http","https","ftp","gopher","file","http:","https:","ftp:","gopher:","file:","querystring","queryIndex","splitter","uSplit","slashRegex","rest","simplePath","proto","lowerProto","hostEnd","hec","atSign","parseHost","ipv6Hostname","hostparts","part","newpart","validParts","notHost","bit","h","ae","esc","escape","qm","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","pop","isNullOrUndefined","authInHost","isNull","hasTrailingSlash","arg","_core","core","_ismobilejs","_accessibleTarget","utils","mixins","delayMixin","DisplayObject","_accessibleTarget2","DIV_TOUCH_SIZE","DIV_TOUCH_POS_X","DIV_TOUCH_POS_Y","DIV_TOUCH_ZINDEX","AccessibilityManager","renderer","_ismobilejs2","createTouchHook","style","position","top","left","zIndex","pool","renderId","debug","_onKeyDown","_onMouseMove","isActive","isMobileAccessabillity","hookDiv","DIV_HOOK_SIZE","DIV_HOOK_POS_X","DIV_HOOK_POS_Y","backgroundColor","body","update","view","parentNode","deactivate","updateAccessibleObjects","displayObject","visible","accessible","interactive","_accessibleActive","addChild","renderingToScreen","_lastObjectRendered","rect","getBoundingClientRect","sx","sy","child","removeItems","_accessibleDiv","hitArea","wt","worldTransform","tx","ty","getBounds","capHitArea","borderStyle","_onClick","_onFocus","_onFocusOut","accessibleTitle","accessibleHint","tabIndex","setAttribute","interactionManager","plugins","interaction","dispatchEvent","eventData","keyCode","WebGLRenderer","registerPlugin","CanvasRenderer","_autoDetectRenderer","_Container","_ticker","_settings","_const","Application","arg2","arg3","arg4","arg5","_settings2","RENDER_OPTIONS","forceCanvas","sharedTicker","_options","autoStart","sharedLoader","autoDetectRenderer","stage","_Container2","ticker","shared","Ticker","render","removeView","oldTicker","remove","UPDATE_PRIORITY","LOW","screen","checkPrecision","def","copy","_pixiGlCore","_possibleConstructorReturn","_GLShader","PRECISION_VERTEX","PRECISION_FRAGMENT","arg1","isWebGLSupported","_WebGLRenderer2","_CanvasRenderer2","_utils","_CanvasRenderer","_WebGLRenderer","VERSION","PI_2","PI","RAD_TO_DEG","DEG_TO_RAD","RENDERER_TYPE","WEBGL","CANVAS","BLEND_MODES","NORMAL","ADD","MULTIPLY","SCREEN","OVERLAY","DARKEN","LIGHTEN","COLOR_DODGE","COLOR_BURN","HARD_LIGHT","SOFT_LIGHT","DIFFERENCE","EXCLUSION","HUE","SATURATION","COLOR","LUMINOSITY","NORMAL_NPM","ADD_NPM","SCREEN_NPM","DRAW_MODES","POINTS","LINES","LINE_LOOP","LINE_STRIP","TRIANGLES","TRIANGLE_STRIP","TRIANGLE_FAN","SCALE_MODES","WRAP_MODES","CLAMP","GC_MODES","AUTO","MANUAL","URL_FILE_EXTENSION","DATA_URI","SVG_SIZE","SHAPES","POLY","RECT","CIRC","ELIP","RREC","PRECISION","MEDIUM","HIGH","TRANSFORM_MODE","STATIC","DYNAMIC","TEXT_GRADIENT","LINEAR_VERTICAL","LINEAR_HORIZONTAL","INTERACTION","UTILITY","_math","Bounds","isEmpty","updateID","getRectangle","Rectangle","EMPTY","addPoint","point","addQuad","addFrame","transform","x0","y0","x1","y1","matrix","addVertices","beginOffset","endOffset","rawX","rawY","addBounds","bounds","addBoundsMask","_minX","_minY","_maxX","_maxY","addBoundsArea","_DisplayObject2","Container","_DisplayObject","onChildrenChange","argumentsLength","_parentID","_boundsID","addChildAt","swapChildren","child2","index1","getChildIndex","index2","setChildIndex","currentIndex","getChildAt","removeChildAt","removeChildren","beginIndex","endIndex","begin","range","removed","updateTransform","worldAlpha","alpha","calculateBounds","_bounds","_calculateBounds","renderable","_mask","filterArea","_lastBoundsID","renderWebGL","_filters","renderAdvancedWebGL","_renderWebGL","flush","filters","_enabledFilters","enabled","filterManager","pushFilter","maskManager","pushMask","popMask","popFilter","_renderCanvas","renderCanvas","destroyChildren","oldChildren","scale","getLocalBounds","_width","_height","containerUpdateTransform","_eventemitter","_TransformStatic","_Transform","_Bounds","_EventEmitter","TransformClass","_TransformStatic2","_Transform2","tempDisplayObjectParent","_Bounds2","_boundsRect","_localBoundsRect","_destroyed","_recursivePostUpdateTransform","_tempDisplayObjectParent","skipUpdate","transformRef","parentRef","toGlobal","displayObjectUpdateTransform","toLocal","applyInverse","setParent","container","setTransform","scaleX","scaleY","rotation","skewX","skewY","pivotX","pivotY","pivot","_currentBounds","interactiveChildren","localTransform","_TransformBase2","Transform","_TransformBase","Point","ObservablePoint","updateSkew","_rotation","_cx","_sx","_cy","_sy","cos","_y","sin","_x","updateLocalTransform","lt","parentTransform","pt","_worldID","setFromMatrix","decompose","TransformBase","Matrix","updateWorldTransform","IDENTITY","TransformStatic","onChange","_localID","_currentLocalID","_RenderTexture","_Texture","_GraphicsData","_Sprite","_bezierCurveTo2","canvasRenderer","tempMatrix","tempPoint","tempColor1","tempColor2","Graphics","nativeLines","fillAlpha","lineWidth","lineColor","graphicsData","tint","_prevTint","blendMode","currentPath","_webGL","isMask","boundsPadding","_localBounds","fastRectDirty","clearDirty","boundsDirty","cachedSpriteDirty","_spriteRect","_fastRect","clone","updateLocalBounds","lineStyle","color","lineAlpha","shape","points","Polygon","closed","drawShape","moveTo","lineTo","quadraticCurveTo","cpX","cpY","toX","toY","xa","ya","fromX","fromY","bezierCurveTo","cpX2","cpY2","_bezierCurveTo3","arcTo","x2","y2","radius","b1","mm","dd","cc","tt","k1","sqrt","k2","j1","j2","qy","startAngle","atan2","endAngle","arc","anticlockwise","sweep","segs","ceil","startX","startY","theta","theta2","cTheta","sTheta","segMinus","remainder","real","angle","beginFill","filling","fillColor","fill","endFill","drawRect","drawRoundedRect","RoundedRectangle","drawCircle","Circle","drawEllipse","Ellipse","drawPolygon","isFastRect","_renderSpriteRect","setObjectRenderer","graphics","_Sprite2","_Texture2","WHITE","sprite","t1","t2","hex2rgb","rgb2hex","_texture","_frame","anchor","_onAnchorUpdate","lb","containsPoint","contains","dx","dy","rw","rh","padding","_GraphicsData2","generateCanvasTexture","scaleMode","resolution","canvasBuffer","_RenderTexture2","invert","fromCanvas","baseTexture","_canvasRenderTarget","closePath","close","addHole","id","_webgl","_SPRITE_TEXTURE","GraphicsData","_lineTint","_fillTint","CanvasGraphicsRenderer","updateGraphicsTint","setBlendMode","beginPath","renderPolygon","globalAlpha","fillStyle","strokeStyle","stroke","fillRect","strokeRect","ox","oy","xe","ye","xm","ym","rx","ry","maxRadius","tintR","tintG","tintB","dt","dt2","dt3","t3","_ObjectRenderer2","_WebGLGraphicsData","_PrimitiveShader","_buildPoly","_buildRectangle","_buildRoundedRectangle","_buildCircle","GraphicsRenderer","_ObjectRenderer","graphicsDataPool","primitiveShader","CONTEXT_UID","onContextChange","_PrimitiveShader2","_ObjectRenderer3","webGLData","webGL","updateGraphics","bindShader","shaderTemp","translationMatrix","toArray","bindVao","vao","indices","lastIndex","webGLDataNativeLines","getWebGLData","_buildPoly2","_buildRectangle2","_buildCircle2","_buildRoundedRectangle2","_WebGLGraphicsData2","attribsState","WebGLGraphicsData","_pixiGlCore2","glPoints","glIndices","aVertexPosition","aColor","Uint16Array","_Shader2","PrimitiveShader","_Shader","buildCircle","circleData","totalSegs","seg","verts","vecPos","tempPoints","_buildLine2","_buildLine","buildLine","firstPoint","lastPoint","midPointX","midPointY","indexCount","indexStart","p1x","p1y","p2x","p2y","p3x","p3y","perpx","perpy","perp2x","perp2y","perp3x","perp3y","dist","c1","c2","denom","buildNativeLine","buildPoly","holeArray","_earcut2","vertPos","_earcut","buildRectangle","rectData","buildRoundedRectangle","rrectData","recPoints","quadraticBezierCurve","_j","getPt","n1","n2","perc","xb","yb","settings","signum","_Matrix","ux","uy","vx","vy","tempMatrices","mul","row","_ux","_uy","_vx","_vy","mat","_Matrix2","GroupD8","E","SE","S","SW","W","NW","N","NE","MIRROR_VERTICAL","MIRROR_HORIZONTAL","uX","ind","uY","vX","vY","inv","rotationSecond","rotationFirst","sub","rotate180","isSwapWidthHeight","byDirection","matrixAppendRotationInv","append","_Point","fromArray","transpose","pos","newPos","_Point2","translate","rotate","tx1","d1","sr","cr","nsx","prepend","identity","scope","_Rectangle","r2","_Rectangle2","normx","normy","_len","_key","il","xi","yi","xj","yj","Number","rectangle","pad","paddingX","paddingY","fit","enlarge","radius2","SystemRenderer","system","sayHello","RESOLUTION","transparent","autoResize","blendModes","preserveDrawingBuffer","clearBeforeRender","roundPixels","_backgroundColor","_backgroundColorRgba","_backgroundColorString","screenWidth","screenHeight","generateTexture","renderTexture","hex2string","_SystemRenderer2","_CanvasMaskManager","_CanvasRenderTarget","_mapCanvasBlendModesToPixi","_SystemRenderer","rootContext","refresh","_CanvasMaskManager2","smoothProperty","imageSmoothingEnabled","webkitImageSmoothingEnabled","mozImageSmoothingEnabled","oImageSmoothingEnabled","msImageSmoothingEnabled","initPlugins","_mapCanvasBlendModesToPixi2","_activeBlendMode","skipUpdateTransform","rootResolution","_CanvasRenderTarget2","valid","cacheParent","tempWt","globalCompositeOperation","screencanvas","clearRect","tempContext","destroyPlugins","SCALE_MODE","invalidateBlendMode","pluginTarget","mixin","CanvasMaskManager","maskData","save","cacheAlpha","renderGraphicsShape","clip","restore","CanvasRenderTarget","createColoredCanvas","canUseNewCanvasBlendModes","magenta","yellow","drawImage","imageData","getImageData","mapCanvasBlendModesToPixi","_canUseNewCanvasBlendModes2","_canUseNewCanvasBlendModes","TextureGarbageCollector","count","checkCount","maxIdle","GC_MAX_IDLE","checkCountMax","GC_MAX_CHECK_COUNT","mode","GC_MODE","tm","textureManager","managedTextures","_managedTextures","wasRemoved","_glRenderTargets","touched","destroyTexture","unload","_RenderTarget","TextureManager","getTexture","updateTexture","isRenderTexture","hasLoaded","boundTextures","glTexture","_glTextures","renderTarget","_RenderTarget2","isPowerOfTwo","wrapMode","skipRemove","uid","glTextures","glRenderTargets","unbindTexture","removeAll","_MaskManager","_StencilManager","_FilterManager","_TextureManager","_BaseTexture","_TextureGarbageCollector","_WebGLState","_mapWebGLDrawModesToPixi","_validateContext","legacy","handleContextLost","handleContextRestored","_contextOptions","antialias","premultipliedAlpha","powerPreference","_MaskManager2","stencilManager","_StencilManager2","emptyRenderer","currentRenderer","_validateContext2","_WebGLState2","_activeShader","_activeVao","_activeRenderTarget","_initContext","_FilterManager2","drawModes","_mapWebGLDrawModesToPixi2","_nextTextureLocation","isContextLost","restoreContext","maxTextures","MAX_TEXTURE_IMAGE_UNITS","emptyTextures","_TextureManager2","textureGC","_TextureGarbageCollector2","resetToDefault","rootRenderTarget","bindRenderTarget","emptyGLTexture","tempObj","_BaseTexture2","bindRenderTexture","objectRenderer","_SystemRenderer3","projectionMatrix","clearRenderTexture","setFrame","frame","setMaskStack","stencilMaskStack","autoProject","forceLocation","createVao","preventDefault","loseContext","_mapWebGLBlendModesToPixi","WebGLState","activeState","Uint8Array","defaultState","stackIndex","stack","_mapWebGLBlendModesToPixi2","setState","setBlend","setDepthTest","setFrontFace","setCullFace","BLEND","blendFunc","blendFuncSeparate","DEPTH_TEST","CULL_FACE","frontFace","resetAttributes","UNPACK_FLIP_Y_WEBGL","_extractUniformsFromSrc","SOURCE_KEY_MAP","Filter","defaultVertexSrc","defaultFragmentSrc","_blendMode","_extractUniformsFromSrc2","glShaders","glShaderKey","autoFit","currentState","applyFilter","extractUniformsFromSrc","vertUniforms","extractUniformsFromString","fragUniforms","maskRegex","nameSplit","lines","line","splitLine","calculateScreenSpaceMatrix","outputMatrix","textureSize","mappedMatrix","calculateNormalizedScreenSpaceMatrix","translateScaleX","translateScaleY","calculateSpriteMatrix","TEMP_MATRIX","ratio","_Filter2","SpriteMaskFilter","maskMatrix","_Filter","maskSprite","otherMatrix","_WebGLManager2","_Quad","_filterTransforms","filterTransforms","_bitTwiddle","FilterState","sourceFrame","destinationFrame","FilterManager","_WebGLManager","quad","_Quad2","shaderCache","filterData","filterStack","filterState","targetBounds","getPotRenderTarget","lastState","freePotRenderTarget","flip","flop","initVao","disable","SCISSOR_TEST","enable","scissorRenderTarget","pushScissorMask","scissorData","tex","syncUniforms","textureCount","filterClamp","getRenderTarget","returnRenderTarget","emptyPool","minWidth","minHeight","_bitTwiddle2","defaultFrame","textures","_SpriteMaskFilter","MaskManager","scissor","enableScissor","alphaMaskPool","alphaMaskIndex","pushSpriteMask","rot","round","pushStencilMask","popSpriteMask","popScissorMask","popStencilMask","alphaMaskFilter","_SpriteMaskFilter2","pushStencil","popStencil","StencilManager","STENCIL_TEST","attachStencilBuffer","prevMaskCount","colorMask","stencilFunc","EQUAL","_getBitwiseMask","stencilOp","KEEP","INCR","_useCurrent","STENCIL_BUFFER_BIT","clearStencil","DECR","_WebGLManager3","stencilStack","WebGLManager","ObjectRenderer","object","_createIndicesForQuads","Quad","uvs","interleaved","_createIndicesForQuads2","vertexBuffer","aTextureCoord","targetTextureFrame","RenderTarget","frameBuffer","stencilBuffer","calculateProjection","viewport","pm","projectionFrame","checkMaxIfStatmentsInShader","maxIfs","createTempContext","tinyCanvas","generateIfTestSrc","fragTemplate","pixi-gl-core","98","ONE","ONE_MINUS_SRC_ALPHA","DST_ALPHA","ONE_MINUS_SRC_COLOR","SRC_ALPHA","../../../const","99","100","101","_transformTrimmedID","orig","Sprite","calculateVertices","_textureID","vertexData","_anchor","w0","w1","h0","h1","_textureTrimmedID","vertexTrimmedData","calculateTrimmedVertices","destroyBaseTexture","_tintRGB","cachedTint","_onTextureUpdate","_Container3","smoothingEnabled","canvasRenderWorldTransform","tintedTexture","tintId","_CanvasTinter2","getTintedTexture","../../math","../../renderers/canvas/CanvasRenderer","stringColor","cachedTexture","tintCache","CanvasTinter","tintMethod","tintImage","crop","rgbValues","pixelData","pixels","putImageData","step","float32View","uint32View","Uint32Array","vertByteSize","vertSize","SPRITE_BATCH_SIZE","buffers","_BatchBuffer2","vertexBuffers","vaos","vaoMax","onPrerender","MAX_TEXTURES","_checkMaxIfStatmentsInShader2","attrs","aTextureId","_uvs","sprites","np2","groups","touch","nextTexture","currentTexture","groupCount","currentGroup","premultiplyBlendMode","blend","_virtalBoundId","spriteBlendMode","TICK","_enabled","TEXTURE_TICK","tIndex","ids","uvsUint32","argb","premultiplyTint","CAN_UPLOAD_SAME_BUFFER","vertexCount","STREAM_DRAW","rendererBoundTextures","group","groupTextureCount","SpriteRenderer","generateSampleSrc","sampleValues","uSamplers","../../Shader","108","Text","addToCache","textureCacheIds","localStyleID","styleID","respectDirty","measured","_TextMetrics2","measureText","_text","_style","wordWrap","lineHeight","lineWidths","maxLineWidth","fontProperties","textBaseline","miterLimit","linePositionX","linePositionY","dropShadow","dropShadowAlpha","shadowBlur","dropShadowBlur","shadowColor","dropShadowColor","yShadowOffset","dropShadowAngle","dropShadowDistance","strokeThickness","ascent","align","drawLetterSpacing","xShadowOffset","_generateFillStyle","letterSpacing","strokeText","characters","current","isStroke","currentPosition","fillText","trimmed","realWidth","updateText","gradient","totalIterations","fillGradientStops","lengthPlus1","fillGradientType","createLinearGradient","currentIteration","addColorStop","_i3","_TextStyle2","_Sprite3","font","outputText","TextMetrics","fontSize","leading","characterCache","spaceLeft","wordWrapWidth","words","wordWidth","breakWords","character","characterWidth","wordWidthWithSpace","properties","_canvas","_context","baseline","imagedata","descent","_fonts","getSingleColor","array1","array2","fontFamily","fontStyle","fontVariant","fontWeight","lineJoin","defaultStyle","TextStyle","toFontString","fontFamilies","fontSizeString","_align","_breakWords","_dropShadow","_dropShadowAlpha","_dropShadowAngle","_dropShadowBlur","getColor","_dropShadowColor","outputColor","_dropShadowDistance","_fill","_fillGradientType","_fillGradientStops","_fontFamily","_fontSize","_fontStyle","_fontVariant","_fontWeight","_letterSpacing","_lineHeight","_leading","_lineJoin","_miterLimit","_padding","_stroke","_strokeThickness","_textBaseline","_trim","_wordWrap","_wordWrapWidth","../const","../utils","111","BaseRenderTexture","_BaseTexture3","BaseTexture","imageUrl","_updateDimensions","wasLoading","firstSourceLoaded","_loadSvgSource","_sourceLoaded","_updateImageType","imageType","decomposeDataUri","dataUri","mediaType","firstSubType","subType","_loadSvgSourceUsingDataUri","svgString","_loadSvgSourceUsingString","_loadSvgSourceUsingXhr","svgXhr","readyState","DONE","svgWidth","svgHeight","sourceScale","realHeight","_pixiId","dispose","image","crossorigin","_determineCrossOrigin2","getResolutionOfUrl","BaseTextureCache","removeFromCache","baseTextureFromCache","_eventemitter2","ReferenceError","_BaseRenderTexture","_legacyRenderer","baseRenderTexture","_BaseRenderTexture2","legacyRenderer","RenderTexture","doNotResizeBaseTexture","Spritesheet","_updateResolution","resolutionFilename","_frameKeys","_frames","_batchIndex","_callback","meta","_processFrames","initialFrameIndex","frameIndex","maxFrames","rotated","_","spriteSourceSize","_nextBatch","destroyBase","../","115","_inherits","subClass","superClass","setPrototypeOf","noFrame","requiresUpdate","_rotate","onBaseTextureUpdated","onBaseTextureLoaded","TextureCache","_TextureUvs2","origin","fromVideoUrl","video","fromImage","HTMLImageElement","HTMLCanvasElement","HTMLVideoElement","fromVideo","fromLoader","textureFromCache","_updateUvs","removeAllHandlers","_GroupD","TextureUvs","baseFrame","tw","w2","h2","th","_GroupD2","cY","x3","cX","y3","createSource","_autoUpdate","_isAutoUpdating","autoPlay","_onPlayStop","_isSourceReady","_onCanPlay","VideoBaseTexture","_isSourcePlaying","currentTime","ended","_onPlayStart","__loaded","fromUrl","videoSrc","fromUrls","_TickerListener","_requestId","deltaTime","requestAnimationFrame","_tick","_requestIfNeeded","lastTime","performance","now","_startIfPossible","priority","_addListener","_TickerListener2","previous","connect","elapsedMS","_maxElapsedMS","TARGET_FPMS","speed","head","_cancelIfNeeded","fps","TickerListener","redirect","hard","120","_Ticker2","_Ticker","./Ticker","121","createIndicesForQuads","totalIndices","123","determineCrossOrigin","_url3","_url2","124","hex","getUrlFileExtension","getSvgSize","sizeMatch","saidHello","contextOptions","failIfMajorPerformanceCaveat","WebGLRenderingContext","success","correctBlendMode","premultiplied","G","B","premultiplyRgba","rgb","premultiply","premultiplyTintToRgba","skipHello","destroyTextureCache","_pluginTarget","_interopRequireWildcard","_mixin","_removeArrayItems2","npm","mapPremultipliedBlendModes","126","maxRecommendedTextures","propertyName","__plugins","129","trimCanvas","bound","right","bottom","130","msg","mesh","particles","extras","prepare","loaders","SpriteBatch","AssetLoader","Stage","AbstractFilter","TransformManual","defaults","deprecation","AnimatedSprite","MovieClip","getImage","extract","getPixels","BitmapText","setText","measureFont","fontPropertiesCache","fontPropertiesCanvas","splits","fontSizeIndex","addTextureToCache","canUseMultiply","addHook","registerUploadHook","uploadHook","webgl","isJson","isXml","isVideo","before","after","interactiveTarget","cursor","InteractionManager","cursorStyles","currentCursorMode","131","TEMP_RECT","CanvasExtract","toDataURL","../../core","132","_WebGLExtract","_CanvasExtract","WebGLExtract","textureBuffer","readPixels","webglPixels","canvasData","134","_core$Sprite","_durations","playing","play","gotoAndStop","frameNumber","previousFrame","currentFrame","lag","_currentTime","elapsed","animationSpeed","loop","onLoop","_textures","onFrameChange","time","../core","135","_ObservablePoint","_ObservablePoint2","_core$Container","_font","chars","lastSpace","spacesRemoved","lastSpaceWidth","lastLineWidth","prevCharCode","charData","charCode","kerning","xOffset","yOffset","xAdvance","lineAlignOffsets","alignOffset","lenChars","_glyphs","_textHeight","_i4","_textWidth","_maxLineHeight","maxLineHeight","validate","getAttribute","parseInt","info","letters","getElementsByTagName","_i5","kernings","_maxWidth","fonts","../core/math/ObservablePoint","../core/settings","136","TextureTransform","multiplyUvs","tempMat","texBase","margin","clampMargin","clampOffset","uClampOffset","_lastTextureID","_CanvasTinter","_TextureTransform","_TextureTransform2","uvTransform","pluginName","tempCanvas","baseTextureResolution","_canvasPattern","tileScale","anchorY","uvRespectAnchor","modX","modY","anchorX","TilingSprite","tileTransform","imageId","CacheData","textureCacheId","originalCalculateBounds","originalHitTest","cacheAsBitmap","_cacheData","originalRenderWebGL","originalRenderCanvas","originalUpdateTransform","originalGetLocalBounds","originalContainsPoint","_destroyCachedDisplayObject","originalDestroy","originalMask","originalFilterArea","_transformID","_initCachedDisplayObject","cachedRenderTarget","_renderCachedWebGL","cachedSprite","_getCachedLocalBounds","_renderCachedCanvas","_initCachedDisplayObjectCanvas","_tempMatrix","_calculateCachedBounds","../core/textures/BaseTexture","../core/textures/Texture","../core/utils","139","141","_AnimatedSprite","_TilingSprite","_TilingSpriteRenderer","TilingSpriteRenderer","_core$ObjectRenderer","ts","baseTex","isSimple","simpleShader","H","uv","mapCoord","uClampFrame","uTransform","uColor","uSampler","../../core/const","143","_BlurXFilter","_BlurXFilter2","_BlurYFilter","_BlurYFilter2","blurYFilter","strength","quality","kernelSize","BlurFilter","blurXFilter","blur","./BlurXFilter","./BlurYFilter","144","_generateBlurVertSource","_generateBlurVertSource2","_generateBlurFragSource","_core$Filter","fragSrc","firstRun","passes","temp","BlurXFilter","BlurYFilter","generateFragBlurSource","halfLength","blurLoop","9","11","15","147","vertSource","vertTemplate","generateVertBlurSource","getMaxKernelSize","maxVaryings","149","ColorMatrixFilter","_colorMatrix","_loadMatrix","multiply","blackAndWhite","hue","cosR","a12","sqrW","sinR","a20","saturate","amount","technicolor","polaroid","toBGR","kodachrome","browni","vintage","desaturation","dR","darkColor","dB","intensity","lsd","uAlpha","DisplacementFilter","mapSampler","FXAAFilter","_DisplacementFilter","_BlurFilter","noise","uSeed","NoiseFilter","VoidFilter","155","InteractionData","twist","tangentialPressure","button","isPrimary","156","InteractionEvent","stopped","_reset","currentTarget","_InteractionData","_InteractionData2","processPointerUp","onPointerCancel","processPointerDown","onPointerOver","hitTestEvent","globalPoint","addEvents","interactionDOMElement","onPointerUp","onPointerMove","onPointerOut","eventsAdded","msPointerEnabled","supportsPointerEvents","onPointerDown","supportsTouchEvents","_deltaTime","interactionFrequency","didMove","activeInteractionData","interactionData","originalEvent","pointerType","processInteractive","interactionEvent","processPointerOverOut","setCursorMode","eventString","mapPositionToPoint","parentElement","interactiveParent","childHit","func","hitTest","hit","_tempPoint","normalizeToPointerData","autoPreventDefault","isNormalized","eventLen","configureInteractionEventForDOMEvent","identifier","trackedPointers","rightDown","leftDown","isRightButton","eventAppend","getInteractionDataForPointerId","cancelled","onPointerComplete","processPointerCancel","isTouch","trackingData","moveWhenInside","processPointerMove","isMouse","releaseInteractionDataForPointerId","_InteractionTrackingData2","over","mouseOverRenderer","interactionDataPool","pointerId","_copyEvent","pointerEvent","clientX","clientY","touches","radiusX","radiusY","tiltX","tiltY","layerX","offsetX","layerY","offsetY","normalizedEvents","MOUSE_POINTER_ID","removeEvents","./InteractionData","./InteractionEvent","./InteractionTrackingData","./interactiveTarget","eventemitter3","158","InteractionTrackingData","FLAGS","flags","_InteractionManager","_InteractionTrackingData","_trackedPointers","161","bitmapFont","_extras","registerFont","xmlUrl","textureUrl","_resourceLoader","loadOptions","_path","../extras","resource-loader","162","textureParser","getResourcePath","spritesheetParser","parseBitmapFontData","bitmapFontParser","_bitmapFontParser","_spritesheetParser","AppPrototype","_loader","_resourceLoader2","_blob","_spritesheetParser2","_pixiMiddleware","_textureParser2","_bitmapFontParser2","frames","imageResourceName","resourcePath","spritesheet","165","tempPolygon","Mesh","drawMode","TRIANGLE_MESH","tintRgb","_uvTransform","ind0","ind2","../extras/TextureTransform","167","rightWidth","DEFAULT_BORDER_SIZE","_bottomHeight","textureSource","drawSegment","NineSlicePlane","sw","sh","dh","dw","_refresh","_Plane","_origWidth","_origHeight","_uvw","_uvh","_rightWidth","_topHeight","updateHorizontalVertices","_Plane3","Plane","_Mesh","segmentsX","verticesX","totalSub","segmentsY","xpos","ypos","value2","value3","colors","indexDirty","_ready","_Mesh3","_Mesh2","Rope","refreshVertices","nextPoint","perpX","perpY","perpLength","num","autoUpdate","./Mesh","170","MeshSpriteRenderer","_renderTriangles","index0","_renderDrawTriangle","u1","u2","v0","v2","uploadUvTransform","ut","canvasPadding","centerY","normX","centerX","normY","u0","v1","deltaA","deltaB","deltaD","deltaE","textureWidth","textureHeight","renderMeshFlat","../Mesh","171","_MeshRenderer","_CanvasMeshRenderer","uvBuffer","glData","matrixIdentity","MeshRenderer","173","_properties","_glBuffers","setProperties","ParticleContainer","isRotated","positionX","positionY","finalHeight","finalWidth","_buffers","_ParticleRenderer","property","dynamicProperties","staticBuffer","dynamicData","initBuffers","dynamicOffset","dynamicStride","dynamicBuffer","staticStride","_property","staticProperties","staticOffset","_property3","uploadFunction","startIndex","ParticleBuffer","uploadStatic","staticData","_ParticleShader2","_ParticleShader","_ParticleBuffer2","_ParticleBuffer","ParticleRenderer","uploadVertices","uploadPosition","uploadUvs","uploadAlpha","maxSize","_maxSize","batchSize","_batchSize","totalChildren","generateBuffers","uploadDynamic","_bufferToUpdate","dynamicPropertyFlags","spritePosition","textureUvs","spriteAlpha","_Shader3","ParticleShader","_objectAssign2","_objectAssign","object-assign","180","Date","startTime","vendors","cancelAnimationFrame","delay","182","findMultipleBaseTextures","drawText","helper","calculateTextStyle","findTextStyle","_CountLimiter","_CountLimiter2","UPLOADS_PER_FRAME","addHooks","completes","ticking","registerFindHook","findTexture","done","SharedTicker","addOnce","tick","limiter","beginFrame","allowedToUpload","uploaded","uploadHooks","uploadHookHelper","BasePrepare","./limiters/CountLimiter","183","uploadBaseTextures","imageHeight","ctx","imageWidth","_BasePrepare2","_BasePrepare3","CanvasPrepare","_BasePrepare","../BasePrepare","184","_CanvasPrepare","CountLimiter","TimeLimiter","uploadGraphics","findGraphics","WebGLPrepare","_polyfill","_deprecation","_deprecation2","accessibility","_accessibility","_extract","_interaction","_loaders","_particles","_prepare","performMixins"],"mappings":";;;;;;;CAAA,SAAAA,GAAA,GAAA,gBAAAC,UAAA,mBAAAC,QAAAA,OAAAD,QAAAD,QAAA,IAAA,kBAAAG,SAAAA,OAAAC,IAAAD,UAAAH,OAAA,CAAA,GAAAK,EAAAA,GAAA,mBAAAC,QAAAA,OAAA,mBAAAC,QAAAA,OAAA,mBAAAC,MAAAA,KAAAC,KAAAJ,EAAAK,KAAAV,MAAA,WAAA,GAAAG,EAAA,OAAA,SAAAQ,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAhB,GAAA,GAAAqB,OAAA,uBAAAL,EAAA,IAAA,MAAAhB,GAAAsB,KAAA,mBAAAtB,EAAA,GAAAuB,GAAAV,EAAAG,IAAAf,WAAAW,GAAAI,GAAA,GAAAQ,KAAAD,EAAAtB,QAAA,SAAAU,GAAA,GAAAE,GAAAD,EAAAI,GAAA,GAAAL,EAAA,OAAAI,GAAAF,GAAAF,IAAAY,EAAAA,EAAAtB,QAAAU,EAAAC,EAAAC,EAA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E,EAAA87E,UAAAA,2CACYykB","file":"pixi.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})","/**\n * Bit twiddling hacks for JavaScript.\n *\n * Author: Mikola Lysenko\n *\n * Ported from Stanford bit twiddling hack library:\n *    http://graphics.stanford.edu/~seander/bithacks.html\n */\n\n\"use strict\"; \"use restrict\";\n\n//Number of bits in an integer\nvar INT_BITS = 32;\n\n//Constants\nexports.INT_BITS  = INT_BITS;\nexports.INT_MAX   =  0x7fffffff;\nexports.INT_MIN   = -1<<(INT_BITS-1);\n\n//Returns -1, 0, +1 depending on sign of x\nexports.sign = function(v) {\n  return (v > 0) - (v < 0);\n}\n\n//Computes absolute value of integer\nexports.abs = function(v) {\n  var mask = v >> (INT_BITS-1);\n  return (v ^ mask) - mask;\n}\n\n//Computes minimum of integers x and y\nexports.min = function(x, y) {\n  return y ^ ((x ^ y) & -(x < y));\n}\n\n//Computes maximum of integers x and y\nexports.max = function(x, y) {\n  return x ^ ((x ^ y) & -(x < y));\n}\n\n//Checks if a number is a power of two\nexports.isPow2 = function(v) {\n  return !(v & (v-1)) && (!!v);\n}\n\n//Computes log base 2 of v\nexports.log2 = function(v) {\n  var r, shift;\n  r =     (v > 0xFFFF) << 4; v >>>= r;\n  shift = (v > 0xFF  ) << 3; v >>>= shift; r |= shift;\n  shift = (v > 0xF   ) << 2; v >>>= shift; r |= shift;\n  shift = (v > 0x3   ) << 1; v >>>= shift; r |= shift;\n  return r | (v >> 1);\n}\n\n//Computes log base 10 of v\nexports.log10 = function(v) {\n  return  (v >= 1000000000) ? 9 : (v >= 100000000) ? 8 : (v >= 10000000) ? 7 :\n          (v >= 1000000) ? 6 : (v >= 100000) ? 5 : (v >= 10000) ? 4 :\n          (v >= 1000) ? 3 : (v >= 100) ? 2 : (v >= 10) ? 1 : 0;\n}\n\n//Counts number of bits\nexports.popCount = function(v) {\n  v = v - ((v >>> 1) & 0x55555555);\n  v = (v & 0x33333333) + ((v >>> 2) & 0x33333333);\n  return ((v + (v >>> 4) & 0xF0F0F0F) * 0x1010101) >>> 24;\n}\n\n//Counts number of trailing zeros\nfunction countTrailingZeros(v) {\n  var c = 32;\n  v &= -v;\n  if (v) c--;\n  if (v & 0x0000FFFF) c -= 16;\n  if (v & 0x00FF00FF) c -= 8;\n  if (v & 0x0F0F0F0F) c -= 4;\n  if (v & 0x33333333) c -= 2;\n  if (v & 0x55555555) c -= 1;\n  return c;\n}\nexports.countTrailingZeros = countTrailingZeros;\n\n//Rounds to next power of 2\nexports.nextPow2 = function(v) {\n  v += v === 0;\n  --v;\n  v |= v >>> 1;\n  v |= v >>> 2;\n  v |= v >>> 4;\n  v |= v >>> 8;\n  v |= v >>> 16;\n  return v + 1;\n}\n\n//Rounds down to previous power of 2\nexports.prevPow2 = function(v) {\n  v |= v >>> 1;\n  v |= v >>> 2;\n  v |= v >>> 4;\n  v |= v >>> 8;\n  v |= v >>> 16;\n  return v - (v>>>1);\n}\n\n//Computes parity of word\nexports.parity = function(v) {\n  v ^= v >>> 16;\n  v ^= v >>> 8;\n  v ^= v >>> 4;\n  v &= 0xf;\n  return (0x6996 >>> v) & 1;\n}\n\nvar REVERSE_TABLE = new Array(256);\n\n(function(tab) {\n  for(var i=0; i<256; ++i) {\n    var v = i, r = i, s = 7;\n    for (v >>>= 1; v; v >>>= 1) {\n      r <<= 1;\n      r |= v & 1;\n      --s;\n    }\n    tab[i] = (r << s) & 0xff;\n  }\n})(REVERSE_TABLE);\n\n//Reverse bits in a 32 bit word\nexports.reverse = function(v) {\n  return  (REVERSE_TABLE[ v         & 0xff] << 24) |\n          (REVERSE_TABLE[(v >>> 8)  & 0xff] << 16) |\n          (REVERSE_TABLE[(v >>> 16) & 0xff] << 8)  |\n           REVERSE_TABLE[(v >>> 24) & 0xff];\n}\n\n//Interleave bits of 2 coordinates with 16 bits.  Useful for fast quadtree codes\nexports.interleave2 = function(x, y) {\n  x &= 0xFFFF;\n  x = (x | (x << 8)) & 0x00FF00FF;\n  x = (x | (x << 4)) & 0x0F0F0F0F;\n  x = (x | (x << 2)) & 0x33333333;\n  x = (x | (x << 1)) & 0x55555555;\n\n  y &= 0xFFFF;\n  y = (y | (y << 8)) & 0x00FF00FF;\n  y = (y | (y << 4)) & 0x0F0F0F0F;\n  y = (y | (y << 2)) & 0x33333333;\n  y = (y | (y << 1)) & 0x55555555;\n\n  return x | (y << 1);\n}\n\n//Extracts the nth interleaved component\nexports.deinterleave2 = function(v, n) {\n  v = (v >>> n) & 0x55555555;\n  v = (v | (v >>> 1))  & 0x33333333;\n  v = (v | (v >>> 2))  & 0x0F0F0F0F;\n  v = (v | (v >>> 4))  & 0x00FF00FF;\n  v = (v | (v >>> 16)) & 0x000FFFF;\n  return (v << 16) >> 16;\n}\n\n\n//Interleave bits of 3 coordinates, each with 10 bits.  Useful for fast octree codes\nexports.interleave3 = function(x, y, z) {\n  x &= 0x3FF;\n  x  = (x | (x<<16)) & 4278190335;\n  x  = (x | (x<<8))  & 251719695;\n  x  = (x | (x<<4))  & 3272356035;\n  x  = (x | (x<<2))  & 1227133513;\n\n  y &= 0x3FF;\n  y  = (y | (y<<16)) & 4278190335;\n  y  = (y | (y<<8))  & 251719695;\n  y  = (y | (y<<4))  & 3272356035;\n  y  = (y | (y<<2))  & 1227133513;\n  x |= (y << 1);\n  \n  z &= 0x3FF;\n  z  = (z | (z<<16)) & 4278190335;\n  z  = (z | (z<<8))  & 251719695;\n  z  = (z | (z<<4))  & 3272356035;\n  z  = (z | (z<<2))  & 1227133513;\n  \n  return x | (z << 2);\n}\n\n//Extracts nth interleaved component of a 3-tuple\nexports.deinterleave3 = function(v, n) {\n  v = (v >>> n)       & 1227133513;\n  v = (v | (v>>>2))   & 3272356035;\n  v = (v | (v>>>4))   & 251719695;\n  v = (v | (v>>>8))   & 4278190335;\n  v = (v | (v>>>16))  & 0x3FF;\n  return (v<<22)>>22;\n}\n\n//Computes next combination in colexicographic order (this is mistakenly called nextPermutation on the bit twiddling hacks page)\nexports.nextCombination = function(v) {\n  var t = v | (v - 1);\n  return (t + 1) | (((~t & -~t) - 1) >>> (countTrailingZeros(v) + 1));\n}\n\n","'use strict';\n\nmodule.exports = earcut;\n\nfunction earcut(data, holeIndices, dim) {\n\n    dim = dim || 2;\n\n    var hasHoles = holeIndices && holeIndices.length,\n        outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n        outerNode = linkedList(data, 0, outerLen, dim, true),\n        triangles = [];\n\n    if (!outerNode) return triangles;\n\n    var minX, minY, maxX, maxY, x, y, size;\n\n    if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n    // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n    if (data.length > 80 * dim) {\n        minX = maxX = data[0];\n        minY = maxY = data[1];\n\n        for (var i = dim; i < outerLen; i += dim) {\n            x = data[i];\n            y = data[i + 1];\n            if (x < minX) minX = x;\n            if (y < minY) minY = y;\n            if (x > maxX) maxX = x;\n            if (y > maxY) maxY = y;\n        }\n\n        // minX, minY and size are later used to transform coords into integers for z-order calculation\n        size = Math.max(maxX - minX, maxY - minY);\n    }\n\n    earcutLinked(outerNode, triangles, dim, minX, minY, size);\n\n    return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n    var i, last;\n\n    if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n        for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n    } else {\n        for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n    }\n\n    if (last && equals(last, last.next)) {\n        removeNode(last);\n        last = last.next;\n    }\n\n    return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n    if (!start) return start;\n    if (!end) end = start;\n\n    var p = start,\n        again;\n    do {\n        again = false;\n\n        if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n            removeNode(p);\n            p = end = p.prev;\n            if (p === p.next) return null;\n            again = true;\n\n        } else {\n            p = p.next;\n        }\n    } while (again || p !== end);\n\n    return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, size, pass) {\n    if (!ear) return;\n\n    // interlink polygon nodes in z-order\n    if (!pass && size) indexCurve(ear, minX, minY, size);\n\n    var stop = ear,\n        prev, next;\n\n    // iterate through ears, slicing them one by one\n    while (ear.prev !== ear.next) {\n        prev = ear.prev;\n        next = ear.next;\n\n        if (size ? isEarHashed(ear, minX, minY, size) : isEar(ear)) {\n            // cut off the triangle\n            triangles.push(prev.i / dim);\n            triangles.push(ear.i / dim);\n            triangles.push(next.i / dim);\n\n            removeNode(ear);\n\n            // skipping the next vertice leads to less sliver triangles\n            ear = next.next;\n            stop = next.next;\n\n            continue;\n        }\n\n        ear = next;\n\n        // if we looped through the whole remaining polygon and can't find any more ears\n        if (ear === stop) {\n            // try filtering points and slicing again\n            if (!pass) {\n                earcutLinked(filterPoints(ear), triangles, dim, minX, minY, size, 1);\n\n            // if this didn't work, try curing all small self-intersections locally\n            } else if (pass === 1) {\n                ear = cureLocalIntersections(ear, triangles, dim);\n                earcutLinked(ear, triangles, dim, minX, minY, size, 2);\n\n            // as a last resort, try splitting the remaining polygon into two\n            } else if (pass === 2) {\n                splitEarcut(ear, triangles, dim, minX, minY, size);\n            }\n\n            break;\n        }\n    }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n    var a = ear.prev,\n        b = ear,\n        c = ear.next;\n\n    if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n    // now make sure we don't have other points inside the potential ear\n    var p = ear.next.next;\n\n    while (p !== ear.prev) {\n        if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n            area(p.prev, p, p.next) >= 0) return false;\n        p = p.next;\n    }\n\n    return true;\n}\n\nfunction isEarHashed(ear, minX, minY, size) {\n    var a = ear.prev,\n        b = ear,\n        c = ear.next;\n\n    if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n    // triangle bbox; min & max are calculated like this for speed\n    var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\n        minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\n        maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\n        maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\n\n    // z-order range for the current triangle bbox;\n    var minZ = zOrder(minTX, minTY, minX, minY, size),\n        maxZ = zOrder(maxTX, maxTY, minX, minY, size);\n\n    // first look for points inside the triangle in increasing z-order\n    var p = ear.nextZ;\n\n    while (p && p.z <= maxZ) {\n        if (p !== ear.prev && p !== ear.next &&\n            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n            area(p.prev, p, p.next) >= 0) return false;\n        p = p.nextZ;\n    }\n\n    // then look for points in decreasing z-order\n    p = ear.prevZ;\n\n    while (p && p.z >= minZ) {\n        if (p !== ear.prev && p !== ear.next &&\n            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n            area(p.prev, p, p.next) >= 0) return false;\n        p = p.prevZ;\n    }\n\n    return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n    var p = start;\n    do {\n        var a = p.prev,\n            b = p.next.next;\n\n        if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n            triangles.push(a.i / dim);\n            triangles.push(p.i / dim);\n            triangles.push(b.i / dim);\n\n            // remove two nodes involved\n            removeNode(p);\n            removeNode(p.next);\n\n            p = start = b;\n        }\n        p = p.next;\n    } while (p !== start);\n\n    return p;\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, size) {\n    // look for a valid diagonal that divides the polygon into two\n    var a = start;\n    do {\n        var b = a.next.next;\n        while (b !== a.prev) {\n            if (a.i !== b.i && isValidDiagonal(a, b)) {\n                // split the polygon in two by the diagonal\n                var c = splitPolygon(a, b);\n\n                // filter colinear points around the cuts\n                a = filterPoints(a, a.next);\n                c = filterPoints(c, c.next);\n\n                // run earcut on each half\n                earcutLinked(a, triangles, dim, minX, minY, size);\n                earcutLinked(c, triangles, dim, minX, minY, size);\n                return;\n            }\n            b = b.next;\n        }\n        a = a.next;\n    } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n    var queue = [],\n        i, len, start, end, list;\n\n    for (i = 0, len = holeIndices.length; i < len; i++) {\n        start = holeIndices[i] * dim;\n        end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n        list = linkedList(data, start, end, dim, false);\n        if (list === list.next) list.steiner = true;\n        queue.push(getLeftmost(list));\n    }\n\n    queue.sort(compareX);\n\n    // process holes from left to right\n    for (i = 0; i < queue.length; i++) {\n        eliminateHole(queue[i], outerNode);\n        outerNode = filterPoints(outerNode, outerNode.next);\n    }\n\n    return outerNode;\n}\n\nfunction compareX(a, b) {\n    return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n    outerNode = findHoleBridge(hole, outerNode);\n    if (outerNode) {\n        var b = splitPolygon(outerNode, hole);\n        filterPoints(b, b.next);\n    }\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n    var p = outerNode,\n        hx = hole.x,\n        hy = hole.y,\n        qx = -Infinity,\n        m;\n\n    // find a segment intersected by a ray from the hole's leftmost point to the left;\n    // segment's endpoint with lesser x will be potential connection point\n    do {\n        if (hy <= p.y && hy >= p.next.y) {\n            var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n            if (x <= hx && x > qx) {\n                qx = x;\n                if (x === hx) {\n                    if (hy === p.y) return p;\n                    if (hy === p.next.y) return p.next;\n                }\n                m = p.x < p.next.x ? p : p.next;\n            }\n        }\n        p = p.next;\n    } while (p !== outerNode);\n\n    if (!m) return null;\n\n    if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint\n\n    // look for points inside the triangle of hole point, segment intersection and endpoint;\n    // if there are no points found, we have a valid connection;\n    // otherwise choose the point of the minimum angle with the ray as connection point\n\n    var stop = m,\n        mx = m.x,\n        my = m.y,\n        tanMin = Infinity,\n        tan;\n\n    p = m.next;\n\n    while (p !== stop) {\n        if (hx >= p.x && p.x >= mx &&\n                pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n            tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n            if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) {\n                m = p;\n                tanMin = tan;\n            }\n        }\n\n        p = p.next;\n    }\n\n    return m;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, size) {\n    var p = start;\n    do {\n        if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, size);\n        p.prevZ = p.prev;\n        p.nextZ = p.next;\n        p = p.next;\n    } while (p !== start);\n\n    p.prevZ.nextZ = null;\n    p.prevZ = null;\n\n    sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n    var i, p, q, e, tail, numMerges, pSize, qSize,\n        inSize = 1;\n\n    do {\n        p = list;\n        list = null;\n        tail = null;\n        numMerges = 0;\n\n        while (p) {\n            numMerges++;\n            q = p;\n            pSize = 0;\n            for (i = 0; i < inSize; i++) {\n                pSize++;\n                q = q.nextZ;\n                if (!q) break;\n            }\n\n            qSize = inSize;\n\n            while (pSize > 0 || (qSize > 0 && q)) {\n\n                if (pSize === 0) {\n                    e = q;\n                    q = q.nextZ;\n                    qSize--;\n                } else if (qSize === 0 || !q) {\n                    e = p;\n                    p = p.nextZ;\n                    pSize--;\n                } else if (p.z <= q.z) {\n                    e = p;\n                    p = p.nextZ;\n                    pSize--;\n                } else {\n                    e = q;\n                    q = q.nextZ;\n                    qSize--;\n                }\n\n                if (tail) tail.nextZ = e;\n                else list = e;\n\n                e.prevZ = tail;\n                tail = e;\n            }\n\n            p = q;\n        }\n\n        tail.nextZ = null;\n        inSize *= 2;\n\n    } while (numMerges > 1);\n\n    return list;\n}\n\n// z-order of a point given coords and size of the data bounding box\nfunction zOrder(x, y, minX, minY, size) {\n    // coords are transformed into non-negative 15-bit integer range\n    x = 32767 * (x - minX) / size;\n    y = 32767 * (y - minY) / size;\n\n    x = (x | (x << 8)) & 0x00FF00FF;\n    x = (x | (x << 4)) & 0x0F0F0F0F;\n    x = (x | (x << 2)) & 0x33333333;\n    x = (x | (x << 1)) & 0x55555555;\n\n    y = (y | (y << 8)) & 0x00FF00FF;\n    y = (y | (y << 4)) & 0x0F0F0F0F;\n    y = (y | (y << 2)) & 0x33333333;\n    y = (y | (y << 1)) & 0x55555555;\n\n    return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n    var p = start,\n        leftmost = start;\n    do {\n        if (p.x < leftmost.x) leftmost = p;\n        p = p.next;\n    } while (p !== start);\n\n    return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n    return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n           (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n           (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n    return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n           locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n    return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n    return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n    if ((equals(p1, q1) && equals(p2, q2)) ||\n        (equals(p1, q2) && equals(p2, q1))) return true;\n    return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 &&\n           area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n    var p = a;\n    do {\n        if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n                intersects(p, p.next, a, b)) return true;\n        p = p.next;\n    } while (p !== a);\n\n    return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n    return area(a.prev, a, a.next) < 0 ?\n        area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n        area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n    var p = a,\n        inside = false,\n        px = (a.x + b.x) / 2,\n        py = (a.y + b.y) / 2;\n    do {\n        if (((p.y > py) !== (p.next.y > py)) && (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n            inside = !inside;\n        p = p.next;\n    } while (p !== a);\n\n    return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n    var a2 = new Node(a.i, a.x, a.y),\n        b2 = new Node(b.i, b.x, b.y),\n        an = a.next,\n        bp = b.prev;\n\n    a.next = b;\n    b.prev = a;\n\n    a2.next = an;\n    an.prev = a2;\n\n    b2.next = a2;\n    a2.prev = b2;\n\n    bp.next = b2;\n    b2.prev = bp;\n\n    return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n    var p = new Node(i, x, y);\n\n    if (!last) {\n        p.prev = p;\n        p.next = p;\n\n    } else {\n        p.next = last.next;\n        p.prev = last;\n        last.next.prev = p;\n        last.next = p;\n    }\n    return p;\n}\n\nfunction removeNode(p) {\n    p.next.prev = p.prev;\n    p.prev.next = p.next;\n\n    if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n    if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n    // vertice index in coordinates array\n    this.i = i;\n\n    // vertex coordinates\n    this.x = x;\n    this.y = y;\n\n    // previous and next vertice nodes in a polygon ring\n    this.prev = null;\n    this.next = null;\n\n    // z-order curve value\n    this.z = null;\n\n    // previous and next nodes in z-order\n    this.prevZ = null;\n    this.nextZ = null;\n\n    // indicates whether this is a steiner point\n    this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n    var hasHoles = holeIndices && holeIndices.length;\n    var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n    var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n    if (hasHoles) {\n        for (var i = 0, len = holeIndices.length; i < len; i++) {\n            var start = holeIndices[i] * dim;\n            var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n            polygonArea -= Math.abs(signedArea(data, start, end, dim));\n        }\n    }\n\n    var trianglesArea = 0;\n    for (i = 0; i < triangles.length; i += 3) {\n        var a = triangles[i] * dim;\n        var b = triangles[i + 1] * dim;\n        var c = triangles[i + 2] * dim;\n        trianglesArea += Math.abs(\n            (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n            (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n    }\n\n    return polygonArea === 0 && trianglesArea === 0 ? 0 :\n        Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n    var sum = 0;\n    for (var i = start, j = end - dim; i < end; i += dim) {\n        sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n        j = i;\n    }\n    return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n    var dim = data[0][0].length,\n        result = {vertices: [], holes: [], dimensions: dim},\n        holeIndex = 0;\n\n    for (var i = 0; i < data.length; i++) {\n        for (var j = 0; j < data[i].length; j++) {\n            for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n        }\n        if (i > 0) {\n            holeIndex += data[i - 1].length;\n            result.holes.push(holeIndex);\n        }\n    }\n    return result;\n};\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n  , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @api private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n  Events.prototype = Object.create(null);\n\n  //\n  // This hack is needed because the `__proto__` property is still inherited in\n  // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n  //\n  if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {Mixed} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @api private\n */\nfunction EE(fn, context, once) {\n  this.fn = fn;\n  this.context = context;\n  this.once = once || false;\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @api public\n */\nfunction EventEmitter() {\n  this._events = new Events();\n  this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @api public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n  var names = []\n    , events\n    , name;\n\n  if (this._eventsCount === 0) return names;\n\n  for (name in (events = this._events)) {\n    if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n  }\n\n  if (Object.getOwnPropertySymbols) {\n    return names.concat(Object.getOwnPropertySymbols(events));\n  }\n\n  return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Boolean} exists Only check if there are listeners.\n * @returns {Array|Boolean}\n * @api public\n */\nEventEmitter.prototype.listeners = function listeners(event, exists) {\n  var evt = prefix ? prefix + event : event\n    , available = this._events[evt];\n\n  if (exists) return !!available;\n  if (!available) return [];\n  if (available.fn) return [available.fn];\n\n  for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {\n    ee[i] = available[i].fn;\n  }\n\n  return ee;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @api public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return false;\n\n  var listeners = this._events[evt]\n    , len = arguments.length\n    , args\n    , i;\n\n  if (listeners.fn) {\n    if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n    switch (len) {\n      case 1: return listeners.fn.call(listeners.context), true;\n      case 2: return listeners.fn.call(listeners.context, a1), true;\n      case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n      case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n      case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n      case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n    }\n\n    for (i = 1, args = new Array(len -1); i < len; i++) {\n      args[i - 1] = arguments[i];\n    }\n\n    listeners.fn.apply(listeners.context, args);\n  } else {\n    var length = listeners.length\n      , j;\n\n    for (i = 0; i < length; i++) {\n      if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n      switch (len) {\n        case 1: listeners[i].fn.call(listeners[i].context); break;\n        case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n        case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n        case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n        default:\n          if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n            args[j - 1] = arguments[j];\n          }\n\n          listeners[i].fn.apply(listeners[i].context, args);\n      }\n    }\n  }\n\n  return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n  var listener = new EE(fn, context || this)\n    , evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n  else if (!this._events[evt].fn) this._events[evt].push(listener);\n  else this._events[evt] = [this._events[evt], listener];\n\n  return this;\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n  var listener = new EE(fn, context || this, true)\n    , evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n  else if (!this._events[evt].fn) this._events[evt].push(listener);\n  else this._events[evt] = [this._events[evt], listener];\n\n  return this;\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {Mixed} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return this;\n  if (!fn) {\n    if (--this._eventsCount === 0) this._events = new Events();\n    else delete this._events[evt];\n    return this;\n  }\n\n  var listeners = this._events[evt];\n\n  if (listeners.fn) {\n    if (\n         listeners.fn === fn\n      && (!once || listeners.once)\n      && (!context || listeners.context === context)\n    ) {\n      if (--this._eventsCount === 0) this._events = new Events();\n      else delete this._events[evt];\n    }\n  } else {\n    for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n      if (\n           listeners[i].fn !== fn\n        || (once && !listeners[i].once)\n        || (context && listeners[i].context !== context)\n      ) {\n        events.push(listeners[i]);\n      }\n    }\n\n    //\n    // Reset the array, or remove it completely if we have no more listeners.\n    //\n    if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n    else if (--this._eventsCount === 0) this._events = new Events();\n    else delete this._events[evt];\n  }\n\n  return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {String|Symbol} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n  var evt;\n\n  if (event) {\n    evt = prefix ? prefix + event : event;\n    if (this._events[evt]) {\n      if (--this._eventsCount === 0) this._events = new Events();\n      else delete this._events[evt];\n    }\n  } else {\n    this._events = new Events();\n    this._eventsCount = 0;\n  }\n\n  return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// This function doesn't apply anymore.\n//\nEventEmitter.prototype.setMaxListeners = function setMaxListeners() {\n  return this;\n};\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n  module.exports = EventEmitter;\n}\n","/**\n * isMobile.js v0.4.1\n *\n * A simple library to detect Apple phones and tablets,\n * Android phones and tablets, other mobile devices (like blackberry, mini-opera and windows phone),\n * and any kind of seven inch device, via user agent sniffing.\n *\n * @author: Kai Mallea (kmallea@gmail.com)\n *\n * @license: http://creativecommons.org/publicdomain/zero/1.0/\n */\n(function (global) {\n\n    var apple_phone         = /iPhone/i,\n        apple_ipod          = /iPod/i,\n        apple_tablet        = /iPad/i,\n        android_phone       = /(?=.*\\bAndroid\\b)(?=.*\\bMobile\\b)/i, // Match 'Android' AND 'Mobile'\n        android_tablet      = /Android/i,\n        amazon_phone        = /(?=.*\\bAndroid\\b)(?=.*\\bSD4930UR\\b)/i,\n        amazon_tablet       = /(?=.*\\bAndroid\\b)(?=.*\\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\\b)/i,\n        windows_phone       = /Windows Phone/i,\n        windows_tablet      = /(?=.*\\bWindows\\b)(?=.*\\bARM\\b)/i, // Match 'Windows' AND 'ARM'\n        other_blackberry    = /BlackBerry/i,\n        other_blackberry_10 = /BB10/i,\n        other_opera         = /Opera Mini/i,\n        other_chrome        = /(CriOS|Chrome)(?=.*\\bMobile\\b)/i,\n        other_firefox       = /(?=.*\\bFirefox\\b)(?=.*\\bMobile\\b)/i, // Match 'Firefox' AND 'Mobile'\n        seven_inch = new RegExp(\n            '(?:' +         // Non-capturing group\n\n            'Nexus 7' +     // Nexus 7\n\n            '|' +           // OR\n\n            'BNTV250' +     // B&N Nook Tablet 7 inch\n\n            '|' +           // OR\n\n            'Kindle Fire' + // Kindle Fire\n\n            '|' +           // OR\n\n            'Silk' +        // Kindle Fire, Silk Accelerated\n\n            '|' +           // OR\n\n            'GT-P1000' +    // Galaxy Tab 7 inch\n\n            ')',            // End non-capturing group\n\n            'i');           // Case-insensitive matching\n\n    var match = function(regex, userAgent) {\n        return regex.test(userAgent);\n    };\n\n    var IsMobileClass = function(userAgent) {\n        var ua = userAgent || navigator.userAgent;\n\n        // Facebook mobile app's integrated browser adds a bunch of strings that\n        // match everything. Strip it out if it exists.\n        var tmp = ua.split('[FBAN');\n        if (typeof tmp[1] !== 'undefined') {\n            ua = tmp[0];\n        }\n\n        // Twitter mobile app's integrated browser on iPad adds a \"Twitter for\n        // iPhone\" string. Same probable happens on other tablet platforms.\n        // This will confuse detection so strip it out if it exists.\n        tmp = ua.split('Twitter');\n        if (typeof tmp[1] !== 'undefined') {\n            ua = tmp[0];\n        }\n\n        this.apple = {\n            phone:  match(apple_phone, ua),\n            ipod:   match(apple_ipod, ua),\n            tablet: !match(apple_phone, ua) && match(apple_tablet, ua),\n            device: match(apple_phone, ua) || match(apple_ipod, ua) || match(apple_tablet, ua)\n        };\n        this.amazon = {\n            phone:  match(amazon_phone, ua),\n            tablet: !match(amazon_phone, ua) && match(amazon_tablet, ua),\n            device: match(amazon_phone, ua) || match(amazon_tablet, ua)\n        };\n        this.android = {\n            phone:  match(amazon_phone, ua) || match(android_phone, ua),\n            tablet: !match(amazon_phone, ua) && !match(android_phone, ua) && (match(amazon_tablet, ua) || match(android_tablet, ua)),\n            device: match(amazon_phone, ua) || match(amazon_tablet, ua) || match(android_phone, ua) || match(android_tablet, ua)\n        };\n        this.windows = {\n            phone:  match(windows_phone, ua),\n            tablet: match(windows_tablet, ua),\n            device: match(windows_phone, ua) || match(windows_tablet, ua)\n        };\n        this.other = {\n            blackberry:   match(other_blackberry, ua),\n            blackberry10: match(other_blackberry_10, ua),\n            opera:        match(other_opera, ua),\n            firefox:      match(other_firefox, ua),\n            chrome:       match(other_chrome, ua),\n            device:       match(other_blackberry, ua) || match(other_blackberry_10, ua) || match(other_opera, ua) || match(other_firefox, ua) || match(other_chrome, ua)\n        };\n        this.seven_inch = match(seven_inch, ua);\n        this.any = this.apple.device || this.android.device || this.windows.device || this.other.device || this.seven_inch;\n\n        // excludes 'other' devices and ipods, targeting touchscreen phones\n        this.phone = this.apple.phone || this.android.phone || this.windows.phone;\n\n        // excludes 7 inch devices, classifying as phone or tablet is left to the user\n        this.tablet = this.apple.tablet || this.android.tablet || this.windows.tablet;\n\n        if (typeof window === 'undefined') {\n            return this;\n        }\n    };\n\n    var instantiate = function() {\n        var IM = new IsMobileClass();\n        IM.Class = IsMobileClass;\n        return IM;\n    };\n\n    if (typeof module !== 'undefined' && module.exports && typeof window === 'undefined') {\n        //node\n        module.exports = IsMobileClass;\n    } else if (typeof module !== 'undefined' && module.exports && typeof window !== 'undefined') {\n        //browserify\n        module.exports = instantiate();\n    } else if (typeof define === 'function' && define.amd) {\n        //AMD\n        define('isMobile', [], global.isMobile = instantiate());\n    } else {\n        global.isMobile = instantiate();\n    }\n\n})(this);\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n  value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar MiniSignalBinding = (function () {\n  function MiniSignalBinding(fn, once, thisArg) {\n    if (once === undefined) once = false;\n\n    _classCallCheck(this, MiniSignalBinding);\n\n    this._fn = fn;\n    this._once = once;\n    this._thisArg = thisArg;\n    this._next = this._prev = this._owner = null;\n  }\n\n  _createClass(MiniSignalBinding, [{\n    key: 'detach',\n    value: function detach() {\n      if (this._owner === null) return false;\n      this._owner.detach(this);\n      return true;\n    }\n  }]);\n\n  return MiniSignalBinding;\n})();\n\nfunction _addMiniSignalBinding(self, node) {\n  if (!self._head) {\n    self._head = node;\n    self._tail = node;\n  } else {\n    self._tail._next = node;\n    node._prev = self._tail;\n    self._tail = node;\n  }\n\n  node._owner = self;\n\n  return node;\n}\n\nvar MiniSignal = (function () {\n  function MiniSignal() {\n    _classCallCheck(this, MiniSignal);\n\n    this._head = this._tail = undefined;\n  }\n\n  _createClass(MiniSignal, [{\n    key: 'handlers',\n    value: function handlers() {\n      var exists = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];\n\n      var node = this._head;\n\n      if (exists) return !!node;\n\n      var ee = [];\n\n      while (node) {\n        ee.push(node);\n        node = node._next;\n      }\n\n      return ee;\n    }\n  }, {\n    key: 'has',\n    value: function has(node) {\n      if (!(node instanceof MiniSignalBinding)) {\n        throw new Error('MiniSignal#has(): First arg must be a MiniSignalBinding object.');\n      }\n\n      return node._owner === this;\n    }\n  }, {\n    key: 'dispatch',\n    value: function dispatch() {\n      var node = this._head;\n\n      if (!node) return false;\n\n      while (node) {\n        if (node._once) this.detach(node);\n        node._fn.apply(node._thisArg, arguments);\n        node = node._next;\n      }\n\n      return true;\n    }\n  }, {\n    key: 'add',\n    value: function add(fn) {\n      var thisArg = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];\n\n      if (typeof fn !== 'function') {\n        throw new Error('MiniSignal#add(): First arg must be a Function.');\n      }\n      return _addMiniSignalBinding(this, new MiniSignalBinding(fn, false, thisArg));\n    }\n  }, {\n    key: 'once',\n    value: function once(fn) {\n      var thisArg = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];\n\n      if (typeof fn !== 'function') {\n        throw new Error('MiniSignal#once(): First arg must be a Function.');\n      }\n      return _addMiniSignalBinding(this, new MiniSignalBinding(fn, true, thisArg));\n    }\n  }, {\n    key: 'detach',\n    value: function detach(node) {\n      if (!(node instanceof MiniSignalBinding)) {\n        throw new Error('MiniSignal#detach(): First arg must be a MiniSignalBinding object.');\n      }\n      if (node._owner !== this) return this;\n\n      if (node._prev) node._prev._next = node._next;\n      if (node._next) node._next._prev = node._prev;\n\n      if (node === this._head) {\n        this._head = node._next;\n        if (node._next === null) {\n          this._tail = null;\n        }\n      } else if (node === this._tail) {\n        this._tail = node._prev;\n        this._tail._next = null;\n      }\n\n      node._owner = null;\n      return this;\n    }\n  }, {\n    key: 'detachAll',\n    value: function detachAll() {\n      var node = this._head;\n      if (!node) return this;\n\n      this._head = this._tail = null;\n\n      while (node) {\n        node._owner = null;\n        node = node._next;\n      }\n      return this;\n    }\n  }]);\n\n  return MiniSignal;\n})();\n\nMiniSignal.MiniSignalBinding = MiniSignalBinding;\n\nexports['default'] = MiniSignal;\nmodule.exports = exports['default'];\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","'use strict'\n\nmodule.exports = function parseURI (str, opts) {\n  opts = opts || {}\n\n  var o = {\n    key: ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'],\n    q: {\n      name: 'queryKey',\n      parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n    },\n    parser: {\n      strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n      loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n    }\n  }\n\n  var m = o.parser[opts.strictMode ? 'strict' : 'loose'].exec(str)\n  var uri = {}\n  var i = 14\n\n  while (i--) uri[o.key[i]] = m[i] || ''\n\n  uri[o.q.name] = {}\n  uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n    if ($1) uri[o.q.name][$1] = $2\n  })\n\n  return uri\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = parts.length - 1; i >= 0; i--) {\n    var last = parts[i];\n    if (last === '.') {\n      parts.splice(i, 1);\n    } else if (last === '..') {\n      parts.splice(i, 1);\n      up++;\n    } else if (up) {\n      parts.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (allowAboveRoot) {\n    for (; up--; up) {\n      parts.unshift('..');\n    }\n  }\n\n  return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n    /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n  return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n  var resolvedPath = '',\n      resolvedAbsolute = false;\n\n  for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n    var path = (i >= 0) ? arguments[i] : process.cwd();\n\n    // Skip empty and invalid entries\n    if (typeof path !== 'string') {\n      throw new TypeError('Arguments to path.resolve must be strings');\n    } else if (!path) {\n      continue;\n    }\n\n    resolvedPath = path + '/' + resolvedPath;\n    resolvedAbsolute = path.charAt(0) === '/';\n  }\n\n  // At this point the path should be resolved to a full absolute path, but\n  // handle relative paths to be safe (might happen when process.cwd() fails)\n\n  // Normalize the path\n  resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n    return !!p;\n  }), !resolvedAbsolute).join('/');\n\n  return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n  var isAbsolute = exports.isAbsolute(path),\n      trailingSlash = substr(path, -1) === '/';\n\n  // Normalize the path\n  path = normalizeArray(filter(path.split('/'), function(p) {\n    return !!p;\n  }), !isAbsolute).join('/');\n\n  if (!path && !isAbsolute) {\n    path = '.';\n  }\n  if (path && trailingSlash) {\n    path += '/';\n  }\n\n  return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n  return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n  var paths = Array.prototype.slice.call(arguments, 0);\n  return exports.normalize(filter(paths, function(p, index) {\n    if (typeof p !== 'string') {\n      throw new TypeError('Arguments to path.join must be strings');\n    }\n    return p;\n  }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n  from = exports.resolve(from).substr(1);\n  to = exports.resolve(to).substr(1);\n\n  function trim(arr) {\n    var start = 0;\n    for (; start < arr.length; start++) {\n      if (arr[start] !== '') break;\n    }\n\n    var end = arr.length - 1;\n    for (; end >= 0; end--) {\n      if (arr[end] !== '') break;\n    }\n\n    if (start > end) return [];\n    return arr.slice(start, end - start + 1);\n  }\n\n  var fromParts = trim(from.split('/'));\n  var toParts = trim(to.split('/'));\n\n  var length = Math.min(fromParts.length, toParts.length);\n  var samePartsLength = length;\n  for (var i = 0; i < length; i++) {\n    if (fromParts[i] !== toParts[i]) {\n      samePartsLength = i;\n      break;\n    }\n  }\n\n  var outputParts = [];\n  for (var i = samePartsLength; i < fromParts.length; i++) {\n    outputParts.push('..');\n  }\n\n  outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n  return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function(path) {\n  var result = splitPath(path),\n      root = result[0],\n      dir = result[1];\n\n  if (!root && !dir) {\n    // No dirname whatsoever\n    return '.';\n  }\n\n  if (dir) {\n    // It has a dirname, strip trailing slash\n    dir = dir.substr(0, dir.length - 1);\n  }\n\n  return root + dir;\n};\n\n\nexports.basename = function(path, ext) {\n  var f = splitPath(path)[2];\n  // TODO: make this comparison case-insensitive on windows?\n  if (ext && f.substr(-1 * ext.length) === ext) {\n    f = f.substr(0, f.length - ext.length);\n  }\n  return f;\n};\n\n\nexports.extname = function(path) {\n  return splitPath(path)[3];\n};\n\nfunction filter (xs, f) {\n    if (xs.filter) return xs.filter(f);\n    var res = [];\n    for (var i = 0; i < xs.length; i++) {\n        if (f(xs[i], i, xs)) res.push(xs[i]);\n    }\n    return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n    ? function (str, start, len) { return str.substr(start, len) }\n    : function (str, start, len) {\n        if (start < 0) start = str.length + start;\n        return str.substr(start, len);\n    }\n;\n","var EMPTY_ARRAY_BUFFER = new ArrayBuffer(0);\n\n/**\n * Helper class to create a webGL buffer\n *\n * @class\n * @memberof PIXI.glCore\n * @param gl {WebGLRenderingContext} The current WebGL rendering context\n * @param type {gl.ARRAY_BUFFER | gl.ELEMENT_ARRAY_BUFFER} @mat\n * @param data {ArrayBuffer| SharedArrayBuffer|ArrayBufferView} an array of data\n * @param drawType {gl.STATIC_DRAW|gl.DYNAMIC_DRAW|gl.STREAM_DRAW}\n */\nvar Buffer = function(gl, type, data, drawType)\n{\n\n\t/**\n     * The current WebGL rendering context\n     *\n     * @member {WebGLRenderingContext}\n     */\n\tthis.gl = gl;\n\n\t/**\n     * The WebGL buffer, created upon instantiation\n     *\n     * @member {WebGLBuffer}\n     */\n\tthis.buffer = gl.createBuffer();\n\n\t/**\n     * The type of the buffer\n     *\n     * @member {gl.ARRAY_BUFFER|gl.ELEMENT_ARRAY_BUFFER}\n     */\n\tthis.type = type || gl.ARRAY_BUFFER;\n\n\t/**\n     * The draw type of the buffer\n     *\n     * @member {gl.STATIC_DRAW|gl.DYNAMIC_DRAW|gl.STREAM_DRAW}\n     */\n\tthis.drawType = drawType || gl.STATIC_DRAW;\n\n\t/**\n     * The data in the buffer, as a typed array\n     *\n     * @member {ArrayBuffer| SharedArrayBuffer|ArrayBufferView}\n     */\n\tthis.data = EMPTY_ARRAY_BUFFER;\n\n\tif(data)\n\t{\n\t\tthis.upload(data);\n\t}\n\n\tthis._updateID = 0;\n};\n\n/**\n * Uploads the buffer to the GPU\n * @param data {ArrayBuffer| SharedArrayBuffer|ArrayBufferView} an array of data to upload\n * @param offset {Number} if only a subset of the data should be uploaded, this is the amount of data to subtract\n * @param dontBind {Boolean} whether to bind the buffer before uploading it\n */\nBuffer.prototype.upload = function(data, offset, dontBind)\n{\n\t// todo - needed?\n\tif(!dontBind) this.bind();\n\n\tvar gl = this.gl;\n\n\tdata = data || this.data;\n\toffset = offset || 0;\n\n\tif(this.data.byteLength >= data.byteLength)\n\t{\n\t\tgl.bufferSubData(this.type, offset, data);\n\t}\n\telse\n\t{\n\t\tgl.bufferData(this.type, data, this.drawType);\n\t}\n\n\tthis.data = data;\n};\n/**\n * Binds the buffer\n *\n */\nBuffer.prototype.bind = function()\n{\n\tvar gl = this.gl;\n\tgl.bindBuffer(this.type, this.buffer);\n};\n\nBuffer.createVertexBuffer = function(gl, data, drawType)\n{\n\treturn new Buffer(gl, gl.ARRAY_BUFFER, data, drawType);\n};\n\nBuffer.createIndexBuffer = function(gl, data, drawType)\n{\n\treturn new Buffer(gl, gl.ELEMENT_ARRAY_BUFFER, data, drawType);\n};\n\nBuffer.create = function(gl, type, data, drawType)\n{\n\treturn new Buffer(gl, type, data, drawType);\n};\n\n/**\n * Destroys the buffer\n *\n */\nBuffer.prototype.destroy = function(){\n\tthis.gl.deleteBuffer(this.buffer);\n};\n\nmodule.exports = Buffer;\n","\nvar Texture = require('./GLTexture');\n\n/**\n * Helper class to create a webGL Framebuffer\n *\n * @class\n * @memberof PIXI.glCore\n * @param gl {WebGLRenderingContext} The current WebGL rendering context\n * @param width {Number} the width of the drawing area of the frame buffer\n * @param height {Number} the height of the drawing area of the frame buffer\n */\nvar Framebuffer = function(gl, width, height)\n{\n    /**\n     * The current WebGL rendering context\n     *\n     * @member {WebGLRenderingContext}\n     */\n    this.gl = gl;\n\n    /**\n     * The frame buffer\n     *\n     * @member {WebGLFramebuffer}\n     */\n    this.framebuffer = gl.createFramebuffer();\n\n    /**\n     * The stencil buffer\n     *\n     * @member {WebGLRenderbuffer}\n     */\n    this.stencil = null;\n\n    /**\n     * The stencil buffer\n     *\n     * @member {PIXI.glCore.GLTexture}\n     */\n    this.texture = null;\n\n    /**\n     * The width of the drawing area of the buffer\n     *\n     * @member {Number}\n     */\n    this.width = width || 100;\n    /**\n     * The height of the drawing area of the buffer\n     *\n     * @member {Number}\n     */\n    this.height = height || 100;\n};\n\n/**\n * Adds a texture to the frame buffer\n * @param texture {PIXI.glCore.GLTexture}\n */\nFramebuffer.prototype.enableTexture = function(texture)\n{\n    var gl = this.gl;\n\n    this.texture = texture || new Texture(gl);\n\n    this.texture.bind();\n\n    //gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  this.width, this.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n\n    this.bind();\n\n    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture.texture, 0);\n};\n\n/**\n * Initialises the stencil buffer\n */\nFramebuffer.prototype.enableStencil = function()\n{\n    if(this.stencil)return;\n\n    var gl = this.gl;\n\n    this.stencil = gl.createRenderbuffer();\n\n    gl.bindRenderbuffer(gl.RENDERBUFFER, this.stencil);\n\n    // TODO.. this is depth AND stencil?\n    gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, this.stencil);\n    gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL,  this.width  , this.height );\n\n\n};\n\n/**\n * Erases the drawing area and fills it with a colour\n * @param  r {Number} the red value of the clearing colour\n * @param  g {Number} the green value of the clearing colour\n * @param  b {Number} the blue value of the clearing colour\n * @param  a {Number} the alpha value of the clearing colour\n */\nFramebuffer.prototype.clear = function( r, g, b, a )\n{\n    this.bind();\n\n    var gl = this.gl;\n\n    gl.clearColor(r, g, b, a);\n    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n};\n\n/**\n * Binds the frame buffer to the WebGL context\n */\nFramebuffer.prototype.bind = function()\n{\n    var gl = this.gl;\n    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );\n};\n\n/**\n * Unbinds the frame buffer to the WebGL context\n */\nFramebuffer.prototype.unbind = function()\n{\n    var gl = this.gl;\n    gl.bindFramebuffer(gl.FRAMEBUFFER, null );\n};\n/**\n * Resizes the drawing area of the buffer to the given width and height\n * @param  width  {Number} the new width\n * @param  height {Number} the new height\n */\nFramebuffer.prototype.resize = function(width, height)\n{\n    var gl = this.gl;\n\n    this.width = width;\n    this.height = height;\n\n    if ( this.texture )\n    {\n        this.texture.uploadData(null, width, height);\n    }\n\n    if ( this.stencil )\n    {\n        // update the stencil buffer width and height\n        gl.bindRenderbuffer(gl.RENDERBUFFER, this.stencil);\n        gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, width, height);\n    }\n};\n\n/**\n * Destroys this buffer\n */\nFramebuffer.prototype.destroy = function()\n{\n    var gl = this.gl;\n\n    //TODO\n    if(this.texture)\n    {\n        this.texture.destroy();\n    }\n\n    gl.deleteFramebuffer(this.framebuffer);\n\n    this.gl = null;\n\n    this.stencil = null;\n    this.texture = null;\n};\n\n/**\n * Creates a frame buffer with a texture containing the given data\n * @static\n * @param gl {WebGLRenderingContext} The current WebGL rendering context\n * @param width {Number} the width of the drawing area of the frame buffer\n * @param height {Number} the height of the drawing area of the frame buffer\n * @param data {ArrayBuffer| SharedArrayBuffer|ArrayBufferView} an array of data\n */\nFramebuffer.createRGBA = function(gl, width, height, data)\n{\n    var texture = Texture.fromData(gl, null, width, height);\n    texture.enableNearestScaling();\n    texture.enableWrapClamp();\n\n    //now create the framebuffer object and attach the texture to it.\n    var fbo = new Framebuffer(gl, width, height);\n    fbo.enableTexture(texture);\n\n    //fbo.enableStencil(); // get this back on soon!\n\n    fbo.unbind();\n\n    return fbo;\n};\n\n/**\n * Creates a frame buffer with a texture containing the given data\n * @static\n * @param gl {WebGLRenderingContext} The current WebGL rendering context\n * @param width {Number} the width of the drawing area of the frame buffer\n * @param height {Number} the height of the drawing area of the frame buffer\n * @param data {ArrayBuffer| SharedArrayBuffer|ArrayBufferView} an array of data\n */\nFramebuffer.createFloat32 = function(gl, width, height, data)\n{\n    // create a new texture..\n    var texture = new Texture.fromData(gl, data, width, height);\n    texture.enableNearestScaling();\n    texture.enableWrapClamp();\n\n    //now create the framebuffer object and attach the texture to it.\n    var fbo = new Framebuffer(gl, width, height);\n    fbo.enableTexture(texture);\n\n    fbo.unbind();\n\n    return fbo;\n};\n\nmodule.exports = Framebuffer;\n","\nvar compileProgram = require('./shader/compileProgram'),\n\textractAttributes = require('./shader/extractAttributes'),\n\textractUniforms = require('./shader/extractUniforms'),\n\tsetPrecision = require('./shader/setPrecision'),\n\tgenerateUniformAccessObject = require('./shader/generateUniformAccessObject');\n\n/**\n * Helper class to create a webGL Shader\n *\n * @class\n * @memberof PIXI.glCore\n * @param gl {WebGLRenderingContext}\n * @param vertexSrc {string|string[]} The vertex shader source as an array of strings.\n * @param fragmentSrc {string|string[]} The fragment shader source as an array of strings.\n * @param precision {precision]} The float precision of the shader. Options are 'lowp', 'mediump' or 'highp'.\n * @param attributeLocations {object} A key value pair showing which location eact attribute should sit eg {position:0, uvs:1}\n */\nvar Shader = function(gl, vertexSrc, fragmentSrc, precision, attributeLocations)\n{\n\t/**\n\t * The current WebGL rendering context\n\t *\n\t * @member {WebGLRenderingContext}\n\t */\n\tthis.gl = gl;\n\n\tif(precision)\n\t{\n\t\tvertexSrc = setPrecision(vertexSrc, precision);\n\t\tfragmentSrc = setPrecision(fragmentSrc, precision);\n\t}\n\n\t/**\n\t * The shader program\n\t *\n\t * @member {WebGLProgram}\n\t */\n\t// First compile the program..\n\tthis.program = compileProgram(gl, vertexSrc, fragmentSrc, attributeLocations);\n\n\t/**\n\t * The attributes of the shader as an object containing the following properties\n\t * {\n\t * \ttype,\n\t * \tsize,\n\t * \tlocation,\n\t * \tpointer\n\t * }\n\t * @member {Object}\n\t */\n\t// next extract the attributes\n\tthis.attributes = extractAttributes(gl, this.program);\n\n    this.uniformData = extractUniforms(gl, this.program);\n\n\t/**\n\t * The uniforms of the shader as an object containing the following properties\n\t * {\n\t * \tgl,\n\t * \tdata\n\t * }\n\t * @member {Object}\n\t */\n\tthis.uniforms = generateUniformAccessObject( gl, this.uniformData );\n\n};\n/**\n * Uses this shader\n */\nShader.prototype.bind = function()\n{\n\tthis.gl.useProgram(this.program);\n};\n\n/**\n * Destroys this shader\n * TODO\n */\nShader.prototype.destroy = function()\n{\n\tthis.attributes = null;\n\tthis.uniformData = null;\n\tthis.uniforms = null;\n\n\tvar gl = this.gl;\n\tgl.deleteProgram(this.program);\n};\n\n\nmodule.exports = Shader;\n","\n/**\n * Helper class to create a WebGL Texture\n *\n * @class\n * @memberof PIXI.glCore\n * @param gl {WebGLRenderingContext} The current WebGL context\n * @param width {number} the width of the texture\n * @param height {number} the height of the texture\n * @param format {number} the pixel format of the texture. defaults to gl.RGBA\n * @param type {number} the gl type of the texture. defaults to gl.UNSIGNED_BYTE\n */\nvar Texture = function(gl, width, height, format, type)\n{\n\t/**\n\t * The current WebGL rendering context\n\t *\n\t * @member {WebGLRenderingContext}\n\t */\n\tthis.gl = gl;\n\n\n\t/**\n\t * The WebGL texture\n\t *\n\t * @member {WebGLTexture}\n\t */\n\tthis.texture = gl.createTexture();\n\n\t/**\n\t * If mipmapping was used for this texture, enable and disable with enableMipmap()\n\t *\n\t * @member {Boolean}\n\t */\n\t// some settings..\n\tthis.mipmap = false;\n\n\n\t/**\n\t * Set to true to enable pre-multiplied alpha\n\t *\n\t * @member {Boolean}\n\t */\n\tthis.premultiplyAlpha = false;\n\n\t/**\n\t * The width of texture\n\t *\n\t * @member {Number}\n\t */\n\tthis.width = width || -1;\n\t/**\n\t * The height of texture\n\t *\n\t * @member {Number}\n\t */\n\tthis.height = height || -1;\n\n\t/**\n\t * The pixel format of the texture. defaults to gl.RGBA\n\t *\n\t * @member {Number}\n\t */\n\tthis.format = format || gl.RGBA;\n\n\t/**\n\t * The gl type of the texture. defaults to gl.UNSIGNED_BYTE\n\t *\n\t * @member {Number}\n\t */\n\tthis.type = type || gl.UNSIGNED_BYTE;\n\n\n};\n\n/**\n * Uploads this texture to the GPU\n * @param source {HTMLImageElement|ImageData|HTMLVideoElement} the source image of the texture\n */\nTexture.prototype.upload = function(source)\n{\n\tthis.bind();\n\n\tvar gl = this.gl;\n\n\n\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this.premultiplyAlpha);\n\n\tvar newWidth = source.videoWidth || source.width;\n\tvar newHeight = source.videoHeight || source.height;\n\n\tif(newHeight !== this.height || newWidth !== this.width)\n\t{\n\t\tgl.texImage2D(gl.TEXTURE_2D, 0, this.format, this.format, this.type, source);\n\t}\n\telse\n\t{\n    \tgl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, this.format, this.type, source);\n\t}\n\n\t// if the source is a video, we need to use the videoWidth / videoHeight properties as width / height will be incorrect.\n\tthis.width = newWidth;\n\tthis.height = newHeight;\n\n};\n\nvar FLOATING_POINT_AVAILABLE = false;\n\n/**\n * Use a data source and uploads this texture to the GPU\n * @param data {TypedArray} the data to upload to the texture\n * @param width {number} the new width of the texture\n * @param height {number} the new height of the texture\n */\nTexture.prototype.uploadData = function(data, width, height)\n{\n\tthis.bind();\n\n\tvar gl = this.gl;\n\n\n\tif(data instanceof Float32Array)\n\t{\n\t\tif(!FLOATING_POINT_AVAILABLE)\n\t\t{\n\t\t\tvar ext = gl.getExtension(\"OES_texture_float\");\n\n\t\t\tif(ext)\n\t\t\t{\n\t\t\t\tFLOATING_POINT_AVAILABLE = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Error('floating point textures not available');\n\t\t\t}\n\t\t}\n\n\t\tthis.type = gl.FLOAT;\n\t}\n\telse\n\t{\n\t\t// TODO support for other types\n\t\tthis.type = this.type || gl.UNSIGNED_BYTE;\n\t}\n\n\t// what type of data?\n\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this.premultiplyAlpha);\n\n\n\tif(width !== this.width || height !== this.height)\n\t{\n\t\tgl.texImage2D(gl.TEXTURE_2D, 0, this.format,  width, height, 0, this.format, this.type, data || null);\n\t}\n\telse\n\t{\n\t\tgl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height, this.format, this.type, data || null);\n\t}\n\n\tthis.width = width;\n\tthis.height = height;\n\n\n//\ttexSubImage2D\n};\n\n/**\n * Binds the texture\n * @param  location\n */\nTexture.prototype.bind = function(location)\n{\n\tvar gl = this.gl;\n\n\tif(location !== undefined)\n\t{\n\t\tgl.activeTexture(gl.TEXTURE0 + location);\n\t}\n\n\tgl.bindTexture(gl.TEXTURE_2D, this.texture);\n};\n\n/**\n * Unbinds the texture\n */\nTexture.prototype.unbind = function()\n{\n\tvar gl = this.gl;\n\tgl.bindTexture(gl.TEXTURE_2D, null);\n};\n\n/**\n * @param linear {Boolean} if we want to use linear filtering or nearest neighbour interpolation\n */\nTexture.prototype.minFilter = function( linear )\n{\n\tvar gl = this.gl;\n\n\tthis.bind();\n\n\tif(this.mipmap)\n\t{\n\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, linear ? gl.LINEAR_MIPMAP_LINEAR : gl.NEAREST_MIPMAP_NEAREST);\n\t}\n\telse\n\t{\n\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, linear ? gl.LINEAR : gl.NEAREST);\n\t}\n};\n\n/**\n * @param linear {Boolean} if we want to use linear filtering or nearest neighbour interpolation\n */\nTexture.prototype.magFilter = function( linear )\n{\n\tvar gl = this.gl;\n\n\tthis.bind();\n\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, linear ? gl.LINEAR : gl.NEAREST);\n};\n\n/**\n * Enables mipmapping\n */\nTexture.prototype.enableMipmap = function()\n{\n\tvar gl = this.gl;\n\n\tthis.bind();\n\n\tthis.mipmap = true;\n\n\tgl.generateMipmap(gl.TEXTURE_2D);\n};\n\n/**\n * Enables linear filtering\n */\nTexture.prototype.enableLinearScaling = function()\n{\n\tthis.minFilter(true);\n\tthis.magFilter(true);\n};\n\n/**\n * Enables nearest neighbour interpolation\n */\nTexture.prototype.enableNearestScaling = function()\n{\n\tthis.minFilter(false);\n\tthis.magFilter(false);\n};\n\n/**\n * Enables clamping on the texture so WebGL will not repeat it\n */\nTexture.prototype.enableWrapClamp = function()\n{\n\tvar gl = this.gl;\n\n\tthis.bind();\n\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n};\n\n/**\n * Enable tiling on the texture\n */\nTexture.prototype.enableWrapRepeat = function()\n{\n\tvar gl = this.gl;\n\n\tthis.bind();\n\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);\n};\n\nTexture.prototype.enableWrapMirrorRepeat = function()\n{\n\tvar gl = this.gl;\n\n\tthis.bind();\n\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.MIRRORED_REPEAT);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.MIRRORED_REPEAT);\n};\n\n\n/**\n * Destroys this texture\n */\nTexture.prototype.destroy = function()\n{\n\tvar gl = this.gl;\n\t//TODO\n\tgl.deleteTexture(this.texture);\n};\n\n/**\n * @static\n * @param gl {WebGLRenderingContext} The current WebGL context\n * @param source {HTMLImageElement|ImageData} the source image of the texture\n * @param premultiplyAlpha {Boolean} If we want to use pre-multiplied alpha\n */\nTexture.fromSource = function(gl, source, premultiplyAlpha)\n{\n\tvar texture = new Texture(gl);\n\ttexture.premultiplyAlpha = premultiplyAlpha || false;\n\ttexture.upload(source);\n\n\treturn texture;\n};\n\n/**\n * @static\n * @param gl {WebGLRenderingContext} The current WebGL context\n * @param data {TypedArray} the data to upload to the texture\n * @param width {number} the new width of the texture\n * @param height {number} the new height of the texture\n */\nTexture.fromData = function(gl, data, width, height)\n{\n\t//console.log(data, width, height);\n\tvar texture = new Texture(gl);\n\ttexture.uploadData(data, width, height);\n\n\treturn texture;\n};\n\n\nmodule.exports = Texture;\n","\n// state object//\nvar setVertexAttribArrays = require( './setVertexAttribArrays' );\n\n/**\n * Helper class to work with WebGL VertexArrayObjects (vaos)\n * Only works if WebGL extensions are enabled (they usually are)\n *\n * @class\n * @memberof PIXI.glCore\n * @param gl {WebGLRenderingContext} The current WebGL rendering context\n */\nfunction VertexArrayObject(gl, state)\n{\n    this.nativeVaoExtension = null;\n\n    if(!VertexArrayObject.FORCE_NATIVE)\n    {\n        this.nativeVaoExtension = gl.getExtension('OES_vertex_array_object') ||\n                                  gl.getExtension('MOZ_OES_vertex_array_object') ||\n                                  gl.getExtension('WEBKIT_OES_vertex_array_object');\n    }\n\n    this.nativeState = state;\n\n    if(this.nativeVaoExtension)\n    {\n        this.nativeVao = this.nativeVaoExtension.createVertexArrayOES();\n\n        var maxAttribs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);\n\n        // VAO - overwrite the state..\n        this.nativeState = {\n            tempAttribState: new Array(maxAttribs),\n            attribState: new Array(maxAttribs)\n        };\n    }\n\n    /**\n     * The current WebGL rendering context\n     *\n     * @member {WebGLRenderingContext}\n     */\n    this.gl = gl;\n\n    /**\n     * An array of attributes\n     *\n     * @member {Array}\n     */\n    this.attributes = [];\n\n    /**\n     * @member {PIXI.glCore.GLBuffer}\n     */\n    this.indexBuffer = null;\n\n    /**\n     * A boolean flag\n     *\n     * @member {Boolean}\n     */\n    this.dirty = false;\n}\n\nVertexArrayObject.prototype.constructor = VertexArrayObject;\nmodule.exports = VertexArrayObject;\n\n/**\n* Some devices behave a bit funny when using the newer extensions (im looking at you ipad 2!)\n* If you find on older devices that things have gone a bit weird then set this to true.\n*/\n/**\n * Lets the VAO know if you should use the WebGL extension or the native methods.\n * Some devices behave a bit funny when using the newer extensions (im looking at you ipad 2!)\n * If you find on older devices that things have gone a bit weird then set this to true.\n * @static\n * @property {Boolean} FORCE_NATIVE\n */\nVertexArrayObject.FORCE_NATIVE = false;\n\n/**\n * Binds the buffer\n */\nVertexArrayObject.prototype.bind = function()\n{\n    if(this.nativeVao)\n    {\n        this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao);\n\n        if(this.dirty)\n        {\n            this.dirty = false;\n            this.activate();\n        }\n    }\n    else\n    {\n\n        this.activate();\n    }\n\n    return this;\n};\n\n/**\n * Unbinds the buffer\n */\nVertexArrayObject.prototype.unbind = function()\n{\n    if(this.nativeVao)\n    {\n        this.nativeVaoExtension.bindVertexArrayOES(null);\n    }\n\n    return this;\n};\n\n/**\n * Uses this vao\n */\nVertexArrayObject.prototype.activate = function()\n{\n\n    var gl = this.gl;\n    var lastBuffer = null;\n\n    for (var i = 0; i < this.attributes.length; i++)\n    {\n        var attrib = this.attributes[i];\n\n        if(lastBuffer !== attrib.buffer)\n        {\n            attrib.buffer.bind();\n            lastBuffer = attrib.buffer;\n        }\n\n        gl.vertexAttribPointer(attrib.attribute.location,\n                               attrib.attribute.size,\n                               attrib.type || gl.FLOAT,\n                               attrib.normalized || false,\n                               attrib.stride || 0,\n                               attrib.start || 0);\n    }\n\n    setVertexAttribArrays(gl, this.attributes, this.nativeState);\n\n    if(this.indexBuffer)\n    {\n        this.indexBuffer.bind();\n    }\n\n    return this;\n};\n\n/**\n *\n * @param buffer     {PIXI.gl.GLBuffer}\n * @param attribute  {*}\n * @param type       {String}\n * @param normalized {Boolean}\n * @param stride     {Number}\n * @param start      {Number}\n */\nVertexArrayObject.prototype.addAttribute = function(buffer, attribute, type, normalized, stride, start)\n{\n    this.attributes.push({\n        buffer:     buffer,\n        attribute:  attribute,\n\n        location:   attribute.location,\n        type:       type || this.gl.FLOAT,\n        normalized: normalized || false,\n        stride:     stride || 0,\n        start:      start || 0\n    });\n\n    this.dirty = true;\n\n    return this;\n};\n\n/**\n *\n * @param buffer   {PIXI.gl.GLBuffer}\n */\nVertexArrayObject.prototype.addIndex = function(buffer/*, options*/)\n{\n    this.indexBuffer = buffer;\n\n    this.dirty = true;\n\n    return this;\n};\n\n/**\n * Unbinds this vao and disables it\n */\nVertexArrayObject.prototype.clear = function()\n{\n    // var gl = this.gl;\n\n    // TODO - should this function unbind after clear?\n    // for now, no but lets see what happens in the real world!\n    if(this.nativeVao)\n    {\n        this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao);\n    }\n\n    this.attributes.length = 0;\n    this.indexBuffer = null;\n\n    return this;\n};\n\n/**\n * @param type  {Number}\n * @param size  {Number}\n * @param start {Number}\n */\nVertexArrayObject.prototype.draw = function(type, size, start)\n{\n    var gl = this.gl;\n\n    if(this.indexBuffer)\n    {\n        gl.drawElements(type, size || this.indexBuffer.data.length, gl.UNSIGNED_SHORT, (start || 0) * 2 );\n    }\n    else\n    {\n        // TODO need a better way to calculate size..\n        gl.drawArrays(type, start, size || this.getSize());\n    }\n\n    return this;\n};\n\n/**\n * Destroy this vao\n */\nVertexArrayObject.prototype.destroy = function()\n{\n    // lose references\n    this.gl = null;\n    this.indexBuffer = null;\n    this.attributes = null;\n    this.nativeState = null;\n\n    if(this.nativeVao)\n    {\n        this.nativeVaoExtension.deleteVertexArrayOES(this.nativeVao);\n    }\n\n    this.nativeVaoExtension = null;\n    this.nativeVao = null;\n};\n\nVertexArrayObject.prototype.getSize = function()\n{\n    var attrib = this.attributes[0];\n    return attrib.buffer.data.length / (( attrib.stride/4 ) || attrib.attribute.size);\n};\n","\n/**\n * Helper class to create a webGL Context\n *\n * @class\n * @memberof PIXI.glCore\n * @param canvas {HTMLCanvasElement} the canvas element that we will get the context from\n * @param options {Object} An options object that gets passed in to the canvas element containing the context attributes,\n *                         see https://developer.mozilla.org/en/docs/Web/API/HTMLCanvasElement/getContext for the options available\n * @return {WebGLRenderingContext} the WebGL context\n */\nvar createContext = function(canvas, options)\n{\n    var gl = canvas.getContext('webgl', options) || \n         canvas.getContext('experimental-webgl', options);\n\n    if (!gl)\n    {\n        // fail, not able to get a context\n        throw new Error('This browser does not support webGL. Try using the canvas renderer');\n    }\n\n    return gl;\n};\n\nmodule.exports = createContext;\n","var gl = {\n    createContext:          require('./createContext'),\n    setVertexAttribArrays:  require('./setVertexAttribArrays'),\n    GLBuffer:               require('./GLBuffer'),\n    GLFramebuffer:          require('./GLFramebuffer'),\n    GLShader:               require('./GLShader'),\n    GLTexture:              require('./GLTexture'),\n    VertexArrayObject:      require('./VertexArrayObject'),\n    shader:                 require('./shader')\n};\n\n// Export for Node-compatible environments\nif (typeof module !== 'undefined' && module.exports)\n{\n    // Export the module\n    module.exports = gl;\n}\n\n// Add to the browser window pixi.gl\nif (typeof window !== 'undefined')\n{\n    // add the window object\n    window.PIXI = window.PIXI || {};\n    window.PIXI.glCore = gl;\n}\n","// var GL_MAP = {};\n\n/**\n * @param gl {WebGLRenderingContext} The current WebGL context\n * @param attribs {*}\n * @param state {*}\n */\nvar setVertexAttribArrays = function (gl, attribs, state)\n{\n    var i;\n    if(state)\n    {\n        var tempAttribState = state.tempAttribState,\n            attribState = state.attribState;\n\n        for (i = 0; i < tempAttribState.length; i++)\n        {\n            tempAttribState[i] = false;\n        }\n\n        // set the new attribs\n        for (i = 0; i < attribs.length; i++)\n        {\n            tempAttribState[attribs[i].attribute.location] = true;\n        }\n\n        for (i = 0; i < attribState.length; i++)\n        {\n            if (attribState[i] !== tempAttribState[i])\n            {\n                attribState[i] = tempAttribState[i];\n\n                if (state.attribState[i])\n                {\n                    gl.enableVertexAttribArray(i);\n                }\n                else\n                {\n                    gl.disableVertexAttribArray(i);\n                }\n            }\n        }\n\n    }\n    else\n    {\n        for (i = 0; i < attribs.length; i++)\n        {\n            var attrib = attribs[i];\n            gl.enableVertexAttribArray(attrib.attribute.location);\n        }\n    }\n};\n\nmodule.exports = setVertexAttribArrays;\n","\n/**\n * @class\n * @memberof PIXI.glCore.shader\n * @param gl {WebGLRenderingContext} The current WebGL context {WebGLProgram}\n * @param vertexSrc {string|string[]} The vertex shader source as an array of strings.\n * @param fragmentSrc {string|string[]} The fragment shader source as an array of strings.\n * @param attributeLocations {Object} An attribute location map that lets you manually set the attribute locations\n * @return {WebGLProgram} the shader program\n */\nvar compileProgram = function(gl, vertexSrc, fragmentSrc, attributeLocations)\n{\n    var glVertShader = compileShader(gl, gl.VERTEX_SHADER, vertexSrc);\n    var glFragShader = compileShader(gl, gl.FRAGMENT_SHADER, fragmentSrc);\n\n    var program = gl.createProgram();\n\n    gl.attachShader(program, glVertShader);\n    gl.attachShader(program, glFragShader);\n\n    // optionally, set the attributes manually for the program rather than letting WebGL decide..\n    if(attributeLocations)\n    {\n        for(var i in attributeLocations)\n        {\n            gl.bindAttribLocation(program, attributeLocations[i], i);\n        }\n    }\n\n\n    gl.linkProgram(program);\n\n    // if linking fails, then log and cleanup\n    if (!gl.getProgramParameter(program, gl.LINK_STATUS))\n    {\n        console.error('Pixi.js Error: Could not initialize shader.');\n        console.error('gl.VALIDATE_STATUS', gl.getProgramParameter(program, gl.VALIDATE_STATUS));\n        console.error('gl.getError()', gl.getError());\n\n        // if there is a program info log, log it\n        if (gl.getProgramInfoLog(program) !== '')\n        {\n            console.warn('Pixi.js Warning: gl.getProgramInfoLog()', gl.getProgramInfoLog(program));\n        }\n\n        gl.deleteProgram(program);\n        program = null;\n    }\n\n    // clean up some shaders\n    gl.deleteShader(glVertShader);\n    gl.deleteShader(glFragShader);\n\n    return program;\n};\n\n/**\n * @private\n * @param gl {WebGLRenderingContext} The current WebGL context {WebGLProgram}\n * @param type {Number} the type, can be either VERTEX_SHADER or FRAGMENT_SHADER\n * @param vertexSrc {string|string[]} The vertex shader source as an array of strings.\n * @return {WebGLShader} the shader\n */\nvar compileShader = function (gl, type, src)\n{\n    var shader = gl.createShader(type);\n\n    gl.shaderSource(shader, src);\n    gl.compileShader(shader);\n\n    if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS))\n    {\n        console.log(gl.getShaderInfoLog(shader));\n        return null;\n    }\n\n    return shader;\n};\n\nmodule.exports = compileProgram;\n","/**\n * @class\n * @memberof PIXI.glCore.shader\n * @param type {String} Type of value\n * @param size {Number}\n */\nvar defaultValue = function(type, size) \n{\n    switch (type)\n    {\n        case 'float':\n            return 0;\n\n        case 'vec2': \n            return new Float32Array(2 * size);\n\n        case 'vec3':\n            return new Float32Array(3 * size);\n\n        case 'vec4':     \n            return new Float32Array(4 * size);\n            \n        case 'int':\n        case 'sampler2D':\n            return 0;\n\n        case 'ivec2':   \n            return new Int32Array(2 * size);\n\n        case 'ivec3':\n            return new Int32Array(3 * size);\n\n        case 'ivec4': \n            return new Int32Array(4 * size);\n\n        case 'bool':     \n            return false;\n\n        case 'bvec2':\n\n            return booleanArray( 2 * size);\n\n        case 'bvec3':\n            return booleanArray(3 * size);\n\n        case 'bvec4':\n            return booleanArray(4 * size);\n\n        case 'mat2':\n            return new Float32Array([1, 0,\n                                     0, 1]);\n\n        case 'mat3': \n            return new Float32Array([1, 0, 0,\n                                     0, 1, 0,\n                                     0, 0, 1]);\n\n        case 'mat4':\n            return new Float32Array([1, 0, 0, 0,\n                                     0, 1, 0, 0,\n                                     0, 0, 1, 0,\n                                     0, 0, 0, 1]);\n    }\n};\n\nvar booleanArray = function(size)\n{\n    var array = new Array(size);\n\n    for (var i = 0; i < array.length; i++) \n    {\n        array[i] = false;\n    }\n\n    return array;\n};\n\nmodule.exports = defaultValue;\n","\nvar mapType = require('./mapType');\nvar mapSize = require('./mapSize');\n\n/**\n * Extracts the attributes\n * @class\n * @memberof PIXI.glCore.shader\n * @param gl {WebGLRenderingContext} The current WebGL rendering context\n * @param program {WebGLProgram} The shader program to get the attributes from\n * @return attributes {Object}\n */\nvar extractAttributes = function(gl, program)\n{\n    var attributes = {};\n\n    var totalAttributes = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES);\n\n    for (var i = 0; i < totalAttributes; i++)\n    {\n        var attribData = gl.getActiveAttrib(program, i);\n        var type = mapType(gl, attribData.type);\n\n        attributes[attribData.name] = {\n            type:type,\n            size:mapSize(type),\n            location:gl.getAttribLocation(program, attribData.name),\n            //TODO - make an attribute object\n            pointer: pointer\n        };\n    }\n\n    return attributes;\n};\n\nvar pointer = function(type, normalized, stride, start){\n    // console.log(this.location)\n    gl.vertexAttribPointer(this.location,this.size, type || gl.FLOAT, normalized || false, stride || 0, start || 0);\n};\n\nmodule.exports = extractAttributes;\n","var mapType = require('./mapType');\nvar defaultValue = require('./defaultValue');\n\n/**\n * Extracts the uniforms\n * @class\n * @memberof PIXI.glCore.shader\n * @param gl {WebGLRenderingContext} The current WebGL rendering context\n * @param program {WebGLProgram} The shader program to get the uniforms from\n * @return uniforms {Object}\n */\nvar extractUniforms = function(gl, program)\n{\n\tvar uniforms = {};\n\n    var totalUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);\n\n    for (var i = 0; i < totalUniforms; i++)\n    {\n    \tvar uniformData = gl.getActiveUniform(program, i);\n    \tvar name = uniformData.name.replace(/\\[.*?\\]/, \"\");\n        var type = mapType(gl, uniformData.type );\n\n    \tuniforms[name] = {\n    \t\ttype:type,\n    \t\tsize:uniformData.size,\n    \t\tlocation:gl.getUniformLocation(program, name),\n    \t\tvalue:defaultValue(type, uniformData.size)\n    \t};\n    }\n\n\treturn uniforms;\n};\n\nmodule.exports = extractUniforms;\n","/**\n * Extracts the attributes\n * @class\n * @memberof PIXI.glCore.shader\n * @param gl {WebGLRenderingContext} The current WebGL rendering context\n * @param uniforms {Array} @mat ?\n * @return attributes {Object}\n */\nvar generateUniformAccessObject = function(gl, uniformData)\n{\n    // this is the object we will be sending back.\n    // an object hierachy will be created for structs\n    var uniforms = {data:{}};\n\n    uniforms.gl = gl;\n\n    var uniformKeys= Object.keys(uniformData);\n\n    for (var i = 0; i < uniformKeys.length; i++)\n    {\n        var fullName = uniformKeys[i];\n\n        var nameTokens = fullName.split('.');\n        var name = nameTokens[nameTokens.length - 1];\n\n\n        var uniformGroup = getUniformGroup(nameTokens, uniforms);\n\n        var uniform =  uniformData[fullName];\n        uniformGroup.data[name] = uniform;\n\n        uniformGroup.gl = gl;\n\n        Object.defineProperty(uniformGroup, name, {\n            get: generateGetter(name),\n            set: generateSetter(name, uniform)\n        });\n    }\n\n    return uniforms;\n};\n\nvar generateGetter = function(name)\n{\n\tvar template = getterTemplate.replace('%%', name);\n\treturn new Function(template); // jshint ignore:line\n};\n\nvar generateSetter = function(name, uniform)\n{\n    var template = setterTemplate.replace(/%%/g, name);\n    var setTemplate;\n\n    if(uniform.size === 1)\n    {\n        setTemplate = GLSL_TO_SINGLE_SETTERS[uniform.type];\n    }\n    else\n    {\n        setTemplate = GLSL_TO_ARRAY_SETTERS[uniform.type];\n    }\n\n    if(setTemplate)\n    {\n        template += \"\\nthis.gl.\" + setTemplate + \";\";\n    }\n\n  \treturn new Function('value', template); // jshint ignore:line\n};\n\nvar getUniformGroup = function(nameTokens, uniform)\n{\n    var cur = uniform;\n\n    for (var i = 0; i < nameTokens.length - 1; i++)\n    {\n        var o = cur[nameTokens[i]] || {data:{}};\n        cur[nameTokens[i]] = o;\n        cur = o;\n    }\n\n    return cur;\n};\n\nvar getterTemplate = [\n    'return this.data.%%.value;',\n].join('\\n');\n\nvar setterTemplate = [\n    'this.data.%%.value = value;',\n    'var location = this.data.%%.location;'\n].join('\\n');\n\n\nvar GLSL_TO_SINGLE_SETTERS = {\n\n    'float':    'uniform1f(location, value)',\n\n    'vec2':     'uniform2f(location, value[0], value[1])',\n    'vec3':     'uniform3f(location, value[0], value[1], value[2])',\n    'vec4':     'uniform4f(location, value[0], value[1], value[2], value[3])',\n\n    'int':      'uniform1i(location, value)',\n    'ivec2':    'uniform2i(location, value[0], value[1])',\n    'ivec3':    'uniform3i(location, value[0], value[1], value[2])',\n    'ivec4':    'uniform4i(location, value[0], value[1], value[2], value[3])',\n\n    'bool':     'uniform1i(location, value)',\n    'bvec2':    'uniform2i(location, value[0], value[1])',\n    'bvec3':    'uniform3i(location, value[0], value[1], value[2])',\n    'bvec4':    'uniform4i(location, value[0], value[1], value[2], value[3])',\n\n    'mat2':     'uniformMatrix2fv(location, false, value)',\n    'mat3':     'uniformMatrix3fv(location, false, value)',\n    'mat4':     'uniformMatrix4fv(location, false, value)',\n\n    'sampler2D':'uniform1i(location, value)'\n};\n\nvar GLSL_TO_ARRAY_SETTERS = {\n\n    'float':    'uniform1fv(location, value)',\n\n    'vec2':     'uniform2fv(location, value)',\n    'vec3':     'uniform3fv(location, value)',\n    'vec4':     'uniform4fv(location, value)',\n\n    'int':      'uniform1iv(location, value)',\n    'ivec2':    'uniform2iv(location, value)',\n    'ivec3':    'uniform3iv(location, value)',\n    'ivec4':    'uniform4iv(location, value)',\n\n    'bool':     'uniform1iv(location, value)',\n    'bvec2':    'uniform2iv(location, value)',\n    'bvec3':    'uniform3iv(location, value)',\n    'bvec4':    'uniform4iv(location, value)',\n\n    'sampler2D':'uniform1iv(location, value)'\n};\n\nmodule.exports = generateUniformAccessObject;\n","module.exports = {\n    compileProgram: require('./compileProgram'),\n    defaultValue: require('./defaultValue'),\n    extractAttributes: require('./extractAttributes'),\n    extractUniforms: require('./extractUniforms'),\n    generateUniformAccessObject: require('./generateUniformAccessObject'),\n    setPrecision: require('./setPrecision'),\n    mapSize: require('./mapSize'),\n    mapType: require('./mapType')\n};","/**\n * @class\n * @memberof PIXI.glCore.shader\n * @param type {String}\n * @return {Number}\n */\nvar mapSize = function(type) \n{ \n    return GLSL_TO_SIZE[type];\n};\n\n\nvar GLSL_TO_SIZE = {\n    'float':    1,\n    'vec2':     2,\n    'vec3':     3,\n    'vec4':     4,\n\n    'int':      1,\n    'ivec2':    2,\n    'ivec3':    3,\n    'ivec4':    4,\n\n    'bool':     1,\n    'bvec2':    2,\n    'bvec3':    3,\n    'bvec4':    4,\n\n    'mat2':     4,\n    'mat3':     9,\n    'mat4':     16,\n\n    'sampler2D':  1\n};\n\nmodule.exports = mapSize;\n","\n\nvar mapSize = function(gl, type) \n{\n    if(!GL_TABLE) \n    {\n        var typeNames = Object.keys(GL_TO_GLSL_TYPES);\n\n        GL_TABLE = {};\n\n        for(var i = 0; i < typeNames.length; ++i) \n        {\n            var tn = typeNames[i];\n            GL_TABLE[ gl[tn] ] = GL_TO_GLSL_TYPES[tn];\n        }\n    }\n\n  return GL_TABLE[type];\n};\n\nvar GL_TABLE = null;\n\nvar GL_TO_GLSL_TYPES = {\n  'FLOAT':       'float',\n  'FLOAT_VEC2':  'vec2',\n  'FLOAT_VEC3':  'vec3',\n  'FLOAT_VEC4':  'vec4',\n\n  'INT':         'int',\n  'INT_VEC2':    'ivec2',\n  'INT_VEC3':    'ivec3',\n  'INT_VEC4':    'ivec4',\n  \n  'BOOL':        'bool',\n  'BOOL_VEC2':   'bvec2',\n  'BOOL_VEC3':   'bvec3',\n  'BOOL_VEC4':   'bvec4',\n  \n  'FLOAT_MAT2':  'mat2',\n  'FLOAT_MAT3':  'mat3',\n  'FLOAT_MAT4':  'mat4',\n  \n  'SAMPLER_2D':  'sampler2D'  \n};\n\nmodule.exports = mapSize;\n","/**\n * Sets the float precision on the shader. If the precision is already present this function will do nothing\n * @param {string} src       the shader source\n * @param {string} precision The float precision of the shader. Options are 'lowp', 'mediump' or 'highp'.\n *\n * @return {string} modified shader source\n */\nvar setPrecision = function(src, precision)\n{\n    if(src.substring(0, 9) !== 'precision')\n    {\n        return 'precision ' + precision + ' float;\\n' + src;\n    }\n\n    return src;\n};\n\nmodule.exports = setPrecision;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/*! https://mths.be/punycode v1.4.1 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t    counter = 0,\n\t\t    length = string.length,\n\t\t    value,\n\t\t    extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t//  0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t    inputLength = input.length,\n\t\t    out,\n\t\t    i = 0,\n\t\t    n = initialN,\n\t\t    bias = initialBias,\n\t\t    basic,\n\t\t    j,\n\t\t    index,\n\t\t    oldi,\n\t\t    w,\n\t\t    k,\n\t\t    digit,\n\t\t    t,\n\t\t    /** Cached calculation results */\n\t\t    baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t    delta,\n\t\t    handledCPCount,\n\t\t    basicLength,\n\t\t    bias,\n\t\t    j,\n\t\t    m,\n\t\t    q,\n\t\t    k,\n\t\t    t,\n\t\t    currentValue,\n\t\t    output = [],\n\t\t    /** `inputLength` will hold the number of code points in `input`. */\n\t\t    inputLength,\n\t\t    /** Cached calculation results */\n\t\t    handledCPCountPlusOne,\n\t\t    baseMinusT,\n\t\t    qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.4.1',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n  sep = sep || '&';\n  eq = eq || '=';\n  var obj = {};\n\n  if (typeof qs !== 'string' || qs.length === 0) {\n    return obj;\n  }\n\n  var regexp = /\\+/g;\n  qs = qs.split(sep);\n\n  var maxKeys = 1000;\n  if (options && typeof options.maxKeys === 'number') {\n    maxKeys = options.maxKeys;\n  }\n\n  var len = qs.length;\n  // maxKeys <= 0 means that we should not limit keys count\n  if (maxKeys > 0 && len > maxKeys) {\n    len = maxKeys;\n  }\n\n  for (var i = 0; i < len; ++i) {\n    var x = qs[i].replace(regexp, '%20'),\n        idx = x.indexOf(eq),\n        kstr, vstr, k, v;\n\n    if (idx >= 0) {\n      kstr = x.substr(0, idx);\n      vstr = x.substr(idx + 1);\n    } else {\n      kstr = x;\n      vstr = '';\n    }\n\n    k = decodeURIComponent(kstr);\n    v = decodeURIComponent(vstr);\n\n    if (!hasOwnProperty(obj, k)) {\n      obj[k] = v;\n    } else if (isArray(obj[k])) {\n      obj[k].push(v);\n    } else {\n      obj[k] = [obj[k], v];\n    }\n  }\n\n  return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n  return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n  switch (typeof v) {\n    case 'string':\n      return v;\n\n    case 'boolean':\n      return v ? 'true' : 'false';\n\n    case 'number':\n      return isFinite(v) ? v : '';\n\n    default:\n      return '';\n  }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n  sep = sep || '&';\n  eq = eq || '=';\n  if (obj === null) {\n    obj = undefined;\n  }\n\n  if (typeof obj === 'object') {\n    return map(objectKeys(obj), function(k) {\n      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n      if (isArray(obj[k])) {\n        return map(obj[k], function(v) {\n          return ks + encodeURIComponent(stringifyPrimitive(v));\n        }).join(sep);\n      } else {\n        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n      }\n    }).join(sep);\n\n  }\n\n  if (!name) return '';\n  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n         encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n  return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n  if (xs.map) return xs.map(f);\n  var res = [];\n  for (var i = 0; i < xs.length; i++) {\n    res.push(f(xs[i], i));\n  }\n  return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n  var res = [];\n  for (var key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n  }\n  return res;\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","'use strict'\n\n/**\n * Remove a range of items from an array\n *\n * @function removeItems\n * @param {Array<*>} arr The target array\n * @param {number} startIdx The index to begin removing from (inclusive)\n * @param {number} removeCount How many items to remove\n */\nmodule.exports = function removeItems(arr, startIdx, removeCount)\n{\n  var i, length = arr.length\n\n  if (startIdx >= length || removeCount === 0) {\n    return\n  }\n\n  removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount)\n\n  var len = length - removeCount\n\n  for (i = startIdx; i < len; ++i) {\n    arr[i] = arr[i + removeCount]\n  }\n\n  arr.length = len\n}\n","'use strict';\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _miniSignals = require('mini-signals');\n\nvar _miniSignals2 = _interopRequireDefault(_miniSignals);\n\nvar _parseUri = require('parse-uri');\n\nvar _parseUri2 = _interopRequireDefault(_parseUri);\n\nvar _async = require('./async');\n\nvar async = _interopRequireWildcard(_async);\n\nvar _Resource = require('./Resource');\n\nvar _Resource2 = _interopRequireDefault(_Resource);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// some constants\nvar MAX_PROGRESS = 100;\nvar rgxExtractUrlHash = /(#[\\w-]+)?$/;\n\n/**\n * Manages the state and loading of multiple resources to load.\n *\n * @class\n */\n\nvar Loader = function () {\n    /**\n     * @param {string} [baseUrl=''] - The base url for all resources loaded by this loader.\n     * @param {number} [concurrency=10] - The number of resources to load concurrently.\n     */\n    function Loader() {\n        var _this = this;\n\n        var baseUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n        var concurrency = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;\n\n        _classCallCheck(this, Loader);\n\n        /**\n         * The base url for all resources loaded by this loader.\n         *\n         * @member {string}\n         */\n        this.baseUrl = baseUrl;\n\n        /**\n         * The progress percent of the loader going through the queue.\n         *\n         * @member {number}\n         */\n        this.progress = 0;\n\n        /**\n         * Loading state of the loader, true if it is currently loading resources.\n         *\n         * @member {boolean}\n         */\n        this.loading = false;\n\n        /**\n         * A querystring to append to every URL added to the loader.\n         *\n         * This should be a valid query string *without* the question-mark (`?`). The loader will\n         * also *not* escape values for you. Make sure to escape your parameters with\n         * [`encodeURIComponent`](https://mdn.io/encodeURIComponent) before assigning this property.\n         *\n         * @example\n         * const loader = new Loader();\n         *\n         * loader.defaultQueryString = 'user=me&password=secret';\n         *\n         * // This will request 'image.png?user=me&password=secret'\n         * loader.add('image.png').load();\n         *\n         * loader.reset();\n         *\n         * // This will request 'image.png?v=1&user=me&password=secret'\n         * loader.add('iamge.png?v=1').load();\n         */\n        this.defaultQueryString = '';\n\n        /**\n         * The middleware to run before loading each resource.\n         *\n         * @member {function[]}\n         */\n        this._beforeMiddleware = [];\n\n        /**\n         * The middleware to run after loading each resource.\n         *\n         * @member {function[]}\n         */\n        this._afterMiddleware = [];\n\n        /**\n         * The tracks the resources we are currently completing parsing for.\n         *\n         * @member {Resource[]}\n         */\n        this._resourcesParsing = [];\n\n        /**\n         * The `_loadResource` function bound with this object context.\n         *\n         * @private\n         * @member {function}\n         * @param {Resource} r - The resource to load\n         * @param {Function} d - The dequeue function\n         * @return {undefined}\n         */\n        this._boundLoadResource = function (r, d) {\n            return _this._loadResource(r, d);\n        };\n\n        /**\n         * The resources waiting to be loaded.\n         *\n         * @private\n         * @member {Resource[]}\n         */\n        this._queue = async.queue(this._boundLoadResource, concurrency);\n\n        this._queue.pause();\n\n        /**\n         * All the resources for this loader keyed by name.\n         *\n         * @member {object<string, Resource>}\n         */\n        this.resources = {};\n\n        /**\n         * Dispatched once per loaded or errored resource.\n         *\n         * The callback looks like {@link Loader.OnProgressSignal}.\n         *\n         * @member {Signal}\n         */\n        this.onProgress = new _miniSignals2.default();\n\n        /**\n         * Dispatched once per errored resource.\n         *\n         * The callback looks like {@link Loader.OnErrorSignal}.\n         *\n         * @member {Signal}\n         */\n        this.onError = new _miniSignals2.default();\n\n        /**\n         * Dispatched once per loaded resource.\n         *\n         * The callback looks like {@link Loader.OnLoadSignal}.\n         *\n         * @member {Signal}\n         */\n        this.onLoad = new _miniSignals2.default();\n\n        /**\n         * Dispatched when the loader begins to process the queue.\n         *\n         * The callback looks like {@link Loader.OnStartSignal}.\n         *\n         * @member {Signal}\n         */\n        this.onStart = new _miniSignals2.default();\n\n        /**\n         * Dispatched when the queued resources all load.\n         *\n         * The callback looks like {@link Loader.OnCompleteSignal}.\n         *\n         * @member {Signal}\n         */\n        this.onComplete = new _miniSignals2.default();\n\n        /**\n         * When the progress changes the loader and resource are disaptched.\n         *\n         * @memberof Loader\n         * @callback OnProgressSignal\n         * @param {Loader} loader - The loader the progress is advancing on.\n         * @param {Resource} resource - The resource that has completed or failed to cause the progress to advance.\n         */\n\n        /**\n         * When an error occurrs the loader and resource are disaptched.\n         *\n         * @memberof Loader\n         * @callback OnErrorSignal\n         * @param {Loader} loader - The loader the error happened in.\n         * @param {Resource} resource - The resource that caused the error.\n         */\n\n        /**\n         * When a load completes the loader and resource are disaptched.\n         *\n         * @memberof Loader\n         * @callback OnLoadSignal\n         * @param {Loader} loader - The loader that laoded the resource.\n         * @param {Resource} resource - The resource that has completed loading.\n         */\n\n        /**\n         * When the loader starts loading resources it dispatches this callback.\n         *\n         * @memberof Loader\n         * @callback OnStartSignal\n         * @param {Loader} loader - The loader that has started loading resources.\n         */\n\n        /**\n         * When the loader completes loading resources it dispatches this callback.\n         *\n         * @memberof Loader\n         * @callback OnCompleteSignal\n         * @param {Loader} loader - The loader that has finished loading resources.\n         */\n    }\n\n    /**\n     * Adds a resource (or multiple resources) to the loader queue.\n     *\n     * This function can take a wide variety of different parameters. The only thing that is always\n     * required the url to load. All the following will work:\n     *\n     * ```js\n     * loader\n     *     // normal param syntax\n     *     .add('key', 'http://...', function () {})\n     *     .add('http://...', function () {})\n     *     .add('http://...')\n     *\n     *     // object syntax\n     *     .add({\n     *         name: 'key2',\n     *         url: 'http://...'\n     *     }, function () {})\n     *     .add({\n     *         url: 'http://...'\n     *     }, function () {})\n     *     .add({\n     *         name: 'key3',\n     *         url: 'http://...'\n     *         onComplete: function () {}\n     *     })\n     *     .add({\n     *         url: 'https://...',\n     *         onComplete: function () {},\n     *         crossOrigin: true\n     *     })\n     *\n     *     // you can also pass an array of objects or urls or both\n     *     .add([\n     *         { name: 'key4', url: 'http://...', onComplete: function () {} },\n     *         { url: 'http://...', onComplete: function () {} },\n     *         'http://...'\n     *     ])\n     *\n     *     // and you can use both params and options\n     *     .add('key', 'http://...', { crossOrigin: true }, function () {})\n     *     .add('http://...', { crossOrigin: true }, function () {});\n     * ```\n     *\n     * @param {string} [name] - The name of the resource to load, if not passed the url is used.\n     * @param {string} [url] - The url for this resource, relative to the baseUrl of this loader.\n     * @param {object} [options] - The options for the load.\n     * @param {boolean} [options.crossOrigin] - Is this request cross-origin? Default is to determine automatically.\n     * @param {Resource.LOAD_TYPE} [options.loadType=Resource.LOAD_TYPE.XHR] - How should this resource be loaded?\n     * @param {Resource.XHR_RESPONSE_TYPE} [options.xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How should\n     *      the data being loaded be interpreted when using XHR?\n     * @param {object} [options.metadata] - Extra configuration for middleware and the Resource object.\n     * @param {HTMLImageElement|HTMLAudioElement|HTMLVideoElement} [options.metadata.loadElement=null] - The\n     *      element to use for loading, instead of creating one.\n     * @param {boolean} [options.metadata.skipSource=false] - Skips adding source(s) to the load element. This\n     *      is useful if you want to pass in a `loadElement` that you already added load sources to.\n     * @param {function} [cb] - Function to call when this specific resource completes loading.\n     * @return {Loader} Returns itself.\n     */\n\n\n    Loader.prototype.add = function add(name, url, options, cb) {\n        // special case of an array of objects or urls\n        if (Array.isArray(name)) {\n            for (var i = 0; i < name.length; ++i) {\n                this.add(name[i]);\n            }\n\n            return this;\n        }\n\n        // if an object is passed instead of params\n        if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n            cb = url || name.callback || name.onComplete;\n            options = name;\n            url = name.url;\n            name = name.name || name.key || name.url;\n        }\n\n        // case where no name is passed shift all args over by one.\n        if (typeof url !== 'string') {\n            cb = options;\n            options = url;\n            url = name;\n        }\n\n        // now that we shifted make sure we have a proper url.\n        if (typeof url !== 'string') {\n            throw new Error('No url passed to add resource to loader.');\n        }\n\n        // options are optional so people might pass a function and no options\n        if (typeof options === 'function') {\n            cb = options;\n            options = null;\n        }\n\n        // if loading already you can only add resources that have a parent.\n        if (this.loading && (!options || !options.parentResource)) {\n            throw new Error('Cannot add resources while the loader is running.');\n        }\n\n        // check if resource already exists.\n        if (this.resources[name]) {\n            throw new Error('Resource named \"' + name + '\" already exists.');\n        }\n\n        // add base url if this isn't an absolute url\n        url = this._prepareUrl(url);\n\n        // create the store the resource\n        this.resources[name] = new _Resource2.default(name, url, options);\n\n        if (typeof cb === 'function') {\n            this.resources[name].onAfterMiddleware.once(cb);\n        }\n\n        // if actively loading, make sure to adjust progress chunks for that parent and its children\n        if (this.loading) {\n            var parent = options.parentResource;\n            var incompleteChildren = [];\n\n            for (var _i = 0; _i < parent.children.length; ++_i) {\n                if (!parent.children[_i].isComplete) {\n                    incompleteChildren.push(parent.children[_i]);\n                }\n            }\n\n            var fullChunk = parent.progressChunk * (incompleteChildren.length + 1); // +1 for parent\n            var eachChunk = fullChunk / (incompleteChildren.length + 2); // +2 for parent & new child\n\n            parent.children.push(this.resources[name]);\n            parent.progressChunk = eachChunk;\n\n            for (var _i2 = 0; _i2 < incompleteChildren.length; ++_i2) {\n                incompleteChildren[_i2].progressChunk = eachChunk;\n            }\n\n            this.resources[name].progressChunk = eachChunk;\n        }\n\n        // add the resource to the queue\n        this._queue.push(this.resources[name]);\n\n        return this;\n    };\n\n    /**\n     * Sets up a middleware function that will run *before* the\n     * resource is loaded.\n     *\n     * @method before\n     * @param {function} fn - The middleware function to register.\n     * @return {Loader} Returns itself.\n     */\n\n\n    Loader.prototype.pre = function pre(fn) {\n        this._beforeMiddleware.push(fn);\n\n        return this;\n    };\n\n    /**\n     * Sets up a middleware function that will run *after* the\n     * resource is loaded.\n     *\n     * @alias use\n     * @method after\n     * @param {function} fn - The middleware function to register.\n     * @return {Loader} Returns itself.\n     */\n\n\n    Loader.prototype.use = function use(fn) {\n        this._afterMiddleware.push(fn);\n\n        return this;\n    };\n\n    /**\n     * Resets the queue of the loader to prepare for a new load.\n     *\n     * @return {Loader} Returns itself.\n     */\n\n\n    Loader.prototype.reset = function reset() {\n        this.progress = 0;\n        this.loading = false;\n\n        this._queue.kill();\n        this._queue.pause();\n\n        // abort all resource loads\n        for (var k in this.resources) {\n            var res = this.resources[k];\n\n            if (res._onLoadBinding) {\n                res._onLoadBinding.detach();\n            }\n\n            if (res.isLoading) {\n                res.abort();\n            }\n        }\n\n        this.resources = {};\n\n        return this;\n    };\n\n    /**\n     * Starts loading the queued resources.\n     *\n     * @param {function} [cb] - Optional callback that will be bound to the `complete` event.\n     * @return {Loader} Returns itself.\n     */\n\n\n    Loader.prototype.load = function load(cb) {\n        // register complete callback if they pass one\n        if (typeof cb === 'function') {\n            this.onComplete.once(cb);\n        }\n\n        // if the queue has already started we are done here\n        if (this.loading) {\n            return this;\n        }\n\n        // distribute progress chunks\n        var chunk = 100 / this._queue._tasks.length;\n\n        for (var i = 0; i < this._queue._tasks.length; ++i) {\n            this._queue._tasks[i].data.progressChunk = chunk;\n        }\n\n        // update loading state\n        this.loading = true;\n\n        // notify of start\n        this.onStart.dispatch(this);\n\n        // start loading\n        this._queue.resume();\n\n        return this;\n    };\n\n    /**\n     * Prepares a url for usage based on the configuration of this object\n     *\n     * @private\n     * @param {string} url - The url to prepare.\n     * @return {string} The prepared url.\n     */\n\n\n    Loader.prototype._prepareUrl = function _prepareUrl(url) {\n        var parsedUrl = (0, _parseUri2.default)(url, { strictMode: true });\n        var result = void 0;\n\n        // absolute url, just use it as is.\n        if (parsedUrl.protocol || !parsedUrl.path || url.indexOf('//') === 0) {\n            result = url;\n        }\n        // if baseUrl doesn't end in slash and url doesn't start with slash, then add a slash inbetween\n        else if (this.baseUrl.length && this.baseUrl.lastIndexOf('/') !== this.baseUrl.length - 1 && url.charAt(0) !== '/') {\n                result = this.baseUrl + '/' + url;\n            } else {\n                result = this.baseUrl + url;\n            }\n\n        // if we need to add a default querystring, there is a bit more work\n        if (this.defaultQueryString) {\n            var hash = rgxExtractUrlHash.exec(result)[0];\n\n            result = result.substr(0, result.length - hash.length);\n\n            if (result.indexOf('?') !== -1) {\n                result += '&' + this.defaultQueryString;\n            } else {\n                result += '?' + this.defaultQueryString;\n            }\n\n            result += hash;\n        }\n\n        return result;\n    };\n\n    /**\n     * Loads a single resource.\n     *\n     * @private\n     * @param {Resource} resource - The resource to load.\n     * @param {function} dequeue - The function to call when we need to dequeue this item.\n     */\n\n\n    Loader.prototype._loadResource = function _loadResource(resource, dequeue) {\n        var _this2 = this;\n\n        resource._dequeue = dequeue;\n\n        // run before middleware\n        async.eachSeries(this._beforeMiddleware, function (fn, next) {\n            fn.call(_this2, resource, function () {\n                // if the before middleware marks the resource as complete,\n                // break and don't process any more before middleware\n                next(resource.isComplete ? {} : null);\n            });\n        }, function () {\n            if (resource.isComplete) {\n                _this2._onLoad(resource);\n            } else {\n                resource._onLoadBinding = resource.onComplete.once(_this2._onLoad, _this2);\n                resource.load();\n            }\n        }, true);\n    };\n\n    /**\n     * Called once each resource has loaded.\n     *\n     * @private\n     */\n\n\n    Loader.prototype._onComplete = function _onComplete() {\n        this.loading = false;\n\n        this.onComplete.dispatch(this, this.resources);\n    };\n\n    /**\n     * Called each time a resources is loaded.\n     *\n     * @private\n     * @param {Resource} resource - The resource that was loaded\n     */\n\n\n    Loader.prototype._onLoad = function _onLoad(resource) {\n        var _this3 = this;\n\n        resource._onLoadBinding = null;\n\n        // remove this resource from the async queue, and add it to our list of resources that are being parsed\n        this._resourcesParsing.push(resource);\n        resource._dequeue();\n\n        // run all the after middleware for this resource\n        async.eachSeries(this._afterMiddleware, function (fn, next) {\n            fn.call(_this3, resource, next);\n        }, function () {\n            resource.onAfterMiddleware.dispatch(resource);\n\n            _this3.progress += resource.progressChunk;\n            _this3.onProgress.dispatch(_this3, resource);\n\n            if (resource.error) {\n                _this3.onError.dispatch(resource.error, _this3, resource);\n            } else {\n                _this3.onLoad.dispatch(_this3, resource);\n            }\n\n            _this3._resourcesParsing.splice(_this3._resourcesParsing.indexOf(resource), 1);\n\n            // do completion check\n            if (_this3._queue.idle() && _this3._resourcesParsing.length === 0) {\n                _this3.progress = MAX_PROGRESS;\n                _this3._onComplete();\n            }\n        }, true);\n    };\n\n    return Loader;\n}();\n\nexports.default = Loader;\n//# sourceMappingURL=Loader.js.map","'use strict';\n\nexports.__esModule = true;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _parseUri = require('parse-uri');\n\nvar _parseUri2 = _interopRequireDefault(_parseUri);\n\nvar _miniSignals = require('mini-signals');\n\nvar _miniSignals2 = _interopRequireDefault(_miniSignals);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// tests is CORS is supported in XHR, if not we need to use XDR\nvar useXdr = !!(window.XDomainRequest && !('withCredentials' in new XMLHttpRequest()));\nvar tempAnchor = null;\n\n// some status constants\nvar STATUS_NONE = 0;\nvar STATUS_OK = 200;\nvar STATUS_EMPTY = 204;\nvar STATUS_IE_BUG_EMPTY = 1223;\nvar STATUS_TYPE_OK = 2;\n\n// noop\nfunction _noop() {} /* empty */\n\n/**\n * Manages the state and loading of a resource and all child resources.\n *\n * @class\n */\n\nvar Resource = function () {\n    /**\n     * Sets the load type to be used for a specific extension.\n     *\n     * @static\n     * @param {string} extname - The extension to set the type for, e.g. \"png\" or \"fnt\"\n     * @param {Resource.LOAD_TYPE} loadType - The load type to set it to.\n     */\n    Resource.setExtensionLoadType = function setExtensionLoadType(extname, loadType) {\n        setExtMap(Resource._loadTypeMap, extname, loadType);\n    };\n\n    /**\n     * Sets the load type to be used for a specific extension.\n     *\n     * @static\n     * @param {string} extname - The extension to set the type for, e.g. \"png\" or \"fnt\"\n     * @param {Resource.XHR_RESPONSE_TYPE} xhrType - The xhr type to set it to.\n     */\n\n\n    Resource.setExtensionXhrType = function setExtensionXhrType(extname, xhrType) {\n        setExtMap(Resource._xhrTypeMap, extname, xhrType);\n    };\n\n    /**\n     * @param {string} name - The name of the resource to load.\n     * @param {string|string[]} url - The url for this resource, for audio/video loads you can pass\n     *      an array of sources.\n     * @param {object} [options] - The options for the load.\n     * @param {string|boolean} [options.crossOrigin] - Is this request cross-origin? Default is to\n     *      determine automatically.\n     * @param {Resource.LOAD_TYPE} [options.loadType=Resource.LOAD_TYPE.XHR] - How should this resource\n     *      be loaded?\n     * @param {Resource.XHR_RESPONSE_TYPE} [options.xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How\n     *      should the data being loaded be interpreted when using XHR?\n     * @param {object} [options.metadata] - Extra configuration for middleware and the Resource object.\n     * @param {HTMLImageElement|HTMLAudioElement|HTMLVideoElement} [options.metadata.loadElement=null] - The\n     *      element to use for loading, instead of creating one.\n     * @param {boolean} [options.metadata.skipSource=false] - Skips adding source(s) to the load element. This\n     *      is useful if you want to pass in a `loadElement` that you already added load sources to.\n     * @param {string|string[]} [options.metadata.mimeType] - The mime type to use for the source element of a video/audio\n     *      elment. If the urls are an array, you can pass this as an array as well where each index is the mime type to\n     *      use for the corresponding url index.\n     */\n\n\n    function Resource(name, url, options) {\n        _classCallCheck(this, Resource);\n\n        if (typeof name !== 'string' || typeof url !== 'string') {\n            throw new Error('Both name and url are required for constructing a resource.');\n        }\n\n        options = options || {};\n\n        /**\n         * The state flags of this resource.\n         *\n         * @member {number}\n         */\n        this._flags = 0;\n\n        // set data url flag, needs to be set early for some _determineX checks to work.\n        this._setFlag(Resource.STATUS_FLAGS.DATA_URL, url.indexOf('data:') === 0);\n\n        /**\n         * The name of this resource.\n         *\n         * @member {string}\n         * @readonly\n         */\n        this.name = name;\n\n        /**\n         * The url used to load this resource.\n         *\n         * @member {string}\n         * @readonly\n         */\n        this.url = url;\n\n        /**\n         * The extension used to load this resource.\n         *\n         * @member {string}\n         * @readonly\n         */\n        this.extension = this._getExtension();\n\n        /**\n         * The data that was loaded by the resource.\n         *\n         * @member {any}\n         */\n        this.data = null;\n\n        /**\n         * Is this request cross-origin? If unset, determined automatically.\n         *\n         * @member {string}\n         */\n        this.crossOrigin = options.crossOrigin === true ? 'anonymous' : options.crossOrigin;\n\n        /**\n         * The method of loading to use for this resource.\n         *\n         * @member {Resource.LOAD_TYPE}\n         */\n        this.loadType = options.loadType || this._determineLoadType();\n\n        /**\n         * The type used to load the resource via XHR. If unset, determined automatically.\n         *\n         * @member {string}\n         */\n        this.xhrType = options.xhrType;\n\n        /**\n         * Extra info for middleware, and controlling specifics about how the resource loads.\n         *\n         * Note that if you pass in a `loadElement`, the Resource class takes ownership of it.\n         * Meaning it will modify it as it sees fit.\n         *\n         * @member {object}\n         * @property {HTMLImageElement|HTMLAudioElement|HTMLVideoElement} [loadElement=null] - The\n         *  element to use for loading, instead of creating one.\n         * @property {boolean} [skipSource=false] - Skips adding source(s) to the load element. This\n         *  is useful if you want to pass in a `loadElement` that you already added load sources\n         *  to.\n         */\n        this.metadata = options.metadata || {};\n\n        /**\n         * The error that occurred while loading (if any).\n         *\n         * @member {Error}\n         * @readonly\n         */\n        this.error = null;\n\n        /**\n         * The XHR object that was used to load this resource. This is only set\n         * when `loadType` is `Resource.LOAD_TYPE.XHR`.\n         *\n         * @member {XMLHttpRequest}\n         * @readonly\n         */\n        this.xhr = null;\n\n        /**\n         * The child resources this resource owns.\n         *\n         * @member {Resource[]}\n         * @readonly\n         */\n        this.children = [];\n\n        /**\n         * The resource type.\n         *\n         * @member {Resource.TYPE}\n         * @readonly\n         */\n        this.type = Resource.TYPE.UNKNOWN;\n\n        /**\n         * The progress chunk owned by this resource.\n         *\n         * @member {number}\n         * @readonly\n         */\n        this.progressChunk = 0;\n\n        /**\n         * The `dequeue` method that will be used a storage place for the async queue dequeue method\n         * used privately by the loader.\n         *\n         * @private\n         * @member {function}\n         */\n        this._dequeue = _noop;\n\n        /**\n         * Used a storage place for the on load binding used privately by the loader.\n         *\n         * @private\n         * @member {function}\n         */\n        this._onLoadBinding = null;\n\n        /**\n         * The `complete` function bound to this resource's context.\n         *\n         * @private\n         * @member {function}\n         */\n        this._boundComplete = this.complete.bind(this);\n\n        /**\n         * The `_onError` function bound to this resource's context.\n         *\n         * @private\n         * @member {function}\n         */\n        this._boundOnError = this._onError.bind(this);\n\n        /**\n         * The `_onProgress` function bound to this resource's context.\n         *\n         * @private\n         * @member {function}\n         */\n        this._boundOnProgress = this._onProgress.bind(this);\n\n        // xhr callbacks\n        this._boundXhrOnError = this._xhrOnError.bind(this);\n        this._boundXhrOnAbort = this._xhrOnAbort.bind(this);\n        this._boundXhrOnLoad = this._xhrOnLoad.bind(this);\n        this._boundXdrOnTimeout = this._xdrOnTimeout.bind(this);\n\n        /**\n         * Dispatched when the resource beings to load.\n         *\n         * The callback looks like {@link Resource.OnStartSignal}.\n         *\n         * @member {Signal}\n         */\n        this.onStart = new _miniSignals2.default();\n\n        /**\n         * Dispatched each time progress of this resource load updates.\n         * Not all resources types and loader systems can support this event\n         * so sometimes it may not be available. If the resource\n         * is being loaded on a modern browser, using XHR, and the remote server\n         * properly sets Content-Length headers, then this will be available.\n         *\n         * The callback looks like {@link Resource.OnProgressSignal}.\n         *\n         * @member {Signal}\n         */\n        this.onProgress = new _miniSignals2.default();\n\n        /**\n         * Dispatched once this resource has loaded, if there was an error it will\n         * be in the `error` property.\n         *\n         * The callback looks like {@link Resource.OnCompleteSignal}.\n         *\n         * @member {Signal}\n         */\n        this.onComplete = new _miniSignals2.default();\n\n        /**\n         * Dispatched after this resource has had all the *after* middleware run on it.\n         *\n         * The callback looks like {@link Resource.OnCompleteSignal}.\n         *\n         * @member {Signal}\n         */\n        this.onAfterMiddleware = new _miniSignals2.default();\n\n        /**\n         * When the resource starts to load.\n         *\n         * @memberof Resource\n         * @callback OnStartSignal\n         * @param {Resource} resource - The resource that the event happened on.\n         */\n\n        /**\n         * When the resource reports loading progress.\n         *\n         * @memberof Resource\n         * @callback OnProgressSignal\n         * @param {Resource} resource - The resource that the event happened on.\n         * @param {number} percentage - The progress of the load in the range [0, 1].\n         */\n\n        /**\n         * When the resource finishes loading.\n         *\n         * @memberof Resource\n         * @callback OnCompleteSignal\n         * @param {Resource} resource - The resource that the event happened on.\n         */\n    }\n\n    /**\n     * Stores whether or not this url is a data url.\n     *\n     * @member {boolean}\n     * @readonly\n     */\n\n\n    /**\n     * Marks the resource as complete.\n     *\n     */\n    Resource.prototype.complete = function complete() {\n        // TODO: Clean this up in a wrapper or something...gross....\n        if (this.data && this.data.removeEventListener) {\n            this.data.removeEventListener('error', this._boundOnError, false);\n            this.data.removeEventListener('load', this._boundComplete, false);\n            this.data.removeEventListener('progress', this._boundOnProgress, false);\n            this.data.removeEventListener('canplaythrough', this._boundComplete, false);\n        }\n\n        if (this.xhr) {\n            if (this.xhr.removeEventListener) {\n                this.xhr.removeEventListener('error', this._boundXhrOnError, false);\n                this.xhr.removeEventListener('abort', this._boundXhrOnAbort, false);\n                this.xhr.removeEventListener('progress', this._boundOnProgress, false);\n                this.xhr.removeEventListener('load', this._boundXhrOnLoad, false);\n            } else {\n                this.xhr.onerror = null;\n                this.xhr.ontimeout = null;\n                this.xhr.onprogress = null;\n                this.xhr.onload = null;\n            }\n        }\n\n        if (this.isComplete) {\n            throw new Error('Complete called again for an already completed resource.');\n        }\n\n        this._setFlag(Resource.STATUS_FLAGS.COMPLETE, true);\n        this._setFlag(Resource.STATUS_FLAGS.LOADING, false);\n\n        this.onComplete.dispatch(this);\n    };\n\n    /**\n     * Aborts the loading of this resource, with an optional message.\n     *\n     * @param {string} message - The message to use for the error\n     */\n\n\n    Resource.prototype.abort = function abort(message) {\n        // abort can be called multiple times, ignore subsequent calls.\n        if (this.error) {\n            return;\n        }\n\n        // store error\n        this.error = new Error(message);\n\n        // abort the actual loading\n        if (this.xhr) {\n            this.xhr.abort();\n        } else if (this.xdr) {\n            this.xdr.abort();\n        } else if (this.data) {\n            // single source\n            if (this.data.src) {\n                this.data.src = Resource.EMPTY_GIF;\n            }\n            // multi-source\n            else {\n                    while (this.data.firstChild) {\n                        this.data.removeChild(this.data.firstChild);\n                    }\n                }\n        }\n\n        // done now.\n        this.complete();\n    };\n\n    /**\n     * Kicks off loading of this resource. This method is asynchronous.\n     *\n     * @param {function} [cb] - Optional callback to call once the resource is loaded.\n     */\n\n\n    Resource.prototype.load = function load(cb) {\n        var _this = this;\n\n        if (this.isLoading) {\n            return;\n        }\n\n        if (this.isComplete) {\n            if (cb) {\n                setTimeout(function () {\n                    return cb(_this);\n                }, 1);\n            }\n\n            return;\n        } else if (cb) {\n            this.onComplete.once(cb);\n        }\n\n        this._setFlag(Resource.STATUS_FLAGS.LOADING, true);\n\n        this.onStart.dispatch(this);\n\n        // if unset, determine the value\n        if (this.crossOrigin === false || typeof this.crossOrigin !== 'string') {\n            this.crossOrigin = this._determineCrossOrigin(this.url);\n        }\n\n        switch (this.loadType) {\n            case Resource.LOAD_TYPE.IMAGE:\n                this.type = Resource.TYPE.IMAGE;\n                this._loadElement('image');\n                break;\n\n            case Resource.LOAD_TYPE.AUDIO:\n                this.type = Resource.TYPE.AUDIO;\n                this._loadSourceElement('audio');\n                break;\n\n            case Resource.LOAD_TYPE.VIDEO:\n                this.type = Resource.TYPE.VIDEO;\n                this._loadSourceElement('video');\n                break;\n\n            case Resource.LOAD_TYPE.XHR:\n            /* falls through */\n            default:\n                if (useXdr && this.crossOrigin) {\n                    this._loadXdr();\n                } else {\n                    this._loadXhr();\n                }\n                break;\n        }\n    };\n\n    /**\n     * Checks if the flag is set.\n     *\n     * @private\n     * @param {number} flag - The flag to check.\n     * @return {boolean} True if the flag is set.\n     */\n\n\n    Resource.prototype._hasFlag = function _hasFlag(flag) {\n        return !!(this._flags & flag);\n    };\n\n    /**\n     * (Un)Sets the flag.\n     *\n     * @private\n     * @param {number} flag - The flag to (un)set.\n     * @param {boolean} value - Whether to set or (un)set the flag.\n     */\n\n\n    Resource.prototype._setFlag = function _setFlag(flag, value) {\n        this._flags = value ? this._flags | flag : this._flags & ~flag;\n    };\n\n    /**\n     * Loads this resources using an element that has a single source,\n     * like an HTMLImageElement.\n     *\n     * @private\n     * @param {string} type - The type of element to use.\n     */\n\n\n    Resource.prototype._loadElement = function _loadElement(type) {\n        if (this.metadata.loadElement) {\n            this.data = this.metadata.loadElement;\n        } else if (type === 'image' && typeof window.Image !== 'undefined') {\n            this.data = new Image();\n        } else {\n            this.data = document.createElement(type);\n        }\n\n        if (this.crossOrigin) {\n            this.data.crossOrigin = this.crossOrigin;\n        }\n\n        if (!this.metadata.skipSource) {\n            this.data.src = this.url;\n        }\n\n        this.data.addEventListener('error', this._boundOnError, false);\n        this.data.addEventListener('load', this._boundComplete, false);\n        this.data.addEventListener('progress', this._boundOnProgress, false);\n    };\n\n    /**\n     * Loads this resources using an element that has multiple sources,\n     * like an HTMLAudioElement or HTMLVideoElement.\n     *\n     * @private\n     * @param {string} type - The type of element to use.\n     */\n\n\n    Resource.prototype._loadSourceElement = function _loadSourceElement(type) {\n        if (this.metadata.loadElement) {\n            this.data = this.metadata.loadElement;\n        } else if (type === 'audio' && typeof window.Audio !== 'undefined') {\n            this.data = new Audio();\n        } else {\n            this.data = document.createElement(type);\n        }\n\n        if (this.data === null) {\n            this.abort('Unsupported element: ' + type);\n\n            return;\n        }\n\n        if (!this.metadata.skipSource) {\n            // support for CocoonJS Canvas+ runtime, lacks document.createElement('source')\n            if (navigator.isCocoonJS) {\n                this.data.src = Array.isArray(this.url) ? this.url[0] : this.url;\n            } else if (Array.isArray(this.url)) {\n                var mimeTypes = this.metadata.mimeType;\n\n                for (var i = 0; i < this.url.length; ++i) {\n                    this.data.appendChild(this._createSource(type, this.url[i], Array.isArray(mimeTypes) ? mimeTypes[i] : mimeTypes));\n                }\n            } else {\n                var _mimeTypes = this.metadata.mimeType;\n\n                this.data.appendChild(this._createSource(type, this.url, Array.isArray(_mimeTypes) ? _mimeTypes[0] : _mimeTypes));\n            }\n        }\n\n        this.data.addEventListener('error', this._boundOnError, false);\n        this.data.addEventListener('load', this._boundComplete, false);\n        this.data.addEventListener('progress', this._boundOnProgress, false);\n        this.data.addEventListener('canplaythrough', this._boundComplete, false);\n\n        this.data.load();\n    };\n\n    /**\n     * Loads this resources using an XMLHttpRequest.\n     *\n     * @private\n     */\n\n\n    Resource.prototype._loadXhr = function _loadXhr() {\n        // if unset, determine the value\n        if (typeof this.xhrType !== 'string') {\n            this.xhrType = this._determineXhrType();\n        }\n\n        var xhr = this.xhr = new XMLHttpRequest();\n\n        // set the request type and url\n        xhr.open('GET', this.url, true);\n\n        // load json as text and parse it ourselves. We do this because some browsers\n        // *cough* safari *cough* can't deal with it.\n        if (this.xhrType === Resource.XHR_RESPONSE_TYPE.JSON || this.xhrType === Resource.XHR_RESPONSE_TYPE.DOCUMENT) {\n            xhr.responseType = Resource.XHR_RESPONSE_TYPE.TEXT;\n        } else {\n            xhr.responseType = this.xhrType;\n        }\n\n        xhr.addEventListener('error', this._boundXhrOnError, false);\n        xhr.addEventListener('abort', this._boundXhrOnAbort, false);\n        xhr.addEventListener('progress', this._boundOnProgress, false);\n        xhr.addEventListener('load', this._boundXhrOnLoad, false);\n\n        xhr.send();\n    };\n\n    /**\n     * Loads this resources using an XDomainRequest. This is here because we need to support IE9 (gross).\n     *\n     * @private\n     */\n\n\n    Resource.prototype._loadXdr = function _loadXdr() {\n        // if unset, determine the value\n        if (typeof this.xhrType !== 'string') {\n            this.xhrType = this._determineXhrType();\n        }\n\n        var xdr = this.xhr = new XDomainRequest();\n\n        // XDomainRequest has a few quirks. Occasionally it will abort requests\n        // A way to avoid this is to make sure ALL callbacks are set even if not used\n        // More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9\n        xdr.timeout = 5000;\n\n        xdr.onerror = this._boundXhrOnError;\n        xdr.ontimeout = this._boundXdrOnTimeout;\n        xdr.onprogress = this._boundOnProgress;\n        xdr.onload = this._boundXhrOnLoad;\n\n        xdr.open('GET', this.url, true);\n\n        // Note: The xdr.send() call is wrapped in a timeout to prevent an\n        // issue with the interface where some requests are lost if multiple\n        // XDomainRequests are being sent at the same time.\n        // Some info here: https://github.com/photonstorm/phaser/issues/1248\n        setTimeout(function () {\n            return xdr.send();\n        }, 1);\n    };\n\n    /**\n     * Creates a source used in loading via an element.\n     *\n     * @private\n     * @param {string} type - The element type (video or audio).\n     * @param {string} url - The source URL to load from.\n     * @param {string} [mime] - The mime type of the video\n     * @return {HTMLSourceElement} The source element.\n     */\n\n\n    Resource.prototype._createSource = function _createSource(type, url, mime) {\n        if (!mime) {\n            mime = type + '/' + this._getExtension(url);\n        }\n\n        var source = document.createElement('source');\n\n        source.src = url;\n        source.type = mime;\n\n        return source;\n    };\n\n    /**\n     * Called if a load errors out.\n     *\n     * @param {Event} event - The error event from the element that emits it.\n     * @private\n     */\n\n\n    Resource.prototype._onError = function _onError(event) {\n        this.abort('Failed to load element using: ' + event.target.nodeName);\n    };\n\n    /**\n     * Called if a load progress event fires for xhr/xdr.\n     *\n     * @private\n     * @param {XMLHttpRequestProgressEvent|Event} event - Progress event.\n     */\n\n\n    Resource.prototype._onProgress = function _onProgress(event) {\n        if (event && event.lengthComputable) {\n            this.onProgress.dispatch(this, event.loaded / event.total);\n        }\n    };\n\n    /**\n     * Called if an error event fires for xhr/xdr.\n     *\n     * @private\n     * @param {XMLHttpRequestErrorEvent|Event} event - Error event.\n     */\n\n\n    Resource.prototype._xhrOnError = function _xhrOnError() {\n        var xhr = this.xhr;\n\n        this.abort(reqType(xhr) + ' Request failed. Status: ' + xhr.status + ', text: \"' + xhr.statusText + '\"');\n    };\n\n    /**\n     * Called if an abort event fires for xhr.\n     *\n     * @private\n     * @param {XMLHttpRequestAbortEvent} event - Abort Event\n     */\n\n\n    Resource.prototype._xhrOnAbort = function _xhrOnAbort() {\n        this.abort(reqType(this.xhr) + ' Request was aborted by the user.');\n    };\n\n    /**\n     * Called if a timeout event fires for xdr.\n     *\n     * @private\n     * @param {Event} event - Timeout event.\n     */\n\n\n    Resource.prototype._xdrOnTimeout = function _xdrOnTimeout() {\n        this.abort(reqType(this.xhr) + ' Request timed out.');\n    };\n\n    /**\n     * Called when data successfully loads from an xhr/xdr request.\n     *\n     * @private\n     * @param {XMLHttpRequestLoadEvent|Event} event - Load event\n     */\n\n\n    Resource.prototype._xhrOnLoad = function _xhrOnLoad() {\n        var xhr = this.xhr;\n        var text = '';\n        var status = typeof xhr.status === 'undefined' ? STATUS_OK : xhr.status; // XDR has no `.status`, assume 200.\n\n        // responseText is accessible only if responseType is '' or 'text' and on older browsers\n        if (xhr.responseType === '' || xhr.responseType === 'text' || typeof xhr.responseType === 'undefined') {\n            text = xhr.responseText;\n        }\n\n        // status can be 0 when using the `file://` protocol so we also check if a response is set.\n        // If it has a response, we assume 200; otherwise a 0 status code with no contents is an aborted request.\n        if (status === STATUS_NONE && text.length > 0) {\n            status = STATUS_OK;\n        }\n        // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request\n        else if (status === STATUS_IE_BUG_EMPTY) {\n                status = STATUS_EMPTY;\n            }\n\n        var statusType = status / 100 | 0;\n\n        if (statusType === STATUS_TYPE_OK) {\n            // if text, just return it\n            if (this.xhrType === Resource.XHR_RESPONSE_TYPE.TEXT) {\n                this.data = text;\n                this.type = Resource.TYPE.TEXT;\n            }\n            // if json, parse into json object\n            else if (this.xhrType === Resource.XHR_RESPONSE_TYPE.JSON) {\n                    try {\n                        this.data = JSON.parse(text);\n                        this.type = Resource.TYPE.JSON;\n                    } catch (e) {\n                        this.abort('Error trying to parse loaded json: ' + e);\n\n                        return;\n                    }\n                }\n                // if xml, parse into an xml document or div element\n                else if (this.xhrType === Resource.XHR_RESPONSE_TYPE.DOCUMENT) {\n                        try {\n                            if (window.DOMParser) {\n                                var domparser = new DOMParser();\n\n                                this.data = domparser.parseFromString(text, 'text/xml');\n                            } else {\n                                var div = document.createElement('div');\n\n                                div.innerHTML = text;\n\n                                this.data = div;\n                            }\n\n                            this.type = Resource.TYPE.XML;\n                        } catch (e) {\n                            this.abort('Error trying to parse loaded xml: ' + e);\n\n                            return;\n                        }\n                    }\n                    // other types just return the response\n                    else {\n                            this.data = xhr.response || text;\n                        }\n        } else {\n            this.abort('[' + xhr.status + '] ' + xhr.statusText + ': ' + xhr.responseURL);\n\n            return;\n        }\n\n        this.complete();\n    };\n\n    /**\n     * Sets the `crossOrigin` property for this resource based on if the url\n     * for this resource is cross-origin. If crossOrigin was manually set, this\n     * function does nothing.\n     *\n     * @private\n     * @param {string} url - The url to test.\n     * @param {object} [loc=window.location] - The location object to test against.\n     * @return {string} The crossOrigin value to use (or empty string for none).\n     */\n\n\n    Resource.prototype._determineCrossOrigin = function _determineCrossOrigin(url, loc) {\n        // data: and javascript: urls are considered same-origin\n        if (url.indexOf('data:') === 0) {\n            return '';\n        }\n\n        // default is window.location\n        loc = loc || window.location;\n\n        if (!tempAnchor) {\n            tempAnchor = document.createElement('a');\n        }\n\n        // let the browser determine the full href for the url of this resource and then\n        // parse with the node url lib, we can't use the properties of the anchor element\n        // because they don't work in IE9 :(\n        tempAnchor.href = url;\n        url = (0, _parseUri2.default)(tempAnchor.href, { strictMode: true });\n\n        var samePort = !url.port && loc.port === '' || url.port === loc.port;\n        var protocol = url.protocol ? url.protocol + ':' : '';\n\n        // if cross origin\n        if (url.host !== loc.hostname || !samePort || protocol !== loc.protocol) {\n            return 'anonymous';\n        }\n\n        return '';\n    };\n\n    /**\n     * Determines the responseType of an XHR request based on the extension of the\n     * resource being loaded.\n     *\n     * @private\n     * @return {Resource.XHR_RESPONSE_TYPE} The responseType to use.\n     */\n\n\n    Resource.prototype._determineXhrType = function _determineXhrType() {\n        return Resource._xhrTypeMap[this.extension] || Resource.XHR_RESPONSE_TYPE.TEXT;\n    };\n\n    /**\n     * Determines the loadType of a resource based on the extension of the\n     * resource being loaded.\n     *\n     * @private\n     * @return {Resource.LOAD_TYPE} The loadType to use.\n     */\n\n\n    Resource.prototype._determineLoadType = function _determineLoadType() {\n        return Resource._loadTypeMap[this.extension] || Resource.LOAD_TYPE.XHR;\n    };\n\n    /**\n     * Extracts the extension (sans '.') of the file being loaded by the resource.\n     *\n     * @private\n     * @return {string} The extension.\n     */\n\n\n    Resource.prototype._getExtension = function _getExtension() {\n        var url = this.url;\n        var ext = '';\n\n        if (this.isDataUrl) {\n            var slashIndex = url.indexOf('/');\n\n            ext = url.substring(slashIndex + 1, url.indexOf(';', slashIndex));\n        } else {\n            var queryStart = url.indexOf('?');\n            var hashStart = url.indexOf('#');\n            var index = Math.min(queryStart > -1 ? queryStart : url.length, hashStart > -1 ? hashStart : url.length);\n\n            url = url.substring(0, index);\n            ext = url.substring(url.lastIndexOf('.') + 1);\n        }\n\n        return ext.toLowerCase();\n    };\n\n    /**\n     * Determines the mime type of an XHR request based on the responseType of\n     * resource being loaded.\n     *\n     * @private\n     * @param {Resource.XHR_RESPONSE_TYPE} type - The type to get a mime type for.\n     * @return {string} The mime type to use.\n     */\n\n\n    Resource.prototype._getMimeFromXhrType = function _getMimeFromXhrType(type) {\n        switch (type) {\n            case Resource.XHR_RESPONSE_TYPE.BUFFER:\n                return 'application/octet-binary';\n\n            case Resource.XHR_RESPONSE_TYPE.BLOB:\n                return 'application/blob';\n\n            case Resource.XHR_RESPONSE_TYPE.DOCUMENT:\n                return 'application/xml';\n\n            case Resource.XHR_RESPONSE_TYPE.JSON:\n                return 'application/json';\n\n            case Resource.XHR_RESPONSE_TYPE.DEFAULT:\n            case Resource.XHR_RESPONSE_TYPE.TEXT:\n            /* falls through */\n            default:\n                return 'text/plain';\n\n        }\n    };\n\n    _createClass(Resource, [{\n        key: 'isDataUrl',\n        get: function get() {\n            return this._hasFlag(Resource.STATUS_FLAGS.DATA_URL);\n        }\n\n        /**\n         * Describes if this resource has finished loading. Is true when the resource has completely\n         * loaded.\n         *\n         * @member {boolean}\n         * @readonly\n         */\n\n    }, {\n        key: 'isComplete',\n        get: function get() {\n            return this._hasFlag(Resource.STATUS_FLAGS.COMPLETE);\n        }\n\n        /**\n         * Describes if this resource is currently loading. Is true when the resource starts loading,\n         * and is false again when complete.\n         *\n         * @member {boolean}\n         * @readonly\n         */\n\n    }, {\n        key: 'isLoading',\n        get: function get() {\n            return this._hasFlag(Resource.STATUS_FLAGS.LOADING);\n        }\n    }]);\n\n    return Resource;\n}();\n\n/**\n * The types of resources a resource could represent.\n *\n * @static\n * @readonly\n * @enum {number}\n */\n\n\nexports.default = Resource;\nResource.STATUS_FLAGS = {\n    NONE: 0,\n    DATA_URL: 1 << 0,\n    COMPLETE: 1 << 1,\n    LOADING: 1 << 2\n};\n\n/**\n * The types of resources a resource could represent.\n *\n * @static\n * @readonly\n * @enum {number}\n */\nResource.TYPE = {\n    UNKNOWN: 0,\n    JSON: 1,\n    XML: 2,\n    IMAGE: 3,\n    AUDIO: 4,\n    VIDEO: 5,\n    TEXT: 6\n};\n\n/**\n * The types of loading a resource can use.\n *\n * @static\n * @readonly\n * @enum {number}\n */\nResource.LOAD_TYPE = {\n    /** Uses XMLHttpRequest to load the resource. */\n    XHR: 1,\n    /** Uses an `Image` object to load the resource. */\n    IMAGE: 2,\n    /** Uses an `Audio` object to load the resource. */\n    AUDIO: 3,\n    /** Uses a `Video` object to load the resource. */\n    VIDEO: 4\n};\n\n/**\n * The XHR ready states, used internally.\n *\n * @static\n * @readonly\n * @enum {string}\n */\nResource.XHR_RESPONSE_TYPE = {\n    /** string */\n    DEFAULT: 'text',\n    /** ArrayBuffer */\n    BUFFER: 'arraybuffer',\n    /** Blob */\n    BLOB: 'blob',\n    /** Document */\n    DOCUMENT: 'document',\n    /** Object */\n    JSON: 'json',\n    /** String */\n    TEXT: 'text'\n};\n\nResource._loadTypeMap = {\n    // images\n    gif: Resource.LOAD_TYPE.IMAGE,\n    png: Resource.LOAD_TYPE.IMAGE,\n    bmp: Resource.LOAD_TYPE.IMAGE,\n    jpg: Resource.LOAD_TYPE.IMAGE,\n    jpeg: Resource.LOAD_TYPE.IMAGE,\n    tif: Resource.LOAD_TYPE.IMAGE,\n    tiff: Resource.LOAD_TYPE.IMAGE,\n    webp: Resource.LOAD_TYPE.IMAGE,\n    tga: Resource.LOAD_TYPE.IMAGE,\n    svg: Resource.LOAD_TYPE.IMAGE,\n    'svg+xml': Resource.LOAD_TYPE.IMAGE, // for SVG data urls\n\n    // audio\n    mp3: Resource.LOAD_TYPE.AUDIO,\n    ogg: Resource.LOAD_TYPE.AUDIO,\n    wav: Resource.LOAD_TYPE.AUDIO,\n\n    // videos\n    mp4: Resource.LOAD_TYPE.VIDEO,\n    webm: Resource.LOAD_TYPE.VIDEO\n};\n\nResource._xhrTypeMap = {\n    // xml\n    xhtml: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n    html: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n    htm: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n    xml: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n    tmx: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n    svg: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n\n    // This was added to handle Tiled Tileset XML, but .tsx is also a TypeScript React Component.\n    // Since it is way less likely for people to be loading TypeScript files instead of Tiled files,\n    // this should probably be fine.\n    tsx: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n\n    // images\n    gif: Resource.XHR_RESPONSE_TYPE.BLOB,\n    png: Resource.XHR_RESPONSE_TYPE.BLOB,\n    bmp: Resource.XHR_RESPONSE_TYPE.BLOB,\n    jpg: Resource.XHR_RESPONSE_TYPE.BLOB,\n    jpeg: Resource.XHR_RESPONSE_TYPE.BLOB,\n    tif: Resource.XHR_RESPONSE_TYPE.BLOB,\n    tiff: Resource.XHR_RESPONSE_TYPE.BLOB,\n    webp: Resource.XHR_RESPONSE_TYPE.BLOB,\n    tga: Resource.XHR_RESPONSE_TYPE.BLOB,\n\n    // json\n    json: Resource.XHR_RESPONSE_TYPE.JSON,\n\n    // text\n    text: Resource.XHR_RESPONSE_TYPE.TEXT,\n    txt: Resource.XHR_RESPONSE_TYPE.TEXT,\n\n    // fonts\n    ttf: Resource.XHR_RESPONSE_TYPE.BUFFER,\n    otf: Resource.XHR_RESPONSE_TYPE.BUFFER\n};\n\n// We can't set the `src` attribute to empty string, so on abort we set it to this 1px transparent gif\nResource.EMPTY_GIF = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==';\n\n/**\n * Quick helper to set a value on one of the extension maps. Ensures there is no\n * dot at the start of the extension.\n *\n * @ignore\n * @param {object} map - The map to set on.\n * @param {string} extname - The extension (or key) to set.\n * @param {number} val - The value to set.\n */\nfunction setExtMap(map, extname, val) {\n    if (extname && extname.indexOf('.') === 0) {\n        extname = extname.substring(1);\n    }\n\n    if (!extname) {\n        return;\n    }\n\n    map[extname] = val;\n}\n\n/**\n * Quick helper to get string xhr type.\n *\n * @ignore\n * @param {XMLHttpRequest|XDomainRequest} xhr - The request to check.\n * @return {string} The type.\n */\nfunction reqType(xhr) {\n    return xhr.toString().replace('object ', '');\n}\n//# sourceMappingURL=Resource.js.map","'use strict';\n\nexports.__esModule = true;\nexports.eachSeries = eachSeries;\nexports.queue = queue;\n/**\n * Smaller version of the async library constructs.\n *\n */\nfunction _noop() {} /* empty */\n\n/**\n * Iterates an array in series.\n *\n * @param {Array.<*>} array - Array to iterate.\n * @param {function} iterator - Function to call for each element.\n * @param {function} callback - Function to call when done, or on error.\n * @param {boolean} [deferNext=false] - Break synchronous each loop by calling next with a setTimeout of 1.\n */\nfunction eachSeries(array, iterator, callback, deferNext) {\n    var i = 0;\n    var len = array.length;\n\n    (function next(err) {\n        if (err || i === len) {\n            if (callback) {\n                callback(err);\n            }\n\n            return;\n        }\n\n        if (deferNext) {\n            setTimeout(function () {\n                iterator(array[i++], next);\n            }, 1);\n        } else {\n            iterator(array[i++], next);\n        }\n    })();\n}\n\n/**\n * Ensures a function is only called once.\n *\n * @param {function} fn - The function to wrap.\n * @return {function} The wrapping function.\n */\nfunction onlyOnce(fn) {\n    return function onceWrapper() {\n        if (fn === null) {\n            throw new Error('Callback was already called.');\n        }\n\n        var callFn = fn;\n\n        fn = null;\n        callFn.apply(this, arguments);\n    };\n}\n\n/**\n * Async queue implementation,\n *\n * @param {function} worker - The worker function to call for each task.\n * @param {number} concurrency - How many workers to run in parrallel.\n * @return {*} The async queue object.\n */\nfunction queue(worker, concurrency) {\n    if (concurrency == null) {\n        // eslint-disable-line no-eq-null,eqeqeq\n        concurrency = 1;\n    } else if (concurrency === 0) {\n        throw new Error('Concurrency must not be zero');\n    }\n\n    var workers = 0;\n    var q = {\n        _tasks: [],\n        concurrency: concurrency,\n        saturated: _noop,\n        unsaturated: _noop,\n        buffer: concurrency / 4,\n        empty: _noop,\n        drain: _noop,\n        error: _noop,\n        started: false,\n        paused: false,\n        push: function push(data, callback) {\n            _insert(data, false, callback);\n        },\n        kill: function kill() {\n            workers = 0;\n            q.drain = _noop;\n            q.started = false;\n            q._tasks = [];\n        },\n        unshift: function unshift(data, callback) {\n            _insert(data, true, callback);\n        },\n        process: function process() {\n            while (!q.paused && workers < q.concurrency && q._tasks.length) {\n                var task = q._tasks.shift();\n\n                if (q._tasks.length === 0) {\n                    q.empty();\n                }\n\n                workers += 1;\n\n                if (workers === q.concurrency) {\n                    q.saturated();\n                }\n\n                worker(task.data, onlyOnce(_next(task)));\n            }\n        },\n        length: function length() {\n            return q._tasks.length;\n        },\n        running: function running() {\n            return workers;\n        },\n        idle: function idle() {\n            return q._tasks.length + workers === 0;\n        },\n        pause: function pause() {\n            if (q.paused === true) {\n                return;\n            }\n\n            q.paused = true;\n        },\n        resume: function resume() {\n            if (q.paused === false) {\n                return;\n            }\n\n            q.paused = false;\n\n            // Need to call q.process once per concurrent\n            // worker to preserve full concurrency after pause\n            for (var w = 1; w <= q.concurrency; w++) {\n                q.process();\n            }\n        }\n    };\n\n    function _insert(data, insertAtFront, callback) {\n        if (callback != null && typeof callback !== 'function') {\n            // eslint-disable-line no-eq-null,eqeqeq\n            throw new Error('task callback must be a function');\n        }\n\n        q.started = true;\n\n        if (data == null && q.idle()) {\n            // eslint-disable-line no-eq-null,eqeqeq\n            // call drain immediately if there are no tasks\n            setTimeout(function () {\n                return q.drain();\n            }, 1);\n\n            return;\n        }\n\n        var item = {\n            data: data,\n            callback: typeof callback === 'function' ? callback : _noop\n        };\n\n        if (insertAtFront) {\n            q._tasks.unshift(item);\n        } else {\n            q._tasks.push(item);\n        }\n\n        setTimeout(function () {\n            return q.process();\n        }, 1);\n    }\n\n    function _next(task) {\n        return function next() {\n            workers -= 1;\n\n            task.callback.apply(task, arguments);\n\n            if (arguments[0] != null) {\n                // eslint-disable-line no-eq-null,eqeqeq\n                q.error(arguments[0], task.data);\n            }\n\n            if (workers <= q.concurrency - q.buffer) {\n                q.unsaturated();\n            }\n\n            if (q.idle()) {\n                q.drain();\n            }\n\n            q.process();\n        };\n    }\n\n    return q;\n}\n//# sourceMappingURL=async.js.map","'use strict';\n\nexports.__esModule = true;\nexports.encodeBinary = encodeBinary;\nvar _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction encodeBinary(input) {\n    var output = '';\n    var inx = 0;\n\n    while (inx < input.length) {\n        // Fill byte buffer array\n        var bytebuffer = [0, 0, 0];\n        var encodedCharIndexes = [0, 0, 0, 0];\n\n        for (var jnx = 0; jnx < bytebuffer.length; ++jnx) {\n            if (inx < input.length) {\n                // throw away high-order byte, as documented at:\n                // https://developer.mozilla.org/En/Using_XMLHttpRequest#Handling_binary_data\n                bytebuffer[jnx] = input.charCodeAt(inx++) & 0xff;\n            } else {\n                bytebuffer[jnx] = 0;\n            }\n        }\n\n        // Get each encoded character, 6 bits at a time\n        // index 1: first 6 bits\n        encodedCharIndexes[0] = bytebuffer[0] >> 2;\n\n        // index 2: second 6 bits (2 least significant bits from input byte 1 + 4 most significant bits from byte 2)\n        encodedCharIndexes[1] = (bytebuffer[0] & 0x3) << 4 | bytebuffer[1] >> 4;\n\n        // index 3: third 6 bits (4 least significant bits from input byte 2 + 2 most significant bits from byte 3)\n        encodedCharIndexes[2] = (bytebuffer[1] & 0x0f) << 2 | bytebuffer[2] >> 6;\n\n        // index 3: forth 6 bits (6 least significant bits from input byte 3)\n        encodedCharIndexes[3] = bytebuffer[2] & 0x3f;\n\n        // Determine whether padding happened, and adjust accordingly\n        var paddingBytes = inx - (input.length - 1);\n\n        switch (paddingBytes) {\n            case 2:\n                // Set last 2 characters to padding char\n                encodedCharIndexes[3] = 64;\n                encodedCharIndexes[2] = 64;\n                break;\n\n            case 1:\n                // Set last character to padding char\n                encodedCharIndexes[3] = 64;\n                break;\n\n            default:\n                break; // No padding - proceed\n        }\n\n        // Now we will grab each appropriate character out of our keystring\n        // based on our index array and append it to the output string\n        for (var _jnx = 0; _jnx < encodedCharIndexes.length; ++_jnx) {\n            output += _keyStr.charAt(encodedCharIndexes[_jnx]);\n        }\n    }\n\n    return output;\n}\n//# sourceMappingURL=b64.js.map","'use strict';\n\n// import Loader from './Loader';\n// import Resource from './Resource';\n// import * as async from './async';\n// import * as b64 from './b64';\n\n/* eslint-disable no-undef */\n\nvar Loader = require('./Loader').default;\nvar Resource = require('./Resource').default;\nvar async = require('./async');\nvar b64 = require('./b64');\n\nLoader.Resource = Resource;\nLoader.async = async;\nLoader.base64 = b64;\n\n// export manually, and also as default\nmodule.exports = Loader;\n// export default Loader;\nmodule.exports.default = Loader;\n//# sourceMappingURL=index.js.map","'use strict';\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.blobMiddlewareFactory = blobMiddlewareFactory;\n\nvar _Resource = require('../../Resource');\n\nvar _Resource2 = _interopRequireDefault(_Resource);\n\nvar _b = require('../../b64');\n\nvar _b2 = _interopRequireDefault(_b);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Url = window.URL || window.webkitURL;\n\n// a middleware for transforming XHR loaded Blobs into more useful objects\nfunction blobMiddlewareFactory() {\n    return function blobMiddleware(resource, next) {\n        if (!resource.data) {\n            next();\n\n            return;\n        }\n\n        // if this was an XHR load of a blob\n        if (resource.xhr && resource.xhrType === _Resource2.default.XHR_RESPONSE_TYPE.BLOB) {\n            // if there is no blob support we probably got a binary string back\n            if (!window.Blob || typeof resource.data === 'string') {\n                var type = resource.xhr.getResponseHeader('content-type');\n\n                // this is an image, convert the binary string into a data url\n                if (type && type.indexOf('image') === 0) {\n                    resource.data = new Image();\n                    resource.data.src = 'data:' + type + ';base64,' + _b2.default.encodeBinary(resource.xhr.responseText);\n\n                    resource.type = _Resource2.default.TYPE.IMAGE;\n\n                    // wait until the image loads and then callback\n                    resource.data.onload = function () {\n                        resource.data.onload = null;\n\n                        next();\n                    };\n\n                    // next will be called on load\n                    return;\n                }\n            }\n            // if content type says this is an image, then we should transform the blob into an Image object\n            else if (resource.data.type.indexOf('image') === 0) {\n                    var _ret = function () {\n                        var src = Url.createObjectURL(resource.data);\n\n                        resource.blob = resource.data;\n                        resource.data = new Image();\n                        resource.data.src = src;\n\n                        resource.type = _Resource2.default.TYPE.IMAGE;\n\n                        // cleanup the no longer used blob after the image loads\n                        // TODO: Is this correct? Will the image be invalid after revoking?\n                        resource.data.onload = function () {\n                            Url.revokeObjectURL(src);\n                            resource.data.onload = null;\n\n                            next();\n                        };\n\n                        // next will be called on load.\n                        return {\n                            v: void 0\n                        };\n                    }();\n\n                    if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === \"object\") return _ret.v;\n                }\n        }\n\n        next();\n    };\n}\n//# sourceMappingURL=blob.js.map","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n  this.protocol = null;\n  this.slashes = null;\n  this.auth = null;\n  this.host = null;\n  this.port = null;\n  this.hostname = null;\n  this.hash = null;\n  this.search = null;\n  this.query = null;\n  this.pathname = null;\n  this.path = null;\n  this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n    portPattern = /:[0-9]*$/,\n\n    // Special case for a simple path URL\n    simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n    // RFC 2396: characters reserved for delimiting URLs.\n    // We actually just auto-escape these.\n    delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n    // RFC 2396: characters not allowed for various reasons.\n    unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n    // Allowed by RFCs, but cause of XSS attacks.  Always escape these.\n    autoEscape = ['\\''].concat(unwise),\n    // Characters that are never ever allowed in a hostname.\n    // Note that any invalid chars are also handled, but these\n    // are the ones that are *expected* to be seen, so we fast-path\n    // them.\n    nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n    hostEndingChars = ['/', '?', '#'],\n    hostnameMaxLen = 255,\n    hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n    hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n    // protocols that can allow \"unsafe\" and \"unwise\" chars.\n    unsafeProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that never have a hostname.\n    hostlessProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that always contain a // bit.\n    slashedProtocol = {\n      'http': true,\n      'https': true,\n      'ftp': true,\n      'gopher': true,\n      'file': true,\n      'http:': true,\n      'https:': true,\n      'ftp:': true,\n      'gopher:': true,\n      'file:': true\n    },\n    querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n  if (url && util.isObject(url) && url instanceof Url) return url;\n\n  var u = new Url;\n  u.parse(url, parseQueryString, slashesDenoteHost);\n  return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n  if (!util.isString(url)) {\n    throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n  }\n\n  // Copy chrome, IE, opera backslash-handling behavior.\n  // Back slashes before the query string get converted to forward slashes\n  // See: https://code.google.com/p/chromium/issues/detail?id=25916\n  var queryIndex = url.indexOf('?'),\n      splitter =\n          (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n      uSplit = url.split(splitter),\n      slashRegex = /\\\\/g;\n  uSplit[0] = uSplit[0].replace(slashRegex, '/');\n  url = uSplit.join(splitter);\n\n  var rest = url;\n\n  // trim before proceeding.\n  // This is to support parse stuff like \"  http://foo.com  \\n\"\n  rest = rest.trim();\n\n  if (!slashesDenoteHost && url.split('#').length === 1) {\n    // Try fast path regexp\n    var simplePath = simplePathPattern.exec(rest);\n    if (simplePath) {\n      this.path = rest;\n      this.href = rest;\n      this.pathname = simplePath[1];\n      if (simplePath[2]) {\n        this.search = simplePath[2];\n        if (parseQueryString) {\n          this.query = querystring.parse(this.search.substr(1));\n        } else {\n          this.query = this.search.substr(1);\n        }\n      } else if (parseQueryString) {\n        this.search = '';\n        this.query = {};\n      }\n      return this;\n    }\n  }\n\n  var proto = protocolPattern.exec(rest);\n  if (proto) {\n    proto = proto[0];\n    var lowerProto = proto.toLowerCase();\n    this.protocol = lowerProto;\n    rest = rest.substr(proto.length);\n  }\n\n  // figure out if it's got a host\n  // user@server is *always* interpreted as a hostname, and url\n  // resolution will treat //foo/bar as host=foo,path=bar because that's\n  // how the browser resolves relative URLs.\n  if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n    var slashes = rest.substr(0, 2) === '//';\n    if (slashes && !(proto && hostlessProtocol[proto])) {\n      rest = rest.substr(2);\n      this.slashes = true;\n    }\n  }\n\n  if (!hostlessProtocol[proto] &&\n      (slashes || (proto && !slashedProtocol[proto]))) {\n\n    // there's a hostname.\n    // the first instance of /, ?, ;, or # ends the host.\n    //\n    // If there is an @ in the hostname, then non-host chars *are* allowed\n    // to the left of the last @ sign, unless some host-ending character\n    // comes *before* the @-sign.\n    // URLs are obnoxious.\n    //\n    // ex:\n    // http://a@b@c/ => user:a@b host:c\n    // http://a@b?@c => user:a host:c path:/?@c\n\n    // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n    // Review our test case against browsers more comprehensively.\n\n    // find the first instance of any hostEndingChars\n    var hostEnd = -1;\n    for (var i = 0; i < hostEndingChars.length; i++) {\n      var hec = rest.indexOf(hostEndingChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n\n    // at this point, either we have an explicit point where the\n    // auth portion cannot go past, or the last @ char is the decider.\n    var auth, atSign;\n    if (hostEnd === -1) {\n      // atSign can be anywhere.\n      atSign = rest.lastIndexOf('@');\n    } else {\n      // atSign must be in auth portion.\n      // http://a@b/c@d => host:b auth:a path:/c@d\n      atSign = rest.lastIndexOf('@', hostEnd);\n    }\n\n    // Now we have a portion which is definitely the auth.\n    // Pull that off.\n    if (atSign !== -1) {\n      auth = rest.slice(0, atSign);\n      rest = rest.slice(atSign + 1);\n      this.auth = decodeURIComponent(auth);\n    }\n\n    // the host is the remaining to the left of the first non-host char\n    hostEnd = -1;\n    for (var i = 0; i < nonHostChars.length; i++) {\n      var hec = rest.indexOf(nonHostChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n    // if we still have not hit it, then the entire thing is a host.\n    if (hostEnd === -1)\n      hostEnd = rest.length;\n\n    this.host = rest.slice(0, hostEnd);\n    rest = rest.slice(hostEnd);\n\n    // pull out port.\n    this.parseHost();\n\n    // we've indicated that there is a hostname,\n    // so even if it's empty, it has to be present.\n    this.hostname = this.hostname || '';\n\n    // if hostname begins with [ and ends with ]\n    // assume that it's an IPv6 address.\n    var ipv6Hostname = this.hostname[0] === '[' &&\n        this.hostname[this.hostname.length - 1] === ']';\n\n    // validate a little.\n    if (!ipv6Hostname) {\n      var hostparts = this.hostname.split(/\\./);\n      for (var i = 0, l = hostparts.length; i < l; i++) {\n        var part = hostparts[i];\n        if (!part) continue;\n        if (!part.match(hostnamePartPattern)) {\n          var newpart = '';\n          for (var j = 0, k = part.length; j < k; j++) {\n            if (part.charCodeAt(j) > 127) {\n              // we replace non-ASCII char with a temporary placeholder\n              // we need this to make sure size of hostname is not\n              // broken by replacing non-ASCII by nothing\n              newpart += 'x';\n            } else {\n              newpart += part[j];\n            }\n          }\n          // we test again with ASCII char only\n          if (!newpart.match(hostnamePartPattern)) {\n            var validParts = hostparts.slice(0, i);\n            var notHost = hostparts.slice(i + 1);\n            var bit = part.match(hostnamePartStart);\n            if (bit) {\n              validParts.push(bit[1]);\n              notHost.unshift(bit[2]);\n            }\n            if (notHost.length) {\n              rest = '/' + notHost.join('.') + rest;\n            }\n            this.hostname = validParts.join('.');\n            break;\n          }\n        }\n      }\n    }\n\n    if (this.hostname.length > hostnameMaxLen) {\n      this.hostname = '';\n    } else {\n      // hostnames are always lower case.\n      this.hostname = this.hostname.toLowerCase();\n    }\n\n    if (!ipv6Hostname) {\n      // IDNA Support: Returns a punycoded representation of \"domain\".\n      // It only converts parts of the domain name that\n      // have non-ASCII characters, i.e. it doesn't matter if\n      // you call it with a domain that already is ASCII-only.\n      this.hostname = punycode.toASCII(this.hostname);\n    }\n\n    var p = this.port ? ':' + this.port : '';\n    var h = this.hostname || '';\n    this.host = h + p;\n    this.href += this.host;\n\n    // strip [ and ] from the hostname\n    // the host field still retains them, though\n    if (ipv6Hostname) {\n      this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n      if (rest[0] !== '/') {\n        rest = '/' + rest;\n      }\n    }\n  }\n\n  // now rest is set to the post-host stuff.\n  // chop off any delim chars.\n  if (!unsafeProtocol[lowerProto]) {\n\n    // First, make 100% sure that any \"autoEscape\" chars get\n    // escaped, even if encodeURIComponent doesn't think they\n    // need to be.\n    for (var i = 0, l = autoEscape.length; i < l; i++) {\n      var ae = autoEscape[i];\n      if (rest.indexOf(ae) === -1)\n        continue;\n      var esc = encodeURIComponent(ae);\n      if (esc === ae) {\n        esc = escape(ae);\n      }\n      rest = rest.split(ae).join(esc);\n    }\n  }\n\n\n  // chop off from the tail first.\n  var hash = rest.indexOf('#');\n  if (hash !== -1) {\n    // got a fragment string.\n    this.hash = rest.substr(hash);\n    rest = rest.slice(0, hash);\n  }\n  var qm = rest.indexOf('?');\n  if (qm !== -1) {\n    this.search = rest.substr(qm);\n    this.query = rest.substr(qm + 1);\n    if (parseQueryString) {\n      this.query = querystring.parse(this.query);\n    }\n    rest = rest.slice(0, qm);\n  } else if (parseQueryString) {\n    // no query string, but parseQueryString still requested\n    this.search = '';\n    this.query = {};\n  }\n  if (rest) this.pathname = rest;\n  if (slashedProtocol[lowerProto] &&\n      this.hostname && !this.pathname) {\n    this.pathname = '/';\n  }\n\n  //to support http.request\n  if (this.pathname || this.search) {\n    var p = this.pathname || '';\n    var s = this.search || '';\n    this.path = p + s;\n  }\n\n  // finally, reconstruct the href based on what has been validated.\n  this.href = this.format();\n  return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n  // ensure it's an object, and not a string url.\n  // If it's an obj, this is a no-op.\n  // this way, you can call url_format() on strings\n  // to clean up potentially wonky urls.\n  if (util.isString(obj)) obj = urlParse(obj);\n  if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n  return obj.format();\n}\n\nUrl.prototype.format = function() {\n  var auth = this.auth || '';\n  if (auth) {\n    auth = encodeURIComponent(auth);\n    auth = auth.replace(/%3A/i, ':');\n    auth += '@';\n  }\n\n  var protocol = this.protocol || '',\n      pathname = this.pathname || '',\n      hash = this.hash || '',\n      host = false,\n      query = '';\n\n  if (this.host) {\n    host = auth + this.host;\n  } else if (this.hostname) {\n    host = auth + (this.hostname.indexOf(':') === -1 ?\n        this.hostname :\n        '[' + this.hostname + ']');\n    if (this.port) {\n      host += ':' + this.port;\n    }\n  }\n\n  if (this.query &&\n      util.isObject(this.query) &&\n      Object.keys(this.query).length) {\n    query = querystring.stringify(this.query);\n  }\n\n  var search = this.search || (query && ('?' + query)) || '';\n\n  if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n  // only the slashedProtocols get the //.  Not mailto:, xmpp:, etc.\n  // unless they had them to begin with.\n  if (this.slashes ||\n      (!protocol || slashedProtocol[protocol]) && host !== false) {\n    host = '//' + (host || '');\n    if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n  } else if (!host) {\n    host = '';\n  }\n\n  if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n  if (search && search.charAt(0) !== '?') search = '?' + search;\n\n  pathname = pathname.replace(/[?#]/g, function(match) {\n    return encodeURIComponent(match);\n  });\n  search = search.replace('#', '%23');\n\n  return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n  return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n  return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n  if (!source) return relative;\n  return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n  if (util.isString(relative)) {\n    var rel = new Url();\n    rel.parse(relative, false, true);\n    relative = rel;\n  }\n\n  var result = new Url();\n  var tkeys = Object.keys(this);\n  for (var tk = 0; tk < tkeys.length; tk++) {\n    var tkey = tkeys[tk];\n    result[tkey] = this[tkey];\n  }\n\n  // hash is always overridden, no matter what.\n  // even href=\"\" will remove it.\n  result.hash = relative.hash;\n\n  // if the relative url is empty, then there's nothing left to do here.\n  if (relative.href === '') {\n    result.href = result.format();\n    return result;\n  }\n\n  // hrefs like //foo/bar always cut to the protocol.\n  if (relative.slashes && !relative.protocol) {\n    // take everything except the protocol from relative\n    var rkeys = Object.keys(relative);\n    for (var rk = 0; rk < rkeys.length; rk++) {\n      var rkey = rkeys[rk];\n      if (rkey !== 'protocol')\n        result[rkey] = relative[rkey];\n    }\n\n    //urlParse appends trailing / to urls like http://www.example.com\n    if (slashedProtocol[result.protocol] &&\n        result.hostname && !result.pathname) {\n      result.path = result.pathname = '/';\n    }\n\n    result.href = result.format();\n    return result;\n  }\n\n  if (relative.protocol && relative.protocol !== result.protocol) {\n    // if it's a known url protocol, then changing\n    // the protocol does weird things\n    // first, if it's not file:, then we MUST have a host,\n    // and if there was a path\n    // to begin with, then we MUST have a path.\n    // if it is file:, then the host is dropped,\n    // because that's known to be hostless.\n    // anything else is assumed to be absolute.\n    if (!slashedProtocol[relative.protocol]) {\n      var keys = Object.keys(relative);\n      for (var v = 0; v < keys.length; v++) {\n        var k = keys[v];\n        result[k] = relative[k];\n      }\n      result.href = result.format();\n      return result;\n    }\n\n    result.protocol = relative.protocol;\n    if (!relative.host && !hostlessProtocol[relative.protocol]) {\n      var relPath = (relative.pathname || '').split('/');\n      while (relPath.length && !(relative.host = relPath.shift()));\n      if (!relative.host) relative.host = '';\n      if (!relative.hostname) relative.hostname = '';\n      if (relPath[0] !== '') relPath.unshift('');\n      if (relPath.length < 2) relPath.unshift('');\n      result.pathname = relPath.join('/');\n    } else {\n      result.pathname = relative.pathname;\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    result.host = relative.host || '';\n    result.auth = relative.auth;\n    result.hostname = relative.hostname || relative.host;\n    result.port = relative.port;\n    // to support http.request\n    if (result.pathname || result.search) {\n      var p = result.pathname || '';\n      var s = result.search || '';\n      result.path = p + s;\n    }\n    result.slashes = result.slashes || relative.slashes;\n    result.href = result.format();\n    return result;\n  }\n\n  var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n      isRelAbs = (\n          relative.host ||\n          relative.pathname && relative.pathname.charAt(0) === '/'\n      ),\n      mustEndAbs = (isRelAbs || isSourceAbs ||\n                    (result.host && relative.pathname)),\n      removeAllDots = mustEndAbs,\n      srcPath = result.pathname && result.pathname.split('/') || [],\n      relPath = relative.pathname && relative.pathname.split('/') || [],\n      psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n  // if the url is a non-slashed url, then relative\n  // links like ../.. should be able\n  // to crawl up to the hostname, as well.  This is strange.\n  // result.protocol has already been set by now.\n  // Later on, put the first path part into the host field.\n  if (psychotic) {\n    result.hostname = '';\n    result.port = null;\n    if (result.host) {\n      if (srcPath[0] === '') srcPath[0] = result.host;\n      else srcPath.unshift(result.host);\n    }\n    result.host = '';\n    if (relative.protocol) {\n      relative.hostname = null;\n      relative.port = null;\n      if (relative.host) {\n        if (relPath[0] === '') relPath[0] = relative.host;\n        else relPath.unshift(relative.host);\n      }\n      relative.host = null;\n    }\n    mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n  }\n\n  if (isRelAbs) {\n    // it's absolute.\n    result.host = (relative.host || relative.host === '') ?\n                  relative.host : result.host;\n    result.hostname = (relative.hostname || relative.hostname === '') ?\n                      relative.hostname : result.hostname;\n    result.search = relative.search;\n    result.query = relative.query;\n    srcPath = relPath;\n    // fall through to the dot-handling below.\n  } else if (relPath.length) {\n    // it's relative\n    // throw away the existing file, and take the new path instead.\n    if (!srcPath) srcPath = [];\n    srcPath.pop();\n    srcPath = srcPath.concat(relPath);\n    result.search = relative.search;\n    result.query = relative.query;\n  } else if (!util.isNullOrUndefined(relative.search)) {\n    // just pull out the search.\n    // like href='?foo'.\n    // Put this after the other two cases because it simplifies the booleans\n    if (psychotic) {\n      result.hostname = result.host = srcPath.shift();\n      //occationaly the auth can get stuck only in host\n      //this especially happens in cases like\n      //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n      var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                       result.host.split('@') : false;\n      if (authInHost) {\n        result.auth = authInHost.shift();\n        result.host = result.hostname = authInHost.shift();\n      }\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    //to support http.request\n    if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n      result.path = (result.pathname ? result.pathname : '') +\n                    (result.search ? result.search : '');\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  if (!srcPath.length) {\n    // no path at all.  easy.\n    // we've already handled the other stuff above.\n    result.pathname = null;\n    //to support http.request\n    if (result.search) {\n      result.path = '/' + result.search;\n    } else {\n      result.path = null;\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  // if a url ENDs in . or .., then it must get a trailing slash.\n  // however, if it ends in anything else non-slashy,\n  // then it must NOT get a trailing slash.\n  var last = srcPath.slice(-1)[0];\n  var hasTrailingSlash = (\n      (result.host || relative.host || srcPath.length > 1) &&\n      (last === '.' || last === '..') || last === '');\n\n  // strip single dots, resolve double dots to parent dir\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = srcPath.length; i >= 0; i--) {\n    last = srcPath[i];\n    if (last === '.') {\n      srcPath.splice(i, 1);\n    } else if (last === '..') {\n      srcPath.splice(i, 1);\n      up++;\n    } else if (up) {\n      srcPath.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (!mustEndAbs && !removeAllDots) {\n    for (; up--; up) {\n      srcPath.unshift('..');\n    }\n  }\n\n  if (mustEndAbs && srcPath[0] !== '' &&\n      (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n    srcPath.unshift('');\n  }\n\n  if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n    srcPath.push('');\n  }\n\n  var isAbsolute = srcPath[0] === '' ||\n      (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n  // put the host back\n  if (psychotic) {\n    result.hostname = result.host = isAbsolute ? '' :\n                                    srcPath.length ? srcPath.shift() : '';\n    //occationaly the auth can get stuck only in host\n    //this especially happens in cases like\n    //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n    var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                     result.host.split('@') : false;\n    if (authInHost) {\n      result.auth = authInHost.shift();\n      result.host = result.hostname = authInHost.shift();\n    }\n  }\n\n  mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n  if (mustEndAbs && !isAbsolute) {\n    srcPath.unshift('');\n  }\n\n  if (!srcPath.length) {\n    result.pathname = null;\n    result.path = null;\n  } else {\n    result.pathname = srcPath.join('/');\n  }\n\n  //to support request.http\n  if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n    result.path = (result.pathname ? result.pathname : '') +\n                  (result.search ? result.search : '');\n  }\n  result.auth = relative.auth || result.auth;\n  result.slashes = result.slashes || relative.slashes;\n  result.href = result.format();\n  return result;\n};\n\nUrl.prototype.parseHost = function() {\n  var host = this.host;\n  var port = portPattern.exec(host);\n  if (port) {\n    port = port[0];\n    if (port !== ':') {\n      this.port = port.substr(1);\n    }\n    host = host.substr(0, host.length - port.length);\n  }\n  if (host) this.hostname = host;\n};\n","'use strict';\n\nmodule.exports = {\n  isString: function(arg) {\n    return typeof(arg) === 'string';\n  },\n  isObject: function(arg) {\n    return typeof(arg) === 'object' && arg !== null;\n  },\n  isNull: function(arg) {\n    return arg === null;\n  },\n  isNullOrUndefined: function(arg) {\n    return arg == null;\n  }\n};\n","import * as core from '../core';\nimport Device from 'ismobilejs';\nimport accessibleTarget from './accessibleTarget';\n\n// add some extra variables to the container..\ncore.utils.mixins.delayMixin(\n    core.DisplayObject.prototype,\n    accessibleTarget\n);\n\nconst KEY_CODE_TAB = 9;\n\nconst DIV_TOUCH_SIZE = 100;\nconst DIV_TOUCH_POS_X = 0;\nconst DIV_TOUCH_POS_Y = 0;\nconst DIV_TOUCH_ZINDEX = 2;\n\nconst DIV_HOOK_SIZE = 1;\nconst DIV_HOOK_POS_X = -1000;\nconst DIV_HOOK_POS_Y = -1000;\nconst DIV_HOOK_ZINDEX = 2;\n\n/**\n * The Accessibility manager recreates the ability to tab and have content read by screen\n * readers. This is very important as it can possibly help people with disabilities access pixi\n * content.\n *\n * Much like interaction any DisplayObject can be made accessible. This manager will map the\n * events as if the mouse was being used, minimizing the effort required to implement.\n *\n * An instance of this class is automatically created by default, and can be found at renderer.plugins.accessibility\n *\n * @class\n * @memberof PIXI.accessibility\n */\nexport default class AccessibilityManager\n{\n    /**\n     * @param {PIXI.CanvasRenderer|PIXI.WebGLRenderer} renderer - A reference to the current renderer\n     */\n    constructor(renderer)\n    {\n        if ((Device.tablet || Device.phone) && !navigator.isCocoonJS)\n        {\n            this.createTouchHook();\n        }\n\n        // first we create a div that will sit over the PixiJS element. This is where the div overlays will go.\n        const div = document.createElement('div');\n\n        div.style.width = `${DIV_TOUCH_SIZE}px`;\n        div.style.height = `${DIV_TOUCH_SIZE}px`;\n        div.style.position = 'absolute';\n        div.style.top = `${DIV_TOUCH_POS_X}px`;\n        div.style.left = `${DIV_TOUCH_POS_Y}px`;\n        div.style.zIndex = DIV_TOUCH_ZINDEX;\n\n        /**\n         * This is the dom element that will sit over the PixiJS element. This is where the div overlays will go.\n         *\n         * @type {HTMLElement}\n         * @private\n         */\n        this.div = div;\n\n        /**\n         * A simple pool for storing divs.\n         *\n         * @type {*}\n         * @private\n         */\n        this.pool = [];\n\n        /**\n         * This is a tick used to check if an object is no longer being rendered.\n         *\n         * @type {Number}\n         * @private\n         */\n        this.renderId = 0;\n\n        /**\n         * Setting this to true will visually show the divs.\n         *\n         * @type {boolean}\n         */\n        this.debug = false;\n\n        /**\n         * The renderer this accessibility manager works for.\n         *\n         * @member {PIXI.SystemRenderer}\n         */\n        this.renderer = renderer;\n\n        /**\n         * The array of currently active accessible items.\n         *\n         * @member {Array<*>}\n         * @private\n         */\n        this.children = [];\n\n        /**\n         * pre-bind the functions\n         *\n         * @private\n         */\n        this._onKeyDown = this._onKeyDown.bind(this);\n        this._onMouseMove = this._onMouseMove.bind(this);\n\n        /**\n         * stores the state of the manager. If there are no accessible objects or the mouse is moving, this will be false.\n         *\n         * @member {Array<*>}\n         * @private\n         */\n        this.isActive = false;\n        this.isMobileAccessabillity = false;\n\n        // let listen for tab.. once pressed we can fire up and show the accessibility layer\n        window.addEventListener('keydown', this._onKeyDown, false);\n    }\n\n    /**\n     * Creates the touch hooks.\n     *\n     */\n    createTouchHook()\n    {\n        const hookDiv = document.createElement('button');\n\n        hookDiv.style.width = `${DIV_HOOK_SIZE}px`;\n        hookDiv.style.height = `${DIV_HOOK_SIZE}px`;\n        hookDiv.style.position = 'absolute';\n        hookDiv.style.top = `${DIV_HOOK_POS_X}px`;\n        hookDiv.style.left = `${DIV_HOOK_POS_Y}px`;\n        hookDiv.style.zIndex = DIV_HOOK_ZINDEX;\n        hookDiv.style.backgroundColor = '#FF0000';\n        hookDiv.title = 'HOOK DIV';\n\n        hookDiv.addEventListener('focus', () =>\n        {\n            this.isMobileAccessabillity = true;\n            this.activate();\n            document.body.removeChild(hookDiv);\n        });\n\n        document.body.appendChild(hookDiv);\n    }\n\n    /**\n     * Activating will cause the Accessibility layer to be shown. This is called when a user\n     * preses the tab key.\n     *\n     * @private\n     */\n    activate()\n    {\n        if (this.isActive)\n        {\n            return;\n        }\n\n        this.isActive = true;\n\n        window.document.addEventListener('mousemove', this._onMouseMove, true);\n        window.removeEventListener('keydown', this._onKeyDown, false);\n\n        this.renderer.on('postrender', this.update, this);\n\n        if (this.renderer.view.parentNode)\n        {\n            this.renderer.view.parentNode.appendChild(this.div);\n        }\n    }\n\n    /**\n     * Deactivating will cause the Accessibility layer to be hidden. This is called when a user moves\n     * the mouse.\n     *\n     * @private\n     */\n    deactivate()\n    {\n        if (!this.isActive || this.isMobileAccessabillity)\n        {\n            return;\n        }\n\n        this.isActive = false;\n\n        window.document.removeEventListener('mousemove', this._onMouseMove);\n        window.addEventListener('keydown', this._onKeyDown, false);\n\n        this.renderer.off('postrender', this.update);\n\n        if (this.div.parentNode)\n        {\n            this.div.parentNode.removeChild(this.div);\n        }\n    }\n\n    /**\n     * This recursive function will run through the scene graph and add any new accessible objects to the DOM layer.\n     *\n     * @private\n     * @param {PIXI.Container} displayObject - The DisplayObject to check.\n     */\n    updateAccessibleObjects(displayObject)\n    {\n        if (!displayObject.visible)\n        {\n            return;\n        }\n\n        if (displayObject.accessible && displayObject.interactive)\n        {\n            if (!displayObject._accessibleActive)\n            {\n                this.addChild(displayObject);\n            }\n\n            displayObject.renderId = this.renderId;\n        }\n\n        const children = displayObject.children;\n\n        for (let i = children.length - 1; i >= 0; i--)\n        {\n            this.updateAccessibleObjects(children[i]);\n        }\n    }\n\n    /**\n     * Before each render this function will ensure that all divs are mapped correctly to their DisplayObjects.\n     *\n     * @private\n     */\n    update()\n    {\n        if (!this.renderer.renderingToScreen)\n        {\n            return;\n        }\n\n        // update children...\n        this.updateAccessibleObjects(this.renderer._lastObjectRendered);\n\n        const rect = this.renderer.view.getBoundingClientRect();\n        const sx = rect.width / this.renderer.width;\n        const sy = rect.height / this.renderer.height;\n\n        let div = this.div;\n\n        div.style.left = `${rect.left}px`;\n        div.style.top = `${rect.top}px`;\n        div.style.width = `${this.renderer.width}px`;\n        div.style.height = `${this.renderer.height}px`;\n\n        for (let i = 0; i < this.children.length; i++)\n        {\n            const child = this.children[i];\n\n            if (child.renderId !== this.renderId)\n            {\n                child._accessibleActive = false;\n\n                core.utils.removeItems(this.children, i, 1);\n                this.div.removeChild(child._accessibleDiv);\n                this.pool.push(child._accessibleDiv);\n                child._accessibleDiv = null;\n\n                i--;\n\n                if (this.children.length === 0)\n                {\n                    this.deactivate();\n                }\n            }\n            else\n            {\n                // map div to display..\n                div = child._accessibleDiv;\n                let hitArea = child.hitArea;\n                const wt = child.worldTransform;\n\n                if (child.hitArea)\n                {\n                    div.style.left = `${(wt.tx + (hitArea.x * wt.a)) * sx}px`;\n                    div.style.top = `${(wt.ty + (hitArea.y * wt.d)) * sy}px`;\n\n                    div.style.width = `${hitArea.width * wt.a * sx}px`;\n                    div.style.height = `${hitArea.height * wt.d * sy}px`;\n                }\n                else\n                {\n                    hitArea = child.getBounds();\n\n                    this.capHitArea(hitArea);\n\n                    div.style.left = `${hitArea.x * sx}px`;\n                    div.style.top = `${hitArea.y * sy}px`;\n\n                    div.style.width = `${hitArea.width * sx}px`;\n                    div.style.height = `${hitArea.height * sy}px`;\n                }\n            }\n        }\n\n        // increment the render id..\n        this.renderId++;\n    }\n\n    /**\n     * TODO: docs.\n     *\n     * @param {Rectangle} hitArea - TODO docs\n     */\n    capHitArea(hitArea)\n    {\n        if (hitArea.x < 0)\n        {\n            hitArea.width += hitArea.x;\n            hitArea.x = 0;\n        }\n\n        if (hitArea.y < 0)\n        {\n            hitArea.height += hitArea.y;\n            hitArea.y = 0;\n        }\n\n        if (hitArea.x + hitArea.width > this.renderer.width)\n        {\n            hitArea.width = this.renderer.width - hitArea.x;\n        }\n\n        if (hitArea.y + hitArea.height > this.renderer.height)\n        {\n            hitArea.height = this.renderer.height - hitArea.y;\n        }\n    }\n\n    /**\n     * Adds a DisplayObject to the accessibility manager\n     *\n     * @private\n     * @param {DisplayObject} displayObject - The child to make accessible.\n     */\n    addChild(displayObject)\n    {\n        //    this.activate();\n\n        let div = this.pool.pop();\n\n        if (!div)\n        {\n            div = document.createElement('button');\n\n            div.style.width = `${DIV_TOUCH_SIZE}px`;\n            div.style.height = `${DIV_TOUCH_SIZE}px`;\n            div.style.backgroundColor = this.debug ? 'rgba(255,0,0,0.5)' : 'transparent';\n            div.style.position = 'absolute';\n            div.style.zIndex = DIV_TOUCH_ZINDEX;\n            div.style.borderStyle = 'none';\n\n            div.addEventListener('click', this._onClick.bind(this));\n            div.addEventListener('focus', this._onFocus.bind(this));\n            div.addEventListener('focusout', this._onFocusOut.bind(this));\n        }\n\n        if (displayObject.accessibleTitle)\n        {\n            div.title = displayObject.accessibleTitle;\n        }\n        else if (!displayObject.accessibleTitle && !displayObject.accessibleHint)\n        {\n            div.title = `displayObject ${this.tabIndex}`;\n        }\n\n        if (displayObject.accessibleHint)\n        {\n            div.setAttribute('aria-label', displayObject.accessibleHint);\n        }\n\n        //\n\n        displayObject._accessibleActive = true;\n        displayObject._accessibleDiv = div;\n        div.displayObject = displayObject;\n\n        this.children.push(displayObject);\n        this.div.appendChild(displayObject._accessibleDiv);\n        displayObject._accessibleDiv.tabIndex = displayObject.tabIndex;\n    }\n\n    /**\n     * Maps the div button press to pixi's InteractionManager (click)\n     *\n     * @private\n     * @param {MouseEvent} e - The click event.\n     */\n    _onClick(e)\n    {\n        const interactionManager = this.renderer.plugins.interaction;\n\n        interactionManager.dispatchEvent(e.target.displayObject, 'click', interactionManager.eventData);\n    }\n\n    /**\n     * Maps the div focus events to pixi's InteractionManager (mouseover)\n     *\n     * @private\n     * @param {FocusEvent} e - The focus event.\n     */\n    _onFocus(e)\n    {\n        const interactionManager = this.renderer.plugins.interaction;\n\n        interactionManager.dispatchEvent(e.target.displayObject, 'mouseover', interactionManager.eventData);\n    }\n\n    /**\n     * Maps the div focus events to pixi's InteractionManager (mouseout)\n     *\n     * @private\n     * @param {FocusEvent} e - The focusout event.\n     */\n    _onFocusOut(e)\n    {\n        const interactionManager = this.renderer.plugins.interaction;\n\n        interactionManager.dispatchEvent(e.target.displayObject, 'mouseout', interactionManager.eventData);\n    }\n\n    /**\n     * Is called when a key is pressed\n     *\n     * @private\n     * @param {KeyboardEvent} e - The keydown event.\n     */\n    _onKeyDown(e)\n    {\n        if (e.keyCode !== KEY_CODE_TAB)\n        {\n            return;\n        }\n\n        this.activate();\n    }\n\n    /**\n     * Is called when the mouse moves across the renderer element\n     *\n     * @private\n     */\n    _onMouseMove()\n    {\n        this.deactivate();\n    }\n\n    /**\n     * Destroys the accessibility manager\n     *\n     */\n    destroy()\n    {\n        this.div = null;\n\n        for (let i = 0; i < this.children.length; i++)\n        {\n            this.children[i].div = null;\n        }\n\n        window.document.removeEventListener('mousemove', this._onMouseMove);\n        window.removeEventListener('keydown', this._onKeyDown);\n\n        this.pool = null;\n        this.children = null;\n        this.renderer = null;\n    }\n}\n\ncore.WebGLRenderer.registerPlugin('accessibility', AccessibilityManager);\ncore.CanvasRenderer.registerPlugin('accessibility', AccessibilityManager);\n","/**\n * Default property values of accessible objects\n * used by {@link PIXI.accessibility.AccessibilityManager}.\n *\n * @function accessibleTarget\n * @memberof PIXI.accessibility\n * @example\n *      function MyObject() {}\n *\n *      Object.assign(\n *          MyObject.prototype,\n *          PIXI.accessibility.accessibleTarget\n *      );\n */\nexport default {\n    /**\n     *  Flag for if the object is accessible. If true AccessibilityManager will overlay a\n     *   shadow div with attributes set\n     *\n     * @member {boolean}\n     */\n    accessible: false,\n\n    /**\n     * Sets the title attribute of the shadow div\n     * If accessibleTitle AND accessibleHint has not been this will default to 'displayObject [tabIndex]'\n     *\n     * @member {string}\n     */\n    accessibleTitle: null,\n\n    /**\n     * Sets the aria-label attribute of the shadow div\n     *\n     * @member {string}\n     */\n    accessibleHint: null,\n\n    /**\n     * @todo Needs docs.\n     */\n    tabIndex: 0,\n\n    /**\n     * @todo Needs docs.\n     */\n    _accessibleActive: false,\n\n    /**\n     * @todo Needs docs.\n     */\n    _accessibleDiv: false,\n};\n","/**\n * This namespace contains a renderer plugin for interaction accessibility for end-users\n * with physical impairments which require screen-renders, keyboard navigation, etc.\n *\n * Do not instantiate this plugin directly. It is available from the `renderer.plugins` property.\n * See {@link PIXI.CanvasRenderer#plugins} or {@link PIXI.WebGLRenderer#plugins}.\n * @namespace PIXI.accessibility\n */\nexport { default as accessibleTarget } from './accessibleTarget';\nexport { default as AccessibilityManager } from './AccessibilityManager';\n","import { autoDetectRenderer } from './autoDetectRenderer';\nimport Container from './display/Container';\nimport { shared, Ticker } from './ticker';\nimport settings from './settings';\nimport { UPDATE_PRIORITY } from './const';\n\n/**\n * Convenience class to create a new PIXI application.\n * This class automatically creates the renderer, ticker\n * and root container.\n *\n * @example\n * // Create the application\n * const app = new PIXI.Application();\n *\n * // Add the view to the DOM\n * document.body.appendChild(app.view);\n *\n * // ex, add display objects\n * app.stage.addChild(PIXI.Sprite.fromImage('something.png'));\n *\n * @class\n * @memberof PIXI\n */\nexport default class Application\n{\n    // eslint-disable-next-line valid-jsdoc\n    /**\n     * @param {object} [options] - The optional renderer parameters\n     * @param {boolean} [options.autoStart=true] - automatically starts the rendering after the construction.\n     *     Note that setting this parameter to false does NOT stop the shared ticker even if you set\n     *     options.sharedTicker to true in case that it is already started. Stop it by your own.\n     * @param {number} [options.width=800] - the width of the renderers view\n     * @param {number} [options.height=600] - the height of the renderers view\n     * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional\n     * @param {boolean} [options.transparent=false] - If the render view is transparent, default false\n     * @param {boolean} [options.antialias=false] - sets antialias (only applicable in chrome at the moment)\n     * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation, enable this if you\n     *  need to call toDataUrl on the webgl context\n     * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer, retina would be 2\n     * @param {boolean} [options.forceCanvas=false] - prevents selection of WebGL renderer, even if such is present\n     * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n     *  (shown if not transparent).\n     * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or\n     *   not before the new render pass.\n     * @param {boolean} [options.roundPixels=false] - If true PixiJS will Math.floor() x/y values when rendering,\n     *  stopping pixel interpolation.\n     * @param {boolean} [options.forceFXAA=false] - forces FXAA antialiasing to be used over native.\n     *  FXAA is faster, but may not always look as great **webgl only**\n     * @param {boolean} [options.legacy=false] - `true` to ensure compatibility with older / less advanced devices.\n     *  If you experience unexplained flickering try setting this to true. **webgl only**\n     * @param {string} [options.powerPreference] - Parameter passed to webgl context, set to \"high-performance\"\n     *  for devices with dual graphics card **webgl only**\n     * @param {boolean} [options.sharedTicker=false] - `true` to use PIXI.ticker.shared, `false` to create new ticker.\n     * @param {boolean} [options.sharedLoader=false] - `true` to use PIXI.loaders.shared, `false` to create new Loader.\n     */\n    constructor(options, arg2, arg3, arg4, arg5)\n    {\n        // Support for constructor(width, height, options, noWebGL, useSharedTicker)\n        if (typeof options === 'number')\n        {\n            options = Object.assign({\n                width: options,\n                height: arg2 || settings.RENDER_OPTIONS.height,\n                forceCanvas: !!arg4,\n                sharedTicker: !!arg5,\n            }, arg3);\n        }\n\n        /**\n         * The default options, so we mixin functionality later.\n         * @member {object}\n         * @protected\n         */\n        this._options = options = Object.assign({\n            autoStart: true,\n            sharedTicker: false,\n            forceCanvas: false,\n            sharedLoader: false,\n        }, options);\n\n        /**\n         * WebGL renderer if available, otherwise CanvasRenderer\n         * @member {PIXI.WebGLRenderer|PIXI.CanvasRenderer}\n         */\n        this.renderer = autoDetectRenderer(options);\n\n        /**\n         * The root display container that's rendered.\n         * @member {PIXI.Container}\n         */\n        this.stage = new Container();\n\n        /**\n         * Internal reference to the ticker\n         * @member {PIXI.ticker.Ticker}\n         * @private\n         */\n        this._ticker = null;\n\n        /**\n         * Ticker for doing render updates.\n         * @member {PIXI.ticker.Ticker}\n         * @default PIXI.ticker.shared\n         */\n        this.ticker = options.sharedTicker ? shared : new Ticker();\n\n        // Start the rendering\n        if (options.autoStart)\n        {\n            this.start();\n        }\n    }\n\n    set ticker(ticker) // eslint-disable-line require-jsdoc\n    {\n        if (this._ticker)\n        {\n            this._ticker.remove(this.render, this);\n        }\n        this._ticker = ticker;\n        if (ticker)\n        {\n            ticker.add(this.render, this, UPDATE_PRIORITY.LOW);\n        }\n    }\n    get ticker() // eslint-disable-line require-jsdoc\n    {\n        return this._ticker;\n    }\n\n    /**\n     * Render the current stage.\n     */\n    render()\n    {\n        this.renderer.render(this.stage);\n    }\n\n    /**\n     * Convenience method for stopping the render.\n     */\n    stop()\n    {\n        this._ticker.stop();\n    }\n\n    /**\n     * Convenience method for starting the render.\n     */\n    start()\n    {\n        this._ticker.start();\n    }\n\n    /**\n     * Reference to the renderer's canvas element.\n     * @member {HTMLCanvasElement}\n     * @readonly\n     */\n    get view()\n    {\n        return this.renderer.view;\n    }\n\n    /**\n     * Reference to the renderer's screen rectangle. Its safe to use as filterArea or hitArea for whole screen\n     * @member {PIXI.Rectangle}\n     * @readonly\n     */\n    get screen()\n    {\n        return this.renderer.screen;\n    }\n\n    /**\n     * Destroy and don't use after this.\n     * @param {Boolean} [removeView=false] Automatically remove canvas from DOM.\n     */\n    destroy(removeView)\n    {\n        const oldTicker = this._ticker;\n\n        this.ticker = null;\n\n        oldTicker.destroy();\n\n        this.stage.destroy();\n        this.stage = null;\n\n        this.renderer.destroy(removeView);\n        this.renderer = null;\n\n        this._options = null;\n    }\n}\n","import { GLShader } from 'pixi-gl-core';\nimport settings from './settings';\n\nfunction checkPrecision(src, def)\n{\n    if (src instanceof Array)\n    {\n        if (src[0].substring(0, 9) !== 'precision')\n        {\n            const copy = src.slice(0);\n\n            copy.unshift(`precision ${def} float;`);\n\n            return copy;\n        }\n    }\n    else if (src.substring(0, 9) !== 'precision')\n    {\n        return `precision ${def} float;\\n${src}`;\n    }\n\n    return src;\n}\n\n/**\n * Wrapper class, webGL Shader for Pixi.\n * Adds precision string if vertexSrc or fragmentSrc have no mention of it.\n *\n * @class\n * @extends GLShader\n * @memberof PIXI\n */\nexport default class Shader extends GLShader\n{\n    /**\n     *\n     * @param {WebGLRenderingContext} gl - The current WebGL rendering context\n     * @param {string|string[]} vertexSrc - The vertex shader source as an array of strings.\n     * @param {string|string[]} fragmentSrc - The fragment shader source as an array of strings.\n     */\n    constructor(gl, vertexSrc, fragmentSrc)\n    {\n        super(gl, checkPrecision(vertexSrc, settings.PRECISION_VERTEX),\n            checkPrecision(fragmentSrc, settings.PRECISION_FRAGMENT));\n    }\n}\n","import * as utils from './utils';\nimport CanvasRenderer from './renderers/canvas/CanvasRenderer';\nimport WebGLRenderer from './renderers/webgl/WebGLRenderer';\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * This helper function will automatically detect which renderer you should be using.\n * WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by\n * the browser then this function will return a canvas renderer\n *\n * @memberof PIXI\n * @function autoDetectRenderer\n * @param {object} [options] - The optional renderer parameters\n * @param {number} [options.width=800] - the width of the renderers view\n * @param {number} [options.height=600] - the height of the renderers view\n * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional\n * @param {boolean} [options.transparent=false] - If the render view is transparent, default false\n * @param {boolean} [options.antialias=false] - sets antialias (only applicable in chrome at the moment)\n * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation, enable this if you\n *  need to call toDataUrl on the webgl context\n * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n *  (shown if not transparent).\n * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or\n *   not before the new render pass.\n * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer, retina would be 2\n * @param {boolean} [options.forceCanvas=false] - prevents selection of WebGL renderer, even if such is present\n * @param {boolean} [options.roundPixels=false] - If true PixiJS will Math.floor() x/y values when rendering,\n *  stopping pixel interpolation.\n * @param {boolean} [options.forceFXAA=false] - forces FXAA antialiasing to be used over native.\n *  FXAA is faster, but may not always look as great **webgl only**\n * @param {boolean} [options.legacy=false] - `true` to ensure compatibility with older / less advanced devices.\n *  If you experience unexplained flickering try setting this to true. **webgl only**\n * @param {string} [options.powerPreference] - Parameter passed to webgl context, set to \"high-performance\"\n *  for devices with dual graphics card **webgl only**\n * @return {PIXI.WebGLRenderer|PIXI.CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer\n */\nexport function autoDetectRenderer(options, arg1, arg2, arg3)\n{\n    // Backward-compatible support for noWebGL option\n    let forceCanvas = options && options.forceCanvas;\n\n    if (arg3 !== undefined)\n    {\n        forceCanvas = arg3;\n    }\n\n    if (!forceCanvas && utils.isWebGLSupported())\n    {\n        return new WebGLRenderer(options, arg1, arg2);\n    }\n\n    return new CanvasRenderer(options, arg1, arg2);\n}\n","/**\n * String of the current PIXI version.\n *\n * @static\n * @constant\n * @memberof PIXI\n * @name VERSION\n * @type {string}\n */\nexport const VERSION = __VERSION__;\n\n/**\n * Two Pi.\n *\n * @static\n * @constant\n * @memberof PIXI\n * @type {number}\n */\nexport const PI_2 = Math.PI * 2;\n\n/**\n * Conversion factor for converting radians to degrees.\n *\n * @static\n * @constant\n * @memberof PIXI\n * @type {number}\n */\nexport const RAD_TO_DEG = 180 / Math.PI;\n\n/**\n * Conversion factor for converting degrees to radians.\n *\n * @static\n * @constant\n * @memberof PIXI\n * @type {number}\n */\nexport const DEG_TO_RAD = Math.PI / 180;\n\n/**\n * Constant to identify the Renderer Type.\n *\n * @static\n * @constant\n * @memberof PIXI\n * @name RENDERER_TYPE\n * @type {object}\n * @property {number} UNKNOWN - Unknown render type.\n * @property {number} WEBGL - WebGL render type.\n * @property {number} CANVAS - Canvas render type.\n */\nexport const RENDERER_TYPE = {\n    UNKNOWN:    0,\n    WEBGL:      1,\n    CANVAS:     2,\n};\n\n/**\n * Various blend modes supported by PIXI.\n *\n * IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes.\n * Anything else will silently act like NORMAL.\n *\n * @static\n * @constant\n * @memberof PIXI\n * @name BLEND_MODES\n * @type {object}\n * @property {number} NORMAL\n * @property {number} ADD\n * @property {number} MULTIPLY\n * @property {number} SCREEN\n * @property {number} OVERLAY\n * @property {number} DARKEN\n * @property {number} LIGHTEN\n * @property {number} COLOR_DODGE\n * @property {number} COLOR_BURN\n * @property {number} HARD_LIGHT\n * @property {number} SOFT_LIGHT\n * @property {number} DIFFERENCE\n * @property {number} EXCLUSION\n * @property {number} HUE\n * @property {number} SATURATION\n * @property {number} COLOR\n * @property {number} LUMINOSITY\n */\nexport const BLEND_MODES = {\n    NORMAL:         0,\n    ADD:            1,\n    MULTIPLY:       2,\n    SCREEN:         3,\n    OVERLAY:        4,\n    DARKEN:         5,\n    LIGHTEN:        6,\n    COLOR_DODGE:    7,\n    COLOR_BURN:     8,\n    HARD_LIGHT:     9,\n    SOFT_LIGHT:     10,\n    DIFFERENCE:     11,\n    EXCLUSION:      12,\n    HUE:            13,\n    SATURATION:     14,\n    COLOR:          15,\n    LUMINOSITY:     16,\n    NORMAL_NPM:     17,\n    ADD_NPM:        18,\n    SCREEN_NPM:     19,\n};\n\n/**\n * Various webgl draw modes. These can be used to specify which GL drawMode to use\n * under certain situations and renderers.\n *\n * @static\n * @constant\n * @memberof PIXI\n * @name DRAW_MODES\n * @type {object}\n * @property {number} POINTS\n * @property {number} LINES\n * @property {number} LINE_LOOP\n * @property {number} LINE_STRIP\n * @property {number} TRIANGLES\n * @property {number} TRIANGLE_STRIP\n * @property {number} TRIANGLE_FAN\n */\nexport const DRAW_MODES = {\n    POINTS:         0,\n    LINES:          1,\n    LINE_LOOP:      2,\n    LINE_STRIP:     3,\n    TRIANGLES:      4,\n    TRIANGLE_STRIP: 5,\n    TRIANGLE_FAN:   6,\n};\n\n/**\n * The scale modes that are supported by pixi.\n *\n * The {@link PIXI.settings.SCALE_MODE} scale mode affects the default scaling mode of future operations.\n * It can be re-assigned to either LINEAR or NEAREST, depending upon suitability.\n *\n * @static\n * @constant\n * @memberof PIXI\n * @name SCALE_MODES\n * @type {object}\n * @property {number} LINEAR Smooth scaling\n * @property {number} NEAREST Pixelating scaling\n */\nexport const SCALE_MODES = {\n    LINEAR:     0,\n    NEAREST:    1,\n};\n\n/**\n * The wrap modes that are supported by pixi.\n *\n * The {@link PIXI.settings.WRAP_MODE} wrap mode affects the default wraping mode of future operations.\n * It can be re-assigned to either CLAMP or REPEAT, depending upon suitability.\n * If the texture is non power of two then clamp will be used regardless as webGL can\n * only use REPEAT if the texture is po2.\n *\n * This property only affects WebGL.\n *\n * @static\n * @constant\n * @name WRAP_MODES\n * @memberof PIXI\n * @type {object}\n * @property {number} CLAMP - The textures uvs are clamped\n * @property {number} REPEAT - The texture uvs tile and repeat\n * @property {number} MIRRORED_REPEAT - The texture uvs tile and repeat with mirroring\n */\nexport const WRAP_MODES = {\n    CLAMP:          0,\n    REPEAT:         1,\n    MIRRORED_REPEAT: 2,\n};\n\n/**\n * The gc modes that are supported by pixi.\n *\n * The {@link PIXI.settings.GC_MODE} Garbage Collection mode for PixiJS textures is AUTO\n * If set to GC_MODE, the renderer will occasionally check textures usage. If they are not\n * used for a specified period of time they will be removed from the GPU. They will of course\n * be uploaded again when they are required. This is a silent behind the scenes process that\n * should ensure that the GPU does not  get filled up.\n *\n * Handy for mobile devices!\n * This property only affects WebGL.\n *\n * @static\n * @constant\n * @name GC_MODES\n * @memberof PIXI\n * @type {object}\n * @property {number} AUTO - Garbage collection will happen periodically automatically\n * @property {number} MANUAL - Garbage collection will need to be called manually\n */\nexport const GC_MODES = {\n    AUTO:           0,\n    MANUAL:         1,\n};\n\n/**\n * Regexp for image type by extension.\n *\n * @static\n * @constant\n * @memberof PIXI\n * @type {RegExp|string}\n * @example `image.png`\n */\nexport const URL_FILE_EXTENSION = /\\.(\\w{3,4})(?:$|\\?|#)/i;\n\n/**\n * Regexp for data URI.\n * Based on: {@link https://github.com/ragingwind/data-uri-regex}\n *\n * @static\n * @constant\n * @name DATA_URI\n * @memberof PIXI\n * @type {RegExp|string}\n * @example data:image/png;base64\n */\nexport const DATA_URI = /^\\s*data:(?:([\\w-]+)\\/([\\w+.-]+))?(?:;(charset=[\\w-]+|base64))?,(.*)/i;\n\n/**\n * Regexp for SVG size.\n *\n * @static\n * @constant\n * @name SVG_SIZE\n * @memberof PIXI\n * @type {RegExp|string}\n * @example &lt;svg width=\"100\" height=\"100\"&gt;&lt;/svg&gt;\n */\nexport const SVG_SIZE = /<svg[^>]*(?:\\s(width|height)=('|\")(\\d*(?:\\.\\d+)?)(?:px)?('|\"))[^>]*(?:\\s(width|height)=('|\")(\\d*(?:\\.\\d+)?)(?:px)?('|\"))[^>]*>/i; // eslint-disable-line max-len\n\n/**\n * Constants that identify shapes, mainly to prevent `instanceof` calls.\n *\n * @static\n * @constant\n * @name SHAPES\n * @memberof PIXI\n * @type {object}\n * @property {number} POLY Polygon\n * @property {number} RECT Rectangle\n * @property {number} CIRC Circle\n * @property {number} ELIP Ellipse\n * @property {number} RREC Rounded Rectangle\n */\nexport const SHAPES = {\n    POLY: 0,\n    RECT: 1,\n    CIRC: 2,\n    ELIP: 3,\n    RREC: 4,\n};\n\n/**\n * Constants that specify float precision in shaders.\n *\n * @static\n * @constant\n * @name PRECISION\n * @memberof PIXI\n * @type {object}\n * @property {string} LOW='lowp'\n * @property {string} MEDIUM='mediump'\n * @property {string} HIGH='highp'\n */\nexport const PRECISION = {\n    LOW: 'lowp',\n    MEDIUM: 'mediump',\n    HIGH: 'highp',\n};\n\n/**\n * Constants that specify the transform type.\n *\n * @static\n * @constant\n * @name TRANSFORM_MODE\n * @memberof PIXI\n * @type {object}\n * @property {number} STATIC\n * @property {number} DYNAMIC\n */\nexport const TRANSFORM_MODE = {\n    STATIC:     0,\n    DYNAMIC:    1,\n};\n\n/**\n * Constants that define the type of gradient on text.\n *\n * @static\n * @constant\n * @name TEXT_GRADIENT\n * @memberof PIXI\n * @type {object}\n * @property {number} LINEAR_VERTICAL Vertical gradient\n * @property {number} LINEAR_HORIZONTAL Linear gradient\n */\nexport const TEXT_GRADIENT = {\n    LINEAR_VERTICAL: 0,\n    LINEAR_HORIZONTAL: 1,\n};\n\n/**\n * Represents the update priorities used by internal PIXI classes when registered with\n * the {@link PIXI.ticker.Ticker} object. Higher priority items are updated first and lower\n * priority items, such as render, should go later.\n *\n * @static\n * @constant\n * @name UPDATE_PRIORITY\n * @memberof PIXI\n * @type {object}\n * @property {number} INTERACTION=50 Highest priority, used for {@link PIXI.interaction.InteractionManager}\n * @property {number} HIGH=25 High priority updating, {@link PIXI.VideoBaseTexture} and {@link PIXI.extras.AnimatedSprite}\n * @property {number} NORMAL=0 Default priority for ticker events, see {@link PIXI.ticker.Ticker#add}.\n * @property {number} LOW=-25 Low priority used for {@link PIXI.Application} rendering.\n * @property {number} UTILITY=-50 Lowest priority used for {@link PIXI.prepare.BasePrepare} utility.\n */\nexport const UPDATE_PRIORITY = {\n    INTERACTION: 50,\n    HIGH: 25,\n    NORMAL: 0,\n    LOW: -25,\n    UTILITY: -50,\n};\n","import { Rectangle } from '../math';\n\n/**\n * 'Builder' pattern for bounds rectangles\n * Axis-Aligned Bounding Box\n * It is not a shape! Its mutable thing, no 'EMPTY' or that kind of problems\n *\n * @class\n * @memberof PIXI\n */\nexport default class Bounds\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.minX = Infinity;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.minY = Infinity;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.maxX = -Infinity;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.maxY = -Infinity;\n\n        this.rect = null;\n    }\n\n    /**\n     * Checks if bounds are empty.\n     *\n     * @return {boolean} True if empty.\n     */\n    isEmpty()\n    {\n        return this.minX > this.maxX || this.minY > this.maxY;\n    }\n\n    /**\n     * Clears the bounds and resets.\n     *\n     */\n    clear()\n    {\n        this.updateID++;\n\n        this.minX = Infinity;\n        this.minY = Infinity;\n        this.maxX = -Infinity;\n        this.maxY = -Infinity;\n    }\n\n    /**\n     * Can return Rectangle.EMPTY constant, either construct new rectangle, either use your rectangle\n     * It is not guaranteed that it will return tempRect\n     *\n     * @param {PIXI.Rectangle} rect - temporary object will be used if AABB is not empty\n     * @returns {PIXI.Rectangle} A rectangle of the bounds\n     */\n    getRectangle(rect)\n    {\n        if (this.minX > this.maxX || this.minY > this.maxY)\n        {\n            return Rectangle.EMPTY;\n        }\n\n        rect = rect || new Rectangle(0, 0, 1, 1);\n\n        rect.x = this.minX;\n        rect.y = this.minY;\n        rect.width = this.maxX - this.minX;\n        rect.height = this.maxY - this.minY;\n\n        return rect;\n    }\n\n    /**\n     * This function should be inlined when its possible.\n     *\n     * @param {PIXI.Point} point - The point to add.\n     */\n    addPoint(point)\n    {\n        this.minX = Math.min(this.minX, point.x);\n        this.maxX = Math.max(this.maxX, point.x);\n        this.minY = Math.min(this.minY, point.y);\n        this.maxY = Math.max(this.maxY, point.y);\n    }\n\n    /**\n     * Adds a quad, not transformed\n     *\n     * @param {Float32Array} vertices - The verts to add.\n     */\n    addQuad(vertices)\n    {\n        let minX = this.minX;\n        let minY = this.minY;\n        let maxX = this.maxX;\n        let maxY = this.maxY;\n\n        let x = vertices[0];\n        let y = vertices[1];\n\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        x = vertices[2];\n        y = vertices[3];\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        x = vertices[4];\n        y = vertices[5];\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        x = vertices[6];\n        y = vertices[7];\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        this.minX = minX;\n        this.minY = minY;\n        this.maxX = maxX;\n        this.maxY = maxY;\n    }\n\n    /**\n     * Adds sprite frame, transformed.\n     *\n     * @param {PIXI.TransformBase} transform - TODO\n     * @param {number} x0 - TODO\n     * @param {number} y0 - TODO\n     * @param {number} x1 - TODO\n     * @param {number} y1 - TODO\n     */\n    addFrame(transform, x0, y0, x1, y1)\n    {\n        const matrix = transform.worldTransform;\n        const a = matrix.a;\n        const b = matrix.b;\n        const c = matrix.c;\n        const d = matrix.d;\n        const tx = matrix.tx;\n        const ty = matrix.ty;\n\n        let minX = this.minX;\n        let minY = this.minY;\n        let maxX = this.maxX;\n        let maxY = this.maxY;\n\n        let x = (a * x0) + (c * y0) + tx;\n        let y = (b * x0) + (d * y0) + ty;\n\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        x = (a * x1) + (c * y0) + tx;\n        y = (b * x1) + (d * y0) + ty;\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        x = (a * x0) + (c * y1) + tx;\n        y = (b * x0) + (d * y1) + ty;\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        x = (a * x1) + (c * y1) + tx;\n        y = (b * x1) + (d * y1) + ty;\n        minX = x < minX ? x : minX;\n        minY = y < minY ? y : minY;\n        maxX = x > maxX ? x : maxX;\n        maxY = y > maxY ? y : maxY;\n\n        this.minX = minX;\n        this.minY = minY;\n        this.maxX = maxX;\n        this.maxY = maxY;\n    }\n\n    /**\n     * Add an array of vertices\n     *\n     * @param {PIXI.TransformBase} transform - TODO\n     * @param {Float32Array} vertices - TODO\n     * @param {number} beginOffset - TODO\n     * @param {number} endOffset - TODO\n     */\n    addVertices(transform, vertices, beginOffset, endOffset)\n    {\n        const matrix = transform.worldTransform;\n        const a = matrix.a;\n        const b = matrix.b;\n        const c = matrix.c;\n        const d = matrix.d;\n        const tx = matrix.tx;\n        const ty = matrix.ty;\n\n        let minX = this.minX;\n        let minY = this.minY;\n        let maxX = this.maxX;\n        let maxY = this.maxY;\n\n        for (let i = beginOffset; i < endOffset; i += 2)\n        {\n            const rawX = vertices[i];\n            const rawY = vertices[i + 1];\n            const x = (a * rawX) + (c * rawY) + tx;\n            const y = (d * rawY) + (b * rawX) + ty;\n\n            minX = x < minX ? x : minX;\n            minY = y < minY ? y : minY;\n            maxX = x > maxX ? x : maxX;\n            maxY = y > maxY ? y : maxY;\n        }\n\n        this.minX = minX;\n        this.minY = minY;\n        this.maxX = maxX;\n        this.maxY = maxY;\n    }\n\n    /**\n     * Adds other Bounds\n     *\n     * @param {PIXI.Bounds} bounds - TODO\n     */\n    addBounds(bounds)\n    {\n        const minX = this.minX;\n        const minY = this.minY;\n        const maxX = this.maxX;\n        const maxY = this.maxY;\n\n        this.minX = bounds.minX < minX ? bounds.minX : minX;\n        this.minY = bounds.minY < minY ? bounds.minY : minY;\n        this.maxX = bounds.maxX > maxX ? bounds.maxX : maxX;\n        this.maxY = bounds.maxY > maxY ? bounds.maxY : maxY;\n    }\n\n    /**\n     * Adds other Bounds, masked with Bounds\n     *\n     * @param {PIXI.Bounds} bounds - TODO\n     * @param {PIXI.Bounds} mask - TODO\n     */\n    addBoundsMask(bounds, mask)\n    {\n        const _minX = bounds.minX > mask.minX ? bounds.minX : mask.minX;\n        const _minY = bounds.minY > mask.minY ? bounds.minY : mask.minY;\n        const _maxX = bounds.maxX < mask.maxX ? bounds.maxX : mask.maxX;\n        const _maxY = bounds.maxY < mask.maxY ? bounds.maxY : mask.maxY;\n\n        if (_minX <= _maxX && _minY <= _maxY)\n        {\n            const minX = this.minX;\n            const minY = this.minY;\n            const maxX = this.maxX;\n            const maxY = this.maxY;\n\n            this.minX = _minX < minX ? _minX : minX;\n            this.minY = _minY < minY ? _minY : minY;\n            this.maxX = _maxX > maxX ? _maxX : maxX;\n            this.maxY = _maxY > maxY ? _maxY : maxY;\n        }\n    }\n\n    /**\n     * Adds other Bounds, masked with Rectangle\n     *\n     * @param {PIXI.Bounds} bounds - TODO\n     * @param {PIXI.Rectangle} area - TODO\n     */\n    addBoundsArea(bounds, area)\n    {\n        const _minX = bounds.minX > area.x ? bounds.minX : area.x;\n        const _minY = bounds.minY > area.y ? bounds.minY : area.y;\n        const _maxX = bounds.maxX < area.x + area.width ? bounds.maxX : (area.x + area.width);\n        const _maxY = bounds.maxY < area.y + area.height ? bounds.maxY : (area.y + area.height);\n\n        if (_minX <= _maxX && _minY <= _maxY)\n        {\n            const minX = this.minX;\n            const minY = this.minY;\n            const maxX = this.maxX;\n            const maxY = this.maxY;\n\n            this.minX = _minX < minX ? _minX : minX;\n            this.minY = _minY < minY ? _minY : minY;\n            this.maxX = _maxX > maxX ? _maxX : maxX;\n            this.maxY = _maxY > maxY ? _maxY : maxY;\n        }\n    }\n}\n","import { removeItems } from '../utils';\nimport DisplayObject from './DisplayObject';\n\n/**\n * A Container represents a collection of display objects.\n * It is the base class of all display objects that act as a container for other objects.\n *\n *```js\n * let container = new PIXI.Container();\n * container.addChild(sprite);\n * ```\n *\n * @class\n * @extends PIXI.DisplayObject\n * @memberof PIXI\n */\nexport default class Container extends DisplayObject\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        super();\n\n        /**\n         * The array of children of this container.\n         *\n         * @member {PIXI.DisplayObject[]}\n         * @readonly\n         */\n        this.children = [];\n    }\n\n    /**\n     * Overridable method that can be used by Container subclasses whenever the children array is modified\n     *\n     * @private\n     */\n    onChildrenChange()\n    {\n        /* empty */\n    }\n\n    /**\n     * Adds one or more children to the container.\n     *\n     * Multiple items can be added like so: `myContainer.addChild(thingOne, thingTwo, thingThree)`\n     *\n     * @param {...PIXI.DisplayObject} child - The DisplayObject(s) to add to the container\n     * @return {PIXI.DisplayObject} The first child that was added.\n     */\n    addChild(child)\n    {\n        const argumentsLength = arguments.length;\n\n        // if there is only one argument we can bypass looping through the them\n        if (argumentsLength > 1)\n        {\n            // loop through the arguments property and add all children\n            // use it the right way (.length and [i]) so that this function can still be optimised by JS runtimes\n            for (let i = 0; i < argumentsLength; i++)\n            {\n                this.addChild(arguments[i]);\n            }\n        }\n        else\n        {\n            // if the child has a parent then lets remove it as PixiJS objects can only exist in one place\n            if (child.parent)\n            {\n                child.parent.removeChild(child);\n            }\n\n            child.parent = this;\n            // ensure child transform will be recalculated\n            child.transform._parentID = -1;\n\n            this.children.push(child);\n\n            // ensure bounds will be recalculated\n            this._boundsID++;\n\n            // TODO - lets either do all callbacks or all events.. not both!\n            this.onChildrenChange(this.children.length - 1);\n            child.emit('added', this);\n        }\n\n        return child;\n    }\n\n    /**\n     * Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown\n     *\n     * @param {PIXI.DisplayObject} child - The child to add\n     * @param {number} index - The index to place the child in\n     * @return {PIXI.DisplayObject} The child that was added.\n     */\n    addChildAt(child, index)\n    {\n        if (index < 0 || index > this.children.length)\n        {\n            throw new Error(`${child}addChildAt: The index ${index} supplied is out of bounds ${this.children.length}`);\n        }\n\n        if (child.parent)\n        {\n            child.parent.removeChild(child);\n        }\n\n        child.parent = this;\n        // ensure child transform will be recalculated\n        child.transform._parentID = -1;\n\n        this.children.splice(index, 0, child);\n\n        // ensure bounds will be recalculated\n        this._boundsID++;\n\n        // TODO - lets either do all callbacks or all events.. not both!\n        this.onChildrenChange(index);\n        child.emit('added', this);\n\n        return child;\n    }\n\n    /**\n     * Swaps the position of 2 Display Objects within this container.\n     *\n     * @param {PIXI.DisplayObject} child - First display object to swap\n     * @param {PIXI.DisplayObject} child2 - Second display object to swap\n     */\n    swapChildren(child, child2)\n    {\n        if (child === child2)\n        {\n            return;\n        }\n\n        const index1 = this.getChildIndex(child);\n        const index2 = this.getChildIndex(child2);\n\n        this.children[index1] = child2;\n        this.children[index2] = child;\n        this.onChildrenChange(index1 < index2 ? index1 : index2);\n    }\n\n    /**\n     * Returns the index position of a child DisplayObject instance\n     *\n     * @param {PIXI.DisplayObject} child - The DisplayObject instance to identify\n     * @return {number} The index position of the child display object to identify\n     */\n    getChildIndex(child)\n    {\n        const index = this.children.indexOf(child);\n\n        if (index === -1)\n        {\n            throw new Error('The supplied DisplayObject must be a child of the caller');\n        }\n\n        return index;\n    }\n\n    /**\n     * Changes the position of an existing child in the display object container\n     *\n     * @param {PIXI.DisplayObject} child - The child DisplayObject instance for which you want to change the index number\n     * @param {number} index - The resulting index number for the child display object\n     */\n    setChildIndex(child, index)\n    {\n        if (index < 0 || index >= this.children.length)\n        {\n            throw new Error('The supplied index is out of bounds');\n        }\n\n        const currentIndex = this.getChildIndex(child);\n\n        removeItems(this.children, currentIndex, 1); // remove from old position\n        this.children.splice(index, 0, child); // add at new position\n\n        this.onChildrenChange(index);\n    }\n\n    /**\n     * Returns the child at the specified index\n     *\n     * @param {number} index - The index to get the child at\n     * @return {PIXI.DisplayObject} The child at the given index, if any.\n     */\n    getChildAt(index)\n    {\n        if (index < 0 || index >= this.children.length)\n        {\n            throw new Error(`getChildAt: Index (${index}) does not exist.`);\n        }\n\n        return this.children[index];\n    }\n\n    /**\n     * Removes one or more children from the container.\n     *\n     * @param {...PIXI.DisplayObject} child - The DisplayObject(s) to remove\n     * @return {PIXI.DisplayObject} The first child that was removed.\n     */\n    removeChild(child)\n    {\n        const argumentsLength = arguments.length;\n\n        // if there is only one argument we can bypass looping through the them\n        if (argumentsLength > 1)\n        {\n            // loop through the arguments property and add all children\n            // use it the right way (.length and [i]) so that this function can still be optimised by JS runtimes\n            for (let i = 0; i < argumentsLength; i++)\n            {\n                this.removeChild(arguments[i]);\n            }\n        }\n        else\n        {\n            const index = this.children.indexOf(child);\n\n            if (index === -1) return null;\n\n            child.parent = null;\n            // ensure child transform will be recalculated\n            child.transform._parentID = -1;\n            removeItems(this.children, index, 1);\n\n            // ensure bounds will be recalculated\n            this._boundsID++;\n\n            // TODO - lets either do all callbacks or all events.. not both!\n            this.onChildrenChange(index);\n            child.emit('removed', this);\n        }\n\n        return child;\n    }\n\n    /**\n     * Removes a child from the specified index position.\n     *\n     * @param {number} index - The index to get the child from\n     * @return {PIXI.DisplayObject} The child that was removed.\n     */\n    removeChildAt(index)\n    {\n        const child = this.getChildAt(index);\n\n        // ensure child transform will be recalculated..\n        child.parent = null;\n        child.transform._parentID = -1;\n        removeItems(this.children, index, 1);\n\n        // ensure bounds will be recalculated\n        this._boundsID++;\n\n        // TODO - lets either do all callbacks or all events.. not both!\n        this.onChildrenChange(index);\n        child.emit('removed', this);\n\n        return child;\n    }\n\n    /**\n     * Removes all children from this container that are within the begin and end indexes.\n     *\n     * @param {number} [beginIndex=0] - The beginning position.\n     * @param {number} [endIndex=this.children.length] - The ending position. Default value is size of the container.\n     * @returns {DisplayObject[]} List of removed children\n     */\n    removeChildren(beginIndex = 0, endIndex)\n    {\n        const begin = beginIndex;\n        const end = typeof endIndex === 'number' ? endIndex : this.children.length;\n        const range = end - begin;\n        let removed;\n\n        if (range > 0 && range <= end)\n        {\n            removed = this.children.splice(begin, range);\n\n            for (let i = 0; i < removed.length; ++i)\n            {\n                removed[i].parent = null;\n                if (removed[i].transform)\n                {\n                    removed[i].transform._parentID = -1;\n                }\n            }\n\n            this._boundsID++;\n\n            this.onChildrenChange(beginIndex);\n\n            for (let i = 0; i < removed.length; ++i)\n            {\n                removed[i].emit('removed', this);\n            }\n\n            return removed;\n        }\n        else if (range === 0 && this.children.length === 0)\n        {\n            return [];\n        }\n\n        throw new RangeError('removeChildren: numeric values are outside the acceptable range.');\n    }\n\n    /**\n     * Updates the transform on all children of this container for rendering\n     */\n    updateTransform()\n    {\n        this._boundsID++;\n\n        this.transform.updateTransform(this.parent.transform);\n\n        // TODO: check render flags, how to process stuff here\n        this.worldAlpha = this.alpha * this.parent.worldAlpha;\n\n        for (let i = 0, j = this.children.length; i < j; ++i)\n        {\n            const child = this.children[i];\n\n            if (child.visible)\n            {\n                child.updateTransform();\n            }\n        }\n    }\n\n    /**\n     * Recalculates the bounds of the container.\n     *\n     */\n    calculateBounds()\n    {\n        this._bounds.clear();\n\n        this._calculateBounds();\n\n        for (let i = 0; i < this.children.length; i++)\n        {\n            const child = this.children[i];\n\n            if (!child.visible || !child.renderable)\n            {\n                continue;\n            }\n\n            child.calculateBounds();\n\n            // TODO: filter+mask, need to mask both somehow\n            if (child._mask)\n            {\n                child._mask.calculateBounds();\n                this._bounds.addBoundsMask(child._bounds, child._mask._bounds);\n            }\n            else if (child.filterArea)\n            {\n                this._bounds.addBoundsArea(child._bounds, child.filterArea);\n            }\n            else\n            {\n                this._bounds.addBounds(child._bounds);\n            }\n        }\n\n        this._lastBoundsID = this._boundsID;\n    }\n\n    /**\n     * Recalculates the bounds of the object. Override this to\n     * calculate the bounds of the specific object (not including children).\n     *\n     */\n    _calculateBounds()\n    {\n        // FILL IN//\n    }\n\n    /**\n     * Renders the object using the WebGL renderer\n     *\n     * @param {PIXI.WebGLRenderer} renderer - The renderer\n     */\n    renderWebGL(renderer)\n    {\n        // if the object is not visible or the alpha is 0 then no need to render this element\n        if (!this.visible || this.worldAlpha <= 0 || !this.renderable)\n        {\n            return;\n        }\n\n        // do a quick check to see if this element has a mask or a filter.\n        if (this._mask || this._filters)\n        {\n            this.renderAdvancedWebGL(renderer);\n        }\n        else\n        {\n            this._renderWebGL(renderer);\n\n            // simple render children!\n            for (let i = 0, j = this.children.length; i < j; ++i)\n            {\n                this.children[i].renderWebGL(renderer);\n            }\n        }\n    }\n\n    /**\n     * Render the object using the WebGL renderer and advanced features.\n     *\n     * @private\n     * @param {PIXI.WebGLRenderer} renderer - The renderer\n     */\n    renderAdvancedWebGL(renderer)\n    {\n        renderer.flush();\n\n        const filters = this._filters;\n        const mask = this._mask;\n\n        // push filter first as we need to ensure the stencil buffer is correct for any masking\n        if (filters)\n        {\n            if (!this._enabledFilters)\n            {\n                this._enabledFilters = [];\n            }\n\n            this._enabledFilters.length = 0;\n\n            for (let i = 0; i < filters.length; i++)\n            {\n                if (filters[i].enabled)\n                {\n                    this._enabledFilters.push(filters[i]);\n                }\n            }\n\n            if (this._enabledFilters.length)\n            {\n                renderer.filterManager.pushFilter(this, this._enabledFilters);\n            }\n        }\n\n        if (mask)\n        {\n            renderer.maskManager.pushMask(this, this._mask);\n        }\n\n        // add this object to the batch, only rendered if it has a texture.\n        this._renderWebGL(renderer);\n\n        // now loop through the children and make sure they get rendered\n        for (let i = 0, j = this.children.length; i < j; i++)\n        {\n            this.children[i].renderWebGL(renderer);\n        }\n\n        renderer.flush();\n\n        if (mask)\n        {\n            renderer.maskManager.popMask(this, this._mask);\n        }\n\n        if (filters && this._enabledFilters && this._enabledFilters.length)\n        {\n            renderer.filterManager.popFilter();\n        }\n    }\n\n    /**\n     * To be overridden by the subclasses.\n     *\n     * @private\n     * @param {PIXI.WebGLRenderer} renderer - The renderer\n     */\n    _renderWebGL(renderer) // eslint-disable-line no-unused-vars\n    {\n        // this is where content itself gets rendered...\n    }\n\n    /**\n     * To be overridden by the subclass\n     *\n     * @private\n     * @param {PIXI.CanvasRenderer} renderer - The renderer\n     */\n    _renderCanvas(renderer) // eslint-disable-line no-unused-vars\n    {\n        // this is where content itself gets rendered...\n    }\n\n    /**\n     * Renders the object using the Canvas renderer\n     *\n     * @param {PIXI.CanvasRenderer} renderer - The renderer\n     */\n    renderCanvas(renderer)\n    {\n        // if not visible or the alpha is 0 then no need to render this\n        if (!this.visible || this.worldAlpha <= 0 || !this.renderable)\n        {\n            return;\n        }\n\n        if (this._mask)\n        {\n            renderer.maskManager.pushMask(this._mask);\n        }\n\n        this._renderCanvas(renderer);\n        for (let i = 0, j = this.children.length; i < j; ++i)\n        {\n            this.children[i].renderCanvas(renderer);\n        }\n\n        if (this._mask)\n        {\n            renderer.maskManager.popMask(renderer);\n        }\n    }\n\n    /**\n     * Removes all internal references and listeners as well as removes children from the display list.\n     * Do not use a Container after calling `destroy`.\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy\n     *  method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the texture of the child sprite\n     * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the base texture of the child sprite\n     */\n    destroy(options)\n    {\n        super.destroy();\n\n        const destroyChildren = typeof options === 'boolean' ? options : options && options.children;\n\n        const oldChildren = this.removeChildren(0, this.children.length);\n\n        if (destroyChildren)\n        {\n            for (let i = 0; i < oldChildren.length; ++i)\n            {\n                oldChildren[i].destroy(options);\n            }\n        }\n    }\n\n    /**\n     * The width of the Container, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        return this.scale.x * this.getLocalBounds().width;\n    }\n\n    set width(value) // eslint-disable-line require-jsdoc\n    {\n        const width = this.getLocalBounds().width;\n\n        if (width !== 0)\n        {\n            this.scale.x = value / width;\n        }\n        else\n        {\n            this.scale.x = 1;\n        }\n\n        this._width = value;\n    }\n\n    /**\n     * The height of the Container, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        return this.scale.y * this.getLocalBounds().height;\n    }\n\n    set height(value) // eslint-disable-line require-jsdoc\n    {\n        const height = this.getLocalBounds().height;\n\n        if (height !== 0)\n        {\n            this.scale.y = value / height;\n        }\n        else\n        {\n            this.scale.y = 1;\n        }\n\n        this._height = value;\n    }\n}\n\n// performance increase to avoid using call.. (10x faster)\nContainer.prototype.containerUpdateTransform = Container.prototype.updateTransform;\n","import EventEmitter from 'eventemitter3';\nimport { TRANSFORM_MODE } from '../const';\nimport settings from '../settings';\nimport TransformStatic from './TransformStatic';\nimport Transform from './Transform';\nimport Bounds from './Bounds';\nimport { Rectangle } from '../math';\n// _tempDisplayObjectParent = new DisplayObject();\n\n/**\n * The base class for all objects that are rendered on the screen.\n * This is an abstract class and should not be used on its own rather it should be extended.\n *\n * @class\n * @extends EventEmitter\n * @memberof PIXI\n */\nexport default class DisplayObject extends EventEmitter\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        super();\n\n        const TransformClass = settings.TRANSFORM_MODE === TRANSFORM_MODE.STATIC ? TransformStatic : Transform;\n\n        this.tempDisplayObjectParent = null;\n\n        // TODO: need to create Transform from factory\n        /**\n         * World transform and local transform of this object.\n         * This will become read-only later, please do not assign anything there unless you know what are you doing\n         *\n         * @member {PIXI.TransformBase}\n         */\n        this.transform = new TransformClass();\n\n        /**\n         * The opacity of the object.\n         *\n         * @member {number}\n         */\n        this.alpha = 1;\n\n        /**\n         * The visibility of the object. If false the object will not be drawn, and\n         * the updateTransform function will not be called.\n         *\n         * Only affects recursive calls from parent. You can ask for bounds or call updateTransform manually\n         *\n         * @member {boolean}\n         */\n        this.visible = true;\n\n        /**\n         * Can this object be rendered, if false the object will not be drawn but the updateTransform\n         * methods will still be called.\n         *\n         * Only affects recursive calls from parent. You can ask for bounds manually\n         *\n         * @member {boolean}\n         */\n        this.renderable = true;\n\n        /**\n         * The display object container that contains this display object.\n         *\n         * @member {PIXI.Container}\n         * @readonly\n         */\n        this.parent = null;\n\n        /**\n         * The multiplied alpha of the displayObject\n         *\n         * @member {number}\n         * @readonly\n         */\n        this.worldAlpha = 1;\n\n        /**\n         * The area the filter is applied to. This is used as more of an optimisation\n         * rather than figuring out the dimensions of the displayObject each frame you can set this rectangle\n         *\n         * Also works as an interaction mask\n         *\n         * @member {PIXI.Rectangle}\n         */\n        this.filterArea = null;\n\n        this._filters = null;\n        this._enabledFilters = null;\n\n        /**\n         * The bounds object, this is used to calculate and store the bounds of the displayObject\n         *\n         * @member {PIXI.Rectangle}\n         * @private\n         */\n        this._bounds = new Bounds();\n        this._boundsID = 0;\n        this._lastBoundsID = -1;\n        this._boundsRect = null;\n        this._localBoundsRect = null;\n\n        /**\n         * The original, cached mask of the object\n         *\n         * @member {PIXI.Graphics|PIXI.Sprite}\n         * @private\n         */\n        this._mask = null;\n\n        /**\n         * If the object has been destroyed via destroy(). If true, it should not be used.\n         *\n         * @member {boolean}\n         * @private\n         * @readonly\n         */\n        this._destroyed = false;\n\n        /**\n         * Fired when this DisplayObject is added to a Container.\n         *\n         * @event PIXI.DisplayObject#added\n         * @param {PIXI.Container} container - The container added to.\n         */\n\n        /**\n         * Fired when this DisplayObject is removed from a Container.\n         *\n         * @event PIXI.DisplayObject#removed\n         * @param {PIXI.Container} container - The container removed from.\n         */\n    }\n\n    /**\n     * @private\n     * @member {PIXI.DisplayObject}\n     */\n    get _tempDisplayObjectParent()\n    {\n        if (this.tempDisplayObjectParent === null)\n        {\n            this.tempDisplayObjectParent = new DisplayObject();\n        }\n\n        return this.tempDisplayObjectParent;\n    }\n\n    /**\n     * Updates the object transform for rendering\n     *\n     * TODO - Optimization pass!\n     */\n    updateTransform()\n    {\n        this.transform.updateTransform(this.parent.transform);\n        // multiply the alphas..\n        this.worldAlpha = this.alpha * this.parent.worldAlpha;\n\n        this._bounds.updateID++;\n    }\n\n    /**\n     * recursively updates transform of all objects from the root to this one\n     * internal function for toLocal()\n     */\n    _recursivePostUpdateTransform()\n    {\n        if (this.parent)\n        {\n            this.parent._recursivePostUpdateTransform();\n            this.transform.updateTransform(this.parent.transform);\n        }\n        else\n        {\n            this.transform.updateTransform(this._tempDisplayObjectParent.transform);\n        }\n    }\n\n    /**\n     * Retrieves the bounds of the displayObject as a rectangle object.\n     *\n     * @param {boolean} skipUpdate - setting to true will stop the transforms of the scene graph from\n     *  being updated. This means the calculation returned MAY be out of date BUT will give you a\n     *  nice performance boost\n     * @param {PIXI.Rectangle} rect - Optional rectangle to store the result of the bounds calculation\n     * @return {PIXI.Rectangle} the rectangular bounding area\n     */\n    getBounds(skipUpdate, rect)\n    {\n        if (!skipUpdate)\n        {\n            if (!this.parent)\n            {\n                this.parent = this._tempDisplayObjectParent;\n                this.updateTransform();\n                this.parent = null;\n            }\n            else\n            {\n                this._recursivePostUpdateTransform();\n                this.updateTransform();\n            }\n        }\n\n        if (this._boundsID !== this._lastBoundsID)\n        {\n            this.calculateBounds();\n        }\n\n        if (!rect)\n        {\n            if (!this._boundsRect)\n            {\n                this._boundsRect = new Rectangle();\n            }\n\n            rect = this._boundsRect;\n        }\n\n        return this._bounds.getRectangle(rect);\n    }\n\n    /**\n     * Retrieves the local bounds of the displayObject as a rectangle object\n     *\n     * @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation\n     * @return {PIXI.Rectangle} the rectangular bounding area\n     */\n    getLocalBounds(rect)\n    {\n        const transformRef = this.transform;\n        const parentRef = this.parent;\n\n        this.parent = null;\n        this.transform = this._tempDisplayObjectParent.transform;\n\n        if (!rect)\n        {\n            if (!this._localBoundsRect)\n            {\n                this._localBoundsRect = new Rectangle();\n            }\n\n            rect = this._localBoundsRect;\n        }\n\n        const bounds = this.getBounds(false, rect);\n\n        this.parent = parentRef;\n        this.transform = transformRef;\n\n        return bounds;\n    }\n\n    /**\n     * Calculates the global position of the display object\n     *\n     * @param {PIXI.Point} position - The world origin to calculate from\n     * @param {PIXI.Point} [point] - A Point object in which to store the value, optional\n     *  (otherwise will create a new Point)\n     * @param {boolean} [skipUpdate=false] - Should we skip the update transform.\n     * @return {PIXI.Point} A point object representing the position of this object\n     */\n    toGlobal(position, point, skipUpdate = false)\n    {\n        if (!skipUpdate)\n        {\n            this._recursivePostUpdateTransform();\n\n            // this parent check is for just in case the item is a root object.\n            // If it is we need to give it a temporary parent so that displayObjectUpdateTransform works correctly\n            // this is mainly to avoid a parent check in the main loop. Every little helps for performance :)\n            if (!this.parent)\n            {\n                this.parent = this._tempDisplayObjectParent;\n                this.displayObjectUpdateTransform();\n                this.parent = null;\n            }\n            else\n            {\n                this.displayObjectUpdateTransform();\n            }\n        }\n\n        // don't need to update the lot\n        return this.worldTransform.apply(position, point);\n    }\n\n    /**\n     * Calculates the local position of the display object relative to another point\n     *\n     * @param {PIXI.Point} position - The world origin to calculate from\n     * @param {PIXI.DisplayObject} [from] - The DisplayObject to calculate the global position from\n     * @param {PIXI.Point} [point] - A Point object in which to store the value, optional\n     *  (otherwise will create a new Point)\n     * @param {boolean} [skipUpdate=false] - Should we skip the update transform\n     * @return {PIXI.Point} A point object representing the position of this object\n     */\n    toLocal(position, from, point, skipUpdate)\n    {\n        if (from)\n        {\n            position = from.toGlobal(position, point, skipUpdate);\n        }\n\n        if (!skipUpdate)\n        {\n            this._recursivePostUpdateTransform();\n\n            // this parent check is for just in case the item is a root object.\n            // If it is we need to give it a temporary parent so that displayObjectUpdateTransform works correctly\n            // this is mainly to avoid a parent check in the main loop. Every little helps for performance :)\n            if (!this.parent)\n            {\n                this.parent = this._tempDisplayObjectParent;\n                this.displayObjectUpdateTransform();\n                this.parent = null;\n            }\n            else\n            {\n                this.displayObjectUpdateTransform();\n            }\n        }\n\n        // simply apply the matrix..\n        return this.worldTransform.applyInverse(position, point);\n    }\n\n    /**\n     * Renders the object using the WebGL renderer\n     *\n     * @param {PIXI.WebGLRenderer} renderer - The renderer\n     */\n    renderWebGL(renderer) // eslint-disable-line no-unused-vars\n    {\n        // OVERWRITE;\n    }\n\n    /**\n     * Renders the object using the Canvas renderer\n     *\n     * @param {PIXI.CanvasRenderer} renderer - The renderer\n     */\n    renderCanvas(renderer) // eslint-disable-line no-unused-vars\n    {\n        // OVERWRITE;\n    }\n\n    /**\n     * Set the parent Container of this DisplayObject\n     *\n     * @param {PIXI.Container} container - The Container to add this DisplayObject to\n     * @return {PIXI.Container} The Container that this DisplayObject was added to\n     */\n    setParent(container)\n    {\n        if (!container || !container.addChild)\n        {\n            throw new Error('setParent: Argument must be a Container');\n        }\n\n        container.addChild(this);\n\n        return container;\n    }\n\n    /**\n     * Convenience function to set the position, scale, skew and pivot at once.\n     *\n     * @param {number} [x=0] - The X position\n     * @param {number} [y=0] - The Y position\n     * @param {number} [scaleX=1] - The X scale value\n     * @param {number} [scaleY=1] - The Y scale value\n     * @param {number} [rotation=0] - The rotation\n     * @param {number} [skewX=0] - The X skew value\n     * @param {number} [skewY=0] - The Y skew value\n     * @param {number} [pivotX=0] - The X pivot value\n     * @param {number} [pivotY=0] - The Y pivot value\n     * @return {PIXI.DisplayObject} The DisplayObject instance\n     */\n    setTransform(x = 0, y = 0, scaleX = 1, scaleY = 1, rotation = 0, skewX = 0, skewY = 0, pivotX = 0, pivotY = 0)\n    {\n        this.position.x = x;\n        this.position.y = y;\n        this.scale.x = !scaleX ? 1 : scaleX;\n        this.scale.y = !scaleY ? 1 : scaleY;\n        this.rotation = rotation;\n        this.skew.x = skewX;\n        this.skew.y = skewY;\n        this.pivot.x = pivotX;\n        this.pivot.y = pivotY;\n\n        return this;\n    }\n\n    /**\n     * Base destroy method for generic display objects. This will automatically\n     * remove the display object from its parent Container as well as remove\n     * all current event listeners and internal references. Do not use a DisplayObject\n     * after calling `destroy`.\n     *\n     */\n    destroy()\n    {\n        this.removeAllListeners();\n        if (this.parent)\n        {\n            this.parent.removeChild(this);\n        }\n        this.transform = null;\n\n        this.parent = null;\n\n        this._bounds = null;\n        this._currentBounds = null;\n        this._mask = null;\n\n        this.filterArea = null;\n\n        this.interactive = false;\n        this.interactiveChildren = false;\n\n        this._destroyed = true;\n    }\n\n    /**\n     * The position of the displayObject on the x axis relative to the local coordinates of the parent.\n     * An alias to position.x\n     *\n     * @member {number}\n     */\n    get x()\n    {\n        return this.position.x;\n    }\n\n    set x(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.position.x = value;\n    }\n\n    /**\n     * The position of the displayObject on the y axis relative to the local coordinates of the parent.\n     * An alias to position.y\n     *\n     * @member {number}\n     */\n    get y()\n    {\n        return this.position.y;\n    }\n\n    set y(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.position.y = value;\n    }\n\n    /**\n     * Current transform of the object based on world (parent) factors\n     *\n     * @member {PIXI.Matrix}\n     * @readonly\n     */\n    get worldTransform()\n    {\n        return this.transform.worldTransform;\n    }\n\n    /**\n     * Current transform of the object based on local factors: position, scale, other stuff\n     *\n     * @member {PIXI.Matrix}\n     * @readonly\n     */\n    get localTransform()\n    {\n        return this.transform.localTransform;\n    }\n\n    /**\n     * The coordinate of the object relative to the local coordinates of the parent.\n     * Assignment by value since pixi-v4.\n     *\n     * @member {PIXI.Point|PIXI.ObservablePoint}\n     */\n    get position()\n    {\n        return this.transform.position;\n    }\n\n    set position(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.position.copy(value);\n    }\n\n    /**\n     * The scale factor of the object.\n     * Assignment by value since pixi-v4.\n     *\n     * @member {PIXI.Point|PIXI.ObservablePoint}\n     */\n    get scale()\n    {\n        return this.transform.scale;\n    }\n\n    set scale(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.scale.copy(value);\n    }\n\n    /**\n     * The pivot point of the displayObject that it rotates around\n     * Assignment by value since pixi-v4.\n     *\n     * @member {PIXI.Point|PIXI.ObservablePoint}\n     */\n    get pivot()\n    {\n        return this.transform.pivot;\n    }\n\n    set pivot(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.pivot.copy(value);\n    }\n\n    /**\n     * The skew factor for the object in radians.\n     * Assignment by value since pixi-v4.\n     *\n     * @member {PIXI.ObservablePoint}\n     */\n    get skew()\n    {\n        return this.transform.skew;\n    }\n\n    set skew(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.skew.copy(value);\n    }\n\n    /**\n     * The rotation of the object in radians.\n     *\n     * @member {number}\n     */\n    get rotation()\n    {\n        return this.transform.rotation;\n    }\n\n    set rotation(value) // eslint-disable-line require-jsdoc\n    {\n        this.transform.rotation = value;\n    }\n\n    /**\n     * Indicates if the object is globally visible.\n     *\n     * @member {boolean}\n     * @readonly\n     */\n    get worldVisible()\n    {\n        let item = this;\n\n        do\n        {\n            if (!item.visible)\n            {\n                return false;\n            }\n\n            item = item.parent;\n        } while (item);\n\n        return true;\n    }\n\n    /**\n     * Sets a mask for the displayObject. A mask is an object that limits the visibility of an\n     * object to the shape of the mask applied to it. In PIXI a regular mask must be a\n     * PIXI.Graphics or a PIXI.Sprite object. This allows for much faster masking in canvas as it\n     * utilises shape clipping. To remove a mask, set this property to null.\n     *\n     * @todo For the moment, PIXI.CanvasRenderer doesn't support PIXI.Sprite as mask.\n     *\n     * @member {PIXI.Graphics|PIXI.Sprite}\n     */\n    get mask()\n    {\n        return this._mask;\n    }\n\n    set mask(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._mask)\n        {\n            this._mask.renderable = true;\n        }\n\n        this._mask = value;\n\n        if (this._mask)\n        {\n            this._mask.renderable = false;\n        }\n    }\n\n    /**\n     * Sets the filters for the displayObject.\n     * * IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer.\n     * To remove filters simply set this property to 'null'\n     *\n     * @member {PIXI.Filter[]}\n     */\n    get filters()\n    {\n        return this._filters && this._filters.slice();\n    }\n\n    set filters(value) // eslint-disable-line require-jsdoc\n    {\n        this._filters = value && value.slice();\n    }\n}\n\n// performance increase to avoid using call.. (10x faster)\nDisplayObject.prototype.displayObjectUpdateTransform = DisplayObject.prototype.updateTransform;\n","import { Point, ObservablePoint } from '../math';\nimport TransformBase from './TransformBase';\n\n/**\n * Generic class to deal with traditional 2D matrix transforms\n * local transformation is calculated from position,scale,skew and rotation\n *\n * @class\n * @extends PIXI.TransformBase\n * @memberof PIXI\n */\nexport default class Transform extends TransformBase\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        super();\n\n         /**\n         * The coordinate of the object relative to the local coordinates of the parent.\n         *\n         * @member {PIXI.Point}\n         */\n        this.position = new Point(0, 0);\n\n        /**\n         * The scale factor of the object.\n         *\n         * @member {PIXI.Point}\n         */\n        this.scale = new Point(1, 1);\n\n        /**\n         * The skew amount, on the x and y axis.\n         *\n         * @member {PIXI.ObservablePoint}\n         */\n        this.skew = new ObservablePoint(this.updateSkew, this, 0, 0);\n\n        /**\n         * The pivot point of the displayObject that it rotates around\n         *\n         * @member {PIXI.Point}\n         */\n        this.pivot = new Point(0, 0);\n\n        /**\n         * The rotation value of the object, in radians\n         *\n         * @member {Number}\n         * @private\n         */\n        this._rotation = 0;\n\n        this._cx = 1; // cos rotation + skewY;\n        this._sx = 0; // sin rotation + skewY;\n        this._cy = 0; // cos rotation + Math.PI/2 - skewX;\n        this._sy = 1; // sin rotation + Math.PI/2 - skewX;\n    }\n\n    /**\n     * Updates the skew values when the skew or rotation changes.\n     *\n     * @private\n     */\n    updateSkew()\n    {\n        this._cx = Math.cos(this._rotation + this.skew._y);\n        this._sx = Math.sin(this._rotation + this.skew._y);\n        this._cy = -Math.sin(this._rotation - this.skew._x); // cos, added PI/2\n        this._sy = Math.cos(this._rotation - this.skew._x); // sin, added PI/2\n    }\n\n    /**\n     * Updates only local matrix\n     */\n    updateLocalTransform()\n    {\n        const lt = this.localTransform;\n\n        lt.a = this._cx * this.scale.x;\n        lt.b = this._sx * this.scale.x;\n        lt.c = this._cy * this.scale.y;\n        lt.d = this._sy * this.scale.y;\n\n        lt.tx = this.position.x - ((this.pivot.x * lt.a) + (this.pivot.y * lt.c));\n        lt.ty = this.position.y - ((this.pivot.x * lt.b) + (this.pivot.y * lt.d));\n    }\n\n    /**\n     * Updates the values of the object and applies the parent's transform.\n     *\n     * @param {PIXI.Transform} parentTransform - The transform of the parent of this object\n     */\n    updateTransform(parentTransform)\n    {\n        const lt = this.localTransform;\n\n        lt.a = this._cx * this.scale.x;\n        lt.b = this._sx * this.scale.x;\n        lt.c = this._cy * this.scale.y;\n        lt.d = this._sy * this.scale.y;\n\n        lt.tx = this.position.x - ((this.pivot.x * lt.a) + (this.pivot.y * lt.c));\n        lt.ty = this.position.y - ((this.pivot.x * lt.b) + (this.pivot.y * lt.d));\n\n        // concat the parent matrix with the objects transform.\n        const pt = parentTransform.worldTransform;\n        const wt = this.worldTransform;\n\n        wt.a = (lt.a * pt.a) + (lt.b * pt.c);\n        wt.b = (lt.a * pt.b) + (lt.b * pt.d);\n        wt.c = (lt.c * pt.a) + (lt.d * pt.c);\n        wt.d = (lt.c * pt.b) + (lt.d * pt.d);\n        wt.tx = (lt.tx * pt.a) + (lt.ty * pt.c) + pt.tx;\n        wt.ty = (lt.tx * pt.b) + (lt.ty * pt.d) + pt.ty;\n\n        this._worldID ++;\n    }\n\n    /**\n     * Decomposes a matrix and sets the transforms properties based on it.\n     *\n     * @param {PIXI.Matrix} matrix - The matrix to decompose\n     */\n    setFromMatrix(matrix)\n    {\n        matrix.decompose(this);\n    }\n\n    /**\n     * The rotation of the object in radians.\n     *\n     * @member {number}\n     */\n    get rotation()\n    {\n        return this._rotation;\n    }\n\n    set rotation(value) // eslint-disable-line require-jsdoc\n    {\n        this._rotation = value;\n        this.updateSkew();\n    }\n}\n","import { Matrix } from '../math';\n\n/**\n * Generic class to deal with traditional 2D matrix transforms\n *\n * @class\n * @memberof PIXI\n */\nexport default class TransformBase\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        /**\n         * The global matrix transform. It can be swapped temporarily by some functions like getLocalBounds()\n         *\n         * @member {PIXI.Matrix}\n         */\n        this.worldTransform = new Matrix();\n\n        /**\n         * The local matrix transform\n         *\n         * @member {PIXI.Matrix}\n         */\n        this.localTransform = new Matrix();\n\n        this._worldID = 0;\n        this._parentID = 0;\n    }\n\n    /**\n     * TransformBase does not have decomposition, so this function wont do anything\n     */\n    updateLocalTransform()\n    {\n        // empty\n    }\n\n    /**\n     * Updates the values of the object and applies the parent's transform.\n     *\n     * @param {PIXI.TransformBase} parentTransform - The transform of the parent of this object\n     */\n    updateTransform(parentTransform)\n    {\n        const pt = parentTransform.worldTransform;\n        const wt = this.worldTransform;\n        const lt = this.localTransform;\n\n        // concat the parent matrix with the objects transform.\n        wt.a = (lt.a * pt.a) + (lt.b * pt.c);\n        wt.b = (lt.a * pt.b) + (lt.b * pt.d);\n        wt.c = (lt.c * pt.a) + (lt.d * pt.c);\n        wt.d = (lt.c * pt.b) + (lt.d * pt.d);\n        wt.tx = (lt.tx * pt.a) + (lt.ty * pt.c) + pt.tx;\n        wt.ty = (lt.tx * pt.b) + (lt.ty * pt.d) + pt.ty;\n\n        this._worldID ++;\n    }\n\n}\n\n/**\n * Updates the values of the object and applies the parent's transform.\n * @param  parentTransform {PIXI.Transform} The transform of the parent of this object\n *\n */\nTransformBase.prototype.updateWorldTransform = TransformBase.prototype.updateTransform;\n\nTransformBase.IDENTITY = new TransformBase();\n","import { ObservablePoint } from '../math';\nimport TransformBase from './TransformBase';\n\n/**\n * Transform that takes care about its versions\n *\n * @class\n * @extends PIXI.TransformBase\n * @memberof PIXI\n */\nexport default class TransformStatic extends TransformBase\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        super();\n\n         /**\n         * The coordinate of the object relative to the local coordinates of the parent.\n         *\n         * @member {PIXI.ObservablePoint}\n         */\n        this.position = new ObservablePoint(this.onChange, this, 0, 0);\n\n        /**\n         * The scale factor of the object.\n         *\n         * @member {PIXI.ObservablePoint}\n         */\n        this.scale = new ObservablePoint(this.onChange, this, 1, 1);\n\n        /**\n         * The pivot point of the displayObject that it rotates around\n         *\n         * @member {PIXI.ObservablePoint}\n         */\n        this.pivot = new ObservablePoint(this.onChange, this, 0, 0);\n\n        /**\n         * The skew amount, on the x and y axis.\n         *\n         * @member {PIXI.ObservablePoint}\n         */\n        this.skew = new ObservablePoint(this.updateSkew, this, 0, 0);\n\n        this._rotation = 0;\n\n        this._cx = 1; // cos rotation + skewY;\n        this._sx = 0; // sin rotation + skewY;\n        this._cy = 0; // cos rotation + Math.PI/2 - skewX;\n        this._sy = 1; // sin rotation + Math.PI/2 - skewX;\n\n        this._localID = 0;\n        this._currentLocalID = 0;\n    }\n\n    /**\n     * Called when a value changes.\n     *\n     * @private\n     */\n    onChange()\n    {\n        this._localID ++;\n    }\n\n    /**\n     * Called when skew or rotation changes\n     *\n     * @private\n     */\n    updateSkew()\n    {\n        this._cx = Math.cos(this._rotation + this.skew._y);\n        this._sx = Math.sin(this._rotation + this.skew._y);\n        this._cy = -Math.sin(this._rotation - this.skew._x); // cos, added PI/2\n        this._sy = Math.cos(this._rotation - this.skew._x); // sin, added PI/2\n\n        this._localID ++;\n    }\n\n    /**\n     * Updates only local matrix\n     */\n    updateLocalTransform()\n    {\n        const lt = this.localTransform;\n\n        if (this._localID !== this._currentLocalID)\n        {\n            // get the matrix values of the displayobject based on its transform properties..\n            lt.a = this._cx * this.scale._x;\n            lt.b = this._sx * this.scale._x;\n            lt.c = this._cy * this.scale._y;\n            lt.d = this._sy * this.scale._y;\n\n            lt.tx = this.position._x - ((this.pivot._x * lt.a) + (this.pivot._y * lt.c));\n            lt.ty = this.position._y - ((this.pivot._x * lt.b) + (this.pivot._y * lt.d));\n            this._currentLocalID = this._localID;\n\n            // force an update..\n            this._parentID = -1;\n        }\n    }\n\n    /**\n     * Updates the values of the object and applies the parent's transform.\n     *\n     * @param {PIXI.Transform} parentTransform - The transform of the parent of this object\n     */\n    updateTransform(parentTransform)\n    {\n        const lt = this.localTransform;\n\n        if (this._localID !== this._currentLocalID)\n        {\n            // get the matrix values of the displayobject based on its transform properties..\n            lt.a = this._cx * this.scale._x;\n            lt.b = this._sx * this.scale._x;\n            lt.c = this._cy * this.scale._y;\n            lt.d = this._sy * this.scale._y;\n\n            lt.tx = this.position._x - ((this.pivot._x * lt.a) + (this.pivot._y * lt.c));\n            lt.ty = this.position._y - ((this.pivot._x * lt.b) + (this.pivot._y * lt.d));\n            this._currentLocalID = this._localID;\n\n            // force an update..\n            this._parentID = -1;\n        }\n\n        if (this._parentID !== parentTransform._worldID)\n        {\n            // concat the parent matrix with the objects transform.\n            const pt = parentTransform.worldTransform;\n            const wt = this.worldTransform;\n\n            wt.a = (lt.a * pt.a) + (lt.b * pt.c);\n            wt.b = (lt.a * pt.b) + (lt.b * pt.d);\n            wt.c = (lt.c * pt.a) + (lt.d * pt.c);\n            wt.d = (lt.c * pt.b) + (lt.d * pt.d);\n            wt.tx = (lt.tx * pt.a) + (lt.ty * pt.c) + pt.tx;\n            wt.ty = (lt.tx * pt.b) + (lt.ty * pt.d) + pt.ty;\n\n            this._parentID = parentTransform._worldID;\n\n            // update the id of the transform..\n            this._worldID ++;\n        }\n    }\n\n    /**\n     * Decomposes a matrix and sets the transforms properties based on it.\n     *\n     * @param {PIXI.Matrix} matrix - The matrix to decompose\n     */\n    setFromMatrix(matrix)\n    {\n        matrix.decompose(this);\n        this._localID ++;\n    }\n\n    /**\n     * The rotation of the object in radians.\n     *\n     * @member {number}\n     */\n    get rotation()\n    {\n        return this._rotation;\n    }\n\n    set rotation(value) // eslint-disable-line require-jsdoc\n    {\n        this._rotation = value;\n        this.updateSkew();\n    }\n}\n","import Container from '../display/Container';\nimport RenderTexture from '../textures/RenderTexture';\nimport Texture from '../textures/Texture';\nimport GraphicsData from './GraphicsData';\nimport Sprite from '../sprites/Sprite';\nimport { Matrix, Point, Rectangle, RoundedRectangle, Ellipse, Polygon, Circle } from '../math';\nimport { hex2rgb, rgb2hex } from '../utils';\nimport { SHAPES, BLEND_MODES } from '../const';\nimport Bounds from '../display/Bounds';\nimport bezierCurveTo from './utils/bezierCurveTo';\nimport CanvasRenderer from '../renderers/canvas/CanvasRenderer';\n\nlet canvasRenderer;\nconst tempMatrix = new Matrix();\nconst tempPoint = new Point();\nconst tempColor1 = new Float32Array(4);\nconst tempColor2 = new Float32Array(4);\n\n/**\n * The Graphics class contains methods used to draw primitive shapes such as lines, circles and\n * rectangles to the display, and to color and fill them.\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI\n */\nexport default class Graphics extends Container\n{\n    /**\n     *\n     * @param {boolean} [nativeLines=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP\n     */\n    constructor(nativeLines = false)\n    {\n        super();\n\n        /**\n         * The alpha value used when filling the Graphics object.\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.fillAlpha = 1;\n\n        /**\n         * The width (thickness) of any lines drawn.\n         *\n         * @member {number}\n         * @default 0\n         */\n        this.lineWidth = 0;\n\n        /**\n         * If true the lines will be draw using LINES instead of TRIANGLE_STRIP\n         *\n         * @member {boolean}\n         */\n        this.nativeLines = nativeLines;\n\n        /**\n         * The color of any lines drawn.\n         *\n         * @member {string}\n         * @default 0\n         */\n        this.lineColor = 0;\n\n        /**\n         * Graphics data\n         *\n         * @member {PIXI.GraphicsData[]}\n         * @private\n         */\n        this.graphicsData = [];\n\n        /**\n         * The tint applied to the graphic shape. This is a hex value. Apply a value of 0xFFFFFF to\n         * reset the tint.\n         *\n         * @member {number}\n         * @default 0xFFFFFF\n         */\n        this.tint = 0xFFFFFF;\n\n        /**\n         * The previous tint applied to the graphic shape. Used to compare to the current tint and\n         * check if theres change.\n         *\n         * @member {number}\n         * @private\n         * @default 0xFFFFFF\n         */\n        this._prevTint = 0xFFFFFF;\n\n        /**\n         * The blend mode to be applied to the graphic shape. Apply a value of\n         * `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.\n         *\n         * @member {number}\n         * @default PIXI.BLEND_MODES.NORMAL;\n         * @see PIXI.BLEND_MODES\n         */\n        this.blendMode = BLEND_MODES.NORMAL;\n\n        /**\n         * Current path\n         *\n         * @member {PIXI.GraphicsData}\n         * @private\n         */\n        this.currentPath = null;\n\n        /**\n         * Array containing some WebGL-related properties used by the WebGL renderer.\n         *\n         * @member {object<number, object>}\n         * @private\n         */\n        // TODO - _webgl should use a prototype object, not a random undocumented object...\n        this._webGL = {};\n\n        /**\n         * Whether this shape is being used as a mask.\n         *\n         * @member {boolean}\n         */\n        this.isMask = false;\n\n        /**\n         * The bounds' padding used for bounds calculation.\n         *\n         * @member {number}\n         */\n        this.boundsPadding = 0;\n\n        /**\n         * A cache of the local bounds to prevent recalculation.\n         *\n         * @member {PIXI.Rectangle}\n         * @private\n         */\n        this._localBounds = new Bounds();\n\n        /**\n         * Used to detect if the graphics object has changed. If this is set to true then the graphics\n         * object will be recalculated.\n         *\n         * @member {boolean}\n         * @private\n         */\n        this.dirty = 0;\n\n        /**\n         * Used to detect if we need to do a fast rect check using the id compare method\n         * @type {Number}\n         */\n        this.fastRectDirty = -1;\n\n        /**\n         * Used to detect if we clear the graphics webGL data\n         * @type {Number}\n         */\n        this.clearDirty = 0;\n\n        /**\n         * Used to detect if we we need to recalculate local bounds\n         * @type {Number}\n         */\n        this.boundsDirty = -1;\n\n        /**\n         * Used to detect if the cached sprite object needs to be updated.\n         *\n         * @member {boolean}\n         * @private\n         */\n        this.cachedSpriteDirty = false;\n\n        this._spriteRect = null;\n        this._fastRect = false;\n\n        /**\n         * When cacheAsBitmap is set to true the graphics object will be rendered as if it was a sprite.\n         * This is useful if your graphics element does not change often, as it will speed up the rendering\n         * of the object in exchange for taking up texture memory. It is also useful if you need the graphics\n         * object to be anti-aliased, because it will be rendered using canvas. This is not recommended if\n         * you are constantly redrawing the graphics element.\n         *\n         * @name cacheAsBitmap\n         * @member {boolean}\n         * @memberof PIXI.Graphics#\n         * @default false\n         */\n    }\n\n    /**\n     * Creates a new Graphics object with the same values as this one.\n     * Note that the only the properties of the object are cloned, not its transform (position,scale,etc)\n     *\n     * @return {PIXI.Graphics} A clone of the graphics object\n     */\n    clone()\n    {\n        const clone = new Graphics();\n\n        clone.renderable = this.renderable;\n        clone.fillAlpha = this.fillAlpha;\n        clone.lineWidth = this.lineWidth;\n        clone.lineColor = this.lineColor;\n        clone.tint = this.tint;\n        clone.blendMode = this.blendMode;\n        clone.isMask = this.isMask;\n        clone.boundsPadding = this.boundsPadding;\n        clone.dirty = 0;\n        clone.cachedSpriteDirty = this.cachedSpriteDirty;\n\n        // copy graphics data\n        for (let i = 0; i < this.graphicsData.length; ++i)\n        {\n            clone.graphicsData.push(this.graphicsData[i].clone());\n        }\n\n        clone.currentPath = clone.graphicsData[clone.graphicsData.length - 1];\n\n        clone.updateLocalBounds();\n\n        return clone;\n    }\n\n    /**\n     * Specifies the line style used for subsequent calls to Graphics methods such as the lineTo()\n     * method or the drawCircle() method.\n     *\n     * @param {number} [lineWidth=0] - width of the line to draw, will update the objects stored style\n     * @param {number} [color=0] - color of the line to draw, will update the objects stored style\n     * @param {number} [alpha=1] - alpha of the line to draw, will update the objects stored style\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    lineStyle(lineWidth = 0, color = 0, alpha = 1)\n    {\n        this.lineWidth = lineWidth;\n        this.lineColor = color;\n        this.lineAlpha = alpha;\n\n        if (this.currentPath)\n        {\n            if (this.currentPath.shape.points.length)\n            {\n                // halfway through a line? start a new one!\n                const shape = new Polygon(this.currentPath.shape.points.slice(-2));\n\n                shape.closed = false;\n\n                this.drawShape(shape);\n            }\n            else\n            {\n                // otherwise its empty so lets just set the line properties\n                this.currentPath.lineWidth = this.lineWidth;\n                this.currentPath.lineColor = this.lineColor;\n                this.currentPath.lineAlpha = this.lineAlpha;\n            }\n        }\n\n        return this;\n    }\n\n    /**\n     * Moves the current drawing position to x, y.\n     *\n     * @param {number} x - the X coordinate to move to\n     * @param {number} y - the Y coordinate to move to\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    moveTo(x, y)\n    {\n        const shape = new Polygon([x, y]);\n\n        shape.closed = false;\n        this.drawShape(shape);\n\n        return this;\n    }\n\n    /**\n     * Draws a line using the current line style from the current drawing position to (x, y);\n     * The current drawing position is then set to (x, y).\n     *\n     * @param {number} x - the X coordinate to draw to\n     * @param {number} y - the Y coordinate to draw to\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    lineTo(x, y)\n    {\n        this.currentPath.shape.points.push(x, y);\n        this.dirty++;\n\n        return this;\n    }\n\n    /**\n     * Calculate the points for a quadratic bezier curve and then draws it.\n     * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c\n     *\n     * @param {number} cpX - Control point x\n     * @param {number} cpY - Control point y\n     * @param {number} toX - Destination point x\n     * @param {number} toY - Destination point y\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    quadraticCurveTo(cpX, cpY, toX, toY)\n    {\n        if (this.currentPath)\n        {\n            if (this.currentPath.shape.points.length === 0)\n            {\n                this.currentPath.shape.points = [0, 0];\n            }\n        }\n        else\n        {\n            this.moveTo(0, 0);\n        }\n\n        const n = 20;\n        const points = this.currentPath.shape.points;\n        let xa = 0;\n        let ya = 0;\n\n        if (points.length === 0)\n        {\n            this.moveTo(0, 0);\n        }\n\n        const fromX = points[points.length - 2];\n        const fromY = points[points.length - 1];\n\n        for (let i = 1; i <= n; ++i)\n        {\n            const j = i / n;\n\n            xa = fromX + ((cpX - fromX) * j);\n            ya = fromY + ((cpY - fromY) * j);\n\n            points.push(xa + (((cpX + ((toX - cpX) * j)) - xa) * j),\n                ya + (((cpY + ((toY - cpY) * j)) - ya) * j));\n        }\n\n        this.dirty++;\n\n        return this;\n    }\n\n    /**\n     * Calculate the points for a bezier curve and then draws it.\n     *\n     * @param {number} cpX - Control point x\n     * @param {number} cpY - Control point y\n     * @param {number} cpX2 - Second Control point x\n     * @param {number} cpY2 - Second Control point y\n     * @param {number} toX - Destination point x\n     * @param {number} toY - Destination point y\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    bezierCurveTo(cpX, cpY, cpX2, cpY2, toX, toY)\n    {\n        if (this.currentPath)\n        {\n            if (this.currentPath.shape.points.length === 0)\n            {\n                this.currentPath.shape.points = [0, 0];\n            }\n        }\n        else\n        {\n            this.moveTo(0, 0);\n        }\n\n        const points = this.currentPath.shape.points;\n\n        const fromX = points[points.length - 2];\n        const fromY = points[points.length - 1];\n\n        points.length -= 2;\n\n        bezierCurveTo(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, points);\n\n        this.dirty++;\n\n        return this;\n    }\n\n    /**\n     * The arcTo() method creates an arc/curve between two tangents on the canvas.\n     *\n     * \"borrowed\" from https://code.google.com/p/fxcanvas/ - thanks google!\n     *\n     * @param {number} x1 - The x-coordinate of the beginning of the arc\n     * @param {number} y1 - The y-coordinate of the beginning of the arc\n     * @param {number} x2 - The x-coordinate of the end of the arc\n     * @param {number} y2 - The y-coordinate of the end of the arc\n     * @param {number} radius - The radius of the arc\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    arcTo(x1, y1, x2, y2, radius)\n    {\n        if (this.currentPath)\n        {\n            if (this.currentPath.shape.points.length === 0)\n            {\n                this.currentPath.shape.points.push(x1, y1);\n            }\n        }\n        else\n        {\n            this.moveTo(x1, y1);\n        }\n\n        const points = this.currentPath.shape.points;\n        const fromX = points[points.length - 2];\n        const fromY = points[points.length - 1];\n        const a1 = fromY - y1;\n        const b1 = fromX - x1;\n        const a2 = y2 - y1;\n        const b2 = x2 - x1;\n        const mm = Math.abs((a1 * b2) - (b1 * a2));\n\n        if (mm < 1.0e-8 || radius === 0)\n        {\n            if (points[points.length - 2] !== x1 || points[points.length - 1] !== y1)\n            {\n                points.push(x1, y1);\n            }\n        }\n        else\n        {\n            const dd = (a1 * a1) + (b1 * b1);\n            const cc = (a2 * a2) + (b2 * b2);\n            const tt = (a1 * a2) + (b1 * b2);\n            const k1 = radius * Math.sqrt(dd) / mm;\n            const k2 = radius * Math.sqrt(cc) / mm;\n            const j1 = k1 * tt / dd;\n            const j2 = k2 * tt / cc;\n            const cx = (k1 * b2) + (k2 * b1);\n            const cy = (k1 * a2) + (k2 * a1);\n            const px = b1 * (k2 + j1);\n            const py = a1 * (k2 + j1);\n            const qx = b2 * (k1 + j2);\n            const qy = a2 * (k1 + j2);\n            const startAngle = Math.atan2(py - cy, px - cx);\n            const endAngle = Math.atan2(qy - cy, qx - cx);\n\n            this.arc(cx + x1, cy + y1, radius, startAngle, endAngle, b1 * a2 > b2 * a1);\n        }\n\n        this.dirty++;\n\n        return this;\n    }\n\n    /**\n     * The arc method creates an arc/curve (used to create circles, or parts of circles).\n     *\n     * @param {number} cx - The x-coordinate of the center of the circle\n     * @param {number} cy - The y-coordinate of the center of the circle\n     * @param {number} radius - The radius of the circle\n     * @param {number} startAngle - The starting angle, in radians (0 is at the 3 o'clock position\n     *  of the arc's circle)\n     * @param {number} endAngle - The ending angle, in radians\n     * @param {boolean} [anticlockwise=false] - Specifies whether the drawing should be\n     *  counter-clockwise or clockwise. False is default, and indicates clockwise, while true\n     *  indicates counter-clockwise.\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    arc(cx, cy, radius, startAngle, endAngle, anticlockwise = false)\n    {\n        if (startAngle === endAngle)\n        {\n            return this;\n        }\n\n        if (!anticlockwise && endAngle <= startAngle)\n        {\n            endAngle += Math.PI * 2;\n        }\n        else if (anticlockwise && startAngle <= endAngle)\n        {\n            startAngle += Math.PI * 2;\n        }\n\n        const sweep = endAngle - startAngle;\n        const segs = Math.ceil(Math.abs(sweep) / (Math.PI * 2)) * 40;\n\n        if (sweep === 0)\n        {\n            return this;\n        }\n\n        const startX = cx + (Math.cos(startAngle) * radius);\n        const startY = cy + (Math.sin(startAngle) * radius);\n\n        // If the currentPath exists, take its points. Otherwise call `moveTo` to start a path.\n        let points = this.currentPath ? this.currentPath.shape.points : null;\n\n        if (points)\n        {\n            if (points[points.length - 2] !== startX || points[points.length - 1] !== startY)\n            {\n                points.push(startX, startY);\n            }\n        }\n        else\n        {\n            this.moveTo(startX, startY);\n            points = this.currentPath.shape.points;\n        }\n\n        const theta = sweep / (segs * 2);\n        const theta2 = theta * 2;\n\n        const cTheta = Math.cos(theta);\n        const sTheta = Math.sin(theta);\n\n        const segMinus = segs - 1;\n\n        const remainder = (segMinus % 1) / segMinus;\n\n        for (let i = 0; i <= segMinus; ++i)\n        {\n            const real = i + (remainder * i);\n\n            const angle = ((theta) + startAngle + (theta2 * real));\n\n            const c = Math.cos(angle);\n            const s = -Math.sin(angle);\n\n            points.push(\n                (((cTheta * c) + (sTheta * s)) * radius) + cx,\n                (((cTheta * -s) + (sTheta * c)) * radius) + cy\n            );\n        }\n\n        this.dirty++;\n\n        return this;\n    }\n\n    /**\n     * Specifies a simple one-color fill that subsequent calls to other Graphics methods\n     * (such as lineTo() or drawCircle()) use when drawing.\n     *\n     * @param {number} [color=0] - the color of the fill\n     * @param {number} [alpha=1] - the alpha of the fill\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    beginFill(color = 0, alpha = 1)\n    {\n        this.filling = true;\n        this.fillColor = color;\n        this.fillAlpha = alpha;\n\n        if (this.currentPath)\n        {\n            if (this.currentPath.shape.points.length <= 2)\n            {\n                this.currentPath.fill = this.filling;\n                this.currentPath.fillColor = this.fillColor;\n                this.currentPath.fillAlpha = this.fillAlpha;\n            }\n        }\n\n        return this;\n    }\n\n    /**\n     * Applies a fill to the lines and shapes that were added since the last call to the beginFill() method.\n     *\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    endFill()\n    {\n        this.filling = false;\n        this.fillColor = null;\n        this.fillAlpha = 1;\n\n        return this;\n    }\n\n    /**\n     *\n     * @param {number} x - The X coord of the top-left of the rectangle\n     * @param {number} y - The Y coord of the top-left of the rectangle\n     * @param {number} width - The width of the rectangle\n     * @param {number} height - The height of the rectangle\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    drawRect(x, y, width, height)\n    {\n        this.drawShape(new Rectangle(x, y, width, height));\n\n        return this;\n    }\n\n    /**\n     *\n     * @param {number} x - The X coord of the top-left of the rectangle\n     * @param {number} y - The Y coord of the top-left of the rectangle\n     * @param {number} width - The width of the rectangle\n     * @param {number} height - The height of the rectangle\n     * @param {number} radius - Radius of the rectangle corners\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    drawRoundedRect(x, y, width, height, radius)\n    {\n        this.drawShape(new RoundedRectangle(x, y, width, height, radius));\n\n        return this;\n    }\n\n    /**\n     * Draws a circle.\n     *\n     * @param {number} x - The X coordinate of the center of the circle\n     * @param {number} y - The Y coordinate of the center of the circle\n     * @param {number} radius - The radius of the circle\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    drawCircle(x, y, radius)\n    {\n        this.drawShape(new Circle(x, y, radius));\n\n        return this;\n    }\n\n    /**\n     * Draws an ellipse.\n     *\n     * @param {number} x - The X coordinate of the center of the ellipse\n     * @param {number} y - The Y coordinate of the center of the ellipse\n     * @param {number} width - The half width of the ellipse\n     * @param {number} height - The half height of the ellipse\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    drawEllipse(x, y, width, height)\n    {\n        this.drawShape(new Ellipse(x, y, width, height));\n\n        return this;\n    }\n\n    /**\n     * Draws a polygon using the given path.\n     *\n     * @param {number[]|PIXI.Point[]|PIXI.Polygon} path - The path data used to construct the polygon.\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    drawPolygon(path)\n    {\n        // prevents an argument assignment deopt\n        // see section 3.1: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments\n        let points = path;\n\n        let closed = true;\n\n        if (points instanceof Polygon)\n        {\n            closed = points.closed;\n            points = points.points;\n        }\n\n        if (!Array.isArray(points))\n        {\n            // prevents an argument leak deopt\n            // see section 3.2: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments\n            points = new Array(arguments.length);\n\n            for (let i = 0; i < points.length; ++i)\n            {\n                points[i] = arguments[i]; // eslint-disable-line prefer-rest-params\n            }\n        }\n\n        const shape = new Polygon(points);\n\n        shape.closed = closed;\n\n        this.drawShape(shape);\n\n        return this;\n    }\n\n    /**\n     * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.\n     *\n     * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n     */\n    clear()\n    {\n        if (this.lineWidth || this.filling || this.graphicsData.length > 0)\n        {\n            this.lineWidth = 0;\n            this.filling = false;\n\n            this.boundsDirty = -1;\n            this.dirty++;\n            this.clearDirty++;\n            this.graphicsData.length = 0;\n        }\n\n        this.currentPath = null;\n        this._spriteRect = null;\n\n        return this;\n    }\n\n    /**\n     * True if graphics consists of one rectangle, and thus, can be drawn like a Sprite and\n     * masked with gl.scissor.\n     *\n     * @returns {boolean} True if only 1 rect.\n     */\n    isFastRect()\n    {\n        return this.graphicsData.length === 1\n            && this.graphicsData[0].shape.type === SHAPES.RECT\n            && !this.graphicsData[0].lineWidth;\n    }\n\n    /**\n     * Renders the object using the WebGL renderer\n     *\n     * @private\n     * @param {PIXI.WebGLRenderer} renderer - The renderer\n     */\n    _renderWebGL(renderer)\n    {\n        // if the sprite is not visible or the alpha is 0 then no need to render this element\n        if (this.dirty !== this.fastRectDirty)\n        {\n            this.fastRectDirty = this.dirty;\n            this._fastRect = this.isFastRect();\n        }\n\n        // TODO this check can be moved to dirty?\n        if (this._fastRect)\n        {\n            this._renderSpriteRect(renderer);\n        }\n        else\n        {\n            renderer.setObjectRenderer(renderer.plugins.graphics);\n            renderer.plugins.graphics.render(this);\n        }\n    }\n\n    /**\n     * Renders a sprite rectangle.\n     *\n     * @private\n     * @param {PIXI.WebGLRenderer} renderer - The renderer\n     */\n    _renderSpriteRect(renderer)\n    {\n        const rect = this.graphicsData[0].shape;\n\n        if (!this._spriteRect)\n        {\n            this._spriteRect = new Sprite(new Texture(Texture.WHITE));\n        }\n\n        const sprite = this._spriteRect;\n\n        if (this.tint === 0xffffff)\n        {\n            sprite.tint = this.graphicsData[0].fillColor;\n        }\n        else\n        {\n            const t1 = tempColor1;\n            const t2 = tempColor2;\n\n            hex2rgb(this.graphicsData[0].fillColor, t1);\n            hex2rgb(this.tint, t2);\n\n            t1[0] *= t2[0];\n            t1[1] *= t2[1];\n            t1[2] *= t2[2];\n\n            sprite.tint = rgb2hex(t1);\n        }\n        sprite.alpha = this.graphicsData[0].fillAlpha;\n        sprite.worldAlpha = this.worldAlpha * sprite.alpha;\n        sprite.blendMode = this.blendMode;\n\n        sprite._texture._frame.width = rect.width;\n        sprite._texture._frame.height = rect.height;\n\n        sprite.transform.worldTransform = this.transform.worldTransform;\n\n        sprite.anchor.set(-rect.x / rect.width, -rect.y / rect.height);\n        sprite._onAnchorUpdate();\n\n        sprite._renderWebGL(renderer);\n    }\n\n    /**\n     * Renders the object using the Canvas renderer\n     *\n     * @private\n     * @param {PIXI.CanvasRenderer} renderer - The renderer\n     */\n    _renderCanvas(renderer)\n    {\n        if (this.isMask === true)\n        {\n            return;\n        }\n\n        renderer.plugins.graphics.render(this);\n    }\n\n    /**\n     * Retrieves the bounds of the graphic shape as a rectangle object\n     *\n     * @private\n     */\n    _calculateBounds()\n    {\n        if (this.boundsDirty !== this.dirty)\n        {\n            this.boundsDirty = this.dirty;\n            this.updateLocalBounds();\n\n            this.cachedSpriteDirty = true;\n        }\n\n        const lb = this._localBounds;\n\n        this._bounds.addFrame(this.transform, lb.minX, lb.minY, lb.maxX, lb.maxY);\n    }\n\n    /**\n     * Tests if a point is inside this graphics object\n     *\n     * @param {PIXI.Point} point - the point to test\n     * @return {boolean} the result of the test\n     */\n    containsPoint(point)\n    {\n        this.worldTransform.applyInverse(point, tempPoint);\n\n        const graphicsData = this.graphicsData;\n\n        for (let i = 0; i < graphicsData.length; ++i)\n        {\n            const data = graphicsData[i];\n\n            if (!data.fill)\n            {\n                continue;\n            }\n\n            // only deal with fills..\n            if (data.shape)\n            {\n                if (data.shape.contains(tempPoint.x, tempPoint.y))\n                {\n                    if (data.holes)\n                    {\n                        for (let i = 0; i < data.holes.length; i++)\n                        {\n                            const hole = data.holes[i];\n\n                            if (hole.contains(tempPoint.x, tempPoint.y))\n                            {\n                                return false;\n                            }\n                        }\n                    }\n\n                    return true;\n                }\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Update the bounds of the object\n     *\n     */\n    updateLocalBounds()\n    {\n        let minX = Infinity;\n        let maxX = -Infinity;\n\n        let minY = Infinity;\n        let maxY = -Infinity;\n\n        if (this.graphicsData.length)\n        {\n            let shape = 0;\n            let x = 0;\n            let y = 0;\n            let w = 0;\n            let h = 0;\n\n            for (let i = 0; i < this.graphicsData.length; i++)\n            {\n                const data = this.graphicsData[i];\n                const type = data.type;\n                const lineWidth = data.lineWidth;\n\n                shape = data.shape;\n\n                if (type === SHAPES.RECT || type === SHAPES.RREC)\n                {\n                    x = shape.x - (lineWidth / 2);\n                    y = shape.y - (lineWidth / 2);\n                    w = shape.width + lineWidth;\n                    h = shape.height + lineWidth;\n\n                    minX = x < minX ? x : minX;\n                    maxX = x + w > maxX ? x + w : maxX;\n\n                    minY = y < minY ? y : minY;\n                    maxY = y + h > maxY ? y + h : maxY;\n                }\n                else if (type === SHAPES.CIRC)\n                {\n                    x = shape.x;\n                    y = shape.y;\n                    w = shape.radius + (lineWidth / 2);\n                    h = shape.radius + (lineWidth / 2);\n\n                    minX = x - w < minX ? x - w : minX;\n                    maxX = x + w > maxX ? x + w : maxX;\n\n                    minY = y - h < minY ? y - h : minY;\n                    maxY = y + h > maxY ? y + h : maxY;\n                }\n                else if (type === SHAPES.ELIP)\n                {\n                    x = shape.x;\n                    y = shape.y;\n                    w = shape.width + (lineWidth / 2);\n                    h = shape.height + (lineWidth / 2);\n\n                    minX = x - w < minX ? x - w : minX;\n                    maxX = x + w > maxX ? x + w : maxX;\n\n                    minY = y - h < minY ? y - h : minY;\n                    maxY = y + h > maxY ? y + h : maxY;\n                }\n                else\n                {\n                    // POLY\n                    const points = shape.points;\n                    let x2 = 0;\n                    let y2 = 0;\n                    let dx = 0;\n                    let dy = 0;\n                    let rw = 0;\n                    let rh = 0;\n                    let cx = 0;\n                    let cy = 0;\n\n                    for (let j = 0; j + 2 < points.length; j += 2)\n                    {\n                        x = points[j];\n                        y = points[j + 1];\n                        x2 = points[j + 2];\n                        y2 = points[j + 3];\n                        dx = Math.abs(x2 - x);\n                        dy = Math.abs(y2 - y);\n                        h = lineWidth;\n                        w = Math.sqrt((dx * dx) + (dy * dy));\n\n                        if (w < 1e-9)\n                        {\n                            continue;\n                        }\n\n                        rw = ((h / w * dy) + dx) / 2;\n                        rh = ((h / w * dx) + dy) / 2;\n                        cx = (x2 + x) / 2;\n                        cy = (y2 + y) / 2;\n\n                        minX = cx - rw < minX ? cx - rw : minX;\n                        maxX = cx + rw > maxX ? cx + rw : maxX;\n\n                        minY = cy - rh < minY ? cy - rh : minY;\n                        maxY = cy + rh > maxY ? cy + rh : maxY;\n                    }\n                }\n            }\n        }\n        else\n        {\n            minX = 0;\n            maxX = 0;\n            minY = 0;\n            maxY = 0;\n        }\n\n        const padding = this.boundsPadding;\n\n        this._localBounds.minX = minX - padding;\n        this._localBounds.maxX = maxX + padding;\n\n        this._localBounds.minY = minY - padding;\n        this._localBounds.maxY = maxY + padding;\n    }\n\n    /**\n     * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon.\n     *\n     * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw.\n     * @return {PIXI.GraphicsData} The generated GraphicsData object.\n     */\n    drawShape(shape)\n    {\n        if (this.currentPath)\n        {\n            // check current path!\n            if (this.currentPath.shape.points.length <= 2)\n            {\n                this.graphicsData.pop();\n            }\n        }\n\n        this.currentPath = null;\n\n        const data = new GraphicsData(\n            this.lineWidth,\n            this.lineColor,\n            this.lineAlpha,\n            this.fillColor,\n            this.fillAlpha,\n            this.filling,\n            this.nativeLines,\n            shape\n        );\n\n        this.graphicsData.push(data);\n\n        if (data.type === SHAPES.POLY)\n        {\n            data.shape.closed = data.shape.closed || this.filling;\n            this.currentPath = data;\n        }\n\n        this.dirty++;\n\n        return data;\n    }\n\n    /**\n     * Generates a canvas texture.\n     *\n     * @param {number} scaleMode - The scale mode of the texture.\n     * @param {number} resolution - The resolution of the texture.\n     * @return {PIXI.Texture} The new texture.\n     */\n    generateCanvasTexture(scaleMode, resolution = 1)\n    {\n        const bounds = this.getLocalBounds();\n\n        const canvasBuffer = RenderTexture.create(bounds.width, bounds.height, scaleMode, resolution);\n\n        if (!canvasRenderer)\n        {\n            canvasRenderer = new CanvasRenderer();\n        }\n\n        this.transform.updateLocalTransform();\n        this.transform.localTransform.copy(tempMatrix);\n\n        tempMatrix.invert();\n\n        tempMatrix.tx -= bounds.x;\n        tempMatrix.ty -= bounds.y;\n\n        canvasRenderer.render(this, canvasBuffer, true, tempMatrix);\n\n        const texture = Texture.fromCanvas(canvasBuffer.baseTexture._canvasRenderTarget.canvas, scaleMode, 'graphics');\n\n        texture.baseTexture.resolution = resolution;\n        texture.baseTexture.update();\n\n        return texture;\n    }\n\n    /**\n     * Closes the current path.\n     *\n     * @return {PIXI.Graphics} Returns itself.\n     */\n    closePath()\n    {\n        // ok so close path assumes next one is a hole!\n        const currentPath = this.currentPath;\n\n        if (currentPath && currentPath.shape)\n        {\n            currentPath.shape.close();\n        }\n\n        return this;\n    }\n\n    /**\n     * Adds a hole in the current path.\n     *\n     * @return {PIXI.Graphics} Returns itself.\n     */\n    addHole()\n    {\n        // this is a hole!\n        const hole = this.graphicsData.pop();\n\n        this.currentPath = this.graphicsData[this.graphicsData.length - 1];\n\n        this.currentPath.addHole(hole.shape);\n        this.currentPath = null;\n\n        return this;\n    }\n\n    /**\n     * Destroys the Graphics object.\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all\n     *  options have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have\n     *  their destroy method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the texture of the child sprite\n     * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the base texture of the child sprite\n     */\n    destroy(options)\n    {\n        super.destroy(options);\n\n        // destroy each of the GraphicsData objects\n        for (let i = 0; i < this.graphicsData.length; ++i)\n        {\n            this.graphicsData[i].destroy();\n        }\n\n        // for each webgl data entry, destroy the WebGLGraphicsData\n        for (const id in this._webgl)\n        {\n            for (let j = 0; j < this._webgl[id].data.length; ++j)\n            {\n                this._webgl[id].data[j].destroy();\n            }\n        }\n\n        if (this._spriteRect)\n        {\n            this._spriteRect.destroy();\n        }\n\n        this.graphicsData = null;\n\n        this.currentPath = null;\n        this._webgl = null;\n        this._localBounds = null;\n    }\n\n}\n\nGraphics._SPRITE_TEXTURE = null;\n","/**\n * A GraphicsData object.\n *\n * @class\n * @memberof PIXI\n */\nexport default class GraphicsData\n{\n    /**\n     *\n     * @param {number} lineWidth - the width of the line to draw\n     * @param {number} lineColor - the color of the line to draw\n     * @param {number} lineAlpha - the alpha of the line to draw\n     * @param {number} fillColor - the color of the fill\n     * @param {number} fillAlpha - the alpha of the fill\n     * @param {boolean} fill - whether or not the shape is filled with a colour\n     * @param {boolean} nativeLines - the method for drawing lines\n     * @param {PIXI.Circle|PIXI.Rectangle|PIXI.Ellipse|PIXI.Polygon} shape - The shape object to draw.\n     */\n    constructor(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, nativeLines, shape)\n    {\n        /**\n         * @member {number} the width of the line to draw\n         */\n        this.lineWidth = lineWidth;\n        /**\n         * @member {boolean} if true the liens will be draw using LINES instead of TRIANGLE_STRIP\n         */\n        this.nativeLines = nativeLines;\n\n        /**\n         * @member {number} the color of the line to draw\n         */\n        this.lineColor = lineColor;\n\n        /**\n         * @member {number} the alpha of the line to draw\n         */\n        this.lineAlpha = lineAlpha;\n\n        /**\n         * @member {number} cached tint of the line to draw\n         */\n        this._lineTint = lineColor;\n\n        /**\n         * @member {number} the color of the fill\n         */\n        this.fillColor = fillColor;\n\n        /**\n         * @member {number} the alpha of the fill\n         */\n        this.fillAlpha = fillAlpha;\n\n        /**\n         * @member {number} cached tint of the fill\n         */\n        this._fillTint = fillColor;\n\n        /**\n         * @member {boolean} whether or not the shape is filled with a colour\n         */\n        this.fill = fill;\n\n        this.holes = [];\n\n        /**\n         * @member {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw.\n         */\n        this.shape = shape;\n\n        /**\n         * @member {number} The type of the shape, see the Const.Shapes file for all the existing types,\n         */\n        this.type = shape.type;\n    }\n\n    /**\n     * Creates a new GraphicsData object with the same values as this one.\n     *\n     * @return {PIXI.GraphicsData} Cloned GraphicsData object\n     */\n    clone()\n    {\n        return new GraphicsData(\n            this.lineWidth,\n            this.lineColor,\n            this.lineAlpha,\n            this.fillColor,\n            this.fillAlpha,\n            this.fill,\n            this.nativeLines,\n            this.shape\n        );\n    }\n\n    /**\n     * Adds a hole to the shape.\n     *\n     * @param {PIXI.Rectangle|PIXI.Circle} shape - The shape of the hole.\n     */\n    addHole(shape)\n    {\n        this.holes.push(shape);\n    }\n\n    /**\n     * Destroys the Graphics data.\n     */\n    destroy()\n    {\n        this.shape = null;\n        this.holes = null;\n    }\n}\n","import CanvasRenderer from '../../renderers/canvas/CanvasRenderer';\nimport { SHAPES } from '../../const';\n\n/**\n * @author Mat Groves\n *\n * Big thanks to the very clever Matt DesLauriers <mattdesl> https://github.com/mattdesl/\n * for creating the original PixiJS version!\n * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that they\n * now share 4 bytes on the vertex buffer\n *\n * Heavily inspired by LibGDX's CanvasGraphicsRenderer:\n * https://github.com/libgdx/libgdx/blob/1.0.0/gdx/src/com/badlogic/gdx/graphics/glutils/ShapeRenderer.java\n */\n\n/**\n * Renderer dedicated to drawing and batching graphics objects.\n *\n * @class\n * @private\n * @memberof PIXI\n */\nexport default class CanvasGraphicsRenderer\n{\n    /**\n     * @param {PIXI.CanvasRenderer} renderer - The current PIXI renderer.\n     */\n    constructor(renderer)\n    {\n        this.renderer = renderer;\n    }\n\n    /**\n     * Renders a Graphics object to a canvas.\n     *\n     * @param {PIXI.Graphics} graphics - the actual graphics object to render\n     */\n    render(graphics)\n    {\n        const renderer = this.renderer;\n        const context = renderer.context;\n        const worldAlpha = graphics.worldAlpha;\n        const transform = graphics.transform.worldTransform;\n        const resolution = renderer.resolution;\n\n         // if the tint has changed, set the graphics object to dirty.\n        if (this._prevTint !== this.tint)\n        {\n            this.dirty = true;\n        }\n\n        context.setTransform(\n            transform.a * resolution,\n            transform.b * resolution,\n            transform.c * resolution,\n            transform.d * resolution,\n            transform.tx * resolution,\n            transform.ty * resolution\n        );\n\n        if (graphics.dirty)\n        {\n            this.updateGraphicsTint(graphics);\n            graphics.dirty = false;\n        }\n\n        renderer.setBlendMode(graphics.blendMode);\n\n        for (let i = 0; i < graphics.graphicsData.length; i++)\n        {\n            const data = graphics.graphicsData[i];\n            const shape = data.shape;\n\n            const fillColor = data._fillTint;\n            const lineColor = data._lineTint;\n\n            context.lineWidth = data.lineWidth;\n\n            if (data.type === SHAPES.POLY)\n            {\n                context.beginPath();\n\n                this.renderPolygon(shape.points, shape.closed, context);\n\n                for (let j = 0; j < data.holes.length; j++)\n                {\n                    this.renderPolygon(data.holes[j].points, true, context);\n                }\n\n                if (data.fill)\n                {\n                    context.globalAlpha = data.fillAlpha * worldAlpha;\n                    context.fillStyle = `#${(`00000${(fillColor | 0).toString(16)}`).substr(-6)}`;\n                    context.fill();\n                }\n                if (data.lineWidth)\n                {\n                    context.globalAlpha = data.lineAlpha * worldAlpha;\n                    context.strokeStyle = `#${(`00000${(lineColor | 0).toString(16)}`).substr(-6)}`;\n                    context.stroke();\n                }\n            }\n            else if (data.type === SHAPES.RECT)\n            {\n                if (data.fillColor || data.fillColor === 0)\n                {\n                    context.globalAlpha = data.fillAlpha * worldAlpha;\n                    context.fillStyle = `#${(`00000${(fillColor | 0).toString(16)}`).substr(-6)}`;\n                    context.fillRect(shape.x, shape.y, shape.width, shape.height);\n                }\n                if (data.lineWidth)\n                {\n                    context.globalAlpha = data.lineAlpha * worldAlpha;\n                    context.strokeStyle = `#${(`00000${(lineColor | 0).toString(16)}`).substr(-6)}`;\n                    context.strokeRect(shape.x, shape.y, shape.width, shape.height);\n                }\n            }\n            else if (data.type === SHAPES.CIRC)\n            {\n                // TODO - need to be Undefined!\n                context.beginPath();\n                context.arc(shape.x, shape.y, shape.radius, 0, 2 * Math.PI);\n                context.closePath();\n\n                if (data.fill)\n                {\n                    context.globalAlpha = data.fillAlpha * worldAlpha;\n                    context.fillStyle = `#${(`00000${(fillColor | 0).toString(16)}`).substr(-6)}`;\n                    context.fill();\n                }\n                if (data.lineWidth)\n                {\n                    context.globalAlpha = data.lineAlpha * worldAlpha;\n                    context.strokeStyle = `#${(`00000${(lineColor | 0).toString(16)}`).substr(-6)}`;\n                    context.stroke();\n                }\n            }\n            else if (data.type === SHAPES.ELIP)\n            {\n                // ellipse code taken from: http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n\n                const w = shape.width * 2;\n                const h = shape.height * 2;\n\n                const x = shape.x - (w / 2);\n                const y = shape.y - (h / 2);\n\n                context.beginPath();\n\n                const kappa = 0.5522848;\n                const ox = (w / 2) * kappa; // control point offset horizontal\n                const oy = (h / 2) * kappa; // control point offset vertical\n                const xe = x + w;           // x-end\n                const ye = y + h;           // y-end\n                const xm = x + (w / 2);       // x-middle\n                const ym = y + (h / 2);       // y-middle\n\n                context.moveTo(x, ym);\n                context.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n                context.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n                context.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n                context.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n\n                context.closePath();\n\n                if (data.fill)\n                {\n                    context.globalAlpha = data.fillAlpha * worldAlpha;\n                    context.fillStyle = `#${(`00000${(fillColor | 0).toString(16)}`).substr(-6)}`;\n                    context.fill();\n                }\n                if (data.lineWidth)\n                {\n                    context.globalAlpha = data.lineAlpha * worldAlpha;\n                    context.strokeStyle = `#${(`00000${(lineColor | 0).toString(16)}`).substr(-6)}`;\n                    context.stroke();\n                }\n            }\n            else if (data.type === SHAPES.RREC)\n            {\n                const rx = shape.x;\n                const ry = shape.y;\n                const width = shape.width;\n                const height = shape.height;\n                let radius = shape.radius;\n\n                const maxRadius = Math.min(width, height) / 2 | 0;\n\n                radius = radius > maxRadius ? maxRadius : radius;\n\n                context.beginPath();\n                context.moveTo(rx, ry + radius);\n                context.lineTo(rx, ry + height - radius);\n                context.quadraticCurveTo(rx, ry + height, rx + radius, ry + height);\n                context.lineTo(rx + width - radius, ry + height);\n                context.quadraticCurveTo(rx + width, ry + height, rx + width, ry + height - radius);\n                context.lineTo(rx + width, ry + radius);\n                context.quadraticCurveTo(rx + width, ry, rx + width - radius, ry);\n                context.lineTo(rx + radius, ry);\n                context.quadraticCurveTo(rx, ry, rx, ry + radius);\n                context.closePath();\n\n                if (data.fillColor || data.fillColor === 0)\n                {\n                    context.globalAlpha = data.fillAlpha * worldAlpha;\n                    context.fillStyle = `#${(`00000${(fillColor | 0).toString(16)}`).substr(-6)}`;\n                    context.fill();\n                }\n\n                if (data.lineWidth)\n                {\n                    context.globalAlpha = data.lineAlpha * worldAlpha;\n                    context.strokeStyle = `#${(`00000${(lineColor | 0).toString(16)}`).substr(-6)}`;\n                    context.stroke();\n                }\n            }\n        }\n    }\n\n    /**\n     * Updates the tint of a graphics object\n     *\n     * @private\n     * @param {PIXI.Graphics} graphics - the graphics that will have its tint updated\n     */\n    updateGraphicsTint(graphics)\n    {\n        graphics._prevTint = graphics.tint;\n\n        const tintR = ((graphics.tint >> 16) & 0xFF) / 255;\n        const tintG = ((graphics.tint >> 8) & 0xFF) / 255;\n        const tintB = (graphics.tint & 0xFF) / 255;\n\n        for (let i = 0; i < graphics.graphicsData.length; ++i)\n        {\n            const data = graphics.graphicsData[i];\n\n            const fillColor = data.fillColor | 0;\n            const lineColor = data.lineColor | 0;\n\n            // super inline cos im an optimization NAZI :)\n            data._fillTint = (\n                (((fillColor >> 16) & 0xFF) / 255 * tintR * 255 << 16)\n                + (((fillColor >> 8) & 0xFF) / 255 * tintG * 255 << 8)\n                + (((fillColor & 0xFF) / 255) * tintB * 255)\n            );\n\n            data._lineTint = (\n                (((lineColor >> 16) & 0xFF) / 255 * tintR * 255 << 16)\n                + (((lineColor >> 8) & 0xFF) / 255 * tintG * 255 << 8)\n                + (((lineColor & 0xFF) / 255) * tintB * 255)\n            );\n        }\n    }\n\n    /**\n     * Renders a polygon.\n     *\n     * @param {PIXI.Point[]} points - The points to render\n     * @param {boolean} close - Should the polygon be closed\n     * @param {CanvasRenderingContext2D} context - The rendering context to use\n     */\n    renderPolygon(points, close, context)\n    {\n        context.moveTo(points[0], points[1]);\n\n        for (let j = 1; j < points.length / 2; ++j)\n        {\n            context.lineTo(points[j * 2], points[(j * 2) + 1]);\n        }\n\n        if (close)\n        {\n            context.closePath();\n        }\n    }\n\n    /**\n     * destroy graphics object\n     *\n     */\n    destroy()\n    {\n        this.renderer = null;\n    }\n}\n\nCanvasRenderer.registerPlugin('graphics', CanvasGraphicsRenderer);\n","/**\n * Calculate the points for a bezier curve and then draws it.\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @param {number} fromX - Starting point x\n * @param {number} fromY - Starting point y\n * @param {number} cpX - Control point x\n * @param {number} cpY - Control point y\n * @param {number} cpX2 - Second Control point x\n * @param {number} cpY2 - Second Control point y\n * @param {number} toX - Destination point x\n * @param {number} toY - Destination point y\n * @param {number[]} [path=[]] - Path array to push points into\n * @return {number[]} Array of points of the curve\n */\nexport default function bezierCurveTo(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path = [])\n{\n    const n = 20;\n    let dt = 0;\n    let dt2 = 0;\n    let dt3 = 0;\n    let t2 = 0;\n    let t3 = 0;\n\n    path.push(fromX, fromY);\n\n    for (let i = 1, j = 0; i <= n; ++i)\n    {\n        j = i / n;\n\n        dt = (1 - j);\n        dt2 = dt * dt;\n        dt3 = dt2 * dt;\n\n        t2 = j * j;\n        t3 = t2 * j;\n\n        path.push(\n            (dt3 * fromX) + (3 * dt2 * j * cpX) + (3 * dt * t2 * cpX2) + (t3 * toX),\n            (dt3 * fromY) + (3 * dt2 * j * cpY) + (3 * dt * t2 * cpY2) + (t3 * toY)\n        );\n    }\n\n    return path;\n}\n","import { hex2rgb } from '../../utils';\nimport { SHAPES } from '../../const';\nimport ObjectRenderer from '../../renderers/webgl/utils/ObjectRenderer';\nimport WebGLRenderer from '../../renderers/webgl/WebGLRenderer';\nimport WebGLGraphicsData from './WebGLGraphicsData';\nimport PrimitiveShader from './shaders/PrimitiveShader';\n\nimport buildPoly from './utils/buildPoly';\nimport buildRectangle from './utils/buildRectangle';\nimport buildRoundedRectangle from './utils/buildRoundedRectangle';\nimport buildCircle from './utils/buildCircle';\n\n/**\n * Renders the graphics object.\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.ObjectRenderer\n */\nexport default class GraphicsRenderer extends ObjectRenderer\n{\n    /**\n     * @param {PIXI.WebGLRenderer} renderer - The renderer this object renderer works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        this.graphicsDataPool = [];\n\n        this.primitiveShader = null;\n\n        this.gl = renderer.gl;\n\n        // easy access!\n        this.CONTEXT_UID = 0;\n    }\n\n    /**\n     * Called when there is a WebGL context change\n     *\n     * @private\n     *\n     */\n    onContextChange()\n    {\n        this.gl = this.renderer.gl;\n        this.CONTEXT_UID = this.renderer.CONTEXT_UID;\n        this.primitiveShader = new PrimitiveShader(this.gl);\n    }\n\n    /**\n     * Destroys this renderer.\n     *\n     */\n    destroy()\n    {\n        ObjectRenderer.prototype.destroy.call(this);\n\n        for (let i = 0; i < this.graphicsDataPool.length; ++i)\n        {\n            this.graphicsDataPool[i].destroy();\n        }\n\n        this.graphicsDataPool = null;\n    }\n\n    /**\n     * Renders a graphics object.\n     *\n     * @param {PIXI.Graphics} graphics - The graphics object to render.\n     */\n    render(graphics)\n    {\n        const renderer = this.renderer;\n        const gl = renderer.gl;\n\n        let webGLData;\n        let webGL = graphics._webGL[this.CONTEXT_UID];\n\n        if (!webGL || graphics.dirty !== webGL.dirty)\n        {\n            this.updateGraphics(graphics);\n\n            webGL = graphics._webGL[this.CONTEXT_UID];\n        }\n\n        // This  could be speeded up for sure!\n        const shader = this.primitiveShader;\n\n        renderer.bindShader(shader);\n        renderer.state.setBlendMode(graphics.blendMode);\n\n        for (let i = 0, n = webGL.data.length; i < n; i++)\n        {\n            webGLData = webGL.data[i];\n            const shaderTemp = webGLData.shader;\n\n            renderer.bindShader(shaderTemp);\n            shaderTemp.uniforms.translationMatrix = graphics.transform.worldTransform.toArray(true);\n            shaderTemp.uniforms.tint = hex2rgb(graphics.tint);\n            shaderTemp.uniforms.alpha = graphics.worldAlpha;\n\n            renderer.bindVao(webGLData.vao);\n\n            if (webGLData.nativeLines)\n            {\n                gl.drawArrays(gl.LINES, 0, webGLData.points.length / 6);\n            }\n            else\n            {\n                webGLData.vao.draw(gl.TRIANGLE_STRIP, webGLData.indices.length);\n            }\n        }\n    }\n\n    /**\n     * Updates the graphics object\n     *\n     * @private\n     * @param {PIXI.Graphics} graphics - The graphics object to update\n     */\n    updateGraphics(graphics)\n    {\n        const gl = this.renderer.gl;\n\n         // get the contexts graphics object\n        let webGL = graphics._webGL[this.CONTEXT_UID];\n\n        // if the graphics object does not exist in the webGL context time to create it!\n        if (!webGL)\n        {\n            webGL = graphics._webGL[this.CONTEXT_UID] = { lastIndex: 0, data: [], gl, clearDirty: -1, dirty: -1 };\n        }\n\n        // flag the graphics as not dirty as we are about to update it...\n        webGL.dirty = graphics.dirty;\n\n        // if the user cleared the graphics object we will need to clear every object\n        if (graphics.clearDirty !== webGL.clearDirty)\n        {\n            webGL.clearDirty = graphics.clearDirty;\n\n            // loop through and return all the webGLDatas to the object pool so than can be reused later on\n            for (let i = 0; i < webGL.data.length; i++)\n            {\n                this.graphicsDataPool.push(webGL.data[i]);\n            }\n\n            // clear the array and reset the index..\n            webGL.data.length = 0;\n            webGL.lastIndex = 0;\n        }\n\n        let webGLData;\n        let webGLDataNativeLines;\n\n        // loop through the graphics datas and construct each one..\n        // if the object is a complex fill then the new stencil buffer technique will be used\n        // other wise graphics objects will be pushed into a batch..\n        for (let i = webGL.lastIndex; i < graphics.graphicsData.length; i++)\n        {\n            const data = graphics.graphicsData[i];\n\n            // TODO - this can be simplified\n            webGLData = this.getWebGLData(webGL, 0);\n\n            if (data.nativeLines && data.lineWidth)\n            {\n                webGLDataNativeLines = this.getWebGLData(webGL, 0, true);\n                webGL.lastIndex++;\n            }\n\n            if (data.type === SHAPES.POLY)\n            {\n                buildPoly(data, webGLData, webGLDataNativeLines);\n            }\n            if (data.type === SHAPES.RECT)\n            {\n                buildRectangle(data, webGLData, webGLDataNativeLines);\n            }\n            else if (data.type === SHAPES.CIRC || data.type === SHAPES.ELIP)\n            {\n                buildCircle(data, webGLData, webGLDataNativeLines);\n            }\n            else if (data.type === SHAPES.RREC)\n            {\n                buildRoundedRectangle(data, webGLData, webGLDataNativeLines);\n            }\n\n            webGL.lastIndex++;\n        }\n\n        this.renderer.bindVao(null);\n\n        // upload all the dirty data...\n        for (let i = 0; i < webGL.data.length; i++)\n        {\n            webGLData = webGL.data[i];\n\n            if (webGLData.dirty)\n            {\n                webGLData.upload();\n            }\n        }\n    }\n\n    /**\n     *\n     * @private\n     * @param {WebGLRenderingContext} gl - the current WebGL drawing context\n     * @param {number} type - TODO @Alvin\n     * @param {number} nativeLines - indicate whether the webGLData use for nativeLines.\n     * @return {*} TODO\n     */\n    getWebGLData(gl, type, nativeLines)\n    {\n        let webGLData = gl.data[gl.data.length - 1];\n\n        if (!webGLData || webGLData.nativeLines !== nativeLines || webGLData.points.length > 320000)\n        {\n            webGLData = this.graphicsDataPool.pop()\n                || new WebGLGraphicsData(this.renderer.gl, this.primitiveShader, this.renderer.state.attribsState);\n            webGLData.nativeLines = nativeLines;\n            webGLData.reset(type);\n            gl.data.push(webGLData);\n        }\n\n        webGLData.dirty = true;\n\n        return webGLData;\n    }\n}\n\nWebGLRenderer.registerPlugin('graphics', GraphicsRenderer);\n","import glCore from 'pixi-gl-core';\n\n/**\n * An object containing WebGL specific properties to be used by the WebGL renderer\n *\n * @class\n * @private\n * @memberof PIXI\n */\nexport default class WebGLGraphicsData\n{\n    /**\n     * @param {WebGLRenderingContext} gl - The current WebGL drawing context\n     * @param {PIXI.Shader} shader - The shader\n     * @param {object} attribsState - The state for the VAO\n     */\n    constructor(gl, shader, attribsState)\n    {\n        /**\n         * The current WebGL drawing context\n         *\n         * @member {WebGLRenderingContext}\n         */\n        this.gl = gl;\n\n        // TODO does this need to be split before uploading??\n        /**\n         * An array of color components (r,g,b)\n         * @member {number[]}\n         */\n        this.color = [0, 0, 0]; // color split!\n\n        /**\n         * An array of points to draw\n         * @member {PIXI.Point[]}\n         */\n        this.points = [];\n\n        /**\n         * The indices of the vertices\n         * @member {number[]}\n         */\n        this.indices = [];\n        /**\n         * The main buffer\n         * @member {WebGLBuffer}\n         */\n        this.buffer = glCore.GLBuffer.createVertexBuffer(gl);\n\n        /**\n         * The index buffer\n         * @member {WebGLBuffer}\n         */\n        this.indexBuffer = glCore.GLBuffer.createIndexBuffer(gl);\n\n        /**\n         * Whether this graphics is dirty or not\n         * @member {boolean}\n         */\n        this.dirty = true;\n\n        /**\n         * Whether this graphics is nativeLines or not\n         * @member {boolean}\n         */\n        this.nativeLines = false;\n\n        this.glPoints = null;\n        this.glIndices = null;\n\n        /**\n         *\n         * @member {PIXI.Shader}\n         */\n        this.shader = shader;\n\n        this.vao = new glCore.VertexArrayObject(gl, attribsState)\n        .addIndex(this.indexBuffer)\n        .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0)\n        .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4);\n    }\n\n    /**\n     * Resets the vertices and the indices\n     */\n    reset()\n    {\n        this.points.length = 0;\n        this.indices.length = 0;\n    }\n\n    /**\n     * Binds the buffers and uploads the data\n     */\n    upload()\n    {\n        this.glPoints = new Float32Array(this.points);\n        this.buffer.upload(this.glPoints);\n\n        this.glIndices = new Uint16Array(this.indices);\n        this.indexBuffer.upload(this.glIndices);\n\n        this.dirty = false;\n    }\n\n    /**\n     * Empties all the data\n     */\n    destroy()\n    {\n        this.color = null;\n        this.points = null;\n        this.indices = null;\n\n        this.vao.destroy();\n        this.buffer.destroy();\n        this.indexBuffer.destroy();\n\n        this.gl = null;\n\n        this.buffer = null;\n        this.indexBuffer = null;\n\n        this.glPoints = null;\n        this.glIndices = null;\n    }\n}\n","import Shader from '../../../Shader';\n\n/**\n * This shader is used to draw simple primitive shapes for {@link PIXI.Graphics}.\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.Shader\n */\nexport default class PrimitiveShader extends Shader\n{\n    /**\n     * @param {WebGLRenderingContext} gl - The webgl shader manager this shader works for.\n     */\n    constructor(gl)\n    {\n        super(gl,\n            // vertex shader\n            [\n                'attribute vec2 aVertexPosition;',\n                'attribute vec4 aColor;',\n\n                'uniform mat3 translationMatrix;',\n                'uniform mat3 projectionMatrix;',\n\n                'uniform float alpha;',\n                'uniform vec3 tint;',\n\n                'varying vec4 vColor;',\n\n                'void main(void){',\n                '   gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);',\n                '   vColor = aColor * vec4(tint * alpha, alpha);',\n                '}',\n            ].join('\\n'),\n            // fragment shader\n            [\n                'varying vec4 vColor;',\n\n                'void main(void){',\n                '   gl_FragColor = vColor;',\n                '}',\n            ].join('\\n')\n        );\n    }\n}\n","import buildLine from './buildLine';\nimport { SHAPES } from '../../../const';\nimport { hex2rgb } from '../../../utils';\n\n/**\n * Builds a circle to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object to draw\n * @param {object} webGLData - an object containing all the webGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the webGL-specific information to create nativeLines\n */\nexport default function buildCircle(graphicsData, webGLData, webGLDataNativeLines)\n{\n    // need to convert points to a nice regular data\n    const circleData = graphicsData.shape;\n    const x = circleData.x;\n    const y = circleData.y;\n    let width;\n    let height;\n\n    // TODO - bit hacky??\n    if (graphicsData.type === SHAPES.CIRC)\n    {\n        width = circleData.radius;\n        height = circleData.radius;\n    }\n    else\n    {\n        width = circleData.width;\n        height = circleData.height;\n    }\n\n    if (width === 0 || height === 0)\n    {\n        return;\n    }\n\n    const totalSegs = Math.floor(30 * Math.sqrt(circleData.radius))\n        || Math.floor(15 * Math.sqrt(circleData.width + circleData.height));\n\n    const seg = (Math.PI * 2) / totalSegs;\n\n    if (graphicsData.fill)\n    {\n        const color = hex2rgb(graphicsData.fillColor);\n        const alpha = graphicsData.fillAlpha;\n\n        const r = color[0] * alpha;\n        const g = color[1] * alpha;\n        const b = color[2] * alpha;\n\n        const verts = webGLData.points;\n        const indices = webGLData.indices;\n\n        let vecPos = verts.length / 6;\n\n        indices.push(vecPos);\n\n        for (let i = 0; i < totalSegs + 1; i++)\n        {\n            verts.push(x, y, r, g, b, alpha);\n\n            verts.push(\n                x + (Math.sin(seg * i) * width),\n                y + (Math.cos(seg * i) * height),\n                r, g, b, alpha\n            );\n\n            indices.push(vecPos++, vecPos++);\n        }\n\n        indices.push(vecPos - 1);\n    }\n\n    if (graphicsData.lineWidth)\n    {\n        const tempPoints = graphicsData.points;\n\n        graphicsData.points = [];\n\n        for (let i = 0; i < totalSegs + 1; i++)\n        {\n            graphicsData.points.push(\n                x + (Math.sin(seg * i) * width),\n                y + (Math.cos(seg * i) * height)\n            );\n        }\n\n        buildLine(graphicsData, webGLData, webGLDataNativeLines);\n\n        graphicsData.points = tempPoints;\n    }\n}\n","import { Point } from '../../../math';\nimport { hex2rgb } from '../../../utils';\n\n/**\n * Builds a line to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {object} webGLData - an object containing all the webGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the webGL-specific information to create nativeLines\n */\nexport default function (graphicsData, webGLData, webGLDataNativeLines)\n{\n    if (graphicsData.nativeLines)\n    {\n        buildNativeLine(graphicsData, webGLDataNativeLines);\n    }\n    else\n    {\n        buildLine(graphicsData, webGLData);\n    }\n}\n\n/**\n * Builds a line to draw using the poligon method.\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {object} webGLData - an object containing all the webGL-specific information to create this shape\n */\nfunction buildLine(graphicsData, webGLData)\n{\n    // TODO OPTIMISE!\n    let points = graphicsData.points;\n\n    if (points.length === 0)\n    {\n        return;\n    }\n    // if the line width is an odd number add 0.5 to align to a whole pixel\n    // commenting this out fixes #711 and #1620\n    // if (graphicsData.lineWidth%2)\n    // {\n    //     for (i = 0; i < points.length; i++)\n    //     {\n    //         points[i] += 0.5;\n    //     }\n    // }\n\n    // get first and last point.. figure out the middle!\n    const firstPoint = new Point(points[0], points[1]);\n    let lastPoint = new Point(points[points.length - 2], points[points.length - 1]);\n\n    // if the first point is the last point - gonna have issues :)\n    if (firstPoint.x === lastPoint.x && firstPoint.y === lastPoint.y)\n    {\n        // need to clone as we are going to slightly modify the shape..\n        points = points.slice();\n\n        points.pop();\n        points.pop();\n\n        lastPoint = new Point(points[points.length - 2], points[points.length - 1]);\n\n        const midPointX = lastPoint.x + ((firstPoint.x - lastPoint.x) * 0.5);\n        const midPointY = lastPoint.y + ((firstPoint.y - lastPoint.y) * 0.5);\n\n        points.unshift(midPointX, midPointY);\n        points.push(midPointX, midPointY);\n    }\n\n    const verts = webGLData.points;\n    const indices = webGLData.indices;\n    const length = points.length / 2;\n    let indexCount = points.length;\n    let indexStart = verts.length / 6;\n\n    // DRAW the Line\n    const width = graphicsData.lineWidth / 2;\n\n    // sort color\n    const color = hex2rgb(graphicsData.lineColor);\n    const alpha = graphicsData.lineAlpha;\n    const r = color[0] * alpha;\n    const g = color[1] * alpha;\n    const b = color[2] * alpha;\n\n    let p1x = points[0];\n    let p1y = points[1];\n    let p2x = points[2];\n    let p2y = points[3];\n    let p3x = 0;\n    let p3y = 0;\n\n    let perpx = -(p1y - p2y);\n    let perpy = p1x - p2x;\n    let perp2x = 0;\n    let perp2y = 0;\n    let perp3x = 0;\n    let perp3y = 0;\n\n    let dist = Math.sqrt((perpx * perpx) + (perpy * perpy));\n\n    perpx /= dist;\n    perpy /= dist;\n    perpx *= width;\n    perpy *= width;\n\n    // start\n    verts.push(\n        p1x - perpx,\n        p1y - perpy,\n        r, g, b, alpha\n    );\n\n    verts.push(\n        p1x + perpx,\n        p1y + perpy,\n        r, g, b, alpha\n    );\n\n    for (let i = 1; i < length - 1; ++i)\n    {\n        p1x = points[(i - 1) * 2];\n        p1y = points[((i - 1) * 2) + 1];\n\n        p2x = points[i * 2];\n        p2y = points[(i * 2) + 1];\n\n        p3x = points[(i + 1) * 2];\n        p3y = points[((i + 1) * 2) + 1];\n\n        perpx = -(p1y - p2y);\n        perpy = p1x - p2x;\n\n        dist = Math.sqrt((perpx * perpx) + (perpy * perpy));\n        perpx /= dist;\n        perpy /= dist;\n        perpx *= width;\n        perpy *= width;\n\n        perp2x = -(p2y - p3y);\n        perp2y = p2x - p3x;\n\n        dist = Math.sqrt((perp2x * perp2x) + (perp2y * perp2y));\n        perp2x /= dist;\n        perp2y /= dist;\n        perp2x *= width;\n        perp2y *= width;\n\n        const a1 = (-perpy + p1y) - (-perpy + p2y);\n        const b1 = (-perpx + p2x) - (-perpx + p1x);\n        const c1 = ((-perpx + p1x) * (-perpy + p2y)) - ((-perpx + p2x) * (-perpy + p1y));\n        const a2 = (-perp2y + p3y) - (-perp2y + p2y);\n        const b2 = (-perp2x + p2x) - (-perp2x + p3x);\n        const c2 = ((-perp2x + p3x) * (-perp2y + p2y)) - ((-perp2x + p2x) * (-perp2y + p3y));\n\n        let denom = (a1 * b2) - (a2 * b1);\n\n        if (Math.abs(denom) < 0.1)\n        {\n            denom += 10.1;\n            verts.push(\n                p2x - perpx,\n                p2y - perpy,\n                r, g, b, alpha\n            );\n\n            verts.push(\n                p2x + perpx,\n                p2y + perpy,\n                r, g, b, alpha\n            );\n\n            continue;\n        }\n\n        const px = ((b1 * c2) - (b2 * c1)) / denom;\n        const py = ((a2 * c1) - (a1 * c2)) / denom;\n        const pdist = ((px - p2x) * (px - p2x)) + ((py - p2y) * (py - p2y));\n\n        if (pdist > (196 * width * width))\n        {\n            perp3x = perpx - perp2x;\n            perp3y = perpy - perp2y;\n\n            dist = Math.sqrt((perp3x * perp3x) + (perp3y * perp3y));\n            perp3x /= dist;\n            perp3y /= dist;\n            perp3x *= width;\n            perp3y *= width;\n\n            verts.push(p2x - perp3x, p2y - perp3y);\n            verts.push(r, g, b, alpha);\n\n            verts.push(p2x + perp3x, p2y + perp3y);\n            verts.push(r, g, b, alpha);\n\n            verts.push(p2x - perp3x, p2y - perp3y);\n            verts.push(r, g, b, alpha);\n\n            indexCount++;\n        }\n        else\n        {\n            verts.push(px, py);\n            verts.push(r, g, b, alpha);\n\n            verts.push(p2x - (px - p2x), p2y - (py - p2y));\n            verts.push(r, g, b, alpha);\n        }\n    }\n\n    p1x = points[(length - 2) * 2];\n    p1y = points[((length - 2) * 2) + 1];\n\n    p2x = points[(length - 1) * 2];\n    p2y = points[((length - 1) * 2) + 1];\n\n    perpx = -(p1y - p2y);\n    perpy = p1x - p2x;\n\n    dist = Math.sqrt((perpx * perpx) + (perpy * perpy));\n    perpx /= dist;\n    perpy /= dist;\n    perpx *= width;\n    perpy *= width;\n\n    verts.push(p2x - perpx, p2y - perpy);\n    verts.push(r, g, b, alpha);\n\n    verts.push(p2x + perpx, p2y + perpy);\n    verts.push(r, g, b, alpha);\n\n    indices.push(indexStart);\n\n    for (let i = 0; i < indexCount; ++i)\n    {\n        indices.push(indexStart++);\n    }\n\n    indices.push(indexStart - 1);\n}\n\n/**\n * Builds a line to draw using the gl.drawArrays(gl.LINES) method\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {object} webGLData - an object containing all the webGL-specific information to create this shape\n */\nfunction buildNativeLine(graphicsData, webGLData)\n{\n    let i = 0;\n    const points = graphicsData.points;\n\n    if (points.length === 0) return;\n\n    const verts = webGLData.points;\n    const length = points.length / 2;\n\n    // sort color\n    const color = hex2rgb(graphicsData.lineColor);\n    const alpha = graphicsData.lineAlpha;\n    const r = color[0] * alpha;\n    const g = color[1] * alpha;\n    const b = color[2] * alpha;\n\n    for (i = 1; i < length; i++)\n    {\n        const p1x = points[(i - 1) * 2];\n        const p1y = points[((i - 1) * 2) + 1];\n\n        const p2x = points[i * 2];\n        const p2y = points[(i * 2) + 1];\n\n        verts.push(p1x, p1y);\n        verts.push(r, g, b, alpha);\n\n        verts.push(p2x, p2y);\n        verts.push(r, g, b, alpha);\n    }\n}\n","import buildLine from './buildLine';\nimport { hex2rgb } from '../../../utils';\nimport earcut from 'earcut';\n\n/**\n * Builds a polygon to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {object} webGLData - an object containing all the webGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the webGL-specific information to create nativeLines\n */\nexport default function buildPoly(graphicsData, webGLData, webGLDataNativeLines)\n{\n    graphicsData.points = graphicsData.shape.points.slice();\n\n    let points = graphicsData.points;\n\n    if (graphicsData.fill && points.length >= 6)\n    {\n        const holeArray = [];\n        // Process holes..\n        const holes = graphicsData.holes;\n\n        for (let i = 0; i < holes.length; i++)\n        {\n            const hole = holes[i];\n\n            holeArray.push(points.length / 2);\n\n            points = points.concat(hole.points);\n        }\n\n        // get first and last point.. figure out the middle!\n        const verts = webGLData.points;\n        const indices = webGLData.indices;\n\n        const length = points.length / 2;\n\n        // sort color\n        const color = hex2rgb(graphicsData.fillColor);\n        const alpha = graphicsData.fillAlpha;\n        const r = color[0] * alpha;\n        const g = color[1] * alpha;\n        const b = color[2] * alpha;\n\n        const triangles = earcut(points, holeArray, 2);\n\n        if (!triangles)\n        {\n            return;\n        }\n\n        const vertPos = verts.length / 6;\n\n        for (let i = 0; i < triangles.length; i += 3)\n        {\n            indices.push(triangles[i] + vertPos);\n            indices.push(triangles[i] + vertPos);\n            indices.push(triangles[i + 1] + vertPos);\n            indices.push(triangles[i + 2] + vertPos);\n            indices.push(triangles[i + 2] + vertPos);\n        }\n\n        for (let i = 0; i < length; i++)\n        {\n            verts.push(points[i * 2], points[(i * 2) + 1],\n                r, g, b, alpha);\n        }\n    }\n\n    if (graphicsData.lineWidth > 0)\n    {\n        buildLine(graphicsData, webGLData, webGLDataNativeLines);\n    }\n}\n","import buildLine from './buildLine';\nimport { hex2rgb } from '../../../utils';\n\n/**\n * Builds a rectangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {object} webGLData - an object containing all the webGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the webGL-specific information to create nativeLines\n */\nexport default function buildRectangle(graphicsData, webGLData, webGLDataNativeLines)\n{\n    // --- //\n    // need to convert points to a nice regular data\n    //\n    const rectData = graphicsData.shape;\n    const x = rectData.x;\n    const y = rectData.y;\n    const width = rectData.width;\n    const height = rectData.height;\n\n    if (graphicsData.fill)\n    {\n        const color = hex2rgb(graphicsData.fillColor);\n        const alpha = graphicsData.fillAlpha;\n\n        const r = color[0] * alpha;\n        const g = color[1] * alpha;\n        const b = color[2] * alpha;\n\n        const verts = webGLData.points;\n        const indices = webGLData.indices;\n\n        const vertPos = verts.length / 6;\n\n        // start\n        verts.push(x, y);\n        verts.push(r, g, b, alpha);\n\n        verts.push(x + width, y);\n        verts.push(r, g, b, alpha);\n\n        verts.push(x, y + height);\n        verts.push(r, g, b, alpha);\n\n        verts.push(x + width, y + height);\n        verts.push(r, g, b, alpha);\n\n        // insert 2 dead triangles..\n        indices.push(vertPos, vertPos, vertPos + 1, vertPos + 2, vertPos + 3, vertPos + 3);\n    }\n\n    if (graphicsData.lineWidth)\n    {\n        const tempPoints = graphicsData.points;\n\n        graphicsData.points = [x, y,\n            x + width, y,\n            x + width, y + height,\n            x, y + height,\n            x, y];\n\n        buildLine(graphicsData, webGLData, webGLDataNativeLines);\n\n        graphicsData.points = tempPoints;\n    }\n}\n","import earcut from 'earcut';\nimport buildLine from './buildLine';\nimport { hex2rgb } from '../../../utils';\n\n/**\n * Builds a rounded rectangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {object} webGLData - an object containing all the webGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the webGL-specific information to create nativeLines\n */\nexport default function buildRoundedRectangle(graphicsData, webGLData, webGLDataNativeLines)\n{\n    const rrectData = graphicsData.shape;\n    const x = rrectData.x;\n    const y = rrectData.y;\n    const width = rrectData.width;\n    const height = rrectData.height;\n\n    const radius = rrectData.radius;\n\n    const recPoints = [];\n\n    recPoints.push(x, y + radius);\n    quadraticBezierCurve(x, y + height - radius, x, y + height, x + radius, y + height, recPoints);\n    quadraticBezierCurve(x + width - radius, y + height, x + width, y + height, x + width, y + height - radius, recPoints);\n    quadraticBezierCurve(x + width, y + radius, x + width, y, x + width - radius, y, recPoints);\n    quadraticBezierCurve(x + radius, y, x, y, x, y + radius + 0.0000000001, recPoints);\n\n    // this tiny number deals with the issue that occurs when points overlap and earcut fails to triangulate the item.\n    // TODO - fix this properly, this is not very elegant.. but it works for now.\n\n    if (graphicsData.fill)\n    {\n        const color = hex2rgb(graphicsData.fillColor);\n        const alpha = graphicsData.fillAlpha;\n\n        const r = color[0] * alpha;\n        const g = color[1] * alpha;\n        const b = color[2] * alpha;\n\n        const verts = webGLData.points;\n        const indices = webGLData.indices;\n\n        const vecPos = verts.length / 6;\n\n        const triangles = earcut(recPoints, null, 2);\n\n        for (let i = 0, j = triangles.length; i < j; i += 3)\n        {\n            indices.push(triangles[i] + vecPos);\n            indices.push(triangles[i] + vecPos);\n            indices.push(triangles[i + 1] + vecPos);\n            indices.push(triangles[i + 2] + vecPos);\n            indices.push(triangles[i + 2] + vecPos);\n        }\n\n        for (let i = 0, j = recPoints.length; i < j; i++)\n        {\n            verts.push(recPoints[i], recPoints[++i], r, g, b, alpha);\n        }\n    }\n\n    if (graphicsData.lineWidth)\n    {\n        const tempPoints = graphicsData.points;\n\n        graphicsData.points = recPoints;\n\n        buildLine(graphicsData, webGLData, webGLDataNativeLines);\n\n        graphicsData.points = tempPoints;\n    }\n}\n\n/**\n * Calculate a single point for a quadratic bezier curve.\n * Utility function used by quadraticBezierCurve.\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {number} n1 - first number\n * @param {number} n2 - second number\n * @param {number} perc - percentage\n * @return {number} the result\n *\n */\nfunction getPt(n1, n2, perc)\n{\n    const diff = n2 - n1;\n\n    return n1 + (diff * perc);\n}\n\n/**\n * Calculate the points for a quadratic bezier curve. (helper function..)\n * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {number} fromX - Origin point x\n * @param {number} fromY - Origin point x\n * @param {number} cpX - Control point x\n * @param {number} cpY - Control point y\n * @param {number} toX - Destination point x\n * @param {number} toY - Destination point y\n * @param {number[]} [out=[]] - The output array to add points into. If not passed, a new array is created.\n * @return {number[]} an array of points\n */\nfunction quadraticBezierCurve(fromX, fromY, cpX, cpY, toX, toY, out = [])\n{\n    const n = 20;\n    const points = out;\n\n    let xa = 0;\n    let ya = 0;\n    let xb = 0;\n    let yb = 0;\n    let x = 0;\n    let y = 0;\n\n    for (let i = 0, j = 0; i <= n; ++i)\n    {\n        j = i / n;\n\n        // The Green Line\n        xa = getPt(fromX, cpX, j);\n        ya = getPt(fromY, cpY, j);\n        xb = getPt(cpX, toX, j);\n        yb = getPt(cpY, toY, j);\n\n        // The Black Dot\n        x = getPt(xa, xb, j);\n        y = getPt(ya, yb, j);\n\n        points.push(x, y);\n    }\n\n    return points;\n}\n","/**\n * @namespace PIXI\n */\nexport * from './const';\nexport * from './math';\n\nimport * as utils from './utils';\nimport * as ticker from './ticker';\nimport settings from './settings';\nimport CanvasRenderer from './renderers/canvas/CanvasRenderer';\nimport WebGLRenderer from './renderers/webgl/WebGLRenderer';\n\nexport { settings, utils, ticker, CanvasRenderer, WebGLRenderer };\n\nexport { default as glCore } from 'pixi-gl-core';\n\nexport { default as Bounds } from './display/Bounds';\nexport { default as DisplayObject } from './display/DisplayObject';\nexport { default as Container } from './display/Container';\nexport { default as Transform } from './display/Transform';\nexport { default as TransformStatic } from './display/TransformStatic';\nexport { default as TransformBase } from './display/TransformBase';\nexport { default as Sprite } from './sprites/Sprite';\nexport { default as CanvasSpriteRenderer } from './sprites/canvas/CanvasSpriteRenderer';\nexport { default as CanvasTinter } from './sprites/canvas/CanvasTinter';\nexport { default as SpriteRenderer } from './sprites/webgl/SpriteRenderer';\nexport { default as Text } from './text/Text';\nexport { default as TextStyle } from './text/TextStyle';\nexport { default as TextMetrics } from './text/TextMetrics';\nexport { default as Graphics } from './graphics/Graphics';\nexport { default as GraphicsData } from './graphics/GraphicsData';\nexport { default as GraphicsRenderer } from './graphics/webgl/GraphicsRenderer';\nexport { default as CanvasGraphicsRenderer } from './graphics/canvas/CanvasGraphicsRenderer';\nexport { default as Spritesheet } from './textures/Spritesheet';\nexport { default as Texture } from './textures/Texture';\nexport { default as BaseTexture } from './textures/BaseTexture';\nexport { default as RenderTexture } from './textures/RenderTexture';\nexport { default as BaseRenderTexture } from './textures/BaseRenderTexture';\nexport { default as VideoBaseTexture } from './textures/VideoBaseTexture';\nexport { default as TextureUvs } from './textures/TextureUvs';\nexport { default as CanvasRenderTarget } from './renderers/canvas/utils/CanvasRenderTarget';\nexport { default as Shader } from './Shader';\nexport { default as WebGLManager } from './renderers/webgl/managers/WebGLManager';\nexport { default as ObjectRenderer } from './renderers/webgl/utils/ObjectRenderer';\nexport { default as RenderTarget } from './renderers/webgl/utils/RenderTarget';\nexport { default as Quad } from './renderers/webgl/utils/Quad';\nexport { default as SpriteMaskFilter } from './renderers/webgl/filters/spriteMask/SpriteMaskFilter';\nexport { default as Filter } from './renderers/webgl/filters/Filter';\nexport { default as Application } from './Application';\nexport { autoDetectRenderer } from './autoDetectRenderer';\n","// Your friendly neighbour https://en.wikipedia.org/wiki/Dihedral_group of order 16\nimport Matrix from './Matrix';\n\nconst ux = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1];\nconst uy = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1];\nconst vx = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1];\nconst vy = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1];\nconst tempMatrices = [];\n\nconst mul = [];\n\nfunction signum(x)\n{\n    if (x < 0)\n    {\n        return -1;\n    }\n    if (x > 0)\n    {\n        return 1;\n    }\n\n    return 0;\n}\n\nfunction init()\n{\n    for (let i = 0; i < 16; i++)\n    {\n        const row = [];\n\n        mul.push(row);\n\n        for (let j = 0; j < 16; j++)\n        {\n            const _ux = signum((ux[i] * ux[j]) + (vx[i] * uy[j]));\n            const _uy = signum((uy[i] * ux[j]) + (vy[i] * uy[j]));\n            const _vx = signum((ux[i] * vx[j]) + (vx[i] * vy[j]));\n            const _vy = signum((uy[i] * vx[j]) + (vy[i] * vy[j]));\n\n            for (let k = 0; k < 16; k++)\n            {\n                if (ux[k] === _ux && uy[k] === _uy && vx[k] === _vx && vy[k] === _vy)\n                {\n                    row.push(k);\n                    break;\n                }\n            }\n        }\n    }\n\n    for (let i = 0; i < 16; i++)\n    {\n        const mat = new Matrix();\n\n        mat.set(ux[i], uy[i], vx[i], vy[i], 0, 0);\n        tempMatrices.push(mat);\n    }\n}\n\ninit();\n\n/**\n * Implements Dihedral Group D_8, see [group D4]{@link http://mathworld.wolfram.com/DihedralGroupD4.html},\n * D8 is the same but with diagonals. Used for texture rotations.\n *\n * Vector xX(i), xY(i) is U-axis of sprite with rotation i\n * Vector yY(i), yY(i) is V-axis of sprite with rotation i\n * Rotations: 0 grad (0), 90 grad (2), 180 grad (4), 270 grad (6)\n * Mirrors: vertical (8), main diagonal (10), horizontal (12), reverse diagonal (14)\n * This is the small part of gameofbombs.com portal system. It works.\n *\n * @author Ivan @ivanpopelyshev\n * @class\n * @memberof PIXI\n */\nconst GroupD8 = {\n    E: 0,\n    SE: 1,\n    S: 2,\n    SW: 3,\n    W: 4,\n    NW: 5,\n    N: 6,\n    NE: 7,\n    MIRROR_VERTICAL: 8,\n    MIRROR_HORIZONTAL: 12,\n    uX: (ind) => ux[ind],\n    uY: (ind) => uy[ind],\n    vX: (ind) => vx[ind],\n    vY: (ind) => vy[ind],\n    inv: (rotation) =>\n    {\n        if (rotation & 8)\n        {\n            return rotation & 15;\n        }\n\n        return (-rotation) & 7;\n    },\n    add: (rotationSecond, rotationFirst) => mul[rotationSecond][rotationFirst],\n    sub: (rotationSecond, rotationFirst) => mul[rotationSecond][GroupD8.inv(rotationFirst)],\n\n    /**\n     * Adds 180 degrees to rotation. Commutative operation.\n     *\n     * @memberof PIXI.GroupD8\n     * @param {number} rotation - The number to rotate.\n     * @returns {number} rotated number\n     */\n    rotate180: (rotation) => rotation ^ 4,\n\n    /**\n     * I dont know why sometimes width and heights needs to be swapped. We'll fix it later.\n     *\n     * @memberof PIXI.GroupD8\n     * @param {number} rotation - The number to check.\n     * @returns {boolean} Whether or not the width/height should be swapped.\n     */\n    isSwapWidthHeight: (rotation) => (rotation & 3) === 2,\n\n    /**\n     * @memberof PIXI.GroupD8\n     * @param {number} dx - TODO\n     * @param {number} dy - TODO\n     *\n     * @return {number} TODO\n     */\n    byDirection: (dx, dy) =>\n    {\n        if (Math.abs(dx) * 2 <= Math.abs(dy))\n        {\n            if (dy >= 0)\n            {\n                return GroupD8.S;\n            }\n\n            return GroupD8.N;\n        }\n        else if (Math.abs(dy) * 2 <= Math.abs(dx))\n        {\n            if (dx > 0)\n            {\n                return GroupD8.E;\n            }\n\n            return GroupD8.W;\n        }\n        else if (dy > 0)\n        {\n            if (dx > 0)\n            {\n                return GroupD8.SE;\n            }\n\n            return GroupD8.SW;\n        }\n        else if (dx > 0)\n        {\n            return GroupD8.NE;\n        }\n\n        return GroupD8.NW;\n    },\n\n    /**\n     * Helps sprite to compensate texture packer rotation.\n     *\n     * @memberof PIXI.GroupD8\n     * @param {PIXI.Matrix} matrix - sprite world matrix\n     * @param {number} rotation - The rotation factor to use.\n     * @param {number} tx - sprite anchoring\n     * @param {number} ty - sprite anchoring\n     */\n    matrixAppendRotationInv: (matrix, rotation, tx = 0, ty = 0) =>\n    {\n        // Packer used \"rotation\", we use \"inv(rotation)\"\n        const mat = tempMatrices[GroupD8.inv(rotation)];\n\n        mat.tx = tx;\n        mat.ty = ty;\n        matrix.append(mat);\n    },\n};\n\nexport default GroupD8;\n","import Point from './Point';\n\n/**\n * The PixiJS Matrix class as an object, which makes it a lot faster,\n * here is a representation of it :\n * | a | b | tx|\n * | c | d | ty|\n * | 0 | 0 | 1 |\n *\n * @class\n * @memberof PIXI\n */\nexport default class Matrix\n{\n    /**\n     * @param {number} [a=1] - x scale\n     * @param {number} [b=0] - y skew\n     * @param {number} [c=0] - x skew\n     * @param {number} [d=1] - y scale\n     * @param {number} [tx=0] - x translation\n     * @param {number} [ty=0] - y translation\n     */\n    constructor(a = 1, b = 0, c = 0, d = 1, tx = 0, ty = 0)\n    {\n        /**\n         * @member {number}\n         * @default 1\n         */\n        this.a = a;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.b = b;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.c = c;\n\n        /**\n         * @member {number}\n         * @default 1\n         */\n        this.d = d;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.tx = tx;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.ty = ty;\n\n        this.array = null;\n    }\n\n    /**\n     * Creates a Matrix object based on the given array. The Element to Matrix mapping order is as follows:\n     *\n     * a = array[0]\n     * b = array[1]\n     * c = array[3]\n     * d = array[4]\n     * tx = array[2]\n     * ty = array[5]\n     *\n     * @param {number[]} array - The array that the matrix will be populated from.\n     */\n    fromArray(array)\n    {\n        this.a = array[0];\n        this.b = array[1];\n        this.c = array[3];\n        this.d = array[4];\n        this.tx = array[2];\n        this.ty = array[5];\n    }\n\n    /**\n     * sets the matrix properties\n     *\n     * @param {number} a - Matrix component\n     * @param {number} b - Matrix component\n     * @param {number} c - Matrix component\n     * @param {number} d - Matrix component\n     * @param {number} tx - Matrix component\n     * @param {number} ty - Matrix component\n     *\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    set(a, b, c, d, tx, ty)\n    {\n        this.a = a;\n        this.b = b;\n        this.c = c;\n        this.d = d;\n        this.tx = tx;\n        this.ty = ty;\n\n        return this;\n    }\n\n    /**\n     * Creates an array from the current Matrix object.\n     *\n     * @param {boolean} transpose - Whether we need to transpose the matrix or not\n     * @param {Float32Array} [out=new Float32Array(9)] - If provided the array will be assigned to out\n     * @return {number[]} the newly created array which contains the matrix\n     */\n    toArray(transpose, out)\n    {\n        if (!this.array)\n        {\n            this.array = new Float32Array(9);\n        }\n\n        const array = out || this.array;\n\n        if (transpose)\n        {\n            array[0] = this.a;\n            array[1] = this.b;\n            array[2] = 0;\n            array[3] = this.c;\n            array[4] = this.d;\n            array[5] = 0;\n            array[6] = this.tx;\n            array[7] = this.ty;\n            array[8] = 1;\n        }\n        else\n        {\n            array[0] = this.a;\n            array[1] = this.c;\n            array[2] = this.tx;\n            array[3] = this.b;\n            array[4] = this.d;\n            array[5] = this.ty;\n            array[6] = 0;\n            array[7] = 0;\n            array[8] = 1;\n        }\n\n        return array;\n    }\n\n    /**\n     * Get a new position with the current transformation applied.\n     * Can be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering)\n     *\n     * @param {PIXI.Point} pos - The origin\n     * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input)\n     * @return {PIXI.Point} The new point, transformed through this matrix\n     */\n    apply(pos, newPos)\n    {\n        newPos = newPos || new Point();\n\n        const x = pos.x;\n        const y = pos.y;\n\n        newPos.x = (this.a * x) + (this.c * y) + this.tx;\n        newPos.y = (this.b * x) + (this.d * y) + this.ty;\n\n        return newPos;\n    }\n\n    /**\n     * Get a new position with the inverse of the current transformation applied.\n     * Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input)\n     *\n     * @param {PIXI.Point} pos - The origin\n     * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input)\n     * @return {PIXI.Point} The new point, inverse-transformed through this matrix\n     */\n    applyInverse(pos, newPos)\n    {\n        newPos = newPos || new Point();\n\n        const id = 1 / ((this.a * this.d) + (this.c * -this.b));\n\n        const x = pos.x;\n        const y = pos.y;\n\n        newPos.x = (this.d * id * x) + (-this.c * id * y) + (((this.ty * this.c) - (this.tx * this.d)) * id);\n        newPos.y = (this.a * id * y) + (-this.b * id * x) + (((-this.ty * this.a) + (this.tx * this.b)) * id);\n\n        return newPos;\n    }\n\n    /**\n     * Translates the matrix on the x and y.\n     *\n     * @param {number} x How much to translate x by\n     * @param {number} y How much to translate y by\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    translate(x, y)\n    {\n        this.tx += x;\n        this.ty += y;\n\n        return this;\n    }\n\n    /**\n     * Applies a scale transformation to the matrix.\n     *\n     * @param {number} x The amount to scale horizontally\n     * @param {number} y The amount to scale vertically\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    scale(x, y)\n    {\n        this.a *= x;\n        this.d *= y;\n        this.c *= x;\n        this.b *= y;\n        this.tx *= x;\n        this.ty *= y;\n\n        return this;\n    }\n\n    /**\n     * Applies a rotation transformation to the matrix.\n     *\n     * @param {number} angle - The angle in radians.\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    rotate(angle)\n    {\n        const cos = Math.cos(angle);\n        const sin = Math.sin(angle);\n\n        const a1 = this.a;\n        const c1 = this.c;\n        const tx1 = this.tx;\n\n        this.a = (a1 * cos) - (this.b * sin);\n        this.b = (a1 * sin) + (this.b * cos);\n        this.c = (c1 * cos) - (this.d * sin);\n        this.d = (c1 * sin) + (this.d * cos);\n        this.tx = (tx1 * cos) - (this.ty * sin);\n        this.ty = (tx1 * sin) + (this.ty * cos);\n\n        return this;\n    }\n\n    /**\n     * Appends the given Matrix to this Matrix.\n     *\n     * @param {PIXI.Matrix} matrix - The matrix to append.\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    append(matrix)\n    {\n        const a1 = this.a;\n        const b1 = this.b;\n        const c1 = this.c;\n        const d1 = this.d;\n\n        this.a = (matrix.a * a1) + (matrix.b * c1);\n        this.b = (matrix.a * b1) + (matrix.b * d1);\n        this.c = (matrix.c * a1) + (matrix.d * c1);\n        this.d = (matrix.c * b1) + (matrix.d * d1);\n\n        this.tx = (matrix.tx * a1) + (matrix.ty * c1) + this.tx;\n        this.ty = (matrix.tx * b1) + (matrix.ty * d1) + this.ty;\n\n        return this;\n    }\n\n    /**\n     * Sets the matrix based on all the available properties\n     *\n     * @param {number} x - Position on the x axis\n     * @param {number} y - Position on the y axis\n     * @param {number} pivotX - Pivot on the x axis\n     * @param {number} pivotY - Pivot on the y axis\n     * @param {number} scaleX - Scale on the x axis\n     * @param {number} scaleY - Scale on the y axis\n     * @param {number} rotation - Rotation in radians\n     * @param {number} skewX - Skew on the x axis\n     * @param {number} skewY - Skew on the y axis\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    setTransform(x, y, pivotX, pivotY, scaleX, scaleY, rotation, skewX, skewY)\n    {\n        const sr = Math.sin(rotation);\n        const cr = Math.cos(rotation);\n        const cy = Math.cos(skewY);\n        const sy = Math.sin(skewY);\n        const nsx = -Math.sin(skewX);\n        const cx = Math.cos(skewX);\n\n        const a = cr * scaleX;\n        const b = sr * scaleX;\n        const c = -sr * scaleY;\n        const d = cr * scaleY;\n\n        this.a = (cy * a) + (sy * c);\n        this.b = (cy * b) + (sy * d);\n        this.c = (nsx * a) + (cx * c);\n        this.d = (nsx * b) + (cx * d);\n\n        this.tx = x + ((pivotX * a) + (pivotY * c));\n        this.ty = y + ((pivotX * b) + (pivotY * d));\n\n        return this;\n    }\n\n    /**\n     * Prepends the given Matrix to this Matrix.\n     *\n     * @param {PIXI.Matrix} matrix - The matrix to prepend\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    prepend(matrix)\n    {\n        const tx1 = this.tx;\n\n        if (matrix.a !== 1 || matrix.b !== 0 || matrix.c !== 0 || matrix.d !== 1)\n        {\n            const a1 = this.a;\n            const c1 = this.c;\n\n            this.a = (a1 * matrix.a) + (this.b * matrix.c);\n            this.b = (a1 * matrix.b) + (this.b * matrix.d);\n            this.c = (c1 * matrix.a) + (this.d * matrix.c);\n            this.d = (c1 * matrix.b) + (this.d * matrix.d);\n        }\n\n        this.tx = (tx1 * matrix.a) + (this.ty * matrix.c) + matrix.tx;\n        this.ty = (tx1 * matrix.b) + (this.ty * matrix.d) + matrix.ty;\n\n        return this;\n    }\n\n    /**\n     * Decomposes the matrix (x, y, scaleX, scaleY, and rotation) and sets the properties on to a transform.\n     *\n     * @param {PIXI.Transform|PIXI.TransformStatic} transform - The transform to apply the properties to.\n     * @return {PIXI.Transform|PIXI.TransformStatic} The transform with the newly applied properties\n     */\n    decompose(transform)\n    {\n        // sort out rotation / skew..\n        const a = this.a;\n        const b = this.b;\n        const c = this.c;\n        const d = this.d;\n\n        const skewX = -Math.atan2(-c, d);\n        const skewY = Math.atan2(b, a);\n\n        const delta = Math.abs(skewX + skewY);\n\n        if (delta < 0.00001)\n        {\n            transform.rotation = skewY;\n\n            if (a < 0 && d >= 0)\n            {\n                transform.rotation += (transform.rotation <= 0) ? Math.PI : -Math.PI;\n            }\n\n            transform.skew.x = transform.skew.y = 0;\n        }\n        else\n        {\n            transform.skew.x = skewX;\n            transform.skew.y = skewY;\n        }\n\n        // next set scale\n        transform.scale.x = Math.sqrt((a * a) + (b * b));\n        transform.scale.y = Math.sqrt((c * c) + (d * d));\n\n        // next set position\n        transform.position.x = this.tx;\n        transform.position.y = this.ty;\n\n        return transform;\n    }\n\n    /**\n     * Inverts this matrix\n     *\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    invert()\n    {\n        const a1 = this.a;\n        const b1 = this.b;\n        const c1 = this.c;\n        const d1 = this.d;\n        const tx1 = this.tx;\n        const n = (a1 * d1) - (b1 * c1);\n\n        this.a = d1 / n;\n        this.b = -b1 / n;\n        this.c = -c1 / n;\n        this.d = a1 / n;\n        this.tx = ((c1 * this.ty) - (d1 * tx1)) / n;\n        this.ty = -((a1 * this.ty) - (b1 * tx1)) / n;\n\n        return this;\n    }\n\n    /**\n     * Resets this Matix to an identity (default) matrix.\n     *\n     * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n     */\n    identity()\n    {\n        this.a = 1;\n        this.b = 0;\n        this.c = 0;\n        this.d = 1;\n        this.tx = 0;\n        this.ty = 0;\n\n        return this;\n    }\n\n    /**\n     * Creates a new Matrix object with the same values as this one.\n     *\n     * @return {PIXI.Matrix} A copy of this matrix. Good for chaining method calls.\n     */\n    clone()\n    {\n        const matrix = new Matrix();\n\n        matrix.a = this.a;\n        matrix.b = this.b;\n        matrix.c = this.c;\n        matrix.d = this.d;\n        matrix.tx = this.tx;\n        matrix.ty = this.ty;\n\n        return matrix;\n    }\n\n    /**\n     * Changes the values of the given matrix to be the same as the ones in this matrix\n     *\n     * @param {PIXI.Matrix} matrix - The matrix to copy from.\n     * @return {PIXI.Matrix} The matrix given in parameter with its values updated.\n     */\n    copy(matrix)\n    {\n        matrix.a = this.a;\n        matrix.b = this.b;\n        matrix.c = this.c;\n        matrix.d = this.d;\n        matrix.tx = this.tx;\n        matrix.ty = this.ty;\n\n        return matrix;\n    }\n\n    /**\n     * A default (identity) matrix\n     *\n     * @static\n     * @const\n     */\n    static get IDENTITY()\n    {\n        return new Matrix();\n    }\n\n    /**\n     * A temp matrix\n     *\n     * @static\n     * @const\n     */\n    static get TEMP_MATRIX()\n    {\n        return new Matrix();\n    }\n}\n","/**\n * The Point object represents a location in a two-dimensional coordinate system, where x represents\n * the horizontal axis and y represents the vertical axis.\n * An observable point is a point that triggers a callback when the point's position is changed.\n *\n * @class\n * @memberof PIXI\n */\nexport default class ObservablePoint\n{\n    /**\n     * @param {Function} cb - callback when changed\n     * @param {object} scope - owner of callback\n     * @param {number} [x=0] - position of the point on the x axis\n     * @param {number} [y=0] - position of the point on the y axis\n     */\n    constructor(cb, scope, x = 0, y = 0)\n    {\n        this._x = x;\n        this._y = y;\n\n        this.cb = cb;\n        this.scope = scope;\n    }\n\n    /**\n     * Sets the point to a new x and y position.\n     * If y is omitted, both x and y will be set to x.\n     *\n     * @param {number} [x=0] - position of the point on the x axis\n     * @param {number} [y=0] - position of the point on the y axis\n     */\n    set(x, y)\n    {\n        const _x = x || 0;\n        const _y = y || ((y !== 0) ? _x : 0);\n\n        if (this._x !== _x || this._y !== _y)\n        {\n            this._x = _x;\n            this._y = _y;\n            this.cb.call(this.scope);\n        }\n    }\n\n    /**\n     * Copies the data from another point\n     *\n     * @param {PIXI.Point|PIXI.ObservablePoint} point - point to copy from\n     */\n    copy(point)\n    {\n        if (this._x !== point.x || this._y !== point.y)\n        {\n            this._x = point.x;\n            this._y = point.y;\n            this.cb.call(this.scope);\n        }\n    }\n\n    /**\n     * The position of the displayObject on the x axis relative to the local coordinates of the parent.\n     *\n     * @member {number}\n     */\n    get x()\n    {\n        return this._x;\n    }\n\n    set x(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._x !== value)\n        {\n            this._x = value;\n            this.cb.call(this.scope);\n        }\n    }\n\n    /**\n     * The position of the displayObject on the x axis relative to the local coordinates of the parent.\n     *\n     * @member {number}\n     */\n    get y()\n    {\n        return this._y;\n    }\n\n    set y(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._y !== value)\n        {\n            this._y = value;\n            this.cb.call(this.scope);\n        }\n    }\n}\n","/**\n * The Point object represents a location in a two-dimensional coordinate system, where x represents\n * the horizontal axis and y represents the vertical axis.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Point\n{\n    /**\n     * @param {number} [x=0] - position of the point on the x axis\n     * @param {number} [y=0] - position of the point on the y axis\n     */\n    constructor(x = 0, y = 0)\n    {\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.x = x;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.y = y;\n    }\n\n    /**\n     * Creates a clone of this point\n     *\n     * @return {PIXI.Point} a copy of the point\n     */\n    clone()\n    {\n        return new Point(this.x, this.y);\n    }\n\n    /**\n     * Copies x and y from the given point\n     *\n     * @param {PIXI.Point} p - The point to copy.\n     */\n    copy(p)\n    {\n        this.set(p.x, p.y);\n    }\n\n    /**\n     * Returns true if the given point is equal to this point\n     *\n     * @param {PIXI.Point} p - The point to check\n     * @returns {boolean} Whether the given point equal to this point\n     */\n    equals(p)\n    {\n        return (p.x === this.x) && (p.y === this.y);\n    }\n\n    /**\n     * Sets the point to a new x and y position.\n     * If y is omitted, both x and y will be set to x.\n     *\n     * @param {number} [x=0] - position of the point on the x axis\n     * @param {number} [y=0] - position of the point on the y axis\n     */\n    set(x, y)\n    {\n        this.x = x || 0;\n        this.y = y || ((y !== 0) ? this.x : 0);\n    }\n\n}\n","/**\n * Math classes and utilities mixed into PIXI namespace.\n *\n * @lends PIXI\n */\nexport { default as Point } from './Point';\nexport { default as ObservablePoint } from './ObservablePoint';\nexport { default as Matrix } from './Matrix';\nexport { default as GroupD8 } from './GroupD8';\n\nexport { default as Circle } from './shapes/Circle';\nexport { default as Ellipse } from './shapes/Ellipse';\nexport { default as Polygon } from './shapes/Polygon';\nexport { default as Rectangle } from './shapes/Rectangle';\nexport { default as RoundedRectangle } from './shapes/RoundedRectangle';\n","import Rectangle from './Rectangle';\nimport { SHAPES } from '../../const';\n\n/**\n * The Circle object can be used to specify a hit area for displayObjects\n *\n * @class\n * @memberof PIXI\n */\nexport default class Circle\n{\n    /**\n     * @param {number} [x=0] - The X coordinate of the center of this circle\n     * @param {number} [y=0] - The Y coordinate of the center of this circle\n     * @param {number} [radius=0] - The radius of the circle\n     */\n    constructor(x = 0, y = 0, radius = 0)\n    {\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.x = x;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.y = y;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.radius = radius;\n\n        /**\n         * The type of the object, mainly used to avoid `instanceof` checks\n         *\n         * @member {number}\n         * @readOnly\n         * @default PIXI.SHAPES.CIRC\n         * @see PIXI.SHAPES\n         */\n        this.type = SHAPES.CIRC;\n    }\n\n    /**\n     * Creates a clone of this Circle instance\n     *\n     * @return {PIXI.Circle} a copy of the Circle\n     */\n    clone()\n    {\n        return new Circle(this.x, this.y, this.radius);\n    }\n\n    /**\n     * Checks whether the x and y coordinates given are contained within this circle\n     *\n     * @param {number} x - The X coordinate of the point to test\n     * @param {number} y - The Y coordinate of the point to test\n     * @return {boolean} Whether the x/y coordinates are within this Circle\n     */\n    contains(x, y)\n    {\n        if (this.radius <= 0)\n        {\n            return false;\n        }\n\n        const r2 = this.radius * this.radius;\n        let dx = (this.x - x);\n        let dy = (this.y - y);\n\n        dx *= dx;\n        dy *= dy;\n\n        return (dx + dy <= r2);\n    }\n\n    /**\n    * Returns the framing rectangle of the circle as a Rectangle object\n    *\n    * @return {PIXI.Rectangle} the framing rectangle\n    */\n    getBounds()\n    {\n        return new Rectangle(this.x - this.radius, this.y - this.radius, this.radius * 2, this.radius * 2);\n    }\n}\n","import Rectangle from './Rectangle';\nimport { SHAPES } from '../../const';\n\n/**\n * The Ellipse object can be used to specify a hit area for displayObjects\n *\n * @class\n * @memberof PIXI\n */\nexport default class Ellipse\n{\n    /**\n     * @param {number} [x=0] - The X coordinate of the center of this circle\n     * @param {number} [y=0] - The Y coordinate of the center of this circle\n     * @param {number} [width=0] - The half width of this ellipse\n     * @param {number} [height=0] - The half height of this ellipse\n     */\n    constructor(x = 0, y = 0, width = 0, height = 0)\n    {\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.x = x;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.y = y;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.width = width;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.height = height;\n\n        /**\n         * The type of the object, mainly used to avoid `instanceof` checks\n         *\n         * @member {number}\n         * @readOnly\n         * @default PIXI.SHAPES.ELIP\n         * @see PIXI.SHAPES\n         */\n        this.type = SHAPES.ELIP;\n    }\n\n    /**\n     * Creates a clone of this Ellipse instance\n     *\n     * @return {PIXI.Ellipse} a copy of the ellipse\n     */\n    clone()\n    {\n        return new Ellipse(this.x, this.y, this.width, this.height);\n    }\n\n    /**\n     * Checks whether the x and y coordinates given are contained within this ellipse\n     *\n     * @param {number} x - The X coordinate of the point to test\n     * @param {number} y - The Y coordinate of the point to test\n     * @return {boolean} Whether the x/y coords are within this ellipse\n     */\n    contains(x, y)\n    {\n        if (this.width <= 0 || this.height <= 0)\n        {\n            return false;\n        }\n\n        // normalize the coords to an ellipse with center 0,0\n        let normx = ((x - this.x) / this.width);\n        let normy = ((y - this.y) / this.height);\n\n        normx *= normx;\n        normy *= normy;\n\n        return (normx + normy <= 1);\n    }\n\n    /**\n     * Returns the framing rectangle of the ellipse as a Rectangle object\n     *\n     * @return {PIXI.Rectangle} the framing rectangle\n     */\n    getBounds()\n    {\n        return new Rectangle(this.x - this.width, this.y - this.height, this.width, this.height);\n    }\n}\n","import Point from '../Point';\nimport { SHAPES } from '../../const';\n\n/**\n * @class\n * @memberof PIXI\n */\nexport default class Polygon\n{\n    /**\n     * @param {PIXI.Point[]|number[]} points - This can be an array of Points\n     *  that form the polygon, a flat array of numbers that will be interpreted as [x,y, x,y, ...], or\n     *  the arguments passed can be all the points of the polygon e.g.\n     *  `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the arguments passed can be flat\n     *  x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are Numbers.\n     */\n    constructor(...points)\n    {\n        if (Array.isArray(points[0]))\n        {\n            points = points[0];\n        }\n\n        // if this is an array of points, convert it to a flat array of numbers\n        if (points[0] instanceof Point)\n        {\n            const p = [];\n\n            for (let i = 0, il = points.length; i < il; i++)\n            {\n                p.push(points[i].x, points[i].y);\n            }\n\n            points = p;\n        }\n\n        this.closed = true;\n\n        /**\n         * An array of the points of this polygon\n         *\n         * @member {number[]}\n         */\n        this.points = points;\n\n        /**\n         * The type of the object, mainly used to avoid `instanceof` checks\n         *\n         * @member {number}\n         * @readOnly\n         * @default PIXI.SHAPES.POLY\n         * @see PIXI.SHAPES\n         */\n        this.type = SHAPES.POLY;\n    }\n\n    /**\n     * Creates a clone of this polygon\n     *\n     * @return {PIXI.Polygon} a copy of the polygon\n     */\n    clone()\n    {\n        return new Polygon(this.points.slice());\n    }\n\n    /**\n     * Closes the polygon, adding points if necessary.\n     *\n     */\n    close()\n    {\n        const points = this.points;\n\n        // close the poly if the value is true!\n        if (points[0] !== points[points.length - 2] || points[1] !== points[points.length - 1])\n        {\n            points.push(points[0], points[1]);\n        }\n    }\n\n    /**\n     * Checks whether the x and y coordinates passed to this function are contained within this polygon\n     *\n     * @param {number} x - The X coordinate of the point to test\n     * @param {number} y - The Y coordinate of the point to test\n     * @return {boolean} Whether the x/y coordinates are within this polygon\n     */\n    contains(x, y)\n    {\n        let inside = false;\n\n        // use some raycasting to test hits\n        // https://github.com/substack/point-in-polygon/blob/master/index.js\n        const length = this.points.length / 2;\n\n        for (let i = 0, j = length - 1; i < length; j = i++)\n        {\n            const xi = this.points[i * 2];\n            const yi = this.points[(i * 2) + 1];\n            const xj = this.points[j * 2];\n            const yj = this.points[(j * 2) + 1];\n            const intersect = ((yi > y) !== (yj > y)) && (x < ((xj - xi) * ((y - yi) / (yj - yi))) + xi);\n\n            if (intersect)\n            {\n                inside = !inside;\n            }\n        }\n\n        return inside;\n    }\n}\n","import { SHAPES } from '../../const';\n\n/**\n * Rectangle object is an area defined by its position, as indicated by its top-left corner\n * point (x, y) and by its width and its height.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Rectangle\n{\n    /**\n     * @param {number} [x=0] - The X coordinate of the upper-left corner of the rectangle\n     * @param {number} [y=0] - The Y coordinate of the upper-left corner of the rectangle\n     * @param {number} [width=0] - The overall width of this rectangle\n     * @param {number} [height=0] - The overall height of this rectangle\n     */\n    constructor(x = 0, y = 0, width = 0, height = 0)\n    {\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.x = Number(x);\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.y = Number(y);\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.width = Number(width);\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.height = Number(height);\n\n        /**\n         * The type of the object, mainly used to avoid `instanceof` checks\n         *\n         * @member {number}\n         * @readOnly\n         * @default PIXI.SHAPES.RECT\n         * @see PIXI.SHAPES\n         */\n        this.type = SHAPES.RECT;\n    }\n\n    /**\n     * returns the left edge of the rectangle\n     *\n     * @member {number}\n     */\n    get left()\n    {\n        return this.x;\n    }\n\n    /**\n     * returns the right edge of the rectangle\n     *\n     * @member {number}\n     */\n    get right()\n    {\n        return this.x + this.width;\n    }\n\n    /**\n     * returns the top edge of the rectangle\n     *\n     * @member {number}\n     */\n    get top()\n    {\n        return this.y;\n    }\n\n    /**\n     * returns the bottom edge of the rectangle\n     *\n     * @member {number}\n     */\n    get bottom()\n    {\n        return this.y + this.height;\n    }\n\n    /**\n     * A constant empty rectangle.\n     *\n     * @static\n     * @constant\n     */\n    static get EMPTY()\n    {\n        return new Rectangle(0, 0, 0, 0);\n    }\n\n    /**\n     * Creates a clone of this Rectangle\n     *\n     * @return {PIXI.Rectangle} a copy of the rectangle\n     */\n    clone()\n    {\n        return new Rectangle(this.x, this.y, this.width, this.height);\n    }\n\n    /**\n     * Copies another rectangle to this one.\n     *\n     * @param {PIXI.Rectangle} rectangle - The rectangle to copy.\n     * @return {PIXI.Rectangle} Returns itself.\n     */\n    copy(rectangle)\n    {\n        this.x = rectangle.x;\n        this.y = rectangle.y;\n        this.width = rectangle.width;\n        this.height = rectangle.height;\n\n        return this;\n    }\n\n    /**\n     * Checks whether the x and y coordinates given are contained within this Rectangle\n     *\n     * @param {number} x - The X coordinate of the point to test\n     * @param {number} y - The Y coordinate of the point to test\n     * @return {boolean} Whether the x/y coordinates are within this Rectangle\n     */\n    contains(x, y)\n    {\n        if (this.width <= 0 || this.height <= 0)\n        {\n            return false;\n        }\n\n        if (x >= this.x && x < this.x + this.width)\n        {\n            if (y >= this.y && y < this.y + this.height)\n            {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Pads the rectangle making it grow in all directions.\n     *\n     * @param {number} paddingX - The horizontal padding amount.\n     * @param {number} paddingY - The vertical padding amount.\n     */\n    pad(paddingX, paddingY)\n    {\n        paddingX = paddingX || 0;\n        paddingY = paddingY || ((paddingY !== 0) ? paddingX : 0);\n\n        this.x -= paddingX;\n        this.y -= paddingY;\n\n        this.width += paddingX * 2;\n        this.height += paddingY * 2;\n    }\n\n    /**\n     * Fits this rectangle around the passed one.\n     *\n     * @param {PIXI.Rectangle} rectangle - The rectangle to fit.\n     */\n    fit(rectangle)\n    {\n        if (this.x < rectangle.x)\n        {\n            this.width += this.x;\n            if (this.width < 0)\n            {\n                this.width = 0;\n            }\n\n            this.x = rectangle.x;\n        }\n\n        if (this.y < rectangle.y)\n        {\n            this.height += this.y;\n            if (this.height < 0)\n            {\n                this.height = 0;\n            }\n            this.y = rectangle.y;\n        }\n\n        if (this.x + this.width > rectangle.x + rectangle.width)\n        {\n            this.width = rectangle.width - this.x;\n            if (this.width < 0)\n            {\n                this.width = 0;\n            }\n        }\n\n        if (this.y + this.height > rectangle.y + rectangle.height)\n        {\n            this.height = rectangle.height - this.y;\n            if (this.height < 0)\n            {\n                this.height = 0;\n            }\n        }\n    }\n\n    /**\n     * Enlarges this rectangle to include the passed rectangle.\n     *\n     * @param {PIXI.Rectangle} rectangle - The rectangle to include.\n     */\n    enlarge(rectangle)\n    {\n        const x1 = Math.min(this.x, rectangle.x);\n        const x2 = Math.max(this.x + this.width, rectangle.x + rectangle.width);\n        const y1 = Math.min(this.y, rectangle.y);\n        const y2 = Math.max(this.y + this.height, rectangle.y + rectangle.height);\n\n        this.x = x1;\n        this.width = x2 - x1;\n        this.y = y1;\n        this.height = y2 - y1;\n    }\n}\n","import { SHAPES } from '../../const';\n\n/**\n * The Rounded Rectangle object is an area that has nice rounded corners, as indicated by its\n * top-left corner point (x, y) and by its width and its height and its radius.\n *\n * @class\n * @memberof PIXI\n */\nexport default class RoundedRectangle\n{\n    /**\n     * @param {number} [x=0] - The X coordinate of the upper-left corner of the rounded rectangle\n     * @param {number} [y=0] - The Y coordinate of the upper-left corner of the rounded rectangle\n     * @param {number} [width=0] - The overall width of this rounded rectangle\n     * @param {number} [height=0] - The overall height of this rounded rectangle\n     * @param {number} [radius=20] - Controls the radius of the rounded corners\n     */\n    constructor(x = 0, y = 0, width = 0, height = 0, radius = 20)\n    {\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.x = x;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.y = y;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.width = width;\n\n        /**\n         * @member {number}\n         * @default 0\n         */\n        this.height = height;\n\n        /**\n         * @member {number}\n         * @default 20\n         */\n        this.radius = radius;\n\n        /**\n         * The type of the object, mainly used to avoid `instanceof` checks\n         *\n         * @member {number}\n         * @readonly\n         * @default PIXI.SHAPES.RREC\n         * @see PIXI.SHAPES\n         */\n        this.type = SHAPES.RREC;\n    }\n\n    /**\n     * Creates a clone of this Rounded Rectangle\n     *\n     * @return {PIXI.RoundedRectangle} a copy of the rounded rectangle\n     */\n    clone()\n    {\n        return new RoundedRectangle(this.x, this.y, this.width, this.height, this.radius);\n    }\n\n    /**\n     * Checks whether the x and y coordinates given are contained within this Rounded Rectangle\n     *\n     * @param {number} x - The X coordinate of the point to test\n     * @param {number} y - The Y coordinate of the point to test\n     * @return {boolean} Whether the x/y coordinates are within this Rounded Rectangle\n     */\n    contains(x, y)\n    {\n        if (this.width <= 0 || this.height <= 0)\n        {\n            return false;\n        }\n        if (x >= this.x && x <= this.x + this.width)\n        {\n            if (y >= this.y && y <= this.y + this.height)\n            {\n                if ((y >= this.y + this.radius && y <= this.y + this.height - this.radius)\n                || (x >= this.x + this.radius && x <= this.x + this.width - this.radius))\n                {\n                    return true;\n                }\n                let dx = x - (this.x + this.radius);\n                let dy = y - (this.y + this.radius);\n                const radius2 = this.radius * this.radius;\n\n                if ((dx * dx) + (dy * dy) <= radius2)\n                {\n                    return true;\n                }\n                dx = x - (this.x + this.width - this.radius);\n                if ((dx * dx) + (dy * dy) <= radius2)\n                {\n                    return true;\n                }\n                dy = y - (this.y + this.height - this.radius);\n                if ((dx * dx) + (dy * dy) <= radius2)\n                {\n                    return true;\n                }\n                dx = x - (this.x + this.radius);\n                if ((dx * dx) + (dy * dy) <= radius2)\n                {\n                    return true;\n                }\n            }\n        }\n\n        return false;\n    }\n}\n","import { sayHello, hex2string, hex2rgb } from '../utils';\nimport { Matrix, Rectangle } from '../math';\nimport { RENDERER_TYPE } from '../const';\nimport settings from '../settings';\nimport Container from '../display/Container';\nimport RenderTexture from '../textures/RenderTexture';\nimport EventEmitter from 'eventemitter3';\n\nconst tempMatrix = new Matrix();\n\n/**\n * The SystemRenderer is the base for a PixiJS Renderer. It is extended by the {@link PIXI.CanvasRenderer}\n * and {@link PIXI.WebGLRenderer} which can be used for rendering a PixiJS scene.\n *\n * @abstract\n * @class\n * @extends EventEmitter\n * @memberof PIXI\n */\nexport default class SystemRenderer extends EventEmitter\n{\n    // eslint-disable-next-line valid-jsdoc\n    /**\n     * @param {string} system - The name of the system this renderer is for.\n     * @param {object} [options] - The optional renderer parameters\n     * @param {number} [options.width=800] - the width of the screen\n     * @param {number} [options.height=600] - the height of the screen\n     * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional\n     * @param {boolean} [options.transparent=false] - If the render view is transparent, default false\n     * @param {boolean} [options.autoResize=false] - If the render view is automatically resized, default false\n     * @param {boolean} [options.antialias=false] - sets antialias (only applicable in chrome at the moment)\n     * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer. The\n     *  resolution of the renderer retina would be 2.\n     * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation,\n     *  enable this if you need to call toDataUrl on the webgl context.\n     * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or\n     *      not before the new render pass.\n     * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n     *  (shown if not transparent).\n     * @param {boolean} [options.roundPixels=false] - If true PixiJS will Math.floor() x/y values when rendering,\n     *  stopping pixel interpolation.\n     */\n    constructor(system, options, arg2, arg3)\n    {\n        super();\n\n        sayHello(system);\n\n        // Support for constructor(system, screenWidth, screenHeight, options)\n        if (typeof options === 'number')\n        {\n            options = Object.assign({\n                width: options,\n                height: arg2 || settings.RENDER_OPTIONS.height,\n            }, arg3);\n        }\n\n        // Add the default render options\n        options = Object.assign({}, settings.RENDER_OPTIONS, options);\n\n        /**\n         * The supplied constructor options.\n         *\n         * @member {Object}\n         * @readOnly\n         */\n        this.options = options;\n\n        /**\n         * The type of the renderer.\n         *\n         * @member {number}\n         * @default PIXI.RENDERER_TYPE.UNKNOWN\n         * @see PIXI.RENDERER_TYPE\n         */\n        this.type = RENDERER_TYPE.UNKNOWN;\n\n        /**\n         * Measurements of the screen. (0, 0, screenWidth, screenHeight)\n         *\n         * Its safe to use as filterArea or hitArea for whole stage\n         *\n         * @member {PIXI.Rectangle}\n         */\n        this.screen = new Rectangle(0, 0, options.width, options.height);\n\n        /**\n         * The canvas element that everything is drawn to\n         *\n         * @member {HTMLCanvasElement}\n         */\n        this.view = options.view || document.createElement('canvas');\n\n        /**\n         * The resolution / device pixel ratio of the renderer\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.resolution = options.resolution || settings.RESOLUTION;\n\n        /**\n         * Whether the render view is transparent\n         *\n         * @member {boolean}\n         */\n        this.transparent = options.transparent;\n\n        /**\n         * Whether css dimensions of canvas view should be resized to screen dimensions automatically\n         *\n         * @member {boolean}\n         */\n        this.autoResize = options.autoResize || false;\n\n        /**\n         * Tracks the blend modes useful for this renderer.\n         *\n         * @member {object<string, mixed>}\n         */\n        this.blendModes = null;\n\n        /**\n         * The value of the preserveDrawingBuffer flag affects whether or not the contents of\n         * the stencil buffer is retained after rendering.\n         *\n         * @member {boolean}\n         */\n        this.preserveDrawingBuffer = options.preserveDrawingBuffer;\n\n        /**\n         * This sets if the CanvasRenderer will clear the canvas or not before the new render pass.\n         * If the scene is NOT transparent PixiJS will use a canvas sized fillRect operation every\n         * frame to set the canvas background color. If the scene is transparent PixiJS will use clearRect\n         * to clear the canvas every frame. Disable this by setting this to false. For example if\n         * your game has a canvas filling background image you often don't need this set.\n         *\n         * @member {boolean}\n         * @default\n         */\n        this.clearBeforeRender = options.clearBeforeRender;\n\n        /**\n         * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.\n         * Handy for crisp pixel art and speed on legacy devices.\n         *\n         * @member {boolean}\n         */\n        this.roundPixels = options.roundPixels;\n\n        /**\n         * The background color as a number.\n         *\n         * @member {number}\n         * @private\n         */\n        this._backgroundColor = 0x000000;\n\n        /**\n         * The background color as an [R, G, B] array.\n         *\n         * @member {number[]}\n         * @private\n         */\n        this._backgroundColorRgba = [0, 0, 0, 0];\n\n        /**\n         * The background color as a string.\n         *\n         * @member {string}\n         * @private\n         */\n        this._backgroundColorString = '#000000';\n\n        this.backgroundColor = options.backgroundColor || this._backgroundColor; // run bg color setter\n\n        /**\n         * This temporary display object used as the parent of the currently being rendered item\n         *\n         * @member {PIXI.DisplayObject}\n         * @private\n         */\n        this._tempDisplayObjectParent = new Container();\n\n        /**\n         * The last root object that the renderer tried to render.\n         *\n         * @member {PIXI.DisplayObject}\n         * @private\n         */\n        this._lastObjectRendered = this._tempDisplayObjectParent;\n    }\n\n    /**\n     * Same as view.width, actual number of pixels in the canvas by horizontal\n     *\n     * @member {number}\n     * @readonly\n     * @default 800\n     */\n    get width()\n    {\n        return this.view.width;\n    }\n\n    /**\n     * Same as view.height, actual number of pixels in the canvas by vertical\n     *\n     * @member {number}\n     * @readonly\n     * @default 600\n     */\n    get height()\n    {\n        return this.view.height;\n    }\n\n    /**\n     * Resizes the screen and canvas to the specified width and height\n     * Canvas dimensions are multiplied by resolution\n     *\n     * @param {number} screenWidth - the new width of the screen\n     * @param {number} screenHeight - the new height of the screen\n     */\n    resize(screenWidth, screenHeight)\n    {\n        this.screen.width = screenWidth;\n        this.screen.height = screenHeight;\n\n        this.view.width = screenWidth * this.resolution;\n        this.view.height = screenHeight * this.resolution;\n\n        if (this.autoResize)\n        {\n            this.view.style.width = `${screenWidth}px`;\n            this.view.style.height = `${screenHeight}px`;\n        }\n    }\n\n    /**\n     * Useful function that returns a texture of the display object that can then be used to create sprites\n     * This can be quite useful if your displayObject is complicated and needs to be reused multiple times.\n     *\n     * @param {PIXI.DisplayObject} displayObject - The displayObject the object will be generated from\n     * @param {number} scaleMode - Should be one of the scaleMode consts\n     * @param {number} resolution - The resolution / device pixel ratio of the texture being generated\n     * @return {PIXI.Texture} a texture of the graphics object\n     */\n    generateTexture(displayObject, scaleMode, resolution)\n    {\n        const bounds = displayObject.getLocalBounds();\n\n        const renderTexture = RenderTexture.create(bounds.width | 0, bounds.height | 0, scaleMode, resolution);\n\n        tempMatrix.tx = -bounds.x;\n        tempMatrix.ty = -bounds.y;\n\n        this.render(displayObject, renderTexture, false, tempMatrix, true);\n\n        return renderTexture;\n    }\n\n    /**\n     * Removes everything from the renderer and optionally removes the Canvas DOM element.\n     *\n     * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM.\n     */\n    destroy(removeView)\n    {\n        if (removeView && this.view.parentNode)\n        {\n            this.view.parentNode.removeChild(this.view);\n        }\n\n        this.type = RENDERER_TYPE.UNKNOWN;\n\n        this.view = null;\n\n        this.screen = null;\n\n        this.resolution = 0;\n\n        this.transparent = false;\n\n        this.autoResize = false;\n\n        this.blendModes = null;\n\n        this.options = null;\n\n        this.preserveDrawingBuffer = false;\n        this.clearBeforeRender = false;\n\n        this.roundPixels = false;\n\n        this._backgroundColor = 0;\n        this._backgroundColorRgba = null;\n        this._backgroundColorString = null;\n\n        this._tempDisplayObjectParent = null;\n        this._lastObjectRendered = null;\n    }\n\n    /**\n     * The background color to fill if not transparent\n     *\n     * @member {number}\n     */\n    get backgroundColor()\n    {\n        return this._backgroundColor;\n    }\n\n    set backgroundColor(value) // eslint-disable-line require-jsdoc\n    {\n        this._backgroundColor = value;\n        this._backgroundColorString = hex2string(value);\n        hex2rgb(value, this._backgroundColorRgba);\n    }\n}\n","import SystemRenderer from '../SystemRenderer';\nimport CanvasMaskManager from './utils/CanvasMaskManager';\nimport CanvasRenderTarget from './utils/CanvasRenderTarget';\nimport mapCanvasBlendModesToPixi from './utils/mapCanvasBlendModesToPixi';\nimport { pluginTarget } from '../../utils';\nimport { RENDERER_TYPE, SCALE_MODES, BLEND_MODES } from '../../const';\nimport settings from '../../settings';\n\n/**\n * The CanvasRenderer draws the scene and all its content onto a 2d canvas. This renderer should\n * be used for browsers that do not support WebGL. Don't forget to add the CanvasRenderer.view to\n * your DOM or you will not see anything :)\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.SystemRenderer\n */\nexport default class CanvasRenderer extends SystemRenderer\n{\n    // eslint-disable-next-line valid-jsdoc\n    /**\n     * @param {object} [options] - The optional renderer parameters\n     * @param {number} [options.width=800] - the width of the screen\n     * @param {number} [options.height=600] - the height of the screen\n     * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional\n     * @param {boolean} [options.transparent=false] - If the render view is transparent, default false\n     * @param {boolean} [options.autoResize=false] - If the render view is automatically resized, default false\n     * @param {boolean} [options.antialias=false] - sets antialias (only applicable in chrome at the moment)\n     * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer. The\n     *  resolution of the renderer retina would be 2.\n     * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation,\n     *  enable this if you need to call toDataUrl on the webgl context.\n     * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or\n     *      not before the new render pass.\n     * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n     *  (shown if not transparent).\n     * @param {boolean} [options.roundPixels=false] - If true PixiJS will Math.floor() x/y values when rendering,\n     *  stopping pixel interpolation.\n     */\n    constructor(options, arg2, arg3)\n    {\n        super('Canvas', options, arg2, arg3);\n\n        this.type = RENDERER_TYPE.CANVAS;\n\n        /**\n         * The root canvas 2d context that everything is drawn with.\n         *\n         * @member {CanvasRenderingContext2D}\n         */\n        this.rootContext = this.view.getContext('2d', { alpha: this.transparent });\n\n        /**\n         * The currently active canvas 2d context (could change with renderTextures)\n         *\n         * @member {CanvasRenderingContext2D}\n         */\n        this.context = this.rootContext;\n\n        /**\n         * Boolean flag controlling canvas refresh.\n         *\n         * @member {boolean}\n         */\n        this.refresh = true;\n\n        /**\n         * Instance of a CanvasMaskManager, handles masking when using the canvas renderer.\n         *\n         * @member {PIXI.CanvasMaskManager}\n         */\n        this.maskManager = new CanvasMaskManager(this);\n\n        /**\n         * The canvas property used to set the canvas smoothing property.\n         *\n         * @member {string}\n         */\n        this.smoothProperty = 'imageSmoothingEnabled';\n\n        if (!this.rootContext.imageSmoothingEnabled)\n        {\n            if (this.rootContext.webkitImageSmoothingEnabled)\n            {\n                this.smoothProperty = 'webkitImageSmoothingEnabled';\n            }\n            else if (this.rootContext.mozImageSmoothingEnabled)\n            {\n                this.smoothProperty = 'mozImageSmoothingEnabled';\n            }\n            else if (this.rootContext.oImageSmoothingEnabled)\n            {\n                this.smoothProperty = 'oImageSmoothingEnabled';\n            }\n            else if (this.rootContext.msImageSmoothingEnabled)\n            {\n                this.smoothProperty = 'msImageSmoothingEnabled';\n            }\n        }\n\n        this.initPlugins();\n\n        this.blendModes = mapCanvasBlendModesToPixi();\n        this._activeBlendMode = null;\n\n        this.renderingToScreen = false;\n\n        this.resize(this.options.width, this.options.height);\n\n        /**\n         * Fired after rendering finishes.\n         *\n         * @event PIXI.CanvasRenderer#postrender\n         */\n\n        /**\n         * Fired before rendering starts.\n         *\n         * @event PIXI.CanvasRenderer#prerender\n         */\n    }\n\n    /**\n     * Renders the object to this canvas view\n     *\n     * @param {PIXI.DisplayObject} displayObject - The object to be rendered\n     * @param {PIXI.RenderTexture} [renderTexture] - A render texture to be rendered to.\n     *  If unset, it will render to the root context.\n     * @param {boolean} [clear=false] - Whether to clear the canvas before drawing\n     * @param {PIXI.Transform} [transform] - A transformation to be applied\n     * @param {boolean} [skipUpdateTransform=false] - Whether to skip the update transform\n     */\n    render(displayObject, renderTexture, clear, transform, skipUpdateTransform)\n    {\n        if (!this.view)\n        {\n            return;\n        }\n\n        // can be handy to know!\n        this.renderingToScreen = !renderTexture;\n\n        this.emit('prerender');\n\n        const rootResolution = this.resolution;\n\n        if (renderTexture)\n        {\n            renderTexture = renderTexture.baseTexture || renderTexture;\n\n            if (!renderTexture._canvasRenderTarget)\n            {\n                renderTexture._canvasRenderTarget = new CanvasRenderTarget(\n                    renderTexture.width,\n                    renderTexture.height,\n                    renderTexture.resolution\n                );\n                renderTexture.source = renderTexture._canvasRenderTarget.canvas;\n                renderTexture.valid = true;\n            }\n\n            this.context = renderTexture._canvasRenderTarget.context;\n            this.resolution = renderTexture._canvasRenderTarget.resolution;\n        }\n        else\n        {\n            this.context = this.rootContext;\n        }\n\n        const context = this.context;\n\n        if (!renderTexture)\n        {\n            this._lastObjectRendered = displayObject;\n        }\n\n        if (!skipUpdateTransform)\n        {\n            // update the scene graph\n            const cacheParent = displayObject.parent;\n            const tempWt = this._tempDisplayObjectParent.transform.worldTransform;\n\n            if (transform)\n            {\n                transform.copy(tempWt);\n\n                // lets not forget to flag the parent transform as dirty...\n                this._tempDisplayObjectParent.transform._worldID = -1;\n            }\n            else\n            {\n                tempWt.identity();\n            }\n\n            displayObject.parent = this._tempDisplayObjectParent;\n\n            displayObject.updateTransform();\n            displayObject.parent = cacheParent;\n            // displayObject.hitArea = //TODO add a temp hit area\n        }\n\n        context.setTransform(1, 0, 0, 1, 0, 0);\n        context.globalAlpha = 1;\n        this._activeBlendMode = BLEND_MODES.NORMAL;\n        context.globalCompositeOperation = this.blendModes[BLEND_MODES.NORMAL];\n\n        if (navigator.isCocoonJS && this.view.screencanvas)\n        {\n            context.fillStyle = 'black';\n            context.clear();\n        }\n\n        if (clear !== undefined ? clear : this.clearBeforeRender)\n        {\n            if (this.renderingToScreen)\n            {\n                if (this.transparent)\n                {\n                    context.clearRect(0, 0, this.width, this.height);\n                }\n                else\n                {\n                    context.fillStyle = this._backgroundColorString;\n                    context.fillRect(0, 0, this.width, this.height);\n                }\n            } // else {\n            // TODO: implement background for CanvasRenderTarget or RenderTexture?\n            // }\n        }\n\n        // TODO RENDER TARGET STUFF HERE..\n        const tempContext = this.context;\n\n        this.context = context;\n        displayObject.renderCanvas(this);\n        this.context = tempContext;\n\n        this.resolution = rootResolution;\n\n        this.emit('postrender');\n    }\n\n    /**\n     * Clear the canvas of renderer.\n     *\n     * @param {string} [clearColor] - Clear the canvas with this color, except the canvas is transparent.\n     */\n    clear(clearColor)\n    {\n        const context = this.context;\n\n        clearColor = clearColor || this._backgroundColorString;\n\n        if (!this.transparent && clearColor)\n        {\n            context.fillStyle = clearColor;\n            context.fillRect(0, 0, this.width, this.height);\n        }\n        else\n        {\n            context.clearRect(0, 0, this.width, this.height);\n        }\n    }\n\n    /**\n     * Sets the blend mode of the renderer.\n     *\n     * @param {number} blendMode - See {@link PIXI.BLEND_MODES} for valid values.\n     */\n    setBlendMode(blendMode)\n    {\n        if (this._activeBlendMode === blendMode)\n        {\n            return;\n        }\n\n        this._activeBlendMode = blendMode;\n        this.context.globalCompositeOperation = this.blendModes[blendMode];\n    }\n\n    /**\n     * Removes everything from the renderer and optionally removes the Canvas DOM element.\n     *\n     * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM.\n     */\n    destroy(removeView)\n    {\n        this.destroyPlugins();\n\n        // call the base destroy\n        super.destroy(removeView);\n\n        this.context = null;\n\n        this.refresh = true;\n\n        this.maskManager.destroy();\n        this.maskManager = null;\n\n        this.smoothProperty = null;\n    }\n\n    /**\n     * Resizes the canvas view to the specified width and height.\n     *\n     * @extends PIXI.SystemRenderer#resize\n     *\n     * @param {number} screenWidth - the new width of the screen\n     * @param {number} screenHeight - the new height of the screen\n     */\n    resize(screenWidth, screenHeight)\n    {\n        super.resize(screenWidth, screenHeight);\n\n        // reset the scale mode.. oddly this seems to be reset when the canvas is resized.\n        // surely a browser bug?? Let PixiJS fix that for you..\n        if (this.smoothProperty)\n        {\n            this.rootContext[this.smoothProperty] = (settings.SCALE_MODE === SCALE_MODES.LINEAR);\n        }\n    }\n\n    /**\n     * Checks if blend mode has changed.\n     */\n    invalidateBlendMode()\n    {\n        this._activeBlendMode = this.blendModes.indexOf(this.context.globalCompositeOperation);\n    }\n}\n\n/**\n * Collection of installed plugins. These are included by default in PIXI, but can be excluded\n * by creating a custom build. Consult the README for more information about creating custom\n * builds and excluding plugins.\n * @name PIXI.CanvasRenderer#plugins\n * @type {object}\n * @readonly\n * @property {PIXI.accessibility.AccessibilityManager} accessibility Support tabbing interactive elements.\n * @property {PIXI.extract.CanvasExtract} extract Extract image data from renderer.\n * @property {PIXI.interaction.InteractionManager} interaction Handles mouse, touch and pointer events.\n * @property {PIXI.prepare.CanvasPrepare} prepare Pre-render display objects.\n */\n\n/**\n * Adds a plugin to the renderer.\n *\n * @method PIXI.CanvasRenderer#registerPlugin\n * @param {string} pluginName - The name of the plugin.\n * @param {Function} ctor - The constructor function or class for the plugin.\n */\n\npluginTarget.mixin(CanvasRenderer);\n","import { SHAPES } from '../../../const';\n\n/**\n * A set of functions used to handle masking.\n *\n * @class\n * @memberof PIXI\n */\nexport default class CanvasMaskManager\n{\n    /**\n     * @param {PIXI.CanvasRenderer} renderer - The canvas renderer.\n     */\n    constructor(renderer)\n    {\n        this.renderer = renderer;\n    }\n\n    /**\n     * This method adds it to the current stack of masks.\n     *\n     * @param {object} maskData - the maskData that will be pushed\n     */\n    pushMask(maskData)\n    {\n        const renderer = this.renderer;\n\n        renderer.context.save();\n\n        const cacheAlpha = maskData.alpha;\n        const transform = maskData.transform.worldTransform;\n        const resolution = renderer.resolution;\n\n        renderer.context.setTransform(\n            transform.a * resolution,\n            transform.b * resolution,\n            transform.c * resolution,\n            transform.d * resolution,\n            transform.tx * resolution,\n            transform.ty * resolution\n        );\n\n        // TODO suport sprite alpha masks??\n        // lots of effort required. If demand is great enough..\n        if (!maskData._texture)\n        {\n            this.renderGraphicsShape(maskData);\n            renderer.context.clip();\n        }\n\n        maskData.worldAlpha = cacheAlpha;\n    }\n\n    /**\n     * Renders a PIXI.Graphics shape.\n     *\n     * @param {PIXI.Graphics} graphics - The object to render.\n     */\n    renderGraphicsShape(graphics)\n    {\n        const context = this.renderer.context;\n        const len = graphics.graphicsData.length;\n\n        if (len === 0)\n        {\n            return;\n        }\n\n        context.beginPath();\n\n        for (let i = 0; i < len; i++)\n        {\n            const data = graphics.graphicsData[i];\n            const shape = data.shape;\n\n            if (data.type === SHAPES.POLY)\n            {\n                const points = shape.points;\n\n                context.moveTo(points[0], points[1]);\n\n                for (let j = 1; j < points.length / 2; j++)\n                {\n                    context.lineTo(points[j * 2], points[(j * 2) + 1]);\n                }\n\n                // if the first and last point are the same close the path - much neater :)\n                if (points[0] === points[points.length - 2] && points[1] === points[points.length - 1])\n                {\n                    context.closePath();\n                }\n            }\n            else if (data.type === SHAPES.RECT)\n            {\n                context.rect(shape.x, shape.y, shape.width, shape.height);\n                context.closePath();\n            }\n            else if (data.type === SHAPES.CIRC)\n            {\n                // TODO - need to be Undefined!\n                context.arc(shape.x, shape.y, shape.radius, 0, 2 * Math.PI);\n                context.closePath();\n            }\n            else if (data.type === SHAPES.ELIP)\n            {\n                // ellipse code taken from: http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n\n                const w = shape.width * 2;\n                const h = shape.height * 2;\n\n                const x = shape.x - (w / 2);\n                const y = shape.y - (h / 2);\n\n                const kappa = 0.5522848;\n                const ox = (w / 2) * kappa; // control point offset horizontal\n                const oy = (h / 2) * kappa; // control point offset vertical\n                const xe = x + w;           // x-end\n                const ye = y + h;           // y-end\n                const xm = x + (w / 2);       // x-middle\n                const ym = y + (h / 2);       // y-middle\n\n                context.moveTo(x, ym);\n                context.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n                context.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n                context.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n                context.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n                context.closePath();\n            }\n            else if (data.type === SHAPES.RREC)\n            {\n                const rx = shape.x;\n                const ry = shape.y;\n                const width = shape.width;\n                const height = shape.height;\n                let radius = shape.radius;\n\n                const maxRadius = Math.min(width, height) / 2 | 0;\n\n                radius = radius > maxRadius ? maxRadius : radius;\n\n                context.moveTo(rx, ry + radius);\n                context.lineTo(rx, ry + height - radius);\n                context.quadraticCurveTo(rx, ry + height, rx + radius, ry + height);\n                context.lineTo(rx + width - radius, ry + height);\n                context.quadraticCurveTo(rx + width, ry + height, rx + width, ry + height - radius);\n                context.lineTo(rx + width, ry + radius);\n                context.quadraticCurveTo(rx + width, ry, rx + width - radius, ry);\n                context.lineTo(rx + radius, ry);\n                context.quadraticCurveTo(rx, ry, rx, ry + radius);\n                context.closePath();\n            }\n        }\n    }\n\n    /**\n     * Restores the current drawing context to the state it was before the mask was applied.\n     *\n     * @param {PIXI.CanvasRenderer} renderer - The renderer context to use.\n     */\n    popMask(renderer)\n    {\n        renderer.context.restore();\n        renderer.invalidateBlendMode();\n    }\n\n    /**\n     * Destroys this canvas mask manager.\n     *\n     */\n    destroy()\n    {\n        /* empty */\n    }\n}\n","import settings from '../../../settings';\n\n/**\n * Creates a Canvas element of the given size.\n *\n * @class\n * @memberof PIXI\n */\nexport default class CanvasRenderTarget\n{\n    /**\n     * @param {number} width - the width for the newly created canvas\n     * @param {number} height - the height for the newly created canvas\n     * @param {number} [resolution=1] - The resolution / device pixel ratio of the canvas\n     */\n    constructor(width, height, resolution)\n    {\n        /**\n         * The Canvas object that belongs to this CanvasRenderTarget.\n         *\n         * @member {HTMLCanvasElement}\n         */\n        this.canvas = document.createElement('canvas');\n\n        /**\n         * A CanvasRenderingContext2D object representing a two-dimensional rendering context.\n         *\n         * @member {CanvasRenderingContext2D}\n         */\n        this.context = this.canvas.getContext('2d');\n\n        this.resolution = resolution || settings.RESOLUTION;\n\n        this.resize(width, height);\n    }\n\n    /**\n     * Clears the canvas that was created by the CanvasRenderTarget class.\n     *\n     * @private\n     */\n    clear()\n    {\n        this.context.setTransform(1, 0, 0, 1, 0, 0);\n        this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n    }\n\n    /**\n     * Resizes the canvas to the specified width and height.\n     *\n     * @param {number} width - the new width of the canvas\n     * @param {number} height - the new height of the canvas\n     */\n    resize(width, height)\n    {\n        this.canvas.width = width * this.resolution;\n        this.canvas.height = height * this.resolution;\n    }\n\n    /**\n     * Destroys this canvas.\n     *\n     */\n    destroy()\n    {\n        this.context = null;\n        this.canvas = null;\n    }\n\n    /**\n     * The width of the canvas buffer in pixels.\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        return this.canvas.width;\n    }\n\n    set width(val) // eslint-disable-line require-jsdoc\n    {\n        this.canvas.width = val;\n    }\n\n    /**\n     * The height of the canvas buffer in pixels.\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        return this.canvas.height;\n    }\n\n    set height(val) // eslint-disable-line require-jsdoc\n    {\n        this.canvas.height = val;\n    }\n}\n","/**\n * Creates a little colored canvas\n *\n * @ignore\n * @param {string} color - The color to make the canvas\n * @return {canvas} a small canvas element\n */\nfunction createColoredCanvas(color)\n{\n    const canvas = document.createElement('canvas');\n\n    canvas.width = 6;\n    canvas.height = 1;\n\n    const context = canvas.getContext('2d');\n\n    context.fillStyle = color;\n    context.fillRect(0, 0, 6, 1);\n\n    return canvas;\n}\n\n/**\n * Checks whether the Canvas BlendModes are supported by the current browser\n *\n * @return {boolean} whether they are supported\n */\nexport default function canUseNewCanvasBlendModes()\n{\n    if (typeof document === 'undefined')\n    {\n        return false;\n    }\n\n    const magenta = createColoredCanvas('#ff00ff');\n    const yellow = createColoredCanvas('#ffff00');\n\n    const canvas = document.createElement('canvas');\n\n    canvas.width = 6;\n    canvas.height = 1;\n\n    const context = canvas.getContext('2d');\n\n    context.globalCompositeOperation = 'multiply';\n    context.drawImage(magenta, 0, 0);\n    context.drawImage(yellow, 2, 0);\n\n    const imageData = context.getImageData(2, 0, 1, 1);\n\n    if (!imageData)\n    {\n        return false;\n    }\n\n    const data = imageData.data;\n\n    return (data[0] === 255 && data[1] === 0 && data[2] === 0);\n}\n","import { BLEND_MODES } from '../../../const';\nimport canUseNewCanvasBlendModes from './canUseNewCanvasBlendModes';\n\n/**\n * Maps blend combinations to Canvas.\n *\n * @memberof PIXI\n * @function mapCanvasBlendModesToPixi\n * @private\n * @param {string[]} [array=[]] - The array to output into.\n * @return {string[]} Mapped modes.\n */\nexport default function mapCanvasBlendModesToPixi(array = [])\n{\n    if (canUseNewCanvasBlendModes())\n    {\n        array[BLEND_MODES.NORMAL] = 'source-over';\n        array[BLEND_MODES.ADD] = 'lighter'; // IS THIS OK???\n        array[BLEND_MODES.MULTIPLY] = 'multiply';\n        array[BLEND_MODES.SCREEN] = 'screen';\n        array[BLEND_MODES.OVERLAY] = 'overlay';\n        array[BLEND_MODES.DARKEN] = 'darken';\n        array[BLEND_MODES.LIGHTEN] = 'lighten';\n        array[BLEND_MODES.COLOR_DODGE] = 'color-dodge';\n        array[BLEND_MODES.COLOR_BURN] = 'color-burn';\n        array[BLEND_MODES.HARD_LIGHT] = 'hard-light';\n        array[BLEND_MODES.SOFT_LIGHT] = 'soft-light';\n        array[BLEND_MODES.DIFFERENCE] = 'difference';\n        array[BLEND_MODES.EXCLUSION] = 'exclusion';\n        array[BLEND_MODES.HUE] = 'hue';\n        array[BLEND_MODES.SATURATION] = 'saturate';\n        array[BLEND_MODES.COLOR] = 'color';\n        array[BLEND_MODES.LUMINOSITY] = 'luminosity';\n    }\n    else\n    {\n        // this means that the browser does not support the cool new blend modes in canvas 'cough' ie 'cough'\n        array[BLEND_MODES.NORMAL] = 'source-over';\n        array[BLEND_MODES.ADD] = 'lighter'; // IS THIS OK???\n        array[BLEND_MODES.MULTIPLY] = 'source-over';\n        array[BLEND_MODES.SCREEN] = 'source-over';\n        array[BLEND_MODES.OVERLAY] = 'source-over';\n        array[BLEND_MODES.DARKEN] = 'source-over';\n        array[BLEND_MODES.LIGHTEN] = 'source-over';\n        array[BLEND_MODES.COLOR_DODGE] = 'source-over';\n        array[BLEND_MODES.COLOR_BURN] = 'source-over';\n        array[BLEND_MODES.HARD_LIGHT] = 'source-over';\n        array[BLEND_MODES.SOFT_LIGHT] = 'source-over';\n        array[BLEND_MODES.DIFFERENCE] = 'source-over';\n        array[BLEND_MODES.EXCLUSION] = 'source-over';\n        array[BLEND_MODES.HUE] = 'source-over';\n        array[BLEND_MODES.SATURATION] = 'source-over';\n        array[BLEND_MODES.COLOR] = 'source-over';\n        array[BLEND_MODES.LUMINOSITY] = 'source-over';\n    }\n    // not-premultiplied, only for webgl\n    array[BLEND_MODES.NORMAL_NPM] = array[BLEND_MODES.NORMAL];\n    array[BLEND_MODES.ADD_NPM] = array[BLEND_MODES.ADD];\n    array[BLEND_MODES.SCREEN_NPM] = array[BLEND_MODES.SCREEN];\n\n    return array;\n}\n","import { GC_MODES } from '../../const';\nimport settings from '../../settings';\n\n/**\n * TextureGarbageCollector. This class manages the GPU and ensures that it does not get clogged\n * up with textures that are no longer being used.\n *\n * @class\n * @memberof PIXI\n */\nexport default class TextureGarbageCollector\n{\n    /**\n     * @param {PIXI.WebGLRenderer} renderer - The renderer this manager works for.\n     */\n    constructor(renderer)\n    {\n        this.renderer = renderer;\n\n        this.count = 0;\n        this.checkCount = 0;\n        this.maxIdle = settings.GC_MAX_IDLE;\n        this.checkCountMax = settings.GC_MAX_CHECK_COUNT;\n        this.mode = settings.GC_MODE;\n    }\n\n    /**\n     * Checks to see when the last time a texture was used\n     * if the texture has not been used for a specified amount of time it will be removed from the GPU\n     */\n    update()\n    {\n        this.count++;\n\n        if (this.mode === GC_MODES.MANUAL)\n        {\n            return;\n        }\n\n        this.checkCount++;\n\n        if (this.checkCount > this.checkCountMax)\n        {\n            this.checkCount = 0;\n\n            this.run();\n        }\n    }\n\n    /**\n     * Checks to see when the last time a texture was used\n     * if the texture has not been used for a specified amount of time it will be removed from the GPU\n     */\n    run()\n    {\n        const tm = this.renderer.textureManager;\n        const managedTextures =  tm._managedTextures;\n        let wasRemoved = false;\n\n        for (let i = 0; i < managedTextures.length; i++)\n        {\n            const texture = managedTextures[i];\n\n            // only supports non generated textures at the moment!\n            if (!texture._glRenderTargets && this.count - texture.touched > this.maxIdle)\n            {\n                tm.destroyTexture(texture, true);\n                managedTextures[i] = null;\n                wasRemoved = true;\n            }\n        }\n\n        if (wasRemoved)\n        {\n            let j = 0;\n\n            for (let i = 0; i < managedTextures.length; i++)\n            {\n                if (managedTextures[i] !== null)\n                {\n                    managedTextures[j++] = managedTextures[i];\n                }\n            }\n\n            managedTextures.length = j;\n        }\n    }\n\n    /**\n     * Removes all the textures within the specified displayObject and its children from the GPU\n     *\n     * @param {PIXI.DisplayObject} displayObject - the displayObject to remove the textures from.\n     */\n    unload(displayObject)\n    {\n        const tm = this.renderer.textureManager;\n\n        // only destroy non generated textures\n        if (displayObject._texture && displayObject._texture._glRenderTargets)\n        {\n            tm.destroyTexture(displayObject._texture, true);\n        }\n\n        for (let i = displayObject.children.length - 1; i >= 0; i--)\n        {\n            this.unload(displayObject.children[i]);\n        }\n    }\n}\n","import { GLTexture } from 'pixi-gl-core';\nimport { WRAP_MODES, SCALE_MODES } from '../../const';\nimport RenderTarget from './utils/RenderTarget';\nimport { removeItems } from '../../utils';\n\n/**\n * Helper class to create a webGL Texture\n *\n * @class\n * @memberof PIXI\n */\nexport default class TextureManager\n{\n    /**\n     * @param {PIXI.WebGLRenderer} renderer - A reference to the current renderer\n     */\n    constructor(renderer)\n    {\n        /**\n         * A reference to the current renderer\n         *\n         * @member {PIXI.WebGLRenderer}\n         */\n        this.renderer = renderer;\n\n        /**\n         * The current WebGL rendering context\n         *\n         * @member {WebGLRenderingContext}\n         */\n        this.gl = renderer.gl;\n\n        /**\n         * Track textures in the renderer so we can no longer listen to them on destruction.\n         *\n         * @member {Array<*>}\n         * @private\n         */\n        this._managedTextures = [];\n    }\n\n    /**\n     * Binds a texture.\n     *\n     */\n    bindTexture()\n    {\n        // empty\n    }\n\n    /**\n     * Gets a texture.\n     *\n     */\n    getTexture()\n    {\n        // empty\n    }\n\n    /**\n     * Updates and/or Creates a WebGL texture for the renderer's context.\n     *\n     * @param {PIXI.BaseTexture|PIXI.Texture} texture - the texture to update\n     * @param {number} location - the location the texture will be bound to.\n     * @return {GLTexture} The gl texture.\n     */\n    updateTexture(texture, location)\n    {\n        // assume it good!\n        // texture = texture.baseTexture || texture;\n\n        const gl = this.gl;\n\n        const isRenderTexture = !!texture._glRenderTargets;\n\n        if (!texture.hasLoaded)\n        {\n            return null;\n        }\n\n        const boundTextures = this.renderer.boundTextures;\n\n        // if the location is undefined then this may have been called by n event.\n        // this being the case the texture may already be bound to a slot. As a texture can only be bound once\n        // we need to find its current location if it exists.\n        if (location === undefined)\n        {\n            location = 0;\n\n            // TODO maybe we can use texture bound ids later on...\n            // check if texture is already bound..\n            for (let i = 0; i < boundTextures.length; ++i)\n            {\n                if (boundTextures[i] === texture)\n                {\n                    location = i;\n                    break;\n                }\n            }\n        }\n\n        boundTextures[location] = texture;\n\n        gl.activeTexture(gl.TEXTURE0 + location);\n\n        let glTexture = texture._glTextures[this.renderer.CONTEXT_UID];\n\n        if (!glTexture)\n        {\n            if (isRenderTexture)\n            {\n                const renderTarget = new RenderTarget(\n                    this.gl,\n                    texture.width,\n                    texture.height,\n                    texture.scaleMode,\n                    texture.resolution\n                );\n\n                renderTarget.resize(texture.width, texture.height);\n                texture._glRenderTargets[this.renderer.CONTEXT_UID] = renderTarget;\n                glTexture = renderTarget.texture;\n            }\n            else\n            {\n                glTexture = new GLTexture(this.gl, null, null, null, null);\n                glTexture.bind(location);\n                glTexture.premultiplyAlpha = true;\n                glTexture.upload(texture.source);\n            }\n\n            texture._glTextures[this.renderer.CONTEXT_UID] = glTexture;\n\n            texture.on('update', this.updateTexture, this);\n            texture.on('dispose', this.destroyTexture, this);\n\n            this._managedTextures.push(texture);\n\n            if (texture.isPowerOfTwo)\n            {\n                if (texture.mipmap)\n                {\n                    glTexture.enableMipmap();\n                }\n\n                if (texture.wrapMode === WRAP_MODES.CLAMP)\n                {\n                    glTexture.enableWrapClamp();\n                }\n                else if (texture.wrapMode === WRAP_MODES.REPEAT)\n                {\n                    glTexture.enableWrapRepeat();\n                }\n                else\n                {\n                    glTexture.enableWrapMirrorRepeat();\n                }\n            }\n            else\n            {\n                glTexture.enableWrapClamp();\n            }\n\n            if (texture.scaleMode === SCALE_MODES.NEAREST)\n            {\n                glTexture.enableNearestScaling();\n            }\n            else\n            {\n                glTexture.enableLinearScaling();\n            }\n        }\n        // the texture already exists so we only need to update it..\n        else if (isRenderTexture)\n        {\n            texture._glRenderTargets[this.renderer.CONTEXT_UID].resize(texture.width, texture.height);\n        }\n        else\n        {\n            glTexture.upload(texture.source);\n        }\n\n        return glTexture;\n    }\n\n    /**\n     * Deletes the texture from WebGL\n     *\n     * @param {PIXI.BaseTexture|PIXI.Texture} texture - the texture to destroy\n     * @param {boolean} [skipRemove=false] - Whether to skip removing the texture from the TextureManager.\n     */\n    destroyTexture(texture, skipRemove)\n    {\n        texture = texture.baseTexture || texture;\n\n        if (!texture.hasLoaded)\n        {\n            return;\n        }\n\n        const uid = this.renderer.CONTEXT_UID;\n        const glTextures = texture._glTextures;\n        const glRenderTargets = texture._glRenderTargets;\n\n        if (glTextures[uid])\n        {\n            this.renderer.unbindTexture(texture);\n\n            glTextures[uid].destroy();\n            texture.off('update', this.updateTexture, this);\n            texture.off('dispose', this.destroyTexture, this);\n\n            delete glTextures[uid];\n\n            if (!skipRemove)\n            {\n                const i = this._managedTextures.indexOf(texture);\n\n                if (i !== -1)\n                {\n                    removeItems(this._managedTextures, i, 1);\n                }\n            }\n        }\n\n        if (glRenderTargets && glRenderTargets[uid])\n        {\n            glRenderTargets[uid].destroy();\n            delete glRenderTargets[uid];\n        }\n    }\n\n    /**\n     * Deletes all the textures from WebGL\n     */\n    removeAll()\n    {\n        // empty all the old gl textures as they are useless now\n        for (let i = 0; i < this._managedTextures.length; ++i)\n        {\n            const texture = this._managedTextures[i];\n\n            if (texture._glTextures[this.renderer.CONTEXT_UID])\n            {\n                delete texture._glTextures[this.renderer.CONTEXT_UID];\n            }\n        }\n    }\n\n    /**\n     * Destroys this manager and removes all its textures\n     */\n    destroy()\n    {\n        // destroy managed textures\n        for (let i = 0; i < this._managedTextures.length; ++i)\n        {\n            const texture = this._managedTextures[i];\n\n            this.destroyTexture(texture, true);\n\n            texture.off('update', this.updateTexture, this);\n            texture.off('dispose', this.destroyTexture, this);\n        }\n\n        this._managedTextures = null;\n    }\n}\n","import SystemRenderer from '../SystemRenderer';\nimport MaskManager from './managers/MaskManager';\nimport StencilManager from './managers/StencilManager';\nimport FilterManager from './managers/FilterManager';\nimport RenderTarget from './utils/RenderTarget';\nimport ObjectRenderer from './utils/ObjectRenderer';\nimport TextureManager from './TextureManager';\nimport BaseTexture from '../../textures/BaseTexture';\nimport TextureGarbageCollector from './TextureGarbageCollector';\nimport WebGLState from './WebGLState';\nimport mapWebGLDrawModesToPixi from './utils/mapWebGLDrawModesToPixi';\nimport validateContext from './utils/validateContext';\nimport { pluginTarget } from '../../utils';\nimport glCore from 'pixi-gl-core';\nimport { RENDERER_TYPE } from '../../const';\n\nlet CONTEXT_UID = 0;\n\n/**\n * The WebGLRenderer draws the scene and all its content onto a webGL enabled canvas. This renderer\n * should be used for browsers that support webGL. This Render works by automatically managing webGLBatchs.\n * So no need for Sprite Batches or Sprite Clouds.\n * Don't forget to add the view to your DOM or you will not see anything :)\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.SystemRenderer\n */\nexport default class WebGLRenderer extends SystemRenderer\n{\n    // eslint-disable-next-line valid-jsdoc\n    /**\n     *\n     * @param {object} [options] - The optional renderer parameters\n     * @param {number} [options.width=800] - the width of the screen\n     * @param {number} [options.height=600] - the height of the screen\n     * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional\n     * @param {boolean} [options.transparent=false] - If the render view is transparent, default false\n     * @param {boolean} [options.autoResize=false] - If the render view is automatically resized, default false\n     * @param {boolean} [options.antialias=false] - sets antialias. If not available natively then FXAA\n     *  antialiasing is used\n     * @param {boolean} [options.forceFXAA=false] - forces FXAA antialiasing to be used over native.\n     *  FXAA is faster, but may not always look as great\n     * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer.\n     *  The resolution of the renderer retina would be 2.\n     * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear\n     *  the canvas or not before the new render pass. If you wish to set this to false, you *must* set\n     *  preserveDrawingBuffer to `true`.\n     * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation,\n     *  enable this if you need to call toDataUrl on the webgl context.\n     * @param {boolean} [options.roundPixels=false] - If true PixiJS will Math.floor() x/y values when\n     *  rendering, stopping pixel interpolation.\n     * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n     *  (shown if not transparent).\n     * @param {boolean} [options.legacy=false] - If true PixiJS will aim to ensure compatibility\n     *  with older / less advanced devices. If you experiance unexplained flickering try setting this to true.\n     * @param {string} [options.powerPreference] - Parameter passed to webgl context, set to \"high-performance\"\n     *  for devices with dual graphics card\n     */\n    constructor(options, arg2, arg3)\n    {\n        super('WebGL', options, arg2, arg3);\n\n        this.legacy = this.options.legacy;\n\n        if (this.legacy)\n        {\n            glCore.VertexArrayObject.FORCE_NATIVE = true;\n        }\n\n        /**\n         * The type of this renderer as a standardised const\n         *\n         * @member {number}\n         * @see PIXI.RENDERER_TYPE\n         */\n        this.type = RENDERER_TYPE.WEBGL;\n\n        this.handleContextLost = this.handleContextLost.bind(this);\n        this.handleContextRestored = this.handleContextRestored.bind(this);\n\n        this.view.addEventListener('webglcontextlost', this.handleContextLost, false);\n        this.view.addEventListener('webglcontextrestored', this.handleContextRestored, false);\n\n        /**\n         * The options passed in to create a new webgl context.\n         *\n         * @member {object}\n         * @private\n         */\n        this._contextOptions = {\n            alpha: this.transparent,\n            antialias: this.options.antialias,\n            premultipliedAlpha: this.transparent && this.transparent !== 'notMultiplied',\n            stencil: true,\n            preserveDrawingBuffer: this.options.preserveDrawingBuffer,\n            powerPreference: this.options.powerPreference,\n        };\n\n        this._backgroundColorRgba[3] = this.transparent ? 0 : 1;\n\n        /**\n         * Manages the masks using the stencil buffer.\n         *\n         * @member {PIXI.MaskManager}\n         */\n        this.maskManager = new MaskManager(this);\n\n        /**\n         * Manages the stencil buffer.\n         *\n         * @member {PIXI.StencilManager}\n         */\n        this.stencilManager = new StencilManager(this);\n\n        /**\n         * An empty renderer.\n         *\n         * @member {PIXI.ObjectRenderer}\n         */\n        this.emptyRenderer = new ObjectRenderer(this);\n\n        /**\n         * The currently active ObjectRenderer.\n         *\n         * @member {PIXI.ObjectRenderer}\n         */\n        this.currentRenderer = this.emptyRenderer;\n\n        this.initPlugins();\n\n        /**\n         * The current WebGL rendering context, it is created here\n         *\n         * @member {WebGLRenderingContext}\n         */\n        // initialize the context so it is ready for the managers.\n        if (this.options.context)\n        {\n            // checks to see if a context is valid..\n            validateContext(this.options.context);\n        }\n\n        this.gl = this.options.context || glCore.createContext(this.view, this._contextOptions);\n\n        this.CONTEXT_UID = CONTEXT_UID++;\n\n        /**\n         * The currently active ObjectRenderer.\n         *\n         * @member {PIXI.WebGLState}\n         */\n        this.state = new WebGLState(this.gl);\n\n        this.renderingToScreen = true;\n\n        /**\n         * Holds the current state of textures bound to the GPU.\n         * @type {Array}\n         */\n        this.boundTextures = null;\n\n        /**\n         * Holds the current shader\n         *\n         * @member {PIXI.Shader}\n         */\n        this._activeShader = null;\n\n        this._activeVao = null;\n\n        /**\n         * Holds the current render target\n         *\n         * @member {PIXI.RenderTarget}\n         */\n        this._activeRenderTarget = null;\n\n        this._initContext();\n\n        /**\n         * Manages the filters.\n         *\n         * @member {PIXI.FilterManager}\n         */\n        this.filterManager = new FilterManager(this);\n        // map some webGL blend and drawmodes..\n        this.drawModes = mapWebGLDrawModesToPixi(this.gl);\n\n        this._nextTextureLocation = 0;\n\n        this.setBlendMode(0);\n\n        /**\n         * Fired after rendering finishes.\n         *\n         * @event PIXI.WebGLRenderer#postrender\n         */\n\n        /**\n         * Fired before rendering starts.\n         *\n         * @event PIXI.WebGLRenderer#prerender\n         */\n\n        /**\n         * Fired when the WebGL context is set.\n         *\n         * @event PIXI.WebGLRenderer#context\n         * @param {WebGLRenderingContext} gl - WebGL context.\n         */\n    }\n\n    /**\n     * Creates the WebGL context\n     *\n     * @private\n     */\n    _initContext()\n    {\n        const gl = this.gl;\n\n        // restore a context if it was previously lost\n        if (gl.isContextLost() && gl.getExtension('WEBGL_lose_context'))\n        {\n            gl.getExtension('WEBGL_lose_context').restoreContext();\n        }\n\n        const maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\n\n        this._activeShader = null;\n        this._activeVao = null;\n\n        this.boundTextures = new Array(maxTextures);\n        this.emptyTextures = new Array(maxTextures);\n\n        // create a texture manager...\n        this.textureManager = new TextureManager(this);\n        this.textureGC = new TextureGarbageCollector(this);\n\n        this.state.resetToDefault();\n\n        this.rootRenderTarget = new RenderTarget(gl, this.width, this.height, null, this.resolution, true);\n        this.rootRenderTarget.clearColor = this._backgroundColorRgba;\n\n        this.bindRenderTarget(this.rootRenderTarget);\n\n        // now lets fill up the textures with empty ones!\n        const emptyGLTexture = new glCore.GLTexture.fromData(gl, null, 1, 1);\n\n        const tempObj = { _glTextures: {} };\n\n        tempObj._glTextures[this.CONTEXT_UID] = {};\n\n        for (let i = 0; i < maxTextures; i++)\n        {\n            const empty = new BaseTexture();\n\n            empty._glTextures[this.CONTEXT_UID] = emptyGLTexture;\n\n            this.boundTextures[i] = tempObj;\n            this.emptyTextures[i] = empty;\n            this.bindTexture(null, i);\n        }\n\n        this.emit('context', gl);\n\n        // setup the width/height properties and gl viewport\n        this.resize(this.screen.width, this.screen.height);\n    }\n\n    /**\n     * Renders the object to its webGL view\n     *\n     * @param {PIXI.DisplayObject} displayObject - the object to be rendered\n     * @param {PIXI.RenderTexture} renderTexture - The render texture to render to.\n     * @param {boolean} [clear] - Should the canvas be cleared before the new render\n     * @param {PIXI.Transform} [transform] - A transform to apply to the render texture before rendering.\n     * @param {boolean} [skipUpdateTransform] - Should we skip the update transform pass?\n     */\n    render(displayObject, renderTexture, clear, transform, skipUpdateTransform)\n    {\n        // can be handy to know!\n        this.renderingToScreen = !renderTexture;\n\n        this.emit('prerender');\n\n        // no point rendering if our context has been blown up!\n        if (!this.gl || this.gl.isContextLost())\n        {\n            return;\n        }\n\n        this._nextTextureLocation = 0;\n\n        if (!renderTexture)\n        {\n            this._lastObjectRendered = displayObject;\n        }\n\n        if (!skipUpdateTransform)\n        {\n            // update the scene graph\n            const cacheParent = displayObject.parent;\n\n            displayObject.parent = this._tempDisplayObjectParent;\n            displayObject.updateTransform();\n            displayObject.parent = cacheParent;\n           // displayObject.hitArea = //TODO add a temp hit area\n        }\n\n        this.bindRenderTexture(renderTexture, transform);\n\n        this.currentRenderer.start();\n\n        if (clear !== undefined ? clear : this.clearBeforeRender)\n        {\n            this._activeRenderTarget.clear();\n        }\n\n        displayObject.renderWebGL(this);\n\n        // apply transform..\n        this.currentRenderer.flush();\n\n        // this.setObjectRenderer(this.emptyRenderer);\n\n        this.textureGC.update();\n\n        this.emit('postrender');\n    }\n\n    /**\n     * Changes the current renderer to the one given in parameter\n     *\n     * @param {PIXI.ObjectRenderer} objectRenderer - The object renderer to use.\n     */\n    setObjectRenderer(objectRenderer)\n    {\n        if (this.currentRenderer === objectRenderer)\n        {\n            return;\n        }\n\n        this.currentRenderer.stop();\n        this.currentRenderer = objectRenderer;\n        this.currentRenderer.start();\n    }\n\n    /**\n     * This should be called if you wish to do some custom rendering\n     * It will basically render anything that may be batched up such as sprites\n     *\n     */\n    flush()\n    {\n        this.setObjectRenderer(this.emptyRenderer);\n    }\n\n    /**\n     * Resizes the webGL view to the specified width and height.\n     *\n     * @param {number} screenWidth - the new width of the screen\n     * @param {number} screenHeight - the new height of the screen\n     */\n    resize(screenWidth, screenHeight)\n    {\n      //  if(width * this.resolution === this.width && height * this.resolution === this.height)return;\n\n        SystemRenderer.prototype.resize.call(this, screenWidth, screenHeight);\n\n        this.rootRenderTarget.resize(screenWidth, screenHeight);\n\n        if (this._activeRenderTarget === this.rootRenderTarget)\n        {\n            this.rootRenderTarget.activate();\n\n            if (this._activeShader)\n            {\n                this._activeShader.uniforms.projectionMatrix = this.rootRenderTarget.projectionMatrix.toArray(true);\n            }\n        }\n    }\n\n    /**\n     * Resizes the webGL view to the specified width and height.\n     *\n     * @param {number} blendMode - the desired blend mode\n     */\n    setBlendMode(blendMode)\n    {\n        this.state.setBlendMode(blendMode);\n    }\n\n    /**\n     * Erases the active render target and fills the drawing area with a colour\n     *\n     * @param {number} [clearColor] - The colour\n     */\n    clear(clearColor)\n    {\n        this._activeRenderTarget.clear(clearColor);\n    }\n\n    /**\n     * Sets the transform of the active render target to the given matrix\n     *\n     * @param {PIXI.Matrix} matrix - The transformation matrix\n     */\n    setTransform(matrix)\n    {\n        this._activeRenderTarget.transform = matrix;\n    }\n\n    /**\n     * Erases the render texture and fills the drawing area with a colour\n     *\n     * @param {PIXI.RenderTexture} renderTexture - The render texture to clear\n     * @param {number} [clearColor] - The colour\n     * @return {PIXI.WebGLRenderer} Returns itself.\n     */\n    clearRenderTexture(renderTexture, clearColor)\n    {\n        const baseTexture = renderTexture.baseTexture;\n        const renderTarget = baseTexture._glRenderTargets[this.CONTEXT_UID];\n\n        if (renderTarget)\n        {\n            renderTarget.clear(clearColor);\n        }\n\n        return this;\n    }\n\n    /**\n     * Binds a render texture for rendering\n     *\n     * @param {PIXI.RenderTexture} renderTexture - The render texture to render\n     * @param {PIXI.Transform} transform - The transform to be applied to the render texture\n     * @return {PIXI.WebGLRenderer} Returns itself.\n     */\n    bindRenderTexture(renderTexture, transform)\n    {\n        let renderTarget;\n\n        if (renderTexture)\n        {\n            const baseTexture = renderTexture.baseTexture;\n\n            if (!baseTexture._glRenderTargets[this.CONTEXT_UID])\n            {\n                // bind the current texture\n                this.textureManager.updateTexture(baseTexture, 0);\n            }\n\n            this.unbindTexture(baseTexture);\n\n            renderTarget = baseTexture._glRenderTargets[this.CONTEXT_UID];\n            renderTarget.setFrame(renderTexture.frame);\n        }\n        else\n        {\n            renderTarget = this.rootRenderTarget;\n        }\n\n        renderTarget.transform = transform;\n        this.bindRenderTarget(renderTarget);\n\n        return this;\n    }\n\n    /**\n     * Changes the current render target to the one given in parameter\n     *\n     * @param {PIXI.RenderTarget} renderTarget - the new render target\n     * @return {PIXI.WebGLRenderer} Returns itself.\n     */\n    bindRenderTarget(renderTarget)\n    {\n        if (renderTarget !== this._activeRenderTarget)\n        {\n            this._activeRenderTarget = renderTarget;\n            renderTarget.activate();\n\n            if (this._activeShader)\n            {\n                this._activeShader.uniforms.projectionMatrix = renderTarget.projectionMatrix.toArray(true);\n            }\n\n            this.stencilManager.setMaskStack(renderTarget.stencilMaskStack);\n        }\n\n        return this;\n    }\n\n    /**\n     * Changes the current shader to the one given in parameter\n     *\n     * @param {PIXI.Shader} shader - the new shader\n     * @param {boolean} [autoProject=true] - Whether automatically set the projection matrix\n     * @return {PIXI.WebGLRenderer} Returns itself.\n     */\n    bindShader(shader, autoProject)\n    {\n        // TODO cache\n        if (this._activeShader !== shader)\n        {\n            this._activeShader = shader;\n            shader.bind();\n\n            // `autoProject` normally would be a default parameter set to true\n            // but because of how Babel transpiles default parameters\n            // it hinders the performance of this method.\n            if (autoProject !== false)\n            {\n                // automatically set the projection matrix\n                shader.uniforms.projectionMatrix = this._activeRenderTarget.projectionMatrix.toArray(true);\n            }\n        }\n\n        return this;\n    }\n\n    /**\n     * Binds the texture. This will return the location of the bound texture.\n     * It may not be the same as the one you pass in. This is due to optimisation that prevents\n     * needless binding of textures. For example if the texture is already bound it will return the\n     * current location of the texture instead of the one provided. To bypass this use force location\n     *\n     * @param {PIXI.Texture} texture - the new texture\n     * @param {number} location - the suggested texture location\n     * @param {boolean} forceLocation - force the location\n     * @return {number} bound texture location\n     */\n    bindTexture(texture, location, forceLocation)\n    {\n        texture = texture || this.emptyTextures[location];\n        texture = texture.baseTexture || texture;\n        texture.touched = this.textureGC.count;\n\n        if (!forceLocation)\n        {\n            // TODO - maybe look into adding boundIds.. save us the loop?\n            for (let i = 0; i < this.boundTextures.length; i++)\n            {\n                if (this.boundTextures[i] === texture)\n                {\n                    return i;\n                }\n            }\n\n            if (location === undefined)\n            {\n                this._nextTextureLocation++;\n                this._nextTextureLocation %= this.boundTextures.length;\n                location = this.boundTextures.length - this._nextTextureLocation - 1;\n            }\n        }\n        else\n        {\n            location = location || 0;\n        }\n\n        const gl = this.gl;\n        const glTexture = texture._glTextures[this.CONTEXT_UID];\n\n        if (!glTexture)\n        {\n            // this will also bind the texture..\n            this.textureManager.updateTexture(texture, location);\n        }\n        else\n        {\n            // bind the current texture\n            this.boundTextures[location] = texture;\n            gl.activeTexture(gl.TEXTURE0 + location);\n            gl.bindTexture(gl.TEXTURE_2D, glTexture.texture);\n        }\n\n        return location;\n    }\n\n     /**\n     * unbinds the texture ...\n     *\n     * @param {PIXI.Texture} texture - the texture to unbind\n     * @return {PIXI.WebGLRenderer} Returns itself.\n     */\n    unbindTexture(texture)\n    {\n        const gl = this.gl;\n\n        texture = texture.baseTexture || texture;\n\n        for (let i = 0; i < this.boundTextures.length; i++)\n        {\n            if (this.boundTextures[i] === texture)\n            {\n                this.boundTextures[i] = this.emptyTextures[i];\n\n                gl.activeTexture(gl.TEXTURE0 + i);\n                gl.bindTexture(gl.TEXTURE_2D, this.emptyTextures[i]._glTextures[this.CONTEXT_UID].texture);\n            }\n        }\n\n        return this;\n    }\n\n    /**\n     * Creates a new VAO from this renderer's context and state.\n     *\n     * @return {VertexArrayObject} The new VAO.\n     */\n    createVao()\n    {\n        return new glCore.VertexArrayObject(this.gl, this.state.attribState);\n    }\n\n    /**\n     * Changes the current Vao to the one given in parameter\n     *\n     * @param {PIXI.VertexArrayObject} vao - the new Vao\n     * @return {PIXI.WebGLRenderer} Returns itself.\n     */\n    bindVao(vao)\n    {\n        if (this._activeVao === vao)\n        {\n            return this;\n        }\n\n        if (vao)\n        {\n            vao.bind();\n        }\n        else if (this._activeVao)\n        {\n            // TODO this should always be true i think?\n            this._activeVao.unbind();\n        }\n\n        this._activeVao = vao;\n\n        return this;\n    }\n\n    /**\n     * Resets the WebGL state so you can render things however you fancy!\n     *\n     * @return {PIXI.WebGLRenderer} Returns itself.\n     */\n    reset()\n    {\n        this.setObjectRenderer(this.emptyRenderer);\n\n        this._activeShader = null;\n        this._activeRenderTarget = this.rootRenderTarget;\n\n        // bind the main frame buffer (the screen);\n        this.rootRenderTarget.activate();\n\n        this.state.resetToDefault();\n\n        return this;\n    }\n\n    /**\n     * Handles a lost webgl context\n     *\n     * @private\n     * @param {WebGLContextEvent} event - The context lost event.\n     */\n    handleContextLost(event)\n    {\n        event.preventDefault();\n    }\n\n    /**\n     * Handles a restored webgl context\n     *\n     * @private\n     */\n    handleContextRestored()\n    {\n        this.textureManager.removeAll();\n        this._initContext();\n    }\n\n    /**\n     * Removes everything from the renderer (event listeners, spritebatch, etc...)\n     *\n     * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM.\n     *  See: https://github.com/pixijs/pixi.js/issues/2233\n     */\n    destroy(removeView)\n    {\n        this.destroyPlugins();\n\n        // remove listeners\n        this.view.removeEventListener('webglcontextlost', this.handleContextLost);\n        this.view.removeEventListener('webglcontextrestored', this.handleContextRestored);\n\n        this.textureManager.destroy();\n\n        // call base destroy\n        super.destroy(removeView);\n\n        this.uid = 0;\n\n        // destroy the managers\n        this.maskManager.destroy();\n        this.stencilManager.destroy();\n        this.filterManager.destroy();\n\n        this.maskManager = null;\n        this.filterManager = null;\n        this.textureManager = null;\n        this.currentRenderer = null;\n\n        this.handleContextLost = null;\n        this.handleContextRestored = null;\n\n        this._contextOptions = null;\n        this.gl.useProgram(null);\n\n        if (this.gl.getExtension('WEBGL_lose_context'))\n        {\n            this.gl.getExtension('WEBGL_lose_context').loseContext();\n        }\n\n        this.gl = null;\n\n        // this = null;\n    }\n}\n\n/**\n * Collection of installed plugins. These are included by default in PIXI, but can be excluded\n * by creating a custom build. Consult the README for more information about creating custom\n * builds and excluding plugins.\n * @name PIXI.WebGLRenderer#plugins\n * @type {object}\n * @readonly\n * @property {PIXI.accessibility.AccessibilityManager} accessibility Support tabbing interactive elements.\n * @property {PIXI.extract.WebGLExtract} extract Extract image data from renderer.\n * @property {PIXI.interaction.InteractionManager} interaction Handles mouse, touch and pointer events.\n * @property {PIXI.prepare.WebGLPrepare} prepare Pre-render display objects.\n */\n\n/**\n * Adds a plugin to the renderer.\n *\n * @method PIXI.WebGLRenderer#registerPlugin\n * @param {string} pluginName - The name of the plugin.\n * @param {Function} ctor - The constructor function or class for the plugin.\n */\n\npluginTarget.mixin(WebGLRenderer);\n","import mapWebGLBlendModesToPixi from './utils/mapWebGLBlendModesToPixi';\n\nconst BLEND = 0;\nconst DEPTH_TEST = 1;\nconst FRONT_FACE = 2;\nconst CULL_FACE = 3;\nconst BLEND_FUNC = 4;\n\n/**\n * A WebGL state machines\n *\n * @memberof PIXI\n * @class\n */\nexport default class WebGLState\n{\n    /**\n     * @param {WebGLRenderingContext} gl - The current WebGL rendering context\n     */\n    constructor(gl)\n    {\n        /**\n         * The current active state\n         *\n         * @member {Uint8Array}\n         */\n        this.activeState = new Uint8Array(16);\n\n        /**\n         * The default state\n         *\n         * @member {Uint8Array}\n         */\n        this.defaultState = new Uint8Array(16);\n\n        // default blend mode..\n        this.defaultState[0] = 1;\n\n        /**\n         * The current state index in the stack\n         *\n         * @member {number}\n         * @private\n         */\n        this.stackIndex = 0;\n\n        /**\n         * The stack holding all the different states\n         *\n         * @member {Array<*>}\n         * @private\n         */\n        this.stack = [];\n\n        /**\n         * The current WebGL rendering context\n         *\n         * @member {WebGLRenderingContext}\n         */\n        this.gl = gl;\n\n        this.maxAttribs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);\n\n        this.attribState = {\n            tempAttribState: new Array(this.maxAttribs),\n            attribState: new Array(this.maxAttribs),\n        };\n\n        this.blendModes = mapWebGLBlendModesToPixi(gl);\n\n        // check we have vao..\n        this.nativeVaoExtension = (\n            gl.getExtension('OES_vertex_array_object')\n            || gl.getExtension('MOZ_OES_vertex_array_object')\n            || gl.getExtension('WEBKIT_OES_vertex_array_object')\n        );\n    }\n\n    /**\n     * Pushes a new active state\n     */\n    push()\n    {\n        // next state..\n        let state = this.stack[this.stackIndex];\n\n        if (!state)\n        {\n            state = this.stack[this.stackIndex] = new Uint8Array(16);\n        }\n\n        ++this.stackIndex;\n\n        // copy state..\n        // set active state so we can force overrides of gl state\n        for (let i = 0; i < this.activeState.length; i++)\n        {\n            state[i] = this.activeState[i];\n        }\n    }\n\n    /**\n     * Pops a state out\n     */\n    pop()\n    {\n        const state = this.stack[--this.stackIndex];\n\n        this.setState(state);\n    }\n\n    /**\n     * Sets the current state\n     *\n     * @param {*} state - The state to set.\n     */\n    setState(state)\n    {\n        this.setBlend(state[BLEND]);\n        this.setDepthTest(state[DEPTH_TEST]);\n        this.setFrontFace(state[FRONT_FACE]);\n        this.setCullFace(state[CULL_FACE]);\n        this.setBlendMode(state[BLEND_FUNC]);\n    }\n\n    /**\n     * Enables or disabled blending.\n     *\n     * @param {boolean} value - Turn on or off webgl blending.\n     */\n    setBlend(value)\n    {\n        value = value ? 1 : 0;\n\n        if (this.activeState[BLEND] === value)\n        {\n            return;\n        }\n\n        this.activeState[BLEND] = value;\n        this.gl[value ? 'enable' : 'disable'](this.gl.BLEND);\n    }\n\n    /**\n     * Sets the blend mode.\n     *\n     * @param {number} value - The blend mode to set to.\n     */\n    setBlendMode(value)\n    {\n        if (value === this.activeState[BLEND_FUNC])\n        {\n            return;\n        }\n\n        this.activeState[BLEND_FUNC] = value;\n\n        const mode = this.blendModes[value];\n\n        if (mode.length === 2)\n        {\n            this.gl.blendFunc(mode[0], mode[1]);\n        }\n        else\n        {\n            this.gl.blendFuncSeparate(mode[0], mode[1], mode[2], mode[3]);\n        }\n    }\n\n    /**\n     * Sets whether to enable or disable depth test.\n     *\n     * @param {boolean} value - Turn on or off webgl depth testing.\n     */\n    setDepthTest(value)\n    {\n        value = value ? 1 : 0;\n\n        if (this.activeState[DEPTH_TEST] === value)\n        {\n            return;\n        }\n\n        this.activeState[DEPTH_TEST] = value;\n        this.gl[value ? 'enable' : 'disable'](this.gl.DEPTH_TEST);\n    }\n\n    /**\n     * Sets whether to enable or disable cull face.\n     *\n     * @param {boolean} value - Turn on or off webgl cull face.\n     */\n    setCullFace(value)\n    {\n        value = value ? 1 : 0;\n\n        if (this.activeState[CULL_FACE] === value)\n        {\n            return;\n        }\n\n        this.activeState[CULL_FACE] = value;\n        this.gl[value ? 'enable' : 'disable'](this.gl.CULL_FACE);\n    }\n\n    /**\n     * Sets the gl front face.\n     *\n     * @param {boolean} value - true is clockwise and false is counter-clockwise\n     */\n    setFrontFace(value)\n    {\n        value = value ? 1 : 0;\n\n        if (this.activeState[FRONT_FACE] === value)\n        {\n            return;\n        }\n\n        this.activeState[FRONT_FACE] = value;\n        this.gl.frontFace(this.gl[value ? 'CW' : 'CCW']);\n    }\n\n    /**\n     * Disables all the vaos in use\n     *\n     */\n    resetAttributes()\n    {\n        for (let i = 0; i < this.attribState.tempAttribState.length; i++)\n        {\n            this.attribState.tempAttribState[i] = 0;\n        }\n\n        for (let i = 0; i < this.attribState.attribState.length; i++)\n        {\n            this.attribState.attribState[i] = 0;\n        }\n\n        // im going to assume one is always active for performance reasons.\n        for (let i = 1; i < this.maxAttribs; i++)\n        {\n            this.gl.disableVertexAttribArray(i);\n        }\n    }\n\n    // used\n    /**\n     * Resets all the logic and disables the vaos\n     */\n    resetToDefault()\n    {\n        // unbind any VAO if they exist..\n        if (this.nativeVaoExtension)\n        {\n            this.nativeVaoExtension.bindVertexArrayOES(null);\n        }\n\n        // reset all attributes..\n        this.resetAttributes();\n\n        // set active state so we can force overrides of gl state\n        for (let i = 0; i < this.activeState.length; ++i)\n        {\n            this.activeState[i] = 32;\n        }\n\n        this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, false);\n\n        this.setState(this.defaultState);\n    }\n}\n","import extractUniformsFromSrc from './extractUniformsFromSrc';\nimport { uid } from '../../../utils';\nimport { BLEND_MODES } from '../../../const';\nimport settings from '../../../settings';\n\nconst SOURCE_KEY_MAP = {};\n\n// let math = require('../../../math');\n/**\n * @class\n * @memberof PIXI\n * @extends PIXI.Shader\n */\nexport default class Filter\n{\n    /**\n     * @param {string} [vertexSrc] - The source of the vertex shader.\n     * @param {string} [fragmentSrc] - The source of the fragment shader.\n     * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones.\n     */\n    constructor(vertexSrc, fragmentSrc, uniforms)\n    {\n        /**\n         * The vertex shader.\n         *\n         * @member {string}\n         */\n        this.vertexSrc = vertexSrc || Filter.defaultVertexSrc;\n\n        /**\n         * The fragment shader.\n         *\n         * @member {string}\n         */\n        this.fragmentSrc = fragmentSrc || Filter.defaultFragmentSrc;\n\n        this._blendMode = BLEND_MODES.NORMAL;\n\n        this.uniformData = uniforms || extractUniformsFromSrc(this.vertexSrc, this.fragmentSrc, 'projectionMatrix|uSampler');\n\n        /**\n         * An object containing the current values of custom uniforms.\n         * @example <caption>Updating the value of a custom uniform</caption>\n         * filter.uniforms.time = performance.now();\n         *\n         * @member {object}\n         */\n        this.uniforms = {};\n\n        for (const i in this.uniformData)\n        {\n            this.uniforms[i] = this.uniformData[i].value;\n        }\n\n        // this is where we store shader references..\n        // TODO we could cache this!\n        this.glShaders = {};\n\n        // used for cacheing.. sure there is a better way!\n        if (!SOURCE_KEY_MAP[this.vertexSrc + this.fragmentSrc])\n        {\n            SOURCE_KEY_MAP[this.vertexSrc + this.fragmentSrc] = uid();\n        }\n\n        this.glShaderKey = SOURCE_KEY_MAP[this.vertexSrc + this.fragmentSrc];\n\n        /**\n         * The padding of the filter. Some filters require extra space to breath such as a blur.\n         * Increasing this will add extra width and height to the bounds of the object that the\n         * filter is applied to.\n         *\n         * @member {number}\n         */\n        this.padding = 4;\n\n        /**\n         * The resolution of the filter. Setting this to be lower will lower the quality but\n         * increase the performance of the filter.\n         *\n         * @member {number}\n         */\n        this.resolution = settings.RESOLUTION;\n\n        /**\n         * If enabled is true the filter is applied, if false it will not.\n         *\n         * @member {boolean}\n         */\n        this.enabled = true;\n\n        /**\n         * If enabled, PixiJS will fit the filter area into boundaries for better performance.\n         * Switch it off if it does not work for specific shader.\n         *\n         * @member {boolean}\n         */\n        this.autoFit = true;\n    }\n\n    /**\n     * Applies the filter\n     *\n     * @param {PIXI.FilterManager} filterManager - The renderer to retrieve the filter from\n     * @param {PIXI.RenderTarget} input - The input render target.\n     * @param {PIXI.RenderTarget} output - The target to output to.\n     * @param {boolean} clear - Should the output be cleared before rendering to it\n     * @param {object} [currentState] - It's current state of filter.\n     *        There are some useful properties in the currentState :\n     *        target, filters, sourceFrame, destinationFrame, renderTarget, resolution\n     */\n    apply(filterManager, input, output, clear, currentState) // eslint-disable-line no-unused-vars\n    {\n        // --- //\n        //  this.uniforms.filterMatrix = filterManager.calculateSpriteMatrix(tempMatrix, window.panda );\n\n        // do as you please!\n\n        filterManager.applyFilter(this, input, output, clear);\n\n        // or just do a regular render..\n    }\n\n    /**\n     * Sets the blendmode of the filter\n     *\n     * @member {number}\n     * @default PIXI.BLEND_MODES.NORMAL\n     */\n    get blendMode()\n    {\n        return this._blendMode;\n    }\n\n    set blendMode(value) // eslint-disable-line require-jsdoc\n    {\n        this._blendMode = value;\n    }\n\n    /**\n     * The default vertex shader source\n     *\n     * @static\n     * @constant\n     */\n    static get defaultVertexSrc()\n    {\n        return [\n            'attribute vec2 aVertexPosition;',\n            'attribute vec2 aTextureCoord;',\n\n            'uniform mat3 projectionMatrix;',\n            'uniform mat3 filterMatrix;',\n\n            'varying vec2 vTextureCoord;',\n            'varying vec2 vFilterCoord;',\n\n            'void main(void){',\n            '   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);',\n            '   vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0)  ).xy;',\n            '   vTextureCoord = aTextureCoord ;',\n            '}',\n        ].join('\\n');\n    }\n\n    /**\n     * The default fragment shader source\n     *\n     * @static\n     * @constant\n     */\n    static get defaultFragmentSrc()\n    {\n        return [\n            'varying vec2 vTextureCoord;',\n            'varying vec2 vFilterCoord;',\n\n            'uniform sampler2D uSampler;',\n            'uniform sampler2D filterSampler;',\n\n            'void main(void){',\n            '   vec4 masky = texture2D(filterSampler, vFilterCoord);',\n            '   vec4 sample = texture2D(uSampler, vTextureCoord);',\n            '   vec4 color;',\n            '   if(mod(vFilterCoord.x, 1.0) > 0.5)',\n            '   {',\n            '     color = vec4(1.0, 0.0, 0.0, 1.0);',\n            '   }',\n            '   else',\n            '   {',\n            '     color = vec4(0.0, 1.0, 0.0, 1.0);',\n            '   }',\n            // '   gl_FragColor = vec4(mod(vFilterCoord.x, 1.5), vFilterCoord.y,0.0,1.0);',\n            '   gl_FragColor = mix(sample, masky, 0.5);',\n            '   gl_FragColor *= sample.a;',\n            '}',\n        ].join('\\n');\n    }\n}\n","import glCore from 'pixi-gl-core';\n\nconst defaultValue = glCore.shader.defaultValue;\n\nexport default function extractUniformsFromSrc(vertexSrc, fragmentSrc, mask)\n{\n    const vertUniforms = extractUniformsFromString(vertexSrc, mask);\n    const fragUniforms = extractUniformsFromString(fragmentSrc, mask);\n\n    return Object.assign(vertUniforms, fragUniforms);\n}\n\nfunction extractUniformsFromString(string)\n{\n    const maskRegex = new RegExp('^(projectionMatrix|uSampler|filterArea|filterClamp)$');\n\n    const uniforms = {};\n    let nameSplit;\n\n    // clean the lines a little - remove extra spaces / tabs etc\n    // then split along ';'\n    const lines = string.replace(/\\s+/g, ' ')\n                .split(/\\s*;\\s*/);\n\n    // loop through..\n    for (let i = 0; i < lines.length; i++)\n    {\n        const line = lines[i].trim();\n\n        if (line.indexOf('uniform') > -1)\n        {\n            const splitLine = line.split(' ');\n            const type = splitLine[1];\n\n            let name = splitLine[2];\n            let size = 1;\n\n            if (name.indexOf('[') > -1)\n            {\n                // array!\n                nameSplit = name.split(/\\[|]/);\n                name = nameSplit[0];\n                size *= Number(nameSplit[1]);\n            }\n\n            if (!name.match(maskRegex))\n            {\n                uniforms[name] = {\n                    value: defaultValue(type, size),\n                    name,\n                    type,\n                };\n            }\n        }\n    }\n\n    return uniforms;\n}\n","import { Matrix } from '../../../math';\n\n/**\n * Calculates the mapped matrix\n * @param filterArea {Rectangle} The filter area\n * @param sprite {Sprite} the target sprite\n * @param outputMatrix {Matrix} @alvin\n */\n// TODO playing around here.. this is temporary - (will end up in the shader)\n// this returns a matrix that will normalise map filter cords in the filter to screen space\nexport function calculateScreenSpaceMatrix(outputMatrix, filterArea, textureSize)\n{\n     // let worldTransform = sprite.worldTransform.copy(Matrix.TEMP_MATRIX),\n    // let texture = {width:1136, height:700};//sprite._texture.baseTexture;\n\n    // TODO unwrap?\n    const mappedMatrix = outputMatrix.identity();\n\n    mappedMatrix.translate(filterArea.x / textureSize.width, filterArea.y / textureSize.height);\n\n    mappedMatrix.scale(textureSize.width, textureSize.height);\n\n    return mappedMatrix;\n}\n\nexport function calculateNormalizedScreenSpaceMatrix(outputMatrix, filterArea, textureSize)\n{\n    const mappedMatrix = outputMatrix.identity();\n\n    mappedMatrix.translate(filterArea.x / textureSize.width, filterArea.y / textureSize.height);\n\n    const translateScaleX = (textureSize.width / filterArea.width);\n    const translateScaleY = (textureSize.height / filterArea.height);\n\n    mappedMatrix.scale(translateScaleX, translateScaleY);\n\n    return mappedMatrix;\n}\n\n// this will map the filter coord so that a texture can be used based on the transform of a sprite\nexport function calculateSpriteMatrix(outputMatrix, filterArea, textureSize, sprite)\n{\n    const worldTransform = sprite.worldTransform.copy(Matrix.TEMP_MATRIX);\n    const texture = sprite._texture.baseTexture;\n\n    // TODO unwrap?\n    const mappedMatrix = outputMatrix.identity();\n\n    // scale..\n    const ratio = textureSize.height / textureSize.width;\n\n    mappedMatrix.translate(filterArea.x / textureSize.width, filterArea.y / textureSize.height);\n\n    mappedMatrix.scale(1, ratio);\n\n    const translateScaleX = (textureSize.width / texture.width);\n    const translateScaleY = (textureSize.height / texture.height);\n\n    worldTransform.tx /= texture.width * translateScaleX;\n\n    // this...?  free beer for anyone who can explain why this makes sense!\n    worldTransform.ty /= texture.width * translateScaleX;\n    // worldTransform.ty /= texture.height * translateScaleY;\n\n    worldTransform.invert();\n    mappedMatrix.prepend(worldTransform);\n\n    // apply inverse scale..\n    mappedMatrix.scale(1, 1 / ratio);\n\n    mappedMatrix.scale(translateScaleX, translateScaleY);\n\n    mappedMatrix.translate(sprite.anchor.x, sprite.anchor.y);\n\n    return mappedMatrix;\n}\n","import Filter from '../Filter';\nimport { Matrix } from '../../../../math';\nimport { readFileSync } from 'fs';\nimport { join } from 'path';\n\n/**\n * The SpriteMaskFilter class\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI\n */\nexport default class SpriteMaskFilter extends Filter\n{\n    /**\n     * @param {PIXI.Sprite} sprite - the target sprite\n     */\n    constructor(sprite)\n    {\n        const maskMatrix = new Matrix();\n\n        super(\n            readFileSync(join(__dirname, './spriteMaskFilter.vert'), 'utf8'),\n            readFileSync(join(__dirname, './spriteMaskFilter.frag'), 'utf8')\n        );\n\n        sprite.renderable = false;\n\n        this.maskSprite = sprite;\n        this.maskMatrix = maskMatrix;\n    }\n\n    /**\n     * Applies the filter\n     *\n     * @param {PIXI.FilterManager} filterManager - The renderer to retrieve the filter from\n     * @param {PIXI.RenderTarget} input - The input render target.\n     * @param {PIXI.RenderTarget} output - The target to output to.\n     */\n    apply(filterManager, input, output)\n    {\n        const maskSprite = this.maskSprite;\n\n        this.uniforms.mask = maskSprite._texture;\n        this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite);\n        this.uniforms.alpha = maskSprite.worldAlpha;\n\n        filterManager.applyFilter(this, input, output);\n    }\n}\n","import WebGLManager from './WebGLManager';\nimport RenderTarget from '../utils/RenderTarget';\nimport Quad from '../utils/Quad';\nimport { Rectangle } from '../../../math';\nimport Shader from '../../../Shader';\nimport * as filterTransforms from '../filters/filterTransforms';\nimport bitTwiddle from 'bit-twiddle';\n\n/**\n * @ignore\n * @class\n */\nclass FilterState\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        this.renderTarget = null;\n        this.sourceFrame = new Rectangle();\n        this.destinationFrame = new Rectangle();\n        this.filters = [];\n        this.target = null;\n        this.resolution = 1;\n    }\n}\n\n/**\n * @class\n * @memberof PIXI\n * @extends PIXI.WebGLManager\n */\nexport default class FilterManager extends WebGLManager\n{\n    /**\n     * @param {PIXI.WebGLRenderer} renderer - The renderer this manager works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        this.gl = this.renderer.gl;\n        // know about sprites!\n        this.quad = new Quad(this.gl, renderer.state.attribState);\n\n        this.shaderCache = {};\n        // todo add default!\n        this.pool = {};\n\n        this.filterData = null;\n    }\n\n    /**\n     * Adds a new filter to the manager.\n     *\n     * @param {PIXI.DisplayObject} target - The target of the filter to render.\n     * @param {PIXI.Filter[]} filters - The filters to apply.\n     */\n    pushFilter(target, filters)\n    {\n        const renderer = this.renderer;\n\n        let filterData = this.filterData;\n\n        if (!filterData)\n        {\n            filterData = this.renderer._activeRenderTarget.filterStack;\n\n            // add new stack\n            const filterState = new FilterState();\n\n            filterState.sourceFrame = filterState.destinationFrame = this.renderer._activeRenderTarget.size;\n            filterState.renderTarget = renderer._activeRenderTarget;\n\n            this.renderer._activeRenderTarget.filterData = filterData = {\n                index: 0,\n                stack: [filterState],\n            };\n\n            this.filterData = filterData;\n        }\n\n        // get the current filter state..\n        let currentState = filterData.stack[++filterData.index];\n\n        if (!currentState)\n        {\n            currentState = filterData.stack[filterData.index] = new FilterState();\n        }\n\n        // for now we go off the filter of the first resolution..\n        const resolution = filters[0].resolution;\n        const padding = filters[0].padding | 0;\n        const targetBounds = target.filterArea || target.getBounds(true);\n        const sourceFrame = currentState.sourceFrame;\n        const destinationFrame = currentState.destinationFrame;\n\n        sourceFrame.x = ((targetBounds.x * resolution) | 0) / resolution;\n        sourceFrame.y = ((targetBounds.y * resolution) | 0) / resolution;\n        sourceFrame.width = ((targetBounds.width * resolution) | 0) / resolution;\n        sourceFrame.height = ((targetBounds.height * resolution) | 0) / resolution;\n\n        if (filterData.stack[0].renderTarget.transform)\n        { //\n\n            // TODO we should fit the rect around the transform..\n        }\n        else if (filters[0].autoFit)\n        {\n            sourceFrame.fit(filterData.stack[0].destinationFrame);\n        }\n\n        // lets apply the padding After we fit the element to the screen.\n        // this should stop the strange side effects that can occur when cropping to the edges\n        sourceFrame.pad(padding);\n\n        destinationFrame.width = sourceFrame.width;\n        destinationFrame.height = sourceFrame.height;\n\n        // lets play the padding after we fit the element to the screen.\n        // this should stop the strange side effects that can occur when cropping to the edges\n\n        const renderTarget = this.getPotRenderTarget(renderer.gl, sourceFrame.width, sourceFrame.height, resolution);\n\n        currentState.target = target;\n        currentState.filters = filters;\n        currentState.resolution = resolution;\n        currentState.renderTarget = renderTarget;\n\n        // bind the render target to draw the shape in the top corner..\n\n        renderTarget.setFrame(destinationFrame, sourceFrame);\n\n        // bind the render target\n        renderer.bindRenderTarget(renderTarget);\n        renderTarget.clear();\n    }\n\n    /**\n     * Pops off the filter and applies it.\n     *\n     */\n    popFilter()\n    {\n        const filterData = this.filterData;\n\n        const lastState = filterData.stack[filterData.index - 1];\n        const currentState = filterData.stack[filterData.index];\n\n        this.quad.map(currentState.renderTarget.size, currentState.sourceFrame).upload();\n\n        const filters = currentState.filters;\n\n        if (filters.length === 1)\n        {\n            filters[0].apply(this, currentState.renderTarget, lastState.renderTarget, false, currentState);\n            this.freePotRenderTarget(currentState.renderTarget);\n        }\n        else\n        {\n            let flip = currentState.renderTarget;\n            let flop = this.getPotRenderTarget(\n                this.renderer.gl,\n                currentState.sourceFrame.width,\n                currentState.sourceFrame.height,\n                currentState.resolution\n            );\n\n            flop.setFrame(currentState.destinationFrame, currentState.sourceFrame);\n\n            // finally lets clear the render target before drawing to it..\n            flop.clear();\n\n            let i = 0;\n\n            for (i = 0; i < filters.length - 1; ++i)\n            {\n                filters[i].apply(this, flip, flop, true, currentState);\n\n                const t = flip;\n\n                flip = flop;\n                flop = t;\n            }\n\n            filters[i].apply(this, flip, lastState.renderTarget, false, currentState);\n\n            this.freePotRenderTarget(flip);\n            this.freePotRenderTarget(flop);\n        }\n\n        filterData.index--;\n\n        if (filterData.index === 0)\n        {\n            this.filterData = null;\n        }\n    }\n\n    /**\n     * Draws a filter.\n     *\n     * @param {PIXI.Filter} filter - The filter to draw.\n     * @param {PIXI.RenderTarget} input - The input render target.\n     * @param {PIXI.RenderTarget} output - The target to output to.\n     * @param {boolean} clear - Should the output be cleared before rendering to it\n     */\n    applyFilter(filter, input, output, clear)\n    {\n        const renderer = this.renderer;\n        const gl = renderer.gl;\n\n        let shader = filter.glShaders[renderer.CONTEXT_UID];\n\n        // cacheing..\n        if (!shader)\n        {\n            if (filter.glShaderKey)\n            {\n                shader = this.shaderCache[filter.glShaderKey];\n\n                if (!shader)\n                {\n                    shader = new Shader(this.gl, filter.vertexSrc, filter.fragmentSrc);\n\n                    filter.glShaders[renderer.CONTEXT_UID] = this.shaderCache[filter.glShaderKey] = shader;\n                }\n            }\n            else\n            {\n                shader = filter.glShaders[renderer.CONTEXT_UID] = new Shader(this.gl, filter.vertexSrc, filter.fragmentSrc);\n            }\n\n            // TODO - this only needs to be done once?\n            renderer.bindVao(null);\n\n            this.quad.initVao(shader);\n        }\n\n        renderer.bindVao(this.quad.vao);\n\n        renderer.bindRenderTarget(output);\n\n        if (clear)\n        {\n            gl.disable(gl.SCISSOR_TEST);\n            renderer.clear();// [1, 1, 1, 1]);\n            gl.enable(gl.SCISSOR_TEST);\n        }\n\n        // in case the render target is being masked using a scissor rect\n        if (output === renderer.maskManager.scissorRenderTarget)\n        {\n            renderer.maskManager.pushScissorMask(null, renderer.maskManager.scissorData);\n        }\n\n        renderer.bindShader(shader);\n\n        // free unit 0 for us, doesn't matter what was there\n        // don't try to restore it, because syncUniforms can upload it to another slot\n        // and it'll be a problem\n        const tex = this.renderer.emptyTextures[0];\n\n        this.renderer.boundTextures[0] = tex;\n        // this syncs the PixiJS filters  uniforms with glsl uniforms\n        this.syncUniforms(shader, filter);\n\n        renderer.state.setBlendMode(filter.blendMode);\n\n        gl.activeTexture(gl.TEXTURE0);\n        gl.bindTexture(gl.TEXTURE_2D, input.texture.texture);\n\n        this.quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0);\n\n        gl.bindTexture(gl.TEXTURE_2D, tex._glTextures[this.renderer.CONTEXT_UID].texture);\n    }\n\n    /**\n     * Uploads the uniforms of the filter.\n     *\n     * @param {GLShader} shader - The underlying gl shader.\n     * @param {PIXI.Filter} filter - The filter we are synchronizing.\n     */\n    syncUniforms(shader, filter)\n    {\n        const uniformData = filter.uniformData;\n        const uniforms = filter.uniforms;\n\n        // 0 is reserved for the PixiJS texture so we start at 1!\n        let textureCount = 1;\n        let currentState;\n\n        // filterArea and filterClamp that are handled by FilterManager directly\n        // they must not appear in uniformData\n\n        if (shader.uniforms.filterArea)\n        {\n            currentState = this.filterData.stack[this.filterData.index];\n\n            const filterArea = shader.uniforms.filterArea;\n\n            filterArea[0] = currentState.renderTarget.size.width;\n            filterArea[1] = currentState.renderTarget.size.height;\n            filterArea[2] = currentState.sourceFrame.x;\n            filterArea[3] = currentState.sourceFrame.y;\n\n            shader.uniforms.filterArea = filterArea;\n        }\n\n        // use this to clamp displaced texture coords so they belong to filterArea\n        // see displacementFilter fragment shader for an example\n        if (shader.uniforms.filterClamp)\n        {\n            currentState = currentState || this.filterData.stack[this.filterData.index];\n\n            const filterClamp = shader.uniforms.filterClamp;\n\n            filterClamp[0] = 0;\n            filterClamp[1] = 0;\n            filterClamp[2] = (currentState.sourceFrame.width - 1) / currentState.renderTarget.size.width;\n            filterClamp[3] = (currentState.sourceFrame.height - 1) / currentState.renderTarget.size.height;\n\n            shader.uniforms.filterClamp = filterClamp;\n        }\n\n        // TODO Cacheing layer..\n        for (const i in uniformData)\n        {\n            if (uniformData[i].type === 'sampler2D' && uniforms[i] !== 0)\n            {\n                if (uniforms[i].baseTexture)\n                {\n                    shader.uniforms[i] = this.renderer.bindTexture(uniforms[i].baseTexture, textureCount);\n                }\n                else\n                {\n                    shader.uniforms[i] = textureCount;\n\n                    // TODO\n                    // this is helpful as renderTargets can also be set.\n                    // Although thinking about it, we could probably\n                    // make the filter texture cache return a RenderTexture\n                    // rather than a renderTarget\n                    const gl = this.renderer.gl;\n\n                    this.renderer.boundTextures[textureCount] = this.renderer.emptyTextures[textureCount];\n                    gl.activeTexture(gl.TEXTURE0 + textureCount);\n\n                    uniforms[i].texture.bind();\n                }\n\n                textureCount++;\n            }\n            else if (uniformData[i].type === 'mat3')\n            {\n                // check if its PixiJS matrix..\n                if (uniforms[i].a !== undefined)\n                {\n                    shader.uniforms[i] = uniforms[i].toArray(true);\n                }\n                else\n                {\n                    shader.uniforms[i] = uniforms[i];\n                }\n            }\n            else if (uniformData[i].type === 'vec2')\n            {\n                // check if its a point..\n                if (uniforms[i].x !== undefined)\n               {\n                    const val = shader.uniforms[i] || new Float32Array(2);\n\n                    val[0] = uniforms[i].x;\n                    val[1] = uniforms[i].y;\n                    shader.uniforms[i] = val;\n                }\n                else\n               {\n                    shader.uniforms[i] = uniforms[i];\n                }\n            }\n            else if (uniformData[i].type === 'float')\n            {\n                if (shader.uniforms.data[i].value !== uniformData[i])\n                {\n                    shader.uniforms[i] = uniforms[i];\n                }\n            }\n            else\n            {\n                shader.uniforms[i] = uniforms[i];\n            }\n        }\n    }\n\n    /**\n     * Gets a render target from the pool, or creates a new one.\n     *\n     * @param {boolean} clear - Should we clear the render texture when we get it?\n     * @param {number} resolution - The resolution of the target.\n     * @return {PIXI.RenderTarget} The new render target\n     */\n    getRenderTarget(clear, resolution)\n    {\n        const currentState = this.filterData.stack[this.filterData.index];\n        const renderTarget = this.getPotRenderTarget(\n            this.renderer.gl,\n            currentState.sourceFrame.width,\n            currentState.sourceFrame.height,\n            resolution || currentState.resolution\n        );\n\n        renderTarget.setFrame(currentState.destinationFrame, currentState.sourceFrame);\n\n        return renderTarget;\n    }\n\n    /**\n     * Returns a render target to the pool.\n     *\n     * @param {PIXI.RenderTarget} renderTarget - The render target to return.\n     */\n    returnRenderTarget(renderTarget)\n    {\n        this.freePotRenderTarget(renderTarget);\n    }\n\n    /**\n     * Calculates the mapped matrix.\n     *\n     * TODO playing around here.. this is temporary - (will end up in the shader)\n     * this returns a matrix that will normalise map filter cords in the filter to screen space\n     *\n     * @param {PIXI.Matrix} outputMatrix - the matrix to output to.\n     * @return {PIXI.Matrix} The mapped matrix.\n     */\n    calculateScreenSpaceMatrix(outputMatrix)\n    {\n        const currentState = this.filterData.stack[this.filterData.index];\n\n        return filterTransforms.calculateScreenSpaceMatrix(\n            outputMatrix,\n            currentState.sourceFrame,\n            currentState.renderTarget.size\n        );\n    }\n\n    /**\n     * Multiply vTextureCoord to this matrix to achieve (0,0,1,1) for filterArea\n     *\n     * @param {PIXI.Matrix} outputMatrix - The matrix to output to.\n     * @return {PIXI.Matrix} The mapped matrix.\n     */\n    calculateNormalizedScreenSpaceMatrix(outputMatrix)\n    {\n        const currentState = this.filterData.stack[this.filterData.index];\n\n        return filterTransforms.calculateNormalizedScreenSpaceMatrix(\n            outputMatrix,\n            currentState.sourceFrame,\n            currentState.renderTarget.size,\n            currentState.destinationFrame\n        );\n    }\n\n    /**\n     * This will map the filter coord so that a texture can be used based on the transform of a sprite\n     *\n     * @param {PIXI.Matrix} outputMatrix - The matrix to output to.\n     * @param {PIXI.Sprite} sprite - The sprite to map to.\n     * @return {PIXI.Matrix} The mapped matrix.\n     */\n    calculateSpriteMatrix(outputMatrix, sprite)\n    {\n        const currentState = this.filterData.stack[this.filterData.index];\n\n        return filterTransforms.calculateSpriteMatrix(\n            outputMatrix,\n            currentState.sourceFrame,\n            currentState.renderTarget.size,\n            sprite\n        );\n    }\n\n    /**\n     * Destroys this Filter Manager.\n     *\n     */\n    destroy()\n    {\n        this.shaderCache = {};\n        this.emptyPool();\n    }\n\n    /**\n     * Gets a Power-of-Two render texture.\n     *\n     * TODO move to a seperate class could be on renderer?\n     * also - could cause issue with multiple contexts?\n     *\n     * @private\n     * @param {WebGLRenderingContext} gl - The webgl rendering context\n     * @param {number} minWidth - The minimum width of the render target.\n     * @param {number} minHeight - The minimum height of the render target.\n     * @param {number} resolution - The resolution of the render target.\n     * @return {PIXI.RenderTarget} The new render target.\n     */\n    getPotRenderTarget(gl, minWidth, minHeight, resolution)\n    {\n        // TODO you could return a bigger texture if there is not one in the pool?\n        minWidth = bitTwiddle.nextPow2(minWidth * resolution);\n        minHeight = bitTwiddle.nextPow2(minHeight * resolution);\n\n        const key = ((minWidth & 0xFFFF) << 16) | (minHeight & 0xFFFF);\n\n        if (!this.pool[key])\n        {\n            this.pool[key] = [];\n        }\n\n        let renderTarget = this.pool[key].pop();\n\n        // creating render target will cause texture to be bound!\n        if (!renderTarget)\n        {\n            // temporary bypass cache..\n            const tex = this.renderer.boundTextures[0];\n\n            gl.activeTexture(gl.TEXTURE0);\n\n            // internally - this will cause a texture to be bound..\n            renderTarget = new RenderTarget(gl, minWidth, minHeight, null, 1);\n\n            // set the current one back\n            gl.bindTexture(gl.TEXTURE_2D, tex._glTextures[this.renderer.CONTEXT_UID].texture);\n        }\n\n        // manually tweak the resolution...\n        // this will not modify the size of the frame buffer, just its resolution.\n        renderTarget.resolution = resolution;\n        renderTarget.defaultFrame.width = renderTarget.size.width = minWidth / resolution;\n        renderTarget.defaultFrame.height = renderTarget.size.height = minHeight / resolution;\n\n        return renderTarget;\n    }\n\n    /**\n     * Empties the texture pool.\n     *\n     */\n    emptyPool()\n    {\n        for (const i in this.pool)\n        {\n            const textures = this.pool[i];\n\n            if (textures)\n            {\n                for (let j = 0; j < textures.length; j++)\n                {\n                    textures[j].destroy(true);\n                }\n            }\n        }\n\n        this.pool = {};\n    }\n\n    /**\n     * Frees a render target back into the pool.\n     *\n     * @param {PIXI.RenderTarget} renderTarget - The renderTarget to free\n     */\n    freePotRenderTarget(renderTarget)\n    {\n        const minWidth = renderTarget.size.width * renderTarget.resolution;\n        const minHeight = renderTarget.size.height * renderTarget.resolution;\n        const key = ((minWidth & 0xFFFF) << 16) | (minHeight & 0xFFFF);\n\n        this.pool[key].push(renderTarget);\n    }\n}\n","import WebGLManager from './WebGLManager';\nimport AlphaMaskFilter from '../filters/spriteMask/SpriteMaskFilter';\n\n/**\n * @class\n * @extends PIXI.WebGLManager\n * @memberof PIXI\n */\nexport default class MaskManager extends WebGLManager\n{\n    /**\n     * @param {PIXI.WebGLRenderer} renderer - The renderer this manager works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        // TODO - we don't need both!\n        this.scissor = false;\n        this.scissorData = null;\n        this.scissorRenderTarget = null;\n\n        this.enableScissor = true;\n\n        this.alphaMaskPool = [];\n        this.alphaMaskIndex = 0;\n    }\n\n    /**\n     * Applies the Mask and adds it to the current filter stack.\n     *\n     * @param {PIXI.DisplayObject} target - Display Object to push the mask to\n     * @param {PIXI.Sprite|PIXI.Graphics} maskData - The masking data.\n     */\n    pushMask(target, maskData)\n    {\n        // TODO the root check means scissor rect will not\n        // be used on render textures more info here:\n        // https://github.com/pixijs/pixi.js/pull/3545\n\n        if (maskData.texture)\n        {\n            this.pushSpriteMask(target, maskData);\n        }\n        else if (this.enableScissor\n            && !this.scissor\n            && this.renderer._activeRenderTarget.root\n            && !this.renderer.stencilManager.stencilMaskStack.length\n            && maskData.isFastRect())\n        {\n            const matrix = maskData.worldTransform;\n\n            let rot = Math.atan2(matrix.b, matrix.a);\n\n            // use the nearest degree!\n            rot = Math.round(rot * (180 / Math.PI));\n\n            if (rot % 90)\n            {\n                this.pushStencilMask(maskData);\n            }\n            else\n            {\n                this.pushScissorMask(target, maskData);\n            }\n        }\n        else\n        {\n            this.pushStencilMask(maskData);\n        }\n    }\n\n    /**\n     * Removes the last mask from the mask stack and doesn't return it.\n     *\n     * @param {PIXI.DisplayObject} target - Display Object to pop the mask from\n     * @param {PIXI.Sprite|PIXI.Graphics} maskData - The masking data.\n     */\n    popMask(target, maskData)\n    {\n        if (maskData.texture)\n        {\n            this.popSpriteMask(target, maskData);\n        }\n        else if (this.enableScissor && !this.renderer.stencilManager.stencilMaskStack.length)\n        {\n            this.popScissorMask(target, maskData);\n        }\n        else\n        {\n            this.popStencilMask(target, maskData);\n        }\n    }\n\n    /**\n     * Applies the Mask and adds it to the current filter stack.\n     *\n     * @param {PIXI.RenderTarget} target - Display Object to push the sprite mask to\n     * @param {PIXI.Sprite} maskData - Sprite to be used as the mask\n     */\n    pushSpriteMask(target, maskData)\n    {\n        let alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex];\n\n        if (!alphaMaskFilter)\n        {\n            alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex] = [new AlphaMaskFilter(maskData)];\n        }\n\n        alphaMaskFilter[0].resolution = this.renderer.resolution;\n        alphaMaskFilter[0].maskSprite = maskData;\n\n        // TODO - may cause issues!\n        target.filterArea = maskData.getBounds(true);\n\n        this.renderer.filterManager.pushFilter(target, alphaMaskFilter);\n\n        this.alphaMaskIndex++;\n    }\n\n    /**\n     * Removes the last filter from the filter stack and doesn't return it.\n     *\n     */\n    popSpriteMask()\n    {\n        this.renderer.filterManager.popFilter();\n        this.alphaMaskIndex--;\n    }\n\n    /**\n     * Applies the Mask and adds it to the current filter stack.\n     *\n     * @param {PIXI.Sprite|PIXI.Graphics} maskData - The masking data.\n     */\n    pushStencilMask(maskData)\n    {\n        this.renderer.currentRenderer.stop();\n        this.renderer.stencilManager.pushStencil(maskData);\n    }\n\n    /**\n     * Removes the last filter from the filter stack and doesn't return it.\n     *\n     */\n    popStencilMask()\n    {\n        this.renderer.currentRenderer.stop();\n        this.renderer.stencilManager.popStencil();\n    }\n\n    /**\n     *\n     * @param {PIXI.DisplayObject} target - Display Object to push the mask to\n     * @param {PIXI.Graphics} maskData - The masking data.\n     */\n    pushScissorMask(target, maskData)\n    {\n        maskData.renderable = true;\n\n        const renderTarget = this.renderer._activeRenderTarget;\n\n        const bounds = maskData.getBounds();\n\n        bounds.fit(renderTarget.size);\n        maskData.renderable = false;\n\n        this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);\n\n        const resolution = this.renderer.resolution;\n\n        this.renderer.gl.scissor(\n            bounds.x * resolution,\n            (renderTarget.root ? renderTarget.size.height - bounds.y - bounds.height : bounds.y) * resolution,\n            bounds.width * resolution,\n            bounds.height * resolution\n        );\n\n        this.scissorRenderTarget = renderTarget;\n        this.scissorData = maskData;\n        this.scissor = true;\n    }\n\n    /**\n     *\n     *\n     */\n    popScissorMask()\n    {\n        this.scissorRenderTarget = null;\n        this.scissorData = null;\n        this.scissor = false;\n\n        // must be scissor!\n        const gl = this.renderer.gl;\n\n        gl.disable(gl.SCISSOR_TEST);\n    }\n}\n","import WebGLManager from './WebGLManager';\n\n/**\n * @class\n * @extends PIXI.WebGLManager\n * @memberof PIXI\n */\nexport default class StencilManager extends WebGLManager\n{\n    /**\n     * @param {PIXI.WebGLRenderer} renderer - The renderer this manager works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n        this.stencilMaskStack = null;\n    }\n\n    /**\n     * Changes the mask stack that is used by this manager.\n     *\n     * @param {PIXI.Graphics[]} stencilMaskStack - The mask stack\n     */\n    setMaskStack(stencilMaskStack)\n    {\n        this.stencilMaskStack = stencilMaskStack;\n\n        const gl = this.renderer.gl;\n\n        if (stencilMaskStack.length === 0)\n        {\n            gl.disable(gl.STENCIL_TEST);\n        }\n        else\n        {\n            gl.enable(gl.STENCIL_TEST);\n        }\n    }\n\n    /**\n     * Applies the Mask and adds it to the current stencil stack. @alvin\n     *\n     * @param {PIXI.Graphics} graphics - The mask\n     */\n    pushStencil(graphics)\n    {\n        this.renderer.setObjectRenderer(this.renderer.plugins.graphics);\n\n        this.renderer._activeRenderTarget.attachStencilBuffer();\n\n        const gl = this.renderer.gl;\n        const prevMaskCount = this.stencilMaskStack.length;\n\n        if (prevMaskCount === 0)\n        {\n            gl.enable(gl.STENCIL_TEST);\n        }\n\n        this.stencilMaskStack.push(graphics);\n\n        // Increment the refference stencil value where the new mask overlaps with the old ones.\n        gl.colorMask(false, false, false, false);\n        gl.stencilFunc(gl.EQUAL, prevMaskCount, this._getBitwiseMask());\n        gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\n        this.renderer.plugins.graphics.render(graphics);\n\n        this._useCurrent();\n    }\n\n    /**\n     * Removes the last mask from the stencil stack. @alvin\n     */\n    popStencil()\n    {\n        this.renderer.setObjectRenderer(this.renderer.plugins.graphics);\n\n        const gl = this.renderer.gl;\n        const graphics = this.stencilMaskStack.pop();\n\n        if (this.stencilMaskStack.length === 0)\n        {\n            // the stack is empty!\n            gl.disable(gl.STENCIL_TEST);\n            gl.clear(gl.STENCIL_BUFFER_BIT);\n            gl.clearStencil(0);\n        }\n        else\n        {\n            // Decrement the refference stencil value where the popped mask overlaps with the other ones\n            gl.colorMask(false, false, false, false);\n            gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\n            this.renderer.plugins.graphics.render(graphics);\n\n            this._useCurrent();\n        }\n    }\n\n    /**\n     * Setup renderer to use the current stencil data.\n     */\n    _useCurrent()\n    {\n        const gl = this.renderer.gl;\n\n        gl.colorMask(true, true, true, true);\n        gl.stencilFunc(gl.EQUAL, this.stencilMaskStack.length, this._getBitwiseMask());\n        gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\n    }\n\n    /**\n     * Fill 1s equal to the number of acitve stencil masks.\n     *\n     * @return {number} The bitwise mask.\n     */\n    _getBitwiseMask()\n    {\n        return (1 << this.stencilMaskStack.length) - 1;\n    }\n\n    /**\n     * Destroys the mask stack.\n     *\n     */\n    destroy()\n    {\n        WebGLManager.prototype.destroy.call(this);\n\n        this.stencilMaskStack.stencilStack = null;\n    }\n}\n","/**\n * @class\n * @memberof PIXI\n */\nexport default class WebGLManager\n{\n    /**\n     * @param {PIXI.WebGLRenderer} renderer - The renderer this manager works for.\n     */\n    constructor(renderer)\n    {\n        /**\n         * The renderer this manager works for.\n         *\n         * @member {PIXI.WebGLRenderer}\n         */\n        this.renderer = renderer;\n\n        this.renderer.on('context', this.onContextChange, this);\n    }\n\n    /**\n     * Generic method called when there is a WebGL context change.\n     *\n     */\n    onContextChange()\n    {\n        // do some codes init!\n    }\n\n    /**\n     * Generic destroy methods to be overridden by the subclass\n     *\n     */\n    destroy()\n    {\n        this.renderer.off('context', this.onContextChange, this);\n\n        this.renderer = null;\n    }\n}\n","import WebGLManager from '../managers/WebGLManager';\n\n/**\n * Base for a common object renderer that can be used as a system renderer plugin.\n *\n * @class\n * @extends PIXI.WebGLManager\n * @memberof PIXI\n */\nexport default class ObjectRenderer extends WebGLManager\n{\n    /**\n     * Starts the renderer and sets the shader\n     *\n     */\n    start()\n    {\n        // set the shader..\n    }\n\n    /**\n     * Stops the renderer\n     *\n     */\n    stop()\n    {\n        this.flush();\n    }\n\n    /**\n     * Stub method for rendering content and emptying the current batch.\n     *\n     */\n    flush()\n    {\n        // flush!\n    }\n\n    /**\n     * Renders an object\n     *\n     * @param {PIXI.DisplayObject} object - The object to render.\n     */\n    render(object) // eslint-disable-line no-unused-vars\n    {\n        // render the object\n    }\n}\n","import glCore from 'pixi-gl-core';\nimport createIndicesForQuads from '../../../utils/createIndicesForQuads';\n\n/**\n * Helper class to create a quad\n *\n * @class\n * @memberof PIXI\n */\nexport default class Quad\n{\n    /**\n     * @param {WebGLRenderingContext} gl - The gl context for this quad to use.\n     * @param {object} state - TODO: Description\n     */\n    constructor(gl, state)\n    {\n        /**\n         * the current WebGL drawing context\n         *\n         * @member {WebGLRenderingContext}\n         */\n        this.gl = gl;\n\n        /**\n         * An array of vertices\n         *\n         * @member {Float32Array}\n         */\n        this.vertices = new Float32Array([\n            -1, -1,\n            1, -1,\n            1, 1,\n            -1, 1,\n        ]);\n\n        /**\n         * The Uvs of the quad\n         *\n         * @member {Float32Array}\n         */\n        this.uvs = new Float32Array([\n            0, 0,\n            1, 0,\n            1, 1,\n            0, 1,\n        ]);\n\n        this.interleaved = new Float32Array(8 * 2);\n\n        for (let i = 0; i < 4; i++)\n        {\n            this.interleaved[i * 4] = this.vertices[(i * 2)];\n            this.interleaved[(i * 4) + 1] = this.vertices[(i * 2) + 1];\n            this.interleaved[(i * 4) + 2] = this.uvs[i * 2];\n            this.interleaved[(i * 4) + 3] = this.uvs[(i * 2) + 1];\n        }\n\n        /**\n         * An array containing the indices of the vertices\n         *\n         * @member {Uint16Array}\n         */\n        this.indices = createIndicesForQuads(1);\n\n        /**\n         * The vertex buffer\n         *\n         * @member {glCore.GLBuffer}\n         */\n        this.vertexBuffer = glCore.GLBuffer.createVertexBuffer(gl, this.interleaved, gl.STATIC_DRAW);\n\n        /**\n         * The index buffer\n         *\n         * @member {glCore.GLBuffer}\n         */\n        this.indexBuffer = glCore.GLBuffer.createIndexBuffer(gl, this.indices, gl.STATIC_DRAW);\n\n        /**\n         * The vertex array object\n         *\n         * @member {glCore.VertexArrayObject}\n         */\n        this.vao = new glCore.VertexArrayObject(gl, state);\n    }\n\n    /**\n     * Initialises the vaos and uses the shader.\n     *\n     * @param {PIXI.Shader} shader - the shader to use\n     */\n    initVao(shader)\n    {\n        this.vao.clear()\n        .addIndex(this.indexBuffer)\n        .addAttribute(this.vertexBuffer, shader.attributes.aVertexPosition, this.gl.FLOAT, false, 4 * 4, 0)\n        .addAttribute(this.vertexBuffer, shader.attributes.aTextureCoord, this.gl.FLOAT, false, 4 * 4, 2 * 4);\n    }\n\n    /**\n     * Maps two Rectangle to the quad.\n     *\n     * @param {PIXI.Rectangle} targetTextureFrame - the first rectangle\n     * @param {PIXI.Rectangle} destinationFrame - the second rectangle\n     * @return {PIXI.Quad} Returns itself.\n     */\n    map(targetTextureFrame, destinationFrame)\n    {\n        let x = 0; // destinationFrame.x / targetTextureFrame.width;\n        let y = 0; // destinationFrame.y / targetTextureFrame.height;\n\n        this.uvs[0] = x;\n        this.uvs[1] = y;\n\n        this.uvs[2] = x + (destinationFrame.width / targetTextureFrame.width);\n        this.uvs[3] = y;\n\n        this.uvs[4] = x + (destinationFrame.width / targetTextureFrame.width);\n        this.uvs[5] = y + (destinationFrame.height / targetTextureFrame.height);\n\n        this.uvs[6] = x;\n        this.uvs[7] = y + (destinationFrame.height / targetTextureFrame.height);\n\n        x = destinationFrame.x;\n        y = destinationFrame.y;\n\n        this.vertices[0] = x;\n        this.vertices[1] = y;\n\n        this.vertices[2] = x + destinationFrame.width;\n        this.vertices[3] = y;\n\n        this.vertices[4] = x + destinationFrame.width;\n        this.vertices[5] = y + destinationFrame.height;\n\n        this.vertices[6] = x;\n        this.vertices[7] = y + destinationFrame.height;\n\n        return this;\n    }\n\n    /**\n     * Binds the buffer and uploads the data\n     *\n     * @return {PIXI.Quad} Returns itself.\n     */\n    upload()\n    {\n        for (let i = 0; i < 4; i++)\n        {\n            this.interleaved[i * 4] = this.vertices[(i * 2)];\n            this.interleaved[(i * 4) + 1] = this.vertices[(i * 2) + 1];\n            this.interleaved[(i * 4) + 2] = this.uvs[i * 2];\n            this.interleaved[(i * 4) + 3] = this.uvs[(i * 2) + 1];\n        }\n\n        this.vertexBuffer.upload(this.interleaved);\n\n        return this;\n    }\n\n    /**\n     * Removes this quad from WebGL\n     */\n    destroy()\n    {\n        const gl = this.gl;\n\n        gl.deleteBuffer(this.vertexBuffer);\n        gl.deleteBuffer(this.indexBuffer);\n    }\n}\n","import { Rectangle, Matrix } from '../../../math';\nimport { SCALE_MODES } from '../../../const';\nimport settings from '../../../settings';\nimport { GLFramebuffer } from 'pixi-gl-core';\n\n/**\n * @class\n * @memberof PIXI\n */\nexport default class RenderTarget\n{\n    /**\n     * @param {WebGLRenderingContext} gl - The current WebGL drawing context\n     * @param {number} [width=0] - the horizontal range of the filter\n     * @param {number} [height=0] - the vertical range of the filter\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     * @param {number} [resolution=1] - The current resolution / device pixel ratio\n     * @param {boolean} [root=false] - Whether this object is the root element or not\n     */\n    constructor(gl, width, height, scaleMode, resolution, root)\n    {\n        // TODO Resolution could go here ( eg low res blurs )\n\n        /**\n         * The current WebGL drawing context.\n         *\n         * @member {WebGLRenderingContext}\n         */\n        this.gl = gl;\n\n        // next time to create a frame buffer and texture\n\n        /**\n         * A frame buffer\n         *\n         * @member {PIXI.glCore.GLFramebuffer}\n         */\n        this.frameBuffer = null;\n\n        /**\n         * The texture\n         *\n         * @member {PIXI.glCore.GLTexture}\n         */\n        this.texture = null;\n\n        /**\n         * The background colour of this render target, as an array of [r,g,b,a] values\n         *\n         * @member {number[]}\n         */\n        this.clearColor = [0, 0, 0, 0];\n\n        /**\n         * The size of the object as a rectangle\n         *\n         * @member {PIXI.Rectangle}\n         */\n        this.size = new Rectangle(0, 0, 1, 1);\n\n        /**\n         * The current resolution / device pixel ratio\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.resolution = resolution || settings.RESOLUTION;\n\n        /**\n         * The projection matrix\n         *\n         * @member {PIXI.Matrix}\n         */\n        this.projectionMatrix = new Matrix();\n\n        /**\n         * The object's transform\n         *\n         * @member {PIXI.Matrix}\n         */\n        this.transform = null;\n\n        /**\n         * The frame.\n         *\n         * @member {PIXI.Rectangle}\n         */\n        this.frame = null;\n\n        /**\n         * The stencil buffer stores masking data for the render target\n         *\n         * @member {glCore.GLBuffer}\n         */\n        this.defaultFrame = new Rectangle();\n        this.destinationFrame = null;\n        this.sourceFrame = null;\n\n        /**\n         * The stencil buffer stores masking data for the render target\n         *\n         * @member {glCore.GLBuffer}\n         */\n        this.stencilBuffer = null;\n\n        /**\n         * The data structure for the stencil masks\n         *\n         * @member {PIXI.Graphics[]}\n         */\n        this.stencilMaskStack = [];\n\n        /**\n         * Stores filter data for the render target\n         *\n         * @member {object[]}\n         */\n        this.filterData = null;\n\n        /**\n         * The scale mode.\n         *\n         * @member {number}\n         * @default PIXI.settings.SCALE_MODE\n         * @see PIXI.SCALE_MODES\n         */\n        this.scaleMode = scaleMode !== undefined ? scaleMode : settings.SCALE_MODE;\n\n        /**\n         * Whether this object is the root element or not\n         *\n         * @member {boolean}\n         */\n        this.root = root;\n\n        if (!this.root)\n        {\n            this.frameBuffer = GLFramebuffer.createRGBA(gl, 100, 100);\n\n            if (this.scaleMode === SCALE_MODES.NEAREST)\n            {\n                this.frameBuffer.texture.enableNearestScaling();\n            }\n            else\n            {\n                this.frameBuffer.texture.enableLinearScaling();\n            }\n            /*\n                A frame buffer needs a target to render to..\n                create a texture and bind it attach it to the framebuffer..\n             */\n\n            // this is used by the base texture\n            this.texture = this.frameBuffer.texture;\n        }\n        else\n        {\n            // make it a null framebuffer..\n            this.frameBuffer = new GLFramebuffer(gl, 100, 100);\n            this.frameBuffer.framebuffer = null;\n        }\n\n        this.setFrame();\n\n        this.resize(width, height);\n    }\n\n    /**\n     * Clears the filter texture.\n     *\n     * @param {number[]} [clearColor=this.clearColor] - Array of [r,g,b,a] to clear the framebuffer\n     */\n    clear(clearColor)\n    {\n        const cc = clearColor || this.clearColor;\n\n        this.frameBuffer.clear(cc[0], cc[1], cc[2], cc[3]);// r,g,b,a);\n    }\n\n    /**\n     * Binds the stencil buffer.\n     *\n     */\n    attachStencilBuffer()\n    {\n        // TODO check if stencil is done?\n        /**\n         * The stencil buffer is used for masking in pixi\n         * lets create one and then add attach it to the framebuffer..\n         */\n        if (!this.root)\n        {\n            this.frameBuffer.enableStencil();\n        }\n    }\n\n    /**\n     * Sets the frame of the render target.\n     *\n     * @param {Rectangle} destinationFrame - The destination frame.\n     * @param {Rectangle} sourceFrame - The source frame.\n     */\n    setFrame(destinationFrame, sourceFrame)\n    {\n        this.destinationFrame = destinationFrame || this.destinationFrame || this.defaultFrame;\n        this.sourceFrame = sourceFrame || this.sourceFrame || this.destinationFrame;\n    }\n\n    /**\n     * Binds the buffers and initialises the viewport.\n     *\n     */\n    activate()\n    {\n        // TOOD refactor usage of frame..\n        const gl = this.gl;\n\n        // make sure the texture is unbound!\n        this.frameBuffer.bind();\n\n        this.calculateProjection(this.destinationFrame, this.sourceFrame);\n\n        if (this.transform)\n        {\n            this.projectionMatrix.append(this.transform);\n        }\n\n        // TODO add a check as them may be the same!\n        if (this.destinationFrame !== this.sourceFrame)\n        {\n            gl.enable(gl.SCISSOR_TEST);\n            gl.scissor(\n                this.destinationFrame.x | 0,\n                this.destinationFrame.y | 0,\n                (this.destinationFrame.width * this.resolution) | 0,\n                (this.destinationFrame.height * this.resolution) | 0\n            );\n        }\n        else\n        {\n            gl.disable(gl.SCISSOR_TEST);\n        }\n\n        // TODO - does not need to be updated all the time??\n        gl.viewport(\n            this.destinationFrame.x | 0,\n            this.destinationFrame.y | 0,\n            (this.destinationFrame.width * this.resolution) | 0,\n            (this.destinationFrame.height * this.resolution) | 0\n        );\n    }\n\n    /**\n     * Updates the projection matrix based on a projection frame (which is a rectangle)\n     *\n     * @param {Rectangle} destinationFrame - The destination frame.\n     * @param {Rectangle} sourceFrame - The source frame.\n     */\n    calculateProjection(destinationFrame, sourceFrame)\n    {\n        const pm = this.projectionMatrix;\n\n        sourceFrame = sourceFrame || destinationFrame;\n\n        pm.identity();\n\n        // TODO: make dest scale source\n        if (!this.root)\n        {\n            pm.a = 1 / destinationFrame.width * 2;\n            pm.d = 1 / destinationFrame.height * 2;\n\n            pm.tx = -1 - (sourceFrame.x * pm.a);\n            pm.ty = -1 - (sourceFrame.y * pm.d);\n        }\n        else\n        {\n            pm.a = 1 / destinationFrame.width * 2;\n            pm.d = -1 / destinationFrame.height * 2;\n\n            pm.tx = -1 - (sourceFrame.x * pm.a);\n            pm.ty = 1 - (sourceFrame.y * pm.d);\n        }\n    }\n\n    /**\n     * Resizes the texture to the specified width and height\n     *\n     * @param {number} width - the new width of the texture\n     * @param {number} height - the new height of the texture\n     */\n    resize(width, height)\n    {\n        width = width | 0;\n        height = height | 0;\n\n        if (this.size.width === width && this.size.height === height)\n        {\n            return;\n        }\n\n        this.size.width = width;\n        this.size.height = height;\n\n        this.defaultFrame.width = width;\n        this.defaultFrame.height = height;\n\n        this.frameBuffer.resize(width * this.resolution, height * this.resolution);\n\n        const projectionFrame = this.frame || this.size;\n\n        this.calculateProjection(projectionFrame);\n    }\n\n    /**\n     * Destroys the render target.\n     *\n     */\n    destroy()\n    {\n        this.frameBuffer.destroy();\n\n        this.frameBuffer = null;\n        this.texture = null;\n    }\n}\n","import glCore from 'pixi-gl-core';\n\nconst fragTemplate = [\n    'precision mediump float;',\n    'void main(void){',\n    'float test = 0.1;',\n    '%forloop%',\n    'gl_FragColor = vec4(0.0);',\n    '}',\n].join('\\n');\n\nexport default function checkMaxIfStatmentsInShader(maxIfs, gl)\n{\n    const createTempContext = !gl;\n\n    // @if DEBUG\n    if (maxIfs === 0)\n    {\n        throw new Error('Invalid value of `0` passed to `checkMaxIfStatementsInShader`');\n    }\n    // @endif\n\n    if (createTempContext)\n    {\n        const tinyCanvas = document.createElement('canvas');\n\n        tinyCanvas.width = 1;\n        tinyCanvas.height = 1;\n\n        gl = glCore.createContext(tinyCanvas);\n    }\n\n    const shader = gl.createShader(gl.FRAGMENT_SHADER);\n\n    while (true) // eslint-disable-line no-constant-condition\n    {\n        const fragmentSrc = fragTemplate.replace(/%forloop%/gi, generateIfTestSrc(maxIfs));\n\n        gl.shaderSource(shader, fragmentSrc);\n        gl.compileShader(shader);\n\n        if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS))\n        {\n            maxIfs = (maxIfs / 2) | 0;\n        }\n        else\n        {\n            // valid!\n            break;\n        }\n    }\n\n    if (createTempContext)\n    {\n        // get rid of context\n        if (gl.getExtension('WEBGL_lose_context'))\n        {\n            gl.getExtension('WEBGL_lose_context').loseContext();\n        }\n    }\n\n    return maxIfs;\n}\n\nfunction generateIfTestSrc(maxIfs)\n{\n    let src = '';\n\n    for (let i = 0; i < maxIfs; ++i)\n    {\n        if (i > 0)\n        {\n            src += '\\nelse ';\n        }\n\n        if (i < maxIfs - 1)\n        {\n            src += `if(test == ${i}.0){}`;\n        }\n    }\n\n    return src;\n}\n","import { BLEND_MODES } from '../../../const';\n\n/**\n * Maps gl blend combinations to WebGL.\n *\n * @memberof PIXI\n * @function mapWebGLBlendModesToPixi\n * @private\n * @param {WebGLRenderingContext} gl - The rendering context.\n * @param {string[]} [array=[]] - The array to output into.\n * @return {string[]} Mapped modes.\n */\nexport default function mapWebGLBlendModesToPixi(gl, array = [])\n{\n    // TODO - premultiply alpha would be different.\n    // add a boolean for that!\n    array[BLEND_MODES.NORMAL] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.ADD] = [gl.ONE, gl.DST_ALPHA];\n    array[BLEND_MODES.MULTIPLY] = [gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.SCREEN] = [gl.ONE, gl.ONE_MINUS_SRC_COLOR];\n    array[BLEND_MODES.OVERLAY] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.DARKEN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.LIGHTEN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.COLOR_DODGE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.COLOR_BURN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.HARD_LIGHT] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.SOFT_LIGHT] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.DIFFERENCE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.EXCLUSION] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.HUE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.SATURATION] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.COLOR] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.LUMINOSITY] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n\n    // not-premultiplied blend modes\n    array[BLEND_MODES.NORMAL_NPM] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n    array[BLEND_MODES.ADD_NPM] = [gl.SRC_ALPHA, gl.DST_ALPHA, gl.ONE, gl.DST_ALPHA];\n    array[BLEND_MODES.SCREEN_NPM] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_COLOR, gl.ONE, gl.ONE_MINUS_SRC_COLOR];\n\n    return array;\n}\n","import { DRAW_MODES } from '../../../const';\n\n/**\n * Generic Mask Stack data structure.\n *\n * @memberof PIXI\n * @function mapWebGLDrawModesToPixi\n * @private\n * @param {WebGLRenderingContext} gl - The current WebGL drawing context\n * @param {object} [object={}] - The object to map into\n * @return {object} The mapped draw modes.\n */\nexport default function mapWebGLDrawModesToPixi(gl, object = {})\n{\n    object[DRAW_MODES.POINTS] = gl.POINTS;\n    object[DRAW_MODES.LINES] = gl.LINES;\n    object[DRAW_MODES.LINE_LOOP] = gl.LINE_LOOP;\n    object[DRAW_MODES.LINE_STRIP] = gl.LINE_STRIP;\n    object[DRAW_MODES.TRIANGLES] = gl.TRIANGLES;\n    object[DRAW_MODES.TRIANGLE_STRIP] = gl.TRIANGLE_STRIP;\n    object[DRAW_MODES.TRIANGLE_FAN] = gl.TRIANGLE_FAN;\n\n    return object;\n}\n","export default function validateContext(gl)\n{\n    const attributes = gl.getContextAttributes();\n\n    // this is going to be fairly simple for now.. but at least we have room to grow!\n    if (!attributes.stencil)\n    {\n        /* eslint-disable no-console */\n        console.warn('Provided WebGL context does not have a stencil buffer, masks may not render correctly');\n        /* eslint-enable no-console */\n    }\n}\n","import maxRecommendedTextures from './utils/maxRecommendedTextures';\nimport canUploadSameBuffer from './utils/canUploadSameBuffer';\n\n/**\n * User's customizable globals for overriding the default PIXI settings, such\n * as a renderer's default resolution, framerate, float percision, etc.\n * @example\n * // Use the native window resolution as the default resolution\n * // will support high-density displays when rendering\n * PIXI.settings.RESOLUTION = window.devicePixelRatio.\n *\n * // Disable interpolation when scaling, will make texture be pixelated\n * PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;\n * @namespace PIXI.settings\n */\nexport default {\n\n    /**\n     * Target frames per millisecond.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 0.06\n     */\n    TARGET_FPMS: 0.06,\n\n    /**\n     * If set to true WebGL will attempt make textures mimpaped by default.\n     * Mipmapping will only succeed if the base texture uploaded has power of two dimensions.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {boolean}\n     * @default true\n     */\n    MIPMAP_TEXTURES: true,\n\n    /**\n     * Default resolution / device pixel ratio of the renderer.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 1\n     */\n    RESOLUTION: 1,\n\n    /**\n     * Default filter resolution.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 1\n     */\n    FILTER_RESOLUTION: 1,\n\n    /**\n     * The maximum textures that this device supports.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 32\n     */\n    SPRITE_MAX_TEXTURES: maxRecommendedTextures(32),\n\n    // TODO: maybe change to SPRITE.BATCH_SIZE: 2000\n    // TODO: maybe add PARTICLE.BATCH_SIZE: 15000\n\n    /**\n     * The default sprite batch size.\n     *\n     * The default aims to balance desktop and mobile devices.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 4096\n     */\n    SPRITE_BATCH_SIZE: 4096,\n\n    /**\n     * The prefix that denotes a URL is for a retina asset.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {RegExp}\n     * @example `@2x`\n     * @default /@([0-9\\.]+)x/\n     */\n    RETINA_PREFIX: /@([0-9\\.]+)x/,\n\n    /**\n     * The default render options if none are supplied to {@link PIXI.WebGLRenderer}\n     * or {@link PIXI.CanvasRenderer}.\n     *\n     * @static\n     * @constant\n     * @memberof PIXI.settings\n     * @type {object}\n     * @property {HTMLCanvasElement} view=null\n     * @property {number} resolution=1\n     * @property {boolean} antialias=false\n     * @property {boolean} forceFXAA=false\n     * @property {boolean} autoResize=false\n     * @property {boolean} transparent=false\n     * @property {number} backgroundColor=0x000000\n     * @property {boolean} clearBeforeRender=true\n     * @property {boolean} preserveDrawingBuffer=false\n     * @property {boolean} roundPixels=false\n     * @property {number} width=800\n     * @property {number} height=600\n     * @property {boolean} legacy=false\n     */\n    RENDER_OPTIONS: {\n        view: null,\n        antialias: false,\n        forceFXAA: false,\n        autoResize: false,\n        transparent: false,\n        backgroundColor: 0x000000,\n        clearBeforeRender: true,\n        preserveDrawingBuffer: false,\n        roundPixels: false,\n        width: 800,\n        height: 600,\n        legacy: false,\n    },\n\n    /**\n     * Default transform type.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {PIXI.TRANSFORM_MODE}\n     * @default PIXI.TRANSFORM_MODE.STATIC\n     */\n    TRANSFORM_MODE: 0,\n\n    /**\n     * Default Garbage Collection mode.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {PIXI.GC_MODES}\n     * @default PIXI.GC_MODES.AUTO\n     */\n    GC_MODE: 0,\n\n    /**\n     * Default Garbage Collection max idle.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 3600\n     */\n    GC_MAX_IDLE: 60 * 60,\n\n    /**\n     * Default Garbage Collection maximum check count.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {number}\n     * @default 600\n     */\n    GC_MAX_CHECK_COUNT: 60 * 10,\n\n    /**\n     * Default wrap modes that are supported by pixi.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {PIXI.WRAP_MODES}\n     * @default PIXI.WRAP_MODES.CLAMP\n     */\n    WRAP_MODE: 0,\n\n    /**\n     * The scale modes that are supported by pixi.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {PIXI.SCALE_MODES}\n     * @default PIXI.SCALE_MODES.LINEAR\n     */\n    SCALE_MODE: 0,\n\n    /**\n     * Default specify float precision in vertex shader.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {PIXI.PRECISION}\n     * @default PIXI.PRECISION.HIGH\n     */\n    PRECISION_VERTEX: 'highp',\n\n    /**\n     * Default specify float precision in fragment shader.\n     *\n     * @static\n     * @memberof PIXI.settings\n     * @type {PIXI.PRECISION}\n     * @default PIXI.PRECISION.MEDIUM\n     */\n    PRECISION_FRAGMENT: 'mediump',\n\n    /**\n     * Can we upload the same buffer in a single frame?\n     *\n     * @static\n     * @constant\n     * @memberof PIXI\n     * @type {boolean}\n     */\n    CAN_UPLOAD_SAME_BUFFER: canUploadSameBuffer(),\n\n};\n","import { Point, ObservablePoint, Rectangle } from '../math';\nimport { sign, TextureCache } from '../utils';\nimport { BLEND_MODES } from '../const';\nimport Texture from '../textures/Texture';\nimport Container from '../display/Container';\n\nconst tempPoint = new Point();\n\n/**\n * The Sprite object is the base for all textured objects that are rendered to the screen\n *\n * A sprite can be created directly from an image like this:\n *\n * ```js\n * let sprite = new PIXI.Sprite.fromImage('assets/image.png');\n * ```\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI\n */\nexport default class Sprite extends Container\n{\n    /**\n     * @param {PIXI.Texture} texture - The texture for this sprite\n     */\n    constructor(texture)\n    {\n        super();\n\n        /**\n         * The anchor sets the origin point of the texture.\n         * The default is 0,0 this means the texture's origin is the top left\n         * Setting the anchor to 0.5,0.5 means the texture's origin is centered\n         * Setting the anchor to 1,1 would mean the texture's origin point will be the bottom right corner\n         *\n         * @member {PIXI.ObservablePoint}\n         * @private\n         */\n        this._anchor = new ObservablePoint(this._onAnchorUpdate, this);\n\n        /**\n         * The texture that the sprite is using\n         *\n         * @private\n         * @member {PIXI.Texture}\n         */\n        this._texture = null;\n\n        /**\n         * The width of the sprite (this is initially set by the texture)\n         *\n         * @private\n         * @member {number}\n         */\n        this._width = 0;\n\n        /**\n         * The height of the sprite (this is initially set by the texture)\n         *\n         * @private\n         * @member {number}\n         */\n        this._height = 0;\n\n        /**\n         * The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.\n         *\n         * @private\n         * @member {number}\n         * @default 0xFFFFFF\n         */\n        this._tint = null;\n        this._tintRGB = null;\n        this.tint = 0xFFFFFF;\n\n        /**\n         * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.\n         *\n         * @member {number}\n         * @default PIXI.BLEND_MODES.NORMAL\n         * @see PIXI.BLEND_MODES\n         */\n        this.blendMode = BLEND_MODES.NORMAL;\n\n        /**\n         * The shader that will be used to render the sprite. Set to null to remove a current shader.\n         *\n         * @member {PIXI.Filter|PIXI.Shader}\n         */\n        this.shader = null;\n\n        /**\n         * An internal cached value of the tint.\n         *\n         * @private\n         * @member {number}\n         * @default 0xFFFFFF\n         */\n        this.cachedTint = 0xFFFFFF;\n\n        // call texture setter\n        this.texture = texture || Texture.EMPTY;\n\n        /**\n         * this is used to store the vertex data of the sprite (basically a quad)\n         *\n         * @private\n         * @member {Float32Array}\n         */\n        this.vertexData = new Float32Array(8);\n\n        /**\n         * This is used to calculate the bounds of the object IF it is a trimmed sprite\n         *\n         * @private\n         * @member {Float32Array}\n         */\n        this.vertexTrimmedData = null;\n\n        this._transformID = -1;\n        this._textureID = -1;\n\n        this._transformTrimmedID = -1;\n        this._textureTrimmedID = -1;\n\n        /**\n         * Plugin that is responsible for rendering this element.\n         * Allows to customize the rendering process without overriding '_renderWebGL' & '_renderCanvas' methods.\n         *\n         * @member {string}\n         * @default 'sprite'\n         */\n        this.pluginName = 'sprite';\n    }\n\n    /**\n     * When the texture is updated, this event will fire to update the scale and frame\n     *\n     * @private\n     */\n    _onTextureUpdate()\n    {\n        this._textureID = -1;\n        this._textureTrimmedID = -1;\n\n        // so if _width is 0 then width was not set..\n        if (this._width)\n        {\n            this.scale.x = sign(this.scale.x) * this._width / this._texture.orig.width;\n        }\n\n        if (this._height)\n        {\n            this.scale.y = sign(this.scale.y) * this._height / this._texture.orig.height;\n        }\n    }\n\n    /**\n     * Called when the anchor position updates.\n     *\n     * @private\n     */\n    _onAnchorUpdate()\n    {\n        this._transformID = -1;\n        this._transformTrimmedID = -1;\n    }\n\n    /**\n     * calculates worldTransform * vertices, store it in vertexData\n     */\n    calculateVertices()\n    {\n        if (this._transformID === this.transform._worldID && this._textureID === this._texture._updateID)\n        {\n            return;\n        }\n\n        this._transformID = this.transform._worldID;\n        this._textureID = this._texture._updateID;\n\n        // set the vertex data\n\n        const texture = this._texture;\n        const wt = this.transform.worldTransform;\n        const a = wt.a;\n        const b = wt.b;\n        const c = wt.c;\n        const d = wt.d;\n        const tx = wt.tx;\n        const ty = wt.ty;\n        const vertexData = this.vertexData;\n        const trim = texture.trim;\n        const orig = texture.orig;\n        const anchor = this._anchor;\n\n        let w0 = 0;\n        let w1 = 0;\n        let h0 = 0;\n        let h1 = 0;\n\n        if (trim)\n        {\n            // if the sprite is trimmed and is not a tilingsprite then we need to add the extra\n            // space before transforming the sprite coords.\n            w1 = trim.x - (anchor._x * orig.width);\n            w0 = w1 + trim.width;\n\n            h1 = trim.y - (anchor._y * orig.height);\n            h0 = h1 + trim.height;\n        }\n        else\n        {\n            w1 = -anchor._x * orig.width;\n            w0 = w1 + orig.width;\n\n            h1 = -anchor._y * orig.height;\n            h0 = h1 + orig.height;\n        }\n\n        // xy\n        vertexData[0] = (a * w1) + (c * h1) + tx;\n        vertexData[1] = (d * h1) + (b * w1) + ty;\n\n        // xy\n        vertexData[2] = (a * w0) + (c * h1) + tx;\n        vertexData[3] = (d * h1) + (b * w0) + ty;\n\n         // xy\n        vertexData[4] = (a * w0) + (c * h0) + tx;\n        vertexData[5] = (d * h0) + (b * w0) + ty;\n\n        // xy\n        vertexData[6] = (a * w1) + (c * h0) + tx;\n        vertexData[7] = (d * h0) + (b * w1) + ty;\n    }\n\n    /**\n     * calculates worldTransform * vertices for a non texture with a trim. store it in vertexTrimmedData\n     * This is used to ensure that the true width and height of a trimmed texture is respected\n     */\n    calculateTrimmedVertices()\n    {\n        if (!this.vertexTrimmedData)\n        {\n            this.vertexTrimmedData = new Float32Array(8);\n        }\n        else if (this._transformTrimmedID === this.transform._worldID && this._textureTrimmedID === this._texture._updateID)\n        {\n            return;\n        }\n\n        this._transformTrimmedID = this.transform._worldID;\n        this._textureTrimmedID = this._texture._updateID;\n\n        // lets do some special trim code!\n        const texture = this._texture;\n        const vertexData = this.vertexTrimmedData;\n        const orig = texture.orig;\n        const anchor = this._anchor;\n\n        // lets calculate the new untrimmed bounds..\n        const wt = this.transform.worldTransform;\n        const a = wt.a;\n        const b = wt.b;\n        const c = wt.c;\n        const d = wt.d;\n        const tx = wt.tx;\n        const ty = wt.ty;\n\n        const w1 = -anchor._x * orig.width;\n        const w0 = w1 + orig.width;\n\n        const h1 = -anchor._y * orig.height;\n        const h0 = h1 + orig.height;\n\n        // xy\n        vertexData[0] = (a * w1) + (c * h1) + tx;\n        vertexData[1] = (d * h1) + (b * w1) + ty;\n\n        // xy\n        vertexData[2] = (a * w0) + (c * h1) + tx;\n        vertexData[3] = (d * h1) + (b * w0) + ty;\n\n        // xy\n        vertexData[4] = (a * w0) + (c * h0) + tx;\n        vertexData[5] = (d * h0) + (b * w0) + ty;\n\n        // xy\n        vertexData[6] = (a * w1) + (c * h0) + tx;\n        vertexData[7] = (d * h0) + (b * w1) + ty;\n    }\n\n    /**\n    *\n    * Renders the object using the WebGL renderer\n    *\n    * @private\n    * @param {PIXI.WebGLRenderer} renderer - The webgl renderer to use.\n    */\n    _renderWebGL(renderer)\n    {\n        this.calculateVertices();\n\n        renderer.setObjectRenderer(renderer.plugins[this.pluginName]);\n        renderer.plugins[this.pluginName].render(this);\n    }\n\n    /**\n    * Renders the object using the Canvas renderer\n    *\n    * @private\n    * @param {PIXI.CanvasRenderer} renderer - The renderer\n    */\n    _renderCanvas(renderer)\n    {\n        renderer.plugins[this.pluginName].render(this);\n    }\n\n    /**\n     * Updates the bounds of the sprite.\n     *\n     * @private\n     */\n    _calculateBounds()\n    {\n        const trim = this._texture.trim;\n        const orig = this._texture.orig;\n\n        // First lets check to see if the current texture has a trim..\n        if (!trim || (trim.width === orig.width && trim.height === orig.height))\n        {\n            // no trim! lets use the usual calculations..\n            this.calculateVertices();\n            this._bounds.addQuad(this.vertexData);\n        }\n        else\n        {\n            // lets calculate a special trimmed bounds...\n            this.calculateTrimmedVertices();\n            this._bounds.addQuad(this.vertexTrimmedData);\n        }\n    }\n\n    /**\n     * Gets the local bounds of the sprite object.\n     *\n     * @param {PIXI.Rectangle} rect - The output rectangle.\n     * @return {PIXI.Rectangle} The bounds.\n     */\n    getLocalBounds(rect)\n    {\n        // we can do a fast local bounds if the sprite has no children!\n        if (this.children.length === 0)\n        {\n            this._bounds.minX = this._texture.orig.width * -this._anchor._x;\n            this._bounds.minY = this._texture.orig.height * -this._anchor._y;\n            this._bounds.maxX = this._texture.orig.width * (1 - this._anchor._x);\n            this._bounds.maxY = this._texture.orig.height * (1 - this._anchor._y);\n\n            if (!rect)\n            {\n                if (!this._localBoundsRect)\n                {\n                    this._localBoundsRect = new Rectangle();\n                }\n\n                rect = this._localBoundsRect;\n            }\n\n            return this._bounds.getRectangle(rect);\n        }\n\n        return super.getLocalBounds.call(this, rect);\n    }\n\n    /**\n     * Tests if a point is inside this sprite\n     *\n     * @param {PIXI.Point} point - the point to test\n     * @return {boolean} the result of the test\n     */\n    containsPoint(point)\n    {\n        this.worldTransform.applyInverse(point, tempPoint);\n\n        const width = this._texture.orig.width;\n        const height = this._texture.orig.height;\n        const x1 = -width * this.anchor.x;\n        let y1 = 0;\n\n        if (tempPoint.x >= x1 && tempPoint.x < x1 + width)\n        {\n            y1 = -height * this.anchor.y;\n\n            if (tempPoint.y >= y1 && tempPoint.y < y1 + height)\n            {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Destroys this sprite and optionally its texture and children\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy\n     *      method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well\n     * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well\n     */\n    destroy(options)\n    {\n        super.destroy(options);\n\n        this._anchor = null;\n\n        const destroyTexture = typeof options === 'boolean' ? options : options && options.texture;\n\n        if (destroyTexture)\n        {\n            const destroyBaseTexture = typeof options === 'boolean' ? options : options && options.baseTexture;\n\n            this._texture.destroy(!!destroyBaseTexture);\n        }\n\n        this._texture = null;\n        this.shader = null;\n    }\n\n    // some helper functions..\n\n    /**\n     * Helper function that creates a new sprite based on the source you provide.\n     * The source can be - frame id, image url, video url, canvas element, video element, base texture\n     *\n     * @static\n     * @param {number|string|PIXI.BaseTexture|HTMLCanvasElement|HTMLVideoElement} source Source to create texture from\n     * @return {PIXI.Sprite} The newly created sprite\n     */\n    static from(source)\n    {\n        return new Sprite(Texture.from(source));\n    }\n\n    /**\n     * Helper function that creates a sprite that will contain a texture from the TextureCache based on the frameId\n     * The frame ids are created when a Texture packer file has been loaded\n     *\n     * @static\n     * @param {string} frameId - The frame Id of the texture in the cache\n     * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId\n     */\n    static fromFrame(frameId)\n    {\n        const texture = TextureCache[frameId];\n\n        if (!texture)\n        {\n            throw new Error(`The frameId \"${frameId}\" does not exist in the texture cache`);\n        }\n\n        return new Sprite(texture);\n    }\n\n    /**\n     * Helper function that creates a sprite that will contain a texture based on an image url\n     * If the image is not in the texture cache it will be loaded\n     *\n     * @static\n     * @param {string} imageId - The image url of the texture\n     * @param {boolean} [crossorigin=(auto)] - if you want to specify the cross-origin parameter\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - if you want to specify the scale mode,\n     *  see {@link PIXI.SCALE_MODES} for possible values\n     * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id\n     */\n    static fromImage(imageId, crossorigin, scaleMode)\n    {\n        return new Sprite(Texture.fromImage(imageId, crossorigin, scaleMode));\n    }\n\n    /**\n     * The width of the sprite, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        return Math.abs(this.scale.x) * this._texture.orig.width;\n    }\n\n    set width(value) // eslint-disable-line require-jsdoc\n    {\n        const s = sign(this.scale.x) || 1;\n\n        this.scale.x = s * value / this._texture.orig.width;\n        this._width = value;\n    }\n\n    /**\n     * The height of the sprite, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        return Math.abs(this.scale.y) * this._texture.orig.height;\n    }\n\n    set height(value) // eslint-disable-line require-jsdoc\n    {\n        const s = sign(this.scale.y) || 1;\n\n        this.scale.y = s * value / this._texture.orig.height;\n        this._height = value;\n    }\n\n    /**\n     * The anchor sets the origin point of the texture.\n     * The default is 0,0 this means the texture's origin is the top left\n     * Setting the anchor to 0.5,0.5 means the texture's origin is centered\n     * Setting the anchor to 1,1 would mean the texture's origin point will be the bottom right corner\n     *\n     * @member {PIXI.ObservablePoint}\n     */\n    get anchor()\n    {\n        return this._anchor;\n    }\n\n    set anchor(value) // eslint-disable-line require-jsdoc\n    {\n        this._anchor.copy(value);\n    }\n\n    /**\n     * The tint applied to the sprite. This is a hex value.\n     * A value of 0xFFFFFF will remove any tint effect.\n     *\n     * @member {number}\n     * @default 0xFFFFFF\n     */\n    get tint()\n    {\n        return this._tint;\n    }\n\n    set tint(value) // eslint-disable-line require-jsdoc\n    {\n        this._tint = value;\n        this._tintRGB = (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n    }\n\n    /**\n     * The texture that the sprite is using\n     *\n     * @member {PIXI.Texture}\n     */\n    get texture()\n    {\n        return this._texture;\n    }\n\n    set texture(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._texture === value)\n        {\n            return;\n        }\n\n        this._texture = value;\n        this.cachedTint = 0xFFFFFF;\n\n        this._textureID = -1;\n        this._textureTrimmedID = -1;\n\n        if (value)\n        {\n            // wait for the texture to load\n            if (value.baseTexture.hasLoaded)\n            {\n                this._onTextureUpdate();\n            }\n            else\n            {\n                value.once('update', this._onTextureUpdate, this);\n            }\n        }\n    }\n}\n","import CanvasRenderer from '../../renderers/canvas/CanvasRenderer';\nimport { SCALE_MODES } from '../../const';\nimport { Matrix, GroupD8 } from '../../math';\nimport CanvasTinter from './CanvasTinter';\n\nconst canvasRenderWorldTransform = new Matrix();\n\n/**\n * @author Mat Groves\n *\n * Big thanks to the very clever Matt DesLauriers <mattdesl> https://github.com/mattdesl/\n * for creating the original PixiJS version!\n * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that they now\n * share 4 bytes on the vertex buffer\n *\n * Heavily inspired by LibGDX's CanvasSpriteRenderer:\n * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/CanvasSpriteRenderer.java\n */\n\n/**\n * Renderer dedicated to drawing and batching sprites.\n *\n * @class\n * @private\n * @memberof PIXI\n */\nexport default class CanvasSpriteRenderer\n{\n    /**\n     * @param {PIXI.WebGLRenderer} renderer -The renderer sprite this batch works for.\n     */\n    constructor(renderer)\n    {\n        this.renderer = renderer;\n    }\n\n    /**\n     * Renders the sprite object.\n     *\n     * @param {PIXI.Sprite} sprite - the sprite to render when using this spritebatch\n     */\n    render(sprite)\n    {\n        const texture = sprite._texture;\n        const renderer = this.renderer;\n\n        const width = texture._frame.width;\n        const height = texture._frame.height;\n\n        let wt = sprite.transform.worldTransform;\n        let dx = 0;\n        let dy = 0;\n\n        if (texture.orig.width <= 0 || texture.orig.height <= 0 || !texture.baseTexture.source)\n        {\n            return;\n        }\n\n        renderer.setBlendMode(sprite.blendMode);\n\n        //  Ignore null sources\n        if (texture.valid)\n        {\n            renderer.context.globalAlpha = sprite.worldAlpha;\n\n            // If smoothingEnabled is supported and we need to change the smoothing property for sprite texture\n            const smoothingEnabled = texture.baseTexture.scaleMode === SCALE_MODES.LINEAR;\n\n            if (renderer.smoothProperty && renderer.context[renderer.smoothProperty] !== smoothingEnabled)\n            {\n                renderer.context[renderer.smoothProperty] = smoothingEnabled;\n            }\n\n            if (texture.trim)\n            {\n                dx = (texture.trim.width / 2) + texture.trim.x - (sprite.anchor.x * texture.orig.width);\n                dy = (texture.trim.height / 2) + texture.trim.y - (sprite.anchor.y * texture.orig.height);\n            }\n            else\n            {\n                dx = (0.5 - sprite.anchor.x) * texture.orig.width;\n                dy = (0.5 - sprite.anchor.y) * texture.orig.height;\n            }\n\n            if (texture.rotate)\n            {\n                wt.copy(canvasRenderWorldTransform);\n                wt = canvasRenderWorldTransform;\n                GroupD8.matrixAppendRotationInv(wt, texture.rotate, dx, dy);\n                // the anchor has already been applied above, so lets set it to zero\n                dx = 0;\n                dy = 0;\n            }\n\n            dx -= width / 2;\n            dy -= height / 2;\n\n            // Allow for pixel rounding\n            if (renderer.roundPixels)\n            {\n                renderer.context.setTransform(\n                    wt.a,\n                    wt.b,\n                    wt.c,\n                    wt.d,\n                    (wt.tx * renderer.resolution) | 0,\n                    (wt.ty * renderer.resolution) | 0\n                );\n\n                dx = dx | 0;\n                dy = dy | 0;\n            }\n            else\n            {\n                renderer.context.setTransform(\n                    wt.a,\n                    wt.b,\n                    wt.c,\n                    wt.d,\n                    wt.tx * renderer.resolution,\n                    wt.ty * renderer.resolution\n                );\n            }\n\n            const resolution = texture.baseTexture.resolution;\n\n            if (sprite.tint !== 0xFFFFFF)\n            {\n                if (sprite.cachedTint !== sprite.tint || sprite.tintedTexture.tintId !== sprite._texture._updateID)\n                {\n                    sprite.cachedTint = sprite.tint;\n\n                    // TODO clean up caching - how to clean up the caches?\n                    sprite.tintedTexture = CanvasTinter.getTintedTexture(sprite, sprite.tint);\n                }\n\n                renderer.context.drawImage(\n                    sprite.tintedTexture,\n                    0,\n                    0,\n                    width * resolution,\n                    height * resolution,\n                    dx * renderer.resolution,\n                    dy * renderer.resolution,\n                    width * renderer.resolution,\n                    height * renderer.resolution\n                );\n            }\n            else\n            {\n                renderer.context.drawImage(\n                    texture.baseTexture.source,\n                    texture._frame.x * resolution,\n                    texture._frame.y * resolution,\n                    width * resolution,\n                    height * resolution,\n                    dx * renderer.resolution,\n                    dy * renderer.resolution,\n                    width * renderer.resolution,\n                    height * renderer.resolution\n                );\n            }\n        }\n    }\n\n    /**\n     * destroy the sprite object.\n     *\n     */\n    destroy()\n    {\n        this.renderer = null;\n    }\n}\n\nCanvasRenderer.registerPlugin('sprite', CanvasSpriteRenderer);\n","import { hex2rgb, rgb2hex } from '../../utils';\nimport canUseNewCanvasBlendModes from '../../renderers/canvas/utils/canUseNewCanvasBlendModes';\n\n/**\n * Utility methods for Sprite/Texture tinting.\n *\n * @class\n * @memberof PIXI\n */\nconst CanvasTinter = {\n    /**\n     * Basically this method just needs a sprite and a color and tints the sprite with the given color.\n     *\n     * @memberof PIXI.CanvasTinter\n     * @param {PIXI.Sprite} sprite - the sprite to tint\n     * @param {number} color - the color to use to tint the sprite with\n     * @return {HTMLCanvasElement} The tinted canvas\n     */\n    getTintedTexture: (sprite, color) =>\n    {\n        const texture = sprite._texture;\n\n        color = CanvasTinter.roundColor(color);\n\n        const stringColor = `#${(`00000${(color | 0).toString(16)}`).substr(-6)}`;\n\n        texture.tintCache = texture.tintCache || {};\n\n        const cachedTexture = texture.tintCache[stringColor];\n\n        let canvas;\n\n        if (cachedTexture)\n        {\n            if (cachedTexture.tintId === texture._updateID)\n            {\n                return texture.tintCache[stringColor];\n            }\n\n            canvas = texture.tintCache[stringColor];\n        }\n        else\n        {\n            canvas = CanvasTinter.canvas || document.createElement('canvas');\n        }\n\n        CanvasTinter.tintMethod(texture, color, canvas);\n\n        canvas.tintId = texture._updateID;\n\n        if (CanvasTinter.convertTintToImage)\n        {\n            // is this better?\n            const tintImage = new Image();\n\n            tintImage.src = canvas.toDataURL();\n\n            texture.tintCache[stringColor] = tintImage;\n        }\n        else\n        {\n            texture.tintCache[stringColor] = canvas;\n            // if we are not converting the texture to an image then we need to lose the reference to the canvas\n            CanvasTinter.canvas = null;\n        }\n\n        return canvas;\n    },\n\n    /**\n     * Tint a texture using the 'multiply' operation.\n     *\n     * @memberof PIXI.CanvasTinter\n     * @param {PIXI.Texture} texture - the texture to tint\n     * @param {number} color - the color to use to tint the sprite with\n     * @param {HTMLCanvasElement} canvas - the current canvas\n     */\n    tintWithMultiply: (texture, color, canvas) =>\n    {\n        const context = canvas.getContext('2d');\n        const crop = texture._frame.clone();\n        const resolution = texture.baseTexture.resolution;\n\n        crop.x *= resolution;\n        crop.y *= resolution;\n        crop.width *= resolution;\n        crop.height *= resolution;\n\n        canvas.width = Math.ceil(crop.width);\n        canvas.height = Math.ceil(crop.height);\n\n        context.save();\n        context.fillStyle = `#${(`00000${(color | 0).toString(16)}`).substr(-6)}`;\n\n        context.fillRect(0, 0, crop.width, crop.height);\n\n        context.globalCompositeOperation = 'multiply';\n\n        context.drawImage(\n            texture.baseTexture.source,\n            crop.x,\n            crop.y,\n            crop.width,\n            crop.height,\n            0,\n            0,\n            crop.width,\n            crop.height\n        );\n\n        context.globalCompositeOperation = 'destination-atop';\n\n        context.drawImage(\n            texture.baseTexture.source,\n            crop.x,\n            crop.y,\n            crop.width,\n            crop.height,\n            0,\n            0,\n            crop.width,\n            crop.height\n        );\n        context.restore();\n    },\n\n    /**\n     * Tint a texture using the 'overlay' operation.\n     *\n     * @memberof PIXI.CanvasTinter\n     * @param {PIXI.Texture} texture - the texture to tint\n     * @param {number} color - the color to use to tint the sprite with\n     * @param {HTMLCanvasElement} canvas - the current canvas\n     */\n    tintWithOverlay(texture, color, canvas)\n    {\n        const context = canvas.getContext('2d');\n        const crop = texture._frame.clone();\n        const resolution = texture.baseTexture.resolution;\n\n        crop.x *= resolution;\n        crop.y *= resolution;\n        crop.width *= resolution;\n        crop.height *= resolution;\n\n        canvas.width = Math.ceil(crop.width);\n        canvas.height = Math.ceil(crop.height);\n\n        context.save();\n        context.globalCompositeOperation = 'copy';\n        context.fillStyle = `#${(`00000${(color | 0).toString(16)}`).substr(-6)}`;\n        context.fillRect(0, 0, crop.width, crop.height);\n\n        context.globalCompositeOperation = 'destination-atop';\n        context.drawImage(\n            texture.baseTexture.source,\n            crop.x,\n            crop.y,\n            crop.width,\n            crop.height,\n            0,\n            0,\n            crop.width,\n            crop.height\n        );\n\n        // context.globalCompositeOperation = 'copy';\n        context.restore();\n    },\n\n    /**\n     * Tint a texture pixel per pixel.\n     *\n     * @memberof PIXI.CanvasTinter\n     * @param {PIXI.Texture} texture - the texture to tint\n     * @param {number} color - the color to use to tint the sprite with\n     * @param {HTMLCanvasElement} canvas - the current canvas\n     */\n    tintWithPerPixel: (texture, color, canvas) =>\n    {\n        const context = canvas.getContext('2d');\n        const crop = texture._frame.clone();\n        const resolution = texture.baseTexture.resolution;\n\n        crop.x *= resolution;\n        crop.y *= resolution;\n        crop.width *= resolution;\n        crop.height *= resolution;\n\n        canvas.width = Math.ceil(crop.width);\n        canvas.height = Math.ceil(crop.height);\n\n        context.save();\n        context.globalCompositeOperation = 'copy';\n        context.drawImage(\n            texture.baseTexture.source,\n            crop.x,\n            crop.y,\n            crop.width,\n            crop.height,\n            0,\n            0,\n            crop.width,\n            crop.height\n        );\n        context.restore();\n\n        const rgbValues = hex2rgb(color);\n        const r = rgbValues[0];\n        const g = rgbValues[1];\n        const b = rgbValues[2];\n\n        const pixelData = context.getImageData(0, 0, crop.width, crop.height);\n\n        const pixels = pixelData.data;\n\n        for (let i = 0; i < pixels.length; i += 4)\n        {\n            pixels[i + 0] *= r;\n            pixels[i + 1] *= g;\n            pixels[i + 2] *= b;\n        }\n\n        context.putImageData(pixelData, 0, 0);\n    },\n\n    /**\n     * Rounds the specified color according to the CanvasTinter.cacheStepsPerColorChannel.\n     *\n     * @memberof PIXI.CanvasTinter\n     * @param {number} color - the color to round, should be a hex color\n     * @return {number} The rounded color.\n     */\n    roundColor: (color) =>\n    {\n        const step = CanvasTinter.cacheStepsPerColorChannel;\n\n        const rgbValues = hex2rgb(color);\n\n        rgbValues[0] = Math.min(255, (rgbValues[0] / step) * step);\n        rgbValues[1] = Math.min(255, (rgbValues[1] / step) * step);\n        rgbValues[2] = Math.min(255, (rgbValues[2] / step) * step);\n\n        return rgb2hex(rgbValues);\n    },\n\n    /**\n     * Number of steps which will be used as a cap when rounding colors.\n     *\n     * @memberof PIXI.CanvasTinter\n     * @type {number}\n     */\n    cacheStepsPerColorChannel: 8,\n\n    /**\n     * Tint cache boolean flag.\n     *\n     * @memberof PIXI.CanvasTinter\n     * @type {boolean}\n     */\n    convertTintToImage: false,\n\n    /**\n     * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method.\n     *\n     * @memberof PIXI.CanvasTinter\n     * @type {boolean}\n     */\n    canUseMultiply: canUseNewCanvasBlendModes(),\n\n    /**\n     * The tinting method that will be used.\n     *\n     * @memberof PIXI.CanvasTinter\n     * @type {tintMethodFunctionType}\n     */\n    tintMethod: 0,\n};\n\nCanvasTinter.tintMethod = CanvasTinter.canUseMultiply ? CanvasTinter.tintWithMultiply : CanvasTinter.tintWithPerPixel;\n\n/**\n * The tintMethod type.\n *\n * @memberof PIXI.CanvasTinter\n * @callback tintMethodFunctionType\n * @param texture {PIXI.Texture} the texture to tint\n * @param color {number} the color to use to tint the sprite with\n * @param canvas {HTMLCanvasElement} the current canvas\n */\n\nexport default CanvasTinter;\n","/**\n * @class\n * @memberof PIXI\n */\nexport default class Buffer\n{\n    /**\n     * @param {number} size - The size of the buffer in bytes.\n     */\n    constructor(size)\n    {\n        this.vertices = new ArrayBuffer(size);\n\n        /**\n         * View on the vertices as a Float32Array for positions\n         *\n         * @member {Float32Array}\n         */\n        this.float32View = new Float32Array(this.vertices);\n\n        /**\n         * View on the vertices as a Uint32Array for uvs\n         *\n         * @member {Float32Array}\n         */\n        this.uint32View = new Uint32Array(this.vertices);\n    }\n\n    /**\n     * Destroys the buffer.\n     *\n     */\n    destroy()\n    {\n        this.vertices = null;\n        this.positions = null;\n        this.uvs = null;\n        this.colors = null;\n    }\n}\n","import ObjectRenderer from '../../renderers/webgl/utils/ObjectRenderer';\nimport WebGLRenderer from '../../renderers/webgl/WebGLRenderer';\nimport createIndicesForQuads from '../../utils/createIndicesForQuads';\nimport generateMultiTextureShader from './generateMultiTextureShader';\nimport checkMaxIfStatmentsInShader from '../../renderers/webgl/utils/checkMaxIfStatmentsInShader';\nimport Buffer from './BatchBuffer';\nimport settings from '../../settings';\nimport { premultiplyBlendMode, premultiplyTint } from '../../utils';\nimport glCore from 'pixi-gl-core';\nimport bitTwiddle from 'bit-twiddle';\n\nlet TICK = 0;\nlet TEXTURE_TICK = 0;\n\n/**\n * Renderer dedicated to drawing and batching sprites.\n *\n * @class\n * @private\n * @memberof PIXI\n * @extends PIXI.ObjectRenderer\n */\nexport default class SpriteRenderer extends ObjectRenderer\n{\n    /**\n     * @param {PIXI.WebGLRenderer} renderer - The renderer this sprite batch works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        /**\n         * Number of values sent in the vertex buffer.\n         * aVertexPosition(2), aTextureCoord(1), aColor(1), aTextureId(1) = 5\n         *\n         * @member {number}\n         */\n        this.vertSize = 5;\n\n        /**\n         * The size of the vertex information in bytes.\n         *\n         * @member {number}\n         */\n        this.vertByteSize = this.vertSize * 4;\n\n        /**\n         * The number of images in the SpriteRenderer before it flushes.\n         *\n         * @member {number}\n         */\n        this.size = settings.SPRITE_BATCH_SIZE; // 2000 is a nice balance between mobile / desktop\n\n        // the total number of bytes in our batch\n        // let numVerts = this.size * 4 * this.vertByteSize;\n\n        this.buffers = [];\n        for (let i = 1; i <= bitTwiddle.nextPow2(this.size); i *= 2)\n        {\n            this.buffers.push(new Buffer(i * 4 * this.vertByteSize));\n        }\n\n        /**\n         * Holds the indices of the geometry (quads) to draw\n         *\n         * @member {Uint16Array}\n         */\n        this.indices = createIndicesForQuads(this.size);\n\n        /**\n         * The default shaders that is used if a sprite doesn't have a more specific one.\n         * there is a shader for each number of textures that can be rendererd.\n         * These shaders will also be generated on the fly as required.\n         * @member {PIXI.Shader[]}\n         */\n        this.shader = null;\n\n        this.currentIndex = 0;\n        this.groups = [];\n\n        for (let k = 0; k < this.size; k++)\n        {\n            this.groups[k] = { textures: [], textureCount: 0, ids: [], size: 0, start: 0, blend: 0 };\n        }\n\n        this.sprites = [];\n\n        this.vertexBuffers = [];\n        this.vaos = [];\n\n        this.vaoMax = 2;\n        this.vertexCount = 0;\n\n        this.renderer.on('prerender', this.onPrerender, this);\n    }\n\n    /**\n     * Sets up the renderer context and necessary buffers.\n     *\n     * @private\n     */\n    onContextChange()\n    {\n        const gl = this.renderer.gl;\n\n        if (this.renderer.legacy)\n        {\n            this.MAX_TEXTURES = 1;\n        }\n        else\n        {\n            // step 1: first check max textures the GPU can handle.\n            this.MAX_TEXTURES = Math.min(gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS), settings.SPRITE_MAX_TEXTURES);\n\n            // step 2: check the maximum number of if statements the shader can have too..\n            this.MAX_TEXTURES = checkMaxIfStatmentsInShader(this.MAX_TEXTURES, gl);\n        }\n\n        this.shader = generateMultiTextureShader(gl, this.MAX_TEXTURES);\n\n        // create a couple of buffers\n        this.indexBuffer = glCore.GLBuffer.createIndexBuffer(gl, this.indices, gl.STATIC_DRAW);\n\n        // we use the second shader as the first one depending on your browser may omit aTextureId\n        // as it is not used by the shader so is optimized out.\n\n        this.renderer.bindVao(null);\n\n        const attrs = this.shader.attributes;\n\n        for (let i = 0; i < this.vaoMax; i++)\n        {\n            /* eslint-disable max-len */\n            const vertexBuffer = this.vertexBuffers[i] = glCore.GLBuffer.createVertexBuffer(gl, null, gl.STREAM_DRAW);\n            /* eslint-enable max-len */\n\n            // build the vao object that will render..\n            const vao = this.renderer.createVao()\n                .addIndex(this.indexBuffer)\n                .addAttribute(vertexBuffer, attrs.aVertexPosition, gl.FLOAT, false, this.vertByteSize, 0)\n                .addAttribute(vertexBuffer, attrs.aTextureCoord, gl.UNSIGNED_SHORT, true, this.vertByteSize, 2 * 4)\n                .addAttribute(vertexBuffer, attrs.aColor, gl.UNSIGNED_BYTE, true, this.vertByteSize, 3 * 4);\n\n            if (attrs.aTextureId)\n            {\n                vao.addAttribute(vertexBuffer, attrs.aTextureId, gl.FLOAT, false, this.vertByteSize, 4 * 4);\n            }\n\n            this.vaos[i] = vao;\n        }\n\n        this.vao = this.vaos[0];\n        this.currentBlendMode = 99999;\n\n        this.boundTextures = new Array(this.MAX_TEXTURES);\n    }\n\n    /**\n     * Called before the renderer starts rendering.\n     *\n     */\n    onPrerender()\n    {\n        this.vertexCount = 0;\n    }\n\n    /**\n     * Renders the sprite object.\n     *\n     * @param {PIXI.Sprite} sprite - the sprite to render when using this spritebatch\n     */\n    render(sprite)\n    {\n        // TODO set blend modes..\n        // check texture..\n        if (this.currentIndex >= this.size)\n        {\n            this.flush();\n        }\n\n        // get the uvs for the texture\n\n        // if the uvs have not updated then no point rendering just yet!\n        if (!sprite._texture._uvs)\n        {\n            return;\n        }\n\n        // push a texture.\n        // increment the batchsize\n        this.sprites[this.currentIndex++] = sprite;\n    }\n\n    /**\n     * Renders the content and empties the current batch.\n     *\n     */\n    flush()\n    {\n        if (this.currentIndex === 0)\n        {\n            return;\n        }\n\n        const gl = this.renderer.gl;\n        const MAX_TEXTURES = this.MAX_TEXTURES;\n\n        const np2 = bitTwiddle.nextPow2(this.currentIndex);\n        const log2 = bitTwiddle.log2(np2);\n        const buffer = this.buffers[log2];\n\n        const sprites = this.sprites;\n        const groups = this.groups;\n\n        const float32View = buffer.float32View;\n        const uint32View = buffer.uint32View;\n\n        const boundTextures = this.boundTextures;\n        const rendererBoundTextures = this.renderer.boundTextures;\n        const touch = this.renderer.textureGC.count;\n\n        let index = 0;\n        let nextTexture;\n        let currentTexture;\n        let groupCount = 1;\n        let textureCount = 0;\n        let currentGroup = groups[0];\n        let vertexData;\n        let uvs;\n        let blendMode = premultiplyBlendMode[\n            sprites[0]._texture.baseTexture.premultipliedAlpha ? 1 : 0][sprites[0].blendMode];\n\n        currentGroup.textureCount = 0;\n        currentGroup.start = 0;\n        currentGroup.blend = blendMode;\n\n        TICK++;\n\n        let i;\n\n        // copy textures..\n        for (i = 0; i < MAX_TEXTURES; ++i)\n        {\n            boundTextures[i] = rendererBoundTextures[i];\n            boundTextures[i]._virtalBoundId = i;\n        }\n\n        for (i = 0; i < this.currentIndex; ++i)\n        {\n            // upload the sprite elemetns...\n            // they have all ready been calculated so we just need to push them into the buffer.\n            const sprite = sprites[i];\n\n            nextTexture = sprite._texture.baseTexture;\n\n            const spriteBlendMode = premultiplyBlendMode[Number(nextTexture.premultipliedAlpha)][sprite.blendMode];\n\n            if (blendMode !== spriteBlendMode)\n            {\n                // finish a group..\n                blendMode = spriteBlendMode;\n\n                // force the batch to break!\n                currentTexture = null;\n                textureCount = MAX_TEXTURES;\n                TICK++;\n            }\n\n            if (currentTexture !== nextTexture)\n            {\n                currentTexture = nextTexture;\n\n                if (nextTexture._enabled !== TICK)\n                {\n                    if (textureCount === MAX_TEXTURES)\n                    {\n                        TICK++;\n\n                        currentGroup.size = i - currentGroup.start;\n\n                        textureCount = 0;\n\n                        currentGroup = groups[groupCount++];\n                        currentGroup.blend = blendMode;\n                        currentGroup.textureCount = 0;\n                        currentGroup.start = i;\n                    }\n\n                    nextTexture.touched = touch;\n\n                    if (nextTexture._virtalBoundId === -1)\n                    {\n                        for (let j = 0; j < MAX_TEXTURES; ++j)\n                        {\n                            const tIndex = (j + TEXTURE_TICK) % MAX_TEXTURES;\n\n                            const t = boundTextures[tIndex];\n\n                            if (t._enabled !== TICK)\n                            {\n                                TEXTURE_TICK++;\n\n                                t._virtalBoundId = -1;\n\n                                nextTexture._virtalBoundId = tIndex;\n\n                                boundTextures[tIndex] = nextTexture;\n                                break;\n                            }\n                        }\n                    }\n\n                    nextTexture._enabled = TICK;\n\n                    currentGroup.textureCount++;\n                    currentGroup.ids[textureCount] = nextTexture._virtalBoundId;\n                    currentGroup.textures[textureCount++] = nextTexture;\n                }\n            }\n\n            vertexData = sprite.vertexData;\n\n            // TODO this sum does not need to be set each frame..\n            uvs = sprite._texture._uvs.uvsUint32;\n\n            if (this.renderer.roundPixels)\n            {\n                const resolution = this.renderer.resolution;\n\n                // xy\n                float32View[index] = ((vertexData[0] * resolution) | 0) / resolution;\n                float32View[index + 1] = ((vertexData[1] * resolution) | 0) / resolution;\n\n                // xy\n                float32View[index + 5] = ((vertexData[2] * resolution) | 0) / resolution;\n                float32View[index + 6] = ((vertexData[3] * resolution) | 0) / resolution;\n\n                // xy\n                float32View[index + 10] = ((vertexData[4] * resolution) | 0) / resolution;\n                float32View[index + 11] = ((vertexData[5] * resolution) | 0) / resolution;\n\n                // xy\n                float32View[index + 15] = ((vertexData[6] * resolution) | 0) / resolution;\n                float32View[index + 16] = ((vertexData[7] * resolution) | 0) / resolution;\n            }\n            else\n            {\n                // xy\n                float32View[index] = vertexData[0];\n                float32View[index + 1] = vertexData[1];\n\n                // xy\n                float32View[index + 5] = vertexData[2];\n                float32View[index + 6] = vertexData[3];\n\n                // xy\n                float32View[index + 10] = vertexData[4];\n                float32View[index + 11] = vertexData[5];\n\n                // xy\n                float32View[index + 15] = vertexData[6];\n                float32View[index + 16] = vertexData[7];\n            }\n\n            uint32View[index + 2] = uvs[0];\n            uint32View[index + 7] = uvs[1];\n            uint32View[index + 12] = uvs[2];\n            uint32View[index + 17] = uvs[3];\n            /* eslint-disable max-len */\n            const alpha = Math.min(sprite.worldAlpha, 1.0);\n            // we dont call extra function if alpha is 1.0, that's faster\n            const argb = alpha < 1.0 && nextTexture.premultipliedAlpha ? premultiplyTint(sprite._tintRGB, alpha)\n                : sprite._tintRGB + (alpha * 255 << 24);\n\n            uint32View[index + 3] = uint32View[index + 8] = uint32View[index + 13] = uint32View[index + 18] = argb;\n            float32View[index + 4] = float32View[index + 9] = float32View[index + 14] = float32View[index + 19] = nextTexture._virtalBoundId;\n            /* eslint-enable max-len */\n\n            index += 20;\n        }\n\n        currentGroup.size = i - currentGroup.start;\n\n        if (!settings.CAN_UPLOAD_SAME_BUFFER)\n        {\n            // this is still needed for IOS performance..\n            // it really does not like uploading to the same buffer in a single frame!\n            if (this.vaoMax <= this.vertexCount)\n            {\n                this.vaoMax++;\n\n                const attrs = this.shader.attributes;\n\n                /* eslint-disable max-len */\n                const vertexBuffer = this.vertexBuffers[this.vertexCount] = glCore.GLBuffer.createVertexBuffer(gl, null, gl.STREAM_DRAW);\n                /* eslint-enable max-len */\n\n                // build the vao object that will render..\n                const vao = this.renderer.createVao()\n                    .addIndex(this.indexBuffer)\n                    .addAttribute(vertexBuffer, attrs.aVertexPosition, gl.FLOAT, false, this.vertByteSize, 0)\n                    .addAttribute(vertexBuffer, attrs.aTextureCoord, gl.UNSIGNED_SHORT, true, this.vertByteSize, 2 * 4)\n                    .addAttribute(vertexBuffer, attrs.aColor, gl.UNSIGNED_BYTE, true, this.vertByteSize, 3 * 4);\n\n                if (attrs.aTextureId)\n                {\n                    vao.addAttribute(vertexBuffer, attrs.aTextureId, gl.FLOAT, false, this.vertByteSize, 4 * 4);\n                }\n\n                this.vaos[this.vertexCount] = vao;\n            }\n\n            this.renderer.bindVao(this.vaos[this.vertexCount]);\n\n            this.vertexBuffers[this.vertexCount].upload(buffer.vertices, 0, false);\n\n            this.vertexCount++;\n        }\n        else\n        {\n            // lets use the faster option, always use buffer number 0\n            this.vertexBuffers[this.vertexCount].upload(buffer.vertices, 0, true);\n        }\n\n        for (i = 0; i < MAX_TEXTURES; ++i)\n        {\n            rendererBoundTextures[i]._virtalBoundId = -1;\n        }\n\n        // render the groups..\n        for (i = 0; i < groupCount; ++i)\n        {\n            const group = groups[i];\n            const groupTextureCount = group.textureCount;\n\n            for (let j = 0; j < groupTextureCount; j++)\n            {\n                currentTexture = group.textures[j];\n\n                // reset virtual ids..\n                // lets do a quick check..\n                if (rendererBoundTextures[group.ids[j]] !== currentTexture)\n                {\n                    this.renderer.bindTexture(currentTexture, group.ids[j], true);\n                }\n\n                // reset the virtualId..\n                currentTexture._virtalBoundId = -1;\n            }\n\n            // set the blend mode..\n            this.renderer.state.setBlendMode(group.blend);\n\n            gl.drawElements(gl.TRIANGLES, group.size * 6, gl.UNSIGNED_SHORT, group.start * 6 * 2);\n        }\n\n        // reset elements for the next flush\n        this.currentIndex = 0;\n    }\n\n    /**\n     * Starts a new sprite batch.\n     */\n    start()\n    {\n        this.renderer.bindShader(this.shader);\n\n        if (settings.CAN_UPLOAD_SAME_BUFFER)\n        {\n            // bind buffer #0, we don't need others\n            this.renderer.bindVao(this.vaos[this.vertexCount]);\n\n            this.vertexBuffers[this.vertexCount].bind();\n        }\n    }\n\n    /**\n     * Stops and flushes the current batch.\n     *\n     */\n    stop()\n    {\n        this.flush();\n    }\n\n    /**\n     * Destroys the SpriteRenderer.\n     *\n     */\n    destroy()\n    {\n        for (let i = 0; i < this.vaoMax; i++)\n        {\n            if (this.vertexBuffers[i])\n            {\n                this.vertexBuffers[i].destroy();\n            }\n            if (this.vaos[i])\n            {\n                this.vaos[i].destroy();\n            }\n        }\n\n        if (this.indexBuffer)\n        {\n            this.indexBuffer.destroy();\n        }\n\n        this.renderer.off('prerender', this.onPrerender, this);\n\n        super.destroy();\n\n        if (this.shader)\n        {\n            this.shader.destroy();\n            this.shader = null;\n        }\n\n        this.vertexBuffers = null;\n        this.vaos = null;\n        this.indexBuffer = null;\n        this.indices = null;\n\n        this.sprites = null;\n\n        for (let i = 0; i < this.buffers.length; ++i)\n        {\n            this.buffers[i].destroy();\n        }\n    }\n}\n\nWebGLRenderer.registerPlugin('sprite', SpriteRenderer);\n","import Shader from '../../Shader';\nimport { readFileSync } from 'fs';\nimport { join } from 'path';\n\nconst fragTemplate = [\n    'varying vec2 vTextureCoord;',\n    'varying vec4 vColor;',\n    'varying float vTextureId;',\n    'uniform sampler2D uSamplers[%count%];',\n\n    'void main(void){',\n    'vec4 color;',\n    'float textureId = floor(vTextureId+0.5);',\n    '%forloop%',\n    'gl_FragColor = color * vColor;',\n    '}',\n].join('\\n');\n\nexport default function generateMultiTextureShader(gl, maxTextures)\n{\n    const vertexSrc = readFileSync(join(__dirname, './texture.vert'), 'utf8');\n    let fragmentSrc = fragTemplate;\n\n    fragmentSrc = fragmentSrc.replace(/%count%/gi, maxTextures);\n    fragmentSrc = fragmentSrc.replace(/%forloop%/gi, generateSampleSrc(maxTextures));\n\n    const shader = new Shader(gl, vertexSrc, fragmentSrc);\n\n    const sampleValues = [];\n\n    for (let i = 0; i < maxTextures; i++)\n    {\n        sampleValues[i] = i;\n    }\n\n    shader.bind();\n    shader.uniforms.uSamplers = sampleValues;\n\n    return shader;\n}\n\nfunction generateSampleSrc(maxTextures)\n{\n    let src = '';\n\n    src += '\\n';\n    src += '\\n';\n\n    for (let i = 0; i < maxTextures; i++)\n    {\n        if (i > 0)\n        {\n            src += '\\nelse ';\n        }\n\n        if (i < maxTextures - 1)\n        {\n            src += `if(textureId == ${i}.0)`;\n        }\n\n        src += '\\n{';\n        src += `\\n\\tcolor = texture2D(uSamplers[${i}], vTextureCoord);`;\n        src += '\\n}';\n    }\n\n    src += '\\n';\n    src += '\\n';\n\n    return src;\n}\n","/* eslint max-depth: [2, 8] */\nimport Sprite from '../sprites/Sprite';\nimport Texture from '../textures/Texture';\nimport { Rectangle } from '../math';\nimport { sign } from '../utils';\nimport { TEXT_GRADIENT } from '../const';\nimport settings from '../settings';\nimport TextStyle from './TextStyle';\nimport TextMetrics from './TextMetrics';\nimport trimCanvas from '../utils/trimCanvas';\n\nconst defaultDestroyOptions = {\n    texture: true,\n    children: false,\n    baseTexture: true,\n};\n\n/**\n * A Text Object will create a line or multiple lines of text. To split a line you can use '\\n' in your text string,\n * or add a wordWrap property set to true and and wordWrapWidth property with a value in the style object.\n *\n * A Text can be created directly from a string and a style object\n *\n * ```js\n * let text = new PIXI.Text('This is a PixiJS text',{fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'});\n * ```\n *\n * @class\n * @extends PIXI.Sprite\n * @memberof PIXI\n */\nexport default class Text extends Sprite\n{\n    /**\n     * @param {string} text - The string that you would like the text to display\n     * @param {object|PIXI.TextStyle} [style] - The style parameters\n     * @param {HTMLCanvasElement} [canvas] - The canvas element for drawing text\n     */\n    constructor(text, style, canvas)\n    {\n        canvas = canvas || document.createElement('canvas');\n\n        canvas.width = 3;\n        canvas.height = 3;\n\n        const texture = Texture.fromCanvas(canvas, settings.SCALE_MODE, 'text');\n\n        texture.orig = new Rectangle();\n        texture.trim = new Rectangle();\n\n        super(texture);\n\n        // base texture is already automatically added to the cache, now adding the actual texture\n        Texture.addToCache(this._texture, this._texture.baseTexture.textureCacheIds[0]);\n\n        /**\n         * The canvas element that everything is drawn to\n         *\n         * @member {HTMLCanvasElement}\n         */\n        this.canvas = canvas;\n\n        /**\n         * The canvas 2d context that everything is drawn with\n         * @member {CanvasRenderingContext2D}\n         */\n        this.context = this.canvas.getContext('2d');\n\n        /**\n         * The resolution / device pixel ratio of the canvas. This is set automatically by the renderer.\n         * @member {number}\n         * @default 1\n         */\n        this.resolution = settings.RESOLUTION;\n\n        /**\n         * Private tracker for the current text.\n         *\n         * @member {string}\n         * @private\n         */\n        this._text = null;\n\n        /**\n         * Private tracker for the current style.\n         *\n         * @member {object}\n         * @private\n         */\n        this._style = null;\n        /**\n         * Private listener to track style changes.\n         *\n         * @member {Function}\n         * @private\n         */\n        this._styleListener = null;\n\n        /**\n         * Private tracker for the current font.\n         *\n         * @member {string}\n         * @private\n         */\n        this._font = '';\n\n        this.text = text;\n        this.style = style;\n\n        this.localStyleID = -1;\n    }\n\n    /**\n     * Renders text and updates it when needed.\n     *\n     * @private\n     * @param {boolean} respectDirty - Whether to abort updating the text if the Text isn't dirty and the function is called.\n     */\n    updateText(respectDirty)\n    {\n        const style = this._style;\n\n        // check if style has changed..\n        if (this.localStyleID !== style.styleID)\n        {\n            this.dirty = true;\n            this.localStyleID = style.styleID;\n        }\n\n        if (!this.dirty && respectDirty)\n        {\n            return;\n        }\n\n        this._font = this._style.toFontString();\n\n        const context = this.context;\n        const measured = TextMetrics.measureText(this._text, this._style, this._style.wordWrap, this.canvas);\n        const width = measured.width;\n        const height = measured.height;\n        const lines = measured.lines;\n        const lineHeight = measured.lineHeight;\n        const lineWidths = measured.lineWidths;\n        const maxLineWidth = measured.maxLineWidth;\n        const fontProperties = measured.fontProperties;\n\n        this.canvas.width = Math.ceil((width + (style.padding * 2)) * this.resolution);\n        this.canvas.height = Math.ceil((height + (style.padding * 2)) * this.resolution);\n\n        context.scale(this.resolution, this.resolution);\n\n        context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\n        context.font = this._font;\n        context.strokeStyle = style.stroke;\n        context.lineWidth = style.strokeThickness;\n        context.textBaseline = style.textBaseline;\n        context.lineJoin = style.lineJoin;\n        context.miterLimit = style.miterLimit;\n\n        let linePositionX;\n        let linePositionY;\n\n        if (style.dropShadow)\n        {\n            context.fillStyle = style.dropShadowColor;\n            context.globalAlpha = style.dropShadowAlpha;\n            context.shadowBlur = style.dropShadowBlur;\n\n            if (style.dropShadowBlur > 0)\n            {\n                context.shadowColor = style.dropShadowColor;\n            }\n\n            const xShadowOffset = Math.cos(style.dropShadowAngle) * style.dropShadowDistance;\n            const yShadowOffset = Math.sin(style.dropShadowAngle) * style.dropShadowDistance;\n\n            for (let i = 0; i < lines.length; i++)\n            {\n                linePositionX = style.strokeThickness / 2;\n                linePositionY = ((style.strokeThickness / 2) + (i * lineHeight)) + fontProperties.ascent;\n\n                if (style.align === 'right')\n                {\n                    linePositionX += maxLineWidth - lineWidths[i];\n                }\n                else if (style.align === 'center')\n                {\n                    linePositionX += (maxLineWidth - lineWidths[i]) / 2;\n                }\n\n                if (style.fill)\n                {\n                    this.drawLetterSpacing(\n                        lines[i],\n                        linePositionX + xShadowOffset + style.padding, linePositionY + yShadowOffset + style.padding\n                    );\n\n                    if (style.stroke && style.strokeThickness)\n                    {\n                        context.strokeStyle = style.dropShadowColor;\n                        this.drawLetterSpacing(\n                            lines[i],\n                            linePositionX + xShadowOffset + style.padding, linePositionY + yShadowOffset + style.padding,\n                            true\n                        );\n                        context.strokeStyle = style.stroke;\n                    }\n                }\n            }\n        }\n\n        // reset the shadow blur and alpha that was set by the drop shadow, for the regular text\n        context.shadowBlur = 0;\n        context.globalAlpha = 1;\n\n        // set canvas text styles\n        context.fillStyle = this._generateFillStyle(style, lines);\n\n        // draw lines line by line\n        for (let i = 0; i < lines.length; i++)\n        {\n            linePositionX = style.strokeThickness / 2;\n            linePositionY = ((style.strokeThickness / 2) + (i * lineHeight)) + fontProperties.ascent;\n\n            if (style.align === 'right')\n            {\n                linePositionX += maxLineWidth - lineWidths[i];\n            }\n            else if (style.align === 'center')\n            {\n                linePositionX += (maxLineWidth - lineWidths[i]) / 2;\n            }\n\n            if (style.stroke && style.strokeThickness)\n            {\n                this.drawLetterSpacing(\n                    lines[i],\n                    linePositionX + style.padding,\n                    linePositionY + style.padding,\n                    true\n                );\n            }\n\n            if (style.fill)\n            {\n                this.drawLetterSpacing(\n                    lines[i],\n                    linePositionX + style.padding,\n                    linePositionY + style.padding\n                );\n            }\n        }\n\n        this.updateTexture();\n    }\n\n    /**\n     * Render the text with letter-spacing.\n     * @param {string} text - The text to draw\n     * @param {number} x - Horizontal position to draw the text\n     * @param {number} y - Vertical position to draw the text\n     * @param {boolean} [isStroke=false] - Is this drawing for the outside stroke of the\n     *  text? If not, it's for the inside fill\n     * @private\n     */\n    drawLetterSpacing(text, x, y, isStroke = false)\n    {\n        const style = this._style;\n\n        // letterSpacing of 0 means normal\n        const letterSpacing = style.letterSpacing;\n\n        if (letterSpacing === 0)\n        {\n            if (isStroke)\n            {\n                this.context.strokeText(text, x, y);\n            }\n            else\n            {\n                this.context.fillText(text, x, y);\n            }\n\n            return;\n        }\n\n        const characters = String.prototype.split.call(text, '');\n        let currentPosition = x;\n        let index = 0;\n        let current = '';\n\n        while (index < text.length)\n        {\n            current = characters[index++];\n            if (isStroke)\n            {\n                this.context.strokeText(current, currentPosition, y);\n            }\n            else\n            {\n                this.context.fillText(current, currentPosition, y);\n            }\n            currentPosition += this.context.measureText(current).width + letterSpacing;\n        }\n    }\n\n    /**\n     * Updates texture size based on canvas size\n     *\n     * @private\n     */\n    updateTexture()\n    {\n        const canvas = this.canvas;\n\n        if (this._style.trim)\n        {\n            const trimmed = trimCanvas(canvas);\n\n            canvas.width = trimmed.width;\n            canvas.height = trimmed.height;\n            this.context.putImageData(trimmed.data, 0, 0);\n        }\n\n        const texture = this._texture;\n        const style = this._style;\n        const padding = style.trim ? 0 : style.padding;\n        const baseTexture = texture.baseTexture;\n\n        baseTexture.hasLoaded = true;\n        baseTexture.resolution = this.resolution;\n\n        baseTexture.realWidth = canvas.width;\n        baseTexture.realHeight = canvas.height;\n        baseTexture.width = canvas.width / this.resolution;\n        baseTexture.height = canvas.height / this.resolution;\n\n        texture.trim.width = texture._frame.width = canvas.width / this.resolution;\n        texture.trim.height = texture._frame.height = canvas.height / this.resolution;\n        texture.trim.x = -padding;\n        texture.trim.y = -padding;\n\n        texture.orig.width = texture._frame.width - (padding * 2);\n        texture.orig.height = texture._frame.height - (padding * 2);\n\n        // call sprite onTextureUpdate to update scale if _width or _height were set\n        this._onTextureUpdate();\n\n        baseTexture.emit('update', baseTexture);\n\n        this.dirty = false;\n    }\n\n    /**\n     * Renders the object using the WebGL renderer\n     *\n     * @param {PIXI.WebGLRenderer} renderer - The renderer\n     */\n    renderWebGL(renderer)\n    {\n        if (this.resolution !== renderer.resolution)\n        {\n            this.resolution = renderer.resolution;\n            this.dirty = true;\n        }\n\n        this.updateText(true);\n\n        super.renderWebGL(renderer);\n    }\n\n    /**\n     * Renders the object using the Canvas renderer\n     *\n     * @private\n     * @param {PIXI.CanvasRenderer} renderer - The renderer\n     */\n    _renderCanvas(renderer)\n    {\n        if (this.resolution !== renderer.resolution)\n        {\n            this.resolution = renderer.resolution;\n            this.dirty = true;\n        }\n\n        this.updateText(true);\n\n        super._renderCanvas(renderer);\n    }\n\n    /**\n     * Gets the local bounds of the text object.\n     *\n     * @param {Rectangle} rect - The output rectangle.\n     * @return {Rectangle} The bounds.\n     */\n    getLocalBounds(rect)\n    {\n        this.updateText(true);\n\n        return super.getLocalBounds.call(this, rect);\n    }\n\n    /**\n     * calculates the bounds of the Text as a rectangle. The bounds calculation takes the worldTransform into account.\n     */\n    _calculateBounds()\n    {\n        this.updateText(true);\n        this.calculateVertices();\n        // if we have already done this on THIS frame.\n        this._bounds.addQuad(this.vertexData);\n    }\n\n    /**\n     * Method to be called upon a TextStyle change.\n     * @private\n     */\n    _onStyleChange()\n    {\n        this.dirty = true;\n    }\n\n    /**\n     * Generates the fill style. Can automatically generate a gradient based on the fill style being an array\n     *\n     * @private\n     * @param {object} style - The style.\n     * @param {string[]} lines - The lines of text.\n     * @return {string|number|CanvasGradient} The fill style\n     */\n    _generateFillStyle(style, lines)\n    {\n        if (!Array.isArray(style.fill))\n        {\n            return style.fill;\n        }\n\n        // cocoon on canvas+ cannot generate textures, so use the first colour instead\n        if (navigator.isCocoonJS)\n        {\n            return style.fill[0];\n        }\n\n        // the gradient will be evenly spaced out according to how large the array is.\n        // ['#FF0000', '#00FF00', '#0000FF'] would created stops at 0.25, 0.5 and 0.75\n        let gradient;\n        let totalIterations;\n        let currentIteration;\n        let stop;\n\n        const width = this.canvas.width / this.resolution;\n        const height = this.canvas.height / this.resolution;\n\n        // make a copy of the style settings, so we can manipulate them later\n        const fill = style.fill.slice();\n        const fillGradientStops = style.fillGradientStops.slice();\n\n        // wanting to evenly distribute the fills. So an array of 4 colours should give fills of 0.25, 0.5 and 0.75\n        if (!fillGradientStops.length)\n        {\n            const lengthPlus1 = fill.length + 1;\n\n            for (let i = 1; i < lengthPlus1; ++i)\n            {\n                fillGradientStops.push(i / lengthPlus1);\n            }\n        }\n\n        // stop the bleeding of the last gradient on the line above to the top gradient of the this line\n        // by hard defining the first gradient colour at point 0, and last gradient colour at point 1\n        fill.unshift(style.fill[0]);\n        fillGradientStops.unshift(0);\n\n        fill.push(style.fill[style.fill.length - 1]);\n        fillGradientStops.push(1);\n\n        if (style.fillGradientType === TEXT_GRADIENT.LINEAR_VERTICAL)\n        {\n            // start the gradient at the top center of the canvas, and end at the bottom middle of the canvas\n            gradient = this.context.createLinearGradient(width / 2, 0, width / 2, height);\n\n            // we need to repeat the gradient so that each individual line of text has the same vertical gradient effect\n            // ['#FF0000', '#00FF00', '#0000FF'] over 2 lines would create stops at 0.125, 0.25, 0.375, 0.625, 0.75, 0.875\n            totalIterations = (fill.length + 1) * lines.length;\n            currentIteration = 0;\n            for (let i = 0; i < lines.length; i++)\n            {\n                currentIteration += 1;\n                for (let j = 0; j < fill.length; j++)\n                {\n                    if (typeof fillGradientStops[j] === 'number')\n                    {\n                        stop = (fillGradientStops[j] / lines.length) + (i / lines.length);\n                    }\n                    else\n                    {\n                        stop = currentIteration / totalIterations;\n                    }\n                    gradient.addColorStop(stop, fill[j]);\n                    currentIteration++;\n                }\n            }\n        }\n        else\n        {\n            // start the gradient at the center left of the canvas, and end at the center right of the canvas\n            gradient = this.context.createLinearGradient(0, height / 2, width, height / 2);\n\n            // can just evenly space out the gradients in this case, as multiple lines makes no difference\n            // to an even left to right gradient\n            totalIterations = fill.length + 1;\n            currentIteration = 1;\n\n            for (let i = 0; i < fill.length; i++)\n            {\n                if (typeof fillGradientStops[i] === 'number')\n                {\n                    stop = fillGradientStops[i];\n                }\n                else\n                {\n                    stop = currentIteration / totalIterations;\n                }\n                gradient.addColorStop(stop, fill[i]);\n                currentIteration++;\n            }\n        }\n\n        return gradient;\n    }\n\n    /**\n     * Destroys this text object.\n     * Note* Unlike a Sprite, a Text object will automatically destroy its baseTexture and texture as\n     * the majority of the time the texture will not be shared with any other Sprites.\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have their\n     *  destroy method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=true] - Should it destroy the current texture of the sprite as well\n     * @param {boolean} [options.baseTexture=true] - Should it destroy the base texture of the sprite as well\n     */\n    destroy(options)\n    {\n        if (typeof options === 'boolean')\n        {\n            options = { children: options };\n        }\n\n        options = Object.assign({}, defaultDestroyOptions, options);\n\n        super.destroy(options);\n\n        // make sure to reset the the context and canvas.. dont want this hanging around in memory!\n        this.context = null;\n        this.canvas = null;\n\n        this._style = null;\n    }\n\n    /**\n     * The width of the Text, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        this.updateText(true);\n\n        return Math.abs(this.scale.x) * this._texture.orig.width;\n    }\n\n    set width(value) // eslint-disable-line require-jsdoc\n    {\n        this.updateText(true);\n\n        const s = sign(this.scale.x) || 1;\n\n        this.scale.x = s * value / this._texture.orig.width;\n        this._width = value;\n    }\n\n    /**\n     * The height of the Text, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        this.updateText(true);\n\n        return Math.abs(this.scale.y) * this._texture.orig.height;\n    }\n\n    set height(value) // eslint-disable-line require-jsdoc\n    {\n        this.updateText(true);\n\n        const s = sign(this.scale.y) || 1;\n\n        this.scale.y = s * value / this._texture.orig.height;\n        this._height = value;\n    }\n\n    /**\n     * Set the style of the text. Set up an event listener to listen for changes on the style\n     * object and mark the text as dirty.\n     *\n     * @member {object|PIXI.TextStyle}\n     */\n    get style()\n    {\n        return this._style;\n    }\n\n    set style(style) // eslint-disable-line require-jsdoc\n    {\n        style = style || {};\n\n        if (style instanceof TextStyle)\n        {\n            this._style = style;\n        }\n        else\n        {\n            this._style = new TextStyle(style);\n        }\n\n        this.localStyleID = -1;\n        this.dirty = true;\n    }\n\n    /**\n     * Set the copy for the text object. To split a line you can use '\\n'.\n     *\n     * @member {string}\n     */\n    get text()\n    {\n        return this._text;\n    }\n\n    set text(text) // eslint-disable-line require-jsdoc\n    {\n        text = String(text === '' || text === null || text === undefined ? ' ' : text);\n\n        if (this._text === text)\n        {\n            return;\n        }\n        this._text = text;\n        this.dirty = true;\n    }\n}\n","/**\n * The TextMetrics object represents the measurement of a block of text with a specified style.\n *\n * @class\n * @memberOf PIXI\n */\nexport default class TextMetrics\n{\n    /**\n     * @param {string} text - the text that was measured\n     * @param {PIXI.TextStyle} style - the style that was measured\n     * @param {number} width - the measured width of the text\n     * @param {number} height - the measured height of the text\n     * @param {array} lines - an array of the lines of text broken by new lines and wrapping if specified in style\n     * @param {array} lineWidths - an array of the line widths for each line matched to `lines`\n     * @param {number} lineHeight - the measured line height for this style\n     * @param {number} maxLineWidth - the maximum line width for all measured lines\n     * @param {Object} fontProperties - the font properties object from TextMetrics.measureFont\n     */\n    constructor(text, style, width, height, lines, lineWidths, lineHeight, maxLineWidth, fontProperties)\n    {\n        this.text = text;\n        this.style = style;\n        this.width = width;\n        this.height = height;\n        this.lines = lines;\n        this.lineWidths = lineWidths;\n        this.lineHeight = lineHeight;\n        this.maxLineWidth = maxLineWidth;\n        this.fontProperties = fontProperties;\n    }\n\n    /**\n     * Measures the supplied string of text and returns a Rectangle.\n     *\n     * @param {string} text - the text to measure.\n     * @param {PIXI.TextStyle} style - the text style to use for measuring\n     * @param {boolean} [wordWrap] - optional override for if word-wrap should be applied to the text.\n     * @param {HTMLCanvasElement} [canvas] - optional specification of the canvas to use for measuring.\n     * @return {PIXI.TextMetrics} measured width and height of the text.\n     */\n    static measureText(text, style, wordWrap, canvas = TextMetrics._canvas)\n    {\n        wordWrap = wordWrap || style.wordWrap;\n        const font = style.toFontString();\n        const fontProperties = TextMetrics.measureFont(font);\n        const context = canvas.getContext('2d');\n\n        context.font = font;\n\n        const outputText = wordWrap ? TextMetrics.wordWrap(text, style, canvas) : text;\n        const lines = outputText.split(/(?:\\r\\n|\\r|\\n)/);\n        const lineWidths = new Array(lines.length);\n        let maxLineWidth = 0;\n\n        for (let i = 0; i < lines.length; i++)\n        {\n            const lineWidth = context.measureText(lines[i]).width + ((lines[i].length - 1) * style.letterSpacing);\n\n            lineWidths[i] = lineWidth;\n            maxLineWidth = Math.max(maxLineWidth, lineWidth);\n        }\n        let width = maxLineWidth + style.strokeThickness;\n\n        if (style.dropShadow)\n        {\n            width += style.dropShadowDistance;\n        }\n\n        const lineHeight = style.lineHeight || fontProperties.fontSize + style.strokeThickness;\n        let height = Math.max(lineHeight, fontProperties.fontSize + style.strokeThickness)\n            + ((lines.length - 1) * (lineHeight + style.leading));\n\n        if (style.dropShadow)\n        {\n            height += style.dropShadowDistance;\n        }\n\n        return new TextMetrics(\n            text,\n            style,\n            width,\n            height,\n            lines,\n            lineWidths,\n            lineHeight + style.leading,\n            maxLineWidth,\n            fontProperties\n        );\n    }\n\n    /**\n     * Applies newlines to a string to have it optimally fit into the horizontal\n     * bounds set by the Text object's wordWrapWidth property.\n     *\n     * @private\n     * @param {string} text - String to apply word wrapping to\n     * @param {PIXI.TextStyle} style - the style to use when wrapping\n     * @param {HTMLCanvasElement} [canvas] - optional specification of the canvas to use for measuring.\n     * @return {string} New string with new lines applied where required\n     */\n    static wordWrap(text, style, canvas = TextMetrics._canvas)\n    {\n        const context = canvas.getContext('2d');\n\n        // Greedy wrapping algorithm that will wrap words as the line grows longer\n        // than its horizontal bounds.\n        let result = '';\n        const lines = text.split('\\n');\n        const wordWrapWidth = style.wordWrapWidth;\n        const characterCache = {};\n\n        for (let i = 0; i < lines.length; i++)\n        {\n            let spaceLeft = wordWrapWidth;\n            const words = lines[i].split(' ');\n\n            for (let j = 0; j < words.length; j++)\n            {\n                const wordWidth = context.measureText(words[j]).width;\n\n                if (style.breakWords && wordWidth > wordWrapWidth)\n                {\n                    // Word should be split in the middle\n                    const characters = words[j].split('');\n\n                    for (let c = 0; c < characters.length; c++)\n                    {\n                        const character = characters[c];\n                        let characterWidth = characterCache[character];\n\n                        if (characterWidth === undefined)\n                        {\n                            characterWidth = context.measureText(character).width;\n                            characterCache[character] = characterWidth;\n                        }\n\n                        if (characterWidth > spaceLeft)\n                        {\n                            result += `\\n${character}`;\n                            spaceLeft = wordWrapWidth - characterWidth;\n                        }\n                        else\n                        {\n                            if (c === 0)\n                            {\n                                result += ' ';\n                            }\n\n                            result += character;\n                            spaceLeft -= characterWidth;\n                        }\n                    }\n                }\n                else\n                {\n                    const wordWidthWithSpace = wordWidth + context.measureText(' ').width;\n\n                    if (j === 0 || wordWidthWithSpace > spaceLeft)\n                    {\n                        // Skip printing the newline if it's the first word of the line that is\n                        // greater than the word wrap width.\n                        if (j > 0)\n                        {\n                            result += '\\n';\n                        }\n                        result += words[j];\n                        spaceLeft = wordWrapWidth - wordWidth;\n                    }\n                    else\n                    {\n                        spaceLeft -= wordWidthWithSpace;\n                        result += ` ${words[j]}`;\n                    }\n                }\n            }\n\n            if (i < lines.length - 1)\n            {\n                result += '\\n';\n            }\n        }\n\n        return result;\n    }\n\n    /**\n     * Calculates the ascent, descent and fontSize of a given font-style\n     *\n     * @static\n     * @param {string} font - String representing the style of the font\n     * @return {PIXI.TextMetrics~FontMetrics} Font properties object\n     */\n    static measureFont(font)\n    {\n        // as this method is used for preparing assets, don't recalculate things if we don't need to\n        if (TextMetrics._fonts[font])\n        {\n            return TextMetrics._fonts[font];\n        }\n\n        const properties = {};\n\n        const canvas = TextMetrics._canvas;\n        const context = TextMetrics._context;\n\n        context.font = font;\n\n        const width = Math.ceil(context.measureText('|MÉq').width);\n        let baseline = Math.ceil(context.measureText('M').width);\n        const height = 2 * baseline;\n\n        baseline = baseline * 1.4 | 0;\n\n        canvas.width = width;\n        canvas.height = height;\n\n        context.fillStyle = '#f00';\n        context.fillRect(0, 0, width, height);\n\n        context.font = font;\n\n        context.textBaseline = 'alphabetic';\n        context.fillStyle = '#000';\n        context.fillText('|MÉq', 0, baseline);\n\n        const imagedata = context.getImageData(0, 0, width, height).data;\n        const pixels = imagedata.length;\n        const line = width * 4;\n\n        let i = 0;\n        let idx = 0;\n        let stop = false;\n\n        // ascent. scan from top to bottom until we find a non red pixel\n        for (i = 0; i < baseline; ++i)\n        {\n            for (let j = 0; j < line; j += 4)\n            {\n                if (imagedata[idx + j] !== 255)\n                {\n                    stop = true;\n                    break;\n                }\n            }\n            if (!stop)\n            {\n                idx += line;\n            }\n            else\n            {\n                break;\n            }\n        }\n\n        properties.ascent = baseline - i;\n\n        idx = pixels - line;\n        stop = false;\n\n        // descent. scan from bottom to top until we find a non red pixel\n        for (i = height; i > baseline; --i)\n        {\n            for (let j = 0; j < line; j += 4)\n            {\n                if (imagedata[idx + j] !== 255)\n                {\n                    stop = true;\n                    break;\n                }\n            }\n\n            if (!stop)\n            {\n                idx -= line;\n            }\n            else\n            {\n                break;\n            }\n        }\n\n        properties.descent = i - baseline;\n        properties.fontSize = properties.ascent + properties.descent;\n\n        TextMetrics._fonts[font] = properties;\n\n        return properties;\n    }\n}\n\n/**\n * Internal return object for {@link PIXI.TextMetrics.measureFont `TextMetrics.measureFont`}.\n * @class FontMetrics\n * @memberof PIXI.TextMetrics~\n * @property {number} ascent - The ascent distance\n * @property {number} descent - The descent distance\n * @property {number} fontSize - Font size from ascent to descent\n */\n\nconst canvas = document.createElement('canvas');\n\ncanvas.width = canvas.height = 10;\n\n/**\n * Cached canvas element for measuring text\n * @memberof PIXI.TextMetrics\n * @type {HTMLCanvasElement}\n * @private\n */\nTextMetrics._canvas = canvas;\n\n/**\n * Cache for context to use.\n * @memberof PIXI.TextMetrics\n * @type {CanvasRenderingContext2D}\n * @private\n */\nTextMetrics._context = canvas.getContext('2d');\n\n/**\n * Cache of PIXI.TextMetrics~FontMetrics objects.\n * @memberof PIXI.TextMetrics\n * @type {Object}\n * @private\n */\nTextMetrics._fonts = {};\n","// disabling eslint for now, going to rewrite this in v5\n/* eslint-disable */\n\nimport { TEXT_GRADIENT } from '../const';\nimport { hex2string } from '../utils';\n\nconst defaultStyle = {\n    align: 'left',\n    breakWords: false,\n    dropShadow: false,\n    dropShadowAlpha: 1,\n    dropShadowAngle: Math.PI / 6,\n    dropShadowBlur: 0,\n    dropShadowColor: 'black',\n    dropShadowDistance: 5,\n    fill: 'black',\n    fillGradientType: TEXT_GRADIENT.LINEAR_VERTICAL,\n    fillGradientStops: [],\n    fontFamily: 'Arial',\n    fontSize: 26,\n    fontStyle: 'normal',\n    fontVariant: 'normal',\n    fontWeight: 'normal',\n    letterSpacing: 0,\n    lineHeight: 0,\n    lineJoin: 'miter',\n    miterLimit: 10,\n    padding: 0,\n    stroke: 'black',\n    strokeThickness: 0,\n    textBaseline: 'alphabetic',\n    trim: false,\n    wordWrap: false,\n    wordWrapWidth: 100,\n    leading: 0,\n};\n\n/**\n * A TextStyle Object decorates a Text Object. It can be shared between\n * multiple Text objects. Changing the style will update all text objects using it.\n *\n * @class\n * @memberof PIXI\n */\nexport default class TextStyle\n{\n    /**\n     * @param {object} [style] - The style parameters\n     * @param {string} [style.align='left'] - Alignment for multiline text ('left', 'center' or 'right'),\n     *  does not affect single line text\n     * @param {boolean} [style.breakWords=false] - Indicates if lines can be wrapped within words, it\n     *  needs wordWrap to be set to true\n     * @param {boolean} [style.dropShadow=false] - Set a drop shadow for the text\n     * @param {number} [style.dropShadowAlpha=1] - Set alpha for the drop shadow\n     * @param {number} [style.dropShadowAngle=Math.PI/6] - Set a angle of the drop shadow\n     * @param {number} [style.dropShadowBlur=0] - Set a shadow blur radius\n     * @param {string|number} [style.dropShadowColor='black'] - A fill style to be used on the dropshadow e.g 'red', '#00FF00'\n     * @param {number} [style.dropShadowDistance=5] - Set a distance of the drop shadow\n     * @param {string|string[]|number|number[]|CanvasGradient|CanvasPattern} [style.fill='black'] - A canvas\n     *  fillstyle that will be used on the text e.g 'red', '#00FF00'. Can be an array to create a gradient\n     *  eg ['#000000','#FFFFFF']\n     * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN}\n     * @param {number} [style.fillGradientType=PIXI.TEXT_GRADIENT.LINEAR_VERTICAL] - If fill is an array of colours\n     *  to create a gradient, this can change the type/direction of the gradient. See {@link PIXI.TEXT_GRADIENT}\n     * @param {number[]} [style.fillGradientStops] - If fill is an array of colours to create a gradient, this array can set\n     * the stop points (numbers between 0 and 1) for the color, overriding the default behaviour of evenly spacing them.\n     * @param {string|string[]} [style.fontFamily='Arial'] - The font family\n     * @param {number|string} [style.fontSize=26] - The font size (as a number it converts to px, but as a string,\n     *  equivalents are '26px','20pt','160%' or '1.6em')\n     * @param {string} [style.fontStyle='normal'] - The font style ('normal', 'italic' or 'oblique')\n     * @param {string} [style.fontVariant='normal'] - The font variant ('normal' or 'small-caps')\n     * @param {string} [style.fontWeight='normal'] - The font weight ('normal', 'bold', 'bolder', 'lighter' and '100',\n     *  '200', '300', '400', '500', '600', '700', 800' or '900')\n     * @param {number} [style.leading=0] - The space between lines\n     * @param {number} [style.letterSpacing=0] - The amount of spacing between letters, default is 0\n     * @param {number} [style.lineHeight] - The line height, a number that represents the vertical space that a letter uses\n     * @param {string} [style.lineJoin='miter'] - The lineJoin property sets the type of corner created, it can resolve\n     *      spiked text issues. Default is 'miter' (creates a sharp corner).\n     * @param {number} [style.miterLimit=10] - The miter limit to use when using the 'miter' lineJoin mode. This can reduce\n     *      or increase the spikiness of rendered text.\n     * @param {number} [style.padding=0] - Occasionally some fonts are cropped. Adding some padding will prevent this from\n     *     happening by adding padding to all sides of the text.\n     * @param {string|number} [style.stroke='black'] - A canvas fillstyle that will be used on the text stroke\n     *  e.g 'blue', '#FCFF00'\n     * @param {number} [style.strokeThickness=0] - A number that represents the thickness of the stroke.\n     *  Default is 0 (no stroke)\n     * @param {boolean} [style.trim=false] - Trim transparent borders\n     * @param {string} [style.textBaseline='alphabetic'] - The baseline of the text that is rendered.\n     * @param {boolean} [style.wordWrap=false] - Indicates if word wrap should be used\n     * @param {number} [style.wordWrapWidth=100] - The width at which text will wrap, it needs wordWrap to be set to true\n     */\n    constructor(style)\n    {\n        this.styleID = 0;\n\n        Object.assign(this, defaultStyle, style);\n    }\n\n    /**\n     * Creates a new TextStyle object with the same values as this one.\n     * Note that the only the properties of the object are cloned.\n     *\n     * @return {PIXI.TextStyle} New cloned TextStyle object\n     */\n    clone()\n    {\n        const clonedProperties = {};\n\n        for (const key in defaultStyle)\n        {\n            clonedProperties[key] = this[key];\n        }\n\n        return new TextStyle(clonedProperties);\n    }\n\n    /**\n     * Resets all properties to the defaults specified in TextStyle.prototype._default\n     */\n    reset()\n    {\n        Object.assign(this, defaultStyle);\n    }\n\n    /**\n     * Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text\n     *\n     * @member {string}\n     */\n    get align()\n    {\n        return this._align;\n    }\n    set align(align) // eslint-disable-line require-jsdoc\n    {\n        if (this._align !== align)\n        {\n            this._align = align;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Indicates if lines can be wrapped within words, it needs wordWrap to be set to true\n     *\n     * @member {boolean}\n     */\n    get breakWords()\n    {\n        return this._breakWords;\n    }\n    set breakWords(breakWords) // eslint-disable-line require-jsdoc\n    {\n        if (this._breakWords !== breakWords)\n        {\n            this._breakWords = breakWords;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Set a drop shadow for the text\n     *\n     * @member {boolean}\n     */\n    get dropShadow()\n    {\n        return this._dropShadow;\n    }\n    set dropShadow(dropShadow) // eslint-disable-line require-jsdoc\n    {\n        if (this._dropShadow !== dropShadow)\n        {\n            this._dropShadow = dropShadow;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Set alpha for the drop shadow\n     *\n     * @member {number}\n     */\n    get dropShadowAlpha()\n    {\n        return this._dropShadowAlpha;\n    }\n    set dropShadowAlpha(dropShadowAlpha) // eslint-disable-line require-jsdoc\n    {\n        if (this._dropShadowAlpha !== dropShadowAlpha)\n        {\n            this._dropShadowAlpha = dropShadowAlpha;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Set a angle of the drop shadow\n     *\n     * @member {number}\n     */\n    get dropShadowAngle()\n    {\n        return this._dropShadowAngle;\n    }\n    set dropShadowAngle(dropShadowAngle) // eslint-disable-line require-jsdoc\n    {\n        if (this._dropShadowAngle !== dropShadowAngle)\n        {\n            this._dropShadowAngle = dropShadowAngle;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Set a shadow blur radius\n     *\n     * @member {number}\n     */\n    get dropShadowBlur()\n    {\n        return this._dropShadowBlur;\n    }\n    set dropShadowBlur(dropShadowBlur) // eslint-disable-line require-jsdoc\n    {\n        if (this._dropShadowBlur !== dropShadowBlur)\n        {\n            this._dropShadowBlur = dropShadowBlur;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * A fill style to be used on the dropshadow e.g 'red', '#00FF00'\n     *\n     * @member {string|number}\n     */\n    get dropShadowColor()\n    {\n        return this._dropShadowColor;\n    }\n    set dropShadowColor(dropShadowColor) // eslint-disable-line require-jsdoc\n    {\n        const outputColor = getColor(dropShadowColor);\n        if (this._dropShadowColor !== outputColor)\n        {\n            this._dropShadowColor = outputColor;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Set a distance of the drop shadow\n     *\n     * @member {number}\n     */\n    get dropShadowDistance()\n    {\n        return this._dropShadowDistance;\n    }\n    set dropShadowDistance(dropShadowDistance) // eslint-disable-line require-jsdoc\n    {\n        if (this._dropShadowDistance !== dropShadowDistance)\n        {\n            this._dropShadowDistance = dropShadowDistance;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * A canvas fillstyle that will be used on the text e.g 'red', '#00FF00'.\n     * Can be an array to create a gradient eg ['#000000','#FFFFFF']\n     * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN}\n     *\n     * @member {string|string[]|number|number[]|CanvasGradient|CanvasPattern}\n     */\n    get fill()\n    {\n        return this._fill;\n    }\n    set fill(fill) // eslint-disable-line require-jsdoc\n    {\n        const outputColor = getColor(fill);\n        if (this._fill !== outputColor)\n        {\n            this._fill = outputColor;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * If fill is an array of colours to create a gradient, this can change the type/direction of the gradient.\n     * See {@link PIXI.TEXT_GRADIENT}\n     *\n     * @member {number}\n     */\n    get fillGradientType()\n    {\n        return this._fillGradientType;\n    }\n    set fillGradientType(fillGradientType) // eslint-disable-line require-jsdoc\n    {\n        if (this._fillGradientType !== fillGradientType)\n        {\n            this._fillGradientType = fillGradientType;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * If fill is an array of colours to create a gradient, this array can set the stop points\n     * (numbers between 0 and 1) for the color, overriding the default behaviour of evenly spacing them.\n     *\n     * @member {number[]}\n     */\n    get fillGradientStops()\n    {\n        return this._fillGradientStops;\n    }\n    set fillGradientStops(fillGradientStops) // eslint-disable-line require-jsdoc\n    {\n        if (!areArraysEqual(this._fillGradientStops,fillGradientStops))\n        {\n            this._fillGradientStops = fillGradientStops;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The font family\n     *\n     * @member {string|string[]}\n     */\n    get fontFamily()\n    {\n        return this._fontFamily;\n    }\n    set fontFamily(fontFamily) // eslint-disable-line require-jsdoc\n    {\n        if (this.fontFamily !== fontFamily)\n        {\n            this._fontFamily = fontFamily;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The font size\n     * (as a number it converts to px, but as a string, equivalents are '26px','20pt','160%' or '1.6em')\n     *\n     * @member {number|string}\n     */\n    get fontSize()\n    {\n        return this._fontSize;\n    }\n    set fontSize(fontSize) // eslint-disable-line require-jsdoc\n    {\n        if (this._fontSize !== fontSize)\n        {\n            this._fontSize = fontSize;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The font style\n     * ('normal', 'italic' or 'oblique')\n     *\n     * @member {string}\n     */\n    get fontStyle()\n    {\n        return this._fontStyle;\n    }\n    set fontStyle(fontStyle) // eslint-disable-line require-jsdoc\n    {\n        if (this._fontStyle !== fontStyle)\n        {\n            this._fontStyle = fontStyle;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The font variant\n     * ('normal' or 'small-caps')\n     *\n     * @member {string}\n     */\n    get fontVariant()\n    {\n        return this._fontVariant;\n    }\n    set fontVariant(fontVariant) // eslint-disable-line require-jsdoc\n    {\n        if (this._fontVariant !== fontVariant)\n        {\n            this._fontVariant = fontVariant;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The font weight\n     * ('normal', 'bold', 'bolder', 'lighter' and '100', '200', '300', '400', '500', '600', '700', 800' or '900')\n     *\n     * @member {string}\n     */\n    get fontWeight()\n    {\n        return this._fontWeight;\n    }\n    set fontWeight(fontWeight) // eslint-disable-line require-jsdoc\n    {\n        if (this._fontWeight !== fontWeight)\n        {\n            this._fontWeight = fontWeight;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The amount of spacing between letters, default is 0\n     *\n     * @member {number}\n     */\n    get letterSpacing()\n    {\n        return this._letterSpacing;\n    }\n    set letterSpacing(letterSpacing) // eslint-disable-line require-jsdoc\n    {\n        if (this._letterSpacing !== letterSpacing)\n        {\n            this._letterSpacing = letterSpacing;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The line height, a number that represents the vertical space that a letter uses\n     *\n     * @member {number}\n     */\n    get lineHeight()\n    {\n        return this._lineHeight;\n    }\n    set lineHeight(lineHeight) // eslint-disable-line require-jsdoc\n    {\n        if (this._lineHeight !== lineHeight)\n        {\n            this._lineHeight = lineHeight;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The space between lines\n     *\n     * @member {number}\n     */\n    get leading()\n    {\n        return this._leading;\n    }\n    set leading(leading) // eslint-disable-line require-jsdoc\n    {\n        if (this._leading !== leading)\n        {\n            this._leading = leading;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The lineJoin property sets the type of corner created, it can resolve spiked text issues.\n     * Default is 'miter' (creates a sharp corner).\n     *\n     * @member {string}\n     */\n    get lineJoin()\n    {\n        return this._lineJoin;\n    }\n    set lineJoin(lineJoin) // eslint-disable-line require-jsdoc\n    {\n        if (this._lineJoin !== lineJoin)\n        {\n            this._lineJoin = lineJoin;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The miter limit to use when using the 'miter' lineJoin mode\n     * This can reduce or increase the spikiness of rendered text.\n     *\n     * @member {number}\n     */\n    get miterLimit()\n    {\n        return this._miterLimit;\n    }\n    set miterLimit(miterLimit) // eslint-disable-line require-jsdoc\n    {\n        if (this._miterLimit !== miterLimit)\n        {\n            this._miterLimit = miterLimit;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Occasionally some fonts are cropped. Adding some padding will prevent this from happening\n     * by adding padding to all sides of the text.\n     *\n     * @member {number}\n     */\n    get padding()\n    {\n        return this._padding;\n    }\n    set padding(padding) // eslint-disable-line require-jsdoc\n    {\n        if (this._padding !== padding)\n        {\n            this._padding = padding;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * A canvas fillstyle that will be used on the text stroke\n     * e.g 'blue', '#FCFF00'\n     *\n     * @member {string|number}\n     */\n    get stroke()\n    {\n        return this._stroke;\n    }\n    set stroke(stroke) // eslint-disable-line require-jsdoc\n    {\n        const outputColor = getColor(stroke);\n        if (this._stroke !== outputColor)\n        {\n            this._stroke = outputColor;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * A number that represents the thickness of the stroke.\n     * Default is 0 (no stroke)\n     *\n     * @member {number}\n     */\n    get strokeThickness()\n    {\n        return this._strokeThickness;\n    }\n    set strokeThickness(strokeThickness) // eslint-disable-line require-jsdoc\n    {\n        if (this._strokeThickness !== strokeThickness)\n        {\n            this._strokeThickness = strokeThickness;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The baseline of the text that is rendered.\n     *\n     * @member {string}\n     */\n    get textBaseline()\n    {\n        return this._textBaseline;\n    }\n    set textBaseline(textBaseline) // eslint-disable-line require-jsdoc\n    {\n        if (this._textBaseline !== textBaseline)\n        {\n            this._textBaseline = textBaseline;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Trim transparent borders\n     *\n     * @member {boolean}\n     */\n    get trim()\n    {\n        return this._trim;\n    }\n    set trim(trim) // eslint-disable-line require-jsdoc\n    {\n        if (this._trim !== trim)\n        {\n            this._trim = trim;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Indicates if word wrap should be used\n     *\n     * @member {boolean}\n     */\n    get wordWrap()\n    {\n        return this._wordWrap;\n    }\n    set wordWrap(wordWrap) // eslint-disable-line require-jsdoc\n    {\n        if (this._wordWrap !== wordWrap)\n        {\n            this._wordWrap = wordWrap;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * The width at which text will wrap, it needs wordWrap to be set to true\n     *\n     * @member {number}\n     */\n    get wordWrapWidth()\n    {\n        return this._wordWrapWidth;\n    }\n    set wordWrapWidth(wordWrapWidth) // eslint-disable-line require-jsdoc\n    {\n        if (this._wordWrapWidth !== wordWrapWidth)\n        {\n            this._wordWrapWidth = wordWrapWidth;\n            this.styleID++;\n        }\n    }\n\n    /**\n     * Generates a font style string to use for `TextMetrics.measureFont()`.\n     *\n     * @return {string} Font style string, for passing to `TextMetrics.measureFont()`\n     */\n    toFontString()\n    {\n        // build canvas api font setting from individual components. Convert a numeric this.fontSize to px\n        const fontSizeString = (typeof this.fontSize === 'number') ? `${this.fontSize}px` : this.fontSize;\n\n        // Clean-up fontFamily property by quoting each font name\n        // this will support font names with spaces\n        let fontFamilies = this.fontFamily;\n\n        if (!Array.isArray(this.fontFamily))\n        {\n            fontFamilies = this.fontFamily.split(',');\n        }\n\n        for (let i = fontFamilies.length - 1; i >= 0; i--)\n        {\n            // Trim any extra white-space\n            let fontFamily = fontFamilies[i].trim();\n\n            // Check if font already contains strings\n            if (!(/([\\\"\\'])[^\\'\\\"]+\\1/).test(fontFamily))\n            {\n                fontFamily = `\"${fontFamily}\"`;\n            }\n            fontFamilies[i] = fontFamily;\n        }\n\n        return `${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${fontSizeString} ${fontFamilies.join(',')}`;\n    }\n}\n\n/**\n * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.\n *\n * @param {number|number[]} color\n * @return {string} The color as a string.\n */\nfunction getSingleColor(color)\n{\n    if (typeof color === 'number')\n    {\n        return hex2string(color);\n    }\n    else if ( typeof color === 'string' )\n    {\n        if ( color.indexOf('0x') === 0 )\n        {\n            color = color.replace('0x', '#');\n        }\n    }\n\n    return color;\n}\n\n/**\n * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.\n * This version can also convert array of colors\n *\n * @param {number|number[]} color\n * @return {string} The color as a string.\n */\nfunction getColor(color)\n{\n    if (!Array.isArray(color))\n    {\n        return getSingleColor(color);\n    }\n    else\n    {\n        for (let i = 0; i < color.length; ++i)\n        {\n            color[i] = getSingleColor(color[i]);\n        }\n\n        return color;\n    }\n}\n\n/**\n * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.\n * This version can also convert array of colors\n *\n * @param {Array} array1 First array to compare\n * @param {Array} array2 Second array to compare\n * @return {boolean} Do the arrays contain the same values in the same order\n */\nfunction areArraysEqual(array1, array2)\n{\n    if (!Array.isArray(array1) || !Array.isArray(array2))\n    {\n        return false;\n    }\n\n    if (array1.length !== array2.length)\n    {\n        return false;\n    }\n\n    for (let i = 0; i < array1.length; ++i)\n    {\n        if (array1[i] !== array2[i])\n        {\n            return false;\n        }\n    }\n\n    return true;\n}\n","import BaseTexture from './BaseTexture';\nimport settings from '../settings';\n\n/**\n * A BaseRenderTexture is a special texture that allows any PixiJS display object to be rendered to it.\n *\n * __Hint__: All DisplayObjects (i.e. Sprites) that render to a BaseRenderTexture should be preloaded\n * otherwise black rectangles will be drawn instead.\n *\n * A BaseRenderTexture takes a snapshot of any Display Object given to its render method. The position\n * and rotation of the given Display Objects is ignored. For example:\n *\n * ```js\n * let renderer = PIXI.autoDetectRenderer(1024, 1024, { view: canvas, ratio: 1 });\n * let baseRenderTexture = new PIXI.BaseRenderTexture(renderer, 800, 600);\n * let sprite = PIXI.Sprite.fromImage(\"spinObj_01.png\");\n *\n * sprite.position.x = 800/2;\n * sprite.position.y = 600/2;\n * sprite.anchor.x = 0.5;\n * sprite.anchor.y = 0.5;\n *\n * baseRenderTexture.render(sprite);\n * ```\n *\n * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0\n * you can clear the transform\n *\n * ```js\n *\n * sprite.setTransform()\n *\n * let baseRenderTexture = new PIXI.BaseRenderTexture(100, 100);\n * let renderTexture = new PIXI.RenderTexture(baseRenderTexture);\n *\n * renderer.render(sprite, renderTexture);  // Renders to center of RenderTexture\n * ```\n *\n * @class\n * @extends PIXI.BaseTexture\n * @memberof PIXI\n */\nexport default class BaseRenderTexture extends BaseTexture\n{\n    /**\n     * @param {number} [width=100] - The width of the base render texture\n     * @param {number} [height=100] - The height of the base render texture\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     * @param {number} [resolution=1] - The resolution / device pixel ratio of the texture being generated\n     */\n    constructor(width = 100, height = 100, scaleMode, resolution)\n    {\n        super(null, scaleMode);\n\n        this.resolution = resolution || settings.RESOLUTION;\n\n        this.width = width;\n        this.height = height;\n\n        this.realWidth = this.width * this.resolution;\n        this.realHeight = this.height * this.resolution;\n\n        this.scaleMode = scaleMode !== undefined ? scaleMode : settings.SCALE_MODE;\n        this.hasLoaded = true;\n\n        /**\n         * A map of renderer IDs to webgl renderTargets\n         *\n         * @private\n         * @member {object<number, WebGLTexture>}\n         */\n        this._glRenderTargets = {};\n\n        /**\n         * A reference to the canvas render target (we only need one as this can be shared across renderers)\n         *\n         * @private\n         * @member {object<number, WebGLTexture>}\n         */\n        this._canvasRenderTarget = null;\n\n        /**\n         * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.\n         *\n         * @member {boolean}\n         */\n        this.valid = false;\n    }\n\n    /**\n     * Resizes the BaseRenderTexture.\n     *\n     * @param {number} width - The width to resize to.\n     * @param {number} height - The height to resize to.\n     */\n    resize(width, height)\n    {\n        if (width === this.width && height === this.height)\n        {\n            return;\n        }\n\n        this.valid = (width > 0 && height > 0);\n\n        this.width = width;\n        this.height = height;\n\n        this.realWidth = this.width * this.resolution;\n        this.realHeight = this.height * this.resolution;\n\n        if (!this.valid)\n        {\n            return;\n        }\n\n        this.emit('update', this);\n    }\n\n    /**\n     * Destroys this texture\n     *\n     */\n    destroy()\n    {\n        super.destroy(true);\n        this.renderer = null;\n    }\n}\n","import {\n    uid, getUrlFileExtension, decomposeDataUri, getSvgSize,\n    getResolutionOfUrl, BaseTextureCache, TextureCache,\n} from '../utils';\nimport settings from '../settings';\nimport EventEmitter from 'eventemitter3';\nimport determineCrossOrigin from '../utils/determineCrossOrigin';\nimport bitTwiddle from 'bit-twiddle';\n\n/**\n * A texture stores the information that represents an image. All textures have a base texture.\n *\n * @class\n * @extends EventEmitter\n * @memberof PIXI\n */\nexport default class BaseTexture extends EventEmitter\n{\n    /**\n     * @param {HTMLImageElement|HTMLCanvasElement} [source] - the source object of the texture.\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     * @param {number} [resolution=1] - The resolution / device pixel ratio of the texture\n     */\n    constructor(source, scaleMode, resolution)\n    {\n        super();\n\n        this.uid = uid();\n\n        this.touched = 0;\n\n        /**\n         * The resolution / device pixel ratio of the texture\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.resolution = resolution || settings.RESOLUTION;\n\n        /**\n         * The width of the base texture set when the image has loaded\n         *\n         * @readonly\n         * @member {number}\n         */\n        this.width = 100;\n\n        /**\n         * The height of the base texture set when the image has loaded\n         *\n         * @readonly\n         * @member {number}\n         */\n        this.height = 100;\n\n        // TODO docs\n        // used to store the actual dimensions of the source\n        /**\n         * Used to store the actual width of the source of this texture\n         *\n         * @readonly\n         * @member {number}\n         */\n        this.realWidth = 100;\n        /**\n         * Used to store the actual height of the source of this texture\n         *\n         * @readonly\n         * @member {number}\n         */\n        this.realHeight = 100;\n\n        /**\n         * The scale mode to apply when scaling this texture\n         *\n         * @member {number}\n         * @default PIXI.settings.SCALE_MODE\n         * @see PIXI.SCALE_MODES\n         */\n        this.scaleMode = scaleMode !== undefined ? scaleMode : settings.SCALE_MODE;\n\n        /**\n         * Set to true once the base texture has successfully loaded.\n         *\n         * This is never true if the underlying source fails to load or has no texture data.\n         *\n         * @readonly\n         * @member {boolean}\n         */\n        this.hasLoaded = false;\n\n        /**\n         * Set to true if the source is currently loading.\n         *\n         * If an Image source is loading the 'loaded' or 'error' event will be\n         * dispatched when the operation ends. An underyling source that is\n         * immediately-available bypasses loading entirely.\n         *\n         * @readonly\n         * @member {boolean}\n         */\n        this.isLoading = false;\n\n        /**\n         * The image source that is used to create the texture.\n         *\n         * TODO: Make this a setter that calls loadSource();\n         *\n         * @readonly\n         * @member {HTMLImageElement|HTMLCanvasElement}\n         */\n        this.source = null; // set in loadSource, if at all\n\n        /**\n         * The image source that is used to create the texture. This is used to\n         * store the original Svg source when it is replaced with a canvas element.\n         *\n         * TODO: Currently not in use but could be used when re-scaling svg.\n         *\n         * @readonly\n         * @member {Image}\n         */\n        this.origSource = null; // set in loadSvg, if at all\n\n        /**\n         * Type of image defined in source, eg. `png` or `svg`\n         *\n         * @readonly\n         * @member {string}\n         */\n        this.imageType = null; // set in updateImageType\n\n        /**\n         * Scale for source image. Used with Svg images to scale them before rasterization.\n         *\n         * @readonly\n         * @member {number}\n         */\n        this.sourceScale = 1.0;\n\n        /**\n         * Controls if RGB channels should be pre-multiplied by Alpha  (WebGL only)\n         * All blend modes, and shaders written for default value. Change it on your own risk.\n         *\n         * @member {boolean}\n         * @default true\n         */\n        this.premultipliedAlpha = true;\n\n        /**\n         * The image url of the texture\n         *\n         * @member {string}\n         */\n        this.imageUrl = null;\n\n        /**\n         * Whether or not the texture is a power of two, try to use power of two textures as much\n         * as you can\n         *\n         * @private\n         * @member {boolean}\n         */\n        this.isPowerOfTwo = false;\n\n        // used for webGL\n\n        /**\n         *\n         * Set this to true if a mipmap of this texture needs to be generated. This value needs\n         * to be set before the texture is used\n         * Also the texture must be a power of two size to work\n         *\n         * @member {boolean}\n         * @see PIXI.MIPMAP_TEXTURES\n         */\n        this.mipmap = settings.MIPMAP_TEXTURES;\n\n        /**\n         *\n         * WebGL Texture wrap mode\n         *\n         * @member {number}\n         * @see PIXI.WRAP_MODES\n         */\n        this.wrapMode = settings.WRAP_MODE;\n\n        /**\n         * A map of renderer IDs to webgl textures\n         *\n         * @private\n         * @member {object<number, WebGLTexture>}\n         */\n        this._glTextures = {};\n\n        this._enabled = 0;\n        this._virtalBoundId = -1;\n\n        /**\n         * If the object has been destroyed via destroy(). If true, it should not be used.\n         *\n         * @member {boolean}\n         * @private\n         * @readonly\n         */\n        this._destroyed = false;\n\n        /**\n         * The ids under which this BaseTexture has been added to the base texture cache. This is\n         * automatically set as long as BaseTexture.addToCache is used, but may not be set if a\n         * BaseTexture is added directly to the BaseTextureCache array.\n         *\n         * @member {string[]}\n         */\n        this.textureCacheIds = [];\n\n        // if no source passed don't try to load\n        if (source)\n        {\n            this.loadSource(source);\n        }\n\n        /**\n         * Fired when a not-immediately-available source finishes loading.\n         *\n         * @protected\n         * @event PIXI.BaseTexture#loaded\n         * @param {PIXI.BaseTexture} baseTexture - Resource loaded.\n         */\n\n        /**\n         * Fired when a not-immediately-available source fails to load.\n         *\n         * @protected\n         * @event PIXI.BaseTexture#error\n         * @param {PIXI.BaseTexture} baseTexture - Resource errored.\n         */\n\n        /**\n         * Fired when BaseTexture is updated.\n         *\n         * @protected\n         * @event PIXI.BaseTexture#update\n         * @param {PIXI.BaseTexture} baseTexture - Instance of texture being updated.\n         */\n\n        /**\n         * Fired when BaseTexture is destroyed.\n         *\n         * @protected\n         * @event PIXI.BaseTexture#dispose\n         * @param {PIXI.BaseTexture} baseTexture - Instance of texture being destroyed.\n         */\n    }\n\n    /**\n     * Updates the texture on all the webgl renderers, this also assumes the src has changed.\n     *\n     * @fires PIXI.BaseTexture#update\n     */\n    update()\n    {\n        // Svg size is handled during load\n        if (this.imageType !== 'svg')\n        {\n            this.realWidth = this.source.naturalWidth || this.source.videoWidth || this.source.width;\n            this.realHeight = this.source.naturalHeight || this.source.videoHeight || this.source.height;\n\n            this._updateDimensions();\n        }\n\n        this.emit('update', this);\n    }\n\n    /**\n     * Update dimensions from real values\n     */\n    _updateDimensions()\n    {\n        this.width = this.realWidth / this.resolution;\n        this.height = this.realHeight / this.resolution;\n\n        this.isPowerOfTwo = bitTwiddle.isPow2(this.realWidth) && bitTwiddle.isPow2(this.realHeight);\n    }\n\n    /**\n     * Load a source.\n     *\n     * If the source is not-immediately-available, such as an image that needs to be\n     * downloaded, then the 'loaded' or 'error' event will be dispatched in the future\n     * and `hasLoaded` will remain false after this call.\n     *\n     * The logic state after calling `loadSource` directly or indirectly (eg. `fromImage`, `new BaseTexture`) is:\n     *\n     *     if (texture.hasLoaded) {\n     *        // texture ready for use\n     *     } else if (texture.isLoading) {\n     *        // listen to 'loaded' and/or 'error' events on texture\n     *     } else {\n     *        // not loading, not going to load UNLESS the source is reloaded\n     *        // (it may still make sense to listen to the events)\n     *     }\n     *\n     * @protected\n     * @param {HTMLImageElement|HTMLCanvasElement} source - the source object of the texture.\n     */\n    loadSource(source)\n    {\n        const wasLoading = this.isLoading;\n\n        this.hasLoaded = false;\n        this.isLoading = false;\n\n        if (wasLoading && this.source)\n        {\n            this.source.onload = null;\n            this.source.onerror = null;\n        }\n\n        const firstSourceLoaded = !this.source;\n\n        this.source = source;\n\n        // Apply source if loaded. Otherwise setup appropriate loading monitors.\n        if (((source.src && source.complete) || source.getContext) && source.width && source.height)\n        {\n            this._updateImageType();\n\n            if (this.imageType === 'svg')\n            {\n                this._loadSvgSource();\n            }\n            else\n            {\n                this._sourceLoaded();\n            }\n\n            if (firstSourceLoaded)\n            {\n                // send loaded event if previous source was null and we have been passed a pre-loaded IMG element\n                this.emit('loaded', this);\n            }\n        }\n        else if (!source.getContext)\n        {\n            // Image fail / not ready\n            this.isLoading = true;\n\n            const scope = this;\n\n            source.onload = () =>\n            {\n                scope._updateImageType();\n                source.onload = null;\n                source.onerror = null;\n\n                if (!scope.isLoading)\n                {\n                    return;\n                }\n\n                scope.isLoading = false;\n                scope._sourceLoaded();\n\n                if (scope.imageType === 'svg')\n                {\n                    scope._loadSvgSource();\n\n                    return;\n                }\n\n                scope.emit('loaded', scope);\n            };\n\n            source.onerror = () =>\n            {\n                source.onload = null;\n                source.onerror = null;\n\n                if (!scope.isLoading)\n                {\n                    return;\n                }\n\n                scope.isLoading = false;\n                scope.emit('error', scope);\n            };\n\n            // Per http://www.w3.org/TR/html5/embedded-content-0.html#the-img-element\n            //   \"The value of `complete` can thus change while a script is executing.\"\n            // So complete needs to be re-checked after the callbacks have been added..\n            // NOTE: complete will be true if the image has no src so best to check if the src is set.\n            if (source.complete && source.src)\n            {\n                // ..and if we're complete now, no need for callbacks\n                source.onload = null;\n                source.onerror = null;\n\n                if (scope.imageType === 'svg')\n                {\n                    scope._loadSvgSource();\n\n                    return;\n                }\n\n                this.isLoading = false;\n\n                if (source.width && source.height)\n                {\n                    this._sourceLoaded();\n\n                    // If any previous subscribers possible\n                    if (wasLoading)\n                    {\n                        this.emit('loaded', this);\n                    }\n                }\n                // If any previous subscribers possible\n                else if (wasLoading)\n                {\n                    this.emit('error', this);\n                }\n            }\n        }\n    }\n\n    /**\n     * Updates type of the source image.\n     */\n    _updateImageType()\n    {\n        if (!this.imageUrl)\n        {\n            return;\n        }\n\n        const dataUri = decomposeDataUri(this.imageUrl);\n        let imageType;\n\n        if (dataUri && dataUri.mediaType === 'image')\n        {\n            // Check for subType validity\n            const firstSubType = dataUri.subType.split('+')[0];\n\n            imageType = getUrlFileExtension(`.${firstSubType}`);\n\n            if (!imageType)\n            {\n                throw new Error('Invalid image type in data URI.');\n            }\n        }\n        else\n        {\n            imageType = getUrlFileExtension(this.imageUrl);\n\n            if (!imageType)\n            {\n                imageType = 'png';\n            }\n        }\n\n        this.imageType = imageType;\n    }\n\n    /**\n     * Checks if `source` is an SVG image and whether it's loaded via a URL or a data URI. Then calls\n     * `_loadSvgSourceUsingDataUri` or `_loadSvgSourceUsingXhr`.\n     */\n    _loadSvgSource()\n    {\n        if (this.imageType !== 'svg')\n        {\n            // Do nothing if source is not svg\n            return;\n        }\n\n        const dataUri = decomposeDataUri(this.imageUrl);\n\n        if (dataUri)\n        {\n            this._loadSvgSourceUsingDataUri(dataUri);\n        }\n        else\n        {\n            // We got an URL, so we need to do an XHR to check the svg size\n            this._loadSvgSourceUsingXhr();\n        }\n    }\n\n    /**\n     * Reads an SVG string from data URI and then calls `_loadSvgSourceUsingString`.\n     *\n     * @param {string} dataUri - The data uri to load from.\n     */\n    _loadSvgSourceUsingDataUri(dataUri)\n    {\n        let svgString;\n\n        if (dataUri.encoding === 'base64')\n        {\n            if (!atob)\n            {\n                throw new Error('Your browser doesn\\'t support base64 conversions.');\n            }\n            svgString = atob(dataUri.data);\n        }\n        else\n        {\n            svgString = dataUri.data;\n        }\n\n        this._loadSvgSourceUsingString(svgString);\n    }\n\n    /**\n     * Loads an SVG string from `imageUrl` using XHR and then calls `_loadSvgSourceUsingString`.\n     */\n    _loadSvgSourceUsingXhr()\n    {\n        const svgXhr = new XMLHttpRequest();\n\n        // This throws error on IE, so SVG Document can't be used\n        // svgXhr.responseType = 'document';\n\n        // This is not needed since we load the svg as string (breaks IE too)\n        // but overrideMimeType() can be used to force the response to be parsed as XML\n        // svgXhr.overrideMimeType('image/svg+xml');\n\n        svgXhr.onload = () =>\n        {\n            if (svgXhr.readyState !== svgXhr.DONE || svgXhr.status !== 200)\n            {\n                throw new Error('Failed to load SVG using XHR.');\n            }\n\n            this._loadSvgSourceUsingString(svgXhr.response);\n        };\n\n        svgXhr.onerror = () => this.emit('error', this);\n\n        svgXhr.open('GET', this.imageUrl, true);\n        svgXhr.send();\n    }\n\n    /**\n     * Loads texture using an SVG string. The original SVG Image is stored as `origSource` and the\n     * created canvas is the new `source`. The SVG is scaled using `sourceScale`. Called by\n     * `_loadSvgSourceUsingXhr` or `_loadSvgSourceUsingDataUri`.\n     *\n     * @param  {string} svgString SVG source as string\n     *\n     * @fires PIXI.BaseTexture#loaded\n     */\n    _loadSvgSourceUsingString(svgString)\n    {\n        const svgSize = getSvgSize(svgString);\n\n        const svgWidth = svgSize.width;\n        const svgHeight = svgSize.height;\n\n        if (!svgWidth || !svgHeight)\n        {\n            throw new Error('The SVG image must have width and height defined (in pixels), canvas API needs them.');\n        }\n\n        // Scale realWidth and realHeight\n        this.realWidth = Math.round(svgWidth * this.sourceScale);\n        this.realHeight = Math.round(svgHeight * this.sourceScale);\n\n        this._updateDimensions();\n\n        // Create a canvas element\n        const canvas = document.createElement('canvas');\n\n        canvas.width = this.realWidth;\n        canvas.height = this.realHeight;\n        canvas._pixiId = `canvas_${uid()}`;\n\n        // Draw the Svg to the canvas\n        canvas\n            .getContext('2d')\n            .drawImage(this.source, 0, 0, svgWidth, svgHeight, 0, 0, this.realWidth, this.realHeight);\n\n        // Replace the original source image with the canvas\n        this.origSource = this.source;\n        this.source = canvas;\n\n        // Add also the canvas in cache (destroy clears by `imageUrl` and `source._pixiId`)\n        BaseTexture.addToCache(this, canvas._pixiId);\n\n        this.isLoading = false;\n        this._sourceLoaded();\n        this.emit('loaded', this);\n    }\n\n    /**\n     * Used internally to update the width, height, and some other tracking vars once\n     * a source has successfully loaded.\n     *\n     * @private\n     */\n    _sourceLoaded()\n    {\n        this.hasLoaded = true;\n        this.update();\n    }\n\n    /**\n     * Destroys this base texture\n     *\n     */\n    destroy()\n    {\n        if (this.imageUrl)\n        {\n            delete TextureCache[this.imageUrl];\n\n            this.imageUrl = null;\n\n            if (!navigator.isCocoonJS)\n            {\n                this.source.src = '';\n            }\n        }\n\n        this.source = null;\n\n        this.dispose();\n\n        BaseTexture.removeFromCache(this);\n        this.textureCacheIds = null;\n\n        this._destroyed = true;\n    }\n\n    /**\n     * Frees the texture from WebGL memory without destroying this texture object.\n     * This means you can still use the texture later which will upload it to GPU\n     * memory again.\n     *\n     * @fires PIXI.BaseTexture#dispose\n     */\n    dispose()\n    {\n        this.emit('dispose', this);\n    }\n\n    /**\n     * Changes the source image of the texture.\n     * The original source must be an Image element.\n     *\n     * @param {string} newSrc - the path of the image\n     */\n    updateSourceImage(newSrc)\n    {\n        this.source.src = newSrc;\n\n        this.loadSource(this.source);\n    }\n\n    /**\n     * Helper function that creates a base texture from the given image url.\n     * If the image is not in the base texture cache it will be created and loaded.\n     *\n     * @static\n     * @param {string} imageUrl - The image url of the texture\n     * @param {boolean} [crossorigin=(auto)] - Should use anonymous CORS? Defaults to true if the URL is not a data-URI.\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     * @param {number} [sourceScale=(auto)] - Scale for the original image, used with Svg images.\n     * @return {PIXI.BaseTexture} The new base texture.\n     */\n    static fromImage(imageUrl, crossorigin, scaleMode, sourceScale)\n    {\n        let baseTexture = BaseTextureCache[imageUrl];\n\n        if (!baseTexture)\n        {\n            // new Image() breaks tex loading in some versions of Chrome.\n            // See https://code.google.com/p/chromium/issues/detail?id=238071\n            const image = new Image();// document.createElement('img');\n\n            if (crossorigin === undefined && imageUrl.indexOf('data:') !== 0)\n            {\n                image.crossOrigin = determineCrossOrigin(imageUrl);\n            }\n            else if (crossorigin)\n            {\n                image.crossOrigin = typeof crossorigin === 'string' ? crossorigin : 'anonymous';\n            }\n\n            baseTexture = new BaseTexture(image, scaleMode);\n            baseTexture.imageUrl = imageUrl;\n\n            if (sourceScale)\n            {\n                baseTexture.sourceScale = sourceScale;\n            }\n\n            // if there is an @2x at the end of the url we are going to assume its a highres image\n            baseTexture.resolution = getResolutionOfUrl(imageUrl);\n\n            image.src = imageUrl; // Setting this triggers load\n\n            BaseTexture.addToCache(baseTexture, imageUrl);\n        }\n\n        return baseTexture;\n    }\n\n    /**\n     * Helper function that creates a base texture from the given canvas element.\n     *\n     * @static\n     * @param {HTMLCanvasElement} canvas - The canvas element source of the texture\n     * @param {number} scaleMode - See {@link PIXI.SCALE_MODES} for possible values\n     * @param {string} [origin='canvas'] - A string origin of who created the base texture\n     * @return {PIXI.BaseTexture} The new base texture.\n     */\n    static fromCanvas(canvas, scaleMode, origin = 'canvas')\n    {\n        if (!canvas._pixiId)\n        {\n            canvas._pixiId = `${origin}_${uid()}`;\n        }\n\n        let baseTexture = BaseTextureCache[canvas._pixiId];\n\n        if (!baseTexture)\n        {\n            baseTexture = new BaseTexture(canvas, scaleMode);\n            BaseTexture.addToCache(baseTexture, canvas._pixiId);\n        }\n\n        return baseTexture;\n    }\n\n    /**\n     * Helper function that creates a base texture based on the source you provide.\n     * The source can be - image url, image element, canvas element.\n     *\n     * @static\n     * @param {string|HTMLImageElement|HTMLCanvasElement} source - The source to create base texture from.\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     * @param {number} [sourceScale=(auto)] - Scale for the original image, used with Svg images.\n     * @return {PIXI.BaseTexture} The new base texture.\n     */\n    static from(source, scaleMode, sourceScale)\n    {\n        if (typeof source === 'string')\n        {\n            return BaseTexture.fromImage(source, undefined, scaleMode, sourceScale);\n        }\n        else if (source instanceof HTMLImageElement)\n        {\n            const imageUrl = source.src;\n            let baseTexture = BaseTextureCache[imageUrl];\n\n            if (!baseTexture)\n            {\n                baseTexture = new BaseTexture(source, scaleMode);\n                baseTexture.imageUrl = imageUrl;\n\n                if (sourceScale)\n                {\n                    baseTexture.sourceScale = sourceScale;\n                }\n\n                // if there is an @2x at the end of the url we are going to assume its a highres image\n                baseTexture.resolution = getResolutionOfUrl(imageUrl);\n\n                BaseTexture.addToCache(baseTexture, imageUrl);\n            }\n\n            return baseTexture;\n        }\n        else if (source instanceof HTMLCanvasElement)\n        {\n            return BaseTexture.fromCanvas(source, scaleMode);\n        }\n\n        // lets assume its a base texture!\n        return source;\n    }\n\n    /**\n     * Adds a BaseTexture to the global BaseTextureCache. This cache is shared across the whole PIXI object.\n     *\n     * @static\n     * @param {PIXI.BaseTexture} baseTexture - The BaseTexture to add to the cache.\n     * @param {string} id - The id that the BaseTexture will be stored against.\n     */\n    static addToCache(baseTexture, id)\n    {\n        if (id)\n        {\n            if (baseTexture.textureCacheIds.indexOf(id) === -1)\n            {\n                baseTexture.textureCacheIds.push(id);\n            }\n\n            // @if DEBUG\n            /* eslint-disable no-console */\n            if (BaseTextureCache[id])\n            {\n                console.warn(`BaseTexture added to the cache with an id [${id}] that already had an entry`);\n            }\n            /* eslint-enable no-console */\n            // @endif\n\n            BaseTextureCache[id] = baseTexture;\n        }\n    }\n\n    /**\n     * Remove a BaseTexture from the global BaseTextureCache.\n     *\n     * @static\n     * @param {string|PIXI.BaseTexture} baseTexture - id of a BaseTexture to be removed, or a BaseTexture instance itself.\n     * @return {PIXI.BaseTexture|null} The BaseTexture that was removed.\n     */\n    static removeFromCache(baseTexture)\n    {\n        if (typeof baseTexture === 'string')\n        {\n            const baseTextureFromCache = BaseTextureCache[baseTexture];\n\n            if (baseTextureFromCache)\n            {\n                const index = baseTextureFromCache.textureCacheIds.indexOf(baseTexture);\n\n                if (index > -1)\n                {\n                    baseTextureFromCache.textureCacheIds.splice(index, 1);\n                }\n\n                delete BaseTextureCache[baseTexture];\n\n                return baseTextureFromCache;\n            }\n        }\n        else if (baseTexture && baseTexture.textureCacheIds)\n        {\n            for (let i = 0; i < baseTexture.textureCacheIds.length; ++i)\n            {\n                delete BaseTextureCache[baseTexture.textureCacheIds[i]];\n            }\n\n            baseTexture.textureCacheIds.length = 0;\n\n            return baseTexture;\n        }\n\n        return null;\n    }\n}\n","import BaseRenderTexture from './BaseRenderTexture';\nimport Texture from './Texture';\n\n/**\n * A RenderTexture is a special texture that allows any PixiJS display object to be rendered to it.\n *\n * __Hint__: All DisplayObjects (i.e. Sprites) that render to a RenderTexture should be preloaded\n * otherwise black rectangles will be drawn instead.\n *\n * A RenderTexture takes a snapshot of any Display Object given to its render method. For example:\n *\n * ```js\n * let renderer = PIXI.autoDetectRenderer(1024, 1024, { view: canvas, ratio: 1 });\n * let renderTexture = PIXI.RenderTexture.create(800, 600);\n * let sprite = PIXI.Sprite.fromImage(\"spinObj_01.png\");\n *\n * sprite.position.x = 800/2;\n * sprite.position.y = 600/2;\n * sprite.anchor.x = 0.5;\n * sprite.anchor.y = 0.5;\n *\n * renderer.render(sprite, renderTexture);\n * ```\n *\n * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0\n * you can clear the transform\n *\n * ```js\n *\n * sprite.setTransform()\n *\n * let renderTexture = new PIXI.RenderTexture.create(100, 100);\n *\n * renderer.render(sprite, renderTexture);  // Renders to center of RenderTexture\n * ```\n *\n * @class\n * @extends PIXI.Texture\n * @memberof PIXI\n */\nexport default class RenderTexture extends Texture\n{\n    /**\n     * @param {PIXI.BaseRenderTexture} baseRenderTexture - The renderer used for this RenderTexture\n     * @param {PIXI.Rectangle} [frame] - The rectangle frame of the texture to show\n     */\n    constructor(baseRenderTexture, frame)\n    {\n        // support for legacy..\n        let _legacyRenderer = null;\n\n        if (!(baseRenderTexture instanceof BaseRenderTexture))\n        {\n            /* eslint-disable prefer-rest-params, no-console */\n            const width = arguments[1];\n            const height = arguments[2];\n            const scaleMode = arguments[3];\n            const resolution = arguments[4];\n\n            // we have an old render texture..\n            console.warn(`Please use RenderTexture.create(${width}, ${height}) instead of the ctor directly.`);\n            _legacyRenderer = arguments[0];\n            /* eslint-enable prefer-rest-params, no-console */\n\n            frame = null;\n            baseRenderTexture = new BaseRenderTexture(width, height, scaleMode, resolution);\n        }\n\n        /**\n         * The base texture object that this texture uses\n         *\n         * @member {BaseTexture}\n         */\n        super(\n            baseRenderTexture,\n            frame\n        );\n\n        this.legacyRenderer = _legacyRenderer;\n\n        /**\n         * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.\n         *\n         * @member {boolean}\n         */\n        this.valid = true;\n\n        this._updateUvs();\n    }\n\n    /**\n     * Resizes the RenderTexture.\n     *\n     * @param {number} width - The width to resize to.\n     * @param {number} height - The height to resize to.\n     * @param {boolean} doNotResizeBaseTexture - Should the baseTexture.width and height values be resized as well?\n     */\n    resize(width, height, doNotResizeBaseTexture)\n    {\n        // TODO - could be not required..\n        this.valid = (width > 0 && height > 0);\n\n        this._frame.width = this.orig.width = width;\n        this._frame.height = this.orig.height = height;\n\n        if (!doNotResizeBaseTexture)\n        {\n            this.baseTexture.resize(width, height);\n        }\n\n        this._updateUvs();\n    }\n\n    /**\n     * A short hand way of creating a render texture.\n     *\n     * @param {number} [width=100] - The width of the render texture\n     * @param {number} [height=100] - The height of the render texture\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     * @param {number} [resolution=1] - The resolution / device pixel ratio of the texture being generated\n     * @return {PIXI.RenderTexture} The new render texture\n     */\n    static create(width, height, scaleMode, resolution)\n    {\n        return new RenderTexture(new BaseRenderTexture(width, height, scaleMode, resolution));\n    }\n}\n","import { Rectangle, Texture } from '../';\nimport { getResolutionOfUrl } from '../utils';\n\n/**\n * Utility class for maintaining reference to a collection\n * of Textures on a single Spritesheet.\n *\n * @class\n * @memberof PIXI\n */\nexport default class Spritesheet\n{\n    /**\n     * The maximum number of Textures to build per process.\n     *\n     * @type {number}\n     * @default 1000\n     */\n    static get BATCH_SIZE()\n    {\n        return 1000;\n    }\n\n    /**\n     * @param {PIXI.BaseTexture} baseTexture Reference to the source BaseTexture object.\n     * @param {Object} data - Spritesheet image data.\n     * @param {string} [resolutionFilename] - The filename to consider when determining\n     *        the resolution of the spritesheet. If not provided, the imageUrl will\n     *        be used on the BaseTexture.\n     */\n    constructor(baseTexture, data, resolutionFilename = null)\n    {\n        /**\n         * Reference to ths source texture\n         * @type {PIXI.BaseTexture}\n         */\n        this.baseTexture = baseTexture;\n\n        /**\n         * Map of spritesheet textures.\n         * @type {Object}\n         */\n        this.textures = {};\n\n        /**\n         * Reference to the original JSON data.\n         * @type {Object}\n         */\n        this.data = data;\n\n        /**\n         * The resolution of the spritesheet.\n         * @type {number}\n         */\n        this.resolution = this._updateResolution(\n            resolutionFilename || this.baseTexture.imageUrl\n        );\n\n        /**\n         * Map of spritesheet frames.\n         * @type {Object}\n         * @private\n         */\n        this._frames = this.data.frames;\n\n        /**\n         * Collection of frame names.\n         * @type {string[]}\n         * @private\n         */\n        this._frameKeys = Object.keys(this._frames);\n\n        /**\n         * Current batch index being processed.\n         * @type {number}\n         * @private\n         */\n        this._batchIndex = 0;\n\n        /**\n         * Callback when parse is completed.\n         * @type {Function}\n         * @private\n         */\n        this._callback = null;\n    }\n\n    /**\n     * Generate the resolution from the filename or fallback\n     * to the meta.scale field of the JSON data.\n     *\n     * @private\n     * @param {string} resolutionFilename - The filename to use for resolving\n     *        the default resolution.\n     * @return {number} Resolution to use for spritesheet.\n     */\n    _updateResolution(resolutionFilename)\n    {\n        const scale = this.data.meta.scale;\n\n        // Use a defaultValue of `null` to check if a url-based resolution is set\n        let resolution = getResolutionOfUrl(resolutionFilename, null);\n\n        // No resolution found via URL\n        if (resolution === null)\n        {\n            // Use the scale value or default to 1\n            resolution = scale !== undefined ? parseFloat(scale) : 1;\n        }\n\n        // For non-1 resolutions, update baseTexture\n        if (resolution !== 1)\n        {\n            this.baseTexture.resolution = resolution;\n            this.baseTexture.update();\n        }\n\n        return resolution;\n    }\n\n    /**\n     * Parser spritesheet from loaded data. This is done asynchronously\n     * to prevent creating too many Texture within a single process.\n     *\n     * @param {Function} callback - Callback when complete returns\n     *        a map of the Textures for this spritesheet.\n     */\n    parse(callback)\n    {\n        this._batchIndex = 0;\n        this._callback = callback;\n\n        if (this._frameKeys.length <= Spritesheet.BATCH_SIZE)\n        {\n            this._processFrames(0);\n            this._parseComplete();\n        }\n        else\n        {\n            this._nextBatch();\n        }\n    }\n\n    /**\n     * Process a batch of frames\n     *\n     * @private\n     * @param {number} initialFrameIndex - The index of frame to start.\n     */\n    _processFrames(initialFrameIndex)\n    {\n        let frameIndex = initialFrameIndex;\n        const maxFrames = Spritesheet.BATCH_SIZE;\n\n        while (frameIndex - initialFrameIndex < maxFrames && frameIndex < this._frameKeys.length)\n        {\n            const i = this._frameKeys[frameIndex];\n            const rect = this._frames[i].frame;\n\n            if (rect)\n            {\n                let frame = null;\n                let trim = null;\n                const orig = new Rectangle(\n                    0,\n                    0,\n                    this._frames[i].sourceSize.w / this.resolution,\n                    this._frames[i].sourceSize.h / this.resolution\n                );\n\n                if (this._frames[i].rotated)\n                {\n                    frame = new Rectangle(\n                        rect.x / this.resolution,\n                        rect.y / this.resolution,\n                        rect.h / this.resolution,\n                        rect.w / this.resolution\n                    );\n                }\n                else\n                {\n                    frame = new Rectangle(\n                        rect.x / this.resolution,\n                        rect.y / this.resolution,\n                        rect.w / this.resolution,\n                        rect.h / this.resolution\n                    );\n                }\n\n                //  Check to see if the sprite is trimmed\n                if (this._frames[i].trimmed)\n                {\n                    trim = new Rectangle(\n                        this._frames[i].spriteSourceSize.x / this.resolution,\n                        this._frames[i].spriteSourceSize.y / this.resolution,\n                        rect.w / this.resolution,\n                        rect.h / this.resolution\n                    );\n                }\n\n                this.textures[i] = new Texture(\n                    this.baseTexture,\n                    frame,\n                    orig,\n                    trim,\n                    this._frames[i].rotated ? 2 : 0\n                );\n\n                // lets also add the frame to pixi's global cache for fromFrame and fromImage functions\n                Texture.addToCache(this.textures[i], i);\n            }\n\n            frameIndex++;\n        }\n    }\n\n    /**\n     * The parse has completed.\n     *\n     * @private\n     */\n    _parseComplete()\n    {\n        const callback = this._callback;\n\n        this._callback = null;\n        this._batchIndex = 0;\n        callback.call(this, this.textures);\n    }\n\n    /**\n     * Begin the next batch of textures.\n     *\n     * @private\n     */\n    _nextBatch()\n    {\n        this._processFrames(this._batchIndex * Spritesheet.BATCH_SIZE);\n        this._batchIndex++;\n        setTimeout(() =>\n        {\n            if (this._batchIndex * Spritesheet.BATCH_SIZE < this._frameKeys.length)\n            {\n                this._nextBatch();\n            }\n            else\n            {\n                this._parseComplete();\n            }\n        }, 0);\n    }\n\n    /**\n     * Destroy Spritesheet and don't use after this.\n     *\n     * @param {boolean} [destroyBase=false] Whether to destroy the base texture as well\n     */\n    destroy(destroyBase = false)\n    {\n        for (const i in this.textures)\n        {\n            this.textures[i].destroy();\n        }\n        this._frames = null;\n        this._frameKeys = null;\n        this.data = null;\n        this.textures = null;\n        if (destroyBase)\n        {\n            this.baseTexture.destroy();\n        }\n        this.baseTexture = null;\n    }\n}\n","import BaseTexture from './BaseTexture';\nimport VideoBaseTexture from './VideoBaseTexture';\nimport TextureUvs from './TextureUvs';\nimport EventEmitter from 'eventemitter3';\nimport { Rectangle } from '../math';\nimport { TextureCache, getResolutionOfUrl } from '../utils';\nimport settings from '../settings';\n\n/**\n * A texture stores the information that represents an image or part of an image. It cannot be added\n * to the display list directly. Instead use it as the texture for a Sprite. If no frame is provided\n * then the whole image is used.\n *\n * You can directly create a texture from an image and then reuse it multiple times like this :\n *\n * ```js\n * let texture = PIXI.Texture.fromImage('assets/image.png');\n * let sprite1 = new PIXI.Sprite(texture);\n * let sprite2 = new PIXI.Sprite(texture);\n * ```\n *\n * Textures made from SVGs, loaded or not, cannot be used before the file finishes processing.\n * You can check for this by checking the sprite's _textureID property.\n * ```js\n * var texture = PIXI.Texture.fromImage('assets/image.svg');\n * var sprite1 = new PIXI.Sprite(texture);\n * //sprite1._textureID should not be undefined if the texture has finished processing the SVG file\n * ```\n * You can use a ticker or rAF to ensure your sprites load the finished textures after processing. See issue #3068.\n *\n * @class\n * @extends EventEmitter\n * @memberof PIXI\n */\nexport default class Texture extends EventEmitter\n{\n    /**\n     * @param {PIXI.BaseTexture} baseTexture - The base texture source to create the texture from\n     * @param {PIXI.Rectangle} [frame] - The rectangle frame of the texture to show\n     * @param {PIXI.Rectangle} [orig] - The area of original texture\n     * @param {PIXI.Rectangle} [trim] - Trimmed rectangle of original texture\n     * @param {number} [rotate] - indicates how the texture was rotated by texture packer. See {@link PIXI.GroupD8}\n     */\n    constructor(baseTexture, frame, orig, trim, rotate)\n    {\n        super();\n\n        /**\n         * Does this Texture have any frame data assigned to it?\n         *\n         * @member {boolean}\n         */\n        this.noFrame = false;\n\n        if (!frame)\n        {\n            this.noFrame = true;\n            frame = new Rectangle(0, 0, 1, 1);\n        }\n\n        if (baseTexture instanceof Texture)\n        {\n            baseTexture = baseTexture.baseTexture;\n        }\n\n        /**\n         * The base texture that this texture uses.\n         *\n         * @member {PIXI.BaseTexture}\n         */\n        this.baseTexture = baseTexture;\n\n        /**\n         * This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,\n         * irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)\n         *\n         * @member {PIXI.Rectangle}\n         */\n        this._frame = frame;\n\n        /**\n         * This is the trimmed area of original texture, before it was put in atlas\n         *\n         * @member {PIXI.Rectangle}\n         */\n        this.trim = trim;\n\n        /**\n         * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.\n         *\n         * @member {boolean}\n         */\n        this.valid = false;\n\n        /**\n         * This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)\n         *\n         * @member {boolean}\n         */\n        this.requiresUpdate = false;\n\n        /**\n         * The WebGL UV data cache.\n         *\n         * @member {PIXI.TextureUvs}\n         * @private\n         */\n        this._uvs = null;\n\n        /**\n         * This is the area of original texture, before it was put in atlas\n         *\n         * @member {PIXI.Rectangle}\n         */\n        this.orig = orig || frame;// new Rectangle(0, 0, 1, 1);\n\n        this._rotate = Number(rotate || 0);\n\n        if (rotate === true)\n        {\n            // this is old texturepacker legacy, some games/libraries are passing \"true\" for rotated textures\n            this._rotate = 2;\n        }\n        else if (this._rotate % 2 !== 0)\n        {\n            throw new Error('attempt to use diamond-shaped UVs. If you are sure, set rotation manually');\n        }\n\n        if (baseTexture.hasLoaded)\n        {\n            if (this.noFrame)\n            {\n                frame = new Rectangle(0, 0, baseTexture.width, baseTexture.height);\n\n                // if there is no frame we should monitor for any base texture changes..\n                baseTexture.on('update', this.onBaseTextureUpdated, this);\n            }\n            this.frame = frame;\n        }\n        else\n        {\n            baseTexture.once('loaded', this.onBaseTextureLoaded, this);\n        }\n\n        /**\n         * Fired when the texture is updated. This happens if the frame or the baseTexture is updated.\n         *\n         * @event PIXI.Texture#update\n         * @protected\n         * @param {PIXI.Texture} texture - Instance of texture being updated.\n         */\n\n        this._updateID = 0;\n\n        /**\n         * Extra field for extra plugins. May contain clamp settings and some matrices\n         * @type {Object}\n         */\n        this.transform = null;\n\n        /**\n         * The ids under which this Texture has been added to the texture cache. This is\n         * automatically set as long as Texture.addToCache is used, but may not be set if a\n         * Texture is added directly to the TextureCache array.\n         *\n         * @member {string[]}\n         */\n        this.textureCacheIds = [];\n    }\n\n    /**\n     * Updates this texture on the gpu.\n     *\n     */\n    update()\n    {\n        this.baseTexture.update();\n    }\n\n    /**\n     * Called when the base texture is loaded\n     *\n     * @private\n     * @param {PIXI.BaseTexture} baseTexture - The base texture.\n     */\n    onBaseTextureLoaded(baseTexture)\n    {\n        this._updateID++;\n\n        // TODO this code looks confusing.. boo to abusing getters and setters!\n        if (this.noFrame)\n        {\n            this.frame = new Rectangle(0, 0, baseTexture.width, baseTexture.height);\n        }\n        else\n        {\n            this.frame = this._frame;\n        }\n\n        this.baseTexture.on('update', this.onBaseTextureUpdated, this);\n        this.emit('update', this);\n    }\n\n    /**\n     * Called when the base texture is updated\n     *\n     * @private\n     * @param {PIXI.BaseTexture} baseTexture - The base texture.\n     */\n    onBaseTextureUpdated(baseTexture)\n    {\n        this._updateID++;\n\n        this._frame.width = baseTexture.width;\n        this._frame.height = baseTexture.height;\n\n        this.emit('update', this);\n    }\n\n    /**\n     * Destroys this texture\n     *\n     * @param {boolean} [destroyBase=false] Whether to destroy the base texture as well\n     */\n    destroy(destroyBase)\n    {\n        if (this.baseTexture)\n        {\n            if (destroyBase)\n            {\n                // delete the texture if it exists in the texture cache..\n                // this only needs to be removed if the base texture is actually destroyed too..\n                if (TextureCache[this.baseTexture.imageUrl])\n                {\n                    Texture.removeFromCache(this.baseTexture.imageUrl);\n                }\n\n                this.baseTexture.destroy();\n            }\n\n            this.baseTexture.off('update', this.onBaseTextureUpdated, this);\n            this.baseTexture.off('loaded', this.onBaseTextureLoaded, this);\n\n            this.baseTexture = null;\n        }\n\n        this._frame = null;\n        this._uvs = null;\n        this.trim = null;\n        this.orig = null;\n\n        this.valid = false;\n\n        Texture.removeFromCache(this);\n        this.textureCacheIds = null;\n    }\n\n    /**\n     * Creates a new texture object that acts the same as this one.\n     *\n     * @return {PIXI.Texture} The new texture\n     */\n    clone()\n    {\n        return new Texture(this.baseTexture, this.frame, this.orig, this.trim, this.rotate);\n    }\n\n    /**\n     * Updates the internal WebGL UV cache.\n     *\n     * @protected\n     */\n    _updateUvs()\n    {\n        if (!this._uvs)\n        {\n            this._uvs = new TextureUvs();\n        }\n\n        this._uvs.set(this._frame, this.baseTexture, this.rotate);\n\n        this._updateID++;\n    }\n\n    /**\n     * Helper function that creates a Texture object from the given image url.\n     * If the image is not in the texture cache it will be  created and loaded.\n     *\n     * @static\n     * @param {string} imageUrl - The image url of the texture\n     * @param {boolean} [crossorigin] - Whether requests should be treated as crossorigin\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     * @param {number} [sourceScale=(auto)] - Scale for the original image, used with SVG images.\n     * @return {PIXI.Texture} The newly created texture\n     */\n    static fromImage(imageUrl, crossorigin, scaleMode, sourceScale)\n    {\n        let texture = TextureCache[imageUrl];\n\n        if (!texture)\n        {\n            texture = new Texture(BaseTexture.fromImage(imageUrl, crossorigin, scaleMode, sourceScale));\n            Texture.addToCache(texture, imageUrl);\n        }\n\n        return texture;\n    }\n\n    /**\n     * Helper function that creates a sprite that will contain a texture from the TextureCache based on the frameId\n     * The frame ids are created when a Texture packer file has been loaded\n     *\n     * @static\n     * @param {string} frameId - The frame Id of the texture in the cache\n     * @return {PIXI.Texture} The newly created texture\n     */\n    static fromFrame(frameId)\n    {\n        const texture = TextureCache[frameId];\n\n        if (!texture)\n        {\n            throw new Error(`The frameId \"${frameId}\" does not exist in the texture cache`);\n        }\n\n        return texture;\n    }\n\n    /**\n     * Helper function that creates a new Texture based on the given canvas element.\n     *\n     * @static\n     * @param {HTMLCanvasElement} canvas - The canvas element source of the texture\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     * @param {string} [origin='canvas'] - A string origin of who created the base texture\n     * @return {PIXI.Texture} The newly created texture\n     */\n    static fromCanvas(canvas, scaleMode, origin = 'canvas')\n    {\n        return new Texture(BaseTexture.fromCanvas(canvas, scaleMode, origin));\n    }\n\n    /**\n     * Helper function that creates a new Texture based on the given video element.\n     *\n     * @static\n     * @param {HTMLVideoElement|string} video - The URL or actual element of the video\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     * @return {PIXI.Texture} The newly created texture\n     */\n    static fromVideo(video, scaleMode)\n    {\n        if (typeof video === 'string')\n        {\n            return Texture.fromVideoUrl(video, scaleMode);\n        }\n\n        return new Texture(VideoBaseTexture.fromVideo(video, scaleMode));\n    }\n\n    /**\n     * Helper function that creates a new Texture based on the video url.\n     *\n     * @static\n     * @param {string} videoUrl - URL of the video\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     * @return {PIXI.Texture} The newly created texture\n     */\n    static fromVideoUrl(videoUrl, scaleMode)\n    {\n        return new Texture(VideoBaseTexture.fromUrl(videoUrl, scaleMode));\n    }\n\n    /**\n     * Helper function that creates a new Texture based on the source you provide.\n     * The source can be - frame id, image url, video url, canvas element, video element, base texture\n     *\n     * @static\n     * @param {number|string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|PIXI.BaseTexture}\n     *        source - Source to create texture from\n     * @return {PIXI.Texture} The newly created texture\n     */\n    static from(source)\n    {\n        // TODO auto detect cross origin..\n        // TODO pass in scale mode?\n        if (typeof source === 'string')\n        {\n            const texture = TextureCache[source];\n\n            if (!texture)\n            {\n                // check if its a video..\n                const isVideo = source.match(/\\.(mp4|webm|ogg|h264|avi|mov)$/) !== null;\n\n                if (isVideo)\n                {\n                    return Texture.fromVideoUrl(source);\n                }\n\n                return Texture.fromImage(source);\n            }\n\n            return texture;\n        }\n        else if (source instanceof HTMLImageElement)\n        {\n            return new Texture(BaseTexture.from(source));\n        }\n        else if (source instanceof HTMLCanvasElement)\n        {\n            return Texture.fromCanvas(source, settings.SCALE_MODE, 'HTMLCanvasElement');\n        }\n        else if (source instanceof HTMLVideoElement)\n        {\n            return Texture.fromVideo(source);\n        }\n        else if (source instanceof BaseTexture)\n        {\n            return new Texture(source);\n        }\n\n        // lets assume its a texture!\n        return source;\n    }\n\n    /**\n     * Create a texture from a source and add to the cache.\n     *\n     * @static\n     * @param {HTMLImageElement|HTMLCanvasElement} source - The input source.\n     * @param {String} imageUrl - File name of texture, for cache and resolving resolution.\n     * @param {String} [name] - Human readible name for the texture cache. If no name is\n     *        specified, only `imageUrl` will be used as the cache ID.\n     * @return {PIXI.Texture} Output texture\n     */\n    static fromLoader(source, imageUrl, name)\n    {\n        const baseTexture = new BaseTexture(source, undefined, getResolutionOfUrl(imageUrl));\n        const texture = new Texture(baseTexture);\n\n        baseTexture.imageUrl = imageUrl;\n\n        // No name, use imageUrl instead\n        if (!name)\n        {\n            name = imageUrl;\n        }\n\n        // lets also add the frame to pixi's global cache for fromFrame and fromImage fucntions\n        BaseTexture.addToCache(texture.baseTexture, name);\n        Texture.addToCache(texture, name);\n\n        // also add references by url if they are different.\n        if (name !== imageUrl)\n        {\n            BaseTexture.addToCache(texture.baseTexture, imageUrl);\n            Texture.addToCache(texture, imageUrl);\n        }\n\n        return texture;\n    }\n\n    /**\n     * Adds a Texture to the global TextureCache. This cache is shared across the whole PIXI object.\n     *\n     * @static\n     * @param {PIXI.Texture} texture - The Texture to add to the cache.\n     * @param {string} id - The id that the Texture will be stored against.\n     */\n    static addToCache(texture, id)\n    {\n        if (id)\n        {\n            if (texture.textureCacheIds.indexOf(id) === -1)\n            {\n                texture.textureCacheIds.push(id);\n            }\n\n            // @if DEBUG\n            /* eslint-disable no-console */\n            if (TextureCache[id])\n            {\n                console.warn(`Texture added to the cache with an id [${id}] that already had an entry`);\n            }\n            /* eslint-enable no-console */\n            // @endif\n\n            TextureCache[id] = texture;\n        }\n    }\n\n    /**\n     * Remove a Texture from the global TextureCache.\n     *\n     * @static\n     * @param {string|PIXI.Texture} texture - id of a Texture to be removed, or a Texture instance itself\n     * @return {PIXI.Texture|null} The Texture that was removed\n     */\n    static removeFromCache(texture)\n    {\n        if (typeof texture === 'string')\n        {\n            const textureFromCache = TextureCache[texture];\n\n            if (textureFromCache)\n            {\n                const index = textureFromCache.textureCacheIds.indexOf(texture);\n\n                if (index > -1)\n                {\n                    textureFromCache.textureCacheIds.splice(index, 1);\n                }\n\n                delete TextureCache[texture];\n\n                return textureFromCache;\n            }\n        }\n        else if (texture && texture.textureCacheIds)\n        {\n            for (let i = 0; i < texture.textureCacheIds.length; ++i)\n            {\n                // Check that texture matches the one being passed in before deleting it from the cache.\n                if (TextureCache[texture.textureCacheIds[i]] === texture)\n                {\n                    delete TextureCache[texture.textureCacheIds[i]];\n                }\n            }\n\n            texture.textureCacheIds.length = 0;\n\n            return texture;\n        }\n\n        return null;\n    }\n\n    /**\n     * The frame specifies the region of the base texture that this texture uses.\n     *\n     * @member {PIXI.Rectangle}\n     */\n    get frame()\n    {\n        return this._frame;\n    }\n\n    set frame(frame) // eslint-disable-line require-jsdoc\n    {\n        this._frame = frame;\n\n        this.noFrame = false;\n\n        if (frame.x + frame.width > this.baseTexture.width || frame.y + frame.height > this.baseTexture.height)\n        {\n            throw new Error('Texture Error: frame does not fit inside the base Texture dimensions: '\n                + `X: ${frame.x} + ${frame.width} = ${frame.x + frame.width} > ${this.baseTexture.width} `\n                + `Y: ${frame.y} + ${frame.height} = ${frame.y + frame.height} > ${this.baseTexture.height}`);\n        }\n\n        // this.valid = frame && frame.width && frame.height && this.baseTexture.source && this.baseTexture.hasLoaded;\n        this.valid = frame && frame.width && frame.height && this.baseTexture.hasLoaded;\n\n        if (!this.trim && !this.rotate)\n        {\n            this.orig = frame;\n        }\n\n        if (this.valid)\n        {\n            this._updateUvs();\n        }\n    }\n\n    /**\n     * Indicates whether the texture is rotated inside the atlas\n     * set to 2 to compensate for texture packer rotation\n     * set to 6 to compensate for spine packer rotation\n     * can be used to rotate or mirror sprites\n     * See {@link PIXI.GroupD8} for explanation\n     *\n     * @member {number}\n     */\n    get rotate()\n    {\n        return this._rotate;\n    }\n\n    set rotate(rotate) // eslint-disable-line require-jsdoc\n    {\n        this._rotate = rotate;\n        if (this.valid)\n        {\n            this._updateUvs();\n        }\n    }\n\n    /**\n     * The width of the Texture in pixels.\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        return this.orig.width;\n    }\n\n    /**\n     * The height of the Texture in pixels.\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        return this.orig.height;\n    }\n}\n\nfunction createWhiteTexture()\n{\n    const canvas = document.createElement('canvas');\n\n    canvas.width = 10;\n    canvas.height = 10;\n\n    const context = canvas.getContext('2d');\n\n    context.fillStyle = 'white';\n    context.fillRect(0, 0, 10, 10);\n\n    return new Texture(new BaseTexture(canvas));\n}\n\nfunction removeAllHandlers(tex)\n{\n    tex.destroy = function _emptyDestroy() { /* empty */ };\n    tex.on = function _emptyOn() { /* empty */ };\n    tex.once = function _emptyOnce() { /* empty */ };\n    tex.emit = function _emptyEmit() { /* empty */ };\n}\n\n/**\n * An empty texture, used often to not have to create multiple empty textures.\n * Can not be destroyed.\n *\n * @static\n * @constant\n */\nTexture.EMPTY = new Texture(new BaseTexture());\nremoveAllHandlers(Texture.EMPTY);\nremoveAllHandlers(Texture.EMPTY.baseTexture);\n\n/**\n * A white texture of 10x10 size, used for graphics and other things\n * Can not be destroyed.\n *\n * @static\n * @constant\n */\nTexture.WHITE = createWhiteTexture();\nremoveAllHandlers(Texture.WHITE);\nremoveAllHandlers(Texture.WHITE.baseTexture);\n","import GroupD8 from '../math/GroupD8';\n\n/**\n * A standard object to store the Uvs of a texture\n *\n * @class\n * @private\n * @memberof PIXI\n */\nexport default class TextureUvs\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        this.x0 = 0;\n        this.y0 = 0;\n\n        this.x1 = 1;\n        this.y1 = 0;\n\n        this.x2 = 1;\n        this.y2 = 1;\n\n        this.x3 = 0;\n        this.y3 = 1;\n\n        this.uvsUint32 = new Uint32Array(4);\n    }\n\n    /**\n     * Sets the texture Uvs based on the given frame information.\n     *\n     * @private\n     * @param {PIXI.Rectangle} frame - The frame of the texture\n     * @param {PIXI.Rectangle} baseFrame - The base frame of the texture\n     * @param {number} rotate - Rotation of frame, see {@link PIXI.GroupD8}\n     */\n    set(frame, baseFrame, rotate)\n    {\n        const tw = baseFrame.width;\n        const th = baseFrame.height;\n\n        if (rotate)\n        {\n            // width and height div 2 div baseFrame size\n            const w2 = frame.width / 2 / tw;\n            const h2 = frame.height / 2 / th;\n\n            // coordinates of center\n            const cX = (frame.x / tw) + w2;\n            const cY = (frame.y / th) + h2;\n\n            rotate = GroupD8.add(rotate, GroupD8.NW); // NW is top-left corner\n            this.x0 = cX + (w2 * GroupD8.uX(rotate));\n            this.y0 = cY + (h2 * GroupD8.uY(rotate));\n\n            rotate = GroupD8.add(rotate, 2); // rotate 90 degrees clockwise\n            this.x1 = cX + (w2 * GroupD8.uX(rotate));\n            this.y1 = cY + (h2 * GroupD8.uY(rotate));\n\n            rotate = GroupD8.add(rotate, 2);\n            this.x2 = cX + (w2 * GroupD8.uX(rotate));\n            this.y2 = cY + (h2 * GroupD8.uY(rotate));\n\n            rotate = GroupD8.add(rotate, 2);\n            this.x3 = cX + (w2 * GroupD8.uX(rotate));\n            this.y3 = cY + (h2 * GroupD8.uY(rotate));\n        }\n        else\n        {\n            this.x0 = frame.x / tw;\n            this.y0 = frame.y / th;\n\n            this.x1 = (frame.x + frame.width) / tw;\n            this.y1 = frame.y / th;\n\n            this.x2 = (frame.x + frame.width) / tw;\n            this.y2 = (frame.y + frame.height) / th;\n\n            this.x3 = frame.x / tw;\n            this.y3 = (frame.y + frame.height) / th;\n        }\n\n        this.uvsUint32[0] = (((this.y0 * 65535) & 0xFFFF) << 16) | ((this.x0 * 65535) & 0xFFFF);\n        this.uvsUint32[1] = (((this.y1 * 65535) & 0xFFFF) << 16) | ((this.x1 * 65535) & 0xFFFF);\n        this.uvsUint32[2] = (((this.y2 * 65535) & 0xFFFF) << 16) | ((this.x2 * 65535) & 0xFFFF);\n        this.uvsUint32[3] = (((this.y3 * 65535) & 0xFFFF) << 16) | ((this.x3 * 65535) & 0xFFFF);\n    }\n}\n","import BaseTexture from './BaseTexture';\nimport { uid, BaseTextureCache } from '../utils';\nimport { shared } from '../ticker';\nimport { UPDATE_PRIORITY } from '../const';\n\n/**\n * A texture of a [playing] Video.\n *\n * Video base textures mimic PixiJS BaseTexture.from.... method in their creation process.\n *\n * This can be used in several ways, such as:\n *\n * ```js\n * let texture = PIXI.VideoBaseTexture.fromUrl('http://mydomain.com/video.mp4');\n *\n * let texture = PIXI.VideoBaseTexture.fromUrl({ src: 'http://mydomain.com/video.mp4', mime: 'video/mp4' });\n *\n * let texture = PIXI.VideoBaseTexture.fromUrls(['/video.webm', '/video.mp4']);\n *\n * let texture = PIXI.VideoBaseTexture.fromUrls([\n *     { src: '/video.webm', mime: 'video/webm' },\n *     { src: '/video.mp4', mime: 'video/mp4' }\n * ]);\n * ```\n *\n * See the [\"deus\" demo](http://www.goodboydigital.com/pixijs/examples/deus/).\n *\n * @class\n * @extends PIXI.BaseTexture\n * @memberof PIXI\n */\nexport default class VideoBaseTexture extends BaseTexture\n{\n    /**\n     * @param {HTMLVideoElement} source - Video source\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     */\n    constructor(source, scaleMode)\n    {\n        if (!source)\n        {\n            throw new Error('No video source element specified.');\n        }\n\n        // hook in here to check if video is already available.\n        // BaseTexture looks for a source.complete boolean, plus width & height.\n\n        if ((source.readyState === source.HAVE_ENOUGH_DATA || source.readyState === source.HAVE_FUTURE_DATA)\n            && source.width && source.height)\n        {\n            source.complete = true;\n        }\n\n        super(source, scaleMode);\n\n        this.width = source.videoWidth;\n        this.height = source.videoHeight;\n\n        this._autoUpdate = true;\n        this._isAutoUpdating = false;\n\n        /**\n         * When set to true will automatically play videos used by this texture once\n         * they are loaded. If false, it will not modify the playing state.\n         *\n         * @member {boolean}\n         * @default true\n         */\n        this.autoPlay = true;\n\n        this.update = this.update.bind(this);\n        this._onCanPlay = this._onCanPlay.bind(this);\n\n        source.addEventListener('play', this._onPlayStart.bind(this));\n        source.addEventListener('pause', this._onPlayStop.bind(this));\n        this.hasLoaded = false;\n        this.__loaded = false;\n\n        if (!this._isSourceReady())\n        {\n            source.addEventListener('canplay', this._onCanPlay);\n            source.addEventListener('canplaythrough', this._onCanPlay);\n        }\n        else\n        {\n            this._onCanPlay();\n        }\n    }\n\n    /**\n     * Returns true if the underlying source is playing.\n     *\n     * @private\n     * @return {boolean} True if playing.\n     */\n    _isSourcePlaying()\n    {\n        const source = this.source;\n\n        return (source.currentTime > 0 && source.paused === false && source.ended === false && source.readyState > 2);\n    }\n\n    /**\n     * Returns true if the underlying source is ready for playing.\n     *\n     * @private\n     * @return {boolean} True if ready.\n     */\n    _isSourceReady()\n    {\n        return this.source.readyState === 3 || this.source.readyState === 4;\n    }\n\n    /**\n     * Runs the update loop when the video is ready to play\n     *\n     * @private\n     */\n    _onPlayStart()\n    {\n        // Just in case the video has not received its can play even yet..\n        if (!this.hasLoaded)\n        {\n            this._onCanPlay();\n        }\n\n        if (!this._isAutoUpdating && this.autoUpdate)\n        {\n            shared.add(this.update, this, UPDATE_PRIORITY.HIGH);\n            this._isAutoUpdating = true;\n        }\n    }\n\n    /**\n     * Fired when a pause event is triggered, stops the update loop\n     *\n     * @private\n     */\n    _onPlayStop()\n    {\n        if (this._isAutoUpdating)\n        {\n            shared.remove(this.update, this);\n            this._isAutoUpdating = false;\n        }\n    }\n\n    /**\n     * Fired when the video is loaded and ready to play\n     *\n     * @private\n     */\n    _onCanPlay()\n    {\n        this.hasLoaded = true;\n\n        if (this.source)\n        {\n            this.source.removeEventListener('canplay', this._onCanPlay);\n            this.source.removeEventListener('canplaythrough', this._onCanPlay);\n\n            this.width = this.source.videoWidth;\n            this.height = this.source.videoHeight;\n\n            // prevent multiple loaded dispatches..\n            if (!this.__loaded)\n            {\n                this.__loaded = true;\n                this.emit('loaded', this);\n            }\n\n            if (this._isSourcePlaying())\n            {\n                this._onPlayStart();\n            }\n            else if (this.autoPlay)\n            {\n                this.source.play();\n            }\n        }\n    }\n\n    /**\n     * Destroys this texture\n     *\n     */\n    destroy()\n    {\n        if (this._isAutoUpdating)\n        {\n            shared.remove(this.update, this);\n        }\n\n        if (this.source && this.source._pixiId)\n        {\n            BaseTexture.removeFromCache(this.source._pixiId);\n            delete this.source._pixiId;\n        }\n\n        super.destroy();\n    }\n\n    /**\n     * Mimic PixiJS BaseTexture.from.... method.\n     *\n     * @static\n     * @param {HTMLVideoElement} video - Video to create texture from\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n     * @return {PIXI.VideoBaseTexture} Newly created VideoBaseTexture\n     */\n    static fromVideo(video, scaleMode)\n    {\n        if (!video._pixiId)\n        {\n            video._pixiId = `video_${uid()}`;\n        }\n\n        let baseTexture = BaseTextureCache[video._pixiId];\n\n        if (!baseTexture)\n        {\n            baseTexture = new VideoBaseTexture(video, scaleMode);\n            BaseTexture.addToCache(baseTexture, video._pixiId);\n        }\n\n        return baseTexture;\n    }\n\n    /**\n     * Helper function that creates a new BaseTexture based on the given video element.\n     * This BaseTexture can then be used to create a texture\n     *\n     * @static\n     * @param {string|object|string[]|object[]} videoSrc - The URL(s) for the video.\n     * @param {string} [videoSrc.src] - One of the source urls for the video\n     * @param {string} [videoSrc.mime] - The mimetype of the video (e.g. 'video/mp4'). If not specified\n     *  the url's extension will be used as the second part of the mime type.\n     * @param {number} scaleMode - See {@link PIXI.SCALE_MODES} for possible values\n     * @return {PIXI.VideoBaseTexture} Newly created VideoBaseTexture\n     */\n    static fromUrl(videoSrc, scaleMode)\n    {\n        const video = document.createElement('video');\n\n        video.setAttribute('webkit-playsinline', '');\n        video.setAttribute('playsinline', '');\n\n        // array of objects or strings\n        if (Array.isArray(videoSrc))\n        {\n            for (let i = 0; i < videoSrc.length; ++i)\n            {\n                video.appendChild(createSource(videoSrc[i].src || videoSrc[i], videoSrc[i].mime));\n            }\n        }\n        // single object or string\n        else\n        {\n            video.appendChild(createSource(videoSrc.src || videoSrc, videoSrc.mime));\n        }\n\n        video.load();\n\n        return VideoBaseTexture.fromVideo(video, scaleMode);\n    }\n\n    /**\n     * Should the base texture automatically update itself, set to true by default\n     *\n     * @member {boolean}\n     */\n    get autoUpdate()\n    {\n        return this._autoUpdate;\n    }\n\n    set autoUpdate(value) // eslint-disable-line require-jsdoc\n    {\n        if (value !== this._autoUpdate)\n        {\n            this._autoUpdate = value;\n\n            if (!this._autoUpdate && this._isAutoUpdating)\n            {\n                shared.remove(this.update, this);\n                this._isAutoUpdating = false;\n            }\n            else if (this._autoUpdate && !this._isAutoUpdating)\n            {\n                shared.add(this.update, this, UPDATE_PRIORITY.HIGH);\n                this._isAutoUpdating = true;\n            }\n        }\n    }\n}\n\nVideoBaseTexture.fromUrls = VideoBaseTexture.fromUrl;\n\nfunction createSource(path, type)\n{\n    if (!type)\n    {\n        type = `video/${path.substr(path.lastIndexOf('.') + 1)}`;\n    }\n\n    const source = document.createElement('source');\n\n    source.src = path;\n    source.type = type;\n\n    return source;\n}\n","import settings from '../settings';\nimport { UPDATE_PRIORITY } from '../const';\nimport TickerListener from './TickerListener';\n\n/**\n * A Ticker class that runs an update loop that other objects listen to.\n * This class is composed around listeners\n * meant for execution on the next requested animation frame.\n * Animation frames are requested only when necessary,\n * e.g. When the ticker is started and the emitter has listeners.\n *\n * @class\n * @memberof PIXI.ticker\n */\nexport default class Ticker\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        /**\n         * The first listener. All new listeners added are chained on this.\n         * @private\n         * @type {TickerListener}\n         */\n        this._head = new TickerListener(null, null, Infinity);\n\n        /**\n         * Internal current frame request ID\n         * @private\n         */\n        this._requestId = null;\n\n        /**\n         * Internal value managed by minFPS property setter and getter.\n         * This is the maximum allowed milliseconds between updates.\n         * @private\n         */\n        this._maxElapsedMS = 100;\n\n        /**\n         * Whether or not this ticker should invoke the method\n         * {@link PIXI.ticker.Ticker#start} automatically\n         * when a listener is added.\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.autoStart = false;\n\n        /**\n         * Scalar time value from last frame to this frame.\n         * This value is capped by setting {@link PIXI.ticker.Ticker#minFPS}\n         * and is scaled with {@link PIXI.ticker.Ticker#speed}.\n         * **Note:** The cap may be exceeded by scaling.\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.deltaTime = 1;\n\n        /**\n         * Time elapsed in milliseconds from last frame to this frame.\n         * Opposed to what the scalar {@link PIXI.ticker.Ticker#deltaTime}\n         * is based, this value is neither capped nor scaled.\n         * If the platform supports DOMHighResTimeStamp,\n         * this value will have a precision of 1 µs.\n         * Defaults to target frame time\n         *\n         * @member {number}\n         * @default 16.66\n         */\n        this.elapsedMS = 1 / settings.TARGET_FPMS;\n\n        /**\n         * The last time {@link PIXI.ticker.Ticker#update} was invoked.\n         * This value is also reset internally outside of invoking\n         * update, but only when a new animation frame is requested.\n         * If the platform supports DOMHighResTimeStamp,\n         * this value will have a precision of 1 µs.\n         *\n         * @member {number}\n         * @default -1\n         */\n        this.lastTime = -1;\n\n        /**\n         * Factor of current {@link PIXI.ticker.Ticker#deltaTime}.\n         * @example\n         * // Scales ticker.deltaTime to what would be\n         * // the equivalent of approximately 120 FPS\n         * ticker.speed = 2;\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.speed = 1;\n\n        /**\n         * Whether or not this ticker has been started.\n         * `true` if {@link PIXI.ticker.Ticker#start} has been called.\n         * `false` if {@link PIXI.ticker.Ticker#stop} has been called.\n         * While `false`, this value may change to `true` in the\n         * event of {@link PIXI.ticker.Ticker#autoStart} being `true`\n         * and a listener is added.\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.started = false;\n\n        /**\n         * Internal tick method bound to ticker instance.\n         * This is because in early 2015, Function.bind\n         * is still 60% slower in high performance scenarios.\n         * Also separating frame requests from update method\n         * so listeners may be called at any time and with\n         * any animation API, just invoke ticker.update(time).\n         *\n         * @private\n         * @param {number} time - Time since last tick.\n         */\n        this._tick = (time) =>\n        {\n            this._requestId = null;\n\n            if (this.started)\n            {\n                // Invoke listeners now\n                this.update(time);\n                // Listener side effects may have modified ticker state.\n                if (this.started && this._requestId === null && this._head.next)\n                {\n                    this._requestId = requestAnimationFrame(this._tick);\n                }\n            }\n        };\n    }\n\n    /**\n     * Conditionally requests a new animation frame.\n     * If a frame has not already been requested, and if the internal\n     * emitter has listeners, a new frame is requested.\n     *\n     * @private\n     */\n    _requestIfNeeded()\n    {\n        if (this._requestId === null && this._head.next)\n        {\n            // ensure callbacks get correct delta\n            this.lastTime = performance.now();\n            this._requestId = requestAnimationFrame(this._tick);\n        }\n    }\n\n    /**\n     * Conditionally cancels a pending animation frame.\n     *\n     * @private\n     */\n    _cancelIfNeeded()\n    {\n        if (this._requestId !== null)\n        {\n            cancelAnimationFrame(this._requestId);\n            this._requestId = null;\n        }\n    }\n\n    /**\n     * Conditionally requests a new animation frame.\n     * If the ticker has been started it checks if a frame has not already\n     * been requested, and if the internal emitter has listeners. If these\n     * conditions are met, a new frame is requested. If the ticker has not\n     * been started, but autoStart is `true`, then the ticker starts now,\n     * and continues with the previous conditions to request a new frame.\n     *\n     * @private\n     */\n    _startIfPossible()\n    {\n        if (this.started)\n        {\n            this._requestIfNeeded();\n        }\n        else if (this.autoStart)\n        {\n            this.start();\n        }\n    }\n\n    /**\n     * Register a handler for tick events. Calls continuously unless\n     * it is removed or the ticker is stopped.\n     *\n     * @param {Function} fn - The listener function to be added for updates\n     * @param {Function} [context] - The listener context\n     * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting\n     * @returns {PIXI.ticker.Ticker} This instance of a ticker\n     */\n    add(fn, context, priority = UPDATE_PRIORITY.NORMAL)\n    {\n        return this._addListener(new TickerListener(fn, context, priority));\n    }\n\n    /**\n     * Add a handler for the tick event which is only execute once.\n     *\n     * @param {Function} fn - The listener function to be added for one update\n     * @param {Function} [context] - The listener context\n     * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting\n     * @returns {PIXI.ticker.Ticker} This instance of a ticker\n     */\n    addOnce(fn, context, priority = UPDATE_PRIORITY.NORMAL)\n    {\n        return this._addListener(new TickerListener(fn, context, priority, true));\n    }\n\n    /**\n     * Internally adds the event handler so that it can be sorted by priority.\n     * Priority allows certain handler (user, AnimatedSprite, Interaction) to be run\n     * before the rendering.\n     *\n     * @private\n     * @param {TickerListener} listener - Current listener being added.\n     * @returns {PIXI.ticker.Ticker} This instance of a ticker\n     */\n    _addListener(listener)\n    {\n        // For attaching to head\n        let current = this._head.next;\n        let previous = this._head;\n\n        // Add the first item\n        if (!current)\n        {\n            listener.connect(previous);\n        }\n        else\n        {\n            // Go from highest to lowest priority\n            while (current)\n            {\n                if (listener.priority > current.priority)\n                {\n                    listener.connect(previous);\n                    break;\n                }\n                previous = current;\n                current = current.next;\n            }\n\n            // Not yet connected\n            if (!listener.previous)\n            {\n                listener.connect(previous);\n            }\n        }\n\n        this._startIfPossible();\n\n        return this;\n    }\n\n    /**\n     * Removes any handlers matching the function and context parameters.\n     * If no handlers are left after removing, then it cancels the animation frame.\n     *\n     * @param {Function} fn - The listener function to be removed\n     * @param {Function} [context] - The listener context to be removed\n     * @returns {PIXI.ticker.Ticker} This instance of a ticker\n     */\n    remove(fn, context)\n    {\n        let listener = this._head.next;\n\n        while (listener)\n        {\n            // We found a match, lets remove it\n            // no break to delete all possible matches\n            // incase a listener was added 2+ times\n            if (listener.match(fn, context))\n            {\n                listener = listener.destroy();\n            }\n            else\n            {\n                listener = listener.next;\n            }\n        }\n\n        if (!this._head.next)\n        {\n            this._cancelIfNeeded();\n        }\n\n        return this;\n    }\n\n    /**\n     * Starts the ticker. If the ticker has listeners\n     * a new animation frame is requested at this point.\n     */\n    start()\n    {\n        if (!this.started)\n        {\n            this.started = true;\n            this._requestIfNeeded();\n        }\n    }\n\n    /**\n     * Stops the ticker. If the ticker has requested\n     * an animation frame it is canceled at this point.\n     */\n    stop()\n    {\n        if (this.started)\n        {\n            this.started = false;\n            this._cancelIfNeeded();\n        }\n    }\n\n    /**\n     * Destroy the ticker and don't use after this. Calling\n     * this method removes all references to internal events.\n     */\n    destroy()\n    {\n        this.stop();\n\n        let listener = this._head.next;\n\n        while (listener)\n        {\n            listener = listener.destroy(true);\n        }\n\n        this._head.destroy();\n        this._head = null;\n    }\n\n    /**\n     * Triggers an update. An update entails setting the\n     * current {@link PIXI.ticker.Ticker#elapsedMS},\n     * the current {@link PIXI.ticker.Ticker#deltaTime},\n     * invoking all listeners with current deltaTime,\n     * and then finally setting {@link PIXI.ticker.Ticker#lastTime}\n     * with the value of currentTime that was provided.\n     * This method will be called automatically by animation\n     * frame callbacks if the ticker instance has been started\n     * and listeners are added.\n     *\n     * @param {number} [currentTime=performance.now()] - the current time of execution\n     */\n    update(currentTime = performance.now())\n    {\n        let elapsedMS;\n\n        // If the difference in time is zero or negative, we ignore most of the work done here.\n        // If there is no valid difference, then should be no reason to let anyone know about it.\n        // A zero delta, is exactly that, nothing should update.\n        //\n        // The difference in time can be negative, and no this does not mean time traveling.\n        // This can be the result of a race condition between when an animation frame is requested\n        // on the current JavaScript engine event loop, and when the ticker's start method is invoked\n        // (which invokes the internal _requestIfNeeded method). If a frame is requested before\n        // _requestIfNeeded is invoked, then the callback for the animation frame the ticker requests,\n        // can receive a time argument that can be less than the lastTime value that was set within\n        // _requestIfNeeded. This difference is in microseconds, but this is enough to cause problems.\n        //\n        // This check covers this browser engine timing issue, as well as if consumers pass an invalid\n        // currentTime value. This may happen if consumers opt-out of the autoStart, and update themselves.\n\n        if (currentTime > this.lastTime)\n        {\n            // Save uncapped elapsedMS for measurement\n            elapsedMS = this.elapsedMS = currentTime - this.lastTime;\n\n            // cap the milliseconds elapsed used for deltaTime\n            if (elapsedMS > this._maxElapsedMS)\n            {\n                elapsedMS = this._maxElapsedMS;\n            }\n\n            this.deltaTime = elapsedMS * settings.TARGET_FPMS * this.speed;\n\n            // Cache a local reference, in-case ticker is destroyed\n            // during the emit, we can still check for head.next\n            const head = this._head;\n\n            // Invoke listeners added to internal emitter\n            let listener = head.next;\n\n            while (listener)\n            {\n                listener = listener.emit(this.deltaTime);\n            }\n\n            if (!head.next)\n            {\n                this._cancelIfNeeded();\n            }\n        }\n        else\n        {\n            this.deltaTime = this.elapsedMS = 0;\n        }\n\n        this.lastTime = currentTime;\n    }\n\n    /**\n     * The frames per second at which this ticker is running.\n     * The default is approximately 60 in most modern browsers.\n     * **Note:** This does not factor in the value of\n     * {@link PIXI.ticker.Ticker#speed}, which is specific\n     * to scaling {@link PIXI.ticker.Ticker#deltaTime}.\n     *\n     * @member {number}\n     * @readonly\n     */\n    get FPS()\n    {\n        return 1000 / this.elapsedMS;\n    }\n\n    /**\n     * Manages the maximum amount of milliseconds allowed to\n     * elapse between invoking {@link PIXI.ticker.Ticker#update}.\n     * This value is used to cap {@link PIXI.ticker.Ticker#deltaTime},\n     * but does not effect the measured value of {@link PIXI.ticker.Ticker#FPS}.\n     * When setting this property it is clamped to a value between\n     * `0` and `PIXI.settings.TARGET_FPMS * 1000`.\n     *\n     * @member {number}\n     * @default 10\n     */\n    get minFPS()\n    {\n        return 1000 / this._maxElapsedMS;\n    }\n\n    set minFPS(fps) // eslint-disable-line require-jsdoc\n    {\n        // Clamp: 0 to TARGET_FPMS\n        const minFPMS = Math.min(Math.max(0, fps) / 1000, settings.TARGET_FPMS);\n\n        this._maxElapsedMS = 1 / minFPMS;\n    }\n}\n","/**\n * Internal class for handling the priority sorting of ticker handlers.\n *\n * @private\n * @class\n * @memberof PIXI.ticker\n */\nexport default class TickerListener\n{\n    /**\n     * Constructor\n     *\n     * @param {Function} fn - The listener function to be added for one update\n     * @param {Function} [context=null] - The listener context\n     * @param {number} [priority=0] - The priority for emitting\n     * @param {boolean} [once=false] - If the handler should fire once\n     */\n    constructor(fn, context = null, priority = 0, once = false)\n    {\n        /**\n         * The handler function to execute.\n         * @member {Function}\n         */\n        this.fn = fn;\n\n        /**\n         * The calling to execute.\n         * @member {Function}\n         */\n        this.context = context;\n\n        /**\n         * The current priority.\n         * @member {number}\n         */\n        this.priority = priority;\n\n        /**\n         * If this should only execute once.\n         * @member {boolean}\n         */\n        this.once = once;\n\n        /**\n         * The next item in chain.\n         * @member {TickerListener}\n         */\n        this.next = null;\n\n        /**\n         * The previous item in chain.\n         * @member {TickerListener}\n         */\n        this.previous = null;\n\n        /**\n         * `true` if this listener has been destroyed already.\n         * @member {boolean}\n         * @private\n         */\n        this._destroyed = false;\n    }\n\n    /**\n     * Simple compare function to figure out if a function and context match.\n     *\n     * @param {Function} fn - The listener function to be added for one update\n     * @param {Function} context - The listener context\n     * @return {boolean} `true` if the listener match the arguments\n     */\n    match(fn, context)\n    {\n        context = context || null;\n\n        return this.fn === fn && this.context === context;\n    }\n\n    /**\n     * Emit by calling the current function.\n     * @param {number} deltaTime - time since the last emit.\n     * @return {TickerListener} Next ticker\n     */\n    emit(deltaTime)\n    {\n        if (this.fn)\n        {\n            if (this.context)\n            {\n                this.fn.call(this.context, deltaTime);\n            }\n            else\n            {\n                this.fn(deltaTime);\n            }\n        }\n\n        const redirect = this.next;\n\n        if (this.once)\n        {\n            this.destroy(true);\n        }\n\n        // Soft-destroying should remove\n        // the next reference\n        if (this._destroyed)\n        {\n            this.next = null;\n        }\n\n        return redirect;\n    }\n\n    /**\n     * Connect to the list.\n     * @param {TickerListener} previous - Input node, previous listener\n     */\n    connect(previous)\n    {\n        this.previous = previous;\n        if (previous.next)\n        {\n            previous.next.previous = this;\n        }\n        this.next = previous.next;\n        previous.next = this;\n    }\n\n    /**\n     * Destroy and don't use after this.\n     * @param {boolean} [hard = false] `true` to remove the `next` reference, this\n     *        is considered a hard destroy. Soft destroy maintains the next reference.\n     * @return {TickerListener} The listener to redirect while emitting or removing.\n     */\n    destroy(hard = false)\n    {\n        this._destroyed = true;\n        this.fn = null;\n        this.context = null;\n\n        // Disconnect, hook up next and previous\n        if (this.previous)\n        {\n            this.previous.next = this.next;\n        }\n\n        if (this.next)\n        {\n            this.next.previous = this.previous;\n        }\n\n        // Redirect to the next item\n        const redirect = this.previous;\n\n        // Remove references\n        this.next = hard ? null : redirect;\n        this.previous = null;\n\n        return redirect;\n    }\n}\n","import Ticker from './Ticker';\n\n/**\n * The shared ticker instance used by {@link PIXI.extras.AnimatedSprite}.\n * and by {@link PIXI.interaction.InteractionManager}.\n * The property {@link PIXI.ticker.Ticker#autoStart} is set to `true`\n * for this instance. Please follow the examples for usage, including\n * how to opt-out of auto-starting the shared ticker.\n *\n * @example\n * let ticker = PIXI.ticker.shared;\n * // Set this to prevent starting this ticker when listeners are added.\n * // By default this is true only for the PIXI.ticker.shared instance.\n * ticker.autoStart = false;\n * // FYI, call this to ensure the ticker is stopped. It should be stopped\n * // if you have not attempted to render anything yet.\n * ticker.stop();\n * // Call this when you are ready for a running shared ticker.\n * ticker.start();\n *\n * @example\n * // You may use the shared ticker to render...\n * let renderer = PIXI.autoDetectRenderer(800, 600);\n * let stage = new PIXI.Container();\n * let interactionManager = PIXI.interaction.InteractionManager(renderer);\n * document.body.appendChild(renderer.view);\n * ticker.add(function (time) {\n *     renderer.render(stage);\n * });\n *\n * @example\n * // Or you can just update it manually.\n * ticker.autoStart = false;\n * ticker.stop();\n * function animate(time) {\n *     ticker.update(time);\n *     renderer.render(stage);\n *     requestAnimationFrame(animate);\n * }\n * animate(performance.now());\n *\n * @type {PIXI.ticker.Ticker}\n * @memberof PIXI.ticker\n */\nconst shared = new Ticker();\n\nshared.autoStart = true;\nshared.destroy = () =>\n{\n\t// protect destroying shared ticker\n\t// this is used by other internal systems\n\t// like AnimatedSprite and InteractionManager\n};\n\n/**\n * This namespace contains an API for interacting with PIXI's internal global update loop.\n *\n * This ticker is used for rendering, {@link PIXI.extras.AnimatedSprite AnimatedSprite},\n * {@link PIXI.interaction.InteractionManager InteractionManager} and many other time-based PIXI systems.\n * @example\n * const ticker = new PIXI.ticker.Ticker();\n * ticker.stop();\n * ticker.add((deltaTime) => {\n *   // do something every frame\n * });\n * ticker.start();\n * @namespace PIXI.ticker\n */\nexport { shared, Ticker };\n","export default function canUploadSameBuffer()\n{\n\t// Uploading the same buffer multiple times in a single frame can cause perf issues.\n\t// Apparent on IOS so only check for that at the moment\n\t// this check may become more complex if this issue pops up elsewhere.\n    const ios = !!navigator.platform && (/iPad|iPhone|iPod/).test(navigator.platform);\n\n    return !ios;\n}\n","/**\n * Generic Mask Stack data structure\n *\n * @memberof PIXI\n * @function createIndicesForQuads\n * @private\n * @param {number} size - Number of quads\n * @return {Uint16Array} indices\n */\nexport default function createIndicesForQuads(size)\n{\n    // the total number of indices in our array, there are 6 points per quad.\n\n    const totalIndices = size * 6;\n\n    const indices = new Uint16Array(totalIndices);\n\n    // fill the indices with the quads to draw\n    for (let i = 0, j = 0; i < totalIndices; i += 6, j += 4)\n    {\n        indices[i + 0] = j + 0;\n        indices[i + 1] = j + 1;\n        indices[i + 2] = j + 2;\n        indices[i + 3] = j + 0;\n        indices[i + 4] = j + 2;\n        indices[i + 5] = j + 3;\n    }\n\n    return indices;\n}\n","import _url from 'url';\n\nlet tempAnchor;\n\n/**\n * Sets the `crossOrigin` property for this resource based on if the url\n * for this resource is cross-origin. If crossOrigin was manually set, this\n * function does nothing.\n * Nipped from the resource loader!\n *\n * @ignore\n * @param {string} url - The url to test.\n * @param {object} [loc=window.location] - The location object to test against.\n * @return {string} The crossOrigin value to use (or empty string for none).\n */\nexport default function determineCrossOrigin(url, loc = window.location)\n{\n    // data: and javascript: urls are considered same-origin\n    if (url.indexOf('data:') === 0)\n    {\n        return '';\n    }\n\n    // default is window.location\n    loc = loc || window.location;\n\n    if (!tempAnchor)\n    {\n        tempAnchor = document.createElement('a');\n    }\n\n    // let the browser determine the full href for the url of this resource and then\n    // parse with the node url lib, we can't use the properties of the anchor element\n    // because they don't work in IE9 :(\n    tempAnchor.href = url;\n    url = _url.parse(tempAnchor.href);\n\n    const samePort = (!url.port && loc.port === '') || (url.port === loc.port);\n\n    // if cross origin\n    if (url.hostname !== loc.hostname || !samePort || url.protocol !== loc.protocol)\n    {\n        return 'anonymous';\n    }\n\n    return '';\n}\n","import { DATA_URI, URL_FILE_EXTENSION, SVG_SIZE, VERSION } from '../const';\nimport settings from '../settings';\nimport EventEmitter from 'eventemitter3';\nimport pluginTarget from './pluginTarget';\nimport * as mixins from './mixin';\nimport * as isMobile from 'ismobilejs';\nimport removeItems from 'remove-array-items';\nimport mapPremultipliedBlendModes from './mapPremultipliedBlendModes';\n\nlet nextUid = 0;\nlet saidHello = false;\n\n/**\n * Generalized convenience utilities for PIXI.\n * @example\n * // Extend PIXI's internal Event Emitter.\n * class MyEmitter extends PIXI.utils.EventEmitter {\n *   constructor() {\n *      super();\n *      console.log(\"Emitter created!\");\n *   }\n * }\n *\n * // Get info on current device\n * console.log(PIXI.utils.isMobile);\n *\n * // Convert hex color to string\n * console.log(PIXI.utils.hex2string(0xff00ff)); // returns: \"#ff00ff\"\n * @namespace PIXI.utils\n */\nexport {\n    /**\n     * @see {@link https://github.com/kaimallea/isMobile}\n     *\n     * @memberof PIXI.utils\n     * @function isMobile\n     * @type {Object}\n     */\n    isMobile,\n\n    /**\n     * @see {@link https://github.com/mreinstein/remove-array-items}\n     *\n     * @memberof PIXI.utils\n     * @function removeItems\n     * @type {Object}\n     */\n    removeItems,\n    /**\n     * @see {@link https://github.com/primus/eventemitter3}\n     *\n     * @memberof PIXI.utils\n     * @class EventEmitter\n     * @type {EventEmitter}\n     */\n    EventEmitter,\n    /**\n     * @memberof PIXI.utils\n     * @function pluginTarget\n     * @type {mixin}\n     */\n    pluginTarget,\n    mixins,\n};\n\n/**\n * Gets the next unique identifier\n *\n * @memberof PIXI.utils\n * @function uid\n * @return {number} The next unique identifier to use.\n */\nexport function uid()\n{\n    return ++nextUid;\n}\n\n/**\n * Converts a hex color number to an [R, G, B] array\n *\n * @memberof PIXI.utils\n * @function hex2rgb\n * @param {number} hex - The number to convert\n * @param  {number[]} [out=[]] If supplied, this array will be used rather than returning a new one\n * @return {number[]} An array representing the [R, G, B] of the color.\n */\nexport function hex2rgb(hex, out)\n{\n    out = out || [];\n\n    out[0] = ((hex >> 16) & 0xFF) / 255;\n    out[1] = ((hex >> 8) & 0xFF) / 255;\n    out[2] = (hex & 0xFF) / 255;\n\n    return out;\n}\n\n/**\n * Converts a hex color number to a string.\n *\n * @memberof PIXI.utils\n * @function hex2string\n * @param {number} hex - Number in hex\n * @return {string} The string color.\n */\nexport function hex2string(hex)\n{\n    hex = hex.toString(16);\n    hex = '000000'.substr(0, 6 - hex.length) + hex;\n\n    return `#${hex}`;\n}\n\n/**\n * Converts a color as an [R, G, B] array to a hex number\n *\n * @memberof PIXI.utils\n * @function rgb2hex\n * @param {number[]} rgb - rgb array\n * @return {number} The color number\n */\nexport function rgb2hex(rgb)\n{\n    return (((rgb[0] * 255) << 16) + ((rgb[1] * 255) << 8) + (rgb[2] * 255 | 0));\n}\n\n/**\n * get the resolution / device pixel ratio of an asset by looking for the prefix\n * used by spritesheets and image urls\n *\n * @memberof PIXI.utils\n * @function getResolutionOfUrl\n * @param {string} url - the image path\n * @param {number} [defaultValue=1] - the defaultValue if no filename prefix is set.\n * @return {number} resolution / device pixel ratio of an asset\n */\nexport function getResolutionOfUrl(url, defaultValue)\n{\n    const resolution = settings.RETINA_PREFIX.exec(url);\n\n    if (resolution)\n    {\n        return parseFloat(resolution[1]);\n    }\n\n    return defaultValue !== undefined ? defaultValue : 1;\n}\n\n/**\n * Typedef for decomposeDataUri return object.\n *\n * @typedef {object} DecomposedDataUri\n * @property {mediaType} Media type, eg. `image`\n * @property {subType} Sub type, eg. `png`\n * @property {encoding} Data encoding, eg. `base64`\n * @property {data} The actual data\n */\n\n/**\n * Split a data URI into components. Returns undefined if\n * parameter `dataUri` is not a valid data URI.\n *\n * @memberof PIXI.utils\n * @function decomposeDataUri\n * @param {string} dataUri - the data URI to check\n * @return {DecomposedDataUri|undefined} The decomposed data uri or undefined\n */\nexport function decomposeDataUri(dataUri)\n{\n    const dataUriMatch = DATA_URI.exec(dataUri);\n\n    if (dataUriMatch)\n    {\n        return {\n            mediaType: dataUriMatch[1] ? dataUriMatch[1].toLowerCase() : undefined,\n            subType: dataUriMatch[2] ? dataUriMatch[2].toLowerCase() : undefined,\n            encoding: dataUriMatch[3] ? dataUriMatch[3].toLowerCase() : undefined,\n            data: dataUriMatch[4],\n        };\n    }\n\n    return undefined;\n}\n\n/**\n * Get type of the image by regexp for extension. Returns undefined for unknown extensions.\n *\n * @memberof PIXI.utils\n * @function getUrlFileExtension\n * @param {string} url - the image path\n * @return {string|undefined} image extension\n */\nexport function getUrlFileExtension(url)\n{\n    const extension = URL_FILE_EXTENSION.exec(url);\n\n    if (extension)\n    {\n        return extension[1].toLowerCase();\n    }\n\n    return undefined;\n}\n\n/**\n * Typedef for Size object.\n *\n * @typedef {object} Size\n * @property {width} Width component\n * @property {height} Height component\n */\n\n/**\n * Get size from an svg string using regexp.\n *\n * @memberof PIXI.utils\n * @function getSvgSize\n * @param {string} svgString - a serialized svg element\n * @return {Size|undefined} image extension\n */\nexport function getSvgSize(svgString)\n{\n    const sizeMatch = SVG_SIZE.exec(svgString);\n    const size = {};\n\n    if (sizeMatch)\n    {\n        size[sizeMatch[1]] = Math.round(parseFloat(sizeMatch[3]));\n        size[sizeMatch[5]] = Math.round(parseFloat(sizeMatch[7]));\n    }\n\n    return size;\n}\n\n/**\n * Skips the hello message of renderers that are created after this is run.\n *\n * @function skipHello\n * @memberof PIXI.utils\n */\nexport function skipHello()\n{\n    saidHello = true;\n}\n\n/**\n * Logs out the version and renderer information for this running instance of PIXI.\n * If you don't want to see this message you can run `PIXI.utils.skipHello()` before\n * creating your renderer. Keep in mind that doing that will forever makes you a jerk face.\n *\n * @static\n * @function sayHello\n * @memberof PIXI.utils\n * @param {string} type - The string renderer type to log.\n */\nexport function sayHello(type)\n{\n    if (saidHello)\n    {\n        return;\n    }\n\n    if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1)\n    {\n        const args = [\n            `\\n %c %c %c PixiJS ${VERSION} - ✰ ${type} ✰  %c  %c  http://www.pixijs.com/  %c %c ♥%c♥%c♥ \\n\\n`,\n            'background: #ff66a5; padding:5px 0;',\n            'background: #ff66a5; padding:5px 0;',\n            'color: #ff66a5; background: #030307; padding:5px 0;',\n            'background: #ff66a5; padding:5px 0;',\n            'background: #ffc3dc; padding:5px 0;',\n            'background: #ff66a5; padding:5px 0;',\n            'color: #ff2424; background: #fff; padding:5px 0;',\n            'color: #ff2424; background: #fff; padding:5px 0;',\n            'color: #ff2424; background: #fff; padding:5px 0;',\n        ];\n\n        window.console.log.apply(console, args);\n    }\n    else if (window.console)\n    {\n        window.console.log(`PixiJS ${VERSION} - ${type} - http://www.pixijs.com/`);\n    }\n\n    saidHello = true;\n}\n\n/**\n * Helper for checking for webgl support\n *\n * @memberof PIXI.utils\n * @function isWebGLSupported\n * @return {boolean} is webgl supported\n */\nexport function isWebGLSupported()\n{\n    const contextOptions = { stencil: true, failIfMajorPerformanceCaveat: true };\n\n    try\n    {\n        if (!window.WebGLRenderingContext)\n        {\n            return false;\n        }\n\n        const canvas = document.createElement('canvas');\n        let gl = canvas.getContext('webgl', contextOptions) || canvas.getContext('experimental-webgl', contextOptions);\n\n        const success = !!(gl && gl.getContextAttributes().stencil);\n\n        if (gl)\n        {\n            const loseContext = gl.getExtension('WEBGL_lose_context');\n\n            if (loseContext)\n            {\n                loseContext.loseContext();\n            }\n        }\n\n        gl = null;\n\n        return success;\n    }\n    catch (e)\n    {\n        return false;\n    }\n}\n\n/**\n * Returns sign of number\n *\n * @memberof PIXI.utils\n * @function sign\n * @param {number} n - the number to check the sign of\n * @returns {number} 0 if `n` is 0, -1 if `n` is negative, 1 if `n` is positive\n */\nexport function sign(n)\n{\n    if (n === 0) return 0;\n\n    return n < 0 ? -1 : 1;\n}\n\n/**\n * @todo Describe property usage\n *\n * @memberof PIXI.utils\n * @private\n */\nexport const TextureCache = Object.create(null);\n\n/**\n * @todo Describe property usage\n *\n * @memberof PIXI.utils\n * @private\n */\nexport const BaseTextureCache = Object.create(null);\n\n/**\n * Destroys all texture in the cache\n *\n * @memberof PIXI.utils\n * @function destroyTextureCache\n */\nexport function destroyTextureCache()\n{\n    let key;\n\n    for (key in TextureCache)\n    {\n        TextureCache[key].destroy();\n    }\n    for (key in BaseTextureCache)\n    {\n        BaseTextureCache[key].destroy();\n    }\n}\n\n/**\n * Removes all textures from cache, but does not destroy them\n *\n * @memberof PIXI.utils\n * @function clearTextureCache\n */\nexport function clearTextureCache()\n{\n    let key;\n\n    for (key in TextureCache)\n    {\n        delete TextureCache[key];\n    }\n    for (key in BaseTextureCache)\n    {\n        delete BaseTextureCache[key];\n    }\n}\n\n/**\n * maps premultiply flag and blendMode to adjusted blendMode\n * @memberof PIXI.utils\n * @const premultiplyBlendMode\n * @type {Array<number[]>}\n */\nexport const premultiplyBlendMode = mapPremultipliedBlendModes();\n\n/**\n * changes blendMode according to texture format\n *\n * @memberof PIXI.utils\n * @function correctBlendMode\n * @param {number} blendMode supposed blend mode\n * @param {boolean} premultiplied  whether source is premultiplied\n * @returns {number} true blend mode for this texture\n */\nexport function correctBlendMode(blendMode, premultiplied)\n{\n    return premultiplyBlendMode[premultiplied ? 1 : 0][blendMode];\n}\n\n/**\n * premultiplies tint\n *\n * @param {number} tint integet RGB\n * @param {number} alpha floating point alpha (0.0-1.0)\n * @returns {number} tint multiplied by alpha\n */\nexport function premultiplyTint(tint, alpha)\n{\n    if (alpha === 1.0)\n    {\n        return (alpha * 255 << 24) + tint;\n    }\n    if (alpha === 0.0)\n    {\n        return 0;\n    }\n    let R = ((tint >> 16) & 0xFF);\n    let G = ((tint >> 8) & 0xFF);\n    let B = (tint & 0xFF);\n\n    R = ((R * alpha) + 0.5) | 0;\n    G = ((G * alpha) + 0.5) | 0;\n    B = ((B * alpha) + 0.5) | 0;\n\n    return (alpha * 255 << 24) + (R << 16) + (G << 8) + B;\n}\n\n/**\n * combines rgb and alpha to out array\n *\n * @param {Float32Array|number[]} rgb input rgb\n * @param {number} alpha alpha param\n * @param {Float32Array} [out] output\n * @param {boolean} [premultiply=true] do premultiply it\n * @returns {Float32Array} vec4 rgba\n */\nexport function premultiplyRgba(rgb, alpha, out, premultiply)\n{\n    out = out || new Float32Array(4);\n    if (premultiply || premultiply === undefined)\n    {\n        out[0] = rgb[0] * alpha;\n        out[1] = rgb[1] * alpha;\n        out[2] = rgb[2] * alpha;\n    }\n    else\n    {\n        out[0] = rgb[0];\n        out[1] = rgb[1];\n        out[2] = rgb[2];\n    }\n    out[3] = alpha;\n\n    return out;\n}\n\n/**\n * converts integer tint and float alpha to vec4 form, premultiplies by default\n *\n * @param {number} tint input tint\n * @param {number} alpha alpha param\n * @param {Float32Array} [out] output\n * @param {boolean} [premultiply=true] do premultiply it\n * @returns {Float32Array} vec4 rgba\n */\nexport function premultiplyTintToRgba(tint, alpha, out, premultiply)\n{\n    out = out || new Float32Array(4);\n    out[0] = ((tint >> 16) & 0xFF) / 255.0;\n    out[1] = ((tint >> 8) & 0xFF) / 255.0;\n    out[2] = (tint & 0xFF) / 255.0;\n    if (premultiply || premultiply === undefined)\n    {\n        out[0] *= alpha;\n        out[1] *= alpha;\n        out[2] *= alpha;\n    }\n    out[3] = alpha;\n\n    return out;\n}\n","import { BLEND_MODES } from '../const';\n\n/**\n * Corrects PixiJS blend, takes premultiplied alpha into account\n *\n * @memberof PIXI\n * @function mapPremultipliedBlendModes\n * @private\n * @param {Array<number[]>} [array] - The array to output into.\n * @return {Array<number[]>} Mapped modes.\n */\n\nexport default function mapPremultipliedBlendModes()\n{\n    const pm = [];\n    const npm = [];\n\n    for (let i = 0; i < 32; i++)\n    {\n        pm[i] = i;\n        npm[i] = i;\n    }\n\n    pm[BLEND_MODES.NORMAL_NPM] = BLEND_MODES.NORMAL;\n    pm[BLEND_MODES.ADD_NPM] = BLEND_MODES.ADD;\n    pm[BLEND_MODES.SCREEN_NPM] = BLEND_MODES.SCREEN;\n\n    npm[BLEND_MODES.NORMAL] = BLEND_MODES.NORMAL_NPM;\n    npm[BLEND_MODES.ADD] = BLEND_MODES.ADD_NPM;\n    npm[BLEND_MODES.SCREEN] = BLEND_MODES.SCREEN_NPM;\n\n    const array = [];\n\n    array.push(npm);\n    array.push(pm);\n\n    return array;\n}\n","import Device from 'ismobilejs';\n\nexport default function maxRecommendedTextures(max)\n{\n    if (Device.tablet || Device.phone)\n    {\n        // check if the res is iphone 6 or higher..\n        return 4;\n    }\n\n    // desktop should be ok\n    return max;\n}\n","/**\n * Mixes all enumerable properties and methods from a source object to a target object.\n *\n * @memberof PIXI.utils.mixins\n * @function mixin\n * @param {object} target The prototype or instance that properties and methods should be added to.\n * @param {object} source The source of properties and methods to mix in.\n */\nexport function mixin(target, source)\n{\n    if (!target || !source) return;\n    // in ES8/ES2017, this would be really easy:\n    // Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n\n    // get all the enumerable property keys\n    const keys = Object.keys(source);\n\n    // loop through properties\n    for (let i = 0; i < keys.length; ++i)\n    {\n        const propertyName = keys[i];\n\n        // Set the property using the property descriptor - this works for accessors and normal value properties\n        Object.defineProperty(target, propertyName, Object.getOwnPropertyDescriptor(source, propertyName));\n    }\n}\n\nconst mixins = [];\n\n/**\n * Queues a mixin to be handled towards the end of the initialization of PIXI, so that deprecation\n * can take effect.\n *\n * @memberof PIXI.utils.mixins\n * @function delayMixin\n * @private\n * @param {object} target The prototype or instance that properties and methods should be added to.\n * @param {object} source The source of properties and methods to mix in.\n */\nexport function delayMixin(target, source)\n{\n    mixins.push(target, source);\n}\n\n/**\n * Handles all mixins queued via delayMixin().\n *\n * @memberof PIXI.utils.mixins\n * @function performMixins\n * @private\n */\nexport function performMixins()\n{\n    for (let i = 0; i < mixins.length; i += 2)\n    {\n        mixin(mixins[i], mixins[i + 1]);\n    }\n    mixins.length = 0;\n}\n","/**\n * Mixins functionality to make an object have \"plugins\".\n *\n * @example\n *      function MyObject() {}\n *\n *      pluginTarget.mixin(MyObject);\n *\n * @mixin\n * @memberof PIXI.utils\n * @param {object} obj - The object to mix into.\n */\nfunction pluginTarget(obj)\n{\n    obj.__plugins = {};\n\n    /**\n     * Adds a plugin to an object\n     *\n     * @param {string} pluginName - The events that should be listed.\n     * @param {Function} ctor - The constructor function for the plugin.\n     */\n    obj.registerPlugin = function registerPlugin(pluginName, ctor)\n    {\n        obj.__plugins[pluginName] = ctor;\n    };\n\n    /**\n     * Instantiates all the plugins of this object\n     *\n     */\n    obj.prototype.initPlugins = function initPlugins()\n    {\n        this.plugins = this.plugins || {};\n\n        for (const o in obj.__plugins)\n        {\n            this.plugins[o] = new (obj.__plugins[o])(this);\n        }\n    };\n\n    /**\n     * Removes all the plugins of this object\n     *\n     */\n    obj.prototype.destroyPlugins = function destroyPlugins()\n    {\n        for (const o in this.plugins)\n        {\n            this.plugins[o].destroy();\n            this.plugins[o] = null;\n        }\n\n        this.plugins = null;\n    };\n}\n\nexport default {\n    /**\n     * Mixes in the properties of the pluginTarget into another object\n     *\n     * @param {object} obj - The obj to mix into\n     */\n    mixin: function mixin(obj)\n    {\n        pluginTarget(obj);\n    },\n};\n","/**\n * Trim transparent borders from a canvas\n *\n * @memberof PIXI\n * @function trimCanvas\n * @private\n * @param {HTMLCanvasElement} canvas - the canvas to trim\n * @returns {object} Trim data\n */\nexport default function trimCanvas(canvas)\n{\n    // https://gist.github.com/remy/784508\n\n    let width = canvas.width;\n    let height = canvas.height;\n\n    const context = canvas.getContext('2d');\n    const imageData = context.getImageData(0, 0, width, height);\n    const pixels = imageData.data;\n    const len = pixels.length;\n\n    const bound = {\n        top: null,\n        left: null,\n        right: null,\n        bottom: null,\n    };\n    let i;\n    let x;\n    let y;\n\n    for (i = 0; i < len; i += 4)\n    {\n        if (pixels[i + 3] !== 0)\n        {\n            x = (i / 4) % width;\n            y = ~~((i / 4) / width);\n\n            if (bound.top === null)\n            {\n                bound.top = y;\n            }\n\n            if (bound.left === null)\n            {\n                bound.left = x;\n            }\n            else if (x < bound.left)\n            {\n                bound.left = x;\n            }\n\n            if (bound.right === null)\n            {\n                bound.right = x + 1;\n            }\n            else if (bound.right < x)\n            {\n                bound.right = x + 1;\n            }\n\n            if (bound.bottom === null)\n            {\n                bound.bottom = y;\n            }\n            else if (bound.bottom < y)\n            {\n                bound.bottom = y;\n            }\n        }\n    }\n\n    width = bound.right - bound.left;\n    height = bound.bottom - bound.top + 1;\n\n    const data = context.getImageData(bound.left, bound.top, width, height);\n\n    return {\n        height,\n        width,\n        data,\n    };\n}\n","// provide method to give a stack track for warnings\n// useful for tracking-down where deprecated methods/properties/classes\n// are being used within the code\nfunction warn(msg)\n{\n    // @if DEBUG\n    /* eslint-disable no-console */\n    let stack = new Error().stack;\n\n    // Handle IE < 10 and Safari < 6\n    if (typeof stack === 'undefined')\n    {\n        console.warn('Deprecation Warning: ', msg);\n    }\n    else\n    {\n        // chop off the stack trace which includes pixi.js internal calls\n        stack = stack.split('\\n').splice(3).join('\\n');\n\n        if (console.groupCollapsed)\n        {\n            console.groupCollapsed(\n                '%cDeprecation Warning: %c%s',\n                'color:#614108;background:#fffbe6',\n                'font-weight:normal;color:#614108;background:#fffbe6',\n                msg\n            );\n            console.warn(stack);\n            console.groupEnd();\n        }\n        else\n        {\n            console.warn('Deprecation Warning: ', msg);\n            console.warn(stack);\n        }\n    }\n    /* eslint-enable no-console */\n    // @endif\n}\n\nexport default function deprecation(core)\n{\n    const { mesh, particles, extras, filters, prepare, loaders, interaction } = core;\n\n    Object.defineProperties(core, {\n\n        /**\n         * @class\n         * @private\n         * @name SpriteBatch\n         * @memberof PIXI\n         * @see PIXI.ParticleContainer\n         * @throws {ReferenceError} SpriteBatch does not exist any more, please use the new ParticleContainer instead.\n         * @deprecated since version 3.0.0\n         */\n        SpriteBatch: {\n            get()\n            {\n                throw new ReferenceError('SpriteBatch does not exist any more, '\n                    + 'please use the new ParticleContainer instead.');\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name AssetLoader\n         * @memberof PIXI\n         * @see PIXI.loaders.Loader\n         * @throws {ReferenceError} The loader system was overhauled in PixiJS v3,\n         * please see the new PIXI.loaders.Loader class.\n         * @deprecated since version 3.0.0\n         */\n        AssetLoader: {\n            get()\n            {\n                throw new ReferenceError('The loader system was overhauled in PixiJS v3, '\n                    + 'please see the new PIXI.loaders.Loader class.');\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name Stage\n         * @memberof PIXI\n         * @see PIXI.Container\n         * @deprecated since version 3.0.0\n         */\n        Stage: {\n            get()\n            {\n                warn('You do not need to use a PIXI Stage any more, you can simply render any container.');\n\n                return core.Container;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name DisplayObjectContainer\n         * @memberof PIXI\n         * @see PIXI.Container\n         * @deprecated since version 3.0.0\n         */\n        DisplayObjectContainer: {\n            get()\n            {\n                warn('DisplayObjectContainer has been shortened to Container, please use Container from now on.');\n\n                return core.Container;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name Strip\n         * @memberof PIXI\n         * @see PIXI.mesh.Mesh\n         * @deprecated since version 3.0.0\n         */\n        Strip: {\n            get()\n            {\n                warn('The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on.');\n\n                return mesh.Mesh;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name Rope\n         * @memberof PIXI\n         * @see PIXI.mesh.Rope\n         * @deprecated since version 3.0.0\n         */\n        Rope: {\n            get()\n            {\n                warn('The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on.');\n\n                return mesh.Rope;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name ParticleContainer\n         * @memberof PIXI\n         * @see PIXI.particles.ParticleContainer\n         * @deprecated since version 4.0.0\n         */\n        ParticleContainer: {\n            get()\n            {\n                warn('The ParticleContainer class has been moved to particles.ParticleContainer, '\n                    + 'please use particles.ParticleContainer from now on.');\n\n                return particles.ParticleContainer;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name MovieClip\n         * @memberof PIXI\n         * @see PIXI.extras.MovieClip\n         * @deprecated since version 3.0.0\n         */\n        MovieClip: {\n            get()\n            {\n                warn('The MovieClip class has been moved to extras.AnimatedSprite, please use extras.AnimatedSprite.');\n\n                return extras.AnimatedSprite;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name TilingSprite\n         * @memberof PIXI\n         * @see PIXI.extras.TilingSprite\n         * @deprecated since version 3.0.0\n         */\n        TilingSprite: {\n            get()\n            {\n                warn('The TilingSprite class has been moved to extras.TilingSprite, '\n                    + 'please use extras.TilingSprite from now on.');\n\n                return extras.TilingSprite;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name BitmapText\n         * @memberof PIXI\n         * @see PIXI.extras.BitmapText\n         * @deprecated since version 3.0.0\n         */\n        BitmapText: {\n            get()\n            {\n                warn('The BitmapText class has been moved to extras.BitmapText, '\n                    + 'please use extras.BitmapText from now on.');\n\n                return extras.BitmapText;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name blendModes\n         * @memberof PIXI\n         * @see PIXI.BLEND_MODES\n         * @deprecated since version 3.0.0\n         */\n        blendModes: {\n            get()\n            {\n                warn('The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on.');\n\n                return core.BLEND_MODES;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name scaleModes\n         * @memberof PIXI\n         * @see PIXI.SCALE_MODES\n         * @deprecated since version 3.0.0\n         */\n        scaleModes: {\n            get()\n            {\n                warn('The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on.');\n\n                return core.SCALE_MODES;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name BaseTextureCache\n         * @memberof PIXI\n         * @see PIXI.utils.BaseTextureCache\n         * @deprecated since version 3.0.0\n         */\n        BaseTextureCache: {\n            get()\n            {\n                warn('The BaseTextureCache class has been moved to utils.BaseTextureCache, '\n                    + 'please use utils.BaseTextureCache from now on.');\n\n                return core.utils.BaseTextureCache;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name TextureCache\n         * @memberof PIXI\n         * @see PIXI.utils.TextureCache\n         * @deprecated since version 3.0.0\n         */\n        TextureCache: {\n            get()\n            {\n                warn('The TextureCache class has been moved to utils.TextureCache, '\n                    + 'please use utils.TextureCache from now on.');\n\n                return core.utils.TextureCache;\n            },\n        },\n\n        /**\n         * @namespace\n         * @private\n         * @name math\n         * @memberof PIXI\n         * @see PIXI\n         * @deprecated since version 3.0.6\n         */\n        math: {\n            get()\n            {\n                warn('The math namespace is deprecated, please access members already accessible on PIXI.');\n\n                return core;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name PIXI.AbstractFilter\n         * @see PIXI.Filter\n         * @deprecated since version 3.0.6\n         */\n        AbstractFilter: {\n            get()\n            {\n                warn('AstractFilter has been renamed to Filter, please use PIXI.Filter');\n\n                return core.Filter;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name PIXI.TransformManual\n         * @see PIXI.TransformBase\n         * @deprecated since version 4.0.0\n         */\n        TransformManual: {\n            get()\n            {\n                warn('TransformManual has been renamed to TransformBase, please update your pixi-spine');\n\n                return core.TransformBase;\n            },\n        },\n\n        /**\n         * @static\n         * @constant\n         * @name PIXI.TARGET_FPMS\n         * @see PIXI.settings.TARGET_FPMS\n         * @deprecated since version 4.2.0\n         */\n        TARGET_FPMS: {\n            get()\n            {\n                warn('PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS');\n\n                return core.settings.TARGET_FPMS;\n            },\n            set(value)\n            {\n                warn('PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS');\n\n                core.settings.TARGET_FPMS = value;\n            },\n        },\n\n        /**\n         * @static\n         * @constant\n         * @name PIXI.FILTER_RESOLUTION\n         * @see PIXI.settings.FILTER_RESOLUTION\n         * @deprecated since version 4.2.0\n         */\n        FILTER_RESOLUTION: {\n            get()\n            {\n                warn('PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION');\n\n                return core.settings.FILTER_RESOLUTION;\n            },\n            set(value)\n            {\n                warn('PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION');\n\n                core.settings.FILTER_RESOLUTION = value;\n            },\n        },\n\n        /**\n         * @static\n         * @constant\n         * @name PIXI.RESOLUTION\n         * @see PIXI.settings.RESOLUTION\n         * @deprecated since version 4.2.0\n         */\n        RESOLUTION: {\n            get()\n            {\n                warn('PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION');\n\n                return core.settings.RESOLUTION;\n            },\n            set(value)\n            {\n                warn('PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION');\n\n                core.settings.RESOLUTION = value;\n            },\n        },\n\n        /**\n         * @static\n         * @constant\n         * @name PIXI.MIPMAP_TEXTURES\n         * @see PIXI.settings.MIPMAP_TEXTURES\n         * @deprecated since version 4.2.0\n         */\n        MIPMAP_TEXTURES: {\n            get()\n            {\n                warn('PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES');\n\n                return core.settings.MIPMAP_TEXTURES;\n            },\n            set(value)\n            {\n                warn('PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES');\n\n                core.settings.MIPMAP_TEXTURES = value;\n            },\n        },\n\n        /**\n         * @static\n         * @constant\n         * @name PIXI.SPRITE_BATCH_SIZE\n         * @see PIXI.settings.SPRITE_BATCH_SIZE\n         * @deprecated since version 4.2.0\n         */\n        SPRITE_BATCH_SIZE: {\n            get()\n            {\n                warn('PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE');\n\n                return core.settings.SPRITE_BATCH_SIZE;\n            },\n            set(value)\n            {\n                warn('PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE');\n\n                core.settings.SPRITE_BATCH_SIZE = value;\n            },\n        },\n\n        /**\n         * @static\n         * @constant\n         * @name PIXI.SPRITE_MAX_TEXTURES\n         * @see PIXI.settings.SPRITE_MAX_TEXTURES\n         * @deprecated since version 4.2.0\n         */\n        SPRITE_MAX_TEXTURES: {\n            get()\n            {\n                warn('PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES');\n\n                return core.settings.SPRITE_MAX_TEXTURES;\n            },\n            set(value)\n            {\n                warn('PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES');\n\n                core.settings.SPRITE_MAX_TEXTURES = value;\n            },\n        },\n\n        /**\n         * @static\n         * @constant\n         * @name PIXI.RETINA_PREFIX\n         * @see PIXI.settings.RETINA_PREFIX\n         * @deprecated since version 4.2.0\n         */\n        RETINA_PREFIX: {\n            get()\n            {\n                warn('PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX');\n\n                return core.settings.RETINA_PREFIX;\n            },\n            set(value)\n            {\n                warn('PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX');\n\n                core.settings.RETINA_PREFIX = value;\n            },\n        },\n\n        /**\n         * @static\n         * @constant\n         * @name PIXI.DEFAULT_RENDER_OPTIONS\n         * @see PIXI.settings.RENDER_OPTIONS\n         * @deprecated since version 4.2.0\n         */\n        DEFAULT_RENDER_OPTIONS: {\n            get()\n            {\n                warn('PIXI.DEFAULT_RENDER_OPTIONS has been deprecated, please use PIXI.settings.DEFAULT_RENDER_OPTIONS');\n\n                return core.settings.RENDER_OPTIONS;\n            },\n        },\n    });\n\n    // Move the default properties to settings\n    const defaults = [\n        { parent: 'TRANSFORM_MODE', target: 'TRANSFORM_MODE' },\n        { parent: 'GC_MODES', target: 'GC_MODE' },\n        { parent: 'WRAP_MODES', target: 'WRAP_MODE' },\n        { parent: 'SCALE_MODES', target: 'SCALE_MODE' },\n        { parent: 'PRECISION', target: 'PRECISION_FRAGMENT' },\n    ];\n\n    for (let i = 0; i < defaults.length; i++)\n    {\n        const deprecation = defaults[i];\n\n        Object.defineProperty(core[deprecation.parent], 'DEFAULT', {\n            get()\n            {\n                warn(`PIXI.${deprecation.parent}.DEFAULT has been deprecated, `\n                    + `please use PIXI.settings.${deprecation.target}`);\n\n                return core.settings[deprecation.target];\n            },\n            set(value)\n            {\n                warn(`PIXI.${deprecation.parent}.DEFAULT has been deprecated, `\n                    + `please use PIXI.settings.${deprecation.target}`);\n\n                core.settings[deprecation.target] = value;\n            },\n        });\n    }\n\n    Object.defineProperties(core.settings, {\n\n        /**\n         * @static\n         * @name PRECISION\n         * @memberof PIXI.settings\n         * @see PIXI.PRECISION\n         * @deprecated since version 4.4.0\n         */\n        PRECISION: {\n            get()\n            {\n                warn('PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT');\n\n                return core.settings.PRECISION_FRAGMENT;\n            },\n            set(value)\n            {\n                warn('PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT');\n\n                core.settings.PRECISION_FRAGMENT = value;\n            },\n        },\n    });\n\n    if (extras.AnimatedSprite)\n    {\n        Object.defineProperties(extras, {\n\n            /**\n             * @class\n             * @name MovieClip\n             * @memberof PIXI.extras\n             * @see PIXI.extras.AnimatedSprite\n             * @deprecated since version 4.2.0\n             */\n            MovieClip: {\n                get()\n                {\n                    warn('The MovieClip class has been renamed to AnimatedSprite, please use AnimatedSprite from now on.');\n\n                    return extras.AnimatedSprite;\n                },\n            },\n        });\n    }\n\n    core.DisplayObject.prototype.generateTexture = function generateTexture(renderer, scaleMode, resolution)\n    {\n        warn('generateTexture has moved to the renderer, please use renderer.generateTexture(displayObject)');\n\n        return renderer.generateTexture(this, scaleMode, resolution);\n    };\n\n    core.Graphics.prototype.generateTexture = function generateTexture(scaleMode, resolution)\n    {\n        warn('graphics generate texture has moved to the renderer. '\n            + 'Or to render a graphics to a texture using canvas please use generateCanvasTexture');\n\n        return this.generateCanvasTexture(scaleMode, resolution);\n    };\n\n    core.RenderTexture.prototype.render = function render(displayObject, matrix, clear, updateTransform)\n    {\n        this.legacyRenderer.render(displayObject, this, clear, matrix, !updateTransform);\n        warn('RenderTexture.render is now deprecated, please use renderer.render(displayObject, renderTexture)');\n    };\n\n    core.RenderTexture.prototype.getImage = function getImage(target)\n    {\n        warn('RenderTexture.getImage is now deprecated, please use renderer.extract.image(target)');\n\n        return this.legacyRenderer.extract.image(target);\n    };\n\n    core.RenderTexture.prototype.getBase64 = function getBase64(target)\n    {\n        warn('RenderTexture.getBase64 is now deprecated, please use renderer.extract.base64(target)');\n\n        return this.legacyRenderer.extract.base64(target);\n    };\n\n    core.RenderTexture.prototype.getCanvas = function getCanvas(target)\n    {\n        warn('RenderTexture.getCanvas is now deprecated, please use renderer.extract.canvas(target)');\n\n        return this.legacyRenderer.extract.canvas(target);\n    };\n\n    core.RenderTexture.prototype.getPixels = function getPixels(target)\n    {\n        warn('RenderTexture.getPixels is now deprecated, please use renderer.extract.pixels(target)');\n\n        return this.legacyRenderer.pixels(target);\n    };\n\n    /**\n     * @method\n     * @private\n     * @name PIXI.Sprite#setTexture\n     * @see PIXI.Sprite#texture\n     * @deprecated since version 3.0.0\n     * @param {PIXI.Texture} texture - The texture to set to.\n     */\n    core.Sprite.prototype.setTexture = function setTexture(texture)\n    {\n        this.texture = texture;\n        warn('setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;');\n    };\n\n    if (extras.BitmapText)\n    {\n        /**\n         * @method\n         * @name PIXI.extras.BitmapText#setText\n         * @see PIXI.extras.BitmapText#text\n         * @deprecated since version 3.0.0\n         * @param {string} text - The text to set to.\n         */\n        extras.BitmapText.prototype.setText = function setText(text)\n        {\n            this.text = text;\n            warn(`setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';`);\n        };\n    }\n\n    /**\n     * @method\n     * @name PIXI.Text#setText\n     * @see PIXI.Text#text\n     * @deprecated since version 3.0.0\n     * @param {string} text - The text to set to.\n     */\n    core.Text.prototype.setText = function setText(text)\n    {\n        this.text = text;\n        warn(`setText is now deprecated, please use the text property, e.g : myText.text = 'my text';`);\n    };\n\n    /**\n     * Calculates the ascent, descent and fontSize of a given fontStyle\n     *\n     * @name PIXI.Text.calculateFontProperties\n     * @see PIXI.TextMetrics.measureFont\n     * @deprecated since version 4.5.0\n     * @param {string} font - String representing the style of the font\n     * @return {Object} Font properties object\n     */\n    core.Text.calculateFontProperties = function calculateFontProperties(font)\n    {\n        warn(`Text.calculateFontProperties is now deprecated, please use the TextMetrics.measureFont`);\n\n        return core.TextMetrics.measureFont(font);\n    };\n\n    Object.defineProperties(core.Text, {\n        fontPropertiesCache: {\n            get()\n            {\n                warn(`Text.fontPropertiesCache is deprecated`);\n\n                return core.TextMetrics._fonts;\n            },\n        },\n        fontPropertiesCanvas: {\n            get()\n            {\n                warn(`Text.fontPropertiesCanvas is deprecated`);\n\n                return core.TextMetrics._canvas;\n            },\n        },\n        fontPropertiesContext: {\n            get()\n            {\n                warn(`Text.fontPropertiesContext is deprecated`);\n\n                return core.TextMetrics._context;\n            },\n        },\n    });\n\n    /**\n     * @method\n     * @name PIXI.Text#setStyle\n     * @see PIXI.Text#style\n     * @deprecated since version 3.0.0\n     * @param {*} style - The style to set to.\n     */\n    core.Text.prototype.setStyle = function setStyle(style)\n    {\n        this.style = style;\n        warn('setStyle is now deprecated, please use the style property, e.g : myText.style = style;');\n    };\n\n    /**\n     * @method\n     * @name PIXI.Text#determineFontProperties\n     * @see PIXI.Text#measureFontProperties\n     * @deprecated since version 4.2.0\n     * @private\n     * @param {string} fontStyle - String representing the style of the font\n     * @return {Object} Font properties object\n     */\n    core.Text.prototype.determineFontProperties = function determineFontProperties(fontStyle)\n    {\n        warn('determineFontProperties is now deprecated, please use TextMetrics.measureFont method');\n\n        return core.TextMetrics.measureFont(fontStyle);\n    };\n\n    /**\n     * @method\n     * @name PIXI.Text.getFontStyle\n     * @see PIXI.TextMetrics.getFontStyle\n     * @deprecated since version 4.5.0\n     * @param {PIXI.TextStyle} style - The style to use.\n     * @return {string} Font string\n     */\n    core.Text.getFontStyle = function getFontStyle(style)\n    {\n        warn('getFontStyle is now deprecated, please use TextStyle.toFontString() instead');\n\n        style = style || {};\n\n        if (!(style instanceof core.TextStyle))\n        {\n            style = new core.TextStyle(style);\n        }\n\n        return style.toFontString();\n    };\n\n    Object.defineProperties(core.TextStyle.prototype, {\n        /**\n         * Set all properties of a font as a single string\n         *\n         * @name PIXI.TextStyle#font\n         * @deprecated since version 4.0.0\n         */\n        font: {\n            get()\n            {\n                warn(`text style property 'font' is now deprecated, please use the `\n                    + `'fontFamily', 'fontSize', 'fontStyle', 'fontVariant' and 'fontWeight' properties from now on`);\n\n                const fontSizeString = (typeof this._fontSize === 'number') ? `${this._fontSize}px` : this._fontSize;\n\n                return `${this._fontStyle} ${this._fontVariant} ${this._fontWeight} ${fontSizeString} ${this._fontFamily}`;\n            },\n            set(font)\n            {\n                warn(`text style property 'font' is now deprecated, please use the `\n                    + `'fontFamily','fontSize',fontStyle','fontVariant' and 'fontWeight' properties from now on`);\n\n                // can work out fontStyle from search of whole string\n                if (font.indexOf('italic') > 1)\n                {\n                    this._fontStyle = 'italic';\n                }\n                else if (font.indexOf('oblique') > -1)\n                {\n                    this._fontStyle = 'oblique';\n                }\n                else\n                {\n                    this._fontStyle = 'normal';\n                }\n\n                // can work out fontVariant from search of whole string\n                if (font.indexOf('small-caps') > -1)\n                {\n                    this._fontVariant = 'small-caps';\n                }\n                else\n                {\n                    this._fontVariant = 'normal';\n                }\n\n                // fontWeight and fontFamily are tricker to find, but it's easier to find the fontSize due to it's units\n                const splits = font.split(' ');\n                let fontSizeIndex = -1;\n\n                this._fontSize = 26;\n                for (let i = 0; i < splits.length; ++i)\n                {\n                    if (splits[i].match(/(px|pt|em|%)/))\n                    {\n                        fontSizeIndex = i;\n                        this._fontSize = splits[i];\n                        break;\n                    }\n                }\n\n                // we can now search for fontWeight as we know it must occur before the fontSize\n                this._fontWeight = 'normal';\n                for (let i = 0; i < fontSizeIndex; ++i)\n                {\n                    if (splits[i].match(/(bold|bolder|lighter|100|200|300|400|500|600|700|800|900)/))\n                    {\n                        this._fontWeight = splits[i];\n                        break;\n                    }\n                }\n\n                // and finally join everything together after the fontSize in case the font family has multiple words\n                if (fontSizeIndex > -1 && fontSizeIndex < splits.length - 1)\n                {\n                    this._fontFamily = '';\n                    for (let i = fontSizeIndex + 1; i < splits.length; ++i)\n                    {\n                        this._fontFamily += `${splits[i]} `;\n                    }\n\n                    this._fontFamily = this._fontFamily.slice(0, -1);\n                }\n                else\n                {\n                    this._fontFamily = 'Arial';\n                }\n\n                this.styleID++;\n            },\n        },\n    });\n\n    /**\n     * @method\n     * @name PIXI.Texture#setFrame\n     * @see PIXI.Texture#setFrame\n     * @deprecated since version 3.0.0\n     * @param {PIXI.Rectangle} frame - The frame to set.\n     */\n    core.Texture.prototype.setFrame = function setFrame(frame)\n    {\n        this.frame = frame;\n        warn('setFrame is now deprecated, please use the frame property, e.g: myTexture.frame = frame;');\n    };\n\n    /**\n     * @static\n     * @function\n     * @name PIXI.Texture.addTextureToCache\n     * @see PIXI.Texture.addToCache\n     * @deprecated since 4.5.0\n     * @param {PIXI.Texture} texture - The Texture to add to the cache.\n     * @param {string} id - The id that the texture will be stored against.\n     */\n    core.Texture.addTextureToCache = function addTextureToCache(texture, id)\n    {\n        core.Texture.addToCache(texture, id);\n        warn('Texture.addTextureToCache is deprecated, please use Texture.addToCache from now on.');\n    };\n\n    /**\n     * @static\n     * @function\n     * @name PIXI.Texture.removeTextureFromCache\n     * @see PIXI.Texture.removeFromCache\n     * @deprecated since 4.5.0\n     * @param {string} id - The id of the texture to be removed\n     * @return {PIXI.Texture|null} The texture that was removed\n     */\n    core.Texture.removeTextureFromCache = function removeTextureFromCache(id)\n    {\n        warn('Texture.removeTextureFromCache is deprecated, please use Texture.removeFromCache from now on. '\n         + 'Be aware that Texture.removeFromCache does not automatically its BaseTexture from the BaseTextureCache. '\n         + 'For that, use BaseTexture.removeFromCache');\n\n        core.BaseTexture.removeFromCache(id);\n\n        return core.Texture.removeFromCache(id);\n    };\n\n    Object.defineProperties(filters, {\n\n        /**\n         * @class\n         * @private\n         * @name PIXI.filters.AbstractFilter\n         * @see PIXI.AbstractFilter\n         * @deprecated since version 3.0.6\n         */\n        AbstractFilter: {\n            get()\n            {\n                warn('AstractFilter has been renamed to Filter, please use PIXI.Filter');\n\n                return core.AbstractFilter;\n            },\n        },\n\n        /**\n         * @class\n         * @private\n         * @name PIXI.filters.SpriteMaskFilter\n         * @see PIXI.SpriteMaskFilter\n         * @deprecated since version 3.0.6\n         */\n        SpriteMaskFilter: {\n            get()\n            {\n                warn('filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on.');\n\n                return core.SpriteMaskFilter;\n            },\n        },\n    });\n\n    /**\n     * @method\n     * @name PIXI.utils.uuid\n     * @see PIXI.utils.uid\n     * @deprecated since version 3.0.6\n     * @return {number} The uid\n     */\n    core.utils.uuid = () =>\n    {\n        warn('utils.uuid() is deprecated, please use utils.uid() from now on.');\n\n        return core.utils.uid();\n    };\n\n    /**\n     * @method\n     * @name PIXI.utils.canUseNewCanvasBlendModes\n     * @see PIXI.CanvasTinter\n     * @deprecated\n     * @return {boolean} Can use blend modes.\n     */\n    core.utils.canUseNewCanvasBlendModes = () =>\n    {\n        warn('utils.canUseNewCanvasBlendModes() is deprecated, please use CanvasTinter.canUseMultiply from now on');\n\n        return core.CanvasTinter.canUseMultiply;\n    };\n\n    let saidHello = true;\n\n    /**\n     * @name PIXI.utils._saidHello\n     * @type {boolean}\n     * @see PIXI.utils.skipHello\n     * @deprecated since 4.1.0\n     */\n    Object.defineProperty(core.utils, '_saidHello', {\n        set(bool)\n        {\n            if (bool)\n            {\n                warn('PIXI.utils._saidHello is deprecated, please use PIXI.utils.skipHello()');\n                this.skipHello();\n            }\n            saidHello = bool;\n        },\n        get()\n        {\n            return saidHello;\n        },\n    });\n\n    if (prepare.BasePrepare)\n    {\n        /**\n         * @method\n         * @name PIXI.prepare.BasePrepare#register\n         * @see PIXI.prepare.BasePrepare#registerFindHook\n         * @deprecated since version 4.4.2\n         * @param {Function} [addHook] - Function call that takes two parameters: `item:*, queue:Array`\n         *        function must return `true` if it was able to add item to the queue.\n         * @param {Function} [uploadHook] - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and\n         *        function must return `true` if it was able to handle upload of item.\n         * @return {PIXI.BasePrepare} Instance of plugin for chaining.\n         */\n        prepare.BasePrepare.prototype.register = function register(addHook, uploadHook)\n        {\n            warn('renderer.plugins.prepare.register is now deprecated, '\n                + 'please use renderer.plugins.prepare.registerFindHook & renderer.plugins.prepare.registerUploadHook');\n\n            if (addHook)\n            {\n                this.registerFindHook(addHook);\n            }\n\n            if (uploadHook)\n            {\n                this.registerUploadHook(uploadHook);\n            }\n\n            return this;\n        };\n    }\n\n    if (prepare.canvas)\n    {\n        /**\n         * The number of graphics or textures to upload to the GPU.\n         *\n         * @name PIXI.prepare.canvas.UPLOADS_PER_FRAME\n         * @static\n         * @type {number}\n         * @see PIXI.prepare.BasePrepare.limiter\n         * @deprecated since 4.2.0\n         */\n        Object.defineProperty(prepare.canvas, 'UPLOADS_PER_FRAME', {\n            set()\n            {\n                warn('PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please set '\n                    + 'renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer');\n                // because we don't have a reference to the renderer, we can't actually set\n                // the uploads per frame, so we'll have to stick with the warning.\n            },\n            get()\n            {\n                warn('PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please use '\n                    + 'renderer.plugins.prepare.limiter');\n\n                return NaN;\n            },\n        });\n    }\n\n    if (prepare.webgl)\n    {\n        /**\n         * The number of graphics or textures to upload to the GPU.\n         *\n         * @name PIXI.prepare.webgl.UPLOADS_PER_FRAME\n         * @static\n         * @type {number}\n         * @see PIXI.prepare.BasePrepare.limiter\n         * @deprecated since 4.2.0\n         */\n        Object.defineProperty(prepare.webgl, 'UPLOADS_PER_FRAME', {\n            set()\n            {\n                warn('PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please set '\n                    + 'renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer');\n                // because we don't have a reference to the renderer, we can't actually set\n                // the uploads per frame, so we'll have to stick with the warning.\n            },\n            get()\n            {\n                warn('PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please use '\n                    + 'renderer.plugins.prepare.limiter');\n\n                return NaN;\n            },\n        });\n    }\n\n    if (loaders.Loader)\n    {\n        const Resource = loaders.Resource;\n        const Loader = loaders.Loader;\n\n        Object.defineProperties(Resource.prototype, {\n            isJson: {\n                get()\n                {\n                    warn('The isJson property is deprecated, please use `resource.type === Resource.TYPE.JSON`.');\n\n                    return this.type === Resource.TYPE.JSON;\n                },\n            },\n            isXml: {\n                get()\n                {\n                    warn('The isXml property is deprecated, please use `resource.type === Resource.TYPE.XML`.');\n\n                    return this.type === Resource.TYPE.XML;\n                },\n            },\n            isImage: {\n                get()\n                {\n                    warn('The isImage property is deprecated, please use `resource.type === Resource.TYPE.IMAGE`.');\n\n                    return this.type === Resource.TYPE.IMAGE;\n                },\n            },\n            isAudio: {\n                get()\n                {\n                    warn('The isAudio property is deprecated, please use `resource.type === Resource.TYPE.AUDIO`.');\n\n                    return this.type === Resource.TYPE.AUDIO;\n                },\n            },\n            isVideo: {\n                get()\n                {\n                    warn('The isVideo property is deprecated, please use `resource.type === Resource.TYPE.VIDEO`.');\n\n                    return this.type === Resource.TYPE.VIDEO;\n                },\n            },\n        });\n\n        Object.defineProperties(Loader.prototype, {\n            before: {\n                get()\n                {\n                    warn('The before() method is deprecated, please use pre().');\n\n                    return this.pre;\n                },\n            },\n            after: {\n                get()\n                {\n                    warn('The after() method is deprecated, please use use().');\n\n                    return this.use;\n                },\n            },\n        });\n    }\n\n    if (interaction.interactiveTarget)\n    {\n        /**\n         * @name PIXI.interaction.interactiveTarget#defaultCursor\n         * @static\n         * @type {number}\n         * @see PIXI.interaction.interactiveTarget#cursor\n         * @deprecated since 4.3.0\n         */\n        Object.defineProperty(interaction.interactiveTarget, 'defaultCursor', {\n            set(value)\n            {\n                warn('Property defaultCursor has been replaced with \\'cursor\\'. ');\n                this.cursor = value;\n            },\n            get()\n            {\n                warn('Property defaultCursor has been replaced with \\'cursor\\'. ');\n\n                return this.cursor;\n            },\n        });\n    }\n\n    if (interaction.InteractionManager)\n    {\n        /**\n         * @name PIXI.interaction.InteractionManager#defaultCursorStyle\n         * @static\n         * @type {string}\n         * @see PIXI.interaction.InteractionManager#cursorStyles\n         * @deprecated since 4.3.0\n         */\n        Object.defineProperty(interaction.InteractionManager, 'defaultCursorStyle', {\n            set(value)\n            {\n                warn('Property defaultCursorStyle has been replaced with \\'cursorStyles.default\\'. ');\n                this.cursorStyles.default = value;\n            },\n            get()\n            {\n                warn('Property defaultCursorStyle has been replaced with \\'cursorStyles.default\\'. ');\n\n                return this.cursorStyles.default;\n            },\n        });\n\n        /**\n         * @name PIXI.interaction.InteractionManager#currentCursorStyle\n         * @static\n         * @type {string}\n         * @see PIXI.interaction.InteractionManager#cursorStyles\n         * @deprecated since 4.3.0\n         */\n        Object.defineProperty(interaction.InteractionManager, 'currentCursorStyle', {\n            set(value)\n            {\n                warn('Property currentCursorStyle has been removed.'\n                + 'See the currentCursorMode property, which works differently.');\n                this.currentCursorMode = value;\n            },\n            get()\n            {\n                warn('Property currentCursorStyle has been removed.'\n                + 'See the currentCursorMode property, which works differently.');\n\n                return this.currentCursorMode;\n            },\n        });\n    }\n}\n","import * as core from '../../core';\n\nconst TEMP_RECT = new core.Rectangle();\n\n/**\n * The extract manager provides functionality to export content from the renderers.\n *\n * An instance of this class is automatically created by default, and can be found at renderer.plugins.extract\n *\n * @class\n * @memberof PIXI.extract\n */\nexport default class CanvasExtract\n{\n    /**\n     * @param {PIXI.CanvasRenderer} renderer - A reference to the current renderer\n     */\n    constructor(renderer)\n    {\n        this.renderer = renderer;\n        /**\n         * Collection of methods for extracting data (image, pixels, etc.) from a display object or render texture\n         *\n         * @member {PIXI.extract.CanvasExtract} extract\n         * @memberof PIXI.CanvasRenderer#\n         * @see PIXI.extract.CanvasExtract\n         */\n        renderer.extract = this;\n    }\n\n    /**\n     * Will return a HTML Image of the target\n     *\n     * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n     *  to convert. If left empty will use use the main renderer\n     * @return {HTMLImageElement} HTML Image of the target\n     */\n    image(target)\n    {\n        const image = new Image();\n\n        image.src = this.base64(target);\n\n        return image;\n    }\n\n    /**\n     * Will return a a base64 encoded string of this target. It works by calling\n     *  `CanvasExtract.getCanvas` and then running toDataURL on that.\n     *\n     * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n     *  to convert. If left empty will use use the main renderer\n     * @return {string} A base64 encoded string of the texture.\n     */\n    base64(target)\n    {\n        return this.canvas(target).toDataURL();\n    }\n\n    /**\n     * Creates a Canvas element, renders this target to it and then returns it.\n     *\n     * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n     *  to convert. If left empty will use use the main renderer\n     * @return {HTMLCanvasElement} A Canvas element with the texture rendered on.\n     */\n    canvas(target)\n    {\n        const renderer = this.renderer;\n        let context;\n        let resolution;\n        let frame;\n        let renderTexture;\n\n        if (target)\n        {\n            if (target instanceof core.RenderTexture)\n            {\n                renderTexture = target;\n            }\n            else\n            {\n                renderTexture = renderer.generateTexture(target);\n            }\n        }\n\n        if (renderTexture)\n        {\n            context = renderTexture.baseTexture._canvasRenderTarget.context;\n            resolution = renderTexture.baseTexture._canvasRenderTarget.resolution;\n            frame = renderTexture.frame;\n        }\n        else\n        {\n            context = renderer.rootContext;\n\n            frame = TEMP_RECT;\n            frame.width = this.renderer.width;\n            frame.height = this.renderer.height;\n        }\n\n        const width = frame.width * resolution;\n        const height = frame.height * resolution;\n\n        const canvasBuffer = new core.CanvasRenderTarget(width, height);\n        const canvasData = context.getImageData(frame.x * resolution, frame.y * resolution, width, height);\n\n        canvasBuffer.context.putImageData(canvasData, 0, 0);\n\n        // send the canvas back..\n        return canvasBuffer.canvas;\n    }\n\n    /**\n     * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA\n     * order, with integer values between 0 and 255 (included).\n     *\n     * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n     *  to convert. If left empty will use use the main renderer\n     * @return {Uint8ClampedArray} One-dimensional array containing the pixel data of the entire texture\n     */\n    pixels(target)\n    {\n        const renderer = this.renderer;\n        let context;\n        let resolution;\n        let frame;\n        let renderTexture;\n\n        if (target)\n        {\n            if (target instanceof core.RenderTexture)\n            {\n                renderTexture = target;\n            }\n            else\n            {\n                renderTexture = renderer.generateTexture(target);\n            }\n        }\n\n        if (renderTexture)\n        {\n            context = renderTexture.baseTexture._canvasRenderTarget.context;\n            resolution = renderTexture.baseTexture._canvasRenderTarget.resolution;\n            frame = renderTexture.frame;\n        }\n        else\n        {\n            context = renderer.rootContext;\n\n            frame = TEMP_RECT;\n            frame.width = renderer.width;\n            frame.height = renderer.height;\n        }\n\n        return context.getImageData(0, 0, frame.width * resolution, frame.height * resolution).data;\n    }\n\n    /**\n     * Destroys the extract\n     *\n     */\n    destroy()\n    {\n        this.renderer.extract = null;\n        this.renderer = null;\n    }\n}\n\ncore.CanvasRenderer.registerPlugin('extract', CanvasExtract);\n","import * as core from '../../core';\n\nconst TEMP_RECT = new core.Rectangle();\nconst BYTES_PER_PIXEL = 4;\n\n/**\n * The extract manager provides functionality to export content from the renderers.\n *\n * An instance of this class is automatically created by default, and can be found at renderer.plugins.extract\n *\n * @class\n * @memberof PIXI.extract\n */\nexport default class WebGLExtract\n{\n    /**\n     * @param {PIXI.WebGLRenderer} renderer - A reference to the current renderer\n     */\n    constructor(renderer)\n    {\n        this.renderer = renderer;\n        /**\n         * Collection of methods for extracting data (image, pixels, etc.) from a display object or render texture\n         *\n         * @member {PIXI.extract.WebGLExtract} extract\n         * @memberof PIXI.WebGLRenderer#\n         * @see PIXI.extract.WebGLExtract\n         */\n        renderer.extract = this;\n    }\n\n    /**\n     * Will return a HTML Image of the target\n     *\n     * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n     *  to convert. If left empty will use use the main renderer\n     * @return {HTMLImageElement} HTML Image of the target\n     */\n    image(target)\n    {\n        const image = new Image();\n\n        image.src = this.base64(target);\n\n        return image;\n    }\n\n    /**\n     * Will return a a base64 encoded string of this target. It works by calling\n     *  `WebGLExtract.getCanvas` and then running toDataURL on that.\n     *\n     * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n     *  to convert. If left empty will use use the main renderer\n     * @return {string} A base64 encoded string of the texture.\n     */\n    base64(target)\n    {\n        return this.canvas(target).toDataURL();\n    }\n\n    /**\n     * Creates a Canvas element, renders this target to it and then returns it.\n     *\n     * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n     *  to convert. If left empty will use use the main renderer\n     * @return {HTMLCanvasElement} A Canvas element with the texture rendered on.\n     */\n    canvas(target)\n    {\n        const renderer = this.renderer;\n        let textureBuffer;\n        let resolution;\n        let frame;\n        let flipY = false;\n        let renderTexture;\n\n        if (target)\n        {\n            if (target instanceof core.RenderTexture)\n            {\n                renderTexture = target;\n            }\n            else\n            {\n                renderTexture = this.renderer.generateTexture(target);\n            }\n        }\n\n        if (renderTexture)\n        {\n            textureBuffer = renderTexture.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID];\n            resolution = textureBuffer.resolution;\n            frame = renderTexture.frame;\n            flipY = false;\n        }\n        else\n        {\n            textureBuffer = this.renderer.rootRenderTarget;\n            resolution = textureBuffer.resolution;\n            flipY = true;\n\n            frame = TEMP_RECT;\n            frame.width = textureBuffer.size.width;\n            frame.height = textureBuffer.size.height;\n        }\n\n        const width = frame.width * resolution;\n        const height = frame.height * resolution;\n\n        const canvasBuffer = new core.CanvasRenderTarget(width, height);\n\n        if (textureBuffer)\n        {\n            // bind the buffer\n            renderer.bindRenderTarget(textureBuffer);\n\n            // set up an array of pixels\n            const webglPixels = new Uint8Array(BYTES_PER_PIXEL * width * height);\n\n            // read pixels to the array\n            const gl = renderer.gl;\n\n            gl.readPixels(\n                frame.x * resolution,\n                frame.y * resolution,\n                width,\n                height,\n                gl.RGBA,\n                gl.UNSIGNED_BYTE,\n                webglPixels\n            );\n\n            // add the pixels to the canvas\n            const canvasData = canvasBuffer.context.getImageData(0, 0, width, height);\n\n            canvasData.data.set(webglPixels);\n\n            canvasBuffer.context.putImageData(canvasData, 0, 0);\n\n            // pulling pixels\n            if (flipY)\n            {\n                canvasBuffer.context.scale(1, -1);\n                canvasBuffer.context.drawImage(canvasBuffer.canvas, 0, -height);\n            }\n        }\n\n         // send the canvas back..\n        return canvasBuffer.canvas;\n    }\n\n    /**\n     * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA\n     * order, with integer values between 0 and 255 (included).\n     *\n     * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n     *  to convert. If left empty will use use the main renderer\n     * @return {Uint8ClampedArray} One-dimensional array containing the pixel data of the entire texture\n     */\n    pixels(target)\n    {\n        const renderer = this.renderer;\n        let textureBuffer;\n        let resolution;\n        let frame;\n        let renderTexture;\n\n        if (target)\n        {\n            if (target instanceof core.RenderTexture)\n            {\n                renderTexture = target;\n            }\n            else\n            {\n                renderTexture = this.renderer.generateTexture(target);\n            }\n        }\n\n        if (renderTexture)\n        {\n            textureBuffer = renderTexture.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID];\n            resolution = textureBuffer.resolution;\n            frame = renderTexture.frame;\n        }\n        else\n        {\n            textureBuffer = this.renderer.rootRenderTarget;\n            resolution = textureBuffer.resolution;\n\n            frame = TEMP_RECT;\n            frame.width = textureBuffer.size.width;\n            frame.height = textureBuffer.size.height;\n        }\n\n        const width = frame.width * resolution;\n        const height = frame.height * resolution;\n\n        const webglPixels = new Uint8Array(BYTES_PER_PIXEL * width * height);\n\n        if (textureBuffer)\n        {\n            // bind the buffer\n            renderer.bindRenderTarget(textureBuffer);\n            // read pixels to the array\n            const gl = renderer.gl;\n\n            gl.readPixels(\n                frame.x * resolution,\n                frame.y * resolution,\n                width,\n                height,\n                gl.RGBA,\n                gl.UNSIGNED_BYTE,\n                webglPixels\n            );\n        }\n\n        return webglPixels;\n    }\n\n    /**\n     * Destroys the extract\n     *\n     */\n    destroy()\n    {\n        this.renderer.extract = null;\n        this.renderer = null;\n    }\n}\n\ncore.WebGLRenderer.registerPlugin('extract', WebGLExtract);\n","import * as core from '../core';\n\n/**\n * @typedef FrameObject\n * @type {object}\n * @property {PIXI.Texture} texture - The {@link PIXI.Texture} of the frame\n * @property {number} time - the duration of the frame in ms\n */\n\n/**\n * An AnimatedSprite is a simple way to display an animation depicted by a list of textures.\n *\n * ```js\n * let alienImages = [\"image_sequence_01.png\",\"image_sequence_02.png\",\"image_sequence_03.png\",\"image_sequence_04.png\"];\n * let textureArray = [];\n *\n * for (let i=0; i < 4; i++)\n * {\n *      let texture = PIXI.Texture.fromImage(alienImages[i]);\n *      textureArray.push(texture);\n * };\n *\n * let mc = new PIXI.AnimatedSprite(textureArray);\n * ```\n *\n * @class\n * @extends PIXI.Sprite\n * @memberof PIXI.extras\n */\nexport default class AnimatedSprite extends core.Sprite\n{\n    /**\n     * @param {PIXI.Texture[]|FrameObject[]} textures - an array of {@link PIXI.Texture} or frame\n     *  objects that make up the animation\n     * @param {boolean} [autoUpdate=true] - Whether to use PIXI.ticker.shared to auto update animation time.\n     */\n    constructor(textures, autoUpdate)\n    {\n        super(textures[0] instanceof core.Texture ? textures[0] : textures[0].texture);\n\n        /**\n         * @private\n         */\n        this._textures = null;\n\n        /**\n         * @private\n         */\n        this._durations = null;\n\n        this.textures = textures;\n\n        /**\n         * `true` uses PIXI.ticker.shared to auto update animation time.\n         * @type {boolean}\n         * @default true\n         * @private\n         */\n        this._autoUpdate = autoUpdate !== false;\n\n        /**\n         * The speed that the AnimatedSprite will play at. Higher is faster, lower is slower\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.animationSpeed = 1;\n\n        /**\n         * Whether or not the animate sprite repeats after playing.\n         *\n         * @member {boolean}\n         * @default true\n         */\n        this.loop = true;\n\n        /**\n         * Function to call when a AnimatedSprite finishes playing\n         *\n         * @member {Function}\n         */\n        this.onComplete = null;\n\n        /**\n         * Function to call when a AnimatedSprite changes which texture is being rendered\n         *\n         * @member {Function}\n         */\n        this.onFrameChange = null;\n\n         /**\n         * Function to call when 'loop' is true, and an AnimatedSprite is played and loops around to start again\n         *\n         * @member {Function}\n         */\n        this.onLoop = null;\n\n        /**\n         * Elapsed time since animation has been started, used internally to display current texture\n         *\n         * @member {number}\n         * @private\n         */\n        this._currentTime = 0;\n\n        /**\n         * Indicates if the AnimatedSprite is currently playing\n         *\n         * @member {boolean}\n         * @readonly\n         */\n        this.playing = false;\n    }\n\n    /**\n     * Stops the AnimatedSprite\n     *\n     */\n    stop()\n    {\n        if (!this.playing)\n        {\n            return;\n        }\n\n        this.playing = false;\n        if (this._autoUpdate)\n        {\n            core.ticker.shared.remove(this.update, this);\n        }\n    }\n\n    /**\n     * Plays the AnimatedSprite\n     *\n     */\n    play()\n    {\n        if (this.playing)\n        {\n            return;\n        }\n\n        this.playing = true;\n        if (this._autoUpdate)\n        {\n            core.ticker.shared.add(this.update, this, core.UPDATE_PRIORITY.HIGH);\n        }\n    }\n\n    /**\n     * Stops the AnimatedSprite and goes to a specific frame\n     *\n     * @param {number} frameNumber - frame index to stop at\n     */\n    gotoAndStop(frameNumber)\n    {\n        this.stop();\n\n        const previousFrame = this.currentFrame;\n\n        this._currentTime = frameNumber;\n\n        if (previousFrame !== this.currentFrame)\n        {\n            this.updateTexture();\n        }\n    }\n\n    /**\n     * Goes to a specific frame and begins playing the AnimatedSprite\n     *\n     * @param {number} frameNumber - frame index to start at\n     */\n    gotoAndPlay(frameNumber)\n    {\n        const previousFrame = this.currentFrame;\n\n        this._currentTime = frameNumber;\n\n        if (previousFrame !== this.currentFrame)\n        {\n            this.updateTexture();\n        }\n\n        this.play();\n    }\n\n    /**\n     * Updates the object transform for rendering.\n     *\n     * @private\n     * @param {number} deltaTime - Time since last tick.\n     */\n    update(deltaTime)\n    {\n        const elapsed = this.animationSpeed * deltaTime;\n        const previousFrame = this.currentFrame;\n\n        if (this._durations !== null)\n        {\n            let lag = this._currentTime % 1 * this._durations[this.currentFrame];\n\n            lag += elapsed / 60 * 1000;\n\n            while (lag < 0)\n            {\n                this._currentTime--;\n                lag += this._durations[this.currentFrame];\n            }\n\n            const sign = Math.sign(this.animationSpeed * deltaTime);\n\n            this._currentTime = Math.floor(this._currentTime);\n\n            while (lag >= this._durations[this.currentFrame])\n            {\n                lag -= this._durations[this.currentFrame] * sign;\n                this._currentTime += sign;\n            }\n\n            this._currentTime += lag / this._durations[this.currentFrame];\n        }\n        else\n        {\n            this._currentTime += elapsed;\n        }\n\n        if (this._currentTime < 0 && !this.loop)\n        {\n            this.gotoAndStop(0);\n\n            if (this.onComplete)\n            {\n                this.onComplete();\n            }\n        }\n        else if (this._currentTime >= this._textures.length && !this.loop)\n        {\n            this.gotoAndStop(this._textures.length - 1);\n\n            if (this.onComplete)\n            {\n                this.onComplete();\n            }\n        }\n        else if (previousFrame !== this.currentFrame)\n        {\n            if (this.loop && this.onLoop)\n            {\n                if (this.animationSpeed > 0 && this.currentFrame < previousFrame)\n                {\n                    this.onLoop();\n                }\n                else if (this.animationSpeed < 0 && this.currentFrame > previousFrame)\n                {\n                    this.onLoop();\n                }\n            }\n\n            this.updateTexture();\n        }\n    }\n\n    /**\n     * Updates the displayed texture to match the current frame index\n     *\n     * @private\n     */\n    updateTexture()\n    {\n        this._texture = this._textures[this.currentFrame];\n        this._textureID = -1;\n\n        if (this.onFrameChange)\n        {\n            this.onFrameChange(this.currentFrame);\n        }\n    }\n\n    /**\n     * Stops the AnimatedSprite and destroys it\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy\n     *      method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well\n     * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well\n     */\n    destroy(options)\n    {\n        this.stop();\n        super.destroy(options);\n    }\n\n    /**\n     * A short hand way of creating a movieclip from an array of frame ids\n     *\n     * @static\n     * @param {string[]} frames - The array of frames ids the movieclip will use as its texture frames\n     * @return {AnimatedSprite} The new animated sprite with the specified frames.\n     */\n    static fromFrames(frames)\n    {\n        const textures = [];\n\n        for (let i = 0; i < frames.length; ++i)\n        {\n            textures.push(core.Texture.fromFrame(frames[i]));\n        }\n\n        return new AnimatedSprite(textures);\n    }\n\n    /**\n     * A short hand way of creating a movieclip from an array of image ids\n     *\n     * @static\n     * @param {string[]} images - the array of image urls the movieclip will use as its texture frames\n     * @return {AnimatedSprite} The new animate sprite with the specified images as frames.\n     */\n    static fromImages(images)\n    {\n        const textures = [];\n\n        for (let i = 0; i < images.length; ++i)\n        {\n            textures.push(core.Texture.fromImage(images[i]));\n        }\n\n        return new AnimatedSprite(textures);\n    }\n\n    /**\n     * totalFrames is the total number of frames in the AnimatedSprite. This is the same as number of textures\n     * assigned to the AnimatedSprite.\n     *\n     * @readonly\n     * @member {number}\n     * @default 0\n     */\n    get totalFrames()\n    {\n        return this._textures.length;\n    }\n\n    /**\n     * The array of textures used for this AnimatedSprite\n     *\n     * @member {PIXI.Texture[]}\n     */\n    get textures()\n    {\n        return this._textures;\n    }\n\n    set textures(value) // eslint-disable-line require-jsdoc\n    {\n        if (value[0] instanceof core.Texture)\n        {\n            this._textures = value;\n            this._durations = null;\n        }\n        else\n        {\n            this._textures = [];\n            this._durations = [];\n\n            for (let i = 0; i < value.length; i++)\n            {\n                this._textures.push(value[i].texture);\n                this._durations.push(value[i].time);\n            }\n        }\n        this.gotoAndStop(0);\n        this.updateTexture();\n    }\n\n    /**\n    * The AnimatedSprites current frame index\n    *\n    * @member {number}\n    * @readonly\n    */\n    get currentFrame()\n    {\n        let currentFrame = Math.floor(this._currentTime) % this._textures.length;\n\n        if (currentFrame < 0)\n        {\n            currentFrame += this._textures.length;\n        }\n\n        return currentFrame;\n    }\n}\n","import * as core from '../core';\nimport ObservablePoint from '../core/math/ObservablePoint';\nimport settings from '../core/settings';\n\n/**\n * A BitmapText object will create a line or multiple lines of text using bitmap font. To\n * split a line you can use '\\n', '\\r' or '\\r\\n' in your string. You can generate the fnt files using:\n *\n * A BitmapText can only be created when the font is loaded\n *\n * ```js\n * // in this case the font is in a file called 'desyrel.fnt'\n * let bitmapText = new PIXI.extras.BitmapText(\"text using a fancy font!\", {font: \"35px Desyrel\", align: \"right\"});\n * ```\n *\n * http://www.angelcode.com/products/bmfont/ for windows or\n * http://www.bmglyph.com/ for mac.\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI.extras\n */\nexport default class BitmapText extends core.Container\n{\n    /**\n     * @param {string} text - The copy that you would like the text to display\n     * @param {object} style - The style parameters\n     * @param {string|object} style.font - The font descriptor for the object, can be passed as a string of form\n     *      \"24px FontName\" or \"FontName\" or as an object with explicit name/size properties.\n     * @param {string} [style.font.name] - The bitmap font id\n     * @param {number} [style.font.size] - The size of the font in pixels, e.g. 24\n     * @param {string} [style.align='left'] - Alignment for multiline text ('left', 'center' or 'right'), does not affect\n     *      single line text\n     * @param {number} [style.tint=0xFFFFFF] - The tint color\n     */\n    constructor(text, style = {})\n    {\n        super();\n\n        /**\n         * Private tracker for the width of the overall text\n         *\n         * @member {number}\n         * @private\n         */\n        this._textWidth = 0;\n\n        /**\n         * Private tracker for the height of the overall text\n         *\n         * @member {number}\n         * @private\n         */\n        this._textHeight = 0;\n\n        /**\n         * Private tracker for the letter sprite pool.\n         *\n         * @member {PIXI.Sprite[]}\n         * @private\n         */\n        this._glyphs = [];\n\n        /**\n         * Private tracker for the current style.\n         *\n         * @member {object}\n         * @private\n         */\n        this._font = {\n            tint: style.tint !== undefined ? style.tint : 0xFFFFFF,\n            align: style.align || 'left',\n            name: null,\n            size: 0,\n        };\n\n        /**\n         * Private tracker for the current font.\n         *\n         * @member {object}\n         * @private\n         */\n        this.font = style.font; // run font setter\n\n        /**\n         * Private tracker for the current text.\n         *\n         * @member {string}\n         * @private\n         */\n        this._text = text;\n\n        /**\n         * The max width of this bitmap text in pixels. If the text provided is longer than the\n         * value provided, line breaks will be automatically inserted in the last whitespace.\n         * Disable by setting value to 0\n         *\n         * @member {number}\n         * @private\n         */\n        this._maxWidth = 0;\n\n        /**\n         * The max line height. This is useful when trying to use the total height of the Text,\n         * ie: when trying to vertically align.\n         *\n         * @member {number}\n         * @private\n         */\n        this._maxLineHeight = 0;\n\n        /**\n         * Text anchor. read-only\n         *\n         * @member {PIXI.ObservablePoint}\n         * @private\n         */\n        this._anchor = new ObservablePoint(() => { this.dirty = true; }, this, 0, 0);\n\n        /**\n         * The dirty state of this object.\n         *\n         * @member {boolean}\n         */\n        this.dirty = false;\n\n        this.updateText();\n    }\n\n    /**\n     * Renders text and updates it when needed\n     *\n     * @private\n     */\n    updateText()\n    {\n        const data = BitmapText.fonts[this._font.name];\n        const scale = this._font.size / data.size;\n        const pos = new core.Point();\n        const chars = [];\n        const lineWidths = [];\n\n        let prevCharCode = null;\n        let lastLineWidth = 0;\n        let maxLineWidth = 0;\n        let line = 0;\n        let lastSpace = -1;\n        let lastSpaceWidth = 0;\n        let spacesRemoved = 0;\n        let maxLineHeight = 0;\n\n        for (let i = 0; i < this.text.length; i++)\n        {\n            const charCode = this.text.charCodeAt(i);\n\n            if (/(\\s)/.test(this.text.charAt(i)))\n            {\n                lastSpace = i;\n                lastSpaceWidth = lastLineWidth;\n            }\n\n            if (/(?:\\r\\n|\\r|\\n)/.test(this.text.charAt(i)))\n            {\n                lineWidths.push(lastLineWidth);\n                maxLineWidth = Math.max(maxLineWidth, lastLineWidth);\n                line++;\n\n                pos.x = 0;\n                pos.y += data.lineHeight;\n                prevCharCode = null;\n                continue;\n            }\n\n            if (lastSpace !== -1 && this._maxWidth > 0 && pos.x * scale > this._maxWidth)\n            {\n                core.utils.removeItems(chars, lastSpace - spacesRemoved, i - lastSpace);\n                i = lastSpace;\n                lastSpace = -1;\n                ++spacesRemoved;\n\n                lineWidths.push(lastSpaceWidth);\n                maxLineWidth = Math.max(maxLineWidth, lastSpaceWidth);\n                line++;\n\n                pos.x = 0;\n                pos.y += data.lineHeight;\n                prevCharCode = null;\n                continue;\n            }\n\n            const charData = data.chars[charCode];\n\n            if (!charData)\n            {\n                continue;\n            }\n\n            if (prevCharCode && charData.kerning[prevCharCode])\n            {\n                pos.x += charData.kerning[prevCharCode];\n            }\n\n            chars.push({\n                texture: charData.texture,\n                line,\n                charCode,\n                position: new core.Point(pos.x + charData.xOffset, pos.y + charData.yOffset),\n            });\n            lastLineWidth = pos.x + (charData.texture.width + charData.xOffset);\n            pos.x += charData.xAdvance;\n            maxLineHeight = Math.max(maxLineHeight, (charData.yOffset + charData.texture.height));\n            prevCharCode = charCode;\n        }\n\n        lineWidths.push(lastLineWidth);\n        maxLineWidth = Math.max(maxLineWidth, lastLineWidth);\n\n        const lineAlignOffsets = [];\n\n        for (let i = 0; i <= line; i++)\n        {\n            let alignOffset = 0;\n\n            if (this._font.align === 'right')\n            {\n                alignOffset = maxLineWidth - lineWidths[i];\n            }\n            else if (this._font.align === 'center')\n            {\n                alignOffset = (maxLineWidth - lineWidths[i]) / 2;\n            }\n\n            lineAlignOffsets.push(alignOffset);\n        }\n\n        const lenChars = chars.length;\n        const tint = this.tint;\n\n        for (let i = 0; i < lenChars; i++)\n        {\n            let c = this._glyphs[i]; // get the next glyph sprite\n\n            if (c)\n            {\n                c.texture = chars[i].texture;\n            }\n            else\n            {\n                c = new core.Sprite(chars[i].texture);\n                this._glyphs.push(c);\n            }\n\n            c.position.x = (chars[i].position.x + lineAlignOffsets[chars[i].line]) * scale;\n            c.position.y = chars[i].position.y * scale;\n            c.scale.x = c.scale.y = scale;\n            c.tint = tint;\n\n            if (!c.parent)\n            {\n                this.addChild(c);\n            }\n        }\n\n        // remove unnecessary children.\n        for (let i = lenChars; i < this._glyphs.length; ++i)\n        {\n            this.removeChild(this._glyphs[i]);\n        }\n\n        this._textWidth = maxLineWidth * scale;\n        this._textHeight = (pos.y + data.lineHeight) * scale;\n\n        // apply anchor\n        if (this.anchor.x !== 0 || this.anchor.y !== 0)\n        {\n            for (let i = 0; i < lenChars; i++)\n            {\n                this._glyphs[i].x -= this._textWidth * this.anchor.x;\n                this._glyphs[i].y -= this._textHeight * this.anchor.y;\n            }\n        }\n        this._maxLineHeight = maxLineHeight * scale;\n    }\n\n    /**\n     * Updates the transform of this object\n     *\n     * @private\n     */\n    updateTransform()\n    {\n        this.validate();\n        this.containerUpdateTransform();\n    }\n\n    /**\n     * Validates text before calling parent's getLocalBounds\n     *\n     * @return {PIXI.Rectangle} The rectangular bounding area\n     */\n    getLocalBounds()\n    {\n        this.validate();\n\n        return super.getLocalBounds();\n    }\n\n    /**\n     * Updates text when needed\n     *\n     * @private\n     */\n    validate()\n    {\n        if (this.dirty)\n        {\n            this.updateText();\n            this.dirty = false;\n        }\n    }\n\n    /**\n     * The tint of the BitmapText object\n     *\n     * @member {number}\n     */\n    get tint()\n    {\n        return this._font.tint;\n    }\n\n    set tint(value) // eslint-disable-line require-jsdoc\n    {\n        this._font.tint = (typeof value === 'number' && value >= 0) ? value : 0xFFFFFF;\n\n        this.dirty = true;\n    }\n\n    /**\n     * The alignment of the BitmapText object\n     *\n     * @member {string}\n     * @default 'left'\n     */\n    get align()\n    {\n        return this._font.align;\n    }\n\n    set align(value) // eslint-disable-line require-jsdoc\n    {\n        this._font.align = value || 'left';\n\n        this.dirty = true;\n    }\n\n    /**\n     * The anchor sets the origin point of the text.\n     * The default is 0,0 this means the text's origin is the top left\n     * Setting the anchor to 0.5,0.5 means the text's origin is centered\n     * Setting the anchor to 1,1 would mean the text's origin point will be the bottom right corner\n     *\n     * @member {PIXI.Point | number}\n     */\n    get anchor()\n    {\n        return this._anchor;\n    }\n\n    set anchor(value) // eslint-disable-line require-jsdoc\n    {\n        if (typeof value === 'number')\n        {\n            this._anchor.set(value);\n        }\n        else\n        {\n            this._anchor.copy(value);\n        }\n    }\n\n    /**\n     * The font descriptor of the BitmapText object\n     *\n     * @member {string|object}\n     */\n    get font()\n    {\n        return this._font;\n    }\n\n    set font(value) // eslint-disable-line require-jsdoc\n    {\n        if (!value)\n        {\n            return;\n        }\n\n        if (typeof value === 'string')\n        {\n            value = value.split(' ');\n\n            this._font.name = value.length === 1 ? value[0] : value.slice(1).join(' ');\n            this._font.size = value.length >= 2 ? parseInt(value[0], 10) : BitmapText.fonts[this._font.name].size;\n        }\n        else\n        {\n            this._font.name = value.name;\n            this._font.size = typeof value.size === 'number' ? value.size : parseInt(value.size, 10);\n        }\n\n        this.dirty = true;\n    }\n\n    /**\n     * The text of the BitmapText object\n     *\n     * @member {string}\n     */\n    get text()\n    {\n        return this._text;\n    }\n\n    set text(value) // eslint-disable-line require-jsdoc\n    {\n        value = value.toString() || ' ';\n        if (this._text === value)\n        {\n            return;\n        }\n        this._text = value;\n        this.dirty = true;\n    }\n\n    /**\n     * The max width of this bitmap text in pixels. If the text provided is longer than the\n     * value provided, line breaks will be automatically inserted in the last whitespace.\n     * Disable by setting value to 0\n     *\n     * @member {number}\n     */\n    get maxWidth()\n    {\n        return this._maxWidth;\n    }\n\n    set maxWidth(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._maxWidth === value)\n        {\n            return;\n        }\n        this._maxWidth = value;\n        this.dirty = true;\n    }\n\n    /**\n     * The max line height. This is useful when trying to use the total height of the Text,\n     * ie: when trying to vertically align.\n     *\n     * @member {number}\n     * @readonly\n     */\n    get maxLineHeight()\n    {\n        this.validate();\n\n        return this._maxLineHeight;\n    }\n\n    /**\n     * The width of the overall text, different from fontSize,\n     * which is defined in the style object\n     *\n     * @member {number}\n     * @readonly\n     */\n    get textWidth()\n    {\n        this.validate();\n\n        return this._textWidth;\n    }\n\n    /**\n     * The height of the overall text, different from fontSize,\n     * which is defined in the style object\n     *\n     * @member {number}\n     * @readonly\n     */\n    get textHeight()\n    {\n        this.validate();\n\n        return this._textHeight;\n    }\n\n    /**\n     * Register a bitmap font with data and a texture.\n     *\n     * @static\n     * @param {XMLDocument} xml - The XML document data.\n     * @param {PIXI.Texture} texture - Texture with all symbols.\n     * @return {Object} Result font object with font, size, lineHeight and char fields.\n     */\n    static registerFont(xml, texture)\n    {\n        const data = {};\n        const info = xml.getElementsByTagName('info')[0];\n        const common = xml.getElementsByTagName('common')[0];\n        const res = texture.baseTexture.resolution || settings.RESOLUTION;\n\n        data.font = info.getAttribute('face');\n        data.size = parseInt(info.getAttribute('size'), 10);\n        data.lineHeight = parseInt(common.getAttribute('lineHeight'), 10) / res;\n        data.chars = {};\n\n        // parse letters\n        const letters = xml.getElementsByTagName('char');\n\n        for (let i = 0; i < letters.length; i++)\n        {\n            const letter = letters[i];\n            const charCode = parseInt(letter.getAttribute('id'), 10);\n\n            const textureRect = new core.Rectangle(\n                (parseInt(letter.getAttribute('x'), 10) / res) + (texture.frame.x / res),\n                (parseInt(letter.getAttribute('y'), 10) / res) + (texture.frame.y / res),\n                parseInt(letter.getAttribute('width'), 10) / res,\n                parseInt(letter.getAttribute('height'), 10) / res\n            );\n\n            data.chars[charCode] = {\n                xOffset: parseInt(letter.getAttribute('xoffset'), 10) / res,\n                yOffset: parseInt(letter.getAttribute('yoffset'), 10) / res,\n                xAdvance: parseInt(letter.getAttribute('xadvance'), 10) / res,\n                kerning: {},\n                texture: new core.Texture(texture.baseTexture, textureRect),\n\n            };\n        }\n\n        // parse kernings\n        const kernings = xml.getElementsByTagName('kerning');\n\n        for (let i = 0; i < kernings.length; i++)\n        {\n            const kerning = kernings[i];\n            const first = parseInt(kerning.getAttribute('first'), 10) / res;\n            const second = parseInt(kerning.getAttribute('second'), 10) / res;\n            const amount = parseInt(kerning.getAttribute('amount'), 10) / res;\n\n            if (data.chars[second])\n            {\n                data.chars[second].kerning[first] = amount;\n            }\n        }\n\n        // I'm leaving this as a temporary fix so we can test the bitmap fonts in v3\n        // but it's very likely to change\n        BitmapText.fonts[data.font] = data;\n\n        return data;\n    }\n}\n\nBitmapText.fonts = {};\n","import { default as Matrix } from '../core/math/Matrix';\n\nconst tempMat = new Matrix();\n\n/**\n * class controls uv transform and frame clamp for texture\n *\n * @class\n * @memberof PIXI.extras\n */\nexport default class TextureTransform\n{\n    /**\n     *\n     * @param {PIXI.Texture} texture observed texture\n     * @param {number} [clampMargin] Changes frame clamping, 0.5 by default. Use -0.5 for extra border.\n     * @constructor\n     */\n    constructor(texture, clampMargin)\n    {\n        this._texture = texture;\n\n        this.mapCoord = new Matrix();\n\n        this.uClampFrame = new Float32Array(4);\n\n        this.uClampOffset = new Float32Array(2);\n\n        this._lastTextureID = -1;\n\n        /**\n         * Changes frame clamping\n         * Works with TilingSprite and Mesh\n         * Change to 1.5 if you texture has repeated right and bottom lines, that leads to smoother borders\n         *\n         * @default 0\n         * @member {number}\n         */\n        this.clampOffset = 0;\n\n        /**\n         * Changes frame clamping\n         * Works with TilingSprite and Mesh\n         * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas\n         *\n         * @default 0.5\n         * @member {number}\n         */\n        this.clampMargin = (typeof clampMargin === 'undefined') ? 0.5 : clampMargin;\n    }\n\n    /**\n     * texture property\n     * @member {PIXI.Texture}\n     */\n    get texture()\n    {\n        return this._texture;\n    }\n\n    set texture(value) // eslint-disable-line require-jsdoc\n    {\n        this._texture = value;\n        this._lastTextureID = -1;\n    }\n\n    /**\n     * Multiplies uvs array to transform\n     * @param {Float32Array} uvs mesh uvs\n     * @param {Float32Array} [out=uvs] output\n     * @returns {Float32Array} output\n     */\n    multiplyUvs(uvs, out)\n    {\n        if (out === undefined)\n        {\n            out = uvs;\n        }\n\n        const mat = this.mapCoord;\n\n        for (let i = 0; i < uvs.length; i += 2)\n        {\n            const x = uvs[i];\n            const y = uvs[i + 1];\n\n            out[i] = (x * mat.a) + (y * mat.c) + mat.tx;\n            out[i + 1] = (x * mat.b) + (y * mat.d) + mat.ty;\n        }\n\n        return out;\n    }\n\n    /**\n     * updates matrices if texture was changed\n     * @param {boolean} forceUpdate if true, matrices will be updated any case\n     * @returns {boolean} whether or not it was updated\n     */\n    update(forceUpdate)\n    {\n        const tex = this._texture;\n\n        if (!tex || !tex.valid)\n        {\n            return false;\n        }\n\n        if (!forceUpdate\n            && this._lastTextureID === tex._updateID)\n        {\n            return false;\n        }\n\n        this._lastTextureID = tex._updateID;\n\n        const uvs = tex._uvs;\n\n        this.mapCoord.set(uvs.x1 - uvs.x0, uvs.y1 - uvs.y0, uvs.x3 - uvs.x0, uvs.y3 - uvs.y0, uvs.x0, uvs.y0);\n\n        const orig = tex.orig;\n        const trim = tex.trim;\n\n        if (trim)\n        {\n            tempMat.set(orig.width / trim.width, 0, 0, orig.height / trim.height,\n                -trim.x / trim.width, -trim.y / trim.height);\n            this.mapCoord.append(tempMat);\n        }\n\n        const texBase = tex.baseTexture;\n        const frame = this.uClampFrame;\n        const margin = this.clampMargin / texBase.resolution;\n        const offset = this.clampOffset;\n\n        frame[0] = (tex._frame.x + margin + offset) / texBase.width;\n        frame[1] = (tex._frame.y + margin + offset) / texBase.height;\n        frame[2] = (tex._frame.x + tex._frame.width - margin + offset) / texBase.width;\n        frame[3] = (tex._frame.y + tex._frame.height - margin + offset) / texBase.height;\n        this.uClampOffset[0] = offset / texBase.realWidth;\n        this.uClampOffset[1] = offset / texBase.realHeight;\n\n        return true;\n    }\n}\n","import * as core from '../core';\nimport CanvasTinter from '../core/sprites/canvas/CanvasTinter';\nimport { default as TextureTransform } from './TextureTransform';\n\nconst tempPoint = new core.Point();\n\n/**\n * A tiling sprite is a fast way of rendering a tiling image\n *\n * @class\n * @extends PIXI.Sprite\n * @memberof PIXI.extras\n */\nexport default class TilingSprite extends core.Sprite\n{\n    /**\n     * @param {PIXI.Texture} texture - the texture of the tiling sprite\n     * @param {number} [width=100] - the width of the tiling sprite\n     * @param {number} [height=100] - the height of the tiling sprite\n     */\n    constructor(texture, width = 100, height = 100)\n    {\n        super(texture);\n\n        /**\n         * Tile transform\n         *\n         * @member {PIXI.TransformStatic}\n         */\n        this.tileTransform = new core.TransformStatic();\n\n        // /// private\n\n        /**\n         * The with of the tiling sprite\n         *\n         * @member {number}\n         * @private\n         */\n        this._width = width;\n\n        /**\n         * The height of the tiling sprite\n         *\n         * @member {number}\n         * @private\n         */\n        this._height = height;\n\n        /**\n         * Canvas pattern\n         *\n         * @type {CanvasPattern}\n         * @private\n         */\n        this._canvasPattern = null;\n\n        /**\n         * transform that is applied to UV to get the texture coords\n         *\n         * @member {PIXI.extras.TextureTransform}\n         */\n        this.uvTransform = texture.transform || new TextureTransform(texture);\n\n        /**\n         * Plugin that is responsible for rendering this element.\n         * Allows to customize the rendering process without overriding '_renderWebGL' method.\n         *\n         * @member {string}\n         * @default 'tilingSprite'\n         */\n        this.pluginName = 'tilingSprite';\n\n        /**\n         * Whether or not anchor affects uvs\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.uvRespectAnchor = false;\n    }\n    /**\n     * Changes frame clamping in corresponding textureTransform, shortcut\n     * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas\n     *\n     * @default 0.5\n     * @member {number}\n     */\n    get clampMargin()\n    {\n        return this.uvTransform.clampMargin;\n    }\n\n    set clampMargin(value) // eslint-disable-line require-jsdoc\n    {\n        this.uvTransform.clampMargin = value;\n        this.uvTransform.update(true);\n    }\n\n    /**\n     * The scaling of the image that is being tiled\n     *\n     * @member {PIXI.ObservablePoint}\n     */\n    get tileScale()\n    {\n        return this.tileTransform.scale;\n    }\n\n    set tileScale(value) // eslint-disable-line require-jsdoc\n    {\n        this.tileTransform.scale.copy(value);\n    }\n\n    /**\n     * The offset of the image that is being tiled\n     *\n     * @member {PIXI.ObservablePoint}\n     */\n    get tilePosition()\n    {\n        return this.tileTransform.position;\n    }\n\n    set tilePosition(value) // eslint-disable-line require-jsdoc\n    {\n        this.tileTransform.position.copy(value);\n    }\n\n    /**\n     * @private\n     */\n    _onTextureUpdate()\n    {\n        if (this.uvTransform)\n        {\n            this.uvTransform.texture = this._texture;\n        }\n    }\n\n    /**\n     * Renders the object using the WebGL renderer\n     *\n     * @private\n     * @param {PIXI.WebGLRenderer} renderer - The renderer\n     */\n    _renderWebGL(renderer)\n    {\n        // tweak our texture temporarily..\n        const texture = this._texture;\n\n        if (!texture || !texture.valid)\n        {\n            return;\n        }\n\n        this.tileTransform.updateLocalTransform();\n        this.uvTransform.update();\n\n        renderer.setObjectRenderer(renderer.plugins[this.pluginName]);\n        renderer.plugins[this.pluginName].render(this);\n    }\n\n    /**\n     * Renders the object using the Canvas renderer\n     *\n     * @private\n     * @param {PIXI.CanvasRenderer} renderer - a reference to the canvas renderer\n     */\n    _renderCanvas(renderer)\n    {\n        const texture = this._texture;\n\n        if (!texture.baseTexture.hasLoaded)\n        {\n            return;\n        }\n\n        const context = renderer.context;\n        const transform = this.worldTransform;\n        const resolution = renderer.resolution;\n        const baseTexture = texture.baseTexture;\n        const baseTextureResolution = baseTexture.resolution;\n        const modX = ((this.tilePosition.x / this.tileScale.x) % texture._frame.width) * baseTextureResolution;\n        const modY = ((this.tilePosition.y / this.tileScale.y) % texture._frame.height) * baseTextureResolution;\n\n        // create a nice shiny pattern!\n        // TODO this needs to be refreshed if texture changes..\n        if (!this._canvasPattern)\n        {\n            // cut an object from a spritesheet..\n            const tempCanvas = new core.CanvasRenderTarget(texture._frame.width,\n                                                        texture._frame.height,\n                                                        baseTextureResolution);\n\n            // Tint the tiling sprite\n            if (this.tint !== 0xFFFFFF)\n            {\n                if (this.cachedTint !== this.tint)\n                {\n                    this.cachedTint = this.tint;\n\n                    this.tintedTexture = CanvasTinter.getTintedTexture(this, this.tint);\n                }\n                tempCanvas.context.drawImage(this.tintedTexture, 0, 0);\n            }\n            else\n            {\n                tempCanvas.context.drawImage(baseTexture.source,\n                    -texture._frame.x * baseTextureResolution, -texture._frame.y * baseTextureResolution);\n            }\n            this._canvasPattern = tempCanvas.context.createPattern(tempCanvas.canvas, 'repeat');\n        }\n\n        // set context state..\n        context.globalAlpha = this.worldAlpha;\n        context.setTransform(transform.a * resolution,\n                           transform.b * resolution,\n                           transform.c * resolution,\n                           transform.d * resolution,\n                           transform.tx * resolution,\n                           transform.ty * resolution);\n\n        renderer.setBlendMode(this.blendMode);\n\n        // fill the pattern!\n        context.fillStyle = this._canvasPattern;\n\n        // TODO - this should be rolled into the setTransform above..\n        context.scale(this.tileScale.x / baseTextureResolution, this.tileScale.y / baseTextureResolution);\n\n        const anchorX = this.anchor.x * -this._width;\n        const anchorY = this.anchor.y * -this._height;\n\n        if (this.uvRespectAnchor)\n        {\n            context.translate(modX, modY);\n\n            context.fillRect(-modX + anchorX, -modY + anchorY,\n                this._width / this.tileScale.x * baseTextureResolution,\n                this._height / this.tileScale.y * baseTextureResolution);\n        }\n        else\n        {\n            context.translate(modX + anchorX, modY + anchorY);\n\n            context.fillRect(-modX, -modY,\n                this._width / this.tileScale.x * baseTextureResolution,\n                this._height / this.tileScale.y * baseTextureResolution);\n        }\n    }\n\n    /**\n     * Updates the bounds of the tiling sprite.\n     *\n     * @private\n     */\n    _calculateBounds()\n    {\n        const minX = this._width * -this._anchor._x;\n        const minY = this._height * -this._anchor._y;\n        const maxX = this._width * (1 - this._anchor._x);\n        const maxY = this._height * (1 - this._anchor._y);\n\n        this._bounds.addFrame(this.transform, minX, minY, maxX, maxY);\n    }\n\n    /**\n     * Gets the local bounds of the sprite object.\n     *\n     * @param {PIXI.Rectangle} rect - The output rectangle.\n     * @return {PIXI.Rectangle} The bounds.\n     */\n    getLocalBounds(rect)\n    {\n        // we can do a fast local bounds if the sprite has no children!\n        if (this.children.length === 0)\n        {\n            this._bounds.minX = this._width * -this._anchor._x;\n            this._bounds.minY = this._height * -this._anchor._y;\n            this._bounds.maxX = this._width * (1 - this._anchor._x);\n            this._bounds.maxY = this._height * (1 - this._anchor._x);\n\n            if (!rect)\n            {\n                if (!this._localBoundsRect)\n                {\n                    this._localBoundsRect = new core.Rectangle();\n                }\n\n                rect = this._localBoundsRect;\n            }\n\n            return this._bounds.getRectangle(rect);\n        }\n\n        return super.getLocalBounds.call(this, rect);\n    }\n\n    /**\n     * Checks if a point is inside this tiling sprite.\n     *\n     * @param {PIXI.Point} point - the point to check\n     * @return {boolean} Whether or not the sprite contains the point.\n     */\n    containsPoint(point)\n    {\n        this.worldTransform.applyInverse(point, tempPoint);\n\n        const width = this._width;\n        const height = this._height;\n        const x1 = -width * this.anchor._x;\n\n        if (tempPoint.x >= x1 && tempPoint.x < x1 + width)\n        {\n            const y1 = -height * this.anchor._y;\n\n            if (tempPoint.y >= y1 && tempPoint.y < y1 + height)\n            {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Destroys this sprite and optionally its texture and children\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy\n     *      method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well\n     * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well\n     */\n    destroy(options)\n    {\n        super.destroy(options);\n\n        this.tileTransform = null;\n        this.uvTransform = null;\n    }\n\n    /**\n     * Helper function that creates a new tiling sprite based on the source you provide.\n     * The source can be - frame id, image url, video url, canvas element, video element, base texture\n     *\n     * @static\n     * @param {number|string|PIXI.BaseTexture|HTMLCanvasElement|HTMLVideoElement} source - Source to create texture from\n     * @param {number} width - the width of the tiling sprite\n     * @param {number} height - the height of the tiling sprite\n     * @return {PIXI.Texture} The newly created texture\n     */\n    static from(source, width, height)\n    {\n        return new TilingSprite(core.Texture.from(source), width, height);\n    }\n\n    /**\n     * Helper function that creates a tiling sprite that will use a texture from the TextureCache based on the frameId\n     * The frame ids are created when a Texture packer file has been loaded\n     *\n     * @static\n     * @param {string} frameId - The frame Id of the texture in the cache\n     * @param {number} width - the width of the tiling sprite\n     * @param {number} height - the height of the tiling sprite\n     * @return {PIXI.extras.TilingSprite} A new TilingSprite using a texture from the texture cache matching the frameId\n     */\n    static fromFrame(frameId, width, height)\n    {\n        const texture = core.utils.TextureCache[frameId];\n\n        if (!texture)\n        {\n            throw new Error(`The frameId \"${frameId}\" does not exist in the texture cache ${this}`);\n        }\n\n        return new TilingSprite(texture, width, height);\n    }\n\n    /**\n     * Helper function that creates a sprite that will contain a texture based on an image url\n     * If the image is not in the texture cache it will be loaded\n     *\n     * @static\n     * @param {string} imageId - The image url of the texture\n     * @param {number} width - the width of the tiling sprite\n     * @param {number} height - the height of the tiling sprite\n     * @param {boolean} [crossorigin] - if you want to specify the cross-origin parameter\n     * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - if you want to specify the scale mode,\n     *  see {@link PIXI.SCALE_MODES} for possible values\n     * @return {PIXI.extras.TilingSprite} A new TilingSprite using a texture from the texture cache matching the image id\n     */\n    static fromImage(imageId, width, height, crossorigin, scaleMode)\n    {\n        return new TilingSprite(core.Texture.fromImage(imageId, crossorigin, scaleMode), width, height);\n    }\n\n    /**\n     * The width of the sprite, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        return this._width;\n    }\n\n    set width(value) // eslint-disable-line require-jsdoc\n    {\n        this._width = value;\n    }\n\n    /**\n     * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        return this._height;\n    }\n\n    set height(value) // eslint-disable-line require-jsdoc\n    {\n        this._height = value;\n    }\n}\n","import * as core from '../core';\nimport Texture from '../core/textures/Texture';\nimport BaseTexture from '../core/textures/BaseTexture';\nimport { uid } from '../core/utils';\n\nconst DisplayObject = core.DisplayObject;\nconst _tempMatrix = new core.Matrix();\n\nDisplayObject.prototype._cacheAsBitmap = false;\nDisplayObject.prototype._cacheData = false;\n\n// figured theres no point adding ALL the extra variables to prototype.\n// this model can hold the information needed. This can also be generated on demand as\n// most objects are not cached as bitmaps.\n/**\n * @class\n * @ignore\n */\nclass CacheData\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        this.textureCacheId = null;\n\n        this.originalRenderWebGL = null;\n        this.originalRenderCanvas = null;\n        this.originalCalculateBounds = null;\n        this.originalGetLocalBounds = null;\n\n        this.originalUpdateTransform = null;\n        this.originalHitTest = null;\n        this.originalDestroy = null;\n        this.originalMask = null;\n        this.originalFilterArea = null;\n        this.sprite = null;\n    }\n}\n\nObject.defineProperties(DisplayObject.prototype, {\n    /**\n     * Set this to true if you want this display object to be cached as a bitmap.\n     * This basically takes a snap shot of the display object as it is at that moment. It can\n     * provide a performance benefit for complex static displayObjects.\n     * To remove simply set this property to 'false'\n     *\n     * IMPORTANT GOTCHA - make sure that all your textures are preloaded BEFORE setting this property to true\n     * as it will take a snapshot of what is currently there. If the textures have not loaded then they will not appear.\n     *\n     * @member {boolean}\n     * @memberof PIXI.DisplayObject#\n     */\n    cacheAsBitmap: {\n        get()\n        {\n            return this._cacheAsBitmap;\n        },\n        set(value)\n        {\n            if (this._cacheAsBitmap === value)\n            {\n                return;\n            }\n\n            this._cacheAsBitmap = value;\n\n            let data;\n\n            if (value)\n            {\n                if (!this._cacheData)\n                {\n                    this._cacheData = new CacheData();\n                }\n\n                data = this._cacheData;\n\n                data.originalRenderWebGL = this.renderWebGL;\n                data.originalRenderCanvas = this.renderCanvas;\n\n                data.originalUpdateTransform = this.updateTransform;\n                data.originalCalculateBounds = this._calculateBounds;\n                data.originalGetLocalBounds = this.getLocalBounds;\n\n                data.originalDestroy = this.destroy;\n\n                data.originalContainsPoint = this.containsPoint;\n\n                data.originalMask = this._mask;\n                data.originalFilterArea = this.filterArea;\n\n                this.renderWebGL = this._renderCachedWebGL;\n                this.renderCanvas = this._renderCachedCanvas;\n\n                this.destroy = this._cacheAsBitmapDestroy;\n            }\n            else\n            {\n                data = this._cacheData;\n\n                if (data.sprite)\n                {\n                    this._destroyCachedDisplayObject();\n                }\n\n                this.renderWebGL = data.originalRenderWebGL;\n                this.renderCanvas = data.originalRenderCanvas;\n                this._calculateBounds = data.originalCalculateBounds;\n                this.getLocalBounds = data.originalGetLocalBounds;\n\n                this.destroy = data.originalDestroy;\n\n                this.updateTransform = data.originalUpdateTransform;\n                this.containsPoint = data.originalContainsPoint;\n\n                this._mask = data.originalMask;\n                this.filterArea = data.originalFilterArea;\n            }\n        },\n    },\n});\n\n/**\n * Renders a cached version of the sprite with WebGL\n *\n * @private\n * @memberof PIXI.DisplayObject#\n * @param {PIXI.WebGLRenderer} renderer - the WebGL renderer\n */\nDisplayObject.prototype._renderCachedWebGL = function _renderCachedWebGL(renderer)\n{\n    if (!this.visible || this.worldAlpha <= 0 || !this.renderable)\n    {\n        return;\n    }\n\n    this._initCachedDisplayObject(renderer);\n\n    this._cacheData.sprite._transformID = -1;\n    this._cacheData.sprite.worldAlpha = this.worldAlpha;\n    this._cacheData.sprite._renderWebGL(renderer);\n};\n\n/**\n * Prepares the WebGL renderer to cache the sprite\n *\n * @private\n * @memberof PIXI.DisplayObject#\n * @param {PIXI.WebGLRenderer} renderer - the WebGL renderer\n */\nDisplayObject.prototype._initCachedDisplayObject = function _initCachedDisplayObject(renderer)\n{\n    if (this._cacheData && this._cacheData.sprite)\n    {\n        return;\n    }\n\n    // make sure alpha is set to 1 otherwise it will get rendered as invisible!\n    const cacheAlpha = this.alpha;\n\n    this.alpha = 1;\n\n    // first we flush anything left in the renderer (otherwise it would get rendered to the cached texture)\n    renderer.currentRenderer.flush();\n    // this.filters= [];\n\n    // next we find the dimensions of the untransformed object\n    // this function also calls updatetransform on all its children as part of the measuring.\n    // This means we don't need to update the transform again in this function\n    // TODO pass an object to clone too? saves having to create a new one each time!\n    const bounds = this.getLocalBounds().clone();\n\n    // add some padding!\n    if (this._filters)\n    {\n        const padding = this._filters[0].padding;\n\n        bounds.pad(padding);\n    }\n\n    // for now we cache the current renderTarget that the webGL renderer is currently using.\n    // this could be more elegent..\n    const cachedRenderTarget = renderer._activeRenderTarget;\n    // We also store the filter stack - I will definitely look to change how this works a little later down the line.\n    const stack = renderer.filterManager.filterStack;\n\n    // this renderTexture will be used to store the cached DisplayObject\n\n    const renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0);\n\n    const textureCacheId = `cacheAsBitmap_${uid()}`;\n\n    this._cacheData.textureCacheId = textureCacheId;\n\n    BaseTexture.addToCache(renderTexture.baseTexture, textureCacheId);\n    Texture.addToCache(renderTexture, textureCacheId);\n\n    // need to set //\n    const m = _tempMatrix;\n\n    m.tx = -bounds.x;\n    m.ty = -bounds.y;\n\n    // reset\n    this.transform.worldTransform.identity();\n\n    // set all properties to there original so we can render to a texture\n    this.renderWebGL = this._cacheData.originalRenderWebGL;\n\n    renderer.render(this, renderTexture, true, m, true);\n    // now restore the state be setting the new properties\n\n    renderer.bindRenderTarget(cachedRenderTarget);\n\n    renderer.filterManager.filterStack = stack;\n\n    this.renderWebGL = this._renderCachedWebGL;\n    this.updateTransform = this.displayObjectUpdateTransform;\n\n    this._mask = null;\n    this.filterArea = null;\n\n    // create our cached sprite\n    const cachedSprite = new core.Sprite(renderTexture);\n\n    cachedSprite.transform.worldTransform = this.transform.worldTransform;\n    cachedSprite.anchor.x = -(bounds.x / bounds.width);\n    cachedSprite.anchor.y = -(bounds.y / bounds.height);\n    cachedSprite.alpha = cacheAlpha;\n    cachedSprite._bounds = this._bounds;\n\n    // easy bounds..\n    this._calculateBounds = this._calculateCachedBounds;\n    this.getLocalBounds = this._getCachedLocalBounds;\n\n    this._cacheData.sprite = cachedSprite;\n\n    this.transform._parentID = -1;\n    // restore the transform of the cached sprite to avoid the nasty flicker..\n    if (!this.parent)\n    {\n        this.parent = renderer._tempDisplayObjectParent;\n        this.updateTransform();\n        this.parent = null;\n    }\n    else\n    {\n        this.updateTransform();\n    }\n\n    // map the hit test..\n    this.containsPoint = cachedSprite.containsPoint.bind(cachedSprite);\n};\n\n/**\n * Renders a cached version of the sprite with canvas\n *\n * @private\n * @memberof PIXI.DisplayObject#\n * @param {PIXI.WebGLRenderer} renderer - the WebGL renderer\n */\nDisplayObject.prototype._renderCachedCanvas = function _renderCachedCanvas(renderer)\n{\n    if (!this.visible || this.worldAlpha <= 0 || !this.renderable)\n    {\n        return;\n    }\n\n    this._initCachedDisplayObjectCanvas(renderer);\n\n    this._cacheData.sprite.worldAlpha = this.worldAlpha;\n\n    this._cacheData.sprite.renderCanvas(renderer);\n};\n\n// TODO this can be the same as the webGL verison.. will need to do a little tweaking first though..\n/**\n * Prepares the Canvas renderer to cache the sprite\n *\n * @private\n * @memberof PIXI.DisplayObject#\n * @param {PIXI.WebGLRenderer} renderer - the WebGL renderer\n */\nDisplayObject.prototype._initCachedDisplayObjectCanvas = function _initCachedDisplayObjectCanvas(renderer)\n{\n    if (this._cacheData && this._cacheData.sprite)\n    {\n        return;\n    }\n\n    // get bounds actually transforms the object for us already!\n    const bounds = this.getLocalBounds();\n\n    const cacheAlpha = this.alpha;\n\n    this.alpha = 1;\n\n    const cachedRenderTarget = renderer.context;\n\n    const renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0);\n\n    const textureCacheId = `cacheAsBitmap_${uid()}`;\n\n    this._cacheData.textureCacheId = textureCacheId;\n\n    BaseTexture.addToCache(renderTexture.baseTexture, textureCacheId);\n    Texture.addToCache(renderTexture, textureCacheId);\n\n    // need to set //\n    const m = _tempMatrix;\n\n    this.transform.localTransform.copy(m);\n    m.invert();\n\n    m.tx -= bounds.x;\n    m.ty -= bounds.y;\n\n    // m.append(this.transform.worldTransform.)\n     // set all properties to there original so we can render to a texture\n    this.renderCanvas = this._cacheData.originalRenderCanvas;\n\n    // renderTexture.render(this, m, true);\n    renderer.render(this, renderTexture, true, m, false);\n\n    // now restore the state be setting the new properties\n    renderer.context = cachedRenderTarget;\n\n    this.renderCanvas = this._renderCachedCanvas;\n    this._calculateBounds = this._calculateCachedBounds;\n\n    this._mask = null;\n    this.filterArea = null;\n\n    // create our cached sprite\n    const cachedSprite = new core.Sprite(renderTexture);\n\n    cachedSprite.transform.worldTransform = this.transform.worldTransform;\n    cachedSprite.anchor.x = -(bounds.x / bounds.width);\n    cachedSprite.anchor.y = -(bounds.y / bounds.height);\n    cachedSprite._bounds = this._bounds;\n    cachedSprite.alpha = cacheAlpha;\n\n    if (!this.parent)\n    {\n        this.parent = renderer._tempDisplayObjectParent;\n        this.updateTransform();\n        this.parent = null;\n    }\n    else\n    {\n        this.updateTransform();\n    }\n\n    this.updateTransform = this.displayObjectUpdateTransform;\n\n    this._cacheData.sprite = cachedSprite;\n\n    this.containsPoint = cachedSprite.containsPoint.bind(cachedSprite);\n};\n\n/**\n * Calculates the bounds of the cached sprite\n *\n * @private\n */\nDisplayObject.prototype._calculateCachedBounds = function _calculateCachedBounds()\n{\n    this._cacheData.sprite._calculateBounds();\n};\n\n/**\n * Gets the bounds of the cached sprite.\n *\n * @private\n * @return {Rectangle} The local bounds.\n */\nDisplayObject.prototype._getCachedLocalBounds = function _getCachedLocalBounds()\n{\n    return this._cacheData.sprite.getLocalBounds();\n};\n\n/**\n * Destroys the cached sprite.\n *\n * @private\n */\nDisplayObject.prototype._destroyCachedDisplayObject = function _destroyCachedDisplayObject()\n{\n    this._cacheData.sprite._texture.destroy(true);\n    this._cacheData.sprite = null;\n\n    BaseTexture.removeFromCache(this._cacheData.textureCacheId);\n    Texture.removeFromCache(this._cacheData.textureCacheId);\n\n    this._cacheData.textureCacheId = null;\n};\n\n/**\n * Destroys the cached object.\n *\n * @private\n * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n *  have been set to that value.\n *  Used when destroying containers, see the Container.destroy method.\n */\nDisplayObject.prototype._cacheAsBitmapDestroy = function _cacheAsBitmapDestroy(options)\n{\n    this.cacheAsBitmap = false;\n    this.destroy(options);\n};\n","import * as core from '../core';\n\n/**\n * The instance name of the object.\n *\n * @memberof PIXI.DisplayObject#\n * @member {string}\n */\ncore.DisplayObject.prototype.name = null;\n\n/**\n * Returns the display object in the container\n *\n * @memberof PIXI.Container#\n * @param {string} name - instance name\n * @return {PIXI.DisplayObject} The child with the specified name.\n */\ncore.Container.prototype.getChildByName = function getChildByName(name)\n{\n    for (let i = 0; i < this.children.length; i++)\n    {\n        if (this.children[i].name === name)\n        {\n            return this.children[i];\n        }\n    }\n\n    return null;\n};\n","import * as core from '../core';\n\n/**\n * Returns the global position of the displayObject. Does not depend on object scale, rotation and pivot.\n *\n * @memberof PIXI.DisplayObject#\n * @param {Point} point - the point to write the global value to. If null a new point will be returned\n * @param {boolean} skipUpdate - setting to true will stop the transforms of the scene graph from\n *  being updated. This means the calculation returned MAY be out of date BUT will give you a\n *  nice performance boost\n * @return {Point} The updated point\n */\ncore.DisplayObject.prototype.getGlobalPosition = function getGlobalPosition(point = new core.Point(), skipUpdate = false)\n{\n    if (this.parent)\n    {\n        this.parent.toGlobal(this.position, point, skipUpdate);\n    }\n    else\n    {\n        point.x = this.position.x;\n        point.y = this.position.y;\n    }\n\n    return point;\n};\n","/**\n * Additional PIXI DisplayObjects for animation, tiling and bitmap text.\n * @namespace PIXI.extras\n */\nexport { default as AnimatedSprite } from './AnimatedSprite';\nexport { default as TextureTransform } from './TextureTransform';\nexport { default as TilingSprite } from './TilingSprite';\nexport { default as TilingSpriteRenderer } from './webgl/TilingSpriteRenderer';\nexport { default as BitmapText } from './BitmapText';\n\n// imported for side effect of extending the prototype only, contains no exports\nimport './cacheAsBitmap';\nimport './getChildByName';\nimport './getGlobalPosition';\n","import * as core from '../../core';\nimport { WRAP_MODES } from '../../core/const';\nimport { readFileSync } from 'fs';\nimport { join } from 'path';\n\nconst tempMat = new core.Matrix();\n\n/**\n * WebGL renderer plugin for tiling sprites\n *\n * @class\n * @memberof PIXI.extras\n * @extends PIXI.ObjectRenderer\n */\nexport default class TilingSpriteRenderer extends core.ObjectRenderer\n{\n\n    /**\n     * constructor for renderer\n     *\n     * @param {WebGLRenderer} renderer The renderer this tiling awesomeness works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        this.shader = null;\n        this.simpleShader = null;\n        this.quad = null;\n    }\n\n    /**\n     * Sets up the renderer context and necessary buffers.\n     *\n     * @private\n     */\n    onContextChange()\n    {\n        const gl = this.renderer.gl;\n\n        this.shader = new core.Shader(gl,\n            readFileSync(join(__dirname, './tilingSprite.vert'), 'utf8'),\n            readFileSync(join(__dirname, './tilingSprite.frag'), 'utf8'));\n        this.simpleShader = new core.Shader(gl,\n            readFileSync(join(__dirname, './tilingSprite.vert'), 'utf8'),\n            readFileSync(join(__dirname, './tilingSprite_simple.frag'), 'utf8'));\n\n        this.renderer.bindVao(null);\n        this.quad = new core.Quad(gl, this.renderer.state.attribState);\n        this.quad.initVao(this.shader);\n    }\n\n    /**\n     *\n     * @param {PIXI.extras.TilingSprite} ts tilingSprite to be rendered\n     */\n    render(ts)\n    {\n        const renderer = this.renderer;\n        const quad = this.quad;\n\n        renderer.bindVao(quad.vao);\n\n        let vertices = quad.vertices;\n\n        vertices[0] = vertices[6] = (ts._width) * -ts.anchor.x;\n        vertices[1] = vertices[3] = ts._height * -ts.anchor.y;\n\n        vertices[2] = vertices[4] = (ts._width) * (1.0 - ts.anchor.x);\n        vertices[5] = vertices[7] = ts._height * (1.0 - ts.anchor.y);\n\n        if (ts.uvRespectAnchor)\n        {\n            vertices = quad.uvs;\n\n            vertices[0] = vertices[6] = -ts.anchor.x;\n            vertices[1] = vertices[3] = -ts.anchor.y;\n\n            vertices[2] = vertices[4] = 1.0 - ts.anchor.x;\n            vertices[5] = vertices[7] = 1.0 - ts.anchor.y;\n        }\n\n        quad.upload();\n\n        const tex = ts._texture;\n        const baseTex = tex.baseTexture;\n        const lt = ts.tileTransform.localTransform;\n        const uv = ts.uvTransform;\n        let isSimple = baseTex.isPowerOfTwo\n            && tex.frame.width === baseTex.width && tex.frame.height === baseTex.height;\n\n        // auto, force repeat wrapMode for big tiling textures\n        if (isSimple)\n        {\n            if (!baseTex._glTextures[renderer.CONTEXT_UID])\n            {\n                if (baseTex.wrapMode === WRAP_MODES.CLAMP)\n                {\n                    baseTex.wrapMode = WRAP_MODES.REPEAT;\n                }\n            }\n            else\n            {\n                isSimple = baseTex.wrapMode !== WRAP_MODES.CLAMP;\n            }\n        }\n\n        const shader = isSimple ? this.simpleShader : this.shader;\n\n        renderer.bindShader(shader);\n\n        const w = tex.width;\n        const h = tex.height;\n        const W = ts._width;\n        const H = ts._height;\n\n        tempMat.set(lt.a * w / W,\n            lt.b * w / H,\n            lt.c * h / W,\n            lt.d * h / H,\n            lt.tx / W,\n            lt.ty / H);\n\n        // that part is the same as above:\n        // tempMat.identity();\n        // tempMat.scale(tex.width, tex.height);\n        // tempMat.prepend(lt);\n        // tempMat.scale(1.0 / ts._width, 1.0 / ts._height);\n\n        tempMat.invert();\n        if (isSimple)\n        {\n            tempMat.prepend(uv.mapCoord);\n        }\n        else\n        {\n            shader.uniforms.uMapCoord = uv.mapCoord.toArray(true);\n            shader.uniforms.uClampFrame = uv.uClampFrame;\n            shader.uniforms.uClampOffset = uv.uClampOffset;\n        }\n\n        shader.uniforms.uTransform = tempMat.toArray(true);\n        shader.uniforms.uColor = core.utils.premultiplyTintToRgba(ts.tint, ts.worldAlpha,\n            shader.uniforms.uColor, baseTex.premultipliedAlpha);\n        shader.uniforms.translationMatrix = ts.transform.worldTransform.toArray(true);\n\n        shader.uniforms.uSampler = renderer.bindTexture(tex);\n\n        renderer.setBlendMode(core.utils.correctBlendMode(ts.blendMode, baseTex.premultipliedAlpha));\n\n        quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0);\n    }\n}\n\ncore.WebGLRenderer.registerPlugin('tilingSprite', TilingSpriteRenderer);\n","import * as core from '../../core';\nimport BlurXFilter from './BlurXFilter';\nimport BlurYFilter from './BlurYFilter';\n\n/**\n * The BlurFilter applies a Gaussian blur to an object.\n * The strength of the blur can be set for x- and y-axis separately.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class BlurFilter extends core.Filter\n{\n    /**\n     * @param {number} strength - The strength of the blur filter.\n     * @param {number} quality - The quality of the blur filter.\n     * @param {number} resolution - The resolution of the blur filter.\n     * @param {number} [kernelSize=5] - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15.\n     */\n    constructor(strength, quality, resolution, kernelSize)\n    {\n        super();\n\n        this.blurXFilter = new BlurXFilter(strength, quality, resolution, kernelSize);\n        this.blurYFilter = new BlurYFilter(strength, quality, resolution, kernelSize);\n\n        this.padding = 0;\n        this.resolution = resolution || core.settings.RESOLUTION;\n        this.quality = quality || 4;\n        this.blur = strength || 8;\n    }\n\n    /**\n     * Applies the filter.\n     *\n     * @param {PIXI.FilterManager} filterManager - The manager.\n     * @param {PIXI.RenderTarget} input - The input target.\n     * @param {PIXI.RenderTarget} output - The output target.\n     */\n    apply(filterManager, input, output)\n    {\n        const renderTarget = filterManager.getRenderTarget(true);\n\n        this.blurXFilter.apply(filterManager, input, renderTarget, true);\n        this.blurYFilter.apply(filterManager, renderTarget, output, false);\n\n        filterManager.returnRenderTarget(renderTarget);\n    }\n\n    /**\n     * Sets the strength of both the blurX and blurY properties simultaneously\n     *\n     * @member {number}\n     * @default 2\n     */\n    get blur()\n    {\n        return this.blurXFilter.blur;\n    }\n\n    set blur(value) // eslint-disable-line require-jsdoc\n    {\n        this.blurXFilter.blur = this.blurYFilter.blur = value;\n        this.padding = Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength)) * 2;\n    }\n\n    /**\n     * Sets the number of passes for blur. More passes means higher quaility bluring.\n     *\n     * @member {number}\n     * @default 1\n     */\n    get quality()\n    {\n        return this.blurXFilter.quality;\n    }\n\n    set quality(value) // eslint-disable-line require-jsdoc\n    {\n        this.blurXFilter.quality = this.blurYFilter.quality = value;\n    }\n\n    /**\n     * Sets the strength of the blurX property\n     *\n     * @member {number}\n     * @default 2\n     */\n    get blurX()\n    {\n        return this.blurXFilter.blur;\n    }\n\n    set blurX(value) // eslint-disable-line require-jsdoc\n    {\n        this.blurXFilter.blur = value;\n        this.padding = Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength)) * 2;\n    }\n\n    /**\n     * Sets the strength of the blurY property\n     *\n     * @member {number}\n     * @default 2\n     */\n    get blurY()\n    {\n        return this.blurYFilter.blur;\n    }\n\n    set blurY(value) // eslint-disable-line require-jsdoc\n    {\n        this.blurYFilter.blur = value;\n        this.padding = Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength)) * 2;\n    }\n\n    /**\n     * Sets the blendmode of the filter\n     *\n     * @member {number}\n     * @default PIXI.BLEND_MODES.NORMAL\n     */\n    get blendMode()\n    {\n        return this.blurYFilter._blendMode;\n    }\n\n    set blendMode(value) // eslint-disable-line require-jsdoc\n    {\n        this.blurYFilter._blendMode = value;\n    }\n}\n","import * as core from '../../core';\nimport generateBlurVertSource from './generateBlurVertSource';\nimport generateBlurFragSource from './generateBlurFragSource';\nimport getMaxBlurKernelSize from './getMaxBlurKernelSize';\n\n/**\n * The BlurXFilter applies a horizontal Gaussian blur to an object.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class BlurXFilter extends core.Filter\n{\n    /**\n     * @param {number} strength - The strength of the blur filter.\n     * @param {number} quality - The quality of the blur filter.\n     * @param {number} resolution - The resolution of the blur filter.\n     * @param {number} [kernelSize=5] - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15.\n     */\n    constructor(strength, quality, resolution, kernelSize)\n    {\n        kernelSize = kernelSize || 5;\n        const vertSrc = generateBlurVertSource(kernelSize, true);\n        const fragSrc = generateBlurFragSource(kernelSize);\n\n        super(\n            // vertex shader\n            vertSrc,\n            // fragment shader\n            fragSrc\n        );\n\n        this.resolution = resolution || core.settings.RESOLUTION;\n\n        this._quality = 0;\n\n        this.quality = quality || 4;\n        this.strength = strength || 8;\n\n        this.firstRun = true;\n    }\n\n    /**\n     * Applies the filter.\n     *\n     * @param {PIXI.FilterManager} filterManager - The manager.\n     * @param {PIXI.RenderTarget} input - The input target.\n     * @param {PIXI.RenderTarget} output - The output target.\n     * @param {boolean} clear - Should the output be cleared before rendering?\n     */\n    apply(filterManager, input, output, clear)\n    {\n        if (this.firstRun)\n        {\n            const gl = filterManager.renderer.gl;\n            const kernelSize = getMaxBlurKernelSize(gl);\n\n            this.vertexSrc = generateBlurVertSource(kernelSize, true);\n            this.fragmentSrc = generateBlurFragSource(kernelSize);\n\n            this.firstRun = false;\n        }\n\n        this.uniforms.strength = (1 / output.size.width) * (output.size.width / input.size.width);\n\n        // screen space!\n        this.uniforms.strength *= this.strength;\n        this.uniforms.strength /= this.passes;// / this.passes//Math.pow(1, this.passes);\n\n        if (this.passes === 1)\n        {\n            filterManager.applyFilter(this, input, output, clear);\n        }\n        else\n        {\n            const renderTarget = filterManager.getRenderTarget(true);\n            let flip = input;\n            let flop = renderTarget;\n\n            for (let i = 0; i < this.passes - 1; i++)\n            {\n                filterManager.applyFilter(this, flip, flop, true);\n\n                const temp = flop;\n\n                flop = flip;\n                flip = temp;\n            }\n\n            filterManager.applyFilter(this, flip, output, clear);\n\n            filterManager.returnRenderTarget(renderTarget);\n        }\n    }\n\n    /**\n     * Sets the strength of both the blur.\n     *\n     * @member {number}\n     * @default 16\n     */\n    get blur()\n    {\n        return this.strength;\n    }\n\n    set blur(value) // eslint-disable-line require-jsdoc\n    {\n        this.padding = Math.abs(value) * 2;\n        this.strength = value;\n    }\n\n     /**\n     * Sets the quality of the blur by modifying the number of passes. More passes means higher\n     * quaility bluring but the lower the performance.\n     *\n     * @member {number}\n     * @default 4\n     */\n    get quality()\n    {\n        return this._quality;\n    }\n\n    set quality(value) // eslint-disable-line require-jsdoc\n    {\n        this._quality = value;\n        this.passes = value;\n    }\n}\n","import * as core from '../../core';\nimport generateBlurVertSource from './generateBlurVertSource';\nimport generateBlurFragSource from './generateBlurFragSource';\nimport getMaxBlurKernelSize from './getMaxBlurKernelSize';\n\n/**\n * The BlurYFilter applies a horizontal Gaussian blur to an object.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class BlurYFilter extends core.Filter\n{\n    /**\n     * @param {number} strength - The strength of the blur filter.\n     * @param {number} quality - The quality of the blur filter.\n     * @param {number} resolution - The resolution of the blur filter.\n     * @param {number} [kernelSize=5] - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15.\n     */\n    constructor(strength, quality, resolution, kernelSize)\n    {\n        kernelSize = kernelSize || 5;\n        const vertSrc = generateBlurVertSource(kernelSize, false);\n        const fragSrc = generateBlurFragSource(kernelSize);\n\n        super(\n            // vertex shader\n            vertSrc,\n            // fragment shader\n            fragSrc\n        );\n\n        this.resolution = resolution || core.settings.RESOLUTION;\n\n        this._quality = 0;\n\n        this.quality = quality || 4;\n        this.strength = strength || 8;\n\n        this.firstRun = true;\n    }\n\n    /**\n     * Applies the filter.\n     *\n     * @param {PIXI.FilterManager} filterManager - The manager.\n     * @param {PIXI.RenderTarget} input - The input target.\n     * @param {PIXI.RenderTarget} output - The output target.\n     * @param {boolean} clear - Should the output be cleared before rendering?\n     */\n    apply(filterManager, input, output, clear)\n    {\n        if (this.firstRun)\n        {\n            const gl = filterManager.renderer.gl;\n            const kernelSize = getMaxBlurKernelSize(gl);\n\n            this.vertexSrc = generateBlurVertSource(kernelSize, false);\n            this.fragmentSrc = generateBlurFragSource(kernelSize);\n\n            this.firstRun = false;\n        }\n\n        this.uniforms.strength = (1 / output.size.height) * (output.size.height / input.size.height);\n\n        this.uniforms.strength *= this.strength;\n        this.uniforms.strength /= this.passes;\n\n        if (this.passes === 1)\n        {\n            filterManager.applyFilter(this, input, output, clear);\n        }\n        else\n        {\n            const renderTarget = filterManager.getRenderTarget(true);\n            let flip = input;\n            let flop = renderTarget;\n\n            for (let i = 0; i < this.passes - 1; i++)\n            {\n                filterManager.applyFilter(this, flip, flop, true);\n\n                const temp = flop;\n\n                flop = flip;\n                flip = temp;\n            }\n\n            filterManager.applyFilter(this, flip, output, clear);\n\n            filterManager.returnRenderTarget(renderTarget);\n        }\n    }\n\n    /**\n     * Sets the strength of both the blur.\n     *\n     * @member {number}\n     * @default 2\n     */\n    get blur()\n    {\n        return this.strength;\n    }\n\n    set blur(value) // eslint-disable-line require-jsdoc\n    {\n        this.padding = Math.abs(value) * 2;\n        this.strength = value;\n    }\n\n    /**\n     * Sets the quality of the blur by modifying the number of passes. More passes means higher\n     * quaility bluring but the lower the performance.\n     *\n     * @member {number}\n     * @default 4\n     */\n    get quality()\n    {\n        return this._quality;\n    }\n\n    set quality(value) // eslint-disable-line require-jsdoc\n    {\n        this._quality = value;\n        this.passes = value;\n    }\n}\n","const GAUSSIAN_VALUES = {\n    5: [0.153388, 0.221461, 0.250301],\n    7: [0.071303, 0.131514, 0.189879, 0.214607],\n    9: [0.028532, 0.067234, 0.124009, 0.179044, 0.20236],\n    11: [0.0093, 0.028002, 0.065984, 0.121703, 0.175713, 0.198596],\n    13: [0.002406, 0.009255, 0.027867, 0.065666, 0.121117, 0.174868, 0.197641],\n    15: [0.000489, 0.002403, 0.009246, 0.02784, 0.065602, 0.120999, 0.174697, 0.197448],\n};\n\nconst fragTemplate = [\n    'varying vec2 vBlurTexCoords[%size%];',\n    'uniform sampler2D uSampler;',\n\n    'void main(void)',\n    '{',\n    '    gl_FragColor = vec4(0.0);',\n    '    %blur%',\n    '}',\n\n].join('\\n');\n\nexport default function generateFragBlurSource(kernelSize)\n{\n    const kernel = GAUSSIAN_VALUES[kernelSize];\n    const halfLength = kernel.length;\n\n    let fragSource = fragTemplate;\n\n    let blurLoop = '';\n    const template = 'gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;';\n    let value;\n\n    for (let i = 0; i < kernelSize; i++)\n    {\n        let blur = template.replace('%index%', i);\n\n        value = i;\n\n        if (i >= halfLength)\n        {\n            value = kernelSize - i - 1;\n        }\n\n        blur = blur.replace('%value%', kernel[value]);\n\n        blurLoop += blur;\n        blurLoop += '\\n';\n    }\n\n    fragSource = fragSource.replace('%blur%', blurLoop);\n    fragSource = fragSource.replace('%size%', kernelSize);\n\n    return fragSource;\n}\n","const vertTemplate = [\n    'attribute vec2 aVertexPosition;',\n    'attribute vec2 aTextureCoord;',\n\n    'uniform float strength;',\n    'uniform mat3 projectionMatrix;',\n\n    'varying vec2 vBlurTexCoords[%size%];',\n\n    'void main(void)',\n    '{',\n    'gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);',\n    '%blur%',\n    '}',\n].join('\\n');\n\nexport default function generateVertBlurSource(kernelSize, x)\n{\n    const halfLength = Math.ceil(kernelSize / 2);\n\n    let vertSource = vertTemplate;\n\n    let blurLoop = '';\n    let template;\n    // let value;\n\n    if (x)\n    {\n        template = 'vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);';\n    }\n    else\n    {\n        template = 'vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);';\n    }\n\n    for (let i = 0; i < kernelSize; i++)\n    {\n        let blur = template.replace('%index%', i);\n\n        // value = i;\n\n        // if(i >= halfLength)\n        // {\n        //     value = kernelSize - i - 1;\n        // }\n\n        blur = blur.replace('%sampleIndex%', `${i - (halfLength - 1)}.0`);\n\n        blurLoop += blur;\n        blurLoop += '\\n';\n    }\n\n    vertSource = vertSource.replace('%blur%', blurLoop);\n    vertSource = vertSource.replace('%size%', kernelSize);\n\n    return vertSource;\n}\n","export default function getMaxKernelSize(gl)\n{\n    const maxVaryings = (gl.getParameter(gl.MAX_VARYING_VECTORS));\n    let kernelSize = 15;\n\n    while (kernelSize > maxVaryings)\n    {\n        kernelSize -= 2;\n    }\n\n    return kernelSize;\n}\n","import * as core from '../../core';\nimport { readFileSync } from 'fs';\nimport { join } from 'path';\n\n/**\n * The ColorMatrixFilter class lets you apply a 5x4 matrix transformation on the RGBA\n * color and alpha values of every pixel on your displayObject to produce a result\n * with a new set of RGBA color and alpha values. It's pretty powerful!\n *\n * ```js\n *  let colorMatrix = new PIXI.ColorMatrixFilter();\n *  container.filters = [colorMatrix];\n *  colorMatrix.contrast(2);\n * ```\n * @author Clément Chenebault <clement@goodboydigital.com>\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class ColorMatrixFilter extends core.Filter\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        super(\n            // vertex shader\n            readFileSync(join(__dirname, '../fragments/default.vert'), 'utf8'),\n            // fragment shader\n            readFileSync(join(__dirname, './colorMatrix.frag'), 'utf8')\n        );\n\n        this.uniforms.m = [\n            1, 0, 0, 0, 0,\n            0, 1, 0, 0, 0,\n            0, 0, 1, 0, 0,\n            0, 0, 0, 1, 0];\n\n        this.alpha = 1;\n    }\n\n    /**\n     * Transforms current matrix and set the new one\n     *\n     * @param {number[]} matrix - 5x4 matrix\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    _loadMatrix(matrix, multiply = false)\n    {\n        let newMatrix = matrix;\n\n        if (multiply)\n        {\n            this._multiply(newMatrix, this.uniforms.m, matrix);\n            newMatrix = this._colorMatrix(newMatrix);\n        }\n\n        // set the new matrix\n        this.uniforms.m = newMatrix;\n    }\n\n    /**\n     * Multiplies two mat5's\n     *\n     * @private\n     * @param {number[]} out - 5x4 matrix the receiving matrix\n     * @param {number[]} a - 5x4 matrix the first operand\n     * @param {number[]} b - 5x4 matrix the second operand\n     * @returns {number[]} 5x4 matrix\n     */\n    _multiply(out, a, b)\n    {\n        // Red Channel\n        out[0] = (a[0] * b[0]) + (a[1] * b[5]) + (a[2] * b[10]) + (a[3] * b[15]);\n        out[1] = (a[0] * b[1]) + (a[1] * b[6]) + (a[2] * b[11]) + (a[3] * b[16]);\n        out[2] = (a[0] * b[2]) + (a[1] * b[7]) + (a[2] * b[12]) + (a[3] * b[17]);\n        out[3] = (a[0] * b[3]) + (a[1] * b[8]) + (a[2] * b[13]) + (a[3] * b[18]);\n        out[4] = (a[0] * b[4]) + (a[1] * b[9]) + (a[2] * b[14]) + (a[3] * b[19]) + a[4];\n\n        // Green Channel\n        out[5] = (a[5] * b[0]) + (a[6] * b[5]) + (a[7] * b[10]) + (a[8] * b[15]);\n        out[6] = (a[5] * b[1]) + (a[6] * b[6]) + (a[7] * b[11]) + (a[8] * b[16]);\n        out[7] = (a[5] * b[2]) + (a[6] * b[7]) + (a[7] * b[12]) + (a[8] * b[17]);\n        out[8] = (a[5] * b[3]) + (a[6] * b[8]) + (a[7] * b[13]) + (a[8] * b[18]);\n        out[9] = (a[5] * b[4]) + (a[6] * b[9]) + (a[7] * b[14]) + (a[8] * b[19]) + a[9];\n\n        // Blue Channel\n        out[10] = (a[10] * b[0]) + (a[11] * b[5]) + (a[12] * b[10]) + (a[13] * b[15]);\n        out[11] = (a[10] * b[1]) + (a[11] * b[6]) + (a[12] * b[11]) + (a[13] * b[16]);\n        out[12] = (a[10] * b[2]) + (a[11] * b[7]) + (a[12] * b[12]) + (a[13] * b[17]);\n        out[13] = (a[10] * b[3]) + (a[11] * b[8]) + (a[12] * b[13]) + (a[13] * b[18]);\n        out[14] = (a[10] * b[4]) + (a[11] * b[9]) + (a[12] * b[14]) + (a[13] * b[19]) + a[14];\n\n        // Alpha Channel\n        out[15] = (a[15] * b[0]) + (a[16] * b[5]) + (a[17] * b[10]) + (a[18] * b[15]);\n        out[16] = (a[15] * b[1]) + (a[16] * b[6]) + (a[17] * b[11]) + (a[18] * b[16]);\n        out[17] = (a[15] * b[2]) + (a[16] * b[7]) + (a[17] * b[12]) + (a[18] * b[17]);\n        out[18] = (a[15] * b[3]) + (a[16] * b[8]) + (a[17] * b[13]) + (a[18] * b[18]);\n        out[19] = (a[15] * b[4]) + (a[16] * b[9]) + (a[17] * b[14]) + (a[18] * b[19]) + a[19];\n\n        return out;\n    }\n\n    /**\n     * Create a Float32 Array and normalize the offset component to 0-1\n     *\n     * @private\n     * @param {number[]} matrix - 5x4 matrix\n     * @return {number[]} 5x4 matrix with all values between 0-1\n     */\n    _colorMatrix(matrix)\n    {\n        // Create a Float32 Array and normalize the offset component to 0-1\n        const m = new Float32Array(matrix);\n\n        m[4] /= 255;\n        m[9] /= 255;\n        m[14] /= 255;\n        m[19] /= 255;\n\n        return m;\n    }\n\n    /**\n     * Adjusts brightness\n     *\n     * @param {number} b - value of the brigthness (0-1, where 0 is black)\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    brightness(b, multiply)\n    {\n        const matrix = [\n            b, 0, 0, 0, 0,\n            0, b, 0, 0, 0,\n            0, 0, b, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Set the matrices in grey scales\n     *\n     * @param {number} scale - value of the grey (0-1, where 0 is black)\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    greyscale(scale, multiply)\n    {\n        const matrix = [\n            scale, scale, scale, 0, 0,\n            scale, scale, scale, 0, 0,\n            scale, scale, scale, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Set the black and white matrice.\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    blackAndWhite(multiply)\n    {\n        const matrix = [\n            0.3, 0.6, 0.1, 0, 0,\n            0.3, 0.6, 0.1, 0, 0,\n            0.3, 0.6, 0.1, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Set the hue property of the color\n     *\n     * @param {number} rotation - in degrees\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    hue(rotation, multiply)\n    {\n        rotation = (rotation || 0) / 180 * Math.PI;\n\n        const cosR = Math.cos(rotation);\n        const sinR = Math.sin(rotation);\n        const sqrt = Math.sqrt;\n\n        /* a good approximation for hue rotation\n         This matrix is far better than the versions with magic luminance constants\n         formerly used here, but also used in the starling framework (flash) and known from this\n         old part of the internet: quasimondo.com/archives/000565.php\n\n         This new matrix is based on rgb cube rotation in space. Look here for a more descriptive\n         implementation as a shader not a general matrix:\n         https://github.com/evanw/glfx.js/blob/58841c23919bd59787effc0333a4897b43835412/src/filters/adjust/huesaturation.js\n\n         This is the source for the code:\n         see http://stackoverflow.com/questions/8507885/shift-hue-of-an-rgb-color/8510751#8510751\n         */\n\n        const w = 1 / 3;\n        const sqrW = sqrt(w); // weight is\n\n        const a00 = cosR + ((1.0 - cosR) * w);\n        const a01 = (w * (1.0 - cosR)) - (sqrW * sinR);\n        const a02 = (w * (1.0 - cosR)) + (sqrW * sinR);\n\n        const a10 = (w * (1.0 - cosR)) + (sqrW * sinR);\n        const a11 = cosR + (w * (1.0 - cosR));\n        const a12 = (w * (1.0 - cosR)) - (sqrW * sinR);\n\n        const a20 = (w * (1.0 - cosR)) - (sqrW * sinR);\n        const a21 = (w * (1.0 - cosR)) + (sqrW * sinR);\n        const a22 = cosR + (w * (1.0 - cosR));\n\n        const matrix = [\n            a00, a01, a02, 0, 0,\n            a10, a11, a12, 0, 0,\n            a20, a21, a22, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Set the contrast matrix, increase the separation between dark and bright\n     * Increase contrast : shadows darker and highlights brighter\n     * Decrease contrast : bring the shadows up and the highlights down\n     *\n     * @param {number} amount - value of the contrast (0-1)\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    contrast(amount, multiply)\n    {\n        const v = (amount || 0) + 1;\n        const o = -0.5 * (v - 1);\n\n        const matrix = [\n            v, 0, 0, 0, o,\n            0, v, 0, 0, o,\n            0, 0, v, 0, o,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Set the saturation matrix, increase the separation between colors\n     * Increase saturation : increase contrast, brightness, and sharpness\n     *\n     * @param {number} amount - The saturation amount (0-1)\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    saturate(amount = 0, multiply)\n    {\n        const x = (amount * 2 / 3) + 1;\n        const y = ((x - 1) * -0.5);\n\n        const matrix = [\n            x, y, y, 0, 0,\n            y, x, y, 0, 0,\n            y, y, x, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Desaturate image (remove color)\n     *\n     * Call the saturate function\n     *\n     */\n    desaturate() // eslint-disable-line no-unused-vars\n    {\n        this.saturate(-1);\n    }\n\n    /**\n     * Negative image (inverse of classic rgb matrix)\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    negative(multiply)\n    {\n        const matrix = [\n            0, 1, 1, 0, 0,\n            1, 0, 1, 0, 0,\n            1, 1, 0, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Sepia image\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    sepia(multiply)\n    {\n        const matrix = [\n            0.393, 0.7689999, 0.18899999, 0, 0,\n            0.349, 0.6859999, 0.16799999, 0, 0,\n            0.272, 0.5339999, 0.13099999, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Color motion picture process invented in 1916 (thanks Dominic Szablewski)\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    technicolor(multiply)\n    {\n        const matrix = [\n            1.9125277891456083, -0.8545344976951645, -0.09155508482755585, 0, 11.793603434377337,\n            -0.3087833385928097, 1.7658908555458428, -0.10601743074722245, 0, -70.35205161461398,\n            -0.231103377548616, -0.7501899197440212, 1.847597816108189, 0, 30.950940869491138,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Polaroid filter\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    polaroid(multiply)\n    {\n        const matrix = [\n            1.438, -0.062, -0.062, 0, 0,\n            -0.122, 1.378, -0.122, 0, 0,\n            -0.016, -0.016, 1.483, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Filter who transforms : Red -> Blue and Blue -> Red\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    toBGR(multiply)\n    {\n        const matrix = [\n            0, 0, 1, 0, 0,\n            0, 1, 0, 0, 0,\n            1, 0, 0, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Color reversal film introduced by Eastman Kodak in 1935. (thanks Dominic Szablewski)\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    kodachrome(multiply)\n    {\n        const matrix = [\n            1.1285582396593525, -0.3967382283601348, -0.03992559172921793, 0, 63.72958762196502,\n            -0.16404339962244616, 1.0835251566291304, -0.05498805115633132, 0, 24.732407896706203,\n            -0.16786010706155763, -0.5603416277695248, 1.6014850761964943, 0, 35.62982807460946,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Brown delicious browni filter (thanks Dominic Szablewski)\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    browni(multiply)\n    {\n        const matrix = [\n            0.5997023498159715, 0.34553243048391263, -0.2708298674538042, 0, 47.43192855600873,\n            -0.037703249837783157, 0.8609577587992641, 0.15059552388459913, 0, -36.96841498319127,\n            0.24113635128153335, -0.07441037908422492, 0.44972182064877153, 0, -7.562075277591283,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Vintage filter (thanks Dominic Szablewski)\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    vintage(multiply)\n    {\n        const matrix = [\n            0.6279345635605994, 0.3202183420819367, -0.03965408211312453, 0, 9.651285835294123,\n            0.02578397704808868, 0.6441188644374771, 0.03259127616149294, 0, 7.462829176470591,\n            0.0466055556782719, -0.0851232987247891, 0.5241648018700465, 0, 5.159190588235296,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * We don't know exactly what it does, kind of gradient map, but funny to play with!\n     *\n     * @param {number} desaturation - Tone values.\n     * @param {number} toned - Tone values.\n     * @param {string} lightColor - Tone values, example: `0xFFE580`\n     * @param {string} darkColor - Tone values, example: `0xFFE580`\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    colorTone(desaturation, toned, lightColor, darkColor, multiply)\n    {\n        desaturation = desaturation || 0.2;\n        toned = toned || 0.15;\n        lightColor = lightColor || 0xFFE580;\n        darkColor = darkColor || 0x338000;\n\n        const lR = ((lightColor >> 16) & 0xFF) / 255;\n        const lG = ((lightColor >> 8) & 0xFF) / 255;\n        const lB = (lightColor & 0xFF) / 255;\n\n        const dR = ((darkColor >> 16) & 0xFF) / 255;\n        const dG = ((darkColor >> 8) & 0xFF) / 255;\n        const dB = (darkColor & 0xFF) / 255;\n\n        const matrix = [\n            0.3, 0.59, 0.11, 0, 0,\n            lR, lG, lB, desaturation, 0,\n            dR, dG, dB, toned, 0,\n            lR - dR, lG - dG, lB - dB, 0, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Night effect\n     *\n     * @param {number} intensity - The intensity of the night effect.\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    night(intensity, multiply)\n    {\n        intensity = intensity || 0.1;\n        const matrix = [\n            intensity * (-2.0), -intensity, 0, 0, 0,\n            -intensity, 0, intensity, 0, 0,\n            0, intensity, intensity * 2.0, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Predator effect\n     *\n     * Erase the current matrix by setting a new indepent one\n     *\n     * @param {number} amount - how much the predator feels his future victim\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    predator(amount, multiply)\n    {\n        const matrix = [\n            // row 1\n            11.224130630493164 * amount,\n            -4.794486999511719 * amount,\n            -2.8746118545532227 * amount,\n            0 * amount,\n            0.40342438220977783 * amount,\n            // row 2\n            -3.6330697536468506 * amount,\n            9.193157196044922 * amount,\n            -2.951810836791992 * amount,\n            0 * amount,\n            -1.316135048866272 * amount,\n            // row 3\n            -3.2184197902679443 * amount,\n            -4.2375030517578125 * amount,\n            7.476448059082031 * amount,\n            0 * amount,\n            0.8044459223747253 * amount,\n            // row 4\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * LSD effect\n     *\n     * Multiply the current matrix\n     *\n     * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n     *  just set the current matrix with @param matrix\n     */\n    lsd(multiply)\n    {\n        const matrix = [\n            2, -0.4, 0.5, 0, 0,\n            -0.5, 2, -0.4, 0, 0,\n            -0.4, -0.5, 3, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, multiply);\n    }\n\n    /**\n     * Erase the current matrix by setting the default one\n     *\n     */\n    reset()\n    {\n        const matrix = [\n            1, 0, 0, 0, 0,\n            0, 1, 0, 0, 0,\n            0, 0, 1, 0, 0,\n            0, 0, 0, 1, 0,\n        ];\n\n        this._loadMatrix(matrix, false);\n    }\n\n    /**\n     * The matrix of the color matrix filter\n     *\n     * @member {number[]}\n     * @default [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]\n     */\n    get matrix()\n    {\n        return this.uniforms.m;\n    }\n\n    set matrix(value) // eslint-disable-line require-jsdoc\n    {\n        this.uniforms.m = value;\n    }\n\n    /**\n     * The opacity value to use when mixing the original and resultant colors.\n     *\n     * When the value is 0, the original color is used without modification.\n     * When the value is 1, the result color is used.\n     * When in the range (0, 1) the color is interpolated between the original and result by this amount.\n     *\n     * @member {number}\n     * @default 1\n     */\n    get alpha()\n    {\n        return this.uniforms.uAlpha;\n    }\n\n    set alpha(value) // eslint-disable-line require-jsdoc\n    {\n        this.uniforms.uAlpha = value;\n    }\n}\n\n// Americanized alias\nColorMatrixFilter.prototype.grayscale = ColorMatrixFilter.prototype.greyscale;\n","import * as core from '../../core';\nimport { readFileSync } from 'fs';\nimport { join } from 'path';\n\n/**\n * The DisplacementFilter class uses the pixel values from the specified texture\n * (called the displacement map) to perform a displacement of an object. You can\n * use this filter to apply all manor of crazy warping effects. Currently the r\n * property of the texture is used to offset the x and the g property of the texture\n * is used to offset the y.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class DisplacementFilter extends core.Filter\n{\n    /**\n     * @param {PIXI.Sprite} sprite - The sprite used for the displacement map. (make sure its added to the scene!)\n     * @param {number} scale - The scale of the displacement\n     */\n    constructor(sprite, scale)\n    {\n        const maskMatrix = new core.Matrix();\n\n        sprite.renderable = false;\n\n        super(\n            // vertex shader\n            readFileSync(join(__dirname, '../fragments/default-filter-matrix.vert'), 'utf8'),\n            // fragment shader\n            readFileSync(join(__dirname, './displacement.frag'), 'utf8')\n        );\n\n        this.maskSprite = sprite;\n        this.maskMatrix = maskMatrix;\n\n        this.uniforms.mapSampler = sprite._texture;\n        this.uniforms.filterMatrix = maskMatrix;\n        this.uniforms.scale = { x: 1, y: 1 };\n\n        if (scale === null || scale === undefined)\n        {\n            scale = 20;\n        }\n\n        this.scale = new core.Point(scale, scale);\n    }\n\n    /**\n     * Applies the filter.\n     *\n     * @param {PIXI.FilterManager} filterManager - The manager.\n     * @param {PIXI.RenderTarget} input - The input target.\n     * @param {PIXI.RenderTarget} output - The output target.\n     */\n    apply(filterManager, input, output)\n    {\n        const ratio =  (1 / output.destinationFrame.width) * (output.size.width / input.size.width);\n\n        this.uniforms.filterMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, this.maskSprite);\n        this.uniforms.scale.x = this.scale.x * ratio;\n        this.uniforms.scale.y = this.scale.y * ratio;\n\n         // draw the filter...\n        filterManager.applyFilter(this, input, output);\n    }\n\n    /**\n     * The texture used for the displacement map. Must be power of 2 sized texture.\n     *\n     * @member {PIXI.Texture}\n     */\n    get map()\n    {\n        return this.uniforms.mapSampler;\n    }\n\n    set map(value) // eslint-disable-line require-jsdoc\n    {\n        this.uniforms.mapSampler = value;\n    }\n}\n","import * as core from '../../core';\nimport { readFileSync } from 'fs';\nimport { join } from 'path';\n\n/**\n *\n * Basic FXAA implementation based on the code on geeks3d.com with the\n * modification that the texture2DLod stuff was removed since it's\n * unsupported by WebGL.\n *\n * @see https://github.com/mitsuhiko/webgl-meincraft\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n *\n */\nexport default class FXAAFilter extends core.Filter\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        // TODO - needs work\n        super(\n            // vertex shader\n            readFileSync(join(__dirname, './fxaa.vert'), 'utf8'),\n            // fragment shader\n            readFileSync(join(__dirname, './fxaa.frag'), 'utf8')\n        );\n    }\n}\n","/**\n * This namespace contains WebGL-only display filters that can be applied\n * to DisplayObjects using the {@link PIXI.DisplayObject#filters filters} property.\n * @example\n * // Create a new application\n * const app = new PIXI.Application();\n *\n * // Draw a green rectangle\n * const rect = new PIXI.Graphics()\n *     .beginFill(0x00ff00)\n *     .drawRect(40, 40, 200, 200);\n *\n * // Add a blur filter\n * rect.filters = [new PIXI.filters.BlurFilter()];\n *\n * // Display rectangle\n * app.stage.addChild(rect);\n * document.body.appendChild(app.view);\n * @namespace PIXI.filters\n */\nexport { default as FXAAFilter } from './fxaa/FXAAFilter';\nexport { default as NoiseFilter } from './noise/NoiseFilter';\nexport { default as DisplacementFilter } from './displacement/DisplacementFilter';\nexport { default as BlurFilter } from './blur/BlurFilter';\nexport { default as BlurXFilter } from './blur/BlurXFilter';\nexport { default as BlurYFilter } from './blur/BlurYFilter';\nexport { default as ColorMatrixFilter } from './colormatrix/ColorMatrixFilter';\nexport { default as VoidFilter } from './void/VoidFilter';\n","import * as core from '../../core';\nimport { readFileSync } from 'fs';\nimport { join } from 'path';\n\n/**\n * @author Vico @vicocotea\n * original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js\n */\n\n/**\n * A Noise effect filter.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class NoiseFilter extends core.Filter\n{\n    /**\n     * @param {number} noise - The noise intensity, should be a normalized value in the range [0, 1].\n     * @param {number} seed - A random seed for the noise generation. Default is `Math.random()`.\n     */\n    constructor(noise = 0.5, seed = Math.random())\n    {\n        super(\n            // vertex shader\n            readFileSync(join(__dirname, '../fragments/default.vert'), 'utf8'),\n            // fragment shader\n            readFileSync(join(__dirname, './noise.frag'), 'utf8')\n        );\n\n        this.noise = noise;\n        this.seed = seed;\n    }\n\n    /**\n     * The amount of noise to apply, this value should be in the range (0, 1].\n     *\n     * @member {number}\n     * @default 0.5\n     */\n    get noise()\n    {\n        return this.uniforms.uNoise;\n    }\n\n    set noise(value) // eslint-disable-line require-jsdoc\n    {\n        this.uniforms.uNoise = value;\n    }\n\n    /**\n     * A seed value to apply to the random noise generation. `Math.random()` is a good value to use.\n     *\n     * @member {number}\n     */\n    get seed()\n    {\n        return this.uniforms.uSeed;\n    }\n\n    set seed(value) // eslint-disable-line require-jsdoc\n    {\n        this.uniforms.uSeed = value;\n    }\n}\n","import * as core from '../../core';\nimport { readFileSync } from 'fs';\nimport { join } from 'path';\n\n/**\n * Does nothing. Very handy.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class VoidFilter extends core.Filter\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        super(\n            // vertex shader\n            readFileSync(join(__dirname, '../fragments/default.vert'), 'utf8'),\n            // fragment shader\n            readFileSync(join(__dirname, './void.frag'), 'utf8')\n        );\n\n        this.glShaderKey = 'void';\n    }\n}\n","import * as core from '../core';\n\n/**\n * Holds all information related to an Interaction event\n *\n * @class\n * @memberof PIXI.interaction\n */\nexport default class InteractionData\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        /**\n         * This point stores the global coords of where the touch/mouse event happened\n         *\n         * @member {PIXI.Point}\n         */\n        this.global = new core.Point();\n\n        /**\n         * The target DisplayObject that was interacted with\n         *\n         * @member {PIXI.DisplayObject}\n         */\n        this.target = null;\n\n        /**\n         * When passed to an event handler, this will be the original DOM Event that was captured\n         *\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent\n         * @member {MouseEvent|TouchEvent|PointerEvent}\n         */\n        this.originalEvent = null;\n\n        /**\n         * Unique identifier for this interaction\n         *\n         * @member {number}\n         */\n        this.identifier = null;\n\n        /**\n         * Indicates whether or not the pointer device that created the event is the primary pointer.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary\n         * @type {Boolean}\n         */\n        this.isPrimary = false;\n\n        /**\n         * Indicates which button was pressed on the mouse or pointer device to trigger the event.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n         * @type {number}\n         */\n        this.button = 0;\n\n        /**\n         * Indicates which buttons are pressed on the mouse or pointer device when the event is triggered.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons\n         * @type {number}\n         */\n        this.buttons = 0;\n\n        /**\n         * The width of the pointer's contact along the x-axis, measured in CSS pixels.\n         * radiusX of TouchEvents will be represented by this value.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width\n         * @type {number}\n         */\n        this.width = 0;\n\n        /**\n         * The height of the pointer's contact along the y-axis, measured in CSS pixels.\n         * radiusY of TouchEvents will be represented by this value.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height\n         * @type {number}\n         */\n        this.height = 0;\n\n        /**\n         * The angle, in degrees, between the pointer device and the screen.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX\n         * @type {number}\n         */\n        this.tiltX = 0;\n\n        /**\n         * The angle, in degrees, between the pointer device and the screen.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY\n         * @type {number}\n         */\n        this.tiltY = 0;\n\n        /**\n         * The type of pointer that triggered the event.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType\n         * @type {string}\n         */\n        this.pointerType = null;\n\n        /**\n         * Pressure applied by the pointing device during the event. A Touch's force property\n         * will be represented by this value.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure\n         * @type {number}\n         */\n        this.pressure = 0;\n\n        /**\n         * From TouchEvents (not PointerEvents triggered by touches), the rotationAngle of the Touch.\n         * @see https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle\n         * @type {number}\n         */\n        this.rotationAngle = 0;\n\n        /**\n         * Twist of a stylus pointer.\n         * @see https://w3c.github.io/pointerevents/#pointerevent-interface\n         * @type {number}\n         */\n        this.twist = 0;\n\n        /**\n         * Barrel pressure on a stylus pointer.\n         * @see https://w3c.github.io/pointerevents/#pointerevent-interface\n         * @type {number}\n         */\n        this.tangentialPressure = 0;\n    }\n\n    /**\n     * The unique identifier of the pointer. It will be the same as `identifier`.\n     * @readonly\n     * @member {number}\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId\n     */\n    get pointerId()\n    {\n        return this.identifier;\n    }\n\n    /**\n     * This will return the local coordinates of the specified displayObject for this InteractionData\n     *\n     * @param {PIXI.DisplayObject} displayObject - The DisplayObject that you would like the local\n     *  coords off\n     * @param {PIXI.Point} [point] - A Point object in which to store the value, optional (otherwise\n     *  will create a new point)\n     * @param {PIXI.Point} [globalPos] - A Point object containing your custom global coords, optional\n     *  (otherwise will use the current global coords)\n     * @return {PIXI.Point} A point containing the coordinates of the InteractionData position relative\n     *  to the DisplayObject\n     */\n    getLocalPosition(displayObject, point, globalPos)\n    {\n        return displayObject.worldTransform.applyInverse(globalPos || this.global, point);\n    }\n\n    /**\n     * Copies properties from normalized event data.\n     *\n     * @param {Touch|MouseEvent|PointerEvent} event The normalized event data\n     * @private\n     */\n    _copyEvent(event)\n    {\n        // isPrimary should only change on touchstart/pointerdown, so we don't want to overwrite\n        // it with \"false\" on later events when our shim for it on touch events might not be\n        // accurate\n        if (event.isPrimary)\n        {\n            this.isPrimary = true;\n        }\n        this.button = event.button;\n        this.buttons = event.buttons;\n        this.width = event.width;\n        this.height = event.height;\n        this.tiltX = event.tiltX;\n        this.tiltY = event.tiltY;\n        this.pointerType = event.pointerType;\n        this.pressure = event.pressure;\n        this.rotationAngle = event.rotationAngle;\n        this.twist = event.twist || 0;\n        this.tangentialPressure = event.tangentialPressure || 0;\n    }\n\n    /**\n     * Resets the data for pooling.\n     *\n     * @private\n     */\n    _reset()\n    {\n        // isPrimary is the only property that we really need to reset - everything else is\n        // guaranteed to be overwritten\n        this.isPrimary = false;\n    }\n}\n","/**\n * Event class that mimics native DOM events.\n *\n * @class\n * @memberof PIXI.interaction\n */\nexport default class InteractionEvent\n{\n    /**\n     *\n     */\n    constructor()\n    {\n        /**\n         * Whether this event will continue propagating in the tree\n         *\n         * @member {boolean}\n         */\n        this.stopped = false;\n\n        /**\n         * The object which caused this event to be dispatched.\n         * For listener callback see {@link PIXI.interaction.InteractionEvent.currentTarget}.\n         *\n         * @member {PIXI.DisplayObject}\n         */\n        this.target = null;\n\n        /**\n         * The object whose event listener’s callback is currently being invoked.\n         *\n         * @member {PIXI.DisplayObject}\n         */\n        this.currentTarget = null;\n\n        /**\n         * Type of the event\n         *\n         * @member {string}\n         */\n        this.type = null;\n\n        /**\n         * InteractionData related to this event\n         *\n         * @member {PIXI.interaction.InteractionData}\n         */\n        this.data = null;\n    }\n\n    /**\n     * Prevents event from reaching any objects other than the current object.\n     *\n     */\n    stopPropagation()\n    {\n        this.stopped = true;\n    }\n\n    /**\n     * Resets the event.\n     *\n     * @private\n     */\n    _reset()\n    {\n        this.stopped = false;\n        this.currentTarget = null;\n        this.target = null;\n    }\n}\n","import * as core from '../core';\nimport InteractionData from './InteractionData';\nimport InteractionEvent from './InteractionEvent';\nimport InteractionTrackingData from './InteractionTrackingData';\nimport EventEmitter from 'eventemitter3';\nimport interactiveTarget from './interactiveTarget';\n\n// Mix interactiveTarget into core.DisplayObject.prototype, after deprecation has been handled\ncore.utils.mixins.delayMixin(\n    core.DisplayObject.prototype,\n    interactiveTarget\n);\n\nconst MOUSE_POINTER_ID = 'MOUSE';\n\n// helpers for hitTest() - only used inside hitTest()\nconst hitTestEvent = {\n    target: null,\n    data: {\n        global: null,\n    },\n};\n\n/**\n * The interaction manager deals with mouse, touch and pointer events. Any DisplayObject can be interactive\n * if its interactive parameter is set to true\n * This manager also supports multitouch.\n *\n * An instance of this class is automatically created by default, and can be found at renderer.plugins.interaction\n *\n * @class\n * @extends EventEmitter\n * @memberof PIXI.interaction\n */\nexport default class InteractionManager extends EventEmitter\n{\n    /**\n     * @param {PIXI.CanvasRenderer|PIXI.WebGLRenderer} renderer - A reference to the current renderer\n     * @param {object} [options] - The options for the manager.\n     * @param {boolean} [options.autoPreventDefault=true] - Should the manager automatically prevent default browser actions.\n     * @param {number} [options.interactionFrequency=10] - Frequency increases the interaction events will be checked.\n     */\n    constructor(renderer, options)\n    {\n        super();\n\n        options = options || {};\n\n        /**\n         * The renderer this interaction manager works for.\n         *\n         * @member {PIXI.SystemRenderer}\n         */\n        this.renderer = renderer;\n\n        /**\n         * Should default browser actions automatically be prevented.\n         * Does not apply to pointer events for backwards compatibility\n         * preventDefault on pointer events stops mouse events from firing\n         * Thus, for every pointer event, there will always be either a mouse of touch event alongside it.\n         *\n         * @member {boolean}\n         * @default true\n         */\n        this.autoPreventDefault = options.autoPreventDefault !== undefined ? options.autoPreventDefault : true;\n\n        /**\n         * Frequency in milliseconds that the mousemove, moveover & mouseout interaction events will be checked.\n         *\n         * @member {number}\n         * @default 10\n         */\n        this.interactionFrequency = options.interactionFrequency || 10;\n\n        /**\n         * The mouse data\n         *\n         * @member {PIXI.interaction.InteractionData}\n         */\n        this.mouse = new InteractionData();\n        this.mouse.identifier = MOUSE_POINTER_ID;\n\n        // setting the mouse to start off far off screen will mean that mouse over does\n        //  not get called before we even move the mouse.\n        this.mouse.global.set(-999999);\n\n        /**\n         * Actively tracked InteractionData\n         *\n         * @private\n         * @member {Object.<number,PIXI.interation.InteractionData>}\n         */\n        this.activeInteractionData = {};\n        this.activeInteractionData[MOUSE_POINTER_ID] = this.mouse;\n\n        /**\n         * Pool of unused InteractionData\n         *\n         * @private\n         * @member {PIXI.interation.InteractionData[]}\n         */\n        this.interactionDataPool = [];\n\n        /**\n         * An event data object to handle all the event tracking/dispatching\n         *\n         * @member {object}\n         */\n        this.eventData = new InteractionEvent();\n\n        /**\n         * The DOM element to bind to.\n         *\n         * @private\n         * @member {HTMLElement}\n         */\n        this.interactionDOMElement = null;\n\n        /**\n         * This property determines if mousemove and touchmove events are fired only when the cursor\n         * is over the object.\n         * Setting to true will make things work more in line with how the DOM verison works.\n         * Setting to false can make things easier for things like dragging\n         * It is currently set to false as this is how PixiJS used to work. This will be set to true in\n         * future versions of pixi.\n         *\n         * @member {boolean}\n         * @default false\n         */\n        this.moveWhenInside = false;\n\n        /**\n         * Have events been attached to the dom element?\n         *\n         * @private\n         * @member {boolean}\n         */\n        this.eventsAdded = false;\n\n        /**\n         * Is the mouse hovering over the renderer?\n         *\n         * @private\n         * @member {boolean}\n         */\n        this.mouseOverRenderer = false;\n\n        /**\n         * Does the device support touch events\n         * https://www.w3.org/TR/touch-events/\n         *\n         * @readonly\n         * @member {boolean}\n         */\n        this.supportsTouchEvents = 'ontouchstart' in window;\n\n        /**\n         * Does the device support pointer events\n         * https://www.w3.org/Submission/pointer-events/\n         *\n         * @readonly\n         * @member {boolean}\n         */\n        this.supportsPointerEvents = !!window.PointerEvent;\n\n        // this will make it so that you don't have to call bind all the time\n\n        /**\n         * @private\n         * @member {Function}\n         */\n        this.onPointerUp = this.onPointerUp.bind(this);\n        this.processPointerUp = this.processPointerUp.bind(this);\n\n        /**\n         * @private\n         * @member {Function}\n         */\n        this.onPointerCancel = this.onPointerCancel.bind(this);\n        this.processPointerCancel = this.processPointerCancel.bind(this);\n\n        /**\n         * @private\n         * @member {Function}\n         */\n        this.onPointerDown = this.onPointerDown.bind(this);\n        this.processPointerDown = this.processPointerDown.bind(this);\n\n        /**\n         * @private\n         * @member {Function}\n         */\n        this.onPointerMove = this.onPointerMove.bind(this);\n        this.processPointerMove = this.processPointerMove.bind(this);\n\n        /**\n         * @private\n         * @member {Function}\n         */\n        this.onPointerOut = this.onPointerOut.bind(this);\n        this.processPointerOverOut = this.processPointerOverOut.bind(this);\n\n        /**\n         * @private\n         * @member {Function}\n         */\n        this.onPointerOver = this.onPointerOver.bind(this);\n\n        /**\n         * Dictionary of how different cursor modes are handled. Strings are handled as CSS cursor\n         * values, objects are handled as dictionaries of CSS values for interactionDOMElement,\n         * and functions are called instead of changing the CSS.\n         * Default CSS cursor values are provided for 'default' and 'pointer' modes.\n         * @member {Object.<string, (string|Function|Object.<string, string>)>}\n         */\n        this.cursorStyles = {\n            default: 'inherit',\n            pointer: 'pointer',\n        };\n\n        /**\n         * The mode of the cursor that is being used.\n         * The value of this is a key from the cursorStyles dictionary.\n         *\n         * @member {string}\n         */\n        this.currentCursorMode = null;\n\n        /**\n         * Internal cached let.\n         *\n         * @private\n         * @member {string}\n         */\n        this.cursor = null;\n\n        /**\n         * Internal cached let.\n         *\n         * @private\n         * @member {PIXI.Point}\n         */\n        this._tempPoint = new core.Point();\n\n        /**\n         * The current resolution / device pixel ratio.\n         *\n         * @member {number}\n         * @default 1\n         */\n        this.resolution = 1;\n\n        this.setTargetElement(this.renderer.view, this.renderer.resolution);\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is pressed on the display\n         * object.\n         *\n         * @event PIXI.interaction.InteractionManager#mousedown\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is pressed\n         * on the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#rightdown\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is released over the display\n         * object.\n         *\n         * @event PIXI.interaction.InteractionManager#mouseup\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is released\n         * over the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#rightup\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is pressed and released on\n         * the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#click\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is pressed\n         * and released on the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#rightclick\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is released outside the\n         * display object that initially registered a\n         * [mousedown]{@link PIXI.interaction.InteractionManager#event:mousedown}.\n         *\n         * @event PIXI.interaction.InteractionManager#mouseupoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is released\n         * outside the display object that initially registered a\n         * [rightdown]{@link PIXI.interaction.InteractionManager#event:rightdown}.\n         *\n         * @event PIXI.interaction.InteractionManager#rightupoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device (usually a mouse) is moved while over the display object\n         *\n         * @event PIXI.interaction.InteractionManager#mousemove\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device (usually a mouse) is moved onto the display object\n         *\n         * @event PIXI.interaction.InteractionManager#mouseover\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device (usually a mouse) is moved off the display object\n         *\n         * @event PIXI.interaction.InteractionManager#mouseout\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is pressed on the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#pointerdown\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is released over the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#pointerup\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when the operating system cancels a pointer event\n         *\n         * @event PIXI.interaction.InteractionManager#pointercancel\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is pressed and released on the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#pointertap\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is released outside the display object that initially\n         * registered a [pointerdown]{@link PIXI.interaction.InteractionManager#event:pointerdown}.\n         *\n         * @event PIXI.interaction.InteractionManager#pointerupoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device is moved while over the display object\n         *\n         * @event PIXI.interaction.InteractionManager#pointermove\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device is moved onto the display object\n         *\n         * @event PIXI.interaction.InteractionManager#pointerover\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device is moved off the display object\n         *\n         * @event PIXI.interaction.InteractionManager#pointerout\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is placed on the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#touchstart\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is removed from the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#touchend\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when the operating system cancels a touch\n         *\n         * @event PIXI.interaction.InteractionManager#touchcancel\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is placed and removed from the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#tap\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is removed outside of the display object that initially\n         * registered a [touchstart]{@link PIXI.interaction.InteractionManager#event:touchstart}.\n         *\n         * @event PIXI.interaction.InteractionManager#touchendoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is moved along the display object.\n         *\n         * @event PIXI.interaction.InteractionManager#touchmove\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is pressed on the display.\n         * object. DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#mousedown\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is pressed\n         * on the display object. DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#rightdown\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is released over the display\n         * object. DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#mouseup\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is released\n         * over the display object. DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#rightup\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is pressed and released on\n         * the display object. DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#click\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is pressed\n         * and released on the display object. DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#rightclick\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button (usually a mouse left-button) is released outside the\n         * display object that initially registered a\n         * [mousedown]{@link PIXI.DisplayObject#event:mousedown}.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#mouseupoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device secondary button (usually a mouse right-button) is released\n         * outside the display object that initially registered a\n         * [rightdown]{@link PIXI.DisplayObject#event:rightdown}.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#rightupoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device (usually a mouse) is moved while over the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#mousemove\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device (usually a mouse) is moved onto the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#mouseover\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device (usually a mouse) is moved off the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#mouseout\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is pressed on the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointerdown\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is released over the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointerup\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when the operating system cancels a pointer event.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointercancel\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is pressed and released on the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointertap\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device button is released outside the display object that initially\n         * registered a [pointerdown]{@link PIXI.DisplayObject#event:pointerdown}.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointerupoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device is moved while over the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointermove\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device is moved onto the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointerover\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a pointer device is moved off the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#pointerout\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is placed on the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#touchstart\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is removed from the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#touchend\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when the operating system cancels a touch.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#touchcancel\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is placed and removed from the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#tap\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is removed outside of the display object that initially\n         * registered a [touchstart]{@link PIXI.DisplayObject#event:touchstart}.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#touchendoutside\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n\n        /**\n         * Fired when a touch point is moved along the display object.\n         * DisplayObject's `interactive` property must be set to `true` to fire event.\n         *\n         * @event PIXI.DisplayObject#touchmove\n         * @param {PIXI.interaction.InteractionEvent} event - Interaction event\n         */\n    }\n\n    /**\n     * Hit tests a point against the display tree, returning the first interactive object that is hit.\n     *\n     * @param {PIXI.Point} globalPoint - A point to hit test with, in global space.\n     * @param {PIXI.Container} [root] - The root display object to start from. If omitted, defaults\n     * to the last rendered root of the associated renderer.\n     * @return {PIXI.DisplayObject} The hit display object, if any.\n     */\n    hitTest(globalPoint, root)\n    {\n        // clear the target for our hit test\n        hitTestEvent.target = null;\n        // assign the global point\n        hitTestEvent.data.global = globalPoint;\n        // ensure safety of the root\n        if (!root)\n        {\n            root = this.renderer._lastObjectRendered;\n        }\n        // run the hit test\n        this.processInteractive(hitTestEvent, root, null, true);\n        // return our found object - it'll be null if we didn't hit anything\n\n        return hitTestEvent.target;\n    }\n\n    /**\n     * Sets the DOM element which will receive mouse/touch events. This is useful for when you have\n     * other DOM elements on top of the renderers Canvas element. With this you'll be bale to deletegate\n     * another DOM element to receive those events.\n     *\n     * @param {HTMLCanvasElement} element - the DOM element which will receive mouse and touch events.\n     * @param {number} [resolution=1] - The resolution / device pixel ratio of the new element (relative to the canvas).\n     * @private\n     */\n    setTargetElement(element, resolution = 1)\n    {\n        this.removeEvents();\n\n        this.interactionDOMElement = element;\n\n        this.resolution = resolution;\n\n        this.addEvents();\n    }\n\n    /**\n     * Registers all the DOM events\n     *\n     * @private\n     */\n    addEvents()\n    {\n        if (!this.interactionDOMElement)\n        {\n            return;\n        }\n\n        core.ticker.shared.add(this.update, this, core.UPDATE_PRIORITY.INTERACTION);\n\n        if (window.navigator.msPointerEnabled)\n        {\n            this.interactionDOMElement.style['-ms-content-zooming'] = 'none';\n            this.interactionDOMElement.style['-ms-touch-action'] = 'none';\n        }\n        else if (this.supportsPointerEvents)\n        {\n            this.interactionDOMElement.style['touch-action'] = 'none';\n        }\n\n        /**\n         * These events are added first, so that if pointer events are normalised, they are fired\n         * in the same order as non-normalised events. ie. pointer event 1st, mouse / touch 2nd\n         */\n        if (this.supportsPointerEvents)\n        {\n            window.document.addEventListener('pointermove', this.onPointerMove, true);\n            this.interactionDOMElement.addEventListener('pointerdown', this.onPointerDown, true);\n            // pointerout is fired in addition to pointerup (for touch events) and pointercancel\n            // we already handle those, so for the purposes of what we do in onPointerOut, we only\n            // care about the pointerleave event\n            this.interactionDOMElement.addEventListener('pointerleave', this.onPointerOut, true);\n            this.interactionDOMElement.addEventListener('pointerover', this.onPointerOver, true);\n            window.addEventListener('pointercancel', this.onPointerCancel, true);\n            window.addEventListener('pointerup', this.onPointerUp, true);\n        }\n        else\n        {\n            window.document.addEventListener('mousemove', this.onPointerMove, true);\n            this.interactionDOMElement.addEventListener('mousedown', this.onPointerDown, true);\n            this.interactionDOMElement.addEventListener('mouseout', this.onPointerOut, true);\n            this.interactionDOMElement.addEventListener('mouseover', this.onPointerOver, true);\n            window.addEventListener('mouseup', this.onPointerUp, true);\n        }\n\n        // always look directly for touch events so that we can provide original data\n        // In a future version we should change this to being just a fallback and rely solely on\n        // PointerEvents whenever available\n        if (this.supportsTouchEvents)\n        {\n            this.interactionDOMElement.addEventListener('touchstart', this.onPointerDown, true);\n            this.interactionDOMElement.addEventListener('touchcancel', this.onPointerCancel, true);\n            this.interactionDOMElement.addEventListener('touchend', this.onPointerUp, true);\n            this.interactionDOMElement.addEventListener('touchmove', this.onPointerMove, true);\n        }\n\n        this.eventsAdded = true;\n    }\n\n    /**\n     * Removes all the DOM events that were previously registered\n     *\n     * @private\n     */\n    removeEvents()\n    {\n        if (!this.interactionDOMElement)\n        {\n            return;\n        }\n\n        core.ticker.shared.remove(this.update, this);\n\n        if (window.navigator.msPointerEnabled)\n        {\n            this.interactionDOMElement.style['-ms-content-zooming'] = '';\n            this.interactionDOMElement.style['-ms-touch-action'] = '';\n        }\n        else if (this.supportsPointerEvents)\n        {\n            this.interactionDOMElement.style['touch-action'] = '';\n        }\n\n        if (this.supportsPointerEvents)\n        {\n            window.document.removeEventListener('pointermove', this.onPointerMove, true);\n            this.interactionDOMElement.removeEventListener('pointerdown', this.onPointerDown, true);\n            this.interactionDOMElement.removeEventListener('pointerleave', this.onPointerOut, true);\n            this.interactionDOMElement.removeEventListener('pointerover', this.onPointerOver, true);\n            window.removeEventListener('pointercancel', this.onPointerCancel, true);\n            window.removeEventListener('pointerup', this.onPointerUp, true);\n        }\n        else\n        {\n            window.document.removeEventListener('mousemove', this.onPointerMove, true);\n            this.interactionDOMElement.removeEventListener('mousedown', this.onPointerDown, true);\n            this.interactionDOMElement.removeEventListener('mouseout', this.onPointerOut, true);\n            this.interactionDOMElement.removeEventListener('mouseover', this.onPointerOver, true);\n            window.removeEventListener('mouseup', this.onPointerUp, true);\n        }\n\n        if (this.supportsTouchEvents)\n        {\n            this.interactionDOMElement.removeEventListener('touchstart', this.onPointerDown, true);\n            this.interactionDOMElement.removeEventListener('touchcancel', this.onPointerCancel, true);\n            this.interactionDOMElement.removeEventListener('touchend', this.onPointerUp, true);\n            this.interactionDOMElement.removeEventListener('touchmove', this.onPointerMove, true);\n        }\n\n        this.interactionDOMElement = null;\n\n        this.eventsAdded = false;\n    }\n\n    /**\n     * Updates the state of interactive objects.\n     * Invoked by a throttled ticker update from {@link PIXI.ticker.shared}.\n     *\n     * @param {number} deltaTime - time delta since last tick\n     */\n    update(deltaTime)\n    {\n        this._deltaTime += deltaTime;\n\n        if (this._deltaTime < this.interactionFrequency)\n        {\n            return;\n        }\n\n        this._deltaTime = 0;\n\n        if (!this.interactionDOMElement)\n        {\n            return;\n        }\n\n        // if the user move the mouse this check has already been done using the mouse move!\n        if (this.didMove)\n        {\n            this.didMove = false;\n\n            return;\n        }\n\n        this.cursor = null;\n\n        // Resets the flag as set by a stopPropagation call. This flag is usually reset by a user interaction of any kind,\n        // but there was a scenario of a display object moving under a static mouse cursor.\n        // In this case, mouseover and mouseevents would not pass the flag test in dispatchEvent function\n        for (const k in this.activeInteractionData)\n        {\n            // eslint-disable-next-line no-prototype-builtins\n            if (this.activeInteractionData.hasOwnProperty(k))\n            {\n                const interactionData = this.activeInteractionData[k];\n\n                if (interactionData.originalEvent && interactionData.pointerType !== 'touch')\n                {\n                    const interactionEvent = this.configureInteractionEventForDOMEvent(\n                        this.eventData,\n                        interactionData.originalEvent,\n                        interactionData\n                    );\n\n                    this.processInteractive(\n                        interactionEvent,\n                        this.renderer._lastObjectRendered,\n                        this.processPointerOverOut,\n                        true\n                    );\n                }\n            }\n        }\n\n        this.setCursorMode(this.cursor);\n\n        // TODO\n    }\n\n    /**\n     * Sets the current cursor mode, handling any callbacks or CSS style changes.\n     *\n     * @param {string} mode - cursor mode, a key from the cursorStyles dictionary\n     */\n    setCursorMode(mode)\n    {\n        mode = mode || 'default';\n        // if the mode didn't actually change, bail early\n        if (this.currentCursorMode === mode)\n        {\n            return;\n        }\n        this.currentCursorMode = mode;\n        const style = this.cursorStyles[mode];\n\n        // only do things if there is a cursor style for it\n        if (style)\n        {\n            switch (typeof style)\n            {\n                case 'string':\n                    // string styles are handled as cursor CSS\n                    this.interactionDOMElement.style.cursor = style;\n                    break;\n                case 'function':\n                    // functions are just called, and passed the cursor mode\n                    style(mode);\n                    break;\n                case 'object':\n                    // if it is an object, assume that it is a dictionary of CSS styles,\n                    // apply it to the interactionDOMElement\n                    Object.assign(this.interactionDOMElement.style, style);\n                    break;\n            }\n        }\n        else if (typeof mode === 'string' && !Object.prototype.hasOwnProperty.call(this.cursorStyles, mode))\n        {\n            // if it mode is a string (not a Symbol) and cursorStyles doesn't have any entry\n            // for the mode, then assume that the dev wants it to be CSS for the cursor.\n            this.interactionDOMElement.style.cursor = mode;\n        }\n    }\n\n    /**\n     * Dispatches an event on the display object that was interacted with\n     *\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - the display object in question\n     * @param {string} eventString - the name of the event (e.g, mousedown)\n     * @param {object} eventData - the event data object\n     * @private\n     */\n    dispatchEvent(displayObject, eventString, eventData)\n    {\n        if (!eventData.stopped)\n        {\n            eventData.currentTarget = displayObject;\n            eventData.type = eventString;\n\n            displayObject.emit(eventString, eventData);\n\n            if (displayObject[eventString])\n            {\n                displayObject[eventString](eventData);\n            }\n        }\n    }\n\n    /**\n     * Maps x and y coords from a DOM object and maps them correctly to the PixiJS view. The\n     * resulting value is stored in the point. This takes into account the fact that the DOM\n     * element could be scaled and positioned anywhere on the screen.\n     *\n     * @param  {PIXI.Point} point - the point that the result will be stored in\n     * @param  {number} x - the x coord of the position to map\n     * @param  {number} y - the y coord of the position to map\n     */\n    mapPositionToPoint(point, x, y)\n    {\n        let rect;\n\n        // IE 11 fix\n        if (!this.interactionDOMElement.parentElement)\n        {\n            rect = { x: 0, y: 0, width: 0, height: 0 };\n        }\n        else\n        {\n            rect = this.interactionDOMElement.getBoundingClientRect();\n        }\n\n        const resolutionMultiplier = navigator.isCocoonJS ? this.resolution : (1.0 / this.resolution);\n\n        point.x = ((x - rect.left) * (this.interactionDOMElement.width / rect.width)) * resolutionMultiplier;\n        point.y = ((y - rect.top) * (this.interactionDOMElement.height / rect.height)) * resolutionMultiplier;\n    }\n\n    /**\n     * This function is provides a neat way of crawling through the scene graph and running a\n     * specified function on all interactive objects it finds. It will also take care of hit\n     * testing the interactive objects and passes the hit across in the function.\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - event containing the point that\n     *  is tested for collision\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - the displayObject\n     *  that will be hit test (recursively crawls its children)\n     * @param {Function} [func] - the function that will be called on each interactive object. The\n     *  interactionEvent, displayObject and hit will be passed to the function\n     * @param {boolean} [hitTest] - this indicates if the objects inside should be hit test against the point\n     * @param {boolean} [interactive] - Whether the displayObject is interactive\n     * @return {boolean} returns true if the displayObject hit the point\n     */\n    processInteractive(interactionEvent, displayObject, func, hitTest, interactive)\n    {\n        if (!displayObject || !displayObject.visible)\n        {\n            return false;\n        }\n\n        const point = interactionEvent.data.global;\n\n        // Took a little while to rework this function correctly! But now it is done and nice and optimised. ^_^\n        //\n        // This function will now loop through all objects and then only hit test the objects it HAS\n        // to, not all of them. MUCH faster..\n        // An object will be hit test if the following is true:\n        //\n        // 1: It is interactive.\n        // 2: It belongs to a parent that is interactive AND one of the parents children have not already been hit.\n        //\n        // As another little optimisation once an interactive object has been hit we can carry on\n        // through the scenegraph, but we know that there will be no more hits! So we can avoid extra hit tests\n        // A final optimisation is that an object is not hit test directly if a child has already been hit.\n\n        interactive = displayObject.interactive || interactive;\n\n        let hit = false;\n        let interactiveParent = interactive;\n\n        // if the displayobject has a hitArea, then it does not need to hitTest children.\n        if (displayObject.hitArea)\n        {\n            interactiveParent = false;\n        }\n        // it has a mask! Then lets hit test that before continuing\n        else if (hitTest && displayObject._mask)\n        {\n            if (!displayObject._mask.containsPoint(point))\n            {\n                hitTest = false;\n            }\n        }\n\n        // ** FREE TIP **! If an object is not interactive or has no buttons in it\n        // (such as a game scene!) set interactiveChildren to false for that displayObject.\n        // This will allow PixiJS to completely ignore and bypass checking the displayObjects children.\n        if (displayObject.interactiveChildren && displayObject.children)\n        {\n            const children = displayObject.children;\n\n            for (let i = children.length - 1; i >= 0; i--)\n            {\n                const child = children[i];\n\n                // time to get recursive.. if this function will return if something is hit..\n                const childHit = this.processInteractive(interactionEvent, child, func, hitTest, interactiveParent);\n\n                if (childHit)\n                {\n                    // its a good idea to check if a child has lost its parent.\n                    // this means it has been removed whilst looping so its best\n                    if (!child.parent)\n                    {\n                        continue;\n                    }\n\n                    // we no longer need to hit test any more objects in this container as we we\n                    // now know the parent has been hit\n                    interactiveParent = false;\n\n                    // If the child is interactive , that means that the object hit was actually\n                    // interactive and not just the child of an interactive object.\n                    // This means we no longer need to hit test anything else. We still need to run\n                    // through all objects, but we don't need to perform any hit tests.\n\n                    if (childHit)\n                    {\n                        if (interactionEvent.target)\n                        {\n                            hitTest = false;\n                        }\n                        hit = true;\n                    }\n                }\n            }\n        }\n\n        // no point running this if the item is not interactive or does not have an interactive parent.\n        if (interactive)\n        {\n            // if we are hit testing (as in we have no hit any objects yet)\n            // We also don't need to worry about hit testing if once of the displayObjects children\n            // has already been hit - but only if it was interactive, otherwise we need to keep\n            // looking for an interactive child, just in case we hit one\n            if (hitTest && !interactionEvent.target)\n            {\n                if (displayObject.hitArea)\n                {\n                    displayObject.worldTransform.applyInverse(point, this._tempPoint);\n                    if (displayObject.hitArea.contains(this._tempPoint.x, this._tempPoint.y))\n                    {\n                        hit = true;\n                    }\n                }\n                else if (displayObject.containsPoint)\n                {\n                    if (displayObject.containsPoint(point))\n                    {\n                        hit = true;\n                    }\n                }\n            }\n\n            if (displayObject.interactive)\n            {\n                if (hit && !interactionEvent.target)\n                {\n                    interactionEvent.target = displayObject;\n                }\n\n                if (func)\n                {\n                    func(interactionEvent, displayObject, !!hit);\n                }\n            }\n        }\n\n        return hit;\n    }\n\n    /**\n     * Is called when the pointer button is pressed down on the renderer element\n     *\n     * @private\n     * @param {PointerEvent} originalEvent - The DOM event of a pointer button being pressed down\n     */\n    onPointerDown(originalEvent)\n    {\n        // if we support touch events, then only use those for touch events, not pointer events\n        if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') return;\n\n        const events = this.normalizeToPointerData(originalEvent);\n\n        /**\n         * No need to prevent default on natural pointer events, as there are no side effects\n         * Normalized events, however, may have the double mousedown/touchstart issue on the native android browser,\n         * so still need to be prevented.\n         */\n\n        // Guaranteed that there will be at least one event in events, and all events must have the same pointer type\n\n        if (this.autoPreventDefault && events[0].isNormalized)\n        {\n            originalEvent.preventDefault();\n        }\n\n        const eventLen = events.length;\n\n        for (let i = 0; i < eventLen; i++)\n        {\n            const event = events[i];\n\n            const interactionData = this.getInteractionDataForPointerId(event);\n\n            const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n            interactionEvent.data.originalEvent = originalEvent;\n\n            this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerDown, true);\n\n            this.emit('pointerdown', interactionEvent);\n            if (event.pointerType === 'touch')\n            {\n                this.emit('touchstart', interactionEvent);\n            }\n            // emit a mouse event for \"pen\" pointers, the way a browser would emit a fallback event\n            else if (event.pointerType === 'mouse' || event.pointerType === 'pen')\n            {\n                const isRightButton = event.button === 2;\n\n                this.emit(isRightButton ? 'rightdown' : 'mousedown', this.eventData);\n            }\n        }\n    }\n\n    /**\n     * Processes the result of the pointer down check and dispatches the event if need be\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested\n     * @param {boolean} hit - the result of the hit test on the display object\n     */\n    processPointerDown(interactionEvent, displayObject, hit)\n    {\n        const data = interactionEvent.data;\n        const id = interactionEvent.data.identifier;\n\n        if (hit)\n        {\n            if (!displayObject.trackedPointers[id])\n            {\n                displayObject.trackedPointers[id] = new InteractionTrackingData(id);\n            }\n            this.dispatchEvent(displayObject, 'pointerdown', interactionEvent);\n\n            if (data.pointerType === 'touch')\n            {\n                this.dispatchEvent(displayObject, 'touchstart', interactionEvent);\n            }\n            else if (data.pointerType === 'mouse' || data.pointerType === 'pen')\n            {\n                const isRightButton = data.button === 2;\n\n                if (isRightButton)\n                {\n                    displayObject.trackedPointers[id].rightDown = true;\n                }\n                else\n                {\n                    displayObject.trackedPointers[id].leftDown = true;\n                }\n\n                this.dispatchEvent(displayObject, isRightButton ? 'rightdown' : 'mousedown', interactionEvent);\n            }\n        }\n    }\n\n    /**\n     * Is called when the pointer button is released on the renderer element\n     *\n     * @private\n     * @param {PointerEvent} originalEvent - The DOM event of a pointer button being released\n     * @param {boolean} cancelled - true if the pointer is cancelled\n     * @param {Function} func - Function passed to {@link processInteractive}\n     */\n    onPointerComplete(originalEvent, cancelled, func)\n    {\n        const events = this.normalizeToPointerData(originalEvent);\n\n        const eventLen = events.length;\n\n        // if the event wasn't targeting our canvas, then consider it to be pointerupoutside\n        // in all cases (unless it was a pointercancel)\n        const eventAppend = originalEvent.target !== this.interactionDOMElement ? 'outside' : '';\n\n        for (let i = 0; i < eventLen; i++)\n        {\n            const event = events[i];\n\n            const interactionData = this.getInteractionDataForPointerId(event);\n\n            const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n            interactionEvent.data.originalEvent = originalEvent;\n\n            // perform hit testing for events targeting our canvas or cancel events\n            this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, func, cancelled || !eventAppend);\n\n            this.emit(cancelled ? 'pointercancel' : `pointerup${eventAppend}`, interactionEvent);\n\n            if (event.pointerType === 'mouse' || event.pointerType === 'pen')\n            {\n                const isRightButton = event.button === 2;\n\n                this.emit(isRightButton ? `rightup${eventAppend}` : `mouseup${eventAppend}`, interactionEvent);\n            }\n            else if (event.pointerType === 'touch')\n            {\n                this.emit(cancelled ? 'touchcancel' : `touchend${eventAppend}`, interactionEvent);\n                this.releaseInteractionDataForPointerId(event.pointerId, interactionData);\n            }\n        }\n    }\n\n    /**\n     * Is called when the pointer button is cancelled\n     *\n     * @private\n     * @param {PointerEvent} event - The DOM event of a pointer button being released\n     */\n    onPointerCancel(event)\n    {\n        // if we support touch events, then only use those for touch events, not pointer events\n        if (this.supportsTouchEvents && event.pointerType === 'touch') return;\n\n        this.onPointerComplete(event, true, this.processPointerCancel);\n    }\n\n    /**\n     * Processes the result of the pointer cancel check and dispatches the event if need be\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested\n     */\n    processPointerCancel(interactionEvent, displayObject)\n    {\n        const data = interactionEvent.data;\n\n        const id = interactionEvent.data.identifier;\n\n        if (displayObject.trackedPointers[id] !== undefined)\n        {\n            delete displayObject.trackedPointers[id];\n            this.dispatchEvent(displayObject, 'pointercancel', interactionEvent);\n\n            if (data.pointerType === 'touch')\n            {\n                this.dispatchEvent(displayObject, 'touchcancel', interactionEvent);\n            }\n        }\n    }\n\n    /**\n     * Is called when the pointer button is released on the renderer element\n     *\n     * @private\n     * @param {PointerEvent} event - The DOM event of a pointer button being released\n     */\n    onPointerUp(event)\n    {\n        // if we support touch events, then only use those for touch events, not pointer events\n        if (this.supportsTouchEvents && event.pointerType === 'touch') return;\n\n        this.onPointerComplete(event, false, this.processPointerUp);\n    }\n\n    /**\n     * Processes the result of the pointer up check and dispatches the event if need be\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested\n     * @param {boolean} hit - the result of the hit test on the display object\n     */\n    processPointerUp(interactionEvent, displayObject, hit)\n    {\n        const data = interactionEvent.data;\n\n        const id = interactionEvent.data.identifier;\n\n        const trackingData = displayObject.trackedPointers[id];\n\n        const isTouch = data.pointerType === 'touch';\n\n        const isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen');\n\n        // Mouse only\n        if (isMouse)\n        {\n            const isRightButton = data.button === 2;\n\n            const flags = InteractionTrackingData.FLAGS;\n\n            const test = isRightButton ? flags.RIGHT_DOWN : flags.LEFT_DOWN;\n\n            const isDown = trackingData !== undefined && (trackingData.flags & test);\n\n            if (hit)\n            {\n                this.dispatchEvent(displayObject, isRightButton ? 'rightup' : 'mouseup', interactionEvent);\n\n                if (isDown)\n                {\n                    this.dispatchEvent(displayObject, isRightButton ? 'rightclick' : 'click', interactionEvent);\n                }\n            }\n            else if (isDown)\n            {\n                this.dispatchEvent(displayObject, isRightButton ? 'rightupoutside' : 'mouseupoutside', interactionEvent);\n            }\n            // update the down state of the tracking data\n            if (trackingData)\n            {\n                if (isRightButton)\n                {\n                    trackingData.rightDown = false;\n                }\n                else\n                {\n                    trackingData.leftDown = false;\n                }\n            }\n        }\n\n        // Pointers and Touches, and Mouse\n        if (hit)\n        {\n            this.dispatchEvent(displayObject, 'pointerup', interactionEvent);\n            if (isTouch) this.dispatchEvent(displayObject, 'touchend', interactionEvent);\n\n            if (trackingData)\n            {\n                this.dispatchEvent(displayObject, 'pointertap', interactionEvent);\n                if (isTouch)\n                {\n                    this.dispatchEvent(displayObject, 'tap', interactionEvent);\n                    // touches are no longer over (if they ever were) when we get the touchend\n                    // so we should ensure that we don't keep pretending that they are\n                    trackingData.over = false;\n                }\n            }\n        }\n        else if (trackingData)\n        {\n            this.dispatchEvent(displayObject, 'pointerupoutside', interactionEvent);\n            if (isTouch) this.dispatchEvent(displayObject, 'touchendoutside', interactionEvent);\n        }\n        // Only remove the tracking data if there is no over/down state still associated with it\n        if (trackingData && trackingData.none)\n        {\n            delete displayObject.trackedPointers[id];\n        }\n    }\n\n    /**\n     * Is called when the pointer moves across the renderer element\n     *\n     * @private\n     * @param {PointerEvent} originalEvent - The DOM event of a pointer moving\n     */\n    onPointerMove(originalEvent)\n    {\n        // if we support touch events, then only use those for touch events, not pointer events\n        if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') return;\n\n        const events = this.normalizeToPointerData(originalEvent);\n\n        if (events[0].pointerType === 'mouse')\n        {\n            this.didMove = true;\n\n            this.cursor = null;\n        }\n\n        const eventLen = events.length;\n\n        for (let i = 0; i < eventLen; i++)\n        {\n            const event = events[i];\n\n            const interactionData = this.getInteractionDataForPointerId(event);\n\n            const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n            interactionEvent.data.originalEvent = originalEvent;\n\n            const interactive = event.pointerType === 'touch' ? this.moveWhenInside : true;\n\n            this.processInteractive(\n                interactionEvent,\n                this.renderer._lastObjectRendered,\n                this.processPointerMove,\n                interactive\n            );\n            this.emit('pointermove', interactionEvent);\n            if (event.pointerType === 'touch') this.emit('touchmove', interactionEvent);\n            if (event.pointerType === 'mouse' || event.pointerType === 'pen') this.emit('mousemove', interactionEvent);\n        }\n\n        if (events[0].pointerType === 'mouse')\n        {\n            this.setCursorMode(this.cursor);\n\n            // TODO BUG for parents interactive object (border order issue)\n        }\n    }\n\n    /**\n     * Processes the result of the pointer move check and dispatches the event if need be\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested\n     * @param {boolean} hit - the result of the hit test on the display object\n     */\n    processPointerMove(interactionEvent, displayObject, hit)\n    {\n        const data = interactionEvent.data;\n\n        const isTouch = data.pointerType === 'touch';\n\n        const isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen');\n\n        if (isMouse)\n        {\n            this.processPointerOverOut(interactionEvent, displayObject, hit);\n        }\n\n        if (!this.moveWhenInside || hit)\n        {\n            this.dispatchEvent(displayObject, 'pointermove', interactionEvent);\n            if (isTouch) this.dispatchEvent(displayObject, 'touchmove', interactionEvent);\n            if (isMouse) this.dispatchEvent(displayObject, 'mousemove', interactionEvent);\n        }\n    }\n\n    /**\n     * Is called when the pointer is moved out of the renderer element\n     *\n     * @private\n     * @param {PointerEvent} originalEvent - The DOM event of a pointer being moved out\n     */\n    onPointerOut(originalEvent)\n    {\n        // if we support touch events, then only use those for touch events, not pointer events\n        if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') return;\n\n        const events = this.normalizeToPointerData(originalEvent);\n\n        // Only mouse and pointer can call onPointerOut, so events will always be length 1\n        const event = events[0];\n\n        if (event.pointerType === 'mouse')\n        {\n            this.mouseOverRenderer = false;\n            this.setCursorMode(null);\n        }\n\n        const interactionData = this.getInteractionDataForPointerId(event);\n\n        const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n        interactionEvent.data.originalEvent = event;\n\n        this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerOverOut, false);\n\n        this.emit('pointerout', interactionEvent);\n        if (event.pointerType === 'mouse' || event.pointerType === 'pen')\n        {\n            this.emit('mouseout', interactionEvent);\n        }\n        else\n        {\n            // we can get touchleave events after touchend, so we want to make sure we don't\n            // introduce memory leaks\n            this.releaseInteractionDataForPointerId(interactionData.identifier);\n        }\n    }\n\n    /**\n     * Processes the result of the pointer over/out check and dispatches the event if need be\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n     * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested\n     * @param {boolean} hit - the result of the hit test on the display object\n     */\n    processPointerOverOut(interactionEvent, displayObject, hit)\n    {\n        const data = interactionEvent.data;\n\n        const id = interactionEvent.data.identifier;\n\n        const isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen');\n\n        let trackingData = displayObject.trackedPointers[id];\n\n        // if we just moused over the display object, then we need to track that state\n        if (hit && !trackingData)\n        {\n            trackingData = displayObject.trackedPointers[id] = new InteractionTrackingData(id);\n        }\n\n        if (trackingData === undefined) return;\n\n        if (hit && this.mouseOverRenderer)\n        {\n            if (!trackingData.over)\n            {\n                trackingData.over = true;\n                this.dispatchEvent(displayObject, 'pointerover', interactionEvent);\n                if (isMouse)\n                {\n                    this.dispatchEvent(displayObject, 'mouseover', interactionEvent);\n                }\n            }\n\n            // only change the cursor if it has not already been changed (by something deeper in the\n            // display tree)\n            if (isMouse && this.cursor === null)\n            {\n                this.cursor = displayObject.cursor;\n            }\n        }\n        else if (trackingData.over)\n        {\n            trackingData.over = false;\n            this.dispatchEvent(displayObject, 'pointerout', this.eventData);\n            if (isMouse)\n            {\n                this.dispatchEvent(displayObject, 'mouseout', interactionEvent);\n            }\n            // if there is no mouse down information for the pointer, then it is safe to delete\n            if (trackingData.none)\n            {\n                delete displayObject.trackedPointers[id];\n            }\n        }\n    }\n\n    /**\n     * Is called when the pointer is moved into the renderer element\n     *\n     * @private\n     * @param {PointerEvent} originalEvent - The DOM event of a pointer button being moved into the renderer view\n     */\n    onPointerOver(originalEvent)\n    {\n        const events = this.normalizeToPointerData(originalEvent);\n\n        // Only mouse and pointer can call onPointerOver, so events will always be length 1\n        const event = events[0];\n\n        const interactionData = this.getInteractionDataForPointerId(event);\n\n        const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n        interactionEvent.data.originalEvent = event;\n\n        if (event.pointerType === 'mouse')\n        {\n            this.mouseOverRenderer = true;\n        }\n\n        this.emit('pointerover', interactionEvent);\n        if (event.pointerType === 'mouse' || event.pointerType === 'pen')\n        {\n            this.emit('mouseover', interactionEvent);\n        }\n    }\n\n    /**\n     * Get InteractionData for a given pointerId. Store that data as well\n     *\n     * @private\n     * @param {PointerEvent} event - Normalized pointer event, output from normalizeToPointerData\n     * @return {PIXI.interaction.InteractionData} - Interaction data for the given pointer identifier\n     */\n    getInteractionDataForPointerId(event)\n    {\n        const pointerId = event.pointerId;\n\n        let interactionData;\n\n        if (pointerId === MOUSE_POINTER_ID || event.pointerType === 'mouse')\n        {\n            interactionData = this.mouse;\n        }\n        else if (this.activeInteractionData[pointerId])\n        {\n            interactionData = this.activeInteractionData[pointerId];\n        }\n        else\n        {\n            interactionData = this.interactionDataPool.pop() || new InteractionData();\n            interactionData.identifier = pointerId;\n            this.activeInteractionData[pointerId] = interactionData;\n        }\n        // copy properties from the event, so that we can make sure that touch/pointer specific\n        // data is available\n        interactionData._copyEvent(event);\n\n        return interactionData;\n    }\n\n    /**\n     * Return unused InteractionData to the pool, for a given pointerId\n     *\n     * @private\n     * @param {number} pointerId - Identifier from a pointer event\n     */\n    releaseInteractionDataForPointerId(pointerId)\n    {\n        const interactionData = this.activeInteractionData[pointerId];\n\n        if (interactionData)\n        {\n            delete this.activeInteractionData[pointerId];\n            interactionData._reset();\n            this.interactionDataPool.push(interactionData);\n        }\n    }\n\n    /**\n     * Configure an InteractionEvent to wrap a DOM PointerEvent and InteractionData\n     *\n     * @private\n     * @param {PIXI.interaction.InteractionEvent} interactionEvent - The event to be configured\n     * @param {PointerEvent} pointerEvent - The DOM event that will be paired with the InteractionEvent\n     * @param {PIXI.interaction.InteractionData} interactionData - The InteractionData that will be paired\n     *        with the InteractionEvent\n     * @return {PIXI.interaction.InteractionEvent} the interaction event that was passed in\n     */\n    configureInteractionEventForDOMEvent(interactionEvent, pointerEvent, interactionData)\n    {\n        interactionEvent.data = interactionData;\n\n        this.mapPositionToPoint(interactionData.global, pointerEvent.clientX, pointerEvent.clientY);\n\n        // This is the way InteractionManager processed touch events before the refactoring, so I've kept\n        // it here. But it doesn't make that much sense to me, since mapPositionToPoint already factors\n        // in this.resolution, so this just divides by this.resolution twice for touch events...\n        if (navigator.isCocoonJS && pointerEvent.pointerType === 'touch')\n        {\n            interactionData.global.x = interactionData.global.x / this.resolution;\n            interactionData.global.y = interactionData.global.y / this.resolution;\n        }\n\n        // Not really sure why this is happening, but it's how a previous version handled things\n        if (pointerEvent.pointerType === 'touch')\n        {\n            pointerEvent.globalX = interactionData.global.x;\n            pointerEvent.globalY = interactionData.global.y;\n        }\n\n        interactionData.originalEvent = pointerEvent;\n        interactionEvent._reset();\n\n        return interactionEvent;\n    }\n\n    /**\n     * Ensures that the original event object contains all data that a regular pointer event would have\n     *\n     * @private\n     * @param {TouchEvent|MouseEvent|PointerEvent} event - The original event data from a touch or mouse event\n     * @return {PointerEvent[]} An array containing a single normalized pointer event, in the case of a pointer\n     *  or mouse event, or a multiple normalized pointer events if there are multiple changed touches\n     */\n    normalizeToPointerData(event)\n    {\n        const normalizedEvents = [];\n\n        if (this.supportsTouchEvents && event instanceof TouchEvent)\n        {\n            for (let i = 0, li = event.changedTouches.length; i < li; i++)\n            {\n                const touch = event.changedTouches[i];\n\n                if (typeof touch.button === 'undefined') touch.button = event.touches.length ? 1 : 0;\n                if (typeof touch.buttons === 'undefined') touch.buttons = event.touches.length ? 1 : 0;\n                if (typeof touch.isPrimary === 'undefined')\n                {\n                    touch.isPrimary = event.touches.length === 1 && event.type === 'touchstart';\n                }\n                if (typeof touch.width === 'undefined') touch.width = touch.radiusX || 1;\n                if (typeof touch.height === 'undefined') touch.height = touch.radiusY || 1;\n                if (typeof touch.tiltX === 'undefined') touch.tiltX = 0;\n                if (typeof touch.tiltY === 'undefined') touch.tiltY = 0;\n                if (typeof touch.pointerType === 'undefined') touch.pointerType = 'touch';\n                if (typeof touch.pointerId === 'undefined') touch.pointerId = touch.identifier || 0;\n                if (typeof touch.pressure === 'undefined') touch.pressure = touch.force || 0.5;\n                touch.twist = 0;\n                touch.tangentialPressure = 0;\n                // TODO: Remove these, as layerX/Y is not a standard, is deprecated, has uneven\n                // support, and the fill ins are not quite the same\n                // offsetX/Y might be okay, but is not the same as clientX/Y when the canvas's top\n                // left is not 0,0 on the page\n                if (typeof touch.layerX === 'undefined') touch.layerX = touch.offsetX = touch.clientX;\n                if (typeof touch.layerY === 'undefined') touch.layerY = touch.offsetY = touch.clientY;\n\n                // mark the touch as normalized, just so that we know we did it\n                touch.isNormalized = true;\n\n                normalizedEvents.push(touch);\n            }\n        }\n        // apparently PointerEvent subclasses MouseEvent, so yay\n        else if (event instanceof MouseEvent && (!this.supportsPointerEvents || !(event instanceof window.PointerEvent)))\n        {\n            if (typeof event.isPrimary === 'undefined') event.isPrimary = true;\n            if (typeof event.width === 'undefined') event.width = 1;\n            if (typeof event.height === 'undefined') event.height = 1;\n            if (typeof event.tiltX === 'undefined') event.tiltX = 0;\n            if (typeof event.tiltY === 'undefined') event.tiltY = 0;\n            if (typeof event.pointerType === 'undefined') event.pointerType = 'mouse';\n            if (typeof event.pointerId === 'undefined') event.pointerId = MOUSE_POINTER_ID;\n            if (typeof event.pressure === 'undefined') event.pressure = 0.5;\n            event.twist = 0;\n            event.tangentialPressure = 0;\n\n            // mark the mouse event as normalized, just so that we know we did it\n            event.isNormalized = true;\n\n            normalizedEvents.push(event);\n        }\n        else\n        {\n            normalizedEvents.push(event);\n        }\n\n        return normalizedEvents;\n    }\n\n    /**\n     * Destroys the interaction manager\n     *\n     */\n    destroy()\n    {\n        this.removeEvents();\n\n        this.removeAllListeners();\n\n        this.renderer = null;\n\n        this.mouse = null;\n\n        this.eventData = null;\n\n        this.interactionDOMElement = null;\n\n        this.onPointerDown = null;\n        this.processPointerDown = null;\n\n        this.onPointerUp = null;\n        this.processPointerUp = null;\n\n        this.onPointerCancel = null;\n        this.processPointerCancel = null;\n\n        this.onPointerMove = null;\n        this.processPointerMove = null;\n\n        this.onPointerOut = null;\n        this.processPointerOverOut = null;\n\n        this.onPointerOver = null;\n\n        this._tempPoint = null;\n    }\n}\n\ncore.WebGLRenderer.registerPlugin('interaction', InteractionManager);\ncore.CanvasRenderer.registerPlugin('interaction', InteractionManager);\n","/**\n * DisplayObjects with the {@link PIXI.interaction.interactiveTarget} mixin use this class to track interactions\n *\n * @class\n * @private\n * @memberof PIXI.interaction\n */\nexport default class InteractionTrackingData\n{\n    /**\n     * @param {number} pointerId - Unique pointer id of the event\n     */\n    constructor(pointerId)\n    {\n        this._pointerId = pointerId;\n        this._flags = InteractionTrackingData.FLAGS.NONE;\n    }\n\n    /**\n     *\n     * @private\n     * @param {number} flag - The interaction flag to set\n     * @param {boolean} yn - Should the flag be set or unset\n     */\n    _doSet(flag, yn)\n    {\n        if (yn)\n        {\n            this._flags = this._flags | flag;\n        }\n        else\n        {\n            this._flags = this._flags & (~flag);\n        }\n    }\n\n    /**\n     * Unique pointer id of the event\n     *\n     * @readonly\n     * @member {number}\n     */\n    get pointerId()\n    {\n        return this._pointerId;\n    }\n\n    /**\n     * State of the tracking data, expressed as bit flags\n     *\n     * @member {number}\n     * @memberof PIXI.interaction.InteractionTrackingData#\n     */\n    get flags()\n    {\n        return this._flags;\n    }\n\n    /**\n     * Set the flags for the tracking data\n     *\n     * @param {number} flags - Flags to set\n     */\n    set flags(flags)\n    {\n        this._flags = flags;\n    }\n\n    /**\n     * Is the tracked event inactive (not over or down)?\n     *\n     * @member {number}\n     * @memberof PIXI.interaction.InteractionTrackingData#\n     */\n    get none()\n    {\n        return this._flags === this.constructor.FLAGS.NONE;\n    }\n\n    /**\n     * Is the tracked event over the DisplayObject?\n     *\n     * @member {boolean}\n     * @memberof PIXI.interaction.InteractionTrackingData#\n     */\n    get over()\n    {\n        return (this._flags & this.constructor.FLAGS.OVER) !== 0;\n    }\n\n    /**\n     * Set the over flag\n     *\n     * @param {boolean} yn - Is the event over?\n     */\n    set over(yn)\n    {\n        this._doSet(this.constructor.FLAGS.OVER, yn);\n    }\n\n    /**\n     * Did the right mouse button come down in the DisplayObject?\n     *\n     * @member {boolean}\n     * @memberof PIXI.interaction.InteractionTrackingData#\n     */\n    get rightDown()\n    {\n        return (this._flags & this.constructor.FLAGS.RIGHT_DOWN) !== 0;\n    }\n\n    /**\n     * Set the right down flag\n     *\n     * @param {boolean} yn - Is the right mouse button down?\n     */\n    set rightDown(yn)\n    {\n        this._doSet(this.constructor.FLAGS.RIGHT_DOWN, yn);\n    }\n\n    /**\n     * Did the left mouse button come down in the DisplayObject?\n     *\n     * @member {boolean}\n     * @memberof PIXI.interaction.InteractionTrackingData#\n     */\n    get leftDown()\n    {\n        return (this._flags & this.constructor.FLAGS.LEFT_DOWN) !== 0;\n    }\n\n    /**\n     * Set the left down flag\n     *\n     * @param {boolean} yn - Is the left mouse button down?\n     */\n    set leftDown(yn)\n    {\n        this._doSet(this.constructor.FLAGS.LEFT_DOWN, yn);\n    }\n}\n\nInteractionTrackingData.FLAGS = Object.freeze({\n    NONE: 0,\n    OVER: 1 << 0,\n    LEFT_DOWN: 1 << 1,\n    RIGHT_DOWN: 1 << 2,\n});\n","/**\n * Default property values of interactive objects\n * Used by {@link PIXI.interaction.InteractionManager} to automatically give all DisplayObjects these properties\n *\n * @private\n * @name interactiveTarget\n * @memberof PIXI.interaction\n * @example\n *      function MyObject() {}\n *\n *      Object.assign(\n *          core.DisplayObject.prototype,\n *          PIXI.interaction.interactiveTarget\n *      );\n */\nexport default {\n\n    /**\n     * Enable interaction events for the DisplayObject. Touch, pointer and mouse\n     * events will not be emitted unless `interactive` is set to `true`.\n     *\n     * @example\n     * const sprite = new PIXI.Sprite(texture);\n     * sprite.interactive = true;\n     * sprite.on('tap', (event) => {\n     *    //handle event\n     * });\n     * @member {boolean}\n     * @memberof PIXI.DisplayObject#\n     */\n    interactive: false,\n\n    /**\n     * Determines if the children to the displayObject can be clicked/touched\n     * Setting this to false allows PixiJS to bypass a recursive `hitTest` function\n     *\n     * @member {boolean}\n     * @memberof PIXI.Container#\n     */\n    interactiveChildren: true,\n\n    /**\n     * Interaction shape. Children will be hit first, then this shape will be checked.\n     * Setting this will cause this shape to be checked in hit tests rather than the displayObject's bounds.\n     *\n     * @example\n     * const sprite = new PIXI.Sprite(texture);\n     * sprite.interactive = true;\n     * sprite.hitArea = new PIXI.Rectangle(0, 0, 100, 100);\n     * @member {PIXI.Rectangle|PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.RoundedRectangle}\n     * @memberof PIXI.DisplayObject#\n     */\n    hitArea: null,\n\n    /**\n     * If enabled, the mouse cursor use the pointer behavior when hovered over the displayObject if it is interactive\n     * Setting this changes the 'cursor' property to `'pointer'`.\n     *\n     * @example\n     * const sprite = new PIXI.Sprite(texture);\n     * sprite.interactive = true;\n     * sprite.buttonMode = true;\n     * @member {boolean}\n     * @memberof PIXI.DisplayObject#\n     */\n    get buttonMode()\n    {\n        return this.cursor === 'pointer';\n    },\n    set buttonMode(value)\n    {\n        if (value)\n        {\n            this.cursor = 'pointer';\n        }\n        else if (this.cursor === 'pointer')\n        {\n            this.cursor = null;\n        }\n    },\n\n    /**\n     * This defines what cursor mode is used when the mouse cursor\n     * is hovered over the displayObject.\n     *\n     * @example\n     * const sprite = new PIXI.Sprite(texture);\n     * sprite.interactive = true;\n     * sprite.cursor = 'wait';\n     * @see https://developer.mozilla.org/en/docs/Web/CSS/cursor\n     *\n     * @member {string}\n     * @memberof PIXI.DisplayObject#\n     */\n    cursor: null,\n\n    /**\n     * Internal set of all active pointers, by identifier\n     *\n     * @member {Map<number, InteractionTrackingData>}\n     * @memberof PIXI.DisplayObject#\n     * @private\n     */\n    get trackedPointers()\n    {\n        if (this._trackedPointers === undefined) this._trackedPointers = {};\n\n        return this._trackedPointers;\n    },\n\n    /**\n     * Map of all tracked pointers, by identifier. Use trackedPointers to access.\n     *\n     * @private\n     * @type {Map<number, InteractionTrackingData>}\n     */\n    _trackedPointers: undefined,\n};\n","import * as path from 'path';\nimport { utils } from '../core';\nimport { Resource } from 'resource-loader';\nimport { BitmapText } from '../extras';\n\n/**\n * Register a BitmapText font from loader resource.\n *\n * @function parseBitmapFontData\n * @memberof PIXI.loaders\n * @param {PIXI.loaders.Resource} resource - Loader resource.\n * @param {PIXI.Texture} texture - Reference to texture.\n */\nexport function parse(resource, texture)\n{\n    resource.bitmapFont = BitmapText.registerFont(resource.data, texture);\n}\n\nexport default function ()\n{\n    return function bitmapFontParser(resource, next)\n    {\n        // skip if no data or not xml data\n        if (!resource.data || resource.type !== Resource.TYPE.XML)\n        {\n            next();\n\n            return;\n        }\n\n        // skip if not bitmap font data, using some silly duck-typing\n        if (resource.data.getElementsByTagName('page').length === 0\n            || resource.data.getElementsByTagName('info').length === 0\n            || resource.data.getElementsByTagName('info')[0].getAttribute('face') === null\n        )\n        {\n            next();\n\n            return;\n        }\n\n        let xmlUrl = !resource.isDataUrl ? path.dirname(resource.url) : '';\n\n        if (resource.isDataUrl)\n        {\n            if (xmlUrl === '.')\n            {\n                xmlUrl = '';\n            }\n\n            if (this.baseUrl && xmlUrl)\n            {\n                // if baseurl has a trailing slash then add one to xmlUrl so the replace works below\n                if (this.baseUrl.charAt(this.baseUrl.length - 1) === '/')\n                {\n                    xmlUrl += '/';\n                }\n            }\n        }\n\n        // remove baseUrl from xmlUrl\n        xmlUrl = xmlUrl.replace(this.baseUrl, '');\n\n        // if there is an xmlUrl now, it needs a trailing slash. Ensure that it does if the string isn't empty.\n        if (xmlUrl && xmlUrl.charAt(xmlUrl.length - 1) !== '/')\n        {\n            xmlUrl += '/';\n        }\n\n        const textureUrl = xmlUrl + resource.data.getElementsByTagName('page')[0].getAttribute('file');\n\n        if (utils.TextureCache[textureUrl])\n        {\n            // reuse existing texture\n            parse(resource, utils.TextureCache[textureUrl]);\n            next();\n        }\n        else\n        {\n            const loadOptions = {\n                crossOrigin: resource.crossOrigin,\n                loadType: Resource.LOAD_TYPE.IMAGE,\n                metadata: resource.metadata.imageMetadata,\n                parentResource: resource,\n            };\n\n            // load the texture for the font\n            this.add(`${resource.name}_image`, textureUrl, loadOptions, (res) =>\n            {\n                parse(resource, res.texture);\n                next();\n            });\n        }\n    };\n}\n","import Application from '../core/Application';\nimport Loader from './loader';\n\n/**\n * This namespace contains APIs which extends the {@link https://github.com/englercj/resource-loader resource-loader} module\n * for loading assets, data, and other resources dynamically.\n * @example\n * const loader = new PIXI.loaders.Loader();\n * loader.add('bunny', 'data/bunny.png')\n *       .add('spaceship', 'assets/spritesheet.json');\n * loader.load((loader, resources) => {\n *    // resources.bunny\n *    // resources.spaceship\n * });\n * @namespace PIXI.loaders\n */\nexport { Loader };\nexport { default as bitmapFontParser, parse as parseBitmapFontData } from './bitmapFontParser';\nexport { default as spritesheetParser, getResourcePath } from './spritesheetParser';\nexport { default as textureParser } from './textureParser';\n\n/**\n * Reference to **resource-loader**'s Resource class.\n * See https://github.com/englercj/resource-loader\n * @class Resource\n * @memberof PIXI.loaders\n */\nexport { Resource } from 'resource-loader';\n\n/**\n * A premade instance of the loader that can be used to load resources.\n * @name shared\n * @memberof PIXI.loaders\n * @type {PIXI.loaders.Loader}\n */\nconst shared = new Loader();\n\nshared.destroy = () =>\n{\n    // protect destroying shared loader\n};\n\nexport { shared };\n\n// Mixin the loader construction\nconst AppPrototype = Application.prototype;\n\nAppPrototype._loader = null;\n\n/**\n * Loader instance to help with asset loading.\n * @name PIXI.Application#loader\n * @type {PIXI.loaders.Loader}\n */\nObject.defineProperty(AppPrototype, 'loader', {\n    get()\n    {\n        if (!this._loader)\n        {\n            const sharedLoader = this._options.sharedLoader;\n\n            this._loader = sharedLoader ? shared : new Loader();\n        }\n\n        return this._loader;\n    },\n});\n\n// Override the destroy function\n// making sure to destroy the current Loader\nAppPrototype._parentDestroy = AppPrototype.destroy;\nAppPrototype.destroy = function destroy(removeView)\n{\n    if (this._loader)\n    {\n        this._loader.destroy();\n        this._loader = null;\n    }\n    this._parentDestroy(removeView);\n};\n","import ResourceLoader from 'resource-loader';\nimport { blobMiddlewareFactory } from 'resource-loader/lib/middlewares/parsing/blob';\nimport EventEmitter from 'eventemitter3';\nimport textureParser from './textureParser';\nimport spritesheetParser from './spritesheetParser';\nimport bitmapFontParser from './bitmapFontParser';\n\n/**\n *\n * The new loader, extends Resource Loader by Chad Engler: https://github.com/englercj/resource-loader\n *\n * ```js\n * const loader = PIXI.loader; // PixiJS exposes a premade instance for you to use.\n * //or\n * const loader = new PIXI.loaders.Loader(); // you can also create your own if you want\n *\n * const sprites = {};\n *\n * // Chainable `add` to enqueue a resource\n * loader.add('bunny', 'data/bunny.png')\n *       .add('spaceship', 'assets/spritesheet.json');\n * loader.add('scoreFont', 'assets/score.fnt');\n *\n * // Chainable `pre` to add a middleware that runs for each resource, *before* loading that resource.\n * // This is useful to implement custom caching modules (using filesystem, indexeddb, memory, etc).\n * loader.pre(cachingMiddleware);\n *\n * // Chainable `use` to add a middleware that runs for each resource, *after* loading that resource.\n * // This is useful to implement custom parsing modules (like spritesheet parsers, spine parser, etc).\n * loader.use(parsingMiddleware);\n *\n * // The `load` method loads the queue of resources, and calls the passed in callback called once all\n * // resources have loaded.\n * loader.load((loader, resources) => {\n *     // resources is an object where the key is the name of the resource loaded and the value is the resource object.\n *     // They have a couple default properties:\n *     // - `url`: The URL that the resource was loaded from\n *     // - `error`: The error that happened when trying to load (if any)\n *     // - `data`: The raw data that was loaded\n *     // also may contain other properties based on the middleware that runs.\n *     sprites.bunny = new PIXI.TilingSprite(resources.bunny.texture);\n *     sprites.spaceship = new PIXI.TilingSprite(resources.spaceship.texture);\n *     sprites.scoreFont = new PIXI.TilingSprite(resources.scoreFont.texture);\n * });\n *\n * // throughout the process multiple signals can be dispatched.\n * loader.onProgress.add(() => {}); // called once per loaded/errored file\n * loader.onError.add(() => {}); // called once per errored file\n * loader.onLoad.add(() => {}); // called once per loaded file\n * loader.onComplete.add(() => {}); // called once when the queued resources all load.\n * ```\n *\n * @see https://github.com/englercj/resource-loader\n *\n * @class\n * @extends module:resource-loader.ResourceLoader\n * @memberof PIXI.loaders\n */\nexport default class Loader extends ResourceLoader\n{\n    /**\n     * @param {string} [baseUrl=''] - The base url for all resources loaded by this loader.\n     * @param {number} [concurrency=10] - The number of resources to load concurrently.\n     */\n    constructor(baseUrl, concurrency)\n    {\n        super(baseUrl, concurrency);\n        EventEmitter.call(this);\n\n        for (let i = 0; i < Loader._pixiMiddleware.length; ++i)\n        {\n            this.use(Loader._pixiMiddleware[i]());\n        }\n\n        // Compat layer, translate the new v2 signals into old v1 events.\n        this.onStart.add((l) => this.emit('start', l));\n        this.onProgress.add((l, r) => this.emit('progress', l, r));\n        this.onError.add((e, l, r) => this.emit('error', e, l, r));\n        this.onLoad.add((l, r) => this.emit('load', l, r));\n        this.onComplete.add((l, r) => this.emit('complete', l, r));\n    }\n\n    /**\n     * Adds a default middleware to the PixiJS loader.\n     *\n     * @static\n     * @param {Function} fn - The middleware to add.\n     */\n    static addPixiMiddleware(fn)\n    {\n        Loader._pixiMiddleware.push(fn);\n    }\n\n    /**\n     * Destroy the loader, removes references.\n     */\n    destroy()\n    {\n        this.removeAllListeners();\n        this.reset();\n    }\n}\n\n// Copy EE3 prototype (mixin)\nfor (const k in EventEmitter.prototype)\n{\n    Loader.prototype[k] = EventEmitter.prototype[k];\n}\n\nLoader._pixiMiddleware = [\n    // parse any blob into more usable objects (e.g. Image)\n    blobMiddlewareFactory,\n    // parse any Image objects into textures\n    textureParser,\n    // parse any spritesheet data into multiple textures\n    spritesheetParser,\n    // parse bitmap font data into multiple textures\n    bitmapFontParser,\n];\n\n// Add custom extentions\nconst Resource = ResourceLoader.Resource;\n\nResource.setExtensionXhrType('fnt', Resource.XHR_RESPONSE_TYPE.DOCUMENT);\n","import { Resource } from 'resource-loader';\nimport url from 'url';\nimport { Spritesheet } from '../core';\n\nexport default function ()\n{\n    return function spritesheetParser(resource, next)\n    {\n        const imageResourceName = `${resource.name}_image`;\n\n        // skip if no data, its not json, it isn't spritesheet data, or the image resource already exists\n        if (!resource.data\n            || resource.type !== Resource.TYPE.JSON\n            || !resource.data.frames\n            || this.resources[imageResourceName]\n        )\n        {\n            next();\n\n            return;\n        }\n\n        const loadOptions = {\n            crossOrigin: resource.crossOrigin,\n            loadType: Resource.LOAD_TYPE.IMAGE,\n            metadata: resource.metadata.imageMetadata,\n            parentResource: resource,\n        };\n\n        const resourcePath = getResourcePath(resource, this.baseUrl);\n\n        // load the image for this sheet\n        this.add(imageResourceName, resourcePath, loadOptions, function onImageLoad(res)\n        {\n            const spritesheet = new Spritesheet(\n                res.texture.baseTexture,\n                resource.data,\n                resource.url\n            );\n\n            spritesheet.parse(() =>\n            {\n                resource.spritesheet = spritesheet;\n                resource.textures = spritesheet.textures;\n                next();\n            });\n        });\n    };\n}\n\nexport function getResourcePath(resource, baseUrl)\n{\n    // Prepend url path unless the resource image is a data url\n    if (resource.isDataUrl)\n    {\n        return resource.data.meta.image;\n    }\n\n    return url.resolve(resource.url.replace(baseUrl, ''), resource.data.meta.image);\n}\n","import { Resource } from 'resource-loader';\nimport Texture from '../core/textures/Texture';\n\nexport default function ()\n{\n    return function textureParser(resource, next)\n    {\n        // create a new texture if the data is an Image object\n        if (resource.data && resource.type === Resource.TYPE.IMAGE)\n        {\n            resource.texture = Texture.fromLoader(\n                resource.data,\n                resource.url,\n                resource.name\n            );\n        }\n        next();\n    };\n}\n","import * as core from '../core';\nimport { default as TextureTransform } from '../extras/TextureTransform';\n\nconst tempPoint = new core.Point();\nconst tempPolygon = new core.Polygon();\n\n/**\n * Base mesh class\n * @class\n * @extends PIXI.Container\n * @memberof PIXI.mesh\n */\nexport default class Mesh extends core.Container\n{\n    /**\n     * @param {PIXI.Texture} texture - The texture to use\n     * @param {Float32Array} [vertices] - if you want to specify the vertices\n     * @param {Float32Array} [uvs] - if you want to specify the uvs\n     * @param {Uint16Array} [indices] - if you want to specify the indices\n     * @param {number} [drawMode] - the drawMode, can be any of the Mesh.DRAW_MODES consts\n     */\n    constructor(texture, vertices, uvs, indices, drawMode)\n    {\n        super();\n\n        /**\n         * The texture of the Mesh\n         *\n         * @member {PIXI.Texture}\n         * @private\n         */\n        this._texture = texture;\n\n        /**\n         * The Uvs of the Mesh\n         *\n         * @member {Float32Array}\n         */\n        this.uvs = uvs || new Float32Array([\n            0, 0,\n            1, 0,\n            1, 1,\n            0, 1]);\n\n        /**\n         * An array of vertices\n         *\n         * @member {Float32Array}\n         */\n        this.vertices = vertices || new Float32Array([\n            0, 0,\n            100, 0,\n            100, 100,\n            0, 100]);\n\n        /**\n         * An array containing the indices of the vertices\n         *\n         * @member {Uint16Array}\n         */\n        //  TODO auto generate this based on draw mode!\n        this.indices = indices || new Uint16Array([0, 1, 3, 2]);\n\n        /**\n         * Version of mesh uvs are dirty or not\n         *\n         * @member {number}\n         */\n        this.dirty = 0;\n\n        /**\n         * Version of mesh indices\n         *\n         * @member {number}\n         */\n        this.indexDirty = 0;\n\n        /**\n         * The blend mode to be applied to the sprite. Set to `PIXI.BLEND_MODES.NORMAL` to remove\n         * any blend mode.\n         *\n         * @member {number}\n         * @default PIXI.BLEND_MODES.NORMAL\n         * @see PIXI.BLEND_MODES\n         */\n        this.blendMode = core.BLEND_MODES.NORMAL;\n\n        /**\n         * Triangles in canvas mode are automatically antialiased, use this value to force triangles\n         * to overlap a bit with each other.\n         *\n         * @member {number}\n         */\n        this.canvasPadding = 0;\n\n        /**\n         * The way the Mesh should be drawn, can be any of the {@link PIXI.mesh.Mesh.DRAW_MODES} consts\n         *\n         * @member {number}\n         * @see PIXI.mesh.Mesh.DRAW_MODES\n         */\n        this.drawMode = drawMode || Mesh.DRAW_MODES.TRIANGLE_MESH;\n\n        /**\n         * The default shader that is used if a mesh doesn't have a more specific one.\n         *\n         * @member {PIXI.Shader}\n         */\n        this.shader = null;\n\n        /**\n         * The tint applied to the mesh. This is a [r,g,b] value. A value of [1,1,1] will remove any\n         * tint effect.\n         *\n         * @member {number}\n         */\n        this.tintRgb = new Float32Array([1, 1, 1]);\n\n        /**\n         * A map of renderer IDs to webgl render data\n         *\n         * @private\n         * @member {object<number, object>}\n         */\n        this._glDatas = {};\n\n        /**\n         * transform that is applied to UV to get the texture coords\n         * its updated independently from texture uvTransform\n         * updates of uvs are tied to that thing\n         *\n         * @member {PIXI.extras.TextureTransform}\n         * @private\n         */\n        this._uvTransform = new TextureTransform(texture);\n\n        /**\n         * whether or not upload uvTransform to shader\n         * if its false, then uvs should be pre-multiplied\n         * if you change it for generated mesh, please call 'refresh(true)'\n         * @member {boolean}\n         * @default false\n         */\n        this.uploadUvTransform = false;\n\n        /**\n         * Plugin that is responsible for rendering this element.\n         * Allows to customize the rendering process without overriding '_renderWebGL' & '_renderCanvas' methods.\n         * @member {string}\n         * @default 'mesh'\n         */\n        this.pluginName = 'mesh';\n    }\n\n    /**\n     * Renders the object using the WebGL renderer\n     *\n     * @private\n     * @param {PIXI.WebGLRenderer} renderer - a reference to the WebGL renderer\n     */\n    _renderWebGL(renderer)\n    {\n        this.refresh();\n        renderer.setObjectRenderer(renderer.plugins[this.pluginName]);\n        renderer.plugins[this.pluginName].render(this);\n    }\n\n    /**\n     * Renders the object using the Canvas renderer\n     *\n     * @private\n     * @param {PIXI.CanvasRenderer} renderer - The canvas renderer.\n     */\n    _renderCanvas(renderer)\n    {\n        this.refresh();\n        renderer.plugins[this.pluginName].render(this);\n    }\n\n    /**\n     * When the texture is updated, this event will fire to update the scale and frame\n     *\n     * @private\n     */\n    _onTextureUpdate()\n    {\n        this._uvTransform.texture = this._texture;\n        this.refresh();\n    }\n\n    /**\n     * multiplies uvs only if uploadUvTransform is false\n     * call it after you change uvs manually\n     * make sure that texture is valid\n     */\n    multiplyUvs()\n    {\n        if (!this.uploadUvTransform)\n        {\n            this._uvTransform.multiplyUvs(this.uvs);\n        }\n    }\n\n    /**\n     * Refreshes uvs for generated meshes (rope, plane)\n     * sometimes refreshes vertices too\n     *\n     * @param {boolean} [forceUpdate=false] if true, matrices will be updated any case\n     */\n    refresh(forceUpdate)\n    {\n        if (this._uvTransform.update(forceUpdate))\n        {\n            this._refresh();\n        }\n    }\n\n    /**\n     * re-calculates mesh coords\n     * @protected\n     */\n    _refresh()\n    {\n        /* empty */\n    }\n\n    /**\n     * Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.\n     *\n     */\n    _calculateBounds()\n    {\n        // TODO - we can cache local bounds and use them if they are dirty (like graphics)\n        this._bounds.addVertices(this.transform, this.vertices, 0, this.vertices.length);\n    }\n\n    /**\n     * Tests if a point is inside this mesh. Works only for TRIANGLE_MESH\n     *\n     * @param {PIXI.Point} point - the point to test\n     * @return {boolean} the result of the test\n     */\n    containsPoint(point)\n    {\n        if (!this.getBounds().contains(point.x, point.y))\n        {\n            return false;\n        }\n\n        this.worldTransform.applyInverse(point, tempPoint);\n\n        const vertices = this.vertices;\n        const points = tempPolygon.points;\n        const indices = this.indices;\n        const len = this.indices.length;\n        const step = this.drawMode === Mesh.DRAW_MODES.TRIANGLES ? 3 : 1;\n\n        for (let i = 0; i + 2 < len; i += step)\n        {\n            const ind0 = indices[i] * 2;\n            const ind1 = indices[i + 1] * 2;\n            const ind2 = indices[i + 2] * 2;\n\n            points[0] = vertices[ind0];\n            points[1] = vertices[ind0 + 1];\n            points[2] = vertices[ind1];\n            points[3] = vertices[ind1 + 1];\n            points[4] = vertices[ind2];\n            points[5] = vertices[ind2 + 1];\n\n            if (tempPolygon.contains(tempPoint.x, tempPoint.y))\n            {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * The texture that the mesh uses.\n     *\n     * @member {PIXI.Texture}\n     */\n    get texture()\n    {\n        return this._texture;\n    }\n\n    set texture(value) // eslint-disable-line require-jsdoc\n    {\n        if (this._texture === value)\n        {\n            return;\n        }\n\n        this._texture = value;\n\n        if (value)\n        {\n            // wait for the texture to load\n            if (value.baseTexture.hasLoaded)\n            {\n                this._onTextureUpdate();\n            }\n            else\n            {\n                value.once('update', this._onTextureUpdate, this);\n            }\n        }\n    }\n\n    /**\n     * The tint applied to the mesh. This is a hex value. A value of 0xFFFFFF will remove any tint effect.\n     *\n     * @member {number}\n     * @default 0xFFFFFF\n     */\n    get tint()\n    {\n        return core.utils.rgb2hex(this.tintRgb);\n    }\n\n    set tint(value) // eslint-disable-line require-jsdoc\n    {\n        this.tintRgb = core.utils.hex2rgb(value, this.tintRgb);\n    }\n}\n\n/**\n * Different drawing buffer modes supported\n *\n * @static\n * @constant\n * @type {object}\n * @property {number} TRIANGLE_MESH\n * @property {number} TRIANGLES\n */\nMesh.DRAW_MODES = {\n    TRIANGLE_MESH: 0,\n    TRIANGLES: 1,\n};\n","import Plane from './Plane';\n\nconst DEFAULT_BORDER_SIZE = 10;\n\n/**\n * The NineSlicePlane allows you to stretch a texture using 9-slice scaling. The corners will remain unscaled (useful\n * for buttons with rounded corners for example) and the other areas will be scaled horizontally and or vertically\n *\n *```js\n * let Plane9 = new PIXI.NineSlicePlane(PIXI.Texture.fromImage('BoxWithRoundedCorners.png'), 15, 15, 15, 15);\n *  ```\n * <pre>\n *      A                          B\n *    +---+----------------------+---+\n *  C | 1 |          2           | 3 |\n *    +---+----------------------+---+\n *    |   |                      |   |\n *    | 4 |          5           | 6 |\n *    |   |                      |   |\n *    +---+----------------------+---+\n *  D | 7 |          8           | 9 |\n *    +---+----------------------+---+\n\n *  When changing this objects width and/or height:\n *     areas 1 3 7 and 9 will remain unscaled.\n *     areas 2 and 8 will be stretched horizontally\n *     areas 4 and 6 will be stretched vertically\n *     area 5 will be stretched both horizontally and vertically\n * </pre>\n *\n * @class\n * @extends PIXI.mesh.Plane\n * @memberof PIXI.mesh\n *\n */\nexport default class NineSlicePlane extends Plane\n{\n    /**\n     * @param {PIXI.Texture} texture - The texture to use on the NineSlicePlane.\n     * @param {int} [leftWidth=10] size of the left vertical bar (A)\n     * @param {int} [topHeight=10] size of the top horizontal bar (C)\n     * @param {int} [rightWidth=10] size of the right vertical bar (B)\n     * @param {int} [bottomHeight=10] size of the bottom horizontal bar (D)\n     */\n    constructor(texture, leftWidth, topHeight, rightWidth, bottomHeight)\n    {\n        super(texture, 4, 4);\n\n        this._origWidth = texture.orig.width;\n        this._origHeight = texture.orig.height;\n\n        /**\n         * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane\n         *\n         * @member {number}\n         * @memberof PIXI.NineSlicePlane#\n         * @override\n         */\n        this._width = this._origWidth;\n\n        /**\n         * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane\n         *\n         * @member {number}\n         * @memberof PIXI.NineSlicePlane#\n         * @override\n         */\n        this._height = this._origHeight;\n\n        /**\n         * The width of the left column (a)\n         *\n         * @member {number}\n         * @memberof PIXI.NineSlicePlane#\n         * @override\n         */\n        this.leftWidth = typeof leftWidth !== 'undefined' ? leftWidth : DEFAULT_BORDER_SIZE;\n\n        /**\n         * The width of the right column (b)\n         *\n         * @member {number}\n         * @memberof PIXI.NineSlicePlane#\n         * @override\n         */\n        this.rightWidth = typeof rightWidth !== 'undefined' ? rightWidth : DEFAULT_BORDER_SIZE;\n\n        /**\n         * The height of the top row (c)\n         *\n         * @member {number}\n         * @memberof PIXI.NineSlicePlane#\n         * @override\n         */\n        this.topHeight = typeof topHeight !== 'undefined' ? topHeight : DEFAULT_BORDER_SIZE;\n\n        /**\n         * The height of the bottom row (d)\n         *\n         * @member {number}\n         * @memberof PIXI.NineSlicePlane#\n         * @override\n         */\n        this.bottomHeight = typeof bottomHeight !== 'undefined' ? bottomHeight : DEFAULT_BORDER_SIZE;\n\n        this.refresh(true);\n    }\n\n    /**\n     * Updates the horizontal vertices.\n     *\n     */\n    updateHorizontalVertices()\n    {\n        const vertices = this.vertices;\n\n        vertices[9] = vertices[11] = vertices[13] = vertices[15] = this._topHeight;\n        vertices[17] = vertices[19] = vertices[21] = vertices[23] = this._height - this._bottomHeight;\n        vertices[25] = vertices[27] = vertices[29] = vertices[31] = this._height;\n    }\n\n    /**\n     * Updates the vertical vertices.\n     *\n     */\n    updateVerticalVertices()\n    {\n        const vertices = this.vertices;\n\n        vertices[2] = vertices[10] = vertices[18] = vertices[26] = this._leftWidth;\n        vertices[4] = vertices[12] = vertices[20] = vertices[28] = this._width - this._rightWidth;\n        vertices[6] = vertices[14] = vertices[22] = vertices[30] = this._width;\n    }\n\n    /**\n     * Renders the object using the Canvas renderer\n     *\n     * @private\n     * @param {PIXI.CanvasRenderer} renderer - The canvas renderer to render with.\n     */\n    _renderCanvas(renderer)\n    {\n        const context = renderer.context;\n\n        context.globalAlpha = this.worldAlpha;\n\n        const transform = this.worldTransform;\n        const res = renderer.resolution;\n\n        if (renderer.roundPixels)\n        {\n            context.setTransform(\n                transform.a * res,\n                transform.b * res,\n                transform.c * res,\n                transform.d * res,\n                (transform.tx * res) | 0,\n                (transform.ty * res) | 0\n            );\n        }\n        else\n        {\n            context.setTransform(\n                transform.a * res,\n                transform.b * res,\n                transform.c * res,\n                transform.d * res,\n                transform.tx * res,\n                transform.ty * res\n            );\n        }\n\n        const base = this._texture.baseTexture;\n        const textureSource = base.source;\n        const w = base.width;\n        const h = base.height;\n\n        this.drawSegment(context, textureSource, w, h, 0, 1, 10, 11);\n        this.drawSegment(context, textureSource, w, h, 2, 3, 12, 13);\n        this.drawSegment(context, textureSource, w, h, 4, 5, 14, 15);\n        this.drawSegment(context, textureSource, w, h, 8, 9, 18, 19);\n        this.drawSegment(context, textureSource, w, h, 10, 11, 20, 21);\n        this.drawSegment(context, textureSource, w, h, 12, 13, 22, 23);\n        this.drawSegment(context, textureSource, w, h, 16, 17, 26, 27);\n        this.drawSegment(context, textureSource, w, h, 18, 19, 28, 29);\n        this.drawSegment(context, textureSource, w, h, 20, 21, 30, 31);\n    }\n\n    /**\n     * Renders one segment of the plane.\n     * to mimic the exact drawing behavior of stretching the image like WebGL does, we need to make sure\n     * that the source area is at least 1 pixel in size, otherwise nothing gets drawn when a slice size of 0 is used.\n     *\n     * @private\n     * @param {CanvasRenderingContext2D} context - The context to draw with.\n     * @param {CanvasImageSource} textureSource - The source to draw.\n     * @param {number} w - width of the texture\n     * @param {number} h - height of the texture\n     * @param {number} x1 - x index 1\n     * @param {number} y1 - y index 1\n     * @param {number} x2 - x index 2\n     * @param {number} y2 - y index 2\n     */\n    drawSegment(context, textureSource, w, h, x1, y1, x2, y2)\n    {\n        // otherwise you get weird results when using slices of that are 0 wide or high.\n        const uvs = this.uvs;\n        const vertices = this.vertices;\n\n        let sw = (uvs[x2] - uvs[x1]) * w;\n        let sh = (uvs[y2] - uvs[y1]) * h;\n        let dw = vertices[x2] - vertices[x1];\n        let dh = vertices[y2] - vertices[y1];\n\n        // make sure the source is at least 1 pixel wide and high, otherwise nothing will be drawn.\n        if (sw < 1)\n        {\n            sw = 1;\n        }\n\n        if (sh < 1)\n        {\n            sh = 1;\n        }\n\n        // make sure destination is at least 1 pixel wide and high, otherwise you get\n        // lines when rendering close to original size.\n        if (dw < 1)\n        {\n            dw = 1;\n        }\n\n        if (dh < 1)\n        {\n            dh = 1;\n        }\n\n        context.drawImage(textureSource, uvs[x1] * w, uvs[y1] * h, sw, sh, vertices[x1], vertices[y1], dw, dh);\n    }\n\n    /**\n     * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane\n     *\n     * @member {number}\n     */\n    get width()\n    {\n        return this._width;\n    }\n\n    set width(value) // eslint-disable-line require-jsdoc\n    {\n        this._width = value;\n        this._refresh();\n    }\n\n    /**\n     * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane\n     *\n     * @member {number}\n     */\n    get height()\n    {\n        return this._height;\n    }\n\n    set height(value) // eslint-disable-line require-jsdoc\n    {\n        this._height = value;\n        this._refresh();\n    }\n\n    /**\n     * The width of the left column\n     *\n     * @member {number}\n     */\n    get leftWidth()\n    {\n        return this._leftWidth;\n    }\n\n    set leftWidth(value) // eslint-disable-line require-jsdoc\n    {\n        this._leftWidth = value;\n        this._refresh();\n    }\n\n    /**\n     * The width of the right column\n     *\n     * @member {number}\n     */\n    get rightWidth()\n    {\n        return this._rightWidth;\n    }\n\n    set rightWidth(value) // eslint-disable-line require-jsdoc\n    {\n        this._rightWidth = value;\n        this._refresh();\n    }\n\n    /**\n     * The height of the top row\n     *\n     * @member {number}\n     */\n    get topHeight()\n    {\n        return this._topHeight;\n    }\n\n    set topHeight(value) // eslint-disable-line require-jsdoc\n    {\n        this._topHeight = value;\n        this._refresh();\n    }\n\n    /**\n     * The height of the bottom row\n     *\n     * @member {number}\n     */\n    get bottomHeight()\n    {\n        return this._bottomHeight;\n    }\n\n    set bottomHeight(value) // eslint-disable-line require-jsdoc\n    {\n        this._bottomHeight = value;\n        this._refresh();\n    }\n\n    /**\n     * Refreshes NineSlicePlane coords. All of them.\n     */\n    _refresh()\n    {\n        super._refresh();\n\n        const uvs = this.uvs;\n        const texture = this._texture;\n\n        this._origWidth = texture.orig.width;\n        this._origHeight = texture.orig.height;\n\n        const _uvw = 1.0 / this._origWidth;\n        const _uvh = 1.0 / this._origHeight;\n\n        uvs[0] = uvs[8] = uvs[16] = uvs[24] = 0;\n        uvs[1] = uvs[3] = uvs[5] = uvs[7] = 0;\n        uvs[6] = uvs[14] = uvs[22] = uvs[30] = 1;\n        uvs[25] = uvs[27] = uvs[29] = uvs[31] = 1;\n\n        uvs[2] = uvs[10] = uvs[18] = uvs[26] = _uvw * this._leftWidth;\n        uvs[4] = uvs[12] = uvs[20] = uvs[28] = 1 - (_uvw * this._rightWidth);\n        uvs[9] = uvs[11] = uvs[13] = uvs[15] = _uvh * this._topHeight;\n        uvs[17] = uvs[19] = uvs[21] = uvs[23] = 1 - (_uvh * this._bottomHeight);\n\n        this.updateHorizontalVertices();\n        this.updateVerticalVertices();\n\n        this.dirty = true;\n\n        this.multiplyUvs();\n    }\n}\n","import Mesh from './Mesh';\n\n/**\n * The Plane allows you to draw a texture across several points and them manipulate these points\n *\n *```js\n * for (let i = 0; i < 20; i++) {\n *     points.push(new PIXI.Point(i * 50, 0));\n * };\n * let Plane = new PIXI.Plane(PIXI.Texture.fromImage(\"snake.png\"), points);\n *  ```\n *\n * @class\n * @extends PIXI.mesh.Mesh\n * @memberof PIXI.mesh\n *\n */\nexport default class Plane extends Mesh\n{\n    /**\n     * @param {PIXI.Texture} texture - The texture to use on the Plane.\n     * @param {number} verticesX - The number of vertices in the x-axis\n     * @param {number} verticesY - The number of vertices in the y-axis\n     */\n    constructor(texture, verticesX, verticesY)\n    {\n        super(texture);\n\n        /**\n         * Tracker for if the Plane is ready to be drawn. Needed because Mesh ctor can\n         * call _onTextureUpdated which could call refresh too early.\n         *\n         * @member {boolean}\n         * @private\n         */\n        this._ready = true;\n\n        this.verticesX = verticesX || 10;\n        this.verticesY = verticesY || 10;\n\n        this.drawMode = Mesh.DRAW_MODES.TRIANGLES;\n        this.refresh();\n    }\n\n    /**\n     * Refreshes plane coordinates\n     *\n     */\n    _refresh()\n    {\n        const texture = this._texture;\n        const total = this.verticesX * this.verticesY;\n        const verts = [];\n        const colors = [];\n        const uvs = [];\n        const indices = [];\n\n        const segmentsX = this.verticesX - 1;\n        const segmentsY = this.verticesY - 1;\n\n        const sizeX = texture.width / segmentsX;\n        const sizeY = texture.height / segmentsY;\n\n        for (let i = 0; i < total; i++)\n        {\n            const x = (i % this.verticesX);\n            const y = ((i / this.verticesX) | 0);\n\n            verts.push(x * sizeX, y * sizeY);\n\n            uvs.push(x / segmentsX, y / segmentsY);\n        }\n\n        //  cons\n\n        const totalSub = segmentsX * segmentsY;\n\n        for (let i = 0; i < totalSub; i++)\n        {\n            const xpos = i % segmentsX;\n            const ypos = (i / segmentsX) | 0;\n\n            const value = (ypos * this.verticesX) + xpos;\n            const value2 = (ypos * this.verticesX) + xpos + 1;\n            const value3 = ((ypos + 1) * this.verticesX) + xpos;\n            const value4 = ((ypos + 1) * this.verticesX) + xpos + 1;\n\n            indices.push(value, value2, value3);\n            indices.push(value2, value4, value3);\n        }\n\n        // console.log(indices)\n        this.vertices = new Float32Array(verts);\n        this.uvs = new Float32Array(uvs);\n        this.colors = new Float32Array(colors);\n        this.indices = new Uint16Array(indices);\n        this.indexDirty = true;\n\n        this.multiplyUvs();\n    }\n\n    /**\n     * Clear texture UVs when new texture is set\n     *\n     * @private\n     */\n    _onTextureUpdate()\n    {\n        Mesh.prototype._onTextureUpdate.call(this);\n\n        // wait for the Plane ctor to finish before calling refresh\n        if (this._ready)\n        {\n            this.refresh();\n        }\n    }\n\n}\n","import Mesh from './Mesh';\n\n/**\n * The rope allows you to draw a texture across several points and them manipulate these points\n *\n *```js\n * for (let i = 0; i < 20; i++) {\n *     points.push(new PIXI.Point(i * 50, 0));\n * };\n * let rope = new PIXI.Rope(PIXI.Texture.fromImage(\"snake.png\"), points);\n *  ```\n *\n * @class\n * @extends PIXI.mesh.Mesh\n * @memberof PIXI.mesh\n *\n */\nexport default class Rope extends Mesh\n{\n    /**\n     * @param {PIXI.Texture} texture - The texture to use on the rope.\n     * @param {PIXI.Point[]} points - An array of {@link PIXI.Point} objects to construct this rope.\n     */\n    constructor(texture, points)\n    {\n        super(texture);\n\n        /**\n         * An array of points that determine the rope\n         *\n         * @member {PIXI.Point[]}\n         */\n        this.points = points;\n\n        /**\n         * An array of vertices used to construct this rope.\n         *\n         * @member {Float32Array}\n         */\n        this.vertices = new Float32Array(points.length * 4);\n\n        /**\n         * The WebGL Uvs of the rope.\n         *\n         * @member {Float32Array}\n         */\n        this.uvs = new Float32Array(points.length * 4);\n\n        /**\n         * An array containing the color components\n         *\n         * @member {Float32Array}\n         */\n        this.colors = new Float32Array(points.length * 2);\n\n        /**\n         * An array containing the indices of the vertices\n         *\n         * @member {Uint16Array}\n         */\n        this.indices = new Uint16Array(points.length * 2);\n\n        /**\n         * refreshes vertices on every updateTransform\n         * @member {boolean}\n         * @default true\n         */\n        this.autoUpdate = true;\n\n        this.refresh();\n    }\n\n    /**\n     * Refreshes\n     *\n     */\n    _refresh()\n    {\n        const points = this.points;\n\n        // if too little points, or texture hasn't got UVs set yet just move on.\n        if (points.length < 1 || !this._texture._uvs)\n        {\n            return;\n        }\n\n        // if the number of points has changed we will need to recreate the arraybuffers\n        if (this.vertices.length / 4 !== points.length)\n        {\n            this.vertices = new Float32Array(points.length * 4);\n            this.uvs = new Float32Array(points.length * 4);\n            this.colors = new Float32Array(points.length * 2);\n            this.indices = new Uint16Array(points.length * 2);\n        }\n\n        const uvs = this.uvs;\n\n        const indices = this.indices;\n        const colors = this.colors;\n\n        uvs[0] = 0;\n        uvs[1] = 0;\n        uvs[2] = 0;\n        uvs[3] = 1;\n\n        colors[0] = 1;\n        colors[1] = 1;\n\n        indices[0] = 0;\n        indices[1] = 1;\n\n        const total = points.length;\n\n        for (let i = 1; i < total; i++)\n        {\n            // time to do some smart drawing!\n            let index = i * 4;\n            const amount = i / (total - 1);\n\n            uvs[index] = amount;\n            uvs[index + 1] = 0;\n\n            uvs[index + 2] = amount;\n            uvs[index + 3] = 1;\n\n            index = i * 2;\n            colors[index] = 1;\n            colors[index + 1] = 1;\n\n            index = i * 2;\n            indices[index] = index;\n            indices[index + 1] = index + 1;\n        }\n\n        // ensure that the changes are uploaded\n        this.dirty++;\n        this.indexDirty++;\n\n        this.multiplyUvs();\n        this.refreshVertices();\n    }\n\n    /**\n     * refreshes vertices of Rope mesh\n     */\n    refreshVertices()\n    {\n        const points = this.points;\n\n        if (points.length < 1)\n        {\n            return;\n        }\n\n        let lastPoint = points[0];\n        let nextPoint;\n        let perpX = 0;\n        let perpY = 0;\n\n        // this.count -= 0.2;\n\n        const vertices = this.vertices;\n        const total = points.length;\n\n        for (let i = 0; i < total; i++)\n        {\n            const point = points[i];\n            const index = i * 4;\n\n            if (i < points.length - 1)\n            {\n                nextPoint = points[i + 1];\n            }\n            else\n            {\n                nextPoint = point;\n            }\n\n            perpY = -(nextPoint.x - lastPoint.x);\n            perpX = nextPoint.y - lastPoint.y;\n\n            let ratio = (1 - (i / (total - 1))) * 10;\n\n            if (ratio > 1)\n            {\n                ratio = 1;\n            }\n\n            const perpLength = Math.sqrt((perpX * perpX) + (perpY * perpY));\n            const num = this._texture.height / 2; // (20 + Math.abs(Math.sin((i + this.count) * 0.3) * 50) )* ratio;\n\n            perpX /= perpLength;\n            perpY /= perpLength;\n\n            perpX *= num;\n            perpY *= num;\n\n            vertices[index] = point.x + perpX;\n            vertices[index + 1] = point.y + perpY;\n            vertices[index + 2] = point.x - perpX;\n            vertices[index + 3] = point.y - perpY;\n\n            lastPoint = point;\n        }\n    }\n\n    /**\n     * Updates the object transform for rendering\n     *\n     * @private\n     */\n    updateTransform()\n    {\n        if (this.autoUpdate)\n        {\n            this.refreshVertices();\n        }\n        this.containerUpdateTransform();\n    }\n\n}\n","import * as core from '../../core';\nimport { default as Mesh } from '../Mesh';\n\n/**\n * Renderer dedicated to meshes.\n *\n * @class\n * @private\n * @memberof PIXI\n */\nexport default class MeshSpriteRenderer\n{\n    /**\n     * @param {PIXI.CanvasRenderer} renderer - The renderer this downport works for\n     */\n    constructor(renderer)\n    {\n        this.renderer = renderer;\n    }\n\n    /**\n     * Renders the Mesh\n     *\n     * @param {PIXI.mesh.Mesh} mesh - the Mesh to render\n     */\n    render(mesh)\n    {\n        const renderer = this.renderer;\n        const context = renderer.context;\n\n        const transform = mesh.worldTransform;\n        const res = renderer.resolution;\n\n        if (renderer.roundPixels)\n        {\n            context.setTransform(\n                transform.a * res,\n                transform.b * res,\n                transform.c * res,\n                transform.d * res,\n                (transform.tx * res) | 0,\n                (transform.ty * res) | 0\n            );\n        }\n        else\n        {\n            context.setTransform(\n                transform.a * res,\n                transform.b * res,\n                transform.c * res,\n                transform.d * res,\n                transform.tx * res,\n                transform.ty * res\n            );\n        }\n\n        renderer.setBlendMode(mesh.blendMode);\n\n        if (mesh.drawMode === Mesh.DRAW_MODES.TRIANGLE_MESH)\n        {\n            this._renderTriangleMesh(mesh);\n        }\n        else\n        {\n            this._renderTriangles(mesh);\n        }\n    }\n\n    /**\n     * Draws the object in Triangle Mesh mode\n     *\n     * @private\n     * @param {PIXI.mesh.Mesh} mesh - the Mesh to render\n     */\n    _renderTriangleMesh(mesh)\n    {\n        // draw triangles!!\n        const length = mesh.vertices.length / 2;\n\n        for (let i = 0; i < length - 2; i++)\n        {\n            // draw some triangles!\n            const index = i * 2;\n\n            this._renderDrawTriangle(mesh, index, (index + 2), (index + 4));\n        }\n    }\n\n    /**\n     * Draws the object in triangle mode using canvas\n     *\n     * @private\n     * @param {PIXI.mesh.Mesh} mesh - the current mesh\n     */\n    _renderTriangles(mesh)\n    {\n        // draw triangles!!\n        const indices = mesh.indices;\n        const length = indices.length;\n\n        for (let i = 0; i < length; i += 3)\n        {\n            // draw some triangles!\n            const index0 = indices[i] * 2;\n            const index1 = indices[i + 1] * 2;\n            const index2 = indices[i + 2] * 2;\n\n            this._renderDrawTriangle(mesh, index0, index1, index2);\n        }\n    }\n\n    /**\n     * Draws one of the triangles that from the Mesh\n     *\n     * @private\n     * @param {PIXI.mesh.Mesh} mesh - the current mesh\n     * @param {number} index0 - the index of the first vertex\n     * @param {number} index1 - the index of the second vertex\n     * @param {number} index2 - the index of the third vertex\n     */\n    _renderDrawTriangle(mesh, index0, index1, index2)\n    {\n        const context = this.renderer.context;\n        const uvs = mesh.uvs;\n        const vertices = mesh.vertices;\n        const texture = mesh._texture;\n\n        if (!texture.valid)\n        {\n            return;\n        }\n\n        const base = texture.baseTexture;\n        const textureSource = base.source;\n        const textureWidth = base.width;\n        const textureHeight = base.height;\n\n        let u0;\n        let u1;\n        let u2;\n        let v0;\n        let v1;\n        let v2;\n\n        if (mesh.uploadUvTransform)\n        {\n            const ut = mesh._uvTransform.mapCoord;\n\n            u0 = ((uvs[index0] * ut.a) + (uvs[index0 + 1] * ut.c) + ut.tx) * base.width;\n            u1 = ((uvs[index1] * ut.a) + (uvs[index1 + 1] * ut.c) + ut.tx) * base.width;\n            u2 = ((uvs[index2] * ut.a) + (uvs[index2 + 1] * ut.c) + ut.tx) * base.width;\n            v0 = ((uvs[index0] * ut.b) + (uvs[index0 + 1] * ut.d) + ut.ty) * base.height;\n            v1 = ((uvs[index1] * ut.b) + (uvs[index1 + 1] * ut.d) + ut.ty) * base.height;\n            v2 = ((uvs[index2] * ut.b) + (uvs[index2 + 1] * ut.d) + ut.ty) * base.height;\n        }\n        else\n        {\n            u0 = uvs[index0] * base.width;\n            u1 = uvs[index1] * base.width;\n            u2 = uvs[index2] * base.width;\n            v0 = uvs[index0 + 1] * base.height;\n            v1 = uvs[index1 + 1] * base.height;\n            v2 = uvs[index2 + 1] * base.height;\n        }\n\n        let x0 = vertices[index0];\n        let x1 = vertices[index1];\n        let x2 = vertices[index2];\n        let y0 = vertices[index0 + 1];\n        let y1 = vertices[index1 + 1];\n        let y2 = vertices[index2 + 1];\n\n        if (mesh.canvasPadding > 0)\n        {\n            const paddingX = mesh.canvasPadding / mesh.worldTransform.a;\n            const paddingY = mesh.canvasPadding / mesh.worldTransform.d;\n            const centerX = (x0 + x1 + x2) / 3;\n            const centerY = (y0 + y1 + y2) / 3;\n\n            let normX = x0 - centerX;\n            let normY = y0 - centerY;\n\n            let dist = Math.sqrt((normX * normX) + (normY * normY));\n\n            x0 = centerX + ((normX / dist) * (dist + paddingX));\n            y0 = centerY + ((normY / dist) * (dist + paddingY));\n\n            //\n\n            normX = x1 - centerX;\n            normY = y1 - centerY;\n\n            dist = Math.sqrt((normX * normX) + (normY * normY));\n            x1 = centerX + ((normX / dist) * (dist + paddingX));\n            y1 = centerY + ((normY / dist) * (dist + paddingY));\n\n            normX = x2 - centerX;\n            normY = y2 - centerY;\n\n            dist = Math.sqrt((normX * normX) + (normY * normY));\n            x2 = centerX + ((normX / dist) * (dist + paddingX));\n            y2 = centerY + ((normY / dist) * (dist + paddingY));\n        }\n\n        context.save();\n        context.beginPath();\n\n        context.moveTo(x0, y0);\n        context.lineTo(x1, y1);\n        context.lineTo(x2, y2);\n\n        context.closePath();\n\n        context.clip();\n\n        // Compute matrix transform\n        const delta = (u0 * v1) + (v0 * u2) + (u1 * v2) - (v1 * u2) - (v0 * u1) - (u0 * v2);\n        const deltaA = (x0 * v1) + (v0 * x2) + (x1 * v2) - (v1 * x2) - (v0 * x1) - (x0 * v2);\n        const deltaB = (u0 * x1) + (x0 * u2) + (u1 * x2) - (x1 * u2) - (x0 * u1) - (u0 * x2);\n        const deltaC = (u0 * v1 * x2) + (v0 * x1 * u2) + (x0 * u1 * v2) - (x0 * v1 * u2) - (v0 * u1 * x2) - (u0 * x1 * v2);\n        const deltaD = (y0 * v1) + (v0 * y2) + (y1 * v2) - (v1 * y2) - (v0 * y1) - (y0 * v2);\n        const deltaE = (u0 * y1) + (y0 * u2) + (u1 * y2) - (y1 * u2) - (y0 * u1) - (u0 * y2);\n        const deltaF = (u0 * v1 * y2) + (v0 * y1 * u2) + (y0 * u1 * v2) - (y0 * v1 * u2) - (v0 * u1 * y2) - (u0 * y1 * v2);\n\n        context.transform(\n            deltaA / delta,\n            deltaD / delta,\n            deltaB / delta,\n            deltaE / delta,\n            deltaC / delta,\n            deltaF / delta\n        );\n\n        context.drawImage(\n            textureSource,\n            0,\n            0,\n            textureWidth * base.resolution,\n            textureHeight * base.resolution,\n            0,\n            0,\n            textureWidth,\n            textureHeight\n        );\n\n        context.restore();\n        this.renderer.invalidateBlendMode();\n    }\n\n    /**\n     * Renders a flat Mesh\n     *\n     * @private\n     * @param {PIXI.mesh.Mesh} mesh - The Mesh to render\n     */\n    renderMeshFlat(mesh)\n    {\n        const context = this.renderer.context;\n        const vertices = mesh.vertices;\n        const length = vertices.length / 2;\n\n        // this.count++;\n\n        context.beginPath();\n\n        for (let i = 1; i < length - 2; ++i)\n        {\n            // draw some triangles!\n            const index = i * 2;\n\n            const x0 = vertices[index];\n            const y0 = vertices[index + 1];\n\n            const x1 = vertices[index + 2];\n            const y1 = vertices[index + 3];\n\n            const x2 = vertices[index + 4];\n            const y2 = vertices[index + 5];\n\n            context.moveTo(x0, y0);\n            context.lineTo(x1, y1);\n            context.lineTo(x2, y2);\n        }\n\n        context.fillStyle = '#FF0000';\n        context.fill();\n        context.closePath();\n    }\n\n    /**\n     * destroy the the renderer.\n     *\n     */\n    destroy()\n    {\n        this.renderer = null;\n    }\n}\n\ncore.CanvasRenderer.registerPlugin('mesh', MeshSpriteRenderer);\n","import * as core from '../../core';\nimport glCore from 'pixi-gl-core';\nimport { default as Mesh } from '../Mesh';\nimport { readFileSync } from 'fs';\nimport { join } from 'path';\n\nconst matrixIdentity = core.Matrix.IDENTITY;\n\n/**\n * WebGL renderer plugin for tiling sprites\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.ObjectRenderer\n */\nexport default class MeshRenderer extends core.ObjectRenderer\n{\n\n    /**\n     * constructor for renderer\n     *\n     * @param {WebGLRenderer} renderer The renderer this tiling awesomeness works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        this.shader = null;\n    }\n\n    /**\n     * Sets up the renderer context and necessary buffers.\n     *\n     * @private\n     */\n    onContextChange()\n    {\n        const gl = this.renderer.gl;\n\n        this.shader = new core.Shader(gl,\n            readFileSync(join(__dirname, './mesh.vert'), 'utf8'),\n            readFileSync(join(__dirname, './mesh.frag'), 'utf8'));\n    }\n\n    /**\n     * renders mesh\n     *\n     * @param {PIXI.mesh.Mesh} mesh mesh instance\n     */\n    render(mesh)\n    {\n        const renderer = this.renderer;\n        const gl = renderer.gl;\n        const texture = mesh._texture;\n\n        if (!texture.valid)\n        {\n            return;\n        }\n\n        let glData = mesh._glDatas[renderer.CONTEXT_UID];\n\n        if (!glData)\n        {\n            renderer.bindVao(null);\n\n            glData = {\n                shader: this.shader,\n                vertexBuffer: glCore.GLBuffer.createVertexBuffer(gl, mesh.vertices, gl.STREAM_DRAW),\n                uvBuffer: glCore.GLBuffer.createVertexBuffer(gl, mesh.uvs, gl.STREAM_DRAW),\n                indexBuffer: glCore.GLBuffer.createIndexBuffer(gl, mesh.indices, gl.STATIC_DRAW),\n                // build the vao object that will render..\n                vao: null,\n                dirty: mesh.dirty,\n                indexDirty: mesh.indexDirty,\n            };\n\n            // build the vao object that will render..\n            glData.vao = new glCore.VertexArrayObject(gl)\n                .addIndex(glData.indexBuffer)\n                .addAttribute(glData.vertexBuffer, glData.shader.attributes.aVertexPosition, gl.FLOAT, false, 2 * 4, 0)\n                .addAttribute(glData.uvBuffer, glData.shader.attributes.aTextureCoord, gl.FLOAT, false, 2 * 4, 0);\n\n            mesh._glDatas[renderer.CONTEXT_UID] = glData;\n        }\n\n        renderer.bindVao(glData.vao);\n\n        if (mesh.dirty !== glData.dirty)\n        {\n            glData.dirty = mesh.dirty;\n            glData.uvBuffer.upload(mesh.uvs);\n        }\n\n        if (mesh.indexDirty !== glData.indexDirty)\n        {\n            glData.indexDirty = mesh.indexDirty;\n            glData.indexBuffer.upload(mesh.indices);\n        }\n\n        glData.vertexBuffer.upload(mesh.vertices);\n\n        renderer.bindShader(glData.shader);\n\n        glData.shader.uniforms.uSampler = renderer.bindTexture(texture);\n\n        renderer.state.setBlendMode(core.utils.correctBlendMode(mesh.blendMode, texture.baseTexture.premultipliedAlpha));\n\n        if (glData.shader.uniforms.uTransform)\n        {\n            if (mesh.uploadUvTransform)\n            {\n                glData.shader.uniforms.uTransform = mesh._uvTransform.mapCoord.toArray(true);\n            }\n            else\n            {\n                glData.shader.uniforms.uTransform = matrixIdentity.toArray(true);\n            }\n        }\n        glData.shader.uniforms.translationMatrix = mesh.worldTransform.toArray(true);\n\n        glData.shader.uniforms.uColor = core.utils.premultiplyRgba(mesh.tintRgb,\n            mesh.worldAlpha, glData.shader.uniforms.uColor, texture.baseTexture.premultipliedAlpha);\n\n        const drawMode = mesh.drawMode === Mesh.DRAW_MODES.TRIANGLE_MESH ? gl.TRIANGLE_STRIP : gl.TRIANGLES;\n\n        glData.vao.draw(drawMode, mesh.indices.length, 0);\n    }\n}\n\ncore.WebGLRenderer.registerPlugin('mesh', MeshRenderer);\n","import * as core from '../core';\nimport { hex2rgb } from '../core/utils';\n\n/**\n * The ParticleContainer class is a really fast version of the Container built solely for speed,\n * so use when you need a lot of sprites or particles. The tradeoff of the ParticleContainer is that advanced\n * functionality will not work. ParticleContainer implements only the basic object transform (position, scale, rotation).\n * Any other functionality like tinting, masking, etc will not work on sprites in this batch.\n *\n * It's extremely easy to use :\n *\n * ```js\n * let container = new ParticleContainer();\n *\n * for (let i = 0; i < 100; ++i)\n * {\n *     let sprite = new PIXI.Sprite.fromImage(\"myImage.png\");\n *     container.addChild(sprite);\n * }\n * ```\n *\n * And here you have a hundred sprites that will be rendered at the speed of light.\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI.particles\n */\nexport default class ParticleContainer extends core.Container\n{\n    /**\n     * @param {number} [maxSize=15000] - The maximum number of particles that can be renderer by the container.\n     * @param {object} [properties] - The properties of children that should be uploaded to the gpu and applied.\n     * @param {boolean} [properties.scale=false] - When true, scale be uploaded and applied.\n     * @param {boolean} [properties.position=true] - When true, position be uploaded and applied.\n     * @param {boolean} [properties.rotation=false] - When true, rotation be uploaded and applied.\n     * @param {boolean} [properties.uvs=false] - When true, uvs be uploaded and applied.\n     * @param {boolean} [properties.alpha=false] - When true, alpha be uploaded and applied.\n     * @param {number} [batchSize=15000] - Number of particles per batch.\n     */\n    constructor(maxSize = 1500, properties, batchSize = 16384)\n    {\n        super();\n\n        // Making sure the batch size is valid\n        // 65535 is max vertex index in the index buffer (see ParticleRenderer)\n        // so max number of particles is 65536 / 4 = 16384\n        const maxBatchSize = 16384;\n\n        if (batchSize > maxBatchSize)\n        {\n            batchSize = maxBatchSize;\n        }\n\n        if (batchSize > maxSize)\n        {\n            batchSize = maxSize;\n        }\n\n        /**\n         * Set properties to be dynamic (true) / static (false)\n         *\n         * @member {boolean[]}\n         * @private\n         */\n        this._properties = [false, true, false, false, false];\n\n        /**\n         * @member {number}\n         * @private\n         */\n        this._maxSize = maxSize;\n\n        /**\n         * @member {number}\n         * @private\n         */\n        this._batchSize = batchSize;\n\n        /**\n         * @member {object<number, WebGLBuffer>}\n         * @private\n         */\n        this._glBuffers = {};\n\n        /**\n         * @member {number}\n         * @private\n         */\n        this._bufferToUpdate = 0;\n\n        /**\n         * @member {boolean}\n         *\n         */\n        this.interactiveChildren = false;\n\n        /**\n         * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL`\n         * to reset the blend mode.\n         *\n         * @member {number}\n         * @default PIXI.BLEND_MODES.NORMAL\n         * @see PIXI.BLEND_MODES\n         */\n        this.blendMode = core.BLEND_MODES.NORMAL;\n\n        /**\n         * Used for canvas renderering. If true then the elements will be positioned at the\n         * nearest pixel. This provides a nice speed boost.\n         *\n         * @member {boolean}\n         * @default true;\n         */\n        this.roundPixels = true;\n\n        /**\n         * The texture used to render the children.\n         *\n         * @readonly\n         * @member {BaseTexture}\n         */\n        this.baseTexture = null;\n\n        this.setProperties(properties);\n\n        /**\n         * The tint applied to the container.\n         * This is a hex value. A value of 0xFFFFFF will remove any tint effect.\n         *\n         * @private\n         * @member {number}\n         * @default 0xFFFFFF\n         */\n        this._tint = 0;\n        this.tintRgb = new Float32Array(4);\n        this.tint = 0xFFFFFF;\n    }\n\n    /**\n     * Sets the private properties array to dynamic / static based on the passed properties object\n     *\n     * @param {object} properties - The properties to be uploaded\n     */\n    setProperties(properties)\n    {\n        if (properties)\n        {\n            this._properties[0] = 'scale' in properties ? !!properties.scale : this._properties[0];\n            this._properties[1] = 'position' in properties ? !!properties.position : this._properties[1];\n            this._properties[2] = 'rotation' in properties ? !!properties.rotation : this._properties[2];\n            this._properties[3] = 'uvs' in properties ? !!properties.uvs : this._properties[3];\n            this._properties[4] = 'alpha' in properties ? !!properties.alpha : this._properties[4];\n        }\n    }\n\n    /**\n     * Updates the object transform for rendering\n     *\n     * @private\n     */\n    updateTransform()\n    {\n        // TODO don't need to!\n        this.displayObjectUpdateTransform();\n        //  PIXI.Container.prototype.updateTransform.call( this );\n    }\n\n    /**\n     * The tint applied to the container. This is a hex value.\n     * A value of 0xFFFFFF will remove any tint effect.\n     ** IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer.\n     * @member {number}\n     * @default 0xFFFFFF\n     */\n    get tint()\n    {\n        return this._tint;\n    }\n\n    set tint(value) // eslint-disable-line require-jsdoc\n    {\n        this._tint = value;\n        hex2rgb(value, this.tintRgb);\n    }\n\n    /**\n     * Renders the container using the WebGL renderer\n     *\n     * @private\n     * @param {PIXI.WebGLRenderer} renderer - The webgl renderer\n     */\n    renderWebGL(renderer)\n    {\n        if (!this.visible || this.worldAlpha <= 0 || !this.children.length || !this.renderable)\n        {\n            return;\n        }\n\n        if (!this.baseTexture)\n        {\n            this.baseTexture = this.children[0]._texture.baseTexture;\n            if (!this.baseTexture.hasLoaded)\n            {\n                this.baseTexture.once('update', () => this.onChildrenChange(0));\n            }\n        }\n\n        renderer.setObjectRenderer(renderer.plugins.particle);\n        renderer.plugins.particle.render(this);\n    }\n\n    /**\n     * Set the flag that static data should be updated to true\n     *\n     * @private\n     * @param {number} smallestChildIndex - The smallest child index\n     */\n    onChildrenChange(smallestChildIndex)\n    {\n        const bufferIndex = Math.floor(smallestChildIndex / this._batchSize);\n\n        if (bufferIndex < this._bufferToUpdate)\n        {\n            this._bufferToUpdate = bufferIndex;\n        }\n    }\n\n    /**\n     * Renders the object using the Canvas renderer\n     *\n     * @private\n     * @param {PIXI.CanvasRenderer} renderer - The canvas renderer\n     */\n    renderCanvas(renderer)\n    {\n        if (!this.visible || this.worldAlpha <= 0 || !this.children.length || !this.renderable)\n        {\n            return;\n        }\n\n        const context = renderer.context;\n        const transform = this.worldTransform;\n        let isRotated = true;\n\n        let positionX = 0;\n        let positionY = 0;\n\n        let finalWidth = 0;\n        let finalHeight = 0;\n\n        renderer.setBlendMode(this.blendMode);\n\n        context.globalAlpha = this.worldAlpha;\n\n        this.displayObjectUpdateTransform();\n\n        for (let i = 0; i < this.children.length; ++i)\n        {\n            const child = this.children[i];\n\n            if (!child.visible)\n            {\n                continue;\n            }\n\n            const frame = child._texture.frame;\n\n            context.globalAlpha = this.worldAlpha * child.alpha;\n\n            if (child.rotation % (Math.PI * 2) === 0)\n            {\n                // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call\n                if (isRotated)\n                {\n                    context.setTransform(\n                        transform.a,\n                        transform.b,\n                        transform.c,\n                        transform.d,\n                        transform.tx * renderer.resolution,\n                        transform.ty * renderer.resolution\n                    );\n\n                    isRotated = false;\n                }\n\n                positionX = ((child.anchor.x) * (-frame.width * child.scale.x)) + child.position.x + 0.5;\n                positionY = ((child.anchor.y) * (-frame.height * child.scale.y)) + child.position.y + 0.5;\n\n                finalWidth = frame.width * child.scale.x;\n                finalHeight = frame.height * child.scale.y;\n            }\n            else\n            {\n                if (!isRotated)\n                {\n                    isRotated = true;\n                }\n\n                child.displayObjectUpdateTransform();\n\n                const childTransform = child.worldTransform;\n\n                if (renderer.roundPixels)\n                {\n                    context.setTransform(\n                        childTransform.a,\n                        childTransform.b,\n                        childTransform.c,\n                        childTransform.d,\n                        (childTransform.tx * renderer.resolution) | 0,\n                        (childTransform.ty * renderer.resolution) | 0\n                    );\n                }\n                else\n                {\n                    context.setTransform(\n                        childTransform.a,\n                        childTransform.b,\n                        childTransform.c,\n                        childTransform.d,\n                        childTransform.tx * renderer.resolution,\n                        childTransform.ty * renderer.resolution\n                    );\n                }\n\n                positionX = ((child.anchor.x) * (-frame.width)) + 0.5;\n                positionY = ((child.anchor.y) * (-frame.height)) + 0.5;\n\n                finalWidth = frame.width;\n                finalHeight = frame.height;\n            }\n\n            const resolution = child._texture.baseTexture.resolution;\n\n            context.drawImage(\n                child._texture.baseTexture.source,\n                frame.x * resolution,\n                frame.y * resolution,\n                frame.width * resolution,\n                frame.height * resolution,\n                positionX * renderer.resolution,\n                positionY * renderer.resolution,\n                finalWidth * renderer.resolution,\n                finalHeight * renderer.resolution\n            );\n        }\n    }\n\n    /**\n     * Destroys the container\n     *\n     * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @param {boolean} [options.children=false] - if set to true, all the children will have their\n     *  destroy method called as well. 'options' will be passed on to those calls.\n     * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the texture of the child sprite\n     * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true\n     *  Should it destroy the base texture of the child sprite\n     */\n    destroy(options)\n    {\n        super.destroy(options);\n\n        if (this._buffers)\n        {\n            for (let i = 0; i < this._buffers.length; ++i)\n            {\n                this._buffers[i].destroy();\n            }\n        }\n\n        this._properties = null;\n        this._buffers = null;\n    }\n}\n","import glCore from 'pixi-gl-core';\nimport createIndicesForQuads from '../../core/utils/createIndicesForQuads';\n\n/**\n * @author Mat Groves\n *\n * Big thanks to the very clever Matt DesLauriers <mattdesl> https://github.com/mattdesl/\n * for creating the original PixiJS version!\n * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that\n * they now share 4 bytes on the vertex buffer\n *\n * Heavily inspired by LibGDX's ParticleBuffer:\n * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/ParticleBuffer.java\n */\n\n/**\n * The particle buffer manages the static and dynamic buffers for a particle container.\n *\n * @class\n * @private\n * @memberof PIXI\n */\nexport default class ParticleBuffer\n{\n    /**\n     * @param {WebGLRenderingContext} gl - The rendering context.\n     * @param {object} properties - The properties to upload.\n     * @param {boolean[]} dynamicPropertyFlags - Flags for which properties are dynamic.\n     * @param {number} size - The size of the batch.\n     */\n    constructor(gl, properties, dynamicPropertyFlags, size)\n    {\n        /**\n         * The current WebGL drawing context.\n         *\n         * @member {WebGLRenderingContext}\n         */\n        this.gl = gl;\n\n        /**\n         * Size of a single vertex.\n         *\n         * @member {number}\n         */\n        this.vertSize = 2;\n\n        /**\n         * Size of a single vertex in bytes.\n         *\n         * @member {number}\n         */\n        this.vertByteSize = this.vertSize * 4;\n\n        /**\n         * The number of particles the buffer can hold\n         *\n         * @member {number}\n         */\n        this.size = size;\n\n        /**\n         * A list of the properties that are dynamic.\n         *\n         * @member {object[]}\n         */\n        this.dynamicProperties = [];\n\n        /**\n         * A list of the properties that are static.\n         *\n         * @member {object[]}\n         */\n        this.staticProperties = [];\n\n        for (let i = 0; i < properties.length; ++i)\n        {\n            let property = properties[i];\n\n            // Make copy of properties object so that when we edit the offset it doesn't\n            // change all other instances of the object literal\n            property = {\n                attribute: property.attribute,\n                size: property.size,\n                uploadFunction: property.uploadFunction,\n                offset: property.offset,\n            };\n\n            if (dynamicPropertyFlags[i])\n            {\n                this.dynamicProperties.push(property);\n            }\n            else\n            {\n                this.staticProperties.push(property);\n            }\n        }\n\n        this.staticStride = 0;\n        this.staticBuffer = null;\n        this.staticData = null;\n\n        this.dynamicStride = 0;\n        this.dynamicBuffer = null;\n        this.dynamicData = null;\n\n        this.initBuffers();\n    }\n\n    /**\n     * Sets up the renderer context and necessary buffers.\n     *\n     * @private\n     */\n    initBuffers()\n    {\n        const gl = this.gl;\n        let dynamicOffset = 0;\n\n        /**\n         * Holds the indices of the geometry (quads) to draw\n         *\n         * @member {Uint16Array}\n         */\n        this.indices = createIndicesForQuads(this.size);\n        this.indexBuffer = glCore.GLBuffer.createIndexBuffer(gl, this.indices, gl.STATIC_DRAW);\n\n        this.dynamicStride = 0;\n\n        for (let i = 0; i < this.dynamicProperties.length; ++i)\n        {\n            const property = this.dynamicProperties[i];\n\n            property.offset = dynamicOffset;\n            dynamicOffset += property.size;\n            this.dynamicStride += property.size;\n        }\n\n        this.dynamicData = new Float32Array(this.size * this.dynamicStride * 4);\n        this.dynamicBuffer = glCore.GLBuffer.createVertexBuffer(gl, this.dynamicData, gl.STREAM_DRAW);\n\n        // static //\n        let staticOffset = 0;\n\n        this.staticStride = 0;\n\n        for (let i = 0; i < this.staticProperties.length; ++i)\n        {\n            const property = this.staticProperties[i];\n\n            property.offset = staticOffset;\n            staticOffset += property.size;\n            this.staticStride += property.size;\n        }\n\n        this.staticData = new Float32Array(this.size * this.staticStride * 4);\n        this.staticBuffer = glCore.GLBuffer.createVertexBuffer(gl, this.staticData, gl.STATIC_DRAW);\n\n        this.vao = new glCore.VertexArrayObject(gl)\n        .addIndex(this.indexBuffer);\n\n        for (let i = 0; i < this.dynamicProperties.length; ++i)\n        {\n            const property = this.dynamicProperties[i];\n\n            this.vao.addAttribute(\n                this.dynamicBuffer,\n                property.attribute,\n                gl.FLOAT,\n                false,\n                this.dynamicStride * 4,\n                property.offset * 4\n            );\n        }\n\n        for (let i = 0; i < this.staticProperties.length; ++i)\n        {\n            const property = this.staticProperties[i];\n\n            this.vao.addAttribute(\n                this.staticBuffer,\n                property.attribute,\n                gl.FLOAT,\n                false,\n                this.staticStride * 4,\n                property.offset * 4\n            );\n        }\n    }\n\n    /**\n     * Uploads the dynamic properties.\n     *\n     * @param {PIXI.DisplayObject[]} children - The children to upload.\n     * @param {number} startIndex - The index to start at.\n     * @param {number} amount - The number to upload.\n     */\n    uploadDynamic(children, startIndex, amount)\n    {\n        for (let i = 0; i < this.dynamicProperties.length; i++)\n        {\n            const property = this.dynamicProperties[i];\n\n            property.uploadFunction(children, startIndex, amount, this.dynamicData, this.dynamicStride, property.offset);\n        }\n\n        this.dynamicBuffer.upload();\n    }\n\n    /**\n     * Uploads the static properties.\n     *\n     * @param {PIXI.DisplayObject[]} children - The children to upload.\n     * @param {number} startIndex - The index to start at.\n     * @param {number} amount - The number to upload.\n     */\n    uploadStatic(children, startIndex, amount)\n    {\n        for (let i = 0; i < this.staticProperties.length; i++)\n        {\n            const property = this.staticProperties[i];\n\n            property.uploadFunction(children, startIndex, amount, this.staticData, this.staticStride, property.offset);\n        }\n\n        this.staticBuffer.upload();\n    }\n\n    /**\n     * Destroys the ParticleBuffer.\n     *\n     */\n    destroy()\n    {\n        this.dynamicProperties = null;\n        this.dynamicData = null;\n        this.dynamicBuffer.destroy();\n\n        this.staticProperties = null;\n        this.staticData = null;\n        this.staticBuffer.destroy();\n    }\n\n}\n","import * as core from '../../core';\nimport ParticleShader from './ParticleShader';\nimport ParticleBuffer from './ParticleBuffer';\n\n/**\n * @author Mat Groves\n *\n * Big thanks to the very clever Matt DesLauriers <mattdesl> https://github.com/mattdesl/\n * for creating the original PixiJS version!\n * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that they now\n * share 4 bytes on the vertex buffer\n *\n * Heavily inspired by LibGDX's ParticleRenderer:\n * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/ParticleRenderer.java\n */\n\n/**\n *\n * @class\n * @private\n * @memberof PIXI\n */\nexport default class ParticleRenderer extends core.ObjectRenderer\n{\n    /**\n     * @param {PIXI.WebGLRenderer} renderer - The renderer this sprite batch works for.\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        // 65535 is max vertex index in the index buffer (see ParticleRenderer)\n        // so max number of particles is 65536 / 4 = 16384\n        // and max number of element in the index buffer is 16384 * 6 = 98304\n        // Creating a full index buffer, overhead is 98304 * 2 = 196Ko\n        // let numIndices = 98304;\n\n        /**\n         * The default shader that is used if a sprite doesn't have a more specific one.\n         *\n         * @member {PIXI.Shader}\n         */\n        this.shader = null;\n\n        this.indexBuffer = null;\n\n        this.properties = null;\n\n        this.tempMatrix = new core.Matrix();\n\n        this.CONTEXT_UID = 0;\n    }\n\n    /**\n     * When there is a WebGL context change\n     *\n     * @private\n     */\n    onContextChange()\n    {\n        const gl = this.renderer.gl;\n\n        this.CONTEXT_UID = this.renderer.CONTEXT_UID;\n\n        // setup default shader\n        this.shader = new ParticleShader(gl);\n\n        this.properties = [\n            // verticesData\n            {\n                attribute: this.shader.attributes.aVertexPosition,\n                size: 2,\n                uploadFunction: this.uploadVertices,\n                offset: 0,\n            },\n            // positionData\n            {\n                attribute: this.shader.attributes.aPositionCoord,\n                size: 2,\n                uploadFunction: this.uploadPosition,\n                offset: 0,\n            },\n            // rotationData\n            {\n                attribute: this.shader.attributes.aRotation,\n                size: 1,\n                uploadFunction: this.uploadRotation,\n                offset: 0,\n            },\n            // uvsData\n            {\n                attribute: this.shader.attributes.aTextureCoord,\n                size: 2,\n                uploadFunction: this.uploadUvs,\n                offset: 0,\n            },\n            // alphaData\n            {\n                attribute: this.shader.attributes.aColor,\n                size: 1,\n                uploadFunction: this.uploadAlpha,\n                offset: 0,\n            },\n        ];\n    }\n\n    /**\n     * Starts a new particle batch.\n     *\n     */\n    start()\n    {\n        this.renderer.bindShader(this.shader);\n    }\n\n    /**\n     * Renders the particle container object.\n     *\n     * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer\n     */\n    render(container)\n    {\n        const children = container.children;\n        const maxSize = container._maxSize;\n        const batchSize = container._batchSize;\n        const renderer = this.renderer;\n        let totalChildren = children.length;\n\n        if (totalChildren === 0)\n        {\n            return;\n        }\n        else if (totalChildren > maxSize)\n        {\n            totalChildren = maxSize;\n        }\n\n        let buffers = container._glBuffers[renderer.CONTEXT_UID];\n\n        if (!buffers)\n        {\n            buffers = container._glBuffers[renderer.CONTEXT_UID] = this.generateBuffers(container);\n        }\n\n        const baseTexture = children[0]._texture.baseTexture;\n\n        // if the uvs have not updated then no point rendering just yet!\n        this.renderer.setBlendMode(core.utils.correctBlendMode(container.blendMode, baseTexture.premultipliedAlpha));\n\n        const gl = renderer.gl;\n\n        const m = container.worldTransform.copy(this.tempMatrix);\n\n        m.prepend(renderer._activeRenderTarget.projectionMatrix);\n\n        this.shader.uniforms.projectionMatrix = m.toArray(true);\n\n        this.shader.uniforms.uColor = core.utils.premultiplyRgba(container.tintRgb,\n            container.worldAlpha, this.shader.uniforms.uColor, baseTexture.premultipliedAlpha);\n\n        // make sure the texture is bound..\n        this.shader.uniforms.uSampler = renderer.bindTexture(baseTexture);\n\n        // now lets upload and render the buffers..\n        for (let i = 0, j = 0; i < totalChildren; i += batchSize, j += 1)\n        {\n            let amount = (totalChildren - i);\n\n            if (amount > batchSize)\n            {\n                amount = batchSize;\n            }\n\n            const buffer = buffers[j];\n\n            // we always upload the dynamic\n            buffer.uploadDynamic(children, i, amount);\n\n            // we only upload the static content when we have to!\n            if (container._bufferToUpdate === j)\n            {\n                buffer.uploadStatic(children, i, amount);\n                container._bufferToUpdate = j + 1;\n            }\n\n            // bind the buffer\n            renderer.bindVao(buffer.vao);\n            buffer.vao.draw(gl.TRIANGLES, amount * 6);\n        }\n    }\n\n    /**\n     * Creates one particle buffer for each child in the container we want to render and updates internal properties\n     *\n     * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer\n     * @return {PIXI.ParticleBuffer[]} The buffers\n     */\n    generateBuffers(container)\n    {\n        const gl = this.renderer.gl;\n        const buffers = [];\n        const size = container._maxSize;\n        const batchSize = container._batchSize;\n        const dynamicPropertyFlags = container._properties;\n\n        for (let i = 0; i < size; i += batchSize)\n        {\n            buffers.push(new ParticleBuffer(gl, this.properties, dynamicPropertyFlags, batchSize));\n        }\n\n        return buffers;\n    }\n\n    /**\n     * Uploads the verticies.\n     *\n     * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n     * @param {number} startIndex - the index to start from in the children array\n     * @param {number} amount - the amount of children that will have their vertices uploaded\n     * @param {number[]} array - The vertices to upload.\n     * @param {number} stride - Stride to use for iteration.\n     * @param {number} offset - Offset to start at.\n     */\n    uploadVertices(children, startIndex, amount, array, stride, offset)\n    {\n        let w0 = 0;\n        let w1 = 0;\n        let h0 = 0;\n        let h1 = 0;\n\n        for (let i = 0; i < amount; ++i)\n        {\n            const sprite = children[startIndex + i];\n            const texture = sprite._texture;\n            const sx = sprite.scale.x;\n            const sy = sprite.scale.y;\n            const trim = texture.trim;\n            const orig = texture.orig;\n\n            if (trim)\n            {\n                // if the sprite is trimmed and is not a tilingsprite then we need to add the\n                // extra space before transforming the sprite coords..\n                w1 = trim.x - (sprite.anchor.x * orig.width);\n                w0 = w1 + trim.width;\n\n                h1 = trim.y - (sprite.anchor.y * orig.height);\n                h0 = h1 + trim.height;\n            }\n            else\n            {\n                w0 = (orig.width) * (1 - sprite.anchor.x);\n                w1 = (orig.width) * -sprite.anchor.x;\n\n                h0 = orig.height * (1 - sprite.anchor.y);\n                h1 = orig.height * -sprite.anchor.y;\n            }\n\n            array[offset] = w1 * sx;\n            array[offset + 1] = h1 * sy;\n\n            array[offset + stride] = w0 * sx;\n            array[offset + stride + 1] = h1 * sy;\n\n            array[offset + (stride * 2)] = w0 * sx;\n            array[offset + (stride * 2) + 1] = h0 * sy;\n\n            array[offset + (stride * 3)] = w1 * sx;\n            array[offset + (stride * 3) + 1] = h0 * sy;\n\n            offset += stride * 4;\n        }\n    }\n\n    /**\n     *\n     * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n     * @param {number} startIndex - the index to start from in the children array\n     * @param {number} amount - the amount of children that will have their positions uploaded\n     * @param {number[]} array - The vertices to upload.\n     * @param {number} stride - Stride to use for iteration.\n     * @param {number} offset - Offset to start at.\n     */\n    uploadPosition(children, startIndex, amount, array, stride, offset)\n    {\n        for (let i = 0; i < amount; i++)\n        {\n            const spritePosition = children[startIndex + i].position;\n\n            array[offset] = spritePosition.x;\n            array[offset + 1] = spritePosition.y;\n\n            array[offset + stride] = spritePosition.x;\n            array[offset + stride + 1] = spritePosition.y;\n\n            array[offset + (stride * 2)] = spritePosition.x;\n            array[offset + (stride * 2) + 1] = spritePosition.y;\n\n            array[offset + (stride * 3)] = spritePosition.x;\n            array[offset + (stride * 3) + 1] = spritePosition.y;\n\n            offset += stride * 4;\n        }\n    }\n\n    /**\n     *\n     * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n     * @param {number} startIndex - the index to start from in the children array\n     * @param {number} amount - the amount of children that will have their rotation uploaded\n     * @param {number[]} array - The vertices to upload.\n     * @param {number} stride - Stride to use for iteration.\n     * @param {number} offset - Offset to start at.\n     */\n    uploadRotation(children, startIndex, amount, array, stride, offset)\n    {\n        for (let i = 0; i < amount; i++)\n        {\n            const spriteRotation = children[startIndex + i].rotation;\n\n            array[offset] = spriteRotation;\n            array[offset + stride] = spriteRotation;\n            array[offset + (stride * 2)] = spriteRotation;\n            array[offset + (stride * 3)] = spriteRotation;\n\n            offset += stride * 4;\n        }\n    }\n\n    /**\n     *\n     * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n     * @param {number} startIndex - the index to start from in the children array\n     * @param {number} amount - the amount of children that will have their rotation uploaded\n     * @param {number[]} array - The vertices to upload.\n     * @param {number} stride - Stride to use for iteration.\n     * @param {number} offset - Offset to start at.\n     */\n    uploadUvs(children, startIndex, amount, array, stride, offset)\n    {\n        for (let i = 0; i < amount; ++i)\n        {\n            const textureUvs = children[startIndex + i]._texture._uvs;\n\n            if (textureUvs)\n            {\n                array[offset] = textureUvs.x0;\n                array[offset + 1] = textureUvs.y0;\n\n                array[offset + stride] = textureUvs.x1;\n                array[offset + stride + 1] = textureUvs.y1;\n\n                array[offset + (stride * 2)] = textureUvs.x2;\n                array[offset + (stride * 2) + 1] = textureUvs.y2;\n\n                array[offset + (stride * 3)] = textureUvs.x3;\n                array[offset + (stride * 3) + 1] = textureUvs.y3;\n\n                offset += stride * 4;\n            }\n            else\n            {\n                // TODO you know this can be easier!\n                array[offset] = 0;\n                array[offset + 1] = 0;\n\n                array[offset + stride] = 0;\n                array[offset + stride + 1] = 0;\n\n                array[offset + (stride * 2)] = 0;\n                array[offset + (stride * 2) + 1] = 0;\n\n                array[offset + (stride * 3)] = 0;\n                array[offset + (stride * 3) + 1] = 0;\n\n                offset += stride * 4;\n            }\n        }\n    }\n\n    /**\n     *\n     * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n     * @param {number} startIndex - the index to start from in the children array\n     * @param {number} amount - the amount of children that will have their rotation uploaded\n     * @param {number[]} array - The vertices to upload.\n     * @param {number} stride - Stride to use for iteration.\n     * @param {number} offset - Offset to start at.\n     */\n    uploadAlpha(children, startIndex, amount, array, stride, offset)\n    {\n        for (let i = 0; i < amount; i++)\n        {\n            const spriteAlpha = children[startIndex + i].alpha;\n\n            array[offset] = spriteAlpha;\n            array[offset + stride] = spriteAlpha;\n            array[offset + (stride * 2)] = spriteAlpha;\n            array[offset + (stride * 3)] = spriteAlpha;\n\n            offset += stride * 4;\n        }\n    }\n\n    /**\n     * Destroys the ParticleRenderer.\n     *\n     */\n    destroy()\n    {\n        if (this.renderer.gl)\n        {\n            this.renderer.gl.deleteBuffer(this.indexBuffer);\n        }\n\n        super.destroy();\n\n        this.shader.destroy();\n\n        this.indices = null;\n        this.tempMatrix = null;\n    }\n\n}\n\ncore.WebGLRenderer.registerPlugin('particle', ParticleRenderer);\n","import Shader from '../../core/Shader';\n\n/**\n * @class\n * @extends PIXI.Shader\n * @memberof PIXI\n */\nexport default class ParticleShader extends Shader\n{\n    /**\n     * @param {PIXI.Shader} gl - The webgl shader manager this shader works for.\n     */\n    constructor(gl)\n    {\n        super(\n            gl,\n            // vertex shader\n            [\n                'attribute vec2 aVertexPosition;',\n                'attribute vec2 aTextureCoord;',\n                'attribute float aColor;',\n\n                'attribute vec2 aPositionCoord;',\n                'attribute vec2 aScale;',\n                'attribute float aRotation;',\n\n                'uniform mat3 projectionMatrix;',\n\n                'varying vec2 vTextureCoord;',\n                'varying float vColor;',\n\n                'void main(void){',\n                '   vec2 v = aVertexPosition;',\n\n                '   v.x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);',\n                '   v.y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);',\n                '   v = v + aPositionCoord;',\n\n                '   gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);',\n\n                '   vTextureCoord = aTextureCoord;',\n                '   vColor = aColor;',\n                '}',\n            ].join('\\n'),\n            // hello\n            [\n                'varying vec2 vTextureCoord;',\n                'varying float vColor;',\n\n                'uniform sampler2D uSampler;',\n                'uniform vec4 uColor;',\n\n                'void main(void){',\n                '  vec4 color = texture2D(uSampler, vTextureCoord) * vColor * uColor;',\n                '  if (color.a == 0.0) discard;',\n                '  gl_FragColor = color;',\n                '}',\n            ].join('\\n')\n        );\n    }\n}\n","// References:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign\n\nif (!Math.sign)\n{\n    Math.sign = function mathSign(x)\n    {\n        x = Number(x);\n\n        if (x === 0 || isNaN(x))\n        {\n            return x;\n        }\n\n        return x > 0 ? 1 : -1;\n    };\n}\n","import './Object.assign';\nimport './requestAnimationFrame';\nimport './Math.sign';\n\nif (!window.ArrayBuffer)\n{\n    window.ArrayBuffer = Array;\n}\n\nif (!window.Float32Array)\n{\n    window.Float32Array = Array;\n}\n\nif (!window.Uint32Array)\n{\n    window.Uint32Array = Array;\n}\n\nif (!window.Uint16Array)\n{\n    window.Uint16Array = Array;\n}\n","// References:\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\n// https://gist.github.com/1579671\n// http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision\n// https://gist.github.com/timhall/4078614\n// https://github.com/Financial-Times/polyfill-service/tree/master/polyfills/requestAnimationFrame\n\n// Expected to be used with Browserfiy\n// Browserify automatically detects the use of `global` and passes the\n// correct reference of `global`, `self`, and finally `window`\n\nconst ONE_FRAME_TIME = 16;\n\n// Date.now\nif (!(Date.now && Date.prototype.getTime))\n{\n    Date.now = function now()\n    {\n        return new Date().getTime();\n    };\n}\n\n// performance.now\nif (!(global.performance && global.performance.now))\n{\n    const startTime = Date.now();\n\n    if (!global.performance)\n    {\n        global.performance = {};\n    }\n\n    global.performance.now = () => Date.now() - startTime;\n}\n\n// requestAnimationFrame\nlet lastTime = Date.now();\nconst vendors = ['ms', 'moz', 'webkit', 'o'];\n\nfor (let x = 0; x < vendors.length && !global.requestAnimationFrame; ++x)\n{\n    const p = vendors[x];\n\n    global.requestAnimationFrame = global[`${p}RequestAnimationFrame`];\n    global.cancelAnimationFrame = global[`${p}CancelAnimationFrame`] || global[`${p}CancelRequestAnimationFrame`];\n}\n\nif (!global.requestAnimationFrame)\n{\n    global.requestAnimationFrame = (callback) =>\n    {\n        if (typeof callback !== 'function')\n        {\n            throw new TypeError(`${callback}is not a function`);\n        }\n\n        const currentTime = Date.now();\n        let delay = ONE_FRAME_TIME + lastTime - currentTime;\n\n        if (delay < 0)\n        {\n            delay = 0;\n        }\n\n        lastTime = currentTime;\n\n        return setTimeout(() =>\n        {\n            lastTime = Date.now();\n            callback(performance.now());\n        }, delay);\n    };\n}\n\nif (!global.cancelAnimationFrame)\n{\n    global.cancelAnimationFrame = (id) => clearTimeout(id);\n}\n","import * as core from '../core';\nimport CountLimiter from './limiters/CountLimiter';\nconst SharedTicker = core.ticker.shared;\n\n/**\n * Default number of uploads per frame using prepare plugin.\n *\n * @static\n * @memberof PIXI.settings\n * @name UPLOADS_PER_FRAME\n * @type {number}\n * @default 4\n */\ncore.settings.UPLOADS_PER_FRAME = 4;\n\n/**\n * The prepare manager provides functionality to upload content to the GPU. BasePrepare handles\n * basic queuing functionality and is extended by {@link PIXI.prepare.WebGLPrepare} and {@link PIXI.prepare.CanvasPrepare}\n * to provide preparation capabilities specific to their respective renderers.\n *\n * @example\n * // Create a sprite\n * const sprite = new PIXI.Sprite.fromImage('something.png');\n *\n * // Load object into GPU\n * app.renderer.plugins.prepare.upload(sprite, () => {\n *\n *     //Texture(s) has been uploaded to GPU\n *     app.stage.addChild(sprite);\n *\n * })\n *\n * @abstract\n * @class\n * @memberof PIXI.prepare\n */\nexport default class BasePrepare\n{\n    /**\n     * @param {PIXI.SystemRenderer} renderer - A reference to the current renderer\n     */\n    constructor(renderer)\n    {\n        /**\n         * The limiter to be used to control how quickly items are prepared.\n         * @type {PIXI.prepare.CountLimiter|PIXI.prepare.TimeLimiter}\n         */\n        this.limiter = new CountLimiter(core.settings.UPLOADS_PER_FRAME);\n\n        /**\n         * Reference to the renderer.\n         * @type {PIXI.SystemRenderer}\n         * @protected\n         */\n        this.renderer = renderer;\n\n        /**\n         * The only real difference between CanvasPrepare and WebGLPrepare is what they pass\n         * to upload hooks. That different parameter is stored here.\n         * @type {PIXI.prepare.CanvasPrepare|PIXI.WebGLRenderer}\n         * @protected\n         */\n        this.uploadHookHelper = null;\n\n        /**\n         * Collection of items to uploads at once.\n         * @type {Array<*>}\n         * @private\n         */\n        this.queue = [];\n\n        /**\n         * Collection of additional hooks for finding assets.\n         * @type {Array<Function>}\n         * @private\n         */\n        this.addHooks = [];\n\n        /**\n         * Collection of additional hooks for processing assets.\n         * @type {Array<Function>}\n         * @private\n         */\n        this.uploadHooks = [];\n\n        /**\n         * Callback to call after completed.\n         * @type {Array<Function>}\n         * @private\n         */\n        this.completes = [];\n\n        /**\n         * If prepare is ticking (running).\n         * @type {boolean}\n         * @private\n         */\n        this.ticking = false;\n\n        /**\n         * 'bound' call for prepareItems().\n         * @type {Function}\n         * @private\n         */\n        this.delayedTick = () =>\n        {\n            // unlikely, but in case we were destroyed between tick() and delayedTick()\n            if (!this.queue)\n            {\n                return;\n            }\n            this.prepareItems();\n        };\n\n        // hooks to find the correct texture\n        this.registerFindHook(findText);\n        this.registerFindHook(findTextStyle);\n        this.registerFindHook(findMultipleBaseTextures);\n        this.registerFindHook(findBaseTexture);\n        this.registerFindHook(findTexture);\n\n        // upload hooks\n        this.registerUploadHook(drawText);\n        this.registerUploadHook(calculateTextStyle);\n    }\n\n    /**\n     * Upload all the textures and graphics to the GPU.\n     *\n     * @param {Function|PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text} item -\n     *        Either the container or display object to search for items to upload, the items to upload themselves,\n     *        or the callback function, if items have been added using `prepare.add`.\n     * @param {Function} [done] - Optional callback when all queued uploads have completed\n     */\n    upload(item, done)\n    {\n        if (typeof item === 'function')\n        {\n            done = item;\n            item = null;\n        }\n\n        // If a display object, search for items\n        // that we could upload\n        if (item)\n        {\n            this.add(item);\n        }\n\n        // Get the items for upload from the display\n        if (this.queue.length)\n        {\n            if (done)\n            {\n                this.completes.push(done);\n            }\n\n            if (!this.ticking)\n            {\n                this.ticking = true;\n                SharedTicker.addOnce(this.tick, this, core.UPDATE_PRIORITY.UTILITY);\n            }\n        }\n        else if (done)\n        {\n            done();\n        }\n    }\n\n    /**\n     * Handle tick update\n     *\n     * @private\n     */\n    tick()\n    {\n        setTimeout(this.delayedTick, 0);\n    }\n\n    /**\n     * Actually prepare items. This is handled outside of the tick because it will take a while\n     * and we do NOT want to block the current animation frame from rendering.\n     *\n     * @private\n     */\n    prepareItems()\n    {\n        this.limiter.beginFrame();\n        // Upload the graphics\n        while (this.queue.length && this.limiter.allowedToUpload())\n        {\n            const item = this.queue[0];\n            let uploaded = false;\n\n            if (item && !item._destroyed)\n            {\n                for (let i = 0, len = this.uploadHooks.length; i < len; i++)\n                {\n                    if (this.uploadHooks[i](this.uploadHookHelper, item))\n                    {\n                        this.queue.shift();\n                        uploaded = true;\n                        break;\n                    }\n                }\n            }\n\n            if (!uploaded)\n            {\n                this.queue.shift();\n            }\n        }\n\n        // We're finished\n        if (!this.queue.length)\n        {\n            this.ticking = false;\n\n            const completes = this.completes.slice(0);\n\n            this.completes.length = 0;\n\n            for (let i = 0, len = completes.length; i < len; i++)\n            {\n                completes[i]();\n            }\n        }\n        else\n        {\n            // if we are not finished, on the next rAF do this again\n            SharedTicker.addOnce(this.tick, this, core.UPDATE_PRIORITY.UTILITY);\n        }\n    }\n\n    /**\n     * Adds hooks for finding items.\n     *\n     * @param {Function} addHook - Function call that takes two parameters: `item:*, queue:Array`\n     *          function must return `true` if it was able to add item to the queue.\n     * @return {PIXI.BasePrepare} Instance of plugin for chaining.\n     */\n    registerFindHook(addHook)\n    {\n        if (addHook)\n        {\n            this.addHooks.push(addHook);\n        }\n\n        return this;\n    }\n\n    /**\n     * Adds hooks for uploading items.\n     *\n     * @param {Function} uploadHook - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and\n     *          function must return `true` if it was able to handle upload of item.\n     * @return {PIXI.BasePrepare} Instance of plugin for chaining.\n     */\n    registerUploadHook(uploadHook)\n    {\n        if (uploadHook)\n        {\n            this.uploadHooks.push(uploadHook);\n        }\n\n        return this;\n    }\n\n    /**\n     * Manually add an item to the uploading queue.\n     *\n     * @param {PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text|*} item - Object to\n     *        add to the queue\n     * @return {PIXI.CanvasPrepare} Instance of plugin for chaining.\n     */\n    add(item)\n    {\n        // Add additional hooks for finding elements on special\n        // types of objects that\n        for (let i = 0, len = this.addHooks.length; i < len; i++)\n        {\n            if (this.addHooks[i](item, this.queue))\n            {\n                break;\n            }\n        }\n\n        // Get childen recursively\n        if (item instanceof core.Container)\n        {\n            for (let i = item.children.length - 1; i >= 0; i--)\n            {\n                this.add(item.children[i]);\n            }\n        }\n\n        return this;\n    }\n\n    /**\n     * Destroys the plugin, don't use after this.\n     *\n     */\n    destroy()\n    {\n        if (this.ticking)\n        {\n            SharedTicker.remove(this.tick, this);\n        }\n        this.ticking = false;\n        this.addHooks = null;\n        this.uploadHooks = null;\n        this.renderer = null;\n        this.completes = null;\n        this.queue = null;\n        this.limiter = null;\n        this.uploadHookHelper = null;\n    }\n\n}\n\n/**\n * Built-in hook to find multiple textures from objects like AnimatedSprites.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Texture object was found.\n */\nfunction findMultipleBaseTextures(item, queue)\n{\n    let result = false;\n\n    // Objects with mutliple textures\n    if (item && item._textures && item._textures.length)\n    {\n        for (let i = 0; i < item._textures.length; i++)\n        {\n            if (item._textures[i] instanceof core.Texture)\n            {\n                const baseTexture = item._textures[i].baseTexture;\n\n                if (queue.indexOf(baseTexture) === -1)\n                {\n                    queue.push(baseTexture);\n                    result = true;\n                }\n            }\n        }\n    }\n\n    return result;\n}\n\n/**\n * Built-in hook to find BaseTextures from Sprites.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Texture object was found.\n */\nfunction findBaseTexture(item, queue)\n{\n    // Objects with textures, like Sprites/Text\n    if (item instanceof core.BaseTexture)\n    {\n        if (queue.indexOf(item) === -1)\n        {\n            queue.push(item);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to find textures from objects.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Texture object was found.\n */\nfunction findTexture(item, queue)\n{\n    if (item._texture && item._texture instanceof core.Texture)\n    {\n        const texture = item._texture.baseTexture;\n\n        if (queue.indexOf(texture) === -1)\n        {\n            queue.push(texture);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to draw PIXI.Text to its texture.\n *\n * @private\n * @param {PIXI.WebGLRenderer|PIXI.CanvasPrepare} helper - Not used by this upload handler\n * @param {PIXI.DisplayObject} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction drawText(helper, item)\n{\n    if (item instanceof core.Text)\n    {\n        // updating text will return early if it is not dirty\n        item.updateText(true);\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to calculate a text style for a PIXI.Text object.\n *\n * @private\n * @param {PIXI.WebGLRenderer|PIXI.CanvasPrepare} helper - Not used by this upload handler\n * @param {PIXI.DisplayObject} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction calculateTextStyle(helper, item)\n{\n    if (item instanceof core.TextStyle)\n    {\n        const font = item.toFontString();\n\n        core.TextMetrics.measureFont(font);\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to find Text objects.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Text object was found.\n */\nfunction findText(item, queue)\n{\n    if (item instanceof core.Text)\n    {\n        // push the text style to prepare it - this can be really expensive\n        if (queue.indexOf(item.style) === -1)\n        {\n            queue.push(item.style);\n        }\n        // also push the text object so that we can render it (to canvas/texture) if needed\n        if (queue.indexOf(item) === -1)\n        {\n            queue.push(item);\n        }\n        // also push the Text's texture for upload to GPU\n        const texture = item._texture.baseTexture;\n\n        if (queue.indexOf(texture) === -1)\n        {\n            queue.push(texture);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to find TextStyle objects.\n *\n * @private\n * @param {PIXI.TextStyle} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.TextStyle object was found.\n */\nfunction findTextStyle(item, queue)\n{\n    if (item instanceof core.TextStyle)\n    {\n        if (queue.indexOf(item) === -1)\n        {\n            queue.push(item);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n","import * as core from '../../core';\nimport BasePrepare from '../BasePrepare';\n\nconst CANVAS_START_SIZE = 16;\n\n/**\n * The prepare manager provides functionality to upload content to the GPU\n * This cannot be done directly for Canvas like in WebGL, but the effect can be achieved by drawing\n * textures to an offline canvas.\n * This draw call will force the texture to be moved onto the GPU.\n *\n * An instance of this class is automatically created by default, and can be found at renderer.plugins.prepare\n *\n * @class\n * @extends PIXI.prepare.BasePrepare\n * @memberof PIXI.prepare\n */\nexport default class CanvasPrepare extends BasePrepare\n{\n    /**\n     * @param {PIXI.CanvasRenderer} renderer - A reference to the current renderer\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        this.uploadHookHelper = this;\n\n        /**\n        * An offline canvas to render textures to\n        * @type {HTMLCanvasElement}\n        * @private\n        */\n        this.canvas = document.createElement('canvas');\n        this.canvas.width = CANVAS_START_SIZE;\n        this.canvas.height = CANVAS_START_SIZE;\n\n        /**\n         * The context to the canvas\n        * @type {CanvasRenderingContext2D}\n        * @private\n        */\n        this.ctx = this.canvas.getContext('2d');\n\n        // Add textures to upload\n        this.registerUploadHook(uploadBaseTextures);\n    }\n\n    /**\n     * Destroys the plugin, don't use after this.\n     *\n     */\n    destroy()\n    {\n        super.destroy();\n        this.ctx = null;\n        this.canvas = null;\n    }\n\n}\n\n/**\n * Built-in hook to upload PIXI.Texture objects to the GPU.\n *\n * @private\n * @param {*} prepare - Instance of CanvasPrepare\n * @param {*} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction uploadBaseTextures(prepare, item)\n{\n    if (item instanceof core.BaseTexture)\n    {\n        const image = item.source;\n\n        // Sometimes images (like atlas images) report a size of zero, causing errors on windows phone.\n        // So if the width or height is equal to zero then use the canvas size\n        // Otherwise use whatever is smaller, the image dimensions or the canvas dimensions.\n        const imageWidth = image.width === 0 ? prepare.canvas.width : Math.min(prepare.canvas.width, image.width);\n        const imageHeight = image.height === 0 ? prepare.canvas.height : Math.min(prepare.canvas.height, image.height);\n\n        // Only a small subsections is required to be drawn to have the whole texture uploaded to the GPU\n        // A smaller draw can be faster.\n        prepare.ctx.drawImage(image, 0, 0, imageWidth, imageHeight, 0, 0, prepare.canvas.width, prepare.canvas.height);\n\n        return true;\n    }\n\n    return false;\n}\n\ncore.CanvasRenderer.registerPlugin('prepare', CanvasPrepare);\n","/**\n * CountLimiter limits the number of items handled by a {@link PIXI.prepare.BasePrepare} to a specified\n * number of items per frame.\n *\n * @class\n * @memberof PIXI\n */\nexport default class CountLimiter\n{\n    /**\n     * @param {number} maxItemsPerFrame - The maximum number of items that can be prepared each frame.\n     */\n    constructor(maxItemsPerFrame)\n    {\n        /**\n         * The maximum number of items that can be prepared each frame.\n         * @private\n         */\n        this.maxItemsPerFrame = maxItemsPerFrame;\n        /**\n         * The number of items that can be prepared in the current frame.\n         * @type {number}\n         * @private\n         */\n        this.itemsLeft = 0;\n    }\n\n    /**\n     * Resets any counting properties to start fresh on a new frame.\n     */\n    beginFrame()\n    {\n        this.itemsLeft = this.maxItemsPerFrame;\n    }\n\n    /**\n     * Checks to see if another item can be uploaded. This should only be called once per item.\n     * @return {boolean} If the item is allowed to be uploaded.\n     */\n    allowedToUpload()\n    {\n        return this.itemsLeft-- > 0;\n    }\n}\n","/**\n * TimeLimiter limits the number of items handled by a {@link PIXI.BasePrepare} to a specified\n * number of milliseconds per frame.\n *\n * @class\n * @memberof PIXI\n */\nexport default class TimeLimiter\n{\n    /**\n     * @param {number} maxMilliseconds - The maximum milliseconds that can be spent preparing items each frame.\n     */\n    constructor(maxMilliseconds)\n    {\n        /**\n         * The maximum milliseconds that can be spent preparing items each frame.\n         * @private\n         */\n        this.maxMilliseconds = maxMilliseconds;\n        /**\n         * The start time of the current frame.\n         * @type {number}\n         * @private\n         */\n        this.frameStart = 0;\n    }\n\n    /**\n     * Resets any counting properties to start fresh on a new frame.\n     */\n    beginFrame()\n    {\n        this.frameStart = Date.now();\n    }\n\n    /**\n     * Checks to see if another item can be uploaded. This should only be called once per item.\n     * @return {boolean} If the item is allowed to be uploaded.\n     */\n    allowedToUpload()\n    {\n        return Date.now() - this.frameStart < this.maxMilliseconds;\n    }\n}\n","import * as core from '../../core';\nimport BasePrepare from '../BasePrepare';\n\n/**\n * The prepare manager provides functionality to upload content to the GPU.\n *\n * An instance of this class is automatically created by default, and can be found at renderer.plugins.prepare\n *\n * @class\n * @extends PIXI.prepare.BasePrepare\n * @memberof PIXI.prepare\n */\nexport default class WebGLPrepare extends BasePrepare\n{\n    /**\n     * @param {PIXI.WebGLRenderer} renderer - A reference to the current renderer\n     */\n    constructor(renderer)\n    {\n        super(renderer);\n\n        this.uploadHookHelper = this.renderer;\n\n        // Add textures and graphics to upload\n        this.registerFindHook(findGraphics);\n        this.registerUploadHook(uploadBaseTextures);\n        this.registerUploadHook(uploadGraphics);\n    }\n}\n/**\n * Built-in hook to upload PIXI.Texture objects to the GPU.\n *\n * @private\n * @param {PIXI.WebGLRenderer} renderer - instance of the webgl renderer\n * @param {PIXI.DisplayObject} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction uploadBaseTextures(renderer, item)\n{\n    if (item instanceof core.BaseTexture)\n    {\n        // if the texture already has a GL texture, then the texture has been prepared or rendered\n        // before now. If the texture changed, then the changer should be calling texture.update() which\n        // reuploads the texture without need for preparing it again\n        if (!item._glTextures[renderer.CONTEXT_UID])\n        {\n            renderer.textureManager.updateTexture(item);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to upload PIXI.Graphics to the GPU.\n *\n * @private\n * @param {PIXI.WebGLRenderer} renderer - instance of the webgl renderer\n * @param {PIXI.DisplayObject} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction uploadGraphics(renderer, item)\n{\n    if (item instanceof core.Graphics)\n    {\n        // if the item is not dirty and already has webgl data, then it got prepared or rendered\n        // before now and we shouldn't waste time updating it again\n        if (item.dirty || item.clearDirty || !item._webGL[renderer.plugins.graphics.CONTEXT_UID])\n        {\n            renderer.plugins.graphics.updateGraphics(item);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Built-in hook to find graphics.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Graphics object was found.\n */\nfunction findGraphics(item, queue)\n{\n    if (item instanceof core.Graphics)\n    {\n        queue.push(item);\n\n        return true;\n    }\n\n    return false;\n}\n\ncore.WebGLRenderer.registerPlugin('prepare', WebGLPrepare);\n","// import polyfills. Done as an export to make sure polyfills are imported first\nexport * from './polyfill';\n\n// export core\nexport * from './core';\n\n// export libs\nimport deprecation from './deprecation';\nimport * as accessibility from './accessibility';\nimport * as extract from './extract';\nimport * as extras from './extras';\nimport * as filters from './filters';\nimport * as interaction from './interaction';\nimport * as loaders from './loaders';\nimport * as mesh from './mesh';\nimport * as particles from './particles';\nimport * as prepare from './prepare';\n\n// handle mixins now, after all code has been added, including deprecation\nimport { utils } from './core';\nutils.mixins.performMixins();\n\n/**\n * Alias for {@link PIXI.loaders.shared}.\n * @name loader\n * @memberof PIXI\n * @type {PIXI.loader.Loader}\n */\nconst loader = loaders.shared || null;\n\nexport {\n    accessibility,\n    extract,\n    extras,\n    filters,\n    interaction,\n    loaders,\n    mesh,\n    particles,\n    prepare,\n    loader,\n};\n\n// Apply the deprecations\nif (typeof deprecation === 'function')\n{\n    deprecation(exports);\n}\n\n// Always export PixiJS globally.\nglobal.PIXI = exports; // eslint-disable-line\n\n"],"sourceRoot":"."}