1 line
1.5 MiB
1 line
1.5 MiB
{"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/dist/isMobile.min.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/TextureMatrix.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/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/alpha/AlphaFilter.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/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/index.js","src/particles/webgl/ParticleBuffer.js","src/particles/webgl/ParticleRenderer.js","src/particles/webgl/ParticleShader.js","src/polyfill/Math.sign.js","src/polyfill/Number.isInteger.js","src/polyfill/Object.assign.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","next","prev","minX","minY","maxX","maxY","invSize","eliminateHoles","Math","earcutLinked","start","end","clockwise","last","signedArea","insertNode","equals","removeNode","filterPoints","again","p","steiner","area","ear","pass","indexCurve","stop","isEarHashed","isEar","push","cureLocalIntersections","splitEarcut","b","pointInTriangle","minTX","minTY","maxTX","maxTY","minZ","zOrder","maxZ","prevZ","nextZ","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","default","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","test","navigator","userAgent","split","apple","phone","ipod","tablet","device","amazon","android","windows","other","blackberry","blackberry10","opera","firefox","w","chrome","h","any","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","size","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","generateSetter","uniform","GLSL_SINGLE_SETTERS","GLSL_ARRAY_SETTERS","getUniformGroup","nameTokens","cur","uniformKeys","fullName","uniformGroup","get","generateGetter","set","float","uniform1f","vec2","uniform2f","vec3","uniform3f","vec4","uniform4f","int","uniform1i","ivec2","uniform2i","ivec3","uniform3i","ivec4","uniform4i","bool","bvec2","bvec3","bvec4","mat2","uniformMatrix2fv","mat3","uniformMatrix3fv","mat4","uniformMatrix4fv","sampler2D","uniform1fv","uniform2fv","uniform3fv","uniform4fv","uniform1iv","uniform2iv","uniform3iv","uniform4iv","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","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","Loader","_typeof","Symbol","iterator","_miniSignals","_miniSignals2","_parseUri","_parseUri2","_async","async","newObj","_Resource","rgxExtractUrlHash","_this","baseUrl","concurrency","progress","loading","defaultQueryString","_beforeMiddleware","_afterMiddleware","_resourcesParsing","_boundLoadResource","_loadResource","_queue","pause","resources","onProgress","onError","onLoad","onStart","onComplete","_defaultBeforeMiddleware","pre","_i","_defaultAfterMiddleware","use","add","url","cb","callback","parentResource","_prepareUrl","Resource","onAfterMiddleware","parent","incompleteChildren","_i2","children","isComplete","fullChunk","progressChunk","eachChunk","_i3","reset","kill","_onLoadBinding","isLoading","abort","load","idle","_onStart","_onComplete","numTasks","_tasks","chunk","resume","parsedUrl","protocol","hash","resource","dequeue","_this2","_dequeue","eachSeries","_onLoad","dispatch","_this3","_noop","setExtMap","reqType","xhr","useXdr","XDomainRequest","XMLHttpRequest","tempAnchor","_flags","_setFlag","STATUS_FLAGS","DATA_URL","extension","_getExtension","crossOrigin","loadType","_determineLoadType","xhrType","metadata","TYPE","UNKNOWN","_elementTimer","_boundComplete","complete","_boundOnError","_onError","_boundOnProgress","_onProgress","_boundOnTimeout","_onTimeout","_boundXhrOnError","_xhrOnError","_boundXhrOnTimeout","_xhrOnTimeout","_boundXhrOnAbort","_xhrOnAbort","_boundXhrOnLoad","_xhrOnLoad","setExtensionLoadType","_loadTypeMap","setExtensionXhrType","_xhrTypeMap","_clearEvents","_finish","message","xdr","EMPTY_GIF","firstChild","removeChild","LOADING","_determineCrossOrigin","LOAD_TYPE","IMAGE","_loadElement","AUDIO","_loadSourceElement","VIDEO","XHR","_loadXdr","_loadXhr","_hasFlag","removeEventListener","onerror","ontimeout","onprogress","onload","COMPLETE","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","BUFFER","responseURL","DOMParser","domparser","parseFromString","div","innerHTML","XML","response","loc","origin","href","samePort","port","host","hostname","isDataUrl","slashIndex","queryStart","hashStart","_getMimeFromXhrType","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","Url","createObjectURL","blob","revokeObjectURL","getResponseHeader","_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","match","hostEnd","hec","atSign","parseHost","ipv6Hostname","hostparts","part","newpart","validParts","notHost","bit","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","accessibleTitle","getAttribute","accessibleHint","setAttribute","borderStyle","_onClick","_onFocus","_onFocusOut","tabIndex","interactionManager","plugins","interaction","dispatchEvent","eventData","keyCode","movementX","movementY","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","stageOptions","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","isMask","_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","lineAlignment","graphicsData","tint","_prevTint","blendMode","currentPath","_webGL","boundsPadding","_localBounds","fastRectDirty","clearDirty","boundsDirty","cachedSpriteDirty","_spriteRect","_fastRect","_prevRectTint","_prevRectFillColor","clone","updateLocalBounds","_quadraticCurveLength","fromX","fromY","cpX","cpY","toX","toY","sqrt","a32","c2","ba","_bezierCurveLength","cpX2","cpY2","t2","t3","nt","nt2","nt3","dx","dy","prevX","prevY","_segmentsCount","ceil","CURVES","maxLength","minSegments","maxSegments","lineStyle","color","alignment","lineAlpha","shape","points","Polygon","closed","drawShape","moveTo","lineTo","quadraticCurveTo","xa","ya","adaptive","bezierCurveTo","_bezierCurveTo3","arcTo","x2","y2","radius","b1","mm","dd","cc","tt","k1","k2","j1","j2","qy","startAngle","atan2","endAngle","arc","anticlockwise","sweep","segs","startX","startY","xDiff","yDiff","theta","theta2","cTheta","sTheta","segMinus","remainder","real","angle","beginFill","filling","fillColor","fill","endFill","drawRect","drawRoundedRect","RoundedRectangle","drawCircle","Circle","drawEllipse","Ellipse","drawPolygon","drawStar","innerRadius","polygon","canvasTintDirty","isFastRect","_renderSpriteRect","setObjectRenderer","graphics","_Sprite2","_Texture2","WHITE","sprite","t1","hex2rgb","rgb2hex","_texture","_frame","anchor","_onAnchorUpdate","lb","containsPoint","contains","lineOffset","rw","rh","padding","_GraphicsData2","generateCanvasTexture","scaleMode","resolution","canvasBuffer","_RenderTexture2","invert","fromCanvas","baseTexture","_canvasRenderTarget","closePath","close","addHole","id","_SPRITE_TEXTURE","GraphicsData","_lineTint","_fillTint","CanvasGraphicsRenderer","updateGraphicsTint","setBlendMode","beginPath","outerArea","innerArea","_j","_j2","_j3","_j4","globalAlpha","fillStyle","strokeStyle","stroke","fillRect","strokeRect","ox","oy","xe","ye","xm","ym","rx","ry","maxRadius","tintR","tintG","tintB","renderPolygon","dt","dt2","dt3","_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","ratio","r1","r2","c1","denom","buildNativeLine","buildPoly","holeArray","_earcut2","vertPos","_earcut","buildRectangle","rectData","buildRoundedRectangle","rrectData","recPoints","quadraticBezierCurve","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","isVertical","byDirection","matrixAppendRotationInv","append","_Point","fromArray","transpose","pos","newPos","_Point2","translate","rotate","tx1","d1","prepend","identity","scope","_Rectangle","_Rectangle2","halfWidth","halfHeight","normx","normy","_len","_key","il","xi","yi","xj","yj","Number","rectangle","pad","paddingX","paddingY","fit","enlarge","eps","radius2","SystemRenderer","system","sayHello","RESOLUTION","transparent","autoResize","blendModes","preserveDrawingBuffer","clearBeforeRender","roundPixels","_backgroundColor","_backgroundColorRgba","_backgroundColorString","screenWidth","screenHeight","generateTexture","region","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","save","globalCompositeOperation","screencanvas","clearRect","tempContext","restore","destroyPlugins","SCALE_MODE","invalidateBlendMode","pluginTarget","mixin","CanvasMaskManager","maskData","cacheAlpha","renderGraphicsShape","clip","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","_activeRenderTarget","frameBuffer","isPowerOfTwo","wrapMode","skipRemove","uid","glTextures","glRenderTargets","unbindTexture","bindRenderTarget","rootRenderTarget","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","_initContext","drawModes","_mapWebGLDrawModesToPixi2","_nextTextureLocation","isContextLost","restoreContext","maxTextures","MAX_TEXTURE_IMAGE_UNITS","emptyTextures","_unknownBoundTextures","_TextureManager2","_FilterManager2","textureGC","_TextureGarbageCollector2","resetToDefault","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","FILTER_RESOLUTION","autoFit","currentState","applyFilter","extractUniformsFromSrc","vertUniforms","extractUniformsFromString","fragUniforms","maskRegex","RegExp","nameSplit","lines","line","splitLine","calculateScreenSpaceMatrix","outputMatrix","textureSize","mappedMatrix","calculateNormalizedScreenSpaceMatrix","translateScaleX","translateScaleY","calculateSpriteMatrix","orig","TEMP_MATRIX","_Filter2","_TextureMatrix","SpriteMaskFilter","maskMatrix","_Filter","maskSprite","tex","_TextureMatrix2","otherMatrix","mapCoord","maskClamp","uClampFrame","_WebGLManager2","_Quad","_filterTransforms","filterTransforms","_bitTwiddle","FilterState","sourceFrame","destinationFrame","FilterManager","_WebGLManager","quad","_Quad2","shaderCache","filterData","managedFilters","onPrerender","_screenWidth","_screenHeight","filterStack","filterState","renderTargetFrame","fullScreen","targetBounds","getPotRenderTarget","lastState","freePotRenderTarget","flip","flop","initVao","disable","SCISSOR_TEST","enable","scissorRenderTarget","pushScissorMask","scissorData","syncUniforms","textureCount","filterClamp","getRenderTarget","returnRenderTarget","contextLost","emptyPool","minWidth","minHeight","_bitTwiddle2","defaultFrame","filterPoolKey","textures","_SpriteMaskFilter","MaskManager","scissor","enableScissor","alphaMaskPool","alphaMaskIndex","pushSpriteMask","rot","round","pushStencilMask","popSpriteMask","popScissorMask","popStencilMask","alphaMaskFilter","_SpriteMaskFilter2","stashFilterArea","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","stencilBuffer","calculateProjection","viewport","pm","projectionFrame","deleteRenderbuffer","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","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","MAX_TEXTURES","_checkMaxIfStatmentsInShader2","attrs","aTextureId","_uvs","sprites","np2","groups","touch","nextTexture","currentTexture","groupCount","currentGroup","premultiplyBlendMode","blend","bt","_virtalBoundId","_enabled","TICK","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","_TextStyle2","_Sprite3","font","outputText","TextMetrics","fontSize","leading","whiteSpace","collapseSpaces","collapseNewlines","wordWrapWidth","tokens","tokenize","token","isNewline","canPrependSpaces","currIsBreakingSpace","isBreakingSpace","lastIsBreakingSpace","tokenWidth","getFromCache","cache","addLine","canBreakWords","breakWords","char","lastChar","canBreakChars","nextChar","characterWidth","isLastToken","spacing","_breakingSpaces","properties","_canvas","_context","metricsString","METRICS_STRING","BASELINE_SYMBOL","baseline","BASELINE_MULTIPLIER","imagedata","descent","_fonts","110","getSingleColor","array1","array2","fontFamily","fontStyle","fontVariant","fontWeight","lineJoin","genericFontFamilies","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","_whiteSpace","_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","_updateUvs","Spritesheet","_updateResolution","resolutionFilename","_frameKeys","_frames","_batchIndex","_callback","meta","_processFrames","initialFrameIndex","frameIndex","sourceSize","_","rotated","spriteSourceSize","animations","_iterator","animName","_isArray","done","frameName","_ref","_parseComplete","_nextBatch","destroyBase","../","115","_inherits","subClass","superClass","setPrototypeOf","noFrame","requiresUpdate","_rotate","onBaseTextureUpdated","onBaseTextureLoaded","defaultAnchor","TextureCache","fromVideo","video","autoPlay","fromVideoUrl","videoUrl","fromImage","HTMLImageElement","HTMLCanvasElement","HTMLVideoElement","fromLoader","textureFromCache","errorY","errorX","relationship","removeAllHandlers","tempMat","TextureMatrix","clampMargin","forceUpdate","_lastTextureID","margin","texBase","clampOffset","uClampOffset","../math/Matrix","_GroupD","TextureUvs","baseFrame","tw","w2","h2","th","_GroupD2","cY","x3","cX","y3","createSource","purePath","_isAutoUpdating","_onPlayStop","_isSourceReady","_onCanPlay","VideoBaseTexture","_isSourcePlaying","currentTime","ended","_onPlayStart","__loaded","fromUrl","videoSrc","_autoUpdate","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","121","_Ticker2","_Ticker","./Ticker","122","createIndicesForQuads","totalIndices","124","determineCrossOrigin","_url3","_url2","125","hex","getUrlFileExtension","getSvgSize","sizeMatch","saidHello","contextOptions","failIfMajorPerformanceCaveat","WebGLRenderingContext","success","correctBlendMode","premultiplied","R","G","B","premultiplyRgba","rgb","premultiply","premultiplyTintToRgba","skipHello","destroyTextureCache","_pluginTarget","_interopRequireWildcard","_mixin","_removeArrayItems2","npm","mapPremultipliedBlendModes","127","maxRecommendedTextures","propertyName","__plugins","130","trimCanvas","bound","right","bottom","131","msg","warnings","groupCollapsed","groupEnd","deprecation","mesh","particles","extras","prepare","loaders","SpriteBatch","Mesh","Rope","ParticleContainer","AnimatedSprite","TilingSprite","BitmapText","MIPMAP_TEXTURES","SPRITE_MAX_TEXTURES","RETINA_PREFIX","DEFAULT_RENDER_OPTIONS","defaults","MovieClip","TextureTransform","isSwapWidthHeight","getImage","extract","getCanvas","setTexture","fontPropertiesCache","setStyle","splits","fontSizeIndex","AlphaFilter","BasePrepare","register","addHook","uploadHook","registerFindHook","registerUploadHook","NaN","webgl","isJson","isXml","isImage","isAudio","isVideo","before","after","interactiveTarget","cursor","InteractionManager","cursorStyles","currentCursorMode","TEMP_RECT","CanvasExtract","canvasData","../../core","133","WebGLExtract","generated","textureBuffer","flipY","webglPixels","readPixels","135","onLoop","playing","previousFrame","currentFrame","gotoAndPlay","frameNumber","_currentTime","play","_durations","lag","loop","gotoAndStop","_textures","animationSpeed","updateAnchor","onFrameChange","_core$Sprite","fromImages","images","_ObservablePoint","_maxLineHeight","_core$Container","fonts","_font","maxWidth","_maxWidth","prevCharCode","textLength","charCode","lastBreakPos","lastBreakWidth","lastLineWidth","charData","chars","kerning","xOffset","yOffset","xAdvance","spacesRemoved","lineAlignOffsets","alignOffset","lenChars","_glyphs","_textWidth","_textHeight","_i4","maxLineHeight","registerFont","common","getElementsByTagName","parseInt","pages","pagesTextures","letters","_i5","page","textureRect","kernings","_i6","first","second","amount","validate","tileTransform","pluginName","tempCanvas","baseTextureResolution","sWidth","sHeight","dWidth","dHeight","isTextureRotated","_canvasPattern","createPattern","tileScale","anchorX","anchorY","uvRespectAnchor","modX","modY","uvTransform","frameId","imageId","_tempMatrix","_cacheAsBitmap","CacheData","originalRenderWebGL","originalCalculateBounds","originalGetLocalBounds","originalUpdateTransform","cacheAsBitmap","originalRenderCanvas","originalFilterArea","_renderCachedWebGL","_renderCachedCanvas","_cacheAsBitmapDestroy","_cacheData","_destroyCachedDisplayObject","originalDestroy","originalContainsPoint","_initCachedDisplayObject","cachedRenderTarget","textureCacheId","_calculateCachedBounds","_getCachedLocalBounds","cachedSprite","_initCachedDisplayObjectCanvas","../core","../core/textures/BaseTexture","../core/textures/Texture","../core/utils","139","_AnimatedSprite","TilingSpriteRenderer","_core$ObjectRenderer","simpleShader","ts","baseTex","isSimple","H","uv","uMapCoord","uTransform","uSampler","../../core/const","143","uAlpha","_BlurXFilter","_BlurYFilter","BlurFilter","blurXFilter","blurYFilter","blur","strength","quality","_generateBlurVertSource","_generateBlurFragSource","kernelSize","firstRun","BlurXFilter","_getMaxBlurKernelSize2","_generateBlurVertSource2","_generateBlurFragSource2","passes","temp","_quality","BlurYFilter","template","halfLength","kernel","blurLoop","fragSource","GAUSSIAN_VALUES","5","9","11","13","15","generateVertBlurSource","vertSource","vertTemplate","149","getMaxKernelSize","maxVaryings","150","ColorMatrixFilter","_loadMatrix","multiply","_multiply","newMatrix","_colorMatrix","brightness","a01","cosR","sqrW","sinR","a02","a11","contrast","saturate","desaturate","toned","darkColor","lG","lightColor","intensity","lsd","DisplacementFilter","mapSampler","FXAAFilter","153","_FXAAFilter","NoiseFilter","noise","uNoise","InteractionData","button","buttons","pointerType","tangentialPressure","isPrimary","identifier","stopped","currentTarget","157","_InteractionData","_interactiveTarget2","interactionFrequency","activeInteractionData","MOUSE_POINTER_ID","mouse","interactionDataPool","moveWhenInside","eventsAdded","processPointerDown","processPointerMove","processPointerOverOut","setTargetElement","element","removeEvents","addEvents","interactionDOMElement","msPointerEnabled","onPointerDown","onPointerOut","onPointerCancel","onPointerUp","onPointerMove","supportsTouchEvents","_deltaTime","interactionData","originalEvent","processInteractive","interactionEvent","setCursorMode","eventString","mapPositionToPoint","parentElement","hit","hitTestChildren","hitTest","_tempPoint","childHit","func","interactiveParent","normalizeToPointerData","eventLen","getInteractionDataForPointerId","configureInteractionEventForDOMEvent","isRightButton","trackedPointers","_InteractionTrackingData2","onPointerComplete","cancelled","eventAppend","releaseInteractionDataForPointerId","pointerId","processPointerCancel","isMouse","flags","RIGHT_DOWN","LEFT_DOWN","isDown","trackingData","isMouseTap","isTouch","over","none","didMove","onPointerOver","_InteractionData2","pointerEvent","clientX","clientY","normalizedEvents","TouchEvent","li","changedTouches","twist","layerY","offsetY","isNormalized","MouseEvent","supportsPointerEvents","PointerEvent","tiltX","tiltY","pressure","./InteractionData","./InteractionEvent","./InteractionTrackingData","./interactiveTarget","eventemitter3","158","InteractionTrackingData","yn","FLAGS","freeze","OVER","_InteractionManager","_trackedPointers","bitmapFont","_extras","xmlUrl","completed","pageFile","bitmapResource","imageMetadata","_path","_resourceLoader","_bitmapFontParser","_loader2","AppPrototype","_loader","_parentDestroy","_blob","_textureParser","_textureParser2","addPixiMiddleware","_pixiMiddleware","_spritesheetParser2","_resourceLoader2","./bitmapFontParser","./spritesheetParser","./textureParser","resource-loader","resource-loader/lib/middlewares/parsing/blob","164","getResourcePath","imageResourceName","frames","resourcePath","loadOptions","spritesheet","_url","165","tempPolygon","drawMode","vertexDirty","uploadUvTransform","multiplyUvs","ind1","ind2","_glDatas","tintRgb","TRIANGLE_MESH","_origHeight","_bottomHeight","_leftWidth","_rightWidth","isTinted","_canvasUvs","u0","v0","u1","v1","col","sw","sh","dh","textureSource","dw","NineSlicePlane","_refresh","_Plane","_origWidth","_uvw","_uvh","updateHorizontalVertices","updateVerticalVertices","_Plane3","_Mesh2","verticesX","segmentsX","segmentsY","verticesY","sizeX","totalSub","xpos","ypos","value3","value4","value2","indexDirty","Plane","_Mesh3","_ready","colors","autoUpdate","refreshVertices","nextPoint","perpY","perpX","perpLength","num","./Mesh","170","_Mesh","MeshSpriteRenderer","_renderDrawTriangle","_renderTriangles","index0","v2","ut","_uvTransform","u2","canvasPadding","centerX","centerY","normX","normY","deltaB","deltaC","deltaD","deltaE","deltaA","deltaF","textureWidth","textureHeight","renderMeshFlat","MeshRenderer","glData","uvBuffer","matrixIdentity","uColor","../Mesh","173","batchSize","maxSize","_properties","_maxSize","_bufferUpdateIDs","setProperties","smallestChildIndex","bufferIndex","_batchSize","isRotated","positionX","positionY","finalWidth","finalHeight","childTransform","_buffers","_ParticleContainer","ParticleBuffer","dynamicProperties","staticProperties","property","staticStride","staticData","staticDataUint32","dynamicStride","dynamicBuffer","dynamicData","dynamicDataUint32","initBuffers","dynamicOffset","staticOffset","_property","statBuffer","staticBuffer","_property2","unsignedByte","_property3","uploadDynamic","startIndex","uploadFunction","uploadStatic","176","_ParticleShader","_ParticleShader2","ParticleRenderer","uploadPosition","aRotation","uploadRotation","uploadUvs","uploadTint","totalChildren","_generateOneMoreBuffer","bid","updateStatic","generateBuffers","dynamicPropertyFlags","_ParticleBuffer2","uploadVertices","spritePosition","spriteRotation","textureUvs","../../core/utils","./ParticleBuffer","./ParticleShader","177","_Shader3","isNaN","isInteger","180","_objectAssign","_objectAssign2","object-assign","181","startTime","Date","vendors","cancelAnimationFrame","delay","183","findMultipleBaseTextures","findBaseTexture","findTexture","calculateTextStyle","helper","findText","_CountLimiter","_CountLimiter2","uploadHookHelper","uploadHooks","completes","ticking","delayedTick","prepareItems","SharedTicker","addOnce","tick","uploaded","addHooks","limiter","uploadBaseTextures","imageHeight","_BasePrepare2","_BasePrepare3","CanvasPrepare","_BasePrepare","_WebGLPrepare","_CanvasPrepare","itemsLeft","maxItemsPerFrame","CountLimiter","frameStart","maxMilliseconds","TimeLimiter","uploadGraphics","findGraph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A,MAAAq1B,aAAIiH,GAAciW,WAEdvyC,EAAApB,KAAAy2B,gOD9BJyqE,oDAAsCD,8MClBtChnG,GAAAiK,QAAA69F,gaAiER,IAAAC,GAAS7mG,EAAa,aAIdmK,QAAAwG,KAAAk2F,GAAAp2F,QAAA,SAAAvB,oCAEA/E,OAAAqE,eAAA1P,EAAAoQ,GACHH,YAAA,iBAEM,MAAP83F,GAAA33F,sKChGJ,IAAA43F,GAAA9mG,EAAA,iBAAA+mG,oDAAAD,GAAAE,EAAAhnG,EAAA,2CAGAsiF,EAAAzC,EAAAonB,GAAArP,EAAA53F,EAAA,YAAAmhF,EAAAtB,EAAA+X,GAAAvlD,EAAAryC,EAAA,iJASY0iC,oEAVZ5jC,EAAAwjF,QAAAA,EAiBAxjF,EAAAqiF,OAAMA,cAENriF,EAAAioC,YAAAA,2HAUIznC,wBAAAF,uGAEA,GAAA8nG","file":"pixi.min.js","sourcesContent":["(function(){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}return e})()","/**\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;\nmodule.exports.default = 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 || outerNode.next === outerNode.prev) return triangles;\n\n var minX, minY, maxX, maxY, x, y, invSize;\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 invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 1 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\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) break;\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, invSize, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\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 (invSize ? isEarHashed(ear, minX, minY, invSize) : 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 vertex 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, invSize, 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, invSize, 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, invSize);\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, invSize) {\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, invSize),\n maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\n\n var p = ear.prevZ,\n n = ear.nextZ;\n\n // look for points inside the triangle in both directions\n while (p && p.z >= minZ && n && n.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.prevZ;\n\n if (n !== ear.prev && n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n // look for remaining points in decreasing z-order\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 // look for remaining points in increasing z-order\n while (n && n.z <= maxZ) {\n if (n !== ear.prev && n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\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, invSize) {\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, invSize);\n earcutLinked(c, triangles, dim, minX, minY, invSize);\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 && p.next.y !== p.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 && hx !== p.x &&\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, invSize) {\n var p = start;\n do {\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\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 qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize !== 0 && (qSize === 0 || !q || 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 inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = 32767 * (x - minX) * invSize;\n y = 32767 * (y - minY) * invSize;\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)) && p.next.y !== p.y &&\n (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 // vertex 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 vertex 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","!function(e){var n=/iPhone/i,t=/iPod/i,r=/iPad/i,a=/\\bAndroid(?:.+)Mobile\\b/i,p=/Android/i,l=/\\bAndroid(?:.+)SD4930UR\\b/i,b=/\\bAndroid(?:.+)(?:KF[A-Z]{2,4})\\b/i,f=/Windows Phone/i,u=/\\bWindows(?:.+)ARM\\b/i,c=/BlackBerry/i,s=/BB10/i,v=/Opera Mini/i,h=/\\b(CriOS|Chrome)(?:.+)Mobile/i,w=/\\Mobile(?:.+)Firefox\\b/i;function m(e,i){return e.test(i)}function i(e){var i=e||(\"undefined\"!=typeof navigator?navigator.userAgent:\"\"),o=i.split(\"[FBAN\");void 0!==o[1]&&(i=o[0]),void 0!==(o=i.split(\"Twitter\"))[1]&&(i=o[0]);var d={apple:{phone:m(n,i)&&!m(f,i),ipod:m(t,i),tablet:!m(n,i)&&m(r,i)&&!m(f,i),device:(m(n,i)||m(t,i)||m(r,i))&&!m(f,i)},amazon:{phone:m(l,i),tablet:!m(l,i)&&m(b,i),device:m(l,i)||m(b,i)},android:{phone:!m(f,i)&&m(l,i)||!m(f,i)&&m(a,i),tablet:!m(f,i)&&!m(l,i)&&!m(a,i)&&(m(b,i)||m(p,i)),device:!m(f,i)&&(m(l,i)||m(b,i)||m(a,i)||m(p,i))},windows:{phone:m(f,i),tablet:m(u,i),device:m(f,i)||m(u,i)},other:{blackberry:m(c,i),blackberry10:m(s,i),opera:m(v,i),firefox:m(w,i),chrome:m(h,i),device:m(c,i)||m(s,i)||m(v,i)||m(w,i)||m(h,i)}};return d.any=d.apple.device||d.android.device||d.windows.device||d.other.device,d.phone=d.apple.phone||d.android.phone||d.windows.phone,d.tablet=d.apple.tablet||d.android.tablet||d.windows.tablet,d}\"undefined\"!=typeof module&&module.exports&&\"undefined\"==typeof window?module.exports=i:\"undefined\"!=typeof module&&module.exports&&\"undefined\"!=typeof window?module.exports=i():\"function\"==typeof define&&define.amd?define([],e.isMobile=i()):e.isMobile=i()}(this);","'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 //fbo.enableStencil(); // get this back on soon!\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 {string} 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 * \n * @return {PIXI.glCore.GLShader} Returns itself.\n */\nShader.prototype.bind = function()\n{\n\tthis.gl.useProgram(this.program);\n\treturn this;\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 return this;\n }\n if (this.indexBuffer)\n {\n this.indexBuffer.bind();\n }\n }\n else\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 return function() {\n return this.data[name].value;\n };\n};\n\nvar GLSL_SINGLE_SETTERS = {\n float: function setSingleFloat(gl, location, value) { gl.uniform1f(location, value); },\n vec2: function setSingleVec2(gl, location, value) { gl.uniform2f(location, value[0], value[1]); },\n vec3: function setSingleVec3(gl, location, value) { gl.uniform3f(location, value[0], value[1], value[2]); },\n vec4: function setSingleVec4(gl, location, value) { gl.uniform4f(location, value[0], value[1], value[2], value[3]); },\n\n int: function setSingleInt(gl, location, value) { gl.uniform1i(location, value); },\n ivec2: function setSingleIvec2(gl, location, value) { gl.uniform2i(location, value[0], value[1]); },\n ivec3: function setSingleIvec3(gl, location, value) { gl.uniform3i(location, value[0], value[1], value[2]); },\n ivec4: function setSingleIvec4(gl, location, value) { gl.uniform4i(location, value[0], value[1], value[2], value[3]); },\n\n bool: function setSingleBool(gl, location, value) { gl.uniform1i(location, value); },\n bvec2: function setSingleBvec2(gl, location, value) { gl.uniform2i(location, value[0], value[1]); },\n bvec3: function setSingleBvec3(gl, location, value) { gl.uniform3i(location, value[0], value[1], value[2]); },\n bvec4: function setSingleBvec4(gl, location, value) { gl.uniform4i(location, value[0], value[1], value[2], value[3]); },\n\n mat2: function setSingleMat2(gl, location, value) { gl.uniformMatrix2fv(location, false, value); },\n mat3: function setSingleMat3(gl, location, value) { gl.uniformMatrix3fv(location, false, value); },\n mat4: function setSingleMat4(gl, location, value) { gl.uniformMatrix4fv(location, false, value); },\n\n sampler2D: function setSingleSampler2D(gl, location, value) { gl.uniform1i(location, value); },\n};\n\nvar GLSL_ARRAY_SETTERS = {\n float: function setFloatArray(gl, location, value) { gl.uniform1fv(location, value); },\n vec2: function setVec2Array(gl, location, value) { gl.uniform2fv(location, value); },\n vec3: function setVec3Array(gl, location, value) { gl.uniform3fv(location, value); },\n vec4: function setVec4Array(gl, location, value) { gl.uniform4fv(location, value); },\n int: function setIntArray(gl, location, value) { gl.uniform1iv(location, value); },\n ivec2: function setIvec2Array(gl, location, value) { gl.uniform2iv(location, value); },\n ivec3: function setIvec3Array(gl, location, value) { gl.uniform3iv(location, value); },\n ivec4: function setIvec4Array(gl, location, value) { gl.uniform4iv(location, value); },\n bool: function setBoolArray(gl, location, value) { gl.uniform1iv(location, value); },\n bvec2: function setBvec2Array(gl, location, value) { gl.uniform2iv(location, value); },\n bvec3: function setBvec3Array(gl, location, value) { gl.uniform3iv(location, value); },\n bvec4: function setBvec4Array(gl, location, value) { gl.uniform4iv(location, value); },\n sampler2D: function setSampler2DArray(gl, location, value) { gl.uniform1iv(location, value); },\n};\n\nfunction generateSetter(name, uniform)\n{\n return function(value) {\n this.data[name].value = value;\n var location = this.data[name].location;\n if (uniform.size === 1)\n {\n GLSL_SINGLE_SETTERS[uniform.type](this.gl, location, value);\n }\n else\n {\n // glslSetArray(gl, location, type, value) {\n GLSL_ARRAY_SETTERS[uniform.type](this.gl, location, value);\n }\n };\n}\n\nfunction getUniformGroup(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\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 mapType = 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 = mapType;\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;\nexports.Loader = undefined;\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 _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 _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\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 = exports.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 * @member {string}\n */\n this.defaultQueryString = '';\n\n /**\n * The middleware to run before loading each resource.\n *\n * @private\n * @member {function[]}\n */\n this._beforeMiddleware = [];\n\n /**\n * The middleware to run after loading each resource.\n *\n * @private\n * @member {function[]}\n */\n this._afterMiddleware = [];\n\n /**\n * The tracks the resources we are currently completing parsing for.\n *\n * @private\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 // Add default before middleware\n for (var i = 0; i < Loader._defaultBeforeMiddleware.length; ++i) {\n this.pre(Loader._defaultBeforeMiddleware[i]);\n }\n\n // Add default after middleware\n for (var _i = 0; _i < Loader._defaultAfterMiddleware.length; ++_i) {\n this.use(Loader._defaultAfterMiddleware[_i]);\n }\n }\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 * Options for a call to `.add()`.\n *\n * @see Loader#add\n *\n * @typedef {object} IAddOptions\n * @property {string} [name] - The name of the resource to load, if not passed the url is used.\n * @property {string} [key] - Alias for `name`.\n * @property {string} [url] - The url for this resource, relative to the baseUrl of this loader.\n * @property {string|boolean} [crossOrigin] - Is this request cross-origin? Default is to\n * determine automatically.\n * @property {number} [timeout=0] - A timeout in milliseconds for the load. If the load takes\n * longer than this time it is cancelled and the load is considered a failure. If this value is\n * set to `0` then there is no explicit timeout.\n * @property {Resource.LOAD_TYPE} [loadType=Resource.LOAD_TYPE.XHR] - How should this resource\n * be loaded?\n * @property {Resource.XHR_RESPONSE_TYPE} [xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How\n * should the data being loaded be interpreted when using XHR?\n * @property {Loader.OnCompleteSignal} [onComplete] - Callback to add an an onComplete signal istener.\n * @property {Loader.OnCompleteSignal} [callback] - Alias for `onComplete`.\n * @property {Resource.IMetadata} [metadata] - Extra configuration for middleware and the Resource object.\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|IAddOptions} [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 {IAddOptions} [options] - The options for the load.\n * @param {Loader.OnCompleteSignal} [cb] - Function to call when this specific resource completes loading.\n * @return {this} 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 _Resource.Resource(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 _i2 = 0; _i2 < parent.children.length; ++_i2) {\n if (!parent.children[_i2].isComplete) {\n incompleteChildren.push(parent.children[_i2]);\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 _i3 = 0; _i3 < incompleteChildren.length; ++_i3) {\n incompleteChildren[_i3].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 * @param {function} fn - The middleware function to register.\n * @return {this} 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 * @param {function} fn - The middleware function to register.\n * @return {this} 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 {this} 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 {this} 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 if (this._queue.idle()) {\n this._onStart();\n this._onComplete();\n } else {\n // distribute progress chunks\n var numTasks = this._queue._tasks.length;\n var chunk = MAX_PROGRESS / numTasks;\n\n for (var i = 0; i < this._queue._tasks.length; ++i) {\n this._queue._tasks[i].data.progressChunk = chunk;\n }\n\n // notify we are starting\n this._onStart();\n\n // start loading\n this._queue.resume();\n }\n\n return this;\n };\n\n /**\n * The number of resources to load concurrently.\n *\n * @member {number}\n * @default 10\n */\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 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 loading has started.\n *\n * @private\n */\n\n\n Loader.prototype._onStart = function _onStart() {\n this.progress = 0;\n this.loading = true;\n this.onStart.dispatch(this);\n };\n\n /**\n * Called once each resource has loaded.\n *\n * @private\n */\n\n\n Loader.prototype._onComplete = function _onComplete() {\n this.progress = MAX_PROGRESS;\n this.loading = false;\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 = Math.min(MAX_PROGRESS, _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._onComplete();\n }\n }, true);\n };\n\n _createClass(Loader, [{\n key: 'concurrency',\n get: function get() {\n return this._queue.concurrency;\n }\n // eslint-disable-next-line require-jsdoc\n ,\n set: function set(concurrency) {\n this._queue.concurrency = concurrency;\n }\n }]);\n\n return Loader;\n}();\n\n/**\n * A default array of middleware to run before loading each resource.\n * Each of these middlewares are added to any new Loader instances when they are created.\n *\n * @private\n * @member {function[]}\n */\n\n\nLoader._defaultBeforeMiddleware = [];\n\n/**\n * A default array of middleware to run after loading each resource.\n * Each of these middlewares are added to any new Loader instances when they are created.\n *\n * @private\n * @member {function[]}\n */\nLoader._defaultAfterMiddleware = [];\n\n/**\n * Sets up a middleware function that will run *before* the\n * resource is loaded.\n *\n * @static\n * @param {function} fn - The middleware function to register.\n * @return {Loader} Returns itself.\n */\nLoader.pre = function LoaderPreStatic(fn) {\n Loader._defaultBeforeMiddleware.push(fn);\n\n return Loader;\n};\n\n/**\n * Sets up a middleware function that will run *after* the\n * resource is loaded.\n *\n * @static\n * @param {function} fn - The middleware function to register.\n * @return {Loader} Returns itself.\n */\nLoader.use = function LoaderUseStatic(fn) {\n Loader._defaultAfterMiddleware.push(fn);\n\n return Loader;\n};\n//# sourceMappingURL=Loader.js.map","'use strict';\n\nexports.__esModule = true;\nexports.Resource = undefined;\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 if 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 = exports.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 {number} [options.timeout=0] - A timeout in milliseconds for the load. If the load takes\n * longer than this time it is cancelled and the load is considered a failure. If this value is\n * set to `0` then there is no explicit timeout.\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 {Resource.IMetadata} [options.metadata] - Extra configuration for middleware and the Resource object.\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 * @private\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 * @readonly\n * @member {string}\n */\n this.name = name;\n\n /**\n * The url used to load this resource.\n *\n * @readonly\n * @member {string}\n */\n this.url = url;\n\n /**\n * The extension used to load this resource.\n *\n * @readonly\n * @member {string}\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 * A timeout in milliseconds for the load. If the load takes longer than this time\n * it is cancelled and the load is considered a failure. If this value is set to `0`\n * then there is no explicit timeout.\n *\n * @member {number}\n */\n this.timeout = options.timeout || 0;\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 {Resource.IMetadata}\n */\n this.metadata = options.metadata || {};\n\n /**\n * The error that occurred while loading (if any).\n *\n * @readonly\n * @member {Error}\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 * @readonly\n * @member {XMLHttpRequest}\n */\n this.xhr = null;\n\n /**\n * The child resources this resource owns.\n *\n * @readonly\n * @member {Resource[]}\n */\n this.children = [];\n\n /**\n * The resource type.\n *\n * @readonly\n * @member {Resource.TYPE}\n */\n this.type = Resource.TYPE.UNKNOWN;\n\n /**\n * The progress chunk owned by this resource.\n *\n * @readonly\n * @member {number}\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 timer for element loads to check if they timeout.\n *\n * @private\n * @member {number}\n */\n this._elementTimer = 0;\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 /**\n * The `_onTimeout` function bound to this resource's context.\n *\n * @private\n * @member {function}\n */\n this._boundOnTimeout = this._onTimeout.bind(this);\n\n // xhr callbacks\n this._boundXhrOnError = this._xhrOnError.bind(this);\n this._boundXhrOnTimeout = this._xhrOnTimeout.bind(this);\n this._boundXhrOnAbort = this._xhrOnAbort.bind(this);\n this._boundXhrOnLoad = this._xhrOnLoad.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 /**\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 * @memberof Resource\n * @typedef {object} IMetadata\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 to.\n * @property {string|string[]} [mimeType] - The mime type to use for the source element\n * of a video/audio elment. If the urls are an array, you can pass this as an array as well\n * where each index is the mime type to use for the corresponding url index.\n */\n\n /**\n * Stores whether or not this url is a data url.\n *\n * @readonly\n * @member {boolean}\n */\n\n\n /**\n * Marks the resource as complete.\n *\n */\n Resource.prototype.complete = function complete() {\n this._clearEvents();\n this._finish();\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 // clear events before calling aborts\n this._clearEvents();\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._finish();\n };\n\n /**\n * Kicks off loading of this resource. This method is asynchronous.\n *\n * @param {Resource.OnCompleteSignal} [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) !== 0;\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 * Clears all the events from the underlying loading source.\n *\n * @private\n */\n\n\n Resource.prototype._clearEvents = function _clearEvents() {\n clearTimeout(this._elementTimer);\n\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('timeout', this._boundXhrOnTimeout, 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\n /**\n * Finalizes the load.\n *\n * @private\n */\n\n\n Resource.prototype._finish = function _finish() {\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 * 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 if (this.timeout) {\n this._elementTimer = setTimeout(this._boundOnTimeout, this.timeout);\n }\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.crossOrigin) {\n this.data.crossOrigin = this.crossOrigin;\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 if (this.timeout) {\n this._elementTimer = setTimeout(this._boundOnTimeout, this.timeout);\n }\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 xhr.timeout = this.timeout;\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('timeout', this._boundXhrOnTimeout, 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(); // eslint-disable-line no-undef\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 = this.timeout || 5000; // XDR needs a timeout value or it breaks in IE9\n\n xdr.onerror = this._boundXhrOnError;\n xdr.ontimeout = this._boundXhrOnTimeout;\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 an element or 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 a timeout event fires for an element.\n *\n * @private\n */\n\n\n Resource.prototype._onTimeout = function _onTimeout() {\n this.abort('Load timed out.');\n };\n\n /**\n * Called if an error event fires for xhr/xdr.\n *\n * @private\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 error event fires for xhr/xdr.\n *\n * @private\n */\n\n\n Resource.prototype._xhrOnTimeout = function _xhrOnTimeout() {\n var xhr = this.xhr;\n\n this.abort(reqType(xhr) + ' Request timed out.');\n };\n\n /**\n * Called if an abort event fires for xhr/xdr.\n *\n * @private\n */\n\n\n Resource.prototype._xhrOnAbort = function _xhrOnAbort() {\n var xhr = this.xhr;\n\n this.abort(reqType(xhr) + ' Request was aborted by the user.');\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 || xhr.responseType === Resource.XHR_RESPONSE_TYPE.BUFFER)) {\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 // A sandboxed iframe without the 'allow-same-origin' attribute will have a special\n // origin designed not to match window.location.origin, and will always require\n // crossOrigin requests regardless of whether the location matches.\n if (window.origin !== window.location.origin) {\n return 'anonymous';\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 _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 * @readonly\n * @member {boolean}\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 * @readonly\n * @member {boolean}\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\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\n// Backwards compat\nif (typeof module !== 'undefined') {\n module.exports.default = Resource; // eslint-disable-line no-undef\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 * @namespace async\n */\n\n/**\n * Noop function\n *\n * @ignore\n * @function\n * @memberof async\n */\nfunction _noop() {} /* empty */\n\n/**\n * Iterates an array in series.\n *\n * @memberof async\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 * @ignore\n * @memberof async\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 * @memberof async\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\n/**\n * Encodes binary into base64.\n *\n * @param {string} input The input data to encode.\n * @returns {string} The encoded base64 string\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\n// Backwards compat\nif (typeof module !== 'undefined') {\n module.exports.default = encodeBinary; // eslint-disable-line no-undef\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').Loader;\nvar Resource = require('./Resource').Resource;\nvar async = require('./async');\nvar b64 = require('./b64');\n\n/**\n *\n * @static\n * @memberof Loader\n * @member {Class<Resource>}\n */\nLoader.Resource = Resource;\n\n/**\n *\n * @static\n * @memberof Loader\n * @member {Class<async>}\n */\nLoader.async = async;\n\n/**\n *\n * @static\n * @memberof Loader\n * @member {Class<encodeBinary>}\n */\nLoader.encodeBinary = b64;\n\n/**\n *\n * @deprecated\n * @see Loader.encodeBinary\n *\n * @static\n * @memberof Loader\n * @member {Class<encodeBinary>}\n */\nLoader.base64 = b64;\n\n// export manually, and also as default\nmodule.exports = Loader;\n\n// default & named export\nmodule.exports.Loader = Loader;\nmodule.exports.default = Loader;\n//# sourceMappingURL=index.js.map","'use strict';\n\nexports.__esModule = true;\nexports.blobMiddlewareFactory = blobMiddlewareFactory;\n\nvar _Resource = require('../../Resource');\n\nvar _b = require('../../b64');\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 === _Resource.Resource.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,' + (0, _b.encodeBinary)(resource.xhr.responseText);\n\n resource.type = _Resource.Resource.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 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 = _Resource.Resource.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 }\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, true);\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 = 0; i < children.length; 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 // update button titles and hints if they exist and they've changed\n if (div.title !== child.accessibleTitle && child.accessibleTitle !== null)\n {\n div.title = child.accessibleTitle;\n }\n if (div.getAttribute('aria-label') !== child.accessibleHint\n && child.accessibleHint !== null)\n {\n div.setAttribute('aria-label', child.accessibleHint);\n }\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 // ARIA attributes ensure that button title and hint updates are announced properly\n if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1)\n {\n // Chrome doesn't need aria-live to work as intended; in fact it just gets more confused.\n div.setAttribute('aria-live', 'off');\n }\n else\n {\n div.setAttribute('aria-live', 'polite');\n }\n\n if (navigator.userAgent.match(/rv:.*Gecko\\//))\n {\n // FireFox needs this to announce only the new button name\n div.setAttribute('aria-relevant', 'additions');\n }\n else\n {\n // required by IE, other browsers don't much care\n div.setAttribute('aria-relevant', 'text');\n }\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 && displayObject.accessibleTitle !== null)\n {\n div.title = displayObject.accessibleTitle;\n }\n else if (!displayObject.accessibleHint\n || displayObject.accessibleHint === null)\n {\n div.title = `displayObject ${displayObject.tabIndex}`;\n }\n\n if (displayObject.accessibleHint\n && displayObject.accessibleHint !== null)\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 if (!e.target.getAttribute('aria-live', 'off'))\n {\n e.target.setAttribute('aria-live', 'assertive');\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 if (!e.target.getAttribute('aria-live', 'off'))\n {\n e.target.setAttribute('aria-live', 'polite');\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 * @param {MouseEvent} e - The mouse event.\n */\n _onMouseMove(e)\n {\n if (e.movementX === 0 && e.movementY === 0)\n {\n return;\n }\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, true);\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 * @param {object|boolean} [stageOptions] - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [stageOptions.children=false] - if set to true, all the children will have their destroy\n * method called as well. 'stageOptions' will be passed on to those calls.\n * @param {boolean} [stageOptions.texture=false] - Only used for child Sprites if stageOptions.children is set\n * to true. Should it destroy the texture of the child sprite\n * @param {boolean} [stageOptions.baseTexture=false] - Only used for child Sprites if stageOptions.children is set\n * to true. Should it destroy the base texture of the child sprite\n */\n destroy(removeView, stageOptions)\n {\n if (this._ticker)\n {\n const oldTicker = this._ticker;\n\n this.ticker = null;\n oldTicker.destroy();\n }\n\n this.stage.destroy(stageOptions);\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.trim().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 * @param {object} [attributeLocations] - A key value pair showing which location eact attribute should sit.\n e.g. {position:0, uvs:1}.\n * @param {string} [precision] - The float precision of the shader. Options are 'lowp', 'mediump' or 'highp'.\n */\n constructor(gl, vertexSrc, fragmentSrc, attributeLocations, precision)\n {\n super(gl, checkPrecision(vertexSrc, precision || settings.PRECISION_VERTEX),\n checkPrecision(fragmentSrc, precision || settings.PRECISION_FRAGMENT), undefined, attributeLocations);\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 wrapping 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 <svg width=\"100\" height=\"100\"></svg>\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 index ${index} supplied is out of bounds ${this.children.length}`);\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 this._mask.isMask = false;\n }\n\n this._mask = value;\n\n if (this._mask)\n {\n this._mask.renderable = false;\n this._mask.isMask = true;\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 if (this._rotation !== value)\n {\n this._rotation = value;\n this.updateSkew();\n }\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, PI_2 } 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 * The alignment of any lines drawn (0.5 = middle, 1 = outter, 0 = inner).\n *\n * @member {number}\n * @default 0.5\n */\n this.lineAlignment = 0.5;\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 this._prevRectTint = null;\n this._prevRectFillColor = null;\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.lineAlignment = this.lineAlignment;\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 * Calculate length of quadratic curve\n * @see {@link http://www.malczak.linuxpl.com/blog/quadratic-bezier-curve-length/}\n * for the detailed explanation of math behind this.\n *\n * @private\n * @param {number} fromX - x-coordinate of curve start point\n * @param {number} fromY - y-coordinate of curve start point\n * @param {number} cpX - x-coordinate of curve control point\n * @param {number} cpY - y-coordinate of curve control point\n * @param {number} toX - x-coordinate of curve end point\n * @param {number} toY - y-coordinate of curve end point\n * @return {number} Length of quadratic curve\n */\n _quadraticCurveLength(fromX, fromY, cpX, cpY, toX, toY)\n {\n const ax = fromX - (2.0 * cpX) + toX;\n const ay = fromY - (2.0 * cpY) + toY;\n const bx = (2.0 * cpX) - (2.0 * fromX);\n const by = (2.0 * cpY) - (2.0 * fromY);\n const a = 4.0 * ((ax * ax) + (ay * ay));\n const b = 4.0 * ((ax * bx) + (ay * by));\n const c = (bx * bx) + (by * by);\n\n const s = 2.0 * Math.sqrt(a + b + c);\n const a2 = Math.sqrt(a);\n const a32 = 2.0 * a * a2;\n const c2 = 2.0 * Math.sqrt(c);\n const ba = b / a2;\n\n return (\n (a32 * s)\n + (a2 * b * (s - c2))\n + (\n ((4.0 * c * a) - (b * b))\n * Math.log(((2.0 * a2) + ba + s) / (ba + c2))\n )\n )\n / (4.0 * a32);\n }\n\n /**\n * Calculate length of bezier curve.\n * Analytical solution is impossible, since it involves an integral that does not integrate in general.\n * Therefore numerical solution is used.\n *\n * @private\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 * @return {number} Length of bezier curve\n */\n _bezierCurveLength(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY)\n {\n const n = 10;\n let result = 0.0;\n let t = 0.0;\n let t2 = 0.0;\n let t3 = 0.0;\n let nt = 0.0;\n let nt2 = 0.0;\n let nt3 = 0.0;\n let x = 0.0;\n let y = 0.0;\n let dx = 0.0;\n let dy = 0.0;\n let prevX = fromX;\n let prevY = fromY;\n\n for (let i = 1; i <= n; ++i)\n {\n t = i / n;\n t2 = t * t;\n t3 = t2 * t;\n nt = (1.0 - t);\n nt2 = nt * nt;\n nt3 = nt2 * nt;\n\n x = (nt3 * fromX) + (3.0 * nt2 * t * cpX) + (3.0 * nt * t2 * cpX2) + (t3 * toX);\n y = (nt3 * fromY) + (3.0 * nt2 * t * cpY) + (3 * nt * t2 * cpY2) + (t3 * toY);\n dx = prevX - x;\n dy = prevY - y;\n prevX = x;\n prevY = y;\n\n result += Math.sqrt((dx * dx) + (dy * dy));\n }\n\n return result;\n }\n\n /**\n * Calculate number of segments for the curve based on its length to ensure its smoothness.\n *\n * @private\n * @param {number} length - length of curve\n * @return {number} Number of segments\n */\n _segmentsCount(length)\n {\n let result = Math.ceil(length / Graphics.CURVES.maxLength);\n\n if (result < Graphics.CURVES.minSegments)\n {\n result = Graphics.CURVES.minSegments;\n }\n else if (result > Graphics.CURVES.maxSegments)\n {\n result = Graphics.CURVES.maxSegments;\n }\n\n return result;\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 * @param {number} [alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outter)\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n lineStyle(lineWidth = 0, color = 0, alpha = 1, alignment = 0.5)\n {\n this.lineWidth = lineWidth;\n this.lineColor = color;\n this.lineAlpha = alpha;\n this.lineAlignment = alignment;\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 this.currentPath.lineAlignment = this.lineAlignment;\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 const points = this.currentPath.shape.points;\n\n const fromX = points[points.length - 2];\n const fromY = points[points.length - 1];\n\n if (fromX !== x || fromY !== y)\n {\n points.push(x, y);\n this.dirty++;\n }\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 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 const n = Graphics.CURVES.adaptive\n ? this._segmentsCount(this._quadraticCurveLength(fromX, fromY, cpX, cpY, toX, toY))\n : 20;\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 const n = Graphics.CURVES.adaptive\n ? this._segmentsCount(this._bezierCurveLength(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY))\n : 20;\n\n bezierCurveTo(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, n, 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 += PI_2;\n }\n else if (anticlockwise && startAngle <= endAngle)\n {\n startAngle += PI_2;\n }\n\n const sweep = endAngle - startAngle;\n const segs = Graphics.CURVES.adaptive\n ? this._segmentsCount(Math.abs(sweep) * radius)\n : Math.ceil(Math.abs(sweep) / 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 // We check how far our start is from the last existing point\n const xDiff = Math.abs(points[points.length - 2] - startX);\n const yDiff = Math.abs(points[points.length - 1] - startY);\n\n if (xDiff < 0.001 && yDiff < 0.001)\n {\n // If the point is very close, we don't add it, since this would lead to artifacts\n // during tesselation due to floating point imprecision.\n }\n else\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 * Draw a star shape with an abitrary number of points.\n *\n * @param {number} x - Center X position of the star\n * @param {number} y - Center Y position of the star\n * @param {number} points - The number of points of the star, must be > 1\n * @param {number} radius - The outer radius of the star\n * @param {number} [innerRadius] - The inner radius between points, default half `radius`\n * @param {number} [rotation=0] - The rotation of the star in radians, where 0 is vertical\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n drawStar(x, y, points, radius, innerRadius, rotation = 0)\n {\n innerRadius = innerRadius || radius / 2;\n\n const startAngle = (-1 * Math.PI / 2) + rotation;\n const len = points * 2;\n const delta = PI_2 / len;\n const polygon = [];\n\n for (let i = 0; i < len; i++)\n {\n const r = i % 2 ? innerRadius : radius;\n const angle = (i * delta) + startAngle;\n\n polygon.push(\n x + (r * Math.cos(angle)),\n y + (r * Math.sin(angle))\n );\n }\n\n return this.drawPolygon(polygon);\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.lineAlignment = 0.5;\n\n this.filling = false;\n\n this.boundsDirty = -1;\n this.canvasTintDirty = -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 const fillColor = this.graphicsData[0].fillColor;\n\n if (this.tint === 0xffffff)\n {\n sprite.tint = fillColor;\n }\n else if (this.tint !== this._prevRectTint || fillColor !== this._prevRectFillColor)\n {\n const t1 = tempColor1;\n const t2 = tempColor2;\n\n hex2rgb(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 this._prevRectTint = this.tint;\n this._prevRectFillColor = fillColor;\n }\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 const lineAlignment = data.lineAlignment;\n\n const lineOffset = lineWidth * lineAlignment;\n\n shape = data.shape;\n\n if (type === SHAPES.RECT || type === SHAPES.RREC)\n {\n x = shape.x - lineOffset;\n y = shape.y - lineOffset;\n w = shape.width + (lineOffset * 2);\n h = shape.height + (lineOffset * 2);\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 + lineOffset;\n h = shape.radius + lineOffset;\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 + lineOffset;\n h = shape.height + lineOffset;\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 = lineOffset * 2;\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 this.lineAlignment\n );\n\n this.graphicsData.push(data);\n\n if (data.type === SHAPES.POLY)\n {\n data.shape.closed = data.shape.closed;\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/**\n * Graphics curves resolution settings. If `adaptive` flag is set to `true`,\n * the resolution is calculated based on the curve's length to ensure better visual quality.\n * Adaptive draw works with `bezierCurveTo` and `quadraticCurveTo`.\n *\n * @static\n * @constant\n * @memberof PIXI.Graphics\n * @name CURVES\n * @type {object}\n * @property {boolean} adaptive=false - flag indicating if the resolution should be adaptive\n * @property {number} maxLength=10 - maximal length of a single segment of the curve (if adaptive = false, ignored)\n * @property {number} minSegments=8 - minimal number of segments in the curve (if adaptive = false, ignored)\n * @property {number} maxSegments=2048 - maximal number of segments in the curve (if adaptive = false, ignored)\n */\nGraphics.CURVES = {\n adaptive: false,\n maxLength: 10,\n minSegments: 8,\n maxSegments: 2048,\n};\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 * @param {number} lineAlignment - the alignment of the line.\n */\n constructor(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, nativeLines, shape, lineAlignment)\n {\n /**\n * the width of the line to draw\n * @member {number}\n */\n this.lineWidth = lineWidth;\n\n /**\n * The alignment of any lines drawn (0.5 = middle, 1 = outter, 0 = inner).\n *\n * @member {number}\n * @default 0\n */\n this.lineAlignment = lineAlignment;\n\n /**\n * if true the liens will be draw using LINES instead of TRIANGLE_STRIP\n * @member {boolean}\n */\n this.nativeLines = nativeLines;\n\n /**\n * the color of the line to draw\n * @member {number}\n */\n this.lineColor = lineColor;\n\n /**\n * the alpha of the line to draw\n * @member {number}\n */\n this.lineAlpha = lineAlpha;\n\n /**\n * cached tint of the line to draw\n * @member {number}\n * @private\n */\n this._lineTint = lineColor;\n\n /**\n * the color of the fill\n * @member {number}\n */\n this.fillColor = fillColor;\n\n /**\n * the alpha of the fill\n * @member {number}\n */\n this.fillAlpha = fillAlpha;\n\n /**\n * cached tint of the fill\n * @member {number}\n * @private\n */\n this._fillTint = fillColor;\n\n /**\n * whether or not the shape is filled with a colour\n * @member {boolean}\n */\n this.fill = fill;\n\n this.holes = [];\n\n /**\n * The shape object to draw.\n * @member {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle}\n */\n this.shape = shape;\n\n /**\n * The type of the shape, see the Const.Shapes file for all the existing types,\n * @member {number}\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 this.lineAlignment\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 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 // update tint if graphics was dirty\n if (graphics.canvasTintDirty !== graphics.dirty\n || graphics._prevTint !== graphics.tint)\n {\n this.updateGraphicsTint(graphics);\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 let points = shape.points;\n const holes = data.holes;\n let outerArea;\n let innerArea;\n\n context.moveTo(points[0], points[1]);\n\n for (let j = 2; j < points.length; j += 2)\n {\n context.lineTo(points[j], points[j + 1]);\n }\n\n // if the first and last point are the same close the path - much neater :)\n if (shape.closed)\n {\n context.closePath();\n }\n\n if (holes.length > 0)\n {\n outerArea = 0;\n for (let j = 0; j < points.length; j += 2)\n {\n outerArea += (points[j] * points[j + 3]) - (points[j + 1] * points[j + 2]);\n }\n\n for (let k = 0; k < holes.length; k++)\n {\n points = holes[k].points;\n\n innerArea = 0;\n for (let j = 0; j < points.length; j += 2)\n {\n innerArea += (points[j] * points[j + 3]) - (points[j + 1] * points[j + 2]);\n }\n\n context.moveTo(points[0], points[1]);\n\n if (innerArea * outerArea < 0)\n {\n for (let j = 2; j < points.length; j += 2)\n {\n context.lineTo(points[j], points[j + 1]);\n }\n }\n else\n {\n for (let j = points.length - 2; j >= 2; j -= 2)\n {\n context.lineTo(points[j], points[j + 1]);\n }\n }\n\n if (holes[k].closed)\n {\n context.closePath();\n }\n }\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 graphics.canvasTintDirty = graphics.dirty;\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 optimization :)\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} n - Number of segments approximating the bezier curve\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, n, path = [])\n{\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; i++)\n {\n graphicsData.points.push(\n x + (Math.sin(seg * -i) * width),\n y + (Math.cos(seg * -i) * height)\n );\n }\n\n graphicsData.points.push(\n graphicsData.points[0],\n graphicsData.points[1]\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 const ratio = graphicsData.lineAlignment;// 0.5;\n const r1 = (1 - ratio) * 2;\n const r2 = ratio * 2;\n\n // start\n verts.push(\n p1x - (perpx * r1),\n p1y - (perpy * r1),\n r, g, b, alpha\n );\n\n verts.push(\n p1x + (perpx * r2),\n p1y + (perpy * r2),\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 * r1),\n p2y - (perpy * r1),\n r, g, b, alpha\n );\n\n verts.push(\n p2x + (perpx * r2),\n p2y + (perpy * r2),\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 * r1), p2y - (perp3y * r1));\n verts.push(r, g, b, alpha);\n\n verts.push(p2x + (perp3x * r2), p2y + (perp3y * r2));\n verts.push(r, g, b, alpha);\n\n verts.push(p2x - (perp3x * r2 * r1), p2y - (perp3y * r1));\n verts.push(r, g, b, alpha);\n\n indexCount++;\n }\n else\n {\n verts.push(p2x + ((px - p2x) * r1), p2y + ((py - p2y) * r1));\n verts.push(r, g, b, alpha);\n\n verts.push(p2x - ((px - p2x) * r2), p2y - ((py - p2y) * r2));\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 * r1), p2y - (perpy * r1));\n verts.push(r, g, b, alpha);\n\n verts.push(p2x + (perpx * r2), p2y + (perpy * r2));\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 + radius, y);\n quadraticBezierCurve(x + width - radius, y, x + width, y, x + width, y + radius, recPoints);\n quadraticBezierCurve(x + width, y + height - radius, x + width, y + height, x + width - radius, y + height, recPoints);\n quadraticBezierCurve(x + radius, y + height, x, y + height, x, y + height - radius, recPoints);\n quadraticBezierCurve(x, y + radius, x, y, x + radius + 0.0000000001, y, 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 TextureMatrix } from './textures/TextureMatrix';\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 * Direction of main vector can be horizontal, vertical or diagonal.\n * Some objects work with vertical directions different.\n *\n * @memberof PIXI.GroupD8\n * @param {number} rotation - The number to check.\n * @returns {boolean} Whether or not the direction is vertical\n */\n isVertical: (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';\nimport { PI_2 } from '../const';\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 | c | tx|\n * | b | 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] - x skew\n * @param {number} [c=0] - y 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 this.a = Math.cos(rotation + skewY) * scaleX;\n this.b = Math.sin(rotation + skewY) * scaleX;\n this.c = -Math.sin(rotation - skewX) * scaleY;\n this.d = Math.cos(rotation - skewX) * scaleY;\n\n this.tx = x - ((pivotX * this.a) + (pivotY * this.c));\n this.ty = y - ((pivotX * this.b) + (pivotY * this.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 || Math.abs(PI_2 - 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.rotation = 0;\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 * Creates a clone of this point.\n * The callback and scope params can be overidden otherwise they will default\n * to the clone object's values.\n *\n * @override\n * @param {Function} [cb=null] - callback when changed\n * @param {object} [scope=null] - owner of callback\n * @return {PIXI.ObservablePoint} a copy of the point\n */\n clone(cb = null, scope = null)\n {\n const _cb = cb || this.cb;\n const _scope = scope || this.scope;\n\n return new ObservablePoint(_cb, _scope, this._x, 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 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 * Returns true if the given point is equal to this point\n *\n * @param {PIXI.Point|PIXI.ObservablePoint} 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 * 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 ellipse\n * @param {number} [y=0] - The Y coordinate of the center of this ellipse\n * @param {number} [halfWidth=0] - The half width of this ellipse\n * @param {number} [halfHeight=0] - The half height of this ellipse\n */\n constructor(x = 0, y = 0, halfWidth = 0, halfHeight = 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 = halfWidth;\n\n /**\n * @member {number}\n * @default 0\n */\n this.height = halfHeight;\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 const x1 = Math.max(this.x, rectangle.x);\n const x2 = Math.min(this.x + this.width, rectangle.x + rectangle.width);\n const y1 = Math.max(this.y, rectangle.y);\n const y2 = Math.min(this.y + this.height, rectangle.y + rectangle.height);\n\n this.x = x1;\n this.width = Math.max(x2 - x1, 0);\n this.y = y1;\n this.height = Math.max(y2 - y1, 0);\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 /**\n * Enlarges rectangle that way its corners lie on grid\n *\n * @param {number} [resolution=1] resolution\n * @param {number} [eps=0.001] precision\n */\n ceil(resolution = 1, eps = 0.001)\n {\n const x2 = Math.ceil((this.x + this.width - eps) * resolution) / resolution;\n const y2 = Math.ceil((this.y + this.height - eps) * resolution) / resolution;\n\n this.x = Math.floor((this.x + eps) * resolution) / resolution;\n this.y = Math.floor((this.y + eps) * resolution) / resolution;\n\n this.width = x2 - this.x;\n this.height = y2 - this.y;\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 * @param {PIXI.Rectangle} [region] - The region of the displayObject, that shall be rendered,\n * if no region is specified, defaults to the local bounds of the displayObject.\n * @return {PIXI.Texture} a texture of the graphics object\n */\n generateTexture(displayObject, scaleMode, resolution, region)\n {\n region = region || displayObject.getLocalBounds();\n\n const renderTexture = RenderTexture.create(region.width | 0, region.height | 0, scaleMode, resolution);\n\n tempMatrix.tx = -region.x;\n tempMatrix.ty = -region.y;\n\n this.render(displayObject, renderTexture, false, tempMatrix, !!displayObject.parent);\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.Matrix} [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.save();\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 context.restore();\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 let points = shape.points;\n const holes = data.holes;\n let outerArea;\n let innerArea;\n\n context.moveTo(points[0], points[1]);\n\n for (let j = 2; j < points.length; j += 2)\n {\n context.lineTo(points[j], points[j + 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 if (holes.length > 0)\n {\n outerArea = 0;\n for (let j = 0; j < points.length; j += 2)\n {\n outerArea += (points[j] * points[j + 3]) - (points[j + 1] * points[j + 2]);\n }\n\n for (let k = 0; k < holes.length; k++)\n {\n points = holes[k].points;\n\n innerArea = 0;\n for (let j = 0; j < points.length; j += 2)\n {\n innerArea += (points[j] * points[j + 3]) - (points[j + 1] * points[j + 2]);\n }\n\n context.moveTo(points[0], points[1]);\n\n if (innerArea * outerArea < 0)\n {\n for (let j = 2; j < points.length; j += 2)\n {\n context.lineTo(points[j], points[j + 1]);\n }\n }\n else\n {\n for (let j = points.length - 2; j >= 2; j -= 2)\n {\n context.lineTo(points[j], points[j + 1]);\n }\n }\n }\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 // framebuffer constructor disactivates current framebuffer\n if (!this.renderer._activeRenderTarget.root)\n {\n this.renderer._activeRenderTarget.frameBuffer.bind();\n }\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 renderer = this.renderer;\n const uid = renderer.CONTEXT_UID;\n const glTextures = texture._glTextures;\n const glRenderTargets = texture._glRenderTargets;\n\n if (glTextures[uid])\n {\n 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 if (renderer._activeRenderTarget === glRenderTargets[uid])\n {\n renderer.bindRenderTarget(renderer.rootRenderTarget);\n }\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 experience 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 /**\n * Manages textures\n * @member {PIXI.TextureManager}\n */\n this.textureManager = null;\n\n /**\n * Manages the filters.\n *\n * @member {PIXI.FilterManager}\n */\n this.filterManager = null;\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 // 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 /**\n * Did someone temper with textures state? We'll overwrite them when we need to unbind something.\n * @member {boolean}\n * @private\n */\n this._unknownBoundTextures = false;\n\n // create a texture manager...\n this.textureManager = new TextureManager(this);\n this.filterManager = new FilterManager(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.Matrix} [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.Matrix} 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 if (this._unknownBoundTextures)\n {\n this._unknownBoundTextures = false;\n // someone changed webGL state,\n // we have to be sure that our texture does not appear in multitexture renderer samplers\n\n for (let i = 0; i < this.boundTextures.length; i++)\n {\n if (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\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.bindVao(null);\n this._activeShader = null;\n this._activeRenderTarget = this.rootRenderTarget;\n\n this._unknownBoundTextures = true;\n\n for (let i = 0; i < this.boundTextures.length; i++)\n {\n this.boundTextures[i] = this.emptyTextures[i];\n }\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.filterManager.destroy(true);\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} [uniformData] - Custom uniforms to use to augment the built-in ones.\n */\n constructor(vertexSrc, fragmentSrc, uniformData)\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 = uniformData || extractUniformsFromSrc(\n this.vertexSrc,\n this.fragmentSrc,\n 'projectionMatrix|uSampler'\n );\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 if (this.uniformData[i].type)\n {\n this.uniformData[i].type = this.uniformData[i].type.toLowerCase();\n }\n }\n\n // this is where we store shader references..\n // TODO we could cache this!\n this.glShaders = {};\n\n // used for caching.. 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.FILTER_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 * @private\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 orig = sprite._texture.orig;\n const mappedMatrix = outputMatrix.set(textureSize.width, 0, 0, textureSize.height, filterArea.x, filterArea.y);\n const worldTransform = sprite.worldTransform.copy(Matrix.TEMP_MATRIX);\n\n worldTransform.invert();\n mappedMatrix.prepend(worldTransform);\n mappedMatrix.scale(1.0 / orig.width, 1.0 / orig.height);\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';\nimport { default as TextureMatrix } from '../../../../textures/TextureMatrix';\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 * @param {boolean} clear - Should the output be cleared before rendering to it\n */\n apply(filterManager, input, output, clear)\n {\n const maskSprite = this.maskSprite;\n const tex = this.maskSprite.texture;\n\n if (!tex.valid)\n {\n return;\n }\n if (!tex.transform)\n {\n // margin = 0.0, let it bleed a bit, shader code becomes easier\n // assuming that atlas textures were made with 1-pixel padding\n tex.transform = new TextureMatrix(tex, 0.0);\n }\n tex.transform.update();\n\n this.uniforms.mask = tex;\n this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite)\n .prepend(tex.transform.mapCoord);\n this.uniforms.alpha = maskSprite.worldAlpha;\n this.uniforms.maskClamp = tex.transform.uClampFrame;\n\n filterManager.applyFilter(this, input, output, clear);\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.target = null;\n this.resolution = 1;\n\n // those three objects are used only for root\n // re-assigned for everything else\n this.sourceFrame = new Rectangle();\n this.destinationFrame = new Rectangle();\n this.filters = [];\n }\n\n /**\n * clears the state\n */\n clear()\n {\n this.filters = null;\n this.target = null;\n this.renderTarget = null;\n }\n}\n\nconst screenKey = 'screen';\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 this.managedFilters = [];\n\n this.renderer.on('prerender', this.onPrerender, this);\n\n this._screenWidth = renderer.view.width;\n this._screenHeight = renderer.view.height;\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 const renderTargetFrame = filterData.stack[0].destinationFrame;\n\n if (!currentState)\n {\n currentState = filterData.stack[filterData.index] = new FilterState();\n }\n\n const fullScreen = target.filterArea\n && target.filterArea.x === 0\n && target.filterArea.y === 0\n && target.filterArea.width === renderer.screen.width\n && target.filterArea.height === renderer.screen.height;\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 = fullScreen ? renderer.screen : (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 (!fullScreen)\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(renderTargetFrame);\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\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 currentState.clear();\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 // caching..\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 this.managedFilters.push(filter);\n }\n }\n else\n {\n shader = filter.glShaders[renderer.CONTEXT_UID] = new Shader(this.gl, filter.vertexSrc, filter.fragmentSrc);\n this.managedFilters.push(filter);\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 Caching layer..\n for (const i in uniformData)\n {\n if (!shader.uniforms.data[i])\n {\n continue;\n }\n\n const type = uniformData[i].type;\n\n if (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 (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 (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 (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 * @param {boolean} [contextLost=false] context was lost, do not free shaders\n *\n */\n destroy(contextLost = false)\n {\n const renderer = this.renderer;\n const filters = this.managedFilters;\n\n renderer.off('prerender', this.onPrerender, this);\n\n for (let i = 0; i < filters.length; i++)\n {\n if (!contextLost)\n {\n filters[i].glShaders[renderer.CONTEXT_UID].destroy();\n }\n delete filters[i].glShaders[renderer.CONTEXT_UID];\n }\n\n this.shaderCache = {};\n if (!contextLost)\n {\n this.emptyPool();\n }\n else\n {\n this.pool = {};\n }\n }\n\n /**\n * Gets a Power-of-Two render texture.\n *\n * TODO move to a separate 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 let key = screenKey;\n\n minWidth *= resolution;\n minHeight *= resolution;\n\n if (minWidth !== this._screenWidth\n || minHeight !== this._screenHeight)\n {\n // TODO you could return a bigger texture if there is not one in the pool?\n minWidth = bitTwiddle.nextPow2(minWidth);\n minHeight = bitTwiddle.nextPow2(minHeight);\n key = ((minWidth & 0xFFFF) << 16) | (minHeight & 0xFFFF);\n }\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 renderTarget.filterPoolKey = key;\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 this.pool[renderTarget.filterPoolKey].push(renderTarget);\n }\n\n /**\n * Called before the renderer starts rendering.\n *\n */\n onPrerender()\n {\n if (this._screenWidth !== this.renderer.view.width\n || this._screenHeight !== this.renderer.view.height)\n {\n this._screenWidth = this.renderer.view.width;\n this._screenHeight = this.renderer.view.height;\n\n const textures = this.pool[screenKey];\n\n if (textures)\n {\n for (let j = 0; j < textures.length; j++)\n {\n textures[j].destroy(true);\n }\n }\n this.pool[screenKey] = [];\n }\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 const stashFilterArea = target.filterArea;\n\n target.filterArea = maskData.getBounds(true);\n this.renderer.filterManager.pushFilter(target, alphaMaskFilter);\n target.filterArea = stashFilterArea;\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 reference 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 reference 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 key for pooled texture of FilterSystem\n * @private\n * @member {string}\n */\n this.filterPoolKey = '';\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 * @default false\n */\n this.root = root || false;\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 // TODO 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 if (this.frameBuffer.stencil)\n {\n this.gl.deleteRenderbuffer(this.frameBuffer.stencil);\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.settings\n * @type {boolean}\n */\n CAN_UPLOAD_SAME_BUFFER: canUploadSameBuffer(),\n\n /**\n * Default Mesh `canvasPadding`.\n *\n * @see PIXI.mesh.Mesh#canvasPadding\n * @static\n * @constant\n * @memberof PIXI.settings\n * @type {number}\n */\n MESH_CANVAS_PADDING: 0,\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 * The more efficient way to create sprites is using a {@link PIXI.Spritesheet}:\n *\n * ```js\n * PIXI.loader.add(\"assets/spritesheet.json\").load(setup);\n *\n * function setup() {\n * let sheet = PIXI.loader.resources[\"assets/spritesheet.json\"].spritesheet;\n * let sprite = new PIXI.Sprite(sheet.textures[\"image.png\"]);\n * ...\n * }\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 or taken from the {@link PIXI.Texture#defaultAnchor|Texture}\n * passed to the constructor. A value of 0,0 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 * Note: Updating the {@link PIXI.Texture#defaultAnchor} after a Texture is\n * created does _not_ update the Sprite's anchor values.\n *\n * @member {PIXI.ObservablePoint}\n * @private\n */\n this._anchor = new ObservablePoint(\n this._onAnchorUpdate,\n this,\n (texture ? texture.defaultAnchor.x : 0),\n (texture ? texture.defaultAnchor.y : 0)\n );\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 this.cachedTint = 0xFFFFFF;\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._texture.off('update', this._onTextureUpdate, this);\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 or taken from the {@link PIXI.Texture|Texture} passed to the constructor.\n * Setting the texture at a later point of time does not change the anchor.\n *\n * 0,0 means the texture's origin is the top left, 0.5,0.5 is the center, 1,1 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 || Texture.EMPTY;\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 const bt = rendererBoundTextures[i];\n\n if (bt._enabled === TICK)\n {\n boundTextures[i] = this.renderer.emptyTextures[i];\n continue;\n }\n\n boundTextures[i] = bt;\n bt._virtalBoundId = i;\n bt._enabled = TICK;\n }\n TICK++;\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 sprites[i] = null;\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 * which can be generated [here](https://pixijs.io/pixi-text-style).\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((Math.max(1, width) + (style.padding * 2)) * this.resolution);\n this.canvas.height = Math.ceil((Math.max(1, 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 if (trimmed.data)\n {\n canvas.width = trimmed.width;\n canvas.height = trimmed.height;\n this.context.putImageData(trimmed.data, 0, 0);\n }\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 * ```js\n * let style = new PIXI.TextStyle({fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'})\n * let textMetrics = PIXI.TextMetrics.measureText('Your text', style)\n * ```\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 === undefined || wordWrap === null) ? style.wordWrap : 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 let width = 0;\n let line = '';\n let lines = '';\n\n const cache = {};\n const { letterSpacing, whiteSpace } = style;\n\n // How to handle whitespaces\n const collapseSpaces = TextMetrics.collapseSpaces(whiteSpace);\n const collapseNewlines = TextMetrics.collapseNewlines(whiteSpace);\n\n // whether or not spaces may be added to the beginning of lines\n let canPrependSpaces = !collapseSpaces;\n\n // There is letterSpacing after every char except the last one\n // t_h_i_s_' '_i_s_' '_a_n_' '_e_x_a_m_p_l_e_' '_!\n // so for convenience the above needs to be compared to width + 1 extra letterSpace\n // t_h_i_s_' '_i_s_' '_a_n_' '_e_x_a_m_p_l_e_' '_!_\n // ________________________________________________\n // And then the final space is simply no appended to each line\n const wordWrapWidth = style.wordWrapWidth + letterSpacing;\n\n // break text into words, spaces and newline chars\n const tokens = TextMetrics.tokenize(text);\n\n for (let i = 0; i < tokens.length; i++)\n {\n // get the word, space or newlineChar\n let token = tokens[i];\n\n // if word is a new line\n if (TextMetrics.isNewline(token))\n {\n // keep the new line\n if (!collapseNewlines)\n {\n lines += TextMetrics.addLine(line);\n canPrependSpaces = !collapseSpaces;\n line = '';\n width = 0;\n continue;\n }\n\n // if we should collapse new lines\n // we simply convert it into a space\n token = ' ';\n }\n\n // if we should collapse repeated whitespaces\n if (collapseSpaces)\n {\n // check both this and the last tokens for spaces\n const currIsBreakingSpace = TextMetrics.isBreakingSpace(token);\n const lastIsBreakingSpace = TextMetrics.isBreakingSpace(line[line.length - 1]);\n\n if (currIsBreakingSpace && lastIsBreakingSpace)\n {\n continue;\n }\n }\n\n // get word width from cache if possible\n const tokenWidth = TextMetrics.getFromCache(token, letterSpacing, cache, context);\n\n // word is longer than desired bounds\n if (tokenWidth > wordWrapWidth)\n {\n // if we are not already at the beginning of a line\n if (line !== '')\n {\n // start newlines for overflow words\n lines += TextMetrics.addLine(line);\n line = '';\n width = 0;\n }\n\n // break large word over multiple lines\n if (TextMetrics.canBreakWords(token, style.breakWords))\n {\n // break word into characters\n const characters = token.split('');\n\n // loop the characters\n for (let j = 0; j < characters.length; j++)\n {\n let char = characters[j];\n\n let k = 1;\n // we are not at the end of the token\n\n while (characters[j + k])\n {\n const nextChar = characters[j + k];\n const lastChar = char[char.length - 1];\n\n // should not split chars\n if (!TextMetrics.canBreakChars(lastChar, nextChar, token, j, style.breakWords))\n {\n // combine chars & move forward one\n char += nextChar;\n }\n else\n {\n break;\n }\n\n k++;\n }\n\n j += char.length - 1;\n\n const characterWidth = TextMetrics.getFromCache(char, letterSpacing, cache, context);\n\n if (characterWidth + width > wordWrapWidth)\n {\n lines += TextMetrics.addLine(line);\n canPrependSpaces = false;\n line = '';\n width = 0;\n }\n\n line += char;\n width += characterWidth;\n }\n }\n\n // run word out of the bounds\n else\n {\n // if there are words in this line already\n // finish that line and start a new one\n if (line.length > 0)\n {\n lines += TextMetrics.addLine(line);\n line = '';\n width = 0;\n }\n\n const isLastToken = i === tokens.length - 1;\n\n // give it its own line if it's not the end\n lines += TextMetrics.addLine(token, !isLastToken);\n canPrependSpaces = false;\n line = '';\n width = 0;\n }\n }\n\n // word could fit\n else\n {\n // word won't fit because of existing words\n // start a new line\n if (tokenWidth + width > wordWrapWidth)\n {\n // if its a space we don't want it\n canPrependSpaces = false;\n\n // add a new line\n lines += TextMetrics.addLine(line);\n\n // start a new line\n line = '';\n width = 0;\n }\n\n // don't add spaces to the beginning of lines\n if (line.length > 0 || !TextMetrics.isBreakingSpace(token) || canPrependSpaces)\n {\n // add the word to the current line\n line += token;\n\n // update width counter\n width += tokenWidth;\n }\n }\n }\n\n lines += TextMetrics.addLine(line, false);\n\n return lines;\n }\n\n /**\n * Convienience function for logging each line added during the wordWrap\n * method\n *\n * @private\n * @param {string} line - The line of text to add\n * @param {boolean} newLine - Add new line character to end\n * @return {string} A formatted line\n */\n static addLine(line, newLine = true)\n {\n line = TextMetrics.trimRight(line);\n\n line = (newLine) ? `${line}\\n` : line;\n\n return line;\n }\n\n /**\n * Gets & sets the widths of calculated characters in a cache object\n *\n * @private\n * @param {string} key The key\n * @param {number} letterSpacing The letter spacing\n * @param {object} cache The cache\n * @param {CanvasRenderingContext2D} context The canvas context\n * @return {number} The from cache.\n */\n static getFromCache(key, letterSpacing, cache, context)\n {\n let width = cache[key];\n\n if (width === undefined)\n {\n const spacing = ((key.length) * letterSpacing);\n\n width = context.measureText(key).width + spacing;\n cache[key] = width;\n }\n\n return width;\n }\n\n /**\n * Determines whether we should collapse breaking spaces\n *\n * @private\n * @param {string} whiteSpace The TextStyle property whiteSpace\n * @return {boolean} should collapse\n */\n static collapseSpaces(whiteSpace)\n {\n return (whiteSpace === 'normal' || whiteSpace === 'pre-line');\n }\n\n /**\n * Determines whether we should collapse newLine chars\n *\n * @private\n * @param {string} whiteSpace The white space\n * @return {boolean} should collapse\n */\n static collapseNewlines(whiteSpace)\n {\n return (whiteSpace === 'normal');\n }\n\n /**\n * trims breaking whitespaces from string\n *\n * @private\n * @param {string} text The text\n * @return {string} trimmed string\n */\n static trimRight(text)\n {\n if (typeof text !== 'string')\n {\n return '';\n }\n\n for (let i = text.length - 1; i >= 0; i--)\n {\n const char = text[i];\n\n if (!TextMetrics.isBreakingSpace(char))\n {\n break;\n }\n\n text = text.slice(0, -1);\n }\n\n return text;\n }\n\n /**\n * Determines if char is a newline.\n *\n * @private\n * @param {string} char The character\n * @return {boolean} True if newline, False otherwise.\n */\n static isNewline(char)\n {\n if (typeof char !== 'string')\n {\n return false;\n }\n\n return (TextMetrics._newlines.indexOf(char.charCodeAt(0)) >= 0);\n }\n\n /**\n * Determines if char is a breaking whitespace.\n *\n * @private\n * @param {string} char The character\n * @return {boolean} True if whitespace, False otherwise.\n */\n static isBreakingSpace(char)\n {\n if (typeof char !== 'string')\n {\n return false;\n }\n\n return (TextMetrics._breakingSpaces.indexOf(char.charCodeAt(0)) >= 0);\n }\n\n /**\n * Splits a string into words, breaking-spaces and newLine characters\n *\n * @private\n * @param {string} text The text\n * @return {array} A tokenized array\n */\n static tokenize(text)\n {\n const tokens = [];\n let token = '';\n\n if (typeof text !== 'string')\n {\n return tokens;\n }\n\n for (let i = 0; i < text.length; i++)\n {\n const char = text[i];\n\n if (TextMetrics.isBreakingSpace(char) || TextMetrics.isNewline(char))\n {\n if (token !== '')\n {\n tokens.push(token);\n token = '';\n }\n\n tokens.push(char);\n\n continue;\n }\n\n token += char;\n }\n\n if (token !== '')\n {\n tokens.push(token);\n }\n\n return tokens;\n }\n\n /**\n * This method exists to be easily overridden\n * It allows one to customise which words should break\n * Examples are if the token is CJK or numbers.\n * It must return a boolean.\n *\n * @private\n * @param {string} token The token\n * @param {boolean} breakWords The style attr break words\n * @return {boolean} whether to break word or not\n */\n static canBreakWords(token, breakWords)\n {\n return breakWords;\n }\n\n /**\n * This method exists to be easily overridden\n * It allows one to determine whether a pair of characters\n * should be broken by newlines\n * For example certain characters in CJK langs or numbers.\n * It must return a boolean.\n *\n * @private\n * @param {string} char The character\n * @param {string} nextChar The next character\n * @param {string} token The token/word the characters are from\n * @param {number} index The index in the token of the char\n * @param {boolean} breakWords The style attr break words\n * @return {boolean} whether to break word or not\n */\n static canBreakChars(char, nextChar, token, index, breakWords) // eslint-disable-line no-unused-vars\n {\n return true;\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 metricsString = TextMetrics.METRICS_STRING + TextMetrics.BASELINE_SYMBOL;\n const width = Math.ceil(context.measureText(metricsString).width);\n let baseline = Math.ceil(context.measureText(TextMetrics.BASELINE_SYMBOL).width);\n const height = 2 * baseline;\n\n baseline = baseline * TextMetrics.BASELINE_MULTIPLIER | 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(metricsString, 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 * Clear font metrics in metrics cache.\n *\n * @static\n * @param {string} [font] - font name. If font name not set then clear cache for all fonts.\n */\n static clearMetrics(font = '')\n {\n if (font)\n {\n delete TextMetrics._fonts[font];\n }\n else\n {\n TextMetrics._fonts = {};\n }\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\n/**\n * String used for calculate font metrics.\n * @static\n * @memberof PIXI.TextMetrics\n * @name METRICS_STRING\n * @type {string}\n * @default |Éq\n */\nTextMetrics.METRICS_STRING = '|Éq';\n\n/**\n * Baseline symbol for calculate font metrics.\n * @static\n * @memberof PIXI.TextMetrics\n * @name BASELINE_SYMBOL\n * @type {string}\n * @default M\n */\nTextMetrics.BASELINE_SYMBOL = 'M';\n\n/**\n * Baseline multiplier for calculate font metrics.\n * @static\n * @memberof PIXI.TextMetrics\n * @name BASELINE_MULTIPLIER\n * @type {number}\n * @default 1.4\n */\nTextMetrics.BASELINE_MULTIPLIER = 1.4;\n\n/**\n * Cache of new line chars.\n * @memberof PIXI.TextMetrics\n * @type {number[]}\n * @private\n */\nTextMetrics._newlines = [\n 0x000A, // line feed\n 0x000D, // carriage return\n];\n\n/**\n * Cache of breaking spaces.\n * @memberof PIXI.TextMetrics\n * @type {number[]}\n * @private\n */\nTextMetrics._breakingSpaces = [\n 0x0009, // character tabulation\n 0x0020, // space\n 0x2000, // en quad\n 0x2001, // em quad\n 0x2002, // en space\n 0x2003, // em space\n 0x2004, // three-per-em space\n 0x2005, // four-per-em space\n 0x2006, // six-per-em space\n 0x2008, // punctuation space\n 0x2009, // thin space\n 0x200A, // hair space\n 0x205F, // medium mathematical space\n 0x3000, // ideographic space\n];\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 whiteSpace: 'pre',\n wordWrap: false,\n wordWrapWidth: 100,\n leading: 0,\n};\n\nconst genericFontFamilies = [\n 'serif',\n 'sans-serif',\n 'monospace',\n 'cursive',\n 'fantasy',\n 'system-ui',\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 * It can be generated [here](https://pixijs.io/pixi-text-style).\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. Possible values \"miter\" (creates a sharp corner), \"round\" (creates a round corner) or \"bevel\"\n * (creates a squared 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.whiteSpace='pre'] - Determines whether newlines & spaces are collapsed or preserved \"normal\"\n * (collapse, collapse), \"pre\" (preserve, preserve) | \"pre-line\" (preserve, collapse). It needs wordWrap to be set to true\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 this.reset();\n\n deepCopyProperties(this, style, 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 deepCopyProperties(clonedProperties, this, defaultStyle);\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 deepCopyProperties(this, defaultStyle, 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 * How newlines and spaces should be handled.\n * Default is 'pre' (preserve, preserve).\n *\n * value | New lines | Spaces\n * --- | --- | ---\n * 'normal' | Collapse | Collapse\n * 'pre' | Preserve | Preserve\n * 'pre-line' | Preserve | Collapse\n *\n * @member {string}\n */\n get whiteSpace()\n {\n return this._whiteSpace;\n }\n set whiteSpace(whiteSpace) // eslint-disable-line require-jsdoc\n {\n if (this._whiteSpace !== whiteSpace)\n {\n this._whiteSpace = whiteSpace;\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 is already escaped in quotes except for CSS generic fonts\n if (!(/([\\\"\\'])[^\\'\\\"]+\\1/).test(fontFamily) && genericFontFamilies.indexOf(fontFamily) < 0)\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 * @private\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 * @private\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 * @private\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\n/**\n * Utility function to ensure that object properties are copied by value, and not by reference\n * @private\n * @param {Object} target Target object to copy properties into\n * @param {Object} source Source object for the proporties to copy\n * @param {string} propertyObj Object containing properties names we want to loop over\n */\nfunction deepCopyProperties(target, source, propertyObj) {\n for (const prop in propertyObj) {\n if (Array.isArray(source[prop])) {\n target[prop] = source[prop].slice();\n } else {\n target[prop] = source[prop];\n }\n }\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);\n * let baseRenderTexture = new PIXI.BaseRenderTexture(800, 600);\n * let renderTexture = new PIXI.RenderTexture(baseRenderTexture);\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 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 = Math.ceil(width);\n this.height = Math.ceil(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 width = Math.ceil(width);\n height = Math.ceil(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. If the\n * source is an image url or an image element and not in the base texture\n * cache, it will be created and loaded.\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);\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 width = Math.ceil(width);\n height = Math.ceil(height);\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 * To access a sprite sheet from your code pass its JSON data file to Pixi's loader:\n *\n * ```js\n * PIXI.loader.add(\"images/spritesheet.json\").load(setup);\n *\n * function setup() {\n * let sheet = PIXI.loader.resources[\"images/spritesheet.json\"].spritesheet;\n * ...\n * }\n * ```\n * With the `sheet.textures` you can create Sprite objects,`sheet.animations` can be used to create an AnimatedSprite.\n *\n * Sprite sheets can be packed using tools like {@link https://codeandweb.com/texturepacker|TexturePacker},\n * {@link https://renderhjs.net/shoebox/|Shoebox} or {@link https://github.com/krzysztof-o/spritesheet.js|Spritesheet.js}.\n * Default anchor points (see {@link PIXI.Texture#defaultAnchor}) and grouping of animation sprites are currently only\n * supported by TexturePacker.\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 * A map containing all textures of the sprite sheet.\n * Can be used to create a {@link PIXI.Sprite|Sprite}:\n * ```js\n * new PIXI.Sprite(sheet.textures[\"image.png\"]);\n * ```\n * @member {Object}\n */\n this.textures = {};\n\n /**\n * A map containing the textures for each animation.\n * Can be used to create an {@link PIXI.extras.AnimatedSprite|AnimatedSprite}:\n * ```js\n * new PIXI.extras.AnimatedSprite(sheet.animations[\"anim_name\"])\n * ```\n * @member {Object}\n */\n this.animations = {};\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._processAnimations();\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 const sourceScale = this.baseTexture.sourceScale;\n\n while (frameIndex - initialFrameIndex < maxFrames && frameIndex < this._frameKeys.length)\n {\n const i = this._frameKeys[frameIndex];\n const data = this._frames[i];\n const rect = data.frame;\n\n if (rect)\n {\n let frame = null;\n let trim = null;\n const sourceSize = data.trimmed !== false && data.sourceSize\n ? data.sourceSize : data.frame;\n\n const orig = new Rectangle(\n 0,\n 0,\n Math.floor(sourceSize.w * sourceScale) / this.resolution,\n Math.floor(sourceSize.h * sourceScale) / this.resolution\n );\n\n if (data.rotated)\n {\n frame = new Rectangle(\n Math.floor(rect.x * sourceScale) / this.resolution,\n Math.floor(rect.y * sourceScale) / this.resolution,\n Math.floor(rect.h * sourceScale) / this.resolution,\n Math.floor(rect.w * sourceScale) / this.resolution\n );\n }\n else\n {\n frame = new Rectangle(\n Math.floor(rect.x * sourceScale) / this.resolution,\n Math.floor(rect.y * sourceScale) / this.resolution,\n Math.floor(rect.w * sourceScale) / this.resolution,\n Math.floor(rect.h * sourceScale) / this.resolution\n );\n }\n\n // Check to see if the sprite is trimmed\n if (data.trimmed !== false && data.spriteSourceSize)\n {\n trim = new Rectangle(\n Math.floor(data.spriteSourceSize.x * sourceScale) / this.resolution,\n Math.floor(data.spriteSourceSize.y * sourceScale) / this.resolution,\n Math.floor(rect.w * sourceScale) / this.resolution,\n Math.floor(rect.h * sourceScale) / this.resolution\n );\n }\n\n this.textures[i] = new Texture(\n this.baseTexture,\n frame,\n orig,\n trim,\n data.rotated ? 2 : 0,\n data.anchor\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 * Parse animations config\n *\n * @private\n */\n _processAnimations()\n {\n const animations = this.data.animations || {};\n\n for (const animName in animations)\n {\n this.animations[animName] = [];\n for (const frameName of animations[animName])\n {\n this.animations[animName].push(this.textures[frameName]);\n }\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._processAnimations();\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, Point } 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 * @param {PIXI.Point} [anchor] - Default anchor point used for sprite placement / rotation\n */\n constructor(baseTexture, frame, orig, trim, rotate, anchor)\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 * Please call `_updateUvs()` after you change coordinates of `trim` manually.\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 * Anchor point that is used as default if sprite is created with this texture.\n * Changing the `defaultAnchor` at a later point of time will not update Sprite's anchor point.\n * @member {PIXI.Point}\n * @default {0,0}\n */\n this.defaultAnchor = anchor ? new Point(anchor.x, anchor.y) : new Point(0, 0);\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 * Contains data for uvs. May contain clamp settings and some matrices.\n * Its a bit heavy, so by default that object is not created.\n * @member {PIXI.TextureMatrix}\n * @default null\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, this.defaultAnchor);\n }\n\n /**\n * Updates the internal WebGL UV cache. Use it after you change `frame` or `trim` of the texture.\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 * @param {boolean} [crossorigin=(auto)] - Should use anonymous CORS? Defaults to true if the URL is not a data-URI.\n * @param {boolean} [autoPlay=true] - Start playing video as soon as it is loaded\n * @return {PIXI.Texture} The newly created texture\n */\n static fromVideo(video, scaleMode, crossorigin, autoPlay)\n {\n if (typeof video === 'string')\n {\n return Texture.fromVideoUrl(video, scaleMode, crossorigin, autoPlay);\n }\n\n return new Texture(VideoBaseTexture.fromVideo(video, scaleMode, autoPlay));\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 * @param {boolean} [crossorigin=(auto)] - Should use anonymous CORS? Defaults to true if the URL is not a data-URI.\n * @param {boolean} [autoPlay=true] - Start playing video as soon as it is loaded\n * @return {PIXI.Texture} The newly created texture\n */\n static fromVideoUrl(videoUrl, scaleMode, crossorigin, autoPlay)\n {\n return new Texture(VideoBaseTexture.fromUrl(videoUrl, scaleMode, crossorigin, autoPlay));\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 * Please call `_updateUvs()` after you change coordinates of `frame` manually.\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 const { x, y, width, height } = frame;\n const xNotFit = x + width > this.baseTexture.width;\n const yNotFit = y + height > this.baseTexture.height;\n\n if (xNotFit || yNotFit)\n {\n const relationship = xNotFit && yNotFit ? 'and' : 'or';\n const errorX = `X: ${x} + ${width} = ${x + width} > ${this.baseTexture.width}`;\n const errorY = `Y: ${y} + ${height} = ${y + height} > ${this.baseTexture.height}`;\n\n throw new Error('Texture Error: frame does not fit inside the base Texture dimensions: '\n + `${errorX} ${relationship} ${errorY}`);\n }\n\n // this.valid = width && height && this.baseTexture.source && this.baseTexture.hasLoaded;\n this.valid = width && 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 { default as Matrix } from '../math/Matrix';\n\nconst tempMat = new Matrix();\n\n/**\n * Class controls uv transform and frame clamp for texture\n * Can be used in Texture \"transform\" field, or separately, you can use different clamp settings on the same texture.\n * If you want to add support for texture region of certain feature or filter, that's what you're looking for.\n *\n * @see PIXI.Texture\n * @see PIXI.mesh.Mesh\n * @see PIXI.extras.TilingSprite\n * @class\n * @memberof PIXI\n */\nexport default class TextureMatrix\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 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] = ((Math.round(this.y0 * 65535) & 0xFFFF) << 16) | (Math.round(this.x0 * 65535) & 0xFFFF);\n this.uvsUint32[1] = ((Math.round(this.y1 * 65535) & 0xFFFF) << 16) | (Math.round(this.x1 * 65535) & 0xFFFF);\n this.uvsUint32[2] = ((Math.round(this.y2 * 65535) & 0xFFFF) << 16) | (Math.round(this.x2 * 65535) & 0xFFFF);\n this.uvsUint32[3] = ((Math.round(this.y3 * 65535) & 0xFFFF) << 16) | (Math.round(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';\nimport determineCrossOrigin from '../utils/determineCrossOrigin';\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 * @param {boolean} [autoPlay=true] - Start playing video as soon as it is loaded\n */\n constructor(source, scaleMode, autoPlay = true)\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 = autoPlay;\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 this.source.pause();\n this.source.src = '';\n this.source.load();\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 * @param {boolean} [autoPlay=true] - Start playing video as soon as it is loaded\n * @return {PIXI.VideoBaseTexture} Newly created VideoBaseTexture\n */\n static fromVideo(video, scaleMode, autoPlay)\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, autoPlay);\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 * @param {boolean} [crossorigin=(auto)] - Should use anonymous CORS? Defaults to true if the URL is not a data-URI.\n * @param {boolean} [autoPlay=true] - Start playing video as soon as it is loaded\n * @return {PIXI.VideoBaseTexture} Newly created VideoBaseTexture\n */\n static fromUrl(videoSrc, scaleMode, crossorigin, autoPlay)\n {\n const video = document.createElement('video');\n\n video.setAttribute('webkit-playsinline', '');\n video.setAttribute('playsinline', '');\n\n const url = Array.isArray(videoSrc) ? (videoSrc[0].src || videoSrc[0]) : (videoSrc.src || videoSrc);\n\n if (crossorigin === undefined && url.indexOf('data:') !== 0)\n {\n video.crossOrigin = determineCrossOrigin(url);\n }\n else if (crossorigin)\n {\n video.crossOrigin = typeof crossorigin === 'string' ? crossorigin : 'anonymous';\n }\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(url, videoSrc.mime));\n }\n\n video.load();\n\n return VideoBaseTexture.fromVideo(video, scaleMode, autoPlay);\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 const purePath = path.split('?').shift().toLowerCase();\n\n type = `video/${purePath.substr(purePath.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.next;\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';\nimport earcut from 'earcut';\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 * @see {@link https://github.com/mapbox/earcut}\n *\n * @memberof PIXI.utils\n * @function earcut\n * @param {number[]} vertices - A flat array of vertice coordinates\n * @param {number[]} [holes] - An array of hole indices\n * @param {number} [dimensions=2] The number of coordinates per vertice in the input array\n * @return {number[]} Triangulated polygon\n */\n earcut,\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} PIXI.utils~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 {PIXI.utils~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 charset: dataUriMatch[3] ? dataUriMatch[3].toLowerCase() : undefined,\n encoding: dataUriMatch[4] ? dataUriMatch[4].toLowerCase() : undefined,\n data: dataUriMatch[5],\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} PIXI.utils~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 {PIXI.utils~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 * @memberof PIXI.utils\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 * @memberof PIXI.utils\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 * @memberof PIXI.utils\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 data = null;\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 if (bound.top !== null)\n {\n width = bound.right - bound.left;\n height = bound.bottom - bound.top + 1;\n data = context.getImageData(bound.left, bound.top, width, height);\n }\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\n\n// A map of warning messages already fired\nconst warnings = {};\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 // Ignore duplicat\n if (warnings[msg])\n {\n return;\n }\n\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\n warnings[msg] = true;\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 if (extras)\n {\n Object.defineProperties(extras, {\n /**\n * @class\n * @name TextureTransform\n * @memberof PIXI.extras\n * @see PIXI.TextureMatrix\n * @deprecated since version 4.6.0\n */\n TextureTransform: {\n get()\n {\n warn('The TextureTransform class has been renamed to TextureMatrix, '\n + 'please use PIXI.TextureMatrix from now on.');\n\n return core.TextureMatrix;\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 /**\n * @method\n * @name PIXI.GroupD8.isSwapWidthHeight\n * @see PIXI.GroupD8.isVertical\n * @param {number} rotation - The number to check.\n * @returns {boolean} Whether or not the direction is vertical\n * @deprecated since version 4.6.0\n */\n core.GroupD8.isSwapWidthHeight = function isSwapWidthHeight(rotation)\n {\n warn('GroupD8.isSwapWidthHeight was renamed to GroupD8.isVertical');\n\n return core.GroupD8.isVertical(rotation);\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 * @class\n * @private\n * @name PIXI.filters.VoidFilter\n * @see PIXI.filters.AlphaFilter\n * @deprecated since version 4.5.7\n */\n VoidFilter: {\n get()\n {\n warn('VoidFilter has been renamed to AlphaFilter, please use PIXI.filters.AlphaFilter');\n\n return filters.AlphaFilter;\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 resolution = renderer.resolution;\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, 1);\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 let generated = false;\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 generated = true;\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, 1);\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 if (generated)\n {\n renderTexture.destroy(true);\n }\n // send the canvas back..\n\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 let generated = false;\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 generated = true;\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 if (generated)\n {\n renderTexture.destroy(true);\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 PIXI.extras.AnimatedSprite~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 animatedSprite = new PIXI.extras.AnimatedSprite(textureArray);\n * ```\n *\n * The more efficient and simpler way to create an animated sprite is using a {@link PIXI.Spritesheet}\n * containing the animation definitions:\n *\n * ```js\n * PIXI.loader.add(\"assets/spritesheet.json\").load(setup);\n *\n * function setup() {\n * let sheet = PIXI.loader.resources[\"assets/spritesheet.json\"].spritesheet;\n * animatedSprite = new PIXI.extras.AnimatedSprite(sheet.animations[\"image_sequence\"]);\n * ...\n * }\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[]|PIXI.extras.AnimatedSprite~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 * Update anchor to [Texture's defaultAnchor]{@link PIXI.Texture#defaultAnchor} when frame changes.\n *\n * Useful with [sprite sheet animations]{@link PIXI.Spritesheet#animations} created with tools.\n * Changing anchor for each frame allows to pin sprite origin to certain moving feature\n * of the frame (e.g. left foot).\n *\n * Note: Enabling this will override any previously set `anchor` on each frame change.\n *\n * @member {boolean}\n * @default false\n */\n this.updateAnchor = false;\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 this.cachedTint = 0xFFFFFF;\n\n if (this.updateAnchor)\n {\n this._anchor.copy(this._texture.defaultAnchor);\n }\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 { getResolutionOfUrl } from '../core/utils';\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 * Letter spacing. This is useful for setting the space between characters.\n * @member {number}\n * @private\n */\n this._letterSpacing = 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 const text = this.text.replace(/(?:\\r\\n|\\r)/g, '\\n');\n const textLength = text.length;\n const maxWidth = this._maxWidth * data.size / this._font.size;\n\n let prevCharCode = null;\n let lastLineWidth = 0;\n let maxLineWidth = 0;\n let line = 0;\n let lastBreakPos = -1;\n let lastBreakWidth = 0;\n let spacesRemoved = 0;\n let maxLineHeight = 0;\n\n for (let i = 0; i < textLength; i++)\n {\n const charCode = text.charCodeAt(i);\n const char = text.charAt(i);\n\n if (/(?:\\s)/.test(char))\n {\n lastBreakPos = i;\n lastBreakWidth = lastLineWidth;\n }\n\n if (char === '\\r' || char === '\\n')\n {\n lineWidths.push(lastLineWidth);\n maxLineWidth = Math.max(maxLineWidth, lastLineWidth);\n ++line;\n ++spacesRemoved;\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 + (this._letterSpacing / 2), pos.y + charData.yOffset),\n });\n pos.x += charData.xAdvance + this._letterSpacing;\n lastLineWidth = pos.x;\n maxLineHeight = Math.max(maxLineHeight, (charData.yOffset + charData.texture.height));\n prevCharCode = charCode;\n\n if (lastBreakPos !== -1 && maxWidth > 0 && pos.x > maxWidth)\n {\n ++spacesRemoved;\n core.utils.removeItems(chars, 1 + lastBreakPos - spacesRemoved, 1 + i - lastBreakPos);\n i = lastBreakPos;\n lastBreakPos = -1;\n\n lineWidths.push(lastBreakWidth);\n maxLineWidth = Math.max(maxLineWidth, lastBreakWidth);\n line++;\n\n pos.x = 0;\n pos.y += data.lineHeight;\n prevCharCode = null;\n }\n }\n\n const lastChar = text.charAt(text.length - 1);\n\n if (lastChar !== '\\r' && lastChar !== '\\n')\n {\n if (/(?:\\s)/.test(lastChar))\n {\n lastLineWidth = lastBreakWidth;\n }\n\n lineWidths.push(lastLineWidth);\n maxLineWidth = Math.max(maxLineWidth, lastLineWidth);\n }\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 * Additional space between characters.\n *\n * @member {number}\n */\n get letterSpacing()\n {\n return this._letterSpacing;\n }\n\n set letterSpacing(value) // eslint-disable-line require-jsdoc\n {\n if (this._letterSpacing !== value)\n {\n this._letterSpacing = value;\n this.dirty = true;\n }\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 {Object.<string, PIXI.Texture>|PIXI.Texture|PIXI.Texture[]} textures - List of textures for each page.\n * If providing an object, the key is the `<page>` element's `file` attribute in the FNT file.\n * @return {Object} Result font object with font, size, lineHeight and char fields.\n */\n static registerFont(xml, textures)\n {\n const data = {};\n const info = xml.getElementsByTagName('info')[0];\n const common = xml.getElementsByTagName('common')[0];\n const pages = xml.getElementsByTagName('page');\n const res = getResolutionOfUrl(pages[0].getAttribute('file'), settings.RESOLUTION);\n const pagesTextures = {};\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 // Single texture, convert to list\n if (textures instanceof core.Texture)\n {\n textures = [textures];\n }\n\n // Convert the input Texture, Textures or object\n // into a page Texture lookup by \"id\"\n for (let i = 0; i < pages.length; i++)\n {\n const id = pages[i].getAttribute('id');\n const file = pages[i].getAttribute('file');\n\n pagesTextures[id] = textures instanceof Array ? textures[i] : textures[file];\n }\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 const page = letter.getAttribute('page') || 0;\n const textureRect = new core.Rectangle(\n (parseInt(letter.getAttribute('x'), 10) / res) + (pagesTextures[page].frame.x / res),\n (parseInt(letter.getAttribute('y'), 10) / res) + (pagesTextures[page].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(pagesTextures[page].baseTexture, textureRect),\n page,\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 * as core from '../core';\nimport CanvasTinter from '../core/sprites/canvas/CanvasTinter';\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.TextureMatrix}\n */\n this.uvTransform = texture.transform || new core.TextureMatrix(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 this.cachedTint = 0xFFFFFF;\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 isTextureRotated = texture.rotate === 2;\n const baseTexture = texture.baseTexture;\n const baseTextureResolution = baseTexture.resolution;\n const modX = ((this.tilePosition.x / this.tileScale.x) % texture.orig.width) * baseTextureResolution;\n const modY = ((this.tilePosition.y / this.tileScale.y) % texture.orig.height) * baseTextureResolution;\n\n // create a nice shiny pattern!\n if (this._textureID !== this._texture._updateID || this.cachedTint !== this.tint)\n {\n this._textureID = this._texture._updateID;\n // cut an object from a spritesheet..\n const tempCanvas = new core.CanvasRenderTarget(texture.orig.width,\n texture.orig.height,\n baseTextureResolution);\n\n // Tint the tiling sprite\n if (this.tint !== 0xFFFFFF)\n {\n this.tintedTexture = CanvasTinter.getTintedTexture(this, this.tint);\n tempCanvas.context.drawImage(this.tintedTexture, 0, 0);\n }\n else\n {\n const sx = texture._frame.x * baseTextureResolution;\n const sy = texture._frame.y * baseTextureResolution;\n const sWidth = texture._frame.width * baseTextureResolution;\n const sHeight = texture._frame.height * baseTextureResolution;\n const dWidth = (texture.trim ? texture.trim.width : texture.orig.width) * baseTextureResolution;\n const dHeight = (texture.trim ? texture.trim.height : texture.orig.height) * baseTextureResolution;\n const dx = (texture.trim ? texture.trim.x : 0) * baseTextureResolution;\n const dy = (texture.trim ? texture.trim.y : 0) * baseTextureResolution;\n\n if (isTextureRotated)\n {\n // Apply rotation and transform\n tempCanvas.context.rotate(-Math.PI / 2);\n tempCanvas.context.translate(-dHeight, 0);\n tempCanvas.context.drawImage(baseTexture.source,\n sx, sy,\n sWidth, sHeight,\n -dy, dx,\n dHeight, dWidth);\n }\n else\n {\n tempCanvas.context.drawImage(baseTexture.source,\n sx, sy,\n sWidth, sHeight,\n dx, dy,\n dWidth, dHeight);\n }\n }\n\n this.cachedTint = this.tint;\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 * baseTextureResolution;\n const anchorY = this.anchor.y * -this._height * baseTextureResolution;\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._y);\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.transform._worldID = this.transform._worldID;\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 && this._filters.length)\n {\n const padding = this._filters[0].padding;\n\n bounds.pad(padding);\n }\n\n bounds.ceil(core.settings.RESOLUTION);\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, bounds.height);\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 // the rest is the same as for Canvas\n this.updateTransform = this.displayObjectUpdateTransform;\n this.calculateBounds = this._calculateCachedBounds;\n this.getLocalBounds = this._getCachedLocalBounds;\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 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 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 bounds.ceil(core.settings.RESOLUTION);\n\n const renderTexture = core.RenderTexture.create(bounds.width, bounds.height);\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 // the rest is the same as for WebGL\n this.updateTransform = this.displayObjectUpdateTransform;\n this.calculateBounds = this._calculateCachedBounds;\n this.getLocalBounds = this._getCachedLocalBounds;\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 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 * Calculates the bounds of the cached sprite\n *\n * @private\n */\nDisplayObject.prototype._calculateCachedBounds = function _calculateCachedBounds()\n{\n this._bounds.clear();\n this._cacheData.sprite.transform._worldID = this.transform._worldID;\n this._cacheData.sprite._calculateBounds();\n this._lastBoundsID = this._boundsID;\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} name\n */\ncore.DisplayObject.prototype.name = null;\n\n/**\n * Returns the display object in the container\n *\n * @method getChildByName\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 * @method getGlobalPosition\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 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 { readFileSync } from 'fs';\nimport { join } from 'path';\n\n/**\n * Simplest filter - applies alpha\n *\n * Use this instead of Container's alpha property to avoid visual layering of individual elements.\n * AlphaFilter applies alpha evenly across the entire display object and any opaque elements it contains.\n * If elements are not opaque, they will blend with each other anyway.\n *\n * Very handy if you want to use common features of all filters:\n *\n * 1. Assign a blendMode to this filter, blend all elements inside display object with background.\n *\n * 2. To use clipping in display coordinates, assign a filterArea to the same container that has this filter.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport default class AlphaFilter extends core.Filter\n{\n /**\n * @param {number} [alpha=1] Amount of alpha from 0 to 1, where 0 is transparent\n */\n constructor(alpha = 1.0)\n {\n super(\n // vertex shader\n readFileSync(join(__dirname, '../fragments/default.vert'), 'utf8'),\n // fragment shader\n readFileSync(join(__dirname, './alpha.frag'), 'utf8')\n );\n\n this.alpha = alpha;\n this.glShaderKey = 'alpha';\n }\n\n /**\n * Coefficient for alpha multiplication\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","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.filters.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 -1, 0, 0, 1, 0,\n 0, -1, 0, 1, 0,\n 0, 0, -1, 1, 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 this.uniforms.filterMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, this.maskSprite);\n this.uniforms.scale.x = this.scale.x;\n this.uniforms.scale.y = this.scale.y;\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 AlphaFilter } from './alpha/AlphaFilter';\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';\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 */\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 // event.buttons is not available in all browsers (ie. Safari), but it does have a non-standard\n // event.which property instead, which conveys the same information.\n this.buttons = Number.isInteger(event.buttons) ? event.buttons : event.which;\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 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 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 = 1;\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 * Not always fired when some buttons are held down while others are released. In those cases,\n * use [mousedown]{@link PIXI.interaction.InteractionManager#event:mousedown} and\n * [mouseup]{@link PIXI.interaction.InteractionManager#event:mouseup} instead.\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 */\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 // Flag here can set to false if the event is outside the parents hitArea or mask\n let hitTestChildren = true;\n\n // If there is a hitArea, no need to test against anything else if the pointer is not within the hitArea\n // There is also no longer a need to hitTest children.\n if (displayObject.hitArea)\n {\n if (hitTest)\n {\n displayObject.worldTransform.applyInverse(point, this._tempPoint);\n if (!displayObject.hitArea.contains(this._tempPoint.x, this._tempPoint.y))\n {\n hitTest = false;\n hitTestChildren = false;\n }\n else\n {\n hit = true;\n }\n }\n interactiveParent = false;\n }\n // If there is a mask, no need to test against anything else if the pointer is not within the mask\n else if (displayObject._mask)\n {\n if (hitTest)\n {\n if (!displayObject._mask.containsPoint(point))\n {\n hitTest = false;\n hitTestChildren = false;\n }\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 (hitTestChildren && 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 // already tested against hitArea if it is defined\n if (!displayObject.hitArea && 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 // need to track mouse down status in the mouse block so that we can emit\n // event in a later block\n let isMouseTap = false;\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 // because we can confirm that the mousedown happened on this object, flag for later emit of pointertap\n isMouseTap = true;\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 // emit pointertap if not a mouse, or if the mouse block decided it was a tap\n if (!isMouse || isMouseTap)\n {\n this.dispatchEvent(displayObject, 'pointertap', interactionEvent);\n }\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' || events[0].pointerType === 'pen')\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 if (typeof touch.twist === 'undefined') touch.twist = 0;\n if (typeof touch.tangentialPressure === 'undefined') 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 if (typeof event.twist === 'undefined') event.twist = 0;\n if (typeof event.tangentialPressure === 'undefined') 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 { 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|PIXI.Texture[]} textures - List of textures for each page.\n */\nexport function parse(resource, textures)\n{\n resource.bitmapFont = BitmapText.registerFont(resource.data, textures);\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 pages = resource.data.getElementsByTagName('page');\n const textures = {};\n\n // Handle completed, when the number of textures\n // load is the same number as references in the fnt file\n const completed = (page) =>\n {\n textures[page.metadata.pageFile] = page.texture;\n\n if (Object.keys(textures).length === pages.length)\n {\n parse(resource, textures);\n next();\n }\n };\n\n for (let i = 0; i < pages.length; ++i)\n {\n const pageFile = pages[i].getAttribute('file');\n const url = xmlUrl + pageFile;\n let exists = false;\n\n // incase the image is loaded outside\n // using the same loader, resource will be available\n for (const name in this.resources)\n {\n const bitmapResource = this.resources[name];\n\n if (bitmapResource.url === url)\n {\n bitmapResource.metadata.pageFile = pageFile;\n if (bitmapResource.texture)\n {\n completed(bitmapResource);\n }\n else\n {\n bitmapResource.onAfterMiddleware.add(completed);\n }\n exists = true;\n break;\n }\n }\n\n // texture is not loaded, we'll attempt to add\n // it to the load and add the texture to the list\n if (!exists)\n {\n // Standard loading options for images\n const options = {\n crossOrigin: resource.crossOrigin,\n loadType: Resource.LOAD_TYPE.IMAGE,\n metadata: Object.assign(\n { pageFile },\n resource.metadata.imageMetadata\n ),\n parentResource: resource,\n };\n\n this.add(url, options, completed);\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, stageOptions)\n{\n if (this._loader)\n {\n this._loader.destroy();\n this._loader = null;\n }\n this._parentDestroy(removeView, stageOptions);\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 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 if (res.error)\n {\n next(res.error);\n\n return;\n }\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 Texture from '../core/textures/Texture';\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 * @default PIXI.Texture.EMPTY\n * @private\n */\n this._texture = texture || Texture.EMPTY;\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 * Version of mesh verticies array\n *\n * @member {number}\n */\n this.vertexDirty = 0;\n\n /**\n * For backwards compatibility the default is to re-upload verticies each render call.\n * Set this to `false` and increase `vertexDirty` to manually re-upload the buffer.\n *\n * @member {boolean}\n */\n this.autoUpdate = true;\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 = core.settings.MESH_CANVAS_PADDING;\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.TextureMatrix}\n * @private\n */\n this._uvTransform = new core.TextureMatrix(this._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.autoUpdate)\n {\n this.vertexDirty++;\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 * Destroys the Mesh 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 // for each webgl data entry, destroy the WebGLGraphicsData\n for (const id in this._glDatas)\n {\n const data = this._glDatas[id];\n\n if (data.destroy)\n {\n data.destroy();\n }\n else\n {\n if (data.vertexBuffer)\n {\n data.vertexBuffer.destroy();\n data.vertexBuffer = null;\n }\n if (data.indexBuffer)\n {\n data.indexBuffer.destroy();\n data.indexBuffer = null;\n }\n if (data.uvBuffer)\n {\n data.uvBuffer.destroy();\n data.uvBuffer = null;\n }\n if (data.vao)\n {\n data.vao.destroy();\n data.vao = null;\n }\n }\n }\n\n this._glDatas = null;\n\n super.destroy(options);\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';\nimport CanvasTinter from '../core/sprites/canvas/CanvasTinter';\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 /**\n * Cached tint value so we can tell when the tint is changed.\n *\n * @member {number}\n * @protected\n */\n this._cachedTint = 0xFFFFFF;\n\n /**\n * Cached tinted texture.\n *\n * @member {HTMLCanvasElement}\n * @protected\n */\n this._tintedTexture = null;\n\n /**\n * Temporary storage for canvas source coords\n *\n * @member {number[]}\n * @private\n */\n this._canvasUvs = null;\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 const h = this._topHeight + this._bottomHeight;\n const scale = this._height > h ? 1.0 : this._height / h;\n\n vertices[9] = vertices[11] = vertices[13] = vertices[15] = this._topHeight * scale;\n vertices[17] = vertices[19] = vertices[21] = vertices[23] = this._height - (this._bottomHeight * scale);\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 const w = this._leftWidth + this._rightWidth;\n const scale = this._width > w ? 1.0 : this._width / w;\n\n vertices[2] = vertices[10] = vertices[18] = vertices[26] = this._leftWidth * scale;\n vertices[4] = vertices[12] = vertices[20] = vertices[28] = this._width - (this._rightWidth * scale);\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 const transform = this.worldTransform;\n const res = renderer.resolution;\n const isTinted = this.tint !== 0xFFFFFF;\n const texture = this._texture;\n\n // Work out tinting\n if (isTinted)\n {\n if (this._cachedTint !== this.tint)\n {\n // Tint has changed, need to update the tinted texture and use that instead\n\n this._cachedTint = this.tint;\n\n this._tintedTexture = CanvasTinter.getTintedTexture(this, this.tint);\n }\n }\n\n const textureSource = !isTinted ? texture.baseTexture.source : this._tintedTexture;\n\n if (!this._canvasUvs)\n {\n this._canvasUvs = [0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n const vertices = this.vertices;\n const uvs = this._canvasUvs;\n const u0 = isTinted ? 0 : texture.frame.x;\n const v0 = isTinted ? 0 : texture.frame.y;\n const u1 = u0 + texture.frame.width;\n const v1 = v0 + texture.frame.height;\n\n uvs[0] = u0;\n uvs[1] = u0 + this._leftWidth;\n uvs[2] = u1 - this._rightWidth;\n uvs[3] = u1;\n uvs[4] = v0;\n uvs[5] = v0 + this._topHeight;\n uvs[6] = v1 - this._bottomHeight;\n uvs[7] = v1;\n\n for (let i = 0; i < 8; i++)\n {\n uvs[i] *= texture.baseTexture.resolution;\n }\n\n context.globalAlpha = this.worldAlpha;\n renderer.setBlendMode(this.blendMode);\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 for (let row = 0; row < 3; row++)\n {\n for (let col = 0; col < 3; col++)\n {\n const ind = (col * 2) + (row * 8);\n const sw = Math.max(1, uvs[col + 1] - uvs[col]);\n const sh = Math.max(1, uvs[row + 5] - uvs[row + 4]);\n const dw = Math.max(1, vertices[ind + 10] - vertices[ind]);\n const dh = Math.max(1, vertices[ind + 11] - vertices[ind + 1]);\n\n context.drawImage(textureSource, uvs[col], uvs[row + 4], sw, sh,\n vertices[ind], vertices[ind + 1], dw, dh);\n }\n }\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++;\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=10] - The number of vertices in the x-axis\n * @param {number} [verticesY=10] - 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\n this.dirty++;\n this.indexDirty++;\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.context.globalAlpha = mesh.worldAlpha;\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 const canvasPadding = mesh.canvasPadding / this.renderer.resolution;\n\n if (canvasPadding > 0)\n {\n const paddingX = canvasPadding / Math.abs(mesh.worldTransform.a);\n const paddingY = canvasPadding / Math.abs(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 vertexDirty: mesh.vertexDirty,\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 if (mesh.vertexDirty !== glData.vertexDirty)\n {\n glData.vertexDirty = mesh.vertexDirty;\n glData.vertexBuffer.upload(mesh.vertices);\n }\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 most advanced\n * functionality will not work. ParticleContainer implements the basic object transform (position, scale, rotation)\n * and some advanced functionality like tint (as of v4.5.6).\n * Other more advanced functionality like masking, children, filters, 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=1500] - The maximum number of particles that can be rendered by the container.\n * Affects size of allocated buffers.\n * @param {object} [properties] - The properties of children that should be uploaded to the gpu and applied.\n * @param {boolean} [properties.vertices=false] - When true, vertices be uploaded and applied.\n * if sprite's ` scale/anchor/trim/frame/orig` is dynamic, please set `true`.\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.tint=false] - When true, alpha and tint be uploaded and applied.\n * @param {number} [batchSize=16384] - Number of particles per batch. If less than maxSize, it uses maxSize instead.\n * @param {boolean} [autoResize=false] If true, container allocates more batches in case\n * there are more than `maxSize` particles.\n */\n constructor(maxSize = 1500, properties, batchSize = 16384, autoResize = false)\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 * for every batch stores _updateID corresponding to the last change in that batch\n * @member {number[]}\n * @private\n */\n this._bufferUpdateIDs = [];\n\n /**\n * when child inserted, removed or changes position this number goes up\n * @member {number[]}\n * @private\n */\n this._updateID = 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 * If true, container allocates more batches in case there are more than `maxSize` particles.\n * @member {boolean}\n * @default false\n */\n this.autoResize = autoResize;\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] = 'vertices' in properties || 'scale' in properties\n ? !!properties.vertices || !!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] = 'tint' in properties || 'alpha' in properties\n ? !!properties.tint || !!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 while (this._bufferUpdateIDs.length < bufferIndex)\n {\n this._bufferUpdateIDs.push(0);\n }\n this._bufferUpdateIDs[bufferIndex] = ++this._updateID;\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 this._bufferUpdateIDs = null;\n }\n}\n","/**\n * @namespace PIXI.particles\n */\nexport { default as ParticleContainer } from './ParticleContainer';\nexport { default as ParticleRenderer } from './webgl/ParticleRenderer';\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 * 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 unsignedByte: property.unsignedByte,\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 this.staticDataUint32 = null;\n\n this.dynamicStride = 0;\n this.dynamicBuffer = null;\n this.dynamicData = null;\n this.dynamicDataUint32 = null;\n\n this._updateID = 0;\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 const dynBuffer = new ArrayBuffer(this.size * this.dynamicStride * 4 * 4);\n\n this.dynamicData = new Float32Array(dynBuffer);\n this.dynamicDataUint32 = new Uint32Array(dynBuffer);\n this.dynamicBuffer = glCore.GLBuffer.createVertexBuffer(gl, dynBuffer, 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 const statBuffer = new ArrayBuffer(this.size * this.staticStride * 4 * 4);\n\n this.staticData = new Float32Array(statBuffer);\n this.staticDataUint32 = new Uint32Array(statBuffer);\n this.staticBuffer = glCore.GLBuffer.createVertexBuffer(gl, statBuffer, 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 if (property.unsignedByte)\n {\n this.vao.addAttribute(\n this.dynamicBuffer,\n property.attribute,\n gl.UNSIGNED_BYTE,\n true,\n this.dynamicStride * 4,\n property.offset * 4\n );\n }\n else\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\n for (let i = 0; i < this.staticProperties.length; ++i)\n {\n const property = this.staticProperties[i];\n\n if (property.unsignedByte)\n {\n this.vao.addAttribute(\n this.staticBuffer,\n property.attribute,\n gl.UNSIGNED_BYTE,\n true,\n this.staticStride * 4,\n property.offset * 4\n );\n }\n else\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 /**\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,\n property.unsignedByte ? this.dynamicDataUint32 : this.dynamicData,\n 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,\n property.unsignedByte ? this.staticDataUint32 : this.staticData,\n 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.dynamicBuffer.destroy();\n this.dynamicBuffer = null;\n this.dynamicData = null;\n this.dynamicDataUint32 = null;\n\n this.staticProperties = null;\n this.staticBuffer.destroy();\n this.staticBuffer = null;\n this.staticData = null;\n this.staticDataUint32 = null;\n }\n\n}\n","import * as core from '../../core';\nimport ParticleShader from './ParticleShader';\nimport ParticleBuffer from './ParticleBuffer';\nimport { premultiplyTint } from '../../core/utils';\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 // tintData\n {\n attribute: this.shader.attributes.aColor,\n size: 1,\n unsignedByte: true,\n uploadFunction: this.uploadTint,\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 let updateStatic = false;\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 if (j >= buffers.length)\n {\n if (!container.autoResize)\n {\n break;\n }\n buffers.push(this._generateOneMoreBuffer(container));\n }\n\n const buffer = buffers[j];\n\n // we always upload the dynamic\n buffer.uploadDynamic(children, i, amount);\n\n const bid = container._bufferUpdateIDs[j] || 0;\n\n updateStatic = updateStatic || (buffer._updateID < bid);\n // we only upload the static content when we have to!\n if (updateStatic)\n {\n buffer._updateID = container._updateID;\n buffer.uploadStatic(children, i, amount);\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 * Creates one more particle buffer, because container has autoResize feature\n *\n * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer\n * @return {PIXI.ParticleBuffer} generated buffer\n * @private\n */\n _generateOneMoreBuffer(container)\n {\n const gl = this.renderer.gl;\n const batchSize = container._batchSize;\n const dynamicPropertyFlags = container._properties;\n\n return new ParticleBuffer(gl, this.properties, dynamicPropertyFlags, batchSize);\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 uploadTint(children, startIndex, amount, array, stride, offset)\n {\n for (let i = 0; i < amount; ++i)\n {\n const sprite = children[startIndex + i];\n const premultiplied = sprite._texture.baseTexture.premultipliedAlpha;\n const alpha = sprite.alpha;\n // we dont call extra function if alpha is 1.0, that's faster\n const argb = alpha < 1.0 && premultiplied ? premultiplyTint(sprite._tintRGB, alpha)\n : sprite._tintRGB + (alpha * 255 << 24);\n\n array[offset] = argb;\n array[offset + stride] = argb;\n array[offset + (stride * 2)] = argb;\n array[offset + (stride * 3)] = argb;\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 vec4 aColor;',\n\n 'attribute vec2 aPositionCoord;',\n 'attribute float aRotation;',\n\n 'uniform mat3 projectionMatrix;',\n 'uniform vec4 uColor;',\n\n 'varying vec2 vTextureCoord;',\n 'varying vec4 vColor;',\n\n 'void main(void){',\n ' float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);',\n ' float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);',\n\n ' vec2 v = vec2(x, y);',\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 * uColor;',\n '}',\n ].join('\\n'),\n // hello\n [\n 'varying vec2 vTextureCoord;',\n 'varying vec4 vColor;',\n\n 'uniform sampler2D uSampler;',\n\n 'void main(void){',\n ' vec4 color = texture2D(uSampler, vTextureCoord) * vColor;',\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","// References:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger\n\nif (!Number.isInteger)\n{\n Number.isInteger = function numberIsInteger(value)\n {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n };\n}\n","// References:\n// https://github.com/sindresorhus/object-assign\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n\nimport objectAssign from 'object-assign';\n\nif (!Object.assign)\n{\n Object.assign = objectAssign;\n}\n","import './Object.assign';\nimport './requestAnimationFrame';\nimport './Math.sign';\nimport './Number.isInteger';\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":"."} |