{"version":3,"file":"pixi.mjs","sources":["../src/extensions/Extensions.ts","../node_modules/eventemitter3/index.js","../node_modules/@pixi/colord/index.mjs","../node_modules/@pixi/colord/plugins/names.mjs","../src/color/Color.ts","../src/culling/cullingMixin.ts","../src/maths/misc/const.ts","../src/maths/point/Point.ts","../src/maths/matrix/Matrix.ts","../src/maths/point/ObservablePoint.ts","../src/utils/data/uid.ts","../src/utils/logging/deprecation.ts","../src/utils/pool/Pool.ts","../src/utils/pool/PoolGroup.ts","../src/utils/data/removeItems.ts","../src/scene/container/container-mixins/childrenHelperMixin.ts","../src/filters/FilterEffect.ts","../src/rendering/mask/MaskEffectManager.ts","../src/scene/container/container-mixins/effectsMixin.ts","../src/scene/container/container-mixins/findMixin.ts","../src/maths/shapes/Rectangle.ts","../src/scene/container/bounds/Bounds.ts","../src/scene/container/bounds/utils/matrixAndBoundsPool.ts","../src/scene/container/bounds/getGlobalBounds.ts","../src/utils/logging/warn.ts","../src/scene/container/bounds/getLocalBounds.ts","../src/scene/container/utils/checkChildrenDidChange.ts","../src/scene/container/container-mixins/measureMixin.ts","../src/scene/container/container-mixins/onRenderMixin.ts","../src/scene/container/container-mixins/sortMixin.ts","../src/scene/container/container-mixins/toLocalGlobalMixin.ts","../src/rendering/renderers/shared/instructions/InstructionSet.ts","../src/scene/container/RenderGroup.ts","../src/scene/container/utils/assignWithIgnore.ts","../src/scene/container/Container.ts","../src/events/FederatedEvent.ts","../node_modules/ismobilejs/esm/isMobile.js","../src/utils/browser/isMobile.ts","../src/accessibility/AccessibilitySystem.ts","../src/accessibility/accessibilityTarget.ts","../src/accessibility/init.ts","../src/app/ResizePlugin.ts","../src/ticker/const.ts","../src/ticker/TickerListener.ts","../src/ticker/Ticker.ts","../src/app/TickerPlugin.ts","../src/app/init.ts","../src/events/EventTicker.ts","../src/events/FederatedMouseEvent.ts","../src/events/FederatedPointerEvent.ts","../src/events/FederatedWheelEvent.ts","../src/events/EventBoundary.ts","../src/events/EventSystem.ts","../src/events/FederatedEventTarget.ts","../src/events/init.ts","../src/assets/loader/parsers/LoaderParser.ts","../src/environment-browser/BrowserAdapter.ts","../src/environment/adapter.ts","../src/utils/path.ts","../src/assets/utils/convertToList.ts","../src/assets/utils/createStringVariations.ts","../src/assets/utils/isSingleItem.ts","../src/assets/resolver/Resolver.ts","../src/assets/utils/copySearchParams.ts","../src/maths/matrix/groupD8.ts","../src/utils/misc/NOOP.ts","../src/maths/misc/pow2.ts","../src/scene/container/utils/definedProps.ts","../src/rendering/renderers/shared/texture/TextureStyle.ts","../src/rendering/renderers/shared/texture/sources/TextureSource.ts","../src/rendering/renderers/shared/texture/sources/BufferImageSource.ts","../src/rendering/renderers/shared/texture/TextureMatrix.ts","../src/rendering/renderers/shared/texture/Texture.ts","../src/spritesheet/Spritesheet.ts","../src/spritesheet/spritesheetAsset.ts","../src/spritesheet/init.ts","../src/utils/data/updateQuadBounds.ts","../src/scene/sprite/Sprite.ts","../src/rendering/mask/utils/addMaskBounds.ts","../src/rendering/mask/utils/addMaskLocalBounds.ts","../src/rendering/mask/alpha/AlphaMask.ts","../src/rendering/mask/color/ColorMask.ts","../src/rendering/mask/stencil/StencilMask.ts","../src/rendering/renderers/shared/texture/sources/CanvasSource.ts","../src/rendering/renderers/shared/texture/sources/ImageSource.ts","../src/utils/browser/detectVideoAlphaMode.ts","../src/rendering/renderers/shared/texture/sources/VideoSource.ts","../src/assets/cache/Cache.ts","../src/rendering/renderers/shared/texture/utils/textureFrom.ts","../src/rendering/init.ts","../src/rendering/renderers/shared/buffer/const.ts","../src/rendering/renderers/shared/buffer/Buffer.ts","../src/rendering/renderers/shared/geometry/utils/ensureIsBuffer.ts","../src/rendering/renderers/shared/geometry/utils/getGeometryBounds.ts","../src/rendering/renderers/shared/geometry/Geometry.ts","../src/rendering/batcher/gpu/BatchGeometry.ts","../src/rendering/renderers/gpu/shader/BindGroup.ts","../src/rendering/renderers/gl/shader/program/getTestContext.ts","../src/rendering/batcher/gl/utils/checkMaxIfStatementsInShader.ts","../src/rendering/batcher/gl/utils/maxRecommendedTextures.ts","../src/rendering/batcher/gpu/getTextureBatchBindGroup.ts","../src/utils/data/ViewableBuffer.ts","../src/rendering/renderers/shared/buffer/utils/fastCopy.ts","../src/rendering/renderers/shared/state/const.ts","../src/rendering/renderers/shared/state/getAdjustedBlendModeBlend.ts","../src/rendering/batcher/shared/BatchTextureArray.ts","../src/rendering/batcher/shared/Batcher.ts","../src/rendering/renderers/shared/geometry/utils/buildUvs.ts","../src/rendering/renderers/shared/geometry/utils/transformVertices.ts","../src/scene/container/utils/multiplyHexColors.ts","../src/scene/graphics/shared/BatchableGraphics.ts","../src/scene/graphics/shared/buildCommands/buildCircle.ts","../src/scene/graphics/shared/const.ts","../src/scene/graphics/shared/utils/getOrientationOfPoints.ts","../src/scene/graphics/shared/buildCommands/buildLine.ts","../node_modules/earcut/src/earcut.js","../src/scene/graphics/shared/utils/triangulateWithHoles.ts","../src/scene/graphics/shared/buildCommands/buildPolygon.ts","../src/scene/graphics/shared/buildCommands/buildRectangle.ts","../src/scene/graphics/shared/buildCommands/buildTriangle.ts","../src/scene/graphics/shared/utils/buildContextBatches.ts","../src/scene/graphics/shared/GraphicsContextSystem.ts","../src/rendering/renderers/shared/state/State.ts","../src/scene/graphics/gpu/colorToUniform.ts","../src/scene/graphics/shared/GraphicsPipe.ts","../src/scene/graphics/init.ts","../src/rendering/renderers/shared/utils/createIdFromString.ts","../src/rendering/renderers/shared/shader/types.ts","../src/rendering/renderers/shared/shader/utils/getDefaultUniformValue.ts","../src/rendering/renderers/shared/shader/UniformGroup.ts","../src/scene/mesh/shared/BatchableMesh.ts","../src/scene/mesh/shared/MeshPipe.ts","../src/scene/mesh/init.ts","../src/scene/sprite/BatchableSprite.ts","../src/scene/text/canvas/CanvasTextPipe.ts","../src/rendering/renderers/shared/texture/CanvasPool.ts","../src/rendering/renderers/shared/texture/TexturePool.ts","../src/utils/canvas/getCanvasBoundingBox.ts","../src/scene/graphics/shared/fill/FillGradient.ts","../src/scene/graphics/shared/fill/FillPattern.ts","../node_modules/parse-svg-path/index.js","../src/scene/graphics/shared/svg/SVGToGraphicsPath.ts","../src/maths/shapes/Circle.ts","../src/maths/shapes/Ellipse.ts","../src/maths/misc/squaredDistanceToLineSegment.ts","../src/maths/shapes/Polygon.ts","../src/maths/shapes/RoundedRectangle.ts","../src/scene/graphics/shared/buildCommands/buildAdaptiveBezier.ts","../src/scene/graphics/shared/buildCommands/buildAdaptiveQuadratic.ts","../src/scene/graphics/shared/buildCommands/buildArc.ts","../src/scene/graphics/shared/buildCommands/buildArcTo.ts","../src/scene/graphics/shared/buildCommands/buildArcToSvg.ts","../src/scene/graphics/shared/path/roundShape.ts","../src/scene/graphics/shared/path/ShapePath.ts","../src/scene/graphics/shared/path/GraphicsPath.ts","../src/scene/graphics/shared/svg/SVGParser.ts","../src/scene/graphics/shared/utils/convertFillInputToFillStyle.ts","../src/scene/graphics/shared/GraphicsContext.ts","../src/scene/text/utils/generateTextStyleKey.ts","../src/scene/text/TextStyle.ts","../src/scene/text/utils/getPo2TextureFromSource.ts","../src/scene/text/canvas/utils/fontStringFromTextStyle.ts","../src/scene/text/canvas/CanvasTextMetrics.ts","../src/scene/text/canvas/utils/getCanvasFillStyle.ts","../src/scene/text/canvas/CanvasTextSystem.ts","../src/scene/text/init.ts","../src/scene/graphics/shared/Graphics.ts","../src/rendering/renderers/gl/shader/program/getMaxFragmentPrecision.ts","../src/rendering/renderers/gl/shader/program/preprocessors/addProgramDefines.ts","../src/rendering/renderers/gl/shader/program/preprocessors/ensurePrecision.ts","../src/rendering/renderers/gl/shader/program/preprocessors/insertVersion.ts","../src/rendering/renderers/gl/shader/program/preprocessors/setProgramName.ts","../src/rendering/renderers/gl/shader/program/preprocessors/stripVersion.ts","../src/rendering/renderers/gl/shader/GlProgram.ts","../src/rendering/renderers/shared/geometry/utils/getAttributeInfoFromFormat.ts","../src/rendering/renderers/gpu/shader/utils/extractAttributesFromGpuProgram.ts","../src/rendering/renderers/gpu/shader/utils/extractStructAndGroups.ts","../src/rendering/renderers/shared/shader/const.ts","../src/rendering/renderers/gpu/shader/utils/generateGpuLayoutGroups.ts","../src/rendering/renderers/gpu/shader/utils/generateLayoutHash.ts","../src/rendering/renderers/gpu/shader/utils/removeStructAndGroupDuplicates.ts","../src/rendering/renderers/gpu/shader/GpuProgram.ts","../src/rendering/high-shader/compiler/utils/addBits.ts","../src/rendering/high-shader/compiler/utils/compileHooks.ts","../src/rendering/high-shader/compiler/utils/compileInputs.ts","../src/rendering/high-shader/compiler/utils/compileOutputs.ts","../src/rendering/high-shader/compiler/utils/injectBits.ts","../src/rendering/high-shader/compiler/compileHighShader.ts","../src/rendering/high-shader/defaultProgramTemplate.ts","../src/rendering/high-shader/shader-bits/globalUniformsBit.ts","../src/rendering/high-shader/compileHighShaderToProgram.ts","../src/rendering/high-shader/shader-bits/colorBit.ts","../src/rendering/high-shader/shader-bits/generateTextureBatchBit.ts","../src/rendering/high-shader/shader-bits/roundPixelsBit.ts","../src/rendering/renderers/gl/shader/getBatchSamplersUniformGroup.ts","../src/rendering/renderers/types.ts","../src/rendering/renderers/shared/shader/Shader.ts","../src/scene/text/sdfShader/shader-bits/localUniformMSDFBit.ts","../src/scene/text/sdfShader/shader-bits/mSDFBit.ts","../src/scene/text/sdfShader/SdfShader.ts","../src/scene/text-bitmap/AbstractBitmapFont.ts","../src/scene/text-bitmap/utils/resolveCharacters.ts","../src/scene/text-bitmap/DynamicBitmapFont.ts","../src/scene/text-bitmap/utils/getBitmapTextLayout.ts","../src/scene/text-bitmap/BitmapFontManager.ts","../src/scene/text-bitmap/BitmapTextPipe.ts","../src/scene/text-bitmap/init.ts","../src/scene/text-html/HTMLTextPipe.ts","../src/utils/browser/isSafari.ts","../src/scene/text-html/HTMLTextRenderData.ts","../src/scene/text-html/utils/textStyleToCSS.ts","../src/scene/text-html/HtmlTextStyle.ts","../src/scene/text-html/utils/extractFontFamilies.ts","../src/scene/text-html/utils/loadFontAsBase64.ts","../src/scene/text-html/utils/loadFontCSS.ts","../src/scene/text-html/utils/getFontCss.ts","../src/scene/text-html/utils/getSVGUrl.ts","../src/scene/text-html/utils/getTemporaryCanvasFromImage.ts","../src/scene/text-html/utils/loadSVGImage.ts","../src/scene/text-html/utils/measureHtmlText.ts","../src/scene/text-html/HTMLTextSystem.ts","../src/scene/text-html/init.ts","../src/scene/mesh/shared/MeshGeometry.ts","../src/rendering/high-shader/shader-bits/localUniformBit.ts","../src/scene/sprite-tiling/shader/tilingBit.ts","../src/scene/sprite-tiling/shader/TilingSpriteShader.ts","../src/scene/sprite-tiling/utils/QuadGeometry.ts","../src/scene/sprite-tiling/utils/setPositions.ts","../src/scene/sprite-tiling/utils/applyMatrix.ts","../src/scene/sprite-tiling/utils/setUvs.ts","../src/scene/sprite-tiling/TilingSpritePipe.ts","../src/scene/sprite-tiling/init.ts","../src/scene/mesh-plane/PlaneGeometry.ts","../src/scene/sprite-nine-slice/NineSliceGeometry.ts","../src/scene/sprite-nine-slice/NineSliceSpritePipe.ts","../src/scene/sprite-nine-slice/init.ts","../src/filters/FilterPipe.ts","../src/scene/container/bounds/getFastGlobalBounds.ts","../src/scene/container/bounds/getRenderableBounds.ts","../src/filters/FilterSystem.ts","../src/filters/init.ts","../src/environment/autoDetectEnvironment.ts","../src/utils/browser/unsafeEvalSupported.ts","../src/rendering/renderers/gl/const.ts","../src/rendering/renderers/shared/system/SystemRunner.ts","../src/rendering/renderers/shared/system/AbstractRenderer.ts","../src/utils/browser/isWebGLSupported.ts","../src/utils/browser/isWebGPUSupported.ts","../src/rendering/renderers/autoDetectRenderer.ts","../src/utils/global/globalHooks.ts","../src/app/Application.ts","../src/scene/text-bitmap/BitmapFont.ts","../src/scene/text-bitmap/asset/bitmapFontTextParser.ts","../src/scene/text-bitmap/asset/bitmapFontXMLParser.ts","../src/scene/text-bitmap/asset/bitmapFontXMLStringParser.ts","../src/scene/text-bitmap/asset/loadBitmapFont.ts","../src/assets/BackgroundLoader.ts","../src/assets/cache/parsers/cacheTextureArray.ts","../src/assets/detections/utils/testImageFormat.ts","../src/assets/detections/parsers/detectAvif.ts","../src/assets/detections/parsers/detectDefaults.ts","../src/assets/detections/utils/testVideoFormat.ts","../src/assets/detections/parsers/detectMp4.ts","../src/assets/detections/parsers/detectOgv.ts","../src/assets/detections/parsers/detectWebm.ts","../src/assets/detections/parsers/detectWebp.ts","../src/assets/loader/Loader.ts","../src/assets/utils/checkDataUrl.ts","../src/assets/utils/checkExtension.ts","../src/assets/loader/parsers/loadJson.ts","../src/assets/loader/parsers/loadTxt.ts","../src/assets/loader/parsers/loadWebFont.ts","../src/utils/network/getResolutionOfUrl.ts","../src/assets/loader/parsers/textures/utils/createTexture.ts","../src/assets/loader/parsers/textures/loadSVG.ts","../src/assets/loader/workers/WorkerManager.ts","../src/assets/loader/parsers/textures/loadTextures.ts","../src/assets/loader/parsers/textures/loadVideoTextures.ts","../src/assets/resolver/parsers/resolveTextureUrl.ts","../src/assets/resolver/parsers/resolveJsonUrl.ts","../src/assets/Assets.ts","../src/compressed-textures/basis/detectBasis.ts","../src/rendering/renderers/shared/texture/sources/CompressedSource.ts","../src/rendering/renderers/gl/texture/utils/getSupportedGlCompressedTextureFormats.ts","../src/rendering/renderers/gpu/texture/utils/getSupportedGPUCompressedTextureFormats.ts","../src/rendering/renderers/shared/texture/utils/getSupportedCompressedTextureFormats.ts","../src/rendering/renderers/shared/texture/utils/getSupportedTextureFormats.ts","../src/compressed-textures/basis/utils/setBasisTranscoderPath.ts","../src/compressed-textures/basis/worker/loadBasisOnWorker.ts","../src/compressed-textures/basis/loadBasis.ts","../src/compressed-textures/basis/utils/createLevelBuffers.ts","../src/compressed-textures/basis/utils/gpuFormatToBasisTranscoderFormat.ts","../src/compressed-textures/dds/const.ts","../src/compressed-textures/dds/parseDDS.ts","../src/compressed-textures/dds/loadDDS.ts","../src/compressed-textures/ktx2/const.ts","../src/compressed-textures/ktx/parseKTX.ts","../src/compressed-textures/ktx/loadKTX.ts","../src/compressed-textures/ktx2/utils/setKTXTranscoderPath.ts","../src/compressed-textures/ktx2/worker/loadKTX2onWorker.ts","../src/compressed-textures/ktx2/loadKTX2.ts","../src/compressed-textures/ktx2/utils/convertFormatIfRequired.ts","../src/compressed-textures/ktx2/utils/createLevelBuffersFromKTX.ts","../src/compressed-textures/ktx2/utils/glFormatToGPUFormat.ts","../src/compressed-textures/ktx2/utils/vkFormatToGPUFormat.ts","../src/compressed-textures/ktx2/utils/getTextureFormatFromKTXTexture.ts","../src/compressed-textures/ktx2/utils/gpuFormatToKTXBasisTranscoderFormat.ts","../src/compressed-textures/shared/resolveCompressedTextureUrl.ts","../src/compressed-textures/shared/detectCompressed.ts","../src/culling/Culler.ts","../src/culling/CullerPlugin.ts","../src/environment-browser/browserExt.ts","../src/filters/Filter.ts","../src/filters/blend-modes/BlendModeFilter.ts","../src/filters/blend-modes/hls/GLhls.ts","../src/filters/blend-modes/hls/GPUhls.ts","../src/filters/defaults/alpha/AlphaFilter.ts","../src/filters/defaults/blur/const.ts","../src/filters/defaults/blur/gl/generateBlurFragSource.ts","../src/filters/defaults/blur/gl/generateBlurVertSource.ts","../src/filters/defaults/blur/gl/generateBlurGlProgram.ts","../src/filters/defaults/blur/gpu/generateBlurProgram.ts","../src/filters/defaults/blur/BlurFilterPass.ts","../src/filters/defaults/blur/BlurFilter.ts","../src/filters/defaults/color-matrix/ColorMatrixFilter.ts","../src/filters/defaults/displacement/DisplacementFilter.ts","../src/filters/defaults/noise/NoiseFilter.ts","../src/filters/mask/MaskFilter.ts","../src/maths/point/pointInTriangle.ts","../src/maths/shapes/Triangle.ts","../src/prepare/PrepareBase.ts","../src/scene/mesh/shared/Mesh.ts","../src/scene/sprite-animated/AnimatedSprite.ts","../src/utils/misc/Transform.ts","../src/scene/sprite-tiling/TilingSprite.ts","../src/scene/text/AbstractText.ts","../src/scene/text/Text.ts","../src/prepare/PrepareQueue.ts","../src/scene/text-bitmap/BitmapText.ts","../src/scene/text-html/HTMLText.ts","../src/prepare/PrepareUpload.ts","../src/prepare/PrepareSystem.ts","../src/rendering/batcher/gl/GlBatchAdaptor.ts","../src/rendering/batcher/gpu/generateGPULayout.ts","../src/rendering/batcher/gpu/generateLayout.ts","../src/rendering/batcher/gpu/GpuBatchAdaptor.ts","../src/rendering/batcher/shared/BatcherPipe.ts","../src/rendering/high-shader/compiler/utils/formatShader.ts","../src/rendering/high-shader/shader-bits/textureBit.ts","../src/scene/container/utils/buildInstructions.ts","../src/rendering/mask/alpha/AlphaMaskPipe.ts","../src/rendering/mask/color/ColorMaskPipe.ts","../src/rendering/mask/scissor/ScissorMask.ts","../src/rendering/mask/stencil/StencilMaskPipe.ts","../src/rendering/renderers/gl/buffer/const.ts","../src/rendering/renderers/gl/buffer/GlBuffer.ts","../src/rendering/renderers/gl/buffer/GlBufferSystem.ts","../src/rendering/renderers/gl/context/GlContextSystem.ts","../src/rendering/renderers/gl/shader/program/ensureAttributes.ts","../src/rendering/renderers/gl/texture/const.ts","../src/rendering/renderers/gl/geometry/utils/getGlTypeFromFormat.ts","../src/rendering/renderers/gl/geometry/GlGeometrySystem.ts","../src/rendering/renderers/gl/GlBackBufferSystem.ts","../src/rendering/renderers/gl/GlColorMaskSystem.ts","../src/rendering/renderers/gl/GlEncoderSystem.ts","../src/rendering/renderers/gl/GlRenderTarget.ts","../src/rendering/renderers/gpu/state/GpuStencilModesToPixi.ts","../src/rendering/renderers/gl/GlStencilSystem.ts","../src/rendering/renderers/shared/shader/UboSystem.ts","../src/rendering/renderers/gl/shader/utils/createUboElementsSTD40.ts","../src/rendering/renderers/shared/shader/utils/uniformParsers.ts","../src/rendering/renderers/shared/shader/utils/createUboSyncFunction.ts","../src/rendering/renderers/shared/shader/utils/uboSyncFunctions.ts","../src/rendering/renderers/gl/shader/utils/generateArraySyncSTD40.ts","../src/rendering/renderers/gl/shader/utils/createUboSyncSTD40.ts","../src/rendering/renderers/gl/GlUboSystem.ts","../src/rendering/renderers/gl/renderTarget/GlRenderTargetAdaptor.ts","../src/rendering/renderers/gpu/renderTarget/calculateProjection.ts","../src/rendering/renderers/shared/texture/utils/getCanvasTexture.ts","../src/rendering/renderers/shared/renderTarget/isRenderingToScreen.ts","../src/rendering/renderers/shared/renderTarget/RenderTarget.ts","../src/rendering/renderers/shared/renderTarget/RenderTargetSystem.ts","../src/rendering/renderers/gl/renderTarget/GlRenderTargetSystem.ts","../src/rendering/renderers/shared/buffer/BufferResource.ts","../src/rendering/renderers/gl/shader/GenerateShaderSyncCode.ts","../src/rendering/renderers/gl/shader/GlProgramData.ts","../src/rendering/renderers/gl/shader/program/compileShader.ts","../src/rendering/renderers/gl/shader/program/defaultValue.ts","../src/rendering/renderers/gl/shader/program/mapType.ts","../src/rendering/renderers/gl/shader/program/extractAttributesFromGlProgram.ts","../src/rendering/renderers/gl/shader/program/getUboData.ts","../src/rendering/renderers/gl/shader/program/getUniformData.ts","../src/rendering/renderers/gl/shader/program/logProgramError.ts","../src/rendering/renderers/gl/shader/program/generateProgram.ts","../src/rendering/renderers/gl/shader/GlShaderSystem.ts","../src/rendering/renderers/gl/shader/utils/generateUniformsSyncTypes.ts","../src/rendering/renderers/gl/shader/utils/generateUniformsSync.ts","../src/rendering/renderers/gl/shader/GlUniformGroupSystem.ts","../src/rendering/renderers/gl/shader/migrateFragmentFromV7toV8.ts","../src/rendering/renderers/gl/shader/program/mapSize.ts","../src/rendering/renderers/gl/state/mapWebGLBlendModesToPixi.ts","../src/rendering/renderers/gl/state/GlStateSystem.ts","../src/rendering/renderers/gl/texture/GlTexture.ts","../src/rendering/renderers/gl/texture/uploaders/glUploadBufferImageResource.ts","../src/rendering/renderers/gl/texture/uploaders/glUploadCompressedTextureResource.ts","../src/rendering/renderers/gl/texture/uploaders/glUploadImageResource.ts","../src/rendering/renderers/gl/texture/uploaders/glUploadVideoResource.ts","../src/rendering/renderers/gl/texture/utils/pixiToGlMaps.ts","../src/rendering/renderers/gl/texture/utils/applyStyleParams.ts","../src/rendering/renderers/gl/texture/utils/mapFormatToGlFormat.ts","../src/rendering/renderers/gl/texture/utils/mapFormatToGlInternalFormat.ts","../src/rendering/renderers/gl/texture/utils/mapFormatToGlType.ts","../src/rendering/renderers/gl/texture/utils/unpremultiplyAlpha.ts","../src/rendering/renderers/gl/texture/GlTextureSystem.ts","../src/scene/graphics/gl/GlGraphicsAdaptor.ts","../src/scene/mesh/gl/GlMeshAdaptor.ts","../src/scene/container/CustomRenderPipe.ts","../src/scene/container/utils/executeInstructions.ts","../src/scene/container/RenderGroupPipe.ts","../src/scene/container/utils/collectRenderGroups.ts","../src/scene/container/utils/mixHexColors.ts","../src/scene/container/utils/mixColors.ts","../src/scene/container/utils/updateRenderGroupTransforms.ts","../src/scene/container/utils/validateRenderables.ts","../src/scene/container/RenderGroupSystem.ts","../src/scene/sprite/SpritePipe.ts","../src/rendering/renderers/shared/background/BackgroundSystem.ts","../src/rendering/renderers/shared/blendModes/BlendModePipe.ts","../src/rendering/renderers/shared/extract/ExtractSystem.ts","../src/rendering/renderers/shared/texture/RenderTexture.ts","../src/rendering/renderers/shared/extract/GenerateTextureSystem.ts","../src/rendering/renderers/shared/renderTarget/GlobalUniformSystem.ts","../src/utils/sayHello.ts","../src/rendering/renderers/shared/startup/HelloSystem.ts","../src/rendering/renderers/shared/texture/TextureGCSystem.ts","../src/rendering/renderers/shared/view/ViewSystem.ts","../src/rendering/renderers/shared/system/SharedSystems.ts","../src/rendering/renderers/gl/WebGLRenderer.ts","../src/rendering/renderers/gpu/BindGroupSystem.ts","../src/rendering/renderers/gpu/buffer/GpuBufferSystem.ts","../src/rendering/renderers/gpu/buffer/GpuReadBuffer.ts","../src/rendering/renderers/gpu/buffer/UboBatch.ts","../src/rendering/renderers/gpu/GpuColorMaskSystem.ts","../src/rendering/renderers/gpu/GpuDeviceSystem.ts","../src/rendering/renderers/gpu/GpuEncoderSystem.ts","../src/rendering/renderers/gpu/GpuStencilSystem.ts","../src/rendering/renderers/gpu/shader/utils/createUboElementsWGSL.ts","../src/rendering/renderers/gpu/shader/utils/generateArraySyncWGSL.ts","../src/rendering/renderers/gpu/shader/utils/createUboSyncFunctionWGSL.ts","../src/rendering/renderers/gpu/GpuUboSystem.ts","../src/rendering/renderers/gpu/GpuUniformBatchPipe.ts","../src/rendering/renderers/gpu/pipeline/PipelineSystem.ts","../src/rendering/renderers/gpu/renderTarget/GpuRenderTarget.ts","../src/rendering/renderers/gpu/renderTarget/GpuRenderTargetAdaptor.ts","../src/rendering/renderers/gpu/renderTarget/GpuRenderTargetSystem.ts","../src/rendering/renderers/gpu/shader/GpuShaderSystem.ts","../src/rendering/renderers/gpu/state/GpuBlendModesToPixi.ts","../src/rendering/renderers/gpu/state/GpuStateSystem.ts","../src/rendering/renderers/gpu/texture/uploaders/gpuUploadBufferImageResource.ts","../src/rendering/renderers/gpu/texture/uploaders/gpuUploadCompressedTextureResource.ts","../src/rendering/renderers/gpu/texture/uploaders/gpuUploadImageSource.ts","../src/rendering/renderers/gpu/texture/uploaders/gpuUploadVideoSource.ts","../src/rendering/renderers/gpu/texture/utils/GpuMipmapGenerator.ts","../src/rendering/renderers/gpu/texture/GpuTextureSystem.ts","../src/scene/graphics/gpu/GpuGraphicsAdaptor.ts","../src/scene/mesh/gpu/GpuMeshAdapter.ts","../src/rendering/renderers/gpu/WebGPURenderer.ts","../src/rendering/renderers/shared/geometry/const.ts","../src/rendering/renderers/shared/renderTarget/viewportFromFrame.ts","../src/rendering/renderers/shared/texture/const.ts","../src/rendering/renderers/shared/texture/TextureUvs.ts","../src/rendering/renderers/shared/texture/utils/generateUID.ts","../src/rendering/renderers/shared/utils/parseFunctionBody.ts","../src/scene/container/RenderContainer.ts","../src/scene/container/utils/updateLocalTransform.ts","../src/scene/container/utils/updateWorldTransform.ts","../src/scene/graphics/shared/utils/buildGeometryFromPath.ts","../src/scene/mesh-plane/MeshPlane.ts","../src/scene/mesh-simple/RopeGeometry.ts","../src/scene/mesh-simple/MeshRope.ts","../src/scene/mesh-simple/MeshSimple.ts","../src/scene/mesh/shared/getTextureDefaultMatrix.ts","../src/scene/sprite-nine-slice/NineSliceSprite.ts","../src/scene/text/utils/ensureTextStyle.ts","../src/utils/const.ts","../src/utils/logging/logDebugTexture.ts","../src/utils/logging/logScene.ts"],"sourcesContent":["/**\n * `extensions` is a global object that holds all the extensions registered with PixiJS.\n * PixiJS uses a this extensions architecture a lot to make the library more modular and\n * flexible.\n *\n * For example, if you want to add load a new type of asset, you can register a new\n * {@link assets.LoaderParser} with the `extensions` object.\n *\n * ```js\n * import { extensions, ExtensionType } from 'pixi.js';\n *\n * // create a custom asset loader\n * const customAssetLoader = {\n * extension: {\n * type: ExtensionType.LoadParser,\n * name: 'custom-asset-loader',\n * },\n * test(url) {\n * // check if this new loader should be used...\n * },\n * load(url) {\n * // load the asset...\n * },\n * };\n *\n * // add the custom asset loader to pixi\n * extensions.add(customAssetLoader);\n * ```\n *\n * This would add the `customAssetLoader` to the list of available loaders that PixiJS can use.\n *\n * There are many different types of extensions, which are listed in {@link extensions.ExtensionType}.\n * @namespace extensions\n */\n\n/**\n * Collection of valid extension types.\n * @memberof extensions\n */\nenum ExtensionType\n// eslint-disable-next-line @typescript-eslint/indent\n{\n /** extensions that are registered as Application plugins */\n Application = 'application',\n\n /** extensions that are registered as WebGL render pipes */\n WebGLPipes = 'webgl-pipes',\n /** extensions that are registered as WebGL render pipes adaptors */\n WebGLPipesAdaptor = 'webgl-pipes-adaptor',\n /** extensions that are registered as WebGL render systems */\n WebGLSystem = 'webgl-system',\n\n /** extensions that are registered as WebGPU render pipes */\n WebGPUPipes = 'webgpu-pipes',\n /** extensions that are registered as WebGPU render pipes adaptors */\n WebGPUPipesAdaptor = 'webgpu-pipes-adaptor',\n /** extensions that are registered as WebGPU render systems */\n WebGPUSystem = 'webgpu-system',\n\n /** extensions that are registered as Canvas render pipes */\n CanvasSystem = 'canvas-system',\n /** extensions that are registered as Canvas render pipes adaptors */\n CanvasPipesAdaptor = 'canvas-pipes-adaptor',\n /** extensions that are registered as Canvas render systems */\n CanvasPipes = 'canvas-pipes',\n\n /** extensions that combine the other Asset extensions */\n Asset = 'asset',\n /** extensions that are used to load assets through Assets */\n LoadParser = 'load-parser',\n /** extensions that are used to resolve asset urls through Assets */\n ResolveParser = 'resolve-parser',\n /** extensions that are used to handle how urls are cached by Assets */\n CacheParser = 'cache-parser',\n /** extensions that are used to add/remove available resources from Assets */\n DetectionParser = 'detection-parser',\n\n /** extensions that are registered with the MaskEffectManager */\n MaskEffect = 'mask-effect',\n\n /** A type of extension for creating a new advanced blend mode */\n BlendMode = 'blend-mode',\n\n /** A type of extension that will be used to auto detect a resource type */\n TextureSource = 'texture-source',\n\n /** A type of extension that will be used to auto detect an environment */\n Environment = 'environment',\n\n /** A type of extension for building and triangulating custom shapes used in graphics. */\n ShapeBuilder = 'shape-builder',\n}\n\n/**\n * The metadata for an extension.\n * @memberof extensions\n * @ignore\n */\ninterface ExtensionMetadataDetails\n{\n /** The extension type, can be multiple types */\n type: ExtensionType | ExtensionType[];\n /** Optional. Some plugins provide an API name/property, to make them more easily accessible */\n name?: string;\n /** Optional, used for sorting the plugins in a particular order */\n priority?: number;\n}\n\n/**\n * The metadata for an extension.\n * @memberof extensions\n */\ntype ExtensionMetadata = ExtensionType | ExtensionMetadataDetails;\n\n/**\n * Format when registering an extension. Generally, the extension\n * should have these values as `extension` static property,\n * but you can override name or type by providing an object.\n * @memberof extensions\n */\ninterface ExtensionFormat\n{\n /** The extension type, can be multiple types */\n type: ExtensionType | ExtensionType[];\n /** Optional. Some plugins provide an API name/property, such as Renderer plugins */\n name?: string;\n /** Optional, used for sorting the plugins in a particular order */\n priority?: number;\n /** Reference to the plugin object/class */\n ref: any;\n}\n\n/**\n * Extension format that is used internally for registrations.\n * @memberof extensions\n * @ignore\n */\ninterface StrictExtensionFormat extends ExtensionFormat\n{\n /** The extension type, always expressed as multiple, even if a single */\n type: ExtensionType[];\n}\n\ntype ExtensionHandler = (extension: StrictExtensionFormat) => void;\n\n/**\n * Convert input into extension format data.\n * @ignore\n */\nconst normalizeExtension = (ext: ExtensionFormat | any): StrictExtensionFormat =>\n{\n // Class/Object submission, use extension object\n if (typeof ext === 'function' || (typeof ext === 'object' && ext.extension))\n {\n // #if _DEBUG\n if (!ext.extension)\n {\n throw new Error('Extension class must have an extension object');\n }\n // #endif\n const metadata: ExtensionMetadataDetails = (typeof ext.extension !== 'object')\n ? { type: ext.extension }\n : ext.extension;\n\n ext = { ...metadata, ref: ext };\n }\n if (typeof ext === 'object')\n {\n ext = { ...ext };\n }\n else\n {\n throw new Error('Invalid extension type');\n }\n\n if (typeof ext.type === 'string')\n {\n ext.type = [ext.type];\n }\n\n return ext;\n};\n\n/**\n * Get the priority for an extension.\n * @ignore\n * @param ext - Any extension\n * @param defaultPriority - Fallback priority if none is defined.\n * @returns The priority for the extension.\n * @memberof extensions\n */\nexport const normalizeExtensionPriority = (ext: ExtensionFormat | any, defaultPriority: number): number =>\n normalizeExtension(ext).priority ?? defaultPriority;\n\n/**\n * Global registration of all PixiJS extensions. One-stop-shop for extensibility.\n *\n * Import the `extensions` object and use it to register new functionality via the described methods below.\n * ```js\n * import { extensions } from 'pixi.js';\n *\n * // register a new extension\n * extensions.add(myExtension);\n * ```\n * @property {Function} remove - Remove extensions from PixiJS.\n * @property {Function} add - Register new extensions with PixiJS.\n * @property {Function} handle - Internal method to handle extensions by name.\n * @property {Function} handleByMap - Handle a type, but using a map by `name` property.\n * @property {Function} handleByNamedList - Handle a type, but using a list of extensions with a `name` property.\n * @property {Function} handleByList - Handle a type, but using a list of extensions.\n * @memberof extensions\n */\nconst extensions = {\n\n /** @ignore */\n _addHandlers: {} as Partial>,\n\n /** @ignore */\n _removeHandlers: {} as Partial>,\n\n /** @ignore */\n _queue: {} as Partial>,\n\n /**\n * Remove extensions from PixiJS.\n * @param extensions - Extensions to be removed.\n * @returns {extensions} For chaining.\n */\n remove(...extensions: Array)\n {\n extensions.map(normalizeExtension).forEach((ext) =>\n {\n ext.type.forEach((type) => this._removeHandlers[type]?.(ext));\n });\n\n return this;\n },\n\n /**\n * Register new extensions with PixiJS.\n * @param extensions - The spread of extensions to add to PixiJS.\n * @returns {extensions} For chaining.\n */\n add(...extensions: Array)\n {\n // Handle any extensions either passed as class w/ data or as data\n extensions.map(normalizeExtension).forEach((ext) =>\n {\n ext.type.forEach((type) =>\n {\n const handlers = this._addHandlers;\n const queue = this._queue;\n\n if (!handlers[type])\n {\n queue[type] = queue[type] || [];\n queue[type]?.push(ext);\n }\n else\n {\n handlers[type]?.(ext);\n }\n });\n });\n\n return this;\n },\n\n /**\n * Internal method to handle extensions by name.\n * @param type - The extension type.\n * @param onAdd - Function handler when extensions are added/registered {@link StrictExtensionFormat}.\n * @param onRemove - Function handler when extensions are removed/unregistered {@link StrictExtensionFormat}.\n * @returns {extensions} For chaining.\n */\n handle(type: ExtensionType, onAdd: ExtensionHandler, onRemove: ExtensionHandler)\n {\n const addHandlers = this._addHandlers;\n const removeHandlers = this._removeHandlers;\n\n // #if _DEBUG\n if (addHandlers[type] || removeHandlers[type])\n {\n throw new Error(`Extension type ${type} already has a handler`);\n }\n // #endif\n\n addHandlers[type] = onAdd;\n removeHandlers[type] = onRemove;\n\n // Process the queue\n const queue = this._queue;\n\n // Process any plugins that have been registered before the handler\n if (queue[type])\n {\n queue[type]?.forEach((ext) => onAdd(ext));\n delete queue[type];\n }\n\n return this;\n },\n\n /**\n * Handle a type, but using a map by `name` property.\n * @param type - Type of extension to handle.\n * @param map - The object map of named extensions.\n * @returns {extensions} For chaining.\n */\n handleByMap(type: ExtensionType, map: Record)\n {\n return this.handle(type,\n (extension) =>\n {\n if (extension.name)\n {\n map[extension.name] = extension.ref;\n }\n },\n (extension) =>\n {\n if (extension.name)\n {\n delete map[extension.name];\n }\n }\n );\n },\n\n /**\n * Handle a type, but using a list of extensions with a `name` property.\n * @param type - Type of extension to handle.\n * @param map - The array of named extensions.\n * @param defaultPriority - Fallback priority if none is defined.\n * @returns {extensions} For chaining.\n */\n handleByNamedList(type: ExtensionType, map: {name: string, value: any}[], defaultPriority = -1)\n {\n return this.handle(\n type,\n (extension) =>\n {\n const index = map.findIndex((item) => item.name === extension.name);\n\n if (index >= 0) return;\n\n map.push({ name: extension.name, value: extension.ref });\n map.sort((a, b) =>\n normalizeExtensionPriority(b.value, defaultPriority)\n - normalizeExtensionPriority(a.value, defaultPriority));\n },\n (extension) =>\n {\n const index = map.findIndex((item) => item.name === extension.name);\n\n if (index !== -1)\n {\n map.splice(index, 1);\n }\n }\n );\n },\n\n /**\n * Handle a type, but using a list of extensions.\n * @param type - Type of extension to handle.\n * @param list - The list of extensions.\n * @param defaultPriority - The default priority to use if none is specified.\n * @returns {extensions} For chaining.\n */\n handleByList(type: ExtensionType, list: any[], defaultPriority = -1)\n {\n return this.handle(\n type,\n (extension) =>\n {\n if (list.includes(extension.ref))\n {\n return;\n }\n\n list.push(extension.ref);\n list.sort((a, b) =>\n normalizeExtensionPriority(b, defaultPriority) - normalizeExtensionPriority(a, defaultPriority));\n },\n (extension) =>\n {\n const index = list.indexOf(extension.ref);\n\n if (index !== -1)\n {\n list.splice(index, 1);\n }\n }\n );\n },\n};\n\nexport {\n extensions,\n ExtensionType,\n};\nexport type {\n StrictExtensionFormat as ExtensionFormat,\n ExtensionFormat as ExtensionFormatLoose,\n ExtensionHandler,\n ExtensionMetadata,\n ExtensionMetadataDetails\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 * @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 {*} 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 * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @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 * @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 * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\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 * @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 {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\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 {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\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 {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @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 clearEvent(this, 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 clearEvent(this, 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 clearEvent(this, 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 * @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]) clearEvent(this, evt);\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// 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","var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return\"string\"==typeof r?r.length>0:\"number\"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?\"0\"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,p=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s+([+-]?\\d*\\.?\\d+)%\\s+([+-]?\\d*\\.?\\d+)%\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,v=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,m=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},\"hex\"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},\"rgb\"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u=\"deg\"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},\"hsl\"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},\"rgb\"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},\"hsl\"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},\"hsv\"]]},N=function(r,t){for(var n=0;n=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):\"\",\"#\"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?\"rgba(\"+t+\", \"+n+\", \"+e+\", \"+u+\")\":\"rgb(\"+t+\", \"+n+\", \"+e+\")\";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?\"hsla(\"+t+\", \"+n+\"%, \"+e+\"%, \"+u+\")\":\"hsl(\"+t+\", \"+n+\"%, \"+e+\"%)\";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return\"number\"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return\"number\"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};export{j as Colord,w as colord,k as extend,I as getFormat,E as random};\n","export default function(e,f){var a={white:\"#ffffff\",bisque:\"#ffe4c4\",blue:\"#0000ff\",cadetblue:\"#5f9ea0\",chartreuse:\"#7fff00\",chocolate:\"#d2691e\",coral:\"#ff7f50\",antiquewhite:\"#faebd7\",aqua:\"#00ffff\",azure:\"#f0ffff\",whitesmoke:\"#f5f5f5\",papayawhip:\"#ffefd5\",plum:\"#dda0dd\",blanchedalmond:\"#ffebcd\",black:\"#000000\",gold:\"#ffd700\",goldenrod:\"#daa520\",gainsboro:\"#dcdcdc\",cornsilk:\"#fff8dc\",cornflowerblue:\"#6495ed\",burlywood:\"#deb887\",aquamarine:\"#7fffd4\",beige:\"#f5f5dc\",crimson:\"#dc143c\",cyan:\"#00ffff\",darkblue:\"#00008b\",darkcyan:\"#008b8b\",darkgoldenrod:\"#b8860b\",darkkhaki:\"#bdb76b\",darkgray:\"#a9a9a9\",darkgreen:\"#006400\",darkgrey:\"#a9a9a9\",peachpuff:\"#ffdab9\",darkmagenta:\"#8b008b\",darkred:\"#8b0000\",darkorchid:\"#9932cc\",darkorange:\"#ff8c00\",darkslateblue:\"#483d8b\",gray:\"#808080\",darkslategray:\"#2f4f4f\",darkslategrey:\"#2f4f4f\",deeppink:\"#ff1493\",deepskyblue:\"#00bfff\",wheat:\"#f5deb3\",firebrick:\"#b22222\",floralwhite:\"#fffaf0\",ghostwhite:\"#f8f8ff\",darkviolet:\"#9400d3\",magenta:\"#ff00ff\",green:\"#008000\",dodgerblue:\"#1e90ff\",grey:\"#808080\",honeydew:\"#f0fff0\",hotpink:\"#ff69b4\",blueviolet:\"#8a2be2\",forestgreen:\"#228b22\",lawngreen:\"#7cfc00\",indianred:\"#cd5c5c\",indigo:\"#4b0082\",fuchsia:\"#ff00ff\",brown:\"#a52a2a\",maroon:\"#800000\",mediumblue:\"#0000cd\",lightcoral:\"#f08080\",darkturquoise:\"#00ced1\",lightcyan:\"#e0ffff\",ivory:\"#fffff0\",lightyellow:\"#ffffe0\",lightsalmon:\"#ffa07a\",lightseagreen:\"#20b2aa\",linen:\"#faf0e6\",mediumaquamarine:\"#66cdaa\",lemonchiffon:\"#fffacd\",lime:\"#00ff00\",khaki:\"#f0e68c\",mediumseagreen:\"#3cb371\",limegreen:\"#32cd32\",mediumspringgreen:\"#00fa9a\",lightskyblue:\"#87cefa\",lightblue:\"#add8e6\",midnightblue:\"#191970\",lightpink:\"#ffb6c1\",mistyrose:\"#ffe4e1\",moccasin:\"#ffe4b5\",mintcream:\"#f5fffa\",lightslategray:\"#778899\",lightslategrey:\"#778899\",navajowhite:\"#ffdead\",navy:\"#000080\",mediumvioletred:\"#c71585\",powderblue:\"#b0e0e6\",palegoldenrod:\"#eee8aa\",oldlace:\"#fdf5e6\",paleturquoise:\"#afeeee\",mediumturquoise:\"#48d1cc\",mediumorchid:\"#ba55d3\",rebeccapurple:\"#663399\",lightsteelblue:\"#b0c4de\",mediumslateblue:\"#7b68ee\",thistle:\"#d8bfd8\",tan:\"#d2b48c\",orchid:\"#da70d6\",mediumpurple:\"#9370db\",purple:\"#800080\",pink:\"#ffc0cb\",skyblue:\"#87ceeb\",springgreen:\"#00ff7f\",palegreen:\"#98fb98\",red:\"#ff0000\",yellow:\"#ffff00\",slateblue:\"#6a5acd\",lavenderblush:\"#fff0f5\",peru:\"#cd853f\",palevioletred:\"#db7093\",violet:\"#ee82ee\",teal:\"#008080\",slategray:\"#708090\",slategrey:\"#708090\",aliceblue:\"#f0f8ff\",darkseagreen:\"#8fbc8f\",darkolivegreen:\"#556b2f\",greenyellow:\"#adff2f\",seagreen:\"#2e8b57\",seashell:\"#fff5ee\",tomato:\"#ff6347\",silver:\"#c0c0c0\",sienna:\"#a0522d\",lavender:\"#e6e6fa\",lightgreen:\"#90ee90\",orange:\"#ffa500\",orangered:\"#ff4500\",steelblue:\"#4682b4\",royalblue:\"#4169e1\",turquoise:\"#40e0d0\",yellowgreen:\"#9acd32\",salmon:\"#fa8072\",saddlebrown:\"#8b4513\",sandybrown:\"#f4a460\",rosybrown:\"#bc8f8f\",darksalmon:\"#e9967a\",lightgoldenrodyellow:\"#fafad2\",snow:\"#fffafa\",lightgrey:\"#d3d3d3\",lightgray:\"#d3d3d3\",dimgray:\"#696969\",dimgrey:\"#696969\",olivedrab:\"#6b8e23\",olive:\"#808000\"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return\"transparent\";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b=\"black\";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u | null;\n\n /** Normalized rgba component, floats from 0-1 */\n private _components: Float32Array;\n\n /** Cache color as number */\n private _int: number;\n\n /** An array of the current Color. Only populated when `toArray` functions are called */\n private _arrayRgba: number[] | null;\n private _arrayRgb: number[] | null;\n\n /**\n * @param {ColorSource} value - Optional value to use, if not provided, white is used.\n */\n constructor(value: ColorSource = 0xffffff)\n {\n this._value = null;\n this._components = new Float32Array(4);\n this._components.fill(1);\n this._int = 0xffffff;\n this.value = value;\n }\n\n /** Get red component (0 - 1) */\n get red(): number\n {\n return this._components[0];\n }\n\n /** Get green component (0 - 1) */\n get green(): number\n {\n return this._components[1];\n }\n\n /** Get blue component (0 - 1) */\n get blue(): number\n {\n return this._components[2];\n }\n\n /** Get alpha component (0 - 1) */\n get alpha(): number\n {\n return this._components[3];\n }\n\n /**\n * Set the value, suitable for chaining\n * @param value\n * @see Color.value\n */\n public setValue(value: ColorSource): this\n {\n this.value = value;\n\n return this;\n }\n\n /**\n * The current color source.\n *\n * When setting:\n * - Setting to an instance of `Color` will copy its color source and components.\n * - Otherwise, `Color` will try to normalize the color source and set the components.\n * If the color source is invalid, an `Error` will be thrown and the `Color` will left unchanged.\n *\n * Note: The `null` in the setter's parameter type is added to match the TypeScript rule: return type of getter\n * must be assignable to its setter's parameter type. Setting `value` to `null` will throw an `Error`.\n *\n * When getting:\n * - A return value of `null` means the previous value was overridden (e.g., {@link Color.multiply multiply},\n * {@link Color.premultiply premultiply} or {@link Color.round round}).\n * - Otherwise, the color source used when setting is returned.\n */\n set value(value: ColorSource | null)\n {\n // Support copying from other Color objects\n if (value instanceof Color)\n {\n this._value = this._cloneSource(value._value);\n this._int = value._int;\n this._components.set(value._components);\n }\n else if (value === null)\n {\n throw new Error('Cannot set Color#value to null');\n }\n else if (this._value === null || !this._isSourceEqual(this._value, value))\n {\n this._normalize(value);\n this._value = this._cloneSource(value);\n }\n }\n get value(): Exclude | null\n {\n return this._value;\n }\n\n /**\n * Copy a color source internally.\n * @param value - Color source\n */\n private _cloneSource(value: Exclude | null): Exclude | null\n {\n if (typeof value === 'string' || typeof value === 'number' || value instanceof Number || value === null)\n {\n return value;\n }\n else if (Array.isArray(value) || ArrayBuffer.isView(value))\n {\n return value.slice(0);\n }\n else if (typeof value === 'object' && value !== null)\n {\n return { ...value };\n }\n\n return value;\n }\n\n /**\n * Equality check for color sources.\n * @param value1 - First color source\n * @param value2 - Second color source\n * @returns `true` if the color sources are equal, `false` otherwise.\n */\n private _isSourceEqual(value1: Exclude, value2: Exclude): boolean\n {\n const type1 = typeof value1;\n const type2 = typeof value2;\n\n // Mismatched types\n if (type1 !== type2)\n {\n return false;\n }\n // Handle numbers/strings and things that extend Number\n // important to do the instanceof Number first, as this is \"object\" type\n else if (type1 === 'number' || type1 === 'string' || value1 instanceof Number)\n {\n return value1 === value2;\n }\n // Handle Arrays and TypedArrays\n else if (\n (Array.isArray(value1) && Array.isArray(value2))\n || (ArrayBuffer.isView(value1) && ArrayBuffer.isView(value2))\n )\n {\n if (value1.length !== value2.length)\n {\n return false;\n }\n\n return value1.every((v, i) => v === value2[i]);\n }\n // Handle Objects\n else if (value1 !== null && value2 !== null)\n {\n const keys1 = Object.keys(value1) as (keyof typeof value1)[];\n const keys2 = Object.keys(value2) as (keyof typeof value2)[];\n\n if (keys1.length !== keys2.length)\n {\n return false;\n }\n\n return keys1.every((key) => value1[key] === value2[key]);\n }\n\n return value1 === value2;\n }\n\n /**\n * Convert to a RGBA color object.\n * @example\n * import { Color } from 'pixi.js';\n * new Color('white').toRgb(); // returns { r: 1, g: 1, b: 1, a: 1 }\n */\n public toRgba(): RgbaColor\n {\n const [r, g, b, a] = this._components;\n\n return { r, g, b, a };\n }\n\n /**\n * Convert to a RGB color object.\n * @example\n * import { Color } from 'pixi.js';\n * new Color('white').toRgb(); // returns { r: 1, g: 1, b: 1 }\n */\n public toRgb(): RgbColor\n {\n const [r, g, b] = this._components;\n\n return { r, g, b };\n }\n\n /** Convert to a CSS-style rgba string: `rgba(255,255,255,1.0)`. */\n public toRgbaString(): string\n {\n const [r, g, b] = this.toUint8RgbArray();\n\n return `rgba(${r},${g},${b},${this.alpha})`;\n }\n\n /**\n * Convert to an [R, G, B] array of clamped uint8 values (0 to 255).\n * @example\n * import { Color } from 'pixi.js';\n * new Color('white').toUint8RgbArray(); // returns [255, 255, 255]\n * @param {number[]|Uint8Array|Uint8ClampedArray} [out] - Output array\n */\n public toUint8RgbArray(): number[];\n public toUint8RgbArray(out: T): T;\n public toUint8RgbArray(out?: T): T\n {\n const [r, g, b] = this._components;\n\n if (!this._arrayRgb)\n {\n this._arrayRgb = [];\n }\n\n out = out || this._arrayRgb as T;\n\n out[0] = Math.round(r * 255);\n out[1] = Math.round(g * 255);\n out[2] = Math.round(b * 255);\n\n return out;\n }\n\n /**\n * Convert to an [R, G, B, A] array of normalized floats (numbers from 0.0 to 1.0).\n * @example\n * import { Color } from 'pixi.js';\n * new Color('white').toArray(); // returns [1, 1, 1, 1]\n * @param {number[]|Float32Array} [out] - Output array\n */\n public toArray(): number[];\n public toArray(out: T): T;\n public toArray(out?: T): T\n {\n if (!this._arrayRgba)\n {\n this._arrayRgba = [];\n }\n\n out = out || this._arrayRgba as T;\n const [r, g, b, a] = this._components;\n\n out[0] = r;\n out[1] = g;\n out[2] = b;\n out[3] = a;\n\n return out;\n }\n\n /**\n * Convert to an [R, G, B] array of normalized floats (numbers from 0.0 to 1.0).\n * @example\n * import { Color } from 'pixi.js';\n * new Color('white').toRgbArray(); // returns [1, 1, 1]\n * @param {number[]|Float32Array} [out] - Output array\n */\n public toRgbArray(): number[];\n public toRgbArray(out: T): T;\n public toRgbArray(out?: T): T\n {\n if (!this._arrayRgb)\n {\n this._arrayRgb = [];\n }\n\n out = out || this._arrayRgb as T;\n const [r, g, b] = this._components;\n\n out[0] = r;\n out[1] = g;\n out[2] = b;\n\n return out;\n }\n\n /**\n * Convert to a hexadecimal number.\n * @example\n * import { Color } from 'pixi.js';\n * new Color('white').toNumber(); // returns 16777215\n */\n public toNumber(): number\n {\n return this._int;\n }\n\n /**\n * Convert to a BGR number\n * @example\n * import { Color } from 'pixi.js';\n * new Color(0xffcc99).toBgrNumber(); // returns 0x99ccff\n */\n public toBgrNumber(): number\n {\n const [r, g, b] = this.toUint8RgbArray();\n\n return (b << 16) + (g << 8) + r;\n }\n\n /**\n * Convert to a hexadecimal number in little endian format (e.g., BBGGRR).\n * @example\n * import { Color } from 'pixi.js';\n * new Color(0xffcc99).toLittleEndianNumber(); // returns 0x99ccff\n * @returns {number} - The color as a number in little endian format.\n */\n public toLittleEndianNumber(): number\n {\n const value = this._int;\n\n return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n }\n\n /**\n * Multiply with another color. This action is destructive, and will\n * override the previous `value` property to be `null`.\n * @param {ColorSource} value - The color to multiply by.\n */\n public multiply(value: ColorSource): this\n {\n const [r, g, b, a] = Color._temp.setValue(value)._components;\n\n this._components[0] *= r;\n this._components[1] *= g;\n this._components[2] *= b;\n this._components[3] *= a;\n\n this._refreshInt();\n this._value = null;\n\n return this;\n }\n\n /**\n * Converts color to a premultiplied alpha format. This action is destructive, and will\n * override the previous `value` property to be `null`.\n * @param alpha - The alpha to multiply by.\n * @param {boolean} [applyToRGB=true] - Whether to premultiply RGB channels.\n * @returns {Color} - Itself.\n */\n public premultiply(alpha: number, applyToRGB = true): this\n {\n if (applyToRGB)\n {\n this._components[0] *= alpha;\n this._components[1] *= alpha;\n this._components[2] *= alpha;\n }\n this._components[3] = alpha;\n\n this._refreshInt();\n this._value = null;\n\n return this;\n }\n\n /**\n * Premultiplies alpha with current color.\n * @param {number} alpha - The alpha to multiply by.\n * @param {boolean} [applyToRGB=true] - Whether to premultiply RGB channels.\n * @returns {number} tint multiplied by alpha\n */\n public toPremultiplied(alpha: number, applyToRGB = true): number\n {\n if (alpha === 1.0)\n {\n return (0xff << 24) + this._int;\n }\n if (alpha === 0.0)\n {\n return applyToRGB ? 0 : this._int;\n }\n let r = (this._int >> 16) & 0xff;\n let g = (this._int >> 8) & 0xff;\n let b = this._int & 0xff;\n\n if (applyToRGB)\n {\n r = ((r * alpha) + 0.5) | 0;\n g = ((g * alpha) + 0.5) | 0;\n b = ((b * alpha) + 0.5) | 0;\n }\n\n return ((alpha * 255) << 24) + (r << 16) + (g << 8) + b;\n }\n\n /**\n * Convert to a hexidecimal string.\n * @example\n * import { Color } from 'pixi.js';\n * new Color('white').toHex(); // returns \"#ffffff\"\n */\n public toHex(): string\n {\n const hexString = this._int.toString(16);\n\n return `#${'000000'.substring(0, 6 - hexString.length) + hexString}`;\n }\n\n /**\n * Convert to a hexidecimal string with alpha.\n * @example\n * import { Color } from 'pixi.js';\n * new Color('white').toHexa(); // returns \"#ffffffff\"\n */\n public toHexa(): string\n {\n const alphaValue = Math.round(this._components[3] * 255);\n const alphaString = alphaValue.toString(16);\n\n return this.toHex() + '00'.substring(0, 2 - alphaString.length) + alphaString;\n }\n\n /**\n * Set alpha, suitable for chaining.\n * @param alpha\n */\n public setAlpha(alpha: number): this\n {\n this._components[3] = this._clamp(alpha);\n\n return this;\n }\n\n /**\n * Normalize the input value into rgba\n * @param value - Input value\n */\n private _normalize(value: Exclude): void\n {\n let r: number | undefined;\n let g: number | undefined;\n let b: number | undefined;\n let a: number | undefined;\n\n // Number is a primative so typeof works fine, but in the case\n // that someone creates a class that extends Number, we also\n // need to check for instanceof Number\n if (\n (typeof value === 'number' || value instanceof Number)\n && (value as number) >= 0\n && (value as number) <= 0xffffff\n )\n {\n const int = value as number; // cast required because instanceof Number is ambiguous for TS\n\n r = ((int >> 16) & 0xff) / 255;\n g = ((int >> 8) & 0xff) / 255;\n b = (int & 0xff) / 255;\n a = 1.0;\n }\n else if (\n (Array.isArray(value) || value instanceof Float32Array)\n // Can be rgb or rgba\n && value.length >= 3\n && value.length <= 4\n )\n {\n // make sure all values are 0 - 1\n value = this._clamp(value);\n [r, g, b, a = 1.0] = value;\n }\n else if (\n (value instanceof Uint8Array || value instanceof Uint8ClampedArray)\n // Can be rgb or rgba\n && value.length >= 3\n && value.length <= 4\n )\n {\n // make sure all values are 0 - 255\n value = this._clamp(value, 0, 255);\n [r, g, b, a = 255] = value;\n r /= 255;\n g /= 255;\n b /= 255;\n a /= 255;\n }\n else if (typeof value === 'string' || typeof value === 'object')\n {\n if (typeof value === 'string')\n {\n const match = Color.HEX_PATTERN.exec(value);\n\n if (match)\n {\n // Normalize hex string, remove 0x or # prefix\n value = `#${match[2]}`;\n }\n }\n\n const color = colord(value as AnyColor);\n\n if (color.isValid())\n {\n ({ r, g, b, a } = color.rgba);\n r /= 255;\n g /= 255;\n b /= 255;\n }\n }\n\n // Cache normalized values for rgba and hex integer\n if (r !== undefined)\n {\n this._components[0] = r as number;\n this._components[1] = g as number;\n this._components[2] = b as number;\n this._components[3] = a as number;\n this._refreshInt();\n }\n else\n {\n throw new Error(`Unable to convert color ${value}`);\n }\n }\n\n /** Refresh the internal color rgb number */\n private _refreshInt(): void\n {\n // Clamp values to 0 - 1\n this._clamp(this._components);\n\n const [r, g, b] = this._components;\n\n this._int = ((r * 255) << 16) + ((g * 255) << 8) + ((b * 255) | 0);\n }\n\n /**\n * Clamps values to a range. Will override original values\n * @param value - Value(s) to clamp\n * @param min - Minimum value\n * @param max - Maximum value\n */\n private _clamp(value: T, min = 0, max = 1): T\n {\n if (typeof value === 'number')\n {\n return Math.min(Math.max(value, min), max) as T;\n }\n\n value.forEach((v, i) =>\n {\n value[i] = Math.min(Math.max(v, min), max);\n });\n\n return value;\n }\n\n /**\n * Check if the value is a color-like object\n * @param value - Value to check\n * @returns True if the value is a color-like object\n * @static\n * @example\n * import { Color } from 'pixi.js';\n * Color.isColorLike('white'); // returns true\n * Color.isColorLike(0xffffff); // returns true\n * Color.isColorLike([1, 1, 1]); // returns true\n */\n public static isColorLike(value: unknown): value is ColorSource\n {\n return (\n typeof value === 'number'\n || typeof value === 'string'\n || value instanceof Number\n || value instanceof Color\n || Array.isArray(value)\n || value instanceof Uint8Array\n || value instanceof Uint8ClampedArray\n || value instanceof Float32Array\n || ((value as RgbColor).r !== undefined\n && (value as RgbColor).g !== undefined\n && (value as RgbColor).b !== undefined)\n || ((value as RgbaColor).r !== undefined\n && (value as RgbaColor).g !== undefined\n && (value as RgbaColor).b !== undefined\n && (value as RgbaColor).a !== undefined)\n || ((value as HslColor).h !== undefined\n && (value as HslColor).s !== undefined\n && (value as HslColor).l !== undefined)\n || ((value as HslaColor).h !== undefined\n && (value as HslaColor).s !== undefined\n && (value as HslaColor).l !== undefined\n && (value as HslaColor).a !== undefined)\n || ((value as HsvColor).h !== undefined\n && (value as HsvColor).s !== undefined\n && (value as HsvColor).v !== undefined)\n || ((value as HsvaColor).h !== undefined\n && (value as HsvaColor).s !== undefined\n && (value as HsvaColor).v !== undefined\n && (value as HsvaColor).a !== undefined)\n );\n }\n}\n","import type { Rectangle } from '../maths/shapes/Rectangle';\n\nexport interface CullingMixinConstructor\n{\n /**\n * If set, this shape is used for culling instead of the bounds of this object.\n * It can improve the culling performance of objects with many children.\n * The culling area is defined in local space.\n * @memberof scene.Container#\n */\n cullArea: Rectangle,\n /**\n * Should this object be rendered if the bounds of this object are out of frame?\n *\n * Culling has no effect on whether updateTransform is called.\n * @default false\n * @memberof scene.Container#\n */\n cullable: boolean,\n /**\n * Determines if the children to the container can be culled\n * Setting this to false allows PixiJS to bypass a recursive culling function\n * Which can help to optimize very complex scenes\n * @default true\n * @memberof scene.Container#\n */\n cullableChildren: boolean,\n}\n\nexport const cullingMixin: CullingMixinConstructor = {\n cullArea: null,\n cullable: false,\n cullableChildren: true,\n};\n","/**\n * Two Pi.\n * @static\n * @member {number}\n * @memberof maths\n */\nexport const PI_2 = Math.PI * 2;\n\n/**\n * Conversion factor for converting radians to degrees.\n * @static\n * @member {number} RAD_TO_DEG\n * @memberof maths\n */\nexport const RAD_TO_DEG = 180 / Math.PI;\n\n/**\n * Conversion factor for converting degrees to radians.\n * @static\n * @member {number}\n * @memberof maths\n */\nexport const DEG_TO_RAD = Math.PI / 180;\n\n/**\n * Constants that identify shapes, mainly to prevent `instanceof` calls.\n * @memberof maths\n */\nexport type SHAPE_PRIMITIVE =\n | 'polygon'\n | 'rectangle'\n | 'circle'\n | 'ellipse'\n | 'triangle'\n | 'roundedRectangle';\n\n/**\n * The `maths` folder contains utility classes and functions for mathematical operations used throughout the project.\n * This includes constants such as conversion factors for radians and degrees, as well as shapes such as polygons,\n * rectangles, circles, ellipses, triangles, and rounded rectangles.\n * ```js\n * import { RAD_TO_DEG, Circle } from 'pixi.js';\n *\n * // Convert 180 degrees to radians\n * const radians = 180 * RAD_TO_DEG;\n *\n * // test if a point is inside a circle\n * const isPointInCircle = new Circle(0, 0, 10).contains(0, 0); // true\n * ```\n * @namespace maths\n */\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport type { PointData } from './PointData';\nimport type { PointLike } from './PointLike';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface Point extends PixiMixins.Point { }\n\n/**\n * The Point object represents a location in a two-dimensional coordinate system, where `x` represents\n * the position on the horizontal axis and `y` represents the position on the vertical axis.\n *
\n * Many Pixi functions accept the `PointData` type as an alternative to `Point`,\n * which only requires `x` and `y` properties.\n * @class\n * @implements {PointLike}\n * @memberof maths\n */\nexport class Point implements PointLike\n{\n /** Position of the point on the x axis */\n public x = 0;\n /** Position of the point on the y axis */\n public y = 0;\n\n /**\n * Creates a new `Point`\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 this.x = x;\n this.y = y;\n }\n\n /**\n * Creates a clone of this point\n * @returns A clone of this point\n */\n public clone(): Point\n {\n return new Point(this.x, this.y);\n }\n\n /**\n * Copies `x` and `y` from the given point into this point\n * @param p - The point to copy from\n * @returns The point instance itself\n */\n public copyFrom(p: PointData): this\n {\n this.set(p.x, p.y);\n\n return this;\n }\n\n /**\n * Copies this point's x and y into the given point (`p`).\n * @param p - The point to copy to. Can be any of type that is or extends `PointData`\n * @returns The point (`p`) with values updated\n */\n public copyTo(p: T): T\n {\n p.set(this.x, this.y);\n\n return p;\n }\n\n /**\n * Accepts another point (`p`) and returns `true` if the given point is equal to this point\n * @param p - The point to check\n * @returns Returns `true` if both `x` and `y` are equal\n */\n public equals(p: PointData): boolean\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 * @param {number} [x=0] - position of the point on the `x` axis\n * @param {number} [y=x] - position of the point on the `y` axis\n * @returns The point instance itself\n */\n public set(x = 0, y: number = x): this\n {\n this.x = x;\n this.y = y;\n\n return this;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:Point x=${this.x} y=${this.y}]`;\n }\n // #endif\n\n /**\n * A static Point object with `x` and `y` values of `0`. Can be used to avoid creating new objects multiple times.\n * @readonly\n */\n static get shared(): Point\n {\n tempPoint.x = 0;\n tempPoint.y = 0;\n\n return tempPoint;\n }\n}\n\nconst tempPoint = new Point();\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport { PI_2 } from '../misc/const';\nimport { Point } from '../point/Point';\n\nimport type { PointData } from '../point/PointData';\n\ninterface TransformableObject\n{\n position: PointData;\n scale: PointData;\n pivot: PointData;\n skew: PointData;\n rotation: number;\n}\n\n/**\n * A fast matrix for 2D transformations.\n * ```js\n * | a | c | tx|\n * | b | d | ty|\n * | 0 | 0 | 1 |\n * ```\n * @memberof maths\n */\nexport class Matrix\n{\n /** @default 1 */\n public a: number;\n\n /** @default 0 */\n public b: number;\n\n /** @default 0 */\n public c: number;\n\n /** @default 1 */\n public d: number;\n\n /** @default 0 */\n public tx: number;\n\n /** @default 0 */\n public ty: number;\n\n /** An array of the current matrix. Only populated when `toArray` is called */\n public array: Float32Array | null = null;\n\n /**\n * @param a - x scale\n * @param b - y skew\n * @param c - x skew\n * @param d - y scale\n * @param tx - x translation\n * @param ty - y translation\n */\n constructor(a = 1, b = 0, c = 0, d = 1, tx = 0, ty = 0)\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\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 * @param array - The array that the matrix will be populated from.\n */\n public fromArray(array: number[]): void\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 * @param a - Matrix component\n * @param b - Matrix component\n * @param c - Matrix component\n * @param d - Matrix component\n * @param tx - Matrix component\n * @param ty - Matrix component\n * @returns This matrix. Good for chaining method calls.\n */\n public set(a: number, b: number, c: number, d: number, tx: number, ty: number): this\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 * @param transpose - Whether we need to transpose the matrix or not\n * @param [out=new Float32Array(9)] - If provided the array will be assigned to out\n * @returns The newly created array which contains the matrix\n */\n public toArray(transpose?: boolean, out?: Float32Array): Float32Array\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 * @param pos - The origin\n * @param {Point} [newPos] - The point that the new position is assigned to (allowed to be same as input)\n * @returns {Point} The new point, transformed through this matrix\n */\n public apply

(pos: PointData, newPos?: P): P\n {\n newPos = (newPos || new Point()) as P;\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 * @param pos - The origin\n * @param {Point} [newPos] - The point that the new position is assigned to (allowed to be same as input)\n * @returns {Point} The new point, inverse-transformed through this matrix\n */\n public applyInverse

(pos: PointData, newPos?: P): P\n {\n newPos = (newPos || new Point()) as P;\n\n const a = this.a;\n const b = this.b;\n const c = this.c;\n const d = this.d;\n const tx = this.tx;\n const ty = this.ty;\n\n const id = 1 / ((a * d) + (c * -b));\n\n const x = pos.x;\n const y = pos.y;\n\n newPos.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\n newPos.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\n\n return newPos;\n }\n\n /**\n * Translates the matrix on the x and y.\n * @param x - How much to translate x by\n * @param y - How much to translate y by\n * @returns This matrix. Good for chaining method calls.\n */\n public translate(x: number, y: number): this\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 * @param x - The amount to scale horizontally\n * @param y - The amount to scale vertically\n * @returns This matrix. Good for chaining method calls.\n */\n public scale(x: number, y: number): this\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 * @param angle - The angle in radians.\n * @returns This matrix. Good for chaining method calls.\n */\n public rotate(angle: number): this\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 * @param matrix - The matrix to append.\n * @returns This matrix. Good for chaining method calls.\n */\n public append(matrix: Matrix): this\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 * Appends two matrix's and sets the result to this matrix. AB = A * B\n * @param a - The matrix to append.\n * @param b - The matrix to append.\n * @returns This matrix. Good for chaining method calls.\n */\n public appendFrom(a: Matrix, b: Matrix): this\n {\n const a1 = a.a;\n const b1 = a.b;\n const c1 = a.c;\n const d1 = a.d;\n const tx = a.tx;\n const ty = a.ty;\n\n const a2 = b.a;\n const b2 = b.b;\n const c2 = b.c;\n const d2 = b.d;\n\n this.a = (a1 * a2) + (b1 * c2);\n this.b = (a1 * b2) + (b1 * d2);\n this.c = (c1 * a2) + (d1 * c2);\n this.d = (c1 * b2) + (d1 * d2);\n this.tx = (tx * a2) + (ty * c2) + b.tx;\n this.ty = (tx * b2) + (ty * d2) + b.ty;\n\n return this;\n }\n\n /**\n * Sets the matrix based on all the available properties\n * @param x - Position on the x axis\n * @param y - Position on the y axis\n * @param pivotX - Pivot on the x axis\n * @param pivotY - Pivot on the y axis\n * @param scaleX - Scale on the x axis\n * @param scaleY - Scale on the y axis\n * @param rotation - Rotation in radians\n * @param skewX - Skew on the x axis\n * @param skewY - Skew on the y axis\n * @returns This matrix. Good for chaining method calls.\n */\n public setTransform(x: number, y: number, pivotX: number, pivotY: number, scaleX: number,\n scaleY: number, rotation: number, skewX: number, skewY: number): this\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 * @param matrix - The matrix to prepend\n * @returns This matrix. Good for chaining method calls.\n */\n public prepend(matrix: Matrix): this\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 * @param transform - The transform to apply the properties to.\n * @returns The transform with the newly applied properties\n */\n public decompose(transform: TransformableObject): TransformableObject\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 const pivot = transform.pivot;\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 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 + ((pivot.x * a) + (pivot.y * c));\n transform.position.y = this.ty + ((pivot.x * b) + (pivot.y * d));\n\n return transform;\n }\n\n /**\n * Inverts this matrix\n * @returns This matrix. Good for chaining method calls.\n */\n public invert(): this\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 /** Checks if this matrix is an identity matrix */\n public isIdentity(): boolean\n {\n return this.a === 1 && this.b === 0 && this.c === 0 && this.d === 1 && this.tx === 0 && this.ty === 0;\n }\n\n /**\n * Resets this Matrix to an identity (default) matrix.\n * @returns This matrix. Good for chaining method calls.\n */\n public identity(): this\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 * @returns A copy of this matrix. Good for chaining method calls.\n */\n public clone(): Matrix\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 * @param matrix - The matrix to copy to.\n * @returns The matrix given in parameter with its values updated.\n */\n public copyTo(matrix: Matrix): 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 matrix to be the same as the ones in given matrix\n * @param matrix - The matrix to copy from.\n * @returns this\n */\n public copyFrom(matrix: Matrix): this\n {\n this.a = matrix.a;\n this.b = matrix.b;\n this.c = matrix.c;\n this.d = matrix.d;\n this.tx = matrix.tx;\n this.ty = matrix.ty;\n\n return this;\n }\n\n /**\n * check to see if two matrices are the same\n * @param matrix - The matrix to compare to.\n */\n public equals(matrix: Matrix)\n {\n return matrix.a === this.a && matrix.b === this.b\n && matrix.c === this.c && matrix.d === this.d\n && matrix.tx === this.tx && matrix.ty === this.ty;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`;\n }\n // #endif\n\n /**\n * A default (identity) matrix.\n *\n * This is a shared object, if you want to modify it consider creating a new `Matrix`\n * @readonly\n */\n static get IDENTITY(): Readonly\n {\n return identityMatrix.identity();\n }\n\n /**\n * A static Matrix that can be used to avoid creating new objects.\n * Will always ensure the matrix is reset to identity when requested.\n * Use this object for fast but temporary calculations, as it may be mutated later on.\n * This is a different object to the `IDENTITY` object and so can be modified without changing `IDENTITY`.\n * @readonly\n */\n static get shared(): Matrix\n {\n return tempMatrix.identity();\n }\n}\n\nconst tempMatrix = new Matrix();\nconst identityMatrix = new Matrix();\n","import type { PointData } from './PointData';\nimport type { PointLike } from './PointLike';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface ObservablePoint extends PixiMixins.ObservablePoint { }\n\n/**\n * Observer used to listen for observable point changes.\n * @memberof maths\n */\nexport interface Observer\n{\n /** Callback to call when the point has updated. */\n _onUpdate: (point?: T) => void;\n}\n\n/**\n * The ObservablePoint object represents a location in a two-dimensional coordinate system, where `x` represents\n * the position on the horizontal axis and `y` represents the position on the vertical axis.\n *\n * An `ObservablePoint` is a point that triggers the `onUpdate` method on an observer when the point's position is changed.\n * @memberof maths\n */\nexport class ObservablePoint implements PointLike\n{\n /** @ignore */\n public _x: number;\n /** @ignore */\n public _y: number;\n\n /** This object used to call the `onUpdate` callback when the point changes. */\n private readonly _observer: Observer;\n\n /**\n * Creates a new `ObservablePoint`\n * @param observer - Observer to pass to listen for change events.\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(observer: Observer, x?: number, y?: number)\n {\n this._x = x || 0;\n this._y = y || 0;\n\n this._observer = observer;\n }\n\n /**\n * Creates a clone of this point.\n * @param observer - Optional observer to pass to the new observable point.\n * @returns a copy of this observable point\n */\n public clone(observer?: Observer): ObservablePoint\n {\n return new ObservablePoint(observer ?? this._observer, 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 * @param {number} [x=0] - position of the point on the x axis\n * @param {number} [y=x] - position of the point on the y axis\n * @returns The observable point instance itself\n */\n public set(x = 0, y = x): this\n {\n if (this._x !== x || this._y !== y)\n {\n this._x = x;\n this._y = y;\n this._observer._onUpdate(this);\n }\n\n return this;\n }\n\n /**\n * Copies x and y from the given point (`p`)\n * @param p - The point to copy from. Can be any of type that is or extends `PointData`\n * @returns The observable point instance itself\n */\n public copyFrom(p: PointData): this\n {\n if (this._x !== p.x || this._y !== p.y)\n {\n this._x = p.x;\n this._y = p.y;\n this._observer._onUpdate(this);\n }\n\n return this;\n }\n\n /**\n * Copies this point's x and y into that of the given point (`p`)\n * @param p - The point to copy to. Can be any of type that is or extends `PointData`\n * @returns The point (`p`) with values updated\n */\n public copyTo(p: T): T\n {\n p.set(this._x, this._y);\n\n return p;\n }\n\n /**\n * Accepts another point (`p`) and returns `true` if the given point is equal to this point\n * @param p - The point to check\n * @returns Returns `true` if both `x` and `y` are equal\n */\n public equals(p: PointData): boolean\n {\n return (p.x === this._x) && (p.y === this._y);\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:ObservablePoint x=${0} y=${0} scope=${this._observer}]`;\n }\n // #endif\n\n /** Position of the observable point on the x axis. */\n get x(): number\n {\n return this._x;\n }\n\n set x(value: number)\n {\n if (this._x !== value)\n {\n this._x = value;\n this._observer._onUpdate(this);\n }\n }\n\n /** Position of the observable point on the y axis. */\n get y(): number\n {\n return this._y;\n }\n\n set y(value: number)\n {\n if (this._y !== value)\n {\n this._y = value;\n this._observer._onUpdate(this);\n }\n }\n}\n","const uidCache: Record = {\n default: -1,\n};\n\ntype UIDNames =\n | 'default'\n | 'resource'\n | 'texture'\n | 'textureSource'\n | 'textureResource'\n | 'batcher' //\n | 'graphicsContext' //\n | 'graphicsView' //\n | 'graphicsPath' //\n | 'fillGradient' //\n | 'fillPattern' //\n | 'meshView' //\n | 'renderable' //\n | 'buffer' //\n | 'bufferResource' //\n | 'geometry'\n | 'instructionSet' //\n | 'renderTarget' //\n | 'uniform' //\n | 'spriteView' //\n | 'textView' //\n | 'tilingSpriteView'; // ;\n\n/**\n * Gets the next unique identifier\n * @param name - The name of the identifier.\n * @function uid\n * @returns {number} The next unique identifier to use.\n * @memberof utils\n */\nexport function uid(name: UIDNames = 'default'): number\n{\n if (uidCache[name] === undefined)\n {\n uidCache[name] = -1;\n }\n\n return ++uidCache[name];\n}\n\n/** Resets the next unique identifier to 0. This is used for some tests, dont touch or things WILL explode :) */\nexport function resetUids(): void\n{\n for (const key in uidCache)\n {\n delete uidCache[key];\n }\n}\n","import type { Dict } from '../types';\n\n// A map of warning messages already fired\nconst warnings: Dict = {};\n\n/**\n * deprecation name for version 8.0.0\n * @ignore\n */\nexport const v8_0_0 = '8.0.0';\n\n/**\n * Helper for warning developers about deprecated features & settings.\n * A stack track for warnings is given; useful for tracking-down where\n * deprecated methods/properties/classes are being used within the code.\n * @memberof utils\n * @ignore\n * @function deprecation\n * @param {string} version - The version where the feature became deprecated\n * @param {string} message - Message should include what is deprecated, where, and the new solution\n * @param {number} [ignoreDepth=3] - The number of steps to ignore at the top of the error stack\n * this is mostly to ignore internal deprecation calls.\n */\nexport function deprecation(version: string, message: string, ignoreDepth = 3): void\n{\n // Ignore duplicat\n if (warnings[message])\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('PixiJS Deprecation Warning: ', `${message}\\nDeprecated since v${version}`);\n }\n else\n {\n // chop off the stack trace which includes PixiJS internal calls\n stack = stack.split('\\n').splice(ignoreDepth).join('\\n');\n\n if (console.groupCollapsed)\n {\n console.groupCollapsed(\n '%cPixiJS Deprecation Warning: %c%s',\n 'color:#614108;background:#fffbe6',\n 'font-weight:normal;color:#614108;background:#fffbe6',\n `${message}\\nDeprecated since v${version}`\n );\n console.warn(stack);\n console.groupEnd();\n }\n else\n {\n console.warn('PixiJS Deprecation Warning: ', `${message}\\nDeprecated since v${version}`);\n console.warn(stack);\n }\n }\n /* eslint-enable no-console */\n\n warnings[message] = true;\n}\n","/**\n * A generic class for managing a pool of items.\n * @template T The type of items in the pool. Must implement {@link utils.PoolItem}.\n * @memberof utils\n */\nexport class Pool\n{\n public readonly _classType: PoolItemConstructor;\n private readonly _pool: T[] = [];\n private _count = 0;\n private _index = 0;\n\n /**\n * Constructs a new Pool.\n * @param ClassType - The constructor of the items in the pool.\n * @param {number} [initialSize] - The initial size of the pool.\n */\n constructor(ClassType: PoolItemConstructor, initialSize?: number)\n {\n this._classType = ClassType;\n\n if (initialSize)\n {\n this.prepopulate(initialSize);\n }\n }\n\n /**\n * Prepopulates the pool with a given number of items.\n * @param total - The number of items to add to the pool.\n */\n public prepopulate(total: number): void\n {\n for (let i = 0; i < total; i++)\n {\n this._pool[this._index++] = new this._classType();\n }\n\n this._count += total;\n }\n\n /**\n * Gets an item from the pool. Calls the item's `init` method if it exists.\n * If there are no items left in the pool, a new one will be created.\n * @param {unknown} [data] - Optional data to pass to the item's constructor.\n * @returns {T} The item from the pool.\n */\n public get(data?: unknown): T\n {\n let item;\n\n if (this._index > 0)\n {\n item = this._pool[--this._index];\n }\n else\n {\n item = new this._classType();\n }\n\n item.init?.(data);\n\n return item;\n }\n\n /**\n * Returns an item to the pool. Calls the item's `reset` method if it exists.\n * @param {T} item - The item to return to the pool.\n */\n public return(item: T): void\n {\n item.reset?.();\n\n this._pool[this._index++] = item;\n }\n\n /**\n * Gets the number of items in the pool.\n * @readonly\n * @member {number}\n */\n get totalSize(): number\n {\n return this._count;\n }\n\n /**\n * Gets the number of items in the pool that are free to use without needing to create more.\n * @readonly\n * @member {number}\n */\n get totalFree(): number\n {\n return this._index;\n }\n\n /**\n * Gets the number of items in the pool that are currently in use.\n * @readonly\n * @member {number}\n */\n get totalUsed(): number\n {\n return this._count - this._index;\n }\n}\n\n/**\n * An object that can be stored in a {@link utils.Pool}.\n * @memberof utils\n */\nexport type PoolItem = {\n init?: (data?: any) => void;\n reset?: () => void;\n [key: string]: any;\n};\n\n/**\n * The constructor of an object that can be stored in a {@link utils.Pool}.\n * @typeParam K - The type of the object that can be stored in a {@link utils.Pool}.\n * @memberof utils\n */\nexport type PoolItemConstructor = new () => K;\n","import { Pool } from './Pool';\n\nimport type { PoolItem, PoolItemConstructor } from './Pool';\n\n/**\n * A type alias for a constructor of a Pool.\n * @template T The type of items in the pool. Must extend PoolItem.\n * @memberof utils\n */\nexport type PoolConstructor = new () => Pool;\n\n/**\n * A group of pools that can be used to store objects of different types.\n * @memberof utils\n */\nexport class PoolGroupClass\n{\n /**\n * A map to store the pools by their class type.\n * @private\n */\n private readonly _poolsByClass: Map, Pool> = new Map();\n\n /**\n * Prepopulates a specific pool with a given number of items.\n * @template T The type of items in the pool. Must extend PoolItem.\n * @param {PoolItemConstructor} Class - The constructor of the items in the pool.\n * @param {number} total - The number of items to add to the pool.\n */\n public prepopulate(Class: PoolItemConstructor, total: number): void\n {\n const classPool = this.getPool(Class);\n\n classPool.prepopulate(total);\n }\n\n /**\n * Gets an item from a specific pool.\n * @template T The type of items in the pool. Must extend PoolItem.\n * @param {PoolItemConstructor} Class - The constructor of the items in the pool.\n * @param {unknown} [data] - Optional data to pass to the item's constructor.\n * @returns {T} The item from the pool.\n */\n public get(Class: PoolItemConstructor, data?: unknown): T\n {\n const pool = this.getPool(Class);\n\n return pool.get(data) as T;\n }\n\n /**\n * Returns an item to its respective pool.\n * @param {PoolItem} item - The item to return to the pool.\n */\n public return(item: PoolItem): void\n {\n const pool = this.getPool(item.constructor as PoolItemConstructor);\n\n pool.return(item);\n }\n\n /**\n * Gets a specific pool based on the class type.\n * @template T The type of items in the pool. Must extend PoolItem.\n * @param {PoolItemConstructor} ClassType - The constructor of the items in the pool.\n * @returns {Pool} The pool of the given class type.\n */\n public getPool(ClassType: PoolItemConstructor): Pool\n {\n if (!this._poolsByClass.has(ClassType))\n {\n this._poolsByClass.set(ClassType, new Pool(ClassType));\n }\n\n return this._poolsByClass.get(ClassType) as Pool;\n }\n\n /** gets the usage stats of each pool in the system */\n public stats(): Record\n {\n const stats = {} as Record;\n\n this._poolsByClass.forEach((pool) =>\n {\n // TODO: maybe we should allow the name to be set when `createEntity` is called\n const name = stats[pool._classType.name]\n ? pool._classType.name + (pool._classType as any).ID : pool._classType.name;\n\n stats[name] = {\n free: pool.totalFree,\n used: pool.totalUsed,\n size: pool.totalSize,\n };\n });\n\n return stats;\n }\n}\n\nexport const BigPool = new PoolGroupClass();\n","/**\n * Remove items from a javascript array without generating garbage\n * @function removeItems\n * @memberof utils\n * @param {Array} arr - Array to remove elements from\n * @param {number} startIdx - starting index\n * @param {number} removeCount - how many to remove\n */\nexport function removeItems(arr: any[], startIdx: number, removeCount: number): void\n{\n const length = arr.length;\n let i;\n\n if (startIdx >= length || removeCount === 0)\n {\n return;\n }\n\n removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount);\n\n const len = length - removeCount;\n\n for (i = startIdx; i < len; ++i)\n {\n arr[i] = arr[i + removeCount];\n }\n\n arr.length = len;\n}\n","import { removeItems } from '../../../utils/data/removeItems';\nimport { deprecation, v8_0_0 } from '../../../utils/logging/deprecation';\n\nimport type { Container, ContainerChild } from '../Container';\n\nexport interface ChildrenHelperMixin\n{\n allowChildren: boolean;\n addChild(...children: U): U[0];\n removeChild(...children: U): U[0];\n removeChildren(beginIndex?: number, endIndex?: number): C[];\n removeChildAt(index: number): U;\n getChildAt(index: number): U;\n setChildIndex(child: C, index: number): void;\n getChildIndex(child: C): number;\n addChildAt(child: U, index: number): U;\n swapChildren(child: U, child2: U): void;\n removeFromParent(): void;\n\n reparentChild(...child: U): U[0];\n reparentChildAt(child: U, index: number): U;\n}\n\nexport const childrenHelperMixin: Partial = {\n\n allowChildren: true,\n\n /**\n * Removes all children from this container that are within the begin and end indexes.\n * @param beginIndex - The beginning position.\n * @param endIndex - The ending position. Default value is size of the container.\n * @returns - List of removed children\n * @memberof scene.Container#\n */\n removeChildren(beginIndex = 0, endIndex?: number): ContainerChild[]\n {\n const end = endIndex ?? this.children.length;\n const range = end - beginIndex;\n const removed: ContainerChild[] = [];\n\n if (range > 0 && range <= end)\n {\n for (let i = end - 1; i >= beginIndex; i--)\n {\n const child = this.children[i];\n\n if (!child) continue;\n removed.push(child);\n child.parent = null;\n }\n\n removeItems(this.children, beginIndex, end);\n\n const renderGroup = this.renderGroup || this.parentRenderGroup;\n\n if (renderGroup)\n {\n renderGroup.removeChildren(removed);\n }\n\n for (let i = 0; i < removed.length; ++i)\n {\n this.emit('childRemoved', removed[i], this, i);\n removed[i].emit('removed', this);\n }\n\n return removed;\n }\n else if (range === 0 && this.children.length === 0)\n {\n return removed;\n }\n\n throw new RangeError('removeChildren: numeric values are outside the acceptable range.');\n },\n\n /**\n * Removes a child from the specified index position.\n * @param index - The index to get the child from\n * @returns The child that was removed.\n * @memberof scene.Container#\n */\n removeChildAt(index: number): U\n {\n const child = this.getChildAt(index);\n\n return this.removeChild(child);\n },\n\n /**\n * Returns the child at the specified index\n * @param index - The index to get the child at\n * @returns - The child at the given index, if any.\n * @memberof scene.Container#\n */\n getChildAt(index: number): U\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] as U;\n },\n\n /**\n * Changes the position of an existing child in the container container\n * @param child - The child Container instance for which you want to change the index number\n * @param index - The resulting index number for the child container\n * @memberof scene.Container#\n */\n setChildIndex(child: ContainerChild, index: number): void\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 this.getChildIndex(child); // check if child exists\n this.addChildAt(child, index);\n },\n\n /**\n * Returns the index position of a child Container instance\n * @param child - The Container instance to identify\n * @returns - The index position of the child container to identify\n * @memberof scene.Container#\n */\n getChildIndex(child: ContainerChild): number\n {\n const index = this.children.indexOf(child);\n\n if (index === -1)\n {\n throw new Error('The supplied Container must be a child of the caller');\n }\n\n return index;\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 * If the child is already in this container, it will be moved to the specified index.\n * @param {Container} child - The child to add.\n * @param {number} index - The absolute index where the child will be positioned at the end of the operation.\n * @returns {Container} The child that was added.\n * @memberof scene.Container#\n */\n addChildAt(child: U, index: number): U\n {\n // #if _DEBUG\n if (!this.allowChildren)\n {\n deprecation(v8_0_0, 'addChildAt: Only Containers will be allowed to add children in v8.0.0');\n }\n // #endif\n\n const { children } = this;\n\n if (index < 0 || index > children.length)\n {\n throw new Error(`${child}addChildAt: The index ${index} supplied is out of bounds ${children.length}`);\n }\n\n // TODO - check if child is already in the list?\n // we should be able to optimise this!\n\n if (child.parent)\n {\n const currentIndex = child.parent.children.indexOf(child);\n\n // If this child is in the container and in the same position, do nothing\n if (child.parent === this && currentIndex === index)\n {\n return child;\n }\n\n if (currentIndex !== -1)\n {\n child.parent.children.splice(currentIndex, 1);\n }\n }\n\n if (index === children.length)\n {\n children.push(child);\n }\n else\n {\n children.splice(index, 0, child);\n }\n\n child.parent = this;\n child.didChange = true;\n child.didViewUpdate = false;\n child._updateFlags = 0b1111;\n\n const renderGroup = this.renderGroup || this.parentRenderGroup;\n\n if (renderGroup)\n {\n renderGroup.addChild(child);\n }\n\n if (this.sortableChildren) this.sortDirty = true;\n\n this.emit('childAdded', child, this, index);\n child.emit('added', this);\n\n return child;\n },\n /**\n * Swaps the position of 2 Containers within this container.\n * @param child - First container to swap\n * @param child2 - Second container to swap\n */\n swapChildren(child: U, child2: U): void\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\n const renderGroup = this.renderGroup || this.parentRenderGroup;\n\n if (renderGroup)\n {\n renderGroup.structureDidChange = true;\n }\n\n this._didChangeId++;\n },\n /**\n * Remove the Container from its parent Container. If the Container has no parent, do nothing.\n * @memberof scene.Container#\n */\n removeFromParent()\n {\n this.parent?.removeChild(this);\n },\n\n /**\n * Reparent the child to this container, keeping the same worldTransform.\n * @param child - The child to reparent\n * @returns The first child that was reparented.\n * @memberof scene.Container#\n */\n reparentChild(...child: U): U[0]\n {\n if (child.length === 1)\n {\n return this.reparentChildAt(child[0], this.children.length);\n }\n\n child.forEach((c) => this.reparentChildAt(c, this.children.length));\n\n return child[0];\n },\n\n /**\n * Reparent the child to this container at the specified index, keeping the same worldTransform.\n * @param child - The child to reparent\n * @param index - The index to reparent the child to\n * @memberof scene.Container#\n */\n reparentChildAt(child: U, index: number): U\n {\n if (child.parent === this)\n {\n this.setChildIndex(child, index);\n\n return child;\n }\n\n const childMat = child.worldTransform.clone();\n\n child.removeFromParent();\n this.addChildAt(child, index);\n\n const newMatrix = this.worldTransform.clone();\n\n newMatrix.invert();\n childMat.prepend(newMatrix);\n\n child.setFromMatrix(childMat);\n\n return child;\n }\n} as Container;\n","import type { Rectangle } from '../maths/shapes/Rectangle';\nimport type { Effect } from '../scene/container/Effect';\nimport type { Filter } from './Filter';\n\n/**\n * A filter effect is an effect that can be applied to a container that involves applying special pixel effects\n * to that container as it is rendered. Used internally when the filters property is modified on a container\n */\nexport class FilterEffect implements Effect\n{\n /** read only filters array - to modify, set it again! */\n public filters: readonly Filter[];\n /**\n * If specified, rather than calculating the bounds of the container that the filter\n * will apply to, we use this rect instead. This is a local rect - so will have the containers transform\n * applied to it\n */\n public filterArea?: Rectangle;\n\n /** the pipe that knows how to handle this effect */\n public pipe = 'filter';\n /** the priority of this effect */\n public priority = 1;\n\n public destroy(): void\n {\n for (let i = 0; i < this.filters.length; i++)\n {\n this.filters[i].destroy();\n }\n\n this.filters = null;\n this.filterArea = null;\n }\n}\n","import { extensions, ExtensionType } from '../../extensions/Extensions';\nimport { BigPool } from '../../utils/pool/PoolGroup';\n\nimport type { Effect, EffectConstructor } from '../../scene/container/Effect';\nimport type { PoolItem, PoolItemConstructor } from '../../utils/pool/Pool';\n\ninterface MaskConversionTest\n{\n test: (item: any) => boolean;\n maskClass: new (item: any) => Effect & PoolItem;\n}\n\nexport type MaskEffect = {mask: unknown} & Effect;\n\n/**\n * A class that manages the conversion of masks to mask effects.\n * @memberof rendering\n * @ignore\n */\nexport class MaskEffectManagerClass\n{\n /**\n * @private\n */\n public readonly _effectClasses: EffectConstructor[] = [];\n private readonly _tests: MaskConversionTest[] = [];\n private _initialized = false;\n\n public init()\n {\n if (this._initialized) return;\n\n this._initialized = true;\n\n this._effectClasses.forEach((test) =>\n {\n this.add({\n test: test.test,\n maskClass: test\n });\n });\n }\n\n public add(test: MaskConversionTest)\n {\n this._tests.push(test);\n }\n\n public getMaskEffect(item: any): MaskEffect\n {\n if (!this._initialized) this.init();\n\n for (let i = 0; i < this._tests.length; i++)\n {\n const test = this._tests[i];\n\n if (test.test(item))\n {\n return BigPool.get(test.maskClass as PoolItemConstructor, item);\n }\n }\n\n return item;\n }\n\n public returnMaskEffect(effect: Effect & PoolItem)\n {\n BigPool.return(effect);\n }\n}\n\nexport const MaskEffectManager = new MaskEffectManagerClass();\n\n// Handle registration of extensions\nextensions\n .handleByList(ExtensionType.MaskEffect, MaskEffectManager._effectClasses);\n","import { FilterEffect } from '../../../filters/FilterEffect';\nimport { MaskEffectManager } from '../../../rendering/mask/MaskEffectManager';\n\nimport type { Filter } from '../../../filters/Filter';\nimport type { Rectangle } from '../../../maths/shapes/Rectangle';\nimport type { MaskEffect } from '../../../rendering/mask/MaskEffectManager';\nimport type { Container } from '../Container';\nimport type { Effect } from '../Effect';\n\nexport interface EffectsMixinConstructor\n{\n mask?: number | Container | null;\n filters?: Filter | Filter[];\n}\nexport interface EffectsMixin extends Required\n{\n _maskEffect?: MaskEffect;\n _filterEffect?: FilterEffect,\n\n filterArea?: Rectangle,\n effects?: Effect[];\n\n addEffect(effect: Effect): void;\n removeEffect(effect: Effect): void;\n}\n\nexport const effectsMixin: Partial = {\n _maskEffect: null,\n _filterEffect: null,\n\n /**\n * @todo Needs docs.\n * @memberof scene.Container#\n * @type {Array}\n */\n effects: [],\n\n /**\n * @todo Needs docs.\n * @param effect - The effect to add.\n * @memberof scene.Container#\n * @ignore\n */\n addEffect(effect: Effect)\n {\n const index = this.effects.indexOf(effect);\n\n if (index !== -1) return; // already exists!\n\n this.effects.push(effect);\n\n this.effects.sort((a, b) => a.priority - b.priority);\n\n const renderGroup = this.renderGroup || this.parentRenderGroup;\n\n if (renderGroup)\n {\n renderGroup.structureDidChange = true;\n }\n\n // if (this.renderGroup)\n // {\n // this.renderGroup.structureDidChange = true;\n // }\n\n this._updateIsSimple();\n },\n /**\n * @todo Needs docs.\n * @param effect - The effect to remove.\n * @memberof scene.Container#\n * @ignore\n */\n removeEffect(effect: Effect)\n {\n const index = this.effects.indexOf(effect);\n\n if (index === -1) return; // already exists!\n\n this.effects.splice(index, 1);\n\n if (this.parentRenderGroup)\n {\n this.parentRenderGroup.structureDidChange = true;\n }\n\n this._updateIsSimple();\n },\n\n set mask(value: number | Container | null)\n {\n const effect = this._maskEffect;\n\n if (effect?.mask === value) return;\n\n if (effect)\n {\n this.removeEffect(effect);\n\n MaskEffectManager.returnMaskEffect(effect);\n\n this._maskEffect = null;\n }\n\n if (value === null || value === undefined) return;\n\n this._maskEffect = MaskEffectManager.getMaskEffect(value);\n\n this.addEffect(this._maskEffect);\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 PixiJS a regular mask must be a\n * {@link Graphics} or a {@link Sprite} object. This allows for much faster masking in canvas as it\n * utilities shape clipping. Furthermore, a mask of an object must be in the subtree of its parent.\n * Otherwise, `getLocalBounds` may calculate incorrect bounds, which makes the container's width and height wrong.\n * To remove a mask, set this property to `null`.\n *\n * For sprite mask both alpha and red channel are used. Black mask is the same as transparent mask.\n * @example\n * import { Graphics, Sprite } from 'pixi.js';\n *\n * const graphics = new Graphics();\n * graphics.beginFill(0xFF3300);\n * graphics.drawRect(50, 250, 100, 100);\n * graphics.endFill();\n *\n * const sprite = new Sprite(texture);\n * sprite.mask = graphics;\n * @memberof scene.Container#\n */\n get mask(): unknown\n {\n return this._maskEffect?.mask;\n },\n\n set filters(value: Filter | Filter[] | null | undefined)\n {\n if (!Array.isArray(value) && value) value = [value];\n\n const effect = this._filterEffect ||= new FilterEffect();\n\n // Ignore the Filter type\n value = value as Filter[] | null | undefined;\n\n const hasFilters = value?.length > 0;\n const hadFilters = effect.filters?.length > 0;\n\n const didChange = hasFilters !== hadFilters;\n\n // Clone the filters array so we don't freeze the user-input\n value = Array.isArray(value) ? value.slice(0) : value;\n\n // Ensure filters are immutable via filters getter\n effect.filters = Object.freeze(value);\n\n if (didChange)\n {\n if (hasFilters)\n {\n this.addEffect(effect);\n }\n else\n {\n this.removeEffect(effect);\n\n // sets the empty array...\n effect.filters = value ?? null;\n }\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 * @memberof scene.Container#\n */\n get filters(): readonly Filter[]\n {\n return this._filterEffect?.filters;\n },\n\n set filterArea(value: Rectangle)\n {\n this._filterEffect ||= new FilterEffect();\n\n this._filterEffect.filterArea = value;\n },\n\n /**\n * The area the filter is applied to. This is used as more of an optimization\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 * @memberof scene.Container#\n */\n get filterArea(): Rectangle\n {\n return this._filterEffect?.filterArea;\n },\n\n} as Container;\n","import { deprecation, v8_0_0 } from '../../../utils/logging/deprecation';\n\nimport type { Container } from '../Container';\n\nexport interface FindMixinConstructor\n{\n label?: string;\n}\nexport interface FindMixin extends Required\n{\n /**\n * @deprecated since 8.0.0\n * @see Container#label\n */\n name: string;\n getChildByName(label: RegExp | string, deep?: boolean): Container | null;\n getChildByLabel(label: RegExp | string, deep?: boolean): Container | null;\n getChildrenByLabel(label: RegExp | string, deep?: boolean, out?: Container[]): Container[];\n}\n\nexport const findMixin: Partial = {\n /**\n * The instance label of the object.\n * @memberof scene.Container#\n * @member {string} label\n */\n label: null,\n\n /**\n * The instance name of the object.\n * @deprecated since 8.0.0\n * @see scene.Container#label\n * @member {string} name\n * @memberof scene.Container#\n */\n get name(): string\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Container.name property has been removed, use Container.label instead');\n // #endif\n\n return this.label;\n },\n set name(value: string)\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Container.name property has been removed, use Container.label instead');\n // #endif\n\n this.label = value;\n },\n\n /**\n * @method getChildByName\n * @deprecated since 8.0.0\n * @param {string} name - Instance name.\n * @param {boolean}[deep=false] - Whether to search recursively\n * @returns {Container} The child with the specified name.\n * @see scene.Container#getChildByLabel\n * @memberof scene.Container#\n */\n getChildByName(name: string, deep = false): Container | null\n {\n return this.getChildByLabel(name, deep);\n },\n /**\n * Returns the first child in the container with the specified label.\n *\n * Recursive searches are done in a pre-order traversal.\n * @memberof scene.Container#\n * @param {string|RegExp} label - Instance label.\n * @param {boolean}[deep=false] - Whether to search recursively\n * @returns {Container} The child with the specified label.\n */\n getChildByLabel(label: string | RegExp, deep = false): Container | null\n {\n const children = this.children;\n\n for (let i = 0; i < children.length; i++)\n {\n const child = children[i];\n\n if (child.label === label || (label instanceof RegExp && label.test(child.label))) return child;\n }\n\n if (deep)\n {\n for (let i = 0; i < children.length; i++)\n {\n const child = children[i];\n const found = child.getChildByLabel(label, true);\n\n if (found)\n {\n return found;\n }\n }\n }\n\n return null;\n },\n\n /**\n * Returns all children in the container with the specified label.\n * @memberof scene.Container#\n * @param {string|RegExp} label - Instance label.\n * @param {boolean}[deep=false] - Whether to search recursively\n * @param {Container[]} [out=[]] - The array to store matching children in.\n * @returns {Container[]} An array of children with the specified label.\n */\n getChildrenByLabel(label: string | RegExp, deep = false, out = []): Container[]\n {\n const children = this.children;\n\n for (let i = 0; i < children.length; i++)\n {\n const child = children[i];\n\n if (child.label === label || (label instanceof RegExp && label.test(child.label)))\n {\n out.push(child);\n }\n }\n\n if (deep)\n {\n for (let i = 0; i < children.length; i++)\n {\n children[i].getChildrenByLabel(label, true, out);\n }\n }\n\n return out;\n },\n} as Container;\n","// import { SHAPES } from '../const';\nimport { Point } from '../point/Point';\n\nimport type { Bounds } from '../../scene/container/bounds/Bounds';\nimport type { Matrix } from '../matrix/Matrix';\nimport type { SHAPE_PRIMITIVE } from '../misc/const';\nimport type { ShapePrimitive } from './ShapePrimitive';\n\nconst tempPoints = [new Point(), new Point(), new Point(), new Point()];\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface Rectangle extends PixiMixins.Rectangle { }\n\n/**\n * The `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 * It also provides convenience methods to get and set the position and size of the rectangle such as\n * {@link maths.Rectangle#bottom|bottom}, {@link maths.Rectangle#right|right} and {@link maths.Rectangle#isEmpty|isEmpty}.\n * @memberof maths\n */\nexport class Rectangle implements ShapePrimitive\n{\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n * @default 'rectangle'\n */\n public readonly type: SHAPE_PRIMITIVE = 'rectangle';\n\n /**\n * The X coordinate of the upper-left corner of the rectangle\n * @default 0\n */\n public x: number;\n\n /**\n * The Y coordinate of the upper-left corner of the rectangle\n * @default 0\n */\n public y: number;\n\n /**\n * The overall width of this rectangle\n * @default 0\n */\n public width: number;\n\n /**\n * The overall height of this rectangle\n * @default 0\n */\n public height: number;\n\n /**\n * @param x - The X coordinate of the upper-left corner of the rectangle\n * @param y - The Y coordinate of the upper-left corner of the rectangle\n * @param width - The overall width of the rectangle\n * @param height - The overall height of the rectangle\n */\n constructor(x: string | number = 0, y: string | number = 0, width: string | number = 0, height: string | number = 0)\n {\n this.x = Number(x);\n this.y = Number(y);\n this.width = Number(width);\n this.height = Number(height);\n }\n\n /** Returns the left edge of the rectangle. */\n get left(): number\n {\n return this.x;\n }\n\n /** Returns the right edge of the rectangle. */\n get right(): number\n {\n return this.x + this.width;\n }\n\n /** Returns the top edge of the rectangle. */\n get top(): number\n {\n return this.y;\n }\n\n /** Returns the bottom edge of the rectangle. */\n get bottom(): number\n {\n return this.y + this.height;\n }\n\n /** Determines whether the Rectangle is empty. */\n public isEmpty(): boolean\n {\n return this.left === this.right || this.top === this.bottom;\n }\n\n /** A constant empty rectangle. This is a new object every time the property is accessed */\n static get EMPTY(): Rectangle\n {\n return new Rectangle(0, 0, 0, 0);\n }\n\n /**\n * Creates a clone of this Rectangle\n * @returns a copy of the rectangle\n */\n public clone(): Rectangle\n {\n return new Rectangle(this.x, this.y, this.width, this.height);\n }\n\n /**\n * Converts a Bounds object to a Rectangle object.\n * @param bounds - The bounds to copy and convert to a rectangle.\n * @returns Returns itself.\n */\n public copyFromBounds(bounds: Bounds): this\n {\n this.x = bounds.minX;\n this.y = bounds.minY;\n this.width = bounds.maxX - bounds.minX;\n this.height = bounds.maxY - bounds.minY;\n\n return this;\n }\n\n /**\n * Copies another rectangle to this one.\n * @param rectangle - The rectangle to copy from.\n * @returns Returns itself.\n */\n public copyFrom(rectangle: Rectangle): 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 * Copies this rectangle to another one.\n * @param rectangle - The rectangle to copy to.\n * @returns Returns given parameter.\n */\n public copyTo(rectangle: Rectangle): Rectangle\n {\n rectangle.copyFrom(this);\n\n return rectangle;\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this Rectangle\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @returns Whether the x/y coordinates are within this Rectangle\n */\n public contains(x: number, y: number): boolean\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 * Checks whether the x and y coordinates given are contained within this rectangle including the stroke.\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @param strokeWidth - The width of the line to check\n * @returns Whether the x/y coordinates are within this rectangle\n */\n public strokeContains(x: number, y: number, strokeWidth: number): boolean\n {\n const { width, height } = this;\n\n if (width <= 0 || height <= 0) return false;\n\n const _x = this.x;\n const _y = this.y;\n\n const outerLeft = _x - (strokeWidth / 2);\n const outerRight = _x + width + (strokeWidth / 2);\n const outerTop = _y - (strokeWidth / 2);\n const outerBottom = _y + height + (strokeWidth / 2);\n const innerLeft = _x + (strokeWidth / 2);\n const innerRight = _x + width - (strokeWidth / 2);\n const innerTop = _y + (strokeWidth / 2);\n const innerBottom = _y + height - (strokeWidth / 2);\n\n return (x >= outerLeft && x <= outerRight && y >= outerTop && y <= outerBottom)\n && !(x > innerLeft && x < innerRight && y > innerTop && y < innerBottom);\n }\n /**\n * Determines whether the `other` Rectangle transformed by `transform` intersects with `this` Rectangle object.\n * Returns true only if the area of the intersection is >0, this means that Rectangles\n * sharing a side are not overlapping. Another side effect is that an arealess rectangle\n * (width or height equal to zero) can't intersect any other rectangle.\n * @param {Rectangle} other - The Rectangle to intersect with `this`.\n * @param {Matrix} transform - The transformation matrix of `other`.\n * @returns {boolean} A value of `true` if the transformed `other` Rectangle intersects with `this`; otherwise `false`.\n */\n public intersects(other: Rectangle, transform?: Matrix): boolean\n {\n if (!transform)\n {\n const x0 = this.x < other.x ? other.x : this.x;\n const x1 = this.right > other.right ? other.right : this.right;\n\n if (x1 <= x0)\n {\n return false;\n }\n\n const y0 = this.y < other.y ? other.y : this.y;\n const y1 = this.bottom > other.bottom ? other.bottom : this.bottom;\n\n return y1 > y0;\n }\n\n const x0 = this.left;\n const x1 = this.right;\n const y0 = this.top;\n const y1 = this.bottom;\n\n if (x1 <= x0 || y1 <= y0)\n {\n return false;\n }\n\n const lt = tempPoints[0].set(other.left, other.top);\n const lb = tempPoints[1].set(other.left, other.bottom);\n const rt = tempPoints[2].set(other.right, other.top);\n const rb = tempPoints[3].set(other.right, other.bottom);\n\n if (rt.x <= lt.x || lb.y <= lt.y)\n {\n return false;\n }\n\n const s = Math.sign((transform.a * transform.d) - (transform.b * transform.c));\n\n if (s === 0)\n {\n return false;\n }\n\n transform.apply(lt, lt);\n transform.apply(lb, lb);\n transform.apply(rt, rt);\n transform.apply(rb, rb);\n\n if (Math.max(lt.x, lb.x, rt.x, rb.x) <= x0\n || Math.min(lt.x, lb.x, rt.x, rb.x) >= x1\n || Math.max(lt.y, lb.y, rt.y, rb.y) <= y0\n || Math.min(lt.y, lb.y, rt.y, rb.y) >= y1)\n {\n return false;\n }\n\n const nx = s * (lb.y - lt.y);\n const ny = s * (lt.x - lb.x);\n const n00 = (nx * x0) + (ny * y0);\n const n10 = (nx * x1) + (ny * y0);\n const n01 = (nx * x0) + (ny * y1);\n const n11 = (nx * x1) + (ny * y1);\n\n if (Math.max(n00, n10, n01, n11) <= (nx * lt.x) + (ny * lt.y)\n || Math.min(n00, n10, n01, n11) >= (nx * rb.x) + (ny * rb.y))\n {\n return false;\n }\n\n const mx = s * (lt.y - rt.y);\n const my = s * (rt.x - lt.x);\n const m00 = (mx * x0) + (my * y0);\n const m10 = (mx * x1) + (my * y0);\n const m01 = (mx * x0) + (my * y1);\n const m11 = (mx * x1) + (my * y1);\n\n if (Math.max(m00, m10, m01, m11) <= (mx * lt.x) + (my * lt.y)\n || Math.min(m00, m10, m01, m11) >= (mx * rb.x) + (my * rb.y))\n {\n return false;\n }\n\n return true;\n }\n\n /**\n * Pads the rectangle making it grow in all directions.\n * If paddingY is omitted, both paddingX and paddingY will be set to paddingX.\n * @param paddingX - The horizontal padding amount.\n * @param paddingY - The vertical padding amount.\n * @returns Returns itself.\n */\n public pad(paddingX = 0, paddingY = paddingX): this\n {\n this.x -= paddingX;\n this.y -= paddingY;\n\n this.width += paddingX * 2;\n this.height += paddingY * 2;\n\n return this;\n }\n\n /**\n * Fits this rectangle around the passed one.\n * @param rectangle - The rectangle to fit.\n * @returns Returns itself.\n */\n public fit(rectangle: Rectangle): this\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 return this;\n }\n\n /**\n * Enlarges rectangle that way its corners lie on grid\n * @param resolution - resolution\n * @param eps - precision\n * @returns Returns itself.\n */\n public ceil(resolution = 1, eps = 0.001): this\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 return this;\n }\n\n /**\n * Enlarges this rectangle to include the passed rectangle.\n * @param rectangle - The rectangle to include.\n * @returns Returns itself.\n */\n public enlarge(rectangle: Rectangle): this\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 return this;\n }\n\n /**\n * Returns the framing rectangle of the rectangle as a Rectangle object\n * @param out - optional rectangle to store the result\n * @returns The framing rectangle\n */\n public getBounds(out?: Rectangle): Rectangle\n {\n out = out || new Rectangle();\n out.copyFrom(this);\n\n return out;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`;\n }\n // #endif\n}\n","import { Matrix } from '../../../maths/matrix/Matrix';\nimport { Rectangle } from '../../../maths/shapes/Rectangle';\n\n/**\n * Simple bounds implementation instead of more ambiguous [number, number, number, number]\n * @memberof rendering\n */\nexport interface BoundsData\n{\n minX: number;\n minY: number;\n maxX: number;\n maxY: number;\n}\n\nconst defaultMatrix = new Matrix();\n\n// TODO optimisations\n// 1 - get rectangle could use a dirty flag, rather than setting the data each time is called\n// 2- getFrame ALWAYS assumes a matrix, could be optimised to avoid the matrix calculation if not needed\n\n/**\n * A representation of an AABB bounding box.\n * @memberof rendering\n */\nexport class Bounds\n{\n /** @default Infinity */\n public minX = Infinity;\n\n /** @default Infinity */\n public minY = Infinity;\n\n /** @default -Infinity */\n public maxX = -Infinity;\n\n /** @default -Infinity */\n public maxY = -Infinity;\n\n public matrix = defaultMatrix;\n\n private _rectangle: Rectangle;\n\n constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity)\n {\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n }\n\n /**\n * Checks if bounds are empty.\n * @returns - True if empty.\n */\n public isEmpty(): boolean\n {\n return this.minX > this.maxX || this.minY > this.maxY;\n }\n\n /** The bounding rectangle of the bounds. */\n get rectangle(): Rectangle\n {\n if (!this._rectangle)\n {\n this._rectangle = new Rectangle();\n }\n\n const rectangle = this._rectangle;\n\n if (this.minX > this.maxX || this.minY > this.maxY)\n {\n rectangle.x = 0;\n rectangle.y = 0;\n rectangle.width = 0;\n rectangle.height = 0;\n }\n else\n {\n rectangle.copyFromBounds(this);\n }\n\n return rectangle;\n }\n\n /** Clears the bounds and resets. */\n public clear(): this\n {\n this.minX = Infinity;\n this.minY = Infinity;\n this.maxX = -Infinity;\n this.maxY = -Infinity;\n\n this.matrix = defaultMatrix;\n\n return this;\n }\n\n /**\n * Sets the bounds.\n * @param x0 - left X of frame\n * @param y0 - top Y of frame\n * @param x1 - right X of frame\n * @param y1 - bottom Y of frame\n */\n public set(x0: number, y0: number, x1: number, y1: number)\n {\n this.minX = x0;\n this.minY = y0;\n this.maxX = x1;\n this.maxY = y1;\n }\n\n /**\n * Adds sprite frame\n * @param x0 - left X of frame\n * @param y0 - top Y of frame\n * @param x1 - right X of frame\n * @param y1 - bottom Y of frame\n * @param matrix\n */\n public addFrame(x0: number, y0: number, x1: number, y1: number, matrix?: Matrix): void\n {\n matrix ||= this.matrix;\n\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 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 x = (a * x1) + (c * y0) + tx;\n y = (b * x1) + (d * y0) + ty;\n\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 x = (a * x0) + (c * y1) + tx;\n y = (b * x0) + (d * y1) + ty;\n\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 x = (a * x1) + (c * y1) + tx;\n y = (b * x1) + (d * y1) + ty;\n\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 this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n }\n\n /**\n * Adds a rectangle to the bounds.\n * @param rect - The rectangle to be added.\n * @param matrix - The matrix to apply to the bounds.\n */\n public addRect(rect: Rectangle, matrix?: Matrix)\n {\n this.addFrame(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height, matrix);\n }\n\n /**\n * Adds other {@link Bounds}.\n * @param bounds - The Bounds to be added\n * @param matrix\n */\n public addBounds(bounds: BoundsData, matrix?: Matrix)\n {\n this.addFrame(bounds.minX, bounds.minY, bounds.maxX, bounds.maxY, matrix);\n }\n\n /**\n * Adds other Bounds, masked with Bounds.\n * @param mask - The Bounds to be added.\n */\n public addBoundsMask(mask: Bounds): void\n {\n this.minX = this.minX > mask.minX ? this.minX : mask.minX;\n this.minY = this.minY > mask.minY ? this.minY : mask.minY;\n this.maxX = this.maxX < mask.maxX ? this.maxX : mask.maxX;\n this.maxY = this.maxY < mask.maxY ? this.maxY : mask.maxY;\n }\n\n /**\n * Adds other Bounds, multiplied with matrix.\n * @param matrix - The matrix to apply to the bounds.\n */\n public applyMatrix(matrix: Matrix): void\n {\n const minX = this.minX;\n const minY = this.minY;\n const maxX = this.maxX;\n const maxY = this.maxY;\n\n // multiple bounds by matrix\n const { a, b, c, d, tx, ty } = matrix;\n\n let x = (a * minX) + (c * minY) + tx;\n let y = (b * minX) + (d * minY) + ty;\n\n this.minX = x;\n this.minY = y;\n this.maxX = x;\n this.maxY = y;\n\n x = (a * maxX) + (c * minY) + tx;\n y = (b * maxX) + (d * minY) + ty;\n this.minX = x < this.minX ? x : this.minX;\n this.minY = y < this.minY ? y : this.minY;\n this.maxX = x > this.maxX ? x : this.maxX;\n this.maxY = y > this.maxY ? y : this.maxY;\n\n x = (a * minX) + (c * maxY) + tx;\n y = (b * minX) + (d * maxY) + ty;\n this.minX = x < this.minX ? x : this.minX;\n this.minY = y < this.minY ? y : this.minY;\n this.maxX = x > this.maxX ? x : this.maxX;\n this.maxY = y > this.maxY ? y : this.maxY;\n\n x = (a * maxX) + (c * maxY) + tx;\n y = (b * maxX) + (d * maxY) + ty;\n this.minX = x < this.minX ? x : this.minX;\n this.minY = y < this.minY ? y : this.minY;\n this.maxX = x > this.maxX ? x : this.maxX;\n this.maxY = y > this.maxY ? y : this.maxY;\n }\n\n /**\n * Resizes the bounds object to include the given rectangle.\n * @param rect - The rectangle to be included.\n */\n public fit(rect: Rectangle): this\n {\n if (this.minX < rect.left) this.minX = rect.left;\n if (this.maxX > rect.right) this.maxX = rect.right;\n\n if (this.minY < rect.top) this.minY = rect.top;\n if (this.maxY > rect.bottom) this.maxY = rect.bottom;\n\n return this;\n }\n\n /**\n * Resizes the bounds object to include the given bounds.\n * @param left - The left value of the bounds.\n * @param right - The right value of the bounds.\n * @param top - The top value of the bounds.\n * @param bottom - The bottom value of the bounds.\n */\n public fitBounds(left: number, right: number, top: number, bottom: number): this\n {\n if (this.minX < left) this.minX = left;\n if (this.maxX > right) this.maxX = right;\n\n if (this.minY < top) this.minY = top;\n if (this.maxY > bottom) this.maxY = bottom;\n\n return this;\n }\n\n /**\n * Pads bounds object, making it grow in all directions.\n * If paddingY is omitted, both paddingX and paddingY will be set to paddingX.\n * @param paddingX - The horizontal padding amount.\n * @param paddingY - The vertical padding amount.\n */\n public pad(paddingX: number, paddingY: number = paddingX): this\n {\n this.minX -= paddingX;\n this.maxX += paddingX;\n\n this.minY -= paddingY;\n this.maxY += paddingY;\n\n return this;\n }\n\n /** Ceils the bounds. */\n public ceil(): this\n {\n this.minX = Math.floor(this.minX);\n this.minY = Math.floor(this.minY);\n this.maxX = Math.ceil(this.maxX);\n this.maxY = Math.ceil(this.maxY);\n\n return this;\n }\n\n /** Clones the bounds. */\n public clone(): Bounds\n {\n return new Bounds(this.minX, this.minY, this.maxX, this.maxY);\n }\n\n /**\n * Scales the bounds by the given values\n * @param x - The X value to scale by.\n * @param y - The Y value to scale by.\n */\n public scale(x: number, y: number = x): this\n {\n this.minX *= x;\n this.minY *= y;\n this.maxX *= x;\n this.maxY *= y;\n\n return this;\n }\n\n /** the x value of the bounds. */\n get x(): number\n {\n return this.minX;\n }\n set x(value: number)\n {\n const width = this.maxX - this.minX;\n\n this.minX = value;\n this.maxX = value + width;\n }\n\n /** the y value of the bounds. */\n get y(): number\n {\n return this.minY;\n }\n\n set y(value: number)\n {\n const height = this.maxY - this.minY;\n\n this.minY = value;\n this.maxY = value + height;\n }\n\n /** the width value of the bounds. */\n get width(): number\n {\n return this.maxX - this.minX;\n }\n\n set width(value: number)\n {\n this.maxX = this.minX + value;\n }\n\n /** the height value of the bounds. */\n get height(): number\n {\n return this.maxY - this.minY;\n }\n\n set height(value: number)\n {\n this.maxY = this.minY + value;\n }\n\n /** the left value of the bounds. */\n get left(): number\n {\n return this.minX;\n }\n\n /** the right value of the bounds. */\n get right(): number\n {\n return this.maxX;\n }\n\n /** the top value of the bounds. */\n get top(): number\n {\n return this.minY;\n }\n\n /** the bottom value of the bounds. */\n get bottom(): number\n {\n return this.maxY;\n }\n\n /** Is the bounds positive. */\n get isPositive(): boolean\n {\n return (this.maxX - this.minX > 0) && (this.maxY - this.minY > 0);\n }\n\n get isValid(): boolean\n {\n return (this.minX + this.minY !== Infinity);\n }\n\n /**\n * Adds screen vertices from array\n * @param vertexData - calculated vertices\n * @param beginOffset - begin offset\n * @param endOffset - end offset, excluded\n * @param matrix\n */\n public addVertexData(vertexData: Float32Array, beginOffset: number, endOffset: number, matrix?: Matrix): void\n {\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let maxY = this.maxY;\n\n matrix ||= this.matrix;\n\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 for (let i = beginOffset; i < endOffset; i += 2)\n {\n const localX = vertexData[i];\n const localY = vertexData[i + 1];\n\n const x = (a * localX) + (c * localY) + tx;\n const y = (b * localX) + (d * localY) + 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 * Checks if the point is contained within the bounds.\n * @param x - x coordinate\n * @param y - y coordinate\n */\n public containsPoint(x: number, y: number): boolean\n {\n if (this.minX <= x && this.minY <= y && this.maxX >= x && this.maxY >= y)\n {\n return true;\n }\n\n return false;\n }\n\n public toString(): string\n {\n // eslint-disable-next-line max-len\n return `[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`;\n }\n}\n\n","import { Matrix } from '../../../../maths/matrix/Matrix';\nimport { Pool } from '../../../../utils/pool/Pool';\nimport { Bounds } from '../Bounds';\n\nimport type { PoolItem } from '../../../../utils/pool/Pool';\n\ntype MatrixPoolItem = Matrix & PoolItem;\ntype BoundsPoolItem = Bounds & PoolItem;\nexport const matrixPool = new Pool(Matrix);\nexport const boundsPool = new Pool(Bounds);\n","import { Matrix } from '../../../maths/matrix/Matrix';\nimport { boundsPool, matrixPool } from './utils/matrixAndBoundsPool';\n\nimport type { Renderable } from '../../../rendering/renderers/shared/Renderable';\nimport type { Container } from '../Container';\nimport type { Bounds } from './Bounds';\n\nexport function getGlobalBounds(target: Container, skipUpdateTransform: boolean, bounds: Bounds): Bounds\n{\n bounds.clear();\n\n let parentTransform;\n let pooledMatrix;\n\n if (target.parent)\n {\n if (!skipUpdateTransform)\n {\n pooledMatrix = matrixPool.get().identity();\n parentTransform = updateTransformBackwards(target, pooledMatrix);\n }\n else\n {\n parentTransform = target.parent.worldTransform;\n }\n }\n else\n {\n parentTransform = Matrix.IDENTITY;\n }\n\n // then collect them...\n\n _getGlobalBounds(target, bounds, parentTransform, skipUpdateTransform);\n\n if (pooledMatrix)\n {\n matrixPool.return(pooledMatrix);\n }\n\n if (!bounds.isValid)\n {\n bounds.set(0, 0, 0, 0);\n }\n\n return bounds;\n}\n\nexport function _getGlobalBounds(\n target: Container,\n bounds: Bounds,\n parentTransform: Matrix,\n skipUpdateTransform: boolean,\n): void\n{\n if (!target.visible || !target.measurable) return;\n\n let worldTransform: Matrix;\n\n if (!skipUpdateTransform)\n {\n target.updateLocalTransform();\n\n worldTransform = matrixPool.get();\n\n worldTransform.appendFrom(target.localTransform, parentTransform);\n }\n else\n {\n worldTransform = target.worldTransform;\n }\n\n const parentBounds = bounds;\n const preserveBounds = !!target.effects.length;\n\n if (preserveBounds)\n {\n bounds = boundsPool.get().clear();\n }\n\n if (target.boundsArea)\n {\n bounds.addRect(target.boundsArea, worldTransform);\n }\n else\n {\n if ((target as Renderable).addBounds)\n {\n // save a copy\n bounds.matrix = worldTransform;\n\n (target as Renderable).addBounds(bounds);\n }\n\n for (let i = 0; i < target.children.length; i++)\n {\n _getGlobalBounds(target.children[i], bounds, worldTransform, skipUpdateTransform);\n }\n }\n\n if (preserveBounds)\n {\n for (let i = 0; i < target.effects.length; i++)\n {\n target.effects[i].addBounds?.(bounds);\n }\n\n parentBounds.addBounds(bounds, Matrix.IDENTITY);\n\n boundsPool.return(bounds);\n }\n\n if (!skipUpdateTransform)\n {\n matrixPool.return(worldTransform);\n }\n}\n\nexport function updateTransformBackwards(target: Container, parentTransform: Matrix)\n{\n const parent = target.parent;\n\n if (parent)\n {\n updateTransformBackwards(parent, parentTransform);\n\n parent.updateLocalTransform();\n\n parentTransform.append(parent.localTransform);\n }\n\n return parentTransform;\n}\n","let warnCount = 0;\nconst maxWarnings = 500;\n\n/**\n * Logs a PixiJS warning message to the console. Stops logging after 500 warnings have been logged.\n * @param args - The warning message(s) to log\n * @returns {void}\n * @memberof utils\n * @ignore\n */\nexport function warn(...args: any[])\n{\n if (warnCount === maxWarnings) return;\n\n warnCount++;\n\n if (warnCount === maxWarnings)\n {\n console.warn('PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS.');\n }\n else\n {\n console.warn('PixiJS Warning: ', ...args);\n }\n}\n","import { Matrix } from '../../../maths/matrix/Matrix';\nimport { warn } from '../../../utils/logging/warn';\nimport { boundsPool, matrixPool } from './utils/matrixAndBoundsPool';\n\nimport type { Renderable } from '../../../rendering/renderers/shared/Renderable';\nimport type { Container } from '../Container';\nimport type { Bounds } from './Bounds';\n\nexport function getLocalBounds(target: Container, bounds: Bounds, relativeMatrix?: Matrix): Bounds\n{\n bounds.clear();\n\n relativeMatrix ||= Matrix.IDENTITY;\n\n _getLocalBounds(target, bounds, relativeMatrix, target, true);\n\n if (!bounds.isValid)\n {\n bounds.set(0, 0, 0, 0);\n }\n\n return bounds;\n}\n\nfunction _getLocalBounds(\n target: Container,\n bounds: Bounds,\n parentTransform: Matrix,\n rootContainer: Container,\n isRoot: boolean\n): void\n{\n let relativeTransform: Matrix;\n\n if (!isRoot)\n {\n if (!target.visible || !target.measurable) return;\n\n target.updateLocalTransform();\n\n const localTransform = target.localTransform;\n\n relativeTransform = matrixPool.get();\n relativeTransform.appendFrom(localTransform, parentTransform);\n }\n else\n {\n relativeTransform = matrixPool.get();\n relativeTransform = parentTransform.copyTo(relativeTransform);\n }\n\n const parentBounds = bounds;\n const preserveBounds = !!target.effects.length;\n\n if (preserveBounds)\n {\n bounds = boundsPool.get().clear();\n }\n\n if (target.boundsArea)\n {\n bounds.addRect(target.boundsArea, relativeTransform);\n }\n else\n {\n if (target.renderPipeId)\n {\n bounds.matrix = relativeTransform;\n (target as Renderable).addBounds(bounds);\n }\n\n const children = target.children;\n\n for (let i = 0; i < children.length; i++)\n {\n _getLocalBounds(children[i], bounds, relativeTransform, rootContainer, false);\n }\n }\n\n if (preserveBounds)\n {\n for (let i = 0; i < target.effects.length; i++)\n {\n target.effects[i].addLocalBounds?.(bounds, rootContainer);\n }\n\n // TODO - make a add transformed bounds?\n parentBounds.addBounds(bounds, Matrix.IDENTITY);\n\n boundsPool.return(bounds);\n }\n\n matrixPool.return(relativeTransform);\n}\n\nexport function getParent(target: Container, root: Container, matrix: Matrix)\n{\n const parent = target.parent;\n\n if (!parent)\n {\n // we have reach the top of the tree!\n // #if _DEBUG\n warn('Item is not inside the root container');\n // #endif\n\n return;\n }\n\n if (parent !== root)\n {\n getParent(parent, root, matrix);\n\n parent.updateLocalTransform();\n matrix.append(parent.localTransform);\n }\n}\n\n","import type { Container } from '../Container';\n\n/**\n * This function will crawl through the container essentially check if the children have changed.\n *\n * This function checkChildrenDidChange recursively checks if any child in a Container\n * or its children has changed. It does this by comparing a generated changeId for each\n * child against a stored value in previousData.\n * The changeId is a combination of the child's uid and _didChangeId, bitwise manipulated for uniqueness.\n * If a change is detected, it updates previousData and sets didChange to true.\n * The function returns a boolean indicating if any change was detected in the entire hierarchy of children.\n * @param container - the container to check for changes\n * @param previousData - the previous data from the last check made\n * @param previousData.data - the data array\n * @param previousData.index - the index of the data array\n * @param previousData.didChange - did the data change\n */\nexport function checkChildrenDidChange(\n container: Container,\n previousData: {\n data: number[];\n index: number;\n didChange: boolean;\n })\n{\n const children = container.children;\n\n for (let i = 0; i < children.length; i++)\n {\n const child = children[i];\n\n const changeId = ((child.uid & 255) << 24)\n | (child._didChangeId & 16777215);\n\n if (previousData.data[previousData.index] !== changeId)\n {\n previousData.data[previousData.index] = changeId;\n\n previousData.didChange = true;\n }\n\n previousData.index++;\n\n if (child.children.length)\n {\n checkChildrenDidChange(child, previousData);\n }\n }\n\n return previousData.didChange;\n}\n","import { Matrix } from '../../../maths/matrix/Matrix';\nimport { Bounds } from '../bounds/Bounds';\nimport { getGlobalBounds } from '../bounds/getGlobalBounds';\nimport { getLocalBounds } from '../bounds/getLocalBounds';\nimport { checkChildrenDidChange } from '../utils/checkChildrenDidChange';\n\nimport type { Size } from '../../../maths/misc/Size';\nimport type { Container } from '../Container';\n\nexport type Optional = Omit & Partial>;\n\nexport interface MeasureMixinConstructor\n{\n width?: number;\n height?: number;\n}\nexport interface MeasureMixin extends Required\n{\n getSize(out?: Size): Size;\n setSize(width: number, height?: number): void;\n setSize(value: Optional): void;\n getLocalBounds(bounds?: Bounds): Bounds;\n getBounds(skipUpdate?: boolean, bounds?: Bounds): Bounds;\n _localBoundsCacheData: LocalBoundsCacheData;\n _localBoundsCacheId: number;\n _setWidth(width: number, localWidth: number): void;\n _setHeight(height: number, localHeight: number): void;\n}\n\ninterface LocalBoundsCacheData\n{\n data: number[];\n index: number;\n didChange: boolean;\n localBounds: Bounds;\n}\n\nconst tempMatrix = new Matrix();\n\nexport const measureMixin: Partial = {\n\n _localBoundsCacheId: -1,\n _localBoundsCacheData: null,\n\n _setWidth(value: number, localWidth: number)\n {\n const sign = Math.sign(this.scale.x) || 1;\n\n if (localWidth !== 0)\n {\n this.scale.x = (value / localWidth) * sign;\n }\n else\n {\n this.scale.x = sign;\n }\n },\n\n _setHeight(value: number, localHeight: number)\n {\n const sign = Math.sign(this.scale.y) || 1;\n\n if (localHeight !== 0)\n {\n this.scale.y = (value / localHeight) * sign;\n }\n else\n {\n this.scale.y = sign;\n }\n },\n\n /**\n * Retrieves the local bounds of the container as a Bounds object.\n * @returns - The bounding area.\n * @memberof scene.Container#\n */\n getLocalBounds(): Bounds\n {\n if (!this._localBoundsCacheData)\n {\n this._localBoundsCacheData = {\n data: [],\n index: 1,\n didChange: false,\n localBounds: new Bounds()\n };\n }\n\n const localBoundsCacheData = this._localBoundsCacheData;\n\n localBoundsCacheData.index = 1;\n localBoundsCacheData.didChange = false;\n\n if (localBoundsCacheData.data[0] !== this._didChangeId >> 12)\n {\n localBoundsCacheData.didChange = true;\n localBoundsCacheData.data[0] = this._didChangeId >> 12;\n }\n\n checkChildrenDidChange(this, localBoundsCacheData);\n\n if (localBoundsCacheData.didChange)\n {\n getLocalBounds(this, localBoundsCacheData.localBounds, tempMatrix);\n }\n\n return localBoundsCacheData.localBounds;\n },\n\n /**\n * Calculates and returns the (world) bounds of the display object as a [Rectangle]{@link Rectangle}.\n * @param 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 bounds - Optional bounds to store the result of the bounds calculation.\n * @returns - The minimum axis-aligned rectangle in world space that fits around this object.\n * @memberof scene.Container#\n */\n getBounds(skipUpdate?: boolean, bounds?: Bounds): Bounds\n {\n return getGlobalBounds(this, skipUpdate, bounds || new Bounds());\n },\n} as Container;\n","import type { Container } from '../Container';\n\nexport interface OnRenderMixinConstructor\n{\n onRender?: (() => void | null);\n}\nexport interface OnRenderMixin extends Required\n{\n _onRender: (() => void) | null;\n}\n\nexport const onRenderMixin: Partial = {\n _onRender: null,\n\n set onRender(func: () => void)\n {\n const renderGroup = this.renderGroup || this.parentRenderGroup;\n\n if (!func)\n {\n if (this._onRender)\n {\n renderGroup?.removeOnRender(this);\n }\n\n this._onRender = null;\n\n return;\n }\n\n if (!this._onRender)\n {\n renderGroup?.addOnRender(this);\n }\n\n this._onRender = func;\n },\n\n /**\n * This callback is used when the container is rendered. This is where you should add your custom\n * logic that is needed to be run every frame.\n *\n * In v7 many users used `updateTransform` for this, however the way v8 renders objects is different\n * and \"updateTransform\" is no longer called every frame\n * @example\n * const container = new Container();\n * container.onRender = () => {\n * container.rotation += 0.01;\n * };\n * @memberof scene.Container#\n */\n get onRender(): () => void\n {\n return this._onRender;\n }\n} as Container;\n","import type { Container } from '../Container';\n\nexport interface SortMixinConstructor\n{\n zIndex?: number;\n sortDirty?: boolean;\n sortableChildren?: boolean;\n}\nexport interface SortMixin extends Required\n{\n _zIndex: number;\n\n sortChildren: () => void;\n depthOfChildModified: () => void;\n}\n\nexport const sortMixin: Partial = {\n _zIndex: 0,\n /**\n * Should children be sorted by zIndex at the next render call.\n *\n * Will get automatically set to true if a new child is added, or if a child's zIndex changes.\n * @type {boolean}\n * @memberof scene.Container#\n */\n sortDirty: false,\n /**\n * If set to true, the container will sort its children by `zIndex` value\n * when the next render is called, or manually if `sortChildren()` is called.\n *\n * This actually changes the order of elements in the array, so should be treated\n * as a basic solution that is not performant compared to other solutions,\n * such as {@link https://github.com/pixijs/layers PixiJS Layers}\n *\n * Also be aware of that this may not work nicely with the `addChildAt()` function,\n * as the `zIndex` sorting may cause the child to automatically sorted to another position.\n * @type {boolean}\n * @memberof scene.Container#\n */\n sortableChildren: false,\n\n /**\n * The zIndex of the container.\n *\n * Setting this value, will automatically set the parent to be sortable. Children will be automatically\n * sorted by zIndex value; a higher value will mean it will be moved towards the end of the array,\n * and thus rendered on top of other display objects within the same container.\n * @see scene.Container#sortableChildren\n * @memberof scene.Container#\n */\n get zIndex()\n {\n return this._zIndex;\n },\n\n set zIndex(value: number)\n {\n if (this._zIndex === value) return;\n\n this._zIndex = value;\n\n this.depthOfChildModified();\n },\n\n depthOfChildModified()\n {\n if (this.parent)\n {\n this.parent.sortableChildren = true;\n this.parent.sortDirty = true;\n }\n\n if (this.parentRenderGroup)\n {\n this.parentRenderGroup.structureDidChange = true;\n }\n },\n\n /**\n * Sorts children by zIndex.\n * @memberof scene.Container#\n */\n sortChildren()\n {\n if (!this.sortDirty) return;\n\n this.sortDirty = false;\n\n this.children.sort(sortChildren);\n },\n} as Container;\n\nfunction sortChildren(a: Container, b: Container): number\n{\n return a._zIndex - b._zIndex;\n}\n","import { Matrix } from '../../../maths/matrix/Matrix';\nimport { Point } from '../../../maths/point/Point';\nimport { updateTransformBackwards } from '../bounds/getGlobalBounds';\n\nimport type { PointData } from '../../../maths/point/PointData';\nimport type { Container } from '../Container';\n\nexport interface ToLocalGlobalMixin\n{\n getGlobalPosition(point?: Point, skipUpdate?: boolean): Point;\n toGlobal

(position: PointData, point?: P, skipUpdate?: boolean): P;\n toLocal

(position: PointData, from?: Container, point?: P, skipUpdate?: boolean): P;\n}\n\nexport const toLocalGlobalMixin: Partial = {\n /**\n * Returns the global position of the container.\n * @param point - The optional point to write the global value to.\n * @param skipUpdate - Should we skip the update transform.\n * @returns - The updated point.\n * @memberof scene.Container#\n */\n getGlobalPosition(point: Point = new Point(), skipUpdate = false): Point\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 /**\n * Calculates the global position of the container.\n * @param position - The world origin to calculate from.\n * @param point - A Point object in which to store the value, optional\n * (otherwise will create a new Point).\n * @param skipUpdate - Should we skip the update transform.\n * @returns - A point object representing the position of this object.\n * @memberof scene.Container#\n */\n toGlobal

(position: PointData, point?: P, skipUpdate = false): P\n {\n if (!skipUpdate)\n {\n this.updateLocalTransform();\n\n const globalMatrix = updateTransformBackwards(this, new Matrix());\n\n globalMatrix.append(this.localTransform);\n\n return globalMatrix.apply

(position, point);\n }\n\n // simply apply the matrix..\n return this.worldTransform.apply

(position, point);\n },\n\n /**\n * Calculates the local position of the container relative to another point.\n * @param position - The world origin to calculate from.\n * @param from - The Container to calculate the global position from.\n * @param point - A Point object in which to store the value, optional\n * (otherwise will create a new Point).\n * @param skipUpdate - Should we skip the update transform\n * @returns - A point object representing the position of this object\n * @memberof scene.Container#\n */\n toLocal

(position: PointData, from?: Container, point?: P, skipUpdate?: boolean): P\n {\n if (from)\n {\n position = from.toGlobal(position, point, skipUpdate);\n }\n\n if (!skipUpdate)\n {\n this.updateLocalTransform();\n\n const globalMatrix = updateTransformBackwards(this, new Matrix());\n\n globalMatrix.append(this.localTransform);\n\n return globalMatrix.applyInverse

(position, point);\n }\n\n // simply apply the matrix..\n return this.worldTransform.applyInverse

(position, point);\n }\n} as Container;\n","import { uid } from '../../../../utils/data/uid';\n\nimport type { Instruction } from './Instruction';\n\n/**\n * A set of instructions that can be executed by the renderer.\n * Basically wraps an array, but with some extra properties that help the renderer\n * to keep things nice and optimised.\n *\n * Note:\n * InstructionSet.instructions contains all the instructions, but does not resize (for performance).\n * So for the true length of the instructions you need to use InstructionSet.instructionSize\n * @memberof rendering\n */\nexport class InstructionSet\n{\n /** a unique id for this instruction set used through the renderer */\n public readonly uid = uid('instructionSet');\n /** the array of instructions */\n public readonly instructions: Instruction[] = [];\n /** the actual size of the array (any instructions passed this should be ignored) */\n public instructionSize = 0;\n /** allows for access to the render pipes of the renderer */\n public renderPipes: any;\n\n /** reset the instruction set so it can be reused set size back to 0 */\n public reset()\n {\n this.instructionSize = 0;\n }\n\n /**\n * Add an instruction to the set\n * @param instruction - add an instruction to the set\n */\n public add(instruction: Instruction)\n {\n this.instructions[this.instructionSize++] = instruction;\n }\n\n /**\n * Log the instructions to the console (for debugging)\n * @internal\n * @ignore\n */\n public log()\n {\n this.instructions.length = this.instructionSize;\n // eslint-disable-next-line no-console\n console.table(this.instructions, ['type', 'action']);\n }\n}\n","import { Matrix } from '../../maths/matrix/Matrix';\nimport { InstructionSet } from '../../rendering/renderers/shared/instructions/InstructionSet';\n\nimport type { Instruction } from '../../rendering/renderers/shared/instructions/Instruction';\nimport type { Container } from './Container';\n\n/**\n * A RenderGroup is a class that is responsible for I generating a set of instructions that are used to render the\n * root container and its children. It als watches for any changes in that container or its children,\n * these changes are analysed and either the instruction set is rebuild or the instructions data is updated.\n * @memberof rendering\n */\nexport class RenderGroup implements Instruction\n{\n public renderPipeId = 'renderGroup';\n public root: Container = null;\n\n public canBundle = false;\n\n public renderGroupParent: RenderGroup = null;\n public renderGroupChildren: RenderGroup[] = [];\n\n public worldTransform: Matrix = new Matrix();\n public worldColorAlpha = 0xffffffff;\n public worldColor = 0xffffff;\n public worldAlpha = 1;\n\n // these updates are transform changes..\n public readonly childrenToUpdate: Record = Object.create(null);\n public updateTick = 0;\n\n // these update are renderable changes..\n public readonly childrenRenderablesToUpdate: { list: Container[]; index: number; } = { list: [], index: 0 };\n\n // other\n public structureDidChange = true;\n\n public instructionSet: InstructionSet = new InstructionSet();\n\n private readonly _onRenderContainers: Container[] = [];\n\n public init(root: Container)\n {\n this.root = root;\n\n if (root._onRender) this.addOnRender(root);\n\n root.didChange = true;\n\n const children = root.children;\n\n for (let i = 0; i < children.length; i++)\n {\n this.addChild(children[i]);\n }\n }\n\n public reset()\n {\n this.renderGroupChildren.length = 0;\n\n for (const i in this.childrenToUpdate)\n {\n const childrenAtDepth = this.childrenToUpdate[i];\n\n childrenAtDepth.list.fill(null);\n childrenAtDepth.index = 0;\n }\n\n this.childrenRenderablesToUpdate.index = 0;\n this.childrenRenderablesToUpdate.list.fill(null);\n\n this.root = null;\n this.updateTick = 0;\n this.structureDidChange = true;\n\n this._onRenderContainers.length = 0;\n this.renderGroupParent = null;\n }\n\n get localTransform()\n {\n return this.root.localTransform;\n }\n\n public addRenderGroupChild(renderGroupChild: RenderGroup)\n {\n if (renderGroupChild.renderGroupParent)\n {\n renderGroupChild.renderGroupParent._removeRenderGroupChild(renderGroupChild);\n }\n\n renderGroupChild.renderGroupParent = this;\n\n this.renderGroupChildren.push(renderGroupChild);\n }\n\n private _removeRenderGroupChild(renderGroupChild: RenderGroup)\n {\n const index = this.renderGroupChildren.indexOf(renderGroupChild);\n\n if (index > -1)\n {\n this.renderGroupChildren.splice(index, 1);\n }\n\n renderGroupChild.renderGroupParent = null;\n }\n\n public addChild(child: Container)\n {\n this.structureDidChange = true;\n\n child.parentRenderGroup = this;\n\n child.updateTick = -1;\n\n if (child.parent === this.root)\n {\n child.relativeRenderGroupDepth = 1;\n }\n else\n {\n child.relativeRenderGroupDepth = child.parent.relativeRenderGroupDepth + 1;\n }\n\n child.didChange = true;\n this.onChildUpdate(child);\n\n if (child.renderGroup)\n {\n this.addRenderGroupChild(child.renderGroup);\n\n return;\n }\n\n if (child._onRender) this.addOnRender(child);\n\n const children = child.children;\n\n for (let i = 0; i < children.length; i++)\n {\n this.addChild(children[i]);\n }\n }\n\n public removeChild(child: Container)\n {\n // remove all the children...\n this.structureDidChange = true;\n\n if (child._onRender)\n {\n // Remove the child to the onRender list under the following conditions:\n // 1. If the child is not a render group.\n // 2. If the child is a render group root of this render group - which it can't be removed from in this case.\n if (!child.renderGroup)\n {\n this.removeOnRender(child);\n }\n }\n\n child.parentRenderGroup = null;\n\n if (child.renderGroup)\n {\n this._removeRenderGroupChild(child.renderGroup);\n\n return;\n }\n\n const children = child.children;\n\n for (let i = 0; i < children.length; i++)\n {\n this.removeChild(children[i]);\n }\n }\n\n public removeChildren(children: Container[])\n {\n for (let i = 0; i < children.length; i++)\n {\n this.removeChild(children[i]);\n }\n }\n\n public onChildUpdate(child: Container)\n {\n let childrenToUpdate = this.childrenToUpdate[child.relativeRenderGroupDepth];\n\n if (!childrenToUpdate)\n {\n childrenToUpdate = this.childrenToUpdate[child.relativeRenderGroupDepth] = {\n index: 0,\n list: [],\n };\n }\n\n childrenToUpdate.list[childrenToUpdate.index++] = child;\n }\n\n // SHOULD THIS BE HERE?\n public updateRenderable(container: Container)\n {\n // only update if its visible!\n if (container.globalDisplayStatus < 0b111) return;\n\n container.didViewUpdate = false;\n // actually updates the renderable..\n this.instructionSet.renderPipes[container.renderPipeId].updateRenderable(container);\n }\n\n public onChildViewUpdate(child: Container)\n {\n this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++] = child;\n }\n\n get isRenderable(): boolean\n {\n return (this.root.localDisplayStatus === 0b111 && this.worldAlpha > 0);\n }\n\n /**\n * adding a container to the onRender list will make sure the user function\n * passed in to the user defined 'onRender` callBack\n * @param container - the container to add to the onRender list\n */\n public addOnRender(container: Container)\n {\n this._onRenderContainers.push(container);\n }\n\n public removeOnRender(container: Container)\n {\n this._onRenderContainers.splice(this._onRenderContainers.indexOf(container), 1);\n }\n\n public runOnRender()\n {\n for (let i = 0; i < this._onRenderContainers.length; i++)\n {\n this._onRenderContainers[i]._onRender();\n }\n }\n\n public destroy()\n {\n this.renderGroupParent = null;\n this.root = null;\n (this.childrenRenderablesToUpdate as any) = null;\n (this.childrenToUpdate as any) = null;\n (this.renderGroupChildren as any) = null;\n (this._onRenderContainers as any) = null;\n this.instructionSet = null;\n }\n\n public getChildren(out: Container[] = []): Container[]\n {\n const children = this.root.children;\n\n for (let i = 0; i < children.length; i++)\n {\n this._getChildren(children[i], out);\n }\n\n return out;\n }\n\n private _getChildren(container: Container, out: Container[] = []): Container[]\n {\n out.push(container);\n\n if (container.renderGroup) return out;\n\n const children = container.children;\n\n for (let i = 0; i < children.length; i++)\n {\n this._getChildren(children[i], out);\n }\n\n return out;\n }\n}\n","/**\n * Assigns properties from one object to another, using an optional array of property names to ignore.\n * @param target - The target object to assign properties to.\n * @param options - The object to assign properties from.\n * @param ignore - An object of property names to ignore ({ propToIgnore: true }).\n */\nexport function assignWithIgnore>(\n target: T,\n options: T,\n ignore: Record = {}\n)\n{\n for (const key in options)\n {\n if (!ignore[key] && options[key] !== undefined)\n {\n target[key] = options[key];\n }\n }\n}\n","import EventEmitter from 'eventemitter3';\nimport { Color, type ColorSource } from '../../color/Color';\nimport { cullingMixin } from '../../culling/cullingMixin';\nimport { Matrix } from '../../maths/matrix/Matrix';\nimport { DEG_TO_RAD, RAD_TO_DEG } from '../../maths/misc/const';\nimport { ObservablePoint } from '../../maths/point/ObservablePoint';\nimport { uid } from '../../utils/data/uid';\nimport { deprecation, v8_0_0 } from '../../utils/logging/deprecation';\nimport { BigPool } from '../../utils/pool/PoolGroup';\nimport { childrenHelperMixin } from './container-mixins/childrenHelperMixin';\nimport { effectsMixin } from './container-mixins/effectsMixin';\nimport { findMixin } from './container-mixins/findMixin';\nimport { measureMixin } from './container-mixins/measureMixin';\nimport { onRenderMixin } from './container-mixins/onRenderMixin';\nimport { sortMixin } from './container-mixins/sortMixin';\nimport { toLocalGlobalMixin } from './container-mixins/toLocalGlobalMixin';\nimport { RenderGroup } from './RenderGroup';\nimport { assignWithIgnore } from './utils/assignWithIgnore';\n\nimport type { Size } from '../../maths/misc/Size';\nimport type { PointData } from '../../maths/point/PointData';\nimport type { Rectangle } from '../../maths/shapes/Rectangle';\nimport type { BLEND_MODES } from '../../rendering/renderers/shared/state/const';\nimport type { Dict } from '../../utils/types';\nimport type { Optional } from './container-mixins/measureMixin';\nimport type { DestroyOptions } from './destroyTypes';\n\nexport type ContainerChild = Container;\n\n/**\n * This is where you'll find all the display objects available in Pixi.\n *\n * All display objects inherit from the {@link scene.Container} class. You can use a `Container` for simple grouping of\n * other display objects. Here's all the available display object classes.\n *\n * - {@link scene.Container} is the base class for all display objects that act as a container for other objects.\n * - {@link scene.Sprite} is a display object that uses a texture\n * - {@link scene.AnimatedSprite} is a sprite that can play animations\n * - {@link scene.TilingSprite} a fast way of rendering a tiling image\n * - {@link scene.NineSliceSprite} allows you to stretch a texture using 9-slice scaling\n * - {@link scene.Graphics} is a graphic object that can be drawn to the screen.\n * - {@link scene.Mesh} empowers you to have maximum flexibility to render any kind of visuals you can think of\n * - {@link scene.MeshSimple} mimics Mesh, providing easy-to-use constructor arguments\n * - {@link scene.MeshPlane} allows you to draw a texture across several points and then manipulate these points\n * - {@link scene.MeshRope} allows you to draw a texture across several points and then manipulate these points\n * - {@link scene.Text} render text using custom fonts\n * - {@link scene.BitmapText} render text using a bitmap font\n * - {@link scene.HTMLText} render text using HTML and CSS\n * @namespace scene\n */\n\n// as pivot and skew are the least used properties of a container, we can use this optimisation\n// to avoid allocating lots of unnecessary objects for them.\nconst defaultSkew = new ObservablePoint(null);\nconst defaultPivot = new ObservablePoint(null);\nconst defaultScale = new ObservablePoint(null, 1, 1);\n\nexport interface ContainerEvents extends PixiMixins.ContainerEvents\n{\n added: [container: Container];\n childAdded: [child: C, container: Container, index: number];\n removed: [container: Container];\n childRemoved: [child: C, container: Container, index: number];\n destroyed: [container: Container];\n}\n\ntype AnyEvent = {\n // The following is a hack to allow any custom event while maintaining type safety.\n // For some reason, the tsc compiler gets angry about error TS1023\n // \"An index signature parameter type must be either 'string' or 'number'.\"\n // This is really odd since ({}&string) should interpret as string, but then again\n // there is some black magic behind why this works in the first place.\n // Closest thing to an explanation:\n // https://stackoverflow.com/questions/70144348/why-does-a-union-of-type-literals-and-string-cause-ide-code-completion-wh\n //\n // Side note, we disable @typescript-eslint/ban-types since {}&string is the only syntax that works.\n // Nor of the Record/unknown/never alternatives work.\n // eslint-disable-next-line @typescript-eslint/ban-types\n [K: ({} & string) | ({} & symbol)]: any;\n};\n\nexport const UPDATE_COLOR = 0b0001;\nexport const UPDATE_BLEND = 0b0010;\nexport const UPDATE_VISIBLE = 0b0100;\nexport const UPDATE_TRANSFORM = 0b1000;\n\nexport interface UpdateTransformOptions\n{\n x: number;\n y: number;\n scaleX: number;\n scaleY: number;\n rotation: number;\n skewX: number;\n skewY: number;\n pivotX: number;\n pivotY: number;\n}\n\n/**\n * Constructor options used for `Container` instances.\n * ```js\n * const container = new Container({\n * position: new Point(100, 200),\n * scale: new Point(2, 2),\n * rotation: Math.PI / 2,\n * });\n * ```\n * @memberof scene\n * @see scene.Container\n */\nexport interface ContainerOptions extends PixiMixins.ContainerOptions\n{\n /** @see scene.Container#isRenderGroup */\n isRenderGroup?: boolean;\n\n /** @see scene.Container#blendMode */\n blendMode?: BLEND_MODES;\n /** @see scene.Container#tint */\n tint?: ColorSource;\n\n /** @see scene.Container#alpha */\n alpha?: number;\n /** @see scene.Container#angle */\n angle?: number;\n /** @see scene.Container#children */\n children?: C[];\n /** @see scene.Container#parent */\n parent?: Container;\n /** @see scene.Container#renderable */\n renderable?: boolean;\n /** @see scene.Container#rotation */\n rotation?: number;\n /** @see scene.Container#scale */\n scale?: PointData | number;\n /** @see scene.Container#pivot */\n pivot?: PointData | number;\n /** @see scene.Container#position */\n position?: PointData;\n /** @see scene.Container#skew */\n skew?: PointData;\n /** @see scene.Container#visible */\n visible?: boolean;\n /** @see scene.Container#culled */\n culled?: boolean;\n /** @see scene.Container#x */\n x?: number;\n /** @see scene.Container#y */\n y?: number;\n /** @see scene.Container#boundArea */\n boundsArea?: Rectangle;\n}\n\nexport interface Container\n extends PixiMixins.Container, EventEmitter & AnyEvent> {}\n\n/**\n * Container is a general-purpose display object that holds children. It also adds built-in support for advanced\n * rendering features like masking and filtering.\n *\n * It is the base class of all display objects that act as a container for other objects, including Graphics\n * and Sprite.\n *\n *

\n *\n * Transforms\n *\n * The [transform]{@link scene.Container#transform} of a display object describes the projection from its\n * local coordinate space to its parent's local coordinate space. The following properties are derived\n * from the transform:\n *\n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n *
PropertyDescription
[pivot]{@link scene.Container#pivot}\n * Invariant under rotation, scaling, and skewing. The projection of into the parent's space of the pivot\n * is equal to position, regardless of the other three transformations. In other words, It is the center of\n * rotation, scaling, and skewing.\n *
[position]{@link scene.Container#position}\n * Translation. This is the position of the [pivot]{@link scene.Container#pivot} in the parent's local\n * space. The default value of the pivot is the origin (0,0). If the top-left corner of your display object\n * is (0,0) in its local space, then the position will be its top-left corner in the parent's local space.\n *
[scale]{@link scene.Container#scale}\n * Scaling. This will stretch (or compress) the display object's projection. The scale factors are along the\n * local coordinate axes. In other words, the display object is scaled before rotated or skewed. The center\n * of scaling is the [pivot]{@link scene.Container#pivot}.\n *
[rotation]{@link scene.Container#rotation}\n * Rotation. This will rotate the display object's projection by this angle (in radians).\n *
[skew]{@link scene.Container#skew}\n *

Skewing. This can be used to deform a rectangular display object into a parallelogram.

\n *

\n * In PixiJS, skew has a slightly different behaviour than the conventional meaning. It can be\n * thought of the net rotation applied to the coordinate axes (separately). For example, if \"skew.x\" is\n * ⍺ and \"skew.y\" is β, then the line x = 0 will be rotated by ⍺ (y = -x*cot⍺) and the line y = 0 will be\n * rotated by β (y = x*tanβ). A line y = x*tanϴ (i.e. a line at angle ϴ to the x-axis in local-space) will\n * be rotated by an angle between ⍺ and β.\n *

\n *

\n * It can be observed that if skew is applied equally to both axes, then it will be equivalent to applying\n * a rotation. Indeed, if \"skew.x\" = -ϴ and \"skew.y\" = ϴ, it will produce an equivalent of \"rotation\" = ϴ.\n *

\n *

\n * Another quite interesting observation is that \"skew.x\", \"skew.y\", rotation are commutative operations. Indeed,\n * because rotation is essentially a careful combination of the two.\n *

\n *
[angle]{@link scene.Container#angle}Rotation. This is an alias for [rotation]{@link scene.Container#rotation}, but in degrees.
[x]{@link scene.Container#x}Translation. This is an alias for position.x!
[y]{@link scene.Container#y}Translation. This is an alias for position.y!
[width]{@link scene.Container#width}\n * Implemented in [Container]{@link scene.Container}. Scaling. The width property calculates scale.x by dividing\n * the \"requested\" width by the local bounding box width. It is indirectly an abstraction over scale.x, and there\n * is no concept of user-defined width.\n *
[height]{@link scene.Container#height}\n * Implemented in [Container]{@link scene.Container}. Scaling. The height property calculates scale.y by dividing\n * the \"requested\" height by the local bounding box height. It is indirectly an abstraction over scale.y, and there\n * is no concept of user-defined height.\n *
\n *
\n *\n *
\n * Alpha\n *\n * This alpha sets a display object's **relative opacity** w.r.t its parent. For example, if the alpha of a display\n * object is 0.5 and its parent's alpha is 0.5, then it will be rendered with 25% opacity (assuming alpha is not\n * applied on any ancestor further up the chain).\n *
\n *\n *
\n * Renderable vs Visible\n *\n * The `renderable` and `visible` properties can be used to prevent a display object from being rendered to the\n * screen. However, there is a subtle difference between the two. When using `renderable`, the transforms of the display\n * object (and its children subtree) will continue to be calculated. When using `visible`, the transforms will not\n * be calculated.\n * ```ts\n * import { BlurFilter, Container, Graphics, Sprite } from 'pixi.js';\n *\n * const container = new Container();\n * const sprite = Sprite.from('https://s3-us-west-2.amazonaws.com/s.cdpn.io/693612/IaUrttj.png');\n *\n * sprite.width = 512;\n * sprite.height = 512;\n *\n * // Adds a sprite as a child to this container. As a result, the sprite will be rendered whenever the container\n * // is rendered.\n * container.addChild(sprite);\n *\n * // Blurs whatever is rendered by the container\n * container.filters = [new BlurFilter()];\n *\n * // Only the contents within a circle at the center should be rendered onto the screen.\n * container.mask = new Graphics()\n * .beginFill(0xffffff)\n * .drawCircle(sprite.width / 2, sprite.height / 2, Math.min(sprite.width, sprite.height) / 2)\n * .endFill();\n * ```\n *\n *
\n *\n *
\n * RenderGroup\n *\n * In PixiJS v8, containers can be set to operate in 'render group mode',\n * transforming them into entities akin to a stage in traditional rendering paradigms.\n * A render group is a root renderable entity, similar to a container,\n * but it's rendered in a separate pass with its own unique set of rendering instructions.\n * This approach enhances rendering efficiency and organization, particularly in complex scenes.\n *\n * You can enable render group mode on any container using container.enableRenderGroup()\n * or by initializing a new container with the render group property set to true (new Container({isRenderGroup: true})).\n * The method you choose depends on your specific use case and setup requirements.\n *\n * An important aspect of PixiJS’s rendering process is the automatic treatment of rendered scenes as render groups.\n * This conversion streamlines the rendering process, but understanding when and how this happens is crucial\n * to fully leverage its benefits.\n *\n * One of the key advantages of using render groups is the performance efficiency in moving them. Since transformations\n * are applied at the GPU level, moving a render group, even one with complex and numerous children,\n * doesn't require recalculating the rendering instructions or performing transformations on each child.\n * This makes operations like panning a large game world incredibly efficient.\n *\n * However, it's crucial to note that render groups do not batch together.\n * This means that turning every container into a render group could actually slow things down,\n * as each render group is processed separately. It's best to use render groups judiciously, at a broader level,\n * rather than on a per-child basis.\n * This approach ensures you get the performance benefits without overburdening the rendering process.\n *\n * RenderGroups maintain their own set of rendering instructions,\n * ensuring that changes or updates within a render group don't affect the rendering\n * instructions of its parent or other render groups.\n * This isolation ensures more stable and predictable rendering behavior.\n *\n * Additionally, renderGroups can be nested, allowing for powerful options in organizing different aspects of your scene.\n * This feature is particularly beneficial for separating complex game graphics from UI elements,\n * enabling intricate and efficient scene management in complex applications.\n *\n * This means that Containers have 3 levels of matrix to be mindful of:\n *\n * 1. localTransform, this is the transform of the container based on its own properties\n * 2. groupTransform, this it the transform of the container relative to the renderGroup it belongs too\n * 3. worldTransform, this is the transform of the container relative to the Scene being rendered\n *
\n * @memberof scene\n */\nexport class Container extends EventEmitter & AnyEvent>\n{\n /**\n * Mixes all enumerable properties and methods from a source object to Container.\n * @param source - The source of properties and methods to mix in.\n */\n public static mixin(source: Dict): void\n {\n Object.defineProperties(Container.prototype, Object.getOwnPropertyDescriptors(source));\n }\n\n /** @private */\n public uid: number = uid('renderable');\n\n /** @private */\n public _updateFlags = 0b1111;\n\n // the render group this container owns\n /** @private */\n public renderGroup: RenderGroup = null;\n // the render group this container belongs to\n /** @private */\n public parentRenderGroup: RenderGroup = null;\n // the index of the container in the render group\n /** @private */\n public parentRenderGroupIndex: number = 0;\n\n // set to true if the container has changed. It is reset once the changes have been applied\n // by the transform system\n // its here to stop ensure that when things change, only one update gets registers with the transform system\n /** @private */\n public didChange = false;\n // same as above, but for the renderable\n /** @private */\n public didViewUpdate = false;\n // how deep is the container relative to its render group..\n // unless the element is the root render group - it will be relative to its parent\n /** @private */\n public relativeRenderGroupDepth = 0;\n\n /**\n * The array of children of this container.\n * @readonly\n */\n public children: C[] = [];\n /** The display object container that contains this display object. */\n public parent: Container = null;\n\n // used internally for changing up the render order.. mainly for masks and filters\n // TODO setting this should cause a rebuild??\n /** @private */\n public includeInBuild = true;\n /** @private */\n public measurable = true;\n /** @private */\n public isSimple = true;\n\n // / /////////////Transform related props//////////////\n\n // used by the transform system to check if a container needs to be updated that frame\n // if the tick matches the current transform system tick, it is not updated again\n /**\n * @internal\n * @ignore\n */\n public updateTick = -1;\n\n /**\n * Current transform of the object based on local factors: position, scale, other stuff.\n * @readonly\n */\n public localTransform: Matrix = new Matrix();\n /**\n * The relative group transform is a transform relative to the render group it belongs too. It will include all parent\n * transforms and up to the render group (think of it as kind of like a stage - but the stage can be nested).\n * If this container is is self a render group matrix will be relative to its parent render group\n * @readonly\n */\n public relativeGroupTransform: Matrix = new Matrix();\n /**\n * The group transform is a transform relative to the render group it belongs too.\n * If this container is render group then this will be an identity matrix. other wise it\n * will be the same as the relativeGroupTransform.\n * Use this value when actually rendering things to the screen\n * @readonly\n */\n public groupTransform: Matrix = this.relativeGroupTransform;\n\n // the global transform taking into account the render group and all parents\n private _worldTransform: Matrix;\n\n /** If the object has been destroyed via destroy(). If true, it should not be used. */\n public destroyed = false;\n\n // transform data..\n /**\n * The coordinate of the object relative to the local coordinates of the parent.\n * @internal\n * @ignore\n */\n public _position: ObservablePoint = new ObservablePoint(this, 0, 0);\n\n /**\n * The scale factor of the object.\n * @internal\n * @ignore\n */\n public _scale: ObservablePoint = defaultScale;\n\n /**\n * The pivot point of the container that it rotates around.\n * @internal\n * @ignore\n */\n public _pivot: ObservablePoint = defaultPivot;\n\n /**\n * The skew amount, on the x and y axis.\n * @internal\n * @ignore\n */\n public _skew: ObservablePoint = defaultSkew;\n\n /**\n * The X-coordinate value of the normalized local X axis,\n * the first column of the local transformation matrix without a scale.\n * @internal\n * @ignore\n */\n public _cx = 1;\n\n /**\n * The Y-coordinate value of the normalized local X axis,\n * the first column of the local transformation matrix without a scale.\n * @internal\n * @ignore\n */\n public _sx = 0;\n\n /**\n * The X-coordinate value of the normalized local Y axis,\n * the second column of the local transformation matrix without a scale.\n * @internal\n * @ignore\n */\n public _cy = 0;\n\n /**\n * The Y-coordinate value of the normalized local Y axis,\n * the second column of the local transformation matrix without a scale.\n * @internal\n * @ignore\n */\n public _sy = 1;\n\n /**\n * The rotation amount.\n * @internal\n * @ignore\n */\n private _rotation = 0;\n\n // / COLOR related props //////////////\n\n // color stored as ABGR\n public localColor = 0xFFFFFF;\n public localAlpha = 1;\n\n public groupAlpha = 1; // A\n public groupColor = 0xFFFFFF; // BGR\n public groupColorAlpha = 0xFFFFFFFF; // ABGR\n\n // / BLEND related props //////////////\n\n /**\n * @internal\n * @ignore\n */\n public localBlendMode: BLEND_MODES = 'inherit';\n /**\n * @internal\n * @ignore\n */\n public groupBlendMode: BLEND_MODES = 'normal';\n\n // / VISIBILITY related props //////////////\n\n // visibility\n // 0b11\n // first bit is visible, second bit is renderable\n /**\n * This property holds three bits: culled, visible, renderable\n * the third bit represents culling (0 = culled, 1 = not culled) 0b100\n * the second bit represents visibility (0 = not visible, 1 = visible) 0b010\n * the first bit represents renderable (0 = renderable, 1 = not renderable) 0b001\n * @internal\n * @ignore\n */\n public localDisplayStatus = 0b111; // 0b11 | 0b10 | 0b01 | 0b00\n /**\n * @internal\n * @ignore\n */\n public globalDisplayStatus = 0b111; // 0b11 | 0b10 | 0b01 | 0b00\n\n public renderPipeId: string;\n\n /**\n * An optional bounds area for this container. Setting this rectangle will stop the renderer\n * from recursively measuring the bounds of each children and instead use this single boundArea.\n * This is great for optimisation! If for example you have a 1000 spinning particles and you know they all sit\n * within a specific bounds, then setting it will mean the renderer will not need to measure the\n * 1000 children to find the bounds. Instead it will just use the bounds you set.\n */\n public boundsArea: Rectangle;\n\n /**\n * A value that increments each time the container is modified\n * the first 12 bits represent the container changes (eg transform, alpha, visible etc)\n * the second 12 bits represent:\n * - for view changes (eg texture swap, geometry change etc)\n * - containers changes (eg children added, removed etc)\n *\n * view container\n * [000000000000][00000000000]\n * @ignore\n */\n public _didChangeId = 0;\n /**\n * property that tracks if the container transform has changed\n * @ignore\n */\n private _didLocalTransformChangeId = -1;\n\n constructor(options: ContainerOptions = {})\n {\n super();\n\n assignWithIgnore(this, options, {\n children: true,\n parent: true,\n effects: true,\n });\n\n options.children?.forEach((child) => this.addChild(child));\n this.effects = [];\n options.parent?.addChild(this);\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 * @param {...Container} children - The Container(s) to add to the container\n * @returns {Container} - The first child that was added.\n */\n public addChild(...children: U): U[0]\n {\n // #if _DEBUG\n if (!this.allowChildren)\n {\n deprecation(v8_0_0, 'addChild: Only Containers will be allowed to add children in v8.0.0');\n }\n // #endif\n\n if (children.length > 1)\n {\n // loop through the array and add all children\n for (let i = 0; i < children.length; i++)\n {\n this.addChild(children[i]);\n }\n\n return children[0];\n }\n\n const child = children[0];\n\n if (child.parent === this)\n {\n this.children.splice(this.children.indexOf(child), 1);\n this.children.push(child);\n\n if (this.parentRenderGroup)\n {\n this.parentRenderGroup.structureDidChange = true;\n }\n\n return child;\n }\n\n if (child.parent)\n {\n // TODO Optimisation...if the parent has the same render group, this does not need to change!\n child.parent.removeChild(child);\n }\n\n this.children.push(child);\n\n if (this.sortableChildren) this.sortDirty = true;\n\n child.parent = this;\n\n child.didChange = true;\n child.didViewUpdate = false;\n\n // TODO - OPtimise this? could check what the parent has set?\n child._updateFlags = 0b1111;\n\n const renderGroup = this.renderGroup || this.parentRenderGroup;\n\n if (renderGroup)\n {\n renderGroup.addChild(child);\n }\n\n this.emit('childAdded', child, this, this.children.length - 1);\n child.emit('added', this);\n\n this._didChangeId += 1 << 12;\n\n if (child._zIndex !== 0)\n {\n child.depthOfChildModified();\n }\n\n return child;\n }\n\n /**\n * Removes one or more children from the container.\n * @param {...Container} children - The Container(s) to remove\n * @returns {Container} The first child that was removed.\n */\n public removeChild(...children: U): U[0]\n {\n // if there is only one argument we can bypass looping through the them\n if (children.length > 1)\n {\n // loop through the arguments property and remove all children\n for (let i = 0; i < children.length; i++)\n {\n this.removeChild(children[i]);\n }\n\n return children[0];\n }\n\n const child = children[0];\n\n const index = this.children.indexOf(child);\n\n if (index > -1)\n {\n this._didChangeId += 1 << 12;\n\n this.children.splice(index, 1);\n\n if (this.renderGroup)\n {\n this.renderGroup.removeChild(child);\n }\n else if (this.parentRenderGroup)\n {\n this.parentRenderGroup.removeChild(child);\n }\n\n child.parent = null;\n this.emit('childRemoved', child, this, index);\n child.emit('removed', this);\n }\n\n return child;\n }\n\n /** @ignore */\n public _onUpdate(point?: ObservablePoint)\n {\n if (point)\n {\n // this.updateFlags |= UPDATE_TRANSFORM;\n\n if (point === this._skew)\n {\n this._updateSkew();\n }\n }\n\n this._didChangeId++;\n\n if (this.didChange) return;\n this.didChange = true;\n\n if (this.parentRenderGroup)\n {\n this.parentRenderGroup.onChildUpdate(this);\n }\n }\n\n set isRenderGroup(value: boolean)\n {\n if (!!this.renderGroup === value) return;\n\n if (value)\n {\n this.enableRenderGroup();\n }\n else\n {\n this.disableRenderGroup();\n }\n }\n\n /**\n * Returns true if this container is a render group.\n * This means that it will be rendered as a separate pass, with its own set of instructions\n */\n get isRenderGroup(): boolean\n {\n return !!this.renderGroup;\n }\n\n /**\n * Calling this enables a render group for this container.\n * This means it will be rendered as a separate set of instructions.\n * The transform of the container will also be handled on the GPU rather than the CPU.\n */\n public enableRenderGroup(): void\n {\n if (this.renderGroup) return;\n\n const parentRenderGroup = this.parentRenderGroup;\n\n parentRenderGroup?.removeChild(this);\n\n this.renderGroup = BigPool.get(RenderGroup, this);\n\n // this group matrix will now be an identity matrix,\n // as its own transform will be passed to the GPU\n this.groupTransform = Matrix.IDENTITY;\n\n parentRenderGroup?.addChild(this);\n\n this._updateIsSimple();\n }\n\n /** This will disable the render group for this container. */\n public disableRenderGroup(): void\n {\n if (!this.renderGroup) return;\n\n const parentRenderGroup = this.parentRenderGroup;\n\n parentRenderGroup?.removeChild(this);\n\n BigPool.return(this.renderGroup);\n\n this.renderGroup = null;\n this.groupTransform = this.relativeGroupTransform;\n\n parentRenderGroup?.addChild(this);\n\n this._updateIsSimple();\n }\n\n /** @ignore */\n public _updateIsSimple()\n {\n this.isSimple = !(this.renderGroup) && (this.effects.length === 0);\n }\n\n /**\n * Current transform of the object based on world (parent) factors.\n * @readonly\n */\n get worldTransform()\n {\n this._worldTransform ||= new Matrix();\n\n if (this.renderGroup)\n {\n this._worldTransform.copyFrom(this.renderGroup.worldTransform);\n }\n else if (this.parentRenderGroup)\n {\n this._worldTransform.appendFrom(this.relativeGroupTransform, this.parentRenderGroup.worldTransform);\n }\n\n return this._worldTransform;\n }\n\n // / ////// transform related stuff\n\n /**\n * The position of the container on the x axis relative to the local coordinates of the parent.\n * An alias to position.x\n */\n get x(): number\n {\n return this._position.x;\n }\n\n set x(value: number)\n {\n this._position.x = value;\n }\n\n /**\n * The position of the container on the y axis relative to the local coordinates of the parent.\n * An alias to position.y\n */\n get y(): number\n {\n return this._position.y;\n }\n\n set y(value: number)\n {\n this._position.y = value;\n }\n\n /**\n * The coordinate of the object relative to the local coordinates of the parent.\n * @since 4.0.0\n */\n get position(): ObservablePoint\n {\n return this._position;\n }\n\n set position(value: PointData)\n {\n this._position.copyFrom(value);\n }\n\n /**\n * The rotation of the object in radians.\n * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees.\n */\n get rotation(): number\n {\n return this._rotation;\n }\n\n set rotation(value: number)\n {\n if (this._rotation !== value)\n {\n this._rotation = value;\n this._onUpdate(this._skew);\n }\n }\n\n /**\n * The angle of the object in degrees.\n * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees.\n */\n get angle(): number\n {\n return this.rotation * RAD_TO_DEG;\n }\n\n set angle(value: number)\n {\n this.rotation = value * DEG_TO_RAD;\n }\n\n /**\n * The center of rotation, scaling, and skewing for this display object in its local space. The `position`\n * is the projection of `pivot` in the parent's local space.\n *\n * By default, the pivot is the origin (0, 0).\n * @since 4.0.0\n */\n get pivot(): ObservablePoint\n {\n if (this._pivot === defaultPivot)\n {\n this._pivot = new ObservablePoint(this, 0, 0);\n }\n\n return this._pivot;\n }\n\n set pivot(value: PointData | number)\n {\n if (this._pivot === defaultPivot)\n {\n this._pivot = new ObservablePoint(this, 0, 0);\n }\n\n typeof value === 'number' ? this._pivot.set(value) : this._pivot.copyFrom(value);\n }\n\n /**\n * The skew factor for the object in radians.\n * @since 4.0.0\n */\n get skew(): ObservablePoint\n {\n if (this._skew === defaultSkew)\n {\n this._skew = new ObservablePoint(this, 0, 0);\n }\n\n return this._skew;\n }\n\n set skew(value: PointData)\n {\n if (this._skew === defaultSkew)\n {\n this._skew = new ObservablePoint(this, 0, 0);\n }\n\n this._skew.copyFrom(value);\n }\n\n /**\n * The scale factors of this object along the local coordinate axes.\n *\n * The default scale is (1, 1).\n * @since 4.0.0\n */\n get scale(): ObservablePoint\n {\n if (this._scale === defaultScale)\n {\n this._scale = new ObservablePoint(this, 1, 1);\n }\n\n return this._scale;\n }\n\n set scale(value: PointData | number)\n {\n if (this._scale === defaultScale)\n {\n this._scale = new ObservablePoint(this, 0, 0);\n }\n\n typeof value === 'number' ? this._scale.set(value) : this._scale.copyFrom(value);\n }\n\n /**\n * The width of the Container, setting this will actually modify the scale to achieve the value set.\n * @memberof scene.Container#\n */\n get width(): number\n {\n return Math.abs(this.scale.x * this.getLocalBounds().width);\n }\n\n set width(value: number)\n {\n const localWidth = this.getLocalBounds().width;\n\n this._setWidth(value, localWidth);\n }\n\n /**\n * The height of the Container, setting this will actually modify the scale to achieve the value set.\n * @memberof scene.Container#\n */\n get height(): number\n {\n return Math.abs(this.scale.y * this.getLocalBounds().height);\n }\n\n set height(value: number)\n {\n const localHeight = this.getLocalBounds().height;\n\n this._setHeight(value, localHeight);\n }\n\n /**\n * Retrieves the size of the container as a [Size]{@link Size} object.\n * This is faster than get the width and height separately.\n * @param out - Optional object to store the size in.\n * @returns - The size of the container.\n * @memberof scene.Container#\n */\n public getSize(out?: Size): Size\n {\n if (!out)\n {\n out = {} as Size;\n }\n\n const bounds = this.getLocalBounds();\n\n out.width = Math.abs(this.scale.x * bounds.width);\n out.height = Math.abs(this.scale.y * bounds.height);\n\n return out;\n }\n\n /**\n * Sets the size of the container to the specified width and height.\n * This is faster than setting the width and height separately.\n * @param value - This can be either a number or a [Size]{@link Size} object.\n * @param height - The height to set. Defaults to the value of `width` if not provided.\n * @memberof scene.Container#\n */\n public setSize(value: number | Optional, height?: number)\n {\n const size = this.getLocalBounds();\n let convertedWidth: number;\n let convertedHeight: number;\n\n if (typeof value !== 'object')\n {\n convertedWidth = value;\n convertedHeight = height ?? value;\n }\n else\n {\n convertedWidth = value.width;\n convertedHeight = value.height ?? value.width;\n }\n\n if (convertedWidth !== undefined)\n {\n this._setWidth(convertedWidth, size.width);\n }\n\n if (convertedHeight !== undefined)\n {\n this._setHeight(convertedHeight, size.height);\n }\n }\n\n /** Called when the skew or the rotation changes. */\n private _updateSkew(): void\n {\n const rotation = this._rotation;\n const skew = this._skew;\n\n this._cx = Math.cos(rotation + skew._y);\n this._sx = Math.sin(rotation + skew._y);\n this._cy = -Math.sin(rotation - skew._x); // cos, added PI/2\n this._sy = Math.cos(rotation - skew._x); // sin, added PI/2\n }\n\n /**\n * Updates the transform properties of the container (accepts partial values).\n * @param {object} opts - The options for updating the transform.\n * @param {number} opts.x - The x position of the container.\n * @param {number} opts.y - The y position of the container.\n * @param {number} opts.scaleX - The scale factor on the x-axis.\n * @param {number} opts.scaleY - The scale factor on the y-axis.\n * @param {number} opts.rotation - The rotation of the container, in radians.\n * @param {number} opts.skewX - The skew factor on the x-axis.\n * @param {number} opts.skewY - The skew factor on the y-axis.\n * @param {number} opts.pivotX - The x coordinate of the pivot point.\n * @param {number} opts.pivotY - The y coordinate of the pivot point.\n */\n public updateTransform(opts: Partial): this\n {\n this.position.set(\n typeof opts.x === 'number' ? opts.x : this.position.x,\n typeof opts.y === 'number' ? opts.y : this.position.y\n );\n this.scale.set(\n typeof opts.scaleX === 'number' ? opts.scaleX || 1 : this.scale.x,\n typeof opts.scaleY === 'number' ? opts.scaleY || 1 : this.scale.y\n );\n this.rotation = typeof opts.rotation === 'number' ? opts.rotation : this.rotation;\n this.skew.set(\n typeof opts.skewX === 'number' ? opts.skewX : this.skew.x,\n typeof opts.skewY === 'number' ? opts.skewY : this.skew.y\n );\n this.pivot.set(\n typeof opts.pivotX === 'number' ? opts.pivotX : this.pivot.x,\n typeof opts.pivotY === 'number' ? opts.pivotY : this.pivot.y\n );\n\n return this;\n }\n\n /**\n * Updates the local transform using the given matrix.\n * @param matrix - The matrix to use for updating the transform.\n */\n public setFromMatrix(matrix: Matrix): void\n {\n matrix.decompose(this);\n }\n\n /** Updates the local transform. */\n public updateLocalTransform(): void\n {\n if ((this._didLocalTransformChangeId & 0b1111) === this._didChangeId) return;\n\n this._didLocalTransformChangeId = this._didChangeId;\n // this.didChange = false;\n\n const lt = this.localTransform;\n const scale = this._scale;\n const pivot = this._pivot;\n const position = this._position;\n\n const sx = scale._x;\n const sy = scale._y;\n\n const px = pivot._x;\n const py = pivot._y;\n\n // get the matrix values of the container based on its this properties..\n lt.a = this._cx * sx;\n lt.b = this._sx * sx;\n lt.c = this._cy * sy;\n lt.d = this._sy * sy;\n\n lt.tx = position._x - ((px * lt.a) + (py * lt.c));\n lt.ty = position._y - ((px * lt.b) + (py * lt.d));\n }\n\n // / ///// color related stuff\n\n set alpha(value: number)\n {\n if (value === this.localAlpha) return;\n\n this.localAlpha = value;\n\n this._updateFlags |= UPDATE_COLOR;\n\n this._onUpdate();\n }\n\n /** The opacity of the object. */\n get alpha(): number\n {\n return this.localAlpha;\n }\n\n set tint(value: ColorSource)\n {\n const tempColor = Color.shared.setValue(value ?? 0xFFFFFF);\n const bgr = tempColor.toBgrNumber();\n\n if (bgr === this.localColor) return;\n\n this.localColor = bgr;\n\n this._updateFlags |= UPDATE_COLOR;\n\n this._onUpdate();\n }\n\n /**\n * The tint applied to the sprite. This is a hex value.\n *\n * A value of 0xFFFFFF will remove any tint effect.\n * @default 0xFFFFFF\n */\n get tint(): number\n {\n const bgr = this.localColor;\n // convert bgr to rgb..\n\n return ((bgr & 0xFF) << 16) + (bgr & 0xFF00) + ((bgr >> 16) & 0xFF);\n }\n\n // / //////////////// blend related stuff\n\n set blendMode(value: BLEND_MODES)\n {\n if (this.localBlendMode === value) return;\n if (this.parentRenderGroup)\n {\n this.parentRenderGroup.structureDidChange = true;\n }\n\n this._updateFlags |= UPDATE_BLEND;\n\n this.localBlendMode = value;\n\n this._onUpdate();\n }\n\n /**\n * The blend mode to be applied to the sprite. Apply a value of `'normal'` to reset the blend mode.\n * @default 'normal'\n */\n get blendMode(): BLEND_MODES\n {\n return this.localBlendMode;\n }\n\n // / ///////// VISIBILITY / RENDERABLE /////////////////\n\n /** The visibility of the object. If false the object will not be drawn, and the transform will not be updated. */\n get visible()\n {\n return !!(this.localDisplayStatus & 0b010);\n }\n\n set visible(value: boolean)\n {\n const valueNumber = value ? 1 : 0;\n\n if ((this.localDisplayStatus & 0b010) >> 1 === valueNumber) return;\n\n if (this.parentRenderGroup)\n {\n this.parentRenderGroup.structureDidChange = true;\n }\n\n this._updateFlags |= UPDATE_VISIBLE;\n\n this.localDisplayStatus ^= 0b010;\n\n this._onUpdate();\n }\n\n /** @ignore */\n get culled()\n {\n return !(this.localDisplayStatus & 0b100);\n }\n\n /** @ignore */\n set culled(value: boolean)\n {\n const valueNumber = value ? 1 : 0;\n\n if ((this.localDisplayStatus & 0b100) >> 2 === valueNumber) return;\n\n if (this.parentRenderGroup)\n {\n this.parentRenderGroup.structureDidChange = true;\n }\n\n this._updateFlags |= UPDATE_VISIBLE;\n this.localDisplayStatus ^= 0b100;\n\n this._onUpdate();\n }\n\n /** Can this object be rendered, if false the object will not be drawn but the transform will still be updated. */\n get renderable()\n {\n return !!(this.localDisplayStatus & 0b001);\n }\n\n set renderable(value: boolean)\n {\n const valueNumber = value ? 1 : 0;\n\n if ((this.localDisplayStatus & 0b001) === valueNumber) return;\n\n this._updateFlags |= UPDATE_VISIBLE;\n this.localDisplayStatus ^= 0b001;\n\n if (this.parentRenderGroup)\n {\n this.parentRenderGroup.structureDidChange = true;\n }\n\n this._onUpdate();\n }\n\n /** Whether or not the object should be rendered. */\n get isRenderable(): boolean\n {\n return (this.localDisplayStatus === 0b111 && this.groupAlpha > 0);\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 * @param 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 children with textures e.g. Sprites. If options.children\n * is set to true it should destroy the texture of the child sprite\n * @param {boolean} [options.textureSource=false] - Only used for children with textures e.g. Sprites.\n * If options.children is set to true it should destroy the texture source of the child sprite\n * @param {boolean} [options.context=false] - Only used for children with graphicsContexts e.g. Graphics.\n * If options.children is set to true it should destroy the context of the child graphics\n */\n public destroy(options: DestroyOptions = false): void\n {\n if (this.destroyed) return;\n this.destroyed = true;\n\n // remove children is faster than removeChild..\n const oldChildren = this.removeChildren(0, this.children.length);\n\n this.removeFromParent();\n this.parent = null;\n this._maskEffect = null;\n this._filterEffect = null;\n this.effects = null;\n this._position = null;\n this._scale = null;\n this._pivot = null;\n this._skew = null;\n\n this.emit('destroyed', this);\n\n this.removeAllListeners();\n\n const destroyChildren = typeof options === 'boolean' ? options : options?.children;\n\n if (destroyChildren)\n {\n for (let i = 0; i < oldChildren.length; ++i)\n {\n oldChildren[i].destroy(options);\n }\n }\n\n this.renderGroup?.destroy();\n this.renderGroup = null;\n }\n}\n\nContainer.mixin(childrenHelperMixin);\nContainer.mixin(toLocalGlobalMixin);\nContainer.mixin(onRenderMixin);\nContainer.mixin(measureMixin);\nContainer.mixin(effectsMixin);\nContainer.mixin(findMixin);\nContainer.mixin(sortMixin);\nContainer.mixin(cullingMixin);\n","import { Point } from '../maths/point/Point';\n\nimport type { Container } from '../scene/container/Container';\nimport type { EventBoundary } from './EventBoundary';\n\n/**\n * A PixiJS compatible {@code Touch} event.\n * @memberof events\n */\nexport interface PixiTouch extends Touch\n{\n button: number;\n buttons: number;\n isPrimary: boolean;\n width: number;\n height: number;\n tiltX: number;\n tiltY: number;\n pointerType: string;\n pointerId: number;\n pressure: number;\n twist: number;\n tangentialPressure: number;\n layerX: number;\n layerY: number;\n offsetX: number;\n offsetY: number;\n isNormalized: boolean;\n type: string;\n}\n\n/**\n * An DOM-compatible synthetic event implementation that is \"forwarded\" on behalf of an original\n * FederatedEvent or native {@link https://dom.spec.whatwg.org/#event Event}.\n * @typeParam N - The type of native event held.\n * @memberof events\n */\nexport class FederatedEvent implements UIEvent\n{\n /** Flags whether this event bubbles. This will take effect only if it is set before propagation. */\n public bubbles = true;\n\n /** @deprecated since 7.0.0 */\n public cancelBubble = true;\n\n /**\n * Flags whether this event can be canceled using {@link FederatedEvent.preventDefault}. This is always\n * false (for now).\n */\n public readonly cancelable = false;\n\n /**\n * Flag added for compatibility with DOM {@code Event}. It is not used in the Federated Events\n * API.\n * @see https://dom.spec.whatwg.org/#dom-event-composed\n */\n public readonly composed = false;\n\n /** The listeners of the event target that are being notified. */\n public currentTarget: Container;\n\n /** Flags whether the default response of the user agent was prevent through this event. */\n public defaultPrevented = false;\n\n /**\n * The propagation phase.\n * @default {@link FederatedEvent.NONE}\n */\n public eventPhase = FederatedEvent.prototype.NONE;\n\n /** Flags whether this is a user-trusted event */\n public isTrusted: boolean;\n\n /** @deprecated since 7.0.0 */\n public returnValue: boolean;\n\n /** @deprecated since 7.0.0 */\n public srcElement: EventTarget;\n\n /** The event target that this will be dispatched to. */\n public target: Container;\n\n /** The timestamp of when the event was created. */\n public timeStamp: number;\n\n /** The type of event, e.g. {@code \"mouseup\"}. */\n public type: string;\n\n /** The native event that caused the foremost original event. */\n public nativeEvent: N;\n\n /** The original event that caused this event, if any. */\n public originalEvent: FederatedEvent;\n\n /** Flags whether propagation was stopped. */\n public propagationStopped = false;\n\n /** Flags whether propagation was immediately stopped. */\n public propagationImmediatelyStopped = false;\n\n /** The composed path of the event's propagation. The {@code target} is at the end. */\n public path: Container[];\n\n /** The {@link EventBoundary} that manages this event. Null for root events. */\n public readonly manager: EventBoundary;\n\n /** Event-specific detail */\n public detail: number;\n\n /** The global Window object. */\n public view: WindowProxy;\n\n /**\n * Not supported.\n * @deprecated since 7.0.0\n */\n public which: number;\n\n /** The coordinates of the event relative to the nearest DOM layer. This is a non-standard property. */\n public layer: Point = new Point();\n\n /** @readonly */\n get layerX(): number { return this.layer.x; }\n\n /** @readonly */\n get layerY(): number { return this.layer.y; }\n\n /** The coordinates of the event relative to the DOM document. This is a non-standard property. */\n public page: Point = new Point();\n\n /** @readonly */\n get pageX(): number { return this.page.x; }\n\n /** @readonly */\n get pageY(): number { return this.page.y; }\n\n /**\n * @param manager - The event boundary which manages this event. Propagation can only occur\n * within the boundary's jurisdiction.\n */\n constructor(manager: EventBoundary)\n {\n this.manager = manager;\n }\n\n /**\n * Fallback for the deprecated @code{InteractionEvent.data}.\n * @deprecated since 7.0.0\n */\n get data(): this\n {\n return this;\n }\n\n /** The propagation path for this event. Alias for {@link EventBoundary.propagationPath}. */\n public composedPath(): Container[]\n {\n // Find the propagation path if it isn't cached or if the target has changed since since\n // the last evaluation.\n if (this.manager && (!this.path || this.path[this.path.length - 1] !== this.target))\n {\n this.path = this.target ? this.manager.propagationPath(this.target) : [];\n }\n\n return this.path;\n }\n\n /**\n * Unimplemented method included for implementing the DOM interface {@code Event}. It will throw an {@code Error}.\n * @deprecated\n * @param _type\n * @param _bubbles\n * @param _cancelable\n */\n public initEvent(_type: string, _bubbles?: boolean, _cancelable?: boolean): void\n {\n throw new Error('initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.');\n }\n\n /**\n * Unimplemented method included for implementing the DOM interface {@code UIEvent}. It will throw an {@code Error}.\n * @deprecated\n * @param _typeArg\n * @param _bubblesArg\n * @param _cancelableArg\n * @param _viewArg\n * @param _detailArg\n */\n public initUIEvent(_typeArg: string, _bubblesArg?: boolean, _cancelableArg?: boolean, _viewArg?: Window | null,\n _detailArg?: number): void\n {\n throw new Error('initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.');\n }\n\n /** Prevent default behavior of PixiJS and the user agent. */\n public preventDefault(): void\n {\n if (this.nativeEvent instanceof Event && this.nativeEvent.cancelable)\n {\n this.nativeEvent.preventDefault();\n }\n\n this.defaultPrevented = true;\n }\n\n /**\n * Stop this event from propagating to any addition listeners, including on the\n * {@link FederatedEventTarget.currentTarget currentTarget} and also the following\n * event targets on the propagation path.\n */\n public stopImmediatePropagation(): void\n {\n this.propagationImmediatelyStopped = true;\n }\n\n /**\n * Stop this event from propagating to the next {@link FederatedEventTarget}. The rest of the listeners\n * on the {@link FederatedEventTarget.currentTarget currentTarget} will still be notified.\n */\n public stopPropagation(): void\n {\n this.propagationStopped = true;\n }\n\n public readonly NONE = 0;\n public readonly CAPTURING_PHASE = 1;\n public readonly AT_TARGET = 2;\n public readonly BUBBLING_PHASE = 3;\n}\n","var appleIphone = /iPhone/i;\nvar appleIpod = /iPod/i;\nvar appleTablet = /iPad/i;\nvar appleUniversal = /\\biOS-universal(?:.+)Mac\\b/i;\nvar androidPhone = /\\bAndroid(?:.+)Mobile\\b/i;\nvar androidTablet = /Android/i;\nvar amazonPhone = /(?:SD4930UR|\\bSilk(?:.+)Mobile\\b)/i;\nvar amazonTablet = /Silk/i;\nvar windowsPhone = /Windows Phone/i;\nvar windowsTablet = /\\bWindows(?:.+)ARM\\b/i;\nvar otherBlackBerry = /BlackBerry/i;\nvar otherBlackBerry10 = /BB10/i;\nvar otherOpera = /Opera Mini/i;\nvar otherChrome = /\\b(CriOS|Chrome)(?:.+)Mobile/i;\nvar otherFirefox = /Mobile(?:.+)Firefox\\b/i;\nvar isAppleTabletOnIos13 = function (navigator) {\n return (typeof navigator !== 'undefined' &&\n navigator.platform === 'MacIntel' &&\n typeof navigator.maxTouchPoints === 'number' &&\n navigator.maxTouchPoints > 1 &&\n typeof MSStream === 'undefined');\n};\nfunction createMatch(userAgent) {\n return function (regex) { return regex.test(userAgent); };\n}\nexport default function isMobile(param) {\n var nav = {\n userAgent: '',\n platform: '',\n maxTouchPoints: 0\n };\n if (!param && typeof navigator !== 'undefined') {\n nav = {\n userAgent: navigator.userAgent,\n platform: navigator.platform,\n maxTouchPoints: navigator.maxTouchPoints || 0\n };\n }\n else if (typeof param === 'string') {\n nav.userAgent = param;\n }\n else if (param && param.userAgent) {\n nav = {\n userAgent: param.userAgent,\n platform: param.platform,\n maxTouchPoints: param.maxTouchPoints || 0\n };\n }\n var userAgent = nav.userAgent;\n var tmp = userAgent.split('[FBAN');\n if (typeof tmp[1] !== 'undefined') {\n userAgent = tmp[0];\n }\n tmp = userAgent.split('Twitter');\n if (typeof tmp[1] !== 'undefined') {\n userAgent = tmp[0];\n }\n var match = createMatch(userAgent);\n var result = {\n apple: {\n phone: match(appleIphone) && !match(windowsPhone),\n ipod: match(appleIpod),\n tablet: !match(appleIphone) &&\n (match(appleTablet) || isAppleTabletOnIos13(nav)) &&\n !match(windowsPhone),\n universal: match(appleUniversal),\n device: (match(appleIphone) ||\n match(appleIpod) ||\n match(appleTablet) ||\n match(appleUniversal) ||\n isAppleTabletOnIos13(nav)) &&\n !match(windowsPhone)\n },\n amazon: {\n phone: match(amazonPhone),\n tablet: !match(amazonPhone) && match(amazonTablet),\n device: match(amazonPhone) || match(amazonTablet)\n },\n android: {\n phone: (!match(windowsPhone) && match(amazonPhone)) ||\n (!match(windowsPhone) && match(androidPhone)),\n tablet: !match(windowsPhone) &&\n !match(amazonPhone) &&\n !match(androidPhone) &&\n (match(amazonTablet) || match(androidTablet)),\n device: (!match(windowsPhone) &&\n (match(amazonPhone) ||\n match(amazonTablet) ||\n match(androidPhone) ||\n match(androidTablet))) ||\n match(/\\bokhttp\\b/i)\n },\n windows: {\n phone: match(windowsPhone),\n tablet: match(windowsTablet),\n device: match(windowsPhone) || match(windowsTablet)\n },\n other: {\n blackberry: match(otherBlackBerry),\n blackberry10: match(otherBlackBerry10),\n opera: match(otherOpera),\n firefox: match(otherFirefox),\n chrome: match(otherChrome),\n device: match(otherBlackBerry) ||\n match(otherBlackBerry10) ||\n match(otherOpera) ||\n match(otherFirefox) ||\n match(otherChrome)\n },\n any: false,\n phone: false,\n tablet: false\n };\n result.any =\n result.apple.device ||\n result.android.device ||\n result.windows.device ||\n result.other.device;\n result.phone =\n result.apple.phone || result.android.phone || result.windows.phone;\n result.tablet =\n result.apple.tablet || result.android.tablet || result.windows.tablet;\n return result;\n}\n//# sourceMappingURL=isMobile.js.map","import isMobileJs from 'ismobilejs';\n\n// ismobilejs have different import behavior for CJS and ESM, so here is the hack\ntype isMobileJsType = typeof isMobileJs & { default?: typeof isMobileJs };\nconst isMobileCall = (isMobileJs as isMobileJsType).default ?? isMobileJs;\n\n/**\n * The result of the {@link utils.isMobile} function.\n * @ignore\n * @memberof utils\n */\nexport type isMobileResult = {\n /**\n * Whether the device is an Apple device.\n * @memberof utils.isMobile\n */\n apple: {\n phone: boolean;\n ipod: boolean;\n tablet: boolean;\n universal: boolean;\n device: boolean;\n };\n /**\n * Whether the device is an Amazon device.\n * @memberof utils.isMobile\n */\n amazon: {\n phone: boolean;\n tablet: boolean;\n device: boolean;\n };\n /**\n * Whether the device is an Android device.\n * @memberof utils.isMobile\n */\n android: {\n phone: boolean;\n tablet: boolean;\n device: boolean;\n };\n /**\n * Whether the device is a Windows device.\n * @memberof utils.isMobile\n */\n windows: {\n phone: boolean;\n tablet: boolean;\n device: boolean;\n };\n /**\n * Whether the device is a specific device.\n * @memberof utils.isMobile\n */\n other: {\n blackberry: boolean;\n blackberry10: boolean;\n opera: boolean;\n firefox: boolean;\n chrome: boolean;\n device: boolean;\n };\n /**\n * Whether the device is a phone device.\n * @memberof utils.isMobile\n */\n phone: boolean;\n /**\n * Whether the device is a tablet device.\n * @memberof utils.isMobile\n */\n tablet: boolean;\n /**\n * Whether the device is any kind of device.\n * @memberof utils.isMobile\n */\n any: boolean;\n};\n\n/**\n * Detects whether the device is mobile and what type of mobile device it is.\n * ```js\n * import { isMobile } from 'pixi.js';\n *\n * if (isMobile.apple.tablet) {\n * // The device is an Apple tablet device.\n * }\n * ```\n * @memberof utils\n */\nexport const isMobile: isMobileResult = isMobileCall(globalThis.navigator);\n","import { FederatedEvent } from '../events/FederatedEvent';\nimport { ExtensionType } from '../extensions/Extensions';\nimport { isMobile } from '../utils/browser/isMobile';\nimport { removeItems } from '../utils/data/removeItems';\nimport { type AccessibleHTMLElement } from './accessibilityTarget';\n\nimport type { Rectangle } from '../maths/shapes/Rectangle';\nimport type { System } from '../rendering/renderers/shared/system/System';\nimport type { Renderer } from '../rendering/renderers/types';\nimport type { Container } from '../scene/container/Container';\nimport type { isMobileResult } from '../utils/browser/isMobile';\n\n/**\n * The accessibility module recreates the ability to tab and have content read by screen readers.\n * This is very important as it can possibly help people with disabilities access PixiJS content.\n *\n * This module is a mixin for {@link AbstractRenderer} and will need to be imported if you are managing your own renderer.\n * Usage:\n * ```js\n * import 'pixi.js/accessibility';\n * ```\n * To make an object accessible do the following:\n * ```js\n * container.accessible = true; // object is now accessible to screen readers!\n * ```\n * See {@link accessibility.AccessibleOptions} for more accessibility related properties that can be set.\n * @namespace accessibility\n */\n\n/** @ignore */\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/** @ignore */\nexport interface AccessibilityOptions\n{\n /** Setting this to true will visually show the divs. */\n debug?: boolean;\n}\n\n/**\n * The Accessibility system recreates the ability to tab and have content read by screen readers.\n * This is very important as it can possibly help people with disabilities access PixiJS content.\n *\n * A Container can be made accessible just like it can be made interactive. 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.accessibility`\n * @memberof accessibility\n */\nexport class AccessibilitySystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ],\n name: 'accessibility',\n } as const;\n\n /** Setting this to true will visually show the divs. */\n public debug = false;\n\n /**\n * The renderer this accessibility manager works for.\n * @type {WebGLRenderer|WebGPURenderer}\n */\n private _renderer: Renderer;\n\n /** Internal variable, see isActive getter. */\n private _isActive = false;\n\n /** Internal variable, see isMobileAccessibility getter. */\n private _isMobileAccessibility = false;\n\n /** Button element for handling touch hooks. */\n private _hookDiv: HTMLElement | null;\n\n /** This is the dom element that will sit over the PixiJS element. This is where the div overlays will go. */\n private _div: HTMLElement;\n\n /** A simple pool for storing divs. */\n private _pool: AccessibleHTMLElement[] = [];\n\n /** This is a tick used to check if an object is no longer being rendered. */\n private _renderId = 0;\n\n /** The array of currently active accessible items. */\n private _children: Container[] = [];\n\n /** Count to throttle div updates on android devices. */\n private _androidUpdateCount = 0;\n\n /** The frequency to update the div elements. */\n private readonly _androidUpdateFrequency = 500; // 2fps\n\n // eslint-disable-next-line jsdoc/require-param\n /**\n * @param {WebGLRenderer|WebGPURenderer} renderer - A reference to the current renderer\n */\n constructor(renderer: Renderer, private readonly _mobileInfo: isMobileResult = isMobile)\n {\n this._hookDiv = null;\n\n if (_mobileInfo.tablet || _mobileInfo.phone)\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.toString();\n\n this._div = div;\n this._renderer = renderer;\n\n /**\n * pre-bind the functions\n * @type {Function}\n * @private\n */\n this._onKeyDown = this._onKeyDown.bind(this);\n\n /**\n * pre-bind the functions\n * @type {Function}\n * @private\n */\n this._onMouseMove = this._onMouseMove.bind(this);\n\n // let listen for tab.. once pressed we can fire up and show the accessibility layer\n globalThis.addEventListener('keydown', this._onKeyDown, false);\n }\n\n /**\n * Value of `true` if accessibility is currently active and accessibility layers are showing.\n * @member {boolean}\n * @readonly\n */\n get isActive(): boolean\n {\n return this._isActive;\n }\n\n /**\n * Value of `true` if accessibility is enabled for touch devices.\n * @member {boolean}\n * @readonly\n */\n get isMobileAccessibility(): boolean\n {\n return this._isMobileAccessibility;\n }\n\n get hookDiv()\n {\n return this._hookDiv;\n }\n\n /**\n * Creates the touch hooks.\n * @private\n */\n private _createTouchHook(): void\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.toString();\n hookDiv.style.backgroundColor = '#FF0000';\n hookDiv.title = 'select to enable accessibility for this content';\n\n hookDiv.addEventListener('focus', () =>\n {\n this._isMobileAccessibility = true;\n this._activate();\n this._destroyTouchHook();\n });\n\n document.body.appendChild(hookDiv);\n this._hookDiv = hookDiv;\n }\n\n /**\n * Destroys the touch hooks.\n * @private\n */\n private _destroyTouchHook(): void\n {\n if (!this._hookDiv)\n {\n return;\n }\n document.body.removeChild(this._hookDiv);\n this._hookDiv = null;\n }\n\n /**\n * Activating will cause the Accessibility layer to be shown.\n * This is called when a user presses the tab key.\n * @private\n */\n private _activate(): void\n {\n if (this._isActive)\n {\n return;\n }\n\n this._isActive = true;\n\n globalThis.document.addEventListener('mousemove', this._onMouseMove, true);\n globalThis.removeEventListener('keydown', this._onKeyDown, false);\n\n this._renderer.runners.postrender.add(this);\n this._renderer.view.canvas.parentNode?.appendChild(this._div);\n }\n\n /**\n * Deactivating will cause the Accessibility layer to be hidden.\n * This is called when a user moves the mouse.\n * @private\n */\n private _deactivate(): void\n {\n if (!this._isActive || this._isMobileAccessibility)\n {\n return;\n }\n\n this._isActive = false;\n\n globalThis.document.removeEventListener('mousemove', this._onMouseMove, true);\n globalThis.addEventListener('keydown', this._onKeyDown, false);\n\n this._renderer.runners.postrender.remove(this);\n this._div.parentNode?.removeChild(this._div);\n }\n\n /**\n * This recursive function will run through the scene graph and add any new accessible objects to the DOM layer.\n * @private\n * @param {Container} container - The Container to check.\n */\n private _updateAccessibleObjects(container: Container): void\n {\n if (!container.visible || !container.accessibleChildren)\n {\n return;\n }\n\n if (container.accessible && container.isInteractive())\n {\n if (!container._accessibleActive)\n {\n this._addChild(container);\n }\n\n container._renderId = this._renderId;\n }\n\n const children = container.children;\n\n if (children)\n {\n for (let i = 0; i < children.length; i++)\n {\n this._updateAccessibleObjects(children[i] as Container);\n }\n }\n }\n\n /**\n * Runner init called, view is available at this point.\n * @ignore\n */\n public init(options?: AccessibilityOptions)\n {\n this.debug = options?.debug ?? this.debug;\n this._renderer.runners.postrender.remove(this);\n }\n\n /**\n * Runner postrender was called, ensure that all divs are mapped correctly to their Containers.\n * Only fires while active.\n * @ignore\n */\n public postrender(): void\n {\n /* On Android default web browser, tab order seems to be calculated by position rather than tabIndex,\n * moving buttons can cause focus to flicker between two buttons making it hard/impossible to navigate,\n * so I am just running update every half a second, seems to fix it.\n */\n const now = performance.now();\n\n if (this._mobileInfo.android.device && now < this._androidUpdateCount)\n {\n return;\n }\n\n this._androidUpdateCount = now + this._androidUpdateFrequency;\n\n if (!this._renderer.renderingToScreen || !this._renderer.view.canvas)\n {\n return;\n }\n\n // update children...\n if (this._renderer.lastObjectRendered)\n {\n this._updateAccessibleObjects(this._renderer.lastObjectRendered as Container);\n }\n\n const { x, y, width, height } = this._renderer.view.canvas.getBoundingClientRect();\n const { width: viewWidth, height: viewHeight, resolution } = this._renderer;\n\n const sx = (width / viewWidth) * resolution;\n const sy = (height / viewHeight) * resolution;\n\n let div = this._div;\n\n div.style.left = `${x}px`;\n div.style.top = `${y}px`;\n div.style.width = `${viewWidth}px`;\n div.style.height = `${viewHeight}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 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 else\n {\n // map div to display..\n div = child._accessibleDiv;\n let hitArea = child.hitArea as Rectangle;\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().rectangle;\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 // the title or index may have changed, if so lets update it!\n if (child.accessibleTitle !== div.title || child.tabIndex !== div.tabIndex)\n {\n div.title = child.accessibleTitle || '';\n div.tabIndex = child.tabIndex;\n if (this.debug)\n {\n this._updateDebugHTML(div);\n }\n }\n }\n }\n\n // increment the render id..\n this._renderId++;\n }\n\n /**\n * private function that will visually add the information to the\n * accessibility div\n * @param {HTMLElement} div -\n */\n private _updateDebugHTML(div: AccessibleHTMLElement): void\n {\n div.innerHTML = `type: ${div.type}
title : ${div.title}
tabIndex: ${div.tabIndex}`;\n }\n\n /**\n * Adjust the hit area based on the bounds of a display object\n * @param {Rectangle} hitArea - Bounds of the child\n */\n private _capHitArea(hitArea: Rectangle): void\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 const { width: viewWidth, height: viewHeight } = this._renderer;\n\n if (hitArea.x + hitArea.width > viewWidth)\n {\n hitArea.width = viewWidth - hitArea.x;\n }\n\n if (hitArea.y + hitArea.height > viewHeight)\n {\n hitArea.height = viewHeight - hitArea.y;\n }\n }\n\n /**\n * Adds a Container to the accessibility manager\n * @private\n * @param {Container} container - The child to make accessible.\n */\n private _addChild(container: T): void\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,255,255,0.5)' : 'transparent';\n div.style.position = 'absolute';\n div.style.zIndex = DIV_TOUCH_ZINDEX.toString();\n div.style.borderStyle = 'none';\n\n // ARIA attributes ensure that button title and hint updates are announced properly\n if (navigator.userAgent.toLowerCase().includes('chrome'))\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 // set pointer events\n div.style.pointerEvents = container.accessiblePointerEvents;\n // set the type, this defaults to button!\n div.type = container.accessibleType;\n\n if (container.accessibleTitle && container.accessibleTitle !== null)\n {\n div.title = container.accessibleTitle;\n }\n else if (!container.accessibleHint\n || container.accessibleHint === null)\n {\n div.title = `container ${container.tabIndex}`;\n }\n\n if (container.accessibleHint\n && container.accessibleHint !== null)\n {\n div.setAttribute('aria-label', container.accessibleHint);\n }\n\n if (this.debug)\n {\n this._updateDebugHTML(div);\n }\n\n container._accessibleActive = true;\n container._accessibleDiv = div;\n div.container = container;\n\n this._children.push(container);\n this._div.appendChild(container._accessibleDiv);\n container._accessibleDiv.tabIndex = container.tabIndex;\n }\n\n /**\n * Dispatch events with the EventSystem.\n * @param e\n * @param type\n * @private\n */\n private _dispatchEvent(e: UIEvent, type: string[]): void\n {\n const { container: target } = e.target as AccessibleHTMLElement;\n const boundary = this._renderer.events.rootBoundary;\n const event: FederatedEvent = Object.assign(new FederatedEvent(boundary), { target });\n\n boundary.rootTarget = this._renderer.lastObjectRendered as Container;\n type.forEach((type) => boundary.dispatchEvent(event, type));\n }\n\n /**\n * Maps the div button press to pixi's EventSystem (click)\n * @private\n * @param {MouseEvent} e - The click event.\n */\n private _onClick(e: MouseEvent): void\n {\n this._dispatchEvent(e, ['click', 'pointertap', 'tap']);\n }\n\n /**\n * Maps the div focus events to pixi's EventSystem (mouseover)\n * @private\n * @param {FocusEvent} e - The focus event.\n */\n private _onFocus(e: FocusEvent): void\n {\n if (!(e.target as Element).getAttribute('aria-live'))\n {\n (e.target as Element).setAttribute('aria-live', 'assertive');\n }\n\n this._dispatchEvent(e, ['mouseover']);\n }\n\n /**\n * Maps the div focus events to pixi's EventSystem (mouseout)\n * @private\n * @param {FocusEvent} e - The focusout event.\n */\n private _onFocusOut(e: FocusEvent): void\n {\n if (!(e.target as Element).getAttribute('aria-live'))\n {\n (e.target as Element).setAttribute('aria-live', 'polite');\n }\n\n this._dispatchEvent(e, ['mouseout']);\n }\n\n /**\n * Is called when a key is pressed\n * @private\n * @param {KeyboardEvent} e - The keydown event.\n */\n private _onKeyDown(e: KeyboardEvent): void\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 * @private\n * @param {MouseEvent} e - The mouse event.\n */\n private _onMouseMove(e: MouseEvent): void\n {\n if (e.movementX === 0 && e.movementY === 0)\n {\n return;\n }\n\n this._deactivate();\n }\n\n /** Destroys the accessibility manager */\n public destroy(): void\n {\n this._destroyTouchHook();\n this._div = null;\n\n globalThis.document.removeEventListener('mousemove', this._onMouseMove, true);\n globalThis.removeEventListener('keydown', this._onKeyDown);\n\n this._pool = null;\n this._children = null;\n this._renderer = null;\n }\n}\n","import type { Container } from '../scene/container/Container';\n\n/**\n * The type of the pointer event to listen for.\n * Can be any of the following:\n * - `auto`\n * - `none`\n * - `visiblePainted`\n * - `visibleFill`\n * - `visibleStroke`\n * - `visible`\n * - `painted`\n * - `fill`\n * - `stroke`\n * - `all`\n * - `inherit`\n * @memberof accessibility\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events\n */\nexport type PointerEvents = 'auto'\n| 'none'\n| 'visiblePainted'\n| 'visibleFill'\n| 'visibleStroke'\n| 'visible'\n| 'painted'\n| 'fill'\n| 'stroke'\n| 'all'\n| 'inherit';\n\n/**\n * When `accessible` is enabled on any display object, these properties will affect its accessibility.\n * @memberof accessibility\n */\nexport interface AccessibleOptions\n{\n /**\n * Flag for if the object is accessible. If true AccessibilityManager will overlay a\n * shadow div with attributes set\n * @default false\n */\n accessible: boolean;\n /**\n * Sets the title attribute of the shadow div\n * If accessibleTitle AND accessibleHint has not been this will default to 'container [tabIndex]'\n * @member {string}\n */\n accessibleTitle: string | null;\n /** Sets the aria-label attribute of the shadow div */\n accessibleHint: string | null;\n /**\n * @default 0\n */\n tabIndex: number;\n /**\n * Specify the type of div the accessible layer is. Screen readers treat the element differently\n * depending on this type. Defaults to button.\n * @default 'button'\n */\n accessibleType: string;\n /**\n * Specify the pointer-events the accessible div will use\n * Defaults to auto.\n * @default 'auto'\n * @type {accessibility.PointerEvents}\n */\n accessiblePointerEvents: PointerEvents;\n /**\n * Setting to false will prevent any children inside this container to\n * be accessible. Defaults to true.\n * @default true\n */\n accessibleChildren: boolean;\n}\n\n/**\n * The Accessibility object is attached to the {@link Container}.\n * @private\n */\nexport interface AccessibleTarget extends AccessibleOptions\n{\n _accessibleActive: boolean;\n _accessibleDiv: AccessibleHTMLElement | null;\n _renderId: number;\n}\n\nexport interface AccessibleHTMLElement extends HTMLElement\n{\n type?: string;\n container?: Container;\n}\n\n/**\n * Default property values of accessible objects\n * used by {@link AccessibilitySystem}.\n * @private\n * @example\n * import { accessibleTarget } from 'pixi.js';\n *\n * function MyObject() {}\n * Object.assign(MyObject.prototype, accessibleTarget);\n */\nexport const accessibilityTarget: AccessibleTarget = {\n /**\n * Flag for if the object is accessible. If true AccessibilityManager will overlay a\n * shadow div with attributes set\n * @member {boolean}\n * @memberof scene.Container#\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 'container [tabIndex]'\n * @member {string}\n * @memberof scene.Container#\n */\n accessibleTitle: null,\n\n /**\n * Sets the aria-label attribute of the shadow div\n * @member {string}\n * @memberof scene.Container#\n */\n accessibleHint: null,\n\n /**\n * @member {number}\n * @memberof scene.Container#\n * @todo Needs docs.\n */\n tabIndex: 0,\n\n /**\n * @member {boolean}\n * @memberof scene.Container#\n * @private\n */\n _accessibleActive: false,\n\n /**\n * @memberof scene.Container#\n * @private\n */\n _accessibleDiv: null,\n\n /**\n * Specify the type of div the accessible layer is. Screen readers treat the element differently\n * depending on this type. Defaults to button.\n * @member {string}\n * @memberof scene.Container#\n * @default 'button'\n */\n accessibleType: 'button',\n\n /**\n * Specify the pointer-events the accessible div will use\n * Defaults to auto.\n * @type {PointerEvents}\n * @memberof scene.Container#\n * @default 'auto'\n */\n accessiblePointerEvents: 'auto',\n\n /**\n * Setting to false will prevent any children inside this container to\n * be accessible. Defaults to true.\n * @member {boolean}\n * @memberof scene.Container#\n * @default true\n */\n accessibleChildren: true,\n\n /**\n * @member {number}\n * @memberof scene.Container#\n * @private\n */\n _renderId: -1,\n};\n","import { extensions } from '../extensions/Extensions';\nimport { Container } from '../scene/container/Container';\nimport { AccessibilitySystem } from './AccessibilitySystem';\nimport { accessibilityTarget } from './accessibilityTarget';\n\nextensions.add(AccessibilitySystem);\nContainer.mixin(accessibilityTarget);\n","import { ExtensionType } from '../extensions/Extensions';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\nimport type { Renderer } from '../rendering/renderers/types';\n\ntype ResizeableRenderer = Pick;\n\n/**\n * Application options for the {@link app.ResizePlugin}.\n * @memberof app\n * @property {Window|HTMLElement} [resizeTo=window] - Element to automatically resize the renderer to.\n */\nexport interface ResizePluginOptions\n{\n /**\n * Element to automatically resize the renderer to.\n * @memberof app.ApplicationOptions\n */\n resizeTo?: Window | HTMLElement;\n}\n\n/**\n * Middleware for Application's resize functionality.\n *\n * Adds the following methods to {@link app.Application}:\n * * {@link app.Application#resizeTo}\n * * {@link app.Application#resize}\n * * {@link app.Application#queueResize}\n * * {@link app.Application#cancelResize}\n * @example\n * import { extensions, ResizePlugin } from 'pixi.js';\n *\n * extensions.add(ResizePlugin);\n * @memberof app\n */\nexport class ResizePlugin\n{\n /** @ignore */\n public static extension: ExtensionMetadata = ExtensionType.Application;\n\n public static resizeTo: Window | HTMLElement;\n public static resize: () => void;\n public static renderer: ResizeableRenderer;\n public static queueResize: () => void;\n public static render: () => void;\n private static _resizeId: number;\n private static _resizeTo: Window | HTMLElement;\n private static _cancelResize: () => void;\n\n /**\n * Initialize the plugin with scope of application instance\n * @static\n * @private\n * @param {object} [options] - See application options\n */\n public static init(options: ResizePluginOptions): void\n {\n Object.defineProperty(this, 'resizeTo',\n /**\n * The HTML element or window to automatically resize the\n * renderer's view element to match width and height.\n * @member {Window|HTMLElement}\n * @name resizeTo\n * @memberof app.Application#\n */\n {\n set(dom: Window | HTMLElement)\n {\n globalThis.removeEventListener('resize', this.queueResize);\n this._resizeTo = dom;\n if (dom)\n {\n globalThis.addEventListener('resize', this.queueResize);\n this.resize();\n }\n },\n get()\n {\n return this._resizeTo;\n },\n });\n\n /**\n * Resize is throttled, so it's safe to call this multiple times per frame and it'll\n * only be called once.\n * @memberof app.Application#\n * @method queueResize\n * @private\n */\n this.queueResize = (): void =>\n {\n if (!this._resizeTo)\n {\n return;\n }\n\n this._cancelResize();\n\n // // Throttle resize events per raf\n this._resizeId = requestAnimationFrame(() => this.resize());\n };\n\n /**\n * Cancel the resize queue.\n * @memberof app.Application#\n * @method cancelResize\n * @private\n */\n this._cancelResize = (): void =>\n {\n if (this._resizeId)\n {\n cancelAnimationFrame(this._resizeId);\n this._resizeId = null;\n }\n };\n\n /**\n * Execute an immediate resize on the renderer, this is not\n * throttled and can be expensive to call many times in a row.\n * Will resize only if `resizeTo` property is set.\n * @memberof app.Application#\n * @method resize\n */\n this.resize = (): void =>\n {\n if (!this._resizeTo)\n {\n return;\n }\n\n // clear queue resize\n this._cancelResize();\n\n let width: number;\n let height: number;\n\n // Resize to the window\n if (this._resizeTo === globalThis.window)\n {\n width = globalThis.innerWidth;\n height = globalThis.innerHeight;\n }\n // Resize to other HTML entities\n else\n {\n const { clientWidth, clientHeight } = this._resizeTo as HTMLElement;\n\n width = clientWidth;\n height = clientHeight;\n }\n\n this.renderer.resize(width, height);\n this.render();\n };\n\n // On resize\n this._resizeId = null;\n this._resizeTo = null;\n this.resizeTo = options.resizeTo || null;\n }\n\n /**\n * Clean up the ticker, scoped to application\n * @static\n * @private\n */\n public static destroy(): void\n {\n globalThis.removeEventListener('resize', this.queueResize);\n this._cancelResize();\n this._cancelResize = null;\n this.queueResize = null;\n this.resizeTo = null;\n this.resize = null;\n }\n}\n","/**\n * Represents the update priorities used by internal Pixi classes when registered with\n * the {@link ticker.Ticker} object. Higher priority items are updated first and lower\n * priority items, such as render, should go later.\n * @static\n * @enum {number}\n * @memberof ticker\n */\nexport enum UPDATE_PRIORITY\n// eslint-disable-next-line @typescript-eslint/indent\n{\n /**\n * Highest priority used for interaction events in {@link EventSystem}\n * @default 50\n */\n INTERACTION = 50,\n /**\n * High priority updating, used by {@link AnimatedSprite}\n * @default 25\n */\n HIGH = 25,\n /**\n * Default priority for ticker events, see {@link Ticker#add}.\n * @default 0\n */\n NORMAL = 0,\n /**\n * Low priority used for {@link Application} rendering.\n * @default -25\n */\n LOW = -25,\n /**\n * Lowest priority used for {@link BasePrepare} utility.\n * @default -50\n */\n UTILITY = -50,\n}\n","import type { Ticker, TickerCallback } from './Ticker';\n\n/**\n * Internal class for handling the priority sorting of ticker handlers.\n * @private\n * @class\n */\nexport class TickerListener\n{\n /** The current priority. */\n public priority: number;\n /** The next item in chain. */\n public next: TickerListener = null;\n /** The previous item in chain. */\n public previous: TickerListener = null;\n\n /** The handler function to execute. */\n private _fn: TickerCallback;\n /** The calling to execute. */\n private _context: T;\n /** If this should only execute once. */\n private readonly _once: boolean;\n /** `true` if this listener has been destroyed already. */\n private _destroyed = false;\n\n /**\n * Constructor\n * @private\n * @param fn - The listener function to be added for one update\n * @param context - The listener context\n * @param priority - The priority for emitting\n * @param once - If the handler should fire once\n */\n constructor(fn: TickerCallback, context: T = null, priority = 0, once = false)\n {\n this._fn = fn;\n this._context = context;\n this.priority = priority;\n this._once = once;\n }\n\n /**\n * Simple compare function to figure out if a function and context match.\n * @param fn - The listener function to be added for one update\n * @param context - The listener context\n * @returns `true` if the listener match the arguments\n */\n public match(fn: TickerCallback, context: any = null): boolean\n {\n return this._fn === fn && this._context === context;\n }\n\n /**\n * Emit by calling the current function.\n * @param ticker - The ticker emitting.\n * @returns Next ticker\n */\n public emit(ticker: Ticker): TickerListener\n {\n if (this._fn)\n {\n if (this._context)\n {\n this._fn.call(this._context, ticker);\n }\n else\n {\n (this as TickerListener)._fn(ticker);\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 previous - Input node, previous listener\n */\n public connect(previous: TickerListener): void\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 hard - `true` to remove the `next` reference, this\n * is considered a hard destroy. Soft destroy maintains the next reference.\n * @returns The listener to redirect while emitting or removing.\n */\n public destroy(hard = false): TickerListener\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 { UPDATE_PRIORITY } from './const';\nimport { TickerListener } from './TickerListener';\n\n/**\n * A callback which can be added to a ticker.\n * ```js\n * ticker.add(() => {\n * // do something every frame\n * });\n * ```\n * @memberof ticker\n */\nexport type TickerCallback = (this: T, ticker: Ticker) => any;\n\n/**\n * {@link ticker.Ticker|Tickers} provide periodic callbacks based on the system clock.\n * Your game update logic will generally be run in response to a tick once per frame.\n * You can have multiple tickers in use at one time.\n * ```js\n * import { Ticker } from 'pixi.js';\n *\n * const callback = (ticker: Ticker) => {\n * // do something on the next animation frame\n * };\n *\n * // create a ticker\n * const ticker = new Ticker();\n *\n * // register the callback and start the ticker\n * ticker.add(callback);\n * ticker.start();\n * ```\n *\n * You can always use the {@link ticker.Ticker.shared|shared} ticker that Pixi renders with by default.\n * ```js\n * Ticker.shared.add(callback);\n * ```\n * @namespace ticker\n */\n\n/**\n * A Ticker class that runs an update loop that other objects listen to.\n *\n * This class is composed around listeners meant for execution on the next requested animation frame.\n * Animation frames are requested only when necessary, e.g. When the ticker is started and the emitter has listeners.\n * @class\n * @memberof ticker\n */\nexport class Ticker\n{\n /**\n * Target frames per millisecond.\n * @static\n */\n public static targetFPMS = 0.06;\n\n /** The private shared ticker instance */\n private static _shared: Ticker;\n /** The private system ticker instance */\n private static _system: Ticker;\n\n /**\n * Whether or not this ticker should invoke the method\n * {@link ticker.Ticker#start|start} automatically when a listener is added.\n */\n public autoStart = false;\n /**\n * Scalar time value from last frame to this frame.\n * This value is capped by setting {@link ticker.Ticker#minFPS|minFPS}\n * and is scaled with {@link ticker.Ticker#speed|speed}.\n * **Note:** The cap may be exceeded by scaling.\n */\n public deltaTime = 1;\n /**\n * Scaler time elapsed in milliseconds from last frame to this frame.\n * This value is capped by setting {@link ticker.Ticker#minFPS|minFPS}\n * and is scaled with {@link ticker.Ticker#speed|speed}.\n * **Note:** The cap may be exceeded by scaling.\n * If the platform supports DOMHighResTimeStamp,\n * this value will have a precision of 1 µs.\n * Defaults to target frame time\n * @default 16.66\n */\n public deltaMS: number;\n /**\n * Time elapsed in milliseconds from last frame to this frame.\n * Opposed to what the scalar {@link ticker.Ticker#deltaTime|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 * @default 16.66\n */\n public elapsedMS: number;\n /**\n * The last time {@link ticker.Ticker#update|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 public lastTime = -1;\n /**\n * Factor of current {@link ticker.Ticker#deltaTime|deltaTime}.\n * @example\n * // Scales ticker.deltaTime to what would be\n * // the equivalent of approximately 120 FPS\n * ticker.speed = 2;\n */\n public speed = 1;\n /**\n * Whether or not this ticker has been started.\n * `true` if {@link ticker.Ticker#start|start} has been called.\n * `false` if {@link ticker.Ticker#stop|Stop} has been called.\n * While `false`, this value may change to `true` in the\n * event of {@link ticker.Ticker#autoStart|autoStart} being `true`\n * and a listener is added.\n */\n public started = false;\n\n /** The first listener. All new listeners added are chained on this. */\n private _head: TickerListener;\n /** Internal current frame request ID */\n private _requestId: number = null;\n /**\n * Internal value managed by minFPS property setter and getter.\n * This is the maximum allowed milliseconds between updates.\n */\n private _maxElapsedMS = 100;\n /**\n * Internal value managed by minFPS property setter and getter.\n * This is the minimum allowed milliseconds between updates.\n */\n private _minElapsedMS = 0;\n /** If enabled, deleting is disabled.*/\n private _protected = false;\n /** The last time keyframe was executed. Maintains a relatively fixed interval with the previous value. */\n private _lastFrame = -1;\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 * @param time - Time since last tick.\n */\n private readonly _tick: (time: number) => any;\n\n constructor()\n {\n this._head = new TickerListener(null, null, Infinity);\n this.deltaMS = 1 / Ticker.targetFPMS;\n this.elapsedMS = 1 / Ticker.targetFPMS;\n\n this._tick = (time: number): void =>\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 * @private\n */\n private _requestIfNeeded(): void\n {\n if (this._requestId === null && this._head.next)\n {\n // ensure callbacks get correct delta\n this.lastTime = performance.now();\n this._lastFrame = this.lastTime;\n this._requestId = requestAnimationFrame(this._tick);\n }\n }\n\n /**\n * Conditionally cancels a pending animation frame.\n * @private\n */\n private _cancelIfNeeded(): void\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 * @private\n */\n private _startIfPossible(): void\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 * @param fn - The listener function to be added for updates\n * @param context - The listener context\n * @param {number} [priority=UPDATE_PRIORITY.NORMAL] - The priority for emitting\n * @returns This instance of a ticker\n */\n public add(fn: TickerCallback, context?: T, priority: number = UPDATE_PRIORITY.NORMAL): this\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 * @param fn - The listener function to be added for one update\n * @param context - The listener context\n * @param {number} [priority=UPDATE_PRIORITY.NORMAL] - The priority for emitting\n * @returns This instance of a ticker\n */\n public addOnce(fn: TickerCallback, context?: T, priority: number = UPDATE_PRIORITY.NORMAL): this\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 * @private\n * @param listener - Current listener being added.\n * @returns This instance of a ticker\n */\n private _addListener(listener: TickerListener): this\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 * @param fn - The listener function to be removed\n * @param context - The listener context to be removed\n * @returns This instance of a ticker\n */\n public remove(fn: TickerCallback, context?: T): this\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 * The number of listeners on this ticker, calculated by walking through linked list\n * @readonly\n * @member {number}\n */\n get count(): number\n {\n if (!this._head)\n {\n return 0;\n }\n\n let count = 0;\n let current = this._head;\n\n while ((current = current.next))\n {\n count++;\n }\n\n return count;\n }\n\n /** Starts the ticker. If the ticker has listeners a new animation frame is requested at this point. */\n public start(): void\n {\n if (!this.started)\n {\n this.started = true;\n this._requestIfNeeded();\n }\n }\n\n /** Stops the ticker. If the ticker has requested an animation frame it is canceled at this point. */\n public stop(): void\n {\n if (this.started)\n {\n this.started = false;\n this._cancelIfNeeded();\n }\n }\n\n /** Destroy the ticker and don't use after this. Calling this method removes all references to internal events. */\n public destroy(): void\n {\n if (!this._protected)\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 /**\n * Triggers an update. An update entails setting the\n * current {@link ticker.Ticker#elapsedMS|elapsedMS},\n * the current {@link ticker.Ticker#deltaTime|deltaTime},\n * invoking all listeners with current deltaTime,\n * and then finally setting {@link ticker.Ticker#lastTime|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 * @param {number} [currentTime=performance.now()] - the current time of execution\n */\n public update(currentTime: number = performance.now()): void\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 elapsedMS *= this.speed;\n\n // If not enough time has passed, exit the function.\n // Get ready for next frame by setting _lastFrame, but based on _minElapsedMS\n // adjustment to ensure a relatively stable interval.\n if (this._minElapsedMS)\n {\n const delta = currentTime - this._lastFrame | 0;\n\n if (delta < this._minElapsedMS)\n {\n return;\n }\n\n this._lastFrame = currentTime - (delta % this._minElapsedMS);\n }\n\n this.deltaMS = elapsedMS;\n this.deltaTime = this.deltaMS * Ticker.targetFPMS;\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);\n }\n\n if (!head.next)\n {\n this._cancelIfNeeded();\n }\n }\n else\n {\n this.deltaTime = this.deltaMS = 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 ticker.Ticker#speed|speed}, which is specific\n * to scaling {@link ticker.Ticker#deltaTime|deltaTime}.\n * @member {number}\n * @readonly\n */\n get FPS(): number\n {\n return 1000 / this.elapsedMS;\n }\n\n /**\n * Manages the maximum amount of milliseconds allowed to\n * elapse between invoking {@link ticker.Ticker#update|update}.\n * This value is used to cap {@link ticker.Ticker#deltaTime|deltaTime},\n * but does not effect the measured value of {@link ticker.Ticker#FPS|FPS}.\n * When setting this property it is clamped to a value between\n * `0` and `Ticker.targetFPMS * 1000`.\n * @member {number}\n * @default 10\n */\n get minFPS(): number\n {\n return 1000 / this._maxElapsedMS;\n }\n\n set minFPS(fps: number)\n {\n // Minimum must be below the maxFPS\n const minFPS = Math.min(this.maxFPS, fps);\n\n // Must be at least 0, but below 1 / Ticker.targetFPMS\n const minFPMS = Math.min(Math.max(0, minFPS) / 1000, Ticker.targetFPMS);\n\n this._maxElapsedMS = 1 / minFPMS;\n }\n\n /**\n * Manages the minimum amount of milliseconds required to\n * elapse between invoking {@link ticker.Ticker#update|update}.\n * This will effect the measured value of {@link ticker.Ticker#FPS|FPS}.\n * If it is set to `0`, then there is no limit; PixiJS will render as many frames as it can.\n * Otherwise it will be at least `minFPS`\n * @member {number}\n * @default 0\n */\n get maxFPS(): number\n {\n if (this._minElapsedMS)\n {\n return Math.round(1000 / this._minElapsedMS);\n }\n\n return 0;\n }\n\n set maxFPS(fps: number)\n {\n if (fps === 0)\n {\n this._minElapsedMS = 0;\n }\n else\n {\n // Max must be at least the minFPS\n const maxFPS = Math.max(this.minFPS, fps);\n\n this._minElapsedMS = 1 / (maxFPS / 1000);\n }\n }\n\n /**\n * The shared ticker instance used by {@link AnimatedSprite} and by\n * {@link VideoResource} to update animation frames / video textures.\n *\n * It may also be used by {@link Application} if created with the `sharedTicker` option property set to true.\n *\n * The property {@link ticker.Ticker#autoStart|autoStart} is set to `true` for this instance.\n * Please follow the examples for usage, including how to opt-out of auto-starting the shared ticker.\n * @example\n * import { Ticker } from 'pixi.js';\n *\n * const ticker = Ticker.shared;\n * // Set this to prevent starting this ticker when listeners are added.\n * // By default this is true only for the Ticker.shared instance.\n * ticker.autoStart = false;\n *\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 *\n * // Call this when you are ready for a running shared ticker.\n * ticker.start();\n * @example\n * import { autoDetectRenderer, Container } from 'pixi.js';\n *\n * // You may use the shared ticker to render...\n * const renderer = autoDetectRenderer();\n * const stage = new Container();\n * document.body.appendChild(renderer.view);\n * ticker.add((time) => renderer.render(stage));\n *\n * // Or you can just update it manually.\n * ticker.autoStart = false;\n * ticker.stop();\n * const animate = (time) => {\n * ticker.update(time);\n * renderer.render(stage);\n * requestAnimationFrame(animate);\n * };\n * animate(performance.now());\n * @member {ticker.Ticker}\n * @readonly\n * @static\n */\n static get shared(): Ticker\n {\n if (!Ticker._shared)\n {\n const shared = Ticker._shared = new Ticker();\n\n shared.autoStart = true;\n shared._protected = true;\n }\n\n return Ticker._shared;\n }\n\n /**\n * The system ticker instance used by {@link BasePrepare} for core timing\n * functionality that shouldn't usually need to be paused, unlike the `shared`\n * ticker which drives visual animations and rendering which may want to be paused.\n *\n * The property {@link ticker.Ticker#autoStart|autoStart} is set to `true` for this instance.\n * @member {ticker.Ticker}\n * @readonly\n * @static\n */\n static get system(): Ticker\n {\n if (!Ticker._system)\n {\n const system = Ticker._system = new Ticker();\n\n system.autoStart = true;\n system._protected = true;\n }\n\n return Ticker._system;\n }\n}\n","import { ExtensionType } from '../extensions/Extensions';\nimport { UPDATE_PRIORITY } from '../ticker/const';\nimport { Ticker } from '../ticker/Ticker';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Application options for the {@link app.TickerPluginOptions}.\n * @memberof app\n * @property {boolean} [autoStart=true] - Automatically starts the rendering after the construction.\n * **Note**: 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 * @property {boolean} [sharedTicker=false] - Set`true` to use `Ticker.shared`, `false` to create new ticker.\n * If set to `false`, you cannot register a handler to occur before anything that runs on the shared ticker.\n * The system ticker will always run before both the shared ticker and the app ticker.\n */\nexport interface TickerPluginOptions\n{\n /**\n * Automatically starts the rendering after the construction.\n * **Note**: 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 * @memberof app.ApplicationOptions\n * @default true\n */\n autoStart?: boolean;\n /**\n * Set`true` to use `Ticker.shared`, `false` to create new ticker.\n * If set to `false`, you cannot register a handler to occur before anything that runs on the shared ticker.\n * The system ticker will always run before both the shared ticker and the app ticker.\n * @memberof app.ApplicationOptions\n * @default false\n */\n sharedTicker?: boolean;\n}\n\n/**\n * Middleware for Application's {@link ticker.Ticker} functionality.\n *\n * Adds the following methods to {@link app.Application}:\n * * {@link app.Application#start}\n * * {@link app.Application#stop}\n * * {@link app.Application#ticker}\n * @example\n * import { extensions, TickerPlugin } from 'pixi.js';\n *\n * extensions.add(TickerPlugin);\n * @memberof app\n */\nexport class TickerPlugin\n{\n /** @ignore */\n public static extension: ExtensionMetadata = ExtensionType.Application;\n\n public static start: () => void;\n public static stop: () => void;\n private static _ticker: Ticker;\n public static ticker: Ticker;\n\n /**\n * Initialize the plugin with scope of application instance\n * @static\n * @private\n * @param {object} [options] - See application options\n */\n public static init(options?: PixiMixins.ApplicationOptions): void\n {\n // Set default\n options = Object.assign({\n autoStart: true,\n sharedTicker: false,\n }, options);\n\n // Create ticker setter\n Object.defineProperty(this, 'ticker',\n {\n set(ticker)\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()\n {\n return this._ticker;\n },\n });\n\n /**\n * Convenience method for stopping the render.\n * @method\n * @memberof app.Application\n * @instance\n */\n this.stop = (): void =>\n {\n this._ticker.stop();\n };\n\n /**\n * Convenience method for starting the render.\n * @method\n * @memberof app.Application\n * @instance\n */\n this.start = (): void =>\n {\n this._ticker.start();\n };\n\n /**\n * Internal reference to the ticker.\n * @type {Ticker}\n * @name _ticker\n * @memberof app.Application#\n * @private\n */\n this._ticker = null;\n\n /**\n * Ticker for doing render updates.\n * @type {ticker.Ticker}\n * @name ticker\n * @memberof app.Application#\n * @default Ticker.shared\n */\n this.ticker = options.sharedTicker ? Ticker.shared : new Ticker();\n\n // Start the rendering\n if (options.autoStart)\n {\n this.start();\n }\n }\n\n /**\n * Clean up the ticker, scoped to application.\n * @static\n * @private\n */\n public static destroy(): void\n {\n if (this._ticker)\n {\n const oldTicker = this._ticker;\n\n this.ticker = null;\n oldTicker.destroy();\n }\n }\n}\n","import { extensions } from '../extensions/Extensions';\nimport { ResizePlugin } from './ResizePlugin';\nimport { TickerPlugin } from './TickerPlugin';\n\nextensions.add(ResizePlugin);\nextensions.add(TickerPlugin);\n","import { UPDATE_PRIORITY } from '../ticker/const';\nimport { Ticker } from '../ticker/Ticker';\n\nimport type { EventSystem } from './EventSystem';\n\n/**\n * This class handles automatic firing of PointerEvents\n * in the case where the pointer is stationary for too long.\n * This is to ensure that hit-tests are still run on moving objects.\n * @since 7.2.0\n * @memberof events\n * @class EventsTicker\n */\nclass EventsTickerClass\n{\n /** The event system. */\n public events: EventSystem;\n /** The DOM element to listen to events on. */\n public domElement: HTMLElement;\n /** The frequency that fake events will be fired. */\n public interactionFrequency = 10;\n\n private _deltaTime = 0;\n private _didMove = false;\n private _tickerAdded = false;\n private _pauseUpdate = true;\n\n /**\n * Initializes the event ticker.\n * @param events - The event system.\n */\n public init(events: EventSystem): void\n {\n this.removeTickerListener();\n this.events = events;\n this.interactionFrequency = 10;\n this._deltaTime = 0;\n this._didMove = false;\n this._tickerAdded = false;\n this._pauseUpdate = true;\n }\n\n /** Whether to pause the update checks or not. */\n get pauseUpdate(): boolean\n {\n return this._pauseUpdate;\n }\n\n set pauseUpdate(paused: boolean)\n {\n this._pauseUpdate = paused;\n }\n\n /** Adds the ticker listener. */\n public addTickerListener(): void\n {\n if (this._tickerAdded || !this.domElement)\n {\n return;\n }\n\n Ticker.system.add(this._tickerUpdate, this, UPDATE_PRIORITY.INTERACTION);\n\n this._tickerAdded = true;\n }\n\n /** Removes the ticker listener. */\n public removeTickerListener(): void\n {\n if (!this._tickerAdded)\n {\n return;\n }\n\n Ticker.system.remove(this._tickerUpdate, this);\n\n this._tickerAdded = false;\n }\n\n /** Sets flag to not fire extra events when the user has already moved there mouse */\n public pointerMoved(): void\n {\n this._didMove = true;\n }\n\n /** Updates the state of interactive objects. */\n private _update(): void\n {\n if (!this.domElement || this._pauseUpdate)\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 // eslint-disable-next-line dot-notation\n const rootPointerEvent = this.events['_rootPointerEvent'];\n\n if (this.events.supportsTouchEvents && (rootPointerEvent as PointerEvent).pointerType === 'touch')\n {\n return;\n }\n\n globalThis.document.dispatchEvent(new PointerEvent('pointermove', {\n clientX: rootPointerEvent.clientX,\n clientY: rootPointerEvent.clientY,\n pointerType: rootPointerEvent.pointerType,\n pointerId: rootPointerEvent.pointerId,\n }));\n }\n\n /**\n * Updates the state of interactive objects if at least {@link interactionFrequency}\n * milliseconds have passed since the last invocation.\n *\n * Invoked by a throttled ticker update from {@link Ticker.system}.\n * @param ticker - The throttled ticker.\n */\n private _tickerUpdate(ticker: Ticker): void\n {\n this._deltaTime += ticker.deltaTime;\n\n if (this._deltaTime < this.interactionFrequency)\n {\n return;\n }\n\n this._deltaTime = 0;\n\n this._update();\n }\n}\n\nexport const EventsTicker = new EventsTickerClass();\n","import { Point } from '../maths/point/Point';\nimport { FederatedEvent } from './FederatedEvent';\n\nimport type { PointData } from '../maths/point/PointData';\nimport type { Container } from '../scene/container/Container';\nimport type { PixiTouch } from './FederatedEvent';\n\n/**\n * A {@link FederatedEvent} for mouse events.\n * @memberof events\n */\nexport class FederatedMouseEvent extends FederatedEvent<\nMouseEvent | PointerEvent | PixiTouch\n> implements MouseEvent\n{\n /** Whether the \"alt\" key was pressed when this mouse event occurred. */\n public altKey: boolean;\n\n /** The specific button that was pressed in this mouse event. */\n public button: number;\n\n /** The button depressed when this event occurred. */\n public buttons: number;\n\n /** Whether the \"control\" key was pressed when this mouse event occurred. */\n public ctrlKey: boolean;\n\n /** Whether the \"meta\" key was pressed when this mouse event occurred. */\n public metaKey: boolean;\n\n /** This is currently not implemented in the Federated Events API. */\n public relatedTarget: EventTarget;\n\n /** Whether the \"shift\" key was pressed when this mouse event occurred. */\n public shiftKey: boolean;\n\n /** The coordinates of the mouse event relative to the canvas. */\n public client: Point = new Point();\n\n /** @readonly */\n public get clientX(): number { return this.client.x; }\n\n /** @readonly */\n public get clientY(): number { return this.client.y; }\n\n /**\n * Alias for {@link FederatedMouseEvent.clientX this.clientX}.\n * @readonly\n */\n get x(): number { return this.clientX; }\n\n /**\n * Alias for {@link FederatedMouseEvent.clientY this.clientY}.\n * @readonly\n */\n get y(): number { return this.clientY; }\n\n /** This is the number of clicks that occurs in 200ms/click of each other. */\n public detail: number;\n\n /** The movement in this pointer relative to the last `mousemove` event. */\n public movement: Point = new Point();\n\n /** @readonly */\n get movementX(): number { return this.movement.x; }\n\n /** @readonly */\n get movementY(): number { return this.movement.y; }\n\n /** The offset of the pointer coordinates w.r.t. target Container in world space. This is not supported at the moment. */\n public offset: Point = new Point();\n\n /** @readonly */\n get offsetX(): number { return this.offset.x; }\n\n /** @readonly */\n get offsetY(): number { return this.offset.y; }\n\n /** The pointer coordinates in world space. */\n public global: Point = new Point();\n\n /** @readonly */\n get globalX(): number { return this.global.x; }\n\n /** @readonly */\n get globalY(): number { return this.global.y; }\n\n /**\n * The pointer coordinates in the renderer's {@link Renderer.screen screen}. This has slightly\n * different semantics than native PointerEvent screenX/screenY.\n */\n public screen: Point = new Point();\n\n /**\n * The pointer coordinates in the renderer's screen. Alias for {@code screen.x}.\n * @readonly\n */\n get screenX(): number { return this.screen.x; }\n\n /**\n * The pointer coordinates in the renderer's screen. Alias for {@code screen.y}.\n * @readonly\n */\n get screenY(): number { return this.screen.y; }\n\n /**\n * This will return the local coordinates of the specified container for this InteractionData\n * @param {Container} container - The Container that you would like the local\n * coords off\n * @param {PointData} point - A Point object in which to store the value, optional (otherwise\n * will create a new point)\n * @param {PointData} globalPos - A Point object containing your custom global coords, optional\n * (otherwise will use the current global coords)\n * @returns - A point containing the coordinates of the InteractionData position relative\n * to the Container\n */\n public getLocalPosition

(container: Container, point?: P, globalPos?: PointData): P\n {\n return container.worldTransform.applyInverse

(globalPos || this.global, point);\n }\n\n /**\n * Whether the modifier key was pressed when this event natively occurred.\n * @param key - The modifier key.\n */\n public getModifierState(key: string): boolean\n {\n return 'getModifierState' in this.nativeEvent && this.nativeEvent.getModifierState(key);\n }\n\n /**\n * Not supported.\n * @param _typeArg\n * @param _canBubbleArg\n * @param _cancelableArg\n * @param _viewArg\n * @param _detailArg\n * @param _screenXArg\n * @param _screenYArg\n * @param _clientXArg\n * @param _clientYArg\n * @param _ctrlKeyArg\n * @param _altKeyArg\n * @param _shiftKeyArg\n * @param _metaKeyArg\n * @param _buttonArg\n * @param _relatedTargetArg\n * @deprecated since 7.0.0\n */\n // eslint-disable-next-line max-params\n public initMouseEvent(\n _typeArg: string,\n _canBubbleArg: boolean,\n _cancelableArg: boolean,\n _viewArg: Window,\n _detailArg: number,\n _screenXArg: number,\n _screenYArg: number,\n _clientXArg: number,\n _clientYArg: number,\n _ctrlKeyArg: boolean,\n _altKeyArg: boolean,\n _shiftKeyArg: boolean,\n _metaKeyArg: boolean,\n _buttonArg: number,\n _relatedTargetArg: EventTarget\n ): void\n {\n throw new Error('Method not implemented.');\n }\n}\n","import { FederatedMouseEvent } from './FederatedMouseEvent';\n\n/**\n * A {@link FederatedEvent} for pointer events.\n * @memberof events\n */\nexport class FederatedPointerEvent extends FederatedMouseEvent implements PointerEvent\n{\n /**\n * The unique identifier of the pointer.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId}\n */\n public pointerId: number;\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 */\n public 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 */\n public height = 0;\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 */\n public isPrimary = false;\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 */\n public pointerType: string;\n\n /**\n * Pressure applied by the pointing device during the event.\n *s\n * A Touch's force property will be represented by this value.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure\n */\n public pressure: number;\n\n /**\n * Barrel pressure on a stylus pointer.\n * @see https://w3c.github.io/pointerevents/#pointerevent-interface\n */\n public tangentialPressure: number;\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 */\n public tiltX: number;\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 */\n public tiltY: number;\n\n /**\n * Twist of a stylus pointer.\n * @see https://w3c.github.io/pointerevents/#pointerevent-interface\n */\n public twist: number;\n\n /** This is the number of clicks that occurs in 200ms/click of each other. */\n public detail: number;\n\n // Only included for completeness for now\n public getCoalescedEvents(): PointerEvent[]\n {\n if (this.type === 'pointermove' || this.type === 'mousemove' || this.type === 'touchmove')\n {\n return [this];\n }\n\n return [];\n }\n\n // Only included for completeness for now\n public getPredictedEvents(): PointerEvent[]\n {\n throw new Error('getPredictedEvents is not supported!');\n }\n}\n","import { FederatedMouseEvent } from './FederatedMouseEvent';\n\n/**\n * A {@link FederatedEvent} for wheel events.\n * @memberof events\n */\nexport class FederatedWheelEvent extends FederatedMouseEvent implements WheelEvent\n{\n /**\n * The units of `deltaX`, `deltaY`, and `deltaZ`. This is one of `DOM_DELTA_LINE`,\n * `DOM_DELTA_PAGE`, `DOM_DELTA_PIXEL`.\n */\n public deltaMode: number;\n\n /** Horizontal scroll amount */\n public deltaX: number;\n\n /** Vertical scroll amount */\n public deltaY: number;\n\n /** z-axis scroll amount. */\n public deltaZ: number;\n\n /** Units specified in pixels. */\n public static readonly DOM_DELTA_PIXEL = 0;\n\n /** Units specified in pixels. */\n public readonly DOM_DELTA_PIXEL = 0;\n\n /** Units specified in lines. */\n public static readonly DOM_DELTA_LINE = 1;\n\n /** Units specified in lines. */\n public readonly DOM_DELTA_LINE = 1;\n\n /** Units specified in pages. */\n public static readonly DOM_DELTA_PAGE = 2;\n\n /** Units specified in pages. */\n public readonly DOM_DELTA_PAGE = 2;\n}\n","import EventEmitter from 'eventemitter3';\nimport { Point } from '../maths/point/Point';\nimport { warn } from '../utils/logging/warn';\nimport { EventsTicker } from './EventTicker';\nimport { FederatedMouseEvent } from './FederatedMouseEvent';\nimport { FederatedPointerEvent } from './FederatedPointerEvent';\nimport { FederatedWheelEvent } from './FederatedWheelEvent';\n\nimport type { Renderable } from '../rendering/renderers/shared/Renderable';\nimport type { Container } from '../scene/container/Container';\nimport type { EmitterListeners, TrackingData } from './EventBoundaryTypes';\nimport type { FederatedEvent } from './FederatedEvent';\nimport type {\n Cursor, EventMode, FederatedEventHandler,\n} from './FederatedEventTarget';\n\n// The maximum iterations used in propagation. This prevent infinite loops.\nconst PROPAGATION_LIMIT = 2048;\n\nconst tempHitLocation = new Point();\nconst tempLocalMapping = new Point();\n\n/**\n * Event boundaries are \"barriers\" where events coming from an upstream scene are modified before downstream propagation.\n *\n * ## Root event boundary\n *\n * The {@link EventSystem#rootBoundary rootBoundary} handles events coming from the <canvas />.\n * {@link EventSystem} handles the normalization from native {@link https://dom.spec.whatwg.org/#event Events}\n * into {@link FederatedEvent FederatedEvents}. The rootBoundary then does the hit-testing and event dispatch\n * for the upstream normalized event.\n *\n * ## Additional event boundaries\n *\n * An additional event boundary may be desired within an application's scene graph. For example, if a portion of the scene is\n * is flat with many children at one level - a spatial hash maybe needed to accelerate hit testing. In this scenario, the\n * container can be detached from the scene and glued using a custom event boundary.\n *\n * ```ts\n * import { Container } from 'pixi.js';\n * import { EventBoundary } from 'pixi.js';\n * import { SpatialHash } from 'pixi-spatial-hash';\n *\n * class HashedHitTestingEventBoundary\n * {\n * private spatialHash: SpatialHash;\n *\n * constructor(scene: Container, spatialHash: SpatialHash)\n * {\n * super(scene);\n * this.spatialHash = spatialHash;\n * }\n *\n * hitTestRecursive(...)\n * {\n * // TODO: If target === this.rootTarget, then use spatial hash to get a\n * // list of possible children that match the given (x,y) coordinates.\n * }\n * }\n *\n * class VastScene extends Container\n * {\n * protected eventBoundary: EventBoundary;\n * protected scene: Container;\n * protected spatialHash: SpatialHash;\n *\n * constructor()\n * {\n * this.scene = new Container();\n * this.spatialHash = new SpatialHash();\n * this.eventBoundary = new HashedHitTestingEventBoundary(this.scene, this.spatialHash);\n *\n * // Populate this.scene with a ton of children, while updating this.spatialHash\n * }\n * }\n * ```\n * @memberof events\n */\nexport class EventBoundary\n{\n /**\n * The root event-target residing below the event boundary.\n * All events are dispatched trickling down and bubbling up to this `rootTarget`.\n */\n public rootTarget: Container;\n\n /**\n * Emits events after they were dispatched into the scene graph.\n *\n * This can be used for global events listening, regardless of the scene graph being used. It should\n * not be used by interactive libraries for normal use.\n *\n * Special events that do not bubble all the way to the root target are not emitted from here,\n * e.g. pointerenter, pointerleave, click.\n */\n public dispatch: EventEmitter = new EventEmitter();\n\n /** The cursor preferred by the event targets underneath this boundary. */\n public cursor: Cursor | string;\n\n /**\n * This flag would emit `pointermove`, `touchmove`, and `mousemove` events on all Containers.\n *\n * The `moveOnAll` semantics mirror those of earlier versions of PixiJS. This was disabled in favor of\n * the Pointer Event API's approach.\n */\n public moveOnAll = false;\n\n /** Enables the global move events. `globalpointermove`, `globaltouchmove`, and `globalmousemove` */\n public enableGlobalMoveEvents = true;\n\n /**\n * Maps event types to forwarding handles for them.\n *\n * {@link EventBoundary EventBoundary} provides mapping for \"pointerdown\", \"pointermove\",\n * \"pointerout\", \"pointerleave\", \"pointerover\", \"pointerup\", and \"pointerupoutside\" by default.\n * @see EventBoundary#addEventMapping\n */\n protected mappingTable: Record void,\n priority: number\n }>>;\n\n /**\n * State object for mapping methods.\n * @see EventBoundary#trackingData\n */\n protected mappingState: Record = {\n trackingData: {}\n };\n\n /**\n * The event pool maps event constructors to an free pool of instances of those specific events.\n * @see EventBoundary#allocateEvent\n * @see EventBoundary#freeEvent\n */\n protected eventPool: Map = new Map();\n\n /** Every interactive element gathered from the scene. Only used in `pointermove` */\n private readonly _allInteractiveElements: Container[] = [];\n /** Every element that passed the hit test. Only used in `pointermove` */\n private _hitElements: Container[] = [];\n /** Whether or not to collect all the interactive elements from the scene. Enabled in `pointermove` */\n private _isPointerMoveEvent = false;\n\n /**\n * @param rootTarget - The holder of the event boundary.\n */\n constructor(rootTarget?: Container)\n {\n this.rootTarget = rootTarget;\n\n this.hitPruneFn = this.hitPruneFn.bind(this);\n this.hitTestFn = this.hitTestFn.bind(this);\n this.mapPointerDown = this.mapPointerDown.bind(this);\n this.mapPointerMove = this.mapPointerMove.bind(this);\n this.mapPointerOut = this.mapPointerOut.bind(this);\n this.mapPointerOver = this.mapPointerOver.bind(this);\n this.mapPointerUp = this.mapPointerUp.bind(this);\n this.mapPointerUpOutside = this.mapPointerUpOutside.bind(this);\n this.mapWheel = this.mapWheel.bind(this);\n\n this.mappingTable = {};\n this.addEventMapping('pointerdown', this.mapPointerDown);\n this.addEventMapping('pointermove', this.mapPointerMove);\n this.addEventMapping('pointerout', this.mapPointerOut);\n this.addEventMapping('pointerleave', this.mapPointerOut);\n this.addEventMapping('pointerover', this.mapPointerOver);\n this.addEventMapping('pointerup', this.mapPointerUp);\n this.addEventMapping('pointerupoutside', this.mapPointerUpOutside);\n this.addEventMapping('wheel', this.mapWheel);\n }\n\n /**\n * Adds an event mapping for the event `type` handled by `fn`.\n *\n * Event mappings can be used to implement additional or custom events. They take an event\n * coming from the upstream scene (or directly from the {@link EventSystem}) and dispatch new downstream events\n * generally trickling down and bubbling up to {@link EventBoundary.rootTarget this.rootTarget}.\n *\n * To modify the semantics of existing events, the built-in mapping methods of EventBoundary should be overridden\n * instead.\n * @param type - The type of upstream event to map.\n * @param fn - The mapping method. The context of this function must be bound manually, if desired.\n */\n public addEventMapping(type: string, fn: (e: FederatedEvent) => void): void\n {\n if (!this.mappingTable[type])\n {\n this.mappingTable[type] = [];\n }\n\n this.mappingTable[type].push({\n fn,\n priority: 0,\n });\n this.mappingTable[type].sort((a, b) => a.priority - b.priority);\n }\n\n /**\n * Dispatches the given event\n * @param e - The event to dispatch.\n * @param type - The type of event to dispatch. Defaults to `e.type`.\n */\n public dispatchEvent(e: FederatedEvent, type?: string): void\n {\n e.propagationStopped = false;\n e.propagationImmediatelyStopped = false;\n\n this.propagate(e, type);\n this.dispatch.emit(type || e.type, e);\n }\n\n /**\n * Maps the given upstream event through the event boundary and propagates it downstream.\n * @param e - The event to map.\n */\n public mapEvent(e: FederatedEvent): void\n {\n if (!this.rootTarget)\n {\n return;\n }\n\n const mappers = this.mappingTable[e.type];\n\n if (mappers)\n {\n for (let i = 0, j = mappers.length; i < j; i++)\n {\n mappers[i].fn(e);\n }\n }\n else\n {\n // #if _DEBUG\n warn(`[EventBoundary]: Event mapping not defined for ${e.type}`);\n // #endif\n }\n }\n\n /**\n * Finds the Container that is the target of a event at the given coordinates.\n *\n * The passed (x,y) coordinates are in the world space above this event boundary.\n * @param x - The x coordinate of the event.\n * @param y - The y coordinate of the event.\n */\n public hitTest(\n x: number,\n y: number,\n ): Container\n {\n EventsTicker.pauseUpdate = true;\n // if we are using global move events, we need to hit test the whole scene graph\n const useMove = this._isPointerMoveEvent && this.enableGlobalMoveEvents;\n const fn = useMove ? 'hitTestMoveRecursive' : 'hitTestRecursive';\n const invertedPath = this[fn](\n this.rootTarget,\n this.rootTarget.eventMode,\n tempHitLocation.set(x, y),\n this.hitTestFn,\n this.hitPruneFn,\n );\n\n return invertedPath && invertedPath[0];\n }\n\n /**\n * Propagate the passed event from from {@link EventBoundary.rootTarget this.rootTarget} to its\n * target {@code e.target}.\n * @param e - The event to propagate.\n * @param type - The type of event to propagate. Defaults to `e.type`.\n */\n public propagate(e: FederatedEvent, type?: string): void\n {\n if (!e.target)\n {\n // This usually occurs when the scene graph is not interactive.\n return;\n }\n\n const composedPath = e.composedPath();\n\n // Capturing phase\n e.eventPhase = e.CAPTURING_PHASE;\n\n for (let i = 0, j = composedPath.length - 1; i < j; i++)\n {\n e.currentTarget = composedPath[i];\n\n this.notifyTarget(e, type);\n\n if (e.propagationStopped || e.propagationImmediatelyStopped) return;\n }\n\n // At target phase\n e.eventPhase = e.AT_TARGET;\n e.currentTarget = e.target;\n\n this.notifyTarget(e, type);\n\n if (e.propagationStopped || e.propagationImmediatelyStopped) return;\n\n // Bubbling phase\n e.eventPhase = e.BUBBLING_PHASE;\n\n for (let i = composedPath.length - 2; i >= 0; i--)\n {\n e.currentTarget = composedPath[i];\n\n this.notifyTarget(e, type);\n\n if (e.propagationStopped || e.propagationImmediatelyStopped) return;\n }\n }\n\n /**\n * Emits the event {@code e} to all interactive containers. The event is propagated in the bubbling phase always.\n *\n * This is used in the `globalpointermove` event.\n * @param e - The emitted event.\n * @param type - The listeners to notify.\n * @param targets - The targets to notify.\n */\n public all(e: FederatedEvent, type?: string | string[], targets = this._allInteractiveElements): void\n {\n if (targets.length === 0) return;\n\n e.eventPhase = e.BUBBLING_PHASE;\n\n const events = Array.isArray(type) ? type : [type];\n\n // loop through all interactive elements and notify them of the event\n // loop through targets backwards\n for (let i = targets.length - 1; i >= 0; i--)\n {\n events.forEach((event) =>\n {\n e.currentTarget = targets[i];\n this.notifyTarget(e, event);\n });\n }\n }\n\n /**\n * Finds the propagation path from {@link EventBoundary.rootTarget rootTarget} to the passed\n * {@code target}. The last element in the path is {@code target}.\n * @param target - The target to find the propagation path to.\n */\n public propagationPath(target: Container): Container[]\n {\n const propagationPath = [target];\n\n for (let i = 0; i < PROPAGATION_LIMIT && (target !== this.rootTarget && target.parent); i++)\n {\n if (!target.parent)\n {\n throw new Error('Cannot find propagation path to disconnected target');\n }\n\n propagationPath.push(target.parent);\n\n target = target.parent;\n }\n\n propagationPath.reverse();\n\n return propagationPath;\n }\n\n protected hitTestMoveRecursive(\n currentTarget: Container,\n eventMode: EventMode,\n location: Point,\n testFn: (object: Container, pt: Point) => boolean,\n pruneFn: (object: Container, pt: Point) => boolean,\n ignore = false\n ): Container[]\n {\n let shouldReturn = false;\n\n // only bail out early if it is not interactive\n if (this._interactivePrune(currentTarget)) return null;\n\n if (currentTarget.eventMode === 'dynamic' || eventMode === 'dynamic')\n {\n EventsTicker.pauseUpdate = false;\n }\n\n if (currentTarget.interactiveChildren && currentTarget.children)\n {\n const children = currentTarget.children;\n\n for (let i = children.length - 1; i >= 0; i--)\n {\n const child = children[i] as Container;\n\n const nestedHit = this.hitTestMoveRecursive(\n child,\n this._isInteractive(eventMode) ? eventMode : child.eventMode,\n location,\n testFn,\n pruneFn,\n ignore || pruneFn(currentTarget, location)\n );\n\n if (nestedHit)\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 (nestedHit.length > 0 && !nestedHit[nestedHit.length - 1].parent)\n {\n continue;\n }\n\n // Only add the current hit-test target to the hit-test chain if the chain\n // has already started (i.e. the event target has been found) or if the current\n // target is interactive (i.e. it becomes the event target).\n const isInteractive = currentTarget.isInteractive();\n\n if (nestedHit.length > 0 || isInteractive)\n {\n if (isInteractive) this._allInteractiveElements.push(currentTarget);\n nestedHit.push(currentTarget);\n }\n\n // store all hit elements to be returned once we have traversed the whole tree\n if (this._hitElements.length === 0) this._hitElements = nestedHit;\n\n shouldReturn = true;\n }\n }\n }\n\n const isInteractiveMode = this._isInteractive(eventMode);\n const isInteractiveTarget = currentTarget.isInteractive();\n\n if (isInteractiveTarget && isInteractiveTarget) this._allInteractiveElements.push(currentTarget);\n\n // we don't carry on hit testing something once we have found a hit,\n // now only care about gathering the interactive elements\n if (ignore || this._hitElements.length > 0) return null;\n\n if (shouldReturn) return this._hitElements as Container[];\n\n // Finally, hit test this Container itself.\n if (isInteractiveMode && (!pruneFn(currentTarget, location) && testFn(currentTarget, location)))\n {\n // The current hit-test target is the event's target only if it is interactive. Otherwise,\n // the first interactive ancestor will be the event's target.\n return isInteractiveTarget ? [currentTarget] : [];\n }\n\n return null;\n }\n\n /**\n * Recursive implementation for {@link EventBoundary.hitTest hitTest}.\n * @param currentTarget - The Container that is to be hit tested.\n * @param eventMode - The event mode for the `currentTarget` or one of its parents.\n * @param location - The location that is being tested for overlap.\n * @param testFn - Callback that determines whether the target passes hit testing. This callback\n * can assume that `pruneFn` failed to prune the container.\n * @param pruneFn - Callback that determiness whether the target and all of its children\n * cannot pass the hit test. It is used as a preliminary optimization to prune entire subtrees\n * of the scene graph.\n * @returns An array holding the hit testing target and all its ancestors in order. The first element\n * is the target itself and the last is {@link EventBoundary.rootTarget rootTarget}. This is the opposite\n * order w.r.t. the propagation path. If no hit testing target is found, null is returned.\n */\n protected hitTestRecursive(\n currentTarget: Container,\n eventMode: EventMode,\n location: Point,\n testFn: (object: Container, pt: Point) => boolean,\n pruneFn: (object: Container, pt: Point) => boolean\n ): Container[]\n {\n // Attempt to prune this Container and its subtree as an optimization.\n if (this._interactivePrune(currentTarget) || pruneFn(currentTarget, location))\n {\n return null;\n }\n if (currentTarget.eventMode === 'dynamic' || eventMode === 'dynamic')\n {\n EventsTicker.pauseUpdate = false;\n }\n\n // Find a child that passes the hit testing and return one, if any.\n if (currentTarget.interactiveChildren && currentTarget.children)\n {\n const children = currentTarget.children;\n const relativeLocation = location;\n\n for (let i = children.length - 1; i >= 0; i--)\n {\n const child = children[i] as Container;\n\n const nestedHit = this.hitTestRecursive(\n child,\n this._isInteractive(eventMode) ? eventMode : child.eventMode,\n relativeLocation,\n testFn,\n pruneFn\n );\n\n if (nestedHit)\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 (nestedHit.length > 0 && !nestedHit[nestedHit.length - 1].parent)\n {\n continue;\n }\n\n // Only add the current hit-test target to the hit-test chain if the chain\n // has already started (i.e. the event target has been found) or if the current\n // target is interactive (i.e. it becomes the event target).\n const isInteractive = currentTarget.isInteractive();\n\n if (nestedHit.length > 0 || isInteractive) nestedHit.push(currentTarget);\n\n return nestedHit;\n }\n }\n }\n\n const isInteractiveMode = this._isInteractive(eventMode);\n const isInteractiveTarget = currentTarget.isInteractive();\n\n // Finally, hit test this Container itself.\n if (isInteractiveMode && testFn(currentTarget, location))\n {\n // The current hit-test target is the event's target only if it is interactive. Otherwise,\n // the first interactive ancestor will be the event's target.\n return isInteractiveTarget ? [currentTarget] : [];\n }\n\n return null;\n }\n\n private _isInteractive(int: EventMode): int is 'static' | 'dynamic'\n {\n return int === 'static' || int === 'dynamic';\n }\n\n private _interactivePrune(container: Container): boolean\n {\n // If container is a mask, invisible, or not renderable then it cannot be hit directly.\n if (!container || !container.visible || !container.renderable || !container.includeInBuild || !container.measurable)\n {\n return true;\n }\n\n // If this Container is none then it cannot be hit by anything.\n if (container.eventMode === 'none')\n {\n return true;\n }\n\n // If this Container is passive and it has no interactive children then it cannot be hit\n if (container.eventMode === 'passive' && !container.interactiveChildren)\n {\n return true;\n }\n\n return false;\n }\n\n /**\n * Checks whether the container or any of its children cannot pass the hit test at all.\n *\n * {@link EventBoundary}'s implementation uses the {@link Container.hitArea hitArea}\n * and {@link Container._maskEffect} for pruning.\n * @param container - The container to prune.\n * @param location - The location to test for overlap.\n */\n protected hitPruneFn(container: Container, location: Point): boolean\n {\n if (container.hitArea)\n {\n container.worldTransform.applyInverse(location, tempLocalMapping);\n\n if (!container.hitArea.contains(tempLocalMapping.x, tempLocalMapping.y))\n {\n return true;\n }\n }\n\n if (container.effects && container.effects.length)\n {\n for (let i = 0; i < container.effects.length; i++)\n {\n const effect = container.effects[i];\n\n if (effect.containsPoint)\n {\n const effectContainsPoint = effect.containsPoint(location, this.hitTestFn);\n\n if (!effectContainsPoint)\n {\n return true;\n }\n }\n }\n }\n\n return false;\n }\n\n /**\n * Checks whether the container passes hit testing for the given location.\n * @param container - The container to test.\n * @param location - The location to test for overlap.\n * @returns - Whether `container` passes hit testing for `location`.\n */\n protected hitTestFn(container: Container, location: Point): boolean\n {\n // If the container failed pruning with a hitArea, then it must pass it.\n if (container.hitArea)\n {\n return true;\n }\n\n if ((container as Renderable)?.containsPoint)\n {\n container.worldTransform.applyInverse(location, tempLocalMapping);\n\n return (container as Renderable).containsPoint(tempLocalMapping) as boolean;\n }\n\n // TODO: Should we hit test based on bounds?\n\n return false;\n }\n\n /**\n * Notify all the listeners to the event's `currentTarget`.\n *\n * If the `currentTarget` contains the property `on`, then it is called here,\n * simulating the behavior from version 6.x and prior.\n * @param e - The event passed to the target.\n * @param type - The type of event to notify. Defaults to `e.type`.\n */\n protected notifyTarget(e: FederatedEvent, type?: string): void\n {\n if (!e.currentTarget.isInteractive())\n {\n return;\n }\n\n type = type ?? e.type;\n\n // call the `on${type}` for the current target if it exists\n const handlerKey = `on${type}` as keyof Container;\n\n (e.currentTarget[handlerKey] as FederatedEventHandler)?.(e);\n\n const key = e.eventPhase === e.CAPTURING_PHASE || e.eventPhase === e.AT_TARGET ? `${type}capture` : type;\n\n this._notifyListeners(e, key);\n\n if (e.eventPhase === e.AT_TARGET)\n {\n this._notifyListeners(e, type);\n }\n }\n\n /**\n * Maps the upstream `pointerdown` events to a downstream `pointerdown` event.\n *\n * `touchstart`, `rightdown`, `mousedown` events are also dispatched for specific pointer types.\n * @param from - The upstream `pointerdown` event.\n */\n protected mapPointerDown(from: FederatedEvent): void\n {\n if (!(from instanceof FederatedPointerEvent))\n {\n // #if _DEBUG\n warn('EventBoundary cannot map a non-pointer event as a pointer event');\n // #endif\n\n return;\n }\n\n const e = this.createPointerEvent(from);\n\n this.dispatchEvent(e, 'pointerdown');\n\n if (e.pointerType === 'touch')\n {\n this.dispatchEvent(e, 'touchstart');\n }\n else if (e.pointerType === 'mouse' || e.pointerType === 'pen')\n {\n const isRightButton = e.button === 2;\n\n this.dispatchEvent(e, isRightButton ? 'rightdown' : 'mousedown');\n }\n\n const trackingData = this.trackingData(from.pointerId);\n\n trackingData.pressTargetsByButton[from.button] = e.composedPath();\n\n this.freeEvent(e);\n }\n\n /**\n * Maps the upstream `pointermove` to downstream `pointerout`, `pointerover`, and `pointermove` events, in that order.\n *\n * The tracking data for the specific pointer has an updated `overTarget`. `mouseout`, `mouseover`,\n * `mousemove`, and `touchmove` events are fired as well for specific pointer types.\n * @param from - The upstream `pointermove` event.\n */\n protected mapPointerMove(from: FederatedEvent): void\n {\n if (!(from instanceof FederatedPointerEvent))\n {\n // #if _DEBUG\n warn('EventBoundary cannot map a non-pointer event as a pointer event');\n // #endif\n\n return;\n }\n\n this._allInteractiveElements.length = 0;\n this._hitElements.length = 0;\n this._isPointerMoveEvent = true;\n const e = this.createPointerEvent(from);\n\n this._isPointerMoveEvent = false;\n const isMouse = e.pointerType === 'mouse' || e.pointerType === 'pen';\n const trackingData = this.trackingData(from.pointerId);\n const outTarget = this.findMountedTarget(trackingData.overTargets);\n\n // First pointerout/pointerleave\n if (trackingData.overTargets?.length > 0 && outTarget !== e.target)\n {\n // pointerout always occurs on the overTarget when the pointer hovers over another element.\n const outType = from.type === 'mousemove' ? 'mouseout' : 'pointerout';\n const outEvent = this.createPointerEvent(from, outType, outTarget);\n\n this.dispatchEvent(outEvent, 'pointerout');\n if (isMouse) this.dispatchEvent(outEvent, 'mouseout');\n\n // If the pointer exits overTarget and its descendants, then a pointerleave event is also fired. This event\n // is dispatched to all ancestors that no longer capture the pointer.\n if (!e.composedPath().includes(outTarget))\n {\n const leaveEvent = this.createPointerEvent(from, 'pointerleave', outTarget);\n\n leaveEvent.eventPhase = leaveEvent.AT_TARGET;\n\n while (leaveEvent.target && !e.composedPath().includes(leaveEvent.target))\n {\n leaveEvent.currentTarget = leaveEvent.target;\n\n this.notifyTarget(leaveEvent);\n if (isMouse) this.notifyTarget(leaveEvent, 'mouseleave');\n\n leaveEvent.target = leaveEvent.target.parent;\n }\n\n this.freeEvent(leaveEvent);\n }\n\n this.freeEvent(outEvent);\n }\n\n // Then pointerover\n if (outTarget !== e.target)\n {\n // pointerover always occurs on the new overTarget\n const overType = from.type === 'mousemove' ? 'mouseover' : 'pointerover';\n const overEvent = this.clonePointerEvent(e, overType);// clone faster\n\n this.dispatchEvent(overEvent, 'pointerover');\n if (isMouse) this.dispatchEvent(overEvent, 'mouseover');\n\n // Probe whether the newly hovered Container is an ancestor of the original overTarget.\n let overTargetAncestor = outTarget?.parent;\n\n while (overTargetAncestor && overTargetAncestor !== this.rootTarget.parent)\n {\n if (overTargetAncestor === e.target) break;\n\n overTargetAncestor = overTargetAncestor.parent;\n }\n\n // The pointer has entered a non-ancestor of the original overTarget. This means we need a pointerentered\n // event.\n const didPointerEnter = !overTargetAncestor || overTargetAncestor === this.rootTarget.parent;\n\n if (didPointerEnter)\n {\n const enterEvent = this.clonePointerEvent(e, 'pointerenter');\n\n enterEvent.eventPhase = enterEvent.AT_TARGET;\n\n while (enterEvent.target\n && enterEvent.target !== outTarget\n && enterEvent.target !== this.rootTarget.parent)\n {\n enterEvent.currentTarget = enterEvent.target;\n\n this.notifyTarget(enterEvent);\n if (isMouse) this.notifyTarget(enterEvent, 'mouseenter');\n\n enterEvent.target = enterEvent.target.parent;\n }\n\n this.freeEvent(enterEvent);\n }\n\n this.freeEvent(overEvent);\n }\n\n const allMethods: string[] = [];\n const allowGlobalPointerEvents = this.enableGlobalMoveEvents ?? true;\n\n this.moveOnAll ? allMethods.push('pointermove') : this.dispatchEvent(e, 'pointermove');\n allowGlobalPointerEvents && allMethods.push('globalpointermove');\n\n // Then pointermove\n if (e.pointerType === 'touch')\n {\n this.moveOnAll ? allMethods.splice(1, 0, 'touchmove') : this.dispatchEvent(e, 'touchmove');\n allowGlobalPointerEvents && allMethods.push('globaltouchmove');\n }\n\n if (isMouse)\n {\n this.moveOnAll ? allMethods.splice(1, 0, 'mousemove') : this.dispatchEvent(e, 'mousemove');\n allowGlobalPointerEvents && allMethods.push('globalmousemove');\n this.cursor = e.target?.cursor;\n }\n\n if (allMethods.length > 0)\n {\n this.all(e, allMethods);\n }\n this._allInteractiveElements.length = 0;\n this._hitElements.length = 0;\n\n trackingData.overTargets = e.composedPath();\n\n this.freeEvent(e);\n }\n\n /**\n * Maps the upstream `pointerover` to downstream `pointerover` and `pointerenter` events, in that order.\n *\n * The tracking data for the specific pointer gets a new `overTarget`.\n * @param from - The upstream `pointerover` event.\n */\n protected mapPointerOver(from: FederatedEvent): void\n {\n if (!(from instanceof FederatedPointerEvent))\n {\n // #if _DEBUG\n warn('EventBoundary cannot map a non-pointer event as a pointer event');\n // #endif\n\n return;\n }\n\n const trackingData = this.trackingData(from.pointerId);\n const e = this.createPointerEvent(from);\n const isMouse = e.pointerType === 'mouse' || e.pointerType === 'pen';\n\n this.dispatchEvent(e, 'pointerover');\n if (isMouse) this.dispatchEvent(e, 'mouseover');\n if (e.pointerType === 'mouse') this.cursor = e.target?.cursor;\n\n // pointerenter events must be fired since the pointer entered from upstream.\n const enterEvent = this.clonePointerEvent(e, 'pointerenter');\n\n enterEvent.eventPhase = enterEvent.AT_TARGET;\n\n while (enterEvent.target && enterEvent.target !== this.rootTarget.parent)\n {\n enterEvent.currentTarget = enterEvent.target;\n\n this.notifyTarget(enterEvent);\n if (isMouse) this.notifyTarget(enterEvent, 'mouseenter');\n\n enterEvent.target = enterEvent.target.parent;\n }\n\n trackingData.overTargets = e.composedPath();\n\n this.freeEvent(e);\n this.freeEvent(enterEvent);\n }\n\n /**\n * Maps the upstream `pointerout` to downstream `pointerout`, `pointerleave` events, in that order.\n *\n * The tracking data for the specific pointer is cleared of a `overTarget`.\n * @param from - The upstream `pointerout` event.\n */\n protected mapPointerOut(from: FederatedEvent): void\n {\n if (!(from instanceof FederatedPointerEvent))\n {\n // #if _DEBUG\n warn('EventBoundary cannot map a non-pointer event as a pointer event');\n // #endif\n\n return;\n }\n\n const trackingData = this.trackingData(from.pointerId);\n\n if (trackingData.overTargets)\n {\n const isMouse = from.pointerType === 'mouse' || from.pointerType === 'pen';\n const outTarget = this.findMountedTarget(trackingData.overTargets);\n\n // pointerout first\n const outEvent = this.createPointerEvent(from, 'pointerout', outTarget);\n\n this.dispatchEvent(outEvent);\n if (isMouse) this.dispatchEvent(outEvent, 'mouseout');\n\n // pointerleave(s) are also dispatched b/c the pointer must've left rootTarget and its descendants to\n // get an upstream pointerout event (upstream events do not know rootTarget has descendants).\n const leaveEvent = this.createPointerEvent(from, 'pointerleave', outTarget);\n\n leaveEvent.eventPhase = leaveEvent.AT_TARGET;\n\n while (leaveEvent.target && leaveEvent.target !== this.rootTarget.parent)\n {\n leaveEvent.currentTarget = leaveEvent.target;\n\n this.notifyTarget(leaveEvent);\n if (isMouse) this.notifyTarget(leaveEvent, 'mouseleave');\n\n leaveEvent.target = leaveEvent.target.parent;\n }\n\n trackingData.overTargets = null;\n\n this.freeEvent(outEvent);\n this.freeEvent(leaveEvent);\n }\n\n this.cursor = null;\n }\n\n /**\n * Maps the upstream `pointerup` event to downstream `pointerup`, `pointerupoutside`,\n * and `click`/`rightclick`/`pointertap` events, in that order.\n *\n * The `pointerupoutside` event bubbles from the original `pointerdown` target to the most specific\n * ancestor of the `pointerdown` and `pointerup` targets, which is also the `click` event's target. `touchend`,\n * `rightup`, `mouseup`, `touchendoutside`, `rightupoutside`, `mouseupoutside`, and `tap` are fired as well for\n * specific pointer types.\n * @param from - The upstream `pointerup` event.\n */\n protected mapPointerUp(from: FederatedEvent): void\n {\n if (!(from instanceof FederatedPointerEvent))\n {\n // #if _DEBUG\n warn('EventBoundary cannot map a non-pointer event as a pointer event');\n // #endif\n\n return;\n }\n\n const now = performance.now();\n const e = this.createPointerEvent(from);\n\n this.dispatchEvent(e, 'pointerup');\n\n if (e.pointerType === 'touch')\n {\n this.dispatchEvent(e, 'touchend');\n }\n else if (e.pointerType === 'mouse' || e.pointerType === 'pen')\n {\n const isRightButton = e.button === 2;\n\n this.dispatchEvent(e, isRightButton ? 'rightup' : 'mouseup');\n }\n\n const trackingData = this.trackingData(from.pointerId);\n const pressTarget = this.findMountedTarget(trackingData.pressTargetsByButton[from.button]);\n\n let clickTarget = pressTarget;\n\n // pointerupoutside only bubbles. It only bubbles upto the parent that doesn't contain\n // the pointerup location.\n if (pressTarget && !e.composedPath().includes(pressTarget))\n {\n let currentTarget = pressTarget;\n\n while (currentTarget && !e.composedPath().includes(currentTarget))\n {\n e.currentTarget = currentTarget;\n\n this.notifyTarget(e, 'pointerupoutside');\n\n if (e.pointerType === 'touch')\n {\n this.notifyTarget(e, 'touchendoutside');\n }\n else if (e.pointerType === 'mouse' || e.pointerType === 'pen')\n {\n const isRightButton = e.button === 2;\n\n this.notifyTarget(e, isRightButton ? 'rightupoutside' : 'mouseupoutside');\n }\n\n currentTarget = currentTarget.parent;\n }\n\n delete trackingData.pressTargetsByButton[from.button];\n\n // currentTarget is the most specific ancestor holding both the pointerdown and pointerup\n // targets. That is - it's our click target!\n clickTarget = currentTarget;\n }\n\n // click!\n if (clickTarget)\n {\n const clickEvent = this.clonePointerEvent(e, 'click');\n\n clickEvent.target = clickTarget;\n clickEvent.path = null;\n\n if (!trackingData.clicksByButton[from.button])\n {\n trackingData.clicksByButton[from.button] = {\n clickCount: 0,\n target: clickEvent.target,\n timeStamp: now,\n };\n }\n\n const clickHistory = trackingData.clicksByButton[from.button];\n\n if (clickHistory.target === clickEvent.target\n && now - clickHistory.timeStamp < 200)\n {\n ++clickHistory.clickCount;\n }\n else\n {\n clickHistory.clickCount = 1;\n }\n\n clickHistory.target = clickEvent.target;\n clickHistory.timeStamp = now;\n\n clickEvent.detail = clickHistory.clickCount;\n\n if (clickEvent.pointerType === 'mouse')\n {\n const isRightButton = clickEvent.button === 2;\n\n this.dispatchEvent(clickEvent, isRightButton ? 'rightclick' : 'click');\n }\n else if (clickEvent.pointerType === 'touch')\n {\n this.dispatchEvent(clickEvent, 'tap');\n }\n\n this.dispatchEvent(clickEvent, 'pointertap');\n\n this.freeEvent(clickEvent);\n }\n\n this.freeEvent(e);\n }\n\n /**\n * Maps the upstream `pointerupoutside` event to a downstream `pointerupoutside` event, bubbling from the original\n * `pointerdown` target to `rootTarget`.\n *\n * (The most specific ancestor of the `pointerdown` event and the `pointerup` event must the\n * `{@link EventBoundary}'s root because the `pointerup` event occurred outside of the boundary.)\n *\n * `touchendoutside`, `mouseupoutside`, and `rightupoutside` events are fired as well for specific pointer\n * types. The tracking data for the specific pointer is cleared of a `pressTarget`.\n * @param from - The upstream `pointerupoutside` event.\n */\n protected mapPointerUpOutside(from: FederatedEvent): void\n {\n if (!(from instanceof FederatedPointerEvent))\n {\n // #if _DEBUG\n warn('EventBoundary cannot map a non-pointer event as a pointer event');\n // #endif\n\n return;\n }\n\n const trackingData = this.trackingData(from.pointerId);\n const pressTarget = this.findMountedTarget(trackingData.pressTargetsByButton[from.button]);\n const e = this.createPointerEvent(from);\n\n if (pressTarget)\n {\n let currentTarget = pressTarget;\n\n while (currentTarget)\n {\n e.currentTarget = currentTarget;\n\n this.notifyTarget(e, 'pointerupoutside');\n\n if (e.pointerType === 'touch')\n {\n this.notifyTarget(e, 'touchendoutside');\n }\n else if (e.pointerType === 'mouse' || e.pointerType === 'pen')\n {\n this.notifyTarget(e, e.button === 2 ? 'rightupoutside' : 'mouseupoutside');\n }\n\n currentTarget = currentTarget.parent;\n }\n\n delete trackingData.pressTargetsByButton[from.button];\n }\n\n this.freeEvent(e);\n }\n\n /**\n * Maps the upstream `wheel` event to a downstream `wheel` event.\n * @param from - The upstream `wheel` event.\n */\n protected mapWheel(from: FederatedEvent): void\n {\n if (!(from instanceof FederatedWheelEvent))\n {\n // #if _DEBUG\n warn('EventBoundary cannot map a non-wheel event as a wheel event');\n // #endif\n\n return;\n }\n\n const wheelEvent = this.createWheelEvent(from);\n\n this.dispatchEvent(wheelEvent);\n this.freeEvent(wheelEvent);\n }\n\n /**\n * Finds the most specific event-target in the given propagation path that is still mounted in the scene graph.\n *\n * This is used to find the correct `pointerup` and `pointerout` target in the case that the original `pointerdown`\n * or `pointerover` target was unmounted from the scene graph.\n * @param propagationPath - The propagation path was valid in the past.\n * @returns - The most specific event-target still mounted at the same location in the scene graph.\n */\n protected findMountedTarget(propagationPath: Container[]): Container\n {\n if (!propagationPath)\n {\n return null;\n }\n\n let currentTarget = propagationPath[0];\n\n for (let i = 1; i < propagationPath.length; i++)\n {\n // Set currentTarget to the next target in the path only if it is still attached to the\n // scene graph (i.e. parent still points to the expected ancestor).\n if (propagationPath[i].parent === currentTarget)\n {\n currentTarget = propagationPath[i];\n }\n else\n {\n break;\n }\n }\n\n return currentTarget;\n }\n\n /**\n * Creates an event whose {@code originalEvent} is {@code from}, with an optional `type` and `target` override.\n *\n * The event is allocated using {@link EventBoundary#allocateEvent this.allocateEvent}.\n * @param from - The {@code originalEvent} for the returned event.\n * @param [type=from.type] - The type of the returned event.\n * @param target - The target of the returned event.\n */\n protected createPointerEvent(\n from: FederatedPointerEvent,\n type?: string,\n target?: Container\n ): FederatedPointerEvent\n {\n const event = this.allocateEvent(FederatedPointerEvent);\n\n this.copyPointerData(from, event);\n this.copyMouseData(from, event);\n this.copyData(from, event);\n\n event.nativeEvent = from.nativeEvent;\n event.originalEvent = from;\n event.target = target\n ?? this.hitTest(event.global.x, event.global.y) as Container\n ?? this._hitElements[0];\n\n if (typeof type === 'string')\n {\n event.type = type;\n }\n\n return event;\n }\n\n /**\n * Creates a wheel event whose {@code originalEvent} is {@code from}.\n *\n * The event is allocated using {@link EventBoundary#allocateEvent this.allocateEvent}.\n * @param from - The upstream wheel event.\n */\n protected createWheelEvent(from: FederatedWheelEvent): FederatedWheelEvent\n {\n const event = this.allocateEvent(FederatedWheelEvent);\n\n this.copyWheelData(from, event);\n this.copyMouseData(from, event);\n this.copyData(from, event);\n\n event.nativeEvent = from.nativeEvent;\n event.originalEvent = from;\n event.target = this.hitTest(event.global.x, event.global.y);\n\n return event;\n }\n\n /**\n * Clones the event {@code from}, with an optional {@code type} override.\n *\n * The event is allocated using {@link EventBoundary#allocateEvent this.allocateEvent}.\n * @param from - The event to clone.\n * @param [type=from.type] - The type of the returned event.\n */\n protected clonePointerEvent(from: FederatedPointerEvent, type?: string): FederatedPointerEvent\n {\n const event = this.allocateEvent(FederatedPointerEvent);\n\n event.nativeEvent = from.nativeEvent;\n event.originalEvent = from.originalEvent;\n\n this.copyPointerData(from, event);\n this.copyMouseData(from, event);\n this.copyData(from, event);\n\n // copy propagation path for perf\n event.target = from.target;\n event.path = from.composedPath().slice();\n event.type = type ?? event.type;\n\n return event;\n }\n\n /**\n * Copies wheel {@link FederatedWheelEvent} data from {@code from} into {@code to}.\n *\n * The following properties are copied:\n * + deltaMode\n * + deltaX\n * + deltaY\n * + deltaZ\n * @param from - The event to copy data from.\n * @param to - The event to copy data into.\n */\n protected copyWheelData(from: FederatedWheelEvent, to: FederatedWheelEvent): void\n {\n to.deltaMode = from.deltaMode;\n to.deltaX = from.deltaX;\n to.deltaY = from.deltaY;\n to.deltaZ = from.deltaZ;\n }\n\n /**\n * Copies pointer {@link FederatedPointerEvent} data from {@code from} into {@code to}.\n *\n * The following properties are copied:\n * + pointerId\n * + width\n * + height\n * + isPrimary\n * + pointerType\n * + pressure\n * + tangentialPressure\n * + tiltX\n * + tiltY\n * @param from - The event to copy data from.\n * @param to - The event to copy data into.\n */\n protected copyPointerData(from: FederatedEvent, to: FederatedEvent): void\n {\n if (!(from instanceof FederatedPointerEvent && to instanceof FederatedPointerEvent)) return;\n\n to.pointerId = from.pointerId;\n to.width = from.width;\n to.height = from.height;\n to.isPrimary = from.isPrimary;\n to.pointerType = from.pointerType;\n to.pressure = from.pressure;\n to.tangentialPressure = from.tangentialPressure;\n to.tiltX = from.tiltX;\n to.tiltY = from.tiltY;\n to.twist = from.twist;\n }\n\n /**\n * Copies mouse {@link FederatedMouseEvent} data from {@code from} to {@code to}.\n *\n * The following properties are copied:\n * + altKey\n * + button\n * + buttons\n * + clientX\n * + clientY\n * + metaKey\n * + movementX\n * + movementY\n * + pageX\n * + pageY\n * + x\n * + y\n * + screen\n * + shiftKey\n * + global\n * @param from - The event to copy data from.\n * @param to - The event to copy data into.\n */\n protected copyMouseData(from: FederatedEvent, to: FederatedEvent): void\n {\n if (!(from instanceof FederatedMouseEvent && to instanceof FederatedMouseEvent)) return;\n\n to.altKey = from.altKey;\n to.button = from.button;\n to.buttons = from.buttons;\n to.client.copyFrom(from.client);\n to.ctrlKey = from.ctrlKey;\n to.metaKey = from.metaKey;\n to.movement.copyFrom(from.movement);\n to.screen.copyFrom(from.screen);\n to.shiftKey = from.shiftKey;\n to.global.copyFrom(from.global);\n }\n\n /**\n * Copies base {@link FederatedEvent} data from {@code from} into {@code to}.\n *\n * The following properties are copied:\n * + isTrusted\n * + srcElement\n * + timeStamp\n * + type\n * @param from - The event to copy data from.\n * @param to - The event to copy data into.\n */\n protected copyData(from: FederatedEvent, to: FederatedEvent): void\n {\n to.isTrusted = from.isTrusted;\n to.srcElement = from.srcElement;\n to.timeStamp = performance.now();\n to.type = from.type;\n to.detail = from.detail;\n to.view = from.view;\n to.which = from.which;\n to.layer.copyFrom(from.layer);\n to.page.copyFrom(from.page);\n }\n\n /**\n * @param id - The pointer ID.\n * @returns The tracking data stored for the given pointer. If no data exists, a blank\n * state will be created.\n */\n protected trackingData(id: number): TrackingData\n {\n if (!this.mappingState.trackingData[id])\n {\n this.mappingState.trackingData[id] = {\n pressTargetsByButton: {},\n clicksByButton: {},\n overTarget: null\n };\n }\n\n return this.mappingState.trackingData[id];\n }\n\n /**\n * Allocate a specific type of event from {@link EventBoundary#eventPool this.eventPool}.\n *\n * This allocation is constructor-agnostic, as long as it only takes one argument - this event\n * boundary.\n * @param constructor - The event's constructor.\n */\n protected allocateEvent(\n constructor: { new(boundary: EventBoundary): T }\n ): T\n {\n if (!this.eventPool.has(constructor as any))\n {\n this.eventPool.set(constructor as any, []);\n }\n\n const event = this.eventPool.get(constructor as any).pop() as T\n || new constructor(this);\n\n event.eventPhase = event.NONE;\n event.currentTarget = null;\n event.path = null;\n event.target = null;\n\n return event;\n }\n\n /**\n * Frees the event and puts it back into the event pool.\n *\n * It is illegal to reuse the event until it is allocated again, using `this.allocateEvent`.\n *\n * It is also advised that events not allocated from {@link EventBoundary#allocateEvent this.allocateEvent}\n * not be freed. This is because of the possibility that the same event is freed twice, which can cause\n * it to be allocated twice & result in overwriting.\n * @param event - The event to be freed.\n * @throws Error if the event is managed by another event boundary.\n */\n protected freeEvent(event: T): void\n {\n if (event.manager !== this) throw new Error('It is illegal to free an event not managed by this EventBoundary!');\n\n const constructor = event.constructor;\n\n if (!this.eventPool.has(constructor as any))\n {\n this.eventPool.set(constructor as any, []);\n }\n\n this.eventPool.get(constructor as any).push(event);\n }\n\n /**\n * Similar to {@link EventEmitter.emit}, except it stops if the `propagationImmediatelyStopped` flag\n * is set on the event.\n * @param e - The event to call each listener with.\n * @param type - The event key.\n */\n private _notifyListeners(e: FederatedEvent, type: string): void\n {\n const listeners = ((e.currentTarget as any)._events as EmitterListeners)[type];\n\n if (!listeners) return;\n\n if ('fn' in listeners)\n {\n if (listeners.once) e.currentTarget.removeListener(type, listeners.fn, undefined, true);\n listeners.fn.call(listeners.context, e);\n }\n else\n {\n for (\n let i = 0, j = listeners.length;\n i < j && !e.propagationImmediatelyStopped;\n i++)\n {\n if (listeners[i].once) e.currentTarget.removeListener(type, listeners[i].fn, undefined, true);\n listeners[i].fn.call(listeners[i].context, e);\n }\n }\n }\n}\n","import { ExtensionType } from '../extensions/Extensions';\nimport { EventBoundary } from './EventBoundary';\nimport { EventsTicker } from './EventTicker';\nimport { FederatedPointerEvent } from './FederatedPointerEvent';\nimport { FederatedWheelEvent } from './FederatedWheelEvent';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\nimport type { PointData } from '../maths/point/PointData';\nimport type { System } from '../rendering/renderers/shared/system/System';\nimport type { Renderer } from '../rendering/renderers/types';\nimport type { PixiTouch } from './FederatedEvent';\nimport type { EventMode } from './FederatedEventTarget';\nimport type { FederatedMouseEvent } from './FederatedMouseEvent';\n\nconst MOUSE_POINTER_ID = 1;\nconst TOUCH_TO_POINTER: Record = {\n touchstart: 'pointerdown',\n touchend: 'pointerup',\n touchendoutside: 'pointerupoutside',\n touchmove: 'pointermove',\n touchcancel: 'pointercancel',\n};\n\n/** @ignore */\nexport interface EventSystemOptions\n{\n /**\n * The default event mode mode for all display objects.\n * (included in the **pixi.js** and **pixi.js-legacy** bundle), otherwise it will be ignored.\n */\n eventMode?: EventMode;\n\n /**\n * The event features that are enabled by the EventSystem\n * (included in the **pixi.js** and **pixi.js-legacy** bundle), otherwise it will be ignored.\n * @example\n * const app = new Application({\n * view: canvas,\n * events: {\n * move: true,\n * globalMove: false,\n * click: true,\n * wheel: true,\n * },\n * });\n */\n eventFeatures?: Partial\n}\n\n/**\n * The event features that are enabled by the EventSystem\n * (included in the **pixi.js** and **pixi.js-legacy** bundle), otherwise it will be ignored.\n * @since 7.2.0\n * @memberof events\n */\ninterface EventSystemFeatures\n{\n /**\n * Enables pointer events associated with pointer movement:\n * - `pointermove` / `mousemove` / `touchmove`\n * - `pointerout` / `mouseout`\n * - `pointerover` / `mouseover`\n */\n move: boolean;\n // eslint-disable-next-line jsdoc/multiline-blocks\n /**\n * Enables global pointer move events:\n * - `globalpointermove`\n * - `globalmousemove`\n * - `globaltouchemove`\n */\n globalMove: boolean;\n /**\n * Enables pointer events associated with clicking:\n * - `pointerup` / `mouseup` / `touchend` / 'rightup'\n * - `pointerupoutside` / `mouseupoutside` / `touchendoutside` / 'rightupoutside'\n * - `pointerdown` / 'mousedown' / `touchstart` / 'rightdown'\n * - `click` / `tap`\n */\n click: boolean;\n /** - Enables wheel events. */\n wheel: boolean;\n}\n\n/**\n * The system for handling UI events.\n * @memberof events\n */\nexport class EventSystem implements System\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'events',\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.CanvasSystem,\n ExtensionType.WebGPUSystem,\n ],\n priority: -1,\n };\n\n /**\n * The event features that are enabled by the EventSystem\n * (included in the **pixi.js** and **pixi.js-legacy** bundle), otherwise it will be ignored.\n * @since 7.2.0\n */\n public static defaultEventFeatures: EventSystemFeatures = {\n /** Enables pointer events associated with pointer movement. */\n move: true,\n /** Enables global pointer move events. */\n globalMove: true,\n /** Enables pointer events associated with clicking. */\n click: true,\n /** Enables wheel events. */\n wheel: true,\n };\n\n private static _defaultEventMode: EventMode;\n\n /**\n * The default interaction mode for all display objects.\n * @see Container.eventMode\n * @type {EventMode}\n * @readonly\n * @since 7.2.0\n */\n public static get defaultEventMode()\n {\n return this._defaultEventMode;\n }\n\n /**\n * The {@link EventBoundary} for the stage.\n *\n * The {@link EventBoundary#rootTarget rootTarget} of this root boundary is automatically set to\n * the last rendered object before any event processing is initiated. This means the main scene\n * needs to be rendered atleast once before UI events will start propagating.\n *\n * The root boundary should only be changed during initialization. Otherwise, any state held by the\n * event boundary may be lost (like hovered & pressed Containers).\n */\n public readonly rootBoundary: EventBoundary;\n\n /** Does the device support touch events https://www.w3.org/TR/touch-events/ */\n public readonly supportsTouchEvents = 'ontouchstart' in globalThis;\n\n /** Does the device support pointer events https://www.w3.org/Submission/pointer-events/ */\n public readonly supportsPointerEvents = !!globalThis.PointerEvent;\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 * @default true\n */\n public autoPreventDefault: boolean;\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 {@code domElement},\n * and functions are called instead of changing the CSS.\n * Default CSS cursor values are provided for 'default' and 'pointer' modes.\n */\n public cursorStyles: Record void) | CSSStyleDeclaration>;\n\n /**\n * The DOM element to which the root event listeners are bound. This is automatically set to\n * the renderer's {@link Renderer#view view}.\n */\n public domElement: HTMLElement = null;\n\n /** The resolution used to convert between the DOM client space into world space. */\n public resolution = 1;\n\n /** The renderer managing this {@link EventSystem}. */\n public renderer: Renderer;\n\n /**\n * The event features that are enabled by the EventSystem\n * (included in the **pixi.js** and **pixi.js-legacy** bundle), otherwise it will be ignored.\n * @since 7.2.0\n * @example\n * const app = new Application()\n * app.renderer.events.features.globalMove = false\n *\n * // to override all features use Object.assign\n * Object.assign(app.renderer.events.features, {\n * move: false,\n * globalMove: false,\n * click: false,\n * wheel: false,\n * })\n */\n public readonly features: EventSystemFeatures;\n\n private _currentCursor: string;\n private readonly _rootPointerEvent: FederatedPointerEvent;\n private readonly _rootWheelEvent: FederatedWheelEvent;\n private _eventsAdded: boolean;\n\n /**\n * @param {Renderer} renderer\n */\n constructor(renderer: Renderer)\n {\n this.renderer = renderer;\n this.rootBoundary = new EventBoundary(null);\n EventsTicker.init(this);\n\n this.autoPreventDefault = true;\n this._eventsAdded = false;\n\n this._rootPointerEvent = new FederatedPointerEvent(null);\n this._rootWheelEvent = new FederatedWheelEvent(null);\n\n this.cursorStyles = {\n default: 'inherit',\n pointer: 'pointer',\n };\n\n this.features = new Proxy({ ...EventSystem.defaultEventFeatures }, {\n set: (target, key, value) =>\n {\n if (key === 'globalMove')\n {\n this.rootBoundary.enableGlobalMoveEvents = value;\n }\n target[key as keyof EventSystemFeatures] = value;\n\n return true;\n }\n });\n\n this._onPointerDown = this._onPointerDown.bind(this);\n this._onPointerMove = this._onPointerMove.bind(this);\n this._onPointerUp = this._onPointerUp.bind(this);\n this._onPointerOverOut = this._onPointerOverOut.bind(this);\n this.onWheel = this.onWheel.bind(this);\n }\n\n /**\n * Runner init called, view is available at this point.\n * @ignore\n */\n public init(options: EventSystemOptions): void\n {\n const { canvas, resolution } = this.renderer;\n\n this.setTargetElement(canvas as HTMLCanvasElement);\n this.resolution = resolution;\n EventSystem._defaultEventMode = options.eventMode ?? 'passive';\n Object.assign(this.features, options.eventFeatures ?? {});\n this.rootBoundary.enableGlobalMoveEvents = this.features.globalMove;\n }\n\n /**\n * Handle changing resolution.\n * @ignore\n */\n public resolutionChange(resolution: number): void\n {\n this.resolution = resolution;\n }\n\n /** Destroys all event listeners and detaches the renderer. */\n public destroy(): void\n {\n this.setTargetElement(null);\n this.renderer = null;\n this._currentCursor = null;\n }\n\n /**\n * Sets the current cursor mode, handling any callbacks or CSS style changes.\n * @param mode - cursor mode, a key from the cursorStyles dictionary\n */\n public setCursor(mode: string): void\n {\n mode = mode || 'default';\n let applyStyles = true;\n\n // offscreen canvas does not support setting styles, but cursor modes can be functions,\n // in order to handle pixi rendered cursors, so we can't bail\n if (globalThis.OffscreenCanvas && this.domElement instanceof OffscreenCanvas)\n {\n applyStyles = false;\n }\n // if the mode didn't actually change, bail early\n if (this._currentCursor === mode)\n {\n return;\n }\n this._currentCursor = 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 if (applyStyles)\n {\n this.domElement.style.cursor = style;\n }\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 if (applyStyles)\n {\n Object.assign(this.domElement.style, style);\n }\n break;\n }\n }\n else if (applyStyles && 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.domElement.style.cursor = mode;\n }\n }\n\n /**\n * The global pointer event.\n * Useful for getting the pointer position without listening to events.\n * @since 7.2.0\n */\n public get pointer(): Readonly\n {\n return this._rootPointerEvent;\n }\n\n /**\n * Event handler for pointer down events on {@link EventSystem#domElement this.domElement}.\n * @param nativeEvent - The native mouse/pointer/touch event.\n */\n private _onPointerDown(nativeEvent: MouseEvent | PointerEvent | TouchEvent): void\n {\n if (!this.features.click) return;\n this.rootBoundary.rootTarget = this.renderer.lastObjectRendered;\n\n const events = this._normalizeToPointerData(nativeEvent);\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] as any).isNormalized)\n {\n const cancelable = nativeEvent.cancelable || !('cancelable' in nativeEvent);\n\n if (cancelable)\n {\n nativeEvent.preventDefault();\n }\n }\n\n for (let i = 0, j = events.length; i < j; i++)\n {\n const nativeEvent = events[i];\n const federatedEvent = this._bootstrapEvent(this._rootPointerEvent, nativeEvent);\n\n this.rootBoundary.mapEvent(federatedEvent);\n }\n\n this.setCursor(this.rootBoundary.cursor);\n }\n\n /**\n * Event handler for pointer move events on on {@link EventSystem#domElement this.domElement}.\n * @param nativeEvent - The native mouse/pointer/touch events.\n */\n private _onPointerMove(nativeEvent: MouseEvent | PointerEvent | TouchEvent): void\n {\n if (!this.features.move) return;\n this.rootBoundary.rootTarget = this.renderer.lastObjectRendered;\n\n EventsTicker.pointerMoved();\n\n const normalizedEvents = this._normalizeToPointerData(nativeEvent);\n\n for (let i = 0, j = normalizedEvents.length; i < j; i++)\n {\n const event = this._bootstrapEvent(this._rootPointerEvent, normalizedEvents[i]);\n\n this.rootBoundary.mapEvent(event);\n }\n\n this.setCursor(this.rootBoundary.cursor);\n }\n\n /**\n * Event handler for pointer up events on {@link EventSystem#domElement this.domElement}.\n * @param nativeEvent - The native mouse/pointer/touch event.\n */\n private _onPointerUp(nativeEvent: MouseEvent | PointerEvent | TouchEvent): void\n {\n if (!this.features.click) return;\n this.rootBoundary.rootTarget = this.renderer.lastObjectRendered;\n\n let target = nativeEvent.target;\n\n // if in shadow DOM use composedPath to access target\n if (nativeEvent.composedPath && nativeEvent.composedPath().length > 0)\n {\n target = nativeEvent.composedPath()[0];\n }\n\n const outside = target !== this.domElement ? 'outside' : '';\n const normalizedEvents = this._normalizeToPointerData(nativeEvent);\n\n for (let i = 0, j = normalizedEvents.length; i < j; i++)\n {\n const event = this._bootstrapEvent(this._rootPointerEvent, normalizedEvents[i]);\n\n event.type += outside;\n\n this.rootBoundary.mapEvent(event);\n }\n\n this.setCursor(this.rootBoundary.cursor);\n }\n\n /**\n * Event handler for pointer over & out events on {@link EventSystem#domElement this.domElement}.\n * @param nativeEvent - The native mouse/pointer/touch event.\n */\n private _onPointerOverOut(nativeEvent: MouseEvent | PointerEvent | TouchEvent): void\n {\n if (!this.features.click) return;\n this.rootBoundary.rootTarget = this.renderer.lastObjectRendered;\n\n const normalizedEvents = this._normalizeToPointerData(nativeEvent);\n\n for (let i = 0, j = normalizedEvents.length; i < j; i++)\n {\n const event = this._bootstrapEvent(this._rootPointerEvent, normalizedEvents[i]);\n\n this.rootBoundary.mapEvent(event);\n }\n\n this.setCursor(this.rootBoundary.cursor);\n }\n\n /**\n * Passive handler for `wheel` events on {@link EventSystem.domElement this.domElement}.\n * @param nativeEvent - The native wheel event.\n */\n protected onWheel(nativeEvent: WheelEvent): void\n {\n if (!this.features.wheel) return;\n const wheelEvent = this.normalizeWheelEvent(nativeEvent);\n\n this.rootBoundary.rootTarget = this.renderer.lastObjectRendered;\n this.rootBoundary.mapEvent(wheelEvent);\n }\n\n /**\n * Sets the {@link EventSystem#domElement domElement} and binds event listeners.\n *\n * To deregister the current DOM element without setting a new one, pass {@code null}.\n * @param element - The new DOM element.\n */\n public setTargetElement(element: HTMLElement): void\n {\n this._removeEvents();\n this.domElement = element;\n EventsTicker.domElement = element;\n this._addEvents();\n }\n\n /** Register event listeners on {@link Renderer#domElement this.domElement}. */\n private _addEvents(): void\n {\n if (this._eventsAdded || !this.domElement)\n {\n return;\n }\n\n EventsTicker.addTickerListener();\n\n const style = this.domElement.style as CrossCSSStyleDeclaration;\n\n if (style)\n {\n if ((globalThis.navigator as any).msPointerEnabled)\n {\n style.msContentZooming = 'none';\n style.msTouchAction = 'none';\n }\n else if (this.supportsPointerEvents)\n {\n style.touchAction = 'none';\n }\n }\n\n /*\n * These events are added first, so that if pointer events are normalized, they are fired\n * in the same order as non-normalized events. ie. pointer event 1st, mouse / touch 2nd\n */\n if (this.supportsPointerEvents)\n {\n globalThis.document.addEventListener('pointermove', this._onPointerMove, true);\n this.domElement.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.domElement.addEventListener('pointerleave', this._onPointerOverOut, true);\n this.domElement.addEventListener('pointerover', this._onPointerOverOut, true);\n // globalThis.addEventListener('pointercancel', this.onPointerCancel, true);\n globalThis.addEventListener('pointerup', this._onPointerUp, true);\n }\n else\n {\n globalThis.document.addEventListener('mousemove', this._onPointerMove, true);\n this.domElement.addEventListener('mousedown', this._onPointerDown, true);\n this.domElement.addEventListener('mouseout', this._onPointerOverOut, true);\n this.domElement.addEventListener('mouseover', this._onPointerOverOut, true);\n globalThis.addEventListener('mouseup', this._onPointerUp, true);\n\n if (this.supportsTouchEvents)\n {\n this.domElement.addEventListener('touchstart', this._onPointerDown, true);\n // this.domElement.addEventListener('touchcancel', this.onPointerCancel, true);\n this.domElement.addEventListener('touchend', this._onPointerUp, true);\n this.domElement.addEventListener('touchmove', this._onPointerMove, true);\n }\n }\n\n this.domElement.addEventListener('wheel', this.onWheel, {\n passive: true,\n capture: true,\n });\n\n this._eventsAdded = true;\n }\n\n /** Unregister event listeners on {@link EventSystem#domElement this.domElement}. */\n private _removeEvents(): void\n {\n if (!this._eventsAdded || !this.domElement)\n {\n return;\n }\n\n EventsTicker.removeTickerListener();\n\n const style = this.domElement.style as CrossCSSStyleDeclaration;\n\n // offscreen canvas does not have style, so check first\n if (style)\n {\n if ((globalThis.navigator as any).msPointerEnabled)\n {\n style.msContentZooming = '';\n style.msTouchAction = '';\n }\n else if (this.supportsPointerEvents)\n {\n style.touchAction = '';\n }\n }\n\n if (this.supportsPointerEvents)\n {\n globalThis.document.removeEventListener('pointermove', this._onPointerMove, true);\n this.domElement.removeEventListener('pointerdown', this._onPointerDown, true);\n this.domElement.removeEventListener('pointerleave', this._onPointerOverOut, true);\n this.domElement.removeEventListener('pointerover', this._onPointerOverOut, true);\n // globalThis.removeEventListener('pointercancel', this.onPointerCancel, true);\n globalThis.removeEventListener('pointerup', this._onPointerUp, true);\n }\n else\n {\n globalThis.document.removeEventListener('mousemove', this._onPointerMove, true);\n this.domElement.removeEventListener('mousedown', this._onPointerDown, true);\n this.domElement.removeEventListener('mouseout', this._onPointerOverOut, true);\n this.domElement.removeEventListener('mouseover', this._onPointerOverOut, true);\n globalThis.removeEventListener('mouseup', this._onPointerUp, true);\n\n if (this.supportsTouchEvents)\n {\n this.domElement.removeEventListener('touchstart', this._onPointerDown, true);\n // this.domElement.removeEventListener('touchcancel', this.onPointerCancel, true);\n this.domElement.removeEventListener('touchend', this._onPointerUp, true);\n this.domElement.removeEventListener('touchmove', this._onPointerMove, true);\n }\n }\n\n this.domElement.removeEventListener('wheel', this.onWheel, true);\n\n this.domElement = null;\n this._eventsAdded = false;\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 * @param {PointData} 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 public mapPositionToPoint(point: PointData, x: number, y: number): void\n {\n const rect = this.domElement.isConnected\n ? this.domElement.getBoundingClientRect()\n : {\n x: 0,\n y: 0,\n width: (this.domElement as any).width,\n height: (this.domElement as any).height,\n left: 0,\n top: 0\n };\n\n const resolutionMultiplier = 1.0 / this.resolution;\n\n point.x = ((x - rect.left) * ((this.domElement as any).width / rect.width)) * resolutionMultiplier;\n point.y = ((y - rect.top) * ((this.domElement as any).height / rect.height)) * resolutionMultiplier;\n }\n\n /**\n * Ensures that the original event object contains all data that a regular pointer event would have\n * @param event - The original event data from a touch or mouse event\n * @returns 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 private _normalizeToPointerData(event: TouchEvent | MouseEvent | PointerEvent): PointerEvent[]\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] as PixiTouch;\n\n if (typeof touch.button === 'undefined') touch.button = 0;\n if (typeof touch.buttons === 'undefined') touch.buttons = 1;\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 touch.type = event.type;\n\n normalizedEvents.push(touch);\n }\n }\n // apparently PointerEvent subclasses MouseEvent, so yay\n else if (!globalThis.MouseEvent\n || (event instanceof MouseEvent && (!this.supportsPointerEvents || !(event instanceof globalThis.PointerEvent))))\n {\n const tempEvent = event as PixiPointerEvent;\n\n if (typeof tempEvent.isPrimary === 'undefined') tempEvent.isPrimary = true;\n if (typeof tempEvent.width === 'undefined') tempEvent.width = 1;\n if (typeof tempEvent.height === 'undefined') tempEvent.height = 1;\n if (typeof tempEvent.tiltX === 'undefined') tempEvent.tiltX = 0;\n if (typeof tempEvent.tiltY === 'undefined') tempEvent.tiltY = 0;\n if (typeof tempEvent.pointerType === 'undefined') tempEvent.pointerType = 'mouse';\n if (typeof tempEvent.pointerId === 'undefined') tempEvent.pointerId = MOUSE_POINTER_ID;\n if (typeof tempEvent.pressure === 'undefined') tempEvent.pressure = 0.5;\n if (typeof tempEvent.twist === 'undefined') tempEvent.twist = 0;\n if (typeof tempEvent.tangentialPressure === 'undefined') tempEvent.tangentialPressure = 0;\n\n // mark the mouse event as normalized, just so that we know we did it\n tempEvent.isNormalized = true;\n\n normalizedEvents.push(tempEvent);\n }\n else\n {\n normalizedEvents.push(event);\n }\n\n return normalizedEvents as PointerEvent[];\n }\n\n /**\n * Normalizes the native {@link https://w3c.github.io/uievents/#interface-wheelevent WheelEvent}.\n *\n * The returned {@link FederatedWheelEvent} is a shared instance. It will not persist across\n * multiple native wheel events.\n * @param nativeEvent - The native wheel event that occurred on the canvas.\n * @returns A federated wheel event.\n */\n protected normalizeWheelEvent(nativeEvent: WheelEvent): FederatedWheelEvent\n {\n const event = this._rootWheelEvent;\n\n this._transferMouseData(event, nativeEvent);\n\n // When WheelEvent is triggered by scrolling with mouse wheel, reading WheelEvent.deltaMode\n // before deltaX/deltaY/deltaZ on Firefox will result in WheelEvent.DOM_DELTA_LINE (1),\n // while reading WheelEvent.deltaMode after deltaX/deltaY/deltaZ on Firefox or reading\n // in any order on other browsers will result in WheelEvent.DOM_DELTA_PIXEL (0).\n // Therefore, we need to read WheelEvent.deltaMode after deltaX/deltaY/deltaZ in order to\n // make its behavior more consistent across browsers.\n // @see https://github.com/pixijs/pixijs/issues/8970\n event.deltaX = nativeEvent.deltaX;\n event.deltaY = nativeEvent.deltaY;\n event.deltaZ = nativeEvent.deltaZ;\n event.deltaMode = nativeEvent.deltaMode;\n\n this.mapPositionToPoint(event.screen, nativeEvent.clientX, nativeEvent.clientY);\n event.global.copyFrom(event.screen);\n event.offset.copyFrom(event.screen);\n\n event.nativeEvent = nativeEvent;\n event.type = nativeEvent.type;\n\n return event;\n }\n\n /**\n * Normalizes the `nativeEvent` into a federateed {@link FederatedPointerEvent}.\n * @param event\n * @param nativeEvent\n */\n private _bootstrapEvent(event: FederatedPointerEvent, nativeEvent: PointerEvent): FederatedPointerEvent\n {\n event.originalEvent = null;\n event.nativeEvent = nativeEvent;\n\n event.pointerId = nativeEvent.pointerId;\n event.width = nativeEvent.width;\n event.height = nativeEvent.height;\n event.isPrimary = nativeEvent.isPrimary;\n event.pointerType = nativeEvent.pointerType;\n event.pressure = nativeEvent.pressure;\n event.tangentialPressure = nativeEvent.tangentialPressure;\n event.tiltX = nativeEvent.tiltX;\n event.tiltY = nativeEvent.tiltY;\n event.twist = nativeEvent.twist;\n this._transferMouseData(event, nativeEvent);\n\n this.mapPositionToPoint(event.screen, nativeEvent.clientX, nativeEvent.clientY);\n event.global.copyFrom(event.screen);// global = screen for top-level\n event.offset.copyFrom(event.screen);// EventBoundary recalculates using its rootTarget\n\n event.isTrusted = nativeEvent.isTrusted;\n if (event.type === 'pointerleave')\n {\n event.type = 'pointerout';\n }\n if (event.type.startsWith('mouse'))\n {\n event.type = event.type.replace('mouse', 'pointer');\n }\n if (event.type.startsWith('touch'))\n {\n event.type = TOUCH_TO_POINTER[event.type] || event.type;\n }\n\n return event;\n }\n\n /**\n * Transfers base & mouse event data from the {@code nativeEvent} to the federated event.\n * @param event\n * @param nativeEvent\n */\n private _transferMouseData(event: FederatedMouseEvent, nativeEvent: MouseEvent): void\n {\n event.isTrusted = nativeEvent.isTrusted;\n event.srcElement = nativeEvent.srcElement;\n event.timeStamp = performance.now();\n event.type = nativeEvent.type;\n\n event.altKey = nativeEvent.altKey;\n event.button = nativeEvent.button;\n event.buttons = nativeEvent.buttons;\n event.client.x = nativeEvent.clientX;\n event.client.y = nativeEvent.clientY;\n event.ctrlKey = nativeEvent.ctrlKey;\n event.metaKey = nativeEvent.metaKey;\n event.movement.x = nativeEvent.movementX;\n event.movement.y = nativeEvent.movementY;\n event.page.x = nativeEvent.pageX;\n event.page.y = nativeEvent.pageY;\n event.relatedTarget = null;\n event.shiftKey = nativeEvent.shiftKey;\n }\n}\n\ninterface CrossCSSStyleDeclaration extends CSSStyleDeclaration\n{\n msContentZooming: string;\n msTouchAction: string;\n}\n\ninterface PixiPointerEvent extends PointerEvent\n{\n isPrimary: boolean;\n width: number;\n height: number;\n tiltX: number;\n tiltY: number;\n pointerType: string;\n pointerId: number;\n pressure: number;\n twist: number;\n tangentialPressure: number;\n isNormalized: boolean;\n type: string;\n}\n","import { EventSystem } from './EventSystem';\nimport { FederatedEvent } from './FederatedEvent';\n\nimport type EventEmitter from 'eventemitter3';\nimport type { Container } from '../scene/container/Container';\nimport type { AllFederatedEventMap } from './FederatedEventMap';\nimport type { FederatedPointerEvent } from './FederatedPointerEvent';\nimport type { FederatedWheelEvent } from './FederatedWheelEvent';\n\n/**\n * The type of cursor to use when the mouse pointer is hovering over.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\n *\n * Can be any valid CSS cursor value:\n * `auto`, `default`, `none`, `context-menu`, `help`, `pointer`, `progress`,\n * `wait`, `cell`, `crosshair`, `text`, `verticaltext`, `alias`, `copy`, `move`,\n * `nodrop`, `notallowed`, `eresize`, `nresize`, `neresize`, `nwresize`, `sresize`,\n * `seresize`, `swresize`, `wresize`, `nsresize`, `ewresize`, `neswresize`, `colresize`,\n * `nwseresize`, `rowresize`, `allscroll`, `zoomin`, `zoomout`, `grab`, `grabbing`\n * @memberof events\n */\nexport type Cursor = 'auto'\n| 'default'\n| 'none'\n| 'context-menu'\n| 'help'\n| 'pointer'\n| 'progress'\n| 'wait'\n| 'cell'\n| 'crosshair'\n| 'text'\n| 'vertical-text'\n| 'alias'\n| 'copy'\n| 'move'\n| 'no-drop'\n| 'not-allowed'\n| 'e-resize'\n| 'n-resize'\n| 'ne-resize'\n| 'nw-resize'\n| 's-resize'\n| 'se-resize'\n| 'sw-resize'\n| 'w-resize'\n| 'ns-resize'\n| 'ew-resize'\n| 'nesw-resize'\n| 'col-resize'\n| 'nwse-resize'\n| 'row-resize'\n| 'all-scroll'\n| 'zoom-in'\n| 'zoom-out'\n| 'grab'\n| 'grabbing';\n\n/**\n * The hit area specifies the area for which pointer events should be captured by this event target.\n * @memberof events\n */\nexport interface IHitArea\n{\n /**\n * Checks if the x and y coordinates given are contained within this hit area.\n * @returns Whether the x and y coordinates are contained within this hit area.\n */\n contains(x: number, y: number): boolean;\n}\n\n/**\n * Function type for handlers, e.g., onclick\n * @memberof events\n */\nexport type FederatedEventHandler = (event: T) => void;\n\n/**\n * The type of interaction a Container can be.\n * This is the {@link scene.Container#eventMode|Container.eventMode} property of any {@link scene.Container}.\n *\n * Can be one of the following:\n * - `'none'`: Ignores all interaction events, even on its children.\n * - `'passive'`: **(default)** Does not emit events and ignores all hit testing on itself and non-interactive children.\n * Interactive children will still emit events.\n * - `'auto'`: Does not emit events but is hit tested if parent is interactive. Same as `interactive = false` in v7\n * - `'static'`: Emit events and is hit tested. Same as `interaction = true` in v7\n * - `'dynamic'`: Emits events and is hit tested but will also receive mock interaction events fired from a ticker to\n * allow for interaction when the mouse isn't moving\n *\n * `none` and `passive` are useful for optimizing interaction events on objects as it reduces the number of hit tests\n * PixiJS has to do. `auto` is useful for when you want to recreate how the DOM handles interaction events with\n * `pointer-events: auto`.\n * @since 7.2.0\n * @memberof events\n */\nexport type EventMode = 'none' | 'passive' | 'auto' | 'static' | 'dynamic';\n\n/**\n * The properties available for any interactive object.\n * @memberof events\n */\nexport interface FederatedOptions\n{\n /** The cursor preferred when the mouse pointer is hovering over. */\n cursor?: Cursor | string;\n /** The mode of interaction for this object */\n eventMode?: EventMode;\n /** Whether this event target should fire UI events. */\n interactive?: boolean\n /** Whether this event target has any children that need UI events. This can be used optimize event propagation. */\n interactiveChildren?: boolean;\n /** The hit-area specifies the area for which pointer events should be captured by this event target. */\n hitArea?: IHitArea | null;\n /** Handler for 'click' event */\n onclick?: FederatedEventHandler | null;\n /** Handler for 'mousedown' event */\n onmousedown?: FederatedEventHandler | null;\n /** Handler for 'mouseenter' event */\n onmouseenter?: FederatedEventHandler | null;\n /** Handler for 'mouseleave' event */\n onmouseleave?: FederatedEventHandler | null;\n /** Handler for 'mousemove' event */\n onmousemove?: FederatedEventHandler | null;\n /** Handler for 'globalmousemove' event */\n onglobalmousemove?: FederatedEventHandler | null;\n /** Handler for 'mouseout' event */\n onmouseout?: FederatedEventHandler | null;\n /** Handler for 'mouseover' event */\n onmouseover?: FederatedEventHandler | null;\n /** Handler for 'mouseup' event */\n onmouseup?: FederatedEventHandler | null;\n /** Handler for 'mouseupoutside' event */\n onmouseupoutside?: FederatedEventHandler | null;\n /** Handler for 'pointercancel' event */\n onpointercancel?: FederatedEventHandler | null;\n /** Handler for 'pointerdown' event */\n onpointerdown?: FederatedEventHandler | null;\n /** Handler for 'pointerenter' event */\n onpointerenter?: FederatedEventHandler | null;\n /** Handler for 'pointerleave' event */\n onpointerleave?: FederatedEventHandler | null;\n /** Handler for 'pointermove' event */\n onpointermove?: FederatedEventHandler | null;\n /** Handler for 'globalpointermove' event */\n onglobalpointermove?: FederatedEventHandler | null;\n /** Handler for 'pointerout' event */\n onpointerout?: FederatedEventHandler | null;\n /** Handler for 'pointerover' event */\n onpointerover?: FederatedEventHandler | null;\n /** Handler for 'pointertap' event */\n onpointertap?: FederatedEventHandler | null;\n /** Handler for 'pointerup' event */\n onpointerup?: FederatedEventHandler | null;\n /** Handler for 'pointerupoutside' event */\n onpointerupoutside?: FederatedEventHandler | null;\n /** Handler for 'rightclick' event */\n onrightclick?: FederatedEventHandler | null;\n /** Handler for 'rightdown' event */\n onrightdown?: FederatedEventHandler | null;\n /** Handler for 'rightup' event */\n onrightup?: FederatedEventHandler | null;\n /** Handler for 'rightupoutside' event */\n onrightupoutside?: FederatedEventHandler | null;\n /** Handler for 'tap' event */\n ontap?: FederatedEventHandler | null;\n /** Handler for 'touchcancel' event */\n ontouchcancel?: FederatedEventHandler | null;\n /** Handler for 'touchend' event */\n ontouchend?: FederatedEventHandler | null;\n /** Handler for 'touchendoutside' event */\n ontouchendoutside?: FederatedEventHandler | null;\n /** Handler for 'touchmove' event */\n ontouchmove?: FederatedEventHandler | null;\n /** Handler for 'globaltouchmove' event */\n onglobaltouchmove?: FederatedEventHandler | null;\n /** Handler for 'touchstart' event */\n ontouchstart?: FederatedEventHandler | null;\n /** Handler for 'wheel' event */\n onwheel?: FederatedEventHandler | null;\n}\n\ntype AddListenerOptions = boolean | AddEventListenerOptions;\ntype RemoveListenerOptions = boolean | EventListenerOptions;\n\nexport interface IFederatedContainer extends FederatedOptions\n{\n /** The parent of this event target. */\n readonly parent?: Container;\n\n /** The children of this event target. */\n readonly children?: ReadonlyArray;\n\n _internalEventMode: EventMode;\n\n /** Returns true if the Container has interactive 'static' or 'dynamic' */\n isInteractive: () => boolean;\n addEventListener(\n type: K,\n listener: (e: AllFederatedEventMap[K]) => any,\n options?: AddListenerOptions\n ): void;\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: AddListenerOptions\n ): void;\n removeEventListener(\n type: K,\n listener: (e: AllFederatedEventMap[K]) => any,\n options?: RemoveListenerOptions\n ): void;\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: RemoveListenerOptions\n ): void;\n dispatchEvent(e: FederatedEvent): boolean;\n}\n\nexport const FederatedContainer: IFederatedContainer = {\n\n /**\n * Property-based event handler for the `click` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onclick = (event) => {\n * //some function here that happens on click\n * }\n */\n onclick: null,\n\n /**\n * Property-based event handler for the `mousedown` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onmousedown = (event) => {\n * //some function here that happens on mousedown\n * }\n */\n onmousedown: null,\n\n /**\n * Property-based event handler for the `mouseenter` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onmouseenter = (event) => {\n * //some function here that happens on mouseenter\n * }\n */\n onmouseenter: null,\n\n /**\n * Property-based event handler for the `mouseleave` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onmouseleave = (event) => {\n * //some function here that happens on mouseleave\n * }\n */\n onmouseleave: null,\n\n /**\n * Property-based event handler for the `mousemove` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onmousemove = (event) => {\n * //some function here that happens on mousemove\n * }\n */\n onmousemove: null,\n\n /**\n * Property-based event handler for the `globalmousemove` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onglobalmousemove = (event) => {\n * //some function here that happens on globalmousemove\n * }\n */\n onglobalmousemove: null,\n\n /**\n * Property-based event handler for the `mouseout` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onmouseout = (event) => {\n * //some function here that happens on mouseout\n * }\n */\n onmouseout: null,\n\n /**\n * Property-based event handler for the `mouseover` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onmouseover = (event) => {\n * //some function here that happens on mouseover\n * }\n */\n onmouseover: null,\n\n /**\n * Property-based event handler for the `mouseup` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onmouseup = (event) => {\n * //some function here that happens on mouseup\n * }\n */\n onmouseup: null,\n\n /**\n * Property-based event handler for the `mouseupoutside` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onmouseupoutside = (event) => {\n * //some function here that happens on mouseupoutside\n * }\n */\n onmouseupoutside: null,\n\n /**\n * Property-based event handler for the `pointercancel` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onpointercancel = (event) => {\n * //some function here that happens on pointercancel\n * }\n */\n onpointercancel: null,\n\n /**\n * Property-based event handler for the `pointerdown` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onpointerdown = (event) => {\n * //some function here that happens on pointerdown\n * }\n */\n onpointerdown: null,\n\n /**\n * Property-based event handler for the `pointerenter` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onpointerenter = (event) => {\n * //some function here that happens on pointerenter\n * }\n */\n onpointerenter: null,\n\n /**\n * Property-based event handler for the `pointerleave` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onpointerleave = (event) => {\n * //some function here that happens on pointerleave\n * }\n */\n onpointerleave: null,\n\n /**\n * Property-based event handler for the `pointermove` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onpointermove = (event) => {\n * //some function here that happens on pointermove\n * }\n */\n onpointermove: null,\n\n /**\n * Property-based event handler for the `globalpointermove` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onglobalpointermove = (event) => {\n * //some function here that happens on globalpointermove\n * }\n */\n onglobalpointermove: null,\n\n /**\n * Property-based event handler for the `pointerout` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onpointerout = (event) => {\n * //some function here that happens on pointerout\n * }\n */\n onpointerout: null,\n\n /**\n * Property-based event handler for the `pointerover` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onpointerover = (event) => {\n * //some function here that happens on pointerover\n * }\n */\n onpointerover: null,\n\n /**\n * Property-based event handler for the `pointertap` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onpointertap = (event) => {\n * //some function here that happens on pointertap\n * }\n */\n onpointertap: null,\n\n /**\n * Property-based event handler for the `pointerup` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onpointerup = (event) => {\n * //some function here that happens on pointerup\n * }\n */\n onpointerup: null,\n\n /**\n * Property-based event handler for the `pointerupoutside` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onpointerupoutside = (event) => {\n * //some function here that happens on pointerupoutside\n * }\n */\n onpointerupoutside: null,\n\n /**\n * Property-based event handler for the `rightclick` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onrightclick = (event) => {\n * //some function here that happens on rightclick\n * }\n */\n onrightclick: null,\n\n /**\n * Property-based event handler for the `rightdown` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onrightdown = (event) => {\n * //some function here that happens on rightdown\n * }\n */\n onrightdown: null,\n\n /**\n * Property-based event handler for the `rightup` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onrightup = (event) => {\n * //some function here that happens on rightup\n * }\n */\n onrightup: null,\n\n /**\n * Property-based event handler for the `rightupoutside` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onrightupoutside = (event) => {\n * //some function here that happens on rightupoutside\n * }\n */\n onrightupoutside: null,\n\n /**\n * Property-based event handler for the `tap` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.ontap = (event) => {\n * //some function here that happens on tap\n * }\n */\n ontap: null,\n\n /**\n * Property-based event handler for the `touchcancel` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.ontouchcancel = (event) => {\n * //some function here that happens on touchcancel\n * }\n */\n ontouchcancel: null,\n\n /**\n * Property-based event handler for the `touchend` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.ontouchend = (event) => {\n * //some function here that happens on touchend\n * }\n */\n ontouchend: null,\n\n /**\n * Property-based event handler for the `touchendoutside` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.ontouchendoutside = (event) => {\n * //some function here that happens on touchendoutside\n * }\n */\n ontouchendoutside: null,\n\n /**\n * Property-based event handler for the `touchmove` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.ontouchmove = (event) => {\n * //some function here that happens on touchmove\n * }\n */\n ontouchmove: null,\n\n /**\n * Property-based event handler for the `globaltouchmove` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onglobaltouchmove = (event) => {\n * //some function here that happens on globaltouchmove\n * }\n */\n onglobaltouchmove: null,\n\n /**\n * Property-based event handler for the `touchstart` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.ontouchstart = (event) => {\n * //some function here that happens on touchstart\n * }\n */\n ontouchstart: null,\n\n /**\n * Property-based event handler for the `wheel` event.\n * @memberof scene.Container#\n * @default null\n * @example\n * this.onwheel = (event) => {\n * //some function here that happens on wheel\n * }\n */\n onwheel: null,\n /**\n * Enable interaction events for the Container. Touch, pointer and mouse\n * @memberof scene.Container#\n */\n get interactive()\n {\n return this.eventMode === 'dynamic' || this.eventMode === 'static';\n },\n set interactive(value: boolean)\n {\n this.eventMode = value ? 'static' : 'passive';\n },\n /**\n * @ignore\n */\n _internalEventMode: undefined,\n /**\n * Enable interaction events for the Container. Touch, pointer and mouse.\n * There are 5 types of interaction settings:\n * - `'none'`: Ignores all interaction events, even on its children.\n * - `'passive'`: **(default)** Does not emit events and ignores all hit testing on itself and non-interactive children.\n * Interactive children will still emit events.\n * - `'auto'`: Does not emit events but is hit tested if parent is interactive. Same as `interactive = false` in v7\n * - `'static'`: Emit events and is hit tested. Same as `interaction = true` in v7\n * - `'dynamic'`: Emits events and is hit tested but will also receive mock interaction events fired from a ticker to\n * allow for interaction when the mouse isn't moving\n * @example\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = new Sprite(texture);\n * sprite.eventMode = 'static';\n * sprite.on('tap', (event) => {\n * // Handle event\n * });\n * @memberof scene.Container#\n * @since 7.2.0\n */\n get eventMode()\n {\n return this._internalEventMode ?? EventSystem.defaultEventMode;\n },\n set eventMode(value)\n {\n this._internalEventMode = value;\n },\n\n /**\n * Determines if the container is interactive or not\n * @returns {boolean} Whether the container is interactive or not\n * @memberof scene.Container#\n * @since 7.2.0\n * @example\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = new Sprite(texture);\n * sprite.eventMode = 'static';\n * sprite.isInteractive(); // true\n *\n * sprite.eventMode = 'dynamic';\n * sprite.isInteractive(); // true\n *\n * sprite.eventMode = 'none';\n * sprite.isInteractive(); // false\n *\n * sprite.eventMode = 'passive';\n * sprite.isInteractive(); // false\n *\n * sprite.eventMode = 'auto';\n * sprite.isInteractive(); // false\n */\n isInteractive(): boolean\n {\n return this.eventMode === 'static' || this.eventMode === 'dynamic';\n },\n\n /**\n * Determines if the children to the container can be clicked/touched\n * Setting this to false allows PixiJS to bypass a recursive `hitTest` function\n * @memberof scene.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 container's bounds.\n * @example\n * import { Rectangle, Sprite } from 'pixi.js';\n *\n * const sprite = new Sprite(texture);\n * sprite.interactive = true;\n * sprite.hitArea = new Rectangle(0, 0, 100, 100);\n * @member {IHitArea}\n * @memberof scene.Container#\n */\n hitArea: null,\n\n /**\n * Unlike `on` or `addListener` which are methods from EventEmitter, `addEventListener`\n * seeks to be compatible with the DOM's `addEventListener` with support for options.\n * @memberof scene.Container\n * @param type - The type of event to listen to.\n * @param listener - The listener callback or object.\n * @param options - Listener options, used for capture phase.\n * @example\n * // Tell the user whether they did a single, double, triple, or nth click.\n * button.addEventListener('click', {\n * handleEvent(e): {\n * let prefix;\n *\n * switch (e.detail) {\n * case 1: prefix = 'single'; break;\n * case 2: prefix = 'double'; break;\n * case 3: prefix = 'triple'; break;\n * default: prefix = e.detail + 'th'; break;\n * }\n *\n * console.log('That was a ' + prefix + 'click');\n * }\n * });\n *\n * // But skip the first click!\n * button.parent.addEventListener('click', function blockClickOnce(e) {\n * e.stopImmediatePropagation();\n * button.parent.removeEventListener('click', blockClickOnce, true);\n * }, {\n * capture: true,\n * });\n */\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: AddListenerOptions\n )\n {\n const capture = (typeof options === 'boolean' && options)\n || (typeof options === 'object' && options.capture);\n const signal = typeof options === 'object' ? options.signal : undefined;\n const once = typeof options === 'object' ? (options.once === true) : false;\n const context = typeof listener === 'function' ? undefined : listener;\n\n type = capture ? `${type}capture` : type;\n const listenerFn = typeof listener === 'function' ? listener : listener.handleEvent;\n\n const emitter = (this as unknown as EventEmitter);\n\n if (signal)\n {\n signal.addEventListener('abort', () =>\n {\n emitter.off(type, listenerFn, context);\n });\n }\n\n if (once)\n {\n emitter.once(type, listenerFn, context);\n }\n else\n {\n emitter.on(type, listenerFn, context);\n }\n },\n\n /**\n * Unlike `off` or `removeListener` which are methods from EventEmitter, `removeEventListener`\n * seeks to be compatible with the DOM's `removeEventListener` with support for options.\n * @memberof scene.Container\n * @param type - The type of event the listener is bound to.\n * @param listener - The listener callback or object.\n * @param options - The original listener options. This is required to deregister a capture phase listener.\n */\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: RemoveListenerOptions\n )\n {\n const capture = (typeof options === 'boolean' && options)\n || (typeof options === 'object' && options.capture);\n const context = typeof listener === 'function' ? undefined : listener;\n\n type = capture ? `${type}capture` : type;\n listener = typeof listener === 'function' ? listener : listener.handleEvent;\n\n (this as unknown as EventEmitter).off(type, listener, context);\n },\n\n /**\n * Dispatch the event on this {@link Container} using the event's {@link EventBoundary}.\n *\n * The target of the event is set to `this` and the `defaultPrevented` flag is cleared before dispatch.\n * @memberof scene.Container\n * @param e - The event to dispatch.\n * @returns Whether the {@link FederatedEvent.preventDefault preventDefault}() method was not invoked.\n * @example\n * // Reuse a click event!\n * button.dispatchEvent(clickEvent);\n */\n dispatchEvent(e: Event): boolean\n {\n if (!(e instanceof FederatedEvent))\n {\n throw new Error('Container cannot propagate events outside of the Federated Events API');\n }\n\n e.defaultPrevented = false;\n e.path = null;\n e.target = this as Container;\n e.manager.dispatchEvent(e);\n\n return !e.defaultPrevented;\n }\n};\n","import { extensions } from '../extensions/Extensions';\nimport { Container } from '../scene/container/Container';\nimport { EventSystem } from './EventSystem';\nimport { FederatedContainer } from './FederatedEventTarget';\n\n/* eslint-disable max-len */\n/**\n * PixiJS is primarily a rendering system, but it also includes support for interactivity.\n * Adding support for mouse and touch events to your project is simple and consistent.\n *\n * The new event-based system that replaced InteractionManager from v6 has expanded the definition of what a\n * Container means to be interactive. With this we have introduced `eventMode` which allows you to control\n * how an object responds to interaction events.\n * This is similar to the `interactive` property in v6 but with more options.\n *\n *

\n * Enabling Interaction\n *\n * Any Container-derived object (Sprite, Container, etc.) can become interactive simply by setting its `eventMode` property to any of\n * the {@link events.EventMode} values. Doing so will cause the object to emit interaction events that can be responded to in order to drive your project's behavior.\n *\n * Check out the [interaction example code](/examples/events/click).\n *\n * Container-derived objects are based on {@link https://www.npmjs.com/package/eventemitter3|EventEmitter3}\n * so you can use `on()`, `once()`, `off()` to listen to events.\n *\n * For example to respond to clicks and taps, bind to an object ike so:\n *\n * ```javascript\n * let sprite = Sprite.from('/some/texture.png');\n *\n * sprite.eventMode = 'static'; // similar to `sprite.interactive = true` in v6\n * sprite.on('pointerdown', (event) => { alert('clicked!'); });\n * ```\n *\n * Check out the **EventTypes** section below for the full list of interaction events supported.\n *
\n *\n *
\n * Event Modes\n *\n * The new event-based system that replaced InteractionManager from v6 has expanded the definition of what a Container\n * means to be interactive. With this we have introduced `eventMode` which allows you to control how an object responds\n * to interaction events. This is similar to the `interactive` property in v6 but with more options.\n *\n * | event mode | Description |\n * |---|---|\n * | `none` | Ignores all interaction events, similar to CSS's `pointer-events: none`, good optimization for non-interactive children |\n * | `passive` | Does not emit events and ignores hit testing on itself but does allow for events and hit testing only its interactive children. If you want to be compatible with v6, set this as your default `eventMode` (see options in Renderer, Application, etc) |\n * | `auto` | Does not emit events and but is hit tested if parent is interactive. Same as `interactive = false` in v7 |\n * | `static` | Emit events and is hit tested. Same as `interaction = true` in v7, useful for objects like buttons that do not move. |\n * | `dynamic` | Emits events and is hit tested but will also receive mock interaction events fired from a ticker to allow for interaction when the mouse isn't moving. This is useful for elements that independently moving or animating. |\n *
\n *\n *
\n * Event Types\n *\n * Pixi supports the following event types for interactive objects:\n *\n * | Event Type | Fired When |\n * |---|---|\n * | `pointercancel` | Pointer device button is released outside the display object\n * that initially registered a pointerdown. |\n * | `pointerdown` | Pointer device button is pressed on the display object. |\n * | `pointerenter` | Pointer device enters the display object. |\n * | `pointerleave` | Pointer device leaves the display object. |\n * | `pointermove` | Pointer device is moved while over the display object. |\n * | `globalpointermove` | Pointer device is moved, regardless of hit-testing the current object. |\n * | `pointerout` | Pointer device is moved off the display object. |\n * | `pointerover` | Pointer device is moved onto the display object. |\n * | `pointertap` | Pointer device is tapped twice on the display object. |\n * | `pointerup` | Pointer device button is released over the display object. |\n * | `pointerupoutside` | Pointer device button is released outside the display object\n * that initially registered a pointerdown. |\n * | `mousedown ` | Mouse button is pressed on the display object. |\n * | `mouseenter` | Mouse cursor enters the display object. |\n * | `mouseleave` | Mouse cursor leaves the display object. |\n * | `mousemove ` | Mouse cursor is moved while over the display object. |\n * | `globalmousemove` | Mouse is moved, regardless of hit-testing the current object. |\n * | `mouseout ` | Mouse cursor is moved off the display object. |\n * | `mouseover ` | Mouse cursor is moved onto the display object. |\n * | `mouseup ` | Mouse button is released over the display object. |\n * | `mouseupoutside ` | Mouse button is released outside the display object that initially registered a mousedown. |\n * | `click ` | Mouse button is clicked (pressed and released) over the display object. |\n * | `touchcancel ` | Touch point is removed outside of the display object that initially registered a touchstart. |\n * | `touchend ` | Touch point is removed from the display object. |\n * | `touchendoutside ` | Touch point is removed outside of the display object that initially registered a touchstart. |\n * | `touchmove ` | Touch point is moved along the display object. |\n * | `globaltouchmove` | Touch point is moved, regardless of hit-testing the current object. |\n * | `touchstart ` | Touch point is placed on the display object. |\n * | `tap ` | Touch point is tapped twice on the display object. |\n * | `wheel ` | Mouse wheel is spun over the display object. |\n * | `rightclick ` | Right mouse button is clicked (pressed and released) over the display object. |\n * | `rightdown ` | Right mouse button is pressed on the display object. |\n * | `rightup ` | Right mouse button is released over the display object. |\n * | `rightupoutside ` | Right mouse button is released outside the display object that initially registered a rightdown. |\n *
\n * @namespace events\n */\n/* eslint-enable max-len */\n\nextensions.add(EventSystem);\nContainer.mixin(FederatedContainer);\n","import type { ExtensionMetadata } from '../../../extensions/Extensions';\nimport type { ResolvedAsset } from '../../types';\nimport type { Loader } from '../Loader';\n\n/**\n * The extension priority for loader parsers.\n * Helpful when managing multiple parsers that share the same extension test.\n * The higher priority parsers will be checked first.\n * @enum {number}\n */\nexport enum LoaderParserPriority\n// eslint-disable-next-line @typescript-eslint/indent\n{\n /** Generic parsers: txt, json, webfonts */\n Low = 0,\n /** PixiJS assets with generic extensions: spritesheets, bitmapfonts */\n Normal = 1,\n /** Specific texture types: svg, png, ktx, dds, basis */\n High = 2,\n}\n\n/** A more verbose version of the LoaderParser, allowing you to set the loaded, parsed, and unloaded asset separately */\nexport interface LoaderParserAdvanced<\n ASSET = any,\n PARSED_ASSET = ASSET,\n UNLOAD_ASSET = ASSET,\n META_DATA = any,\n CONFIG = Record\n>\n{\n /** Should be ExtensionType.LoaderParser */\n extension?: ExtensionMetadata;\n\n /** A config to adjust the parser */\n config?: CONFIG;\n\n /** The name of the parser (this can be used when specifying loadParser in a ResolvedAsset) */\n name: string;\n\n /**\n * Each URL to load will be tested here,\n * if the test is passed the assets are loaded using the load function below.\n * Good place to test for things like file extensions!\n * @param url - The URL to test\n * @param resolvedAsset - Any custom additional information relevant to the asset being loaded\n * @param loader - The loader instance\n */\n test?: (url: string, resolvedAsset?: ResolvedAsset, loader?: Loader) => boolean;\n\n /**\n * This is the promise that loads the URL provided\n * resolves with a loaded asset if returned by the parser.\n * @param url - The URL to load\n * @param resolvedAsset - Any custom additional information relevant to the asset being loaded\n * @param loader - The loader instance\n */\n load?: (url: string, resolvedAsset?: ResolvedAsset, loader?: Loader) => Promise;\n\n /**\n * This function is used to test if the parse function should be run on the asset\n * If this returns true then parse is called with the asset\n * @param asset - The loaded asset data\n * @param resolvedAsset - Any custom additional information relevant to the asset being loaded\n * @param loader - The loader instance\n */\n testParse?: (asset: ASSET, resolvedAsset?: ResolvedAsset, loader?: Loader) => Promise;\n\n /**\n * Gets called on the asset it testParse passes. Useful to convert a raw asset into something more useful\n * @param asset - The loaded asset data\n * @param resolvedAsset - Any custom additional information relevant to the asset being loaded\n * @param loader - The loader instance\n */\n parse?: (asset: ASSET, resolvedAsset?: ResolvedAsset, loader?: Loader) => Promise;\n\n /**\n * If an asset is parsed using this parser, the unload function will be called when the user requests an asset\n * to be unloaded. This is useful for things like sounds or textures that can be unloaded from memory\n * @param asset - The asset to unload/destroy\n * @param resolvedAsset - Any custom additional information relevant to the asset being loaded\n * @param loader - The loader instance\n */\n unload?: (asset: UNLOAD_ASSET, resolvedAsset?: ResolvedAsset, loader?: Loader) => Promise | void;\n}\n\n/**\n * The interface to define a loader parser *(all functions are optional)*.\n *\n * When you create a `parser` object, the flow for every asset loaded is:\n *\n * 1. `parser.test()` - Each URL to load will be tested here, if the test is passed the assets are\n * loaded using the load function below. Good place to test for things like file extensions!\n * 2. `parser.load()` - This is the promise that loads the URL provided resolves with a loaded asset\n * if returned by the parser.\n * 3. `parser.testParse()` - This function is used to test if the parse function should be run on the\n * asset If this returns true then parse is called with the asset\n * 4. `parse.parse()` - Gets called on the asset it testParse passes. Useful to convert a raw asset\n * into something more useful\n *\n *
\n * Some loaders may only be used for parsing, some only for loading, and some for both!\n * @memberof assets\n */\nexport interface LoaderParser>\n extends LoaderParserAdvanced {}\n","import { type Adapter } from '../environment/adapter';\n\n/**\n * This is an implementation of the {@link environment.Adapter} interface.\n * It can be used to make Pixi work in the browser.\n * @memberof environment\n * @property {Function} createCanvas - Creates a canvas element of the given size.\n * This canvas is created using the browser's native canvas element.\n * @property {Function} getCanvasRenderingContext2D - Returns a 2D rendering context.\n * @property {Function} getWebGLRenderingContext - Returns a WebGL rendering context.\n * @property {Function} getNavigator - Returns browsers window.navigator\n * @property {Function} getBaseUrl - Returns the current base URL for browser environments this is either\n * the document.baseURI or window.location.href\n * @property {Function} getFontFaceSet - Return the font face set if available\n * @property {Function} fetch - Returns a Response object that has been fetched from the given URL.\n * @property {Function} parseXML - Returns Document object that has been parsed from the given XML string.\n */\nexport const BrowserAdapter = {\n createCanvas: (width: number, height: number): HTMLCanvasElement =>\n {\n const canvas = document.createElement('canvas');\n\n canvas.width = width;\n canvas.height = height;\n\n return canvas;\n },\n getCanvasRenderingContext2D: () => CanvasRenderingContext2D,\n getWebGLRenderingContext: () => WebGLRenderingContext,\n getNavigator: () => navigator,\n getBaseUrl: () => (document.baseURI ?? window.location.href),\n getFontFaceSet: () => document.fonts,\n fetch: (url: RequestInfo, options?: RequestInit) => fetch(url, options),\n parseXML: (xml: string) =>\n {\n const parser = new DOMParser();\n\n return parser.parseFromString(xml, 'text/xml');\n },\n} as Adapter;\n","import { BrowserAdapter } from '../environment-browser/BrowserAdapter';\n\nimport type { ICanvas } from './canvas/ICanvas';\nimport type { ICanvasRenderingContext2D } from './canvas/ICanvasRenderingContext2D';\n\n/**\n * PixiJS supports multiple environments including browsers, Web Workers, and Node.js.\n * The environment is auto-detected by default using the {@link environment.autoDetectEnvironment} function.\n *\n * The {@link environment.Adapter} interface provides a way to abstract away the differences between\n * these environments. PixiJS uses the {@link environment.BrowserAdapter} by default.\n *\n * However you can manually set the environment using the {@link environment.DOMAdapter} singleton, for example to\n * use Pixi within a WebWorker.\n * ```js\n * import { DOMAdapter, WebWorkerAdapter } from 'pixi.js';\n *\n * // WebWorkerAdapter is an implementation of the Adapter interface\n * DOMAdapter.set(WebWorkerAdapter);\n *\n * // use the adapter to create a canvas (in this case an OffscreenCanvas)\n * DOMAdapter.get().createCanvas(800, 600);\n * ```\n * @namespace environment\n */\n\n/**\n * This interface describes all the DOM dependent calls that Pixi makes throughout its codebase.\n * Implementations of this interface can be used to make sure Pixi will work in any environment,\n * such as browser, Web Workers, and Node.js.\n * @memberof environment\n */\nexport interface Adapter\n{\n /** Returns a canvas object that can be used to create a webgl context. */\n createCanvas: (width?: number, height?: number) => ICanvas;\n /** Returns a 2D rendering context. */\n getCanvasRenderingContext2D: () => { prototype: ICanvasRenderingContext2D; };\n /** Returns a WebGL rendering context. */\n getWebGLRenderingContext: () => typeof WebGLRenderingContext;\n /** Returns a partial implementation of the browsers window.navigator */\n getNavigator: () => { userAgent: string, gpu: GPU | null };\n /** Returns the current base URL For browser environments this is either the document.baseURI or window.location.href */\n getBaseUrl: () => string;\n /** Return the font face set if available */\n getFontFaceSet: () => FontFaceSet | null;\n /** Returns a Response object that has been fetched from the given URL. */\n fetch: (url: RequestInfo, options?: RequestInit) => Promise;\n /** Returns Document object that has been parsed from the given XML string. */\n parseXML: (xml: string) => Document;\n}\n\nlet currentAdapter: Adapter = BrowserAdapter;\n\n/**\n * The DOMAdapter is a singleton that allows PixiJS to perform DOM operations, such as creating a canvas.\n * This allows PixiJS to be used in any environment, such as a web browser, Web Worker, or Node.js.\n * It uses the {@link environment.Adapter} interface to abstract away the differences between these environments\n * and uses the {@link environment.BrowserAdapter} by default.\n *\n * It has two methods: `get():Adapter` and `set(adapter: Adapter)`.\n *\n * Defaults to the {@link environment.BrowserAdapter}.\n * @example\n * import { DOMAdapter, WebWorkerAdapter } from 'pixi.js';\n *\n * // WebWorkerAdapter is an implementation of the Adapter interface\n * DOMAdapter.set(WebWorkerAdapter);\n *\n * // use the adapter to create a canvas (in this case an OffscreenCanvas)\n * DOMAdapter.get().createCanvas(800, 600);\n * @memberof environment\n */\nexport const DOMAdapter = {\n /**\n * Returns the current adapter.\n * @returns {environment.Adapter} The current adapter.\n */\n get(): Adapter\n {\n return currentAdapter;\n },\n /**\n * Sets the current adapter.\n * @param adapter - The new adapter.\n */\n set(adapter: Adapter): void\n {\n currentAdapter = adapter;\n },\n};\n","import { DOMAdapter } from '../environment/adapter';\n\nfunction assertPath(path: string)\n{\n if (typeof path !== 'string')\n {\n throw new TypeError(`Path must be a string. Received ${JSON.stringify(path)}`);\n }\n}\n\nfunction removeUrlParams(url: string): string\n{\n const re = url.split('?')[0];\n\n return re.split('#')[0];\n}\n\nfunction escapeRegExp(string: string)\n{\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'); // $& means the whole matched string\n}\n\nfunction replaceAll(str: string, find: string, replace: string)\n{\n return str.replace(new RegExp(escapeRegExp(find), 'g'), replace);\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path: string, allowAboveRoot: boolean)\n{\n let res = '';\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let code = -1;\n\n for (let i = 0; i <= path.length; ++i)\n {\n if (i < path.length)\n {\n code = path.charCodeAt(i);\n }\n else if (code === 47)\n {\n break;\n }\n else\n {\n code = 47;\n }\n if (code === 47)\n {\n if (lastSlash === i - 1 || dots === 1)\n {\n // NOOP\n }\n else if (lastSlash !== i - 1 && dots === 2)\n {\n if (\n res.length < 2\n || lastSegmentLength !== 2\n || res.charCodeAt(res.length - 1) !== 46\n || res.charCodeAt(res.length - 2) !== 46\n )\n {\n if (res.length > 2)\n {\n const lastSlashIndex = res.lastIndexOf('/');\n\n if (lastSlashIndex !== res.length - 1)\n {\n if (lastSlashIndex === -1)\n {\n res = '';\n lastSegmentLength = 0;\n }\n else\n {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n else if (res.length === 2 || res.length === 1)\n {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot)\n {\n if (res.length > 0)\n { res += '/..'; }\n else\n { res = '..'; }\n lastSegmentLength = 2;\n }\n }\n else\n {\n if (res.length > 0)\n {\n res += `/${path.slice(lastSlash + 1, i)}`;\n }\n else\n {\n res = path.slice(lastSlash + 1, i);\n }\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n }\n else if (code === 46 && dots !== -1)\n {\n ++dots;\n }\n else\n {\n dots = -1;\n }\n }\n\n return res;\n}\n\n/**\n * Path utilities for working with URLs and file paths in a cross-platform way.\n * All paths that are passed in will become normalized to have posix separators.\n * ```js\n * import { path } from 'pixi.js';\n *\n * path.normalize('http://www.example.com/foo/bar/../baz'); // http://www.example.com/foo/baz\n * ```\n * @memberof utils\n */\nexport interface Path\n{\n /**\n * Converts a path to posix format.\n * @param path - The path to convert to posix\n */\n toPosix: (path: string) => string;\n /**\n * Checks if the path is a URL e.g. http://, https://\n * @param path - The path to check\n */\n isUrl: (path: string) => boolean;\n /**\n * Checks if the path is a data URL\n * @param path - The path to check\n */\n isDataUrl: (path: string) => boolean;\n /**\n * Checks if the path is a blob URL\n * @param path - The path to check\n */\n isBlobUrl: (path: string) => boolean;\n /**\n * Checks if the path has a protocol e.g. http://, https://, file:///, data:, blob:, C:/\n * This will return true for windows file paths\n * @param path - The path to check\n */\n hasProtocol: (path: string) => boolean;\n /**\n * Returns the protocol of the path e.g. http://, https://, file:///, data:, blob:, C:/\n * @param path - The path to get the protocol from\n */\n getProtocol: (path: string) => string;\n /**\n * Converts URL to an absolute path.\n * When loading from a Web Worker, we must use absolute paths.\n * If the URL is already absolute we return it as is\n * If it's not, we convert it\n * @param url - The URL to test\n * @param customBaseUrl - The base URL to use\n * @param customRootUrl - The root URL to use\n */\n toAbsolute: (url: string, baseUrl?: string, rootUrl?: string) => string;\n /**\n * Normalizes the given path, resolving '..' and '.' segments\n * @param path - The path to normalize\n */\n normalize: (path: string) => string;\n /**\n * Determines if path is an absolute path.\n * Absolute paths can be urls, data urls, or paths on disk\n * @param path - The path to test\n */\n isAbsolute: (path: string) => boolean;\n /**\n * Joins all given path segments together using the platform-specific separator as a delimiter,\n * then normalizes the resulting path\n * @param segments - The segments of the path to join\n */\n join: (...paths: string[]) => string;\n /**\n * Returns the directory name of a path\n * @param path - The path to parse\n */\n dirname: (path: string) => string;\n /**\n * Returns the root of the path e.g. /, C:/, file:///, http://domain.com/\n * @param path - The path to parse\n */\n rootname: (path: string) => string;\n /**\n * Returns the last portion of a path\n * @param path - The path to test\n * @param ext - Optional extension to remove\n */\n basename: (path: string, ext?: string) => string;\n /**\n * Returns the extension of the path, from the last occurrence of the . (period) character to end of string in the last\n * portion of the path. If there is no . in the last portion of the path, or if there are no . characters other than\n * the first character of the basename of path, an empty string is returned.\n * @param path - The path to parse\n */\n extname: (path: string) => string;\n /**\n * Parses a path into an object containing the 'root', `dir`, `base`, `ext`, and `name` properties.\n * @param path - The path to parse\n */\n parse: (path: string) => { root?: string, dir?: string, base?: string, ext?: string, name?: string };\n sep: string,\n delimiter: string,\n joinExtensions: string[],\n}\n\n/**\n * Path utilities for working with URLs and file paths in a cross-platform way.\n * All paths that are passed in will become normalized to have posix separators.\n * ```js\n * import { path } from 'pixi.js';\n *\n * path.normalize('http://www.example.com/foo/bar/../baz'); // http://www.example.com/foo/baz\n * ```\n * @see {@link utils.Path}\n * @memberof utils\n */\nexport const path: Path = {\n /**\n * Converts a path to posix format.\n * @param path - The path to convert to posix\n */\n toPosix(path: string) { return replaceAll(path, '\\\\', '/'); },\n /**\n * Checks if the path is a URL e.g. http://, https://\n * @param path - The path to check\n */\n isUrl(path: string) { return (/^https?:/).test(this.toPosix(path)); },\n /**\n * Checks if the path is a data URL\n * @param path - The path to check\n */\n isDataUrl(path: string)\n {\n // eslint-disable-next-line max-len\n return (/^data:([a-z]+\\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\\-._~:@\\/?%\\s<>]*?)$/i)\n .test(path);\n },\n /**\n * Checks if the path is a blob URL\n * @param path - The path to check\n */\n isBlobUrl(path: string)\n {\n // Not necessary to have an exact regex to match the blob URLs\n return path.startsWith('blob:');\n },\n /**\n * Checks if the path has a protocol e.g. http://, https://, file:///, data:, blob:, C:/\n * This will return true for windows file paths\n * @param path - The path to check\n */\n hasProtocol(path: string) { return (/^[^/:]+:/).test(this.toPosix(path)); },\n /**\n * Returns the protocol of the path e.g. http://, https://, file:///, data:, blob:, C:/\n * @param path - The path to get the protocol from\n */\n getProtocol(path: string)\n {\n assertPath(path);\n path = this.toPosix(path);\n\n const matchFile = (/^file:\\/\\/\\//).exec(path);\n\n if (matchFile)\n {\n return matchFile[0];\n }\n\n const matchProtocol = (/^[^/:]+:\\/{0,2}/).exec(path);\n\n if (matchProtocol)\n {\n return matchProtocol[0];\n }\n\n return '';\n },\n\n /**\n * Converts URL to an absolute path.\n * When loading from a Web Worker, we must use absolute paths.\n * If the URL is already absolute we return it as is\n * If it's not, we convert it\n * @param url - The URL to test\n * @param customBaseUrl - The base URL to use\n * @param customRootUrl - The root URL to use\n */\n toAbsolute(url: string, customBaseUrl?: string, customRootUrl?: string)\n {\n assertPath(url);\n\n if (this.isDataUrl(url) || this.isBlobUrl(url)) return url;\n\n const baseUrl = removeUrlParams(this.toPosix(customBaseUrl ?? DOMAdapter.get().getBaseUrl()));\n const rootUrl = removeUrlParams(this.toPosix(customRootUrl ?? this.rootname(baseUrl)));\n\n url = this.toPosix(url);\n\n // root relative url\n if (url.startsWith('/'))\n {\n return path.join(rootUrl, url.slice(1));\n }\n\n const absolutePath = this.isAbsolute(url) ? url : this.join(baseUrl, url);\n\n return absolutePath;\n },\n\n /**\n * Normalizes the given path, resolving '..' and '.' segments\n * @param path - The path to normalize\n */\n normalize(path: string)\n {\n assertPath(path);\n\n if (path.length === 0) return '.';\n if (this.isDataUrl(path) || this.isBlobUrl(path)) return path;\n\n path = this.toPosix(path);\n\n let protocol = '';\n const isAbsolute = path.startsWith('/');\n\n if (this.hasProtocol(path))\n {\n protocol = this.rootname(path);\n path = path.slice(protocol.length);\n }\n\n const trailingSeparator = path.endsWith('/');\n\n // Normalize the path\n path = normalizeStringPosix(path, false);\n\n if (path.length > 0 && trailingSeparator) path += '/';\n if (isAbsolute) return `/${path}`;\n\n return protocol + path;\n },\n\n /**\n * Determines if path is an absolute path.\n * Absolute paths can be urls, data urls, or paths on disk\n * @param path - The path to test\n */\n isAbsolute(path: string)\n {\n assertPath(path);\n path = this.toPosix(path);\n\n if (this.hasProtocol(path)) return true;\n\n return path.startsWith('/');\n },\n\n /**\n * Joins all given path segments together using the platform-specific separator as a delimiter,\n * then normalizes the resulting path\n * @param segments - The segments of the path to join\n */\n join(...segments: string[])\n {\n if (segments.length === 0)\n { return '.'; }\n let joined;\n\n for (let i = 0; i < segments.length; ++i)\n {\n const arg = segments[i];\n\n assertPath(arg);\n if (arg.length > 0)\n {\n if (joined === undefined) joined = arg;\n else\n {\n const prevArg = segments[i - 1] ?? '';\n\n if (this.joinExtensions.includes(this.extname(prevArg).toLowerCase()))\n {\n joined += `/../${arg}`;\n }\n else\n {\n joined += `/${arg}`;\n }\n }\n }\n }\n if (joined === undefined) { return '.'; }\n\n return this.normalize(joined);\n },\n\n /**\n * Returns the directory name of a path\n * @param path - The path to parse\n */\n dirname(path: string)\n {\n assertPath(path);\n if (path.length === 0) return '.';\n path = this.toPosix(path);\n let code = path.charCodeAt(0);\n const hasRoot = code === 47;\n let end = -1;\n let matchedSlash = true;\n\n const proto = this.getProtocol(path);\n const origpath = path;\n\n path = path.slice(proto.length);\n\n for (let i = path.length - 1; i >= 1; --i)\n {\n code = path.charCodeAt(i);\n if (code === 47)\n {\n if (!matchedSlash)\n {\n end = i;\n break;\n }\n }\n else\n {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n // if end is -1 and its a url then we need to add the path back\n // eslint-disable-next-line no-nested-ternary\n if (end === -1) return hasRoot ? '/' : this.isUrl(origpath) ? proto + path : proto;\n if (hasRoot && end === 1) return '//';\n\n return proto + path.slice(0, end);\n },\n\n /**\n * Returns the root of the path e.g. /, C:/, file:///, http://domain.com/\n * @param path - The path to parse\n */\n rootname(path: string)\n {\n assertPath(path);\n path = this.toPosix(path);\n\n let root = '';\n\n if (path.startsWith('/')) root = '/';\n else\n {\n root = this.getProtocol(path);\n }\n\n if (this.isUrl(path))\n {\n // need to find the first path separator\n const index = path.indexOf('/', root.length);\n\n if (index !== -1)\n {\n root = path.slice(0, index);\n }\n else root = path;\n\n if (!root.endsWith('/')) root += '/';\n }\n\n return root;\n },\n\n /**\n * Returns the last portion of a path\n * @param path - The path to test\n * @param ext - Optional extension to remove\n */\n basename(path: string, ext?: string)\n {\n assertPath(path);\n if (ext) assertPath(ext);\n\n path = removeUrlParams(this.toPosix(path));\n\n let start = 0;\n let end = -1;\n let matchedSlash = true;\n let i: number;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length)\n {\n if (ext.length === path.length && ext === path) return '';\n let extIdx = ext.length - 1;\n let firstNonSlashEnd = -1;\n\n for (i = path.length - 1; i >= 0; --i)\n {\n const code = path.charCodeAt(i);\n\n if (code === 47)\n {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash)\n {\n start = i + 1;\n break;\n }\n }\n else\n {\n if (firstNonSlashEnd === -1)\n {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0)\n {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx))\n {\n if (--extIdx === -1)\n {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n }\n else\n {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd; else if (end === -1) end = path.length;\n\n return path.slice(start, end);\n }\n for (i = path.length - 1; i >= 0; --i)\n {\n if (path.charCodeAt(i) === 47)\n {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash)\n {\n start = i + 1;\n break;\n }\n }\n else if (end === -1)\n {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n\n return path.slice(start, end);\n },\n\n /**\n * Returns the extension of the path, from the last occurrence of the . (period) character to end of string in the last\n * portion of the path. If there is no . in the last portion of the path, or if there are no . characters other than\n * the first character of the basename of path, an empty string is returned.\n * @param path - The path to parse\n */\n extname(path: string)\n {\n assertPath(path);\n path = removeUrlParams(this.toPosix(path));\n\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n\n for (let i = path.length - 1; i >= 0; --i)\n {\n const code = path.charCodeAt(i);\n\n if (code === 47)\n {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash)\n {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1)\n {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46)\n {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;\n else if (preDotState !== 1) preDotState = 1;\n }\n else if (startDot !== -1)\n {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (\n startDot === -1 || end === -1\n // We saw a non-dot character immediately before the dot\n || preDotState === 0\n // The (right-most) trimmed path component is exactly '..'\n // eslint-disable-next-line no-mixed-operators, no-mixed-operators/no-mixed-operators\n || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1\n )\n {\n return '';\n }\n\n return path.slice(startDot, end);\n },\n\n /**\n * Parses a path into an object containing the 'root', `dir`, `base`, `ext`, and `name` properties.\n * @param path - The path to parse\n */\n parse(path: string)\n {\n assertPath(path);\n\n const ret = { root: '', dir: '', base: '', ext: '', name: '' };\n\n if (path.length === 0) return ret;\n path = removeUrlParams(this.toPosix(path));\n\n let code = path.charCodeAt(0);\n const isAbsolute = this.isAbsolute(path);\n let start: number;\n const protocol = '';\n\n ret.root = this.rootname(path);\n\n if (isAbsolute || this.hasProtocol(path))\n {\n start = 1;\n }\n else\n {\n start = 0;\n }\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n let i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i)\n {\n code = path.charCodeAt(i);\n if (code === 47)\n {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash)\n {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1)\n {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46)\n {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;\n else if (preDotState !== 1) preDotState = 1;\n }\n else if (startDot !== -1)\n {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (\n startDot === -1 || end === -1\n // We saw a non-dot character immediately before the dot\n || preDotState === 0\n // The (right-most) trimmed path component is exactly '..'\n // eslint-disable-next-line no-mixed-operators, no-mixed-operators/no-mixed-operators\n || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1\n )\n {\n if (end !== -1)\n {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);\n else ret.base = ret.name = path.slice(startPart, end);\n }\n }\n else\n {\n if (startPart === 0 && isAbsolute)\n {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n }\n else\n {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n ret.dir = this.dirname(path);\n if (protocol) ret.dir = protocol + ret.dir;\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n joinExtensions: ['.html'],\n} as Path;\n","export const convertToList = (\n input: string | T | (string | T)[],\n transform?: (input: string) => T,\n forceTransform = false\n): T[] =>\n{\n if (!Array.isArray(input))\n {\n input = [input as T];\n }\n\n if (!transform)\n {\n return input as T[];\n }\n\n return (input as (string | T)[]).map((item): T =>\n {\n if (typeof item === 'string' || forceTransform)\n {\n return transform(item as string);\n }\n\n return item as T;\n });\n};\n","function processX(base: string, ids: string[][], depth: number, result: string[], tags: string[])\n{\n const id = ids[depth];\n\n for (let i = 0; i < id.length; i++)\n {\n const value = id[i];\n\n if (depth < ids.length - 1)\n {\n processX(base.replace(result[depth], value), ids, depth + 1, result, tags);\n }\n else\n {\n tags.push(base.replace(result[depth], value));\n }\n }\n}\n\n/**\n * Creates a list of all possible combinations of the given strings.\n * @example\n * const out2 = createStringVariations('name is {chicken,wolf,sheep}');\n * console.log(out2); // [ 'name is chicken', 'name is wolf', 'name is sheep' ]\n * @param string - The string to process\n */\nexport function createStringVariations(string: string): string[]\n{\n const regex = /\\{(.*?)\\}/g;\n\n const result = string.match(regex);\n\n const tags: string[] = [];\n\n if (result)\n {\n const ids: string[][] = [];\n\n result.forEach((vars) =>\n {\n // first remove the brackets...\n const split = vars.substring(1, vars.length - 1).split(',');\n\n ids.push(split);\n });\n\n processX(string, ids, 0, result, tags);\n }\n else\n {\n tags.push(string);\n }\n\n return tags;\n}\n","/**\n * Checks if the given value is an array.\n * @param item - The item to test\n */\nexport const isSingleItem = (item: unknown): boolean => (!Array.isArray(item));\n","import { warn } from '../../utils/logging/warn';\nimport { path } from '../../utils/path';\nimport { convertToList } from '../utils/convertToList';\nimport { createStringVariations } from '../utils/createStringVariations';\nimport { isSingleItem } from '../utils/isSingleItem';\n\nimport type {\n ArrayOr,\n AssetsBundle,\n AssetsManifest,\n AssetSrc,\n ResolvedAsset,\n ResolvedSrc,\n UnresolvedAsset,\n} from '../types';\nimport type { PreferOrder, ResolveURLParser } from './types';\n\n/**\n * Options for how the resolver deals with generating bundle ids\n * @memberof assets\n */\nexport interface BundleIdentifierOptions\n{\n /** The character that is used to connect the bundleId and the assetId when generating a bundle asset id key */\n connector?: string;\n /**\n * A function that generates a bundle asset id key from a bundleId and an assetId\n * @param bundleId - the bundleId\n * @param assetId - the assetId\n * @returns the bundle asset id key\n */\n createBundleAssetId?: (bundleId: string, assetId: string) => string;\n /**\n * A function that generates an assetId from a bundle asset id key. This is the reverse of generateBundleAssetId\n * @param bundleId - the bundleId\n * @param assetBundleId - the bundle asset id key\n * @returns the assetId\n */\n extractAssetIdFromBundle?: (bundleId: string, assetBundleId: string) => string;\n}\n\n/**\n * A class that is responsible for resolving mapping asset URLs to keys.\n * At its most basic it can be used for Aliases:\n *\n * ```js\n * resolver.add('foo', 'bar');\n * resolver.resolveUrl('foo') // => 'bar'\n * ```\n *\n * It can also be used to resolve the most appropriate asset for a given URL:\n *\n * ```js\n * resolver.prefer({\n * params: {\n * format: 'webp',\n * resolution: 2,\n * }\n * });\n *\n * resolver.add('foo', ['bar@2x.webp', 'bar@2x.png', 'bar.webp', 'bar.png']);\n *\n * resolver.resolveUrl('foo') // => 'bar@2x.webp'\n * ```\n * Other features include:\n * - Ability to process a manifest file to get the correct understanding of how to resolve all assets\n * - Ability to add custom parsers for specific file types\n * - Ability to add custom prefer rules\n *\n * This class only cares about the URL, not the loading of the asset itself.\n *\n * It is not intended that this class is created by developers - its part of the Asset class\n * This is the third major system of PixiJS' main Assets class\n * @memberof assets\n */\nexport class Resolver\n{\n /**\n * The prefix that denotes a URL is for a retina asset.\n * @static\n * @name RETINA_PREFIX\n * @type {RegExp}\n * @default /@([0-9\\.]+)x/\n * @example `@2x`\n */\n public static RETINA_PREFIX = /@([0-9\\.]+)x/;\n\n private readonly _defaultBundleIdentifierOptions: Required = {\n connector: '-',\n createBundleAssetId: (bundleId, assetId) =>\n `${bundleId}${this._bundleIdConnector}${assetId}`,\n extractAssetIdFromBundle: (bundleId, assetBundleId) =>\n assetBundleId.replace(`${bundleId}${this._bundleIdConnector}`, ''),\n };\n\n /** The character that is used to connect the bundleId and the assetId when generating a bundle asset id key */\n private _bundleIdConnector = this._defaultBundleIdentifierOptions.connector;\n\n /**\n * A function that generates a bundle asset id key from a bundleId and an assetId\n * @param bundleId - the bundleId\n * @param assetId - the assetId\n * @returns the bundle asset id key\n */\n private _createBundleAssetId: (\n bundleId: string,\n assetId: string\n ) => string = this._defaultBundleIdentifierOptions.createBundleAssetId;\n\n /**\n * A function that generates an assetId from a bundle asset id key. This is the reverse of generateBundleAssetId\n * @param bundleId - the bundleId\n * @param assetBundleId - the bundle asset id key\n * @returns the assetId\n */\n private _extractAssetIdFromBundle: (\n bundleId: string,\n assetBundleId: string\n ) => string = this._defaultBundleIdentifierOptions.extractAssetIdFromBundle;\n\n private _assetMap: Record = {};\n private _preferredOrder: PreferOrder[] = [];\n private readonly _parsers: ResolveURLParser[] = [];\n\n private _resolverHash: Record = {};\n private _rootPath: string;\n private _basePath: string;\n private _manifest: AssetsManifest;\n private _bundles: Record = {};\n private _defaultSearchParams: string;\n\n /**\n * Override how the resolver deals with generating bundle ids.\n * must be called before any bundles are added\n * @param bundleIdentifier - the bundle identifier options\n */\n public setBundleIdentifier(bundleIdentifier: BundleIdentifierOptions): void\n {\n this._bundleIdConnector = bundleIdentifier.connector ?? this._bundleIdConnector;\n this._createBundleAssetId = bundleIdentifier.createBundleAssetId ?? this._createBundleAssetId;\n this._extractAssetIdFromBundle = bundleIdentifier.extractAssetIdFromBundle ?? this._extractAssetIdFromBundle;\n\n if (this._extractAssetIdFromBundle('foo', this._createBundleAssetId('foo', 'bar')) !== 'bar')\n {\n throw new Error('[Resolver] GenerateBundleAssetId are not working correctly');\n }\n }\n\n /**\n * Let the resolver know which assets you prefer to use when resolving assets.\n * Multiple prefer user defined rules can be added.\n * @example\n * resolver.prefer({\n * // first look for something with the correct format, and then then correct resolution\n * priority: ['format', 'resolution'],\n * params:{\n * format:'webp', // prefer webp images\n * resolution: 2, // prefer a resolution of 2\n * }\n * })\n * resolver.add('foo', ['bar@2x.webp', 'bar@2x.png', 'bar.webp', 'bar.png']);\n * resolver.resolveUrl('foo') // => 'bar@2x.webp'\n * @param preferOrders - the prefer options\n */\n public prefer(...preferOrders: PreferOrder[]): void\n {\n preferOrders.forEach((prefer) =>\n {\n this._preferredOrder.push(prefer);\n\n if (!prefer.priority)\n {\n // generate the priority based on the order of the object\n prefer.priority = Object.keys(prefer.params);\n }\n });\n\n this._resolverHash = {};\n }\n\n /**\n * Set the base path to prepend to all urls when resolving\n * @example\n * resolver.basePath = 'https://home.com/';\n * resolver.add('foo', 'bar.ong');\n * resolver.resolveUrl('foo', 'bar.png'); // => 'https://home.com/bar.png'\n * @param basePath - the base path to use\n */\n public set basePath(basePath: string)\n {\n this._basePath = basePath;\n }\n\n public get basePath(): string\n {\n return this._basePath;\n }\n\n /**\n * Set the root path for root-relative URLs. By default the `basePath`'s root is used. If no `basePath` is set, then the\n * default value for browsers is `window.location.origin`\n * @example\n * // Application hosted on https://home.com/some-path/index.html\n * resolver.basePath = 'https://home.com/some-path/';\n * resolver.rootPath = 'https://home.com/';\n * resolver.add('foo', '/bar.png');\n * resolver.resolveUrl('foo', '/bar.png'); // => 'https://home.com/bar.png'\n * @param rootPath - the root path to use\n */\n public set rootPath(rootPath: string)\n {\n this._rootPath = rootPath;\n }\n\n public get rootPath(): string\n {\n return this._rootPath;\n }\n\n /**\n * All the active URL parsers that help the parser to extract information and create\n * an asset object-based on parsing the URL itself.\n *\n * Can be added using the extensions API\n * @example\n * resolver.add('foo', [\n * {\n * resolution: 2,\n * format: 'png',\n * src: 'image@2x.png',\n * },\n * {\n * resolution:1,\n * format:'png',\n * src: 'image.png',\n * },\n * ]);\n *\n * // With a url parser the information such as resolution and file format could extracted from the url itself:\n * extensions.add({\n * extension: ExtensionType.ResolveParser,\n * test: loadTextures.test, // test if url ends in an image\n * parse: (value: string) =>\n * ({\n * resolution: parseFloat(Resolver.RETINA_PREFIX.exec(value)?.[1] ?? '1'),\n * format: value.split('.').pop(),\n * src: value,\n * }),\n * });\n *\n * // Now resolution and format can be extracted from the url\n * resolver.add('foo', [\n * 'image@2x.png',\n * 'image.png',\n * ]);\n */\n public get parsers(): ResolveURLParser[]\n {\n return this._parsers;\n }\n\n /** Used for testing, this resets the resolver to its initial state */\n public reset(): void\n {\n this.setBundleIdentifier(this._defaultBundleIdentifierOptions);\n\n this._assetMap = {};\n this._preferredOrder = [];\n // Do not reset this._parsers\n\n this._resolverHash = {};\n this._rootPath = null;\n this._basePath = null;\n this._manifest = null;\n this._bundles = {};\n this._defaultSearchParams = null;\n }\n\n /**\n * Sets the default URL search parameters for the URL resolver. The urls can be specified as a string or an object.\n * @param searchParams - the default url parameters to append when resolving urls\n */\n public setDefaultSearchParams(searchParams: string | Record): void\n {\n if (typeof searchParams === 'string')\n {\n this._defaultSearchParams = searchParams;\n }\n else\n {\n const queryValues = searchParams as Record;\n\n this._defaultSearchParams = Object.keys(queryValues)\n .map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(queryValues[key])}`)\n .join('&');\n }\n }\n\n /**\n * Returns the aliases for a given asset\n * @param asset - the asset to get the aliases for\n */\n public getAlias(asset: UnresolvedAsset): string[]\n {\n const { alias, src } = asset;\n const aliasesToUse = convertToList>(\n alias || src, (value: string | AssetSrc) =>\n {\n if (typeof value === 'string') return value;\n\n if (Array.isArray(value)) return value.map((v) => (v as ResolvedSrc)?.src ?? v);\n\n if (value?.src) return value.src;\n\n return value;\n }, true) as string[];\n\n return aliasesToUse;\n }\n\n /**\n * Add a manifest to the asset resolver. This is a nice way to add all the asset information in one go.\n * generally a manifest would be built using a tool.\n * @param manifest - the manifest to add to the resolver\n */\n public addManifest(manifest: AssetsManifest): void\n {\n if (this._manifest)\n {\n // #if _DEBUG\n warn('[Resolver] Manifest already exists, this will be overwritten');\n // #endif\n }\n\n this._manifest = manifest;\n\n manifest.bundles.forEach((bundle) =>\n {\n this.addBundle(bundle.name, bundle.assets);\n });\n }\n\n /**\n * This adds a bundle of assets in one go so that you can resolve them as a group.\n * For example you could add a bundle for each screen in you pixi app\n * @example\n * resolver.addBundle('animals', [\n * { alias: 'bunny', src: 'bunny.png' },\n * { alias: 'chicken', src: 'chicken.png' },\n * { alias: 'thumper', src: 'thumper.png' },\n * ]);\n * // or\n * resolver.addBundle('animals', {\n * bunny: 'bunny.png',\n * chicken: 'chicken.png',\n * thumper: 'thumper.png',\n * });\n *\n * const resolvedAssets = await resolver.resolveBundle('animals');\n * @param bundleId - The id of the bundle to add\n * @param assets - A record of the asset or assets that will be chosen from when loading via the specified key\n */\n public addBundle(bundleId: string, assets: AssetsBundle['assets']): void\n {\n const assetNames: string[] = [];\n let convertedAssets: UnresolvedAsset[] = assets as UnresolvedAsset[];\n\n if (!Array.isArray(assets))\n {\n // convert to array...\n convertedAssets = Object.entries(assets).map(([alias, src]) =>\n {\n if (typeof src === 'string' || Array.isArray(src))\n {\n return { alias, src };\n }\n\n return { alias, ...src };\n });\n }\n\n // when storing keys against a bundle we prepend the bundleId to each asset key\n // and pass it through as an additional alias for the asset\n // this keeps clashing ids separate on a per-bundle basis\n // you can also resolve a file using the bundleId-assetId syntax\n\n convertedAssets.forEach((asset) =>\n {\n const srcs = asset.src;\n const aliases = asset.alias;\n let ids: string[];\n\n if (typeof aliases === 'string')\n {\n const bundleAssetId = this._createBundleAssetId(bundleId, aliases);\n\n assetNames.push(bundleAssetId);\n ids = [aliases, bundleAssetId];\n }\n else\n {\n const bundleIds = aliases.map((name) => this._createBundleAssetId(bundleId, name));\n\n assetNames.push(...bundleIds);\n ids = [...aliases, ...bundleIds];\n }\n\n this.add({\n ...asset,\n ...{\n alias: ids,\n src: srcs,\n }\n });\n });\n\n this._bundles[bundleId] = assetNames;\n }\n\n /**\n * Tells the resolver what keys are associated with witch asset.\n * The most important thing the resolver does\n * @example\n * // Single key, single asset:\n * resolver.add({alias: 'foo', src: 'bar.png');\n * resolver.resolveUrl('foo') // => 'bar.png'\n *\n * // Multiple keys, single asset:\n * resolver.add({alias: ['foo', 'boo'], src: 'bar.png'});\n * resolver.resolveUrl('foo') // => 'bar.png'\n * resolver.resolveUrl('boo') // => 'bar.png'\n *\n * // Multiple keys, multiple assets:\n * resolver.add({alias: ['foo', 'boo'], src: ['bar.png', 'bar.webp']});\n * resolver.resolveUrl('foo') // => 'bar.png'\n *\n * // Add custom data attached to the resolver\n * Resolver.add({\n * alias: 'bunnyBooBooSmooth',\n * src: 'bunny{png,webp}',\n * data: { scaleMode:SCALE_MODES.NEAREST }, // Base texture options\n * });\n *\n * resolver.resolve('bunnyBooBooSmooth') // => { src: 'bunny.png', data: { scaleMode: SCALE_MODES.NEAREST } }\n * @param aliases - the UnresolvedAsset or array of UnresolvedAssets to add to the resolver\n */\n public add(\n aliases: ArrayOr,\n ): void\n {\n const assets: UnresolvedAsset[] = [];\n\n if (Array.isArray(aliases))\n {\n assets.push(...(aliases as UnresolvedAsset[]));\n }\n else\n {\n assets.push(aliases as UnresolvedAsset);\n }\n\n let keyCheck: (key: string) => void;\n\n // #if _DEBUG\n // eslint-disable-next-line prefer-const\n keyCheck = (key: string) =>\n {\n if (this.hasKey(key))\n {\n // #if _DEBUG\n warn(`[Resolver] already has key: ${key} overwriting`);\n // #endif\n }\n };\n // #endif\n\n const assetArray = convertToList(assets);\n\n // loop through all the assets and generate a resolve asset for each src\n assetArray.forEach((asset) =>\n {\n const { src } = asset;\n let { data, format, loadParser } = asset;\n\n // src can contain an unresolved asset itself\n // so we need to merge that data with the current asset\n // we dont need to create string variations for the src if it is a ResolvedAsset\n const srcsToUse: (string | ResolvedSrc)[][] = convertToList(src).map((src) =>\n {\n if (typeof src === 'string')\n { return createStringVariations(src); }\n\n return Array.isArray(src) ? src : [src];\n });\n\n const aliasesToUse = this.getAlias(asset);\n\n // #if _DEBUG\n Array.isArray(aliasesToUse) ? aliasesToUse.forEach(keyCheck) : keyCheck(aliasesToUse);\n // #endif\n\n // loop through all the srcs and generate a resolve asset for each src\n const resolvedAssets: ResolvedAsset[] = [];\n\n srcsToUse.forEach((srcs) =>\n {\n srcs.forEach((src) =>\n {\n let formattedAsset = {} as ResolvedAsset;\n\n if (typeof src !== 'object')\n {\n formattedAsset.src = src;\n // first see if it contains any {} tags...\n for (let i = 0; i < this._parsers.length; i++)\n {\n const parser = this._parsers[i];\n\n if (parser.test(src))\n {\n formattedAsset = parser.parse(src);\n break;\n }\n }\n }\n else\n {\n data = src.data ?? data;\n format = src.format ?? format;\n loadParser = src.loadParser ?? loadParser;\n formattedAsset = {\n ...formattedAsset,\n ...src,\n };\n }\n\n // check if aliases is undefined\n if (!aliasesToUse)\n {\n throw new Error(`[Resolver] alias is undefined for this asset: ${formattedAsset.src}`);\n }\n\n formattedAsset = this._buildResolvedAsset(formattedAsset, {\n aliases: aliasesToUse,\n data,\n format,\n loadParser,\n });\n\n resolvedAssets.push(formattedAsset);\n });\n });\n\n aliasesToUse.forEach((alias) =>\n {\n this._assetMap[alias] = resolvedAssets;\n });\n });\n }\n\n // TODO: this needs an overload like load did in Assets\n /**\n * If the resolver has had a manifest set via setManifest, this will return the assets urls for\n * a given bundleId or bundleIds.\n * @example\n * // Manifest Example\n * const manifest = {\n * bundles: [\n * {\n * name: 'load-screen',\n * assets: [\n * {\n * alias: 'background',\n * src: 'sunset.png',\n * },\n * {\n * alias: 'bar',\n * src: 'load-bar.{png,webp}',\n * },\n * ],\n * },\n * {\n * name: 'game-screen',\n * assets: [\n * {\n * alias: 'character',\n * src: 'robot.png',\n * },\n * {\n * alias: 'enemy',\n * src: 'bad-guy.png',\n * },\n * ],\n * },\n * ]\n * };\n *\n * resolver.setManifest(manifest);\n * const resolved = resolver.resolveBundle('load-screen');\n * @param bundleIds - The bundle ids to resolve\n * @returns All the bundles assets or a hash of assets for each bundle specified\n */\n public resolveBundle(bundleIds: ArrayOr):\n Record | Record>\n {\n const singleAsset = isSingleItem(bundleIds);\n\n bundleIds = convertToList(bundleIds);\n\n const out: Record> = {};\n\n bundleIds.forEach((bundleId) =>\n {\n const assetNames = this._bundles[bundleId];\n\n if (assetNames)\n {\n const results = this.resolve(assetNames) as Record;\n\n const assets: Record = {};\n\n for (const key in results)\n {\n const asset = results[key];\n\n assets[this._extractAssetIdFromBundle(bundleId, key)] = asset;\n }\n\n out[bundleId] = assets;\n }\n });\n\n return singleAsset ? out[bundleIds[0]] : out;\n }\n\n /**\n * Does exactly what resolve does, but returns just the URL rather than the whole asset object\n * @param key - The key or keys to resolve\n * @returns - The URLs associated with the key(s)\n */\n public resolveUrl(key: ArrayOr): string | Record\n {\n const result = this.resolve(key as string) as ResolvedAsset | Record;\n\n if (typeof key !== 'string')\n {\n const out: Record = {};\n\n for (const i in result)\n {\n out[i] = (result as Record)[i].src;\n }\n\n return out;\n }\n\n return (result as ResolvedAsset).src;\n }\n\n /**\n * Resolves each key in the list to an asset object.\n * Another key function of the resolver! After adding all the various key/asset pairs. this will run the logic\n * of finding which asset to return based on any preferences set using the `prefer` function\n * by default the same key passed in will be returned if nothing is matched by the resolver.\n * @example\n * resolver.add('boo', 'bunny.png');\n *\n * resolver.resolve('boo') // => { src: 'bunny.png' }\n *\n * // Will return the same string as no key was added for this value..\n * resolver.resolve('another-thing.png') // => { src: 'another-thing.png' }\n * @param keys - key or keys to resolve\n * @returns - the resolve asset or a hash of resolve assets for each key specified\n */\n public resolve(keys: string): ResolvedAsset;\n public resolve(keys: string[]): Record;\n public resolve(keys: ArrayOr): ResolvedAsset | Record\n {\n const singleAsset = isSingleItem(keys);\n\n keys = convertToList(keys);\n\n const result: Record = {};\n\n keys.forEach((key) =>\n {\n if (!this._resolverHash[key])\n {\n if (this._assetMap[key])\n {\n let assets = this._assetMap[key];\n const preferredOrder = this._getPreferredOrder(assets);\n\n preferredOrder?.priority.forEach((priorityKey) =>\n {\n preferredOrder.params[priorityKey].forEach((value: unknown) =>\n {\n const filteredAssets = assets.filter((asset) =>\n {\n if (asset[priorityKey as keyof ResolvedAsset])\n {\n return asset[priorityKey as keyof ResolvedAsset] === value;\n }\n\n return false;\n });\n\n if (filteredAssets.length)\n {\n assets = filteredAssets;\n }\n });\n });\n\n this._resolverHash[key] = assets[0];\n }\n else\n {\n this._resolverHash[key] = this._buildResolvedAsset({\n alias: [key],\n src: key,\n }, {});\n }\n }\n\n result[key] = this._resolverHash[key];\n });\n\n return singleAsset ? result[keys[0]] : result;\n }\n\n /**\n * Checks if an asset with a given key exists in the resolver\n * @param key - The key of the asset\n */\n public hasKey(key: string): boolean\n {\n return !!this._assetMap[key];\n }\n\n /**\n * Checks if a bundle with the given key exists in the resolver\n * @param key - The key of the bundle\n */\n public hasBundle(key: string): boolean\n {\n return !!this._bundles[key];\n }\n\n /**\n * Internal function for figuring out what prefer criteria an asset should use.\n * @param assets\n */\n private _getPreferredOrder(assets: ResolvedAsset[]): PreferOrder\n {\n for (let i = 0; i < assets.length; i++)\n {\n const asset = assets[0];\n\n const preferred = this._preferredOrder.find((preference: PreferOrder) =>\n preference.params.format.includes(asset.format));\n\n if (preferred)\n {\n return preferred;\n }\n }\n\n return this._preferredOrder[0];\n }\n\n /**\n * Appends the default url parameters to the url\n * @param url - The url to append the default parameters to\n * @returns - The url with the default parameters appended\n */\n private _appendDefaultSearchParams(url: string): string\n {\n if (!this._defaultSearchParams) return url;\n\n const paramConnector = (/\\?/).test(url) ? '&' : '?';\n\n return `${url}${paramConnector}${this._defaultSearchParams}`;\n }\n\n private _buildResolvedAsset(formattedAsset: ResolvedAsset, data?: {\n aliases?: string[],\n data?: Record\n loadParser?: string,\n format?: string,\n }): ResolvedAsset\n {\n const { aliases, data: assetData, loadParser, format } = data;\n\n if (this._basePath || this._rootPath)\n {\n formattedAsset.src = path.toAbsolute(formattedAsset.src, this._basePath, this._rootPath);\n }\n\n formattedAsset.alias = aliases ?? formattedAsset.alias ?? [formattedAsset.src];\n formattedAsset.src = this._appendDefaultSearchParams(formattedAsset.src);\n formattedAsset.data = { ...assetData || {}, ...formattedAsset.data };\n formattedAsset.loadParser = loadParser ?? formattedAsset.loadParser;\n formattedAsset.format = format ?? formattedAsset.format ?? getUrlExtension(formattedAsset.src);\n\n return formattedAsset;\n }\n}\n\nexport function getUrlExtension(url: string)\n{\n return url.split('.').pop().split('?').shift()\n .split('#')\n .shift();\n}\n","/**\n * Copies the search params from one url to another\n * @param targetUrl - the url to copy the search params to\n * @param sourceUrl - the url container the search params we want to copy\n * @returns the url with the search params copied\n */\nexport const copySearchParams = (targetUrl: string, sourceUrl: string) =>\n{\n const searchParams = sourceUrl.split('?')[1];\n\n if (searchParams)\n {\n targetUrl += `?${searchParams}`;\n }\n\n return targetUrl;\n};\n","// Your friendly neighbour https://en.wikipedia.org/wiki/Dihedral_group\n//\n// This file implements the dihedral group of order 16, also called\n// of degree 8. That's why its called groupD8.\n\nimport { Matrix } from './Matrix';\n\n/*\n * Transform matrix for operation n is:\n * | ux | vx |\n * | uy | vy |\n */\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];\n\n/**\n * [Cayley Table]{@link https://en.wikipedia.org/wiki/Cayley_table}\n * for the composition of each rotation in the dihederal group D8.\n * @type {number[][]}\n * @private\n */\nconst rotationCayley: number[][] = [];\n\n/**\n * Matrices for each `GD8Symmetry` rotation.\n * @type {Matrix[]}\n * @private\n */\nconst rotationMatrices: Matrix[] = [];\n\n/*\n * Alias for {@code Math.sign}.\n */\nconst signum = Math.sign;\n\n/*\n * Initializes `rotationCayley` and `rotationMatrices`. It is called\n * only once below.\n */\nfunction init(): void\n{\n for (let i = 0; i < 16; i++)\n {\n const row: number[] = [];\n\n rotationCayley.push(row);\n\n for (let j = 0; j < 16; j++)\n {\n /* Multiplies rotation matrices i and j. */\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 /* Finds rotation matrix matching the product and pushes it. */\n for (let k = 0; k < 16; k++)\n {\n if (ux[k] === _ux && uy[k] === _uy\n && 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 rotationMatrices.push(mat);\n }\n}\n\ninit();\n\ntype GD8Symmetry = number;\n/**\n * @typedef {number} GD8Symmetry\n * @see groupD8\n */\n\n/**\n * Implements the dihedral group D8, which is similar to\n * [group D4]{@link http://mathworld.wolfram.com/DihedralGroupD4.html};\n * D8 is the same but with diagonals, and it is used for texture\n * rotations.\n *\n * The directions the U- and V- axes after rotation\n * of an angle of `a: GD8Constant` are the vectors `(uX(a), uY(a))`\n * and `(vX(a), vY(a))`. These aren't necessarily unit vectors.\n *\n * **Origin:**
\n * This is the small part of gameofbombs.com portal system. It works.\n * @see maths.groupD8.E\n * @see maths.groupD8.SE\n * @see maths.groupD8.S\n * @see maths.groupD8.SW\n * @see maths.groupD8.W\n * @see maths.groupD8.NW\n * @see maths.groupD8.N\n * @see maths.groupD8.NE\n * @author Ivan @ivanpopelyshev\n * @namespace maths.groupD8\n */\nexport const groupD8 = {\n /**\n * | Rotation | Direction |\n * |----------|-----------|\n * | 0° | East |\n * @memberof maths.groupD8\n * @constant {GD8Symmetry}\n */\n E: 0,\n\n /**\n * | Rotation | Direction |\n * |----------|-----------|\n * | 45°↻ | Southeast |\n * @memberof maths.groupD8\n * @constant {GD8Symmetry}\n */\n SE: 1,\n\n /**\n * | Rotation | Direction |\n * |----------|-----------|\n * | 90°↻ | South |\n * @memberof maths.groupD8\n * @constant {GD8Symmetry}\n */\n S: 2,\n\n /**\n * | Rotation | Direction |\n * |----------|-----------|\n * | 135°↻ | Southwest |\n * @memberof maths.groupD8\n * @constant {GD8Symmetry}\n */\n SW: 3,\n\n /**\n * | Rotation | Direction |\n * |----------|-----------|\n * | 180° | West |\n * @memberof maths.groupD8\n * @constant {GD8Symmetry}\n */\n W: 4,\n\n /**\n * | Rotation | Direction |\n * |-------------|--------------|\n * | -135°/225°↻ | Northwest |\n * @memberof maths.groupD8\n * @constant {GD8Symmetry}\n */\n NW: 5,\n\n /**\n * | Rotation | Direction |\n * |-------------|--------------|\n * | -90°/270°↻ | North |\n * @memberof maths.groupD8\n * @constant {GD8Symmetry}\n */\n N: 6,\n\n /**\n * | Rotation | Direction |\n * |-------------|--------------|\n * | -45°/315°↻ | Northeast |\n * @memberof maths.groupD8\n * @constant {GD8Symmetry}\n */\n NE: 7,\n\n /**\n * Reflection about Y-axis.\n * @memberof maths.groupD8\n * @constant {GD8Symmetry}\n */\n MIRROR_VERTICAL: 8,\n\n /**\n * Reflection about the main diagonal.\n * @memberof maths.groupD8\n * @constant {GD8Symmetry}\n */\n MAIN_DIAGONAL: 10,\n\n /**\n * Reflection about X-axis.\n * @memberof maths.groupD8\n * @constant {GD8Symmetry}\n */\n MIRROR_HORIZONTAL: 12,\n\n /**\n * Reflection about reverse diagonal.\n * @memberof maths.groupD8\n * @constant {GD8Symmetry}\n */\n REVERSE_DIAGONAL: 14,\n\n /**\n * @memberof maths.groupD8\n * @param {GD8Symmetry} ind - sprite rotation angle.\n * @returns {GD8Symmetry} The X-component of the U-axis\n * after rotating the axes.\n */\n uX: (ind: GD8Symmetry): GD8Symmetry => ux[ind],\n\n /**\n * @memberof maths.groupD8\n * @param {GD8Symmetry} ind - sprite rotation angle.\n * @returns {GD8Symmetry} The Y-component of the U-axis\n * after rotating the axes.\n */\n uY: (ind: GD8Symmetry): GD8Symmetry => uy[ind],\n\n /**\n * @memberof maths.groupD8\n * @param {GD8Symmetry} ind - sprite rotation angle.\n * @returns {GD8Symmetry} The X-component of the V-axis\n * after rotating the axes.\n */\n vX: (ind: GD8Symmetry): GD8Symmetry => vx[ind],\n\n /**\n * @memberof maths.groupD8\n * @param {GD8Symmetry} ind - sprite rotation angle.\n * @returns {GD8Symmetry} The Y-component of the V-axis\n * after rotating the axes.\n */\n vY: (ind: GD8Symmetry): GD8Symmetry => vy[ind],\n\n /**\n * @memberof maths.groupD8\n * @param {GD8Symmetry} rotation - symmetry whose opposite\n * is needed. Only rotations have opposite symmetries while\n * reflections don't.\n * @returns {GD8Symmetry} The opposite symmetry of `rotation`\n */\n inv: (rotation: GD8Symmetry): GD8Symmetry =>\n {\n if (rotation & 8)// true only if between 8 & 15 (reflections)\n {\n return rotation & 15;// or rotation % 16\n }\n\n return (-rotation) & 7;// or (8 - rotation) % 8\n },\n\n /**\n * Composes the two D8 operations.\n *\n * Taking `^` as reflection:\n *\n * | | E=0 | S=2 | W=4 | N=6 | E^=8 | S^=10 | W^=12 | N^=14 |\n * |-------|-----|-----|-----|-----|------|-------|-------|-------|\n * | E=0 | E | S | W | N | E^ | S^ | W^ | N^ |\n * | S=2 | S | W | N | E | S^ | W^ | N^ | E^ |\n * | W=4 | W | N | E | S | W^ | N^ | E^ | S^ |\n * | N=6 | N | E | S | W | N^ | E^ | S^ | W^ |\n * | E^=8 | E^ | N^ | W^ | S^ | E | N | W | S |\n * | S^=10 | S^ | E^ | N^ | W^ | S | E | N | W |\n * | W^=12 | W^ | S^ | E^ | N^ | W | S | E | N |\n * | N^=14 | N^ | W^ | S^ | E^ | N | W | S | E |\n *\n * [This is a Cayley table]{@link https://en.wikipedia.org/wiki/Cayley_table}\n * @memberof maths.groupD8\n * @param {GD8Symmetry} rotationSecond - Second operation, which\n * is the row in the above cayley table.\n * @param {GD8Symmetry} rotationFirst - First operation, which\n * is the column in the above cayley table.\n * @returns {GD8Symmetry} Composed operation\n */\n add: (rotationSecond: GD8Symmetry, rotationFirst: GD8Symmetry): GD8Symmetry => (\n rotationCayley[rotationSecond][rotationFirst]\n ),\n\n /**\n * Reverse of `add`.\n * @memberof maths.groupD8\n * @param {GD8Symmetry} rotationSecond - Second operation\n * @param {GD8Symmetry} rotationFirst - First operation\n * @returns {GD8Symmetry} Result\n */\n sub: (rotationSecond: GD8Symmetry, rotationFirst: GD8Symmetry): GD8Symmetry => (\n rotationCayley[rotationSecond][groupD8.inv(rotationFirst)]\n ),\n\n /**\n * Adds 180 degrees to rotation, which is a commutative\n * operation.\n * @memberof maths.groupD8\n * @param {number} rotation - The number to rotate.\n * @returns {number} Rotated number\n */\n rotate180: (rotation: number): number => rotation ^ 4,\n\n /**\n * Checks if the rotation angle is vertical, i.e. south\n * or north. It doesn't work for reflections.\n * @memberof maths.groupD8\n * @param {GD8Symmetry} rotation - The number to check.\n * @returns {boolean} Whether or not the direction is vertical\n */\n isVertical: (rotation: GD8Symmetry): boolean => (rotation & 3) === 2, // rotation % 4 === 2\n\n /**\n * Approximates the vector `V(dx,dy)` into one of the\n * eight directions provided by `groupD8`.\n * @memberof maths.groupD8\n * @param {number} dx - X-component of the vector\n * @param {number} dy - Y-component of the vector\n * @returns {GD8Symmetry} Approximation of the vector into\n * one of the eight symmetries.\n */\n byDirection: (dx: number, dy: number): GD8Symmetry =>\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 * @memberof maths.groupD8\n * @param {Matrix} matrix - sprite world matrix\n * @param {GD8Symmetry} rotation - The rotation factor to use.\n * @param {number} tx - sprite anchoring\n * @param {number} ty - sprite anchoring\n */\n matrixAppendRotationInv: (matrix: Matrix, rotation: GD8Symmetry, tx = 0, ty = 0): void =>\n {\n // Packer used \"rotation\", we use \"inv(rotation)\"\n const mat: Matrix = rotationMatrices[groupD8.inv(rotation)];\n\n mat.tx = tx;\n mat.ty = ty;\n matrix.append(mat);\n },\n};\n","export const NOOP = () =>\n{\n // empty!\n};\n","// Taken from the bit-twiddle package\n\n/**\n * Rounds to next power of two.\n * @function nextPow2\n * @param {number} v - input value\n * @returns {number} - next rounded power of two\n * @memberof maths\n */\nexport function nextPow2(v: number): number\n{\n v += v === 0 ? 1 : 0;\n --v;\n v |= v >>> 1;\n v |= v >>> 2;\n v |= v >>> 4;\n v |= v >>> 8;\n v |= v >>> 16;\n\n return v + 1;\n}\n\n/**\n * Checks if a number is a power of two.\n * @function isPow2\n * @param {number} v - input value\n * @returns {boolean} `true` if value is power of two\n * @memberof maths\n */\nexport function isPow2(v: number): boolean\n{\n return !(v & (v - 1)) && (!!v);\n}\n\n/**\n * Computes ceil of log base 2\n * @function log2\n * @param {number} v - input value\n * @returns {number} logarithm base 2\n * @memberof maths\n */\nexport function log2(v: number): number\n{\n let r = (v > 0xFFFF ? 1 : 0) << 4;\n\n v >>>= r;\n\n let shift = (v > 0xFF ? 1 : 0) << 3;\n\n v >>>= shift; r |= shift;\n shift = (v > 0xF ? 1 : 0) << 2;\n v >>>= shift; r |= shift;\n shift = (v > 0x3 ? 1 : 0) << 1;\n v >>>= shift; r |= shift;\n\n return r | (v >> 1);\n}\n","/**\n * Returns a new object with all properties from the input object that have defined values.\n * @template T - The type of the input object.\n * @param {T} obj - The input object.\n * @returns {T} - A new object with only the defined properties from the input object.\n * @memberof utils\n * @ignore\n */\nexport function definedProps>(obj: T): T\n{\n const result: Partial = {};\n\n for (const key in obj)\n {\n if (obj[key] !== undefined)\n {\n result[key] = obj[key];\n }\n }\n\n return result as T;\n}\n","import EventEmitter from 'eventemitter3';\nimport { uid } from '../../../../utils/data/uid';\nimport { deprecation, v8_0_0 } from '../../../../utils/logging/deprecation';\n\nimport type { BindResource } from '../../gpu/shader/BindResource';\nimport type { COMPARE_FUNCTION, SCALE_MODE, WRAP_MODE } from './const';\n\nconst idHash: Record = Object.create(null);\n\n/**\n * This takes a shader string and maps it to a resource id.\n * This is a little different than regular resource ids as these ids\n * are not unique to the resource. But must not overlap with other (non sampler) resources Ids.\n * @param value - the string to turn into a resource id\n * @returns a unique resource id\n */\nfunction createResourceIdFromString(value: string): number\n{\n const id = idHash[value];\n\n if (id === undefined)\n {\n idHash[value] = uid('resource');\n }\n\n return id;\n}\n\nexport interface TextureStyleOptions extends Partial\n{\n /** setting this will set wrapModeU,wrapModeV and wrapModeW all at once! */\n addressMode?: WRAP_MODE;\n /** specifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively. */\n addressModeU?: WRAP_MODE;\n /** specifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively. */\n addressModeV?: WRAP_MODE;\n /** Specifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively. */\n addressModeW?: WRAP_MODE;\n\n /** setting this will set magFilter,minFilter and mipmapFilter all at once! */\n scaleMode?: SCALE_MODE;\n\n /** specifies the sampling behavior when the sample footprint is smaller than or equal to one texel. */\n magFilter?: SCALE_MODE;\n /** specifies the sampling behavior when the sample footprint is larger than one texel. */\n minFilter?: SCALE_MODE;\n /** specifies behavior for sampling between mipmap levels. */\n mipmapFilter?: SCALE_MODE;\n\n /** specifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture. */\n lodMinClamp?: number;\n /** Specifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture. */\n lodMaxClamp?: number;\n /**\n * When provided the sampler will be a comparison sampler with the specified\n * {@link GPUCompareFunction}.\n * Note: Comparison samplers may use filtering, but the sampling results will be\n * implementation-dependent and may differ from the normal filtering rules.\n */\n compare?: COMPARE_FUNCTION;\n /**\n * Specifies the maximum anisotropy value clamp used by the sampler.\n * Note: Most implementations support {@link GPUSamplerDescriptor#maxAnisotropy} values in range\n * between 1 and 16, inclusive. The used value of {@link GPUSamplerDescriptor#maxAnisotropy} will\n * be clamped to the maximum value that the platform supports.\n *\n * setting this to anything higher than 1 will set scale modes to 'linear'\n */\n maxAnisotropy?: number;\n}\n\n/**\n * A texture style describes how a texture should be sampled by a shader.\n * @memberof rendering\n */\nexport class TextureStyle extends EventEmitter<{\n change: TextureStyle,\n destroy: TextureStyle,\n}> implements BindResource\n{\n public _resourceType = 'textureSampler';\n public _touched = 0;\n private _sharedResourceId: number;\n\n /** default options for the style */\n public static readonly defaultOptions: TextureStyleOptions = {\n addressMode: 'clamp-to-edge',\n scaleMode: 'linear'\n };\n\n /** */\n public addressModeU?: WRAP_MODE;\n /** */\n public addressModeV?: WRAP_MODE;\n /** Specifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively. */\n public addressModeW?: WRAP_MODE;\n /** Specifies the sampling behavior when the sample footprint is smaller than or equal to one texel. */\n public magFilter?: SCALE_MODE;\n /** Specifies the sampling behavior when the sample footprint is larger than one texel. */\n public minFilter?: SCALE_MODE;\n /** Specifies behavior for sampling between mipmap levels. */\n public mipmapFilter?: SCALE_MODE;\n /** */\n public lodMinClamp?: number;\n /** Specifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture. */\n public lodMaxClamp?: number;\n /**\n * When provided the sampler will be a comparison sampler with the specified\n * {@link GPUCompareFunction}.\n * Note: Comparison samplers may use filtering, but the sampling results will be\n * implementation-dependent and may differ from the normal filtering rules.\n */\n public compare?: COMPARE_FUNCTION;\n /**\n * Specifies the maximum anisotropy value clamp used by the sampler.\n * Note: Most implementations support {@link GPUSamplerDescriptor#maxAnisotropy} values in range\n * between 1 and 16, inclusive. The used value of {@link GPUSamplerDescriptor#maxAnisotropy} will\n * be clamped to the maximum value that the platform supports.\n * @internal\n * @ignore\n */\n public _maxAnisotropy?: number = 1;\n\n /**\n * Has the style been destroyed?\n * @readonly\n */\n public destroyed = false;\n\n /**\n * @param options - options for the style\n */\n constructor(options: TextureStyleOptions = {})\n {\n super();\n\n options = { ...TextureStyle.defaultOptions, ...options };\n\n this.addressMode = options.addressMode;\n\n this.addressModeU = options.addressModeU ?? this.addressModeU;\n this.addressModeV = options.addressModeV ?? this.addressModeV;\n this.addressModeW = options.addressModeW ?? this.addressModeW;\n\n this.scaleMode = options.scaleMode;\n\n this.magFilter = options.magFilter ?? this.magFilter;\n this.minFilter = options.minFilter ?? this.minFilter;\n this.mipmapFilter = options.mipmapFilter ?? this.mipmapFilter;\n\n this.lodMinClamp = options.lodMinClamp;\n this.lodMaxClamp = options.lodMaxClamp;\n\n this.compare = options.compare;\n\n this.maxAnisotropy = options.maxAnisotropy ?? 1;\n }\n\n set addressMode(value: WRAP_MODE)\n {\n this.addressModeU = value;\n this.addressModeV = value;\n this.addressModeW = value;\n }\n\n /** setting this will set wrapModeU,wrapModeV and wrapModeW all at once! */\n get addressMode(): WRAP_MODE\n {\n return this.addressModeU;\n }\n\n set wrapMode(value: WRAP_MODE)\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'TextureStyle.wrapMode is now TextureStyle.addressMode');\n // #endif\n\n this.addressMode = value;\n }\n\n get wrapMode(): WRAP_MODE\n {\n return this.addressMode;\n }\n\n set scaleMode(value: SCALE_MODE)\n {\n this.magFilter = value;\n this.minFilter = value;\n this.mipmapFilter = value;\n }\n\n /** setting this will set magFilter,minFilter and mipmapFilter all at once! */\n get scaleMode(): SCALE_MODE\n {\n return this.magFilter;\n }\n\n /** Specifies the maximum anisotropy value clamp used by the sampler. */\n set maxAnisotropy(value: number)\n {\n this._maxAnisotropy = Math.min(value, 16);\n\n if (this._maxAnisotropy > 1)\n {\n this.scaleMode = 'linear';\n }\n }\n\n get maxAnisotropy(): number\n {\n return this._maxAnisotropy;\n }\n\n // TODO - move this to WebGL?\n get _resourceId(): number\n {\n return this._sharedResourceId || this._generateResourceId();\n }\n\n public update()\n {\n // manage the resource..\n this.emit('change', this);\n this._sharedResourceId = null;\n }\n\n private _generateResourceId(): number\n {\n // eslint-disable-next-line max-len\n const bigKey = `${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;\n\n this._sharedResourceId = createResourceIdFromString(bigKey);\n\n return this._resourceId;\n }\n\n /** Destroys the style */\n public destroy()\n {\n this.destroyed = true;\n\n this.emit('destroy', this);\n this.emit('change', this);\n\n this.removeAllListeners();\n }\n}\n","import EventEmitter from 'eventemitter3';\nimport { isPow2 } from '../../../../../maths/misc/pow2';\nimport { definedProps } from '../../../../../scene/container/utils/definedProps';\nimport { uid } from '../../../../../utils/data/uid';\nimport { TextureStyle } from '../TextureStyle';\n\nimport type { BindResource } from '../../../gpu/shader/BindResource';\nimport type { ALPHA_MODES, SCALE_MODE, TEXTURE_DIMENSIONS, TEXTURE_FORMATS, WRAP_MODE } from '../const';\nimport type { TextureStyleOptions } from '../TextureStyle';\nimport type { TextureResourceOrOptions } from '../utils/textureFrom';\n\n/**\n * options for creating a new TextureSource\n * @memberof rendering\n */\nexport interface TextureSourceOptions = any> extends TextureStyleOptions\n{\n /**\n * the resource that will be upladed to the GPU. This is where we get our pixels from\n * eg an ImageBimt / Canvas / Video etc\n */\n resource?: T;\n /** the pixel width of this texture source. This is the REAL pure number, not accounting resolution */\n width?: number;\n /** the pixel height of this texture source. This is the REAL pure number, not accounting resolution */\n height?: number;\n /** the resolution of the texture. */\n resolution?: number;\n /** the format that the texture data has */\n format?: TEXTURE_FORMATS;\n /**\n * Used by internal textures\n * @ignore\n */\n sampleCount?: number;\n /**\n * Only really affects RenderTextures.\n * Should we use antialiasing for this texture. It will look better, but may impact performance as a\n * Blit operation will be required to resolve the texture.\n */\n antialias?: boolean;\n /** how many dimensions does this texture have? currently v8 only supports 2d */\n dimensions?: TEXTURE_DIMENSIONS;\n /** The number of mip levels to generate for this texture. this is overridden if autoGenerateMipmaps is true */\n mipLevelCount?: number;\n /**\n * Should we auto generate mipmaps for this texture? This will automatically generate mipmaps\n * for this texture when uploading to the GPU. Mipmapped textures take up more memory, but\n * can look better when scaled down.\n *\n * For performance reasons, it is recommended to NOT use this with RenderTextures, as they are often updated every frame.\n * If you do, make sure to call `updateMipmaps` after you update the texture.\n */\n autoGenerateMipmaps?: boolean;\n /** the alpha mode of the texture */\n alphaMode?: ALPHA_MODES;\n /** optional label, can be used for debugging */\n label?: string;\n /** If true, the Garbage Collector will unload this texture if it is not used after a period of time */\n autoGarbageCollect?: boolean;\n}\n\n/**\n * A TextureSource stores the information that represents an image.\n * All textures have require TextureSource, which contains information about the source.\n * Therefore you can have many textures all using a single TextureSource (eg a sprite sheet)\n *\n * This is an class is extended depending on the source of the texture.\n * Eg if you are using an an image as your resource, then an ImageSource is used.\n * @memberof rendering\n * @typeParam T - The TextureSource's Resource type.\n */\nexport class TextureSource = any> extends EventEmitter<{\n change: BindResource;\n update: TextureSource;\n unload: TextureSource;\n destroy: TextureSource;\n resize: TextureSource;\n styleChange: TextureSource;\n updateMipmaps: TextureSource;\n error: Error;\n}> implements BindResource\n{\n /** The default options used when creating a new TextureSource. override these to add your own defaults */\n public static defaultOptions: TextureSourceOptions = {\n resolution: 1,\n format: 'bgra8unorm',\n alphaMode: 'premultiply-alpha-on-upload',\n dimensions: '2d',\n mipLevelCount: 1,\n autoGenerateMipmaps: false,\n sampleCount: 1,\n antialias: false,\n autoGarbageCollect: false,\n };\n\n /** unique id for this Texture source */\n public readonly uid = uid('textureSource');\n /** optional label, can be used for debugging */\n public label: string;\n\n /**\n * The resource type used by this TextureSource. This is used by the bind groups to determine\n * how to handle this resource.\n * @ignore\n * @internal\n */\n public readonly _resourceType = 'textureSource';\n /**\n * i unique resource id, used by the bind group systems.\n * This can change if the texture is resized or its resource changes\n */\n public _resourceId = uid('resource');\n /**\n * this is how the backends know how to upload this texture to the GPU\n * It changes depending on the resource type. Classes that extend TextureSource\n * should override this property.\n * @ignore\n * @internal\n */\n public uploadMethodId = 'unknown';\n\n // dimensions\n public _resolution = 1;\n\n /** the pixel width of this texture source. This is the REAL pure number, not accounting resolution */\n public pixelWidth = 1;\n /** the pixel height of this texture source. This is the REAL pure number, not accounting resolution */\n public pixelHeight = 1;\n\n /**\n * the width of this texture source, accounting for resolution\n * eg pixelWidth 200, resolution 2, then width will be 100\n */\n public width = 1;\n /**\n * the height of this texture source, accounting for resolution\n * eg pixelHeight 200, resolution 2, then height will be 100\n */\n public height = 1;\n\n /**\n * the resource that will be upladed to the GPU. This is where we get our pixels from\n * eg an ImageBimt / Canvas / Video etc\n */\n public resource: T;\n\n /**\n * The number of samples of a multisample texture. This is always 1 for non-multisample textures.\n * To enable multisample for a texture, set antialias to true\n * @internal\n * @ignore\n */\n public sampleCount = 1;\n\n /** The number of mip levels to generate for this texture. this is overridden if autoGenerateMipmaps is true */\n public mipLevelCount = 1;\n /**\n * Should we auto generate mipmaps for this texture? This will automatically generate mipmaps\n * for this texture when uploading to the GPU. Mipmapped textures take up more memory, but\n * can look better when scaled down.\n *\n * For performance reasons, it is recommended to NOT use this with RenderTextures, as they are often updated every frame.\n * If you do, make sure to call `updateMipmaps` after you update the texture.\n */\n public autoGenerateMipmaps = false;\n /** the format that the texture data has */\n public format: TEXTURE_FORMATS = 'rgba8unorm';\n /** how many dimensions does this texture have? currently v8 only supports 2d */\n public dimension: TEXTURE_DIMENSIONS = '2d';\n /** the alpha mode of the texture */\n public alphaMode: ALPHA_MODES;\n private _style: TextureStyle;\n\n /**\n * Only really affects RenderTextures.\n * Should we use antialiasing for this texture. It will look better, but may impact performance as a\n * Blit operation will be required to resolve the texture.\n */\n public antialias = false;\n\n /**\n * Has the source been destroyed?\n * @readonly\n */\n public destroyed: boolean;\n\n /**\n * Used by automatic texture Garbage Collection, stores last GC tick when it was bound\n * @protected\n */\n public _touched = 0;\n\n /**\n * Used by the batcher to build texture batches. faster to have the variable here!\n * @protected\n */\n public _batchTick = -1;\n /**\n * A temporary batch location for the texture batching. Here for performance reasons only!\n * @protected\n */\n public _textureBindLocation = -1;\n\n public isPowerOfTwo: boolean;\n\n /** If true, the Garbage Collector will unload this texture if it is not used after a period of time */\n public autoGarbageCollect: boolean;\n\n /**\n * used internally to know where a texture came from. Usually assigned by the asset loader!\n * @ignore\n */\n public _sourceOrigin: string;\n\n /**\n * @param options - options for creating a new TextureSource\n */\n constructor(protected readonly options: TextureSourceOptions = {})\n {\n super();\n\n options = { ...TextureSource.defaultOptions, ...options };\n\n this.label = options.label ?? '';\n this.resource = options.resource;\n this.autoGarbageCollect = options.autoGarbageCollect;\n this._resolution = options.resolution;\n\n if (options.width)\n {\n this.pixelWidth = options.width * this._resolution;\n }\n else\n {\n this.pixelWidth = this.resource ? (this.resourceWidth ?? 1) : 1;\n }\n\n if (options.height)\n {\n this.pixelHeight = options.height * this._resolution;\n }\n else\n {\n this.pixelHeight = this.resource ? (this.resourceHeight ?? 1) : 1;\n }\n\n this.width = this.pixelWidth / this._resolution;\n this.height = this.pixelHeight / this._resolution;\n\n this.format = options.format;\n this.dimension = options.dimensions;\n this.mipLevelCount = options.mipLevelCount;\n this.autoGenerateMipmaps = options.autoGenerateMipmaps;\n this.sampleCount = options.sampleCount;\n this.antialias = options.antialias;\n this.alphaMode = options.alphaMode;\n\n this.style = new TextureStyle(definedProps(options));\n\n this.destroyed = false;\n\n this._refreshPOT();\n }\n\n /** returns itself */\n get source(): TextureSource\n {\n return this;\n }\n\n /** the style of the texture */\n get style(): TextureStyle\n {\n return this._style;\n }\n\n set style(value: TextureStyle)\n {\n if (this.style === value) return;\n\n this._style?.off('change', this._onStyleChange, this);\n this._style = value;\n this._style?.on('change', this._onStyleChange, this);\n\n this._onStyleChange();\n }\n\n /** setting this will set wrapModeU,wrapModeV and wrapModeW all at once! */\n get addressMode(): WRAP_MODE\n {\n return this._style.addressMode;\n }\n\n set addressMode(value: WRAP_MODE)\n {\n this._style.addressMode = value;\n }\n\n /** setting this will set wrapModeU,wrapModeV and wrapModeW all at once! */\n get repeatMode(): WRAP_MODE\n {\n return this._style.addressMode;\n }\n\n set repeatMode(value: WRAP_MODE)\n {\n this._style.addressMode = value;\n }\n\n /** Specifies the sampling behavior when the sample footprint is smaller than or equal to one texel. */\n get magFilter(): SCALE_MODE\n {\n return this._style.magFilter;\n }\n\n set magFilter(value: SCALE_MODE)\n {\n this._style.magFilter = value;\n }\n\n /** Specifies the sampling behavior when the sample footprint is larger than one texel. */\n get minFilter(): SCALE_MODE\n {\n return this._style.minFilter;\n }\n\n set minFilter(value: SCALE_MODE)\n {\n this._style.minFilter = value;\n }\n\n /** Specifies behavior for sampling between mipmap levels. */\n get mipmapFilter(): SCALE_MODE\n {\n return this._style.mipmapFilter;\n }\n\n set mipmapFilter(value: SCALE_MODE)\n {\n this._style.mipmapFilter = value;\n }\n\n /** Specifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture. */\n get lodMinClamp(): number\n {\n return this._style.lodMinClamp;\n }\n\n set lodMinClamp(value: number)\n {\n this._style.lodMinClamp = value;\n }\n\n /** Specifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture. */\n get lodMaxClamp(): number\n {\n return this._style.lodMaxClamp;\n }\n\n set lodMaxClamp(value: number)\n {\n this._style.lodMaxClamp = value;\n }\n\n private _onStyleChange()\n {\n this.emit('styleChange', this);\n }\n\n /** call this if you have modified the texture outside of the constructor */\n public update()\n {\n // update resource...\n if (this.resource)\n {\n const resolution = this._resolution;\n\n const didResize = this.resize(this.resourceWidth / resolution, this.resourceHeight / resolution);\n\n // no ned to dispatch the update we resized as that will\n // notify the texture systems anyway\n if (didResize) return;\n }\n\n this.emit('update', this);\n }\n\n /** Destroys this texture source */\n public destroy()\n {\n this.destroyed = true;\n this.emit('destroy', this);\n this.emit('change', this);\n\n if (this._style)\n {\n this._style.destroy();\n this._style = null;\n }\n\n this.uploadMethodId = null;\n this.resource = null;\n this.removeAllListeners();\n }\n\n /**\n * This will unload the Texture source from the GPU. This will free up the GPU memory\n * As soon as it is required fore rendering, it will be re-uploaded.\n */\n public unload()\n {\n this._resourceId = uid('resource');\n this.emit('change', this);\n this.emit('unload', this);\n }\n\n /** the width of the resource. This is the REAL pure number, not accounting resolution */\n public get resourceWidth(): number\n {\n const { resource } = this;\n\n return resource.naturalWidth || resource.videoWidth || resource.displayWidth || resource.width;\n }\n\n /** the height of the resource. This is the REAL pure number, not accounting resolution */\n public get resourceHeight(): number\n {\n const { resource } = this;\n\n return resource.naturalHeight || resource.videoHeight || resource.displayHeight || resource.height;\n }\n\n /**\n * the resolution of the texture. Changing this number, will not change the number of pixels in the actual texture\n * but will the size of the texture when rendered.\n *\n * changing the resolution of this texture to 2 for example will make it appear twice as small when rendered (as pixel\n * density will have increased)\n */\n get resolution(): number\n {\n return this._resolution;\n }\n\n set resolution(resolution: number)\n {\n if (this._resolution === resolution) return;\n\n this._resolution = resolution;\n\n this.width = this.pixelWidth / resolution;\n this.height = this.pixelHeight / resolution;\n }\n\n /**\n * Resize the texture, this is handy if you want to use the texture as a render texture\n * @param width - the new width of the texture\n * @param height - the new height of the texture\n * @param resolution - the new resolution of the texture\n * @returns - if the texture was resized\n */\n public resize(width?: number, height?: number, resolution?: number): boolean\n {\n resolution = resolution || this._resolution;\n width = width || this.width;\n height = height || this.height;\n\n // make sure we work with rounded pixels\n const newPixelWidth = Math.round(width * resolution);\n const newPixelHeight = Math.round(height * resolution);\n\n this.width = newPixelWidth / resolution;\n this.height = newPixelHeight / resolution;\n\n this._resolution = resolution;\n\n if (this.pixelWidth === newPixelWidth && this.pixelHeight === newPixelHeight)\n {\n return false;\n }\n\n this._refreshPOT();\n\n this.pixelWidth = newPixelWidth;\n this.pixelHeight = newPixelHeight;\n\n this.emit('resize', this);\n\n this._resourceId = uid('resource');\n this.emit('change', this);\n\n return true;\n }\n\n /**\n * Lets the renderer know that this texture has been updated and its mipmaps should be re-generated.\n * This is only important for RenderTexture instances, as standard Texture instances will have their\n * mipmaps generated on upload. You should call this method after you make any change to the texture\n *\n * The reason for this is is can be quite expensive to update mipmaps for a texture. So by default,\n * We want you, the developer to specify when this action should happen.\n *\n * Generally you don't want to have mipmaps generated on Render targets that are changed every frame,\n */\n public updateMipmaps()\n {\n if (this.autoGenerateMipmaps && this.mipLevelCount > 1)\n {\n this.emit('updateMipmaps', this);\n }\n }\n\n set wrapMode(value: WRAP_MODE)\n {\n this._style.wrapMode = value;\n }\n\n get wrapMode(): WRAP_MODE\n {\n return this._style.wrapMode;\n }\n\n set scaleMode(value: SCALE_MODE)\n {\n this._style.scaleMode = value;\n }\n\n /** setting this will set magFilter,minFilter and mipmapFilter all at once! */\n get scaleMode(): SCALE_MODE\n {\n return this._style.scaleMode;\n }\n\n /**\n * Refresh check for isPowerOfTwo texture based on size\n * @private\n */\n protected _refreshPOT(): void\n {\n this.isPowerOfTwo = isPow2(this.pixelWidth) && isPow2(this.pixelHeight);\n }\n\n public static test(_resource: any): any\n {\n // this should be overridden by other sources..\n throw new Error('Unimplemented');\n }\n\n /**\n * A helper function that creates a new TextureSource based on the resource you provide.\n * @param resource - The resource to create the texture source from.\n */\n public static from: (resource: TextureResourceOrOptions) => TextureSource;\n}\n","import { ExtensionType } from '../../../../../extensions/Extensions';\nimport { TextureSource } from './TextureSource';\n\nimport type { ExtensionMetadata } from '../../../../../extensions/Extensions';\nimport type { TypedArray } from '../../buffer/Buffer';\nimport type { TextureSourceOptions } from './TextureSource';\n\nexport interface BufferSourceOptions extends TextureSourceOptions\n{\n width: number;\n height: number;\n}\n\nexport class BufferImageSource extends TextureSource\n{\n public static extension: ExtensionMetadata = ExtensionType.TextureSource;\n\n public uploadMethodId = 'buffer';\n\n constructor(options: BufferSourceOptions)\n {\n const buffer = options.resource || new Float32Array(options.width * options.height * 4);\n let format = options.format;\n\n if (!format)\n {\n if (buffer instanceof Float32Array)\n {\n format = 'rgba32float';\n }\n else if (buffer instanceof Int32Array)\n {\n format = 'rgba32uint';\n }\n else if (buffer instanceof Uint32Array)\n {\n format = 'rgba32uint';\n }\n else if (buffer instanceof Int16Array)\n {\n format = 'rgba16uint';\n }\n else if (buffer instanceof Uint16Array)\n {\n format = 'rgba16uint';\n }\n else if (buffer instanceof Int8Array)\n {\n format = 'bgra8unorm';\n }\n else\n {\n format = 'bgra8unorm';\n }\n }\n\n super({\n ...options,\n resource: buffer,\n format,\n });\n }\n\n public static test(resource: any): resource is TypedArray | ArrayBuffer\n {\n return resource instanceof Int8Array\n || resource instanceof Uint8Array\n || resource instanceof Uint8ClampedArray\n || resource instanceof Int16Array\n || resource instanceof Uint16Array\n || resource instanceof Int32Array\n || resource instanceof Uint32Array\n || resource instanceof Float32Array;\n }\n}\n","import { Matrix } from '../../../../maths/matrix/Matrix';\n\nimport type { Texture } from './Texture';\n\nconst tempMat = new Matrix();\n\n/**\n * Class controls uv mapping from Texture normal space to BaseTexture normal space.\n *\n * Takes `trim` and `rotate` into account. May contain clamp settings for Meshes and TilingSprite.\n *\n * Can be used in Texture `uvMatrix` 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 * Takes track of Texture changes through `_lastTextureID` private field.\n * Use `update()` method call to track it from outside.\n * @see Texture\n * @see Mesh\n * @see TilingSprite\n * @memberof rendering\n */\nexport class TextureMatrix\n{\n /**\n * Matrix operation that converts texture region coords to texture coords\n * @readonly\n */\n public mapCoord: Matrix;\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 * @default 0\n */\n public clampOffset: number;\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 * @default 0.5\n */\n public clampMargin: number;\n\n /**\n * Clamp region for normalized coords, left-top pixel center in xy , bottom-right in zw.\n * Calculated based on clampOffset.\n */\n public readonly uClampFrame: Float32Array;\n\n /** Normalized clamp offset. Calculated based on clampOffset. */\n public readonly uClampOffset: Float32Array;\n\n /**\n * Tracks Texture frame changes.\n * @ignore\n */\n public _updateID: number;\n\n /**\n * Tracks Texture frame changes.\n * @protected\n */\n protected _textureID: number;\n\n protected _texture: Texture;\n\n /**\n * If texture size is the same as baseTexture.\n * @default false\n * @readonly\n */\n public isSimple: boolean;\n\n /**\n * @param texture - observed texture\n * @param clampMargin - Changes frame clamping, 0.5 by default. Use -0.5 for extra border.\n */\n constructor(texture: Texture, clampMargin?: number)\n {\n this.mapCoord = new Matrix();\n this.uClampFrame = new Float32Array(4);\n this.uClampOffset = new Float32Array(2);\n this._textureID = -1;\n this._updateID = 0;\n\n this.clampOffset = 0;\n\n if ((typeof clampMargin === 'undefined'))\n {\n this.clampMargin = (texture.width < 10) ? 0 : 0.5;\n }\n else\n {\n this.clampMargin = clampMargin;\n }\n\n this.isSimple = false;\n\n this.texture = texture;\n }\n\n /** Texture property. */\n get texture(): Texture\n {\n return this._texture;\n }\n\n set texture(value: Texture)\n {\n if (this.texture === value) return;\n\n this._texture?.removeListener('update', this.update, this);\n this._texture = value;\n this._texture.addListener('update', this.update, this);\n\n this.update();\n }\n\n /**\n * Multiplies uvs array to transform\n * @param uvs - mesh uvs\n * @param [out=uvs] - output\n * @returns - output\n */\n public multiplyUvs(uvs: Float32Array, out?: Float32Array): Float32Array\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 * @returns - whether or not it was updated\n */\n public update(): boolean\n {\n const tex = this._texture;\n\n this._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(\n orig.width / trim.width,\n 0, 0, orig.height / trim.height,\n -trim.x / trim.width,\n -trim.y / trim.height\n );\n\n this.mapCoord.append(tempMat);\n }\n\n const texBase = tex.source;\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\n this.uClampOffset[0] = offset / texBase.pixelWidth;\n this.uClampOffset[1] = offset / texBase.pixelHeight;\n\n this.isSimple = tex.frame.width === texBase.width\n && tex.frame.height === texBase.height\n && tex.rotate === 0;\n\n return true;\n }\n}\n","import EventEmitter from 'eventemitter3';\nimport { groupD8 } from '../../../../maths/matrix/groupD8';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { uid } from '../../../../utils/data/uid';\nimport { deprecation, v8_0_0 } from '../../../../utils/logging/deprecation';\nimport { NOOP } from '../../../../utils/misc/NOOP';\nimport { BufferImageSource } from './sources/BufferImageSource';\nimport { TextureSource } from './sources/TextureSource';\nimport { TextureMatrix } from './TextureMatrix';\n\nimport type { TextureResourceOrOptions } from './utils/textureFrom';\n\n/**\n * Stores the width of the non-scalable borders, for example when used with {@link scene.NineSlicePlane} texture.\n * @memberof rendering\n */\nexport interface TextureBorders\n{\n /** left border in pixels */\n left: number;\n /** top border in pixels */\n top: number;\n /** right border in pixels */\n right: number;\n /** bottom border in pixels */\n bottom: number;\n}\n\n/**\n * The UVs data structure for a texture.\n * @memberof rendering\n */\nexport type UVs = {\n x0: number;\n y0: number;\n x1: number;\n y1: number;\n x2: number;\n y2: number;\n x3: number;\n y3: number;\n};\n\n/**\n * The options that can be passed to a new Texture\n * @memberof rendering\n */\nexport interface TextureOptions\n{\n /** the underlying texture data that this texture will use */\n source?: TextureSource;\n /** optional label, for debugging */\n label?: string;\n /** The rectangle frame of the texture to show */\n frame?: Rectangle;\n /** The area of original texture */\n orig?: Rectangle;\n /** Trimmed rectangle of original texture */\n trim?: Rectangle;\n /** Default anchor point used for sprite placement / rotation */\n defaultAnchor?: { x: number; y: number };\n /** Default borders used for 9-slice scaling {@link NineSlicePlane}*/\n defaultBorders?: TextureBorders;\n /** indicates how the texture was rotated by texture packer. See {@link groupD8} */\n rotate?: number;\n /** set to true if you plan on modifying the uvs of this texture - can affect performance with high numbers of sprites*/\n dynamic?: boolean;\n}\n\nexport interface BindableTexture\n{\n source: TextureSource;\n}\n\nexport type TextureSourceLike = TextureSource | TextureResourceOrOptions | string;\n\n/**\n * A texture stores the information that represents an image or part of an image.\n *\n * A texture must have a loaded resource passed to it to work. It does not contain any\n * loading mechanisms.\n *\n * The Assets class can be used to load an texture from a file. This is the recommended\n * way as it will handle the loading and caching for you.\n *\n * ```js\n *\n * const texture = await Asset.load('assets/image.png');\n *\n * // once Assets has loaded the image it will be available via the from method\n * const sameTexture = Texture.from('assets/image.png');\n * // another way to acces the texture once loaded\n * const sameAgainTexture = Asset.get('assets/image.png');\n *\n * const sprite1 = new Sprite(texture);\n *\n * ```\n *\n * It cannot be added to the display list directly; instead use it as the texture for a Sprite.\n * If no frame is provided for a texture, 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 * import { Sprite, Texture } from 'pixi.js';\n *\n * const texture = await Asset.load('assets/image.png');\n * const sprite1 = new Sprite(texture);\n * const sprite2 = new Sprite(texture);\n * ```\n *\n * If you didn't pass the texture frame to constructor, it enables `noFrame` mode:\n * it subscribes on baseTexture events, it automatically resizes at the same time as baseTexture.\n * @memberof rendering\n * @class\n */\nexport class Texture extends EventEmitter<{\n update: Texture\n destroy: Texture\n}> implements BindableTexture\n{\n /**\n * Helper function that creates a returns Texture based on the source you provide.\n * The source should be loaded and ready to go. If not its best to grab the asset using Assets.\n * @param id - String or Source to create texture from\n * @param skipCache - Skip adding the texture to the cache\n * @returns The texture based on the Id provided\n */\n public static from: (id: TextureSourceLike, skipCache?: boolean) => Texture;\n\n /** label used for debugging */\n public label?: string;\n /** unique id for this texture */\n public uid = uid('texture');\n /**\n * Has the texture been destroyed?\n * @readonly\n */\n public destroyed: boolean;\n\n public _source: TextureSource;\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 maths.groupD8} for explanation\n */\n public readonly rotate: number;\n /** A uvs object based on the given frame and the texture source */\n public readonly uvs: UVs = { x0: 0, y0: 0, x1: 0, y1: 0, x2: 0, y2: 0, x3: 0, y3: 0 };\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 * @default {0,0}\n */\n public readonly defaultAnchor?: { x: number; y: number };\n /**\n * Default width of the non-scalable border that is used if 9-slice plane is created with this texture.\n * @since 7.2.0\n * @see scene.NineSliceSprite\n */\n public readonly defaultBorders?: TextureBorders;\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 public readonly frame = new Rectangle();\n /** This is the area of original texture, before it was put in atlas. */\n public readonly orig: Rectangle;\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 public readonly trim: Rectangle;\n\n /**\n * Does this Texture have any frame data assigned to it?\n *\n * This mode is enabled automatically if no frame was passed inside constructor.\n *\n * In this mode texture is subscribed to baseTexture events, and fires `update` on any change.\n *\n * Beware, after loading or resize of baseTexture event can fired two times!\n * If you want more control, subscribe on baseTexture itself.\n * @example\n * texture.on('update', () => {});\n */\n public noFrame = false;\n\n /**\n * Set to true if you plan on modifying the uvs of this texture.\n * When this is the case, sprites and other objects using the texture will\n * make sure to listen for changes to the uvs and update their vertices accordingly.\n */\n public dynamic = false;\n\n private _textureMatrix: TextureMatrix;\n\n /** is it a texture? yes! used for type checking */\n public readonly isTexture = true;\n\n /**\n * @param {TextureOptions} param0 - Options for the texture\n */\n constructor({\n source,\n label,\n frame,\n orig,\n trim,\n defaultAnchor,\n defaultBorders,\n rotate,\n dynamic\n }: TextureOptions = {})\n {\n super();\n\n this.label = label;\n this.source = source?.source ?? new TextureSource();\n\n this.noFrame = !frame;\n\n if (frame)\n {\n this.frame.copyFrom(frame);\n }\n else\n {\n const { width, height } = this._source;\n\n this.frame.width = width;\n this.frame.height = height;\n }\n\n this.orig = orig || this.frame;\n this.trim = trim;\n\n this.rotate = rotate ?? 0;\n this.defaultAnchor = defaultAnchor;\n this.defaultBorders = defaultBorders;\n\n this.destroyed = false;\n this.dynamic = dynamic || false;\n\n this.updateUvs();\n }\n\n set source(value: TextureSource)\n {\n if (this._source)\n {\n this._source.off('resize', this.update, this);\n }\n\n this._source = value;\n\n value.on('resize', this.update, this);\n\n this.emit('update', this);\n }\n\n /** the underlying source of the texture (equivalent of baseTexture in v7) */\n get source(): TextureSource\n {\n return this._source;\n }\n\n /** returns a TextureMatrix instance for this texture. By default, that object is not created because its heavy. */\n get textureMatrix()\n {\n if (!this._textureMatrix)\n {\n this._textureMatrix = new TextureMatrix(this);\n }\n\n return this._textureMatrix;\n }\n\n /** The width of the Texture in pixels. */\n get width(): number\n {\n return this.orig.width;\n }\n\n /** The height of the Texture in pixels. */\n get height(): number\n {\n return this.orig.height;\n }\n\n /** Call this function when you have modified the frame of this texture. */\n public updateUvs()\n {\n const { uvs, frame } = this;\n const { width, height } = this._source;\n\n const nX = frame.x / width;\n const nY = frame.y / height;\n\n const nW = frame.width / width;\n const nH = frame.height / height;\n\n let rotate = this.rotate;\n\n if (rotate)\n {\n // width and height div 2 div baseFrame size\n const w2 = nW / 2;\n const h2 = nH / 2;\n\n // coordinates of center\n const cX = nX + w2;\n const cY = nY + h2;\n\n rotate = groupD8.add(rotate, groupD8.NW); // NW is top-left corner\n uvs.x0 = cX + (w2 * groupD8.uX(rotate));\n uvs.y0 = cY + (h2 * groupD8.uY(rotate));\n\n rotate = groupD8.add(rotate, 2); // rotate 90 degrees clockwise\n uvs.x1 = cX + (w2 * groupD8.uX(rotate));\n uvs.y1 = cY + (h2 * groupD8.uY(rotate));\n\n rotate = groupD8.add(rotate, 2);\n uvs.x2 = cX + (w2 * groupD8.uX(rotate));\n uvs.y2 = cY + (h2 * groupD8.uY(rotate));\n\n rotate = groupD8.add(rotate, 2);\n uvs.x3 = cX + (w2 * groupD8.uX(rotate));\n uvs.y3 = cY + (h2 * groupD8.uY(rotate));\n }\n\n else\n {\n uvs.x0 = nX;\n uvs.y0 = nY;\n uvs.x1 = nX + nW;\n uvs.y1 = nY;\n uvs.x2 = nX + nW;\n uvs.y2 = nY + nH;\n uvs.x3 = nX;\n uvs.y3 = nY + nH;\n }\n }\n\n /**\n * Destroys this texture\n * @param destroySource - Destroy the source when the texture is destroyed.\n */\n public destroy(destroySource = false)\n {\n if (this._source)\n {\n if (destroySource)\n {\n this._source.destroy();\n this._source = null;\n }\n }\n\n this._textureMatrix = null;\n this.destroyed = true;\n this.emit('destroy', this);\n this.removeAllListeners();\n }\n\n /** call this if you have modified the `texture outside` of the constructor */\n public update(): void\n {\n if (this.noFrame)\n {\n this.frame.width = this._source.width;\n this.frame.height = this._source.height;\n }\n\n this.updateUvs();\n this.emit('update', this);\n }\n\n /** @deprecated since 8.0.0 */\n get baseTexture(): TextureSource\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Texture.baseTexture is now Texture.source');\n // #endif\n\n return this._source;\n }\n\n /** an Empty Texture used internally by the engine */\n public static EMPTY: Texture;\n /** a White texture used internally by the engine */\n public static WHITE: Texture;\n}\n\nTexture.EMPTY = new Texture({\n label: 'EMPTY',\n source: new TextureSource({\n label: 'EMPTY',\n })\n});\n\nTexture.EMPTY.destroy = NOOP;\n\nTexture.WHITE = new Texture({\n source: new BufferImageSource({\n resource: new Uint8Array([255, 255, 255, 255]),\n width: 1,\n height: 1,\n alphaMode: 'premultiply-alpha-on-upload',\n label: 'WHITE',\n }),\n label: 'WHITE',\n});\n\nTexture.WHITE.destroy = NOOP;\n","import { Rectangle } from '../maths/shapes/Rectangle';\nimport { Texture } from '../rendering/renderers/shared/texture/Texture';\n\nimport type { PointData } from '../maths/point/PointData';\nimport type { TextureSource } from '../rendering/renderers/shared/texture/sources/TextureSource';\nimport type { BindableTexture, TextureBorders } from '../rendering/renderers/shared/texture/Texture';\nimport type { Dict } from '../utils/types';\n\n/**\n * Represents the JSON data for a spritesheet atlas.\n * @memberof assets\n */\nexport interface SpritesheetFrameData\n{\n /** The frame rectangle of the texture. */\n frame: {\n x: number;\n y: number;\n w: number;\n h: number;\n };\n /** Whether the texture is trimmed. */\n trimmed?: boolean;\n /** Whether the texture is rotated. */\n rotated?: boolean;\n /** The source size of the texture. */\n sourceSize?: {\n w: number;\n h: number;\n };\n /** The sprite source size. */\n spriteSourceSize?: {\n h?: number;\n w?: number;\n x: number;\n y: number;\n };\n /** The anchor point of the texture. */\n anchor?: PointData;\n /** The 9-slice borders of the texture. */\n borders?: TextureBorders\n}\n\n/**\n * Atlas format.\n * @memberof assets\n */\nexport interface SpritesheetData\n{\n /** The frames of the atlas. */\n frames: Dict;\n /** The animations of the atlas. */\n animations?: Dict;\n /** The meta data of the atlas. */\n meta: {\n app?: string;\n format?: string;\n frameTags?: {\n from: number;\n name: string;\n to: number;\n direction: string;\n }[];\n image?: string;\n layers?: {\n blendMode: string;\n name: string;\n opacity: number;\n }[];\n scale: number | string;\n size?: {\n h: number;\n w: number;\n };\n slices?: {\n color: string;\n name: string;\n keys: {\n frame: number,\n bounds: {\n x: number;\n y: number;\n w: number;\n h: number;\n };\n }[];\n }[];\n // eslint-disable-next-line camelcase\n related_multi_packs?: string[];\n version?: string;\n };\n}\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 you may pass its JSON data file to Pixi's loader:\n *\n * ```js\n * import { Assets } from 'pixi.js';\n *\n * const sheet = await Assets.load('images/spritesheet.json');\n * ```\n *\n * Alternately, you may circumvent the loader by instantiating the Spritesheet directly:\n *\n * ```js\n * import { Spritesheet } from 'pixi.js';\n *\n * const sheet = new Spritesheet(texture, spritesheetData);\n * await sheet.parse();\n * console.log('Spritesheet ready to use!');\n * ```\n *\n * With the `sheet.textures` you can create Sprite objects, and `sheet.animations` can be used to create an AnimatedSprite.\n *\n * Here's an example of a sprite sheet JSON data file:\n * ```json\n * {\n * \"frames\": {\n * \"enemy1.png\":\n * {\n * \"frame\": {\"x\":103,\"y\":1,\"w\":32,\"h\":32},\n * \"spriteSourceSize\": {\"x\":0,\"y\":0,\"w\":32,\"h\":32},\n * \"sourceSize\": {\"w\":32,\"h\":32},\n * \"anchor\": {\"x\":16,\"y\":16}\n * },\n * \"enemy2.png\":\n * {\n * \"frame\": {\"x\":103,\"y\":35,\"w\":32,\"h\":32},\n * \"spriteSourceSize\": {\"x\":0,\"y\":0,\"w\":32,\"h\":32},\n * \"sourceSize\": {\"w\":32,\"h\":32},\n * \"anchor\": {\"x\":16,\"y\":16}\n * },\n * \"button.png\":\n * {\n * \"frame\": {\"x\":1,\"y\":1,\"w\":100,\"h\":100},\n * \"spriteSourceSize\": {\"x\":0,\"y\":0,\"w\":100,\"h\":100},\n * \"sourceSize\": {\"w\":100,\"h\":100},\n * \"anchor\": {\"x\":0,\"y\":0},\n * \"borders\": {\"left\":35,\"top\":35,\"right\":35,\"bottom\":35}\n * }\n * },\n *\n * \"animations\": {\n * \"enemy\": [\"enemy1.png\",\"enemy2.png\"]\n * },\n *\n * \"meta\": {\n * \"image\": \"sheet.png\",\n * \"format\": \"RGBA8888\",\n * \"size\": {\"w\":136,\"h\":102},\n * \"scale\": \"1\"\n * }\n * }\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 Texture#defaultAnchor}), default 9-slice borders\n * (see {@link Texture#defaultBorders}) and grouping of animation sprites are currently only\n * supported by TexturePacker.\n *\n * Alternative ways for loading spritesheet image if you need more control:\n *\n * ```js\n * import { Assets } from 'pixi.js';\n *\n * const sheetTexture = await Assets.load('images/spritesheet.png');\n * Assets.add({\n * alias: 'atlas',\n * src: 'images/spritesheet.json',\n * data: {texture: sheetTexture} // using of preloaded texture\n * });\n * const sheet = await Assets.load('atlas')\n * ```\n *\n * or:\n *\n * ```js\n * import { Assets } from 'pixi.js';\n *\n * Assets.add({\n * alias: 'atlas',\n * src: 'images/spritesheet.json',\n * data: {imageFilename: 'my-spritesheet.2x.avif'} // using of custom filename located in \"images/my-spritesheet.2x.avif\"\n * });\n * const sheet = await Assets.load('atlas')\n * ```\n * @memberof assets\n */\nexport class Spritesheet\n{\n /** The maximum number of Textures to build per process. */\n public static readonly BATCH_SIZE = 1000;\n\n /** For multi-packed spritesheets, this contains a reference to all the other spritesheets it depends on. */\n public linkedSheets: Spritesheet[] = [];\n\n /** Reference to ths source texture. */\n public textureSource: TextureSource;\n\n /**\n * A map containing all textures of the sprite sheet.\n * Can be used to create a {@link Sprite|Sprite}:\n * @example\n * import { Sprite } from 'pixi.js';\n *\n * new Sprite(sheet.textures['image.png']);\n */\n public textures: Record;\n\n /**\n * A map containing the textures for each animation.\n * Can be used to create an {@link AnimatedSprite|AnimatedSprite}:\n * @example\n * import { AnimatedSprite } from 'pixi.js';\n *\n * new AnimatedSprite(sheet.animations['anim_name']);\n */\n public animations: Record, Texture[]>;\n\n /**\n * Reference to the original JSON data.\n * @type {object}\n */\n public data: S;\n\n /** The resolution of the spritesheet. */\n public resolution: number;\n\n /**\n * Reference to original source image from the Loader. This reference is retained so we\n * can destroy the Texture later on. It is never used internally.\n */\n private _texture: Texture;\n\n /**\n * Map of spritesheet frames.\n * @type {object}\n */\n private _frames: S['frames'];\n\n /** Collection of frame names. */\n private _frameKeys: (keyof S['frames'])[];\n\n /** Current batch index being processed. */\n private _batchIndex: number;\n\n /**\n * Callback when parse is completed.\n * @type {Function}\n */\n private _callback: (textures: Dict) => void;\n\n /**\n * @param texture - Reference to the source BaseTexture object.\n * @param {object} data - Spritesheet image data.\n */\n constructor(texture: BindableTexture, data: S)\n {\n this._texture = texture instanceof Texture ? texture : null;\n this.textureSource = texture.source;\n this.textures = {} as Record;\n this.animations = {} as Record, Texture[]>;\n this.data = data;\n\n const metaResolution = parseFloat(data.meta.scale as string);\n\n if (metaResolution)\n {\n this.resolution = metaResolution;\n texture.source.resolution = this.resolution;\n }\n else\n {\n this.resolution = texture.source._resolution;\n }\n\n this._frames = this.data.frames;\n this._frameKeys = Object.keys(this._frames);\n this._batchIndex = 0;\n this._callback = null;\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 public parse(): Promise>\n {\n return new Promise((resolve) =>\n {\n this._callback = resolve;\n this._batchIndex = 0;\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 /**\n * Process a batch of frames\n * @param initialFrameIndex - The index of frame to start.\n */\n private _processFrames(initialFrameIndex: number): void\n {\n let frameIndex = initialFrameIndex;\n const maxFrames = Spritesheet.BATCH_SIZE;\n\n while (frameIndex - initialFrameIndex < maxFrames && frameIndex < this._frameKeys.length)\n {\n const i = this._frameKeys[frameIndex];\n const 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) / this.resolution,\n Math.floor(sourceSize.h) / this.resolution\n );\n\n if (data.rotated)\n {\n frame = new Rectangle(\n Math.floor(rect.x) / this.resolution,\n Math.floor(rect.y) / this.resolution,\n Math.floor(rect.h) / this.resolution,\n Math.floor(rect.w) / this.resolution\n );\n }\n else\n {\n frame = new Rectangle(\n Math.floor(rect.x) / this.resolution,\n Math.floor(rect.y) / this.resolution,\n Math.floor(rect.w) / this.resolution,\n Math.floor(rect.h) / 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) / this.resolution,\n Math.floor(data.spriteSourceSize.y) / this.resolution,\n Math.floor(rect.w) / this.resolution,\n Math.floor(rect.h) / this.resolution\n );\n }\n\n this.textures[i] = new Texture({\n source: this.textureSource,\n\n frame,\n orig,\n trim,\n rotate: data.rotated ? 2 : 0,\n defaultAnchor: data.anchor,\n defaultBorders: data.borders,\n\n label: i.toString(),\n });\n }\n\n frameIndex++;\n }\n }\n\n /** Parse animations config. */\n private _processAnimations(): void\n {\n const animations = this.data.animations || {};\n\n for (const animName in animations)\n {\n this.animations[animName as keyof S['animations']] = [];\n for (let i = 0; i < animations[animName].length; i++)\n {\n const frameName = animations[animName][i];\n\n this.animations[animName].push(this.textures[frameName]);\n }\n }\n }\n\n /** The parse has completed. */\n private _parseComplete(): void\n {\n const callback = this._callback;\n\n this._callback = null;\n this._batchIndex = 0;\n callback.call(this, this.textures);\n }\n\n /** Begin the next batch of textures. */\n private _nextBatch(): void\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 * @param {boolean} [destroyBase=false] - Whether to destroy the base texture as well\n */\n public destroy(destroyBase = false): void\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._texture?.destroy();\n this.textureSource.destroy();\n }\n this._texture = null;\n this.textureSource = null;\n this.linkedSheets = [];\n }\n}\n","import { LoaderParserPriority } from '../assets/loader/parsers/LoaderParser';\nimport { Resolver } from '../assets/resolver/Resolver';\nimport { copySearchParams } from '../assets/utils/copySearchParams';\nimport { ExtensionType } from '../extensions/Extensions';\nimport { Texture } from '../rendering/renderers/shared/texture/Texture';\nimport { path } from '../utils/path';\nimport { Spritesheet } from './Spritesheet';\n\nimport type { AssetExtensionAdvanced } from '../assets/AssetExtension';\nimport type { Loader } from '../assets/loader/Loader';\nimport type { ResolvedAsset } from '../assets/types';\nimport type { SpritesheetData } from './Spritesheet';\n\nexport interface SpriteSheetJson extends SpritesheetData\n{\n meta: {\n image: string;\n scale: string;\n // eslint-disable-next-line camelcase\n related_multi_packs?: string[];\n };\n}\n\nconst validImages = ['jpg', 'png', 'jpeg', 'avif', 'webp',\n 'basis', 'etc2', 'bc7', 'bc6h', 'bc5', 'bc4', 'bc3', 'bc2', 'bc1', 'eac', 'astc'];\n\nfunction getCacheableAssets(keys: string[], asset: Spritesheet, ignoreMultiPack: boolean)\n{\n const out: Record = {};\n\n keys.forEach((key: string) =>\n {\n out[key] = asset;\n });\n\n Object.keys(asset.textures).forEach((key) =>\n {\n out[key] = asset.textures[key];\n });\n\n if (!ignoreMultiPack)\n {\n const basePath = path.dirname(keys[0]);\n\n asset.linkedSheets.forEach((item: Spritesheet, i) =>\n {\n const out2 = getCacheableAssets([`${basePath}/${asset.data.meta.related_multi_packs[i]}`], item, true);\n\n Object.assign(out, out2);\n });\n }\n\n return out;\n}\n\n/**\n * Asset extension for loading spritesheets\n * @example\n * import { Assets } from 'pixi.js';\n *\n * Assets.load({\n * alias: 'spritesheet',\n * src: 'path/to/spritesheet.json',\n * data: {\n * ignoreMultiPack: true,\n * }\n * })\n * @type {AssetExtension}\n * @memberof assets\n */\nexport const spritesheetAsset = {\n extension: ExtensionType.Asset,\n /** Handle the caching of the related Spritesheet Textures */\n cache: {\n test: (asset: Spritesheet) => asset instanceof Spritesheet,\n getCacheableAssets: (keys: string[], asset: Spritesheet) => getCacheableAssets(keys, asset, false),\n },\n /** Resolve the resolution of the asset. */\n resolver: {\n extension: {\n type: ExtensionType.ResolveParser,\n name: 'resolveSpritesheet',\n },\n test: (value: string): boolean =>\n {\n const tempURL = value.split('?')[0];\n const split = tempURL.split('.');\n const extension = split.pop();\n const format = split.pop();\n\n return extension === 'json' && validImages.includes(format);\n },\n parse: (value: string) =>\n {\n const split = value.split('.');\n\n return {\n resolution: parseFloat(Resolver.RETINA_PREFIX.exec(value)?.[1] ?? '1'),\n format: split[split.length - 2],\n src: value,\n };\n },\n },\n /**\n * Loader plugin that parses sprite sheets!\n * once the JSON has been loaded this checks to see if the JSON is spritesheet data.\n * If it is, we load the spritesheets image and parse the data into Spritesheet\n * All textures in the sprite sheet are then added to the cache\n */\n loader: {\n name: 'spritesheetLoader',\n\n extension: {\n type: ExtensionType.LoadParser,\n priority: LoaderParserPriority.Normal,\n name: 'spritesheetLoader',\n },\n\n async testParse(asset: SpriteSheetJson, options: ResolvedAsset): Promise\n {\n return (path.extname(options.src).toLowerCase() === '.json' && !!asset.frames);\n },\n\n async parse(\n asset: SpriteSheetJson,\n options: ResolvedAsset<{texture?: Texture, imageFilename?: string, ignoreMultiPack?: boolean}>,\n loader?: Loader\n ): Promise\n {\n const {\n texture: imageTexture, // if user need to use preloaded texture\n imageFilename // if user need to use custom filename (not from jsonFile.meta.image)\n } = options?.data ?? {};\n\n let basePath = path.dirname(options.src);\n\n if (basePath && basePath.lastIndexOf('/') !== (basePath.length - 1))\n {\n basePath += '/';\n }\n\n let texture: Texture;\n\n if (imageTexture instanceof Texture)\n {\n texture = imageTexture;\n }\n else\n {\n const imagePath = copySearchParams(basePath + (imageFilename ?? asset.meta.image), options.src);\n\n const assets = await loader.load([imagePath]);\n\n texture = assets[imagePath];\n }\n\n const spritesheet = new Spritesheet(\n texture.source,\n asset,\n );\n\n await spritesheet.parse();\n\n // Check and add the multi atlas\n // Heavily influenced and based on https://github.com/rocket-ua/pixi-tps-loader/blob/master/src/ResourceLoader.js\n // eslint-disable-next-line camelcase\n const multiPacks = asset?.meta?.related_multi_packs;\n\n if (Array.isArray(multiPacks))\n {\n const promises: Promise>[] = [];\n\n for (const item of multiPacks)\n {\n if (typeof item !== 'string')\n {\n continue;\n }\n\n let itemUrl = basePath + item;\n\n // Check if the file wasn't already added as multipack\n if (options.data?.ignoreMultiPack)\n {\n continue;\n }\n\n itemUrl = copySearchParams(itemUrl, options.src);\n\n promises.push(loader.load>({\n src: itemUrl,\n data: {\n ignoreMultiPack: true,\n }\n }));\n }\n\n const res = await Promise.all(promises);\n\n spritesheet.linkedSheets = res;\n res.forEach((item) =>\n {\n item.linkedSheets = [spritesheet].concat(spritesheet.linkedSheets.filter((sp) => (sp !== item)));\n });\n }\n\n return spritesheet;\n },\n\n async unload(spritesheet: Spritesheet, _resolvedAsset, loader)\n {\n await loader.unload(spritesheet.textureSource._sourceOrigin);\n\n spritesheet.destroy(false);\n },\n }\n} satisfies AssetExtensionAdvanced;\n","import { extensions } from '../extensions/Extensions';\nimport { spritesheetAsset } from './spritesheetAsset';\n\nextensions.add(spritesheetAsset);\n","import type { ObservablePoint } from '../../maths/point/ObservablePoint';\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport type { BoundsData } from '../../scene/container/bounds/Bounds';\n\nexport function updateQuadBounds(\n bounds: BoundsData,\n anchor: ObservablePoint,\n texture: Texture,\n padding: number\n)\n{\n const { width, height } = texture.orig;\n const trim = texture.trim;\n\n if (trim)\n {\n const sourceWidth = trim.width;\n const sourceHeight = trim.height;\n\n bounds.minX = (trim.x) - (anchor._x * width) - padding;\n bounds.maxX = bounds.minX + sourceWidth;\n\n bounds.minY = (trim.y) - (anchor._y * height) - padding;\n bounds.maxY = bounds.minY + sourceHeight;\n }\n\n else\n {\n bounds.minX = (-anchor._x * width) - padding;\n bounds.maxX = bounds.minX + width;\n\n bounds.minY = (-anchor._y * height) - padding;\n bounds.maxY = bounds.minY + height;\n }\n\n return;\n}\n","import { ObservablePoint } from '../../maths/point/ObservablePoint';\nimport { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport { updateQuadBounds } from '../../utils/data/updateQuadBounds';\nimport { Container } from '../container/Container';\n\nimport type { Size } from '../../maths/misc/Size';\nimport type { PointData } from '../../maths/point/PointData';\nimport type { TextureSourceLike } from '../../rendering/renderers/shared/texture/Texture';\nimport type { View } from '../../rendering/renderers/shared/view/View';\nimport type { Bounds, BoundsData } from '../container/bounds/Bounds';\nimport type { ContainerOptions } from '../container/Container';\nimport type { Optional } from '../container/container-mixins/measureMixin';\nimport type { DestroyOptions } from '../container/destroyTypes';\n\n/**\n * Options for the {@link scene.Sprite} constructor.\n * @memberof scene\n */\nexport interface SpriteOptions extends ContainerOptions\n{\n /** The texture to use for the sprite. */\n texture?: Texture;\n /** The anchor point of the sprite. */\n anchor?: PointData | number;\n /** Whether or not to round the x/y position. */\n roundPixels?: boolean;\n}\n\n/**\n * The Sprite object is one of the most important objects in PixiJS. It is a\n * drawing item that can be added to a scene and rendered to the screen.\n *\n * A sprite can be created directly from an image like this:\n *\n * ```js\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('assets/image.png');\n * ```\n *\n * The more efficient way to create sprites is using a {@link assets.Spritesheet},\n * as swapping base textures when rendering to the screen is inefficient.\n *\n * ```js\n * import { Assets, Sprite } from 'pixi.js';\n *\n * const sheet = await Assets.load('assets/spritesheet.json');\n * const sprite = new Sprite(sheet.textures['image.png']);\n * ```\n * @memberof scene\n * @extends scene.Container\n */\nexport class Sprite extends Container implements View\n{\n private _width: number;\n private _height: number;\n /**\n * Helper function that creates a new sprite based on the source you provide.\n * The source can be - frame id, image, video, canvas element, video element, texture\n * @param source - Source to create texture from\n * @param [skipCache] - Whether to skip the cache or not\n * @returns The newly created sprite\n */\n public static from(source: Texture | TextureSourceLike, skipCache = false): Sprite\n {\n if (source instanceof Texture)\n {\n return new Sprite(source);\n }\n\n return new Sprite(Texture.from(source, skipCache));\n }\n\n public readonly renderPipeId = 'sprite';\n\n public batched = true;\n public readonly _anchor: ObservablePoint;\n\n // sprite specific..\n public _texture: Texture;\n public _didSpriteUpdate = false;\n\n private readonly _bounds: BoundsData = { minX: 0, maxX: 1, minY: 0, maxY: 0 };\n private readonly _sourceBounds: BoundsData = { minX: 0, maxX: 1, minY: 0, maxY: 0 };\n private _boundsDirty = true;\n private _sourceBoundsDirty = true;\n\n public _roundPixels: 0 | 1 = 0;\n\n /**\n * @param options - The options for creating the sprite.\n */\n constructor(options: SpriteOptions | Texture = Texture.EMPTY)\n {\n if (options instanceof Texture)\n {\n options = { texture: options };\n }\n\n // split out\n const { texture = Texture.EMPTY, anchor, roundPixels, width, height, ...rest } = options;\n\n super({\n label: 'Sprite',\n ...rest\n });\n\n this._anchor = new ObservablePoint(\n {\n _onUpdate: () =>\n {\n this.onViewUpdate();\n }\n },\n );\n\n if (anchor)\n {\n this.anchor = anchor;\n }\n else if (texture.defaultAnchor)\n {\n this.anchor = texture.defaultAnchor;\n }\n\n this.texture = texture;\n\n this.allowChildren = false;\n this.roundPixels = roundPixels ?? false;\n\n // needs to be set after the container has initiated\n if (width) this.width = width;\n if (height) this.height = height;\n }\n\n set texture(value: Texture)\n {\n value ||= Texture.EMPTY;\n\n const currentTexture = this._texture;\n\n if (currentTexture === value) return;\n\n if (currentTexture && currentTexture.dynamic) currentTexture.off('update', this.onViewUpdate, this);\n if (value.dynamic) value.on('update', this.onViewUpdate, this);\n\n this._texture = value;\n\n if (this._width)\n {\n this._setWidth(this._width, this._texture.orig.width);\n }\n\n if (this._height)\n {\n this._setHeight(this._height, this._texture.orig.height);\n }\n\n this.onViewUpdate();\n }\n\n /** The texture that the sprite is using. */\n get texture()\n {\n return this._texture;\n }\n\n /**\n * The local bounds of the sprite.\n * @type {rendering.Bounds}\n */\n get bounds()\n {\n if (this._boundsDirty)\n {\n this._updateBounds();\n this._boundsDirty = false;\n }\n\n return this._bounds;\n }\n\n /**\n * The bounds of the sprite, taking the texture's trim into account.\n * @type {rendering.Bounds}\n */\n get sourceBounds()\n {\n if (this._sourceBoundsDirty)\n {\n this._updateSourceBounds();\n this._sourceBoundsDirty = false;\n }\n\n return this._sourceBounds;\n }\n\n /**\n * Checks if the object contains the given point.\n * @param point - The point to check\n */\n public containsPoint(point: PointData)\n {\n const bounds = this.sourceBounds;\n\n if (point.x >= bounds.maxX && point.x <= bounds.minX)\n {\n if (point.y >= bounds.maxY && point.y <= bounds.minY)\n {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Adds the bounds of this object to the bounds object.\n * @param bounds - The output bounds object.\n */\n public addBounds(bounds: Bounds)\n {\n const _bounds = this._texture.trim ? this.sourceBounds : this.bounds;\n\n bounds.addFrame(_bounds.minX, _bounds.minY, _bounds.maxX, _bounds.maxY);\n }\n\n public onViewUpdate()\n {\n // increment from the 12th bit!\n this._didChangeId += 1 << 12;\n this._didSpriteUpdate = true;\n this._sourceBoundsDirty = this._boundsDirty = true;\n\n if (this.didViewUpdate) return;\n this.didViewUpdate = true;\n\n const renderGroup = this.renderGroup || this.parentRenderGroup;\n\n if (renderGroup)\n {\n renderGroup.onChildViewUpdate(this);\n }\n }\n\n private _updateBounds()\n {\n updateQuadBounds(this._bounds, this._anchor, this._texture, 0);\n }\n\n private _updateSourceBounds()\n {\n const anchor = this._anchor;\n const texture = this._texture;\n\n const sourceBounds = this._sourceBounds;\n\n const { width, height } = texture.orig;\n\n sourceBounds.maxX = -anchor._x * width;\n sourceBounds.minX = sourceBounds.maxX + width;\n\n sourceBounds.maxY = -anchor._y * height;\n sourceBounds.minY = sourceBounds.maxY + height;\n }\n\n /**\n * Destroys this sprite renderable and optionally its texture.\n * @param options - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.texture=false] - Should it destroy the current texture of the renderable as well\n * @param {boolean} [options.textureSource=false] - Should it destroy the textureSource of the renderable as well\n */\n public destroy(options: DestroyOptions = false)\n {\n super.destroy(options);\n\n const destroyTexture = typeof options === 'boolean' ? options : options?.texture;\n\n if (destroyTexture)\n {\n const destroyTextureSource = typeof options === 'boolean' ? options : options?.textureSource;\n\n this._texture.destroy(destroyTextureSource);\n }\n\n this._texture = null;\n (this._bounds as null) = null;\n (this._sourceBounds as null) = null;\n (this._anchor as null) = null;\n }\n\n /**\n * The anchor sets the origin point of the sprite. The default value is taken from the {@link Texture}\n * and passed to the constructor.\n *\n * The default is `(0,0)`, this means the sprite's origin is the top left.\n *\n * Setting the anchor to `(0.5,0.5)` means the sprite's origin is centered.\n *\n * Setting the anchor to `(1,1)` would mean the sprite's origin point will be the bottom right corner.\n *\n * If you pass only single parameter, it will set both x and y to the same value as shown in the example below.\n * @example\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = new Sprite({texture: Texture.WHITE});\n * sprite.anchor.set(0.5); // This will set the origin to center. (0.5) is same as (0.5, 0.5).\n */\n get anchor(): ObservablePoint\n {\n return this._anchor;\n }\n\n set anchor(value: PointData | number)\n {\n typeof value === 'number' ? this._anchor.set(value) : this._anchor.copyFrom(value);\n }\n\n /**\n * Whether or not to round the x/y position of the sprite.\n * @type {boolean}\n */\n get roundPixels()\n {\n return !!this._roundPixels;\n }\n\n set roundPixels(value: boolean)\n {\n this._roundPixels = value ? 1 : 0;\n }\n\n /** The width of the sprite, setting this will actually modify the scale to achieve the value set. */\n override get width(): number\n {\n return Math.abs(this.scale.x) * this._texture.orig.width;\n }\n\n override set width(value: number)\n {\n this._setWidth(value, this._texture.orig.width);\n this._width = value;\n }\n\n /** The height of the sprite, setting this will actually modify the scale to achieve the value set. */\n override get height(): number\n {\n return Math.abs(this.scale.y) * this._texture.orig.height;\n }\n\n override set height(value: number)\n {\n this._setHeight(value, this._texture.orig.height);\n this._height = value;\n }\n\n /**\n * Retrieves the size of the Sprite as a [Size]{@link Size} object.\n * This is faster than get the width and height separately.\n * @param out - Optional object to store the size in.\n * @returns - The size of the Sprite.\n */\n public override getSize(out?: Size): Size\n {\n if (!out)\n {\n out = {} as Size;\n }\n\n out.width = Math.abs(this.scale.x) * this._texture.orig.width;\n out.height = Math.abs(this.scale.y) * this._texture.orig.height;\n\n return out;\n }\n\n /**\n * Sets the size of the Sprite to the specified width and height.\n * This is faster than setting the width and height separately.\n * @param value - This can be either a number or a [Size]{@link Size} object.\n * @param height - The height to set. Defaults to the value of `width` if not provided.\n */\n public override setSize(value: number | Optional, height?: number)\n {\n let convertedWidth: number;\n let convertedHeight: number;\n\n if (typeof value !== 'object')\n {\n convertedWidth = value;\n convertedHeight = height ?? value;\n }\n else\n {\n convertedWidth = value.width;\n convertedHeight = value.height ?? value.width;\n }\n\n if (convertedWidth !== undefined)\n {\n this._setWidth(convertedWidth, this._texture.orig.width);\n }\n\n if (convertedHeight !== undefined)\n {\n this._setHeight(convertedHeight, this._texture.orig.height);\n }\n }\n}\n","import { Bounds } from '../../../scene/container/bounds/Bounds';\nimport { getGlobalBounds } from '../../../scene/container/bounds/getGlobalBounds';\n\nimport type { Container } from '../../../scene/container/Container';\n\nconst tempBounds = new Bounds();\n\nexport function addMaskBounds(mask: Container, bounds: Bounds, skipUpdateTransform: boolean): void\n{\n const boundsToMask = tempBounds;\n\n mask.measurable = true;\n\n getGlobalBounds(mask, skipUpdateTransform, boundsToMask);\n\n bounds.addBoundsMask(boundsToMask);\n\n mask.measurable = false;\n}\n\n","import { getLocalBounds } from '../../../scene/container/bounds/getLocalBounds';\nimport { boundsPool, matrixPool } from '../../../scene/container/bounds/utils/matrixAndBoundsPool';\nimport { warn } from '../../../utils/logging/warn';\n\nimport type { Matrix } from '../../../maths/matrix/Matrix';\nimport type { Bounds } from '../../../scene/container/bounds/Bounds';\nimport type { Container } from '../../../scene/container/Container';\n\nexport function addMaskLocalBounds(mask: Container, bounds: Bounds, localRoot: Container): void\n{\n const boundsToMask = boundsPool.get();\n\n mask.measurable = true;\n\n const tempMatrix = matrixPool.get().identity();\n\n const relativeMask = getMatrixRelativeToParent(mask, localRoot, tempMatrix);\n\n getLocalBounds(mask, boundsToMask, relativeMask);\n\n mask.measurable = false;\n\n bounds.addBoundsMask(boundsToMask);\n\n matrixPool.return(tempMatrix);\n boundsPool.return(boundsToMask);\n}\n\nexport function getMatrixRelativeToParent(target: Container, root: Container, matrix: Matrix): Matrix\n{\n if (!target)\n {\n // we have reach the top of the tree!\n // #if _DEBUG\n warn('Mask bounds, renderable is not inside the root container');\n // #endif\n\n return matrix;\n }\n\n if (target !== root)\n {\n getMatrixRelativeToParent(target.parent, root, matrix);\n\n target.updateLocalTransform();\n\n matrix.append(target.localTransform);\n }\n\n return matrix;\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { Sprite } from '../../../scene/sprite/Sprite';\nimport { addMaskBounds } from '../utils/addMaskBounds';\nimport { addMaskLocalBounds } from '../utils/addMaskLocalBounds';\n\nimport type { ExtensionMetadata } from '../../../extensions/Extensions';\nimport type { Point } from '../../../maths/point/Point';\nimport type { Bounds } from '../../../scene/container/bounds/Bounds';\nimport type { Container } from '../../../scene/container/Container';\nimport type { Effect } from '../../../scene/container/Effect';\nimport type { PoolItem } from '../../../utils/pool/Pool';\n\nexport class AlphaMask implements Effect, PoolItem\n{\n public static extension: ExtensionMetadata = ExtensionType.MaskEffect;\n\n public priority = 0;\n public mask: Container;\n public pipe = 'alphaMask';\n public renderMaskToTexture: boolean;\n\n constructor(options?: {mask: Container})\n {\n if (options?.mask)\n {\n this.init(options.mask);\n }\n }\n\n public init(mask: Container): void\n {\n this.mask = mask;\n\n // TODO - might want to change this to adjust on the fly\n // user may add children to the sprite..\n this.renderMaskToTexture = !(mask instanceof Sprite);\n\n this.mask.renderable = this.renderMaskToTexture;\n this.mask.includeInBuild = !this.renderMaskToTexture;\n\n this.mask.measurable = false;\n }\n\n public reset()\n {\n this.mask.measurable = true;\n this.mask = null;\n }\n\n public addBounds(bounds: Bounds, skipUpdateTransform?: boolean): void\n {\n addMaskBounds(this.mask, bounds, skipUpdateTransform);\n }\n\n public addLocalBounds(bounds: Bounds, localRoot: Container): void\n {\n addMaskLocalBounds(this.mask, bounds, localRoot);\n }\n\n public containsPoint(point: Point, hitTestFn: (container: Container, point: Point) => boolean): boolean\n {\n const mask = this.mask as any;\n\n // if the point is in the mask, yay!\n return hitTestFn(mask, point);\n }\n\n public destroy(): void\n {\n this.reset();\n }\n\n public static test(mask: any): boolean\n {\n return mask instanceof Sprite;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { ExtensionMetadata } from '../../../extensions/Extensions';\nimport type { Effect } from '../../../scene/container/Effect';\nimport type { PoolItem } from '../../../utils/pool/Pool';\n\nexport class ColorMask implements Effect, PoolItem\n{\n public static extension: ExtensionMetadata = ExtensionType.MaskEffect;\n\n public priority = 0;\n public mask: number;\n public pipe = 'colorMask';\n\n constructor(options: {mask: number})\n {\n if (options?.mask)\n {\n this.init(options.mask);\n }\n }\n\n public init(mask: number): void\n {\n this.mask = mask;\n }\n\n public destroy(): void\n {\n // nothing to destroy\n }\n\n public static test(mask: any): boolean\n {\n return typeof mask === 'number';\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { Container } from '../../../scene/container/Container';\nimport { addMaskBounds } from '../utils/addMaskBounds';\nimport { addMaskLocalBounds } from '../utils/addMaskLocalBounds';\n\nimport type { ExtensionMetadata } from '../../../extensions/Extensions';\nimport type { Point } from '../../../maths/point/Point';\nimport type { Bounds } from '../../../scene/container/bounds/Bounds';\nimport type { Effect } from '../../../scene/container/Effect';\nimport type { PoolItem } from '../../../utils/pool/Pool';\n\nexport class StencilMask implements Effect, PoolItem\n{\n public static extension: ExtensionMetadata = ExtensionType.MaskEffect;\n\n public priority = 0;\n public mask: Container;\n public pipe = 'stencilMask';\n\n constructor(options: {mask: Container})\n {\n if (options?.mask)\n {\n this.init(options.mask);\n }\n }\n\n public init(mask: Container): void\n {\n this.mask = mask;\n this.mask.includeInBuild = false;\n this.mask.measurable = false;\n }\n\n public reset()\n {\n this.mask.measurable = true;\n this.mask.includeInBuild = true;\n this.mask = null;\n }\n\n public addBounds(bounds: Bounds, skipUpdateTransform: boolean): void\n {\n addMaskBounds(this.mask, bounds, skipUpdateTransform);\n }\n\n public addLocalBounds(bounds: Bounds, localRoot: Container): void\n {\n addMaskLocalBounds(this.mask, bounds, localRoot);\n }\n\n public containsPoint(point: Point, hitTestFn: (container: Container, point: Point) => boolean): boolean\n {\n const mask = this.mask as any;\n\n // if the point is in the mask, yay!\n return hitTestFn(mask, point);\n }\n\n public destroy(): void\n {\n this.reset();\n }\n\n public static test(mask: any): boolean\n {\n return mask instanceof Container;\n }\n}\n","import { DOMAdapter } from '../../../../../environment/adapter';\nimport { ExtensionType } from '../../../../../extensions/Extensions';\nimport { TextureSource } from './TextureSource';\n\nimport type { ICanvas } from '../../../../../environment/canvas/ICanvas';\nimport type { ExtensionMetadata } from '../../../../../extensions/Extensions';\nimport type { TextureSourceOptions } from './TextureSource';\n\nexport interface CanvasSourceOptions extends TextureSourceOptions\n{\n /** should the canvas be resized to preserve its screen width and height regardless of the resolution of the renderer */\n autoDensity?: boolean;\n /** if true, this canvas will be set up to be transparent where possible */\n transparent?: boolean;\n}\n\nexport class CanvasSource extends TextureSource\n{\n public static extension: ExtensionMetadata = ExtensionType.TextureSource;\n\n public uploadMethodId = 'image';\n public autoDensity: boolean;\n public transparent: boolean;\n\n constructor(options: CanvasSourceOptions)\n {\n if (!options.resource)\n {\n options.resource = DOMAdapter.get().createCanvas();\n }\n\n if (!options.width)\n {\n options.width = options.resource.width;\n\n if (!options.autoDensity)\n {\n options.width /= options.resolution;\n }\n }\n\n if (!options.height)\n {\n options.height = options.resource.height;\n\n if (!options.autoDensity)\n {\n options.height /= options.resolution;\n }\n }\n\n super(options);\n\n this.autoDensity = options.autoDensity;\n\n const canvas = options.resource;\n\n if (this.pixelWidth !== canvas.width || this.pixelWidth !== canvas.height)\n {\n this.resizeCanvas();\n }\n\n this.transparent = !!options.transparent;\n }\n\n public resizeCanvas()\n {\n if (this.autoDensity)\n {\n this.resource.style.width = `${this.width}px`;\n this.resource.style.height = `${this.height}px`;\n }\n\n // only resize if wee need to, as this clears the canvas (even if values are set to the same)\n if (this.resource.width !== this.pixelWidth || this.resource.height !== this.pixelHeight)\n {\n this.resource.width = this.pixelWidth;\n this.resource.height = this.pixelHeight;\n }\n }\n\n public resize(width = this.width, height = this.height, resolution = this._resolution): boolean\n {\n const didResize = super.resize(width, height, resolution);\n\n if (didResize)\n {\n this.resizeCanvas();\n }\n\n return didResize;\n }\n\n public static test(resource: any): resource is ICanvas\n {\n return (globalThis.HTMLCanvasElement && resource instanceof HTMLCanvasElement)\n || (globalThis.OffscreenCanvas && resource instanceof OffscreenCanvas);\n }\n}\n","import { DOMAdapter } from '../../../../../environment/adapter';\nimport { ExtensionType } from '../../../../../extensions/Extensions';\nimport { warn } from '../../../../../utils/logging/warn';\nimport { TextureSource } from './TextureSource';\n\nimport type { ICanvas } from '../../../../../environment/canvas/ICanvas';\nimport type { ExtensionMetadata } from '../../../../../extensions/Extensions';\nimport type { TextureSourceOptions } from './TextureSource';\n\nexport type ImageResource =\nImageBitmap\n| HTMLCanvasElement\n| OffscreenCanvas\n| ICanvas\n| VideoFrame\n| HTMLImageElement\n| HTMLVideoElement;\n\nexport class ImageSource extends TextureSource\n{\n public static extension: ExtensionMetadata = ExtensionType.TextureSource;\n public uploadMethodId = 'image';\n\n constructor(options: TextureSourceOptions)\n {\n if (options.resource && (globalThis.HTMLImageElement && options.resource instanceof HTMLImageElement))\n {\n const canvas = DOMAdapter.get().createCanvas(options.resource.width, options.resource.height);\n const context = canvas.getContext('2d');\n\n context.drawImage(options.resource, 0, 0);\n options.resource = canvas;\n\n // #if _DEBUG\n warn('ImageSource: Image element passed, converting to canvas. Use CanvasSource instead.');\n // #endif\n }\n\n super(options);\n\n this.autoGarbageCollect = true;\n }\n\n public static test(resource: any): resource is ImageResource\n {\n return (globalThis.HTMLImageElement && resource instanceof HTMLImageElement)\n || (typeof ImageBitmap !== 'undefined' && resource instanceof ImageBitmap);\n }\n}\n","import type { ALPHA_MODES } from '../../rendering/renderers/shared/texture/const';\n\nlet promise: Promise | undefined;\n\n/**\n * Helper for detecting the correct alpha mode for video textures.\n * For some reason, some browsers/devices/WebGL implementations premultiply the alpha\n * of a video before and then a second time if `UNPACK_PREMULTIPLY_ALPHA_WEBGL`\n * is true. So the video is premultiplied twice if the alpha mode is `UNPACK`.\n * In this case we need the alpha mode to be `PMA`. This function detects\n * the upload behavior by uploading a white 2x2 webm with 50% alpha\n * without `UNPACK_PREMULTIPLY_ALPHA_WEBGL` and then checking whether\n * the uploaded pixels are premultiplied.\n * @memberof utils\n * @function detectVideoAlphaMode\n * @returns {Promise} The correct alpha mode for video textures.\n */\nexport async function detectVideoAlphaMode(): Promise\n{\n promise ??= (async () =>\n {\n const canvas = document.createElement('canvas');\n const gl = canvas.getContext('webgl');\n\n if (!gl)\n {\n return 'premultiply-alpha-on-upload';\n }\n\n const video = await new Promise((resolve) =>\n {\n const video = document.createElement('video');\n\n video.onloadeddata = () => resolve(video);\n video.onerror = () => resolve(null);\n video.autoplay = false;\n video.crossOrigin = 'anonymous';\n video.preload = 'auto';\n // eslint-disable-next-line max-len\n video.src = 'data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=';\n video.load();\n });\n\n if (!video)\n {\n return 'premultiply-alpha-on-upload';\n }\n\n const texture = gl.createTexture();\n\n gl.bindTexture(gl.TEXTURE_2D, texture);\n\n const framebuffer = gl.createFramebuffer();\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n texture,\n 0\n );\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video);\n\n const pixel = new Uint8Array(4);\n\n gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel);\n\n gl.deleteFramebuffer(framebuffer);\n gl.deleteTexture(texture);\n gl.getExtension('WEBGL_lose_context')?.loseContext();\n\n return pixel[0] <= pixel[3] ? 'premultiplied-alpha' : 'premultiply-alpha-on-upload';\n })();\n\n return promise;\n}\n","// VideoSource.ts\n\nimport { ExtensionType } from '../../../../../extensions/Extensions';\nimport { Ticker } from '../../../../../ticker/Ticker';\nimport { detectVideoAlphaMode } from '../../../../../utils/browser/detectVideoAlphaMode';\nimport { TextureSource } from './TextureSource';\n\nimport type { ExtensionMetadata } from '../../../../../extensions/Extensions';\nimport type { Dict } from '../../../../../utils/types';\nimport type { ALPHA_MODES } from '../const';\nimport type { TextureSourceOptions } from './TextureSource';\n\ntype VideoResource = HTMLVideoElement;\n\n/**\n * Options for video sources.\n * @memberof rendering\n */\nexport interface VideoSourceOptions extends TextureSourceOptions\n{\n /** If true, the video will start loading immediately. */\n autoLoad?: boolean;\n /** If true, the video will start playing as soon as it is loaded. */\n autoPlay?: boolean;\n /** The number of times a second to update the texture from the video. Leave at 0 to update at every render. */\n updateFPS?: number;\n /** If true, the video will be loaded with the `crossorigin` attribute. */\n crossorigin?: boolean | string;\n /** If true, the video will loop when it ends. */\n loop?: boolean;\n /** If true, the video will be muted. */\n muted?: boolean;\n /** If true, the video will play inline. */\n playsinline?: boolean;\n /** If true, the video will be preloaded. */\n preload?: boolean;\n /** The time in milliseconds to wait for the video to preload before timing out. */\n preloadTimeoutMs?: number;\n /** The alpha mode of the video. */\n alphaMode?: ALPHA_MODES;\n}\n\nexport interface VideoResourceOptionsElement\n{\n src: string;\n mime: string;\n}\n\n/**\n * A source for video-based textures.\n * @memberof rendering\n */\nexport class VideoSource extends TextureSource\n{\n public static extension: ExtensionMetadata = ExtensionType.TextureSource;\n\n /** The default options for video sources. */\n public static defaultOptions: VideoSourceOptions = {\n ...TextureSource.defaultOptions,\n /** If true, the video will start loading immediately. */\n autoLoad: true,\n /** If true, the video will start playing as soon as it is loaded. */\n autoPlay: true,\n /** The number of times a second to update the texture from the video. Leave at 0 to update at every render. */\n updateFPS: 0,\n /** If true, the video will be loaded with the `crossorigin` attribute. */\n crossorigin: true,\n /** If true, the video will loop when it ends. */\n loop: false,\n /** If true, the video will be muted. */\n muted: true,\n /** If true, the video will play inline. */\n playsinline: true,\n /** If true, the video will be preloaded. */\n preload: false,\n };\n\n // Public\n /** Whether or not the video is ready to play. */\n public isReady = false;\n /** The upload method for this texture. */\n public uploadMethodId = 'video';\n\n // Protected\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 * @default true\n */\n protected autoPlay: boolean;\n\n // Private\n /**\n * `true` to use Ticker.shared to auto update the base texture.\n * @default true\n */\n private _autoUpdate: boolean;\n\n /**\n * `true` if the instance is currently connected to Ticker.shared to auto update the base texture.\n * @default false\n */\n private _isConnectedToTicker: boolean;\n\n /**\n * Promise when loading.\n * @default null\n */\n private _load: Promise;\n\n private _msToNextUpdate: number;\n private _preloadTimeout: number;\n\n /** Callback when completed with load. */\n private _resolve: (value?: this | PromiseLike) => void;\n private _reject: (error: ErrorEvent) => void;\n\n private _updateFPS: number;\n private _videoFrameRequestCallbackHandle: number | null;\n\n constructor(\n options: VideoSourceOptions\n )\n {\n super(options);\n\n // Merge provided options with default ones\n options = {\n ...VideoSource.defaultOptions,\n ...options\n };\n\n this._autoUpdate = true;\n this._isConnectedToTicker = false;\n this._updateFPS = options.updateFPS || 0;\n this._msToNextUpdate = 0;\n this.autoPlay = options.autoPlay !== false;\n this.alphaMode = options.alphaMode ?? 'premultiply-alpha-on-upload';\n\n // Binding for frame updates\n this._videoFrameRequestCallback = this._videoFrameRequestCallback.bind(this);\n this._videoFrameRequestCallbackHandle = null;\n\n this._load = null;\n this._resolve = null;\n this._reject = null;\n\n // Bind for listeners\n this._onCanPlay = this._onCanPlay.bind(this);\n this._onCanPlayThrough = this._onCanPlayThrough.bind(this);\n this._onError = this._onError.bind(this);\n this._onPlayStart = this._onPlayStart.bind(this);\n this._onPlayStop = this._onPlayStop.bind(this);\n this._onSeeked = this._onSeeked.bind(this);\n\n if (options.autoLoad !== false)\n {\n void this.load();\n }\n }\n\n /** Update the video frame if the source is not destroyed and meets certain conditions. */\n protected updateFrame(): void\n {\n if (this.destroyed)\n {\n return;\n }\n\n if (this._updateFPS)\n {\n // Account for if video has had its playbackRate changed\n const elapsedMS = Ticker.shared.elapsedMS * this.resource.playbackRate;\n\n this._msToNextUpdate = Math.floor(this._msToNextUpdate - elapsedMS);\n }\n\n if (!this._updateFPS || this._msToNextUpdate <= 0)\n {\n this._msToNextUpdate = this._updateFPS ? Math.floor(1000 / this._updateFPS) : 0;\n }\n\n if (this.isValid)\n {\n this.update();\n }\n }\n\n /** Callback to update the video frame and potentially request the next frame update. */\n private _videoFrameRequestCallback(): void\n {\n this.updateFrame();\n\n if (this.destroyed)\n {\n this._videoFrameRequestCallbackHandle = null;\n }\n else\n {\n this._videoFrameRequestCallbackHandle = this.resource.requestVideoFrameCallback(\n this._videoFrameRequestCallback\n );\n }\n }\n\n /**\n * Checks if the resource has valid dimensions.\n * @returns {boolean} True if width and height are set, otherwise false.\n */\n public get isValid(): boolean\n {\n return !!this.resource.videoWidth && !!this.resource.videoHeight;\n }\n\n /**\n * Start preloading the video resource.\n * @returns {Promise} Handle the validate event\n */\n public async load(): Promise\n {\n if (this._load)\n {\n return this._load;\n }\n\n const source = this.resource;\n const options = this.options as VideoSourceOptions;\n\n // Check if source data is enough and set it to complete if needed\n if ((source.readyState === source.HAVE_ENOUGH_DATA || source.readyState === source.HAVE_FUTURE_DATA)\n && source.width && source.height)\n {\n (source as any).complete = true;\n }\n\n // Add event listeners related to playback and seeking\n source.addEventListener('play', this._onPlayStart);\n source.addEventListener('pause', this._onPlayStop);\n source.addEventListener('seeked', this._onSeeked);\n\n // Add or handle source readiness event listeners\n if (!this._isSourceReady())\n {\n if (!options.preload)\n {\n // since this event fires early, only bind if not waiting for a preload event\n source.addEventListener('canplay', this._onCanPlay);\n }\n source.addEventListener('canplaythrough', this._onCanPlayThrough);\n source.addEventListener('error', this._onError, true);\n }\n else\n {\n // Source is already ready, so handle it immediately\n this._mediaReady();\n }\n\n this.alphaMode = await detectVideoAlphaMode();\n\n // Create and return the loading promise\n this._load = new Promise((resolve, reject): void =>\n {\n if (this.isValid)\n {\n resolve(this);\n }\n else\n {\n this._resolve = resolve;\n this._reject = reject;\n\n if (options.preloadTimeoutMs !== undefined)\n {\n this._preloadTimeout = setTimeout(() =>\n {\n this._onError(new ErrorEvent(`Preload exceeded timeout of ${options.preloadTimeoutMs}ms`));\n }) as unknown as number;\n }\n source.load();\n }\n });\n\n return this._load;\n }\n\n /**\n * Handle video error events.\n * @param event - The error event\n */\n private _onError(event: ErrorEvent): void\n {\n this.resource.removeEventListener('error', this._onError, true);\n this.emit('error', event);\n\n if (this._reject)\n {\n this._reject(event);\n this._reject = null;\n this._resolve = null;\n }\n }\n\n /**\n * Checks if the underlying source is playing.\n * @returns True if playing.\n */\n private _isSourcePlaying(): boolean\n {\n const source = this.resource;\n\n return (!source.paused && !source.ended);\n }\n\n /**\n * Checks if the underlying source is ready for playing.\n * @returns True if ready.\n */\n private _isSourceReady(): boolean\n {\n const source = this.resource;\n\n return source.readyState > 2;\n }\n\n /** Runs the update loop when the video is ready to play. */\n private _onPlayStart(): void\n {\n // Handle edge case where video might not have received its \"can play\" event yet\n if (!this.isValid)\n {\n this._mediaReady();\n }\n\n this._configureAutoUpdate();\n }\n\n /** Stops the update loop when a pause event is triggered. */\n private _onPlayStop(): void\n {\n this._configureAutoUpdate();\n }\n\n /** Handles behavior when the video completes seeking to the current playback position. */\n private _onSeeked(): void\n {\n if (this._autoUpdate && !this._isSourcePlaying())\n {\n this._msToNextUpdate = 0;\n this.updateFrame();\n this._msToNextUpdate = 0;\n }\n }\n\n private _onCanPlay(): void\n {\n const source = this.resource;\n\n // Remove event listeners\n source.removeEventListener('canplay', this._onCanPlay);\n\n this._mediaReady();\n }\n\n private _onCanPlayThrough(): void\n {\n const source = this.resource;\n\n // Remove event listeners\n source.removeEventListener('canplaythrough', this._onCanPlay);\n\n if (this._preloadTimeout)\n {\n clearTimeout(this._preloadTimeout);\n this._preloadTimeout = undefined;\n }\n\n this._mediaReady();\n }\n\n /** Fired when the video is loaded and ready to play. */\n private _mediaReady(): void\n {\n const source = this.resource;\n\n if (this.isValid)\n {\n this.isReady = true;\n this.resize(source.videoWidth, source.videoHeight);\n }\n\n // Reset update timers and perform a frame update\n this._msToNextUpdate = 0;\n this.updateFrame();\n this._msToNextUpdate = 0;\n\n // Resolve the loading promise if it exists\n if (this._resolve)\n {\n this._resolve(this);\n this._resolve = null;\n this._reject = null;\n }\n\n // Handle play behavior based on current source status\n if (this._isSourcePlaying())\n {\n this._onPlayStart();\n }\n else if (this.autoPlay)\n {\n void this.resource.play();\n }\n }\n\n /** Cleans up resources and event listeners associated with this texture. */\n public destroy()\n {\n this._configureAutoUpdate();\n\n const source = this.resource;\n\n if (source)\n {\n // Remove event listeners\n source.removeEventListener('play', this._onPlayStart);\n source.removeEventListener('pause', this._onPlayStop);\n source.removeEventListener('seeked', this._onSeeked);\n source.removeEventListener('canplay', this._onCanPlay);\n source.removeEventListener('canplaythrough', this._onCanPlayThrough);\n source.removeEventListener('error', this._onError, true);\n\n // Clear the video source and pause\n source.pause();\n source.src = '';\n source.load();\n }\n\n super.destroy();\n }\n\n /** Should the base texture automatically update itself, set to true by default. */\n get autoUpdate(): boolean\n {\n return this._autoUpdate;\n }\n\n set autoUpdate(value: boolean)\n {\n if (value !== this._autoUpdate)\n {\n this._autoUpdate = value;\n this._configureAutoUpdate();\n }\n }\n\n /**\n * How many times a second to update the texture from the video.\n * Leave at 0 to update at every render.\n * A lower fps can help performance, as updating the texture at 60fps on a 30ps video may not be efficient.\n */\n get updateFPS(): number\n {\n return this._updateFPS;\n }\n\n set updateFPS(value: number)\n {\n if (value !== this._updateFPS)\n {\n this._updateFPS = value;\n this._configureAutoUpdate();\n }\n }\n\n /**\n * Configures the updating mechanism based on the current state and settings.\n *\n * This method decides between using the browser's native video frame callback or a custom ticker\n * for updating the video frame. It ensures optimal performance and responsiveness\n * based on the video's state, playback status, and the desired frames-per-second setting.\n *\n * - If `_autoUpdate` is enabled and the video source is playing:\n * - It will prefer the native video frame callback if available and no specific FPS is set.\n * - Otherwise, it will use a custom ticker for manual updates.\n * - If `_autoUpdate` is disabled or the video isn't playing, any active update mechanisms are halted.\n */\n private _configureAutoUpdate(): void\n {\n // Check if automatic updating is enabled and if the source is currently playing\n if (this._autoUpdate && this._isSourcePlaying())\n {\n // Determine if we should use the browser's native video frame callback (generally for better performance)\n if (!this._updateFPS && this.resource.requestVideoFrameCallback)\n {\n // If connected to a custom ticker, remove the update frame function from it\n if (this._isConnectedToTicker)\n {\n Ticker.shared.remove(this.updateFrame, this);\n this._isConnectedToTicker = false;\n // Reset the time until the next update\n this._msToNextUpdate = 0;\n }\n\n // Check if we haven't already requested a video frame callback, and if not, request one\n if (this._videoFrameRequestCallbackHandle === null)\n {\n this._videoFrameRequestCallbackHandle = this.resource.requestVideoFrameCallback(\n this._videoFrameRequestCallback\n );\n }\n }\n else\n {\n // If a video frame request callback exists, cancel it, as we are switching to manual ticker-based updates\n if (this._videoFrameRequestCallbackHandle !== null)\n {\n this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle);\n this._videoFrameRequestCallbackHandle = null;\n }\n\n // If not connected to the custom ticker, add the update frame function to it\n if (!this._isConnectedToTicker)\n {\n Ticker.shared.add(this.updateFrame, this);\n this._isConnectedToTicker = true;\n // Reset the time until the next update\n this._msToNextUpdate = 0;\n }\n }\n }\n else\n {\n // If automatic updating is disabled or the source isn't playing, perform cleanup\n\n // Cancel any existing video frame callback request\n if (this._videoFrameRequestCallbackHandle !== null)\n {\n this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle);\n this._videoFrameRequestCallbackHandle = null;\n }\n\n // Remove the update frame function from the custom ticker\n if (this._isConnectedToTicker)\n {\n Ticker.shared.remove(this.updateFrame, this);\n this._isConnectedToTicker = false;\n // Reset the time until the next update\n this._msToNextUpdate = 0;\n }\n }\n }\n\n /**\n * Map of video MIME types that can't be directly derived from file extensions.\n * @readonly\n */\n public static MIME_TYPES: Dict\n = {\n ogv: 'video/ogg',\n mov: 'video/quicktime',\n m4v: 'video/mp4',\n };\n\n public static test(resource: any): resource is VideoResource\n {\n return (globalThis.HTMLVideoElement && resource instanceof HTMLVideoElement)\n || (globalThis.VideoFrame && resource instanceof VideoFrame);\n }\n}\n","import { warn } from '../../utils/logging/warn';\nimport { convertToList } from '../utils/convertToList';\n\nimport type { CacheParser } from './CacheParser';\n\n/**\n * A single Cache for all assets.\n *\n * When assets are added to the cache via set they normally are added to the cache as key-value pairs.\n *\n * With this cache, you can add parsers that will take the object and convert it to a list of assets that can be cached.\n * for example a cacheSpritesheet parser will add all of the textures found within its sprite sheet directly to the cache.\n *\n * This gives devs the flexibility to cache any type of object however we want.\n *\n * It is not intended that this class is created by developers - it is part of the Asset package.\n * This is the first major system of PixiJS' main Assets class.\n * @example\n * import { Cache } from 'pixi.js';\n *\n * Cache.set('bunny', bunnyTexture);\n * @class Cache\n * @memberof assets\n */\nclass CacheClass\n{\n private readonly _parsers: CacheParser[] = [];\n\n private readonly _cache: Map = new Map();\n private readonly _cacheMap: Map = new Map();\n\n /** Clear all entries. */\n public reset(): void\n {\n this._cacheMap.clear();\n this._cache.clear();\n }\n\n /**\n * Check if the key exists\n * @param key - The key to check\n */\n public has(key: any): boolean\n {\n return this._cache.has(key);\n }\n\n /**\n * Fetch entry by key\n * @param key - The key of the entry to get\n */\n public get(key: any): T\n {\n const result = this._cache.get(key);\n\n if (!result)\n {\n // #if _DEBUG\n warn(`[Assets] Asset id ${key} was not found in the Cache`);\n // #endif\n }\n\n return result as T;\n }\n\n /**\n * Set a value by key or keys name\n * @param key - The key or keys to set\n * @param value - The value to store in the cache or from which cacheable assets will be derived.\n */\n public set(key: any | any[], value: unknown): void\n {\n const keys = convertToList(key);\n\n let cacheableAssets: Record;\n\n for (let i = 0; i < this.parsers.length; i++)\n {\n const parser = this.parsers[i];\n\n if (parser.test(value))\n {\n cacheableAssets = parser.getCacheableAssets(keys, value);\n\n break;\n }\n }\n\n // convert cacheable assets to a map of key-value pairs\n const cacheableMap = new Map(Object.entries(cacheableAssets || {}));\n\n if (!cacheableAssets)\n {\n keys.forEach((key) =>\n {\n cacheableMap.set(key, value);\n });\n }\n\n const cacheKeys = [...cacheableMap.keys()];\n\n const cachedAssets = {\n cacheKeys,\n keys\n };\n\n // this is so we can remove them later..\n keys.forEach((key) =>\n {\n this._cacheMap.set(key, cachedAssets as any);\n });\n\n cacheKeys.forEach((key) =>\n {\n const val = cacheableAssets ? cacheableAssets[key] : value;\n\n if (this._cache.has(key) && this._cache.get(key) !== val)\n {\n // #if _DEBUG\n warn('[Cache] already has key:', key);\n // #endif\n }\n\n this._cache.set(key, cacheableMap.get(key));\n });\n }\n\n /**\n * Remove entry by key\n *\n * This function will also remove any associated alias from the cache also.\n * @param key - The key of the entry to remove\n */\n public remove(key: any): void\n {\n if (!this._cacheMap.has(key))\n {\n // #if _DEBUG\n warn(`[Assets] Asset id ${key} was not found in the Cache`);\n // #endif\n\n return;\n }\n\n const cacheMap = this._cacheMap.get(key);\n\n const cacheKeys = cacheMap.cacheKeys;\n\n cacheKeys.forEach((key) =>\n {\n this._cache.delete(key);\n });\n\n cacheMap.keys.forEach((key: string) =>\n {\n this._cacheMap.delete(key);\n });\n }\n\n /** All loader parsers registered */\n public get parsers(): CacheParser[]\n {\n return this._parsers;\n }\n}\n\nexport const Cache = new CacheClass();\n","import { Cache } from '../../../../../assets/cache/Cache';\nimport { extensions, ExtensionType } from '../../../../../extensions/Extensions';\nimport { TextureSource } from '../sources/TextureSource';\nimport { Texture } from '../Texture';\n\nimport type { ICanvas } from '../../../../../environment/canvas/ICanvas';\nimport type { TypedArray } from '../../buffer/Buffer';\nimport type { BufferSourceOptions } from '../sources/BufferImageSource';\nimport type { CanvasSourceOptions } from '../sources/CanvasSource';\nimport type { ImageResource } from '../sources/ImageSource';\nimport type { TextureSourceOptions } from '../sources/TextureSource';\nimport type { TextureSourceLike } from '../Texture';\n\ninterface TextureSourceConstructor\n{\n new (options: TextureSourceOptions): T;\n test(options: ImageResource | TypedArray | ArrayBuffer | ICanvas): boolean;\n}\n\nconst sources: TextureSourceConstructor[] = [];\n\nextensions.handleByList(ExtensionType.TextureSource, sources);\n\nexport type TextureResourceOrOptions =\n ImageResource\n | TextureSourceOptions\n | BufferSourceOptions\n | CanvasSourceOptions;\n\n/**\n * @param options\n * @deprecated since v8.2.0\n * @see TextureSource.from\n */\nexport function autoDetectSource(options: TextureResourceOrOptions = {}): TextureSource\n{\n return textureSourceFrom(options);\n}\n\n/**\n * Creates a texture source from the options provided\n * @param options - The options to create the texture source from. This can be\n */\nfunction textureSourceFrom(options: TextureResourceOrOptions = {}): TextureSource\n{\n const hasResource = options && (options as TextureSourceOptions).resource;\n const res = hasResource ? (options as TextureSourceOptions).resource : options;\n const opts = hasResource ? options as TextureSourceOptions : { resource: options } as TextureSourceOptions;\n\n for (let i = 0; i < sources.length; i++)\n {\n const Source = sources[i];\n\n if (Source.test(res))\n {\n return new Source(opts);\n }\n }\n\n throw new Error(`Could not find a source type for resource: ${opts.resource}`);\n}\n\nexport function resourceToTexture(\n options: TextureResourceOrOptions = {},\n skipCache = false\n): Texture\n{\n const hasResource = options && (options as TextureSourceOptions).resource;\n const resource = hasResource ? (options as TextureSourceOptions).resource : options;\n const opts = hasResource ? options as TextureSourceOptions : { resource: options } as TextureSourceOptions;\n\n if (!skipCache && Cache.has(resource))\n {\n return Cache.get(resource);\n }\n\n const texture = new Texture({ source: textureSourceFrom(opts) });\n\n texture.on('destroy', () =>\n {\n if (Cache.has(resource))\n {\n Cache.remove(resource);\n }\n });\n\n if (!skipCache)\n {\n Cache.set(resource, texture);\n }\n\n return texture;\n}\n\n/**\n * Helper function that creates a returns Texture based on the source you provide.\n * The source should be loaded and ready to go. If not its best to grab the asset using Assets.\n * @param id - String or Source to create texture from\n * @param skipCache - Skip adding the texture to the cache\n * @returns The texture based on the Id provided\n */\nexport function textureFrom(id: TextureSourceLike, skipCache = false): Texture\n{\n if (typeof id === 'string')\n {\n return Cache.get(id);\n }\n else if (id instanceof TextureSource)\n {\n return new Texture({ source: id });\n }\n\n // return a auto generated texture from resource\n return resourceToTexture(id, skipCache);\n}\n\nTexture.from = textureFrom;\nTextureSource.from = textureSourceFrom;\n","import { extensions } from '../extensions/Extensions';\nimport { AlphaMask } from './mask/alpha/AlphaMask';\nimport { ColorMask } from './mask/color/ColorMask';\nimport { StencilMask } from './mask/stencil/StencilMask';\nimport { BufferImageSource } from './renderers/shared/texture/sources/BufferImageSource';\nimport { CanvasSource } from './renderers/shared/texture/sources/CanvasSource';\nimport { ImageSource } from './renderers/shared/texture/sources/ImageSource';\nimport { VideoSource } from './renderers/shared/texture/sources/VideoSource';\nimport './renderers/shared/texture/utils/textureFrom';\nimport './mask/MaskEffectManager';\n\n/**\n * The rendering namespace contains all the classes used for core rendering in PixiJS\n * this includes all the lower level resources such as Textures, Shaders, State, Buffers,\n * Geometry and the systems required to use them. This covers WebGL and WebGPU and their shared classes.\n *\n * To automatically create a renderer based on available resources, see the {@link rendering.autoDetectRenderer} function.\n * @namespace rendering\n */\n\nextensions.add(AlphaMask, ColorMask, StencilMask, VideoSource, ImageSource, CanvasSource, BufferImageSource);\n\n","/**\n * Buffer usage flags. they can be combined using the bitwise OR operator\n * eg : BufferUsage.VERTEX | BufferUsage.INDEX\n * @memberof rendering\n */\nexport enum BufferUsage\n// eslint-disable-next-line @typescript-eslint/indent\n{\n /**\n * The buffer can be mapped for reading. (Example: calling mapAsync() with GPUMapMode.READ)\n * May only be combined with COPY_DST.\n */\n MAP_READ = 0x0001,\n /**\n * The buffer can be mapped for writing. (Example: calling mapAsync() with GPUMapMode.WRITE)\n * May only be combined with COPY_SRC.\n */\n MAP_WRITE = 0x0002,\n /**\n * The buffer can be used as the source of a copy operation.\n * (Examples: as the source argument of a copyBufferToBuffer() or copyBufferToTexture() call.)\n */\n COPY_SRC = 0x0004,\n /**\n * The buffer can be used as the destination of a copy or write operation.\n * (Examples: as the destination argument of a copyBufferToBuffer() or\n * copyTextureToBuffer() call, or as the target of a writeBuffer() call.)\n */\n COPY_DST = 0x0008,\n /** The buffer can be used as an index buffer. (Example: passed to setIndexBuffer().) */\n INDEX = 0x0010,\n /** The buffer can be used as a vertex buffer. (Example: passed to setVertexBuffer().) */\n VERTEX = 0x0020,\n /**\n * The buffer can be used as a uniform buffer.\n * (Example: as a bind group entry for a GPUBufferBindingLayout with a buffer.type of \"uniform\".)\n */\n UNIFORM = 0x0040,\n /**\n * The buffer can be used as a storage buffer.\n * (Example: as a bind group entry for a GPUBufferBindingLayout with a buffer.type of \"storage\" or \"read-only-storage\".)\n */\n STORAGE = 0x0080,\n /**\n * The buffer can be used as to store indirect command arguments.\n * (Examples: as the indirectBuffer argument of a drawIndirect() or dispatchWorkgroupsIndirect() call.)\n */\n INDIRECT = 0x0100,\n /**\n * The buffer can be used to capture query results.\n * (Example: as the destination argument of a resolveQuerySet() call.)\n */\n QUERY_RESOLVE = 0x0200,\n /** the buffer will not be updated frequently */\n STATIC = 0x0400\n}\n","import EventEmitter from 'eventemitter3';\nimport { uid } from '../../../../utils/data/uid';\nimport { BufferUsage } from './const';\n\nimport type { BindResource } from '../../gpu/shader/BindResource';\n\n/** All the various typed arrays that exist in js */\n// eslint-disable-next-line max-len\nexport type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array;\n\n/** Options for creating a buffer */\nexport interface BufferOptions\n{\n /**\n * the data to initialize the buffer with, this can be a typed array,\n * or a regular number array. If it is a number array, it will be converted to a Float32Array\n */\n data?: TypedArray | number[];\n /** the size of the buffer in bytes, if not supplied, it will be inferred from the data */\n size?: number;\n /** the usage of the buffer, see {@link rendering.BufferUsage} */\n usage: number;\n /** a label for the buffer, this is useful for debugging */\n label?: string;\n /**\n * should the GPU buffer be shrunk when the data becomes smaller?\n * changing this will cause the buffer to be destroyed and a new one created on the GPU\n * this can be expensive, especially if the buffer is already big enough!\n * setting this to false will prevent the buffer from being shrunk. This will yield better performance\n * if you are constantly setting data that is changing size often.\n * @default true\n */\n shrinkToFit?: boolean;\n}\n\nexport interface BufferDescriptor\n{\n label?: string;\n size: GPUSize64;\n usage: BufferUsage;\n mappedAtCreation?: boolean;\n}\n\n/**\n * A wrapper for a WebGPU/WebGL Buffer.\n * In PixiJS, the Buffer class is used to manage the data that is sent to the GPU rendering pipeline.\n * It abstracts away the underlying GPU buffer and provides an interface for uploading typed arrays or other data to the GPU,\n * They are used in the following places:\n *

\n * .1. {@link Geometry} as attribute data or index data for geometry\n *
\n * .2. {@link UniformGroup} as an underlying buffer for uniform data\n *
\n * .3. {@link BufferResource} as an underlying part of a buffer used directly by the GPU program\n *
\n *\n * It is important to note that you must provide a usage type when creating a buffer. This is because\n * the underlying GPU buffer needs to know how it will be used. For example, if you are creating a buffer\n * to hold vertex data, you would use `BufferUsage.VERTEX`. This will tell the GPU that this buffer will be\n * used as a vertex buffer. This is important because it will affect how you can use the buffer.\n *\n * Buffers are updated by calling the {@link Buffer.update} method. This immediately updates the buffer on the GPU.\n * Be mindful of calling this more often than you need to. It is recommended to update buffers only when needed.\n *\n * In WebGPU, a GPU buffer cannot resized. This limitation is abstracted away, but know that resizing a buffer means\n * creating a brand new one and destroying the old, so it is best to limit this if possible.\n * @example\n *\n * const buffer = new Buffer({\n * data: new Float32Array([1, 2, 3, 4]),\n * usage: BufferUsage.VERTEX,\n * });\n * @memberof rendering\n */\nexport class Buffer extends EventEmitter<{\n change: BindResource,\n update: Buffer,\n destroy: Buffer,\n}> implements BindResource\n{\n /**\n * emits when the underlying buffer has changed shape (i.e. resized)\n * letting the renderer know that it needs to discard the old buffer on the GPU and create a new one\n * @event change\n */\n\n /**\n * emits when the underlying buffer data has been updated. letting the renderer know\n * that it needs to update the buffer on the GPU\n * @event update\n */\n\n /**\n * emits when the buffer is destroyed. letting the renderer know that it needs to destroy the buffer on the GPU\n * @event destroy\n */\n\n /**\n * a unique id for this uniform group used through the renderer\n * @internal\n * @ignore\n */\n public readonly uid = uid('buffer');\n\n /**\n * a resource type, used to identify how to handle it when its in a bind group / shader resource\n * @internal\n * @ignore\n */\n public readonly _resourceType = 'buffer';\n\n /**\n * the resource id used internally by the renderer to build bind group keys\n * @internal\n * @ignore\n */\n public _resourceId = uid('resource');\n\n /**\n * used internally to know if a uniform group was used in the last render pass\n * @internal\n * @ignore\n */\n public _touched = 0;\n\n /**\n * a description of the buffer and how it should be set up on the GPU\n * @internal\n * @ignore\n */\n public readonly descriptor: BufferDescriptor;\n\n /**\n * @internal\n * @ignore\n */\n public _updateID = 1;\n\n /**\n * @internal\n * @ignore\n */\n public _updateSize: number;\n\n private _data: TypedArray;\n\n /**\n * should the GPU buffer be shrunk when the data becomes smaller?\n * changing this will cause the buffer to be destroyed and a new one created on the GPU\n * this can be expensive, especially if the buffer is already big enough!\n * setting this to false will prevent the buffer from being shrunk. This will yield better performance\n * if you are constantly setting data that is changing size often.\n * @default true\n */\n public shrinkToFit = true;\n\n /**\n * Has the buffer been destroyed?\n * @readonly\n */\n public destroyed = false;\n\n /**\n * Creates a new Buffer with the given options\n * @param options - the options for the buffer\n */\n constructor(options: BufferOptions)\n {\n let { data, size } = options;\n const { usage, label, shrinkToFit } = options;\n\n super();\n\n if (data instanceof Array)\n {\n data = new Float32Array(data as number[]);\n }\n\n this._data = data as TypedArray;\n\n size = size ?? (data as TypedArray)?.byteLength;\n\n const mappedAtCreation = !!data;\n\n this.descriptor = {\n size,\n usage,\n mappedAtCreation,\n label,\n };\n\n this.shrinkToFit = shrinkToFit ?? true;\n }\n\n /** the data in the buffer */\n get data()\n {\n return this._data;\n }\n\n set data(value: TypedArray)\n {\n this.setDataWithSize(value, value.length, true);\n }\n\n /** whether the buffer is static or not */\n get static()\n {\n return !!(this.descriptor.usage & BufferUsage.STATIC);\n }\n\n set static(value: boolean)\n {\n if (value)\n {\n this.descriptor.usage |= BufferUsage.STATIC;\n }\n else\n {\n this.descriptor.usage &= ~BufferUsage.STATIC;\n }\n }\n\n /**\n * Sets the data in the buffer to the given value. This will immediately update the buffer on the GPU.\n * If you only want to update a subset of the buffer, you can pass in the size of the data.\n * @param value - the data to set\n * @param size - the size of the data in bytes\n * @param syncGPU - should the buffer be updated on the GPU immediately?\n */\n public setDataWithSize(value: TypedArray, size: number, syncGPU: boolean)\n {\n // Increment update ID\n this._updateID++;\n\n this._updateSize = (size * value.BYTES_PER_ELEMENT);\n\n // If the data hasn't changed, early return after emitting 'update'\n if (this._data === value)\n {\n if (syncGPU) this.emit('update', this);\n\n return;\n }\n\n // Cache old data and update to new value\n const oldData = this._data;\n\n this._data = value;\n\n // Event handling\n if (oldData.length !== value.length)\n {\n if (!this.shrinkToFit && value.byteLength < oldData.byteLength)\n {\n if (syncGPU) this.emit('update', this);\n }\n else\n {\n this.descriptor.size = value.byteLength;\n this._resourceId = uid('resource');\n this.emit('change', this);\n }\n\n return;\n }\n\n if (syncGPU) this.emit('update', this);\n }\n\n /**\n * updates the buffer on the GPU to reflect the data in the buffer.\n * By default it will update the entire buffer. If you only want to update a subset of the buffer,\n * you can pass in the size of the buffer to update.\n * @param sizeInBytes - the new size of the buffer in bytes\n */\n public update(sizeInBytes?: number): void\n {\n this._updateSize = sizeInBytes ?? this._updateSize;\n\n this._updateID++;\n\n this.emit('update', this);\n }\n\n /** Destroys the buffer */\n public destroy()\n {\n this.destroyed = true;\n\n this.emit('destroy', this);\n this.emit('change', this);\n\n this._data = null;\n (this.descriptor as null) = null;\n\n this.removeAllListeners();\n }\n}\n\n","import { Buffer } from '../../buffer/Buffer';\nimport { BufferUsage } from '../../buffer/const';\n\nimport type { TypedArray } from '../../buffer/Buffer';\n\n/**\n * Converts something into a buffer. If it is already a buffer it will pass it through\n * if it is a number array it will convert it to a float32 array before being passed into a buffer\n * the buffer will be created with the correct usage flags for geometry attributes\n * @param buffer - number array\n * @param index - is this an index buffer?\n * @returns a buffer\n * @memberof rendering\n */\nexport function ensureIsBuffer(buffer: Buffer | TypedArray | number[], index: boolean): Buffer\n{\n if (!(buffer instanceof Buffer))\n {\n let usage: number = index ? BufferUsage.INDEX : BufferUsage.VERTEX;\n\n // its an array!\n if (buffer instanceof Array)\n {\n if (index)\n {\n buffer = new Uint32Array(buffer);\n usage = BufferUsage.INDEX | BufferUsage.COPY_DST;\n }\n\n else\n {\n buffer = new Float32Array(buffer);\n usage = BufferUsage.VERTEX | BufferUsage.COPY_DST;\n }\n }\n\n buffer = new Buffer({\n data: buffer,\n label: index ? 'index-mesh-buffer' : 'vertex-mesh-buffer',\n usage\n });\n }\n\n return buffer;\n}\n","import type { Bounds } from '../../../../../scene/container/bounds/Bounds';\nimport type { Geometry } from '../Geometry';\n\n/**\n * Gets the 2D bounds of a geometry, based on a specific attribute.\n * @param geometry - Geometry to to measure\n * @param attributeId - AttributeId that contains the x,y data\n * @param bounds - Bounds to store the result in\n * @returns the bounds\n */\nexport function getGeometryBounds(geometry: Geometry, attributeId: string, bounds: Bounds): Bounds\n{\n const attribute = geometry.getAttribute(attributeId);\n\n if (!attribute)\n {\n bounds.minX = 0;\n bounds.minY = 0;\n bounds.maxX = 0;\n bounds.maxY = 0;\n\n return bounds;\n }\n\n const data = attribute.buffer.data as Float32Array;\n\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n\n const byteSize = data.BYTES_PER_ELEMENT;\n\n // stride and offset MAY have not been calculated yet.. so go with assumed defaults\n const offset = (attribute.offset || 0) / byteSize;\n const stride = (attribute.stride || (2 * 4)) / byteSize;\n\n for (let i = offset; i < data.length; i += stride)\n {\n const x = data[i];\n const y = data[i + 1];\n\n if (x > maxX)maxX = x;\n if (y > maxY)maxY = y;\n if (x < minX)minX = x;\n if (y < minY)minY = y;\n }\n\n bounds.minX = minX;\n bounds.minY = minY;\n bounds.maxX = maxX;\n bounds.maxY = maxY;\n\n return bounds;\n}\n","import EventEmitter from 'eventemitter3';\nimport { Bounds } from '../../../../scene/container/bounds/Bounds';\nimport { uid } from '../../../../utils/data/uid';\nimport { Buffer } from '../buffer/Buffer';\nimport { ensureIsBuffer } from './utils/ensureIsBuffer';\nimport { getGeometryBounds } from './utils/getGeometryBounds';\n\nimport type { TypedArray } from '../buffer/Buffer';\nimport type { Topology, VertexFormat } from './const';\n\nexport type IndexBufferArray = Uint16Array | Uint32Array;\n\n/**\n * The attribute data for a geometries attributes\n * @memberof rendering\n */\nexport interface Attribute\n{\n /** the buffer that this attributes data belongs to */\n buffer: Buffer;\n /** the format of the attribute */\n format?: VertexFormat;\n /** set where the shader location is for this attribute */\n location?: number;\n /** the stride of the data in the buffer*/\n stride?: number;\n /** the offset of the attribute from the buffer, defaults to 0 */\n offset?: number;\n /** is this an instanced buffer? (defaults to false) */\n instance?: boolean;\n /** the number of elements to be rendered. If not specified, all vertices after the starting vertex will be drawn. */\n size?: number;\n /** the type of attribute */\n type?: number;\n /**\n * the starting vertex in the geometry to start drawing from. If not specified,\n * drawing will start from the first vertex.\n */\n start?: number;\n /**\n * attribute divisor for instanced rendering. Note: this is a **WebGL-only** feature, the WebGPU renderer will\n * issue a warning if one of the attributes has divisor set.\n */\n divisor?: number;\n}\n\n/**\n * The attribute options used by the constructor for adding geometries attributes\n * extends {@link rendering.Attribute} but allows for the buffer to be a typed or number array\n * @memberof rendering\n */\ntype AttributeOption = Omit & { buffer: Buffer | TypedArray | number[]}\n| Buffer | TypedArray | number[];\n\nexport type AttributeOptions = Record;\n\n/**\n * the interface that describes the structure of the geometry\n * @memberof rendering\n */\nexport interface GeometryDescriptor\n{\n /** an optional label to easily identify the geometry */\n label?: string;\n /** the attributes that make up the geometry */\n attributes: AttributeOptions;\n /** optional index buffer for this geometry */\n indexBuffer?: Buffer | TypedArray | number[];\n /** the topology of the geometry, defaults to 'triangle-list' */\n topology?: Topology;\n\n instanceCount?: number;\n}\nfunction ensureIsAttribute(attribute: AttributeOption): Attribute\n{\n if (attribute instanceof Buffer || Array.isArray(attribute) || (attribute as TypedArray).BYTES_PER_ELEMENT)\n {\n attribute = {\n buffer: attribute as Buffer | TypedArray | number[],\n };\n }\n\n (attribute as Attribute).buffer = ensureIsBuffer(attribute.buffer as Buffer | TypedArray | number[], false);\n\n return attribute as Attribute;\n}\n\n/**\n * A Geometry is a low-level object that represents the structure of 2D shapes in terms of vertices and attributes.\n * It's a crucial component for rendering as it describes the shape and format of the data that will go through the shaders.\n * Essentially, a Geometry object holds the data you'd send to a GPU buffer.\n *\n * A geometry is basically made of two components:\n *
\n * Attributes: These are essentially arrays that define properties of the vertices like position, color,\n * texture coordinates, etc. They map directly to attributes in your vertex shaders.\n *
\n * Indices: An optional array that describes how the vertices are connected.\n * If not provided, vertices will be interpreted in the sequence they're given.\n * @example\n *\n * const geometry = new Geometry({\n * attributes: {\n * aPosition: [ // add some positions\n * 0, 0,\n * 0, 100,\n * 100, 100,\n * 100, 0,\n * ],\n * aUv: [ // add some uvs\n * 0, 0,\n * 0, 1,\n * 1, 1,\n * 1, 0,\n * ]\n * }\n * });\n * @memberof rendering\n * @class\n */\nexport class Geometry extends EventEmitter<{\n update: Geometry,\n destroy: Geometry,\n}>\n{\n /** The topology of the geometry. */\n public topology: Topology;\n /** The unique id of the geometry. */\n public readonly uid: number = uid('geometry');\n /** A record of the attributes of the geometry. */\n public readonly attributes: Record;\n /** The buffers that the attributes use */\n public readonly buffers: Buffer[];\n /** The index buffer of the geometry */\n public readonly indexBuffer: Buffer;\n\n /**\n * the layout key will be generated by WebGPU all geometries that have the same structure\n * will have the same layout key. This is used to cache the pipeline layout\n * @internal\n * @ignore\n */\n public _layoutKey = 0;\n\n /** the instance count of the geometry to draw */\n public instanceCount = 1;\n\n private readonly _bounds: Bounds = new Bounds();\n private _boundsDirty = true;\n\n /**\n * Create a new instance of a geometry\n * @param options - The options for the geometry.\n */\n constructor(options: GeometryDescriptor)\n {\n const { attributes, indexBuffer, topology } = options;\n\n super();\n\n this.attributes = attributes as Record;\n this.buffers = [];\n\n this.instanceCount = options.instanceCount || 1;\n\n for (const i in attributes)\n {\n const attribute = attributes[i] = ensureIsAttribute(attributes[i]);\n\n const bufferIndex = this.buffers.indexOf(attribute.buffer);\n\n if (bufferIndex === -1)\n {\n this.buffers.push(attribute.buffer);\n\n // two events here - one for a resize (new buffer change)\n // and one for an update (existing buffer change)\n attribute.buffer.on('update', this.onBufferUpdate, this);\n attribute.buffer.on('change', this.onBufferUpdate, this);\n }\n }\n\n if (indexBuffer)\n {\n this.indexBuffer = ensureIsBuffer(indexBuffer, true);\n this.buffers.push(this.indexBuffer);\n }\n\n this.topology = topology || 'triangle-list';\n }\n\n protected onBufferUpdate(): void\n {\n this._boundsDirty = true;\n this.emit('update', this);\n }\n\n /**\n * Returns the requested attribute.\n * @param id - The name of the attribute required\n * @returns - The attribute requested.\n */\n public getAttribute(id: string): Attribute\n {\n return this.attributes[id];\n }\n\n /**\n * Returns the index buffer\n * @returns - The index buffer.\n */\n public getIndex(): Buffer\n {\n return this.indexBuffer;\n }\n\n /**\n * Returns the requested buffer.\n * @param id - The name of the buffer required.\n * @returns - The buffer requested.\n */\n public getBuffer(id: string): Buffer\n {\n return this.getAttribute(id).buffer;\n }\n\n /**\n * Used to figure out how many vertices there are in this geometry\n * @returns the number of vertices in the geometry\n */\n public getSize(): number\n {\n for (const i in this.attributes)\n {\n const attribute = this.attributes[i];\n const buffer = attribute.buffer;\n\n // TODO use SIZE again like v7..\n return (buffer.data as any).length / ((attribute.stride / 4) || attribute.size);\n }\n\n return 0;\n }\n\n /** Returns the bounds of the geometry. */\n get bounds(): Bounds\n {\n if (!this._boundsDirty) return this._bounds;\n\n this._boundsDirty = false;\n\n return getGeometryBounds(this, 'aPosition', this._bounds);\n }\n\n /**\n * destroys the geometry.\n * @param destroyBuffers - destroy the buffers associated with this geometry\n */\n public destroy(destroyBuffers = false): void\n {\n this.emit('destroy', this);\n\n this.removeAllListeners();\n\n if (destroyBuffers)\n {\n this.buffers.forEach((buffer) => buffer.destroy());\n }\n\n (this.attributes as null) = null;\n (this.buffers as null) = null;\n (this.indexBuffer as null) = null;\n (this._bounds as null) = null;\n }\n}\n","import { Buffer } from '../../renderers/shared/buffer/Buffer';\nimport { BufferUsage } from '../../renderers/shared/buffer/const';\nimport { Geometry } from '../../renderers/shared/geometry/Geometry';\n\nconst placeHolderBufferData = new Float32Array(1);\nconst placeHolderIndexData = new Uint32Array(1);\n\nexport class BatchGeometry extends Geometry\n{\n constructor()\n {\n const vertexSize = 6;\n\n const attributeBuffer = new Buffer({\n data: placeHolderBufferData,\n label: 'attribute-batch-buffer',\n usage: BufferUsage.VERTEX | BufferUsage.COPY_DST,\n shrinkToFit: false,\n });\n\n const indexBuffer = new Buffer({\n data: placeHolderIndexData,\n label: 'index-batch-buffer',\n usage: BufferUsage.INDEX | BufferUsage.COPY_DST, // | BufferUsage.STATIC,\n shrinkToFit: false,\n });\n\n const stride = vertexSize * 4;\n\n super({\n attributes: {\n aPosition: {\n buffer: attributeBuffer,\n format: 'float32x2',\n stride,\n offset: 0,\n location: 1,\n },\n aUV: {\n buffer: attributeBuffer,\n format: 'float32x2',\n stride,\n offset: 2 * 4,\n location: 3,\n },\n aColor: {\n buffer: attributeBuffer,\n format: 'unorm8x4',\n stride,\n offset: 4 * 4,\n location: 0,\n },\n aTextureIdAndRound: {\n buffer: attributeBuffer,\n format: 'uint16x2',\n stride,\n offset: 5 * 4,\n location: 2,\n },\n },\n indexBuffer\n });\n }\n}\n\n","import type { BindResource } from './BindResource';\n\n/**\n * A bind group is a collection of resources that are bound together for use by a shader.\n * They are essentially a wrapper for the WebGPU BindGroup class. But with the added bonus\n * that WebGL can also work with them.\n * @see https://gpuweb.github.io/gpuweb/#dictdef-gpubindgroupdescriptor\n * @example\n * // Create a bind group with a single texture and sampler\n * const bindGroup = new BindGroup({\n * uTexture: texture.source,\n * uTexture: texture.style,\n * });\n *\n * Bind groups resources must implement the {@link BindResource} interface.\n * The following resources are supported:\n * - {@link TextureSource}\n * - {@link TextureStyle}\n * - {@link Buffer}\n * - {@link BufferResource}\n * - {@link UniformGroup}\n *\n * The keys in the bind group must correspond to the names of the resources in the GPU program.\n *\n * This bind group class will also watch for changes in its resources ensuring that the changes\n * are reflected in the WebGPU BindGroup.\n * @memberof rendering\n */\nexport class BindGroup\n{\n /** The resources that are bound together for use by a shader. */\n public resources: Record = Object.create(null);\n /**\n * a key used internally to match it up to a WebGPU Bindgroup\n * @internal\n * @ignore\n */\n public _key: string;\n private _dirty = true;\n\n /**\n * Create a new instance eof the Bind Group.\n * @param resources - The resources that are bound together for use by a shader.\n */\n constructor(resources?: Record)\n {\n let index = 0;\n\n for (const i in resources)\n {\n const resource: BindResource = resources[i];\n\n this.setResource(resource, index++);\n }\n\n this._updateKey();\n }\n\n /**\n * Updates the key if its flagged as dirty. This is used internally to\n * match this bind group to a WebGPU BindGroup.\n * @internal\n * @ignore\n */\n public _updateKey(): void\n {\n if (!this._dirty) return;\n\n this._dirty = false;\n\n const keyParts = [];\n let index = 0;\n\n // TODO - lets use big ints instead of strings...\n for (const i in this.resources)\n {\n // TODO make this consistent...\n keyParts[index++] = this.resources[i]._resourceId;\n }\n\n this._key = keyParts.join('|');\n }\n\n /**\n * Set a resource at a given index. this function will\n * ensure that listeners will be removed from the current resource\n * and added to the new resource.\n * @param resource - The resource to set.\n * @param index - The index to set the resource at.\n */\n public setResource(resource: BindResource, index: number): void\n {\n const currentResource = this.resources[index];\n\n if (resource === currentResource) return;\n\n if (currentResource)\n {\n resource.off?.('change', this.onResourceChange, this);\n }\n\n resource.on?.('change', this.onResourceChange, this);\n\n this.resources[index] = resource;\n this._dirty = true;\n }\n\n /**\n * Returns the resource at the current specified index.\n * @param index - The index of the resource to get.\n * @returns - The resource at the specified index.\n */\n public getResource(index: number): BindResource\n {\n return this.resources[index];\n }\n\n /**\n * Used internally to 'touch' each resource, to ensure that the GC\n * knows that all resources in this bind group are still being used.\n * @param tick - The current tick.\n * @internal\n * @ignore\n */\n public _touch(tick: number)\n {\n const resources = this.resources;\n\n for (const i in resources)\n {\n resources[i]._touched = tick;\n }\n }\n\n /** Destroys this bind group and removes all listeners. */\n public destroy()\n {\n const resources = this.resources;\n\n for (const i in resources)\n {\n const resource = resources[i];\n\n resource.off?.('change', this.onResourceChange, this);\n }\n\n this.resources = null;\n }\n\n protected onResourceChange(resource: BindResource)\n {\n this._dirty = true;\n\n // check if a resource has been destroyed, if it has then we need to destroy this bind group\n // using this bind group with a destroyed resource will cause the renderer to explode :)\n if (resource.destroyed)\n {\n // free up the resource\n const resources = this.resources;\n\n for (const i in resources)\n {\n if (resources[i] === resource)\n {\n resources[i] = null;\n }\n }\n }\n else\n {\n this._updateKey();\n }\n }\n}\n","import { DOMAdapter } from '../../../../../environment/adapter';\n\nimport type { GlRenderingContext } from '../../context/GlRenderingContext';\n\nlet context: GlRenderingContext;\n\n/**\n * returns a little WebGL context to use for program inspection.\n * @static\n * @private\n * @returns {WebGLRenderingContext} a gl context to test with\n */\nexport function getTestContext(): GlRenderingContext\n{\n if (!context || context?.isContextLost())\n {\n const canvas = DOMAdapter.get().createCanvas();\n\n context = canvas.getContext('webgl', {}) as GlRenderingContext;\n }\n\n return context;\n}\n","import type { GlRenderingContext } from '../../../renderers/gl/context/GlRenderingContext';\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\nfunction generateIfTestSrc(maxIfs: number): string\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\nexport function checkMaxIfStatementsInShader(maxIfs: number, gl: GlRenderingContext): number\n{\n if (maxIfs === 0)\n {\n throw new Error('Invalid value of `0` passed to `checkMaxIfStatementsInShader`');\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 return maxIfs;\n}\n","import { getTestContext } from '../../../renderers/gl/shader/program/getTestContext';\nimport { checkMaxIfStatementsInShader } from './checkMaxIfStatementsInShader';\n\nlet maxTexturesPerBatchCache: number | null = null;\n\n/**\n * Returns the maximum number of textures that can be batched. This uses WebGL1's `MAX_TEXTURE_IMAGE_UNITS`.\n * The response for this is that to get this info via WebGPU, we would need to make a context, which\n * would make this function async, and we want to avoid that.\n * @private\n * @returns {number} The maximum number of textures that can be batched\n */\nexport function getMaxTexturesPerBatch(): number\n{\n if (maxTexturesPerBatchCache) return maxTexturesPerBatchCache;\n\n const gl = getTestContext();\n\n // step 1: first check max textures the GPU can handle.\n maxTexturesPerBatchCache = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\n\n // step 2: check the maximum number of if statements the shader can have too..\n maxTexturesPerBatchCache = checkMaxIfStatementsInShader(\n maxTexturesPerBatchCache, gl);\n\n return maxTexturesPerBatchCache;\n}\n","import { BindGroup } from '../../renderers/gpu/shader/BindGroup';\nimport { Texture } from '../../renderers/shared/texture/Texture';\nimport { getMaxTexturesPerBatch } from '../gl/utils/maxRecommendedTextures';\n\nimport type { TextureSource } from '../../renderers/shared/texture/sources/TextureSource';\n\nconst cachedGroups: Record = {};\n\nexport function getTextureBatchBindGroup(textures: TextureSource[], size: number)\n{\n let uid = 0;\n\n for (let i = 0; i < size; i++)\n {\n uid = ((uid * 31) + textures[i].uid) >>> 0;\n }\n\n return cachedGroups[uid] || generateTextureBatchBindGroup(textures, uid);\n}\n\nlet maxTextures = 0;\n\nfunction generateTextureBatchBindGroup(textures: TextureSource[], key: number): BindGroup\n{\n const bindGroupResources: Record = {};\n\n let bindIndex = 0;\n\n if (!maxTextures)maxTextures = getMaxTexturesPerBatch();\n\n for (let i = 0; i < maxTextures; i++)\n {\n const texture = i < textures.length ? textures[i] : Texture.EMPTY.source;\n\n bindGroupResources[bindIndex++] = texture.source;\n bindGroupResources[bindIndex++] = texture.style;\n }\n\n // pad out with empty textures\n const bindGroup = new BindGroup(bindGroupResources);\n\n cachedGroups[key] = bindGroup;\n\n return bindGroup;\n}\n\n","type TypedArray = Float32Array | Uint32Array | Int32Array | Uint8Array;\n\n/**\n * Flexible wrapper around `ArrayBuffer` that also provides typed array views on demand.\n * @memberof utils\n */\nexport class ViewableBuffer\n{\n /** The size of the buffer in bytes. */\n public size: number;\n\n /** Underlying `ArrayBuffer` that holds all the data and is of capacity `this.size`. */\n public rawBinaryData: ArrayBuffer;\n\n /** View on the raw binary data as a `Uint32Array`. */\n public uint32View: Uint32Array;\n\n /** View on the raw binary data as a `Float32Array`. */\n public float32View: Float32Array;\n public uint16View: Uint16Array;\n\n private _int8View: Int8Array;\n private _uint8View: Uint8Array;\n private _int16View: Int16Array;\n private _int32View: Int32Array;\n private _float64Array: Float64Array;\n private _bigUint64Array: BigUint64Array;\n\n /**\n * @param length - The size of the buffer in bytes.\n */\n constructor(length: number);\n\n /**\n * @param arrayBuffer - The source array buffer.\n */\n constructor(arrayBuffer: ArrayBuffer);\n\n constructor(sizeOrBuffer: number | ArrayBuffer | Uint8Array)\n {\n if (typeof sizeOrBuffer === 'number')\n {\n this.rawBinaryData = new ArrayBuffer(sizeOrBuffer);\n }\n else if (sizeOrBuffer instanceof Uint8Array)\n {\n this.rawBinaryData = sizeOrBuffer.buffer;\n }\n else\n {\n this.rawBinaryData = sizeOrBuffer;\n }\n\n this.uint32View = new Uint32Array(this.rawBinaryData);\n this.float32View = new Float32Array(this.rawBinaryData);\n\n this.size = this.rawBinaryData.byteLength;\n }\n\n /** View on the raw binary data as a `Int8Array`. */\n get int8View(): Int8Array\n {\n if (!this._int8View)\n {\n this._int8View = new Int8Array(this.rawBinaryData);\n }\n\n return this._int8View;\n }\n\n /** View on the raw binary data as a `Uint8Array`. */\n get uint8View(): Uint8Array\n {\n if (!this._uint8View)\n {\n this._uint8View = new Uint8Array(this.rawBinaryData);\n }\n\n return this._uint8View;\n }\n\n /** View on the raw binary data as a `Int16Array`. */\n get int16View(): Int16Array\n {\n if (!this._int16View)\n {\n this._int16View = new Int16Array(this.rawBinaryData);\n }\n\n return this._int16View;\n }\n\n /** View on the raw binary data as a `Int32Array`. */\n get int32View(): Int32Array\n {\n if (!this._int32View)\n {\n this._int32View = new Int32Array(this.rawBinaryData);\n }\n\n return this._int32View;\n }\n\n /** View on the raw binary data as a `Float64Array`. */\n get float64View(): Float64Array\n {\n if (!this._float64Array)\n {\n this._float64Array = new Float64Array(this.rawBinaryData);\n }\n\n return this._float64Array;\n }\n\n /** View on the raw binary data as a `BigUint64Array`. */\n get bigUint64View(): BigUint64Array\n {\n if (!this._bigUint64Array)\n {\n this._bigUint64Array = new BigUint64Array(this.rawBinaryData);\n }\n\n return this._bigUint64Array;\n }\n\n /**\n * Returns the view of the given type.\n * @param type - One of `int8`, `uint8`, `int16`,\n * `uint16`, `int32`, `uint32`, and `float32`.\n * @returns - typed array of given type\n */\n public view(type: string): TypedArray\n {\n return (this as any)[`${type}View`];\n }\n\n /** Destroys all buffer references. Do not use after calling this. */\n public destroy(): void\n {\n this.rawBinaryData = null;\n this._int8View = null;\n this._uint8View = null;\n this._int16View = null;\n this.uint16View = null;\n this._int32View = null;\n this.uint32View = null;\n this.float32View = null;\n }\n\n /**\n * Returns the size of the given type in bytes.\n * @param type - One of `int8`, `uint8`, `int16`,\n * `uint16`, `int32`, `uint32`, and `float32`.\n * @returns - size of the type in bytes\n */\n public static sizeOf(type: string): number\n {\n switch (type)\n {\n case 'int8':\n case 'uint8':\n return 1;\n case 'int16':\n case 'uint16':\n return 2;\n case 'int32':\n case 'uint32':\n case 'float32':\n return 4;\n default:\n throw new Error(`${type} isn't a valid view type`);\n }\n }\n}\n","/**\n * Copies from one buffer to another.\n * This is an optimised function that will use `Float64Array` window.\n * This means it can copy twice as fast!\n * @param sourceBuffer - the array buffer to copy from\n * @param destinationBuffer - the array buffer to copy to\n * @private\n */\nexport function fastCopy(sourceBuffer: ArrayBuffer, destinationBuffer: ArrayBuffer): void\n{\n const lengthDouble = (sourceBuffer.byteLength / 8) | 0;\n\n const sourceFloat64View = new Float64Array(sourceBuffer, 0, lengthDouble);\n const destinationFloat64View = new Float64Array(destinationBuffer, 0, lengthDouble);\n\n // Use set for faster copying\n destinationFloat64View.set(sourceFloat64View);\n\n // copying over the remaining bytes\n const remainingBytes = sourceBuffer.byteLength - (lengthDouble * 8);\n\n if (remainingBytes > 0)\n {\n const sourceUint8View = new Uint8Array(sourceBuffer, lengthDouble * 8, remainingBytes);\n const destinationUint8View = new Uint8Array(destinationBuffer, lengthDouble * 8, remainingBytes);\n\n // Direct copy for remaining bytes\n destinationUint8View.set(sourceUint8View);\n }\n}\n","/* eslint-disable @typescript-eslint/indent */\n/**\n * Various blend modes supported by Pixi\n * @memberof filters\n */\nexport type BLEND_MODES = 'inherit'\n| 'normal'\n| 'add'\n| 'multiply'\n| 'screen'\n| 'darken'\n| 'lighten'\n| 'erase'\n| 'color-dodge'\n| 'color-burn'\n| 'linear-burn'\n| 'linear-dodge'\n| 'linear-light'\n| 'hard-light'\n| 'soft-light'\n| 'pin-light'\n| 'difference'\n| 'exclusion'\n| 'overlay'\n// | 'hue'\n| 'saturation'\n| 'color'\n| 'luminosity'\n| 'normal-npm'\n| 'add-npm'\n| 'screen-npm'\n| 'none'\n| 'subtract'\n| 'divide'\n| 'vivid-light'\n| 'hard-mix'\n| 'negation';\n\n/**\n * The map of blend modes supported by Pixi\n * @memberof rendering\n */\nexport const BLEND_TO_NPM = {\n normal: 'normal-npm',\n add: 'add-npm',\n screen: 'screen-npm',\n};\n\n/**\n * The stencil operation to perform when using the stencil buffer\n * @memberof rendering\n */\nexport enum STENCIL_MODES\n{\n DISABLED = 0,\n RENDERING_MASK_ADD = 1,\n MASK_ACTIVE = 2,\n RENDERING_MASK_REMOVE = 3,\n NONE = 4,\n}\n\n/**\n * The culling mode to use. It can be either `none`, `front` or `back`.\n * @memberof rendering\n */\nexport type CULL_MODES = 'none' | 'back' | 'front';\n\n","import { type BLEND_MODES, BLEND_TO_NPM } from './const';\n\nimport type { TextureSource } from '../texture/sources/TextureSource';\n\n/**\n * Adjusts a blend mode for the current alpha mode. Returns the blend mode that works with that format.\n * eg 'normal' blend mode will return 'normal-npm' when rendering with premultiplied alpha.\n * and 'normal' if the texture is already premultiplied (the default)\n * @param blendMode - The blend mode to get the adjusted blend mode for.\n * @param textureSource - The texture to test the format of.\n * @returns - the blend mode that should be used to render this texture correctly based on its alphaMode\n */\nexport function getAdjustedBlendModeBlend(blendMode: BLEND_MODES, textureSource: TextureSource): BLEND_MODES\n{\n if (textureSource.alphaMode === 'no-premultiply-alpha')\n {\n return (BLEND_TO_NPM[blendMode as keyof typeof BLEND_TO_NPM] || blendMode) as BLEND_MODES;\n }\n\n return blendMode;\n}\n","import type { TextureSource } from '../../renderers/shared/texture/sources/TextureSource';\n\n/**\n * Used by the batcher to build texture batches. Holds list of textures and their respective locations.\n * @memberof rendering\n */\nexport class BatchTextureArray\n{\n /** Inside textures array. */\n public textures: TextureSource[];\n\n /** Respective locations for textures. */\n public ids: Record = Object.create(null);\n\n /** Number of filled elements. */\n public count: number;\n\n constructor()\n {\n this.textures = [];\n this.count = 0;\n }\n\n /** Clear the textures and their locations. */\n public clear(): void\n {\n for (let i = 0; i < this.count; i++)\n {\n const t = this.textures[i];\n\n this.textures[i] = null;\n this.ids[t.uid] = null;\n }\n\n this.count = 0;\n }\n}\n","import { uid } from '../../../utils/data/uid';\nimport { ViewableBuffer } from '../../../utils/data/ViewableBuffer';\nimport { fastCopy } from '../../renderers/shared/buffer/utils/fastCopy';\nimport { type BLEND_MODES } from '../../renderers/shared/state/const';\nimport { getAdjustedBlendModeBlend } from '../../renderers/shared/state/getAdjustedBlendModeBlend';\nimport { getMaxTexturesPerBatch } from '../gl/utils/maxRecommendedTextures';\nimport { BatchTextureArray } from './BatchTextureArray';\n\nimport type { BindGroup } from '../../renderers/gpu/shader/BindGroup';\nimport type { IndexBufferArray } from '../../renderers/shared/geometry/Geometry';\nimport type { Instruction } from '../../renderers/shared/instructions/Instruction';\nimport type { InstructionSet } from '../../renderers/shared/instructions/InstructionSet';\nimport type { Texture } from '../../renderers/shared/texture/Texture';\n\nexport type BatchAction = 'startBatch' | 'renderBatch';\n\n/**\n * A batch pool is used to store batches when they are not currently in use.\n * @memberof rendering\n */\nexport class Batch implements Instruction\n{\n public renderPipeId = 'batch';\n public action: BatchAction = 'startBatch';\n\n // TODO - eventually this could be useful for flagging batches as dirty and then only rebuilding those ones\n // public elementStart = 0;\n // public elementSize = 0;\n\n // for drawing..\n public start = 0;\n public size = 0;\n public textures: BatchTextureArray;\n\n public blendMode: BLEND_MODES = 'normal';\n\n public canBundle = true;\n\n /**\n * breaking rules slightly here in the name of performance..\n * storing references to these bindgroups here is just faster for access!\n * keeps a reference to the GPU bind group to set when rendering this batch for WebGPU. Will be null is using WebGL.\n */\n public gpuBindGroup: GPUBindGroup;\n /**\n * breaking rules slightly here in the name of performance..\n * storing references to these bindgroups here is just faster for access!\n * keeps a reference to the bind group to set when rendering this batch for WebGPU. Will be null if using WebGl.\n */\n public bindGroup: BindGroup;\n\n public batcher: Batcher;\n\n public destroy()\n {\n this.textures = null;\n this.gpuBindGroup = null;\n this.bindGroup = null;\n this.batcher = null;\n }\n}\n\nexport interface BatchableObject\n{\n indexStart: number;\n\n packAttributes: (\n float32View: Float32Array,\n uint32View: Uint32Array,\n index: number,\n textureId: number,\n ) => void;\n packIndex: (indexBuffer: IndexBufferArray, index: number, indicesOffset: number) => void;\n\n texture: Texture;\n blendMode: BLEND_MODES;\n vertexSize: number;\n indexSize: number;\n\n // stored for efficient updating..\n textureId: number;\n location: number; // location in the buffer\n batcher: Batcher;\n batch: Batch;\n\n roundPixels: 0 | 1;\n}\n\nlet BATCH_TICK = 0;\n\n/**\n * The options for the batcher.\n * @ignore\n */\nexport interface BatcherOptions\n{\n /** The size of the vertex buffer. */\n vertexSize?: number;\n /** The size of the index buffer. */\n indexSize?: number;\n}\n\n/**\n * A batcher is used to batch together objects with the same texture.\n * @ignore\n */\nexport class Batcher\n{\n public static defaultOptions: BatcherOptions = {\n vertexSize: 4,\n indexSize: 6,\n };\n\n public uid = uid('batcher');\n public attributeBuffer: ViewableBuffer;\n public indexBuffer: IndexBufferArray;\n\n public attributeSize: number;\n public indexSize: number;\n public elementSize: number;\n public elementStart: number;\n\n public dirty = true;\n\n public batchIndex = 0;\n public batches: Batch[] = [];\n\n // specifics.\n private readonly _vertexSize: number = 6;\n\n private _elements: BatchableObject[] = [];\n\n private readonly _batchPool: Batch[] = [];\n private _batchPoolIndex = 0;\n private readonly _textureBatchPool: BatchTextureArray[] = [];\n private _textureBatchPoolIndex = 0;\n private _batchIndexStart: number;\n private _batchIndexSize: number;\n private readonly _maxTextures: number;\n\n constructor(options: BatcherOptions = {})\n {\n options = { ...Batcher.defaultOptions, ...options };\n\n const { vertexSize, indexSize } = options;\n\n this.attributeBuffer = new ViewableBuffer(vertexSize * this._vertexSize * 4);\n\n this.indexBuffer = new Uint16Array(indexSize);\n\n this._maxTextures = getMaxTexturesPerBatch();\n }\n\n public begin()\n {\n this.batchIndex = 0;\n this.elementSize = 0;\n this.elementStart = 0;\n this.indexSize = 0;\n this.attributeSize = 0;\n this._batchPoolIndex = 0;\n this._textureBatchPoolIndex = 0;\n this._batchIndexStart = 0;\n this._batchIndexSize = 0;\n\n this.dirty = true;\n }\n\n public add(batchableObject: BatchableObject)\n {\n this._elements[this.elementSize++] = batchableObject;\n\n batchableObject.indexStart = this.indexSize;\n batchableObject.location = this.attributeSize;\n batchableObject.batcher = this;\n\n this.indexSize += batchableObject.indexSize;\n this.attributeSize += ((batchableObject.vertexSize) * this._vertexSize);\n }\n\n public checkAndUpdateTexture(batchableObject: BatchableObject, texture: Texture): boolean\n {\n const textureId = batchableObject.batch.textures.ids[texture._source.uid];\n\n // TODO could try to be a bit smarter if there are spare textures..\n // but need to figure out how to alter the bind groups too..\n if (!textureId && textureId !== 0) return false;\n\n batchableObject.textureId = textureId;\n batchableObject.texture = texture;\n\n return true;\n }\n\n public updateElement(batchableObject: BatchableObject)\n {\n this.dirty = true;\n\n batchableObject.packAttributes(\n this.attributeBuffer.float32View,\n this.attributeBuffer.uint32View,\n batchableObject.location, batchableObject.textureId);\n }\n\n /**\n * breaks the batcher. This happens when a batch gets too big,\n * or we need to switch to a different type of rendering (a filter for example)\n * @param instructionSet\n */\n public break(instructionSet: InstructionSet)\n {\n // ++BATCH_TICK;\n const elements = this._elements;\n\n let textureBatch = this._textureBatchPool[this._textureBatchPoolIndex++] || new BatchTextureArray();\n\n textureBatch.clear();\n\n // length 0??!! (we broke without ading anything)\n if (!elements[this.elementStart]) return;\n\n const firstElement = elements[this.elementStart];\n let blendMode = getAdjustedBlendModeBlend(firstElement.blendMode, firstElement.texture._source);\n\n if (this.attributeSize * 4 > this.attributeBuffer.size)\n {\n this._resizeAttributeBuffer(this.attributeSize * 4);\n }\n\n if (this.indexSize > this.indexBuffer.length)\n {\n this._resizeIndexBuffer(this.indexSize);\n }\n\n const f32 = this.attributeBuffer.float32View;\n const u32 = this.attributeBuffer.uint32View;\n const iBuffer = this.indexBuffer;\n\n let size = this._batchIndexSize;\n let start = this._batchIndexStart;\n\n let action: BatchAction = 'startBatch';\n let batch = this._batchPool[this._batchPoolIndex++] || new Batch();\n\n const maxTextures = this._maxTextures;\n\n for (let i = this.elementStart; i < this.elementSize; ++i)\n {\n const element = elements[i];\n\n elements[i] = null;\n\n const texture = element.texture;\n const source = texture._source;\n\n const adjustedBlendMode = getAdjustedBlendModeBlend(element.blendMode, source);\n\n const blendModeChange = blendMode !== adjustedBlendMode;\n\n if (source._batchTick === BATCH_TICK && !blendModeChange)\n {\n element.textureId = source._textureBindLocation;\n\n size += element.indexSize;\n element.packAttributes(f32, u32, element.location, element.textureId);\n element.packIndex(iBuffer, element.indexStart, element.location / this._vertexSize);\n\n element.batch = batch;\n\n continue;\n }\n\n source._batchTick = BATCH_TICK;\n\n if (textureBatch.count >= maxTextures || blendModeChange)\n {\n this._finishBatch(\n batch,\n start,\n size - start,\n textureBatch,\n blendMode,\n instructionSet,\n action\n );\n\n action = 'renderBatch';\n start = size;\n // create a batch...\n blendMode = adjustedBlendMode;\n\n textureBatch = this._textureBatchPool[this._textureBatchPoolIndex++] || new BatchTextureArray();\n textureBatch.clear();\n\n batch = this._batchPool[this._batchPoolIndex++] || new Batch();\n ++BATCH_TICK;\n }\n\n element.textureId = source._textureBindLocation = textureBatch.count;\n textureBatch.ids[source.uid] = textureBatch.count;\n textureBatch.textures[textureBatch.count++] = source;\n element.batch = batch;\n\n size += element.indexSize;\n element.packAttributes(f32, u32, element.location, element.textureId);\n element.packIndex(iBuffer, element.indexStart, element.location / this._vertexSize);\n }\n\n if (textureBatch.count > 0)\n {\n this._finishBatch(\n batch,\n start,\n size - start,\n textureBatch,\n blendMode,\n instructionSet,\n action\n );\n\n start = size;\n ++BATCH_TICK;\n }\n\n this.elementStart = this.elementSize;\n this._batchIndexStart = start;\n this._batchIndexSize = size;\n }\n\n private _finishBatch(\n batch: Batch,\n indexStart: number,\n indexSize: number,\n textureBatch: BatchTextureArray,\n blendMode: BLEND_MODES,\n instructionSet: InstructionSet,\n action: BatchAction\n )\n {\n batch.gpuBindGroup = null;\n batch.action = action;\n\n batch.batcher = this;\n batch.textures = textureBatch;\n batch.blendMode = blendMode;\n\n batch.start = indexStart;\n batch.size = indexSize;\n\n ++BATCH_TICK;\n\n instructionSet.add(batch);\n }\n\n public finish(instructionSet: InstructionSet)\n {\n this.break(instructionSet);\n }\n\n /**\n * Resizes the attribute buffer to the given size (1 = 1 float32)\n * @param size - the size in vertices to ensure (not bytes!)\n */\n public ensureAttributeBuffer(size: number)\n {\n if (size * 4 <= this.attributeBuffer.size) return;\n\n this._resizeAttributeBuffer(size * 4);\n }\n\n /**\n * Resizes the index buffer to the given size (1 = 1 float32)\n * @param size - the size in vertices to ensure (not bytes!)\n */\n public ensureIndexBuffer(size: number)\n {\n if (size <= this.indexBuffer.length) return;\n\n this._resizeIndexBuffer(size);\n }\n\n private _resizeAttributeBuffer(size: number)\n {\n const newSize = Math.max(size, this.attributeBuffer.size * 2);\n\n const newArrayBuffer = new ViewableBuffer(newSize);\n\n fastCopy(this.attributeBuffer.rawBinaryData, newArrayBuffer.rawBinaryData);\n\n this.attributeBuffer = newArrayBuffer;\n }\n\n private _resizeIndexBuffer(size: number)\n {\n const indexBuffer = this.indexBuffer;\n\n let newSize = Math.max(size, indexBuffer.length * 1.5);\n\n newSize += newSize % 2;\n\n // this, is technically not 100% accurate, as really we should\n // be checking the maximum value in the buffer. This approximation\n // does the trick though...\n\n // make sure buffer is always an even number..\n const newIndexBuffer = (newSize > 65535) ? new Uint32Array(newSize) : new Uint16Array(newSize);\n\n if (newIndexBuffer.BYTES_PER_ELEMENT !== indexBuffer.BYTES_PER_ELEMENT)\n {\n for (let i = 0; i < indexBuffer.length; i++)\n {\n newIndexBuffer[i] = indexBuffer[i];\n }\n }\n else\n {\n fastCopy(indexBuffer.buffer, newIndexBuffer.buffer);\n }\n\n this.indexBuffer = newIndexBuffer;\n }\n\n public destroy()\n {\n for (let i = 0; i < this.batches.length; i++)\n {\n this.batches[i].destroy();\n }\n\n this.batches = null;\n\n for (let i = 0; i < this._elements.length; i++)\n {\n this._elements[i].batch = null;\n }\n\n this._elements = null;\n\n this.indexBuffer = null;\n\n this.attributeBuffer.destroy();\n this.attributeBuffer = null;\n }\n}\n\n","import type { Matrix } from '../../../../../maths/matrix/Matrix';\n\n/**\n * Takes a vertices array and a matrix and transforms the vertices based on the matrix.\n * this out put is written to the uvs array\n * @param vertices - the vertices to calculate uvs from\n * @param verticesStride - the stride of the vertice\n * @param verticesOffset - the offset of the vertices\n * @param uvs - the uvs to fill\n * @param uvsOffset - the offset of the uvs\n * @param uvsStride - the stride of the uvs\n * @param size - the size of the vertices\n * @param matrix - the matrix to apply to the uvs\n * @memberof rendering\n */\nexport function buildUvs(\n vertices: number[],\n verticesStride: number,\n verticesOffset: number,\n\n uvs: number[],\n uvsOffset: number,\n uvsStride: number,\n\n size: number,\n matrix: Matrix = null\n): void\n{\n let index = 0;\n\n verticesOffset *= verticesStride;\n uvsOffset *= uvsStride;\n\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 while (index < size)\n {\n const x = vertices[verticesOffset];\n const y = vertices[verticesOffset + 1];\n\n uvs[uvsOffset] = (a * x) + (c * y) + tx;\n uvs[uvsOffset + 1] = (b * x) + (d * y) + ty;\n\n uvsOffset += uvsStride;\n\n verticesOffset += verticesStride;\n\n index++;\n }\n}\n\nexport function buildSimpleUvs(\n uvs: number[],\n uvsOffset: number,\n uvsStride: number,\n size: number,\n)\n{\n let index = 0;\n\n uvsOffset *= uvsStride;\n\n while (index < size)\n {\n uvs[uvsOffset] = 0;\n uvs[uvsOffset + 1] = 0;\n\n uvsOffset += uvsStride;\n\n index++;\n }\n}\n","import type { Matrix } from '../../../../../maths/matrix/Matrix';\n\n/**\n * Transforms the vertices in an array with the given matrix.\n * @param vertices - the vertices to transform\n * @param m - the matrix to apply to the vertices\n * @param offset - the offset of the vertices (defaults to 0)\n * @param stride - the stride of the vertices (defaults to 2)\n * @param size - the size of the vertices (defaults to vertices.length / stride - offset)\n * @memberof rendering\n */\nexport function transformVertices(vertices: number[], m: Matrix, offset?: number, stride?: number, size?: number)\n{\n const a = m.a;\n const b = m.b;\n const c = m.c;\n const d = m.d;\n const tx = m.tx;\n const ty = m.ty;\n\n offset = offset || 0;\n stride = stride || 2;\n size = size || (vertices.length / stride) - offset;\n\n let index = offset * stride;\n\n for (let i = 0; i < size; i++)\n {\n const x = vertices[index];\n const y = vertices[index + 1];\n\n vertices[index] = (a * x) + (c * y) + tx;\n vertices[index + 1] = (b * x) + (d * y) + ty;\n\n index += stride;\n }\n}\n","export function multiplyHexColors(color1: number, color2: number): number\n{\n if (color1 === 0xFFFFFF || !color2) return color2;\n if (color2 === 0xFFFFFF || !color1) return color1;\n\n const r1 = (color1 >> 16) & 0xFF;\n const g1 = (color1 >> 8) & 0xFF;\n const b1 = color1 & 0xFF;\n\n const r2 = (color2 >> 16) & 0xFF;\n const g2 = (color2 >> 8) & 0xFF;\n const b2 = color2 & 0xFF;\n\n const r = (r1 * r2) / 255;\n const g = (g1 * g2) / 255;\n const b = (b1 * b2) / 255;\n\n return (r << 16) + (g << 8) + b;\n}\n","import { multiplyHexColors } from '../../container/utils/multiplyHexColors';\n\nimport type { Batch, BatchableObject, Batcher } from '../../../rendering/batcher/shared/Batcher';\nimport type { IndexBufferArray } from '../../../rendering/renderers/shared/geometry/Geometry';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport type { Graphics } from './Graphics';\n\n/**\n * A batchable graphics object.\n * @ignore\n */\nexport class BatchableGraphics implements BatchableObject\n{\n public indexStart: number;\n public textureId: number;\n public texture: Texture;\n public location: number;\n public batcher: Batcher = null;\n public batch: Batch = null;\n public renderable: Graphics;\n public indexOffset: number;\n public indexSize: number;\n public vertexOffset: number;\n public vertexSize: number;\n public color: number;\n public alpha: number;\n public applyTransform = true;\n public roundPixels: 0 | 1 = 0;\n\n public geometryData: { vertices: number[]; uvs: number[]; indices: number[]; };\n\n get blendMode()\n {\n if (this.applyTransform)\n {\n return this.renderable.groupBlendMode;\n }\n\n return 'normal';\n }\n\n public packIndex(indexBuffer: IndexBufferArray, index: number, indicesOffset: number)\n {\n const indices = this.geometryData.indices;\n\n for (let i = 0; i < this.indexSize; i++)\n {\n indexBuffer[index++] = indices[i + this.indexOffset] + indicesOffset - this.vertexOffset;\n }\n }\n\n public packAttributes(\n float32View: Float32Array,\n uint32View: Uint32Array,\n index: number,\n textureId: number\n )\n {\n const geometry = this.geometryData;\n const graphics = this.renderable;\n\n const positions = geometry.vertices;\n const uvs = geometry.uvs;\n\n const offset = this.vertexOffset * 2;\n const vertSize = (this.vertexOffset + this.vertexSize) * 2;\n\n const rgb = this.color;\n const bgr = (rgb >> 16) | (rgb & 0xff00) | ((rgb & 0xff) << 16);\n\n if (this.applyTransform)\n {\n const argb = multiplyHexColors(bgr, graphics.groupColor)\n + ((this.alpha * graphics.groupAlpha * 255) << 24);\n\n const wt = graphics.groupTransform;\n const textureIdAndRound = (textureId << 16) | (this.roundPixels & 0xFFFF);\n\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 for (let i = offset; i < vertSize; i += 2)\n {\n const x = positions[i];\n const y = positions[i + 1];\n\n float32View[index] = (a * x) + (c * y) + tx;\n float32View[index + 1] = (b * x) + (d * y) + ty;\n\n float32View[index + 2] = uvs[i];\n float32View[index + 3] = uvs[i + 1];\n\n uint32View[index + 4] = argb;\n uint32View[index + 5] = textureIdAndRound;\n\n index += 6;\n }\n }\n else\n {\n const argb = bgr + ((this.alpha * 255) << 24);\n\n for (let i = offset; i < vertSize; i += 2)\n {\n float32View[index] = positions[i];\n float32View[index + 1] = positions[i + 1];\n\n float32View[index + 2] = uvs[i];\n float32View[index + 3] = uvs[i + 1];\n\n uint32View[index + 4] = argb;\n uint32View[index + 5] = textureId << 16;\n\n index += 6;\n }\n }\n }\n\n // TODO rename to vertexSize\n get vertSize()\n {\n return this.vertexSize;\n }\n\n public copyTo(gpuBuffer: BatchableGraphics)\n {\n gpuBuffer.indexOffset = this.indexOffset;\n gpuBuffer.indexSize = this.indexSize;\n\n gpuBuffer.vertexOffset = this.vertexOffset;\n gpuBuffer.vertexSize = this.vertexSize;\n\n gpuBuffer.color = this.color;\n gpuBuffer.alpha = this.alpha;\n\n gpuBuffer.texture = this.texture;\n gpuBuffer.geometryData = this.geometryData;\n }\n\n public reset()\n {\n this.applyTransform = true;\n }\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\n\nimport type { Circle } from '../../../../maths/shapes/Circle';\nimport type { Ellipse } from '../../../../maths/shapes/Ellipse';\nimport type { RoundedRectangle } from '../../../../maths/shapes/RoundedRectangle';\nimport type { ShapeBuildCommand } from './ShapeBuildCommand';\n\ntype RoundedShape = Circle | Ellipse | RoundedRectangle;\n\n/**\n * Builds a rectangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n * @ignore\n * @private\n */\nexport const buildCircle: ShapeBuildCommand = {\n extension: {\n type: ExtensionType.ShapeBuilder,\n name: 'circle',\n },\n\n build(shape: RoundedShape, points: number[])\n {\n let x;\n let y;\n let dx;\n let dy;\n\n let rx;\n let ry;\n\n if (shape.type === 'circle')\n {\n const circle = shape as Circle;\n\n x = circle.x;\n y = circle.y;\n rx = ry = circle.radius;\n dx = dy = 0;\n }\n\n else if (shape.type === 'ellipse')\n {\n const ellipse = shape as Ellipse;\n\n x = ellipse.x;\n y = ellipse.y;\n rx = ellipse.halfWidth;\n ry = ellipse.halfHeight;\n dx = dy = 0;\n }\n else\n {\n const roundedRect = shape as RoundedRectangle;\n const halfWidth = roundedRect.width / 2;\n const halfHeight = roundedRect.height / 2;\n\n x = roundedRect.x + halfWidth;\n y = roundedRect.y + halfHeight;\n rx = ry = Math.max(0, Math.min(roundedRect.radius, Math.min(halfWidth, halfHeight)));\n dx = halfWidth - rx;\n dy = halfHeight - ry;\n }\n\n if (!(rx >= 0 && ry >= 0 && dx >= 0 && dy >= 0))\n {\n return points;\n }\n\n // Choose a number of segments such that the maximum absolute deviation from the circle is approximately 0.029\n const n = Math.ceil(2.3 * Math.sqrt(rx + ry));\n const m = (n * 8) + (dx ? 4 : 0) + (dy ? 4 : 0);\n\n if (m === 0)\n {\n return points;\n }\n\n if (n === 0)\n {\n points[0] = points[6] = x + dx;\n points[1] = points[3] = y + dy;\n points[2] = points[4] = x - dx;\n points[5] = points[7] = y - dy;\n\n return points;\n }\n\n let j1 = 0;\n let j2 = (n * 4) + (dx ? 2 : 0) + 2;\n let j3 = j2;\n let j4 = m;\n\n let x0 = dx + rx;\n let y0 = dy;\n let x1 = x + x0;\n let x2 = x - x0;\n let y1 = y + y0;\n\n points[j1++] = x1;\n points[j1++] = y1;\n points[--j2] = y1;\n points[--j2] = x2;\n\n if (dy)\n {\n const y2 = y - y0;\n\n points[j3++] = x2;\n points[j3++] = y2;\n points[--j4] = y2;\n points[--j4] = x1;\n }\n\n for (let i = 1; i < n; i++)\n {\n const a = Math.PI / 2 * (i / n);\n const x0 = dx + (Math.cos(a) * rx);\n const y0 = dy + (Math.sin(a) * ry);\n const x1 = x + x0;\n const x2 = x - x0;\n const y1 = y + y0;\n const y2 = y - y0;\n\n points[j1++] = x1;\n points[j1++] = y1;\n points[--j2] = y1;\n points[--j2] = x2;\n points[j3++] = x2;\n points[j3++] = y2;\n points[--j4] = y2;\n points[--j4] = x1;\n }\n\n x0 = dx;\n y0 = dy + ry;\n x1 = x + x0;\n x2 = x - x0;\n y1 = y + y0;\n const y2 = y - y0;\n\n points[j1++] = x1;\n points[j1++] = y1;\n points[--j4] = y2;\n points[--j4] = x1;\n\n if (dx)\n {\n points[j1++] = x2;\n points[j1++] = y1;\n points[--j4] = y2;\n points[--j4] = x2;\n }\n\n return points;\n },\n\n triangulate(points, vertices, verticesStride, verticesOffset, indices, indicesOffset)\n {\n if (points.length === 0)\n {\n return;\n }\n\n // Compute center (average of all points)\n let centerX = 0; let\n centerY = 0;\n\n for (let i = 0; i < points.length; i += 2)\n {\n centerX += points[i];\n centerY += points[i + 1];\n }\n centerX /= (points.length / 2);\n centerY /= (points.length / 2);\n\n // Set center vertex\n let count = verticesOffset;\n\n vertices[count * verticesStride] = centerX;\n vertices[(count * verticesStride) + 1] = centerY;\n const centerIndex = count++;\n\n // Set edge vertices and indices\n for (let i = 0; i < points.length; i += 2)\n {\n vertices[count * verticesStride] = points[i];\n vertices[(count * verticesStride) + 1] = points[i + 1];\n\n if (i > 0)\n { // Skip first point for indices\n indices[indicesOffset++] = count;\n indices[indicesOffset++] = centerIndex;\n indices[indicesOffset++] = count - 1;\n }\n count++;\n }\n\n // Connect last point to the first edge point\n indices[indicesOffset++] = centerIndex + 1;\n indices[indicesOffset++] = centerIndex;\n indices[indicesOffset++] = count - 1;\n }\n\n};\n\nexport const buildEllipse = { ...buildCircle, extension: { ...buildCircle.extension, name: 'ellipse' } };\nexport const buildRoundedRectangle = { ...buildCircle, extension: { ...buildCircle.extension, name: 'roundedRectangle' } };\n","export type LineCap = 'butt' | 'round' | 'square';\nexport type LineJoin = 'round' | 'bevel' | 'miter';\n\nexport const closePointEps = 1e-4;\nexport const curveEps = 0.0001;\n","export function getOrientationOfPoints(points: number[]): number\n{\n const m = points.length;\n\n if (m < 6)\n {\n return 1;\n }\n\n let area = 0;\n\n for (let i = 0, x1 = points[m - 2], y1 = points[m - 1]; i < m; i += 2)\n {\n const x2 = points[i];\n const y2 = points[i + 1];\n\n area += (x2 - x1) * (y2 + y1);\n\n x1 = x2;\n y1 = y2;\n }\n\n if (area < 0)\n {\n return -1;\n }\n\n return 1;\n}\n","import { Point } from '../../../../maths/point/Point';\nimport { closePointEps, curveEps } from '../const';\nimport { getOrientationOfPoints } from '../utils/getOrientationOfPoints';\n\nimport type { StrokeAttributes } from '../FillTypes';\n\n/**\n * Buffers vertices to draw a square cap.\n *\n * Ignored from docs since it is not directly exposed.\n * @ignore\n * @private\n * @param {number} x - X-coord of end point\n * @param {number} y - Y-coord of end point\n * @param {number} nx - X-coord of line normal pointing inside\n * @param {number} ny - Y-coord of line normal pointing inside\n * @param {number} innerWeight - Weight of inner points\n * @param {number} outerWeight - Weight of outer points\n * @param {boolean} clockwise - Whether the cap is drawn clockwise\n * @param {Array} verts - vertex buffer\n * @returns {number} - no. of vertices pushed\n */\nfunction square(\n x: number,\n y: number,\n nx: number,\n ny: number,\n innerWeight: number,\n outerWeight: number,\n clockwise: boolean, /* rotation for square (true at left end, false at right end) */\n verts: Array\n): number\n{\n const ix = x - (nx * innerWeight);\n const iy = y - (ny * innerWeight);\n const ox = x + (nx * outerWeight);\n const oy = y + (ny * outerWeight);\n\n /* Rotate nx,ny for extension vector */\n let exx; let\n eyy;\n\n if (clockwise)\n {\n exx = ny;\n eyy = -nx;\n }\n else\n {\n exx = -ny;\n eyy = nx;\n }\n\n /* [i|0]x,y extended at cap */\n const eix = ix + exx;\n const eiy = iy + eyy;\n const eox = ox + exx;\n const eoy = oy + eyy;\n\n /* Square itself must be inserted clockwise*/\n verts.push(eix, eiy);\n verts.push(eox, eoy);\n\n return 2;\n}\n\n/**\n * Buffers vertices to draw an arc at the line joint or cap.\n *\n * Ignored from docs since it is not directly exposed.\n * @ignore\n * @private\n * @param {number} cx - X-coord of center\n * @param {number} cy - Y-coord of center\n * @param {number} sx - X-coord of arc start\n * @param {number} sy - Y-coord of arc start\n * @param {number} ex - X-coord of arc end\n * @param {number} ey - Y-coord of arc end\n * @param {Array[]} verts - buffer of vertices\n * @param {boolean} clockwise - orientation of vertices\n * @returns {number} - no. of vertices pushed\n */\nfunction round(\n cx: number,\n cy: number,\n sx: number,\n sy: number,\n ex: number,\n ey: number,\n verts: number[],\n clockwise: boolean, /* if not cap, then clockwise is turn of joint, otherwise rotation from angle0 to angle1 */\n): number\n{\n const cx2p0x = sx - cx;\n const cy2p0y = sy - cy;\n\n let angle0 = Math.atan2(cx2p0x, cy2p0y);\n let angle1 = Math.atan2(ex - cx, ey - cy);\n\n if (clockwise && angle0 < angle1)\n {\n angle0 += Math.PI * 2;\n }\n else if (!clockwise && angle0 > angle1)\n {\n angle1 += Math.PI * 2;\n }\n\n let startAngle = angle0;\n const angleDiff = angle1 - angle0;\n const absAngleDiff = Math.abs(angleDiff);\n\n const radius = Math.sqrt((cx2p0x * cx2p0x) + (cy2p0y * cy2p0y));\n const segCount = ((15 * absAngleDiff * Math.sqrt(radius) / Math.PI) >> 0) + 1;\n const angleInc = angleDiff / segCount;\n\n startAngle += angleInc;\n\n if (clockwise)\n {\n verts.push(cx, cy);\n verts.push(sx, sy);\n\n for (let i = 1, angle = startAngle; i < segCount; i++, angle += angleInc)\n {\n verts.push(cx, cy);\n verts.push(cx + ((Math.sin(angle) * radius)),\n cy + ((Math.cos(angle) * radius)));\n }\n\n verts.push(cx, cy);\n verts.push(ex, ey);\n }\n else\n {\n verts.push(sx, sy);\n verts.push(cx, cy);\n\n for (let i = 1, angle = startAngle; i < segCount; i++, angle += angleInc)\n {\n verts.push(cx + ((Math.sin(angle) * radius)),\n cy + ((Math.cos(angle) * radius)));\n verts.push(cx, cy);\n }\n\n verts.push(ex, ey);\n verts.push(cx, cy);\n }\n\n return segCount * 2;\n}\n\n/**\n * Builds a line to draw using the polygon method.\n * @param points\n * @param lineStyle\n * @param flipAlignment\n * @param closed\n * @param vertices\n * @param _verticesStride\n * @param _verticesOffset\n * @param indices\n * @param _indicesOffset\n */\nexport function buildLine(\n points: number[],\n lineStyle: StrokeAttributes,\n flipAlignment: boolean,\n closed: boolean,\n // alignment:number,\n\n vertices: number[],\n _verticesStride: number,\n _verticesOffset: number,\n\n indices: number[],\n _indicesOffset: number,\n\n): void\n{\n // const shape = graphicsData.shape as Polygon;\n // let points = graphicsData.points || shape.points.slice();\n const eps = closePointEps;\n\n if (points.length === 0)\n {\n return;\n }\n\n const style = lineStyle;\n\n let alignment = style.alignment;\n\n if (lineStyle.alignment !== 0.5)\n {\n // rotate the points!\n let orientation = getOrientationOfPoints(points);\n\n if (flipAlignment)orientation *= -1;\n\n alignment = ((alignment - 0.5) * orientation) + 0.5;\n }\n\n // get first and last point.. figure out the middle!\n const firstPoint = new Point(points[0], points[1]);\n const lastPoint = new Point(points[points.length - 2], points[points.length - 1]);\n const closedShape = closed;\n const closedPath = Math.abs(firstPoint.x - lastPoint.x) < eps\n && Math.abs(firstPoint.y - lastPoint.y) < eps;\n\n // if the first point is the last point - gonna have issues :)\n if (closedShape)\n {\n // need to clone as we are going to slightly modify the shape..\n points = points.slice();\n\n if (closedPath)\n {\n points.pop();\n points.pop();\n lastPoint.set(points[points.length - 2], points[points.length - 1]);\n }\n\n const midPointX = (firstPoint.x + lastPoint.x) * 0.5;\n const midPointY = (lastPoint.y + firstPoint.y) * 0.5;\n\n points.unshift(midPointX, midPointY);\n points.push(midPointX, midPointY);\n }\n\n const verts = vertices;\n\n const length = points.length / 2;\n let indexCount = points.length;\n const indexStart = verts.length / 2;\n\n // Max. inner and outer width\n const width = style.width / 2;\n const widthSquared = width * width;\n const miterLimitSquared = style.miterLimit * style.miterLimit;\n\n /* Line segments of interest where (x1,y1) forms the corner. */\n let x0 = points[0];\n let y0 = points[1];\n let x1 = points[2];\n let y1 = points[3];\n let x2 = 0;\n let y2 = 0;\n\n /* perp[?](x|y) = the line normal with magnitude lineWidth. */\n let perpX = -(y0 - y1);\n let perpY = x0 - x1;\n let perp1x = 0;\n let perp1y = 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 = alignment;// 0.5;\n const innerWeight = (1 - ratio) * 2;\n const outerWeight = ratio * 2;\n\n if (!closedShape)\n {\n if (style.cap === 'round')\n {\n indexCount += round(\n x0 - (perpX * (innerWeight - outerWeight) * 0.5),\n y0 - (perpY * (innerWeight - outerWeight) * 0.5),\n x0 - (perpX * innerWeight),\n y0 - (perpY * innerWeight),\n x0 + (perpX * outerWeight),\n y0 + (perpY * outerWeight),\n verts,\n true,\n ) + 2;\n }\n else if (style.cap === 'square')\n {\n indexCount += square(x0, y0, perpX, perpY, innerWeight, outerWeight, true, verts);\n }\n }\n\n // Push first point (below & above vertices)\n verts.push(\n x0 - (perpX * innerWeight),\n y0 - (perpY * innerWeight));\n verts.push(\n x0 + (perpX * outerWeight),\n y0 + (perpY * outerWeight));\n\n for (let i = 1; i < length - 1; ++i)\n {\n x0 = points[(i - 1) * 2];\n y0 = points[((i - 1) * 2) + 1];\n\n x1 = points[i * 2];\n y1 = points[(i * 2) + 1];\n\n x2 = points[(i + 1) * 2];\n y2 = points[((i + 1) * 2) + 1];\n\n perpX = -(y0 - y1);\n perpY = x0 - x1;\n\n dist = Math.sqrt((perpX * perpX) + (perpY * perpY));\n perpX /= dist;\n perpY /= dist;\n perpX *= width;\n perpY *= width;\n\n perp1x = -(y1 - y2);\n perp1y = x1 - x2;\n\n dist = Math.sqrt((perp1x * perp1x) + (perp1y * perp1y));\n perp1x /= dist;\n perp1y /= dist;\n perp1x *= width;\n perp1y *= width;\n\n /* d[x|y](0|1) = the component displacement between points p(0,1|1,2) */\n const dx0 = x1 - x0;\n const dy0 = y0 - y1;\n const dx1 = x1 - x2;\n const dy1 = y2 - y1;\n\n /* +ve if internal angle < 90 degree, -ve if internal angle > 90 degree. */\n const dot = (dx0 * dx1) + (dy0 * dy1);\n /* +ve if internal angle counterclockwise, -ve if internal angle clockwise. */\n const cross = (dy0 * dx1) - (dy1 * dx0);\n const clockwise = (cross < 0);\n\n /* Going nearly parallel? */\n /* atan(0.001) ~= 0.001 rad ~= 0.057 degree */\n if (Math.abs(cross) < 0.001 * Math.abs(dot))\n {\n verts.push(\n x1 - (perpX * innerWeight),\n y1 - (perpY * innerWeight));\n verts.push(\n x1 + (perpX * outerWeight),\n y1 + (perpY * outerWeight));\n\n /* 180 degree corner? */\n if (dot >= 0)\n {\n if (style.join === 'round')\n {\n indexCount += round(\n x1, y1,\n x1 - (perpX * innerWeight), y1 - (perpY * innerWeight),\n x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight),\n verts, false) + 4;\n }\n else\n {\n indexCount += 2;\n }\n\n verts.push(\n x1 - (perp1x * outerWeight),\n y1 - (perp1y * outerWeight));\n verts.push(\n x1 + (perp1x * innerWeight),\n y1 + (perp1y * innerWeight));\n }\n\n continue;\n }\n\n /* p[x|y] is the miter point. pDist is the distance between miter point and p1. */\n const c1 = ((-perpX + x0) * (-perpY + y1)) - ((-perpX + x1) * (-perpY + y0));\n const c2 = ((-perp1x + x2) * (-perp1y + y1)) - ((-perp1x + x1) * (-perp1y + y2));\n const px = ((dx0 * c2) - (dx1 * c1)) / cross;\n const py = ((dy1 * c1) - (dy0 * c2)) / cross;\n const pDist = ((px - x1) * (px - x1)) + ((py - y1) * (py - y1));\n\n /* Inner miter point */\n const imx = x1 + ((px - x1) * innerWeight);\n const imy = y1 + ((py - y1) * innerWeight);\n /* Outer miter point */\n const omx = x1 - ((px - x1) * outerWeight);\n const omy = y1 - ((py - y1) * outerWeight);\n\n /* Is the inside miter point too far away, creating a spike? */\n const smallerInsideSegmentSq = Math.min((dx0 * dx0) + (dy0 * dy0), (dx1 * dx1) + (dy1 * dy1));\n const insideWeight = clockwise ? innerWeight : outerWeight;\n const smallerInsideDiagonalSq = smallerInsideSegmentSq + (insideWeight * insideWeight * widthSquared);\n const insideMiterOk = pDist <= smallerInsideDiagonalSq;\n\n if (insideMiterOk)\n {\n if (style.join === 'bevel' || pDist / widthSquared > miterLimitSquared)\n {\n if (clockwise) /* rotating at inner angle */\n {\n verts.push(imx, imy); // inner miter point\n verts.push(x1 + (perpX * outerWeight), y1 + (perpY * outerWeight)); // first segment's outer vertex\n verts.push(imx, imy); // inner miter point\n verts.push(x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight)); // second segment's outer vertex\n }\n else /* rotating at outer angle */\n {\n verts.push(x1 - (perpX * innerWeight), y1 - (perpY * innerWeight)); // first segment's inner vertex\n verts.push(omx, omy); // outer miter point\n verts.push(x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight)); // second segment's outer vertex\n verts.push(omx, omy); // outer miter point\n }\n\n indexCount += 2;\n }\n else if (style.join === 'round')\n {\n if (clockwise) /* arc is outside */\n {\n verts.push(imx, imy);\n verts.push(x1 + (perpX * outerWeight), y1 + (perpY * outerWeight));\n\n indexCount += round(\n x1, y1,\n x1 + (perpX * outerWeight), y1 + (perpY * outerWeight),\n x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight),\n verts, true\n ) + 4;\n\n verts.push(imx, imy);\n verts.push(x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight));\n }\n else /* arc is inside */\n {\n verts.push(x1 - (perpX * innerWeight), y1 - (perpY * innerWeight));\n verts.push(omx, omy);\n\n indexCount += round(\n x1, y1,\n x1 - (perpX * innerWeight), y1 - (perpY * innerWeight),\n x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight),\n verts, false\n ) + 4;\n\n verts.push(x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight));\n verts.push(omx, omy);\n }\n }\n else\n {\n verts.push(imx, imy);\n verts.push(omx, omy);\n }\n }\n else // inside miter is NOT ok\n {\n verts.push(x1 - (perpX * innerWeight), y1 - (perpY * innerWeight)); // first segment's inner vertex\n verts.push(x1 + (perpX * outerWeight), y1 + (perpY * outerWeight)); // first segment's outer vertex\n if (style.join === 'round')\n {\n if (clockwise) /* arc is outside */\n {\n indexCount += round(\n x1, y1,\n x1 + (perpX * outerWeight), y1 + (perpY * outerWeight),\n x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight),\n verts, true\n ) + 2;\n }\n else /* arc is inside */\n {\n indexCount += round(\n x1, y1,\n x1 - (perpX * innerWeight), y1 - (perpY * innerWeight),\n x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight),\n verts, false\n ) + 2;\n }\n }\n else if (style.join === 'miter' && pDist / widthSquared <= miterLimitSquared)\n {\n if (clockwise)\n {\n verts.push(omx, omy); // inner miter point\n verts.push(omx, omy); // inner miter point\n }\n else\n {\n verts.push(imx, imy); // outer miter point\n verts.push(imx, imy); // outer miter point\n }\n indexCount += 2;\n }\n verts.push(x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight)); // second segment's inner vertex\n verts.push(x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight)); // second segment's outer vertex\n indexCount += 2;\n }\n }\n\n x0 = points[(length - 2) * 2];\n y0 = points[((length - 2) * 2) + 1];\n\n x1 = points[(length - 1) * 2];\n y1 = points[((length - 1) * 2) + 1];\n\n perpX = -(y0 - y1);\n perpY = x0 - x1;\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(x1 - (perpX * innerWeight), y1 - (perpY * innerWeight));\n verts.push(x1 + (perpX * outerWeight), y1 + (perpY * outerWeight));\n\n if (!closedShape)\n {\n if (style.cap === 'round')\n {\n indexCount += round(\n x1 - (perpX * (innerWeight - outerWeight) * 0.5),\n y1 - (perpY * (innerWeight - outerWeight) * 0.5),\n x1 - (perpX * innerWeight),\n y1 - (perpY * innerWeight),\n x1 + (perpX * outerWeight),\n y1 + (perpY * outerWeight),\n verts,\n false\n ) + 2;\n }\n else if (style.cap === 'square')\n {\n indexCount += square(x1, y1, perpX, perpY, innerWeight, outerWeight, false, verts);\n }\n }\n\n // const indices = graphicsGeometry.indices;\n const eps2 = curveEps * curveEps;\n\n // indices.push(indexStart);\n for (let i = indexStart; i < indexCount + indexStart - 2; ++i)\n {\n x0 = verts[(i * 2)];\n y0 = verts[(i * 2) + 1];\n\n x1 = verts[(i + 1) * 2];\n y1 = verts[((i + 1) * 2) + 1];\n\n x2 = verts[(i + 2) * 2];\n y2 = verts[((i + 2) * 2) + 1];\n\n /* Skip zero area triangles */\n if (Math.abs((x0 * (y1 - y2)) + (x1 * (y2 - y0)) + (x2 * (y0 - y1))) < eps2)\n {\n continue;\n }\n\n indices.push(i, i + 1, i + 2);\n }\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 ? 32767 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);\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 | 0);\n triangles.push(ear.i / dim | 0);\n triangles.push(next.i / dim | 0);\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(filterPoints(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 ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n // triangle bbox; min & max are calculated like this for speed\n var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),\n y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),\n x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),\n y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);\n\n var p = c.next;\n while (p !== a) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 &&\n pointInTriangle(ax, ay, bx, by, cx, cy, 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 var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n // triangle bbox; min & max are calculated like this for speed\n var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),\n y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),\n x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),\n y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);\n\n // z-order range for the current triangle bbox;\n var minZ = zOrder(x0, y0, minX, minY, invSize),\n maxZ = zOrder(x1, y1, 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.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && 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.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && 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.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && 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 | 0);\n triangles.push(p.i / dim | 0);\n triangles.push(b.i / dim | 0);\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 filterPoints(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, 0);\n earcutLinked(c, triangles, dim, minX, minY, invSize, 0);\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 outerNode = eliminateHole(queue[i], outerNode);\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 var bridge = findHoleBridge(hole, outerNode);\n if (!bridge) {\n return outerNode;\n }\n\n var bridgeReverse = splitPolygon(bridge, hole);\n\n // filter collinear points around the cuts\n filterPoints(bridgeReverse, bridgeReverse.next);\n return filterPoints(bridge, bridge.next);\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 m = p.x < p.next.x ? p : p.next;\n if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\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;\n\n do {\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 (locallyInside(p, hole) &&\n (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n } while (p !== stop);\n\n return m;\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector(m, p) {\n return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\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 === 0) 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 = (x - minX) * invSize | 0;\n y = (y - minY) * invSize | 0;\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 || (p.x === leftmost.x && p.y < leftmost.y)) 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) &&\n (ax - px) * (by - py) >= (bx - px) * (ay - py) &&\n (bx - px) * (cy - py) >= (cx - px) * (by - py);\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) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\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 var o1 = sign(area(p1, q1, p2));\n var o2 = sign(area(p1, q1, q2));\n var o3 = sign(area(p2, q2, p1));\n var o4 = sign(area(p2, q2, q1));\n\n if (o1 !== o2 && o3 !== o4) return true; // general case\n\n if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n return false;\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\n\nfunction sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 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 = 0;\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","import { default as earcut } from 'earcut';\n\nexport function triangulateWithHoles(\n points: number[],\n holes: number[],\n vertices: number[],\n verticesStride: number,\n verticesOffset: number,\n\n indices: number[],\n indicesOffset: number\n)\n{\n const triangles = earcut(points, holes, 2);\n\n if (!triangles)\n {\n return;\n }\n\n for (let i = 0; i < triangles.length; i += 3)\n {\n indices[indicesOffset++] = (triangles[i] + verticesOffset);\n indices[indicesOffset++] = (triangles[i + 1] + verticesOffset);\n indices[indicesOffset++] = (triangles[i + 2] + verticesOffset);\n }\n\n let index = verticesOffset * verticesStride;\n\n for (let i = 0; i < points.length; i += 2)\n {\n vertices[index] = points[i];\n vertices[index + 1] = points[i + 1];\n\n index += verticesStride;\n }\n}\n\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { triangulateWithHoles } from '../utils/triangulateWithHoles';\n\nimport type { Polygon } from '../../../../maths/shapes/Polygon';\nimport type { ShapeBuildCommand } from './ShapeBuildCommand';\n\nconst emptyArray: number[] = [];\n\n/**\n * Builds a rectangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n * @ignore\n * @private\n */\nexport const buildPolygon: ShapeBuildCommand = {\n extension: {\n type: ExtensionType.ShapeBuilder,\n name: 'polygon',\n },\n\n build(shape: Polygon, points: number[]): number[]\n {\n for (let i = 0; i < shape.points.length; i++)\n {\n points[i] = shape.points[i];\n }\n\n return points;\n },\n\n triangulate(\n points: number[],\n // holes: number[],\n vertices: number[],\n verticesStride: number,\n verticesOffset: number,\n\n indices: number[],\n indicesOffset: number\n )\n {\n triangulateWithHoles(points, emptyArray, vertices, verticesStride, verticesOffset, indices, indicesOffset);\n },\n\n};\n","import { ExtensionType } from '../../../../extensions/Extensions';\n\nimport type { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport type { ShapeBuildCommand } from './ShapeBuildCommand';\n\n/**\n * Builds a rectangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n * @ignore\n * @private\n */\nexport const buildRectangle: ShapeBuildCommand = {\n extension: {\n type: ExtensionType.ShapeBuilder,\n name: 'rectangle',\n },\n\n build(shape: Rectangle, points: number[]): number[]\n {\n const rectData = shape;\n const x = rectData.x;\n const y = rectData.y;\n const width = rectData.width;\n const height = rectData.height;\n\n if (!(width >= 0 && height >= 0))\n {\n return points;\n }\n\n points[0] = x;\n points[1] = y;\n points[2] = x + width;\n points[3] = y;\n points[4] = x + width;\n points[5] = y + height;\n points[6] = x;\n points[7] = y + height;\n\n return points;\n },\n\n triangulate(\n points: number[],\n\n vertices: number[],\n verticesStride: number,\n verticesOffset: number,\n\n indices: number[],\n indicesOffset: number\n )\n {\n let count = 0;\n\n verticesOffset *= verticesStride;\n\n vertices[verticesOffset + count] = points[0];\n vertices[verticesOffset + count + 1] = points[1];\n\n count += verticesStride;\n\n vertices[verticesOffset + count] = points[2];\n vertices[verticesOffset + count + 1] = points[3];\n\n count += verticesStride;\n\n vertices[verticesOffset + count] = points[6];\n vertices[verticesOffset + count + 1] = points[7];\n\n count += verticesStride;\n\n vertices[verticesOffset + count] = points[4];\n vertices[verticesOffset + count + 1] = points[5];\n\n count += verticesStride;\n\n const verticesIndex = verticesOffset / verticesStride;\n\n // triangle 1\n indices[indicesOffset++] = verticesIndex;\n indices[indicesOffset++] = verticesIndex + 1;\n indices[indicesOffset++] = verticesIndex + 2;\n\n // triangle 2\n indices[indicesOffset++] = verticesIndex + 1;\n indices[indicesOffset++] = verticesIndex + 3;\n indices[indicesOffset++] = verticesIndex + 2;\n },\n};\n","import { ExtensionType } from '../../../../extensions/Extensions';\n\nimport type { Triangle } from '../../../../maths/shapes/Triangle';\nimport type { ShapeBuildCommand } from './ShapeBuildCommand';\n\n/**\n * Builds a triangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n * @ignore\n * @private\n */\nexport const buildTriangle: ShapeBuildCommand = {\n extension: {\n type: ExtensionType.ShapeBuilder,\n name: 'triangle',\n },\n\n build(shape: Triangle, points: number[]): number[]\n {\n points[0] = shape.x;\n points[1] = shape.y;\n points[2] = shape.x2;\n points[3] = shape.y2;\n points[4] = shape.x3;\n points[5] = shape.y3;\n\n return points;\n },\n\n triangulate(\n points: number[],\n\n vertices: number[],\n verticesStride: number,\n verticesOffset: number,\n\n indices: number[],\n indicesOffset: number\n )\n {\n let count = 0;\n\n verticesOffset *= verticesStride;\n\n vertices[verticesOffset + count] = points[0];\n vertices[verticesOffset + count + 1] = points[1];\n\n count += verticesStride;\n\n vertices[verticesOffset + count] = points[2];\n vertices[verticesOffset + count + 1] = points[3];\n\n count += verticesStride;\n\n vertices[verticesOffset + count] = points[4];\n vertices[verticesOffset + count + 1] = points[5];\n\n const verticesIndex = verticesOffset / verticesStride;\n\n // triangle 1\n indices[indicesOffset++] = verticesIndex;\n indices[indicesOffset++] = verticesIndex + 1;\n indices[indicesOffset++] = verticesIndex + 2;\n },\n};\n","import { extensions, ExtensionType } from '../../../../extensions/Extensions';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { buildSimpleUvs, buildUvs } from '../../../../rendering/renderers/shared/geometry/utils/buildUvs';\nimport { transformVertices } from '../../../../rendering/renderers/shared/geometry/utils/transformVertices';\nimport { Texture } from '../../../../rendering/renderers/shared/texture/Texture';\nimport { BigPool } from '../../../../utils/pool/PoolGroup';\nimport { BatchableGraphics } from '../BatchableGraphics';\nimport { buildCircle, buildEllipse, buildRoundedRectangle } from '../buildCommands/buildCircle';\nimport { buildLine } from '../buildCommands/buildLine';\nimport { buildPolygon } from '../buildCommands/buildPolygon';\nimport { buildRectangle } from '../buildCommands/buildRectangle';\nimport { buildTriangle } from '../buildCommands/buildTriangle';\nimport { triangulateWithHoles } from './triangulateWithHoles';\n\nimport type { Polygon } from '../../../../maths/shapes/Polygon';\nimport type { ShapeBuildCommand } from '../buildCommands/ShapeBuildCommand';\nimport type { ConvertedFillStyle, ConvertedStrokeStyle } from '../FillTypes';\nimport type { GraphicsContext, TextureInstruction } from '../GraphicsContext';\nimport type { GpuGraphicsContext } from '../GraphicsContextSystem';\nimport type { GraphicsPath } from '../path/GraphicsPath';\nimport type { ShapePath } from '../path/ShapePath';\n\nexport const shapeBuilders: Record = {};\n\nextensions.handleByMap(ExtensionType.ShapeBuilder, shapeBuilders);\nextensions.add(buildRectangle, buildPolygon, buildTriangle, buildCircle, buildEllipse, buildRoundedRectangle);\n\nconst tempRect = new Rectangle();\n\nexport function buildContextBatches(context: GraphicsContext, gpuContext: GpuGraphicsContext)\n{\n const { geometryData, batches } = gpuContext;\n\n // reset them..\n batches.length = 0;\n geometryData.indices.length = 0;\n geometryData.vertices.length = 0;\n geometryData.uvs.length = 0;\n\n for (let i = 0; i < context.instructions.length; i++)\n {\n const instruction = context.instructions[i];\n\n if (instruction.action === 'texture')\n {\n // add a quad!\n addTextureToGeometryData(instruction.data, batches, geometryData);\n }\n else if (instruction.action === 'fill' || instruction.action === 'stroke')\n {\n const isStroke = instruction.action === 'stroke';\n\n // build path collection of polys and shapes points..\n const shapePath = instruction.data.path.shapePath;\n\n const style = instruction.data.style;\n\n const hole = instruction.data.hole;\n\n if (isStroke && hole)\n {\n addShapePathToGeometryData(hole.shapePath, style, null, true, batches, geometryData);\n }\n\n addShapePathToGeometryData(shapePath, style, hole, isStroke, batches, geometryData);\n }\n }\n}\n\nfunction addTextureToGeometryData(\n data: TextureInstruction['data'],\n batches: BatchableGraphics[],\n geometryData: {\n vertices: number[];\n uvs: number[];\n indices: number[];\n }\n)\n{\n const { vertices, uvs, indices } = geometryData;\n\n const indexOffset = indices.length;\n const vertOffset = vertices.length / 2;\n\n const points: number[] = [];\n\n const build = shapeBuilders.rectangle;\n\n const rect = tempRect;\n\n const texture = data.image;\n\n rect.x = data.dx;\n rect.y = data.dy;\n rect.width = data.dw;\n rect.height = data.dh;\n\n const matrix = data.transform;\n\n // TODO - this can be cached...\n build.build(rect, points);\n\n if (matrix)\n {\n transformVertices(points, matrix);\n }\n\n build.triangulate(points, vertices, 2, vertOffset, indices, indexOffset);\n\n const textureUvs = texture.uvs;\n\n uvs.push(\n textureUvs.x0, textureUvs.y0,\n textureUvs.x1, textureUvs.y1,\n textureUvs.x3, textureUvs.y3,\n textureUvs.x2, textureUvs.y2,\n );\n\n const graphicsBatch = BigPool.get(BatchableGraphics);\n\n graphicsBatch.indexOffset = indexOffset;\n graphicsBatch.indexSize = indices.length - indexOffset;\n\n graphicsBatch.vertexOffset = vertOffset;\n graphicsBatch.vertexSize = (vertices.length / 2) - vertOffset;\n\n graphicsBatch.color = data.style;\n graphicsBatch.alpha = data.alpha;\n\n graphicsBatch.texture = texture;\n graphicsBatch.geometryData = geometryData;\n\n batches.push(graphicsBatch);\n}\n\nfunction addShapePathToGeometryData(\n shapePath: ShapePath,\n style: ConvertedFillStyle | ConvertedStrokeStyle,\n hole: GraphicsPath,\n isStroke: boolean,\n batches: BatchableGraphics[],\n geometryData: {\n vertices: number[];\n uvs: number[];\n indices: number[];\n }\n)\n{\n const { vertices, uvs, indices } = geometryData;\n const lastIndex = shapePath.shapePrimitives.length - 1;\n\n shapePath.shapePrimitives.forEach(({ shape, transform: matrix }, i) =>\n {\n const indexOffset = indices.length;\n const vertOffset = vertices.length / 2;\n\n const points: number[] = [];\n\n const build = shapeBuilders[shape.type];\n\n // TODO - this can be cached...\n // TODO - THIS IS DONE TWICE!!!!!!\n // ONCE FOR STROKE AND ONCE FOR FILL\n // move to the ShapePath2D class itself?\n build.build(shape, points);\n\n if (matrix)\n {\n transformVertices(points, matrix);\n }\n\n if (!isStroke)\n {\n if (hole && lastIndex === i)\n {\n if (lastIndex !== 0)\n {\n console.warn('[Pixi Graphics] only the last shape have be cut out');\n }\n\n const holeIndices: number[] = [];\n\n const otherPoints = points.slice();\n\n const holeArrays = getHoleArrays(hole.shapePath);\n\n holeArrays.forEach((holePoints) =>\n {\n holeIndices.push(otherPoints.length / 2);\n otherPoints.push(...holePoints);\n });\n\n triangulateWithHoles(otherPoints, holeIndices, vertices, 2, vertOffset, indices, indexOffset);\n }\n else\n {\n build.triangulate(points, vertices, 2, vertOffset, indices, indexOffset);\n }\n }\n else\n {\n const close = (shape as Polygon).closePath ?? true;\n const lineStyle = style as ConvertedStrokeStyle;\n\n buildLine(points, lineStyle, false, close, vertices, 2, vertOffset, indices, indexOffset);\n }\n\n const uvsOffset = uvs.length / 2;\n\n const texture = style.texture;\n\n if (texture !== Texture.WHITE)\n {\n const textureMatrix = style.matrix;\n\n if (textureMatrix)\n {\n // todo can prolly do this before calculating uvs..\n if (matrix)\n {\n textureMatrix.append(matrix.clone().invert());\n }\n\n buildUvs(vertices, 2, vertOffset, uvs, uvsOffset, 2, (vertices.length / 2) - vertOffset, textureMatrix);\n }\n }\n else\n {\n buildSimpleUvs(uvs, uvsOffset, 2, (vertices.length / 2) - vertOffset);\n }\n\n const graphicsBatch = BigPool.get(BatchableGraphics);\n\n graphicsBatch.indexOffset = indexOffset;\n graphicsBatch.indexSize = indices.length - indexOffset;\n\n graphicsBatch.vertexOffset = vertOffset;\n graphicsBatch.vertexSize = (vertices.length / 2) - vertOffset;\n\n graphicsBatch.color = style.color as number;\n graphicsBatch.alpha = style.alpha;\n\n graphicsBatch.texture = texture;\n graphicsBatch.geometryData = geometryData;\n\n batches.push(graphicsBatch);\n });\n}\n\nfunction getHoleArrays(shape: ShapePath)\n{\n if (!shape) return [];\n\n const holePrimitives = shape.shapePrimitives;\n\n const holeArrays = [];\n\n for (let k = 0; k < holePrimitives.length; k++)\n {\n const holePrimitive = holePrimitives[k].shape;\n\n // TODO - need to transform the points via there transform here..\n const holePoints: number[] = [];\n\n const holeBuilder = shapeBuilders[holePrimitive.type] as ShapeBuildCommand;\n\n holeBuilder.build(holePrimitive, holePoints);\n\n holeArrays.push(holePoints);\n }\n\n return holeArrays;\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { BatchGeometry } from '../../../rendering/batcher/gpu/BatchGeometry';\nimport { getTextureBatchBindGroup } from '../../../rendering/batcher/gpu/getTextureBatchBindGroup';\nimport { Batcher } from '../../../rendering/batcher/shared/Batcher';\nimport { InstructionSet } from '../../../rendering/renderers/shared/instructions/InstructionSet';\nimport { BigPool } from '../../../utils/pool/PoolGroup';\nimport { buildContextBatches } from './utils/buildContextBatches';\n\nimport type { System } from '../../../rendering/renderers/shared/system/System';\nimport type { PoolItem } from '../../../utils/pool/Pool';\nimport type { BatchableGraphics } from './BatchableGraphics';\nimport type { GraphicsContext } from './GraphicsContext';\n\ninterface GeometryData\n{\n vertices: number[];\n uvs: number[];\n indices: number[];\n}\n\n/**\n * A class that holds batchable graphics data for a GraphicsContext.\n * @memberof rendering\n * @ignore\n */\nexport class GpuGraphicsContext\n{\n public isBatchable: boolean;\n public context: GraphicsContext;\n public batches: BatchableGraphics[] = [];\n public geometryData: GeometryData = {\n vertices: [],\n uvs: [],\n indices: [],\n };\n public graphicsData: GraphicsContextRenderData;\n}\n\n/**\n * A class that holds the render data for a GraphicsContext.\n * @memberof rendering\n * @ignore\n */\nexport class GraphicsContextRenderData\n{\n public geometry = new BatchGeometry();\n public instructions = new InstructionSet();\n\n public init()\n {\n this.instructions.reset();\n }\n}\n\n/**\n * Options for the GraphicsContextSystem.\n * @memberof rendering\n */\nexport interface GraphicsContextSystemOptions\n{\n /** A value from 0 to 1 that controls the smoothness of bezier curves (the higher the smoother) */\n bezierSmoothness?: number;\n}\n\n/**\n * A system that manages the rendering of GraphicsContexts.\n * @memberof rendering\n */\nexport class GraphicsContextSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'graphicsContext'\n } as const;\n\n /** The default options for the GraphicsContextSystem. */\n public static readonly defaultOptions: GraphicsContextSystemOptions = {\n /**\n * A value from 0 to 1 that controls the smoothness of bezier curves (the higher the smoother)\n * @default 0.5\n */\n bezierSmoothness: 0.5,\n };\n\n // the root context batches, used to either make a batch or geometry\n // all graphics use this as a base\n private readonly _activeBatchers: Batcher[] = [];\n private _gpuContextHash: Record = {};\n // used for non-batchable graphics\n private _graphicsDataContextHash: Record = Object.create(null);\n\n /**\n * Runner init called, update the default options\n * @ignore\n */\n public init(options?: GraphicsContextSystemOptions)\n {\n GraphicsContextSystem.defaultOptions.bezierSmoothness = options?.bezierSmoothness\n ?? GraphicsContextSystem.defaultOptions.bezierSmoothness;\n }\n\n protected prerender()\n {\n this._returnActiveBatchers();\n }\n\n public getContextRenderData(context: GraphicsContext): GraphicsContextRenderData\n {\n return this._graphicsDataContextHash[context.uid] || this._initContextRenderData(context);\n }\n\n // Context management functions\n public updateGpuContext(context: GraphicsContext)\n {\n let gpuContext: GpuGraphicsContext = this._gpuContextHash[context.uid]\n\n || this._initContext(context);\n\n if (context.dirty)\n {\n if (gpuContext)\n {\n this._cleanGraphicsContextData(context);\n }\n else\n {\n gpuContext = this._initContext(context);\n }\n\n buildContextBatches(context, gpuContext);\n\n const batchMode = context.batchMode;\n\n if (context.customShader || batchMode === 'no-batch')\n {\n gpuContext.isBatchable = false;\n }\n else if (batchMode === 'auto')\n {\n gpuContext.isBatchable = (gpuContext.geometryData.vertices.length < 400);\n }\n\n context.dirty = false;\n }\n\n return gpuContext;\n }\n\n public getGpuContext(context: GraphicsContext): GpuGraphicsContext\n {\n return this._gpuContextHash[context.uid] || this._initContext(context);\n }\n\n private _returnActiveBatchers()\n {\n for (let i = 0; i < this._activeBatchers.length; i++)\n {\n BigPool.return(this._activeBatchers[i] as PoolItem);\n }\n\n this._activeBatchers.length = 0;\n }\n\n private _initContextRenderData(context: GraphicsContext): GraphicsContextRenderData\n {\n const graphicsData: GraphicsContextRenderData = BigPool.get(GraphicsContextRenderData);// ();\n\n const { batches, geometryData } = this._gpuContextHash[context.uid];\n\n const vertexSize = geometryData.vertices.length;\n const indexSize = geometryData.indices.length;\n\n for (let i = 0; i < batches.length; i++)\n {\n batches[i].applyTransform = false;\n }\n\n const batcher = BigPool.get(Batcher);\n\n this._activeBatchers.push(batcher);\n\n batcher.ensureAttributeBuffer(vertexSize);\n batcher.ensureIndexBuffer(indexSize);\n\n batcher.begin();\n\n for (let i = 0; i < batches.length; i++)\n {\n const batch = batches[i];\n\n batcher.add(batch);\n }\n\n batcher.finish(graphicsData.instructions);\n\n const geometry = graphicsData.geometry;\n\n // not to self - this works as we are assigning the batchers array buffer\n // once its up loaded - this buffer is then put back in the pool to be reused.\n // this mean we don't have to creating new Batchers for each graphics items\n geometry.indexBuffer.setDataWithSize(batcher.indexBuffer, batcher.indexSize, true);\n geometry.buffers[0].setDataWithSize(batcher.attributeBuffer.float32View, batcher.attributeSize, true);\n\n const drawBatches = batcher.batches;\n\n for (let i = 0; i < drawBatches.length; i++)\n {\n const batch = drawBatches[i];\n\n batch.bindGroup = getTextureBatchBindGroup(batch.textures.textures, batch.textures.count);\n }\n\n this._graphicsDataContextHash[context.uid] = graphicsData;\n\n return graphicsData;\n }\n\n private _initContext(context: GraphicsContext): GpuGraphicsContext\n {\n const gpuContext = new GpuGraphicsContext();\n\n gpuContext.context = context;\n\n this._gpuContextHash[context.uid] = gpuContext;\n\n context.on('destroy', this.onGraphicsContextDestroy, this);\n\n return this._gpuContextHash[context.uid];\n }\n\n protected onGraphicsContextDestroy(context: GraphicsContext)\n {\n this._cleanGraphicsContextData(context);\n\n context.off('destroy', this.onGraphicsContextDestroy, this);\n\n this._gpuContextHash[context.uid] = null;\n }\n\n private _cleanGraphicsContextData(context: GraphicsContext)\n {\n const gpuContext: GpuGraphicsContext = this._gpuContextHash[context.uid];\n\n if (!gpuContext.isBatchable)\n {\n if (this._graphicsDataContextHash[context.uid])\n {\n BigPool.return(this.getContextRenderData(context) as PoolItem);\n\n // we will rebuild this...\n this._graphicsDataContextHash[context.uid] = null;\n }\n }\n\n if (gpuContext.batches)\n {\n gpuContext.batches.forEach((batch) =>\n {\n BigPool.return(batch as PoolItem);\n });\n }\n }\n\n public destroy()\n {\n // Clean up all graphics contexts\n\n for (const i in this._gpuContextHash)\n {\n if (this._gpuContextHash[i])\n {\n this.onGraphicsContextDestroy(this._gpuContextHash[i].context);\n }\n }\n }\n}\n","/* eslint-disable max-len */\nimport type { BLEND_MODES, CULL_MODES } from './const';\n\nconst blendModeIds = {\n normal: 0,\n add: 1,\n multiply: 2,\n screen: 3,\n overlay: 4,\n erase: 5,\n 'normal-npm': 6,\n 'add-npm': 7,\n 'screen-npm': 8,\n};\nconst BLEND = 0;\nconst OFFSET = 1;\nconst CULLING = 2;\nconst DEPTH_TEST = 3;\nconst WINDING = 4;\nconst DEPTH_MASK = 5;\n\n/**\n * This is a WebGL state, and is is passed to {@link StateSystem}.\n *\n * Each mesh rendered may require WebGL to be in a different state.\n * For example you may want different blend mode or to enable polygon offsets\n * @memberof rendering\n */\nexport class State\n{\n /**\n * The data is a unique number based on the states settings.\n * This lets us quickly compare states with a single number rather than looking\n * at all the individual settings.\n */\n public data: number;\n public _blendModeId: number;\n private _blendMode: BLEND_MODES;\n private _polygonOffset: number;\n\n constructor()\n {\n this.data = 0;\n\n this.blendMode = 'normal';\n this.polygonOffset = 0;\n\n this.blend = true;\n this.depthMask = true;\n }\n\n /**\n * Activates blending of the computed fragment color values.\n * @default true\n */\n get blend(): boolean\n {\n return !!(this.data & (1 << BLEND));\n }\n\n set blend(value: boolean)\n {\n if (!!(this.data & (1 << BLEND)) !== value)\n {\n this.data ^= (1 << BLEND);\n }\n }\n\n /**\n * Activates adding an offset to depth values of polygon's fragments\n * @default false\n */\n get offsets(): boolean\n {\n return !!(this.data & (1 << OFFSET));\n }\n\n set offsets(value: boolean)\n {\n if (!!(this.data & (1 << OFFSET)) !== value)\n {\n this.data ^= (1 << OFFSET);\n }\n }\n\n /** The culling settings for this state none - No culling back - Back face culling front - Front face culling */\n set cullMode(value: CULL_MODES)\n {\n if (value === 'none')\n {\n this.culling = false;\n\n return;\n }\n\n this.culling = true;\n this.clockwiseFrontFace = value === 'front';\n }\n\n get cullMode(): CULL_MODES\n {\n if (!this.culling)\n {\n return 'none';\n }\n\n return this.clockwiseFrontFace ? 'front' : 'back';\n }\n\n /**\n * Activates culling of polygons.\n * @default false\n */\n get culling(): boolean\n {\n return !!(this.data & (1 << CULLING));\n }\n\n set culling(value: boolean)\n {\n if (!!(this.data & (1 << CULLING)) !== value)\n {\n this.data ^= (1 << CULLING);\n }\n }\n\n /**\n * Activates depth comparisons and updates to the depth buffer.\n * @default false\n */\n get depthTest(): boolean\n {\n return !!(this.data & (1 << DEPTH_TEST));\n }\n\n set depthTest(value: boolean)\n {\n if (!!(this.data & (1 << DEPTH_TEST)) !== value)\n {\n this.data ^= (1 << DEPTH_TEST);\n }\n }\n\n /**\n * Enables or disables writing to the depth buffer.\n * @default true\n */\n get depthMask(): boolean\n {\n return !!(this.data & (1 << DEPTH_MASK));\n }\n\n set depthMask(value: boolean)\n {\n if (!!(this.data & (1 << DEPTH_MASK)) !== value)\n {\n this.data ^= (1 << DEPTH_MASK);\n }\n }\n\n /**\n * Specifies whether or not front or back-facing polygons can be culled.\n * @default false\n */\n get clockwiseFrontFace(): boolean\n {\n return !!(this.data & (1 << WINDING));\n }\n\n set clockwiseFrontFace(value: boolean)\n {\n if (!!(this.data & (1 << WINDING)) !== value)\n {\n this.data ^= (1 << WINDING);\n }\n }\n\n /**\n * The blend mode to be applied when this state is set. Apply a value of `normal` to reset the blend mode.\n * Setting this mode to anything other than NO_BLEND will automatically switch blending on.\n * @default 'normal'\n */\n get blendMode(): BLEND_MODES\n {\n return this._blendMode;\n }\n\n set blendMode(value: BLEND_MODES)\n {\n this.blend = (value !== 'none');\n this._blendMode = value;\n this._blendModeId = blendModeIds[value as keyof typeof blendModeIds] || 0;\n }\n\n /**\n * The polygon offset. Setting this property to anything other than 0 will automatically enable polygon offset fill.\n * @default 0\n */\n get polygonOffset(): number\n {\n return this._polygonOffset;\n }\n\n set polygonOffset(value: number)\n {\n this.offsets = !!value;\n this._polygonOffset = value;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/core:State `\n + `blendMode=${this.blendMode} `\n + `clockwiseFrontFace=${this.clockwiseFrontFace} `\n + `culling=${this.culling} `\n + `depthMask=${this.depthMask} `\n + `polygonOffset=${this.polygonOffset}`\n + `]`;\n }\n // #endif\n\n /**\n * A quickly getting an instance of a State that is configured for 2d rendering.\n * @returns a new State with values set for 2d rendering\n */\n public static for2d(): State\n {\n const state = new State();\n\n state.depthTest = false;\n state.blend = true;\n\n return state;\n }\n\n public static default2d = State.for2d();\n}\n\n","export function colorToUniform(rgb: number, alpha: number, out: Float32Array, offset: number)\n{\n // TODO replace with Color..\n out[offset++] = ((rgb >> 16) & 0xFF) / 255;\n out[offset++] = ((rgb >> 8) & 0xFF) / 255;\n out[offset++] = (rgb & 0xFF) / 255;\n out[offset++] = alpha;\n}\n\nexport function color32BitToUniform(abgr: number, out: Float32Array, offset: number)\n{\n const alpha = ((abgr >> 24) & 0xFF) / 255;\n\n out[offset++] = ((abgr & 0xFF) / 255) * alpha;\n out[offset++] = (((abgr >> 8) & 0xFF) / 255) * alpha;\n out[offset++] = (((abgr >> 16) & 0xFF) / 255) * alpha;\n out[offset++] = alpha;\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { State } from '../../../rendering/renderers/shared/state/State';\nimport { BigPool } from '../../../utils/pool/PoolGroup';\nimport { color32BitToUniform } from '../gpu/colorToUniform';\nimport { BatchableGraphics } from './BatchableGraphics';\n\nimport type { InstructionSet } from '../../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { BatchPipe, RenderPipe } from '../../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Shader } from '../../../rendering/renderers/shared/shader/Shader';\nimport type { PoolItem } from '../../../utils/pool/Pool';\nimport type { Graphics } from './Graphics';\nimport type { GpuGraphicsContext, GraphicsContextSystem } from './GraphicsContextSystem';\n\nexport interface GraphicsAdaptor\n{\n shader: Shader;\n init(): void;\n execute(graphicsPipe: GraphicsPipe, renderable: Graphics): void;\n destroy(): void;\n}\nexport interface GraphicsSystem\n{\n graphicsContext: GraphicsContextSystem;\n renderPipes: {\n batch: BatchPipe\n }\n _roundPixels: 0 | 1;\n}\n\nexport class GraphicsPipe implements RenderPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'graphics',\n } as const;\n\n public renderer: GraphicsSystem;\n public state: State = State.for2d();\n\n // batchable graphics list, used to render batches\n private _graphicsBatchesHash: Record = Object.create(null);\n private _adaptor: GraphicsAdaptor;\n\n constructor(renderer: GraphicsSystem, adaptor: GraphicsAdaptor)\n {\n this.renderer = renderer;\n\n this._adaptor = adaptor;\n this._adaptor.init();\n }\n\n public validateRenderable(graphics: Graphics): boolean\n {\n // assume context is dirty..\n\n const context = graphics.context;\n\n const wasBatched = !!this._graphicsBatchesHash[graphics.uid];\n\n const gpuContext = this.renderer.graphicsContext.updateGpuContext(context);\n\n if (gpuContext.isBatchable || wasBatched !== gpuContext.isBatchable)\n {\n // TODO what if they are the same size??\n return true;\n }\n\n return false;\n }\n\n public addRenderable(graphics: Graphics, instructionSet: InstructionSet)\n {\n const gpuContext = this.renderer.graphicsContext.updateGpuContext(graphics.context);\n\n // need to get batches here.. as we need to know if we can batch or not..\n // this also overrides the current batches..\n\n if (graphics._didGraphicsUpdate)\n {\n graphics._didGraphicsUpdate = false;\n\n this._rebuild(graphics);\n }\n\n if (gpuContext.isBatchable)\n {\n this._addToBatcher(graphics, instructionSet);\n }\n else\n {\n this.renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add(graphics);\n }\n }\n\n public updateRenderable(graphics: Graphics)\n {\n const batches = this._graphicsBatchesHash[graphics.uid];\n\n if (batches)\n {\n for (let i = 0; i < batches.length; i++)\n {\n const batch = batches[i];\n\n batch.batcher.updateElement(batch);\n }\n }\n }\n\n public destroyRenderable(graphics: Graphics)\n {\n if (this._graphicsBatchesHash[graphics.uid])\n {\n this._removeBatchForRenderable(graphics.uid);\n }\n }\n\n public execute(graphics: Graphics)\n {\n if (!graphics.isRenderable) return;\n\n const renderer = this.renderer;\n const context = graphics.context;\n const contextSystem = renderer.graphicsContext;\n\n // early out if there is no actual visual stuff...\n if (!contextSystem.getGpuContext(context).batches.length)\n { return; }\n\n const shader = context.customShader || this._adaptor.shader;\n\n this.state.blendMode = graphics.groupBlendMode;\n\n const localUniforms = shader.resources.localUniforms.uniforms;\n\n localUniforms.uTransformMatrix = graphics.groupTransform;\n localUniforms.uRound = renderer._roundPixels | graphics._roundPixels;\n\n color32BitToUniform(\n graphics.groupColorAlpha,\n localUniforms.uColor,\n 0,\n );\n\n this._adaptor.execute(this, graphics);\n }\n\n private _rebuild(graphics: Graphics)\n {\n const wasBatched = !!this._graphicsBatchesHash[graphics.uid];\n\n const gpuContext = this.renderer.graphicsContext.updateGpuContext(graphics.context);\n\n // TODO POOL the old batches!\n\n if (wasBatched)\n {\n this._removeBatchForRenderable(graphics.uid);\n }\n\n if (gpuContext.isBatchable)\n {\n this._initBatchesForRenderable(graphics);\n }\n\n graphics.batched = gpuContext.isBatchable;\n }\n\n private _addToBatcher(graphics: Graphics, instructionSet: InstructionSet)\n {\n const batchPipe = this.renderer.renderPipes.batch;\n\n const batches = this._getBatchesForRenderable(graphics);\n\n for (let i = 0; i < batches.length; i++)\n {\n const batch = batches[i];\n\n batchPipe.addToBatch(batch, instructionSet);\n }\n }\n\n private _getBatchesForRenderable(graphics: Graphics): BatchableGraphics[]\n {\n return this._graphicsBatchesHash[graphics.uid] || this._initBatchesForRenderable(graphics);\n }\n\n private _initBatchesForRenderable(graphics: Graphics): BatchableGraphics[]\n {\n const context = graphics.context;\n\n const gpuContext: GpuGraphicsContext = this.renderer.graphicsContext.getGpuContext(context);\n\n const roundPixels = (this.renderer._roundPixels | graphics._roundPixels) as 0 | 1;\n\n const batches = gpuContext.batches.map((batch) =>\n {\n // TODO pool this!!\n const batchClone = BigPool.get(BatchableGraphics);\n\n batch.copyTo(batchClone);\n\n batchClone.renderable = graphics;\n\n batchClone.roundPixels = roundPixels;\n\n return batchClone;\n });\n\n if (this._graphicsBatchesHash[graphics.uid] === undefined)\n {\n // TODO perhaps manage this outside this pipe? (a bit like how we update / add)\n graphics.on('destroyed', () =>\n {\n this.destroyRenderable(graphics);\n });\n }\n\n this._graphicsBatchesHash[graphics.uid] = batches;\n\n return batches;\n }\n\n private _removeBatchForRenderable(graphicsUid: number)\n {\n this._graphicsBatchesHash[graphicsUid].forEach((batch) =>\n {\n BigPool.return(batch as PoolItem);\n });\n\n this._graphicsBatchesHash[graphicsUid] = null;\n }\n\n public destroy()\n {\n this.renderer = null;\n\n this._adaptor.destroy();\n this._adaptor = null;\n this.state = null;\n\n for (const i in this._graphicsBatchesHash)\n {\n this._removeBatchForRenderable(i as unknown as number);\n }\n\n this._graphicsBatchesHash = null;\n }\n}\n","import { extensions } from '../../extensions/Extensions';\nimport { GraphicsContextSystem } from './shared/GraphicsContextSystem';\nimport { GraphicsPipe } from './shared/GraphicsPipe';\n\nextensions.add(GraphicsPipe);\nextensions.add(GraphicsContextSystem);\n","const idCounts: Record = Object.create(null);\nconst idHash: Record = Object.create(null);\n\nexport function createIdFromString(value: string, groupId: string): number\n{\n let id = idHash[value];\n\n if (id === undefined)\n {\n if (idCounts[groupId] === undefined)\n {\n idCounts[groupId] = 1;\n }\n\n idHash[value] = id = idCounts[groupId]++;\n }\n\n return id;\n}\n","// TODO add more types as required\nexport const UNIFORM_TYPES_VALUES = [\n 'f32',\n 'i32',\n 'vec2',\n 'vec3',\n 'vec4',\n 'mat2x2',\n 'mat3x3',\n 'mat4x4',\n 'mat3x2',\n 'mat4x2',\n 'mat2x3',\n 'mat4x3',\n 'mat2x4',\n 'mat3x4'\n] as const;\n\n/** useful for checking if a type is supported - a map of supported types with a true value. */\nexport const UNIFORM_TYPES_MAP = UNIFORM_TYPES_VALUES.reduce((acc, type) =>\n{\n acc[type] = true;\n\n return acc;\n}, {} as Record);\n\nexport type UNIFORM_TYPES_SINGLE = typeof UNIFORM_TYPES_VALUES[number];\n\ntype OPTIONAL_SPACE = ' ' | '';\n\nexport type UNIFORM_TYPES_ARRAY = `array<${UNIFORM_TYPES_SINGLE},${OPTIONAL_SPACE}${number}>`;\n\nexport type UNIFORM_TYPES = UNIFORM_TYPES_SINGLE | UNIFORM_TYPES_ARRAY;\n\nexport interface UniformData\n{\n /** the value of the uniform, this could be any object - a parser will figure out how to write it to the buffer */\n value: unknown;\n type: UNIFORM_TYPES;\n /** the size of the variable (eg 2 for vec2, 3 for vec3, 4 for vec4) */\n size?: number;\n name?: string;\n}\n\nexport interface UboElement\n{\n data: UniformData;\n offset: number;\n size: number;\n}\n\nexport interface UboLayout\n{\n uboElements: UboElement[];\n /** float32 size // TODO change to bytes */\n size: number;\n}\n\n/* eslint-disable quote-props */\nexport type UniformsSyncCallback = (...args: any[]) => void;\n","/**\n * @method defaultValue\n * @param {string} type - Type of value\n * @param {number} size\n * @private\n */\nexport function getDefaultUniformValue(\n type: string,\n size: number\n): number | Float32Array | Int32Array | Uint32Array | boolean | boolean[]\n{\n switch (type)\n {\n case 'f32':\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 case 'mat2x2':\n return new Float32Array([1, 0,\n 0, 1]);\n\n case 'mat3x3':\n return new Float32Array([1, 0, 0,\n 0, 1, 0,\n 0, 0, 1]);\n\n case 'mat4x4':\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 return null;\n}\n","import { uid } from '../../../../utils/data/uid';\nimport { createIdFromString } from '../utils/createIdFromString';\nimport { UNIFORM_TYPES_MAP, UNIFORM_TYPES_VALUES, type UniformData } from './types';\nimport { getDefaultUniformValue } from './utils/getDefaultUniformValue';\n\nimport type { BindResource } from '../../gpu/shader/BindResource';\nimport type { Buffer } from '../buffer/Buffer';\n\ntype FLOPS = T extends { value: infer V } ? V : never;\n\n// TODO replace..T['value']\ntype ExtractUniformObject> = {\n [K in keyof T]: FLOPS;\n};\n\n/**\n * Uniform group options\n * @memberof rendering\n */\nexport type UniformGroupOptions = {\n /**\n * if true the UniformGroup is handled as an Uniform buffer object.\n * This is the only way WebGPU can work with uniforms. WebGL2 can also use this.\n * So don't set to true if you want to use WebGPU :D\n */\n ubo?: boolean;\n /** if true, then you are responsible for when the data is uploaded to the GPU by calling `update()` */\n isStatic?: boolean;\n};\n\n/**\n * Uniform group holds uniform map and some ID's for work\n *\n * `UniformGroup` has two modes:\n *\n * 1: Normal mode\n * Normal mode will upload the uniforms with individual function calls as required. This is the default mode\n * for WebGL rendering.\n *\n * 2: Uniform buffer mode\n * This mode will treat the uniforms as a uniform buffer. You can pass in either a buffer that you manually handle, or\n * or a generic object that PixiJS will automatically map to a buffer for you.\n * For maximum benefits, make Ubo UniformGroups static, and only update them each frame.\n * This is the only way uniforms can be used with WebGPU.\n *\n * Rules of UBOs:\n * - UBOs only work with WebGL2, so make sure you have a fallback!\n * - Only floats are supported (including vec[2,3,4], mat[2,3,4])\n * - Samplers cannot be used in ubo's (a GPU limitation)\n * - You must ensure that the object you pass in exactly matches in the shader ubo structure.\n * Otherwise, weirdness will ensue!\n * - The name of the ubo object added to the group must match exactly the name of the ubo in the shader.\n *\n * When declaring your uniform options, you ust parse in the value and the type of the uniform.\n * The types correspond to the WebGPU types {@link UNIFORM_TYPES}\n *\n Uniforms can be modified via the classes 'uniforms' property. It will contain all the uniforms declared in the constructor.\n *\n * ```glsl\n * // UBO in shader:\n * uniform myCoolData { // Declaring a UBO...\n * mat4 uCoolMatrix;\n * float uFloatyMcFloatFace;\n * };\n * ```\n *\n * ```js\n * // A new Uniform Buffer Object...\n * const myCoolData = new UniformGroup({\n * uCoolMatrix: {value:new Matrix(), type: 'mat4'},\n * uFloatyMcFloatFace: {value:23, type: 'f32'},\n * }}\n *\n * // modify the data\n * myCoolData.uniforms.uFloatyMcFloatFace = 42;\n * // Build a shader...\n * const shader = Shader.from(srcVert, srcFrag, {\n * myCoolData // Name matches the UBO name in the shader. Will be processed accordingly.\n * })\n *\n *\n * ```\n * @memberof rendering\n */\nexport class UniformGroup implements BindResource\n{\n /** The default options used by the uniform group. */\n public static defaultOptions: UniformGroupOptions = {\n /** if true the UniformGroup is handled as an Uniform buffer object. */\n ubo: false,\n /** if true, then you are responsible for when the data is uploaded to the GPU by calling `update()` */\n isStatic: false,\n };\n\n /** used internally to know if a uniform group was used in the last render pass */\n public _touched = 0;\n\n /** a unique id for this uniform group used through the renderer */\n public readonly uid = uid('uniform');\n /** a resource type, used to identify how to handle it when its in a bind group / shader resource */\n public _resourceType = 'uniformGroup';\n /** the resource id used internally by the renderer to build bind group keys */\n public _resourceId = uid('resource');\n /** the structures of the uniform group */\n public uniformStructures: UNIFORMS;\n /** the uniforms as an easily accessible map of properties */\n public uniforms: ExtractUniformObject;\n /** true if it should be used as a uniform buffer object */\n public ubo: boolean;\n /** an underlying buffer that will be uploaded to the GPU when using this UniformGroup */\n public buffer?: Buffer;\n /**\n * if true, then you are responsible for when the data is uploaded to the GPU.\n * otherwise, the data is reuploaded each frame.\n */\n public isStatic: boolean;\n /** used ito identify if this is a uniform group */\n public readonly isUniformGroup = true;\n /**\n * used to flag if this Uniform groups data is different from what it has stored in its buffer / on the GPU\n * @internal\n * @ignore\n */\n public _dirtyId = 0;\n /**\n * a signature string generated for internal use\n * @internal\n * @ignore\n */\n public readonly _signature: number;\n\n // implementing the interface - UniformGroup are not destroyed\n public readonly destroyed = false;\n\n /**\n * Create a new Uniform group\n * @param uniformStructures - The structures of the uniform group\n * @param options - The optional parameters of this uniform group\n */\n constructor(uniformStructures: UNIFORMS, options?: UniformGroupOptions)\n {\n options = { ...UniformGroup.defaultOptions, ...options };\n\n this.uniformStructures = uniformStructures;\n\n const uniforms = {} as ExtractUniformObject;\n\n for (const i in uniformStructures)\n {\n const uniformData = uniformStructures[i] as UniformData;\n\n uniformData.name = i;\n uniformData.size = uniformData.size ?? 1;\n\n if (!UNIFORM_TYPES_MAP[uniformData.type])\n {\n // eslint-disable-next-line max-len\n throw new Error(`Uniform type ${uniformData.type} is not supported. Supported uniform types are: ${UNIFORM_TYPES_VALUES.join(', ')}`);\n }\n\n uniformData.value ??= getDefaultUniformValue(uniformData.type, uniformData.size);\n\n uniforms[i] = uniformData.value as ExtractUniformObject[keyof UNIFORMS];\n }\n\n this.uniforms = uniforms;\n\n this._dirtyId = 1;\n this.ubo = options.ubo;\n this.isStatic = options.isStatic;\n\n this._signature = createIdFromString(Object.keys(uniforms).map(\n (i) => `${i}-${(uniformStructures[i as keyof typeof uniformStructures] as UniformData).type}`\n ).join('-'), 'uniform-group');\n }\n\n /** Call this if you want the uniform groups data to be uploaded to the GPU only useful if `isStatic` is true. */\n public update(): void\n {\n this._dirtyId++;\n // dispatch...\n }\n}\n","import type { Batch, BatchableObject, Batcher } from '../../../rendering/batcher/shared/Batcher';\nimport type { IndexBufferArray } from '../../../rendering/renderers/shared/geometry/Geometry';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport type { Container } from '../../container/Container';\nimport type { MeshGeometry } from './MeshGeometry';\n\n/**\n * A batchable mesh object.\n * @ignore\n */\nexport class BatchableMesh implements BatchableObject\n{\n public indexStart: number;\n public textureId: number;\n public texture: Texture;\n public location: number;\n public batcher: Batcher = null;\n public batch: Batch = null;\n public mesh: Container;\n public geometry: MeshGeometry;\n\n public roundPixels: 0 | 1 = 0;\n\n private _transformedUvs: Float32Array;\n private _uvUpdateId: number = -1;\n private _textureMatrixUpdateId: number = -1;\n\n get blendMode() { return this.mesh.groupBlendMode; }\n\n public reset()\n {\n this.mesh = null;\n this.texture = null;\n this.batcher = null;\n this.batch = null;\n }\n\n public packIndex(indexBuffer: IndexBufferArray, index: number, indicesOffset: number)\n {\n const indices = this.geometry.indices;\n\n for (let i = 0; i < indices.length; i++)\n {\n indexBuffer[index++] = indices[i] + indicesOffset;\n }\n }\n\n public packAttributes(\n float32View: Float32Array,\n uint32View: Uint32Array,\n index: number,\n textureId: number\n )\n {\n const mesh = this.mesh;\n\n const geometry = this.geometry;\n const wt = mesh.groupTransform;\n\n const textureIdAndRound = (textureId << 16) | (this.roundPixels & 0xFFFF);\n\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 trim = texture.trim;\n const positions = geometry.positions;\n const uvBuffer = geometry.getBuffer('aUV');\n\n const uvs = uvBuffer.data;\n\n let transformedUvs = uvs;\n const textureMatrix = this.texture.textureMatrix;\n\n if (!textureMatrix.isSimple)\n {\n transformedUvs = this._transformedUvs;\n\n if (this._textureMatrixUpdateId !== textureMatrix._updateID || this._uvUpdateId !== uvBuffer._updateID)\n {\n if (!transformedUvs || transformedUvs.length < uvs.length)\n {\n transformedUvs = this._transformedUvs = new Float32Array(uvs.length);\n }\n\n this._textureMatrixUpdateId = textureMatrix._updateID;\n this._uvUpdateId = uvBuffer._updateID;\n\n textureMatrix.multiplyUvs(uvs as Float32Array, transformedUvs);\n }\n }\n\n const abgr = mesh.groupColorAlpha;\n\n for (let i = 0; i < positions.length; i += 2)\n {\n const x = positions[i];\n const y = positions[i + 1];\n\n float32View[index] = (a * x) + (c * y) + tx;\n float32View[index + 1] = (b * x) + (d * y) + ty;\n\n // TODO implement texture matrix?\n float32View[index + 2] = transformedUvs[i];\n float32View[index + 3] = transformedUvs[i + 1];\n\n uint32View[index + 4] = abgr;\n uint32View[index + 5] = textureIdAndRound;\n\n index += 6;\n }\n }\n\n get vertexSize()\n {\n return this.geometry.positions.length / 2;\n }\n\n get indexSize()\n {\n return this.geometry.indices.length;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { Matrix } from '../../../maths/matrix/Matrix';\nimport { BindGroup } from '../../../rendering/renderers/gpu/shader/BindGroup';\nimport { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup';\nimport { getAdjustedBlendModeBlend } from '../../../rendering/renderers/shared/state/getAdjustedBlendModeBlend';\nimport { BigPool } from '../../../utils/pool/PoolGroup';\nimport { color32BitToUniform } from '../../graphics/gpu/colorToUniform';\nimport { BatchableMesh } from './BatchableMesh';\n\nimport type { Instruction } from '../../../rendering/renderers/shared/instructions/Instruction';\nimport type { InstructionSet } from '../../../rendering/renderers/shared/instructions/InstructionSet';\nimport type {\n InstructionPipe,\n RenderPipe\n} from '../../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../../../rendering/renderers/types';\nimport type { PoolItem } from '../../../utils/pool/Pool';\nimport type { Mesh } from './Mesh';\n\n// TODO Record mode is a P2, will get back to this as it's not a priority\n// const recordMode = true;\n\ninterface MeshData\n{\n batched: boolean;\n indexSize: number;\n vertexSize: number;\n}\n\nexport interface MeshAdaptor\n{\n init(): void;\n execute(meshPipe: MeshPipe, mesh: Mesh): void;\n destroy(): void;\n}\n\nexport interface MeshInstruction extends Instruction\n{\n renderPipeId: 'mesh';\n mesh: Mesh;\n}\n\n// eslint-disable-next-line max-len\nexport class MeshPipe implements RenderPipe, InstructionPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'mesh',\n } as const;\n\n public localUniforms = new UniformGroup({\n uTransformMatrix: { value: new Matrix(), type: 'mat3x3' },\n uColor: { value: new Float32Array([1, 1, 1, 1]), type: 'vec4' },\n uRound: { value: 0, type: 'f32' },\n });\n\n public localUniformsBindGroup = new BindGroup({\n 0: this.localUniforms,\n });\n\n public renderer: Renderer;\n\n private _meshDataHash: Record = Object.create(null);\n private _gpuBatchableMeshHash: Record = Object.create(null);\n private _adaptor: MeshAdaptor;\n\n constructor(renderer: Renderer, adaptor: MeshAdaptor)\n {\n this.renderer = renderer;\n this._adaptor = adaptor;\n\n this._adaptor.init();\n }\n\n public validateRenderable(mesh: Mesh): boolean\n {\n const meshData = this._getMeshData(mesh);\n\n const wasBatched = meshData.batched;\n\n const isBatched = mesh.batched;\n\n meshData.batched = isBatched;\n\n if (wasBatched !== isBatched)\n {\n return true;\n }\n else if (isBatched)\n {\n const geometry = mesh._geometry;\n\n // no need to break the batch if it's the same size\n if (geometry.indices.length !== meshData.indexSize\n || geometry.positions.length !== meshData.vertexSize)\n {\n meshData.indexSize = geometry.indices.length;\n meshData.vertexSize = geometry.positions.length;\n\n return true;\n }\n\n const batchableMesh = this._getBatchableMesh(mesh);\n\n const texture = mesh.texture;\n\n if (batchableMesh.texture._source !== texture._source)\n {\n if (batchableMesh.texture._source !== texture._source)\n {\n return !batchableMesh.batcher.checkAndUpdateTexture(batchableMesh, texture);\n }\n }\n }\n\n return false;\n }\n\n public addRenderable(mesh: Mesh, instructionSet: InstructionSet)\n {\n const batcher = this.renderer.renderPipes.batch;\n\n const { batched } = this._getMeshData(mesh);\n\n if (batched)\n {\n const gpuBatchableMesh = this._getBatchableMesh(mesh);\n\n gpuBatchableMesh.texture = mesh._texture;\n gpuBatchableMesh.geometry = mesh._geometry;\n\n batcher.addToBatch(gpuBatchableMesh);\n }\n else\n {\n batcher.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'mesh',\n mesh\n } as MeshInstruction);\n }\n }\n\n public updateRenderable(mesh: Mesh)\n {\n if (mesh.batched)\n {\n const gpuBatchableMesh = this._gpuBatchableMeshHash[mesh.uid];\n\n gpuBatchableMesh.texture = mesh._texture;\n gpuBatchableMesh.geometry = mesh._geometry;\n\n gpuBatchableMesh.batcher.updateElement(gpuBatchableMesh);\n }\n }\n\n public destroyRenderable(mesh: Mesh)\n {\n this._meshDataHash[mesh.uid] = null;\n\n const gpuMesh = this._gpuBatchableMeshHash[mesh.uid];\n\n if (gpuMesh)\n {\n BigPool.return(gpuMesh as PoolItem);\n this._gpuBatchableMeshHash[mesh.uid] = null;\n }\n }\n\n public execute({ mesh }: MeshInstruction)\n {\n if (!mesh.isRenderable) return;\n\n mesh.state.blendMode = getAdjustedBlendModeBlend(mesh.groupBlendMode, mesh.texture._source);\n\n const localUniforms = this.localUniforms;\n\n localUniforms.uniforms.uTransformMatrix = mesh.groupTransform;\n localUniforms.uniforms.uRound = this.renderer._roundPixels | mesh._roundPixels;\n localUniforms.update();\n\n color32BitToUniform(\n mesh.groupColorAlpha,\n localUniforms.uniforms.uColor,\n 0\n );\n\n this._adaptor.execute(this, mesh);\n }\n\n private _getMeshData(mesh: Mesh): MeshData\n {\n return this._meshDataHash[mesh.uid] || this._initMeshData(mesh);\n }\n\n private _initMeshData(mesh: Mesh): MeshData\n {\n this._meshDataHash[mesh.uid] = {\n batched: mesh.batched,\n indexSize: mesh._geometry.indices?.length,\n vertexSize: mesh._geometry.positions?.length,\n };\n\n mesh.on('destroyed', () =>\n {\n this.destroyRenderable(mesh);\n });\n\n return this._meshDataHash[mesh.uid];\n }\n\n private _getBatchableMesh(mesh: Mesh): BatchableMesh\n {\n return this._gpuBatchableMeshHash[mesh.uid] || this._initBatchableMesh(mesh);\n }\n\n private _initBatchableMesh(mesh: Mesh): BatchableMesh\n {\n // TODO - make this batchable graphics??\n const gpuMesh: BatchableMesh = BigPool.get(BatchableMesh);\n\n gpuMesh.mesh = mesh;\n gpuMesh.texture = mesh._texture;\n gpuMesh.roundPixels = (this.renderer._roundPixels | mesh._roundPixels) as 0 | 1;\n\n this._gpuBatchableMeshHash[mesh.uid] = gpuMesh;\n\n gpuMesh.mesh = mesh;\n\n return gpuMesh;\n }\n\n public destroy()\n {\n for (const i in this._gpuBatchableMeshHash)\n {\n if (this._gpuBatchableMeshHash[i])\n {\n BigPool.return(this._gpuBatchableMeshHash[i] as PoolItem);\n }\n }\n\n this._gpuBatchableMeshHash = null;\n this._meshDataHash = null;\n\n this.localUniforms = null;\n this.localUniformsBindGroup = null;\n\n this._adaptor.destroy();\n this._adaptor = null;\n\n this.renderer = null;\n }\n}\n","import { extensions } from '../../extensions/Extensions';\nimport { MeshPipe } from './shared/MeshPipe';\n\nextensions.add(MeshPipe);\n","import type { Batch, BatchableObject, Batcher } from '../../rendering/batcher/shared/Batcher';\nimport type { IndexBufferArray } from '../../rendering/renderers/shared/geometry/Geometry';\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport type { BoundsData } from '../container/bounds/Bounds';\nimport type { Container } from '../container/Container';\n\n/**\n * A batchable sprite object.\n * @ignore\n */\nexport class BatchableSprite implements BatchableObject\n{\n public indexStart: number;\n public renderable: Container;\n\n // batch specific..\n public vertexSize = 4;\n public indexSize = 6;\n public texture: Texture;\n\n public textureId: number;\n public location = 0; // location in the buffer\n public batcher: Batcher = null;\n public batch: Batch = null;\n public bounds: BoundsData;\n public roundPixels: 0 | 1 = 0;\n\n get blendMode() { return this.renderable.groupBlendMode; }\n\n public packAttributes(\n float32View: Float32Array,\n uint32View: Uint32Array,\n index: number,\n textureId: number,\n )\n {\n const sprite = this.renderable;\n const texture = this.texture;\n\n const wt = sprite.groupTransform;\n\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 bounds = this.bounds;\n\n const w0 = bounds.maxX;\n const w1 = bounds.minX;\n const h0 = bounds.maxY;\n const h1 = bounds.minY;\n\n const uvs = texture.uvs;\n\n // _ _ _ _\n // a b g r\n const argb = sprite.groupColorAlpha;\n\n const textureIdAndRound = (textureId << 16) | (this.roundPixels & 0xFFFF);\n\n float32View[index + 0] = (a * w1) + (c * h1) + tx;\n float32View[index + 1] = (d * h1) + (b * w1) + ty;\n\n float32View[index + 2] = uvs.x0;\n float32View[index + 3] = uvs.y0;\n\n uint32View[index + 4] = argb;\n uint32View[index + 5] = textureIdAndRound;\n\n // xy\n float32View[index + 6] = (a * w0) + (c * h1) + tx;\n float32View[index + 7] = (d * h1) + (b * w0) + ty;\n\n float32View[index + 8] = uvs.x1;\n float32View[index + 9] = uvs.y1;\n\n uint32View[index + 10] = argb;\n uint32View[index + 11] = textureIdAndRound;\n\n // xy\n float32View[index + 12] = (a * w0) + (c * h0) + tx;\n float32View[index + 13] = (d * h0) + (b * w0) + ty;\n\n float32View[index + 14] = uvs.x2;\n float32View[index + 15] = uvs.y2;\n\n uint32View[index + 16] = argb;\n uint32View[index + 17] = textureIdAndRound;\n\n // xy\n float32View[index + 18] = (a * w1) + (c * h0) + tx;\n float32View[index + 19] = (d * h0) + (b * w1) + ty;\n\n float32View[index + 20] = uvs.x3;\n float32View[index + 21] = uvs.y3;\n\n uint32View[index + 22] = argb;\n uint32View[index + 23] = textureIdAndRound;\n }\n\n public packIndex(indexBuffer: IndexBufferArray, index: number, indicesOffset: number)\n {\n indexBuffer[index] = indicesOffset + 0;\n indexBuffer[index + 1] = indicesOffset + 1;\n indexBuffer[index + 2] = indicesOffset + 2;\n\n indexBuffer[index + 3] = indicesOffset + 0;\n indexBuffer[index + 4] = indicesOffset + 2;\n indexBuffer[index + 5] = indicesOffset + 3;\n }\n\n public reset()\n {\n this.renderable = null;\n this.texture = null;\n this.batcher = null;\n this.batch = null;\n this.bounds = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { updateQuadBounds } from '../../../utils/data/updateQuadBounds';\nimport { BigPool } from '../../../utils/pool/PoolGroup';\nimport { BatchableSprite } from '../../sprite/BatchableSprite';\n\nimport type { InstructionSet } from '../../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { RenderPipe } from '../../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport type { Renderer } from '../../../rendering/renderers/types';\nimport type { Text } from '../Text';\n\nexport class CanvasTextPipe implements RenderPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'text',\n } as const;\n\n private _renderer: Renderer;\n\n private _gpuText: Record = Object.create(null);\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n this._renderer.runners.resolutionChange.add(this);\n }\n\n public resolutionChange()\n {\n for (const i in this._gpuText)\n {\n const gpuText = this._gpuText[i];\n const text = gpuText.batchableSprite.renderable as Text;\n\n if (text._autoResolution)\n {\n text._resolution = this._renderer.resolution;\n text.onViewUpdate();\n }\n }\n }\n\n public validateRenderable(text: Text): boolean\n {\n const gpuText = this._getGpuText(text);\n\n const newKey = text._getKey();\n\n if (gpuText.currentKey !== newKey)\n {\n const { width, height } = this._renderer.canvasText.getTextureSize(\n text.text,\n text.resolution,\n text._style,\n );\n\n if (\n // is only being used by this text:\n this._renderer.canvasText.getReferenceCount(gpuText.currentKey) === 1\n // check the size of the text is the same po2\n && width === gpuText.texture._source.width\n && height === gpuText.texture._source.height\n )\n {\n return false;\n }\n\n return true;\n }\n\n return false;\n }\n\n public addRenderable(text: Text, _instructionSet: InstructionSet)\n {\n const gpuText = this._getGpuText(text);\n\n const batchableSprite = gpuText.batchableSprite;\n\n if (text._didTextUpdate)\n {\n this._updateText(text);\n }\n\n this._renderer.renderPipes.batch.addToBatch(batchableSprite);\n }\n\n public updateRenderable(text: Text)\n {\n const gpuText = this._getGpuText(text);\n const batchableSprite = gpuText.batchableSprite;\n\n if (text._didTextUpdate)\n {\n this._updateText(text);\n }\n\n batchableSprite.batcher.updateElement(batchableSprite);\n }\n\n public destroyRenderable(text: Text)\n {\n this._destroyRenderableById(text.uid);\n }\n\n private _destroyRenderableById(textUid: number)\n {\n const gpuText = this._gpuText[textUid];\n\n this._renderer.canvasText.decreaseReferenceCount(gpuText.currentKey);\n\n BigPool.return(gpuText.batchableSprite);\n\n this._gpuText[textUid] = null;\n }\n\n private _updateText(text: Text)\n {\n const newKey = text._getKey();\n const gpuText = this._getGpuText(text);\n const batchableSprite = gpuText.batchableSprite;\n\n if (gpuText.currentKey !== newKey)\n {\n this._updateGpuText(text);\n }\n\n text._didTextUpdate = false;\n\n const padding = text._style.padding;\n\n updateQuadBounds(batchableSprite.bounds, text._anchor, batchableSprite.texture, padding);\n }\n\n private _updateGpuText(text: Text)\n {\n const gpuText = this._getGpuText(text);\n const batchableSprite = gpuText.batchableSprite;\n\n if (gpuText.texture)\n {\n this._renderer.canvasText.decreaseReferenceCount(gpuText.currentKey);\n }\n\n gpuText.texture = batchableSprite.texture = this._renderer.canvasText.getManagedTexture(text);\n gpuText.currentKey = text._getKey();\n batchableSprite.texture = gpuText.texture;\n }\n\n private _getGpuText(text: Text)\n {\n return this._gpuText[text.uid] || this.initGpuText(text);\n }\n\n public initGpuText(text: Text)\n {\n const gpuTextData: CanvasTextPipe['_gpuText'][number] = {\n texture: null,\n currentKey: '--',\n batchableSprite: BigPool.get(BatchableSprite),\n };\n\n gpuTextData.batchableSprite.renderable = text;\n gpuTextData.batchableSprite.bounds = { minX: 0, maxX: 1, minY: 0, maxY: 0 };\n gpuTextData.batchableSprite.roundPixels = (this._renderer._roundPixels | text._roundPixels) as 0 | 1;\n\n this._gpuText[text.uid] = gpuTextData;\n\n text._resolution = text._autoResolution ? this._renderer.resolution : text.resolution;\n this._updateText(text);\n\n // TODO perhaps manage this outside this pipe? (a bit like how we update / add)\n text.on('destroyed', () =>\n {\n this.destroyRenderable(text);\n });\n\n return gpuTextData;\n }\n\n public destroy()\n {\n for (const i in this._gpuText)\n {\n this._destroyRenderableById(i as unknown as number);\n }\n\n this._gpuText = null;\n this._renderer = null;\n }\n}\n","import { DOMAdapter } from '../../../../environment/adapter';\nimport { nextPow2 } from '../../../../maths/misc/pow2';\n\nimport type { ICanvas, ICanvasRenderingContext2DSettings } from '../../../../environment/canvas/ICanvas';\nimport type { ICanvasRenderingContext2D } from '../../../../environment/canvas/ICanvasRenderingContext2D';\n\nexport interface CanvasAndContext\n{\n canvas: ICanvas;\n context: ICanvasRenderingContext2D;\n}\n\n/**\n * Texture pool, used by FilterSystem and plugins.\n *\n * Stores collection of temporary pow2 or screen-sized renderTextures\n *\n * If you use custom RenderTexturePool for your filters, you can use methods\n * `getFilterTexture` and `returnFilterTexture` same as in\n * @name CanvasPool\n * @memberof rendering\n */\nexport class CanvasPoolClass\n{\n public canvasOptions: ICanvasRenderingContext2DSettings;\n\n /**\n * Allow renderTextures of the same size as screen, not just pow2\n *\n * Automatically sets to true after `setScreenSize`\n * @default false\n */\n public enableFullScreen: boolean;\n private _canvasPool: {[x in string | number]: CanvasAndContext[]};\n\n constructor(canvasOptions?: ICanvasRenderingContext2DSettings)\n {\n this._canvasPool = Object.create(null);\n this.canvasOptions = canvasOptions || {};\n this.enableFullScreen = false;\n }\n\n /**\n * Creates texture with params that were specified in pool constructor.\n * @param pixelWidth - Width of texture in pixels.\n * @param pixelHeight - Height of texture in pixels.\n */\n private _createCanvasAndContext(pixelWidth: number, pixelHeight: number): CanvasAndContext\n {\n const canvas = DOMAdapter.get().createCanvas();\n\n canvas.width = pixelWidth;\n canvas.height = pixelHeight;\n\n const context = canvas.getContext('2d');\n\n return { canvas, context };\n }\n\n /**\n * Gets a Power-of-Two render texture or fullScreen texture\n * @param minWidth - The minimum width of the render texture.\n * @param minHeight - The minimum height of the render texture.\n * @param resolution - The resolution of the render texture.\n * @returns The new render texture.\n */\n public getOptimalCanvasAndContext(minWidth: number, minHeight: number, resolution = 1): CanvasAndContext\n {\n minWidth = Math.ceil((minWidth * resolution) - 1e-6);\n minHeight = Math.ceil((minHeight * resolution) - 1e-6);\n minWidth = nextPow2(minWidth);\n minHeight = nextPow2(minHeight);\n\n const key = (minWidth << 17) + (minHeight << 1);\n\n if (!this._canvasPool[key])\n {\n this._canvasPool[key] = [];\n }\n\n let canvasAndContext = this._canvasPool[key].pop();\n\n if (!canvasAndContext)\n {\n canvasAndContext = this._createCanvasAndContext(minWidth, minHeight);\n }\n\n return canvasAndContext;\n }\n\n /**\n * Place a render texture back into the pool.\n * @param canvasAndContext\n */\n public returnCanvasAndContext(canvasAndContext: CanvasAndContext): void\n {\n const canvas = canvasAndContext.canvas;\n const { width, height } = canvas;\n\n const key = (width << 17) + (height << 1);\n\n this._canvasPool[key].push(canvasAndContext);\n }\n\n public clear(): void\n {\n this._canvasPool = {};\n }\n}\n\nexport const CanvasPool = new CanvasPoolClass();\n","import { nextPow2 } from '../../../../maths/misc/pow2';\nimport { TextureSource } from './sources/TextureSource';\nimport { Texture } from './Texture';\n\nimport type { TextureSourceOptions } from './sources/TextureSource';\n\nlet count = 0;\n\n/**\n * Texture pool, used by FilterSystem and plugins.\n *\n * Stores collection of temporary pow2 or screen-sized renderTextures\n *\n * If you use custom RenderTexturePool for your filters, you can use methods\n * `getFilterTexture` and `returnFilterTexture` same as in default pool\n * @memberof rendering\n * @name TexturePool\n */\nexport class TexturePoolClass\n{\n /** The default options for texture pool */\n public textureOptions: TextureSourceOptions;\n\n /**\n * Allow renderTextures of the same size as screen, not just pow2\n *\n * Automatically sets to true after `setScreenSize`\n * @default false\n */\n public enableFullScreen: boolean;\n\n private _texturePool: {[x in string | number]: Texture[]};\n private _poolKeyHash: Record = Object.create(null);\n\n /**\n * @param textureOptions - options that will be passed to BaseRenderTexture constructor\n * @param {SCALE_MODE} [textureOptions.scaleMode] - See {@link SCALE_MODE} for possible values.\n */\n constructor(textureOptions?: TextureSourceOptions)\n {\n this._texturePool = {};\n this.textureOptions = textureOptions || {};\n this.enableFullScreen = false;\n }\n\n /**\n * Creates texture with params that were specified in pool constructor.\n * @param pixelWidth - Width of texture in pixels.\n * @param pixelHeight - Height of texture in pixels.\n * @param antialias\n */\n public createTexture(pixelWidth: number, pixelHeight: number, antialias: boolean): Texture\n {\n const textureSource = new TextureSource({\n ...this.textureOptions,\n\n width: pixelWidth,\n height: pixelHeight,\n resolution: 1,\n antialias,\n autoGarbageCollect: true,\n });\n\n return new Texture({\n source: textureSource,\n label: `texturePool_${count++}`,\n });\n }\n\n /**\n * Gets a Power-of-Two render texture or fullScreen texture\n * @param frameWidth - The minimum width of the render texture.\n * @param frameHeight - The minimum height of the render texture.\n * @param resolution - The resolution of the render texture.\n * @param antialias\n * @returns The new render texture.\n */\n public getOptimalTexture(frameWidth: number, frameHeight: number, resolution = 1, antialias: boolean): Texture\n {\n let po2Width = Math.ceil((frameWidth * resolution) - 1e-6);\n let po2Height = Math.ceil((frameHeight * resolution) - 1e-6);\n\n po2Width = nextPow2(po2Width);\n po2Height = nextPow2(po2Height);\n\n const key = (po2Width << 17) + (po2Height << 1) + (antialias ? 1 : 0);\n\n if (!this._texturePool[key])\n {\n this._texturePool[key] = [];\n }\n\n let texture = this._texturePool[key].pop();\n\n if (!texture)\n {\n texture = this.createTexture(po2Width, po2Height, antialias);\n }\n\n texture.source._resolution = resolution;\n texture.source.width = po2Width / resolution;\n texture.source.height = po2Height / resolution;\n texture.source.pixelWidth = po2Width;\n texture.source.pixelHeight = po2Height;\n\n // fit the layout to the requested original size\n texture.frame.x = 0;\n texture.frame.y = 0;\n texture.frame.width = frameWidth;\n texture.frame.height = frameHeight;\n\n texture.updateUvs();\n\n this._poolKeyHash[texture.uid] = key;\n\n return texture;\n }\n\n /**\n * Gets extra texture of the same size as input renderTexture\n * @param texture - The texture to check what size it is.\n * @param antialias - Whether to use antialias.\n * @returns A texture that is a power of two\n */\n public getSameSizeTexture(texture: Texture, antialias = false)\n {\n const source = texture.source;\n\n return this.getOptimalTexture(texture.width, texture.height, source._resolution, antialias);\n }\n\n /**\n * Place a render texture back into the pool.\n * @param renderTexture - The renderTexture to free\n */\n public returnTexture(renderTexture: Texture): void\n {\n const key = this._poolKeyHash[renderTexture.uid];\n\n this._texturePool[key].push(renderTexture);\n }\n\n /**\n * Clears the pool.\n * @param destroyTextures - Destroy all stored textures.\n */\n public clear(destroyTextures?: boolean): void\n {\n destroyTextures = destroyTextures !== false;\n if (destroyTextures)\n {\n for (const i in this._texturePool)\n {\n const textures = this._texturePool[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\n this._texturePool = {};\n }\n}\n\nexport const TexturePool = new TexturePoolClass();\n","import { Rectangle } from '../../maths/shapes/Rectangle';\n\nimport type { ICanvas } from '../../environment/canvas/ICanvas';\n\nfunction checkRow(data: Uint8ClampedArray, width: number, y: number)\n{\n for (let x = 0, index = 4 * y * width; x < width; ++x, index += 4)\n {\n if (data[index + 3] !== 0) return false;\n }\n\n return true;\n}\n\nfunction checkColumn(data: Uint8ClampedArray, width: number, x: number, top: number, bottom: number)\n{\n const stride = 4 * width;\n\n for (let y = top, index = (top * stride) + (4 * x); y <= bottom; ++y, index += stride)\n {\n if (data[index + 3] !== 0) return false;\n }\n\n return true;\n}\n\n/**\n * Measuring the bounds of a canvas' visible (non-transparent) pixels.\n * @param canvas - The canvas to measure.\n * @param resolution - The resolution of the canvas.\n * @returns The bounding box of the canvas' visible pixels.\n * @since 7.1.0\n * @memberof utils\n */\nexport function getCanvasBoundingBox(canvas: ICanvas, resolution = 1): Rectangle\n{\n // https://gist.github.com/timdown/021d9c8f2aabc7092df564996f5afbbf\n\n const { width, height } = canvas;\n\n const context = canvas.getContext('2d', {\n willReadFrequently: true,\n });\n\n if (context === null)\n {\n throw new TypeError('Failed to get canvas 2D context');\n }\n\n const imageData = context.getImageData(0, 0, width, height);\n const data = imageData.data;\n\n let left = 0;\n let top = 0;\n let right = width - 1;\n let bottom = height - 1;\n\n while (top < height && checkRow(data, width, top)) ++top;\n if (top === height) return Rectangle.EMPTY;\n while (checkRow(data, width, bottom)) --bottom;\n while (checkColumn(data, width, left, top, bottom)) ++left;\n while (checkColumn(data, width, right, top, bottom)) --right;\n\n ++right;\n ++bottom;\n\n return new Rectangle(left / resolution, top / resolution, (right - left) / resolution, (bottom - top) / resolution);\n}\n","import { Color } from '../../../../color/Color';\nimport { DOMAdapter } from '../../../../environment/adapter';\nimport { Matrix } from '../../../../maths/matrix/Matrix';\nimport { ImageSource } from '../../../../rendering/renderers/shared/texture/sources/ImageSource';\nimport { Texture } from '../../../../rendering/renderers/shared/texture/Texture';\nimport { uid } from '../../../../utils/data/uid';\n\nimport type { ColorSource } from '../../../../color/Color';\n\nexport type GradientType = 'linear' | 'radial';\n\n// export type GradientSource =\n// string // CSS gradient string: 'linear-gradient(...)'\n// | IGradientOptions // Gradient options: { x0, y0, x1, y1, ...}\n// | Gradient; // class Gradient itself\n\nexport interface LinearGradientFillStyle\n{\n x0: number;\n y0: number;\n x1: number;\n y1: number;\n colors: number[];\n stops: number[];\n}\n\nexport class FillGradient implements CanvasGradient\n{\n public static defaultTextureSize = 256;\n\n public readonly uid = uid('fillGradient');\n public readonly type: GradientType = 'linear';\n\n public x0: number;\n public y0: number;\n public x1: number;\n public y1: number;\n\n public texture: Texture;\n public transform: Matrix;\n public gradientStops: Array<{ offset: number, color: string }> = [];\n\n private _styleKey: string | null = null;\n\n constructor(x0: number, y0: number, x1: number, y1: number)\n {\n this.x0 = x0;\n this.y0 = y0;\n\n this.x1 = x1;\n this.y1 = y1;\n }\n\n public addColorStop(offset: number, color: ColorSource): this\n {\n this.gradientStops.push({ offset, color: Color.shared.setValue(color).toHex() });\n this._styleKey = null;\n\n return this;\n }\n\n // TODO move to the system!\n public buildLinearGradient(): void\n {\n const defaultSize = FillGradient.defaultTextureSize;\n\n const { gradientStops } = this;\n\n const canvas = DOMAdapter.get().createCanvas();\n\n canvas.width = defaultSize;\n canvas.height = defaultSize;\n\n const ctx = canvas.getContext('2d');\n\n const gradient = ctx.createLinearGradient(0, 0, FillGradient.defaultTextureSize, 1);\n\n for (let i = 0; i < gradientStops.length; i++)\n {\n const stop = gradientStops[i];\n\n gradient.addColorStop(stop.offset, stop.color);\n }\n\n ctx.fillStyle = gradient;\n ctx.fillRect(0, 0, defaultSize, defaultSize);\n\n this.texture = new Texture({\n source: new ImageSource({\n resource: canvas,\n addressModeU: 'clamp-to-edge',\n addressModeV: 'repeat',\n }),\n });\n\n // generate some UVS based on the gradient direction sent\n\n const { x0, y0, x1, y1 } = this;\n\n const m = new Matrix();\n\n // get angle\n const dx = x1 - x0;\n const dy = y1 - y0;\n\n const dist = Math.sqrt((dx * dx) + (dy * dy));\n\n const angle = Math.atan2(dy, dx);\n\n m.translate(-x0, -y0);\n m.scale(1 / defaultSize, 1 / defaultSize);\n m.rotate(-angle);\n m.scale(256 / dist, 1);\n\n this.transform = m;\n this._styleKey = null;\n }\n\n public get styleKey(): string\n {\n if (this._styleKey)\n {\n return this._styleKey;\n }\n\n const stops = this.gradientStops.map((stop) => `${stop.offset}-${stop.color}`).join('-');\n const texture = this.texture.uid;\n const transform = this.transform.toArray().join('-');\n\n return `fill-gradient-${this.uid}-${stops}-${texture}-${transform}-${this.x0}-${this.y0}-${this.x1}-${this.y1}`;\n }\n}\n","import { Matrix } from '../../../../maths/matrix/Matrix';\nimport { uid } from '../../../../utils/data/uid';\n\nimport type { WRAP_MODE } from '../../../../rendering/renderers/shared/texture/const';\nimport type { Texture } from '../../../../rendering/renderers/shared/texture/Texture';\n\nexport type PatternRepetition = 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';\n\nconst repetitionMap = {\n repeat: {\n addressModeU: 'repeat',\n addressModeV: 'repeat',\n },\n 'repeat-x': {\n addressModeU: 'repeat',\n addressModeV: 'clamp-to-edge',\n },\n 'repeat-y': {\n addressModeU: 'clamp-to-edge',\n addressModeV: 'repeat',\n },\n 'no-repeat': {\n addressModeU: 'clamp-to-edge',\n addressModeV: 'clamp-to-edge',\n },\n};\n\nexport class FillPattern implements CanvasPattern\n{\n public readonly uid = uid('fillPattern');\n public texture: Texture;\n public transform = new Matrix();\n\n private _styleKey: string | null = null;\n\n constructor(texture: Texture, repetition?: PatternRepetition)\n {\n this.texture = texture;\n\n this.transform.scale(\n 1 / texture.frame.width,\n 1 / texture.frame.height\n );\n\n if (repetition)\n {\n texture.source.style.addressModeU = repetitionMap[repetition].addressModeU as WRAP_MODE;\n texture.source.style.addressModeV = repetitionMap[repetition].addressModeV as WRAP_MODE;\n }\n }\n\n public setTransform(transform?: Matrix): void\n {\n const texture = this.texture;\n\n this.transform.copyFrom(transform);\n this.transform.invert();\n // transform.scale\n this.transform.scale(\n 1 / texture.frame.width,\n 1 / texture.frame.height\n );\n\n this._styleKey = null;\n }\n\n public get styleKey(): string\n {\n if (this._styleKey) return this._styleKey;\n\n this._styleKey = `fill-pattern-${this.uid}-${this.texture.uid}-${this.transform.toArray().join('-')}`;\n\n return this._styleKey;\n }\n}\n","\nmodule.exports = parse\n\n/**\n * expected argument lengths\n * @type {Object}\n */\n\nvar length = {a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0}\n\n/**\n * segment pattern\n * @type {RegExp}\n */\n\nvar segment = /([astvzqmhlc])([^astvzqmhlc]*)/ig\n\n/**\n * parse an svg path data string. Generates an Array\n * of commands where each command is an Array of the\n * form `[command, arg1, arg2, ...]`\n *\n * @param {String} path\n * @return {Array}\n */\n\nfunction parse(path) {\n\tvar data = []\n\tpath.replace(segment, function(_, command, args){\n\t\tvar type = command.toLowerCase()\n\t\targs = parseValues(args)\n\n\t\t// overloaded moveTo\n\t\tif (type == 'm' && args.length > 2) {\n\t\t\tdata.push([command].concat(args.splice(0, 2)))\n\t\t\ttype = 'l'\n\t\t\tcommand = command == 'm' ? 'l' : 'L'\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (args.length == length[type]) {\n\t\t\t\targs.unshift(command)\n\t\t\t\treturn data.push(args)\n\t\t\t}\n\t\t\tif (args.length < length[type]) throw new Error('malformed path data')\n\t\t\tdata.push([command].concat(args.splice(0, length[type])))\n\t\t}\n\t})\n\treturn data\n}\n\nvar number = /-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/ig\n\nfunction parseValues(args) {\n\tvar numbers = args.match(number)\n\treturn numbers ? numbers.map(Number) : []\n}\n","/* eslint-disable no-console */\nimport parse from 'parse-svg-path';\nimport { warn } from '../../../../utils/logging/warn';\n\nimport type { GraphicsPath } from '../path/GraphicsPath';\n\ninterface SubPath\n{\n startX: number;\n startY: number;\n}\n\n// TODO optimise and cache the paths?\nexport function SVGToGraphicsPath(svgPath: string, path: GraphicsPath): GraphicsPath\n{\n const commands = parse(svgPath);\n\n const subpaths: SubPath[] = [];\n let currentSubPath: SubPath | null = null;\n\n let lastX = 0;\n let lastY = 0;\n\n for (let i = 0; i < commands.length; i++)\n {\n const command = commands[i];\n const type = command[0];\n const data = command; // alias for 1-based referencing\n\n switch (type)\n {\n case 'M':\n lastX = data[1];\n lastY = data[2];\n\n path.moveTo(lastX, lastY);\n break;\n case 'm':\n\n lastX += data[1];\n lastY += data[2];\n\n path.moveTo(lastX, lastY);\n break;\n case 'H':\n lastX = data[1];\n\n path.lineTo(lastX, lastY);\n break;\n case 'h':\n lastX += data[1];\n\n path.lineTo(lastX, lastY);\n break;\n case 'V':\n lastY = data[1];\n\n path.lineTo(lastX, lastY);\n break;\n case 'v':\n lastY += data[1];\n\n path.lineTo(lastX, lastY);\n break;\n case 'L':\n lastX = data[1];\n lastY = data[2];\n\n path.lineTo(lastX, lastY);\n break;\n case 'l':\n lastX += data[1];\n lastY += data[2];\n\n path.lineTo(lastX, lastY);\n break;\n case 'C':\n\n lastX = data[5];\n lastY = data[6];\n\n path.bezierCurveTo(\n data[1], data[2],\n data[3], data[4],\n lastX, lastY\n );\n break;\n case 'c':\n path.bezierCurveTo(\n lastX + data[1], lastY + data[2],\n lastX + data[3], lastY + data[4],\n lastX + data[5], lastY + data[6]\n );\n\n lastX += data[5];\n lastY += data[6];\n break;\n case 'S':\n lastX = data[3];\n lastY = data[4];\n\n path.bezierCurveToShort(\n data[1], data[2],\n lastX, lastY\n );\n break;\n case 's':\n path.bezierCurveToShort(\n lastX + data[1], lastY + data[2],\n lastX + data[3], lastY + data[4],\n );\n\n lastX += data[3];\n lastY += data[4];\n break;\n case 'Q':\n lastX = data[3];\n lastY = data[4];\n\n path.quadraticCurveTo(\n data[1], data[2],\n lastX, lastY\n );\n break;\n case 'q':\n path.quadraticCurveTo(\n lastX + data[1], lastY + data[2],\n lastX + data[3], lastY + data[4]\n );\n\n lastX += data[3];\n lastY += data[4];\n break;\n case 'T':\n lastX = data[1];\n lastY = data[2];\n\n path.quadraticCurveToShort(\n lastX, lastY\n );\n break;\n case 't':\n lastX += data[1];\n lastY += data[2];\n\n path.quadraticCurveToShort(\n lastX, lastY\n );\n break;\n case 'A':\n lastX = data[6];\n lastY = data[7];\n\n path.arcToSvg(\n data[1],\n data[2],\n data[3],\n data[4],\n data[5],\n lastX, lastY\n );\n break;\n case 'a':\n lastX += data[6];\n lastY += data[7];\n\n path.arcToSvg(\n data[1],\n data[2],\n data[3],\n data[4],\n data[5],\n lastX, lastY\n );\n break;\n case 'Z':\n case 'z':\n path.closePath();\n if (subpaths.length > 0)\n {\n currentSubPath = subpaths.pop();\n if (currentSubPath)\n {\n lastX = currentSubPath.startX;\n lastY = currentSubPath.startY;\n }\n else\n {\n lastX = 0;\n lastY = 0;\n }\n }\n currentSubPath = null;\n break;\n default:\n // #if _DEBUG\n warn(`Unknown SVG path command: ${type}`);\n // #endif\n }\n\n if (type !== 'Z' && type !== 'z')\n {\n if (currentSubPath === null)\n {\n currentSubPath = { startX: lastX, startY: lastY };\n subpaths.push(currentSubPath);\n }\n }\n }\n\n return path;\n}\n","import { Rectangle } from './Rectangle';\n\nimport type { SHAPE_PRIMITIVE } from '../misc/const';\nimport type { ShapePrimitive } from './ShapePrimitive';\n\n/**\n * The Circle object is used to help draw graphics and can also be used to specify a hit area for containers.\n * @memberof maths\n */\nexport class Circle implements ShapePrimitive\n{\n /**\n * The X coordinate of the center of this circle\n * @default 0\n */\n public x: number;\n\n /**\n * The Y coordinate of the center of this circle\n * @default 0\n */\n public y: number;\n\n /**\n * The radius of the circle\n * @default 0\n */\n public radius: number;\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n * @default 'circle'\n */\n public readonly type: SHAPE_PRIMITIVE = 'circle';\n\n /**\n * @param x - The X coordinate of the center of this circle\n * @param y - The Y coordinate of the center of this circle\n * @param radius - The radius of the circle\n */\n constructor(x = 0, y = 0, radius = 0)\n {\n this.x = x;\n this.y = y;\n this.radius = radius;\n }\n\n /**\n * Creates a clone of this Circle instance\n * @returns A copy of the Circle\n */\n public clone(): Circle\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 * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @returns Whether the x/y coordinates are within this Circle\n */\n public contains(x: number, y: number): boolean\n {\n if (this.radius <= 0) return false;\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 * Checks whether the x and y coordinates given are contained within this circle including the stroke.\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @param width - The width of the line to check\n * @returns Whether the x/y coordinates are within this Circle\n */\n public strokeContains(x: number, y: number, width: number): boolean\n {\n if (this.radius === 0) return false;\n\n const dx = (this.x - x);\n const dy = (this.y - y);\n const r = this.radius;\n const w2 = width / 2;\n const distance = Math.sqrt((dx * dx) + (dy * dy));\n\n return (distance < r + w2 && distance > r - w2);\n }\n\n /**\n * Returns the framing rectangle of the circle as a Rectangle object\n * @param out\n * @returns The framing rectangle\n */\n public getBounds(out?: Rectangle): Rectangle\n {\n out = out || new Rectangle();\n\n out.x = this.x - this.radius;\n out.y = this.y - this.radius;\n out.width = this.radius * 2;\n out.height = this.radius * 2;\n\n return out;\n }\n\n /**\n * Copies another circle to this one.\n * @param circle - The circle to copy from.\n * @returns Returns itself.\n */\n public copyFrom(circle: Circle): this\n {\n this.x = circle.x;\n this.y = circle.y;\n this.radius = circle.radius;\n\n return this;\n }\n\n /**\n * Copies this circle to another one.\n * @param circle - The circle to copy to.\n * @returns Returns given parameter.\n */\n public copyTo(circle: Circle): Circle\n {\n circle.copyFrom(this);\n\n return circle;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`;\n }\n // #endif\n}\n","import { Rectangle } from './Rectangle';\n\nimport type { ShapePrimitive } from './ShapePrimitive';\n\n/**\n * The Ellipse object is used to help draw graphics and can also be used to specify a hit area for containers.\n * ```js\n * import { Ellipse } from 'pixi.js';\n *\n * const ellipse = new Ellipse(0, 0, 20, 10); // 40x20 rectangle\n * const isPointInEllipse = ellipse.contains(0, 0); // true\n * ```\n * @memberof maths\n */\nexport class Ellipse implements ShapePrimitive\n{\n /**\n * The X coordinate of the center of this ellipse\n * @default 0\n */\n public x: number;\n\n /**\n * The Y coordinate of the center of this ellipse\n * @default 0\n */\n public y: number;\n\n /**\n * The half width of this ellipse\n * @default 0\n */\n public halfWidth: number;\n\n /**\n * The half height of this ellipse\n * @default 0\n */\n public halfHeight: number;\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n * @default 'ellipse'\n */\n public readonly type = 'ellipse';\n\n /**\n * @param x - The X coordinate of the center of this ellipse\n * @param y - The Y coordinate of the center of this ellipse\n * @param halfWidth - The half width of this ellipse\n * @param halfHeight - The half height of this ellipse\n */\n constructor(x = 0, y = 0, halfWidth = 0, halfHeight = 0)\n {\n this.x = x;\n this.y = y;\n this.halfWidth = halfWidth;\n this.halfHeight = halfHeight;\n }\n\n /**\n * Creates a clone of this Ellipse instance\n * @returns {Ellipse} A copy of the ellipse\n */\n public clone(): Ellipse\n {\n return new Ellipse(this.x, this.y, this.halfWidth, this.halfHeight);\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this ellipse\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @returns Whether the x/y coords are within this ellipse\n */\n public contains(x: number, y: number): boolean\n {\n if (this.halfWidth <= 0 || this.halfHeight <= 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.halfWidth);\n let normy = ((y - this.y) / this.halfHeight);\n\n normx *= normx;\n normy *= normy;\n\n return (normx + normy <= 1);\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this ellipse including stroke\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @param width\n * @returns Whether the x/y coords are within this ellipse\n */\n public strokeContains(x: number, y: number, width: number): boolean\n {\n const { halfWidth, halfHeight } = this;\n\n if (halfWidth <= 0 || halfHeight <= 0)\n {\n return false;\n }\n\n const halfStrokeWidth = width / 2;\n const innerA = halfWidth - halfStrokeWidth;\n const innerB = halfHeight - halfStrokeWidth;\n const outerA = halfWidth + halfStrokeWidth;\n const outerB = halfHeight + halfStrokeWidth;\n\n const normalizedX = x - this.x;\n const normalizedY = y - this.y;\n\n const innerEllipse = ((normalizedX * normalizedX) / (innerA * innerA))\n + ((normalizedY * normalizedY) / (innerB * innerB));\n const outerEllipse = ((normalizedX * normalizedX) / (outerA * outerA))\n + ((normalizedY * normalizedY) / (outerB * outerB));\n\n return innerEllipse > 1 && outerEllipse <= 1;\n }\n\n /**\n * Returns the framing rectangle of the ellipse as a Rectangle object\n * @returns The framing rectangle\n */\n public getBounds(): Rectangle\n {\n return new Rectangle(this.x - this.halfWidth, this.y - this.halfHeight, this.halfWidth * 2, this.halfHeight * 2);\n }\n\n /**\n * Copies another ellipse to this one.\n * @param ellipse - The ellipse to copy from.\n * @returns Returns itself.\n */\n public copyFrom(ellipse: Ellipse): this\n {\n this.x = ellipse.x;\n this.y = ellipse.y;\n this.halfWidth = ellipse.halfWidth;\n this.halfHeight = ellipse.halfHeight;\n\n return this;\n }\n\n /**\n * Copies this ellipse to another one.\n * @param ellipse - The ellipse to copy to.\n * @returns Returns given parameter.\n */\n public copyTo(ellipse: Ellipse): Ellipse\n {\n ellipse.copyFrom(this);\n\n return ellipse;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`;\n }\n // #endif\n}\n","export function squaredDistanceToLineSegment(\n x: number, y: number,\n x1: number, y1: number,\n x2: number, y2: number\n): number\n{\n const a = x - x1;\n const b = y - y1;\n const c = x2 - x1;\n const d = y2 - y1;\n\n const dot = (a * c) + (b * d);\n const lenSq = (c * c) + (d * d);\n let param = -1;\n\n if (lenSq !== 0)\n {\n param = dot / lenSq;\n }\n\n let xx; let\n yy;\n\n if (param < 0)\n {\n xx = x1;\n yy = y1;\n }\n else if (param > 1)\n {\n xx = x2;\n yy = y2;\n }\n\n else\n {\n xx = x1 + (param * c);\n yy = y1 + (param * d);\n }\n\n const dx = x - xx;\n const dy = y - yy;\n\n return (dx * dx) + (dy * dy);\n}\n","import { squaredDistanceToLineSegment } from '../misc/squaredDistanceToLineSegment';\nimport { Rectangle } from './Rectangle';\n\nimport type { SHAPE_PRIMITIVE } from '../misc/const';\nimport type { PointData } from '../point/PointData';\nimport type { ShapePrimitive } from './ShapePrimitive';\n\n/**\n * A class to define a shape via user defined coordinates.\n *\n *\n * `Polygon` can accept the following different constructor arguments:\n * - An array of `Point` objects\n * - An array of coordinate pairs\n *\n *\n * These can be passed as a single array, or as a sequence of arguments.\n * ```js\n * import { Polygon } from 'pixi.js';\n *\n * // create a polygon object from an array of points, or an array of coordinate pairs\n * const polygon1 = new Polygon([ new Point(0, 0), new Point(0, 100), new Point(100, 100) ]);\n * const polygon2 = new Polygon([ 0, 0, 0, 100, 100, 100 ]);\n *\n * // or create a polygon object from a sequence of points, or coordinate pairs\n * const polygon3 = new Polygon(new Point(0, 0), new Point(0, 100), new Point(100, 100));\n * const polygon4 = new Polygon(0, 0, 0, 100, 100, 100);\n * ```\n * @memberof maths\n */\nexport class Polygon implements ShapePrimitive\n{\n /** An array of the points of this polygon. */\n public points: number[];\n\n /** `false` after moveTo, `true` after `closePath`. In all other cases it is `true`. */\n public closePath: boolean;\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n * @default 'polygon'\n */\n public readonly type: SHAPE_PRIMITIVE = 'polygon';\n\n constructor(points: PointData[] | number[]);\n constructor(...points: PointData[] | number[]);\n /**\n * @param 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 Polygon(new Point(), new 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: (PointData[] | number[])[] | PointData[] | number[])\n {\n let flat = Array.isArray(points[0]) ? points[0] : points;\n\n // if this is an array of points, convert it to a flat array of numbers\n if (typeof flat[0] !== 'number')\n {\n const p: number[] = [];\n\n for (let i = 0, il = flat.length; i < il; i++)\n {\n p.push((flat[i] as PointData).x, (flat[i] as PointData).y);\n }\n\n flat = p;\n }\n\n this.points = flat as number[];\n\n this.closePath = true;\n }\n\n /**\n * Creates a clone of this polygon.\n * @returns - A copy of the polygon.\n */\n public clone(): Polygon\n {\n const points = this.points.slice();\n const polygon = new Polygon(points);\n\n polygon.closePath = this.closePath;\n\n return polygon;\n }\n\n /**\n * Checks whether the x and y coordinates passed to this function are contained within this polygon.\n * @param x - The X coordinate of the point to test.\n * @param y - The Y coordinate of the point to test.\n * @returns - Whether the x/y coordinates are within this polygon.\n */\n public contains(x: number, y: number): boolean\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 /**\n * Checks whether the x and y coordinates given are contained within this polygon including the stroke.\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @param strokeWidth - The width of the line to check\n * @returns Whether the x/y coordinates are within this polygon\n */\n public strokeContains(x: number, y: number, strokeWidth: number): boolean\n {\n const halfStrokeWidth = strokeWidth / 2;\n const halfStrokeWidthSqrd = halfStrokeWidth * halfStrokeWidth;\n const { points } = this;\n const iterationLength = points.length - (this.closePath ? 0 : 2);\n\n for (let i = 0; i < iterationLength; i += 2)\n {\n const x1 = points[i];\n const y1 = points[i + 1];\n const x2 = points[(i + 2) % points.length];\n const y2 = points[(i + 3) % points.length];\n\n const distanceSqrd = squaredDistanceToLineSegment(x, y, x1, y1, x2, y2);\n\n if (distanceSqrd <= halfStrokeWidthSqrd)\n {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Returns the framing rectangle of the polygon as a Rectangle object\n * @param out - optional rectangle to store the result\n * @returns The framing rectangle\n */\n public getBounds(out?: Rectangle): Rectangle\n {\n out = out || new Rectangle();\n\n const points = this.points;\n\n let minX = Infinity;\n let maxX = -Infinity;\n\n let minY = Infinity;\n let maxY = -Infinity;\n\n for (let i = 0, n = points.length; i < n; i += 2)\n {\n const x = points[i];\n const y = points[i + 1];\n\n minX = x < minX ? x : minX;\n maxX = x > maxX ? x : maxX;\n\n minY = y < minY ? y : minY;\n maxY = y > maxY ? y : maxY;\n }\n\n out.x = minX;\n out.width = maxX - minX;\n\n out.y = minY;\n out.height = maxY - minY;\n\n return out;\n }\n\n /**\n * Copies another polygon to this one.\n * @param polygon - The polygon to copy from.\n * @returns Returns itself.\n */\n public copyFrom(polygon: Polygon): this\n {\n this.points = polygon.points.slice();\n this.closePath = polygon.closePath;\n\n return this;\n }\n\n /**\n * Copies this polygon to another one.\n * @param polygon - The polygon to copy to.\n * @returns Returns given parameter.\n */\n public copyTo(polygon: Polygon): Polygon\n {\n polygon.copyFrom(this);\n\n return polygon;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:Polygon`\n + `closeStroke=${this.closePath}`\n + `points=${this.points.reduce((pointsDesc, currentPoint) => `${pointsDesc}, ${currentPoint}`, '')}]`;\n }\n // #endif\n\n /**\n * Get the last X coordinate of the polygon\n * @readonly\n */\n get lastX(): number\n {\n return this.points[this.points.length - 2];\n }\n\n /**\n * Get the last Y coordinate of the polygon\n * @readonly\n */\n get lastY(): number\n {\n return this.points[this.points.length - 1];\n }\n\n /**\n * Get the first X coordinate of the polygon\n * @readonly\n */\n get x(): number\n {\n return this.points[this.points.length - 2];\n }\n /**\n * Get the first Y coordinate of the polygon\n * @readonly\n */\n get y(): number\n {\n return this.points[this.points.length - 1];\n }\n}\n\n","import { Rectangle } from './Rectangle';\n\nimport type { ShapePrimitive } from './ShapePrimitive';\n\n// Check corner within stroke width\nconst isCornerWithinStroke = (\n pX: number,\n pY: number,\n cornerX: number,\n cornerY: number,\n radius: number,\n halfStrokeWidth: number\n) =>\n{\n const dx = pX - cornerX;\n const dy = pY - cornerY;\n const distance = Math.sqrt((dx * dx) + (dy * dy));\n\n return distance >= radius - halfStrokeWidth && distance <= radius + halfStrokeWidth;\n};\n\n/**\n * The `RoundedRectangle` 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`, including a `radius` property that\n * defines the radius of the rounded corners.\n * @memberof maths\n */\nexport class RoundedRectangle implements ShapePrimitive\n{\n /**\n * The X coordinate of the upper-left corner of the rounded rectangle\n * @default 0\n */\n public x: number;\n\n /**\n * The Y coordinate of the upper-left corner of the rounded rectangle\n * @default 0\n */\n public y: number;\n\n /**\n * The overall width of this rounded rectangle\n * @default 0\n */\n public width: number;\n\n /**\n * The overall height of this rounded rectangle\n * @default 0\n */\n public height: number;\n\n /**\n * Controls the radius of the rounded corners\n * @default 20\n */\n public radius: number;\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n * @default 'roundedRectangle'\n */\n public readonly type = 'roundedRectangle';\n\n /**\n * @param x - The X coordinate of the upper-left corner of the rounded rectangle\n * @param y - The Y coordinate of the upper-left corner of the rounded rectangle\n * @param width - The overall width of this rounded rectangle\n * @param height - The overall height of this rounded rectangle\n * @param radius - Controls the radius of the rounded corners\n */\n constructor(x = 0, y = 0, width = 0, height = 0, radius = 20)\n {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.radius = radius;\n }\n\n /**\n * Returns the framing rectangle of the rounded rectangle as a Rectangle object\n * @param out - optional rectangle to store the result\n * @returns The framing rectangle\n */\n public getBounds(out?: Rectangle): Rectangle\n {\n out = out || new Rectangle();\n\n out.x = this.x;\n out.y = this.y;\n out.width = this.width;\n out.height = this.height;\n\n return out;\n }\n\n /**\n * Creates a clone of this Rounded Rectangle.\n * @returns - A copy of the rounded rectangle.\n */\n public clone(): RoundedRectangle\n {\n return new RoundedRectangle(this.x, this.y, this.width, this.height, this.radius);\n }\n\n /**\n * Copies another rectangle to this one.\n * @param rectangle - The rectangle to copy from.\n * @returns Returns itself.\n */\n public copyFrom(rectangle: RoundedRectangle): this\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 * Copies this rectangle to another one.\n * @param rectangle - The rectangle to copy to.\n * @returns Returns given parameter.\n */\n public copyTo(rectangle: RoundedRectangle): RoundedRectangle\n {\n rectangle.copyFrom(this);\n\n return rectangle;\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this Rounded Rectangle\n * @param x - The X coordinate of the point to test.\n * @param y - The Y coordinate of the point to test.\n * @returns - Whether the x/y coordinates are within this Rounded Rectangle.\n */\n public contains(x: number, y: number): boolean\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 const radius = Math.max(0, Math.min(this.radius, Math.min(this.width, this.height) / 2));\n\n if ((y >= this.y + radius && y <= this.y + this.height - radius)\n || (x >= this.x + radius && x <= this.x + this.width - radius))\n {\n return true;\n }\n let dx = x - (this.x + radius);\n let dy = y - (this.y + radius);\n const radius2 = radius * radius;\n\n if ((dx * dx) + (dy * dy) <= radius2)\n {\n return true;\n }\n dx = x - (this.x + this.width - radius);\n if ((dx * dx) + (dy * dy) <= radius2)\n {\n return true;\n }\n dy = y - (this.y + this.height - radius);\n if ((dx * dx) + (dy * dy) <= radius2)\n {\n return true;\n }\n dx = x - (this.x + radius);\n if ((dx * dx) + (dy * dy) <= radius2)\n {\n return true;\n }\n }\n }\n\n return false;\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this rectangle including the stroke.\n * @param pX - The X coordinate of the point to test\n * @param pY - The Y coordinate of the point to test\n * @param strokeWidth - The width of the line to check\n * @returns Whether the x/y coordinates are within this rectangle\n */\n public strokeContains(pX: number, pY: number, strokeWidth: number): boolean\n {\n const { x, y, width, height, radius } = this;\n\n const halfStrokeWidth = strokeWidth / 2;\n const innerX = x + radius;\n const innerY = y + radius;\n const innerWidth = width - (radius * 2);\n const innerHeight = height - (radius * 2);\n const rightBound = x + width;\n const bottomBound = y + height;\n\n // Check if point is within the vertical edges (excluding corners)\n if (((pX >= x - halfStrokeWidth && pX <= x + halfStrokeWidth)\n || (pX >= rightBound - halfStrokeWidth && pX <= rightBound + halfStrokeWidth))\n && pY >= innerY && pY <= innerY + innerHeight)\n {\n return true;\n }\n\n // Check if point is within the horizontal edges (excluding corners)\n if (((pY >= y - halfStrokeWidth && pY <= y + halfStrokeWidth)\n || (pY >= bottomBound - halfStrokeWidth && pY <= bottomBound + halfStrokeWidth))\n && pX >= innerX && pX <= innerX + innerWidth)\n {\n return true;\n }\n\n // Top-left, top-right, bottom-right, bottom-left corners\n return (\n // Top-left\n (pX < innerX && pY < innerY\n && isCornerWithinStroke(pX, pY, innerX, innerY, radius, halfStrokeWidth))\n // top-right\n || (pX > rightBound - radius && pY < innerY\n && isCornerWithinStroke(pX, pY, rightBound - radius, innerY, radius, halfStrokeWidth))\n // bottom-right\n || (pX > rightBound - radius && pY > bottomBound - radius\n && isCornerWithinStroke(pX, pY, rightBound - radius, bottomBound - radius, radius, halfStrokeWidth))\n // bottom-left\n || (pX < innerX && pY > bottomBound - radius\n && isCornerWithinStroke(pX, pY, innerX, bottomBound - radius, radius, halfStrokeWidth)));\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}`\n + `width=${this.width} height=${this.height} radius=${this.radius}]`;\n }\n // #endif\n}\n","// thanks to https://github.com/mattdesl/adaptive-bezier-curve\n// for the original code!\n\nimport { GraphicsContextSystem } from '../GraphicsContextSystem';\n\nconst RECURSION_LIMIT = 8;\nconst FLT_EPSILON = 1.19209290e-7;\nconst PATH_DISTANCE_EPSILON = 1.0;\n\nconst curveAngleToleranceEpsilon = 0.01;\nconst mAngleTolerance = 0;\nconst mCuspLimit = 0;\n\nexport function buildAdaptiveBezier(\n points: number[],\n sX: number, sY: number,\n cp1x: number, cp1y: number,\n cp2x: number, cp2y: number,\n eX: number, eY: number,\n smoothness?: number,\n)\n{\n // TODO expose as a parameter\n const scale = 1;\n const smoothing = Math.min(\n 0.99, // a value of 1.0 actually inverts smoothing, so we cap it at 0.99\n Math.max(0, smoothness ?? GraphicsContextSystem.defaultOptions.bezierSmoothness)\n );\n let distanceTolerance = (PATH_DISTANCE_EPSILON - smoothing) / scale;\n\n distanceTolerance *= distanceTolerance;\n begin(sX, sY, cp1x, cp1y, cp2x, cp2y, eX, eY, points, distanceTolerance);\n\n return points;\n}\n\n// //// Based on:\n// //// https://github.com/pelson/antigrain/blob/master/agg-2.4/src/agg_curves.cpp\n\nfunction begin(\n sX: number, sY: number,\n cp1x: number, cp1y: number,\n cp2x: number, cp2y: number,\n eX: number, eY: number,\n points: number[],\n distanceTolerance: number\n)\n{\n // dont need to actually ad this!\n // points.push(sX, sY);\n recursive(sX, sY, cp1x, cp1y, cp2x, cp2y, eX, eY, points, distanceTolerance, 0);\n points.push(eX, eY);\n}\n\n// eslint-disable-next-line max-params\nfunction recursive(\n x1: number, y1: number,\n x2: number, y2: number,\n x3: number, y3: number,\n x4: number, y4: number,\n points: number[],\n distanceTolerance: number,\n level: number)\n{\n if (level > RECURSION_LIMIT)\n { return; }\n\n const pi = Math.PI;\n\n // Calculate all the mid-points of the line segments\n // ----------------------\n const x12 = (x1 + x2) / 2;\n const y12 = (y1 + y2) / 2;\n const x23 = (x2 + x3) / 2;\n const y23 = (y2 + y3) / 2;\n const x34 = (x3 + x4) / 2;\n const y34 = (y3 + y4) / 2;\n const x123 = (x12 + x23) / 2;\n const y123 = (y12 + y23) / 2;\n const x234 = (x23 + x34) / 2;\n const y234 = (y23 + y34) / 2;\n const x1234 = (x123 + x234) / 2;\n const y1234 = (y123 + y234) / 2;\n\n if (level > 0)\n { // Enforce subdivision first time\n // Try to approximate the full cubic curve by a single straight line\n // ------------------\n let dx = x4 - x1;\n let dy = y4 - y1;\n\n const d2 = Math.abs(((x2 - x4) * dy) - ((y2 - y4) * dx));\n const d3 = Math.abs(((x3 - x4) * dy) - ((y3 - y4) * dx));\n\n let da1; let da2;\n\n if (d2 > FLT_EPSILON && d3 > FLT_EPSILON)\n {\n // Regular care\n // -----------------\n if ((d2 + d3) * (d2 + d3) <= distanceTolerance * ((dx * dx) + (dy * dy)))\n {\n // If the curvature doesn't exceed the distanceTolerance value\n // we tend to finish subdivisions.\n // ----------------------\n if (mAngleTolerance < curveAngleToleranceEpsilon)\n {\n points.push(x1234, y1234);\n\n return;\n }\n\n // Angle & Cusp Condition\n // ----------------------\n const a23 = Math.atan2(y3 - y2, x3 - x2);\n\n da1 = Math.abs(a23 - Math.atan2(y2 - y1, x2 - x1));\n da2 = Math.abs(Math.atan2(y4 - y3, x4 - x3) - a23);\n if (da1 >= pi) da1 = (2 * pi) - da1;\n if (da2 >= pi) da2 = (2 * pi) - da2;\n\n if (da1 + da2 < mAngleTolerance)\n {\n // Finally we can stop the recursion\n // ----------------------\n points.push(x1234, y1234);\n\n return;\n }\n\n if (mCuspLimit !== 0.0)\n {\n if (da1 > mCuspLimit)\n {\n points.push(x2, y2);\n\n return;\n }\n\n if (da2 > mCuspLimit)\n {\n points.push(x3, y3);\n\n return;\n }\n }\n }\n }\n else if (d2 > FLT_EPSILON)\n {\n // p1,p3,p4 are collinear, p2 is considerable\n // ----------------------\n if (d2 * d2 <= distanceTolerance * ((dx * dx) + (dy * dy)))\n {\n if (mAngleTolerance < curveAngleToleranceEpsilon)\n {\n points.push(x1234, y1234);\n\n return;\n }\n\n // Angle Condition\n // ----------------------\n da1 = Math.abs(Math.atan2(y3 - y2, x3 - x2) - Math.atan2(y2 - y1, x2 - x1));\n if (da1 >= pi) da1 = (2 * pi) - da1;\n\n if (da1 < mAngleTolerance)\n {\n points.push(x2, y2);\n points.push(x3, y3);\n\n return;\n }\n\n if (mCuspLimit !== 0.0)\n {\n if (da1 > mCuspLimit)\n {\n points.push(x2, y2);\n\n return;\n }\n }\n }\n }\n else if (d3 > FLT_EPSILON)\n {\n // p1,p2,p4 are collinear, p3 is considerable\n // ----------------------\n if (d3 * d3 <= distanceTolerance * ((dx * dx) + (dy * dy)))\n {\n if (mAngleTolerance < curveAngleToleranceEpsilon)\n {\n points.push(x1234, y1234);\n\n return;\n }\n\n // Angle Condition\n // ----------------------\n da1 = Math.abs(Math.atan2(y4 - y3, x4 - x3) - Math.atan2(y3 - y2, x3 - x2));\n if (da1 >= pi) da1 = (2 * pi) - da1;\n\n if (da1 < mAngleTolerance)\n {\n points.push(x2, y2);\n points.push(x3, y3);\n\n return;\n }\n\n if (mCuspLimit !== 0.0)\n {\n if (da1 > mCuspLimit)\n {\n points.push(x3, y3);\n\n return;\n }\n }\n }\n }\n else\n {\n // Collinear case\n // -----------------\n dx = x1234 - ((x1 + x4) / 2);\n dy = y1234 - ((y1 + y4) / 2);\n if ((dx * dx) + (dy * dy) <= distanceTolerance)\n {\n points.push(x1234, y1234);\n\n return;\n }\n }\n }\n\n // Continue subdivision\n // ----------------------\n recursive(x1, y1, x12, y12, x123, y123, x1234, y1234, points, distanceTolerance, level + 1);\n recursive(x1234, y1234, x234, y234, x34, y34, x4, y4, points, distanceTolerance, level + 1);\n}\n\n","// thanks to https://github.com/mattdesl/adaptive-quadratic-curve\n// for the original code!\n\nimport { GraphicsContextSystem } from '../GraphicsContextSystem';\n\nconst RECURSION_LIMIT = 8;\nconst FLT_EPSILON = 1.19209290e-7;\nconst PATH_DISTANCE_EPSILON = 1.0;\n\nconst curveAngleToleranceEpsilon = 0.01;\nconst mAngleTolerance = 0;\n\nexport function buildAdaptiveQuadratic(\n points: number[],\n sX: number, sY: number,\n cp1x: number, cp1y: number,\n eX: number, eY: number,\n smoothness?: number,\n)\n{\n const scale = 1.0;\n const smoothing = Math.min(\n 0.99, // a value of 1.0 actually inverts smoothing, so we cap it at 0.99\n Math.max(0, smoothness ?? GraphicsContextSystem.defaultOptions.bezierSmoothness)\n );\n let distanceTolerance = (PATH_DISTANCE_EPSILON - smoothing) / scale;\n\n distanceTolerance *= distanceTolerance;\n begin(sX, sY, cp1x, cp1y, eX, eY, points, distanceTolerance);\n\n return points;\n}\n\n// //// Based on:\n// //// https://github.com/pelson/antigrain/blob/master/agg-2.4/src/agg_curves.cpp\n\nfunction begin(\n sX: number, sY: number,\n cp1x: number, cp1y: number,\n eX: number, eY: number,\n points: number[],\n distanceTolerance: number\n)\n{\n recursive(points, sX, sY, cp1x, cp1y, eX, eY, distanceTolerance, 0);\n\n points.push(eX, eY);\n}\n\nfunction recursive(\n points: number[],\n x1: number, y1: number,\n x2: number, y2: number,\n x3: number, y3: number,\n distanceTolerance: number,\n level: number\n)\n{\n if (level > RECURSION_LIMIT)\n { return; }\n\n const pi = Math.PI;\n\n // Calculate all the mid-points of the line segments\n // ----------------------\n const x12 = (x1 + x2) / 2;\n const y12 = (y1 + y2) / 2;\n const x23 = (x2 + x3) / 2;\n const y23 = (y2 + y3) / 2;\n const x123 = (x12 + x23) / 2;\n const y123 = (y12 + y23) / 2;\n\n let dx = x3 - x1;\n let dy = y3 - y1;\n const d = Math.abs((((x2 - x3) * dy) - ((y2 - y3) * dx)));\n\n if (d > FLT_EPSILON)\n {\n // Regular care\n // -----------------\n if (d * d <= distanceTolerance * ((dx * dx) + (dy * dy)))\n {\n // If the curvature doesn't exceed the distance_tolerance value\n // we tend to finish subdivisions.\n // ----------------------\n if (mAngleTolerance < curveAngleToleranceEpsilon)\n {\n points.push(x123, y123);\n\n return;\n }\n\n // Angle & Cusp Condition\n // ----------------------\n let da = Math.abs(Math.atan2(y3 - y2, x3 - x2) - Math.atan2(y2 - y1, x2 - x1));\n\n if (da >= pi) da = (2 * pi) - da;\n\n if (da < mAngleTolerance)\n {\n // Finally we can stop the recursion\n // ----------------------\n points.push(x123, y123);\n\n return;\n }\n }\n }\n else\n {\n // Collinear case\n // -----------------\n dx = x123 - ((x1 + x3) / 2);\n dy = y123 - ((y1 + y3) / 2);\n if ((dx * dx) + (dy * dy) <= distanceTolerance)\n {\n points.push(x123, y123);\n\n return;\n }\n }\n\n // Continue subdivision\n // ----------------------\n recursive(points, x1, y1, x12, y12, x123, y123, distanceTolerance, level + 1);\n recursive(points, x123, y123, x23, y23, x3, y3, distanceTolerance, level + 1);\n}\n\n","export function buildArc(\n points: number[],\n x: number, y: number,\n radius: number,\n start: number,\n end: number,\n clockwise: boolean,\n steps?: number\n)\n{\n // determine distance between the two angles\n // ...probably a nicer way of writing this\n let dist = Math.abs(start - end);\n\n if (!clockwise && start > end)\n {\n dist = (2 * Math.PI) - dist;\n }\n else if (clockwise && end > start)\n {\n dist = (2 * Math.PI) - dist;\n }\n\n // approximate the # of steps using the cube root of the radius\n\n steps = steps || Math.max(6, Math.floor(6 * Math.pow(radius, 1 / 3) * (dist / (Math.PI))));\n\n // ensure we have at least 3 steps..\n steps = Math.max(steps, 3);\n\n let f = dist / (steps);\n let t = start;\n\n // modify direction\n f *= clockwise ? -1 : 1;\n\n for (let i = 0; i < steps + 1; i++)\n {\n const cs = Math.cos(t);\n const sn = Math.sin(t);\n\n const nx = x + (cs * radius);\n const ny = y + (sn * radius);\n\n points.push(nx, ny);\n\n t += f;\n }\n}\n","import { buildArc } from './buildArc';\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 * @param points\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param radius\n */\nexport function buildArcTo(\n points: number[],\n x1: number, y1: number,\n x2: number, y2: number,\n radius: number,\n): void\n{\n const fromX = points[points.length - 2];\n const fromY = points[points.length - 1];\n\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 return;\n }\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 buildArc(points,\n (cx + x1),\n (cy + y1),\n radius,\n startAngle,\n endAngle,\n b1 * a2 > b2 * a1\n );\n}\n","import { buildAdaptiveBezier } from './buildAdaptiveBezier';\n\nconst TAU = Math.PI * 2;\n\nconst out = {\n centerX: 0,\n centerY: 0,\n ang1: 0,\n ang2: 0\n};\n\nconst mapToEllipse = (\n { x, y }: {x: number, y: number},\n rx: number, ry: number,\n cosPhi: number, sinPhi: number,\n centerX: number, centerY: number,\n out: {x: number, y: number}\n): {x: number, y: number} =>\n{\n x *= rx;\n y *= ry;\n\n const xp = (cosPhi * x) - (sinPhi * y);\n const yp = (sinPhi * x) + (cosPhi * y);\n\n out.x = xp + centerX;\n out.y = yp + centerY;\n\n return out;\n};\n\nfunction approxUnitArc(ang1: number, ang2: number): {x: number, y: number}[]\n{\n // If 90 degree circular arc, use a constant\n // as derived from http://spencermortensen.com/articles/bezier-circle\n\n const a1 = ang2 === -1.5707963267948966 ? -0.551915024494 : 4 / 3 * Math.tan(ang2 / 4);\n\n const a = ang2 === 1.5707963267948966 ? 0.551915024494 : a1;\n\n const x1 = Math.cos(ang1);\n const y1 = Math.sin(ang1);\n const x2 = Math.cos(ang1 + ang2);\n const y2 = Math.sin(ang1 + ang2);\n\n return [\n {\n x: x1 - (y1 * a),\n y: y1 + (x1 * a)\n },\n {\n x: x2 + (y2 * a),\n y: y2 - (x2 * a)\n },\n {\n x: x2,\n y: y2\n }\n ];\n}\n\nconst vectorAngle = (ux: number, uy: number, vx: number, vy: number) =>\n{\n const sign = ((ux * vy) - (uy * vx) < 0) ? -1 : 1;\n\n let dot = (ux * vx) + (uy * vy);\n\n if (dot > 1)\n {\n dot = 1;\n }\n\n if (dot < -1)\n {\n dot = -1;\n }\n\n return sign * Math.acos(dot);\n};\n\nconst getArcCenter = (\n px: number,\n py: number,\n cx: number,\n cy: number,\n rx: number,\n ry: number,\n largeArcFlag: number,\n sweepFlag: number,\n sinPhi: number,\n cosPhi: number,\n pxp: number,\n pyp: number,\n out: {\n centerX: number,\n centerY: number,\n ang1: number,\n ang2: number\n }\n// eslint-disable-next-line max-params\n) =>\n{\n const rxSq = Math.pow(rx, 2);\n const rySq = Math.pow(ry, 2);\n const pxpSq = Math.pow(pxp, 2);\n const pypSq = Math.pow(pyp, 2);\n\n let radicant = (rxSq * rySq) - (rxSq * pypSq) - (rySq * pxpSq);\n\n if (radicant < 0)\n {\n radicant = 0;\n }\n\n radicant /= (rxSq * pypSq) + (rySq * pxpSq);\n radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1);\n\n const centerXp = radicant * rx / ry * pyp;\n const centerYp = radicant * -ry / rx * pxp;\n\n const centerX = (cosPhi * centerXp) - (sinPhi * centerYp) + ((px + cx) / 2);\n const centerY = (sinPhi * centerXp) + (cosPhi * centerYp) + ((py + cy) / 2);\n\n const vx1 = (pxp - centerXp) / rx;\n const vy1 = (pyp - centerYp) / ry;\n const vx2 = (-pxp - centerXp) / rx;\n const vy2 = (-pyp - centerYp) / ry;\n\n const ang1 = vectorAngle(1, 0, vx1, vy1);\n let ang2 = vectorAngle(vx1, vy1, vx2, vy2);\n\n if (sweepFlag === 0 && ang2 > 0)\n {\n ang2 -= TAU;\n }\n\n if (sweepFlag === 1 && ang2 < 0)\n {\n ang2 += TAU;\n }\n\n out.centerX = centerX;\n out.centerY = centerY;\n out.ang1 = ang1;\n out.ang2 = ang2;\n};\n\nexport function buildArcToSvg(\n points: number[],\n px: number,\n py: number,\n cx: number,\n cy: number,\n rx: number,\n ry: number,\n xAxisRotation = 0,\n largeArcFlag = 0,\n sweepFlag = 0\n): void\n{\n if (rx === 0 || ry === 0)\n {\n return;\n }\n\n const sinPhi = Math.sin(xAxisRotation * TAU / 360);\n const cosPhi = Math.cos(xAxisRotation * TAU / 360);\n\n const pxp = (cosPhi * (px - cx) / 2) + (sinPhi * (py - cy) / 2);\n const pyp = (-sinPhi * (px - cx) / 2) + (cosPhi * (py - cy) / 2);\n\n if (pxp === 0 && pyp === 0)\n {\n return;\n }\n\n rx = Math.abs(rx);\n ry = Math.abs(ry);\n\n const lambda = (Math.pow(pxp, 2) / Math.pow(rx, 2)) + (Math.pow(pyp, 2) / Math.pow(ry, 2));\n\n if (lambda > 1)\n {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n\n getArcCenter(\n px,\n py,\n cx,\n cy,\n rx,\n ry,\n largeArcFlag,\n sweepFlag,\n sinPhi,\n cosPhi,\n pxp,\n pyp,\n out\n );\n\n let { ang1, ang2 } = out;\n const { centerX, centerY } = out;\n\n // If 'ang2' == 90.0000000001, then `ratio` will devalue to\n // 1.0000000001. This causes `segments` to be greater than one, which is an\n // unnecessary split, and adds extra points to the bezier curve. To alleviate\n // this issue, we round to 1.0 when the ratio is close to 1.0.\n let ratio = Math.abs(ang2) / (TAU / 4);\n\n if (Math.abs(1.0 - ratio) < 0.0000001)\n {\n ratio = 1.0;\n }\n\n const segments = Math.max(Math.ceil(ratio), 1);\n\n ang2 /= segments;\n\n let lastX = points[points.length - 2];\n let lastY = points[points.length - 1];\n\n const outCurvePoint = { x: 0, y: 0 };\n\n for (let i = 0; i < segments; i++)\n {\n const curve = approxUnitArc(ang1, ang2);\n\n const { x: x1, y: y1 } = mapToEllipse(curve[0], rx, ry, cosPhi, sinPhi, centerX, centerY, outCurvePoint);\n const { x: x2, y: y2 } = mapToEllipse(curve[1], rx, ry, cosPhi, sinPhi, centerX, centerY, outCurvePoint);\n const { x, y } = mapToEllipse(curve[2], rx, ry, cosPhi, sinPhi, centerX, centerY, outCurvePoint);\n\n buildAdaptiveBezier(\n points,\n lastX, lastY,\n x1, y1, x2, y2, x, y\n );\n\n lastX = x;\n lastY = y;\n\n ang1 += ang2;\n }\n}\n","import type { PointData } from '../../../../maths/point/PointData';\nimport type { ShapePath } from './ShapePath';\n\n/**\n * Typed and cleaned up version of:\n * https://stackoverflow.com/questions/44855794/html5-canvas-triangle-with-rounded-corners/44856925#44856925\n * @param g - Graphics to be drawn on.\n * @param points - Corners of the shape to draw. Minimum length is 3.\n * @param radius - Corners default radius.\n * @ignore\n */\nexport function roundedShapeArc(\n g: ShapePath,\n points: RoundedPoint[],\n radius: number\n): void\n{\n const vecFrom = (p: PointData, pp: PointData) =>\n {\n const x = pp.x - p.x;\n const y = pp.y - p.y;\n const len = Math.sqrt((x * x) + (y * y));\n const nx = x / len;\n const ny = y / len;\n\n return { len, nx, ny };\n };\n\n const sharpCorner = (i: number, p: PointData) =>\n {\n if (i === 0)\n {\n g.moveTo(p.x, p.y);\n }\n else\n {\n g.lineTo(p.x, p.y);\n }\n };\n\n let p1 = points[points.length - 1];\n\n for (let i = 0; i < points.length; i++)\n {\n const p2 = points[i % points.length];\n const pRadius = p2.radius ?? radius;\n\n if (pRadius <= 0)\n {\n sharpCorner(i, p2);\n p1 = p2;\n continue;\n }\n\n const p3 = points[(i + 1) % points.length];\n const v1 = vecFrom(p2, p1);\n const v2 = vecFrom(p2, p3);\n\n if (v1.len < 1e-4 || v2.len < 1e-4)\n {\n sharpCorner(i, p2);\n p1 = p2;\n continue;\n }\n\n let angle = Math.asin((v1.nx * v2.ny) - (v1.ny * v2.nx));\n let radDirection = 1;\n let drawDirection = false;\n\n if ((v1.nx * v2.nx) - (v1.ny * -v2.ny) < 0)\n {\n if (angle < 0)\n {\n angle = Math.PI + angle;\n }\n else\n {\n angle = Math.PI - angle;\n radDirection = -1;\n drawDirection = true;\n }\n }\n else if (angle > 0)\n {\n radDirection = -1;\n drawDirection = true;\n }\n\n const halfAngle = angle / 2;\n\n let cRadius: number;\n let lenOut = Math.abs(\n (Math.cos(halfAngle) * pRadius) / Math.sin(halfAngle)\n );\n\n if (lenOut > Math.min(v1.len / 2, v2.len / 2))\n {\n lenOut = Math.min(v1.len / 2, v2.len / 2);\n cRadius = Math.abs((lenOut * Math.sin(halfAngle)) / Math.cos(halfAngle));\n }\n else\n {\n cRadius = pRadius;\n }\n\n const cX = p2.x + (v2.nx * lenOut) + (-v2.ny * cRadius * radDirection);\n const cY = p2.y + (v2.ny * lenOut) + (v2.nx * cRadius * radDirection);\n const startAngle = Math.atan2(v1.ny, v1.nx) + ((Math.PI / 2) * radDirection);\n const endAngle = Math.atan2(v2.ny, v2.nx) - ((Math.PI / 2) * radDirection);\n\n if (i === 0)\n {\n g.moveTo(\n cX + (Math.cos(startAngle) * cRadius),\n cY + (Math.sin(startAngle) * cRadius)\n );\n }\n\n g.arc(cX, cY, cRadius, startAngle, endAngle, drawDirection);\n\n p1 = p2;\n }\n}\n\nexport type RoundedPoint = PointData & { radius?: number };\n\n/**\n * Typed and cleaned up version of:\n * https://stackoverflow.com/questions/44855794/html5-canvas-triangle-with-rounded-corners/56214413#56214413\n * @param g - Graphics to be drawn on.\n * @param points - Corners of the shape to draw. Minimum length is 3.\n * @param radius - Corners default radius.\n * @ignore\n */\nexport function roundedShapeQuadraticCurve(\n g: ShapePath,\n points: RoundedPoint[],\n radius: number,\n smoothness?: number,\n): void\n{\n const distance = (p1: PointData, p2: PointData) =>\n Math.sqrt(((p1.x - p2.x) ** 2) + ((p1.y - p2.y) ** 2));\n\n const pointLerp = (p1: PointData, p2: PointData, t: number) => ({\n x: p1.x + ((p2.x - p1.x) * t),\n y: p1.y + ((p2.y - p1.y) * t),\n });\n\n const numPoints = points.length;\n\n for (let i = 0; i < numPoints; i++)\n {\n const thisPoint = points[(i + 1) % numPoints];\n const pRadius = thisPoint.radius ?? radius;\n\n if (pRadius <= 0)\n {\n if (i === 0)\n {\n g.moveTo(thisPoint.x, thisPoint.y);\n }\n else\n {\n g.lineTo(thisPoint.x, thisPoint.y);\n }\n\n continue;\n }\n\n const lastPoint = points[i];\n const nextPoint = points[(i + 2) % numPoints];\n\n const lastEdgeLength = distance(lastPoint, thisPoint);\n let start;\n\n if (lastEdgeLength < 1e-4)\n {\n start = thisPoint;\n }\n else\n {\n const lastOffsetDistance = Math.min(lastEdgeLength / 2, pRadius);\n\n start = pointLerp(\n thisPoint,\n lastPoint,\n lastOffsetDistance / lastEdgeLength\n );\n }\n\n const nextEdgeLength = distance(nextPoint, thisPoint);\n let end;\n\n if (nextEdgeLength < 1e-4)\n {\n end = thisPoint;\n }\n else\n {\n const nextOffsetDistance = Math.min(nextEdgeLength / 2, pRadius);\n\n end = pointLerp(\n thisPoint,\n nextPoint,\n nextOffsetDistance / nextEdgeLength\n );\n }\n\n if (i === 0)\n {\n g.moveTo(start.x, start.y);\n }\n else\n {\n g.lineTo(start.x, start.y);\n }\n g.quadraticCurveTo(thisPoint.x, thisPoint.y, end.x, end.y, smoothness);\n }\n}\n","// a shape lets you build out a shape with lines and curves and primitives..\n\nimport { Circle } from '../../../../maths/shapes/Circle';\nimport { Ellipse } from '../../../../maths/shapes/Ellipse';\nimport { Polygon } from '../../../../maths/shapes/Polygon';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { RoundedRectangle } from '../../../../maths/shapes/RoundedRectangle';\nimport { Bounds } from '../../../container/bounds/Bounds';\nimport { buildAdaptiveBezier } from '../buildCommands/buildAdaptiveBezier';\nimport { buildAdaptiveQuadratic } from '../buildCommands/buildAdaptiveQuadratic';\nimport { buildArc } from '../buildCommands/buildArc';\nimport { buildArcTo } from '../buildCommands/buildArcTo';\nimport { buildArcToSvg } from '../buildCommands/buildArcToSvg';\nimport { roundedShapeArc, roundedShapeQuadraticCurve } from './roundShape';\n\nimport type { Matrix } from '../../../../maths/matrix/Matrix';\nimport type { PointData } from '../../../../maths/point/PointData';\nimport type { ShapePrimitive } from '../../../../maths/shapes/ShapePrimitive';\nimport type { GraphicsPath } from './GraphicsPath';\nimport type { RoundedPoint } from './roundShape';\n\nconst tempRectangle = new Rectangle();\n\n/**\n * The `ShapePath` class acts as a bridge between high-level drawing commands\n * and the lower-level `GraphicsContext` rendering engine.\n * It translates drawing commands, such as those for creating lines, arcs, ellipses, rectangles, and complex polygons, into a\n * format that can be efficiently processed by a `GraphicsContext`. This includes handling path starts,\n * ends, and transformations for shapes.\n *\n * It is used internally by `GraphicsPath` to build up the path.\n * @memberof scene\n */\nexport class ShapePath\n{\n /** The list of shape primitives that make up the path. */\n public shapePrimitives: { shape: ShapePrimitive, transform?: Matrix }[] = [];\n private _currentPoly: Polygon | null = null;\n private readonly _graphicsPath2D: GraphicsPath;\n private readonly _bounds = new Bounds();\n\n constructor(graphicsPath2D: GraphicsPath)\n {\n this._graphicsPath2D = graphicsPath2D;\n }\n\n /**\n * Sets the starting point for a new sub-path. Any subsequent drawing commands are considered part of this path.\n * @param x - The x-coordinate for the starting point.\n * @param y - The y-coordinate for the starting point.\n * @returns The instance of the current object for chaining.\n */\n public moveTo(x: number, y: number): this\n {\n this.startPoly(x, y);\n\n return this;\n }\n\n /**\n * Connects the current point to a new point with a straight line. This method updates the current path.\n * @param x - The x-coordinate of the new point to connect to.\n * @param y - The y-coordinate of the new point to connect to.\n * @returns The instance of the current object for chaining.\n */\n public lineTo(x: number, y: number): this\n {\n this._ensurePoly();\n\n const points = this._currentPoly.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 }\n\n return this;\n }\n\n /**\n * Adds an arc to the path. The arc is centered at (x, y)\n * position with radius `radius` starting at `startAngle` and ending at `endAngle`.\n * @param x - The x-coordinate of the arc's center.\n * @param y - The y-coordinate of the arc's center.\n * @param radius - The radius of the arc.\n * @param startAngle - The starting angle of the arc, in radians.\n * @param endAngle - The ending angle of the arc, in radians.\n * @param counterclockwise - Specifies whether the arc should be drawn in the anticlockwise direction. False by default.\n * @returns The instance of the current object for chaining.\n */\n public arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise: boolean): this\n {\n // TODO - if its 360 degrees.. make it a circle object?\n\n this._ensurePoly(false);\n\n const points = this._currentPoly.points;\n\n buildArc(points, x, y, radius, startAngle, endAngle, counterclockwise);\n\n return this;\n }\n\n /**\n * Adds an arc to the path with the arc tangent to the line joining two specified points.\n * The arc radius is specified by `radius`.\n * @param x1 - The x-coordinate of the first point.\n * @param y1 - The y-coordinate of the first point.\n * @param x2 - The x-coordinate of the second point.\n * @param y2 - The y-coordinate of the second point.\n * @param radius - The radius of the arc.\n * @returns The instance of the current object for chaining.\n */\n public arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this\n {\n this._ensurePoly();\n\n const points = this._currentPoly.points;\n\n buildArcTo(points, x1, y1, x2, y2, radius);\n\n return this;\n }\n\n /**\n * Adds an SVG-style arc to the path, allowing for elliptical arcs based on the SVG spec.\n * @param rx - The x-radius of the ellipse.\n * @param ry - The y-radius of the ellipse.\n * @param xAxisRotation - The rotation of the ellipse's x-axis relative\n * to the x-axis of the coordinate system, in degrees.\n * @param largeArcFlag - Determines if the arc should be greater than or less than 180 degrees.\n * @param sweepFlag - Determines if the arc should be swept in a positive angle direction.\n * @param x - The x-coordinate of the arc's end point.\n * @param y - The y-coordinate of the arc's end point.\n * @returns The instance of the current object for chaining.\n */\n public arcToSvg(\n rx: number, ry: number,\n xAxisRotation: number, largeArcFlag: number, sweepFlag: number,\n x: number, y: number\n ): this\n {\n const points = this._currentPoly.points;\n\n // this needs to work on both canvas and GPU backends so might want to move this to the Graphics2D path..\n buildArcToSvg(\n points,\n this._currentPoly.lastX,\n this._currentPoly.lastY,\n x,\n y,\n rx,\n ry,\n xAxisRotation,\n largeArcFlag,\n sweepFlag,\n );\n\n return this;\n }\n\n /**\n * Adds a cubic Bezier curve to the path.\n * It requires three points: the first two are control points and the third one is the end point.\n * The starting point is the last point in the current path.\n * @param cp1x - The x-coordinate of the first control point.\n * @param cp1y - The y-coordinate of the first control point.\n * @param cp2x - The x-coordinate of the second control point.\n * @param cp2y - The y-coordinate of the second control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public bezierCurveTo(\n cp1x: number, cp1y: number, cp2x: number, cp2y: number,\n x: number, y: number,\n smoothness?: number\n ): this\n {\n this._ensurePoly();\n\n const currentPoly = this._currentPoly;\n\n // ensure distance from last point to first control point is not too small\n\n // TODO - make this a plugin that people can override..\n buildAdaptiveBezier(\n this._currentPoly.points,\n currentPoly.lastX, currentPoly.lastY,\n cp1x, cp1y, cp2x, cp2y, x, y,\n smoothness,\n );\n\n return this;\n }\n\n /**\n * Adds a quadratic curve to the path. It requires two points: the control point and the end point.\n * The starting point is the last point in the current path.\n * @param cp1x - The x-coordinate of the control point.\n * @param cp1y - The y-coordinate of the control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothing - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public quadraticCurveTo(cp1x: number, cp1y: number, x: number, y: number, smoothing?: number): this\n {\n this._ensurePoly();\n\n const currentPoly = this._currentPoly;\n\n // ensure distance from last point to first control point is not too small\n\n // TODO - make this a plugin that people can override..\n buildAdaptiveQuadratic(\n this._currentPoly.points,\n currentPoly.lastX, currentPoly.lastY,\n cp1x, cp1y, x, y,\n smoothing,\n );\n\n return this;\n }\n\n /**\n * Closes the current path by drawing a straight line back to the start.\n * If the shape is already closed or there are no points in the path, this method does nothing.\n * @returns The instance of the current object for chaining.\n */\n public closePath(): this\n {\n this.endPoly(true);\n\n return this;\n }\n\n /**\n * Adds another path to the current path. This method allows for the combination of multiple paths into one.\n * @param path - The `GraphicsPath` object representing the path to add.\n * @param transform - An optional `Matrix` object to apply a transformation to the path before adding it.\n * @returns The instance of the current object for chaining.\n */\n public addPath(path: GraphicsPath, transform?: Matrix): this\n {\n this.endPoly();\n\n if (transform && !transform.isIdentity())\n {\n path = path.clone(true);\n path.transform(transform);\n }\n\n for (let i = 0; i < path.instructions.length; i++)\n {\n const instruction = path.instructions[i];\n\n // Sorry TS! this is the best we could do...\n this[instruction.action](...(instruction.data as [never, never, never, never, never, never, never]));\n // build out the path points\n }\n\n return this;\n }\n\n /**\n * Finalizes the drawing of the current path. Optionally, it can close the path.\n * @param closePath - A boolean indicating whether to close the path after finishing. False by default.\n */\n public finish(closePath = false)\n {\n this.endPoly(closePath);\n }\n\n /**\n * Draws a rectangle shape. This method adds a new rectangle path to the current drawing.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @param transform - An optional `Matrix` object to apply a transformation to the rectangle.\n * @returns The instance of the current object for chaining.\n */\n public rect(x: number, y: number, w: number, h: number, transform?: Matrix): this\n {\n this.drawShape(new Rectangle(x, y, w, h), transform);\n\n return this;\n }\n\n /**\n * Draws a circle shape. This method adds a new circle path to the current drawing.\n * @param x - The x-coordinate of the center of the circle.\n * @param y - The y-coordinate of the center of the circle.\n * @param radius - The radius of the circle.\n * @param transform - An optional `Matrix` object to apply a transformation to the circle.\n * @returns The instance of the current object for chaining.\n */\n public circle(x: number, y: number, radius: number, transform?: Matrix): this\n {\n this.drawShape(new Circle(x, y, radius), transform);\n\n return this;\n }\n\n /**\n * Draws a polygon shape. This method allows for the creation of complex polygons by specifying a sequence of points.\n * @param points - An array of numbers, or or an array of PointData objects eg [{x,y}, {x,y}, {x,y}]\n * representing the x and y coordinates of the polygon's vertices, in sequence.\n * @param close - A boolean indicating whether to close the polygon path. True by default.\n * @param transform - An optional `Matrix` object to apply a transformation to the polygon.\n * @returns The instance of the current object for chaining.\n */\n public poly(points: number[] | PointData[], close?: boolean, transform?: Matrix): this\n {\n const polygon = new Polygon(points);\n\n polygon.closePath = close;\n\n this.drawShape(polygon, transform);\n\n return this;\n }\n\n /**\n * Draws a regular polygon with a specified number of sides. All sides and angles are equal.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @param transform - An optional `Matrix` object to apply a transformation to the polygon.\n * @returns The instance of the current object for chaining.\n */\n public regularPoly(x: number, y: number, radius: number, sides: number, rotation = 0, transform?: Matrix): this\n {\n sides = Math.max(sides | 0, 3);\n const startAngle = (-1 * Math.PI / 2) + rotation;\n const delta = (Math.PI * 2) / sides;\n const polygon = [];\n\n for (let i = 0; i < sides; i++)\n {\n const angle = (i * delta) + startAngle;\n\n polygon.push(\n x + (radius * Math.cos(angle)),\n y + (radius * Math.sin(angle))\n );\n }\n\n this.poly(polygon, true, transform);\n\n return this;\n }\n\n /**\n * Draws a polygon with rounded corners.\n * Similar to `regularPoly` but with the ability to round the corners of the polygon.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param corner - The radius of the rounding of the corners.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @param smoothness - Optional parameter to adjust the smoothness of the rounding.\n * @returns The instance of the current object for chaining.\n */\n public roundPoly(\n x: number, y: number,\n radius: number,\n sides: number, corner: number,\n rotation = 0,\n smoothness?: number,\n ): this\n {\n sides = Math.max((sides | 0), 3);\n\n if (corner <= 0)\n {\n return this.regularPoly(x, y, radius, sides, rotation);\n }\n\n const sideLength = (radius * Math.sin(Math.PI / sides)) - 0.001;\n\n corner = Math.min(corner, sideLength);\n\n const startAngle = (-1 * Math.PI / 2) + rotation;\n const delta = (Math.PI * 2) / sides;\n const internalAngle = ((sides - 2) * Math.PI) / sides / 2;\n\n for (let i = 0; i < sides; i++)\n {\n const angle = (i * delta) + startAngle;\n const x0 = x + (radius * Math.cos(angle));\n const y0 = y + (radius * Math.sin(angle));\n const a1 = angle + (Math.PI) + internalAngle;\n const a2 = angle - (Math.PI) - internalAngle;\n const x1 = x0 + (corner * Math.cos(a1));\n const y1 = y0 + (corner * Math.sin(a1));\n const x3 = x0 + (corner * Math.cos(a2));\n const y3 = y0 + (corner * Math.sin(a2));\n\n if (i === 0)\n {\n this.moveTo(x1, y1);\n }\n else\n {\n this.lineTo(x1, y1);\n }\n this.quadraticCurveTo(x0, y0, x3, y3, smoothness);\n }\n\n return this.closePath();\n }\n\n /**\n * Draws a shape with rounded corners. This function supports custom radius for each corner of the shape.\n * Optionally, corners can be rounded using a quadratic curve instead of an arc, providing a different aesthetic.\n * @param points - An array of `RoundedPoint` representing the corners of the shape to draw.\n * A minimum of 3 points is required.\n * @param radius - The default radius for the corners.\n * This radius is applied to all corners unless overridden in `points`.\n * @param useQuadratic - If set to true, rounded corners are drawn using a quadraticCurve\n * method instead of an arc method. Defaults to false.\n * @param smoothness - Specifies the smoothness of the curve when `useQuadratic` is true.\n * Higher values make the curve smoother.\n * @returns The instance of the current object for chaining.\n */\n public roundShape(points: RoundedPoint[], radius: number, useQuadratic = false, smoothness?: number): this\n {\n if (points.length < 3)\n {\n return this;\n }\n\n if (useQuadratic)\n {\n roundedShapeQuadraticCurve(this, points, radius, smoothness);\n }\n else\n {\n roundedShapeArc(this, points, radius);\n }\n\n return this.closePath();\n }\n\n /**\n * Draw Rectangle with fillet corners. This is much like rounded rectangle\n * however it support negative numbers as well for the corner radius.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param fillet - accept negative or positive values\n */\n public filletRect(x: number, y: number, width: number, height: number, fillet: number): this\n {\n if (fillet === 0)\n {\n return this.rect(x, y, width, height);\n }\n\n const maxFillet = Math.min(width, height) / 2;\n const inset = Math.min(maxFillet, Math.max(-maxFillet, fillet));\n const right = x + width;\n const bottom = y + height;\n const dir = inset < 0 ? -inset : 0;\n const size = Math.abs(inset);\n\n return this\n .moveTo(x, y + size)\n .arcTo(x + dir, y + dir, x + size, y, size)\n .lineTo(right - size, y)\n .arcTo(right - dir, y + dir, right, y + size, size)\n .lineTo(right, bottom - size)\n .arcTo(right - dir, bottom - dir, x + width - size, bottom, size)\n .lineTo(x + size, bottom)\n .arcTo(x + dir, bottom - dir, x, bottom - size, size)\n .closePath();\n }\n\n /**\n * Draw Rectangle with chamfer corners. These are angled corners.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param chamfer - non-zero real number, size of corner cutout\n * @param transform\n */\n public chamferRect(x: number, y: number, width: number, height: number, chamfer: number, transform?: Matrix): this\n {\n if (chamfer <= 0)\n {\n return this.rect(x, y, width, height);\n }\n\n const inset = Math.min(chamfer, Math.min(width, height) / 2);\n const right = x + width;\n const bottom = y + height;\n const points = [\n x + inset, y,\n right - inset, y,\n right, y + inset,\n right, bottom - inset,\n right - inset, bottom,\n x + inset, bottom,\n x, bottom - inset,\n x, y + inset,\n ];\n\n // Remove overlapping points\n for (let i = points.length - 1; i >= 2; i -= 2)\n {\n if (points[i] === points[i - 2] && points[i - 1] === points[i - 3])\n {\n points.splice(i - 1, 2);\n }\n }\n\n return this.poly(points, true, transform);\n }\n\n /**\n * Draws an ellipse at the specified location and with the given x and y radii.\n * An optional transformation can be applied, allowing for rotation, scaling, and translation.\n * @param x - The x-coordinate of the center of the ellipse.\n * @param y - The y-coordinate of the center of the ellipse.\n * @param radiusX - The horizontal radius of the ellipse.\n * @param radiusY - The vertical radius of the ellipse.\n * @param transform - An optional `Matrix` object to apply a transformation to the ellipse. This can include rotations.\n * @returns The instance of the current object for chaining.\n */\n public ellipse(x: number, y: number, radiusX: number, radiusY: number, transform?: Matrix): this\n {\n // TODO apply rotation to transform...\n\n this.drawShape(new Ellipse(x, y, radiusX, radiusY), transform);\n\n return this;\n }\n\n /**\n * Draws a rectangle with rounded corners.\n * The corner radius can be specified to determine how rounded the corners should be.\n * An optional transformation can be applied, which allows for rotation, scaling, and translation of the rectangle.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @param radius - The radius of the rectangle's corners. If not specified, corners will be sharp.\n * @param transform - An optional `Matrix` object to apply a transformation to the rectangle.\n * @returns The instance of the current object for chaining.\n */\n public roundRect(x: number, y: number, w: number, h: number, radius?: number, transform?: Matrix): this\n {\n this.drawShape(new RoundedRectangle(x, y, w, h, radius), transform);\n\n return this;\n }\n\n /**\n * Draws a given shape on the canvas.\n * This is a generic method that can draw any type of shape specified by the `ShapePrimitive` parameter.\n * An optional transformation matrix can be applied to the shape, allowing for complex transformations.\n * @param shape - The shape to draw, defined as a `ShapePrimitive` object.\n * @param matrix - An optional `Matrix` for transforming the shape. This can include rotations,\n * scaling, and translations.\n * @returns The instance of the current object for chaining.\n */\n public drawShape(shape: ShapePrimitive, matrix?: Matrix): this\n {\n this.endPoly();\n\n this.shapePrimitives.push({ shape, transform: matrix });\n\n return this;\n }\n\n /**\n * Starts a new polygon path from the specified starting point.\n * This method initializes a new polygon or ends the current one if it exists.\n * @param x - The x-coordinate of the starting point of the new polygon.\n * @param y - The y-coordinate of the starting point of the new polygon.\n * @returns The instance of the current object for chaining.\n */\n public startPoly(x: number, y: number): this\n {\n let currentPoly = this._currentPoly;\n\n if (currentPoly)\n {\n this.endPoly();\n }\n\n currentPoly = new Polygon();\n\n currentPoly.points.push(x, y);\n\n this._currentPoly = currentPoly;\n\n return this;\n }\n\n /**\n * Ends the current polygon path. If `closePath` is set to true,\n * the path is closed by connecting the last point to the first one.\n * This method finalizes the current polygon and prepares it for drawing or adding to the shape primitives.\n * @param closePath - A boolean indicating whether to close the polygon by connecting the last point\n * back to the starting point. False by default.\n * @returns The instance of the current object for chaining.\n */\n public endPoly(closePath = false): this\n {\n const shape = this._currentPoly;\n\n if (shape && shape.points.length > 2)\n {\n shape.closePath = closePath;\n\n this.shapePrimitives.push({ shape });\n }\n\n this._currentPoly = null;\n\n return this;\n }\n\n private _ensurePoly(start = true): void\n {\n if (this._currentPoly) return;\n\n this._currentPoly = new Polygon();\n\n if (start)\n {\n // get last points..\n const lastShape = this.shapePrimitives[this.shapePrimitives.length - 1];\n\n if (lastShape)\n {\n // i KNOW its a rect..\n let lx = lastShape.shape.x;\n let ly = lastShape.shape.y;\n\n if (!lastShape.transform.isIdentity())\n {\n const t = lastShape.transform;\n\n const tempX = lx;\n\n lx = (t.a * lx) + (t.c * ly) + t.tx;\n ly = (t.b * tempX) + (t.d * ly) + t.ty;\n }\n\n this._currentPoly.points.push(lx, ly);\n }\n else\n {\n this._currentPoly.points.push(0, 0);\n }\n }\n }\n\n /** Builds the path. */\n public buildPath()\n {\n const path = this._graphicsPath2D;\n\n this.shapePrimitives.length = 0;\n this._currentPoly = null;\n\n for (let i = 0; i < path.instructions.length; i++)\n {\n const instruction = path.instructions[i];\n\n // Sorry TS! this is the best we could do...\n this[instruction.action](...(instruction.data as [never, never, never, never, never, never, never]));\n }\n\n this.finish();\n }\n\n /** Gets the bounds of the path. */\n get bounds(): Bounds\n {\n const bounds = this._bounds;\n\n bounds.clear();\n\n const shapePrimitives = this.shapePrimitives;\n\n for (let i = 0; i < shapePrimitives.length; i++)\n {\n const shapePrimitive = shapePrimitives[i];\n\n const boundsRect = shapePrimitive.shape.getBounds(tempRectangle);\n\n if (shapePrimitive.transform)\n {\n bounds.addRect(boundsRect, shapePrimitive.transform);\n }\n else\n {\n bounds.addRect(boundsRect);\n }\n }\n\n return bounds;\n }\n}\n","import { Point } from '../../../../maths/point/Point';\nimport { uid } from '../../../../utils/data/uid';\nimport { warn } from '../../../../utils/logging/warn';\nimport { SVGToGraphicsPath } from '../svg/SVGToGraphicsPath';\nimport { ShapePath } from './ShapePath';\n\nimport type { Matrix } from '../../../../maths/matrix/Matrix';\nimport type { PointData } from '../../../../maths/point/PointData';\nimport type { Bounds } from '../../../container/bounds/Bounds';\nimport type { RoundedPoint } from './roundShape';\n\nexport interface PathInstruction\n{\n action: 'moveTo' | 'lineTo' | 'quadraticCurveTo' |\n 'bezierCurveTo' | 'arc' | 'closePath' |\n 'addPath' | 'arcTo' | 'ellipse' |\n 'rect' | 'roundRect' | 'arcToSvg' |\n 'poly' | 'circle' |\n 'regularPoly' | 'roundPoly' | 'roundShape' | 'filletRect' | 'chamferRect'\n data: any[];\n}\n\n/**\n * The `GraphicsPath` class is designed to represent a graphical path consisting of multiple drawing instructions.\n * This class serves as a collection of drawing commands that can be executed to render shapes and paths on a canvas or\n * similar graphical context. It supports high-level drawing operations like lines, arcs, curves, and more, enabling\n * complex graphic constructions with relative ease.\n */\nexport class GraphicsPath\n{\n public instructions: PathInstruction[] = [];\n\n public uid = uid('graphicsPath');\n\n private _dirty = true;\n // needed for hit testing and bounds calculations\n private _shapePath: ShapePath;\n\n /**\n * Provides access to the internal shape path, ensuring it is up-to-date with the current instructions.\n * @returns The `ShapePath` instance associated with this `GraphicsPath`.\n */\n get shapePath(): ShapePath\n {\n if (!this._shapePath)\n {\n this._shapePath = new ShapePath(this);\n }\n\n if (this._dirty)\n {\n this._dirty = false;\n this._shapePath.buildPath();\n }\n\n return this._shapePath;\n }\n\n /**\n * Creates a `GraphicsPath` instance optionally from an SVG path string or an array of `PathInstruction`.\n * @param instructions - An SVG path string or an array of `PathInstruction` objects.\n */\n constructor(instructions?: string | PathInstruction[])\n {\n if (typeof instructions === 'string')\n {\n SVGToGraphicsPath(instructions, this);\n }\n else\n {\n this.instructions = instructions?.slice() ?? [];\n }\n }\n\n /**\n * Adds another `GraphicsPath` to this path, optionally applying a transformation.\n * @param path - The `GraphicsPath` to add.\n * @param transform - An optional transformation to apply to the added path.\n * @returns The instance of the current object for chaining.\n */\n public addPath(path: GraphicsPath, transform?: Matrix): this\n {\n path = path.clone();\n this.instructions.push({ action: 'addPath', data: [path, transform] });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Adds an arc to the path. The arc is centered at (x, y)\n * position with radius `radius` starting at `startAngle` and ending at `endAngle`.\n * @param x - The x-coordinate of the arc's center.\n * @param y - The y-coordinate of the arc's center.\n * @param radius - The radius of the arc.\n * @param startAngle - The starting angle of the arc, in radians.\n * @param endAngle - The ending angle of the arc, in radians.\n * @param counterclockwise - Specifies whether the arc should be drawn in the anticlockwise direction. False by default.\n * @returns The instance of the current object for chaining.\n */\n public arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): this;\n public arc(...args: [number, number, number, number, number, boolean]): this\n {\n this.instructions.push({ action: 'arc', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Adds an arc to the path with the arc tangent to the line joining two specified points.\n * The arc radius is specified by `radius`.\n * @param x1 - The x-coordinate of the first point.\n * @param y1 - The y-coordinate of the first point.\n * @param x2 - The x-coordinate of the second point.\n * @param y2 - The y-coordinate of the second point.\n * @param radius - The radius of the arc.\n * @returns The instance of the current object for chaining.\n */\n public arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this;\n public arcTo(...args: [number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'arcTo', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Adds an SVG-style arc to the path, allowing for elliptical arcs based on the SVG spec.\n * @param rx - The x-radius of the ellipse.\n * @param ry - The y-radius of the ellipse.\n * @param xAxisRotation - The rotation of the ellipse's x-axis relative\n * to the x-axis of the coordinate system, in degrees.\n * @param largeArcFlag - Determines if the arc should be greater than or less than 180 degrees.\n * @param sweepFlag - Determines if the arc should be swept in a positive angle direction.\n * @param x - The x-coordinate of the arc's end point.\n * @param y - The y-coordinate of the arc's end point.\n * @returns The instance of the current object for chaining.\n */\n // eslint-disable-next-line max-len\n public arcToSvg(rx: number, ry: number, xAxisRotation: number, largeArcFlag: number, sweepFlag: number, x: number, y: number): this;\n public arcToSvg(...args: [number, number, number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'arcToSvg', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Adds a cubic Bezier curve to the path.\n * It requires three points: the first two are control points and the third one is the end point.\n * The starting point is the last point in the current path.\n * @param cp1x - The x-coordinate of the first control point.\n * @param cp1y - The y-coordinate of the first control point.\n * @param cp2x - The x-coordinate of the second control point.\n * @param cp2y - The y-coordinate of the second control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public bezierCurveTo(\n cp1x: number, cp1y: number, cp2x: number, cp2y: number,\n x: number, y: number,\n smoothness?: number\n ): this;\n public bezierCurveTo(...args: [number, number, number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'bezierCurveTo', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Adds a cubic Bezier curve to the path.\n * It requires two points: the second control point and the end point. The first control point is assumed to be\n * The starting point is the last point in the current path.\n * @param cp2x - The x-coordinate of the second control point.\n * @param cp2y - The y-coordinate of the second control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public bezierCurveToShort(cp2x: number, cp2y: number, x: number, y: number, smoothness?: number): this\n {\n const last = this.instructions[this.instructions.length - 1];\n\n const lastPoint = this.getLastPoint(Point.shared);\n\n let cp1x = 0;\n let cp1y = 0;\n\n if (!last || last.action !== 'bezierCurveTo')\n {\n cp1x = lastPoint.x;\n cp1y = lastPoint.y;\n }\n else\n {\n cp1x = last.data[2];\n cp1y = last.data[3];\n\n const currentX = lastPoint.x;\n const currentY = lastPoint.y;\n\n cp1x = currentX + (currentX - cp1x);\n cp1y = currentY + (currentY - cp1y);\n }\n\n this.instructions.push({ action: 'bezierCurveTo', data: [cp1x, cp1y, cp2x, cp2y, x, y, smoothness] });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Closes the current path by drawing a straight line back to the start.\n * If the shape is already closed or there are no points in the path, this method does nothing.\n * @returns The instance of the current object for chaining.\n */\n public closePath(): this\n {\n this.instructions.push({ action: 'closePath', data: [] });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws an ellipse at the specified location and with the given x and y radii.\n * An optional transformation can be applied, allowing for rotation, scaling, and translation.\n * @param x - The x-coordinate of the center of the ellipse.\n * @param y - The y-coordinate of the center of the ellipse.\n * @param radiusX - The horizontal radius of the ellipse.\n * @param radiusY - The vertical radius of the ellipse.\n * @param transform - An optional `Matrix` object to apply a transformation to the ellipse. This can include rotations.\n * @returns The instance of the current object for chaining.\n */\n public ellipse(x: number, y: number, radiusX: number, radiusY: number, matrix?: Matrix): this;\n public ellipse(...args: [number, number, number, number, Matrix]): this\n {\n this.instructions.push({ action: 'ellipse', data: args });\n\n // TODO nail this!\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Connects the current point to a new point with a straight line. This method updates the current path.\n * @param x - The x-coordinate of the new point to connect to.\n * @param y - The y-coordinate of the new point to connect to.\n * @returns The instance of the current object for chaining.\n */\n public lineTo(x: number, y: number): this;\n public lineTo(...args: [number, number]): this\n {\n this.instructions.push({ action: 'lineTo', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Sets the starting point for a new sub-path. Any subsequent drawing commands are considered part of this path.\n * @param x - The x-coordinate for the starting point.\n * @param y - The y-coordinate for the starting point.\n * @returns The instance of the current object for chaining.\n */\n public moveTo(x: number, y: number): this;\n public moveTo(...args: [number, number]): this\n {\n this.instructions.push({ action: 'moveTo', data: args });\n\n return this;\n }\n\n /**\n * Adds a quadratic curve to the path. It requires two points: the control point and the end point.\n * The starting point is the last point in the current path.\n * @param cp1x - The x-coordinate of the control point.\n * @param cp1y - The y-coordinate of the control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public quadraticCurveTo(cpx: number, cpy: number, x: number, y: number, smoothness?: number): this;\n public quadraticCurveTo(...args: [number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'quadraticCurveTo', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Adds a quadratic curve to the path. It uses the previous point as the control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public quadraticCurveToShort(x: number, y: number, smoothness?: number): this\n {\n // check if we have a previous quadraticCurveTo\n const last = this.instructions[this.instructions.length - 1];\n\n const lastPoint = this.getLastPoint(Point.shared);\n\n let cpx1 = 0;\n let cpy1 = 0;\n\n if (!last || last.action !== 'quadraticCurveTo')\n {\n cpx1 = lastPoint.x;\n cpy1 = lastPoint.y;\n }\n else\n {\n cpx1 = last.data[0];\n cpy1 = last.data[1];\n\n const currentX = lastPoint.x;\n const currentY = lastPoint.y;\n\n cpx1 = currentX + (currentX - cpx1);\n cpy1 = currentY + (currentY - cpy1);\n }\n\n this.instructions.push({ action: 'quadraticCurveTo', data: [cpx1, cpy1, x, y, smoothness] });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a rectangle shape. This method adds a new rectangle path to the current drawing.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @param transform - An optional `Matrix` object to apply a transformation to the rectangle.\n * @returns The instance of the current object for chaining.\n */\n public rect(x: number, y: number, w: number, h: number, transform?: Matrix): this\n {\n this.instructions.push({ action: 'rect', data: [x, y, w, h, transform] });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a circle shape. This method adds a new circle path to the current drawing.\n * @param x - The x-coordinate of the center of the circle.\n * @param y - The y-coordinate of the center of the circle.\n * @param radius - The radius of the circle.\n * @param transform - An optional `Matrix` object to apply a transformation to the circle.\n * @returns The instance of the current object for chaining.\n */\n public circle(x: number, y: number, radius: number, transform?: Matrix): this\n {\n this.instructions.push({ action: 'circle', data: [x, y, radius, transform] });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a rectangle with rounded corners.\n * The corner radius can be specified to determine how rounded the corners should be.\n * An optional transformation can be applied, which allows for rotation, scaling, and translation of the rectangle.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @param radius - The radius of the rectangle's corners. If not specified, corners will be sharp.\n * @param transform - An optional `Matrix` object to apply a transformation to the rectangle.\n * @returns The instance of the current object for chaining.\n */\n public roundRect(x: number, y: number, w: number, h: number, radius?: number, transform?: Matrix): this;\n public roundRect(...args: [number, number, number, number, number, Matrix?]): this\n {\n this.instructions.push({ action: 'roundRect', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a polygon shape by specifying a sequence of points. This method allows for the creation of complex polygons,\n * which can be both open and closed. An optional transformation can be applied, enabling the polygon to be scaled,\n * rotated, or translated as needed.\n * @param points - An array of numbers representing the x and y coordinates of the polygon's vertices, in sequence.\n * @param close - A boolean indicating whether to close the polygon path. True by default.\n * @param transform - An optional `Matrix` object to apply a transformation to the polygon.\n * @returns The instance of the current object for chaining further drawing commands.\n */\n public poly(points: number[] | PointData[], close?: boolean, transform?: Matrix): this;\n public poly(...args: [number[] | PointData[], boolean, Matrix?]): this\n {\n this.instructions.push({ action: 'poly', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a regular polygon with a specified number of sides. All sides and angles are equal.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @param transform - An optional `Matrix` object to apply a transformation to the polygon.\n * @returns The instance of the current object for chaining.\n */\n public regularPoly(x: number, y: number, radius: number, sides: number, rotation?: number, transform?: Matrix): this;\n public regularPoly(...args: [number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'regularPoly', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a polygon with rounded corners.\n * Similar to `regularPoly` but with the ability to round the corners of the polygon.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param corner - The radius of the rounding of the corners.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @returns The instance of the current object for chaining.\n */\n public roundPoly(x: number, y: number, radius: number, sides: number, corner: number, rotation?: number): this;\n public roundPoly(...args: [number, number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'roundPoly', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a shape with rounded corners. This function supports custom radius for each corner of the shape.\n * Optionally, corners can be rounded using a quadratic curve instead of an arc, providing a different aesthetic.\n * @param points - An array of `RoundedPoint` representing the corners of the shape to draw.\n * A minimum of 3 points is required.\n * @param radius - The default radius for the corners.\n * This radius is applied to all corners unless overridden in `points`.\n * @param useQuadratic - If set to true, rounded corners are drawn using a quadraticCurve\n * method instead of an arc method. Defaults to false.\n * @param smoothness - Specifies the smoothness of the curve when `useQuadratic` is true.\n * Higher values make the curve smoother.\n * @returns The instance of the current object for chaining.\n */\n public roundShape(points: RoundedPoint[], radius: number, useQuadratic?: boolean, smoothness?: number): this;\n public roundShape(...args: [RoundedPoint[], number, boolean, number]): this\n {\n this.instructions.push({ action: 'roundShape', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draw Rectangle with fillet corners. This is much like rounded rectangle\n * however it support negative numbers as well for the corner radius.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param fillet - accept negative or positive values\n */\n public filletRect(x: number, y: number, width: number, height: number, fillet: number): this;\n public filletRect(...args: [number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'filletRect', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draw Rectangle with chamfer corners. These are angled corners.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param chamfer - non-zero real number, size of corner cutout\n * @param transform\n */\n public chamferRect(x: number, y: number, width: number, height: number, chamfer: number, transform?: Matrix): this;\n public chamferRect(...args: [number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'chamferRect', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a star shape centered at a specified location. This method allows for the creation\n * of stars with a variable number of points, outer radius, optional inner radius, and rotation.\n * The star is drawn as a closed polygon with alternating outer and inner vertices to create the star's points.\n * An optional transformation can be applied to scale, rotate, or translate the star as needed.\n * @param x - The x-coordinate of the center of the star.\n * @param y - The y-coordinate of the center of the star.\n * @param points - The number of points of the star.\n * @param radius - The outer radius of the star (distance from the center to the outer points).\n * @param innerRadius - Optional. The inner radius of the star\n * (distance from the center to the inner points between the outer points).\n * If not provided, defaults to half of the `radius`.\n * @param rotation - Optional. The rotation of the star in radians, where 0 is aligned with the y-axis.\n * Defaults to 0, meaning one point is directly upward.\n * @param transform - An optional `Matrix` object to apply a transformation to the star.\n * This can include rotations, scaling, and translations.\n * @returns The instance of the current object for chaining further drawing commands.\n */\n // eslint-disable-next-line max-len\n public star(x: number, y: number, points: number, radius: number, innerRadius?: number, rotation?: number, transform?: Matrix): this\n {\n innerRadius = innerRadius || radius / 2;\n\n const startAngle = (-1 * Math.PI / 2) + rotation;\n const len = points * 2;\n const delta = (Math.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 this.poly(polygon, true, transform);\n\n return this;\n }\n\n /**\n * Creates a copy of the current `GraphicsPath` instance. This method supports both shallow and deep cloning.\n * A shallow clone copies the reference of the instructions array, while a deep clone creates a new array and\n * copies each instruction individually, ensuring that modifications to the instructions of the cloned `GraphicsPath`\n * do not affect the original `GraphicsPath` and vice versa.\n * @param deep - A boolean flag indicating whether the clone should be deep.\n * @returns A new `GraphicsPath` instance that is a clone of the current instance.\n */\n public clone(deep = false): GraphicsPath\n {\n const newGraphicsPath2D = new GraphicsPath();\n\n if (!deep)\n {\n newGraphicsPath2D.instructions = this.instructions.slice();\n }\n else\n {\n for (let i = 0; i < this.instructions.length; i++)\n {\n const instruction = this.instructions[i];\n\n newGraphicsPath2D.instructions.push({ action: instruction.action, data: instruction.data.slice() });\n }\n }\n\n return newGraphicsPath2D;\n }\n\n public clear(): this\n {\n this.instructions.length = 0;\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Applies a transformation matrix to all drawing instructions within the `GraphicsPath`.\n * This method enables the modification of the path's geometry according to the provided\n * transformation matrix, which can include translations, rotations, scaling, and skewing.\n *\n * Each drawing instruction in the path is updated to reflect the transformation,\n * ensuring the visual representation of the path is consistent with the applied matrix.\n *\n * Note: The transformation is applied directly to the coordinates and control points of the drawing instructions,\n * not to the path as a whole. This means the transformation's effects are baked into the individual instructions,\n * allowing for fine-grained control over the path's appearance.\n * @param matrix - A `Matrix` object representing the transformation to apply.\n * @returns The instance of the current object for chaining further operations.\n */\n public transform(matrix: Matrix): this\n {\n if (matrix.isIdentity()) return this;\n\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 x = 0;\n let y = 0;\n\n let cpx1 = 0;\n let cpy1 = 0;\n let cpx2 = 0;\n let cpy2 = 0;\n\n let rx = 0;\n let ry = 0;\n\n for (let i = 0; i < this.instructions.length; i++)\n {\n const instruction = this.instructions[i];\n const data = instruction.data as any[];\n\n switch (instruction.action)\n {\n case 'moveTo':\n case 'lineTo':\n\n x = data[0];\n y = data[1];\n\n data[0] = (a * x) + (c * y) + tx;\n data[1] = (b * x) + (d * y) + ty;\n break;\n case 'bezierCurveTo':\n\n cpx1 = data[0];\n cpy1 = data[1];\n cpx2 = data[2];\n cpy2 = data[3];\n\n x = data[4];\n y = data[5];\n\n data[0] = (a * cpx1) + (c * cpy1) + tx;\n data[1] = (b * cpx1) + (d * cpy1) + ty;\n data[2] = (a * cpx2) + (c * cpy2) + tx;\n data[3] = (b * cpx2) + (d * cpy2) + ty;\n data[4] = (a * x) + (c * y) + tx;\n data[5] = (b * x) + (d * y) + ty;\n break;\n\n case 'quadraticCurveTo':\n\n cpx1 = data[0];\n cpy1 = data[1];\n\n x = data[2];\n y = data[3];\n\n data[0] = (a * cpx1) + (c * cpy1) + tx;\n data[1] = (b * cpx1) + (d * cpy1) + ty;\n\n data[2] = (a * x) + (c * y) + tx;\n data[3] = (b * x) + (d * y) + ty;\n\n break;\n\n case 'arcToSvg':\n\n x = data[5];\n y = data[6];\n\n rx = data[0];\n ry = data[1];\n\n // multiply the radius by the transform..\n\n data[0] = (a * rx) + (c * ry);\n data[1] = (b * rx) + (d * ry);\n\n data[5] = (a * x) + (c * y) + tx;\n data[6] = (b * x) + (d * y) + ty;\n\n break;\n\n case 'circle':\n data[4] = adjustTransform(data[3], matrix);\n break;\n case 'rect':\n data[4] = adjustTransform(data[4], matrix);\n break;\n case 'ellipse':\n data[8] = adjustTransform(data[8], matrix);\n break;\n case 'roundRect':\n data[5] = adjustTransform(data[5], matrix);\n break;\n case 'addPath':\n data[0].transform(matrix);\n break;\n case 'poly':\n data[2] = adjustTransform(data[2], matrix);\n break;\n default:\n // #if _DEBUG\n warn('unknown transform action', instruction.action);\n // #endif\n break;\n }\n }\n\n this._dirty = true;\n\n return this;\n }\n\n get bounds(): Bounds\n {\n return this.shapePath.bounds;\n }\n\n /**\n * Retrieves the last point from the current drawing instructions in the `GraphicsPath`.\n * This method is useful for operations that depend on the path's current endpoint,\n * such as connecting subsequent shapes or paths. It supports various drawing instructions,\n * ensuring the last point's position is accurately determined regardless of the path's complexity.\n *\n * If the last instruction is a `closePath`, the method iterates backward through the instructions\n * until it finds an actionable instruction that defines a point (e.g., `moveTo`, `lineTo`,\n * `quadraticCurveTo`, etc.). For compound paths added via `addPath`, it recursively retrieves\n * the last point from the nested path.\n * @param out - A `Point` object where the last point's coordinates will be stored.\n * This object is modified directly to contain the result.\n * @returns The `Point` object containing the last point's coordinates.\n */\n public getLastPoint(out: Point): Point\n {\n let index = this.instructions.length - 1;\n\n let lastInstruction = this.instructions[index];\n\n if (!lastInstruction)\n {\n out.x = 0;\n out.y = 0;\n\n return out;\n }\n\n while (lastInstruction.action === 'closePath')\n {\n index--;\n\n if (index < 0)\n {\n out.x = 0;\n out.y = 0;\n\n return out;\n }\n\n lastInstruction = this.instructions[index];\n }\n\n switch (lastInstruction.action)\n {\n case 'moveTo':\n case 'lineTo':\n out.x = lastInstruction.data[0];\n out.y = lastInstruction.data[1];\n break;\n case 'quadraticCurveTo':\n out.x = lastInstruction.data[2];\n out.y = lastInstruction.data[3];\n break;\n case 'bezierCurveTo':\n out.x = lastInstruction.data[4];\n out.y = lastInstruction.data[5];\n break;\n case 'arc':\n case 'arcToSvg':\n out.x = lastInstruction.data[5];\n out.y = lastInstruction.data[6];\n break;\n case 'addPath':\n // TODO prolly should transform the last point of the path\n lastInstruction.data[0].getLastPoint(out);\n break;\n }\n\n return out;\n }\n}\n\nfunction adjustTransform(currentMatrix?: Matrix, transform?: Matrix): Matrix\n{\n if (currentMatrix)\n {\n return currentMatrix.prepend(transform);\n }\n\n return transform.clone();\n}\n","import { Color } from '../../../../color/Color';\nimport { GraphicsPath } from '../path/GraphicsPath';\n\nimport type { ConvertedFillStyle, ConvertedStrokeStyle, FillStyle, StrokeStyle } from '../FillTypes';\nimport type {\n GraphicsContext,\n} from '../GraphicsContext';\n\ninterface Session\n{\n context: GraphicsContext;\n path: GraphicsPath;\n}\n\nexport function SVGParser(\n svg: string | SVGElement | SVGSVGElement,\n graphicsContext?: GraphicsContext\n): GraphicsContext\n{\n if (typeof svg === 'string')\n {\n const div = document.createElement('div');\n\n div.innerHTML = svg.trim();\n svg = div.querySelector('svg') as SVGElement;\n }\n\n const session = {\n context: graphicsContext,\n path: new GraphicsPath(),\n };\n\n renderChildren(svg, session, null, null);\n\n return graphicsContext;\n}\n\nfunction renderChildren(svg: SVGElement, session: Session, fillStyle: FillStyle, strokeStyle: StrokeStyle): void\n{\n const children = svg.children;\n\n const { fillStyle: f1, strokeStyle: s1 } = parseStyle(svg);\n\n if (f1 && fillStyle)\n {\n fillStyle = { ...fillStyle, ...f1 };\n }\n else if (f1)\n {\n fillStyle = f1;\n }\n\n if (s1 && strokeStyle)\n {\n strokeStyle = { ...strokeStyle, ...s1 };\n }\n else if (s1)\n {\n strokeStyle = s1;\n }\n\n session.context.fillStyle = fillStyle;\n session.context.strokeStyle = strokeStyle;\n\n let x;\n let y;\n let x1;\n let y1;\n let x2;\n let y2;\n let cx;\n let cy;\n let r;\n let rx;\n let ry;\n let points;\n let pointsString;\n let d;\n let graphicsPath;\n let width;\n let height;\n\n switch (svg.nodeName.toLowerCase())\n {\n case 'path':\n d = svg.getAttribute('d') as string;\n\n graphicsPath = new GraphicsPath(d);\n\n session.context.path(graphicsPath);\n\n if (fillStyle) session.context.fill();\n if (strokeStyle) session.context.stroke();\n\n break;\n case 'circle':\n cx = parseFloatAttribute(svg, 'cx', 0);\n cy = parseFloatAttribute(svg, 'cy', 0);\n\n r = parseFloatAttribute(svg, 'r', 0);\n\n session.context.ellipse(cx, cy, r, r);\n\n if (fillStyle) session.context.fill();\n if (strokeStyle) session.context.stroke();\n\n break;\n case 'rect':\n x = parseFloatAttribute(svg, 'x', 0);\n y = parseFloatAttribute(svg, 'y', 0);\n\n width = parseFloatAttribute(svg, 'width', 0);\n height = parseFloatAttribute(svg, 'height', 0);\n\n rx = parseFloatAttribute(svg, 'rx', 0);\n ry = parseFloatAttribute(svg, 'ry', 0);\n\n if (rx || ry)\n {\n session.context.roundRect(x, y, width, height, rx || ry);\n }\n else\n {\n session.context.rect(x, y, width, height);\n }\n\n if (fillStyle) session.context.fill();\n if (strokeStyle) session.context.stroke();\n\n break;\n case 'ellipse':\n cx = parseFloatAttribute(svg, 'cx', 0);\n cy = parseFloatAttribute(svg, 'cy', 0);\n\n rx = parseFloatAttribute(svg, 'rx', 0);\n ry = parseFloatAttribute(svg, 'ry', 0);\n\n session.context.beginPath();\n session.context.ellipse(cx, cy, rx, ry); // , 0, Math.PI * 2);\n\n if (fillStyle) session.context.fill();\n if (strokeStyle) session.context.stroke();\n\n break;\n case 'line':\n x1 = parseFloatAttribute(svg, 'x1', 0);\n y1 = parseFloatAttribute(svg, 'y1', 0);\n\n x2 = parseFloatAttribute(svg, 'x2', 0);\n y2 = parseFloatAttribute(svg, 'y2', 0);\n\n session.context.beginPath();\n session.context.moveTo(x1, y1);\n session.context.lineTo(x2, y2);\n\n if (strokeStyle) session.context.stroke();\n\n break;\n\n case 'polygon':\n pointsString = svg.getAttribute('points') as string;\n\n points = pointsString.match(/\\d+/g).map((n) => parseInt(n, 10));\n\n session.context.poly(points, true);\n\n if (fillStyle) session.context.fill();\n if (strokeStyle) session.context.stroke();\n\n break;\n case 'polyline':\n pointsString = svg.getAttribute('points') as string;\n\n points = pointsString.match(/\\d+/g).map((n) => parseInt(n, 10));\n\n session.context.poly(points, false);\n\n if (strokeStyle) session.context.stroke();\n\n break;\n // children will cover these two..\n case 'g':\n case 'svg':\n break;\n default: {\n // eslint-disable-next-line no-console\n console.info(`[SVG parser] <${svg.nodeName}> elements unsupported`);\n break;\n }\n }\n\n for (let i = 0; i < children.length; i++)\n {\n renderChildren(children[i] as SVGElement, session, fillStyle, strokeStyle);\n }\n}\n\nfunction parseFloatAttribute(svg: SVGElement, id: string, defaultValue: number): number\n{\n const value = svg.getAttribute(id) as string;\n\n return value ? Number(value) : defaultValue;\n}\n\nfunction parseStyle(svg: SVGElement): { strokeStyle: ConvertedStrokeStyle; fillStyle: ConvertedFillStyle }\n{\n const style = svg.getAttribute('style');\n\n const strokeStyle: StrokeStyle = {};\n\n const fillStyle: FillStyle = {};\n\n let useFill = false;\n let useStroke = false;\n\n if (style)\n {\n const styleParts = style.split(';');\n\n for (let i = 0; i < styleParts.length; i++)\n {\n const stylePart = styleParts[i];\n\n const [key, value] = stylePart.split(':');\n\n switch (key)\n {\n case 'stroke':\n if (value !== 'none')\n {\n strokeStyle.color = Color.shared.setValue(value).toNumber();\n useStroke = true;\n }\n\n break;\n case 'stroke-width':\n strokeStyle.width = Number(value);\n break;\n case 'fill':\n if (value !== 'none')\n {\n useFill = true;\n fillStyle.color = Color.shared.setValue(value).toNumber();\n }\n break;\n case 'fill-opacity':\n fillStyle.alpha = Number(value);\n break;\n case 'stroke-opacity':\n strokeStyle.alpha = Number(value);\n break;\n case 'opacity':\n fillStyle.alpha = Number(value);\n strokeStyle.alpha = Number(value);\n break;\n }\n }\n }\n else\n {\n const stroke = svg.getAttribute('stroke');\n\n if (stroke && stroke !== 'none')\n {\n useStroke = true;\n strokeStyle.color = Color.shared.setValue(stroke).toNumber();\n\n strokeStyle.width = parseFloatAttribute(svg, 'stroke-width', 1);\n }\n\n const fill = svg.getAttribute('fill');\n\n if (fill && fill !== 'none')\n {\n useFill = true;\n fillStyle.color = Color.shared.setValue(fill).toNumber();\n }\n }\n\n return {\n strokeStyle: useStroke ? (strokeStyle as ConvertedStrokeStyle) : null,\n fillStyle: useFill ? (fillStyle as ConvertedFillStyle) : null,\n };\n}\n","import { Color } from '../../../../color/Color';\nimport { Matrix } from '../../../../maths/matrix/Matrix';\nimport { Texture } from '../../../../rendering/renderers/shared/texture/Texture';\nimport { FillGradient } from '../fill/FillGradient';\nimport { FillPattern } from '../fill/FillPattern';\n\nimport type { ColorSource } from '../../../../color/Color';\nimport type {\n ConvertedFillStyle,\n ConvertedStrokeStyle,\n FillInput,\n FillStyle,\n StrokeInput,\n} from '../FillTypes';\n\nfunction isColorLike(value: unknown): value is ColorSource\n{\n return Color.isColorLike(value as ColorSource);\n}\n\nfunction isFillPattern(value: unknown): value is FillPattern\n{\n return value instanceof FillPattern;\n}\n\nfunction isFillGradient(value: unknown): value is FillGradient\n{\n return value instanceof FillGradient;\n}\n\n/**\n * Handles the case where the value is a ColorLike\n * @param fill\n * @param value\n * @param defaultStyle\n * @example\n * graphics.fill(0xff0000)\n * graphics.fill(new Color(0xff0000))\n * graphics.fill({ r: 255, g: 0, b: 0 })\n */\nfunction handleColorLike(\n fill: FillStyle,\n value: ColorSource,\n defaultStyle: ConvertedFillStyle\n): ConvertedFillStyle\n{\n const temp = Color.shared.setValue(value ?? 0);\n\n fill.color = temp.toNumber();\n fill.alpha = temp.alpha === 1 ? defaultStyle.alpha : temp.alpha;\n fill.texture = Texture.WHITE;\n\n return { ...defaultStyle, ...fill } as ConvertedFillStyle;\n}\n\n/**\n * Handles the case where the value is a FillPattern\n * @param fill\n * @param value\n * @param defaultStyle\n * @example\n * graphics.fill(new FillPattern(0xff0000))\n */\nfunction handleFillPattern(\n fill: FillStyle,\n value: FillPattern,\n defaultStyle: ConvertedFillStyle\n): ConvertedFillStyle\n{\n fill.fill = value;\n fill.color = 0xffffff;\n fill.texture = value.texture;\n fill.matrix = value.transform;\n\n return { ...defaultStyle, ...fill } as ConvertedFillStyle;\n}\n\n/**\n * Handles the case where the value is a FillGradient\n * @param fill\n * @param value\n * @param defaultStyle\n * @example\n * graphics.fill(new FillGradient(0, 0, 200, 0))\n */\nfunction handleFillGradient(\n fill: FillStyle,\n value: FillGradient,\n defaultStyle: ConvertedFillStyle\n): ConvertedFillStyle\n{\n value.buildLinearGradient();\n fill.fill = value;\n fill.color = 0xffffff;\n fill.texture = value.texture;\n fill.matrix = value.transform;\n\n return { ...defaultStyle, ...fill } as ConvertedFillStyle;\n}\n\n/**\n * Handles the case where the value is not a direct Pixi Color, PatternFill, or GradientFill but instead\n * an object with potentially `color`\n * @example\n * {\n * color: new Color(0xff0000)\n * alpha: 0.5,\n * texture?: null,\n * matrix?: null,\n * }\n * @param value\n * @param defaultStyle\n */\nfunction handleFillObject(value: FillStyle, defaultStyle: ConvertedFillStyle): ConvertedFillStyle\n{\n const style = { ...defaultStyle, ...(value as FillStyle) };\n\n if (style.texture)\n {\n if (style.texture !== Texture.WHITE)\n {\n const m = style.matrix?.invert() || new Matrix();\n\n m.scale(1 / style.texture.frame.width, 1 / style.texture.frame.height);\n\n style.matrix = m;\n }\n\n const sourceStyle = style.texture.source.style;\n\n if (sourceStyle.addressMode === 'clamp-to-edge')\n {\n sourceStyle.addressMode = 'repeat';\n sourceStyle.update();\n }\n }\n\n const color = Color.shared.setValue(style.color);\n\n style.alpha *= color.alpha;\n style.color = color.toNumber();\n style.matrix = style.matrix ? style.matrix.clone() : null; // todo: lets optimise this!\n\n return style as ConvertedFillStyle;\n}\n\n/**\n * Converts a value to a fill style, we do this as PixiJS has a number of ways to define a fill style\n * They can be a direct color, a texture, a gradient, or an object with these values in them\n * This function will take any of these input types and convert them into a single object\n * that PixiJS can understand and use internally.\n * @param value - The value to convert to a fill style\n * @param defaultStyle - The default fill style to use\n * @private\n */\nexport function toFillStyle(\n value: T,\n defaultStyle: ConvertedFillStyle\n): ConvertedFillStyle\n{\n if (value === undefined || value === null)\n {\n return null;\n }\n\n const fill: ConvertedFillStyle = {} as ConvertedFillStyle;\n const objectStyle = value as FillStyle;\n\n if (isColorLike(value))\n {\n return handleColorLike(fill, value, defaultStyle);\n }\n else if (isFillPattern(value))\n {\n return handleFillPattern(fill, value, defaultStyle);\n }\n else if (isFillGradient(value))\n {\n return handleFillGradient(fill, value, defaultStyle);\n }\n else if (objectStyle.fill && isFillPattern(objectStyle.fill))\n {\n return handleFillPattern(objectStyle, objectStyle.fill, defaultStyle);\n }\n else if (objectStyle.fill && isFillGradient(objectStyle.fill))\n {\n return handleFillGradient(objectStyle, objectStyle.fill, defaultStyle);\n }\n\n return handleFillObject(objectStyle, defaultStyle);\n}\n\n/**\n * Converts a value to a stroke style, similar to `toFillStyle` but for strokes\n * @param value - The value to convert to a stroke style\n * @param defaultStyle - The default stroke style to use\n * @private\n */\nexport function toStrokeStyle(value: StrokeInput, defaultStyle: ConvertedStrokeStyle): ConvertedStrokeStyle\n{\n const { width, alignment, miterLimit, cap, join, ...rest } = defaultStyle;\n const fill = toFillStyle(value, rest);\n\n if (!fill)\n {\n return null;\n }\n\n return {\n width,\n alignment,\n miterLimit,\n cap,\n join,\n ...fill,\n };\n}\n","/* eslint-disable max-len */\nimport EventEmitter from 'eventemitter3';\nimport { Color, type ColorSource } from '../../../color/Color';\nimport { Matrix } from '../../../maths/matrix/Matrix';\nimport { Point } from '../../../maths/point/Point';\nimport { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport { uid } from '../../../utils/data/uid';\nimport { deprecation, v8_0_0 } from '../../../utils/logging/deprecation';\nimport { Bounds } from '../../container/bounds/Bounds';\nimport { GraphicsPath } from './path/GraphicsPath';\nimport { SVGParser } from './svg/SVGParser';\nimport { toFillStyle, toStrokeStyle } from './utils/convertFillInputToFillStyle';\n\nimport type { PointData } from '../../../maths/point/PointData';\nimport type { Shader } from '../../../rendering/renderers/shared/shader/Shader';\nimport type { TextureDestroyOptions, TypeOrBool } from '../../container/destroyTypes';\nimport type { ConvertedFillStyle, ConvertedStrokeStyle, FillInput, StrokeInput } from './FillTypes';\nimport type { RoundedPoint } from './path/roundShape';\n\nconst tmpPoint = new Point();\n\nexport type BatchMode = 'auto' | 'batch' | 'no-batch';\n\nexport interface FillInstruction\n{\n action: 'fill' | 'cut'\n data: { style: ConvertedFillStyle, path: GraphicsPath, hole?: GraphicsPath }\n}\n\nexport interface StrokeInstruction\n{\n action: 'stroke'\n data: { style: ConvertedStrokeStyle, path: GraphicsPath, hole?: GraphicsPath }\n}\n\nexport interface TextureInstruction\n{\n action: 'texture'\n data: {\n image: Texture,\n\n dx: number\n dy: number\n\n dw: number\n dh: number\n\n transform: Matrix\n alpha: number\n style: number,\n }\n}\n\nexport type GraphicsInstructions = FillInstruction | StrokeInstruction | TextureInstruction;\n\nconst tempMatrix = new Matrix();\n\n/**\n * The GraphicsContext class allows for the creation of lightweight objects that contain instructions for drawing shapes and paths.\n * It is used internally by the Graphics class to draw shapes and paths, and can be used directly and shared between Graphics objects,\n *\n * This sharing of a `GraphicsContext` means that the intensive task of converting graphics instructions into GPU-ready geometry is done once, and the results are reused,\n * much like sprites reusing textures.\n * @memberof scene\n */\nexport class GraphicsContext extends EventEmitter<{\n update: GraphicsContext\n destroy: GraphicsContext\n}>\n{\n /** The default fill style to use when none is provided. */\n public static defaultFillStyle: ConvertedFillStyle = {\n /** The color to use for the fill. */\n color: 0xffffff,\n /** The alpha value to use for the fill. */\n alpha: 1,\n /** The texture to use for the fill. */\n texture: Texture.WHITE,\n /** The matrix to apply. */\n matrix: null,\n /** The fill pattern to use. */\n fill: null,\n };\n\n /** The default stroke style to use when none is provided. */\n public static defaultStrokeStyle: ConvertedStrokeStyle = {\n /** The width of the stroke. */\n width: 1,\n /** The color to use for the stroke. */\n color: 0xffffff,\n /** The alpha value to use for the stroke. */\n alpha: 1,\n /** The alignment of the stroke. */\n alignment: 0.5,\n /** The miter limit to use. */\n miterLimit: 10,\n /** The line cap style to use. */\n cap: 'butt',\n /** The line join style to use. */\n join: 'miter',\n /** The texture to use for the fill. */\n texture: Texture.WHITE,\n /** The matrix to apply. */\n matrix: null,\n /** The fill pattern to use. */\n fill: null,\n };\n\n public uid = uid('graphicsContext');\n public dirty = true;\n public batchMode: BatchMode = 'auto';\n public instructions: GraphicsInstructions[] = [];\n public customShader?: Shader;\n\n private _activePath: GraphicsPath = new GraphicsPath();\n private _transform: Matrix = new Matrix();\n\n private _fillStyle: ConvertedFillStyle = { ...GraphicsContext.defaultFillStyle };\n private _strokeStyle: ConvertedStrokeStyle = { ...GraphicsContext.defaultStrokeStyle };\n private _stateStack: { fillStyle: ConvertedFillStyle; strokeStyle: ConvertedStrokeStyle, transform: Matrix }[] = [];\n\n private _tick = 0;\n\n private _bounds = new Bounds();\n private _boundsDirty = true;\n\n /**\n * Creates a new GraphicsContext object that is a clone of this instance, copying all properties,\n * including the current drawing state, transformations, styles, and instructions.\n * @returns A new GraphicsContext instance with the same properties and state as this one.\n */\n public clone(): GraphicsContext\n {\n const clone = new GraphicsContext();\n\n clone.batchMode = this.batchMode;\n clone.instructions = this.instructions.slice();\n clone._activePath = this._activePath.clone();\n clone._transform = this._transform.clone();\n clone._fillStyle = { ...this._fillStyle };\n clone._strokeStyle = { ...this._strokeStyle };\n clone._stateStack = this._stateStack.slice();\n clone._bounds = this._bounds.clone();\n clone._boundsDirty = true;\n\n return clone;\n }\n\n /**\n * The current fill style of the graphics context. This can be a color, gradient, pattern, or a more complex style defined by a FillStyle object.\n */\n get fillStyle(): ConvertedFillStyle\n {\n return this._fillStyle;\n }\n\n set fillStyle(value: FillInput)\n {\n this._fillStyle = toFillStyle(value, GraphicsContext.defaultFillStyle);\n }\n\n /**\n * The current stroke style of the graphics context. Similar to fill styles, stroke styles can encompass colors, gradients, patterns, or more detailed configurations via a StrokeStyle object.\n */\n get strokeStyle(): ConvertedStrokeStyle\n {\n return this._strokeStyle;\n }\n\n set strokeStyle(value: FillInput)\n {\n this._strokeStyle = toStrokeStyle(value, GraphicsContext.defaultStrokeStyle);\n }\n\n /**\n * Sets the current fill style of the graphics context. The fill style can be a color, gradient,\n * pattern, or a more complex style defined by a FillStyle object.\n * @param style - The fill style to apply. This can be a simple color, a gradient or pattern object,\n * or a FillStyle or ConvertedFillStyle object.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public setFillStyle(style: FillInput): this\n {\n this._fillStyle = toFillStyle(style, GraphicsContext.defaultFillStyle);\n\n return this;\n }\n\n /**\n * Sets the current stroke style of the graphics context. Similar to fill styles, stroke styles can\n * encompass colors, gradients, patterns, or more detailed configurations via a StrokeStyle object.\n * @param style - The stroke style to apply. Can be defined as a color, a gradient or pattern,\n * or a StrokeStyle or ConvertedStrokeStyle object.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public setStrokeStyle(style: StrokeInput): this\n {\n this._strokeStyle = toFillStyle(style, GraphicsContext.defaultStrokeStyle) as ConvertedStrokeStyle;\n\n return this;\n }\n\n /**\n * Adds a texture to the graphics context. This method supports multiple overloads for specifying the texture, tint, and dimensions.\n * If only a texture is provided, it uses the texture's width and height for drawing. Additional parameters allow for specifying\n * a tint color, and custom dimensions for the texture drawing area.\n * @param texture - The Texture object to use.\n * @param tint - (Optional) A ColorSource to tint the texture. If not provided, defaults to white (0xFFFFFF).\n * @param dx - (Optional) The x-coordinate in the destination canvas at which to place the top-left corner of the source image.\n * @param dy - (Optional) The y-coordinate in the destination canvas at which to place the top-left corner of the source image.\n * @param dw - (Optional) The width of the rectangle within the source image to draw onto the destination canvas. If not provided, uses the texture's frame width.\n * @param dh - (Optional) The height of the rectangle within the source image to draw onto the destination canvas. If not provided, uses the texture's frame height.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public texture(texture: Texture): this;\n public texture(texture: Texture, tint: ColorSource): this;\n public texture(texture: Texture, tint: ColorSource, dx: number, dy: number): this;\n public texture(texture: Texture, tint: ColorSource, dx: number, dy: number, dw: number, dh: number): this;\n public texture(texture: Texture, tint?: ColorSource, dx?: number, dy?: number, dw?: number, dh?: number): this\n {\n this.instructions.push({\n action: 'texture',\n data: {\n image: texture,\n\n dx: dx || 0,\n dy: dy || 0,\n\n dw: dw || texture.frame.width,\n dh: dh || texture.frame.height,\n\n transform: this._transform.clone(),\n alpha: this._fillStyle.alpha,\n style: tint ? Color.shared.setValue(tint).toNumber() : 0xFFFFFF,\n }\n });\n\n this.onUpdate();\n\n return this;\n }\n\n /**\n * Resets the current path. Any previous path and its commands are discarded and a new path is\n * started. This is typically called before beginning a new shape or series of drawing commands.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public beginPath(): this\n {\n this._activePath = new GraphicsPath();\n\n return this;\n }\n\n /**\n * Fills the current or given path with the current fill style. This method can optionally take\n * a color and alpha for a simple fill, or a more complex FillInput object for advanced fills.\n * @param style - (Optional) The style to fill the path with. Can be a color, gradient, pattern, or a complex style object. If omitted, uses the current fill style.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public fill(style?: FillInput): this;\n /** @deprecated 8.0.0 */\n public fill(color: ColorSource, alpha: number): this;\n public fill(style?: FillInput, alpha?: number): this\n {\n let path: GraphicsPath;\n\n const lastInstruction = this.instructions[this.instructions.length - 1];\n\n if (this._tick === 0 && lastInstruction && lastInstruction.action === 'stroke')\n {\n path = lastInstruction.data.path;\n }\n else\n {\n path = this._activePath.clone();\n }\n\n if (!path) return this;\n\n // eslint-disable-next-line no-eq-null, eqeqeq\n if (style != null)\n {\n if (alpha !== undefined && typeof style === 'number')\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead');\n // #endif\n\n style = { color: style, alpha };\n }\n this._fillStyle = toFillStyle(style, GraphicsContext.defaultFillStyle);\n }\n\n // TODO not a fan of the clone!!\n this.instructions.push({\n action: 'fill',\n // TODO copy fill style!\n data: { style: this.fillStyle, path }\n });\n\n this.onUpdate();\n\n this._initNextPathLocation();\n this._tick = 0;\n\n return this;\n }\n\n private _initNextPathLocation()\n {\n // Reset the _activePath with the last point of the current path\n const { x, y } = this._activePath.getLastPoint(Point.shared);\n\n this._activePath.clear();\n this._activePath.moveTo(x, y);\n }\n\n /**\n * Strokes the current path with the current stroke style. This method can take an optional\n * FillInput parameter to define the stroke's appearance, including its color, width, and other properties.\n * @param style - (Optional) The stroke style to apply. Can be defined as a simple color or a more complex style object. If omitted, uses the current stroke style.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public stroke(style?: StrokeInput): this\n {\n let path: GraphicsPath;\n\n const lastInstruction = this.instructions[this.instructions.length - 1];\n\n if (this._tick === 0 && lastInstruction && lastInstruction.action === 'fill')\n {\n path = lastInstruction.data.path;\n }\n else\n {\n path = this._activePath.clone();\n }\n\n if (!path) return this;\n\n // eslint-disable-next-line no-eq-null, eqeqeq\n if (style != null)\n {\n this._strokeStyle = toStrokeStyle(style, GraphicsContext.defaultStrokeStyle);\n }\n\n // TODO not a fan of the clone!!\n this.instructions.push({\n action: 'stroke',\n // TODO copy fill style!\n data: { style: this.strokeStyle, path }\n });\n\n this.onUpdate();\n\n this._initNextPathLocation();\n this._tick = 0;\n\n return this;\n }\n\n /**\n * Applies a cutout to the last drawn shape. This is used to create holes or complex shapes by\n * subtracting a path from the previously drawn path. If a hole is not completely in a shape, it will\n * fail to cut correctly!\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public cut(): this\n {\n for (let i = 0; i < 2; i++)\n {\n const lastInstruction = this.instructions[this.instructions.length - 1 - i];\n\n const holePath = this._activePath.clone();\n\n if (lastInstruction)\n {\n if (lastInstruction.action === 'stroke' || lastInstruction.action === 'fill')\n {\n if (lastInstruction.data.hole)\n {\n lastInstruction.data.hole.addPath(holePath);\n }\n else\n {\n lastInstruction.data.hole = holePath;\n break;\n }\n }\n }\n }\n\n this._initNextPathLocation();\n\n return this;\n }\n\n /**\n * Adds an arc to the current path, which is centered at (x, y) with the specified radius,\n * starting and ending angles, and direction.\n * @param x - The x-coordinate of the arc's center.\n * @param y - The y-coordinate of the arc's center.\n * @param radius - The arc's radius.\n * @param startAngle - The starting angle, in radians.\n * @param endAngle - The ending angle, in radians.\n * @param counterclockwise - (Optional) Specifies whether the arc is drawn counterclockwise (true) or clockwise (false). Defaults to false.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): this\n {\n this._tick++;\n\n const t = this._transform;\n\n this._activePath.arc(\n (t.a * x) + (t.c * y) + t.tx,\n (t.b * x) + (t.d * y) + t.ty,\n radius,\n startAngle,\n endAngle,\n counterclockwise,\n );\n\n return this;\n }\n\n /**\n * Adds an arc to the current path with the given control points and radius, connected to the previous point\n * by a straight line if necessary.\n * @param x1 - The x-coordinate of the first control point.\n * @param y1 - The y-coordinate of the first control point.\n * @param x2 - The x-coordinate of the second control point.\n * @param y2 - The y-coordinate of the second control point.\n * @param radius - The arc's radius.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this\n {\n this._tick++;\n\n const t = this._transform;\n\n this._activePath.arcTo(\n (t.a * x1) + (t.c * y1) + t.tx,\n (t.b * x1) + (t.d * y1) + t.ty,\n (t.a * x2) + (t.c * y2) + t.tx,\n (t.b * x2) + (t.d * y2) + t.ty,\n radius,\n );\n\n return this;\n }\n\n /**\n * Adds an SVG-style arc to the path, allowing for elliptical arcs based on the SVG spec.\n * @param rx - The x-radius of the ellipse.\n * @param ry - The y-radius of the ellipse.\n * @param xAxisRotation - The rotation of the ellipse's x-axis relative\n * to the x-axis of the coordinate system, in degrees.\n * @param largeArcFlag - Determines if the arc should be greater than or less than 180 degrees.\n * @param sweepFlag - Determines if the arc should be swept in a positive angle direction.\n * @param x - The x-coordinate of the arc's end point.\n * @param y - The y-coordinate of the arc's end point.\n * @returns The instance of the current object for chaining.\n */\n public arcToSvg(\n rx: number, ry: number,\n xAxisRotation: number,\n largeArcFlag: number,\n sweepFlag: number,\n x: number, y: number\n ): this\n {\n this._tick++;\n\n const t = this._transform;\n\n this._activePath.arcToSvg(\n rx, ry,\n xAxisRotation, // should we rotate this with transform??\n largeArcFlag,\n sweepFlag,\n (t.a * x) + (t.c * y) + t.tx,\n (t.b * x) + (t.d * y) + t.ty,\n );\n\n return this;\n }\n\n /**\n * Adds a cubic Bezier curve to the path.\n * It requires three points: the first two are control points and the third one is the end point.\n * The starting point is the last point in the current path.\n * @param cp1x - The x-coordinate of the first control point.\n * @param cp1y - The y-coordinate of the first control point.\n * @param cp2x - The x-coordinate of the second control point.\n * @param cp2y - The y-coordinate of the second control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number, smoothness?: number): this\n {\n this._tick++;\n\n // TODO optimize for no transform\n const t = this._transform;\n\n this._activePath.bezierCurveTo(\n (t.a * cp1x) + (t.c * cp1y) + t.tx,\n (t.b * cp1x) + (t.d * cp1y) + t.ty,\n (t.a * cp2x) + (t.c * cp2y) + t.tx,\n (t.b * cp2x) + (t.d * cp2y) + t.ty,\n (t.a * x) + (t.c * y) + t.tx,\n (t.b * x) + (t.d * y) + t.ty,\n smoothness,\n );\n\n return this;\n }\n\n /**\n * Closes the current path by drawing a straight line back to the start.\n * If the shape is already closed or there are no points in the path, this method does nothing.\n * @returns The instance of the current object for chaining.\n */\n public closePath(): this\n {\n this._tick++;\n\n this._activePath?.closePath();\n\n return this;\n }\n\n /**\n * Draws an ellipse at the specified location and with the given x and y radii.\n * An optional transformation can be applied, allowing for rotation, scaling, and translation.\n * @param x - The x-coordinate of the center of the ellipse.\n * @param y - The y-coordinate of the center of the ellipse.\n * @param radiusX - The horizontal radius of the ellipse.\n * @param radiusY - The vertical radius of the ellipse.\n * @returns The instance of the current object for chaining.\n */\n public ellipse(x: number, y: number, radiusX: number, radiusY: number): this\n {\n this._tick++;\n\n this._activePath.ellipse(x, y, radiusX, radiusY, this._transform.clone());\n\n return this;\n }\n\n /**\n * Draws a circle shape. This method adds a new circle path to the current drawing.\n * @param x - The x-coordinate of the center of the circle.\n * @param y - The y-coordinate of the center of the circle.\n * @param radius - The radius of the circle.\n * @returns The instance of the current object for chaining.\n */\n public circle(x: number, y: number, radius: number): this\n {\n this._tick++;\n\n this._activePath.circle(x, y, radius, this._transform.clone());\n\n return this;\n }\n\n /**\n * Adds another `GraphicsPath` to this path, optionally applying a transformation.\n * @param path - The `GraphicsPath` to add.\n * @returns The instance of the current object for chaining.\n */\n public path(path: GraphicsPath): this\n {\n this._tick++;\n\n this._activePath.addPath(path, this._transform.clone());\n\n return this;\n }\n\n /**\n * Connects the current point to a new point with a straight line. This method updates the current path.\n * @param x - The x-coordinate of the new point to connect to.\n * @param y - The y-coordinate of the new point to connect to.\n * @returns The instance of the current object for chaining.\n */\n public lineTo(x: number, y: number): this\n {\n this._tick++;\n\n const t = this._transform;\n\n this._activePath.lineTo(\n (t.a * x) + (t.c * y) + t.tx,\n (t.b * x) + (t.d * y) + t.ty\n );\n\n return this;\n }\n\n /**\n * Sets the starting point for a new sub-path. Any subsequent drawing commands are considered part of this path.\n * @param x - The x-coordinate for the starting point.\n * @param y - The y-coordinate for the starting point.\n * @returns The instance of the current object for chaining.\n */\n public moveTo(x: number, y: number): this\n {\n this._tick++;\n\n const t = this._transform;\n\n const instructions = this._activePath.instructions;\n\n const transformedX = (t.a * x) + (t.c * y) + t.tx;\n const transformedY = (t.b * x) + (t.d * y) + t.ty;\n\n if (instructions.length === 1 && instructions[0].action === 'moveTo')\n {\n instructions[0].data[0] = transformedX;\n instructions[0].data[1] = transformedY;\n\n return this;\n }\n this._activePath.moveTo(\n transformedX,\n transformedY\n );\n\n return this;\n }\n\n /**\n * Adds a quadratic curve to the path. It requires two points: the control point and the end point.\n * The starting point is the last point in the current path.\n * @param cpx - The x-coordinate of the control point.\n * @param cpy - The y-coordinate of the control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public quadraticCurveTo(cpx: number, cpy: number, x: number, y: number, smoothness?: number): this\n {\n this._tick++;\n\n const t = this._transform;\n\n this._activePath.quadraticCurveTo(\n (t.a * cpx) + (t.c * cpy) + t.tx,\n (t.b * cpx) + (t.d * cpy) + t.ty,\n (t.a * x) + (t.c * y) + t.tx,\n (t.b * x) + (t.d * y) + t.ty,\n smoothness,\n );\n\n return this;\n }\n\n /**\n * Draws a rectangle shape. This method adds a new rectangle path to the current drawing.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @returns The instance of the current object for chaining.\n */\n public rect(x: number, y: number, w: number, h: number): this\n {\n this._tick++;\n\n this._activePath.rect(x, y, w, h, this._transform.clone());\n\n return this;\n }\n\n /**\n * Draws a rectangle with rounded corners.\n * The corner radius can be specified to determine how rounded the corners should be.\n * An optional transformation can be applied, which allows for rotation, scaling, and translation of the rectangle.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @param radius - The radius of the rectangle's corners. If not specified, corners will be sharp.\n * @returns The instance of the current object for chaining.\n */\n public roundRect(x: number, y: number, w: number, h: number, radius?: number): this\n {\n this._tick++;\n\n this._activePath.roundRect(x, y, w, h, radius, this._transform.clone());\n\n return this;\n }\n\n /**\n * Draws a polygon shape by specifying a sequence of points. This method allows for the creation of complex polygons,\n * which can be both open and closed. An optional transformation can be applied, enabling the polygon to be scaled,\n * rotated, or translated as needed.\n * @param points - An array of numbers, or an array of PointData objects eg [{x,y}, {x,y}, {x,y}]\n * representing the x and y coordinates, of the polygon's vertices, in sequence.\n * @param close - A boolean indicating whether to close the polygon path. True by default.\n */\n public poly(points: number[] | PointData[], close?: boolean): this\n {\n this._tick++;\n\n this._activePath.poly(points, close, this._transform.clone());\n\n return this;\n }\n\n /**\n * Draws a regular polygon with a specified number of sides. All sides and angles are equal.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @param transform - An optional `Matrix` object to apply a transformation to the polygon.\n * @returns The instance of the current object for chaining.\n */\n public regularPoly(x: number, y: number, radius: number, sides: number, rotation = 0, transform?: Matrix): this\n {\n this._tick++;\n this._activePath.regularPoly(x, y, radius, sides, rotation, transform);\n\n return this;\n }\n\n /**\n * Draws a polygon with rounded corners.\n * Similar to `regularPoly` but with the ability to round the corners of the polygon.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param corner - The radius of the rounding of the corners.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @returns The instance of the current object for chaining.\n */\n public roundPoly(x: number, y: number, radius: number, sides: number, corner: number, rotation?: number): this\n {\n this._tick++;\n this._activePath.roundPoly(x, y, radius, sides, corner, rotation);\n\n return this;\n }\n\n /**\n * Draws a shape with rounded corners. This function supports custom radius for each corner of the shape.\n * Optionally, corners can be rounded using a quadratic curve instead of an arc, providing a different aesthetic.\n * @param points - An array of `RoundedPoint` representing the corners of the shape to draw.\n * A minimum of 3 points is required.\n * @param radius - The default radius for the corners.\n * This radius is applied to all corners unless overridden in `points`.\n * @param useQuadratic - If set to true, rounded corners are drawn using a quadraticCurve\n * method instead of an arc method. Defaults to false.\n * @param smoothness - Specifies the smoothness of the curve when `useQuadratic` is true.\n * Higher values make the curve smoother.\n * @returns The instance of the current object for chaining.\n */\n public roundShape(points: RoundedPoint[], radius: number, useQuadratic?: boolean, smoothness?: number): this\n {\n this._tick++;\n this._activePath.roundShape(points, radius, useQuadratic, smoothness);\n\n return this;\n }\n\n /**\n * Draw Rectangle with fillet corners. This is much like rounded rectangle\n * however it support negative numbers as well for the corner radius.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param fillet - accept negative or positive values\n */\n public filletRect(x: number, y: number, width: number, height: number, fillet: number): this\n {\n this._tick++;\n this._activePath.filletRect(x, y, width, height, fillet);\n\n return this;\n }\n\n /**\n * Draw Rectangle with chamfer corners. These are angled corners.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param chamfer - non-zero real number, size of corner cutout\n * @param transform\n */\n public chamferRect(x: number, y: number, width: number, height: number, chamfer: number, transform?: Matrix): this\n {\n this._tick++;\n this._activePath.chamferRect(x, y, width, height, chamfer, transform);\n\n return this;\n }\n\n /**\n * Draws a star shape centered at a specified location. This method allows for the creation\n * of stars with a variable number of points, outer radius, optional inner radius, and rotation.\n * The star is drawn as a closed polygon with alternating outer and inner vertices to create the star's points.\n * An optional transformation can be applied to scale, rotate, or translate the star as needed.\n * @param x - The x-coordinate of the center of the star.\n * @param y - The y-coordinate of the center of the star.\n * @param points - The number of points of the star.\n * @param radius - The outer radius of the star (distance from the center to the outer points).\n * @param innerRadius - Optional. The inner radius of the star\n * (distance from the center to the inner points between the outer points).\n * If not provided, defaults to half of the `radius`.\n * @param rotation - Optional. The rotation of the star in radians, where 0 is aligned with the y-axis.\n * Defaults to 0, meaning one point is directly upward.\n * @returns The instance of the current object for chaining further drawing commands.\n */\n public star(x: number, y: number, points: number, radius: number, innerRadius = 0, rotation = 0): this\n {\n this._tick++;\n\n this._activePath.star(x, y, points, radius, innerRadius, rotation, this._transform.clone());\n\n return this;\n }\n\n /**\n * Parses and renders an SVG string into the graphics context. This allows for complex shapes and paths\n * defined in SVG format to be drawn within the graphics context.\n * @param svg - The SVG string to be parsed and rendered.\n */\n public svg(svg: string): this\n {\n this._tick++;\n\n SVGParser(svg, this);\n\n return this;\n }\n\n /**\n * Restores the most recently saved graphics state by popping the top of the graphics state stack.\n * This includes transformations, fill styles, and stroke styles.\n */\n public restore(): this\n {\n const state = this._stateStack.pop();\n\n if (state)\n {\n this._transform = state.transform;\n this._fillStyle = state.fillStyle;\n this._strokeStyle = state.strokeStyle;\n }\n\n return this;\n }\n\n /** Saves the current graphics state, including transformations, fill styles, and stroke styles, onto a stack. */\n public save(): this\n {\n this._stateStack.push({\n transform: this._transform.clone(),\n fillStyle: { ...this._fillStyle },\n strokeStyle: { ...this._strokeStyle },\n });\n\n return this;\n }\n\n /**\n * Returns the current transformation matrix of the graphics context.\n * @returns The current transformation matrix.\n */\n public getTransform(): Matrix\n {\n return this._transform;\n }\n\n /**\n * Resets the current transformation matrix to the identity matrix, effectively removing any transformations (rotation, scaling, translation) previously applied.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public resetTransform(): this\n {\n this._transform.identity();\n\n return this;\n }\n\n /**\n * Applies a rotation transformation to the graphics context around the current origin.\n * @param angle - The angle of rotation in radians.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public rotate(angle: number): this\n {\n this._transform.rotate(angle);\n\n return this;\n }\n\n /**\n * Applies a scaling transformation to the graphics context, scaling drawings by x horizontally and by y vertically.\n * @param x - The scale factor in the horizontal direction.\n * @param y - (Optional) The scale factor in the vertical direction. If not specified, the x value is used for both directions.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public scale(x: number, y: number = x): this\n {\n this._transform.scale(x, y);\n\n return this;\n }\n\n /**\n * Sets the current transformation matrix of the graphics context to the specified matrix or values.\n * This replaces the current transformation matrix.\n * @param a - The value for the a property of the matrix, or a Matrix object to use directly.\n * @param b - The value for the b property of the matrix.\n * @param c - The value for the c property of the matrix.\n * @param d - The value for the d property of the matrix.\n * @param dx - The value for the tx (translate x) property of the matrix.\n * @param dy - The value for the ty (translate y) property of the matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public setTransform(transform: Matrix): this;\n public setTransform(a: number, b: number, c: number, d: number, dx: number, dy: number): this;\n public setTransform(a: number | Matrix, b?: number, c?: number, d?: number, dx?: number, dy?: number): this\n {\n if (a instanceof Matrix)\n {\n this._transform.set(a.a, a.b, a.c, a.d, a.tx, a.ty);\n\n return this;\n }\n\n this._transform.set(a, b, c, d, dx, dy);\n\n return this;\n }\n\n /**\n * Applies the specified transformation matrix to the current graphics context by multiplying the current matrix with the specified matrix.\n * @param a - The value for the a property of the matrix, or a Matrix object to use directly.\n * @param b - The value for the b property of the matrix.\n * @param c - The value for the c property of the matrix.\n * @param d - The value for the d property of the matrix.\n * @param dx - The value for the tx (translate x) property of the matrix.\n * @param dy - The value for the ty (translate y) property of the matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public transform(transform: Matrix): this;\n public transform(a: number, b: number, c: number, d: number, dx: number, dy: number): this;\n public transform(a: number | Matrix, b?: number, c?: number, d?: number, dx?: number, dy?: number): this\n {\n if (a instanceof Matrix)\n {\n this._transform.append(a);\n\n return this;\n }\n\n tempMatrix.set(a, b, c, d, dx, dy);\n this._transform.append(tempMatrix);\n\n return this;\n }\n\n /**\n * Applies a translation transformation to the graphics context, moving the origin by the specified amounts.\n * @param x - The amount to translate in the horizontal direction.\n * @param y - (Optional) The amount to translate in the vertical direction. If not specified, the x value is used for both directions.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public translate(x: number, y: number = x): this\n {\n this._transform.translate(x, y);\n\n return this;\n }\n\n /**\n * Clears all drawing commands from the graphics context, effectively resetting it. This includes clearing the path,\n * and optionally resetting transformations to the identity matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public clear(): this\n {\n this._activePath.clear();\n this.instructions.length = 0;\n this.resetTransform();\n\n this.onUpdate();\n\n return this;\n }\n\n protected onUpdate(): void\n {\n if (this.dirty) return;\n\n this.emit('update', this, 0x10);\n this.dirty = true;\n this._boundsDirty = true;\n }\n\n /** The bounds of the graphic shape. */\n get bounds(): Bounds\n {\n if (!this._boundsDirty) return this._bounds;\n\n // TODO switch to idy dirty with tick..\n const bounds = this._bounds;\n\n bounds.clear();\n\n for (let i = 0; i < this.instructions.length; i++)\n {\n const instruction = this.instructions[i];\n const action = instruction.action;\n\n if (action === 'fill')\n {\n const data = instruction.data as FillInstruction['data'];\n\n bounds.addBounds(data.path.bounds);\n }\n else if (action === 'texture')\n {\n const data = instruction.data as TextureInstruction['data'];\n\n bounds.addFrame(data.dx, data.dy, data.dx + data.dw, data.dy + data.dh, data.transform);\n }\n if (action === 'stroke')\n {\n const data = instruction.data as StrokeInstruction['data'];\n\n const padding = data.style.width / 2;\n\n const _bounds = data.path.bounds;\n\n bounds.addFrame(\n _bounds.minX - padding,\n _bounds.minY - padding,\n _bounds.maxX + padding,\n _bounds.maxY + padding\n );\n }\n }\n\n return bounds;\n }\n\n /**\n * Check to see if a point is contained within this geometry.\n * @param point - Point to check if it's contained.\n * @returns {boolean} `true` if the point is contained within geometry.\n */\n public containsPoint(point: PointData): boolean\n {\n // early out if the bounding box is not hit\n if (!this.bounds.containsPoint(point.x, point.y)) return false;\n\n const instructions = this.instructions;\n let hasHit = false;\n\n for (let k = 0; k < instructions.length; k++)\n {\n const instruction = instructions[k];\n\n const data = instruction.data as FillInstruction['data'];\n const path = data.path;\n\n if (!instruction.action || !path) continue;\n\n const style = data.style;\n const shapes = path.shapePath.shapePrimitives;\n\n for (let i = 0; i < shapes.length; i++)\n {\n const shape = shapes[i].shape;\n\n if (!style || !shape) continue;\n\n const transform = shapes[i].transform;\n\n const transformedPoint = transform ? transform.applyInverse(point, tmpPoint) : point;\n\n if (instruction.action === 'fill')\n {\n hasHit = shape.contains(transformedPoint.x, transformedPoint.y);\n }\n else\n {\n hasHit = shape.strokeContains(transformedPoint.x, transformedPoint.y, (style as ConvertedStrokeStyle).width);\n }\n\n const holes = data.hole;\n\n if (holes)\n {\n const holeShapes = holes.shapePath?.shapePrimitives;\n\n if (holeShapes)\n {\n for (let j = 0; j < holeShapes.length; j++)\n {\n if (holeShapes[j].shape.contains(transformedPoint.x, transformedPoint.y))\n {\n hasHit = false;\n }\n }\n }\n }\n\n if (hasHit)\n {\n return true;\n }\n }\n }\n\n return hasHit;\n }\n\n /**\n * Destroys the GraphicsData object.\n * @param options - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.texture=false] - Should it destroy the current texture of the fill/stroke style?\n * @param {boolean} [options.textureSource=false] - Should it destroy the texture source of the fill/stroke style?\n */\n public destroy(options: TypeOrBool = false): void\n {\n this._stateStack.length = 0;\n this._transform = null;\n\n this.emit('destroy', this);\n this.removeAllListeners();\n\n const destroyTexture = typeof options === 'boolean' ? options : options?.texture;\n\n if (destroyTexture)\n {\n const destroyTextureSource = typeof options === 'boolean' ? options : options?.textureSource;\n\n if (this._fillStyle.texture)\n {\n this._fillStyle.texture.destroy(destroyTextureSource);\n }\n\n if (this._strokeStyle.texture)\n {\n this._strokeStyle.texture.destroy(destroyTextureSource);\n }\n }\n\n this._fillStyle = null;\n this._strokeStyle = null;\n\n this.instructions = null;\n this._activePath = null;\n this._bounds = null;\n this._stateStack = null;\n this.customShader = null;\n this._transform = null;\n }\n}\n","import { Color } from '../../../color/Color';\n\nimport type { ConvertedFillStyle, ConvertedStrokeStyle } from '../../graphics/shared/FillTypes';\nimport type { HTMLTextStyle } from '../../text-html/HtmlTextStyle';\nimport type { TextStyle } from '../TextStyle';\n\nconst valuesToIterateForKeys: Partial[] = [\n 'align',\n 'breakWords',\n 'cssOverrides',\n 'fontVariant',\n 'fontWeight',\n 'leading',\n 'letterSpacing',\n 'lineHeight',\n 'padding',\n 'textBaseline',\n 'trim',\n 'whiteSpace',\n 'wordWrap',\n 'wordWrapWidth',\n 'fontFamily',\n 'fontStyle',\n 'fontSize',\n] as const;\n\n/**\n * Generates a unique key for the text style.\n * @param style - The style to generate a key for.\n * @returns the key for the style.\n */\nexport function generateTextStyleKey(style: TextStyle): string\n{\n const key = [];\n\n let index = 0;\n\n for (let i = 0; i < valuesToIterateForKeys.length; i++)\n {\n const prop = `_${valuesToIterateForKeys[i]}`;\n\n key[index++] = style[prop as keyof typeof style];\n }\n\n index = addFillStyleKey(style._fill, key as string[], index);\n index = addStokeStyleKey(style._stroke, key as string[], index);\n index = addDropShadowKey(style.dropShadow, key as string[], index);\n\n return key.join('-');\n}\n\nfunction addFillStyleKey(fillStyle: ConvertedFillStyle, key: (number | string)[], index: number)\n{\n if (!fillStyle) return index;\n\n key[index++] = fillStyle.color;\n key[index++] = fillStyle.alpha;\n key[index++] = fillStyle.fill?.styleKey;\n\n return index;\n}\n\nfunction addStokeStyleKey(strokeStyle: ConvertedStrokeStyle, key: (number | string)[], index: number)\n{\n if (!strokeStyle) return index;\n\n index = addFillStyleKey(strokeStyle, key, index);\n\n key[index++] = strokeStyle.width;\n key[index++] = strokeStyle.alignment;\n key[index++] = strokeStyle.cap;\n key[index++] = strokeStyle.join;\n key[index++] = strokeStyle.miterLimit;\n\n return index;\n}\n\nfunction addDropShadowKey(dropShadow: TextStyle['dropShadow'], key: (number | string)[], index: number)\n{\n if (!dropShadow) return index;\n\n key[index++] = dropShadow.alpha;\n key[index++] = dropShadow.angle;\n key[index++] = dropShadow.blur;\n key[index++] = dropShadow.distance;\n key[index++] = Color.shared.setValue(dropShadow.color).toNumber();\n\n return index;\n}\n","import EventEmitter from 'eventemitter3';\nimport { Color, type ColorSource } from '../../color/Color';\nimport { deprecation, v8_0_0 } from '../../utils/logging/deprecation';\nimport { FillGradient } from '../graphics/shared/fill/FillGradient';\nimport { FillPattern } from '../graphics/shared/fill/FillPattern';\nimport { GraphicsContext } from '../graphics/shared/GraphicsContext';\nimport {\n toFillStyle,\n toStrokeStyle\n} from '../graphics/shared/utils/convertFillInputToFillStyle';\nimport { generateTextStyleKey } from './utils/generateTextStyleKey';\n\nimport type { TextureDestroyOptions, TypeOrBool } from '../container/destroyTypes';\nimport type {\n ConvertedFillStyle,\n ConvertedStrokeStyle,\n FillInput,\n FillStyle,\n StrokeInput,\n StrokeStyle\n} from '../graphics/shared/FillTypes';\n\nexport type TextStyleAlign = 'left' | 'center' | 'right' | 'justify';\nexport type TextStyleFill = string | string[] | number | number[] | CanvasGradient | CanvasPattern;\nexport type TextStyleFontStyle = 'normal' | 'italic' | 'oblique';\nexport type TextStyleFontVariant = 'normal' | 'small-caps';\n// eslint-disable-next-line max-len\nexport type TextStyleFontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';\nexport type TextStyleLineJoin = 'miter' | 'round' | 'bevel';\nexport type TextStyleTextBaseline = 'alphabetic' | 'top' | 'hanging' | 'middle' | 'ideographic' | 'bottom';\nexport type TextStyleWhiteSpace = 'normal' | 'pre' | 'pre-line';\n\n/**\n * A collection of text related classes.\n * @namespace text\n */\n\n/**\n * A drop shadow effect.\n * @memberof text\n */\nexport type TextDropShadow = {\n /** Set alpha for the drop shadow */\n alpha: number;\n /** Set a angle of the drop shadow */\n angle: number;\n /** Set a shadow blur radius */\n blur: number;\n /** A fill style to be used on the e.g., 'red', '#00FF00' */\n color: ColorSource;\n /** Set a distance of the drop shadow */\n distance: number;\n};\n\n/**\n * Constructor options used for `TextStyle` instances.\n * ```js\n * const textStyle = new TextStyle({\n * fontSize: 12,\n * fill: 'black',\n * });\n * ```\n * @see {@link text.TextStyle}\n * @memberof text\n */\nexport interface TextStyleOptions\n{\n /**\n * Alignment for multiline text, does not affect single line text\n * @type {'left'|'center'|'right'|'justify'}\n */\n align?: TextStyleAlign;\n /** Indicates if lines can be wrapped within words, it needs `wordWrap` to be set to `true` */\n breakWords?: boolean;\n /** Set a drop shadow for the text */\n dropShadow?: boolean | Partial;\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, e.g., `['#000000','#FFFFFF']`\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN}\n * @type {string|string[]|number|number[]|CanvasGradient|CanvasPattern}\n */\n fill?: FillInput;\n /** The font family, can be a single font name, or a list of names where the first is the preferred font. */\n fontFamily?: string | string[];\n /** The font size (as a number it converts to px, but as a string, equivalents are '26px','20pt','160%' or '1.6em') */\n fontSize?: number | string;\n /**\n * The font style.\n * @type {'normal'|'italic'|'oblique'}\n */\n fontStyle?: TextStyleFontStyle;\n /**\n * The font variant.\n * @type {'normal'|'small-caps'}\n */\n fontVariant?: TextStyleFontVariant;\n /**\n * The font weight.\n * @type {'normal'|'bold'|'bolder'|'lighter'|'100'|'200'|'300'|'400'|'500'|'600'|'700'|'800'|'900'}\n */\n fontWeight?: TextStyleFontWeight;\n /** The height of the line, a number that represents the vertical space that a letter uses. */\n leading?: number;\n /** The amount of spacing between letters, default is 0 */\n letterSpacing?: number;\n /** The line height, a number that represents the vertical space that a letter uses */\n lineHeight?: number;\n /**\n * Occasionally some fonts are cropped. Adding some padding will prevent this from\n * happening by adding padding to all sides of the text.\n */\n padding?: number;\n /** A canvas fillstyle that will be used on the text stroke, e.g., 'blue', '#FCFF00' */\n stroke?: StrokeInput;\n /**\n * The baseline of the text that is rendered.\n * @type {'alphabetic'|'top'|'hanging'|'middle'|'ideographic'|'bottom'}\n */\n textBaseline?: TextStyleTextBaseline;\n trim?: boolean,\n /**\n * Determines whether newlines & spaces are collapsed or preserved \"normal\"\n * (collapse, collapse), \"pre\" (preserve, preserve) | \"pre-line\" (preserve,\n * collapse). It needs wordWrap to be set to true.\n * @type {'normal'|'pre'|'pre-line'}\n */\n whiteSpace?: TextStyleWhiteSpace;\n /** Indicates if word wrap should be used */\n wordWrap?: boolean;\n /** The width at which text will wrap, it needs wordWrap to be set to true */\n wordWrapWidth?: number;\n}\n\n/**\n * A TextStyle Object contains information to decorate a Text objects.\n *\n * An instance can be shared between multiple Text objects; then changing the style will update all text objects using it.\n * @memberof text\n * @example\n * import { TextStyle } from 'pixi.js';\n * const style = new TextStyle({\n * fontFamily: ['Helvetica', 'Arial', 'sans-serif'],\n * fontSize: 36,\n * });\n */\nexport class TextStyle extends EventEmitter<{\n update: TextDropShadow\n}>\n{\n /** The default drop shadow settings */\n public static defaultDropShadow: TextDropShadow = {\n /** Set alpha for the drop shadow */\n alpha: 1,\n /** Set a angle of the drop shadow */\n angle: Math.PI / 6,\n /** Set a shadow blur radius */\n blur: 0,\n /** A fill style to be used on the e.g., 'red', '#00FF00' */\n color: 'black',\n /** Set a distance of the drop shadow */\n distance: 5,\n };\n\n /** The default text style settings */\n public static defaultTextStyle: TextStyleOptions = {\n /**\n * See {@link TextStyle.align}\n * @type {'left'|'center'|'right'|'justify'}\n */\n align: 'left',\n /** See {@link TextStyle.breakWords} */\n breakWords: false,\n /** See {@link TextStyle.dropShadow} */\n dropShadow: null,\n /**\n * See {@link TextStyle.fill}\n * @type {string|string[]|number|number[]|CanvasGradient|CanvasPattern}\n */\n fill: 'black',\n /**\n * See {@link TextStyle.fontFamily}\n * @type {string|string[]}\n */\n fontFamily: 'Arial',\n /**\n * See {@link TextStyle.fontSize}\n * @type {number|string}\n */\n fontSize: 26,\n /**\n * See {@link TextStyle.fontStyle}\n * @type {'normal'|'italic'|'oblique'}\n */\n fontStyle: 'normal',\n /**\n * See {@link TextStyle.fontVariant}\n * @type {'normal'|'small-caps'}\n */\n fontVariant: 'normal',\n /**\n * See {@link TextStyle.fontWeight}\n * @type {'normal'|'bold'|'bolder'|'lighter'|'100'|'200'|'300'|'400'|'500'|'600'|'700'|'800'|'900'}\n */\n fontWeight: 'normal',\n /** See {@link TextStyle.leading} */\n leading: 0,\n /** See {@link TextStyle.letterSpacing} */\n letterSpacing: 0,\n /** See {@link TextStyle.lineHeight} */\n lineHeight: 0,\n /** See {@link TextStyle.padding} */\n padding: 0,\n /**\n * See {@link TextStyle.stroke}\n * @type {string|number}\n */\n stroke: null,\n /**\n * See {@link TextStyle.textBaseline}\n * @type {'alphabetic'|'top'|'hanging'|'middle'|'ideographic'|'bottom'}\n */\n textBaseline: 'alphabetic',\n /** See {@link TextStyle.trim} */\n trim: false,\n /**\n * See {@link TextStyle.whiteSpace}\n * @type {'normal'|'pre'|'pre-line'}\n */\n whiteSpace: 'pre',\n /** See {@link TextStyle.wordWrap} */\n wordWrap: false,\n /** See {@link TextStyle.wordWrapWidth} */\n wordWrapWidth: 100,\n };\n\n // colors!!\n public _fill: ConvertedFillStyle;\n private _originalFill: FillInput;\n\n public _stroke: ConvertedStrokeStyle;\n private _originalStroke: StrokeInput;\n\n private _dropShadow: TextDropShadow;\n\n private _fontFamily: string | string[];\n private _fontSize: number;\n private _fontStyle: TextStyleFontStyle;\n private _fontVariant: TextStyleFontVariant;\n private _fontWeight: TextStyleFontWeight;\n\n private _breakWords: boolean;\n private _align: TextStyleAlign;\n private _leading: number;\n private _letterSpacing: number;\n private _lineHeight: number;\n\n private _textBaseline: TextStyleTextBaseline;\n private _whiteSpace: TextStyleWhiteSpace;\n private _wordWrap: boolean;\n private _wordWrapWidth: number;\n\n private _padding: number;\n\n protected _styleKey: string;\n private _trim: boolean;\n\n constructor(style: Partial = {})\n {\n super();\n\n convertV7Tov8Style(style);\n\n const fullStyle = { ...TextStyle.defaultTextStyle, ...style };\n\n for (const key in fullStyle)\n {\n const thisKey = key as keyof typeof this;\n\n this[thisKey] = fullStyle[key as keyof TextStyleOptions] as any;\n }\n\n this.update();\n }\n\n /**\n * Alignment for multiline text, does not affect single line text.\n * @member {'left'|'center'|'right'|'justify'}\n */\n get align(): TextStyleAlign { return this._align; }\n set align(value: TextStyleAlign) { this._align = value; this.update(); }\n /** Indicates if lines can be wrapped within words, it needs wordWrap to be set to true. */\n get breakWords(): boolean { return this._breakWords; }\n set breakWords(value: boolean) { this._breakWords = value; this.update(); }\n /** Set a drop shadow for the text. */\n get dropShadow(): TextDropShadow { return this._dropShadow; }\n set dropShadow(value: boolean | TextDropShadow)\n {\n if (value !== null && typeof value === 'object')\n {\n this._dropShadow = this._createProxy({ ...TextStyle.defaultDropShadow, ...value });\n }\n else\n {\n this._dropShadow = value ? this._createProxy({ ...TextStyle.defaultDropShadow }) : null;\n }\n\n this.update();\n }\n /** The font family, can be a single font name, or a list of names where the first is the preferred font. */\n get fontFamily(): string | string[] { return this._fontFamily; }\n set fontFamily(value: string | string[]) { this._fontFamily = value; this.update(); }\n /** The font size (as a number it converts to px, but as a string, equivalents are '26px','20pt','160%' or '1.6em') */\n get fontSize(): number { return this._fontSize; }\n set fontSize(value: string | number)\n {\n if (typeof value === 'string')\n {\n // eg '34px' to number\n this._fontSize = parseInt(value as string, 10);\n }\n else\n {\n this._fontSize = value as number;\n }\n this.update();\n }\n /**\n * The font style.\n * @member {'normal'|'italic'|'oblique'}\n */\n get fontStyle(): TextStyleFontStyle { return this._fontStyle; }\n set fontStyle(value: TextStyleFontStyle) { this._fontStyle = value; this.update(); }\n /**\n * The font variant.\n * @member {'normal'|'small-caps'}\n */\n get fontVariant(): TextStyleFontVariant { return this._fontVariant; }\n set fontVariant(value: TextStyleFontVariant) { this._fontVariant = value; this.update(); }\n /**\n * The font weight.\n * @member {'normal'|'bold'|'bolder'|'lighter'|'100'|'200'|'300'|'400'|'500'|'600'|'700'|'800'|'900'}\n */\n get fontWeight(): TextStyleFontWeight { return this._fontWeight; }\n set fontWeight(value: TextStyleFontWeight) { this._fontWeight = value; this.update(); }\n /** The space between lines. */\n get leading(): number { return this._leading; }\n set leading(value: number) { this._leading = value; this.update(); }\n /** The amount of spacing between letters, default is 0. */\n get letterSpacing(): number { return this._letterSpacing; }\n set letterSpacing(value: number) { this._letterSpacing = value; this.update(); }\n /** The line height, a number that represents the vertical space that a letter uses. */\n get lineHeight(): number { return this._lineHeight; }\n set lineHeight(value: number) { this._lineHeight = value; this.update(); }\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 get padding(): number { return this._padding; }\n set padding(value: number) { this._padding = value; this.update(); }\n\n /** Trim transparent borders. This is an expensive operation so only use this if you have to! */\n get trim(): boolean { return this._trim; }\n set trim(value: boolean) { this._trim = value; this.update(); }\n /**\n * The baseline of the text that is rendered.\n * @member {'alphabetic'|'top'|'hanging'|'middle'|'ideographic'|'bottom'}\n */\n get textBaseline(): TextStyleTextBaseline { return this._textBaseline; }\n set textBaseline(value: TextStyleTextBaseline) { this._textBaseline = value; this.update(); }\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 * @member {'normal'|'pre'|'pre-line'}\n */\n get whiteSpace(): TextStyleWhiteSpace { return this._whiteSpace; }\n set whiteSpace(value: TextStyleWhiteSpace) { this._whiteSpace = value; this.update(); }\n /** Indicates if word wrap should be used. */\n get wordWrap(): boolean { return this._wordWrap; }\n set wordWrap(value: boolean) { this._wordWrap = value; this.update(); }\n /** The width at which text will wrap, it needs wordWrap to be set to true. */\n get wordWrapWidth(): number { return this._wordWrapWidth; }\n set wordWrapWidth(value: number) { this._wordWrapWidth = value; this.update(); }\n\n /** A fillstyle that will be used on the text e.g., 'red', '#00FF00'. */\n get fill(): FillInput\n {\n return this._originalFill;\n }\n\n set fill(value: FillInput)\n {\n if (value === this._originalFill) return;\n\n this._originalFill = value;\n\n if (this._isFillStyle(value))\n {\n this._originalFill = this._createProxy({ ...GraphicsContext.defaultFillStyle, ...value }, () =>\n {\n this._fill = toFillStyle(\n { ...this._originalFill as FillStyle },\n GraphicsContext.defaultFillStyle\n );\n });\n }\n\n this._fill = toFillStyle(\n value === 0x0 ? 'black' : value,\n GraphicsContext.defaultFillStyle\n );\n this.update();\n }\n\n /** A fillstyle that will be used on the text stroke, e.g., 'blue', '#FCFF00'. */\n get stroke(): StrokeInput\n {\n return this._originalStroke;\n }\n\n set stroke(value: StrokeInput)\n {\n if (value === this._originalStroke) return;\n\n this._originalStroke = value;\n\n if (this._isFillStyle(value))\n {\n this._originalStroke = this._createProxy({ ...GraphicsContext.defaultStrokeStyle, ...value }, () =>\n {\n this._stroke = toStrokeStyle(\n { ...this._originalStroke as StrokeStyle },\n GraphicsContext.defaultStrokeStyle\n );\n });\n }\n\n this._stroke = toStrokeStyle(value, GraphicsContext.defaultStrokeStyle);\n this.update();\n }\n\n protected _generateKey(): string\n {\n this._styleKey = generateTextStyleKey(this);\n\n return this._styleKey;\n }\n\n public update()\n {\n this._styleKey = null;\n this.emit('update', this);\n }\n\n /** Resets all properties to the default values */\n public reset()\n {\n const defaultStyle = TextStyle.defaultTextStyle;\n\n for (const key in defaultStyle)\n {\n this[key as keyof typeof this] = defaultStyle[key as keyof TextStyleOptions] as any;\n }\n }\n\n get styleKey()\n {\n return this._styleKey || this._generateKey();\n }\n\n /**\n * Creates a new TextStyle object with the same values as this one.\n * @returns New cloned TextStyle object\n */\n public clone(): TextStyle\n {\n return new TextStyle({\n align: this.align,\n breakWords: this.breakWords,\n dropShadow: this._dropShadow ? { ...this._dropShadow } : null,\n fill: this._fill,\n fontFamily: this.fontFamily,\n fontSize: this.fontSize,\n fontStyle: this.fontStyle,\n fontVariant: this.fontVariant,\n fontWeight: this.fontWeight,\n leading: this.leading,\n letterSpacing: this.letterSpacing,\n lineHeight: this.lineHeight,\n padding: this.padding,\n stroke: this._stroke,\n textBaseline: this.textBaseline,\n whiteSpace: this.whiteSpace,\n wordWrap: this.wordWrap,\n wordWrapWidth: this.wordWrapWidth,\n });\n }\n\n /**\n * Destroys this text style.\n * @param options - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.texture=false] - Should it destroy the texture of the this style\n * @param {boolean} [options.textureSource=false] - Should it destroy the textureSource of the this style\n */\n public destroy(options: TypeOrBool = false)\n {\n this.removeAllListeners();\n\n const destroyTexture = typeof options === 'boolean' ? options : options?.texture;\n\n if (destroyTexture)\n {\n const destroyTextureSource = typeof options === 'boolean' ? options : options?.textureSource;\n\n if (this._fill?.texture)\n {\n this._fill.texture.destroy(destroyTextureSource);\n }\n\n if ((this._originalFill as FillStyle)?.texture)\n {\n (this._originalFill as FillStyle).texture.destroy(destroyTextureSource);\n }\n\n if (this._stroke?.texture)\n {\n this._stroke.texture.destroy(destroyTextureSource);\n }\n\n if ((this._originalStroke as FillStyle)?.texture)\n {\n (this._originalStroke as FillStyle).texture.destroy(destroyTextureSource);\n }\n }\n\n this._fill = null;\n this._stroke = null;\n this.dropShadow = null;\n this._originalStroke = null;\n this._originalFill = null;\n }\n\n private _createProxy(value: T, cb?: (property: string, newValue: any) => void): T\n {\n return new Proxy(value, {\n set: (target, property, newValue) =>\n {\n target[property as keyof T] = newValue;\n cb?.(property as string, newValue);\n this.update();\n\n return true;\n }\n });\n }\n\n private _isFillStyle(value: FillInput): value is FillStyle\n {\n return ((value ?? null) !== null\n && !(Color.isColorLike(value) || value instanceof FillGradient || value instanceof FillPattern));\n }\n}\n\nfunction convertV7Tov8Style(style: TextStyleOptions)\n{\n const oldStyle = style as TextStyleOptions & {\n dropShadowAlpha?: number;\n dropShadowAngle?: number;\n dropShadowBlur?: number;\n dropShadowColor?: number;\n dropShadowDistance?: number;\n fillGradientStops?: number[];\n strokeThickness?: number;\n };\n\n if (typeof oldStyle.dropShadow === 'boolean' && oldStyle.dropShadow)\n {\n const defaults = TextStyle.defaultDropShadow;\n\n style.dropShadow = {\n alpha: oldStyle.dropShadowAlpha ?? defaults.alpha,\n angle: oldStyle.dropShadowAngle ?? defaults.angle,\n blur: oldStyle.dropShadowBlur ?? defaults.blur,\n color: oldStyle.dropShadowColor ?? defaults.color,\n distance: oldStyle.dropShadowDistance ?? defaults.distance,\n };\n }\n\n if (oldStyle.strokeThickness !== undefined)\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'strokeThickness is now a part of stroke');\n // #endif\n\n const color = oldStyle.stroke;\n let obj: FillStyle = {};\n\n // handles stroke: 0x0, stroke: { r: 0, g: 0, b: 0, a: 0 } stroke: new Color(0x0)\n if (Color.isColorLike(color as ColorSource))\n {\n obj.color = color as ColorSource;\n }\n // handles stroke: new FillGradient()\n else if (color instanceof FillGradient || color instanceof FillPattern)\n {\n obj.fill = color as FillGradient | FillPattern;\n }\n // handles stroke: { color: 0x0 } or stroke: { fill: new FillGradient() }\n else if (Object.hasOwnProperty.call(color, 'color') || Object.hasOwnProperty.call(color, 'fill'))\n {\n obj = color as FillStyle;\n }\n else\n {\n throw new Error('Invalid stroke value.');\n }\n\n style.stroke = {\n ...obj,\n width: oldStyle.strokeThickness\n };\n }\n\n if (Array.isArray(oldStyle.fillGradientStops))\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'gradient fill is now a fill pattern: `new FillGradient(...)`');\n // #endif\n\n let fontSize: number;\n\n // eslint-disable-next-line no-eq-null, eqeqeq\n if (style.fontSize == null)\n {\n style.fontSize = TextStyle.defaultTextStyle.fontSize;\n }\n else if (typeof style.fontSize === 'string')\n {\n // eg '34px' to number\n fontSize = parseInt(style.fontSize as string, 10);\n }\n else\n {\n fontSize = style.fontSize as number;\n }\n\n const gradientFill = new FillGradient(0, 0, 0, fontSize * 1.7);\n\n const fills: number[] = oldStyle.fillGradientStops\n .map((color: ColorSource) => Color.shared.setValue(color).toNumber());\n\n fills.forEach((number, index) =>\n {\n const ratio = index / (fills.length - 1);\n\n gradientFill.addColorStop(ratio, number);\n });\n\n style.fill = {\n fill: gradientFill\n };\n }\n}\n\n","import { TexturePool } from '../../../rendering/renderers/shared/texture/TexturePool';\nimport { Bounds } from '../../container/bounds/Bounds';\n\nimport type { ICanvas } from '../../../environment/canvas/ICanvas';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\n\nconst tempBounds = new Bounds();\n\n/**\n * Takes an image and creates a texture from it, using a power of 2 texture from the texture pool.\n * Remember to return the texture when you don't need it any more!\n * @param image - The image to create a texture from\n * @param width - the frame width of the texture\n * @param height - the frame height of the texture\n * @param resolution - The resolution of the texture\n * @returns - The texture\n */\nexport function getPo2TextureFromSource(\n image: HTMLImageElement | HTMLCanvasElement | ICanvas,\n width: number,\n height: number,\n resolution: number\n): Texture\n{\n const bounds = tempBounds;\n\n bounds.minX = 0;\n bounds.minY = 0;\n\n bounds.maxX = (image.width / resolution) | 0;\n bounds.maxY = (image.height / resolution) | 0;\n\n const texture = TexturePool.getOptimalTexture(\n bounds.width,\n bounds.height,\n resolution,\n false\n );\n\n texture.source.uploadMethodId = 'image';\n texture.source.resource = image;\n texture.source.alphaMode = 'premultiply-alpha-on-upload';\n\n texture.frame.width = width / resolution;\n texture.frame.height = height / resolution;\n\n // We want to update the resource on the GPU,\n // but we do not want to resize the texture.\n // calling `texture.source.update` will fit the resource to the texture\n // causing a resize of the texture on the GPU.\n // which is not what we want!\n texture.source.emit('update', texture.source);\n\n texture.updateUvs();\n\n return texture;\n}\n","import type { TextStyle } from '../../TextStyle';\n\nconst genericFontFamilies = [\n 'serif',\n 'sans-serif',\n 'monospace',\n 'cursive',\n 'fantasy',\n 'system-ui',\n];\n\n/**\n * Generates a font style string to use for `TextMetrics.measureFont()`.\n * @param style\n * @returns Font style string, for passing to `TextMetrics.measureFont()`\n */\nexport function fontStringFromTextStyle(style: TextStyle): string\n{\n // build canvas api font setting from individual components. Convert a numeric style.fontSize to px\n const fontSizeString = (typeof style.fontSize === 'number') ? `${style.fontSize}px` : style.fontSize;\n\n // Clean-up fontFamily property by quoting each font name\n // this will support font names with spaces\n let fontFamilies: string | string[] = style.fontFamily;\n\n if (!Array.isArray(style.fontFamily))\n {\n fontFamilies = style.fontFamily.split(',');\n }\n\n for (let i = fontFamilies.length - 1; i >= 0; i--)\n {\n // Trim any extra white-space\n let fontFamily = fontFamilies[i].trim();\n\n // Check if font already contains strings\n if (!(/([\\\"\\'])[^\\'\\\"]+\\1/).test(fontFamily) && !genericFontFamilies.includes(fontFamily))\n {\n fontFamily = `\"${fontFamily}\"`;\n }\n (fontFamilies as string[])[i] = fontFamily;\n }\n\n // eslint-disable-next-line max-len\n return `${style.fontStyle} ${style.fontVariant} ${style.fontWeight} ${fontSizeString} ${(fontFamilies as string[]).join(',')}`;\n}\n","import { DOMAdapter } from '../../../environment/adapter';\nimport { fontStringFromTextStyle } from './utils/fontStringFromTextStyle';\n\nimport type { ICanvas, ICanvasRenderingContext2DSettings } from '../../../environment/canvas/ICanvas';\nimport type { ICanvasRenderingContext2D } from '../../../environment/canvas/ICanvasRenderingContext2D';\nimport type { TextStyle, TextStyleWhiteSpace } from '../TextStyle';\n\n// The type for Intl.Segmenter is only available since TypeScript 4.7.2, so let's make a polyfill for it.\ninterface ISegmentData\n{\n segment: string;\n}\ninterface ISegments\n{\n [Symbol.iterator](): IterableIterator;\n}\ninterface ISegmenter\n{\n segment(input: string): ISegments;\n}\ninterface IIntl\n{\n Segmenter?: {\n prototype: ISegmenter;\n new(): ISegmenter;\n };\n}\n\n/**\n * A number, or a string containing a number.\n * @memberof text\n * @typedef {object} FontMetrics\n * @property {number} ascent - Font ascent\n * @property {number} descent - Font descent\n * @property {number} fontSize - Font size\n */\nexport interface FontMetrics\n{\n ascent: number;\n descent: number;\n fontSize: number;\n}\n\ntype CharacterWidthCache = Record;\n\n// Default settings used for all getContext calls\nconst contextSettings: ICanvasRenderingContext2DSettings = {\n // TextMetrics requires getImageData readback for measuring fonts.\n willReadFrequently: true,\n};\n\n/**\n * The TextMetrics object represents the measurement of a block of text with a specified style.\n * @example\n * import { TextMetrics, TextStyle } from 'pixi.js';\n *\n * const style = new TextStyle({\n * fontFamily: 'Arial',\n * fontSize: 24,\n * fill: 0xff1010,\n * align: 'center',\n * });\n * const textMetrics = TextMetrics.measureText('Your text', style);\n * @memberof text\n */\nexport class CanvasTextMetrics\n{\n /** The text that was measured. */\n public text: string;\n\n /** The style that was measured. */\n public style: TextStyle;\n\n /** The measured width of the text. */\n public width: number;\n\n /** The measured height of the text. */\n public height: number;\n\n /** An array of lines of the text broken by new lines and wrapping is specified in style. */\n public lines: string[];\n\n /** An array of the line widths for each line matched to `lines`. */\n public lineWidths: number[];\n\n /** The measured line height for this style. */\n public lineHeight: number;\n\n /** The maximum line width for all measured lines. */\n public maxLineWidth: number;\n\n /** The font properties object from TextMetrics.measureFont. */\n public fontProperties: FontMetrics;\n\n /**\n * String used for calculate font metrics.\n * These characters are all tall to help calculate the height required for text.\n */\n public static METRICS_STRING = '|ÉqÅ';\n\n /** Baseline symbol for calculate font metrics. */\n public static BASELINE_SYMBOL = 'M';\n\n /** Baseline multiplier for calculate font metrics. */\n public static BASELINE_MULTIPLIER = 1.4;\n\n /** Height multiplier for setting height of canvas to calculate font metrics. */\n public static HEIGHT_MULTIPLIER = 2.0;\n\n /**\n * A Unicode \"character\", or \"grapheme cluster\", can be composed of multiple Unicode code points,\n * such as letters with diacritical marks (e.g. `'\\u0065\\u0301'`, letter e with acute)\n * or emojis with modifiers (e.g. `'\\uD83E\\uDDD1\\u200D\\uD83D\\uDCBB'`, technologist).\n * The new `Intl.Segmenter` API in ES2022 can split the string into grapheme clusters correctly. If it is not available,\n * PixiJS will fallback to use the iterator of String, which can only spilt the string into code points.\n * If you want to get full functionality in environments that don't support `Intl.Segmenter` (such as Firefox),\n * you can use other libraries such as [grapheme-splitter]{@link https://www.npmjs.com/package/grapheme-splitter}\n * or [graphemer]{@link https://www.npmjs.com/package/graphemer} to create a polyfill. Since these libraries can be\n * relatively large in size to handle various Unicode grapheme clusters properly, PixiJS won't use them directly.\n */\n public static graphemeSegmenter: (s: string) => string[] = (() =>\n {\n if (typeof (Intl as IIntl)?.Segmenter === 'function')\n {\n const segmenter = new (Intl as IIntl).Segmenter();\n\n return (s: string) => [...segmenter.segment(s)].map((x) => x.segment);\n }\n\n return (s: string) => [...s];\n })();\n\n public static _experimentalLetterSpacingSupported?: boolean;\n\n /**\n * Checking that we can use modern canvas 2D API.\n *\n * Note: This is an unstable API, Chrome < 94 use `textLetterSpacing`, later versions use `letterSpacing`.\n * @see TextMetrics.experimentalLetterSpacing\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ICanvasRenderingContext2D/letterSpacing\n * @see https://developer.chrome.com/origintrials/#/view_trial/3585991203293757441\n */\n public static get experimentalLetterSpacingSupported(): boolean\n {\n let result = CanvasTextMetrics._experimentalLetterSpacingSupported;\n\n if (result !== undefined)\n {\n const proto = DOMAdapter.get().getCanvasRenderingContext2D().prototype;\n\n result\n = CanvasTextMetrics._experimentalLetterSpacingSupported\n = 'letterSpacing' in proto || 'textLetterSpacing' in proto;\n }\n\n return result;\n }\n\n /**\n * New rendering behavior for letter-spacing which uses Chrome's new native API. This will\n * lead to more accurate letter-spacing results because it does not try to manually draw\n * each character. However, this Chrome API is experimental and may not serve all cases yet.\n * @see TextMetrics.experimentalLetterSpacingSupported\n */\n public static experimentalLetterSpacing = false;\n\n /** Cache of {@see TextMetrics.FontMetrics} objects. */\n private static _fonts: Record = {};\n\n /** Cache of new line chars. */\n private static readonly _newlines: number[] = [\n 0x000A, // line feed\n 0x000D, // carriage return\n ];\n\n /** Cache of breaking spaces. */\n private static readonly _breakingSpaces: number[] = [\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\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private static __canvas: ICanvas;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private static __context: ICanvasRenderingContext2D;\n\n private static readonly _measurementCache: Record = {};\n\n /**\n * @param text - the text that was measured\n * @param style - the style that was measured\n * @param width - the measured width of the text\n * @param height - the measured height of the text\n * @param lines - an array of the lines of text broken by new lines and wrapping if specified in style\n * @param lineWidths - an array of the line widths for each line matched to `lines`\n * @param lineHeight - the measured line height for this style\n * @param maxLineWidth - the maximum line width for all measured lines\n * @param {FontMetrics} fontProperties - the font properties object from TextMetrics.measureFont\n */\n constructor(text: string, style: TextStyle, width: number, height: number, lines: string[], lineWidths: number[],\n lineHeight: number, maxLineWidth: number, fontProperties: FontMetrics)\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 * @param text - The text to measure.\n * @param style - The text style to use for measuring\n * @param canvas - optional specification of the canvas to use for measuring.\n * @param wordWrap\n * @returns Measured width and height of the text.\n */\n public static measureText(\n text = ' ',\n style: TextStyle,\n canvas: ICanvas = CanvasTextMetrics._canvas,\n wordWrap: boolean = style.wordWrap,\n ): CanvasTextMetrics\n {\n const textKey = `${text}:${style.styleKey}`;\n\n // TODO - if we find this starts to go nuts with memory, we can remove the cache\n // or instead just stick a usage tick that we increment each time we return it.\n // if some are not used, we can just tidy them up!\n if (CanvasTextMetrics._measurementCache[textKey]) return CanvasTextMetrics._measurementCache[textKey];\n\n const font = fontStringFromTextStyle(style);\n const fontProperties = CanvasTextMetrics.measureFont(font);\n\n // fallback in case UA disallow canvas data extraction\n if (fontProperties.fontSize === 0)\n {\n fontProperties.fontSize = style.fontSize as number;\n fontProperties.ascent = style.fontSize as number;\n }\n\n const context = CanvasTextMetrics.__context; // canvas.getContext('2d', contextSettings);\n\n context.font = font;\n\n const outputText = wordWrap ? CanvasTextMetrics._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 = CanvasTextMetrics._measureText(lines[i], style.letterSpacing, context);\n\n lineWidths[i] = lineWidth;\n maxLineWidth = Math.max(maxLineWidth, lineWidth);\n }\n\n const strokeWidth = style._stroke?.width || 0;\n\n let width = maxLineWidth + strokeWidth;\n\n if (style.dropShadow)\n {\n width += style.dropShadow.distance;\n }\n\n const lineHeight = style.lineHeight || fontProperties.fontSize;\n\n let height = Math.max(lineHeight, fontProperties.fontSize + (strokeWidth))\n + ((lines.length - 1) * (lineHeight + style.leading));\n\n if (style.dropShadow)\n {\n height += style.dropShadow.distance;\n }\n\n const measurements = new CanvasTextMetrics(\n text,\n style,\n width,\n height,\n lines,\n lineWidths,\n lineHeight + style.leading,\n maxLineWidth,\n fontProperties\n );\n\n // CanvasTextMetrics._measurementCache[textKey] = measurements;\n\n return measurements;\n }\n\n private static _measureText(\n text: string,\n letterSpacing: number,\n context: ICanvasRenderingContext2D\n )\n {\n let useExperimentalLetterSpacing = false;\n\n if (CanvasTextMetrics.experimentalLetterSpacingSupported)\n {\n if (CanvasTextMetrics.experimentalLetterSpacing)\n {\n context.letterSpacing = `${letterSpacing}px`;\n context.textLetterSpacing = `${letterSpacing}px`;\n useExperimentalLetterSpacing = true;\n }\n else\n {\n context.letterSpacing = '0px';\n context.textLetterSpacing = '0px';\n }\n }\n\n let width = context.measureText(text).width;\n\n if (width > 0)\n {\n if (useExperimentalLetterSpacing)\n {\n width -= letterSpacing;\n }\n else\n {\n width += (CanvasTextMetrics.graphemeSegmenter(text).length - 1) * letterSpacing;\n }\n }\n\n return width;\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 * @param text - String to apply word wrapping to\n * @param style - the style to use when wrapping\n * @param canvas - optional specification of the canvas to use for measuring.\n * @returns New string with new lines applied where required\n */\n private static _wordWrap(\n text: string,\n style: TextStyle,\n canvas: ICanvas = CanvasTextMetrics._canvas\n ): string\n {\n const context = canvas.getContext('2d', contextSettings);\n\n let width = 0;\n let line = '';\n let lines = '';\n\n const cache: CharacterWidthCache = Object.create(null);\n const { letterSpacing, whiteSpace } = style;\n\n // How to handle whitespaces\n const collapseSpaces = CanvasTextMetrics._collapseSpaces(whiteSpace);\n const collapseNewlines = CanvasTextMetrics._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 = CanvasTextMetrics._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 (CanvasTextMetrics._isNewline(token))\n {\n // keep the new line\n if (!collapseNewlines)\n {\n lines += CanvasTextMetrics._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 = CanvasTextMetrics.isBreakingSpace(token);\n const lastIsBreakingSpace = CanvasTextMetrics.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 = CanvasTextMetrics._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 += CanvasTextMetrics._addLine(line);\n line = '';\n width = 0;\n }\n\n // break large word over multiple lines\n if (CanvasTextMetrics.canBreakWords(token, style.breakWords))\n {\n // break word into characters\n const characters = CanvasTextMetrics.wordWrapSplit(token);\n\n // loop the characters\n for (let j = 0; j < characters.length; j++)\n {\n let char = characters[j];\n let lastChar = char;\n\n let k = 1;\n\n // we are not at the end of the token\n while (characters[j + k])\n {\n const nextChar = characters[j + k];\n\n // should not split chars\n if (!CanvasTextMetrics.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 lastChar = nextChar;\n k++;\n }\n\n j += k - 1;\n\n const characterWidth = CanvasTextMetrics._getFromCache(char, letterSpacing, cache, context);\n\n if (characterWidth + width > wordWrapWidth)\n {\n lines += CanvasTextMetrics._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 += CanvasTextMetrics._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 += CanvasTextMetrics._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 += CanvasTextMetrics._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 || !CanvasTextMetrics.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 += CanvasTextMetrics._addLine(line, false);\n\n return lines;\n }\n\n /**\n * Convienience function for logging each line added during the wordWrap method.\n * @param line - The line of text to add\n * @param newLine - Add new line character to end\n * @returns A formatted line\n */\n private static _addLine(line: string, newLine = true): string\n {\n line = CanvasTextMetrics._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 * @param key - The key\n * @param letterSpacing - The letter spacing\n * @param cache - The cache\n * @param context - The canvas context\n * @returns The from cache.\n */\n private static _getFromCache(key: string, letterSpacing: number, cache: CharacterWidthCache,\n context: ICanvasRenderingContext2D): number\n {\n let width = cache[key];\n\n if (typeof width !== 'number')\n {\n width = CanvasTextMetrics._measureText(key, letterSpacing, context) + letterSpacing;\n cache[key] = width;\n }\n\n return width;\n }\n\n /**\n * Determines whether we should collapse breaking spaces.\n * @param whiteSpace - The TextStyle property whiteSpace\n * @returns Should collapse\n */\n private static _collapseSpaces(whiteSpace: TextStyleWhiteSpace): boolean\n {\n return (whiteSpace === 'normal' || whiteSpace === 'pre-line');\n }\n\n /**\n * Determines whether we should collapse newLine chars.\n * @param whiteSpace - The white space\n * @returns should collapse\n */\n private static _collapseNewlines(whiteSpace: TextStyleWhiteSpace): boolean\n {\n return (whiteSpace === 'normal');\n }\n\n /**\n * Trims breaking whitespaces from string.\n * @param text - The text\n * @returns Trimmed string\n */\n private static _trimRight(text: string): string\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 (!CanvasTextMetrics.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 * @param char - The character\n * @returns True if newline, False otherwise.\n */\n private static _isNewline(char: string): boolean\n {\n if (typeof char !== 'string')\n {\n return false;\n }\n\n return CanvasTextMetrics._newlines.includes(char.charCodeAt(0));\n }\n\n /**\n * Determines if char is a breaking whitespace.\n *\n * It allows one to determine whether char should be a breaking whitespace\n * For example certain characters in CJK langs or numbers.\n * It must return a boolean.\n * @param char - The character\n * @param [_nextChar] - The next character\n * @returns True if whitespace, False otherwise.\n */\n public static isBreakingSpace(char: string, _nextChar?: string): boolean\n {\n if (typeof char !== 'string')\n {\n return false;\n }\n\n return CanvasTextMetrics._breakingSpaces.includes(char.charCodeAt(0));\n }\n\n /**\n * Splits a string into words, breaking-spaces and newLine characters\n * @param text - The text\n * @returns A tokenized array\n */\n private static _tokenize(text: string): string[]\n {\n const tokens: string[] = [];\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 const nextChar = text[i + 1];\n\n if (CanvasTextMetrics.isBreakingSpace(char, nextChar) || CanvasTextMetrics._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 * Overridable helper method used internally by TextMetrics, exposed to allow customizing the class's behavior.\n *\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 * @param _token - The token\n * @param breakWords - The style attr break words\n * @returns Whether to break word or not\n */\n public static canBreakWords(_token: string, breakWords: boolean): boolean\n {\n return breakWords;\n }\n\n /**\n * Overridable helper method used internally by TextMetrics, exposed to allow customizing the class's behavior.\n *\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 * @param _char - The character\n * @param _nextChar - The next character\n * @param _token - The token/word the characters are from\n * @param _index - The index in the token of the char\n * @param _breakWords - The style attr break words\n * @returns whether to break word or not\n */\n public static canBreakChars(_char: string, _nextChar: string, _token: string, _index: number,\n _breakWords: boolean): boolean\n {\n return true;\n }\n\n /**\n * Overridable helper method used internally by TextMetrics, exposed to allow customizing the class's behavior.\n *\n * It is called when a token (usually a word) has to be split into separate pieces\n * in order to determine the point to break a word.\n * It must return an array of characters.\n * @param token - The token to split\n * @returns The characters of the token\n * @see CanvasTextMetrics.graphemeSegmenter\n */\n public static wordWrapSplit(token: string): string[]\n {\n return CanvasTextMetrics.graphemeSegmenter(token);\n }\n\n /**\n * Calculates the ascent, descent and fontSize of a given font-style\n * @param font - String representing the style of the font\n * @returns Font properties object\n */\n public static measureFont(font: string): FontMetrics\n {\n // as this method is used for preparing assets, don't recalculate things if we don't need to\n if (CanvasTextMetrics._fonts[font])\n {\n return CanvasTextMetrics._fonts[font];\n }\n\n const context = CanvasTextMetrics._context;\n\n context.font = font;\n const metrics = context.measureText(CanvasTextMetrics.METRICS_STRING + CanvasTextMetrics.BASELINE_SYMBOL);\n\n const properties = {\n ascent: metrics.actualBoundingBoxAscent,\n descent: metrics.actualBoundingBoxDescent,\n fontSize: metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent\n };\n\n CanvasTextMetrics._fonts[font] = properties;\n\n return properties;\n }\n\n /**\n * Clear font metrics in metrics cache.\n * @param {string} [font] - font name. If font name not set then clear cache for all fonts.\n */\n public static clearMetrics(font = ''): void\n {\n if (font)\n {\n delete CanvasTextMetrics._fonts[font];\n }\n else\n {\n CanvasTextMetrics._fonts = {};\n }\n }\n\n /**\n * Cached canvas element for measuring text\n * TODO: this should be private, but isn't because of backward compat, will fix later.\n * @ignore\n */\n public static get _canvas(): ICanvas\n {\n if (!CanvasTextMetrics.__canvas)\n {\n let canvas: ICanvas;\n\n try\n {\n // OffscreenCanvas2D measureText can be up to 40% faster.\n const c = new OffscreenCanvas(0, 0);\n const context = c.getContext('2d', contextSettings);\n\n if (context?.measureText)\n {\n CanvasTextMetrics.__canvas = c as ICanvas;\n\n return c as ICanvas;\n }\n\n canvas = DOMAdapter.get().createCanvas();\n }\n catch (ex)\n {\n canvas = DOMAdapter.get().createCanvas();\n }\n canvas.width = canvas.height = 10;\n CanvasTextMetrics.__canvas = canvas;\n }\n\n return CanvasTextMetrics.__canvas;\n }\n\n /**\n * TODO: this should be private, but isn't because of backward compat, will fix later.\n * @ignore\n */\n public static get _context(): ICanvasRenderingContext2D\n {\n if (!CanvasTextMetrics.__context)\n {\n CanvasTextMetrics.__context = CanvasTextMetrics._canvas.getContext('2d', contextSettings);\n }\n\n return CanvasTextMetrics.__context;\n }\n}\n","import { Color } from '../../../../color/Color';\nimport { Matrix } from '../../../../maths/matrix/Matrix';\nimport { Texture } from '../../../../rendering/renderers/shared/texture/Texture';\nimport { warn } from '../../../../utils/logging/warn';\nimport { FillGradient } from '../../../graphics/shared/fill/FillGradient';\nimport { FillPattern } from '../../../graphics/shared/fill/FillPattern';\n\nimport type { ICanvasRenderingContext2D } from '../../../../environment/canvas/ICanvasRenderingContext2D';\nimport type { ConvertedFillStyle } from '../../../graphics/shared/FillTypes';\n\nexport function getCanvasFillStyle(\n fillStyle: ConvertedFillStyle,\n context: ICanvasRenderingContext2D): string | CanvasGradient | CanvasPattern\n{\n if (fillStyle.texture === Texture.WHITE && !fillStyle.fill)\n {\n return Color.shared.setValue(fillStyle.color).toHex();\n }\n else if (!fillStyle.fill)\n {\n // fancy set up...\n const pattern = context.createPattern(fillStyle.texture.source.resource, 'repeat');\n\n // create an inverted scale matrix..\n const tempMatrix = fillStyle.matrix.copyTo(Matrix.shared);\n\n tempMatrix.scale(fillStyle.texture.frame.width, fillStyle.texture.frame.height);\n\n pattern.setTransform(tempMatrix);\n\n return pattern;\n }\n else if (fillStyle.fill instanceof FillPattern)\n {\n const fillPattern = fillStyle.fill;\n\n const pattern = context.createPattern(fillPattern.texture.source.resource, 'repeat');\n\n const tempMatrix = fillPattern.transform.copyTo(Matrix.shared);\n\n tempMatrix.scale(\n fillPattern.texture.frame.width,\n fillPattern.texture.frame.height\n );\n\n pattern.setTransform(tempMatrix);\n\n return pattern;\n }\n else if (fillStyle.fill instanceof FillGradient)\n {\n const fillGradient = fillStyle.fill;\n\n if (fillGradient.type === 'linear')\n {\n const gradient = context.createLinearGradient(\n fillGradient.x0,\n fillGradient.y0,\n fillGradient.x1,\n fillGradient.y1\n );\n\n fillGradient.gradientStops.forEach((stop) =>\n {\n gradient.addColorStop(stop.offset, Color.shared.setValue(stop.color).toHex());\n });\n\n return gradient;\n }\n }\n\n // #if _DEBUG\n warn('FillStyle not recognised', fillStyle);\n // #endif\n\n return 'red';\n}\n","import { Color } from '../../../color/Color';\nimport { ExtensionType } from '../../../extensions/Extensions';\nimport { nextPow2 } from '../../../maths/misc/pow2';\nimport { CanvasPool } from '../../../rendering/renderers/shared/texture/CanvasPool';\nimport { TexturePool } from '../../../rendering/renderers/shared/texture/TexturePool';\nimport { getCanvasBoundingBox } from '../../../utils/canvas/getCanvasBoundingBox';\nimport { deprecation } from '../../../utils/logging/deprecation';\nimport { TextStyle } from '../TextStyle';\nimport { getPo2TextureFromSource } from '../utils/getPo2TextureFromSource';\nimport { CanvasTextMetrics } from './CanvasTextMetrics';\nimport { fontStringFromTextStyle } from './utils/fontStringFromTextStyle';\nimport { getCanvasFillStyle } from './utils/getCanvasFillStyle';\n\nimport type { ICanvas } from '../../../environment/canvas/ICanvas';\nimport type { ICanvasRenderingContext2D } from '../../../environment/canvas/ICanvasRenderingContext2D';\nimport type { System } from '../../../rendering/renderers/shared/system/System';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport type { Renderer } from '../../../rendering/renderers/types';\nimport type { TextOptions } from '../AbstractText';\nimport type { Text } from '../Text';\n\ninterface CanvasAndContext\n{\n canvas: ICanvas;\n context: ICanvasRenderingContext2D;\n}\n\n/**\n * System plugin to the renderer to manage canvas text.\n * @memberof rendering\n */\nexport class CanvasTextSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'canvasText',\n } as const;\n\n private _activeTextures: Record = {};\n\n private readonly _renderer: Renderer;\n\n constructor(_renderer: Renderer)\n {\n this._renderer = _renderer;\n }\n\n public getTextureSize(text: string, resolution: number, style: TextStyle): { width: number, height: number }\n {\n const measured = CanvasTextMetrics.measureText(text || ' ', style);\n\n let width = Math.ceil(Math.ceil((Math.max(1, measured.width) + (style.padding * 2))) * resolution);\n let height = Math.ceil(Math.ceil((Math.max(1, measured.height) + (style.padding * 2))) * resolution);\n\n width = Math.ceil((width) - 1e-6);\n height = Math.ceil((height) - 1e-6);\n width = nextPow2(width);\n height = nextPow2(height);\n\n return { width, height };\n }\n\n /**\n * This is a function that will create a texture from a text string, style and resolution.\n * Useful if you want to make a texture of your text and use if for various other pixi things!\n * @param options - The options of the text that will be used to generate the texture.\n * @param options.text - the text to render\n * @param options.style - the style of the text\n * @param options.resolution - the resolution of the texture\n * @returns the newly created texture\n */\n /** @deprecated since 8.0.0 */\n public getTexture(text: string, resolution: number, style: TextStyle, textKey: string): Texture;\n public getTexture(options: TextOptions): Texture;\n public getTexture(options: TextOptions | string, resolution?: number, style?: TextStyle, _textKey?: string): Texture\n {\n if (typeof options === 'string')\n {\n deprecation('8.0.0', 'CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments');\n\n options = {\n text: options,\n style,\n resolution,\n };\n }\n\n if (!(options.style instanceof TextStyle))\n {\n options.style = new TextStyle(options.style);\n }\n\n const { texture, canvasAndContext } = this.createTextureAndCanvas(\n options as {text: string, style: TextStyle, resolution?: number}\n );\n\n this._renderer.texture.initSource(texture._source);\n\n CanvasPool.returnCanvasAndContext(canvasAndContext);\n\n return texture;\n }\n\n public createTextureAndCanvas(options: {text: string, style: TextStyle, resolution?: number})\n {\n const { text, style } = options;\n\n const resolution = options.resolution ?? this._renderer.resolution;\n\n // create a canvas with the word hello on it\n const measured = CanvasTextMetrics.measureText(text || ' ', style);\n\n const width = Math.ceil(Math.ceil((Math.max(1, measured.width) + (style.padding * 2))) * resolution);\n const height = Math.ceil(Math.ceil((Math.max(1, measured.height) + (style.padding * 2))) * resolution);\n\n const canvasAndContext = CanvasPool.getOptimalCanvasAndContext(width, height);\n\n // create a texture from the canvas\n const { canvas } = canvasAndContext;\n\n this.renderTextToCanvas(text, style, resolution, canvasAndContext);\n\n const texture = getPo2TextureFromSource(canvas, width, height, resolution);\n\n if (style.trim)\n {\n const trimmed = getCanvasBoundingBox(canvas, resolution);\n\n texture.frame.copyFrom(trimmed);\n\n texture.updateUvs();\n }\n\n return { texture, canvasAndContext };\n }\n\n public getManagedTexture(text: Text)\n {\n text._resolution = text._autoResolution ? this._renderer.resolution : text.resolution;\n const textKey = text._getKey();\n\n if (this._activeTextures[textKey])\n {\n this._increaseReferenceCount(textKey);\n\n return this._activeTextures[textKey].texture;\n }\n\n const { texture, canvasAndContext } = this.createTextureAndCanvas(text);\n\n this._activeTextures[textKey] = {\n canvasAndContext,\n texture,\n usageCount: 1,\n };\n\n return texture;\n }\n\n private _increaseReferenceCount(textKey: string)\n {\n this._activeTextures[textKey].usageCount++;\n }\n\n public decreaseReferenceCount(textKey: string)\n {\n const activeTexture = this._activeTextures[textKey];\n\n activeTexture.usageCount--;\n\n if (activeTexture.usageCount === 0)\n {\n CanvasPool.returnCanvasAndContext(activeTexture.canvasAndContext);\n TexturePool.returnTexture(activeTexture.texture);\n\n const source = activeTexture.texture.source;\n\n source.resource = null;\n source.uploadMethodId = 'unknown';\n source.alphaMode = 'no-premultiply-alpha';\n\n this._activeTextures[textKey] = null;\n }\n }\n\n public getReferenceCount(textKey: string)\n {\n return this._activeTextures[textKey].usageCount;\n }\n\n /**\n * Renders text to its canvas, and updates its texture.\n *\n * By default this is used internally to ensure the texture is correct before rendering,\n * but it can be used called externally, for example from this class to 'pre-generate' the texture from a piece of text,\n * and then shared across multiple Sprites.\n * @param text\n * @param style\n * @param resolution\n * @param canvasAndContext\n */\n public renderTextToCanvas(text: string, style: TextStyle, resolution: number, canvasAndContext: CanvasAndContext): void\n {\n const { canvas, context } = canvasAndContext;\n\n const font = fontStringFromTextStyle(style);\n\n const measured = CanvasTextMetrics.measureText(text || ' ', style);// , canvas);\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 const height = canvas.height;\n\n context.resetTransform();\n\n context.scale(resolution, resolution);\n\n const padding = style.padding * 2;\n\n context.clearRect(0, 0, measured.width + 4 + padding, measured.height + 4 + padding);\n\n // set stroke styles..\n\n if (style._stroke?.width)\n {\n const strokeStyle = style._stroke;\n\n context.lineWidth = strokeStyle.width;\n\n context.miterLimit = strokeStyle.miterLimit;\n context.lineJoin = strokeStyle.join;\n context.lineCap = strokeStyle.cap;\n }\n\n // return;\n context.font = font;\n\n let linePositionX: number;\n let linePositionY: number;\n\n // require 2 passes if a shadow; the first to draw the drop shadow, the second to draw the text\n const passesCount = style.dropShadow ? 2 : 1;\n\n // For v4, we drew text at the colours of the drop shadow underneath the normal text. This gave the correct zIndex,\n // but features such as alpha and shadowblur did not look right at all, since we were using actual text as a shadow.\n //\n // For v5.0.0, we moved over to just use the canvas API for drop shadows, which made them look much nicer and more\n // visually please, but now because the stroke is drawn and then the fill, drop shadows would appear on both the fill\n // and the stroke; and fill drop shadows would appear over the top of the stroke.\n //\n // For v5.1.1, the new route is to revert to v4 style of drawing text first to get the drop shadows underneath normal\n // text, but instead drawing text in the correct location, we'll draw it off screen (-paddingY), and then adjust the\n // drop shadow so only that appears on screen (+paddingY). Now we'll have the correct draw order of the shadow\n // beneath the text, whilst also having the proper text shadow styling.\n for (let i = 0; i < passesCount; ++i)\n {\n const isShadowPass = style.dropShadow && i === 0;\n // we only want the drop shadow, so put text way off-screen\n const dsOffsetText = isShadowPass ? Math.ceil(Math.max(1, height) + (style.padding * 2)) : 0;\n const dsOffsetShadow = dsOffsetText * resolution;\n\n if (isShadowPass)\n {\n // On Safari, text with gradient and drop shadows together do not position correctly\n // if the scale of the canvas is not 1: https://bugs.webkit.org/show_bug.cgi?id=197689\n // Therefore we'll set the styles to be a plain black whilst generating this drop shadow\n context.fillStyle = 'black';\n context.strokeStyle = 'black';\n\n const shadowOptions = style.dropShadow;\n\n const dropShadowColor = shadowOptions.color;\n const dropShadowAlpha = shadowOptions.alpha;\n\n context.shadowColor = Color.shared\n .setValue(dropShadowColor)\n .setAlpha(dropShadowAlpha)\n .toRgbaString();\n\n const dropShadowBlur = shadowOptions.blur * resolution;\n const dropShadowDistance = shadowOptions.distance * resolution;\n\n context.shadowBlur = dropShadowBlur;\n context.shadowOffsetX = Math.cos(shadowOptions.angle) * dropShadowDistance;\n context.shadowOffsetY = (Math.sin(shadowOptions.angle) * dropShadowDistance) + dsOffsetShadow;\n }\n else\n {\n context.globalAlpha = style._fill?.alpha ?? 1;\n context.fillStyle = style._fill ? getCanvasFillStyle(style._fill, context) : null;\n\n if (style._stroke?.width)\n {\n context.strokeStyle = getCanvasFillStyle(style._stroke, context);\n }\n\n context.shadowColor = 'black';\n }\n\n let linePositionYShift = (lineHeight - fontProperties.fontSize) / 2;\n\n if (lineHeight - fontProperties.fontSize < 0)\n {\n linePositionYShift = 0;\n }\n\n const strokeWidth = style._stroke?.width ?? 0;\n\n // draw lines line by line\n for (let i = 0; i < lines.length; i++)\n {\n linePositionX = strokeWidth / 2;\n linePositionY = ((strokeWidth / 2) + (i * lineHeight)) + fontProperties.ascent + linePositionYShift;\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?.width)\n {\n this._drawLetterSpacing(\n lines[i],\n style,\n canvasAndContext,\n linePositionX + style.padding,\n linePositionY + style.padding - dsOffsetText,\n true\n );\n }\n\n if (style._fill !== undefined)\n {\n this._drawLetterSpacing(\n lines[i],\n style,\n canvasAndContext,\n linePositionX + style.padding,\n linePositionY + style.padding - dsOffsetText\n );\n }\n }\n }\n }\n\n /**\n * Render the text with letter-spacing.\n * @param text - The text to draw\n * @param style\n * @param canvasAndContext\n * @param x - Horizontal position to draw the text\n * @param y - Vertical position to draw the text\n * @param isStroke - Is this drawing for the outside stroke of the\n * text? If not, it's for the inside fill\n */\n private _drawLetterSpacing(\n text: string,\n style: TextStyle,\n canvasAndContext: CanvasAndContext,\n x: number, y: number,\n isStroke = false\n ): void\n {\n const { context } = canvasAndContext;\n\n // letterSpacing of 0 means normal\n const letterSpacing = style.letterSpacing;\n\n let useExperimentalLetterSpacing = false;\n\n if (CanvasTextMetrics.experimentalLetterSpacingSupported)\n {\n if (CanvasTextMetrics.experimentalLetterSpacing)\n {\n context.letterSpacing = `${letterSpacing}px`;\n context.textLetterSpacing = `${letterSpacing}px`;\n useExperimentalLetterSpacing = true;\n }\n else\n {\n context.letterSpacing = '0px';\n context.textLetterSpacing = '0px';\n }\n }\n\n if (letterSpacing === 0 || useExperimentalLetterSpacing)\n {\n if (isStroke)\n {\n context.strokeText(text, x, y);\n }\n else\n {\n context.fillText(text, x, y);\n }\n\n return;\n }\n\n let currentPosition = x;\n\n const stringArray = CanvasTextMetrics.graphemeSegmenter(text);\n let previousWidth = context.measureText(text).width;\n let currentWidth = 0;\n\n for (let i = 0; i < stringArray.length; ++i)\n {\n const currentChar = stringArray[i];\n\n if (isStroke)\n {\n context.strokeText(currentChar, currentPosition, y);\n }\n else\n {\n context.fillText(currentChar, currentPosition, y);\n }\n let textStr = '';\n\n for (let j = i + 1; j < stringArray.length; ++j)\n {\n textStr += stringArray[j];\n }\n currentWidth = context.measureText(textStr).width;\n currentPosition += previousWidth - currentWidth + letterSpacing;\n previousWidth = currentWidth;\n }\n }\n\n public destroy(): void\n {\n this._activeTextures = null;\n }\n}\n","import { extensions } from '../../extensions/Extensions';\nimport { CanvasTextPipe } from './canvas/CanvasTextPipe';\nimport { CanvasTextSystem } from './canvas/CanvasTextSystem';\n\nextensions.add(CanvasTextSystem);\nextensions.add(CanvasTextPipe);\n","import { deprecation, v8_0_0 } from '../../../utils/logging/deprecation';\nimport { Container } from '../../container/Container';\nimport { GraphicsContext } from './GraphicsContext';\n\nimport type { ColorSource } from '../../../color/Color';\nimport type { Matrix } from '../../../maths/matrix/Matrix';\nimport type { PointData } from '../../../maths/point/PointData';\nimport type { Instruction } from '../../../rendering/renderers/shared/instructions/Instruction';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport type { View } from '../../../rendering/renderers/shared/view/View';\nimport type { Bounds } from '../../container/bounds/Bounds';\nimport type { ContainerOptions } from '../../container/Container';\nimport type { ContextDestroyOptions, DestroyOptions } from '../../container/destroyTypes';\nimport type { FillInput, FillStyle, StrokeStyle } from './FillTypes';\nimport type { GraphicsPath } from './path/GraphicsPath';\nimport type { RoundedPoint } from './path/roundShape';\n\n/**\n * Constructor options used for `Graphics` instances.\n * ```js\n * const graphics = new Graphics({\n * fillStyle: { color: 0xff0000, alpha: 0.5 },\n * strokeStyle: { color: 0x00ff00, width: 2 },\n * });\n * ```\n * @see {@link scene.Graphics}\n * @memberof scene\n */\nexport interface GraphicsOptions extends ContainerOptions\n{\n /** The GraphicsContext to use, useful for reuse and optimisation */\n context?: GraphicsContext;\n /** Whether or not to round the x/y position. */\n roundPixels?: boolean;\n}\n\n/**\n * The Graphics class is primarily used to render primitive shapes such as lines, circles and\n * rectangles to the display, and to color and fill them. However, you can also use a Graphics\n * object to build a list of primitives to use as a mask, or as a complex hitArea.\n * @memberof scene\n * @extends scene.Container\n */\nexport class Graphics extends Container implements View, Instruction\n{\n public readonly canBundle = true;\n public readonly renderPipeId = 'graphics';\n public batched: boolean;\n\n public _roundPixels: 0 | 1 = 0;\n\n public _didGraphicsUpdate: boolean;\n\n private _context: GraphicsContext;\n private readonly _ownedContext: GraphicsContext;\n\n /**\n * @param options - Options for the Graphics.\n */\n constructor(options?: GraphicsOptions | GraphicsContext)\n {\n if (options instanceof GraphicsContext)\n {\n options = { context: options };\n }\n\n const { context, roundPixels, ...rest } = options || {};\n\n super({\n label: 'Graphics',\n ...rest\n });\n\n if (!context)\n {\n this._context = this._ownedContext = new GraphicsContext();\n }\n else\n {\n this._context = context;\n }\n\n this._context.on('update', this.onViewUpdate, this);\n\n this.allowChildren = false;\n this.roundPixels = roundPixels ?? false;\n }\n\n set context(context: GraphicsContext)\n {\n if (context === this._context) return;\n\n this._context.off('update', this.onViewUpdate, this);\n\n this._context = context;\n\n // TODO store this bound function somewhere else..\n this._context.on('update', this.onViewUpdate, this);\n\n this.onViewUpdate();\n }\n\n get context(): GraphicsContext\n {\n return this._context;\n }\n\n /**\n * The local bounds of the graphic.\n * @type {rendering.Bounds}\n */\n get bounds(): Bounds\n {\n return this._context.bounds;\n }\n\n /**\n * Adds the bounds of this object to the bounds object.\n * @param bounds - The output bounds object.\n */\n public addBounds(bounds: Bounds)\n {\n bounds.addBounds(this._context.bounds);\n }\n\n /**\n * Checks if the object contains the given point.\n * @param point - The point to check\n */\n public containsPoint(point: PointData)\n {\n return this._context.containsPoint(point);\n }\n\n /**\n * Whether or not to round the x/y position of the graphic.\n * @type {boolean}\n */\n get roundPixels()\n {\n return !!this._roundPixels;\n }\n\n set roundPixels(value: boolean)\n {\n this._roundPixels = value ? 1 : 0;\n }\n\n protected onViewUpdate()\n {\n // increment from the 12th bit!\n this._didChangeId += 1 << 12;\n this._didGraphicsUpdate = true;\n\n if (this.didViewUpdate) return;\n this.didViewUpdate = true;\n\n const renderGroup = this.renderGroup || this.parentRenderGroup;\n\n if (renderGroup)\n {\n renderGroup.onChildViewUpdate(this);\n }\n }\n\n /**\n * Destroys this graphics renderable and optionally its context.\n * @param options - Options parameter. A boolean will act as if all options\n *\n * If the context was created by this graphics and `destroy(false)` or `destroy()` is called\n * then the context will still be destroyed.\n *\n * If you want to explicitly not destroy this context that this graphics created,\n * then you should pass destroy({ context: false })\n *\n * If the context was passed in as an argument to the constructor then it will not be destroyed\n * @param {boolean} [options.texture=false] - Should destroy the texture of the graphics context\n * @param {boolean} [options.textureSource=false] - Should destroy the texture source of the graphics context\n * @param {boolean} [options.context=false] - Should destroy the context\n */\n public destroy(options?: DestroyOptions): void\n {\n if (this._ownedContext && !options)\n {\n this._ownedContext.destroy(options);\n }\n else if (options === true || (options as ContextDestroyOptions)?.context === true)\n {\n this._context.destroy(options);\n }\n\n (this._ownedContext as null) = null;\n this._context = null;\n\n super.destroy(options);\n }\n\n private _callContextMethod(method: keyof GraphicsContext, args: any[]): this\n {\n (this.context as any)[method](...args);\n\n return this;\n }\n\n // --------------------------------------- GraphicsContext methods ---------------------------------------\n /**\n * Sets the current fill style of the graphics context. The fill style can be a color, gradient,\n * pattern, or a more complex style defined by a FillStyle object.\n * @param {FillInput} args - The fill style to apply. This can be a simple color, a gradient or\n * pattern object, or a FillStyle or ConvertedFillStyle object.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public setFillStyle(...args: Parameters): this\n {\n return this._callContextMethod('setFillStyle', args);\n }\n\n /**\n * Sets the current stroke style of the graphics context. Similar to fill styles, stroke styles can\n * encompass colors, gradients, patterns, or more detailed configurations via a StrokeStyle object.\n * @param {StrokeInput} args - The stroke style to apply. Can be defined as a color, a gradient or pattern,\n * or a StrokeStyle or ConvertedStrokeStyle object.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public setStrokeStyle(...args: Parameters): this\n {\n return this._callContextMethod('setStrokeStyle', args);\n }\n\n /**\n * Fills the current or given path with the current fill style. This method can optionally take\n * a color and alpha for a simple fill, or a more complex FillStyle object for advanced fills.\n * @param {FillInput} style - (Optional) The style to fill the path with. Can be a color, gradient, pattern, or a\n * complex style object. If omitted, uses the current fill style.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public fill(style?: FillInput): this;\n /** @deprecated 8.0.0 */\n public fill(color: ColorSource, alpha?: number): this;\n public fill(...args: [FillStyle | ColorSource, number?]): this\n {\n return this._callContextMethod('fill', args);\n }\n /**\n * Strokes the current path with the current stroke style. This method can take an optional\n * FillStyle parameter to define the stroke's appearance, including its color, width, and other properties.\n * @param {FillStyle} args - (Optional) The stroke style to apply. Can be defined as a simple color or a more\n * complex style object. If omitted, uses the current stroke style.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public stroke(...args: Parameters): this\n {\n return this._callContextMethod('stroke', args);\n }\n /**\n * Adds a texture to the graphics context. This method supports multiple overloads for specifying the texture,\n * tint, and dimensions. If only a texture is provided, it uses the texture's width and height for drawing.\n * Additional parameters allow for specifying a tint color, and custom dimensions for the texture drawing area.\n * @param texture - The Texture object to use.\n * @param tint - (Optional) A ColorSource to tint the texture. If not provided, defaults to white (0xFFFFFF).\n * @param dx - (Optional) The x-coordinate in the destination canvas at which to place the top-left corner of\n * the source image.\n * @param dy - (Optional) The y-coordinate in the destination canvas at which to place the top-left corner of\n * the source image.\n * @param dw - (Optional) The width of the rectangle within the source image to draw onto the destination canvas.\n * If not provided, uses the texture's frame width.\n * @param dh - (Optional) The height of the rectangle within the source image to draw onto the destination canvas.\n * If not provided, uses the texture's frame height.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public texture(texture: Texture, tint?: ColorSource, dx?: number, dy?: number, dw?: number, dh?: number): this;\n public texture(texture: Texture): this;\n public texture(...args: [Texture, number?, number?, number?, number?, number?]): this\n {\n return this._callContextMethod('texture', args);\n }\n /**\n * Resets the current path. Any previous path and its commands are discarded and a new path is\n * started. This is typically called before beginning a new shape or series of drawing commands.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public beginPath(): this\n {\n return this._callContextMethod('beginPath', []);\n }\n /**\n * Applies a cutout to the last drawn shape. This is used to create holes or complex shapes by\n * subtracting a path from the previously drawn path. If a hole is not completely in a shape, it will\n * fail to cut correctly!\n */\n public cut(): this\n {\n return this._callContextMethod('cut', []);\n }\n /**\n * Adds an arc to the current path, which is centered at (x, y) with the specified radius,\n * starting and ending angles, and direction.\n * @param x - The x-coordinate of the arc's center.\n * @param y - The y-coordinate of the arc's center.\n * @param radius - The arc's radius.\n * @param startAngle - The starting angle, in radians.\n * @param endAngle - The ending angle, in radians.\n * @param counterclockwise - (Optional) Specifies whether the arc is drawn counterclockwise (true) or clockwise\n * (false). Defaults to false.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): this;\n public arc(...args: Parameters): this\n {\n return this._callContextMethod('arc', args);\n }\n /**\n * Adds an arc to the current path with the given control points and radius, connected to the previous point\n * by a straight line if necessary.\n * @param x1 - The x-coordinate of the first control point.\n * @param y1 - The y-coordinate of the first control point.\n * @param x2 - The x-coordinate of the second control point.\n * @param y2 - The y-coordinate of the second control point.\n * @param radius - The arc's radius.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this;\n public arcTo(...args: Parameters): this\n {\n return this._callContextMethod('arcTo', args);\n }\n /**\n * Adds an SVG-style arc to the path, allowing for elliptical arcs based on the SVG spec.\n * @param rx - The x-radius of the ellipse.\n * @param ry - The y-radius of the ellipse.\n * @param xAxisRotation - The rotation of the ellipse's x-axis relative\n * to the x-axis of the coordinate system, in degrees.\n * @param largeArcFlag - Determines if the arc should be greater than or less than 180 degrees.\n * @param sweepFlag - Determines if the arc should be swept in a positive angle direction.\n * @param x - The x-coordinate of the arc's end point.\n * @param y - The y-coordinate of the arc's end point.\n * @returns The instance of the current object for chaining.\n */\n public arcToSvg(\n rx: number, ry: number, xAxisRotation: number, largeArcFlag: number, sweepFlag: number, x: number, y: number\n ): this;\n public arcToSvg(...args: Parameters): this\n {\n return this._callContextMethod('arcToSvg', args);\n }\n /**\n * Adds a cubic Bezier curve to the path.\n * It requires three points: the first two are control points and the third one is the end point.\n * The starting point is the last point in the current path.\n * @param cp1x - The x-coordinate of the first control point.\n * @param cp1y - The y-coordinate of the first control point.\n * @param cp2x - The x-coordinate of the second control point.\n * @param cp2y - The y-coordinate of the second control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public bezierCurveTo(\n cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number, smoothness?: number\n ): this;\n public bezierCurveTo(...args: Parameters): this\n {\n return this._callContextMethod('bezierCurveTo', args);\n }\n /**\n * Closes the current path by drawing a straight line back to the start.\n * If the shape is already closed or there are no points in the path, this method does nothing.\n * @returns The instance of the current object for chaining.\n */\n public closePath(): this\n {\n return this._callContextMethod('closePath', []);\n }\n /**\n * Draws an ellipse at the specified location and with the given x and y radii.\n * An optional transformation can be applied, allowing for rotation, scaling, and translation.\n * @param x - The x-coordinate of the center of the ellipse.\n * @param y - The y-coordinate of the center of the ellipse.\n * @param radiusX - The horizontal radius of the ellipse.\n * @param radiusY - The vertical radius of the ellipse.\n * @returns The instance of the current object for chaining.\n */\n public ellipse(x: number, y: number, radiusX: number, radiusY: number): this;\n public ellipse(...args: Parameters): this\n {\n return this._callContextMethod('ellipse', args);\n }\n /**\n * Draws a circle shape. This method adds a new circle path to the current drawing.\n * @param x - The x-coordinate of the center of the circle.\n * @param y - The y-coordinate of the center of the circle.\n * @param radius - The radius of the circle.\n * @returns The instance of the current object for chaining.\n */\n public circle(x: number, y: number, radius: number): this;\n public circle(...args: Parameters): this\n {\n return this._callContextMethod('circle', args);\n }\n /**\n * Adds another `GraphicsPath` to this path, optionally applying a transformation.\n * @param path - The `GraphicsPath` to add.\n * @returns The instance of the current object for chaining.\n */\n public path(path: GraphicsPath): this;\n public path(...args: Parameters): this\n {\n return this._callContextMethod('path', args);\n }\n /**\n * Connects the current point to a new point with a straight line. This method updates the current path.\n * @param x - The x-coordinate of the new point to connect to.\n * @param y - The y-coordinate of the new point to connect to.\n * @returns The instance of the current object for chaining.\n */\n public lineTo(x: number, y: number): this;\n public lineTo(...args: Parameters): this\n {\n return this._callContextMethod('lineTo', args);\n }\n /**\n * Sets the starting point for a new sub-path. Any subsequent drawing commands are considered part of this path.\n * @param x - The x-coordinate for the starting point.\n * @param y - The y-coordinate for the starting point.\n * @returns The instance of the current object for chaining.\n */\n public moveTo(x: number, y: number): this;\n public moveTo(...args: Parameters): this\n {\n return this._callContextMethod('moveTo', args);\n }\n /**\n * Adds a quadratic curve to the path. It requires two points: the control point and the end point.\n * The starting point is the last point in the current path.\n * @param cpx - The x-coordinate of the control point.\n * @param cpy - The y-coordinate of the control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public quadraticCurveTo(cpx: number, cpy: number, x: number, y: number, smoothness?: number): this;\n public quadraticCurveTo(...args: Parameters): this\n {\n return this._callContextMethod('quadraticCurveTo', args);\n }\n /**\n * Draws a rectangle shape. This method adds a new rectangle path to the current drawing.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @returns The instance of the current object for chaining.\n */\n public rect(x: number, y: number, w: number, h: number): this;\n public rect(...args: Parameters): this\n {\n return this._callContextMethod('rect', args);\n }\n /**\n * Draws a rectangle with rounded corners.\n * The corner radius can be specified to determine how rounded the corners should be.\n * An optional transformation can be applied, which allows for rotation, scaling, and translation of the rectangle.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @param radius - The radius of the rectangle's corners. If not specified, corners will be sharp.\n * @returns The instance of the current object for chaining.\n */\n public roundRect(x: number, y: number, w: number, h: number, radius?: number): this;\n public roundRect(...args: Parameters): this\n {\n return this._callContextMethod('roundRect', args);\n }\n /**\n * Draws a polygon shape by specifying a sequence of points. This method allows for the creation of complex polygons,\n * which can be both open and closed. An optional transformation can be applied, enabling the polygon to be scaled,\n * rotated, or translated as needed.\n * @param points - An array of numbers, or an array of PointData objects eg [{x,y}, {x,y}, {x,y}]\n * representing the x and y coordinates, of the polygon's vertices, in sequence.\n * @param close - A boolean indicating whether to close the polygon path. True by default.\n * @returns The instance of the current object for chaining further drawing commands.\n */\n public poly(points: number[] | PointData[], close?: boolean): this;\n public poly(...args: Parameters): this\n {\n return this._callContextMethod('poly', args);\n }\n /**\n * Draws a regular polygon with a specified number of sides. All sides and angles are equal.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @param transform - An optional `Matrix` object to apply a transformation to the polygon.\n * @returns The instance of the current object for chaining.\n */\n public regularPoly(x: number, y: number, radius: number, sides: number, rotation?: number, transform?: Matrix): this;\n public regularPoly(...args: Parameters): this\n {\n return this._callContextMethod('regularPoly', args);\n }\n /**\n * Draws a polygon with rounded corners.\n * Similar to `regularPoly` but with the ability to round the corners of the polygon.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param corner - The radius of the rounding of the corners.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @returns The instance of the current object for chaining.\n */\n public roundPoly(x: number, y: number, radius: number, sides: number, corner: number, rotation?: number): this;\n public roundPoly(...args: Parameters): this\n {\n return this._callContextMethod('roundPoly', args);\n }\n /**\n * Draws a shape with rounded corners. This function supports custom radius for each corner of the shape.\n * Optionally, corners can be rounded using a quadratic curve instead of an arc, providing a different aesthetic.\n * @param points - An array of `RoundedPoint` representing the corners of the shape to draw.\n * A minimum of 3 points is required.\n * @param radius - The default radius for the corners.\n * This radius is applied to all corners unless overridden in `points`.\n * @param useQuadratic - If set to true, rounded corners are drawn using a quadraticCurve\n * method instead of an arc method. Defaults to false.\n * @param smoothness - Specifies the smoothness of the curve when `useQuadratic` is true.\n * Higher values make the curve smoother.\n * @returns The instance of the current object for chaining.\n */\n public roundShape(points: RoundedPoint[], radius: number, useQuadratic?: boolean, smoothness?: number): this;\n public roundShape(...args: Parameters): this\n {\n return this._callContextMethod('roundShape', args);\n }\n /**\n * Draw Rectangle with fillet corners. This is much like rounded rectangle\n * however it support negative numbers as well for the corner radius.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param fillet - accept negative or positive values\n */\n public filletRect(x: number, y: number, width: number, height: number, fillet: number): this;\n public filletRect(...args: Parameters): this\n {\n return this._callContextMethod('filletRect', args);\n }\n /**\n * Draw Rectangle with chamfer corners. These are angled corners.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param chamfer - non-zero real number, size of corner cutout\n * @param transform\n */\n public chamferRect(x: number, y: number, width: number, height: number, chamfer: number, transform?: Matrix): this;\n public chamferRect(...args: Parameters): this\n {\n return this._callContextMethod('chamferRect', args);\n }\n /**\n * Draws a star shape centered at a specified location. This method allows for the creation\n * of stars with a variable number of points, outer radius, optional inner radius, and rotation.\n * The star is drawn as a closed polygon with alternating outer and inner vertices to create the star's points.\n * An optional transformation can be applied to scale, rotate, or translate the star as needed.\n * @param x - The x-coordinate of the center of the star.\n * @param y - The y-coordinate of the center of the star.\n * @param points - The number of points of the star.\n * @param radius - The outer radius of the star (distance from the center to the outer points).\n * @param innerRadius - Optional. The inner radius of the star\n * (distance from the center to the inner points between the outer points).\n * If not provided, defaults to half of the `radius`.\n * @param rotation - Optional. The rotation of the star in radians, where 0 is aligned with the y-axis.\n * Defaults to 0, meaning one point is directly upward.\n * @returns The instance of the current object for chaining further drawing commands.\n */\n public star(x: number, y: number, points: number, radius: number, innerRadius?: number, rotation?: number): this;\n public star(...args: Parameters): this\n {\n return this._callContextMethod('star', args);\n }\n /**\n * Parses and renders an SVG string into the graphics context. This allows for complex shapes and paths\n * defined in SVG format to be drawn within the graphics context.\n * @param svg - The SVG string to be parsed and rendered.\n */\n public svg(svg: string): this;\n public svg(...args: Parameters): this\n {\n return this._callContextMethod('svg', args);\n }\n /**\n * Restores the most recently saved graphics state by popping the top of the graphics state stack.\n * This includes transformations, fill styles, and stroke styles.\n */\n public restore(): this;\n public restore(...args: Parameters): this\n {\n return this._callContextMethod('restore', args);\n }\n /** Saves the current graphics state, including transformations, fill styles, and stroke styles, onto a stack. */\n public save(): this\n {\n return this._callContextMethod('save', []);\n }\n /**\n * Returns the current transformation matrix of the graphics context.\n * @returns The current transformation matrix.\n */\n public getTransform(): Matrix\n {\n return this.context.getTransform();\n }\n /**\n * Resets the current transformation matrix to the identity matrix, effectively removing\n * any transformations (rotation, scaling, translation) previously applied.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public resetTransform(): this\n {\n return this._callContextMethod('resetTransform', []);\n }\n /**\n * Applies a rotation transformation to the graphics context around the current origin.\n * @param angle - The angle of rotation in radians.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public rotateTransform(angle: number): this;\n public rotateTransform(...args: Parameters): this\n {\n return this._callContextMethod('rotate', args);\n }\n /**\n * Applies a scaling transformation to the graphics context, scaling drawings by x horizontally and by y vertically.\n * @param x - The scale factor in the horizontal direction.\n * @param y - (Optional) The scale factor in the vertical direction.\n * If not specified, the x value is used for both directions.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public scaleTransform(x: number, y?: number): this;\n public scaleTransform(...args: Parameters): this\n {\n return this._callContextMethod('scale', args);\n }\n /**\n * Sets the current transformation matrix of the graphics context to the specified matrix or values.\n * This replaces the current transformation matrix.\n * @param a - The value for the a property of the matrix, or a Matrix object to use directly.\n * @param b - The value for the b property of the matrix.\n * @param c - The value for the c property of the matrix.\n * @param d - The value for the d property of the matrix.\n * @param dx - The value for the tx (translate x) property of the matrix.\n * @param dy - The value for the ty (translate y) property of the matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public setTransform(transform: Matrix): this;\n public setTransform(a: number, b: number, c: number, d: number, dx: number, dy: number): this;\n public setTransform(a: number | Matrix, b?: number, c?: number, d?: number, dx?: number, dy?: number): this;\n public setTransform(...args: [Matrix] | [number, number, number, number, number, number]): this\n {\n return this._callContextMethod('setTransform', args);\n }\n /**\n * Applies the specified transformation matrix to the current graphics context by multiplying\n * the current matrix with the specified matrix.\n * @param a - The value for the a property of the matrix, or a Matrix object to use directly.\n * @param b - The value for the b property of the matrix.\n * @param c - The value for the c property of the matrix.\n * @param d - The value for the d property of the matrix.\n * @param dx - The value for the tx (translate x) property of the matrix.\n * @param dy - The value for the ty (translate y) property of the matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public transform(transform: Matrix): this;\n public transform(a: number, b: number, c: number, d: number, dx: number, dy: number): this;\n public transform(a: number | Matrix, b?: number, c?: number, d?: number, dx?: number, dy?: number): this;\n public transform(...args: [Matrix] | [number, number, number, number, number, number]): this\n {\n return this._callContextMethod('transform', args);\n }\n /**\n * Applies a translation transformation to the graphics context, moving the origin by the specified amounts.\n * @param x - The amount to translate in the horizontal direction.\n * @param y - (Optional) The amount to translate in the vertical direction. If not specified,\n * the x value is used for both directions.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public translateTransform(x: number, y?: number): this;\n public translateTransform(...args: Parameters): this\n {\n return this._callContextMethod('translate', args);\n }\n /**\n * Clears all drawing commands from the graphics context, effectively resetting it. This includes clearing the path,\n * and optionally resetting transformations to the identity matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public clear(): this\n {\n return this._callContextMethod('clear', []);\n }\n /**\n * The fill style to use.\n * @type {ConvertedFillStyle}\n */\n get fillStyle(): GraphicsContext['fillStyle']\n {\n return this._context.fillStyle;\n }\n set fillStyle(value: FillInput)\n {\n this._context.fillStyle = value;\n }\n /**\n * The stroke style to use.\n * @type {ConvertedStrokeStyle}\n */\n get strokeStyle(): GraphicsContext['strokeStyle']\n {\n return this._context.strokeStyle;\n }\n set strokeStyle(value: StrokeStyle)\n {\n this._context.strokeStyle = value;\n }\n\n /**\n * Creates a new Graphics object.\n * Note that only the context of the object is cloned, not its transform (position,scale,etc)\n * @param deep - Whether to create a deep clone of the graphics object. If false, the context\n * will be shared between the two objects (default false). If true, the context will be\n * cloned (recommended if you need to modify the context in any way).\n * @returns - A clone of the graphics object\n */\n public clone(deep = false): Graphics\n {\n if (deep)\n {\n return new Graphics(this._context.clone());\n }\n\n (this._ownedContext as null) = null;\n const clone = new Graphics(this._context);\n\n return clone;\n }\n\n // -------- v7 deprecations ---------\n\n /**\n * @param width\n * @param color\n * @param alpha\n * @deprecated since 8.0.0 Use {@link Graphics#setStrokeStyle} instead\n */\n public lineStyle(width?: number, color?: ColorSource, alpha?: number): this\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.');\n // #endif\n\n const strokeStyle: Partial = {};\n\n // avoid undefined assignment\n width && (strokeStyle.width = width);\n color && (strokeStyle.color = color);\n alpha && (strokeStyle.alpha = alpha);\n\n this.context.strokeStyle = strokeStyle;\n\n return this;\n }\n\n /**\n * @param color\n * @param alpha\n * @deprecated since 8.0.0 Use {@link Graphics#fill} instead\n */\n public beginFill(color: ColorSource, alpha?: number)\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.');\n // #endif\n\n const fillStyle: Partial = {};\n\n // avoid undefined assignment\n color && (fillStyle.color = color);\n alpha && (fillStyle.alpha = alpha);\n\n this.context.fillStyle = fillStyle;\n\n return this;\n }\n\n /**\n * @deprecated since 8.0.0 Use {@link Graphics#fill} instead\n */\n public endFill()\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.');\n // #endif\n\n this.context.fill();\n const strokeStyle = this.context.strokeStyle;\n\n if (strokeStyle.width !== GraphicsContext.defaultStrokeStyle.width\n || strokeStyle.color !== GraphicsContext.defaultStrokeStyle.color\n || strokeStyle.alpha !== GraphicsContext.defaultStrokeStyle.alpha)\n {\n this.context.stroke();\n }\n\n return this;\n }\n\n /**\n * @param {...any} args\n * @deprecated since 8.0.0 Use {@link Graphics#circle} instead\n */\n public drawCircle(...args: Parameters): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#drawCircle has been renamed to Graphics#circle');\n // #endif\n\n return this._callContextMethod('circle', args);\n }\n\n /**\n * @param {...any} args\n * @deprecated since 8.0.0 Use {@link Graphics#ellipse} instead\n */\n public drawEllipse(...args: Parameters): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#drawEllipse has been renamed to Graphics#ellipse');\n // #endif\n\n return this._callContextMethod('ellipse', args);\n }\n\n /**\n * @param {...any} args\n * @deprecated since 8.0.0 Use {@link Graphics#poly} instead\n */\n public drawPolygon(...args: Parameters): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#drawPolygon has been renamed to Graphics#poly');\n // #endif\n\n return this._callContextMethod('poly', args);\n }\n\n /**\n * @param {...any} args\n * @deprecated since 8.0.0 Use {@link Graphics#rect} instead\n */\n public drawRect(...args: Parameters): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#drawRect has been renamed to Graphics#rect');\n // #endif\n\n return this._callContextMethod('rect', args);\n }\n\n /**\n * @param {...any} args\n * @deprecated since 8.0.0 Use {@link Graphics#roundRect} instead\n */\n public drawRoundedRect(...args: Parameters): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#drawRoundedRect has been renamed to Graphics#roundRect');\n // #endif\n\n return this._callContextMethod('roundRect', args);\n }\n\n /**\n * @param {...any} args\n * @deprecated since 8.0.0 Use {@link Graphics#star} instead\n */\n public drawStar(...args: Parameters): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#drawStar has been renamed to Graphics#star');\n // #endif\n\n return this._callContextMethod('star', args);\n }\n}\n","import { getTestContext } from './getTestContext';\n\nimport type { PRECISION } from '../const';\n\nlet maxFragmentPrecision: PRECISION;\n\nexport function getMaxFragmentPrecision(): PRECISION\n{\n if (!maxFragmentPrecision)\n {\n maxFragmentPrecision = 'mediump';\n const gl = getTestContext();\n\n if (gl)\n {\n if (gl.getShaderPrecisionFormat)\n {\n const shaderFragment = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT);\n\n maxFragmentPrecision = shaderFragment.precision ? 'highp' : 'mediump';\n }\n }\n }\n\n return maxFragmentPrecision;\n}\n","export function addProgramDefines(src: string, isES300: boolean, isFragment?: boolean)\n{\n if (isES300) return src;\n\n if (isFragment)\n {\n src = src.replace('out vec4 finalColor;', '');\n\n return `\n \n #ifdef GL_ES // This checks if it is WebGL1\n #define in varying\n #define finalColor gl_FragColor\n #define texture texture2D\n #endif\n ${src}\n `;\n }\n\n return `\n \n #ifdef GL_ES // This checks if it is WebGL1\n #define in attribute\n #define out varying\n #endif\n ${src}\n `;\n}\n","import type { PRECISION } from '../../const';\n\ninterface EnsurePrecisionOptions\n{\n requestedVertexPrecision: PRECISION;\n requestedFragmentPrecision: PRECISION;\n maxSupportedVertexPrecision: PRECISION;\n maxSupportedFragmentPrecision: PRECISION;\n}\n\n/**\n * Sets the float precision on the shader, ensuring the device supports the request precision.\n * If the precision is already present, it just ensures that the device is able to handle it.\n * @param src\n * @param options\n * @param options.requestedVertexPrecision\n * @param options.requestedFragmentPrecision\n * @param options.maxSupportedVertexPrecision\n * @param options.maxSupportedFragmentPrecision\n * @param isFragment\n * @private\n */\nexport function ensurePrecision(\n src: string,\n options: EnsurePrecisionOptions,\n isFragment: boolean,\n): string\n{\n const maxSupportedPrecision = isFragment ? options.maxSupportedFragmentPrecision : options.maxSupportedVertexPrecision;\n\n if (src.substring(0, 9) !== 'precision')\n {\n // no precision supplied, so PixiJS will add the requested level.\n let precision = isFragment ? options.requestedFragmentPrecision : options.requestedVertexPrecision;\n\n // If highp is requested but not supported, downgrade precision to a level all devices support.\n if (precision === 'highp' && maxSupportedPrecision !== 'highp')\n {\n precision = 'mediump';\n }\n\n return `precision ${precision} float;\\n${src}`;\n }\n else if (maxSupportedPrecision !== 'highp' && src.substring(0, 15) === 'precision highp')\n {\n // precision was supplied, but at a level this device does not support, so downgrading to mediump.\n return src.replace('precision highp', 'precision mediump');\n }\n\n return src;\n}\n","export function insertVersion(src: string, isES300: boolean): string\n{\n if (!isES300) return src;\n\n return `#version 300 es\\n${src}`;\n}\n","const fragmentNameCache: { [key: string]: number } = {};\nconst VertexNameCache: { [key: string]: number } = {};\n\nexport function setProgramName(src: string, { name = `pixi-program` }: { name: string; }, isFragment = true)\n{\n name = name.replace(/\\s+/g, '-');\n\n name += isFragment ? '-fragment' : '-vertex';\n\n const nameCache = isFragment ? fragmentNameCache : VertexNameCache;\n\n if (nameCache[name])\n {\n nameCache[name]++;\n name += `-${nameCache[name]}`;\n }\n else\n {\n nameCache[name] = 1;\n }\n\n // if it already contains the define return\n if (src.indexOf('#define SHADER_NAME') !== -1) return src;\n\n const shaderName = `#define SHADER_NAME ${name}`;\n\n return `${shaderName}\\n${src}`;\n}\n","export function stripVersion(src: string, isES300: boolean): string\n{\n if (!isES300) return src;\n\n return src.replace('#version 300 es', '');\n}\n","import { createIdFromString } from '../../shared/utils/createIdFromString';\nimport { getMaxFragmentPrecision } from './program/getMaxFragmentPrecision';\nimport { addProgramDefines } from './program/preprocessors/addProgramDefines';\nimport { ensurePrecision } from './program/preprocessors/ensurePrecision';\nimport { insertVersion } from './program/preprocessors/insertVersion';\nimport { setProgramName } from './program/preprocessors/setProgramName';\nimport { stripVersion } from './program/preprocessors/stripVersion';\n\nimport type { TypedArray } from '../../shared/buffer/Buffer';\nimport type { ExtractedAttributeData } from './program/extractAttributesFromGlProgram';\n\nexport interface GlAttributeData\n{\n type: string;\n size: number;\n location: number;\n name: string;\n}\n\nexport interface GlUniformData\n{\n name: string;\n index: number;\n type: string;\n size: number;\n isArray: boolean;\n value: any;\n}\n\nexport interface GlUniformBlockData\n{\n index: number;\n name: string;\n size: number;\n value?: TypedArray;\n}\n\n/**\n * The options for the gl program\n * @memberof rendering\n */\nexport interface GlProgramOptions\n{\n /** The fragment glsl shader source. */\n fragment: string;\n /** The vertex glsl shader source. */\n vertex: string;\n /** the name of the program, defaults to 'pixi-program' */\n name?: string;\n /** the preferred vertex precision for the shader, this may not be used if the device does not support it */\n preferredVertexPrecision?: string;\n /** the preferred fragment precision for the shader, this may not be used if the device does not support it */\n preferredFragmentPrecision?: string;\n}\n\nconst processes: Record string)> = {\n // strips any version headers..\n stripVersion,\n // adds precision string if not already present\n ensurePrecision,\n // add some defines if WebGL1 to make it more compatible with WebGL2 shaders\n addProgramDefines,\n // add the program name to the shader\n setProgramName,\n // add the version string to the shader header\n insertVersion,\n};\n\nconst programCache: Record = Object.create(null);\n\n/**\n * A wrapper for a WebGL Program. You can create one and then pass it to a shader.\n * This will manage the WebGL program that is compiled and uploaded to the GPU.\n *\n * To get the most out of this class, you should be familiar with glsl shaders and how they work.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLProgram\n * @example\n *\n * // Create a new program\n * const program = new GlProgram({\n * vertex: '...',\n * fragment: '...',\n * });\n *\n *\n * There are a few key things that pixi shader will do for you automatically:\n *
\n * - If no precision is provided in the shader, it will be injected into the program source for you.\n * This precision will be taken form the options provided, if none is provided,\n * then the program will default to the defaultOptions.\n *
\n * - It will inject the program name into the shader source if none is provided.\n *
\n * - It will set the program version to 300 es.\n *\n * For optimal usage and best performance, its best to reuse programs as much as possible.\n * You should use the {@link GlProgram.from} helper function to create programs.\n * @class\n * @memberof rendering\n */\nexport class GlProgram\n{\n /** The default options used by the program. */\n public static defaultOptions: Partial = {\n preferredVertexPrecision: 'highp',\n preferredFragmentPrecision: 'mediump',\n };\n\n /** the fragment glsl shader source. */\n public readonly fragment?: string;\n /** the vertex glsl shader source */\n public readonly vertex?: string;\n /**\n * attribute data extracted from the program once created this happens when the program is used for the first time\n * @internal\n * @ignore\n */\n public _attributeData: Record;\n /**\n * uniform data extracted from the program once created this happens when the program is used for the first time\n * @internal\n * @ignore\n */\n public _uniformData: Record;\n /**\n * uniform data extracted from the program once created this happens when the program is used for the first time\n * @internal\n * @ignore\n */\n public _uniformBlockData: Record;\n /** details on how to use this program with transform feedback */\n public transformFeedbackVaryings?: {names: string[], bufferMode: 'separate' | 'interleaved'};\n /**\n * the key that identifies the program via its source vertex + fragment\n * @internal\n * @ignore\n */\n public readonly _key: number;\n\n /**\n * Creates a shiny new GlProgram. Used by WebGL renderer.\n * @param options - The options for the program.\n */\n constructor(options: GlProgramOptions)\n {\n options = { ...GlProgram.defaultOptions, ...options };\n\n // only need to check one as they both need to be the same or\n // errors ensue!\n const isES300 = options.fragment.indexOf('#version 300 es') !== -1;\n\n const preprocessorOptions = {\n stripVersion: isES300,\n ensurePrecision: {\n requestedFragmentPrecision: options.preferredFragmentPrecision,\n requestedVertexPrecision: options.preferredVertexPrecision,\n maxSupportedVertexPrecision: 'highp',\n maxSupportedFragmentPrecision: getMaxFragmentPrecision(),\n },\n setProgramName: {\n name: options.name,\n },\n addProgramDefines: isES300,\n insertVersion: isES300\n };\n\n let fragment = options.fragment;\n let vertex = options.vertex;\n\n Object.keys(processes).forEach((processKey) =>\n {\n const processOptions = preprocessorOptions[processKey as keyof typeof preprocessorOptions];\n\n fragment = processes[processKey](fragment, processOptions, true);\n vertex = processes[processKey](vertex, processOptions, false);\n });\n\n this.fragment = fragment;\n this.vertex = vertex;\n\n this._key = createIdFromString(`${this.vertex}:${this.fragment}`, 'gl-program');\n }\n\n /** destroys the program */\n public destroy(): void\n {\n (this.fragment as null) = null;\n (this.vertex as null) = null;\n\n this._attributeData = null;\n this._uniformData = null;\n this._uniformBlockData = null;\n\n this.transformFeedbackVaryings = null;\n }\n\n /**\n * Helper function that creates a program for a given source.\n * It will check the program cache if the program has already been created.\n * If it has that one will be returned, if not a new one will be created and cached.\n * @param options - The options for the program.\n * @returns A program using the same source\n */\n public static from(options: GlProgramOptions): GlProgram\n {\n const key = `${options.vertex}:${options.fragment}`;\n\n if (!programCache[key])\n {\n programCache[key] = new GlProgram(options);\n }\n\n return programCache[key];\n }\n}\n","import type { VertexFormat } from '../const';\n\nconst attributeFormatData = {\n uint8x2: { size: 2, stride: 2, normalised: false },\n uint8x4: { size: 4, stride: 4, normalised: false },\n sint8x2: { size: 2, stride: 2, normalised: false },\n sint8x4: { size: 4, stride: 4, normalised: false },\n unorm8x2: { size: 2, stride: 2, normalised: true },\n unorm8x4: { size: 4, stride: 4, normalised: true },\n snorm8x2: { size: 2, stride: 2, normalised: true },\n snorm8x4: { size: 4, stride: 4, normalised: true },\n uint16x2: { size: 2, stride: 4, normalised: false },\n uint16x4: { size: 4, stride: 8, normalised: false },\n sint16x2: { size: 2, stride: 4, normalised: false },\n sint16x4: { size: 4, stride: 8, normalised: false },\n unorm16x2: { size: 2, stride: 4, normalised: true },\n unorm16x4: { size: 4, stride: 8, normalised: true },\n snorm16x2: { size: 2, stride: 4, normalised: true },\n snorm16x4: { size: 4, stride: 8, normalised: true },\n float16x2: { size: 2, stride: 4, normalised: false },\n float16x4: { size: 4, stride: 8, normalised: false },\n float32: { size: 1, stride: 4, normalised: false },\n float32x2: { size: 2, stride: 8, normalised: false },\n float32x3: { size: 3, stride: 12, normalised: false },\n float32x4: { size: 4, stride: 16, normalised: false },\n uint32: { size: 1, stride: 4, normalised: false },\n uint32x2: { size: 2, stride: 8, normalised: false },\n uint32x3: { size: 3, stride: 12, normalised: false },\n uint32x4: { size: 4, stride: 16, normalised: false },\n sint32: { size: 1, stride: 4, normalised: false },\n sint32x2: { size: 2, stride: 8, normalised: false },\n sint32x3: { size: 3, stride: 12, normalised: false },\n sint32x4: { size: 4, stride: 16, normalised: false },\n};\n\nexport function getAttributeInfoFromFormat(format: VertexFormat): { size: number; stride: number; normalised: boolean }\n{\n return attributeFormatData[format] ?? attributeFormatData.float32;\n}\n","import { getAttributeInfoFromFormat } from '../../../shared/geometry/utils/getAttributeInfoFromFormat';\n\nimport type { ExtractedAttributeData } from '../../../gl/shader/program/extractAttributesFromGlProgram';\nimport type { VertexFormat } from '../../../shared/geometry/const';\nimport type { ProgramSource } from '../GpuProgram';\n\nconst WGSL_TO_VERTEX_TYPES: Record = {\n\n f32: 'float32',\n 'vec2': 'float32x2',\n 'vec3': 'float32x3',\n 'vec4': 'float32x4',\n vec2f: 'float32x2',\n vec3f: 'float32x3',\n vec4f: 'float32x4',\n\n i32: 'sint32',\n 'vec2': 'sint32x2',\n 'vec3': 'sint32x3',\n 'vec4': 'sint32x4',\n\n u32: 'uint32',\n 'vec2': 'uint32x2',\n 'vec3': 'uint32x3',\n 'vec4': 'uint32x4',\n\n bool: 'uint32',\n 'vec2': 'uint32x2',\n 'vec3': 'uint32x3',\n 'vec4': 'uint32x4',\n};\n\nexport function extractAttributesFromGpuProgram(\n { source, entryPoint }: ProgramSource\n): Record\n{\n const results: Record = {};\n\n // Step 1: Find the start of the mainVert function using string methods\n const mainVertStart = source.indexOf(`fn ${entryPoint}`);\n\n if (mainVertStart !== -1)\n {\n // Step 2: Find the index of the next '->' after the start of the mainVert function\n const arrowFunctionStart = source.indexOf('->', mainVertStart);\n\n if (arrowFunctionStart !== -1)\n {\n const functionArgsSubstring = source.substring(mainVertStart, arrowFunctionStart);\n\n // Apply the inputs regex directly to the trimmed string\n const inputsRegex = /@location\\((\\d+)\\)\\s+([a-zA-Z0-9_]+)\\s*:\\s*([a-zA-Z0-9_<>]+)(?:,|\\s|$)/g;\n let match;\n\n while ((match = inputsRegex.exec(functionArgsSubstring)) !== null)\n {\n const format = WGSL_TO_VERTEX_TYPES[match[3] as VertexFormat] ?? 'float32';\n\n results[match[2]] = {\n location: parseInt(match[1], 10),\n format,\n stride: getAttributeInfoFromFormat(format).stride,\n offset: 0,\n instance: false,\n start: 0,\n };\n }\n }\n }\n\n return results;\n}\n","export interface StructsAndGroups\n{\n groups: {\n group: number;\n binding: number;\n name: string;\n isUniform: boolean;\n type: string;\n }[];\n structs: {\n name: string;\n members: Record;\n }[];\n}\n\nexport function extractStructAndGroups(wgsl: string): StructsAndGroups\n{\n // Patterns for parsing the WGSL file\n const linePattern = /(^|[^/])@(group|binding)\\(\\d+\\)[^;]+;/g;\n const groupPattern = /@group\\((\\d+)\\)/;\n const bindingPattern = /@binding\\((\\d+)\\)/;\n const namePattern = /var(<[^>]+>)? (\\w+)/;\n const typePattern = /:\\s*(\\w+)/;\n const structPattern = /struct\\s+(\\w+)\\s*{([^}]+)}/g;\n const structMemberPattern = /(\\w+)\\s*:\\s*([\\w\\<\\>]+)/g;\n const structName = /struct\\s+(\\w+)/;\n\n // Find the @group and @binding annotations\n const groups = wgsl.match(linePattern)?.map((item) => ({\n group: parseInt(item.match(groupPattern)[1], 10),\n binding: parseInt(item.match(bindingPattern)[1], 10),\n name: item.match(namePattern)[2],\n isUniform: item.match(namePattern)[1] === '',\n type: item.match(typePattern)[1],\n }));\n\n if (!groups)\n {\n return {\n groups: [],\n structs: [],\n };\n }\n\n // Find the structs\n const structs = wgsl\n .match(structPattern)\n ?.map((struct) =>\n {\n const name = struct.match(structName)[1];\n const members = struct.match(structMemberPattern).reduce((acc: Record, member) =>\n {\n const [name, type] = member.split(':');\n\n acc[name.trim()] = type.trim();\n\n return acc;\n }, {});\n\n if (!members)\n {\n return null;\n }\n\n return { name, members };\n // Only include the structs mentioned in the @group/@binding annotations\n })\n .filter(({ name }) => groups.some((group) => group.type === name)) ?? [];\n\n return {\n groups,\n structs,\n };\n}\n","export enum ShaderStage\n {\n VERTEX = 1,\n FRAGMENT = 2,\n COMPUTE = 4\n}\n","import { ShaderStage } from '../../../shared/shader/const';\n\nimport type { ProgramPipelineLayoutDescription } from '../GpuProgram';\nimport type { StructsAndGroups } from './extractStructAndGroups';\n\nexport function generateGpuLayoutGroups({ groups }: StructsAndGroups): ProgramPipelineLayoutDescription\n{\n const layout: ProgramPipelineLayoutDescription = [];\n\n for (let i = 0; i < groups.length; i++)\n {\n const group = groups[i];\n\n if (!layout[group.group])\n {\n layout[group.group] = [];\n }\n\n if (group.isUniform)\n {\n layout[group.group].push({\n binding: group.binding,\n visibility: ShaderStage.VERTEX | ShaderStage.FRAGMENT,\n buffer: {\n type: 'uniform'\n }\n });\n }\n else if (group.type === 'sampler')\n {\n layout[group.group].push({\n binding: group.binding,\n visibility: ShaderStage.FRAGMENT,\n sampler: {\n type: 'filtering'\n }\n });\n }\n else if (group.type === 'texture_2d')\n {\n layout[group.group].push({\n binding: group.binding,\n visibility: ShaderStage.FRAGMENT,\n texture: {\n sampleType: 'float',\n viewDimension: '2d',\n multisampled: false,\n }\n });\n }\n }\n\n return layout;\n}\n","import type { ProgramLayout } from '../GpuProgram';\nimport type { StructsAndGroups } from './extractStructAndGroups';\n\nexport function generateLayoutHash({ groups }: StructsAndGroups): ProgramLayout\n{\n const layout: ProgramLayout = [];\n\n for (let i = 0; i < groups.length; i++)\n {\n const group = groups[i];\n\n if (!layout[group.group])\n {\n layout[group.group] = {};\n }\n\n layout[group.group][group.name] = group.binding;\n }\n\n return layout;\n}\n","import type { StructsAndGroups } from './extractStructAndGroups';\n\nexport function removeStructAndGroupDuplicates(\n vertexStructsAndGroups: StructsAndGroups,\n fragmentStructsAndGroups: StructsAndGroups\n)\n{\n const structNameSet = new Set();\n const dupeGroupKeySet = new Set();\n\n const structs = [...vertexStructsAndGroups.structs, ...fragmentStructsAndGroups.structs]\n .filter((struct) =>\n {\n if (structNameSet.has(struct.name))\n {\n return false;\n }\n structNameSet.add(struct.name);\n\n return true;\n });\n\n const groups = [...vertexStructsAndGroups.groups, ...fragmentStructsAndGroups.groups]\n .filter((group) =>\n {\n const key = `${group.name}-${group.binding}`;\n\n if (dupeGroupKeySet.has(key))\n {\n return false;\n }\n dupeGroupKeySet.add(key);\n\n return true;\n });\n\n return { structs, groups };\n}\n","import { createIdFromString } from '../../shared/utils/createIdFromString';\nimport { extractAttributesFromGpuProgram } from './utils/extractAttributesFromGpuProgram';\nimport { extractStructAndGroups } from './utils/extractStructAndGroups';\nimport { generateGpuLayoutGroups } from './utils/generateGpuLayoutGroups';\nimport { generateLayoutHash } from './utils/generateLayoutHash';\nimport { removeStructAndGroupDuplicates } from './utils/removeStructAndGroupDuplicates';\n\nimport type { ExtractedAttributeData } from '../../gl/shader/program/extractAttributesFromGlProgram';\nimport type { StructsAndGroups } from './utils/extractStructAndGroups';\n\n/**\n * a WebGPU descriptions of how the program is layed out\n * @see https://gpuweb.github.io/gpuweb/#gpupipelinelayout\n * @memberof rendering\n */\nexport type ProgramPipelineLayoutDescription = GPUBindGroupLayoutEntry[][];\n/**\n * a map the maps names of uniforms to group indexes\n * @memberof rendering\n */\nexport type ProgramLayout = Record[];\n\n/**\n * the program source\n * @memberof rendering\n */\nexport interface ProgramSource\n{\n /** The wgsl source code of the shader. */\n source: string;\n /** The main function to run in this shader */\n entryPoint?: string;\n}\n\n/**\n * The options for the gpu program\n * @memberof rendering\n */\nexport interface GpuProgramOptions\n{\n /**\n * the name of the program, this is added to the label of the GPU Program created\n * under the hood. Makes it much easier to debug!\n */\n name?: string;\n /** The fragment glsl shader source. */\n fragment?: ProgramSource;\n /** The vertex glsl shader source. */\n vertex?: ProgramSource;\n /** The layout of the program. If not provided, it will be generated from the shader sources. */\n layout?: ProgramLayout;\n /** The gpu layout of the program. If not provided, it will be generated from the shader sources. */\n gpuLayout?: ProgramPipelineLayoutDescription;\n}\n\nconst programCache: Record = Object.create(null);\n\n/**\n * A wrapper for a WebGPU Program, specifically designed for the WebGPU renderer.\n * This class facilitates the creation and management of shader code that integrates with the WebGPU pipeline.\n *\n * To leverage the full capabilities of this class, familiarity with WGSL shaders is recommended.\n * @see https://gpuweb.github.io/gpuweb/#index\n * @example\n *\n * // Create a new program\n * const program = new GpuProgram({\n * vertex: {\n * source: '...',\n * entryPoint: 'main',\n * },\n * fragment:{\n * source: '...',\n * entryPoint: 'main',\n * },\n * });\n *\n *\n * Note: Both fragment and vertex shader sources can coexist within a single WGSL source file\n * this can make things a bit simpler.\n *\n * For optimal usage and best performance, it help to reuse programs whenever possible.\n * The {@link GpuProgram.from} helper function is designed for this purpose, utilizing an\n * internal cache to efficiently manage and retrieve program instances.\n * By leveraging this function, you can significantly reduce overhead and enhance the performance of your rendering pipeline.\n *\n * An important distinction between WebGL and WebGPU regarding program data retrieval:\n * While WebGL allows extraction of program information directly from its compiled state,\n * WebGPU does not offer such a capability. Therefore, in the context of WebGPU, we're required\n * to manually extract the program layout information from the source code itself.\n * @memberof rendering\n */\nexport class GpuProgram\n{\n /** The fragment glsl shader source. */\n public readonly fragment?: ProgramSource;\n /** The vertex glsl shader source */\n public readonly vertex?: ProgramSource;\n\n /**\n * Mapping of uniform names to group indexes for organizing shader program uniforms.\n * Automatically generated from shader sources if not provided.\n * @example\n * // Assuming a shader with two uniforms, `u_time` and `u_resolution`, grouped respectively:\n * [\n * { \"u_time\": 0 },\n * { \"u_resolution\": 1 }\n * ]\n */\n public readonly layout: ProgramLayout;\n\n /**\n * Configuration for the WebGPU bind group layouts, detailing resource organization for the shader.\n * Generated from shader sources if not explicitly provided.\n * @example\n * // Assuming a shader program that requires two bind groups:\n * [\n * // First bind group layout entries\n * [{ binding: 0, visibility: GPUShaderStage.VERTEX, type: \"uniform-buffer\" }],\n * // Second bind group layout entries\n * [{ binding: 1, visibility: GPUShaderStage.FRAGMENT, type: \"sampler\" },\n * { binding: 2, visibility: GPUShaderStage.FRAGMENT, type: \"sampled-texture\" }]\n * ]\n */\n public readonly gpuLayout: ProgramPipelineLayoutDescription;\n\n /**\n * @internal\n * @ignore\n */\n public _layoutKey = 0;\n\n /** the structs and groups extracted from the shader sources */\n public readonly structsAndGroups: StructsAndGroups;\n /**\n * the name of the program, this is added to the label of the GPU Program created under the hood.\n * Makes it much easier to debug!\n */\n public readonly name: string;\n private _attributeData: Record;\n\n /** if true, the program will automatically assign global uniforms to group[0] */\n public autoAssignGlobalUniforms: boolean;\n /** if true, the program will automatically assign local uniforms to group[1] */\n public autoAssignLocalUniforms: boolean;\n\n /**\n * Create a new GpuProgram\n * @param options - The options for the gpu program\n */\n constructor(options: GpuProgramOptions)\n {\n const { fragment, vertex, layout, gpuLayout, name } = options;\n\n this.name = name;\n\n this.fragment = fragment;\n this.vertex = vertex;\n\n // TODO this should be cached - or dealt with at a system level.\n if (fragment.source === vertex.source)\n {\n const structsAndGroups = extractStructAndGroups(fragment.source);\n\n this.structsAndGroups = structsAndGroups;\n }\n else\n {\n const vertexStructsAndGroups = extractStructAndGroups(vertex.source);\n const fragmentStructsAndGroups = extractStructAndGroups(fragment.source);\n\n this.structsAndGroups = removeStructAndGroupDuplicates(vertexStructsAndGroups, fragmentStructsAndGroups);\n }\n\n // todo layout\n this.layout = layout ?? generateLayoutHash(this.structsAndGroups);\n\n // struct properties!\n\n this.gpuLayout = gpuLayout ?? generateGpuLayoutGroups(this.structsAndGroups);\n\n this.autoAssignGlobalUniforms = !!(this.layout[0]?.globalUniforms !== undefined);\n this.autoAssignLocalUniforms = !!(this.layout[1]?.localUniforms !== undefined);\n\n this._generateProgramKey();\n }\n\n // TODO maker this pure\n private _generateProgramKey()\n {\n const { vertex, fragment } = this;\n\n const bigKey = vertex.source + fragment.source + vertex.entryPoint + fragment.entryPoint;\n\n this._layoutKey = createIdFromString(bigKey, 'program');\n }\n\n get attributeData()\n {\n this._attributeData ??= extractAttributesFromGpuProgram(this.vertex);\n\n return this._attributeData;\n }\n /** destroys the program */\n public destroy(): void\n {\n (this.gpuLayout as null) = null;\n (this.layout as null) = null;\n (this.structsAndGroups as null) = null;\n (this.fragment as null) = null;\n (this.vertex as null) = null;\n }\n\n /**\n * Helper function that creates a program for a given source.\n * It will check the program cache if the program has already been created.\n * If it has that one will be returned, if not a new one will be created and cached.\n * @param options - The options for the program.\n * @returns A program using the same source\n */\n public static from(options: GpuProgramOptions): GpuProgram\n {\n // eslint-disable-next-line max-len\n const key = `${options.vertex.source}:${options.fragment.source}:${options.fragment.entryPoint}:${options.vertex.entryPoint}`;\n\n if (!programCache[key])\n {\n programCache[key] = new GpuProgram(options);\n }\n\n return programCache[key];\n }\n}\n\n","import { warn } from '../../../../utils/logging/warn';\n\n/**\n * takes the HighFragment source parts and adds them to the hook hash\n * @param srcParts - the hash of hook arrays\n * @param parts - the code to inject into the hooks\n * @param name - optional the name of the part to add\n */\nexport function addBits(srcParts: Record, parts: Record, name?: string)\n{\n if (srcParts)\n {\n for (const i in srcParts)\n {\n const id = i.toLocaleLowerCase();\n\n const part = parts[id];\n\n if (part)\n {\n let sanitisedPart = srcParts[i];\n\n if (i === 'header')\n {\n sanitisedPart = sanitisedPart\n .replace(/@in\\s+[^;]+;\\s*/g, '')\n .replace(/@out\\s+[^;]+;\\s*/g, '');\n }\n\n if (name)\n {\n part.push(`//----${name}----//`);\n }\n part.push(sanitisedPart);\n }\n\n else\n {\n // #if _DEBUG\n warn(`${i} placement hook does not exist in shader`);\n // #endif\n }\n }\n }\n}\n","export const findHooksRx = /\\{\\{(.*?)\\}\\}/g;\n\n/**\n * takes a program string and returns an hash mapping the hooks to empty arrays\n * @param programSrc - the program containing hooks\n */\nexport function compileHooks(programSrc: string): Record\n{\n const parts: Record = {};\n\n const partMatches = programSrc\n .match(findHooksRx)\n ?.map((hook) => hook.replace(/[{()}]/g, '')) ?? [];\n\n partMatches.forEach((hook) =>\n {\n parts[hook] = [];\n });\n\n return parts;\n}\n","function extractInputs(fragmentSource: string, out: string[])\n{\n let match;\n const regex = /@in\\s+([^;]+);/g;\n\n while ((match = regex.exec(fragmentSource)) !== null)\n {\n out.push(match[1]);\n }\n}\n\nexport function compileInputs(fragments: any[], template: string, sort = false)\n{\n // get all the inputs from the fragments..\n const results: string[] = [];\n\n extractInputs(template, results);\n\n fragments.forEach((fragment) =>\n {\n if (fragment.header)\n {\n extractInputs(fragment.header, results);\n }\n });\n\n // build the input:\n const mainInput = results;\n\n if (sort)\n {\n mainInput.sort();\n }\n\n const finalString = mainInput\n .map((inValue, i) => ` @location(${i}) ${inValue},`)\n .join('\\n');\n\n // Remove lines from original string\n let cleanedString = template.replace(/@in\\s+[^;]+;\\s*/g, '');\n\n cleanedString = cleanedString.replace('{{in}}', `\\n${finalString}\\n`);\n\n return cleanedString;\n}\n","function extractOutputs(fragmentSource: string, out: string[])\n{\n let match;\n const regex = /@out\\s+([^;]+);/g;\n\n while ((match = regex.exec(fragmentSource)) !== null)\n {\n out.push(match[1]);\n }\n}\n\nfunction extractVariableName(value: string)\n{\n const regex = /\\b(\\w+)\\s*:/g;\n\n const match = regex.exec(value);\n\n return match ? match[1] : '';\n}\n\nfunction stripVariable(value: string)\n{\n const regex = /@.*?\\s+/g;\n\n return value.replace(regex, '');\n}\n\nexport function compileOutputs(fragments: any[], template: string)\n{\n // get all the inputs from the fragments..\n const results: string[] = [];\n\n extractOutputs(template, results);\n\n fragments.forEach((fragment) =>\n {\n if (fragment.header)\n {\n extractOutputs(fragment.header, results);\n }\n });\n\n let index = 0;\n\n // generate the output struct\n const mainStruct = results\n .sort()\n .map((inValue) =>\n {\n if (inValue.indexOf('builtin') > -1)\n {\n return inValue;\n }\n\n return `@location(${index++}) ${inValue}`;\n })\n .join(',\\n');\n\n // generate the variables we will set:\n const mainStart = results\n .sort()\n .map((inValue) => ` var ${stripVariable(inValue)};`)\n .join('\\n');\n\n // generate the return object\n const mainEnd = `return VSOutput(\n ${results\n .sort()\n .map((inValue) => ` ${extractVariableName(inValue)}`)\n .join(',\\n')});`;\n\n // Remove lines from original string\n let compiledCode = template.replace(/@out\\s+[^;]+;\\s*/g, '');\n\n compiledCode = compiledCode.replace('{{struct}}', `\\n${mainStruct}\\n`);\n compiledCode = compiledCode.replace('{{start}}', `\\n${mainStart}\\n`);\n compiledCode = compiledCode.replace('{{return}}', `\\n${mainEnd}\\n`);\n\n return compiledCode;\n}\n","/**\n * takes a shader src and replaces any hooks with the HighFragment code.\n * @param templateSrc - the program src template\n * @param fragmentParts - the fragments to inject\n */\nexport function injectBits(templateSrc: string, fragmentParts: Record): string\n{\n let out = templateSrc;\n\n for (const i in fragmentParts)\n {\n const parts = fragmentParts[i];\n\n const toInject = parts.join('\\n');\n\n if (toInject.length)\n {\n out = out.replace(`{{${i}}}`, `//-----${i} START-----//\\n${parts.join('\\n')}\\n//----${i} FINISH----//`);\n }\n\n else\n {\n out = out.replace(`{{${i}}}`, '');\n }\n }\n\n return out;\n}\n","import { addBits } from './utils/addBits';\nimport { compileHooks } from './utils/compileHooks';\nimport { compileInputs } from './utils/compileInputs';\nimport { compileOutputs } from './utils/compileOutputs';\nimport { injectBits } from './utils/injectBits';\n\nimport type { HighShaderBit, HighShaderSource } from './types';\n\n/** A high template consists of vertex and fragment source */\nexport interface HighShaderTemplate\n{\n name?: string;\n fragment: string;\n vertex: string;\n}\n\nexport interface CompileHighShaderOptions\n{\n template: HighShaderTemplate;\n bits: HighShaderBit[];\n}\n\nconst cacheMap: {[key: string]: HighShaderSource} = Object.create(null);\nconst bitCacheMap: Map = new Map();\n\nlet CACHE_UID = 0;\n\n/**\n * This function will take a HighShader template, some High fragments and then merge them in to a shader source.\n * @param options\n * @param options.template\n * @param options.bits\n */\nexport function compileHighShader({\n template,\n bits\n}: CompileHighShaderOptions): HighShaderSource\n{\n const cacheId = generateCacheId(template, bits);\n\n if (cacheMap[cacheId]) return cacheMap[cacheId];\n\n const { vertex, fragment } = compileInputsAndOutputs(template, bits);\n\n cacheMap[cacheId] = compileBits(vertex, fragment, bits);\n\n return cacheMap[cacheId];\n}\n\nexport function compileHighShaderGl({\n template,\n bits\n}: CompileHighShaderOptions): HighShaderSource\n{\n const cacheId = generateCacheId(template, bits);\n\n if (cacheMap[cacheId]) return cacheMap[cacheId];\n\n cacheMap[cacheId] = compileBits(template.vertex, template.fragment, bits);\n\n return cacheMap[cacheId];\n}\n\nfunction compileInputsAndOutputs(template: HighShaderTemplate, bits: HighShaderBit[])\n{\n const vertexFragments = bits.map((shaderBit) => shaderBit.vertex).filter((v) => !!v);\n const fragmentFragments = bits.map((shaderBit) => shaderBit.fragment).filter((v) => !!v);\n\n // WebGPU compile inputs and outputs..\n let compiledVertex = compileInputs(vertexFragments, template.vertex, true);\n\n compiledVertex = compileOutputs(vertexFragments, compiledVertex);\n\n const compiledFragment = compileInputs(fragmentFragments, template.fragment, true);\n\n return {\n vertex: compiledVertex,\n fragment: compiledFragment,\n };\n}\n\nfunction generateCacheId(template: HighShaderTemplate, bits: HighShaderBit[]): string\n{\n return bits\n .map((highFragment) =>\n {\n if (!bitCacheMap.has(highFragment))\n {\n bitCacheMap.set(highFragment, CACHE_UID++);\n }\n\n return bitCacheMap.get(highFragment);\n })\n .sort((a, b) => a - b)\n .join('-') + template.vertex + template.fragment;\n}\n\nfunction compileBits(vertex: string, fragment: string, bits: HighShaderBit[])\n{\n const vertexParts = compileHooks(vertex);\n const fragmentParts = compileHooks(fragment);\n\n bits.forEach((shaderBit) =>\n {\n addBits(shaderBit.vertex, vertexParts, shaderBit.name);\n addBits(shaderBit.fragment, fragmentParts, shaderBit.name);\n });\n\n return {\n vertex: injectBits(vertex, vertexParts),\n fragment: injectBits(fragment, fragmentParts),\n };\n}\n","const vertexGPUTemplate = /* wgsl */`\n @in aPosition: vec2;\n @in aUV: vec2;\n\n @out @builtin(position) vPosition: vec4;\n @out vUV : vec2;\n @out vColor : vec4;\n\n {{header}}\n\n struct VSOutput {\n {{struct}}\n };\n\n @vertex\n fn main( {{in}} ) -> VSOutput {\n\n var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;\n var modelMatrix = mat3x3(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n var position = aPosition;\n var uv = aUV;\n\n {{start}}\n \n vColor = vec4(1., 1., 1., 1.);\n\n {{main}}\n\n vUV = uv;\n\n var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;\n\n vPosition = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n \n vColor *= globalUniforms.uWorldColorAlpha;\n\n {{end}}\n\n {{return}}\n };\n`;\n\nconst fragmentGPUTemplate = /* wgsl */`\n @in vUV : vec2;\n @in vColor : vec4;\n \n {{header}}\n\n @fragment\n fn main(\n {{in}}\n ) -> @location(0) vec4 {\n \n {{start}}\n\n var outColor:vec4;\n \n {{main}}\n \n return outColor * vColor;\n };\n`;\n\nconst vertexGlTemplate = /* glsl */`\n in vec2 aPosition;\n in vec2 aUV;\n\n out vec4 vColor;\n out vec2 vUV;\n\n {{header}}\n\n void main(void){\n\n mat3 worldTransformMatrix = uWorldTransformMatrix;\n mat3 modelMatrix = mat3(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n vec2 position = aPosition;\n vec2 uv = aUV;\n \n {{start}}\n \n vColor = vec4(1.);\n \n {{main}}\n \n vUV = uv;\n \n mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;\n\n gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n\n vColor *= uWorldColorAlpha;\n\n {{end}}\n }\n`;\n\nconst fragmentGlTemplate = /* glsl */`\n \n in vec4 vColor;\n in vec2 vUV;\n\n out vec4 finalColor;\n\n {{header}}\n\n void main(void) {\n \n {{start}}\n\n vec4 outColor;\n \n {{main}}\n \n finalColor = outColor * vColor;\n }\n`;\n\nexport {\n fragmentGlTemplate,\n fragmentGPUTemplate,\n vertexGlTemplate,\n vertexGPUTemplate\n};\n","export const globalUniformsBit = {\n name: 'global-uniforms-bit',\n vertex: {\n header: /* wgsl */`\n struct GlobalUniforms {\n uProjectionMatrix:mat3x3,\n uWorldTransformMatrix:mat3x3,\n uWorldColorAlpha: vec4,\n uResolution: vec2,\n }\n\n @group(0) @binding(0) var globalUniforms : GlobalUniforms;\n `\n }\n};\n\nexport const globalUniformsUBOBitGl = {\n name: 'global-uniforms-ubo-bit',\n vertex: {\n header: /* glsl */`\n uniform globalUniforms {\n mat3 uProjectionMatrix;\n mat3 uWorldTransformMatrix;\n vec4 uWorldColorAlpha;\n vec2 uResolution;\n };\n `\n }\n};\n\nexport const globalUniformsBitGl = {\n name: 'global-uniforms-bit',\n vertex: {\n header: /* glsl */`\n uniform mat3 uProjectionMatrix;\n uniform mat3 uWorldTransformMatrix;\n uniform vec4 uWorldColorAlpha;\n uniform vec2 uResolution;\n `\n }\n\n};\n","import { GlProgram } from '../renderers/gl/shader/GlProgram';\nimport { GpuProgram } from '../renderers/gpu/shader/GpuProgram';\nimport { compileHighShader, compileHighShaderGl } from './compiler/compileHighShader';\nimport { fragmentGlTemplate, fragmentGPUTemplate, vertexGlTemplate, vertexGPUTemplate } from './defaultProgramTemplate';\nimport { globalUniformsBit, globalUniformsBitGl } from './shader-bits/globalUniformsBit';\n\nimport type { HighShaderBit } from './compiler/types';\n\nexport function compileHighShaderGpuProgram({ bits, name }: {bits: HighShaderBit[], name: string}): GpuProgram\n{\n const source = compileHighShader({\n template: {\n fragment: fragmentGPUTemplate,\n vertex: vertexGPUTemplate,\n },\n bits: [\n globalUniformsBit,\n ...bits,\n ]\n });\n\n return GpuProgram.from({\n name,\n vertex: {\n source: source.vertex,\n entryPoint: 'main',\n },\n fragment: {\n source: source.fragment,\n entryPoint: 'main',\n },\n });\n}\n\nexport function compileHighShaderGlProgram({ bits, name }: {bits: HighShaderBit[], name: string}): GlProgram\n{\n return new GlProgram({\n name,\n ...compileHighShaderGl({\n template: {\n vertex: vertexGlTemplate,\n fragment: fragmentGlTemplate,\n },\n bits: [\n globalUniformsBitGl,\n ...bits,\n ]\n })\n });\n}\n","export const colorBit = {\n name: 'color-bit',\n vertex: {\n header: /* wgsl */`\n @in aColor: vec4;\n `,\n main: /* wgsl */`\n vColor *= vec4(aColor.rgb * aColor.a, aColor.a);\n `\n }\n};\n\nexport const colorBitGl = {\n name: 'color-bit',\n vertex: {\n header: /* glsl */`\n in vec4 aColor;\n `,\n main: /* glsl */`\n vColor *= vec4(aColor.rgb * aColor.a, aColor.a);\n `\n }\n};\n","import { getMaxTexturesPerBatch } from '../../batcher/gl/utils/maxRecommendedTextures';\n\nimport type { HighShaderBit } from '../compiler/types';\n\nconst textureBatchBitGpuCache: Record = {};\n\n/**\n *\n * @param maxTextures - the max textures the shader can use.\n * @returns a shader bit that will allow the shader to sample multiple textures AND round pixels.\n */\nfunction generateBindingSrc(maxTextures: number): string\n{\n const src = [];\n\n if (maxTextures === 1)\n {\n src.push('@group(1) @binding(0) var textureSource1: texture_2d;');\n src.push('@group(1) @binding(1) var textureSampler1: sampler;');\n }\n else\n {\n let bindingIndex = 0;\n\n for (let i = 0; i < maxTextures; i++)\n {\n src.push(`@group(1) @binding(${bindingIndex++}) var textureSource${i + 1}: texture_2d;`);\n src.push(`@group(1) @binding(${bindingIndex++}) var textureSampler${i + 1}: sampler;`);\n }\n }\n\n return src.join('\\n');\n}\n\nfunction generateSampleSrc(maxTextures: number): string\n{\n const src = [];\n\n if (maxTextures === 1)\n {\n src.push('outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);');\n }\n else\n {\n src.push('switch vTextureId {');\n\n for (let i = 0; i < maxTextures; i++)\n {\n if (i === maxTextures - 1)\n {\n src.push(` default:{`);\n }\n else\n {\n src.push(` case ${i}:{`);\n }\n src.push(` outColor = textureSampleGrad(textureSource${i + 1}, textureSampler${i + 1}, vUV, uvDx, uvDy);`);\n src.push(` break;}`);\n }\n\n src.push(`}`);\n }\n\n return src.join('\\n');\n}\n\nexport function generateTextureBatchBit(maxTextures: number): HighShaderBit\n{\n if (!textureBatchBitGpuCache[maxTextures])\n {\n textureBatchBitGpuCache[maxTextures] = {\n name: 'texture-batch-bit',\n vertex: {\n header: `\n @in aTextureIdAndRound: vec2;\n @out @interpolate(flat) vTextureId : u32;\n `,\n main: `\n vTextureId = aTextureIdAndRound.y;\n `,\n end: `\n if(aTextureIdAndRound.x == 1)\n {\n vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);\n }\n `\n },\n fragment: {\n header: `\n @in @interpolate(flat) vTextureId: u32;\n \n ${generateBindingSrc(getMaxTexturesPerBatch())}\n `,\n main: `\n var uvDx = dpdx(vUV);\n var uvDy = dpdy(vUV);\n \n ${generateSampleSrc(getMaxTexturesPerBatch())}\n `\n }\n };\n }\n\n return textureBatchBitGpuCache[maxTextures];\n}\n\nconst textureBatchBitGlCache: Record = {};\n\n/**\n *\n * @param maxTextures - the max textures the shader can use.\n * @returns a shader bit that will allow the shader to sample multiple textures AND round pixels.\n */\nfunction generateSampleGlSrc(maxTextures: number): string\n{\n const src = [];\n\n for (let i = 0; i < maxTextures; i++)\n {\n if (i > 0)\n {\n src.push('else');\n }\n\n if (i < maxTextures - 1)\n {\n src.push(`if(vTextureId < ${i}.5)`);\n }\n\n src.push('{');\n src.push(`\\toutColor = texture(uTextures[${i}], vUV);`);\n src.push('}');\n }\n\n return src.join('\\n');\n}\n\nexport function generateTextureBatchBitGl(maxTextures: number): HighShaderBit\n{\n if (!textureBatchBitGlCache[maxTextures])\n {\n textureBatchBitGlCache[maxTextures] = {\n name: 'texture-batch-bit',\n vertex: {\n header: `\n in vec2 aTextureIdAndRound;\n out float vTextureId;\n \n `,\n main: `\n vTextureId = aTextureIdAndRound.y;\n `,\n end: `\n if(aTextureIdAndRound.x == 1.)\n {\n gl_Position.xy = roundPixels(gl_Position.xy, uResolution);\n }\n `\n },\n fragment: {\n header: `\n in float vTextureId;\n \n uniform sampler2D uTextures[${maxTextures}];\n \n `,\n main: `\n \n ${generateSampleGlSrc(getMaxTexturesPerBatch())}\n `\n }\n };\n }\n\n return textureBatchBitGlCache[maxTextures];\n}\n","export const roundPixelsBit = {\n name: 'round-pixels-bit',\n vertex: {\n header: /* wgsl */`\n fn roundPixels(position: vec2, targetSize: vec2) -> vec2 \n {\n return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n }\n `\n }\n};\n\nexport const roundPixelsBitGl = {\n name: 'round-pixels-bit',\n vertex: {\n header: /* glsl */` \n vec2 roundPixels(vec2 position, vec2 targetSize)\n { \n return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n }\n `\n }\n};\n\n","import { UniformGroup } from '../../shared/shader/UniformGroup';\n\nconst batchSamplersUniformGroupHash: Record = {};\n\n/**\n * Automatically generates a uniform group that holds the texture samplers for a shader.\n * This is used mainly by the shaders that batch textures!\n * @param maxTextures - the number of textures that this uniform group will contain.\n * @returns a uniform group that holds the texture samplers.\n */\nexport function getBatchSamplersUniformGroup(maxTextures: number)\n{\n let batchSamplersUniformGroup = batchSamplersUniformGroupHash[maxTextures];\n\n if (batchSamplersUniformGroup) return batchSamplersUniformGroup;\n\n const sampleValues = new Int32Array(maxTextures);\n\n for (let i = 0; i < maxTextures; i++)\n {\n sampleValues[i] = i;\n }\n\n batchSamplersUniformGroup = batchSamplersUniformGroupHash[maxTextures] = new UniformGroup({\n uTextures: { value: sampleValues, type: `i32`, size: maxTextures }\n }, { isStatic: true });\n\n return batchSamplersUniformGroup;\n}\n","import type { ICanvas } from '../../environment/canvas/ICanvas';\nimport type { WebGLOptions, WebGLPipes, WebGLRenderer } from './gl/WebGLRenderer';\nimport type { WebGPUOptions, WebGPUPipes, WebGPURenderer } from './gpu/WebGPURenderer';\n\n/** A generic renderer. */\nexport type Renderer = WebGLRenderer | WebGPURenderer;\nexport type RenderPipes = WebGLPipes | WebGPUPipes;\nexport interface RendererOptions extends WebGLOptions, WebGPUOptions {}\n\n/* eslint-disable @typescript-eslint/indent */\n/**\n * Ids for the different render types.\n * The idea is that you can use bitwise operations to filter weather or not you want to do somthing in a certain render type.\n * Filters for example can be compatible for both webGL or WebGPU but not compatible with canvas.\n * So internally if it works with both we set filter.compatibleRenderers = RendererType.WEBGL | RendererType.WEBGPU\n * if it only works with webgl we set filter.compatibleRenderers = RendererType.WEBGL\n *\n */\nexport enum RendererType\n{\n WEBGL = 0b01,\n WEBGPU = 0b10,\n BOTH = 0b11\n}\n\nexport type GpuPowerPreference = 'low-power' | 'high-performance';\n","/* eslint-disable no-new */\nimport EventEmitter from 'eventemitter3';\nimport { GlProgram } from '../../gl/shader/GlProgram';\nimport { BindGroup } from '../../gpu/shader/BindGroup';\nimport { GpuProgram } from '../../gpu/shader/GpuProgram';\nimport { RendererType } from '../../types';\nimport { UniformGroup } from './UniformGroup';\n\nimport type { GlProgramOptions } from '../../gl/shader/GlProgram';\nimport type { BindResource } from '../../gpu/shader/BindResource';\nimport type { GpuProgramOptions } from '../../gpu/shader/GpuProgram';\n\n/**\n * A record of {@link BindGroup}'s used by the shader.\n *\n * `Record`\n * @memberof rendering\n */\nexport type ShaderGroups = Record;\n\ninterface ShaderBase\n{\n /** The WebGL program used by the WebGL renderer. */\n glProgram?: GlProgram\n /** The WebGPU program used by the WebGPU renderer. */\n gpuProgram?: GpuProgram\n /**\n * A number that uses two bits on whether the shader is compatible with the WebGL renderer and/or the WebGPU renderer.\n * 0b00 - not compatible with either\n * 0b01 - compatible with WebGL\n * 0b10 - compatible with WebGPU\n * This is automatically set based on if a {@link GlProgram} or {@link GpuProgram} is provided.\n */\n compatibleRenderers?: number\n}\n\nexport interface GlShaderWith extends ShaderBase\n{\n /** The WebGL program used by the WebGL renderer. */\n glProgram: GlProgram\n}\n\nexport interface GpuShaderWith extends ShaderBase\n{\n /** The WebGPU program used by the WebGPU renderer. */\n gpuProgram: GpuProgram\n}\n\nexport interface ShaderWithGroupsDescriptor\n{\n /** A record of {@link BindGroup}'s used by the shader. */\n groups: ShaderGroups;\n /** an optional map of how to bind the groups. This is automatically generated by reading the WebGPU program */\n groupMap?: Record>;\n}\n\ninterface ShaderWithResourcesDescriptor\n{\n /**\n * A key value of uniform resources used by the shader.\n * Under the hood pixi will look at the provided shaders and figure out where\n * the resources are mapped. Its up to you to make sure the resource key\n * matches the uniform name in the webGPU program. WebGL is a little more forgiving!\n */\n resources?: Record;\n}\n\ninterface GroupsData\n{\n group: number\n binding: number\n name: string\n}\n\n/**\n * A descriptor for a shader\n * @memberof rendering\n */\nexport type ShaderWith = GlShaderWith | GpuShaderWith;\n\n/**\n * A descriptor for a shader with groups.\n * @memberof rendering\n */\nexport type ShaderWithGroups = ShaderWithGroupsDescriptor & ShaderWith;\nexport interface IShaderWithGroups extends ShaderWithGroupsDescriptor, ShaderBase {}\n\n/**\n * A descriptor for a shader with resources. This is an easier way to work with uniforms.\n * especially when you are not working with bind groups\n * @memberof rendering\n */\nexport type ShaderWithResources = ShaderWithResourcesDescriptor & ShaderWith;\nexport interface IShaderWithResources extends ShaderWithResourcesDescriptor, ShaderBase {}\n\nexport type ShaderDescriptor = ShaderWithGroups & ShaderWithResources;\n\ntype GlShaderFromWith = {\n gpu?: GpuProgramOptions,\n gl: GlProgramOptions\n};\ntype GpuShaderFromWith = {\n gpu: GpuProgramOptions,\n gl?: GlProgramOptions\n};\nexport type ShaderFromGroups = (GlShaderFromWith | GpuShaderFromWith) & Omit;\nexport type ShaderFromResources = (GlShaderFromWith | GpuShaderFromWith)\n& Omit;\n\n/**\n * The Shader class is an integral part of the PixiJS graphics pipeline.\n * Central to rendering in PixiJS are two key elements: A [shader] and a [geometry].\n * The shader incorporates a {@link GlProgram} for WebGL or a {@link GpuProgram} for WebGPU,\n * instructing the respective technology on how to render the geometry.\n *\n * The primary goal of the Shader class is to offer a unified interface compatible with both WebGL and WebGPU.\n * When constructing a shader, you need to provide both a WebGL program and a WebGPU program due to the distinctions\n * between the two rendering engines. If only one is provided, the shader won't function with the omitted renderer.\n *\n * Both WebGL and WebGPU utilize the same resource object when passed into the shader.\n * Post-creation, the shader's interface remains consistent across both WebGL and WebGPU.\n * The sole distinction lies in whether a glProgram or a gpuProgram is employed.\n *\n * Modifying shader uniforms, which can encompass:\n * - TextureSampler {@link TextureStyle}\n * - TextureSource {@link TextureSource}\n * - UniformsGroups {@link UniformGroup}\n * @example\n *\n * const shader = new Shader({\n * glProgram: glProgram,\n * gpuProgram: gpuProgram,\n * resources: {\n * uTexture: texture.source,\n * uSampler: texture.sampler,\n * uColor: [1, 0, 0, 1],\n * },\n * });\n *\n * // update the uniforms\n * shader.resources.uColor[1] = 1;\n * shader.resources.uTexture = texture2.source;\n * @class\n * @memberof rendering\n */\nexport class Shader extends EventEmitter<{'destroy': Shader}>\n{\n /** An instance of the GPU program used by the WebGPU renderer */\n public gpuProgram: GpuProgram;\n /** An instance of the GL program used by the WebGL renderer */\n public glProgram: GlProgram;\n /**\n * A number that uses two bits on whether the shader is compatible with the WebGL renderer and/or the WebGPU renderer.\n * 0b00 - not compatible with either\n * 0b01 - compatible with WebGL\n * 0b10 - compatible with WebGPU\n * This is automatically set based on if a {@link GlProgram} or {@link GpuProgram} is provided.\n */\n public readonly compatibleRenderers: number;\n /** */\n public groups: Record;\n /** A record of the resources used by the shader. */\n public resources: Record;\n /**\n * A record of the uniform groups and resources used by the shader.\n * This is used by WebGL renderer to sync uniform data.\n * @internal\n * @ignore\n */\n public _uniformBindMap: Record> = Object.create(null);\n private readonly _ownedBindGroups: BindGroup[] = [];\n\n /**\n * Fired after rendering finishes.\n * @event rendering.Shader#destroy\n */\n\n /**\n * There are two ways to create a shader.\n * one is to pass in resources which is a record of uniform groups and resources.\n * another is to pass in groups which is a record of {@link BindGroup}s.\n * this second method is really to make use of shared {@link BindGroup}s.\n * For most cases you will want to use resources as they are easier to work with.\n * USe Groups if you want to share {@link BindGroup}s between shaders.\n * you cannot mix and match - either use resources or groups.\n * @param {ShaderWithResourcesDescriptor} options - The options for the shader using ShaderWithResourcesDescriptor.\n */\n constructor(options: ShaderWithResources);\n constructor(options: ShaderWithGroups);\n constructor(options: ShaderDescriptor)\n {\n super();\n\n /* eslint-disable prefer-const */\n let {\n gpuProgram,\n glProgram,\n groups,\n resources,\n compatibleRenderers,\n groupMap\n } = options;\n /* eslint-enable prefer-const */\n\n this.gpuProgram = gpuProgram;\n this.glProgram = glProgram;\n\n if (compatibleRenderers === undefined)\n {\n compatibleRenderers = 0;\n\n if (gpuProgram)compatibleRenderers |= RendererType.WEBGPU;\n if (glProgram)compatibleRenderers |= RendererType.WEBGL;\n }\n\n this.compatibleRenderers = compatibleRenderers;\n\n const nameHash: Record = {};\n\n if (!resources && !groups)\n {\n resources = {};\n }\n\n if (resources && groups)\n {\n throw new Error('[Shader] Cannot have both resources and groups');\n }\n else if (!gpuProgram && groups && !groupMap)\n {\n throw new Error('[Shader] No group map or WebGPU shader provided - consider using resources instead.');\n }\n else if (!gpuProgram && groups && groupMap)\n {\n for (const i in groupMap)\n {\n for (const j in groupMap[i])\n {\n const uniformName = groupMap[i][j];\n\n nameHash[uniformName] = {\n group: i as unknown as number,\n binding: j as unknown as number,\n name: uniformName\n };\n }\n }\n }\n else if (gpuProgram && groups && !groupMap)\n {\n const groupData = gpuProgram.structsAndGroups.groups;\n\n groupMap = {};\n\n groupData.forEach((data) =>\n {\n groupMap[data.group] = groupMap[data.group] || {};\n groupMap[data.group][data.binding] = data.name;\n\n nameHash[data.name] = data;\n });\n }\n else if (resources)\n {\n if (!gpuProgram)\n {\n // build out a dummy bind group..\n groupMap = {};\n groups = {\n 99: new BindGroup(),\n };\n\n this._ownedBindGroups.push(groups[99]);\n\n let bindTick = 0;\n\n for (const i in resources)\n {\n // Yes i know this is a little strange, but wil line up the shaders neatly\n // basically we want to be driven by how webGPU does things.\n // so making a fake group will work and not affect gpu as it means no gpu shader was provided..\n nameHash[i] = { group: 99, binding: bindTick, name: i };\n\n groupMap[99] = groupMap[99] || {};\n groupMap[99][bindTick] = i;\n\n bindTick++;\n }\n }\n else\n {\n const groupData = gpuProgram.structsAndGroups.groups;\n\n groupMap = {};\n\n groupData.forEach((data) =>\n {\n groupMap[data.group] = groupMap[data.group] || {};\n groupMap[data.group][data.binding] = data.name;\n\n nameHash[data.name] = data;\n });\n }\n\n groups = {};\n\n for (const i in resources)\n {\n const name = i;\n let value = resources[i];\n\n if (!(value.source) && !(value as BindResource)._resourceType)\n {\n value = new UniformGroup(value);\n }\n\n const data = nameHash[name];\n\n if (data)\n {\n if (!groups[data.group])\n {\n groups[data.group] = new BindGroup();\n\n this._ownedBindGroups.push(groups[data.group]);\n }\n\n groups[data.group].setResource(value, data.binding);\n }\n }\n }\n\n this.groups = groups;\n this._uniformBindMap = groupMap;\n\n this.resources = this._buildResourceAccessor(groups, nameHash);\n }\n\n /**\n * Sometimes a resource group will be provided later (for example global uniforms)\n * In such cases, this method can be used to let the shader know about the group.\n * @param name - the name of the resource group\n * @param groupIndex - the index of the group (should match the webGPU shader group location)\n * @param bindIndex - the index of the bind point (should match the webGPU shader bind point)\n */\n public addResource(name: string, groupIndex: number, bindIndex: number): void\n {\n this._uniformBindMap[groupIndex] ||= {};\n\n this._uniformBindMap[groupIndex][bindIndex] ||= name;\n\n if (!this.groups[groupIndex])\n {\n this.groups[groupIndex] = new BindGroup();\n this._ownedBindGroups.push(this.groups[groupIndex]);\n }\n }\n\n private _buildResourceAccessor(groups: ShaderGroups, nameHash: Record)\n {\n const uniformsOut = {};\n\n for (const i in nameHash)\n {\n const data = nameHash[i];\n\n // add getter setter for uniforms\n Object.defineProperty(uniformsOut, data.name, {\n get()\n {\n return groups[data.group].getResource(data.binding);\n },\n set(value)\n {\n groups[data.group].setResource(value, data.binding);\n }\n });\n }\n\n return uniformsOut;\n }\n\n /**\n * Use to destroy the shader when its not longer needed.\n * It will destroy the resources and remove listeners.\n * @param destroyPrograms - if the programs should be destroyed as well.\n * Make sure its not being used by other shaders!\n */\n public destroy(destroyPrograms = false): void\n {\n this.emit('destroy', this);\n\n if (destroyPrograms)\n {\n this.gpuProgram?.destroy();\n this.glProgram?.destroy();\n }\n\n this.gpuProgram = null;\n this.glProgram = null;\n\n this.removeAllListeners();\n\n this._uniformBindMap = null;\n\n this._ownedBindGroups.forEach((bindGroup) =>\n {\n bindGroup.destroy();\n });\n\n (this._ownedBindGroups as null) = null;\n\n this.resources = null;\n this.groups = null;\n }\n\n /**\n * A short hand function to create a shader based of a vertex and fragment shader.\n * @param options\n * @returns A shiny new PixiJS shader!\n */\n public static from(options: ShaderFromGroups): Shader;\n public static from(options: ShaderFromResources): Shader;\n public static from(options: ShaderFromGroups & ShaderFromResources): Shader\n {\n const { gpu, gl, ...rest } = options;\n\n let gpuProgram: GpuProgram;\n let glProgram: GlProgram;\n\n if (gpu)\n {\n gpuProgram = GpuProgram.from(gpu);\n }\n\n if (gl)\n {\n glProgram = GlProgram.from(gl);\n }\n\n return new Shader({\n gpuProgram,\n glProgram,\n ...rest\n });\n }\n}\n","// TODO eventually we should not use this bit, but instead use the localUniformBit\n// have the MSDF bit be merged in with the localUniformBit\n\nexport const localUniformMSDFBit = {\n name: 'local-uniform-msdf-bit',\n vertex: {\n header: /* wgsl */`\n struct LocalUniforms {\n uColor:vec4,\n uTransformMatrix:mat3x3,\n uDistance: f32,\n uRound:f32,\n }\n\n @group(2) @binding(0) var localUniforms : LocalUniforms;\n `,\n main: /* wgsl */`\n vColor *= localUniforms.uColor;\n modelMatrix *= localUniforms.uTransformMatrix;\n `,\n end: /* wgsl */`\n if(localUniforms.uRound == 1)\n {\n vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);\n }\n `\n },\n fragment: {\n header: /* wgsl */`\n struct LocalUniforms {\n uColor:vec4,\n uTransformMatrix:mat3x3,\n uDistance: f32\n }\n\n @group(2) @binding(0) var localUniforms : LocalUniforms;\n `,\n main: /* wgsl */` \n outColor = vec4(calculateMSDFAlpha(outColor, localUniforms.uColor, localUniforms.uDistance));\n `\n\n }\n};\n\nexport const localUniformMSDFBitGl = {\n name: 'local-uniform-msdf-bit',\n vertex: {\n header: /* glsl */`\n uniform mat3 uTransformMatrix;\n uniform vec4 uColor;\n uniform float uRound;\n `,\n main: /* glsl */`\n vColor *= uColor;\n modelMatrix *= uTransformMatrix;\n `,\n end: /* glsl */`\n if(uRound == 1.)\n {\n gl_Position.xy = roundPixels(gl_Position.xy, uResolution);\n }\n `\n },\n fragment: {\n header: /* glsl */`\n uniform float uDistance;\n `,\n main: /* glsl */` \n outColor = vec4(calculateMSDFAlpha(outColor, vColor, uDistance));\n `\n\n }\n};\n","export const mSDFBit = {\n name: 'msdf-bit',\n fragment: {\n header: /* wgsl */`\n fn calculateMSDFAlpha(msdfColor:vec4, shapeColor:vec4, distance:f32) -> f32 {\n \n // MSDF\n var median = msdfColor.r + msdfColor.g + msdfColor.b -\n min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -\n max(msdfColor.r, max(msdfColor.g, msdfColor.b));\n \n // SDF\n median = min(median, msdfColor.a);\n\n var screenPxDistance = distance * (median - 0.5);\n var alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\n if (median < 0.01) {\n alpha = 0.0;\n } else if (median > 0.99) {\n alpha = 1.0;\n }\n\n // Gamma correction for coverage-like alpha\n var luma: f32 = dot(shapeColor.rgb, vec3(0.299, 0.587, 0.114));\n var gamma: f32 = mix(1.0, 1.0 / 2.2, luma);\n var coverage: f32 = pow(shapeColor.a * alpha, gamma);\n\n return coverage;\n \n }\n `,\n }\n\n};\n\nexport const mSDFBitGl = {\n name: 'msdf-bit',\n fragment: {\n header: /* glsl */`\n float calculateMSDFAlpha(vec4 msdfColor, vec4 shapeColor, float distance) {\n \n // MSDF\n float median = msdfColor.r + msdfColor.g + msdfColor.b -\n min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -\n max(msdfColor.r, max(msdfColor.g, msdfColor.b));\n \n // SDF\n median = min(median, msdfColor.a);\n \n float screenPxDistance = distance * (median - 0.5);\n float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\n \n if (median < 0.01) {\n alpha = 0.0;\n } else if (median > 0.99) {\n alpha = 1.0;\n }\n\n // Gamma correction for coverage-like alpha\n float luma = dot(shapeColor.rgb, vec3(0.299, 0.587, 0.114));\n float gamma = mix(1.0, 1.0 / 2.2, luma);\n float coverage = pow(shapeColor.a * alpha, gamma); \n \n return coverage;\n }\n `,\n }\n\n};\n","import { Matrix } from '../../../maths/matrix/Matrix';\nimport { getMaxTexturesPerBatch } from '../../../rendering/batcher/gl/utils/maxRecommendedTextures';\nimport {\n compileHighShaderGlProgram,\n compileHighShaderGpuProgram\n} from '../../../rendering/high-shader/compileHighShaderToProgram';\nimport { colorBit, colorBitGl } from '../../../rendering/high-shader/shader-bits/colorBit';\nimport {\n generateTextureBatchBit,\n generateTextureBatchBitGl\n} from '../../../rendering/high-shader/shader-bits/generateTextureBatchBit';\nimport { roundPixelsBit, roundPixelsBitGl } from '../../../rendering/high-shader/shader-bits/roundPixelsBit';\nimport { getBatchSamplersUniformGroup } from '../../../rendering/renderers/gl/shader/getBatchSamplersUniformGroup';\nimport { Shader } from '../../../rendering/renderers/shared/shader/Shader';\nimport { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup';\nimport { localUniformMSDFBit, localUniformMSDFBitGl } from './shader-bits/localUniformMSDFBit';\nimport { mSDFBit, mSDFBitGl } from './shader-bits/mSDFBit';\n\nimport type { GlProgram } from '../../../rendering/renderers/gl/shader/GlProgram';\nimport type { GpuProgram } from '../../../rendering/renderers/gpu/shader/GpuProgram';\n\nlet gpuProgram: GpuProgram;\nlet glProgram: GlProgram;\n\nexport class SdfShader extends Shader\n{\n constructor()\n {\n const uniforms = new UniformGroup({\n uColor: { value: new Float32Array([1, 1, 1, 1]), type: 'vec4' },\n uTransformMatrix: { value: new Matrix(), type: 'mat3x3' },\n uDistance: { value: 4, type: 'f32' },\n uRound: { value: 0, type: 'f32' },\n });\n\n const maxTextures = getMaxTexturesPerBatch();\n\n gpuProgram ??= compileHighShaderGpuProgram({\n name: 'sdf-shader',\n bits: [\n colorBit,\n generateTextureBatchBit(maxTextures),\n localUniformMSDFBit,\n mSDFBit,\n roundPixelsBit\n ]\n });\n\n glProgram ??= compileHighShaderGlProgram({\n name: 'sdf-shader',\n bits: [\n colorBitGl,\n generateTextureBatchBitGl(maxTextures),\n localUniformMSDFBitGl,\n mSDFBitGl,\n roundPixelsBitGl,\n ]\n });\n\n super({\n glProgram,\n gpuProgram,\n resources: {\n localUniforms: uniforms,\n batchSamplers: getBatchSamplersUniformGroup(maxTextures),\n }\n });\n }\n}\n","import EventEmitter from 'eventemitter3';\nimport { deprecation, v8_0_0 } from '../../utils/logging/deprecation';\n\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport type { FontMetrics } from '../text/canvas/CanvasTextMetrics';\n\n/** @memberof text */\nexport interface CharData\n{\n /** Unique id of character */\n id: number;\n /** x-offset to apply when rendering character */\n xOffset: number;\n /** y-offset to apply when rendering character. */\n yOffset: number;\n /** Advancement to apply to next character. */\n xAdvance: number;\n /** The kerning values for this character. */\n kerning: Record;\n /** The texture of the character. */\n texture?: Texture;\n}\n\n/**\n * The raw data of a character in a bitmap font.\n * @memberof text\n */\nexport interface RawCharData extends Omit\n{\n /** The page of the font texture that the character is on. */\n page: number;\n /** The x position of the character in the page. */\n x: number;\n /** The y position of the character in the page. */\n y: number;\n /** The width of the character in the page. */\n width: number;\n /** The height of the character in the page. */\n height: number;\n /** The letter of the character. */\n letter: string;\n}\n\n/**\n * The raw data of a bitmap font.\n * @memberof text\n */\nexport interface BitmapFontData\n{\n /** The offset of the font face from the baseline. */\n baseLineOffset: number;\n /** The map of characters by character code. */\n chars: Record;\n /** The map of base page textures (i.e., sheets of glyphs). */\n pages: {\n /** Unique id for bitmap texture */\n id: number;\n /** File name */\n file: string\n }[];\n /** The line-height of the font face in pixels. */\n lineHeight: number;\n /** The size of the font face in pixels. */\n fontSize: number;\n /** The name of the font face. */\n fontFamily: string;\n /** The range and type of the distance field for this font. */\n distanceField?: {\n /** Type of distance field */\n type: 'sdf' | 'msdf' | 'none';\n /** Range of the distance field in pixels */\n range: number;\n };\n}\n\ninterface BitmapFontEvents\n{\n destroy: [Type];\n}\n\n/**\n * An abstract representation of a bitmap font.\n * @memberof text\n */\nexport abstract class AbstractBitmapFont\n extends EventEmitter>\n implements Omit\n{\n /** The map of characters by character code. */\n public readonly chars: Record = Object.create(null);\n\n /**\n * The line-height of the font face in pixels.\n * @type {number}\n */\n public readonly lineHeight: BitmapFontData['lineHeight'] = 0;\n\n /**\n * The name of the font face\n * @type {string}\n */\n public readonly fontFamily: BitmapFontData['fontFamily'] = '';\n /** The metrics of the font face. */\n public readonly fontMetrics: FontMetrics = { fontSize: 0, ascent: 0, descent: 0 };\n /**\n * The offset of the font face from the baseline.\n * @type {number}\n */\n public readonly baseLineOffset: BitmapFontData['baseLineOffset'] = 0;\n /** The range and type of the distance field for this font. */\n public readonly distanceField: BitmapFontData['distanceField'] = { type: 'none', range: 0 };\n /** The map of base page textures (i.e., sheets of glyphs). */\n public readonly pages: { texture: Texture }[] = [];\n /** should the fill for this font be applied as a tint to the text. */\n public applyFillAsTint = true;\n\n /** The size of the font face in pixels. */\n public readonly baseMeasurementFontSize: number = 100;\n protected baseRenderedFontSize = 100;\n\n /**\n * The name of the font face.\n * @deprecated since 8.0.0 Use `fontFamily` instead.\n */\n public get font(): BitmapFontData['fontFamily']\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'BitmapFont.font is deprecated, please use BitmapFont.fontFamily instead.');\n // #endif\n\n return this.fontFamily;\n }\n\n /**\n * The map of base page textures (i.e., sheets of glyphs).\n * @deprecated since 8.0.0 Use `pages` instead.\n */\n public get pageTextures(): AbstractBitmapFont['pages']\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead.');\n // #endif\n\n return this.pages;\n }\n\n /**\n * The size of the font face in pixels.\n * @deprecated since 8.0.0 Use `fontMetrics.fontSize` instead.\n */\n public get size(): BitmapFontData['fontSize']\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'BitmapFont.size is deprecated, please use BitmapFont.fontMetrics.fontSize instead.');\n // #endif\n\n return this.fontMetrics.fontSize;\n }\n\n /**\n * The kind of distance field for this font or \"none\".\n * @deprecated since 8.0.0 Use `distanceField.type` instead.\n */\n public get distanceFieldRange(): NonNullable['range']\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'BitmapFont.distanceFieldRange is deprecated, please use BitmapFont.distanceField.range instead.');\n // #endif\n\n return this.distanceField.range;\n }\n\n /**\n * The range of the distance field in pixels.\n * @deprecated since 8.0.0 Use `distanceField.range` instead.\n */\n public get distanceFieldType(): NonNullable['type']\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'BitmapFont.distanceFieldType is deprecated, please use BitmapFont.distanceField.type instead.');\n // #endif\n\n return this.distanceField.type;\n }\n\n public destroy(destroyTextures = false): void\n {\n this.emit('destroy', this as unknown as FontType);\n\n this.removeAllListeners();\n\n for (const i in this.chars)\n {\n // texture may not exist if the char is \" \", \\n, \\r, or \\t.\n this.chars[i].texture?.destroy();\n }\n\n (this.chars as null) = null;\n\n if (destroyTextures)\n {\n this.pages.forEach((page) => page.texture.destroy(true));\n (this.pages as any) = null;\n }\n }\n}\n","/**\n * Processes the passed character set data and returns a flattened array of all the characters.\n *\n * Ignored because not directly exposed.\n * @ignore\n * @param {string | string[] | string[][] } chars\n * @returns {string[]} the flattened array of characters\n */\n\nexport function resolveCharacters(chars: string | (string | string[])[]): string[]\n{\n // Skip unexpected 'empty set' check at end\n if (chars === '')\n {\n return [];\n }\n\n // Split the chars string into individual characters\n if (typeof chars === 'string')\n {\n chars = [chars];\n }\n\n // Handle an array of characters+ranges\n const result: string[] = [];\n\n for (let i = 0, j = chars.length; i < j; i++)\n {\n const item = chars[i];\n\n // Handle range delimited by start/end chars\n if (Array.isArray(item))\n {\n if (item.length !== 2)\n {\n throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${item.length}.`);\n }\n if (item[0].length === 0 || item[1].length === 0)\n {\n throw new Error('[BitmapFont]: Invalid character delimiter.');\n }\n\n const startCode = item[0].charCodeAt(0);\n const endCode = item[1].charCodeAt(0);\n\n if (endCode < startCode)\n {\n throw new Error('[BitmapFont]: Invalid character range.');\n }\n\n for (let i = startCode, j = endCode; i <= j; i++)\n {\n result.push(String.fromCharCode(i));\n }\n }\n else\n {\n result.push(...Array.from(item));\n }\n }\n\n if (result.length === 0)\n {\n throw new Error('[BitmapFont]: Empty set when resolving characters.');\n }\n\n return result;\n}\n","import { Color } from '../../color/Color';\nimport { Rectangle } from '../../maths/shapes/Rectangle';\nimport { CanvasPool } from '../../rendering/renderers/shared/texture/CanvasPool';\nimport { ImageSource } from '../../rendering/renderers/shared/texture/sources/ImageSource';\nimport { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport { deprecation, v8_0_0 } from '../../utils/logging/deprecation';\nimport { CanvasTextMetrics } from '../text/canvas/CanvasTextMetrics';\nimport { fontStringFromTextStyle } from '../text/canvas/utils/fontStringFromTextStyle';\nimport { getCanvasFillStyle } from '../text/canvas/utils/getCanvasFillStyle';\nimport { TextStyle } from '../text/TextStyle';\nimport { AbstractBitmapFont } from './AbstractBitmapFont';\nimport { resolveCharacters } from './utils/resolveCharacters';\n\nimport type { ICanvasRenderingContext2D } from '../../environment/canvas/ICanvasRenderingContext2D';\nimport type { CanvasAndContext } from '../../rendering/renderers/shared/texture/CanvasPool';\nimport type { FontMetrics } from '../text/canvas/CanvasTextMetrics';\n\nexport interface DynamicBitmapFontOptions\n{\n style: TextStyle\n skipKerning?: boolean\n resolution?: number\n padding?: number\n overrideFill?: boolean\n overrideSize?: boolean\n textureSize?: number\n mipmap?: boolean\n}\n\n/**\n * A BitmapFont that generates its glyphs dynamically.\n * @memberof text\n * @ignore\n */\nexport class DynamicBitmapFont extends AbstractBitmapFont\n{\n public static defaultOptions: DynamicBitmapFontOptions = {\n textureSize: 512,\n style: new TextStyle(),\n mipmap: true,\n };\n /**\n * this is a resolution modifier for the font size..\n * texture resolution will also be used to scale texture according to its font size also\n */\n public resolution = 1;\n /** The pages of the font. */\n public override readonly pages: {canvasAndContext?: CanvasAndContext, texture: Texture}[] = [];\n\n private readonly _padding: number = 0;\n private readonly _measureCache: Record = Object.create(null);\n private _currentChars: string[] = [];\n private _currentX = 0;\n private _currentY = 0;\n private _currentPageIndex = -1;\n private readonly _style: TextStyle;\n private readonly _skipKerning: boolean = false;\n private readonly _textureSize: number;\n private readonly _mipmap: boolean;\n\n /**\n * @param options - The options for the dynamic bitmap font.\n */\n constructor(options: DynamicBitmapFontOptions)\n {\n super();\n\n const dynamicOptions = { ...DynamicBitmapFont.defaultOptions, ...options };\n\n this._textureSize = dynamicOptions.textureSize;\n this._mipmap = dynamicOptions.mipmap;\n\n const style = dynamicOptions.style.clone();\n\n if (dynamicOptions.overrideFill)\n {\n // assuming no shape fill..\n style._fill.color = 0xffffff;\n style._fill.alpha = 1;\n style._fill.texture = Texture.WHITE;\n style._fill.fill = null;\n }\n\n this.applyFillAsTint = dynamicOptions.overrideFill;\n\n const requestedFontSize = style.fontSize;\n\n // adjust font size to match the base measurement size\n style.fontSize = this.baseMeasurementFontSize;\n\n const font = fontStringFromTextStyle(style);\n\n if (dynamicOptions.overrideSize)\n {\n if (style._stroke)\n {\n // we want the stroke to fit the size of the requested text, so we need to scale it\n // accordingly (eg font size 20, with stroke 10 - stroke is 50% of size,\n // as dynamic font is size 100, the stroke should be adjusted to 50 to make it look right)\n style._stroke.width *= this.baseRenderedFontSize / requestedFontSize;\n }\n }\n else\n {\n style.fontSize = this.baseRenderedFontSize = requestedFontSize;\n }\n\n this._style = style;\n this._skipKerning = dynamicOptions.skipKerning ?? false;\n this.resolution = dynamicOptions.resolution ?? 1;\n this._padding = dynamicOptions.padding ?? 4;\n\n (this.fontMetrics as FontMetrics) = CanvasTextMetrics.measureFont(font);\n (this.lineHeight as number) = style.lineHeight || this.fontMetrics.fontSize || style.fontSize;\n }\n\n public ensureCharacters(chars: string): void\n {\n const charList = resolveCharacters(chars)\n .filter((char) => !this._currentChars.includes(char))\n .filter((char, index, self) => self.indexOf(char) === index);\n // filter returns..\n\n if (!charList.length) return;\n\n this._currentChars = [...this._currentChars, ...charList];\n\n let pageData;\n\n if (this._currentPageIndex === -1)\n {\n pageData = this._nextPage();\n }\n else\n {\n pageData = this.pages[this._currentPageIndex];\n }\n\n let { canvas, context } = pageData.canvasAndContext;\n let textureSource = pageData.texture.source;\n\n const style = this._style;\n\n let currentX = this._currentX;\n let currentY = this._currentY;\n\n const fontScale = this.baseRenderedFontSize / this.baseMeasurementFontSize;\n const padding = this._padding * fontScale;\n\n const widthScale = style.fontStyle === 'italic' ? 2 : 1;\n let maxCharHeight = 0;\n let skipTexture = false;\n\n for (let i = 0; i < charList.length; i++)\n {\n const char = charList[i];\n\n const metrics = CanvasTextMetrics.measureText(char, style, canvas, false);\n\n // override the line height.. we want this to be the glyps heigh\n // not the user specified one.\n metrics.lineHeight = metrics.height;\n\n const width = (widthScale * metrics.width) * fontScale;\n const height = (metrics.height) * fontScale;\n\n const paddedWidth = width + (padding * 2);\n const paddedHeight = height + (padding * 2);\n\n skipTexture = false;\n // don't let empty characters count towards the maxCharHeight\n if (char !== '\\n' && char !== '\\r' && char !== '\\t' && char !== ' ')\n {\n skipTexture = true;\n maxCharHeight = Math.ceil(Math.max(paddedHeight, maxCharHeight));// / 1.5;\n }\n\n if (currentX + paddedWidth > this._textureSize)\n {\n currentY += maxCharHeight;\n\n // reset the line x and height..\n maxCharHeight = paddedHeight;\n currentX = 0;\n\n if (currentY + maxCharHeight > this._textureSize)\n {\n textureSource.update();\n\n const pageData = this._nextPage();\n\n canvas = pageData.canvasAndContext.canvas;\n context = pageData.canvasAndContext.context;\n textureSource = pageData.texture.source;\n\n currentY = 0;\n }\n }\n\n const xAdvance = (width / fontScale)\n - (style.dropShadow?.distance ?? 0)\n - (style._stroke?.width ?? 0);\n\n // This is in coord space of the measurements.. not the texture\n this.chars[char] = {\n id: char.codePointAt(0),\n xOffset: -this._padding,\n yOffset: -this._padding,\n xAdvance,\n kerning: {},\n };\n\n if (skipTexture)\n {\n this._drawGlyph(\n context,\n metrics,\n currentX + padding,\n currentY + padding,\n fontScale,\n style,\n );\n\n const px = textureSource.width * fontScale;\n const py = textureSource.height * fontScale;\n\n const frame = new Rectangle(\n ((currentX) / px) * textureSource.width,\n ((currentY) / py) * textureSource.height,\n ((paddedWidth) / px) * textureSource.width,\n ((paddedHeight) / py) * textureSource.height,\n );\n\n this.chars[char].texture = new Texture({\n source: textureSource,\n frame,\n });\n\n currentX += Math.ceil(paddedWidth);\n }\n\n // now add it to the font data..\n }\n\n textureSource.update();\n\n this._currentX = currentX;\n this._currentY = currentY;\n\n // now apply kerning..\n this._skipKerning && this._applyKerning(charList, context);\n }\n\n /**\n * @deprecated since 8.0.0\n * The map of base page textures (i.e., sheets of glyphs).\n */\n public override get pageTextures(): DynamicBitmapFont['pages']\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead.');\n // #endif\n\n return this.pages;\n }\n\n private _applyKerning(newChars: string[], context: ICanvasRenderingContext2D): void\n {\n const measureCache = this._measureCache;\n\n for (let i = 0; i < newChars.length; i++)\n {\n const first = newChars[i];\n\n for (let j = 0; j < this._currentChars.length; j++)\n {\n // first go through new char being first\n const second = this._currentChars[j];\n\n let c1 = measureCache[first];\n\n if (!c1) c1 = measureCache[first] = context.measureText(first).width;\n\n let c2 = measureCache[second];\n\n if (!c2) c2 = measureCache[second] = context.measureText(second).width;\n\n let total = context.measureText(first + second).width;\n let amount = total - (c1 + c2);\n\n if (amount)\n {\n this.chars[first].kerning[second] = amount;\n }\n\n // then go through new char being second\n total = context.measureText(first + second).width;\n amount = total - (c1 + c2);\n\n if (amount)\n {\n this.chars[second].kerning[first] = amount;\n }\n }\n }\n }\n\n private _nextPage(): {canvasAndContext: CanvasAndContext, texture: Texture}\n {\n this._currentPageIndex++;\n\n const textureResolution = this.resolution;\n const canvasAndContext = CanvasPool.getOptimalCanvasAndContext(\n this._textureSize,\n this._textureSize,\n textureResolution\n );\n\n this._setupContext(canvasAndContext.context, this._style, textureResolution);\n\n const resolution = textureResolution * (this.baseRenderedFontSize / this.baseMeasurementFontSize);\n const texture = new Texture({\n source: new ImageSource({\n resource: canvasAndContext.canvas,\n resolution,\n alphaMode: 'premultiply-alpha-on-upload',\n autoGenerateMipmaps: this._mipmap,\n }),\n\n });\n\n const pageData = {\n canvasAndContext,\n texture,\n };\n\n this.pages[this._currentPageIndex] = pageData;\n\n return pageData;\n }\n\n // canvas style!\n private _setupContext(context: ICanvasRenderingContext2D, style: TextStyle, resolution: number): void\n {\n style.fontSize = this.baseRenderedFontSize;\n context.scale(resolution, resolution);\n context.font = fontStringFromTextStyle(style);\n style.fontSize = this.baseMeasurementFontSize;\n context.textBaseline = style.textBaseline;\n\n const stroke = style._stroke;\n const strokeThickness = stroke?.width ?? 0;\n\n if (stroke)\n {\n context.lineWidth = strokeThickness;\n context.lineJoin = stroke.join;\n context.miterLimit = stroke.miterLimit;\n\n // TODO prolly cache this??\n context.strokeStyle = getCanvasFillStyle(stroke, context);\n }\n\n if (style._fill)\n {\n // set canvas text styles\n context.fillStyle = getCanvasFillStyle(style._fill, context);\n }\n\n if (style.dropShadow)\n {\n const shadowOptions = style.dropShadow;\n const rgb = Color.shared.setValue(shadowOptions.color).toArray();\n\n const dropShadowBlur = shadowOptions.blur * resolution;\n const dropShadowDistance = shadowOptions.distance * resolution;\n\n context.shadowColor = `rgba(${rgb[0] * 255},${rgb[1] * 255},${rgb[2] * 255},${shadowOptions.alpha})`;\n context.shadowBlur = dropShadowBlur;\n context.shadowOffsetX = Math.cos(shadowOptions.angle) * dropShadowDistance;\n context.shadowOffsetY = Math.sin(shadowOptions.angle) * dropShadowDistance;\n }\n else\n {\n context.shadowColor = 'black';\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n }\n\n private _drawGlyph(\n context: ICanvasRenderingContext2D,\n metrics: CanvasTextMetrics,\n x: number,\n y: number,\n fontScale: number,\n style: TextStyle\n ): void\n {\n const char = metrics.text;\n const fontProperties = metrics.fontProperties;\n const stroke = style._stroke;\n\n const strokeThickness = (stroke?.width ?? 0) * fontScale;\n\n const tx = x + (strokeThickness / 2);\n const ty = y - (strokeThickness / 2);\n\n const descent = fontProperties.descent * fontScale;\n const lineHeight = metrics.lineHeight * fontScale;\n\n if (style.stroke && strokeThickness)\n {\n context.strokeText(char, tx, ty + lineHeight - descent);\n }\n\n if (style._fill)\n {\n context.fillText(char, tx, ty + lineHeight - descent);\n }\n }\n\n public override destroy(): void\n {\n super.destroy();\n\n for (let i = 0; i < this.pages.length; i++)\n {\n const { canvasAndContext, texture } = this.pages[i];\n\n // clear context.. this is the fastest way apparently!\n // eslint-disable-next-line no-self-assign\n canvasAndContext.canvas.width = canvasAndContext.canvas.width;\n\n CanvasPool.returnCanvasAndContext(canvasAndContext);\n texture.destroy(true);\n }\n\n (this.pages as null) = null;\n }\n}\n","import type { TextStyle } from '../../text/TextStyle';\nimport type { AbstractBitmapFont } from '../AbstractBitmapFont';\n\nexport interface BitmapTextLayoutData\n{\n width: number;\n height: number;\n scale: number;\n offsetY: number;\n lines: {\n width: number\n charPositions: number[],\n chars: string[],\n // / spaces: number\n spaceWidth: number\n spacesIndex: number[]\n }[];\n}\n\nexport function getBitmapTextLayout(chars: string[], style: TextStyle, font: AbstractBitmapFont): BitmapTextLayoutData\n{\n const layoutData: BitmapTextLayoutData = {\n width: 0,\n height: 0,\n offsetY: 0,\n scale: style.fontSize / font.baseMeasurementFontSize,\n lines: [{\n width: 0,\n charPositions: [] as number[],\n spaceWidth: 0,\n spacesIndex: [],\n chars: [],\n }]\n };\n\n layoutData.offsetY = font.baseLineOffset;\n\n let currentLine = layoutData.lines[0];\n\n let previousChar: string = null;\n let firstWord = true;\n // let spaceCount = 0;\n\n const currentWord = {\n spaceWord: false,\n width: 0,\n start: 0,\n index: 0, // use index to not modify the array as we use it a lot!\n positions: [] as number[],\n chars: [] as string[],\n };\n\n const nextWord = (word: typeof currentWord) =>\n {\n const start = currentLine.width;\n\n for (let j = 0; j < currentWord.index; j++)\n {\n const position = word.positions[j];\n\n currentLine.chars.push(word.chars[j]);\n currentLine.charPositions.push(position + start);\n }\n\n currentLine.width += word.width;\n\n firstWord = false;\n\n // reset the word..\n currentWord.width = 0;\n currentWord.index = 0;\n currentWord.chars.length = 0;\n\n // spaceCount = 0;\n };\n\n const nextLine = () =>\n {\n let index = currentLine.chars.length - 1;\n let lastChar = currentLine.chars[index];\n\n while (lastChar === ' ')\n {\n currentLine.width -= font.chars[lastChar].xAdvance;\n lastChar = currentLine.chars[--index];\n }\n\n layoutData.width = Math.max(layoutData.width, currentLine.width);\n\n currentLine = {\n width: 0,\n charPositions: [],\n chars: [],\n spaceWidth: 0,\n spacesIndex: [],\n };\n\n firstWord = true;\n layoutData.lines.push(currentLine);\n layoutData.height += font.lineHeight;\n };\n\n const scale = font.baseMeasurementFontSize / style.fontSize;\n\n const adjustedLetterSpacing = style.letterSpacing * scale;\n const adjustedWordWrapWidth = style.wordWrapWidth * scale;\n\n // loop an extra time to force a line break..\n for (let i = 0; i < chars.length + 1; i++)\n {\n let char: string;\n\n const isEnd = i === chars.length;\n\n if (!isEnd)\n {\n char = chars[i];\n }\n\n const charData = font.chars[char] || font.chars[' '];\n\n const isSpace = (/(?:\\s)/).test(char);\n const isWordBreak = isSpace || char === '\\r' || char === '\\n' || isEnd;\n\n // spaceCount++;\n // wasSpace = isSpace;\n\n if (isWordBreak)\n {\n const addWordToNextLine = !firstWord\n && style.wordWrap\n && (currentLine.width + currentWord.width - adjustedLetterSpacing) > adjustedWordWrapWidth;\n\n if (addWordToNextLine)\n {\n nextLine();\n\n nextWord(currentWord);\n\n if (!isEnd)\n {\n currentLine.charPositions.push(0);\n }\n }\n else\n {\n currentWord.start = currentLine.width;\n\n nextWord(currentWord);\n\n if (!isEnd)\n {\n currentLine.charPositions.push(0);\n }\n }\n\n if (char === '\\r' || char === '\\n')\n {\n if (currentLine.width !== 0)\n {\n nextLine();\n }\n }\n else if (!isEnd)\n {\n const spaceWidth = charData.xAdvance + (charData.kerning[previousChar] || 0) + adjustedLetterSpacing;\n\n currentLine.width += spaceWidth;\n\n currentLine.spaceWidth = spaceWidth;\n currentLine.spacesIndex.push(currentLine.charPositions.length);\n currentLine.chars.push(char);\n\n // spaceCount++;\n }\n }\n else\n {\n const kerning = charData.kerning[previousChar] || 0;\n\n const nextCharWidth = charData.xAdvance + kerning + adjustedLetterSpacing;\n\n currentWord.positions[currentWord.index++] = currentWord.width + kerning;\n currentWord.chars.push(char);\n\n currentWord.width += nextCharWidth;\n }\n\n previousChar = char;\n // lastChar = char;\n }\n\n nextLine();\n\n if (style.align === 'center')\n {\n alignCenter(layoutData);\n }\n else if (style.align === 'right')\n {\n alignRight(layoutData);\n }\n else if (style.align === 'justify')\n {\n alignJustify(layoutData);\n }\n\n return layoutData;\n}\n\nfunction alignCenter(measurementData: BitmapTextLayoutData)\n{\n for (let i = 0; i < measurementData.lines.length; i++)\n {\n const line = measurementData.lines[i];\n const offset = ((measurementData.width / 2) - (line.width / 2));\n\n for (let j = 0; j < line.charPositions.length; j++)\n {\n line.charPositions[j] += offset;\n }\n }\n}\n\nfunction alignRight(measurementData: BitmapTextLayoutData)\n{\n for (let i = 0; i < measurementData.lines.length; i++)\n {\n const line = measurementData.lines[i];\n const offset = ((measurementData.width) - (line.width));\n\n for (let j = 0; j < line.charPositions.length; j++)\n {\n line.charPositions[j] += offset;\n }\n }\n}\n\nfunction alignJustify(measurementData: BitmapTextLayoutData)\n{\n const width = measurementData.width;\n\n for (let i = 0; i < measurementData.lines.length; i++)\n {\n const line = measurementData.lines[i];\n\n let indy = 0;\n let spaceIndex = line.spacesIndex[indy++];\n\n let offset = 0;\n\n const totalSpaces = line.spacesIndex.length;\n\n const newSpaceWidth = (width - line.width) / totalSpaces;\n\n const spaceWidth = newSpaceWidth;\n\n for (let j = 0; j < line.charPositions.length; j++)\n {\n if (j === spaceIndex)\n {\n spaceIndex = line.spacesIndex[indy++];\n\n offset += spaceWidth;\n }\n\n line.charPositions[j] += offset;\n }\n }\n}\n","import { Cache } from '../../assets/cache/Cache';\nimport { deprecation, v8_0_0 } from '../../utils/logging/deprecation';\nimport { warn } from '../../utils/logging/warn';\nimport { TextStyle } from '../text/TextStyle';\nimport { DynamicBitmapFont } from './DynamicBitmapFont';\nimport { getBitmapTextLayout } from './utils/getBitmapTextLayout';\nimport { resolveCharacters } from './utils/resolveCharacters';\n\nimport type { TextStyleOptions } from '../text/TextStyle';\nimport type { BitmapFont } from './BitmapFont';\nimport type { BitmapTextLayoutData } from './utils/getBitmapTextLayout';\n\nlet fontCount = 0;\n\n/**\n *\n * The options for installing a new BitmapFont. Once installed the font will be available for use in the BitmapText.\n * It can be accessed by the `fontFamily` property of the TextStyle.\n *\n * Install a new BitmapFont will create the characters provided for the font and store them in the cache.\n * But don't worry, if a character is requested that hasn't been generated yet, it will be created on the fly.\n * @memberof text\n */\nexport interface BitmapFontInstallOptions\n{\n /** the name of the font, this will be the name you use in the fontFamily of text style to access this font */\n name?: string;\n /**\n * Characters included in the font set. You can also use ranges.\n * For example, `[['a', 'z'], ['A', 'Z'], \"!@#$%^&*()~{}[] \"]`.\n * Don't forget to include spaces ' ' in your character set!\n * @default BitmapFont.ALPHANUMERIC\n */\n chars?: string | (string | string[])[];\n /**\n * Render resolution for glyphs.\n * @default 1\n */\n resolution?: number;\n /**\n * Padding between glyphs on texture atlas. Lower values could mean more visual artifacts\n * and bleeding from other glyphs, larger values increase the space required on the texture.\n * @default 4\n */\n padding?: number;\n /**\n * Skip generation of kerning information for the BitmapFont.\n * If true, this could potentially increase the performance, but may impact the rendered text appearance.\n * @default false\n */\n skipKerning?: boolean;\n /** Style options to render with BitmapFont. */\n style?: TextStyle | TextStyleOptions;\n}\n\n/**\n * The BitmapFontManager is a helper that exists to install and uninstall fonts\n * into the cache for BitmapText objects.\n * @memberof text\n * @name BitmapFontManager\n * @example\n * import { BitmapFontManager, BitmapText } from 'pixi.js';\n *\n * BitmapFontManager.install({\n * name: 'TitleFont',\n * style: {}\n * });\n *\n * const title = new BitmapText({ text: 'This is the title', style: { fontFamily: 'TitleFont' }});\n */\nclass BitmapFontManagerClass\n{\n /**\n * This character set includes all the letters in the alphabet (both lower- and upper- case).\n * @type {string[][]}\n * @example\n * BitmapFont.from('ExampleFont', style, { chars: BitmapFont.ALPHA })\n */\n public readonly ALPHA = [['a', 'z'], ['A', 'Z'], ' '];\n\n /**\n * This character set includes all decimal digits (from 0 to 9).\n * @type {string[][]}\n * @example\n * BitmapFont.from('ExampleFont', style, { chars: BitmapFont.NUMERIC })\n */\n public readonly NUMERIC = [['0', '9']];\n\n /**\n * This character set is the union of `BitmapFont.ALPHA` and `BitmapFont.NUMERIC`.\n * @type {string[][]}\n */\n public readonly ALPHANUMERIC = [['a', 'z'], ['A', 'Z'], ['0', '9'], ' '];\n\n /**\n * This character set consists of all the ASCII table.\n * @member {string[][]}\n * @see http://www.asciitable.com/\n */\n public readonly ASCII = [[' ', '~']];\n\n /** Default options for installing a new BitmapFont. */\n public defaultOptions: Omit = {\n chars: this.ALPHANUMERIC,\n resolution: 1,\n padding: 4,\n skipKerning: false,\n };\n\n /**\n * Get a font for the specified text and style.\n * @param text - The text to get the font for\n * @param style - The style to use\n */\n public getFont(text: string, style: TextStyle): BitmapFont\n {\n let fontFamilyKey = `${style.fontFamily as string}-bitmap`;\n let overrideFill = true;\n\n // assuming there is no texture we can use a tint!\n if (style._fill.fill && !style._stroke)\n {\n fontFamilyKey += style._fill.fill.styleKey;\n overrideFill = false;\n }\n else if (style._stroke || style.dropShadow)\n {\n // if there is a stoke, we need to use the style key as this the font generated cannot be tinted\n // due to the fact the font has at least two colors.\n let key = style.styleKey;\n\n // remove the font size..\n key = key.substring(0, key.lastIndexOf('-'));\n\n fontFamilyKey = `${key}-bitmap`;\n overrideFill = false;\n }\n\n // first get us the the right font...\n if (!Cache.has(fontFamilyKey))\n {\n const fnt = new DynamicBitmapFont({\n style,\n overrideFill,\n overrideSize: true,\n ...this.defaultOptions,\n });\n\n fontCount++;\n\n // warn users if they have created too many dynamic fonts\n if (fontCount > 50)\n {\n // eslint-disable-next-line max-len\n warn('BitmapText', `You have dynamically created ${fontCount} bitmap fonts, this can be inefficient. Try pre installing your font styles using \\`BitmapFont.install({name:\"style1\", style})\\``);\n }\n\n fnt.once('destroy', () =>\n {\n fontCount--;\n Cache.remove(fontFamilyKey);\n });\n\n Cache.set(\n fontFamilyKey as string,\n fnt\n );\n }\n\n const dynamicFont = Cache.get(fontFamilyKey);\n\n (dynamicFont as DynamicBitmapFont).ensureCharacters?.(text);\n\n return dynamicFont;\n }\n\n /**\n * Get the layout of a text for the specified style.\n * @param text - The text to get the layout for\n * @param style - The style to use\n */\n public getLayout(text: string, style: TextStyle): BitmapTextLayoutData\n {\n const bitmapFont = this.getFont(text, style);\n\n return getBitmapTextLayout([...text], style, bitmapFont);\n }\n\n /**\n * Measure the text using the specified style.\n * @param text - The text to measure\n * @param style - The style to use\n */\n public measureText(text: string, style: TextStyle): { width: number; height: number; scale: number; offsetY: number }\n {\n return this.getLayout(text, style);\n }\n\n /**\n * Generates a bitmap-font for the given style and character set\n * @param options - Setup options for font generation.\n * @returns Font generated by style options.\n * @example\n * import { BitmapFontManager, BitmapText } from 'pixi.js';\n *\n * BitmapFontManager.install('TitleFont', {\n * fontFamily: 'Arial',\n * fontSize: 12,\n * strokeThickness: 2,\n * fill: 'purple',\n * });\n *\n * const title = new BitmapText({ text: 'This is the title', fontFamily: 'TitleFont' });\n */\n public install(options: BitmapFontInstallOptions): BitmapFont;\n /** @deprecated since 7.0.0 */\n public install(name: string, style?: TextStyle | TextStyleOptions, options?: BitmapFontInstallOptions): BitmapFont;\n // eslint-disable-next-line max-len\n public install(...args: [string | BitmapFontInstallOptions, (TextStyle | TextStyleOptions)?, BitmapFontInstallOptions?]): BitmapFont\n {\n let options = args[0] as BitmapFontInstallOptions;\n\n if (typeof options === 'string')\n {\n options = {\n name: options,\n style: args[1],\n chars: args[2]?.chars,\n resolution: args[2]?.resolution,\n padding: args[2]?.padding,\n skipKerning: args[2]?.skipKerning,\n } as BitmapFontInstallOptions;\n\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'BitmapFontManager.install(name, style, options) is deprecated, use BitmapFontManager.install({name, style, ...options})');\n // #endif\n }\n\n const name = options?.name;\n\n if (!name)\n {\n throw new Error('[BitmapFontManager] Property `name` is required.');\n }\n\n options = { ...this.defaultOptions, ...options };\n\n const textStyle = options.style;\n\n const style = textStyle instanceof TextStyle ? textStyle : new TextStyle(textStyle);\n const overrideFill = style._fill.fill !== null && style._fill.fill !== undefined;\n const font = new DynamicBitmapFont({\n style,\n overrideFill,\n skipKerning: options.skipKerning,\n padding: options.padding,\n resolution: options.resolution,\n overrideSize: false\n });\n\n const flatChars = resolveCharacters(options.chars);\n\n font.ensureCharacters(flatChars.join(''));\n\n Cache.set(`${name}-bitmap`, font);\n\n font.once('destroy', () => Cache.remove(`${name}-bitmap`));\n\n return font;\n }\n\n /**\n * Uninstalls a bitmap font from the cache.\n * @param {string} name - The name of the bitmap font to uninstall.\n */\n public uninstall(name: string)\n {\n const cacheKey = `${name}-bitmap`;\n const font = Cache.get(cacheKey);\n\n if (font)\n {\n Cache.remove(cacheKey);\n font.destroy();\n }\n }\n}\n\nexport const BitmapFontManager = new BitmapFontManagerClass();\n","import { Cache } from '../../assets/cache/Cache';\nimport { ExtensionType } from '../../extensions/Extensions';\nimport { BigPool } from '../../utils/pool/PoolGroup';\nimport { Graphics } from '../graphics/shared/Graphics';\nimport { SdfShader } from '../text/sdfShader/SdfShader';\nimport { BitmapFontManager } from './BitmapFontManager';\nimport { getBitmapTextLayout } from './utils/getBitmapTextLayout';\n\nimport type { InstructionSet } from '../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { RenderPipe } from '../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Renderable } from '../../rendering/renderers/shared/Renderable';\nimport type { Renderer } from '../../rendering/renderers/types';\nimport type { PoolItem } from '../../utils/pool/Pool';\nimport type { BitmapText } from './BitmapText';\n\nexport class BitmapTextPipe implements RenderPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'bitmapText',\n } as const;\n\n private _renderer: Renderer;\n private _gpuBitmapText: Record = {};\n // private _sdfShader: SdfShader;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public validateRenderable(bitmapText: BitmapText): boolean\n {\n const graphicsRenderable = this._getGpuBitmapText(bitmapText);\n\n if (bitmapText._didTextUpdate)\n {\n bitmapText._didTextUpdate = false;\n\n this._updateContext(bitmapText, graphicsRenderable);\n }\n\n return this._renderer.renderPipes.graphics.validateRenderable(graphicsRenderable);\n\n // TODO - need to shift all the verts in the graphicsData to the new anchor\n\n // update the anchor...\n }\n\n public addRenderable(bitmapText: BitmapText, instructionSet: InstructionSet)\n {\n const graphicsRenderable = this._getGpuBitmapText(bitmapText);\n\n // sync..\n syncWithProxy(bitmapText, graphicsRenderable);\n\n if (bitmapText._didTextUpdate)\n {\n bitmapText._didTextUpdate = false;\n\n this._updateContext(bitmapText, graphicsRenderable);\n }\n\n this._renderer.renderPipes.graphics.addRenderable(graphicsRenderable, instructionSet);\n\n if (graphicsRenderable.context.customShader)\n {\n this._updateDistanceField(bitmapText);\n }\n }\n\n public destroyRenderable(bitmapText: BitmapText)\n {\n this._destroyRenderableByUid(bitmapText.uid);\n }\n\n private _destroyRenderableByUid(renderableUid: number)\n {\n const context = this._gpuBitmapText[renderableUid].context;\n\n if (context.customShader)\n {\n BigPool.return(context.customShader as PoolItem);\n\n context.customShader = null;\n }\n\n BigPool.return(this._gpuBitmapText[renderableUid] as PoolItem);\n this._gpuBitmapText[renderableUid] = null;\n }\n\n public updateRenderable(bitmapText: BitmapText)\n {\n const graphicsRenderable = this._getGpuBitmapText(bitmapText);\n\n // sync..\n syncWithProxy(bitmapText, graphicsRenderable);\n\n this._renderer.renderPipes.graphics.updateRenderable(graphicsRenderable);\n\n if (graphicsRenderable.context.customShader)\n {\n this._updateDistanceField(bitmapText);\n }\n }\n\n private _updateContext(bitmapText: BitmapText, proxyGraphics: Graphics)\n {\n const { context } = proxyGraphics;\n\n const bitmapFont = BitmapFontManager.getFont(bitmapText.text, bitmapText._style);\n\n context.clear();\n\n if (bitmapFont.distanceField.type !== 'none')\n {\n if (!context.customShader)\n {\n context.customShader = BigPool.get(SdfShader);\n }\n }\n\n const chars = Array.from(bitmapText.text);\n const style = bitmapText._style;\n\n let currentY = bitmapFont.baseLineOffset;\n\n // measure our text...\n const bitmapTextLayout = getBitmapTextLayout(chars, style, bitmapFont);\n\n let index = 0;\n\n const padding = style.padding;\n const scale = bitmapTextLayout.scale;\n\n let tx = bitmapTextLayout.width;\n let ty = bitmapTextLayout.height + bitmapTextLayout.offsetY;\n\n if (style._stroke)\n {\n tx += style._stroke.width / scale;\n ty += style._stroke.width / scale;\n }\n\n context\n .translate((-bitmapText._anchor._x * tx) - padding, (-bitmapText._anchor._y * ty) - padding)\n .scale(scale, scale);\n\n const tint = bitmapFont.applyFillAsTint ? style._fill.color : 0xFFFFFF;\n\n for (let i = 0; i < bitmapTextLayout.lines.length; i++)\n {\n const line = bitmapTextLayout.lines[i];\n\n for (let j = 0; j < line.charPositions.length; j++)\n {\n const char = chars[index++];\n\n const charData = bitmapFont.chars[char];\n\n if (charData?.texture)\n {\n context.texture(\n charData.texture,\n tint ? tint : 'black',\n Math.round(line.charPositions[j] + charData.xOffset),\n Math.round(currentY + charData.yOffset),\n );\n }\n }\n\n currentY += bitmapFont.lineHeight;\n }\n }\n\n private _getGpuBitmapText(bitmapText: BitmapText)\n {\n return this._gpuBitmapText[bitmapText.uid] || this.initGpuText(bitmapText);\n }\n\n public initGpuText(bitmapText: BitmapText)\n {\n // TODO we could keep a bunch of contexts around and reuse one that hav the same style!\n const proxyRenderable = BigPool.get(Graphics);\n\n this._gpuBitmapText[bitmapText.uid] = proxyRenderable;\n\n this._updateContext(bitmapText, proxyRenderable);\n\n bitmapText.on('destroyed', () =>\n {\n this.destroyRenderable(bitmapText);\n });\n\n return this._gpuBitmapText[bitmapText.uid];\n }\n\n private _updateDistanceField(bitmapText: BitmapText)\n {\n const context = this._getGpuBitmapText(bitmapText).context;\n\n const fontFamily = bitmapText._style.fontFamily as string;\n const dynamicFont = Cache.get(`${fontFamily as string}-bitmap`);\n\n // Inject the shader code with the correct value\n const { a, b, c, d } = bitmapText.groupTransform;\n\n const dx = Math.sqrt((a * a) + (b * b));\n const dy = Math.sqrt((c * c) + (d * d));\n const worldScale = (Math.abs(dx) + Math.abs(dy)) / 2;\n\n const fontScale = dynamicFont.baseRenderedFontSize / bitmapText._style.fontSize;\n\n const distance = worldScale * dynamicFont.distanceField.range * (1 / fontScale);\n\n context.customShader.resources.localUniforms.uniforms.uDistance = distance;\n }\n\n public destroy()\n {\n for (const uid in this._gpuBitmapText)\n {\n this._destroyRenderableByUid(uid as unknown as number);\n }\n\n this._gpuBitmapText = null;\n\n this._renderer = null;\n }\n}\n\nfunction syncWithProxy(container: Renderable, proxy: Renderable)\n{\n proxy.groupTransform = container.groupTransform;\n proxy.groupColorAlpha = container.groupColorAlpha;\n proxy.groupColor = container.groupColor;\n proxy.groupBlendMode = container.groupBlendMode;\n proxy.globalDisplayStatus = container.globalDisplayStatus;\n proxy.groupTransform = container.groupTransform;\n proxy.localDisplayStatus = container.localDisplayStatus;\n proxy.groupAlpha = container.groupAlpha;\n proxy._roundPixels = container._roundPixels;\n}\n","import { extensions } from '../../extensions/Extensions';\nimport { BitmapTextPipe } from './BitmapTextPipe';\n\nextensions.add(BitmapTextPipe);\n","import { ExtensionType } from '../../extensions/Extensions';\nimport { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport { updateQuadBounds } from '../../utils/data/updateQuadBounds';\nimport { BigPool } from '../../utils/pool/PoolGroup';\nimport { BatchableSprite } from '../sprite/BatchableSprite';\n\nimport type { RenderPipe } from '../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../../rendering/renderers/types';\nimport type { HTMLText } from './HTMLText';\nimport type { HTMLTextStyle } from './HtmlTextStyle';\n\nexport class HTMLTextPipe implements RenderPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'htmlText',\n } as const;\n\n private _renderer: Renderer;\n\n private _gpuText: Record = Object.create(null);\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n this._renderer.runners.resolutionChange.add(this);\n }\n\n public resolutionChange()\n {\n for (const i in this._gpuText)\n {\n const gpuText = this._gpuText[i];\n const text = gpuText.batchableSprite.renderable as HTMLText;\n\n if (text._autoResolution)\n {\n text._resolution = this._renderer.resolution;\n text.onViewUpdate();\n }\n }\n }\n\n public validateRenderable(htmlText: HTMLText): boolean\n {\n const gpuText = this._getGpuText(htmlText);\n\n const newKey = htmlText._getKey();\n\n if (gpuText.textureNeedsUploading)\n {\n gpuText.textureNeedsUploading = false;\n\n return true;\n }\n\n if (gpuText.currentKey !== newKey)\n {\n // TODO - could look into optimising this a tad!\n // if its a single texture, then we could just swap it?\n // same for CanvasText..\n return true;\n }\n\n return false;\n }\n\n public addRenderable(htmlText: HTMLText)\n {\n const gpuText = this._getGpuText(htmlText);\n\n const batchableSprite = gpuText.batchableSprite;\n\n if (htmlText._didTextUpdate)\n {\n this._updateText(htmlText);\n }\n\n this._renderer.renderPipes.batch.addToBatch(batchableSprite);\n }\n\n public updateRenderable(htmlText: HTMLText)\n {\n const gpuText = this._getGpuText(htmlText);\n const batchableSprite = gpuText.batchableSprite;\n\n if (htmlText._didTextUpdate)\n {\n this._updateText(htmlText);\n }\n\n batchableSprite.batcher.updateElement(batchableSprite);\n }\n\n public destroyRenderable(htmlText: HTMLText)\n {\n this._destroyRenderableById(htmlText.uid);\n }\n\n private _destroyRenderableById(htmlTextUid: number)\n {\n const gpuText = this._gpuText[htmlTextUid];\n\n this._renderer.htmlText.decreaseReferenceCount(gpuText.currentKey);\n\n BigPool.return(gpuText.batchableSprite);\n\n this._gpuText[htmlTextUid] = null;\n }\n\n private _updateText(htmlText: HTMLText)\n {\n const newKey = htmlText._getKey();\n const gpuText = this._getGpuText(htmlText);\n const batchableSprite = gpuText.batchableSprite;\n\n if (gpuText.currentKey !== newKey)\n {\n this._updateGpuText(htmlText).catch((e) =>\n {\n console.error(e);\n });\n }\n\n htmlText._didTextUpdate = false;\n\n const padding = htmlText._style.padding;\n\n updateQuadBounds(batchableSprite.bounds, htmlText._anchor, batchableSprite.texture, padding);\n }\n\n private async _updateGpuText(htmlText: HTMLText)\n {\n htmlText._didTextUpdate = false;\n\n const gpuText = this._getGpuText(htmlText);\n\n if (gpuText.generatingTexture) return;\n\n const newKey = htmlText._getKey();\n\n this._renderer.htmlText.decreaseReferenceCount(gpuText.currentKey);\n\n gpuText.generatingTexture = true;\n\n gpuText.currentKey = newKey;\n\n const resolution = htmlText.resolution ?? this._renderer.resolution;\n\n const texture = await this._renderer.htmlText.getManagedTexture(\n htmlText.text,\n resolution,\n htmlText._style as HTMLTextStyle,\n htmlText._getKey()\n );\n\n const batchableSprite = gpuText.batchableSprite;\n\n batchableSprite.texture = gpuText.texture = texture;\n\n gpuText.generatingTexture = false;\n\n gpuText.textureNeedsUploading = true;\n htmlText.onViewUpdate();\n\n const padding = htmlText._style.padding;\n\n updateQuadBounds(batchableSprite.bounds, htmlText._anchor, batchableSprite.texture, padding);\n }\n\n private _getGpuText(htmlText: HTMLText)\n {\n return this._gpuText[htmlText.uid] || this.initGpuText(htmlText);\n }\n\n public initGpuText(htmlText: HTMLText)\n {\n const gpuTextData: HTMLTextPipe['_gpuText'][number] = {\n texture: Texture.EMPTY,\n currentKey: '--',\n batchableSprite: BigPool.get(BatchableSprite),\n textureNeedsUploading: false,\n generatingTexture: false,\n };\n\n const batchableSprite = gpuTextData.batchableSprite;\n\n batchableSprite.renderable = htmlText;\n batchableSprite.texture = Texture.EMPTY;\n batchableSprite.bounds = { minX: 0, maxX: 1, minY: 0, maxY: 0 };\n batchableSprite.roundPixels = (this._renderer._roundPixels | htmlText._roundPixels) as 0 | 1;\n\n htmlText._resolution = htmlText._autoResolution ? this._renderer.resolution : htmlText.resolution;\n this._gpuText[htmlText.uid] = gpuTextData;\n // TODO perhaps manage this outside this pipe? (a bit like how we update / add)\n htmlText.on('destroyed', () =>\n {\n this.destroyRenderable(htmlText);\n });\n\n return gpuTextData;\n }\n\n public destroy()\n {\n for (const i in this._gpuText)\n {\n this._destroyRenderableById(i as unknown as number);\n }\n\n this._gpuText = null;\n this._renderer = null;\n }\n}\n\n","import { DOMAdapter } from '../../environment/adapter';\n\nexport function isSafari(): boolean\n{\n const { userAgent } = DOMAdapter.get().getNavigator();\n\n return (/^((?!chrome|android).)*safari/i).test(userAgent);\n}\n","import type { CanvasAndContext } from '../../rendering/renderers/shared/texture/CanvasPool';\n\nexport const nssvg = 'http://www.w3.org/2000/svg';\nexport const nsxhtml = 'http://www.w3.org/1999/xhtml';\n\nexport class HTMLTextRenderData\n{\n public svgRoot = document.createElementNS(nssvg, 'svg');\n public foreignObject = document.createElementNS(nssvg, 'foreignObject');\n public domElement = document.createElementNS(nsxhtml, 'div');\n public styleElement = document.createElementNS(nsxhtml, 'style');\n public image = new Image();\n public canvasAndContext?: CanvasAndContext;\n\n constructor()\n {\n const { foreignObject, svgRoot, styleElement, domElement } = this;\n // Arbitrary max size\n\n foreignObject.setAttribute('width', '10000');\n foreignObject.setAttribute('height', '10000');\n foreignObject.style.overflow = 'hidden';\n\n svgRoot.appendChild(foreignObject);\n\n foreignObject.appendChild(styleElement);\n foreignObject.appendChild(domElement);\n }\n}\n","import { Color } from '../../../color/Color';\n\nimport type { ConvertedStrokeStyle } from '../../graphics/shared/FillTypes';\nimport type { TextStyle } from '../../text/TextStyle';\nimport type { HTMLTextStyle, HTMLTextStyleOptions } from '../HtmlTextStyle';\n\n/**\n * Internally converts all of the style properties into CSS equivalents.\n * @param style\n * @returns The CSS style string, for setting `style` property of root HTMLElement.\n */\nexport function textStyleToCSS(style: HTMLTextStyle): string\n{\n const stroke = style._stroke;\n const fill = style._fill;\n\n const cssStyleString = [\n `color: ${Color.shared.setValue(fill.color).toHex()}`,\n `font-size: ${(style.fontSize as number)}px`,\n `font-family: ${style.fontFamily}`,\n `font-weight: ${style.fontWeight}`,\n `font-style: ${style.fontStyle}`,\n `font-variant: ${style.fontVariant}`,\n `letter-spacing: ${style.letterSpacing}px`,\n `text-align: ${style.align}`,\n `padding: ${style.padding}px`,\n `white-space: ${(style.whiteSpace === 'pre' && style.wordWrap) ? 'pre-wrap' : style.whiteSpace}`,\n ...style.lineHeight ? [`line-height: ${style.lineHeight}px`] : [],\n ...style.wordWrap ? [\n `word-wrap: ${style.breakWords ? 'break-all' : 'break-word'}`,\n `max-width: ${style.wordWrapWidth}px`\n ] : [],\n ...stroke ? [strokeToCSS(stroke)] : [],\n ...style.dropShadow ? [dropShadowToCSS(style.dropShadow)] : [],\n ...style.cssOverrides,\n ].join(';');\n\n const cssStyles = [`div { ${cssStyleString} }`];\n\n tagStyleToCSS(style.tagStyles, cssStyles);\n\n return cssStyles.join(' ');\n}\n\nfunction dropShadowToCSS(dropShadowStyle: TextStyle['dropShadow']): string\n{\n const color = Color.shared.setValue(dropShadowStyle.color).setAlpha(dropShadowStyle.alpha).toHexa();\n const x = Math.round(Math.cos(dropShadowStyle.angle) * dropShadowStyle.distance);\n const y = Math.round(Math.sin(dropShadowStyle.angle) * dropShadowStyle.distance);\n\n const position = `${x}px ${y}px`;\n\n if (dropShadowStyle.blur > 0)\n {\n return `text-shadow: ${position} ${dropShadowStyle.blur}px ${color}`;\n }\n\n return `text-shadow: ${position} ${color}`;\n}\n\nfunction strokeToCSS(stroke: ConvertedStrokeStyle): string\n{\n return [\n `-webkit-text-stroke-width: ${stroke.width}px`,\n `-webkit-text-stroke-color: ${Color.shared.setValue(stroke.color).toHex()}`,\n `text-stroke-width: ${stroke.width}px`,\n `text-stroke-color: ${Color.shared.setValue(stroke.color).toHex()}`,\n 'paint-order: stroke',\n ].join(';');\n}\n\n/** Converts the tag styles into CSS. */\nconst templates = {\n fontSize: `font-size: {{VALUE}}px`,\n fontFamily: `font-family: {{VALUE}}`,\n fontWeight: `font-weight: {{VALUE}}`,\n fontStyle: `font-style: {{VALUE}}`,\n fontVariant: `font-variant: {{VALUE}}`,\n letterSpacing: `letter-spacing: {{VALUE}}px`,\n align: `text-align: {{VALUE}}`,\n padding: `padding: {{VALUE}}px`,\n whiteSpace: `white-space: {{VALUE}}`,\n lineHeight: `line-height: {{VALUE}}px`,\n wordWrapWidth: `max-width: {{VALUE}}px`,\n};\n\n/** Converts the tag styles into CSS if modifications are required */\nconst transform = {\n fill: (value: string) => `color: ${Color.shared.setValue(value).toHex()}`,\n breakWords: (value: string) => `word-wrap: ${value ? 'break-all' : 'break-word'}`,\n stroke: strokeToCSS,\n dropShadow: dropShadowToCSS\n};\n\nfunction tagStyleToCSS(tagStyles: Record, out: string[])\n{\n for (const i in tagStyles)\n {\n const tagStyle = tagStyles[i];\n const cssTagStyle = [];\n\n for (const j in tagStyle)\n {\n if (transform[j as keyof typeof transform])\n {\n // eslint-disable-next-line max-len\n cssTagStyle.push(transform[j as keyof typeof transform](tagStyle[j as keyof HTMLTextStyleOptions] as any));\n }\n else if (templates[j as keyof typeof templates])\n {\n // eslint-disable-next-line max-len\n cssTagStyle.push(templates[j as keyof typeof templates].replace('{{VALUE}}', tagStyle[j as keyof HTMLTextStyleOptions] as any));\n }\n }\n\n out.push(`${i} { ${cssTagStyle.join(';')} }`);\n }\n}\n","/* eslint-disable accessor-pairs */\nimport { warn } from '../../utils/logging/warn';\nimport { TextStyle } from '../text/TextStyle';\nimport { generateTextStyleKey } from '../text/utils/generateTextStyleKey';\nimport { textStyleToCSS } from './utils/textStyleToCSS';\n\nimport type { FillInput, StrokeInput } from '../graphics/shared/FillTypes';\nimport type { TextStyleOptions } from '../text/TextStyle';\n\n/**\n * Options for HTML text style, extends {@link TextStyle}.\n * @memberof text\n * @extends text.TextStyleOptions\n * @property {string[]} [cssOverrides] - CSS style(s) to add.\n * @property {Record} [tagStyles] - Tag styles.\n */\nexport interface HTMLTextStyleOptions extends Omit\n{\n cssOverrides?: string[];\n tagStyles?: Record;\n}\n\n/**\n * A TextStyle object rendered by the HTMLTextSystem.\n * @memberof text\n */\nexport class HTMLTextStyle extends TextStyle\n{\n private _cssOverrides: string[] = [];\n private _cssStyle: string;\n /**\n * List of styles per tag.\n * @example\n * new HTMLText({\n * text:'Red,Blue,Green',\n * style:{\n * fontFamily: 'DM Sans',\n * fill: 'white',\n * fontSize:100,\n * tagStyles:{\n * red:{\n * fill:'red',\n * },\n * blue:{\n * fill:'blue',\n * },\n * green:{\n * fill:'green',\n * }\n * }\n * }\n * );\n */\n public tagStyles: Record;\n\n constructor(options: HTMLTextStyleOptions = {})\n {\n super(options);\n\n this.cssOverrides ??= options.cssOverrides;\n this.tagStyles = options.tagStyles ?? {};\n }\n\n /** List of style overrides that will be applied to the HTML text. */\n set cssOverrides(value: string | string[])\n {\n this._cssOverrides = value instanceof Array ? value : [value];\n this.update();\n }\n\n get cssOverrides(): string[]\n {\n return this._cssOverrides;\n }\n\n protected override _generateKey(): string\n {\n this._styleKey = generateTextStyleKey(this) + this._cssOverrides.join('-');\n\n return this._styleKey;\n }\n\n public update()\n {\n this._cssStyle = null;\n super.update();\n }\n\n /**\n * Creates a new HTMLTextStyle object with the same values as this one.\n * @returns New cloned HTMLTextStyle object\n */\n public clone(): HTMLTextStyle\n {\n return new HTMLTextStyle({\n align: this.align,\n breakWords: this.breakWords,\n dropShadow: this.dropShadow ? { ...this.dropShadow } : null,\n fill: this._fill,\n fontFamily: this.fontFamily,\n fontSize: this.fontSize,\n fontStyle: this.fontStyle,\n fontVariant: this.fontVariant,\n fontWeight: this.fontWeight,\n letterSpacing: this.letterSpacing,\n lineHeight: this.lineHeight,\n padding: this.padding,\n stroke: this._stroke,\n whiteSpace: this.whiteSpace,\n wordWrap: this.wordWrap,\n wordWrapWidth: this.wordWrapWidth,\n cssOverrides: this.cssOverrides,\n });\n }\n\n get cssStyle(): string\n {\n if (!this._cssStyle)\n {\n this._cssStyle = textStyleToCSS(this);\n }\n\n return this._cssStyle;\n }\n\n /**\n * Add a style override, this can be any CSS property\n * it will override any built-in style. This is the\n * property and the value as a string (e.g., `color: red`).\n * This will override any other internal style.\n * @param {string} value - CSS style(s) to add.\n * @example\n * style.addOverride('background-color: red');\n */\n public addOverride(...value: string[]): void\n {\n const toAdd = value.filter((v) => !this.cssOverrides.includes(v));\n\n if (toAdd.length > 0)\n {\n this.cssOverrides.push(...toAdd);\n this.update();\n }\n }\n\n /**\n * Remove any overrides that match the value.\n * @param {string} value - CSS style to remove.\n * @example\n * style.removeOverride('background-color: red');\n */\n public removeOverride(...value: string[]): void\n {\n const toRemove = value.filter((v) => this.cssOverrides.includes(v));\n\n if (toRemove.length > 0)\n {\n this.cssOverrides = this.cssOverrides.filter((v) => !toRemove.includes(v));\n this.update();\n }\n }\n\n override set fill(value: FillInput)\n {\n // if its not a string or a number, then its a texture!\n if (typeof value !== 'string' && typeof value !== 'number')\n {\n // #if _DEBUG\n warn('[HTMLTextStyle] only color fill is not supported by HTMLText');\n // #endif\n }\n\n super.fill = value;\n }\n\n override set stroke(value: StrokeInput)\n {\n // if its not a string or a number, then its a texture!\n if (value && typeof value !== 'string' && typeof value !== 'number')\n {\n // #if _DEBUG\n warn('[HTMLTextStyle] only color stroke is not supported by HTMLText');\n // #endif\n }\n\n super.stroke = value;\n }\n}\n","import type { HTMLTextStyle } from '../HtmlTextStyle';\n\n/**\n * Extracts font families from text. It will extract font families from the style, tagStyles and any font families\n * embedded in the text. It should also strip out duplicates as it goes.\n * @param text - The text to extract font families from\n * @param style - The style to extract font families from\n * @returns {string[]} - The font families as an array of strings\n */\nexport function extractFontFamilies(text: string, style: HTMLTextStyle): string[]\n{\n const fontFamily = style.fontFamily;\n const fontFamilies: string[] = [];\n const dedupe: Record = {};\n\n // first ensure fonts are loaded inline..\n // find any font..\n const regex = /font-family:([^;\"\\s]+)/g;\n\n const matches = text.match(regex);\n\n function addFontFamily(fontFamily: string)\n {\n if (!dedupe[fontFamily])\n {\n fontFamilies.push(fontFamily);\n\n dedupe[fontFamily] = true;\n }\n }\n\n if (Array.isArray(fontFamily))\n {\n for (let i = 0; i < fontFamily.length; i++)\n {\n addFontFamily(fontFamily[i]);\n }\n }\n else\n {\n addFontFamily(fontFamily);\n }\n\n if (matches)\n {\n matches.forEach((match) =>\n {\n const fontFamily = match.split(':')[1].trim();\n\n addFontFamily(fontFamily);\n });\n }\n\n for (const i in style.tagStyles)\n {\n const fontFamily = style.tagStyles[i].fontFamily;\n\n addFontFamily(fontFamily as string);\n }\n\n return fontFamilies;\n}\n","import { DOMAdapter } from '../../../environment/adapter';\n\n/**\n * Resolves a font url to a base64 string\n * @param url - The url to load the font from\n * @returns - The font as a base64 string\n */\nexport async function loadFontAsBase64(url: string): Promise\n{\n const response = await DOMAdapter.get().fetch(url);\n\n const blob = await response.blob();\n\n const reader = new FileReader();\n\n const dataSrc: string = await new Promise((resolve, reject) =>\n {\n reader.onloadend = () => resolve(reader.result as string);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n\n return dataSrc;\n}\n","import { loadFontAsBase64 } from './loadFontAsBase64';\n\nexport interface FontCSSStyleOptions\n{\n fontFamily: string | string[]\n fontWeight: string\n fontStyle: string\n}\n\n/**\n * This will take a font url and a style and return a css string that can be injected into a style tag\n * This will contain inlined base64 font and the font family information\n * @param style - the style to generate the css for\n * @param url - The url to load the font from\n * @returns - The css string\n */\nexport async function loadFontCSS(style: FontCSSStyleOptions, url: string): Promise\n{\n const dataSrc = await loadFontAsBase64(url);\n\n return `@font-face {\n font-family: \"${style.fontFamily}\";\n src: url('${dataSrc}');\n font-weight: ${style.fontWeight};\n font-style: ${style.fontStyle};\n }`;\n}\n","import { Cache } from '../../../assets/cache/Cache';\nimport { loadFontCSS } from './loadFontCSS';\n\nimport type { FontCSSStyleOptions } from './loadFontCSS';\n\nexport const FontStylePromiseCache = new Map>();\n\n/**\n * takes the font families and returns a css string that can be injected into a style tag\n * It will contain the font families and the font urls encoded as base64\n * @param fontFamilies - The font families to load\n * @param style - The FontCSSStyleOptions to load the font with (used for the first font family)\n * @param defaultOptions - The default options to load the font with (used for the rest of the font families)\n * @param defaultOptions.fontWeight - The default font weight\n * @param defaultOptions.fontStyle - The default font style\n * @returns - The css string\n */\nexport async function getFontCss(\n fontFamilies: string[],\n style: FontCSSStyleOptions,\n defaultOptions: {fontWeight: string, fontStyle: string}\n)\n{\n const fontPromises = fontFamilies\n .filter((fontFamily) => Cache.has(`${fontFamily}-and-url`))\n .map((fontFamily, i) =>\n {\n if (!FontStylePromiseCache.has(fontFamily))\n {\n const { url } = Cache.get(`${fontFamily}-and-url`);\n\n if (i === 0)\n {\n FontStylePromiseCache.set(fontFamily, loadFontCSS({\n fontWeight: style.fontWeight,\n fontStyle: style.fontStyle,\n fontFamily,\n }, url));\n }\n\n else\n {\n FontStylePromiseCache.set(fontFamily, loadFontCSS({\n fontWeight: defaultOptions.fontWeight,\n fontStyle: defaultOptions.fontStyle,\n fontFamily,\n }, url));\n }\n }\n\n return FontStylePromiseCache.get(fontFamily);\n });\n\n return (await Promise.all(fontPromises)).join('\\n');\n}\n","import type { HTMLTextRenderData } from '../HTMLTextRenderData';\nimport type { HTMLTextStyle } from '../HtmlTextStyle';\n\n/**\n * takes all the data and returns a svg url string can be loaded by an image element\n * @param text - The text to measure\n * @param style - The style to use\n * @param resolution - The resolution to use\n * @param fontCSS - The font css to use\n * @param htmlTextData - The HTMLTextRenderData to write the SVG to\n * @returns - The SVG as a url string\n */\nexport function getSVGUrl(\n text: string,\n style: HTMLTextStyle,\n resolution: number,\n fontCSS: string,\n htmlTextData: HTMLTextRenderData\n)\n{\n const { domElement, styleElement, svgRoot } = htmlTextData;\n\n domElement.innerHTML = `
${text}
`;\n domElement.setAttribute('style', `transform: scale(${resolution});transform-origin: top left; display: inline-block`);\n styleElement.textContent = fontCSS;\n\n const { width, height } = htmlTextData.image;\n\n svgRoot.setAttribute('width', width.toString());\n svgRoot.setAttribute('height', height.toString());\n\n return new XMLSerializer().serializeToString(svgRoot);\n}\n","import { CanvasPool } from '../../../rendering/renderers/shared/texture/CanvasPool';\n\n/**\n * This function converts an image to a canvas, and returns the canvas.\n * It is used to convert images to canvases to work around a CORS issue where WebGPU cannot\n * upload an SVGImage to a texture.\n *\n * It uses the CanvasPool to get an optimal canvas and context, and then draws the image onto it.\n * This canvas is immediately returned to the CanvasPool for reuse, so use the result straight away!\n * (eg upload it to the GPU!)\n * @param image - The image to convert to a canvas.\n * @param resolution - The resolution of the canvas.\n */\nexport function getTemporaryCanvasFromImage(image: HTMLImageElement, resolution: number): HTMLCanvasElement\n{\n // Get an optimal canvas and context from the CanvasPool, based on the\n // dimensions of the image and the desired resolution.\n const canvasAndContext = CanvasPool.getOptimalCanvasAndContext(\n image.width,\n image.height,\n resolution\n );\n\n // Clear the context of the canvas, and draw the image onto it.\n const { context } = canvasAndContext;\n\n context.clearRect(0, 0, image.width, image.height);\n context.drawImage(image, 0, 0);\n\n // Return the canvas and context to the CanvasPool.\n CanvasPool.returnCanvasAndContext(canvasAndContext);\n\n // Return the canvas.\n return canvasAndContext.canvas as HTMLCanvasElement;\n}\n\n","/**\n * This function loads an SVG image into an HTMLImageElement.\n * The image can then be uploaded as texture to the GPU.\n * iOS has a bug where embedded fonts are not available immediately after the image loads,\n * so we wait an arbitrary amount of time before resolving the promise.\n * @param image - The image to load the SVG into\n * @param url - The url to load the SVG from\n * @param delay - Whether to delay the load\n * @returns - A promise that resolves when the image has loaded\n */\nexport function loadSVGImage(image: HTMLImageElement, url: string, delay: boolean)\n{\n return new Promise(async (resolve) =>\n {\n // Safari has a known bug where embedded fonts are not available\n // immediately after the image loads, to compensate we wait an\n // arbitrary amount of time\n // @see https://bugs.webkit.org/show_bug.cgi?id=219770\n if (delay)\n {\n await new Promise((resolve) => setTimeout(resolve, 100));\n }\n\n image.onload = () =>\n {\n resolve();\n };\n\n image.src = `data:image/svg+xml;charset=utf8,${encodeURIComponent(url)}`;\n image.crossOrigin = 'anonymous';\n });\n}\n","import { CanvasTextMetrics } from '../../text/canvas/CanvasTextMetrics';\nimport { HTMLTextRenderData } from '../HTMLTextRenderData';\n\nimport type { Size } from '../../../maths/misc/Size';\nimport type { HTMLTextStyle } from '../HtmlTextStyle';\n\nlet tempHTMLTextRenderData: HTMLTextRenderData;\n\n/**\n * Measures the HTML text without actually generating an image.\n * This is used to calculate the size of the text.\n * @param text - The text to measure\n * @param style - The style to use\n * @param fontStyleCSS - The font css to use\n * @param htmlTextRenderData - The HTMLTextRenderData to write the SVG to\n * @returns - The size of the text\n */\nexport function measureHtmlText(\n text: string,\n style: HTMLTextStyle,\n fontStyleCSS?: string,\n htmlTextRenderData?: HTMLTextRenderData\n): Size\n{\n htmlTextRenderData = htmlTextRenderData || tempHTMLTextRenderData || (tempHTMLTextRenderData = new HTMLTextRenderData());\n\n const { domElement, styleElement, svgRoot } = htmlTextRenderData;\n\n domElement.innerHTML = `
${text}
`;\n\n domElement.setAttribute('style', 'transform-origin: top left; display: inline-block');\n\n if (fontStyleCSS)\n {\n styleElement.textContent = fontStyleCSS;\n }\n\n // Measure the contents using the shadow DOM\n document.body.appendChild(svgRoot);\n\n const contentBounds = domElement.getBoundingClientRect();\n\n svgRoot.remove();\n\n const descenderPadding = CanvasTextMetrics.measureFont(style.fontStyle).descent;\n\n return {\n width: contentBounds.width,\n height: contentBounds.height + descenderPadding,\n };\n}\n","import { ExtensionType } from '../../extensions/Extensions';\nimport { TexturePool } from '../../rendering/renderers/shared/texture/TexturePool';\nimport { type Renderer, RendererType } from '../../rendering/renderers/types';\nimport { isSafari } from '../../utils/browser/isSafari';\nimport { warn } from '../../utils/logging/warn';\nimport { BigPool } from '../../utils/pool/PoolGroup';\nimport { getPo2TextureFromSource } from '../text/utils/getPo2TextureFromSource';\nimport { HTMLTextRenderData } from './HTMLTextRenderData';\nimport { HTMLTextStyle } from './HtmlTextStyle';\nimport { extractFontFamilies } from './utils/extractFontFamilies';\nimport { getFontCss } from './utils/getFontCss';\nimport { getSVGUrl } from './utils/getSVGUrl';\nimport { getTemporaryCanvasFromImage } from './utils/getTemporaryCanvasFromImage';\nimport { loadSVGImage } from './utils/loadSVGImage';\nimport { measureHtmlText } from './utils/measureHtmlText';\n\nimport type { System } from '../../rendering/renderers/shared/system/System';\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport type { PoolItem } from '../../utils/pool/Pool';\nimport type { HTMLTextOptions } from './HTMLText';\nimport type { FontCSSStyleOptions } from './utils/loadFontCSS';\n\ninterface HTMLTextTexture\n{\n texture: Texture,\n usageCount: number,\n promise: Promise,\n}\n\n/**\n * System plugin to the renderer to manage HTMLText\n * @memberof rendering\n */\nexport class HTMLTextSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'htmlText',\n } as const;\n\n public static defaultFontOptions: FontCSSStyleOptions = {\n fontFamily: 'Arial',\n fontStyle: 'normal',\n fontWeight: 'normal',\n };\n\n private _activeTextures: Record = {};\n\n /**\n * WebGPU has a cors issue when uploading an image that is an SVGImage\n * To get around this we need to create a canvas draw the image to it and upload that instead.\n * Bit of a shame.. but no other work around just yet!\n */\n private readonly _createCanvas: boolean;\n private readonly _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n this._createCanvas = renderer.type === RendererType.WEBGPU;\n }\n\n public getTexture(options: HTMLTextOptions): Promise\n {\n return this._buildTexturePromise(\n options.text as string,\n options.resolution,\n options.style as HTMLTextStyle\n );\n }\n\n public getManagedTexture(\n text: string,\n resolution: number,\n style: HTMLTextStyle,\n textKey: string\n ): Promise\n {\n if (this._activeTextures[textKey])\n {\n this._increaseReferenceCount(textKey);\n\n return this._activeTextures[textKey].promise;\n }\n\n const promise = this._buildTexturePromise(text, resolution, style)\n .then((texture) =>\n {\n this._activeTextures[textKey].texture = texture;\n\n return texture;\n });\n\n this._activeTextures[textKey] = {\n texture: null,\n promise,\n usageCount: 1,\n };\n\n return promise;\n }\n\n private async _buildTexturePromise(\n text: string,\n resolution: number,\n style: HTMLTextStyle,\n )\n {\n const htmlTextData = BigPool.get(HTMLTextRenderData);\n const fontFamilies = extractFontFamilies(text, style);\n const fontCSS = await getFontCss(\n fontFamilies,\n style,\n HTMLTextStyle.defaultTextStyle as {fontWeight: string, fontStyle: string}\n );\n const measured = measureHtmlText(text, style, fontCSS, htmlTextData);\n\n const width = Math.ceil(Math.ceil((Math.max(1, measured.width) + (style.padding * 2))) * resolution);\n const height = Math.ceil(Math.ceil((Math.max(1, measured.height) + (style.padding * 2))) * resolution);\n\n const image = htmlTextData.image;\n\n image.width = width | 0;\n image.height = height | 0;\n\n const svgURL = getSVGUrl(text, style, resolution, fontCSS, htmlTextData);\n\n await loadSVGImage(image, svgURL, isSafari() && fontFamilies.length > 0);\n\n let resource: HTMLImageElement | HTMLCanvasElement = image;\n\n if (this._createCanvas)\n {\n // silly webGPU workaround..\n resource = getTemporaryCanvasFromImage(image, resolution);\n }\n\n const texture = getPo2TextureFromSource(resource, image.width, image.height, resolution);\n\n if (this._createCanvas)\n {\n this._renderer.texture.initSource(texture.source);\n }\n\n BigPool.return(htmlTextData as PoolItem);\n\n return texture;\n }\n\n private _increaseReferenceCount(textKey: string)\n {\n this._activeTextures[textKey].usageCount++;\n }\n\n public decreaseReferenceCount(textKey: string)\n {\n const activeTexture = this._activeTextures[textKey];\n\n // TODO SHOULD NOT BE NEEDED\n if (!activeTexture) return;\n\n activeTexture.usageCount--;\n\n if (activeTexture.usageCount === 0)\n {\n if (activeTexture.texture)\n {\n this._cleanUp(activeTexture);\n }\n else\n {\n // we did not resolve...\n activeTexture.promise.then((texture) =>\n {\n activeTexture.texture = texture;\n\n this._cleanUp(activeTexture);\n }).catch(() =>\n {\n // #if _DEBUG\n warn('HTMLTextSystem: Failed to clean texture');\n // #endif\n });\n }\n\n this._activeTextures[textKey] = null;\n }\n }\n\n private _cleanUp(activeTexture: HTMLTextTexture)\n {\n TexturePool.returnTexture(activeTexture.texture);\n activeTexture.texture.source.resource = null;\n activeTexture.texture.source.uploadMethodId = 'unknown';\n }\n\n public getReferenceCount(textKey: string)\n {\n return this._activeTextures[textKey].usageCount;\n }\n\n public destroy(): void\n {\n this._activeTextures = null;\n }\n}\n","import { extensions } from '../../extensions/Extensions';\nimport { HTMLTextPipe } from './HTMLTextPipe';\nimport { HTMLTextSystem } from './HTMLTextSystem';\n\nextensions.add(HTMLTextSystem);\nextensions.add(HTMLTextPipe);\n","import { Buffer } from '../../../rendering/renderers/shared/buffer/Buffer';\nimport { BufferUsage } from '../../../rendering/renderers/shared/buffer/const';\nimport { Geometry } from '../../../rendering/renderers/shared/geometry/Geometry';\nimport { deprecation, v8_0_0 } from '../../../utils/logging/deprecation';\n\nimport type { Topology } from '../../../rendering/renderers/shared/geometry/const';\nimport type { BatchMode } from '../../graphics/shared/GraphicsContext';\n\n/**\n * Options for the mesh geometry.\n * @memberof scene\n */\nexport interface MeshGeometryOptions\n{\n /** The positions of the mesh. */\n positions?: Float32Array;\n /** The UVs of the mesh. */\n uvs?: Float32Array;\n /** The indices of the mesh. */\n indices?: Uint32Array;\n /** The topology of the mesh. */\n topology?: Topology;\n /** Whether to shrink the buffers to fit the data. */\n shrinkBuffersToFit?: boolean;\n}\n\n/**\n * A geometry used to batch multiple meshes with the same texture.\n * @memberof scene\n */\nexport class MeshGeometry extends Geometry\n{\n public static defaultOptions: MeshGeometryOptions = {\n topology: 'triangle-list',\n shrinkBuffersToFit: false,\n };\n\n public batchMode: BatchMode = 'auto';\n\n /**\n * @param {scene.MeshGeometryOptions} options - The options of the mesh geometry.\n */\n constructor(options: MeshGeometryOptions);\n /** @deprecated since 8.0.0 */\n constructor(positions: Float32Array, uvs: Float32Array, indices: Uint32Array);\n constructor(...args: [MeshGeometryOptions] | [Float32Array, Float32Array, Uint32Array])\n {\n let options = args[0] ?? {};\n\n if (options instanceof Float32Array)\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'use new MeshGeometry({ positions, uvs, indices }) instead');\n // #endif\n\n options = {\n positions: options,\n uvs: args[1],\n indices: args[2],\n };\n }\n\n options = { ...MeshGeometry.defaultOptions, ...options };\n\n const positions = options.positions || new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]);\n const uvs = options.uvs || new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]);\n const indices = options.indices || new Uint32Array([0, 1, 2, 0, 2, 3]);\n\n const shrinkToFit = options.shrinkBuffersToFit;\n\n const positionBuffer = new Buffer({\n data: positions,\n label: 'attribute-mesh-positions',\n shrinkToFit,\n usage: BufferUsage.VERTEX | BufferUsage.COPY_DST,\n });\n\n const uvBuffer = new Buffer({\n data: uvs,\n label: 'attribute-mesh-uvs',\n shrinkToFit,\n usage: BufferUsage.VERTEX | BufferUsage.COPY_DST,\n });\n\n const indexBuffer = new Buffer({\n data: indices,\n label: 'index-mesh-buffer',\n shrinkToFit,\n usage: BufferUsage.INDEX | BufferUsage.COPY_DST,\n });\n\n super({\n attributes: {\n aPosition: {\n buffer: positionBuffer,\n format: 'float32x2',\n stride: 2 * 4,\n offset: 0,\n },\n aUV: {\n buffer: uvBuffer,\n format: 'float32x2',\n stride: 2 * 4,\n offset: 0,\n },\n },\n indexBuffer,\n topology: options.topology,\n });\n }\n\n /** The positions of the mesh. */\n get positions(): Float32Array\n {\n return this.attributes.aPosition.buffer.data as Float32Array;\n }\n\n set positions(value: Float32Array)\n {\n this.attributes.aPosition.buffer.data = value;\n }\n\n /** The UVs of the mesh. */\n get uvs(): Float32Array\n {\n return this.attributes.aUV.buffer.data as Float32Array;\n }\n\n set uvs(value: Float32Array)\n {\n this.attributes.aUV.buffer.data = value;\n }\n\n /** The indices of the mesh. */\n get indices(): Uint32Array\n {\n return this.indexBuffer.data as Uint32Array;\n }\n\n set indices(value: Uint32Array)\n {\n this.indexBuffer.data = value;\n }\n}\n","export const localUniformBit = {\n name: 'local-uniform-bit',\n vertex: {\n header: /* wgsl */`\n\n struct LocalUniforms {\n uTransformMatrix:mat3x3,\n uColor:vec4,\n uRound:f32,\n }\n\n @group(1) @binding(0) var localUniforms : LocalUniforms;\n `,\n main: /* wgsl */`\n vColor *= localUniforms.uColor;\n modelMatrix *= localUniforms.uTransformMatrix;\n `,\n end: /* wgsl */`\n if(localUniforms.uRound == 1)\n {\n vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);\n }\n `\n },\n};\n\n// TODO this works, but i think down the road it will be better to manage groups automatically if there are clashes\nexport const localUniformBitGroup2 = {\n ...localUniformBit,\n vertex: {\n ...localUniformBit.vertex,\n // replace the group!\n header: localUniformBit.vertex.header.replace('group(1)', 'group(2)'),\n }\n};\n\nexport const localUniformBitGl = {\n name: 'local-uniform-bit',\n vertex: {\n header: /* glsl */`\n\n uniform mat3 uTransformMatrix;\n uniform vec4 uColor;\n uniform float uRound;\n `,\n main: /* glsl */`\n vColor *= uColor;\n modelMatrix = uTransformMatrix;\n `,\n end: /* glsl */`\n if(uRound == 1.)\n {\n gl_Position.xy = roundPixels(gl_Position.xy, uResolution);\n }\n `\n },\n};\n","export const tilingBit = {\n name: 'tiling-bit',\n vertex: {\n header: /* wgsl */`\n struct TilingUniforms {\n uMapCoord:mat3x3,\n uClampFrame:vec4,\n uClampOffset:vec2,\n uTextureTransform:mat3x3,\n uSizeAnchor:vec4\n };\n\n @group(2) @binding(0) var tilingUniforms: TilingUniforms;\n @group(2) @binding(1) var uTexture: texture_2d;\n @group(2) @binding(2) var uSampler: sampler;\n `,\n main: /* wgsl */`\n uv = (tilingUniforms.uTextureTransform * vec3(uv, 1.0)).xy;\n\n position = (position - tilingUniforms.uSizeAnchor.zw) * tilingUniforms.uSizeAnchor.xy;\n `\n\n },\n fragment: {\n header: /* wgsl */`\n struct TilingUniforms {\n uMapCoord:mat3x3,\n uClampFrame:vec4,\n uClampOffset:vec2,\n uTextureTransform:mat3x3,\n uSizeAnchor:vec4\n };\n\n @group(2) @binding(0) var tilingUniforms: TilingUniforms;\n @group(2) @binding(1) var uTexture: texture_2d;\n @group(2) @binding(2) var uSampler: sampler;\n `,\n main: /* wgsl */`\n\n var coord = vUV + ceil(tilingUniforms.uClampOffset - vUV);\n coord = (tilingUniforms.uMapCoord * vec3(coord, 1.0)).xy;\n var unclamped = coord;\n coord = clamp(coord, tilingUniforms.uClampFrame.xy, tilingUniforms.uClampFrame.zw);\n\n var bias = 0.;\n\n if(unclamped.x == coord.x && unclamped.y == coord.y)\n {\n bias = -32.;\n } \n\n outColor = textureSampleBias(uTexture, uSampler, coord, bias);\n `\n }\n\n};\n\nexport const tilingBitGl = {\n name: 'tiling-bit',\n vertex: {\n header: /* glsl */`\n uniform mat3 uTextureTransform;\n uniform vec4 uSizeAnchor;\n \n `,\n main: /* glsl */`\n uv = (uTextureTransform * vec3(aUV, 1.0)).xy;\n\n position = (position - uSizeAnchor.zw) * uSizeAnchor.xy;\n `\n\n },\n fragment: {\n header: /* glsl */`\n uniform sampler2D uTexture;\n uniform mat3 uMapCoord;\n uniform vec4 uClampFrame;\n uniform vec2 uClampOffset;\n `,\n main: /* glsl */`\n\n vec2 coord = vUV + ceil(uClampOffset - vUV);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n vec2 unclamped = coord;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n \n outColor = texture(uTexture, coord, unclamped == coord ? 0.0 : -32.0);// lod-bias very negative to force lod 0\n \n `\n }\n\n};\n","import { Matrix } from '../../../maths/matrix/Matrix';\nimport {\n compileHighShaderGlProgram,\n compileHighShaderGpuProgram\n} from '../../../rendering/high-shader/compileHighShaderToProgram';\nimport { localUniformBit, localUniformBitGl } from '../../../rendering/high-shader/shader-bits/localUniformBit';\nimport { roundPixelsBit, roundPixelsBitGl } from '../../../rendering/high-shader/shader-bits/roundPixelsBit';\nimport { Shader } from '../../../rendering/renderers/shared/shader/Shader';\nimport { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup';\nimport { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport { tilingBit, tilingBitGl } from './tilingBit';\n\nimport type { GlProgram } from '../../../rendering/renderers/gl/shader/GlProgram';\nimport type { GpuProgram } from '../../../rendering/renderers/gpu/shader/GpuProgram';\n\nlet gpuProgram: GpuProgram;\nlet glProgram: GlProgram;\n\nexport class TilingSpriteShader extends Shader\n{\n constructor()\n {\n gpuProgram ??= compileHighShaderGpuProgram({\n name: 'tiling-sprite-shader',\n bits: [\n localUniformBit,\n tilingBit,\n roundPixelsBit,\n ],\n });\n\n glProgram ??= compileHighShaderGlProgram({\n name: 'tiling-sprite-shader',\n bits: [\n localUniformBitGl,\n tilingBitGl,\n roundPixelsBitGl,\n ]\n });\n\n const tilingUniforms = new UniformGroup({\n uMapCoord: { value: new Matrix(), type: 'mat3x3' },\n uClampFrame: { value: new Float32Array([0, 0, 1, 1]), type: 'vec4' },\n uClampOffset: { value: new Float32Array([0, 0]), type: 'vec2' },\n uTextureTransform: { value: new Matrix(), type: 'mat3x3' },\n uSizeAnchor: { value: new Float32Array([100, 100, 0.5, 0.5]), type: 'vec4' },\n });\n\n super({\n glProgram,\n gpuProgram,\n resources: {\n localUniforms: new UniformGroup({\n uTransformMatrix: { value: new Matrix(), type: 'mat3x3' },\n uColor: { value: new Float32Array([1, 1, 1, 1]), type: 'vec4' },\n uRound: { value: 0, type: 'f32' },\n }),\n tilingUniforms,\n uTexture: Texture.EMPTY.source,\n uSampler: Texture.EMPTY.source.style,\n }\n });\n }\n\n public updateUniforms(\n width: number, height: number,\n matrix: Matrix,\n anchorX: number, anchorY: number,\n texture: Texture\n ): void\n {\n const tilingUniforms = this.resources.tilingUniforms;\n\n const textureWidth = texture.width;\n const textureHeight = texture.height;\n const textureMatrix = texture.textureMatrix;\n\n const uTextureTransform = tilingUniforms.uniforms.uTextureTransform;\n\n uTextureTransform.set(\n matrix.a * textureWidth / width,\n matrix.b * textureWidth / height,\n matrix.c * textureHeight / width,\n matrix.d * textureHeight / height,\n matrix.tx / width,\n matrix.ty / height);\n\n uTextureTransform.invert();\n\n tilingUniforms.uniforms.uMapCoord = textureMatrix.mapCoord;\n tilingUniforms.uniforms.uClampFrame = textureMatrix.uClampFrame;\n tilingUniforms.uniforms.uClampOffset = textureMatrix.uClampOffset;\n tilingUniforms.uniforms.uTextureTransform = uTextureTransform;\n tilingUniforms.uniforms.uSizeAnchor[0] = width;\n tilingUniforms.uniforms.uSizeAnchor[1] = height;\n tilingUniforms.uniforms.uSizeAnchor[2] = anchorX;\n tilingUniforms.uniforms.uSizeAnchor[3] = anchorY;\n\n if (texture)\n {\n this.resources.uTexture = texture.source;\n this.resources.uSampler = texture.source.style;\n }\n }\n}\n","import { MeshGeometry } from '../../mesh/shared/MeshGeometry';\n\nexport class QuadGeometry extends MeshGeometry\n{\n constructor()\n {\n super({\n positions: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),\n uvs: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),\n indices: new Uint32Array([0, 1, 2, 0, 2, 3]),\n });\n }\n}\n","import type { TilingSprite } from '../TilingSprite';\n\nexport function setPositions(tilingSprite: TilingSprite, positions: Float32Array)\n{\n const anchorX = tilingSprite.anchor.x;\n const anchorY = tilingSprite.anchor.y;\n\n positions[0] = -anchorX * tilingSprite.width;\n positions[1] = -anchorY * tilingSprite.height;\n positions[2] = (1 - anchorX) * tilingSprite.width;\n positions[3] = -anchorY * tilingSprite.height;\n positions[4] = (1 - anchorX) * tilingSprite.width;\n positions[5] = (1 - anchorY) * tilingSprite.height;\n positions[6] = -anchorX * tilingSprite.width;\n positions[7] = (1 - anchorY) * tilingSprite.height;\n}\n","import type { Matrix } from '../../../maths/matrix/Matrix';\nimport type { TypedArray } from '../../../rendering/renderers/shared/buffer/Buffer';\n\nexport function applyMatrix(array: TypedArray, stride: number, offset: number, matrix: Matrix)\n{\n let index = 0;\n const size = array.length / (stride || 2);\n\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 offset *= stride;\n\n while (index < size)\n {\n const x = array[offset];\n const y = array[offset + 1];\n\n array[offset] = (a * x) + (c * y) + tx;\n array[offset + 1] = (b * x) + (d * y) + ty;\n\n offset += stride;\n\n index++;\n }\n}\n","import { Matrix } from '../../../maths/matrix/Matrix';\nimport { applyMatrix } from './applyMatrix';\n\nimport type { TilingSprite } from '../TilingSprite';\n\nexport function setUvs(tilingSprite: TilingSprite, uvs: Float32Array)\n{\n const texture = tilingSprite.texture;\n\n const width = texture.frame.width;\n const height = texture.frame.height;\n\n let anchorX = 0;\n let anchorY = 0;\n\n if (tilingSprite._applyAnchorToTexture)\n {\n anchorX = tilingSprite.anchor.x;\n anchorY = tilingSprite.anchor.y;\n }\n\n uvs[0] = uvs[6] = -anchorX;\n uvs[2] = uvs[4] = 1 - anchorX;\n uvs[1] = uvs[3] = -anchorY;\n uvs[5] = uvs[7] = 1 - anchorY;\n\n const textureMatrix = Matrix.shared;\n\n textureMatrix.copyFrom(tilingSprite._tileTransform.matrix);\n\n textureMatrix.tx /= tilingSprite.width;\n textureMatrix.ty /= tilingSprite.height;\n\n textureMatrix.invert();\n\n textureMatrix.scale(tilingSprite.width / width, tilingSprite.height / height);\n\n applyMatrix(uvs, 2, 0, textureMatrix);\n}\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport { ExtensionType } from '../../extensions/Extensions';\nimport { getAdjustedBlendModeBlend } from '../../rendering/renderers/shared/state/getAdjustedBlendModeBlend';\nimport { State } from '../../rendering/renderers/shared/state/State';\nimport { type Renderer, RendererType } from '../../rendering/renderers/types';\nimport { color32BitToUniform } from '../graphics/gpu/colorToUniform';\nimport { BatchableMesh } from '../mesh/shared/BatchableMesh';\nimport { MeshGeometry } from '../mesh/shared/MeshGeometry';\nimport { TilingSpriteShader } from './shader/TilingSpriteShader';\nimport { QuadGeometry } from './utils/QuadGeometry';\nimport { setPositions } from './utils/setPositions';\nimport { setUvs } from './utils/setUvs';\n\nimport type { WebGLRenderer } from '../../rendering/renderers/gl/WebGLRenderer';\nimport type { InstructionSet } from '../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { RenderPipe } from '../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { TilingSprite } from './TilingSprite';\n\ninterface RenderableData\n{\n canBatch: boolean;\n renderable: TilingSprite\n batchableMesh?: BatchableMesh;\n geometry?: MeshGeometry;\n shader?: TilingSpriteShader;\n}\n\nconst sharedQuad = new QuadGeometry();\n\nexport class TilingSpritePipe implements RenderPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'tilingSprite',\n } as const;\n\n private _renderer: Renderer;\n private readonly _state: State = State.default2d;\n private readonly _tilingSpriteDataHash: Record = Object.create(null);\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public validateRenderable(renderable: TilingSprite): boolean\n {\n const tilingSpriteData = this._getTilingSpriteData(renderable);\n\n const couldBatch = tilingSpriteData.canBatch;\n\n this._updateCanBatch(renderable);\n\n const canBatch = tilingSpriteData.canBatch;\n\n if (canBatch && canBatch === couldBatch)\n {\n const { batchableMesh } = tilingSpriteData;\n\n // we are batching.. check a texture change!\n if (batchableMesh && batchableMesh.texture._source !== renderable.texture._source)\n {\n return !batchableMesh.batcher.checkAndUpdateTexture(batchableMesh, renderable.texture);\n }\n }\n\n return (couldBatch !== canBatch);\n\n // // TODO - only update if required?\n // // only texture\n // // only uvs\n // // only positions?\n }\n\n public addRenderable(tilingSprite: TilingSprite, instructionSet: InstructionSet)\n {\n const batcher = this._renderer.renderPipes.batch;\n\n // init\n this._updateCanBatch(tilingSprite);\n\n const tilingSpriteData = this._getTilingSpriteData(tilingSprite);\n\n const { geometry, canBatch } = tilingSpriteData;\n\n if (canBatch)\n {\n tilingSpriteData.batchableMesh ||= new BatchableMesh();\n\n const batchableMesh = tilingSpriteData.batchableMesh;\n\n if (tilingSprite._didTilingSpriteUpdate)\n {\n tilingSprite._didTilingSpriteUpdate = false;\n\n this._updateBatchableMesh(tilingSprite);\n\n batchableMesh.geometry = geometry;\n batchableMesh.mesh = tilingSprite;\n batchableMesh.texture = tilingSprite._texture;\n }\n\n batchableMesh.roundPixels = (this._renderer._roundPixels | tilingSprite._roundPixels) as 0 | 1;\n\n batcher.addToBatch(batchableMesh);\n }\n else\n {\n batcher.break(instructionSet);\n\n tilingSpriteData.shader ||= new TilingSpriteShader();\n\n this.updateRenderable(tilingSprite);\n\n instructionSet.add(tilingSprite);\n }\n }\n\n public execute(tilingSprite: TilingSprite)\n {\n const { shader } = this._tilingSpriteDataHash[tilingSprite.uid];\n\n shader.groups[0] = this._renderer.globalUniforms.bindGroup;\n\n // deal with local uniforms...\n const localUniforms = shader.resources.localUniforms.uniforms;\n\n localUniforms.uTransformMatrix = tilingSprite.groupTransform;\n localUniforms.uRound = this._renderer._roundPixels | tilingSprite._roundPixels;\n\n color32BitToUniform(\n tilingSprite.groupColorAlpha,\n localUniforms.uColor,\n 0\n );\n\n this._state.blendMode = getAdjustedBlendModeBlend(tilingSprite.groupBlendMode, tilingSprite.texture._source);\n\n this._renderer.encoder.draw({\n geometry: sharedQuad,\n shader,\n state: this._state,\n });\n }\n\n public updateRenderable(tilingSprite: TilingSprite)\n {\n const tilingSpriteData = this._getTilingSpriteData(tilingSprite);\n\n const { canBatch } = tilingSpriteData;\n\n if (canBatch)\n {\n const { batchableMesh } = tilingSpriteData;\n\n if (tilingSprite._didTilingSpriteUpdate) this._updateBatchableMesh(tilingSprite);\n\n batchableMesh.batcher.updateElement(batchableMesh);\n }\n else if (tilingSprite._didTilingSpriteUpdate)\n {\n const { shader } = tilingSpriteData;\n // now update uniforms...\n\n shader.updateUniforms(\n tilingSprite.width,\n tilingSprite.height,\n tilingSprite._tileTransform.matrix,\n tilingSprite.anchor.x,\n tilingSprite.anchor.y,\n tilingSprite.texture,\n );\n }\n\n tilingSprite._didTilingSpriteUpdate = false;\n }\n\n public destroyRenderable(tilingSprite: TilingSprite)\n {\n const tilingSpriteData = this._getTilingSpriteData(tilingSprite);\n\n tilingSpriteData.batchableMesh = null;\n\n tilingSpriteData.shader?.destroy();\n\n this._tilingSpriteDataHash[tilingSprite.uid] = null;\n }\n\n private _getTilingSpriteData(renderable: TilingSprite): RenderableData\n {\n return this._tilingSpriteDataHash[renderable.uid] || this._initTilingSpriteData(renderable);\n }\n\n private _initTilingSpriteData(tilingSprite: TilingSprite): RenderableData\n {\n const geometry = new MeshGeometry({\n indices: sharedQuad.indices,\n positions: sharedQuad.positions.slice(),\n uvs: sharedQuad.uvs.slice(),\n });\n\n this._tilingSpriteDataHash[tilingSprite.uid] = {\n canBatch: true,\n renderable: tilingSprite,\n geometry,\n };\n\n tilingSprite.on('destroyed', () =>\n {\n this.destroyRenderable(tilingSprite);\n });\n\n return this._tilingSpriteDataHash[tilingSprite.uid];\n }\n\n private _updateBatchableMesh(tilingSprite: TilingSprite)\n {\n const renderableData = this._getTilingSpriteData(tilingSprite);\n\n const { geometry } = renderableData;\n\n const style = tilingSprite.texture.source.style;\n\n if (style.addressMode !== 'repeat')\n {\n style.addressMode = 'repeat';\n style.update();\n }\n\n setUvs(tilingSprite, geometry.uvs);\n setPositions(tilingSprite, geometry.positions);\n }\n\n public destroy()\n {\n for (const i in this._tilingSpriteDataHash)\n {\n this.destroyRenderable(this._tilingSpriteDataHash[i].renderable);\n }\n\n (this._tilingSpriteDataHash as null) = null;\n this._renderer = null;\n }\n\n private _updateCanBatch(tilingSprite: TilingSprite)\n {\n const renderableData = this._getTilingSpriteData(tilingSprite);\n const texture = tilingSprite.texture;\n\n let _nonPowOf2wrapping = true;\n\n if (this._renderer.type === RendererType.WEBGL)\n {\n _nonPowOf2wrapping = (this._renderer as WebGLRenderer).context.supports.nonPowOf2wrapping;\n }\n\n renderableData.canBatch = texture.textureMatrix.isSimple && (_nonPowOf2wrapping || texture.source.isPowerOfTwo);\n\n return renderableData.canBatch;\n }\n}\n\n","import { extensions } from '../../extensions/Extensions';\nimport { TilingSpritePipe } from './TilingSpritePipe';\n\nextensions.add(TilingSpritePipe);\n","import { deprecation, v8_0_0 } from '../../utils/logging/deprecation';\nimport { MeshGeometry } from '../mesh/shared/MeshGeometry';\n\nimport type { MeshGeometryOptions } from '../mesh/shared/MeshGeometry';\n\n/**\n * Constructor options used for `PlaneGeometry` instances.\n * ```js\n * const planeGeometry = new PlaneGeometry({\n * width: 100,\n * height: 100,\n * verticesX: 10,\n * verticesY: 10,\n * });\n * ```\n * @see {@link scene.PlaneGeometry}\n * @memberof scene\n */\nexport interface PlaneGeometryOptions\n{\n /** Width of plane */\n width?: number;\n /** Height of plane */\n height?: number;\n /** Number of vertices on x-axis */\n verticesX?: number;\n /** Number of vertices on y-axis */\n verticesY?: number;\n}\n\n/**\n * The PlaneGeometry allows you to draw a 2d plane\n * @memberof scene\n */\nexport class PlaneGeometry extends MeshGeometry\n{\n public static defaultOptions: PlaneGeometryOptions & MeshGeometryOptions = {\n width: 100,\n height: 100,\n verticesX: 10,\n verticesY: 10,\n };\n\n /** The number of vertices on x-axis */\n public verticesX: number;\n /** The number of vertices on y-axis */\n public verticesY: number;\n /** The width of plane */\n public width: number;\n /** The height of plane */\n public height: number;\n\n /**\n * @param {PlaneGeometryOptions} options - Options to be applied to plane geometry\n */\n constructor(options: PlaneGeometryOptions);\n /** @deprecated since 8.0.0 */\n constructor(width?: number, height?: number, verticesX?: number, verticesY?: number);\n constructor(...args: [PlaneGeometryOptions?] | [number?, number?, number?, number?])\n {\n super({});\n\n let options = args[0] ?? {};\n\n if (typeof options === 'number')\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'PlaneGeometry constructor changed please use { width, height, verticesX, verticesY } instead');\n // #endif\n\n options = {\n width: options,\n height: args[1],\n verticesX: args[2],\n verticesY: args[3],\n };\n }\n\n this.build(options);\n }\n\n /**\n * Refreshes plane coordinates\n * @param options - Options to be applied to plane geometry\n */\n public build(options: PlaneGeometryOptions): void\n {\n options = { ...PlaneGeometry.defaultOptions, ...options };\n\n this.verticesX = this.verticesX ?? options.verticesX;\n this.verticesY = this.verticesY ?? options.verticesY;\n\n this.width = this.width ?? options.width;\n this.height = this.height ?? options.height;\n\n const total = this.verticesX * this.verticesY;\n const verts = [];\n const uvs = [];\n const indices = [];\n\n const verticesX = this.verticesX - 1;\n const verticesY = this.verticesY - 1;\n\n const sizeX = (this.width) / verticesX;\n const sizeY = (this.height) / verticesY;\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 uvs.push(x / verticesX, y / verticesY);\n }\n\n const totalSub = verticesX * verticesY;\n\n for (let i = 0; i < totalSub; i++)\n {\n const xpos = i % verticesX;\n const ypos = (i / verticesX) | 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 value2, value4, value3);\n }\n\n this.buffers[0].data = new Float32Array(verts);\n this.buffers[1].data = new Float32Array(uvs);\n this.indexBuffer.data = new Uint32Array(indices);\n\n // ensure that the changes are uploaded\n this.buffers[0].update();\n this.buffers[1].update();\n this.indexBuffer.update();\n }\n}\n","import { PlaneGeometry } from '../mesh-plane/PlaneGeometry';\n\n/**\n * Options for the NineSliceGeometry.\n * @memberof scene\n */\nexport interface NineSliceGeometryOptions\n{\n\n /** The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane. */\n width?: number\n /** The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane. */\n height?: number\n /** The original width of the texture */\n originalWidth?: number\n /** The original height of the texture */\n originalHeight?: number\n /** The width of the left column. */\n leftWidth?: number\n /** The height of the top row. */\n topHeight?: number\n /** The width of the right column. */\n rightWidth?: number\n /** The height of the bottom row. */\n bottomHeight?: number\n}\n\n/**\n * The NineSliceGeometry class allows you to create a NineSlicePlane object.\n * @memberof scene\n */\nexport class NineSliceGeometry extends PlaneGeometry\n{\n /** The default options for the NineSliceGeometry. */\n public static defaultOptions: NineSliceGeometryOptions = {\n /** The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane. */\n width: 100,\n /** The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane. */\n height: 100,\n /** The width of the left column. */\n leftWidth: 10,\n /** The height of the top row. */\n topHeight: 10,\n /** The width of the right column. */\n rightWidth: 10,\n /** The height of the bottom row. */\n bottomHeight: 10,\n\n /** The original width of the texture */\n originalWidth: 100,\n /** The original height of the texture */\n originalHeight: 100,\n };\n\n public _leftWidth: number;\n public _rightWidth: number;\n public _topHeight: number;\n public _bottomHeight: number;\n\n private _originalWidth: number;\n private _originalHeight: number;\n\n constructor(options: NineSliceGeometryOptions = {})\n {\n options = { ...NineSliceGeometry.defaultOptions, ...options };\n\n super({\n width: options.width,\n height: options.height,\n verticesX: 4,\n verticesY: 4,\n });\n\n this.update(options);\n }\n\n /**\n * Updates the NineSliceGeometry with the options.\n * @param options - The options of the NineSliceGeometry.\n */\n public update(options: NineSliceGeometryOptions)\n {\n this.width = options.width ?? this.width;\n this.height = options.height ?? this.height;\n this._originalWidth = options.originalWidth ?? this._originalWidth;\n this._originalHeight = options.originalHeight ?? this._originalHeight;\n this._leftWidth = options.leftWidth ?? this._leftWidth;\n this._rightWidth = options.rightWidth ?? this._rightWidth;\n this._topHeight = options.topHeight ?? this._topHeight;\n this._bottomHeight = options.bottomHeight ?? this._bottomHeight;\n\n this.updateUvs();\n this.updatePositions();\n }\n\n /** Updates the positions of the vertices. */\n public updatePositions()\n {\n const positions = this.positions;\n\n const w = this._leftWidth + this._rightWidth;\n const scaleW = this.width > w ? 1.0 : this.width / w;\n\n const h = this._topHeight + this._bottomHeight;\n const scaleH = this.height > h ? 1.0 : this.height / h;\n\n const scale = Math.min(scaleW, scaleH);\n\n positions[9] = positions[11] = positions[13] = positions[15] = this._topHeight * scale;\n positions[17] = positions[19] = positions[21] = positions[23] = this.height - (this._bottomHeight * scale);\n positions[25] = positions[27] = positions[29] = positions[31] = this.height;\n\n positions[2] = positions[10] = positions[18] = positions[26] = this._leftWidth * scale;\n positions[4] = positions[12] = positions[20] = positions[28] = this.width - (this._rightWidth * scale);\n positions[6] = positions[14] = positions[22] = positions[30] = this.width;\n\n this.getBuffer('aPosition').update();\n }\n\n /** Updates the UVs of the vertices. */\n public updateUvs()\n {\n const uvs = this.uvs;\n\n uvs[0] = uvs[8] = uvs[16] = uvs[24] = 0;\n uvs[1] = uvs[3] = uvs[5] = uvs[7] = 0;\n\n uvs[6] = uvs[14] = uvs[22] = uvs[30] = 1;\n uvs[25] = uvs[27] = uvs[29] = uvs[31] = 1;\n\n const _uvw = 1.0 / this._originalWidth;\n const _uvh = 1.0 / this._originalHeight;\n\n uvs[2] = uvs[10] = uvs[18] = uvs[26] = _uvw * this._leftWidth;\n uvs[9] = uvs[11] = uvs[13] = uvs[15] = _uvh * this._topHeight;\n\n uvs[4] = uvs[12] = uvs[20] = uvs[28] = 1 - (_uvw * this._rightWidth);\n uvs[17] = uvs[19] = uvs[21] = uvs[23] = 1 - (_uvh * this._bottomHeight);\n\n this.getBuffer('aUV').update();\n }\n}\n\n","import { ExtensionType } from '../../extensions/Extensions';\nimport { BigPool } from '../../utils/pool/PoolGroup';\nimport { BatchableMesh } from '../mesh/shared/BatchableMesh';\nimport { NineSliceGeometry } from './NineSliceGeometry';\n\nimport type { InstructionSet } from '../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { RenderPipe } from '../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../../rendering/renderers/types';\nimport type { PoolItem } from '../../utils/pool/Pool';\nimport type { NineSliceSprite } from './NineSliceSprite';\n\nexport class NineSliceSpritePipe implements RenderPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'nineSliceSprite',\n } as const;\n\n private readonly _renderer: Renderer;\n private readonly _gpuSpriteHash: Record = Object.create(null);\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public addRenderable(sprite: NineSliceSprite, _instructionSet: InstructionSet)\n {\n const gpuSprite = this._getGpuSprite(sprite);\n\n if (sprite._didSpriteUpdate) this._updateBatchableSprite(sprite, gpuSprite);\n\n this._renderer.renderPipes.batch.addToBatch(gpuSprite);\n }\n\n public updateRenderable(sprite: NineSliceSprite)\n {\n const gpuSprite = this._gpuSpriteHash[sprite.uid];\n\n if (sprite._didSpriteUpdate) this._updateBatchableSprite(sprite, gpuSprite);\n\n gpuSprite.batcher.updateElement(gpuSprite);\n }\n\n public validateRenderable(sprite: NineSliceSprite): boolean\n {\n const texture = sprite._texture;\n const gpuSprite = this._getGpuSprite(sprite);\n\n if (gpuSprite.texture._source !== texture._source)\n {\n return !gpuSprite.batcher.checkAndUpdateTexture(gpuSprite, texture);\n }\n\n return false;\n }\n\n public destroyRenderable(sprite: NineSliceSprite)\n {\n const batchableSprite = this._gpuSpriteHash[sprite.uid];\n\n // this will call reset!\n BigPool.return(batchableSprite as PoolItem);\n\n this._gpuSpriteHash[sprite.uid] = null;\n }\n\n private _updateBatchableSprite(sprite: NineSliceSprite, batchableSprite: BatchableMesh)\n {\n sprite._didSpriteUpdate = false;\n (batchableSprite.geometry as NineSliceGeometry)\n .update(sprite);\n\n // = sprite.bounds;\n batchableSprite.texture = sprite._texture;\n }\n\n private _getGpuSprite(sprite: NineSliceSprite): BatchableMesh\n {\n return this._gpuSpriteHash[sprite.uid] || this._initGPUSprite(sprite);\n }\n\n private _initGPUSprite(sprite: NineSliceSprite): BatchableMesh\n {\n const batchableMesh = new BatchableMesh();\n\n batchableMesh.geometry = new NineSliceGeometry();\n\n batchableMesh.mesh = sprite;\n\n batchableMesh.texture = sprite._texture;\n batchableMesh.roundPixels = (this._renderer._roundPixels | sprite._roundPixels) as 0 | 1;\n\n this._gpuSpriteHash[sprite.uid] = batchableMesh;\n\n // TODO perhaps manage this outside this pipe? (a bit like how we update / add)\n sprite.on('destroyed', () =>\n {\n this.destroyRenderable(sprite);\n });\n\n return batchableMesh;\n }\n\n public destroy()\n {\n for (const i in this._gpuSpriteHash)\n {\n const batchableMesh = this._gpuSpriteHash[i];\n\n batchableMesh.geometry.destroy();\n }\n\n (this._gpuSpriteHash as null) = null;\n (this._renderer as null) = null;\n }\n}\n","import { extensions } from '../../extensions/Extensions';\nimport { NineSliceSpritePipe } from './NineSliceSpritePipe';\n\nextensions.add(NineSliceSpritePipe);\n","import { ExtensionType } from '../extensions/Extensions';\n\nimport type { InstructionSet } from '../rendering/renderers/shared/instructions/InstructionSet';\nimport type { InstructionPipe } from '../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../rendering/renderers/types';\nimport type { Container } from '../scene/container/Container';\nimport type { Effect } from '../scene/container/Effect';\nimport type { FilterInstruction } from './FilterSystem';\n\n// eslint-disable-next-line max-len\nexport class FilterPipe implements InstructionPipe\n{\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'filter',\n } as const;\n\n private _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public push(filterEffect: Effect, container: Container, instructionSet: InstructionSet): void\n {\n const renderPipes = this._renderer.renderPipes;\n\n renderPipes.batch.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'filter',\n canBundle: false,\n action: 'pushFilter',\n container,\n filterEffect,\n } as FilterInstruction);\n }\n\n public pop(_filterEffect: Effect, _container: Container, instructionSet: InstructionSet): void\n {\n this._renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'filter',\n action: 'popFilter',\n canBundle: false,\n });\n }\n\n public execute(instruction: FilterInstruction)\n {\n if (instruction.action === 'pushFilter')\n {\n this._renderer.filter.push(instruction);\n }\n else if (instruction.action === 'popFilter')\n {\n this._renderer.filter.pop();\n }\n }\n\n public destroy(): void\n {\n this._renderer = null;\n }\n}\n","import { Matrix } from '../../../maths/matrix/Matrix';\nimport { boundsPool } from './utils/matrixAndBoundsPool';\n\nimport type { Renderable } from '../../../rendering/renderers/shared/Renderable';\nimport type { Container } from '../Container';\nimport type { Bounds } from './Bounds';\n\n// TODO could we cache local bounds on the render groups?\n\nconst tempMatrix = new Matrix();\n\n/**\n * Does exactly the same as getGlobalBounds, but does instead makes use of transforming AABBs\n * of the various children within the scene graph. This is much faster, but less accurate.\n *\n * the result will never be smaller - only ever slightly larger (in most cases, it will be the same).\n * @param target - The target container to get the bounds from\n * @param bounds - The output bounds object.\n * @returns The bounds.\n */\nexport function getFastGlobalBounds(target: Container, bounds: Bounds): Bounds\n{\n bounds.clear();\n\n _getGlobalBoundsRecursive(target, bounds);\n\n if (!bounds.isValid)\n {\n bounds.set(0, 0, 0, 0);\n }\n\n if (!target.renderGroup)\n {\n bounds.applyMatrix(target.parentRenderGroup.worldTransform);\n }\n else\n {\n bounds.applyMatrix(target.renderGroup.localTransform);\n }\n\n return bounds;\n}\n\nexport function _getGlobalBoundsRecursive(\n target: Container,\n bounds: Bounds,\n)\n{\n if (target.localDisplayStatus !== 0b111 || !target.measurable)\n {\n return;\n }\n\n const manageEffects = !!target.effects.length;\n\n let localBounds = bounds;\n\n if (target.renderGroup || manageEffects)\n {\n localBounds = boundsPool.get().clear();\n }\n\n if (target.boundsArea)\n {\n bounds.addRect(target.boundsArea, target.worldTransform);\n }\n else\n {\n if (target.renderPipeId)\n {\n const viewBounds = (target as Renderable).bounds;\n\n localBounds.addFrame(\n viewBounds.minX,\n viewBounds.minY,\n viewBounds.maxX,\n viewBounds.maxY,\n target.groupTransform\n );\n }\n\n const children = target.children;\n\n for (let i = 0; i < children.length; i++)\n {\n _getGlobalBoundsRecursive(children[i], localBounds);\n }\n }\n\n if (manageEffects)\n {\n let advanced = false;\n\n for (let i = 0; i < target.effects.length; i++)\n {\n if (target.effects[i].addBounds)\n {\n if (!advanced)\n {\n advanced = true;\n localBounds.applyMatrix(target.parentRenderGroup.worldTransform);\n }\n\n target.effects[i].addBounds(localBounds, true);\n }\n }\n\n if (advanced)\n {\n localBounds.applyMatrix(target.parentRenderGroup.worldTransform.copyTo(tempMatrix).invert());\n bounds.addBounds(localBounds, target.relativeGroupTransform);\n }\n\n bounds.addBounds(localBounds);\n boundsPool.return(localBounds);\n }\n else if (target.renderGroup)\n {\n bounds.addBounds(localBounds, target.relativeGroupTransform);\n boundsPool.return(localBounds);\n }\n}\n","import type { Renderable } from '../../../rendering/renderers/shared/Renderable';\nimport type { Bounds } from './Bounds';\n\nexport function getGlobalRenderableBounds(renderables: Renderable[], bounds: Bounds): Bounds\n{\n bounds.clear();\n\n // instead of copying the matrix each time we are assigning it in bounds\n // this is a performance hack :D\n // so we need to restore the matrix after we are done\n\n const tempMatrix = bounds.matrix;\n\n for (let i = 0; i < renderables.length; i++)\n {\n const renderable = renderables[i];\n\n if (renderable.globalDisplayStatus < 0b111)\n {\n continue;\n }\n\n bounds.matrix = renderable.worldTransform;\n renderable.addBounds(bounds);\n }\n\n bounds.matrix = tempMatrix;\n\n return bounds;\n}\n","import { ExtensionType } from '../extensions/Extensions';\nimport { Matrix } from '../maths/matrix/Matrix';\nimport { Point } from '../maths/point/Point';\nimport { BindGroup } from '../rendering/renderers/gpu/shader/BindGroup';\nimport { Geometry } from '../rendering/renderers/shared/geometry/Geometry';\nimport { UniformGroup } from '../rendering/renderers/shared/shader/UniformGroup';\nimport { Texture } from '../rendering/renderers/shared/texture/Texture';\nimport { TexturePool } from '../rendering/renderers/shared/texture/TexturePool';\nimport { type Renderer, RendererType } from '../rendering/renderers/types';\nimport { Bounds } from '../scene/container/bounds/Bounds';\nimport { getFastGlobalBounds } from '../scene/container/bounds/getFastGlobalBounds';\nimport { getGlobalRenderableBounds } from '../scene/container/bounds/getRenderableBounds';\nimport { warn } from '../utils/logging/warn';\n\nimport type { WebGLRenderer } from '../rendering/renderers/gl/WebGLRenderer';\nimport type { WebGPURenderer } from '../rendering/renderers/gpu/WebGPURenderer';\nimport type { Instruction } from '../rendering/renderers/shared/instructions/Instruction';\nimport type { Renderable } from '../rendering/renderers/shared/Renderable';\nimport type { RenderTarget } from '../rendering/renderers/shared/renderTarget/RenderTarget';\nimport type { RenderSurface } from '../rendering/renderers/shared/renderTarget/RenderTargetSystem';\nimport type { System } from '../rendering/renderers/shared/system/System';\nimport type { Container } from '../scene/container/Container';\nimport type { Sprite } from '../scene/sprite/Sprite';\nimport type { Filter } from './Filter';\nimport type { FilterEffect } from './FilterEffect';\n\ntype FilterAction = 'pushFilter' | 'popFilter';\n\n//\nconst quadGeometry = new Geometry({\n attributes: {\n aPosition: {\n buffer: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),\n location: 0,\n format: 'float32x2',\n stride: 2 * 4,\n offset: 0,\n },\n },\n indexBuffer: new Uint32Array([0, 1, 2, 0, 2, 3]),\n});\n\n/**\n * The filter pipeline is responsible for applying filters scene items!\n *\n * KNOWN BUGS:\n * 1. Global bounds calculation is incorrect if it is used when flip flopping filters. The maths can be found below\n * eg: filters [noiseFilter, blurFilter] noiseFilter will calculate the global bounds incorrectly.\n *\n * 2. RenderGroups do not work with filters. This is because the renderGroup matrix is not currently taken into account.\n *\n * Implementation notes:\n * 1. Gotcha - nesting filters that require blending will not work correctly. This creates a chicken and egg problem\n * the complexity and performance required to do this is not worth it i feel.. but lets see if others agree!\n *\n * 2. Filters are designed to be changed on the fly, this is means that changing filter information each frame will\n * not trigger an instruction rebuild. If you are constantly turning a filter on and off.. its therefore better to set\n * enabled to true or false on the filter. Or setting an empty array.\n *\n * 3. Need to look at perhaps aliasing when flip flopping filters. Really we should only need to antialias the FIRST\n * Texture we render too. The rest can be non aliased. This might help performance.\n * Currently we flip flop with an antialiased texture if antialiasing is enabled on the filter.\n */\nexport interface FilterInstruction extends Instruction\n{\n renderPipeId: 'filter',\n action: FilterAction,\n container?: Container,\n renderables?: Renderable[],\n filterEffect: FilterEffect,\n}\n\nexport interface FilterData\n{\n skip: boolean;\n enabledLength?: number;\n inputTexture: Texture\n bounds: Bounds,\n blendRequired: boolean,\n container: Container,\n filterEffect: FilterEffect,\n previousRenderSurface: RenderSurface,\n backTexture?: Texture,\n}\n\n/**\n * System that manages the filter pipeline\n * @memberof rendering\n */\nexport class FilterSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ],\n name: 'filter',\n } as const;\n\n public readonly renderer: Renderer;\n\n private _filterStackIndex = 0;\n private _filterStack: FilterData[] = [];\n\n private readonly _filterGlobalUniforms = new UniformGroup({\n uInputSize: { value: new Float32Array(4), type: 'vec4' },\n uInputPixel: { value: new Float32Array(4), type: 'vec4' },\n uInputClamp: { value: new Float32Array(4), type: 'vec4' },\n uOutputFrame: { value: new Float32Array(4), type: 'vec4' },\n uGlobalFrame: { value: new Float32Array(4), type: 'vec4' },\n uOutputTexture: { value: new Float32Array(4), type: 'vec4' },\n });\n\n private readonly _globalFilterBindGroup: BindGroup = new BindGroup({});\n private _activeFilterData: FilterData;\n\n constructor(renderer: Renderer)\n {\n this.renderer = renderer;\n }\n\n /**\n * The back texture of the currently active filter. Requires the filter to have `blendRequired` set to true.\n * @readonly\n */\n public get activeBackTexture(): Texture | undefined\n {\n return this._activeFilterData?.backTexture;\n }\n\n public push(instruction: FilterInstruction)\n {\n const renderer = this.renderer;\n\n const filters = instruction.filterEffect.filters;\n\n if (!this._filterStack[this._filterStackIndex])\n {\n this._filterStack[this._filterStackIndex] = this._getFilterData();\n }\n\n // get a filter data from the stack. They can be reused multiple times each frame,\n // so we don't need to worry about overwriting them in a single pass.\n const filterData = this._filterStack[this._filterStackIndex];\n\n this._filterStackIndex++;\n\n // if there are no filters, we skip the pass\n if (filters.length === 0)\n {\n filterData.skip = true;\n\n return;\n }\n\n const bounds: Bounds = filterData.bounds;\n\n // this path is used by the blend modes mostly!\n // they collect all renderables and push them into a list.\n // this list is then used to calculate the bounds of the filter area\n if (instruction.renderables)\n {\n getGlobalRenderableBounds(instruction.renderables, bounds);\n }\n // if a filterArea is provided, we save our selves some measuring and just use that area supplied\n else if (instruction.filterEffect.filterArea)\n {\n bounds.clear();\n\n // transform the filterArea into global space..\n bounds.addRect(instruction.filterEffect.filterArea);\n\n // new for v8, we transform the bounds into the space of the container\n bounds.applyMatrix(instruction.container.worldTransform);\n }\n // classic filter path, we get the bounds of the container and use it by recursively\n // measuring.\n else\n {\n getFastGlobalBounds(instruction.container, bounds);\n }\n // get GLOBAL bounds of the item we are going to apply the filter to\n\n const colorTextureSource = renderer.renderTarget.rootRenderTarget.colorTexture.source;\n\n // next we get the settings for the filter\n // we need to find the LOWEST resolution for the filter list\n let resolution = colorTextureSource._resolution;\n\n // Padding is additive to add padding to our padding\n let padding = 0;\n // if this is true for any filter, it should be true\n let antialias = colorTextureSource.antialias;\n // true if any filter requires the previous render target\n let blendRequired = false;\n // true if any filter in the list is enabled\n let enabled = false;\n\n for (let i = 0; i < filters.length; i++)\n {\n const filter = filters[i];\n\n resolution = Math.min(resolution, filter.resolution);\n padding += filter.padding;\n\n if (filter.antialias !== 'inherit')\n {\n if (filter.antialias === 'on')\n {\n antialias = true;\n }\n else\n {\n antialias = false;\n }\n }\n\n const isCompatible = !!(filter.compatibleRenderers & renderer.type);\n\n if (!isCompatible)\n {\n enabled = false;\n break;\n }\n\n if (filter.blendRequired && !((renderer as WebGLRenderer).backBuffer?.useBackBuffer ?? true))\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n warn('Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options.');\n // #endif\n\n enabled = false;\n break;\n }\n\n enabled = filter.enabled || enabled;\n blendRequired = blendRequired || filter.blendRequired;\n }\n\n // if no filters are enabled lets skip!\n if (!enabled)\n {\n filterData.skip = true;\n\n return;\n }\n\n const viewPort = renderer.renderTarget.rootViewPort;\n\n // here we constrain the bounds to the viewport we will render too\n // this should not take into account the x, y offset of the viewport - as this is\n // handled by the viewport on the gpu.\n // need to factor in resolutions also..\n bounds.scale(resolution)\n .fitBounds(0, viewPort.width, 0, viewPort.height)\n .scale(1 / resolution)\n .pad(padding)\n .ceil();\n\n // skip if the bounds are negative or zero as this means they are\n // not visible on the screen\n if (!bounds.isPositive)\n {\n filterData.skip = true;\n\n return;\n }\n\n // set all the filter data\n filterData.skip = false;\n\n filterData.bounds = bounds;\n filterData.blendRequired = blendRequired;\n filterData.container = instruction.container;\n filterData.filterEffect = instruction.filterEffect;\n\n filterData.previousRenderSurface = renderer.renderTarget.renderSurface;\n\n // bind...\n // get a P02 texture from our pool...\n filterData.inputTexture = TexturePool.getOptimalTexture(\n bounds.width,\n bounds.height,\n resolution,\n antialias,\n );\n\n renderer.renderTarget.bind(filterData.inputTexture, true);\n // set the global uniforms to take into account the bounds offset required\n\n renderer.globalUniforms.push({\n offset: bounds,\n });\n }\n\n public pop()\n {\n const renderer = this.renderer;\n\n this._filterStackIndex--;\n const filterData = this._filterStack[this._filterStackIndex];\n\n // if we are skipping this filter then we just do nothing :D\n if (filterData.skip)\n {\n return;\n }\n\n this._activeFilterData = filterData;\n\n const inputTexture = filterData.inputTexture;\n\n const bounds = filterData.bounds;\n\n let backTexture = Texture.EMPTY;\n\n renderer.renderTarget.finishRenderPass();\n\n if (filterData.blendRequired)\n {\n // this actually forces the current commandQueue to render everything so far.\n // if we don't do this, we won't be able to copy pixels for the background\n const previousBounds = this._filterStackIndex > 0 ? this._filterStack[this._filterStackIndex - 1].bounds : null;\n\n const renderTarget = renderer.renderTarget.getRenderTarget(filterData.previousRenderSurface);\n\n backTexture = this.getBackTexture(renderTarget, bounds, previousBounds);\n }\n\n filterData.backTexture = backTexture;\n\n const filters = filterData.filterEffect.filters;\n\n // get a BufferResource from the uniformBatch.\n // this will batch the shader uniform data and give us a buffer resource we can\n // set on our globalUniform Bind Group\n // eslint-disable-next-line max-len\n\n // update the resources on the bind group...\n this._globalFilterBindGroup.setResource(inputTexture.source.style, 2);\n this._globalFilterBindGroup.setResource(backTexture.source, 3);\n\n renderer.globalUniforms.pop();\n\n if (filters.length === 1)\n {\n // render a single filter...\n // this.applyFilter(filters[0], inputTexture, filterData.previousRenderSurface, false);\n filters[0].apply(this, inputTexture, filterData.previousRenderSurface, false);\n\n // return the texture to the pool so we can reuse the next frame\n TexturePool.returnTexture(inputTexture);\n }\n else\n {\n let flip = filterData.inputTexture;\n\n // get another texture that we will render the next filter too\n let flop = TexturePool.getOptimalTexture(\n bounds.width,\n bounds.height,\n flip.source._resolution,\n false\n );\n\n let i = 0;\n\n // loop and apply the filters, omitting the last one as we will render that to the final target\n for (i = 0; i < filters.length - 1; ++i)\n {\n const filter = filters[i];\n\n filter.apply(this, flip, flop, true);\n const t = flip;\n\n flip = flop;\n flop = t;\n }\n\n filters[i].apply(this, flip, filterData.previousRenderSurface, false);\n\n // return those textures for later!\n TexturePool.returnTexture(flip);\n TexturePool.returnTexture(flop);\n }\n\n // if we made a background texture, lets return that also\n if (filterData.blendRequired)\n {\n TexturePool.returnTexture(backTexture);\n }\n }\n\n public getBackTexture(lastRenderSurface: RenderTarget, bounds: Bounds, previousBounds?: Bounds)\n {\n const backgroundResolution = lastRenderSurface.colorTexture.source._resolution;\n\n const backTexture = TexturePool.getOptimalTexture(\n bounds.width,\n bounds.height,\n backgroundResolution,\n false,\n );\n\n let x = bounds.minX;\n let y = bounds.minY;\n\n if (previousBounds)\n {\n x -= previousBounds.minX;\n y -= previousBounds.minY;\n }\n\n x = Math.floor(x * backgroundResolution);\n y = Math.floor(y * backgroundResolution);\n\n const width = Math.ceil(bounds.width * backgroundResolution);\n const height = Math.ceil(bounds.height * backgroundResolution);\n\n this.renderer.renderTarget.copyToTexture(\n lastRenderSurface,\n backTexture,\n { x, y },\n { width, height },\n { x: 0, y: 0 }\n );\n\n return backTexture;\n }\n\n public applyFilter(filter: Filter, input: Texture, output: RenderSurface, clear: boolean)\n {\n const renderer = this.renderer;\n\n const filterData = this._filterStack[this._filterStackIndex];\n\n const bounds = filterData.bounds;\n\n const offset = Point.shared;\n const previousRenderSurface = filterData.previousRenderSurface;\n\n const isFinalTarget = previousRenderSurface === output;\n\n let resolution = this.renderer.renderTarget.rootRenderTarget.colorTexture.source._resolution;\n\n // to find the previous resolution we need to account for the skipped filters\n // the following will find the last non skipped filter...\n let currentIndex = this._filterStackIndex - 1;\n\n while (currentIndex > 0 && this._filterStack[currentIndex].skip)\n {\n --currentIndex;\n }\n\n if (currentIndex > 0)\n {\n resolution = this._filterStack[currentIndex].inputTexture.source._resolution;\n }\n\n const filterUniforms = this._filterGlobalUniforms;\n const uniforms = filterUniforms.uniforms;\n\n const outputFrame = uniforms.uOutputFrame;\n const inputSize = uniforms.uInputSize;\n const inputPixel = uniforms.uInputPixel;\n const inputClamp = uniforms.uInputClamp;\n const globalFrame = uniforms.uGlobalFrame;\n const outputTexture = uniforms.uOutputTexture;\n\n // are we rendering back to the original surface?\n if (isFinalTarget)\n {\n let lastIndex = this._filterStackIndex;\n\n // get previous bounds.. we must take into account skipped filters also..\n while (lastIndex > 0)\n {\n lastIndex--;\n const filterData = this._filterStack[this._filterStackIndex - 1];\n\n if (!filterData.skip)\n {\n offset.x = filterData.bounds.minX;\n offset.y = filterData.bounds.minY;\n\n break;\n }\n }\n\n outputFrame[0] = bounds.minX - offset.x;\n outputFrame[1] = bounds.minY - offset.y;\n }\n else\n {\n outputFrame[0] = 0;\n outputFrame[1] = 0;\n }\n\n outputFrame[2] = input.frame.width;\n outputFrame[3] = input.frame.height;\n\n inputSize[0] = input.source.width;\n inputSize[1] = input.source.height;\n inputSize[2] = 1 / inputSize[0];\n inputSize[3] = 1 / inputSize[1];\n\n inputPixel[0] = input.source.pixelWidth;\n inputPixel[1] = input.source.pixelHeight;\n inputPixel[2] = 1.0 / inputPixel[0];\n inputPixel[3] = 1.0 / inputPixel[1];\n\n inputClamp[0] = 0.5 * inputPixel[2];\n inputClamp[1] = 0.5 * inputPixel[3];\n inputClamp[2] = (input.frame.width * inputSize[2]) - (0.5 * inputPixel[2]);\n inputClamp[3] = (input.frame.height * inputSize[3]) - (0.5 * inputPixel[3]);\n\n const rootTexture = this.renderer.renderTarget.rootRenderTarget.colorTexture;\n\n globalFrame[0] = offset.x * resolution;\n globalFrame[1] = offset.y * resolution;\n\n globalFrame[2] = rootTexture.source.width * resolution;\n globalFrame[3] = rootTexture.source.height * resolution;\n\n // set the output texture - this is where we are going to render to\n\n const renderTarget = this.renderer.renderTarget.getRenderTarget(output);\n\n renderer.renderTarget.bind(output, !!clear);\n\n if (output instanceof Texture)\n {\n outputTexture[0] = output.frame.width;\n outputTexture[1] = output.frame.height;\n }\n else\n {\n // this means a renderTarget was passed directly\n outputTexture[0] = renderTarget.width;\n outputTexture[1] = renderTarget.height;\n }\n\n outputTexture[2] = renderTarget.isRoot ? -1 : 1;\n filterUniforms.update();\n\n // TODO - should prolly use a adaptor...\n if ((renderer as WebGPURenderer).renderPipes.uniformBatch)\n {\n const batchUniforms = (renderer as WebGPURenderer).renderPipes.uniformBatch\n .getUboResource(filterUniforms);\n\n this._globalFilterBindGroup.setResource(batchUniforms, 0);\n }\n else\n {\n this._globalFilterBindGroup.setResource(filterUniforms, 0);\n }\n\n // now lets update the output texture...\n\n // set bind group..\n this._globalFilterBindGroup.setResource(input.source, 1);\n this._globalFilterBindGroup.setResource(input.source.style, 2);\n\n filter.groups[0] = this._globalFilterBindGroup;\n\n renderer.encoder.draw({\n geometry: quadGeometry,\n shader: filter,\n state: filter._state,\n topology: 'triangle-list'\n });\n\n // WebGPU blit's automatically, but WebGL does not!\n if (renderer.type === RendererType.WEBGL)\n {\n renderer.renderTarget.finishRenderPass();\n }\n }\n\n private _getFilterData(): FilterData\n {\n return {\n skip: false,\n inputTexture: null,\n bounds: new Bounds(),\n container: null,\n filterEffect: null,\n blendRequired: false,\n previousRenderSurface: null,\n };\n }\n\n /**\n * Multiply _input normalized coordinates_ to this matrix to get _sprite texture normalized coordinates_.\n *\n * Use `outputMatrix * vTextureCoord` in the shader.\n * @param outputMatrix - The matrix to output to.\n * @param {Sprite} sprite - The sprite to map to.\n * @returns The mapped matrix.\n */\n public calculateSpriteMatrix(outputMatrix: Matrix, sprite: Sprite): Matrix\n {\n const data = this._activeFilterData;\n\n const mappedMatrix = outputMatrix.set(\n data.inputTexture._source.width,\n 0, 0,\n data.inputTexture._source.height,\n data.bounds.minX, data.bounds.minY\n );\n\n const worldTransform = sprite.worldTransform.copyTo(Matrix.shared);\n\n worldTransform.invert();\n mappedMatrix.prepend(worldTransform);\n mappedMatrix.scale(\n 1.0 / sprite.texture.frame.width,\n 1.0 / sprite.texture.frame.height\n );\n\n mappedMatrix.translate(sprite.anchor.x, sprite.anchor.y);\n\n return mappedMatrix;\n }\n\n public destroy?: () => void;\n}\n","import { extensions } from '../extensions/Extensions';\nimport { FilterPipe } from './FilterPipe';\nimport { FilterSystem } from './FilterSystem';\n\nextensions.add(FilterSystem);\nextensions.add(FilterPipe);\n","import { extensions, ExtensionType } from '../extensions/Extensions';\n\nconst environments: { name: string; value: { test: () => boolean; load: () => Promise } }[] = [];\n\nextensions.handleByNamedList(ExtensionType.Environment, environments);\n\n/**\n * Automatically detects the environment and loads the appropriate extensions.\n * @param skip - whether to skip loading the default extensions\n */\nexport async function loadEnvironmentExtensions(skip: boolean): Promise\n{\n if (skip) return;\n\n for (let i = 0; i < environments.length; i++)\n {\n const env = environments[i];\n\n if (env.value.test())\n {\n await env.value.load();\n\n return;\n }\n }\n}\n\n/**\n * @param add - whether to add the default imports to the bundle\n * @deprecated since 8.1.6. Use `loadEnvironmentExtensions` instead\n */\nexport async function autoDetectEnvironment(add: boolean): Promise\n{\n return loadEnvironmentExtensions(!add);\n}\n","// Cache the result to prevent running this over and over\nlet unsafeEval: boolean;\n\n/**\n * Not all platforms allow to generate function code (e.g., `new Function`).\n * this provides the platform-level detection.\n * @private\n * @returns {boolean} `true` if `new Function` is supported.\n */\nexport function unsafeEvalSupported(): boolean\n{\n if (typeof unsafeEval === 'boolean')\n {\n return unsafeEval;\n }\n\n try\n {\n /* eslint-disable no-new-func */\n const func = new Function('param1', 'param2', 'param3', 'return param1[param2] === param3;');\n /* eslint-enable no-new-func */\n\n unsafeEval = func({ a: 'b' }, 'a', 'b') === true;\n }\n catch (e)\n {\n unsafeEval = false;\n }\n\n return unsafeEval;\n}\n","export enum CLEAR\n// eslint-disable-next-line @typescript-eslint/indent\n{\n NONE = 0,\n COLOR = 16384,\n STENCIL = 1024,\n DEPTH = 256,\n\n COLOR_DEPTH = COLOR | DEPTH,\n COLOR_STENCIL = COLOR | STENCIL,\n DEPTH_STENCIL = DEPTH | STENCIL,\n ALL = COLOR | DEPTH | STENCIL,\n\n}\n\n/** Used for clearing render textures. true is the same as `ALL` false is the same as `NONE` */\nexport type CLEAR_OR_BOOL = CLEAR | boolean;\n","/**\n * SystemRunner is used internally by the renderers as an efficient way for systems to\n * be notified about what the renderer is up to during the rendering phase.\n *\n * ```\n * import { SystemRunner } from 'pixi.js';\n *\n * const myObject = {\n * loaded: new SystemRunner('loaded')\n * }\n *\n * const listener = {\n * loaded: function(){\n * // thin\n * }\n * }\n *\n * myObject.loaded.add(listener);\n *\n * myObject.loaded.emit();\n * ```\n *\n * Or for handling calling the same function on many items\n * ```\n * import { SystemRunner } from 'pixi.js';\n *\n * const myGame = {\n * update: new SystemRunner('update')\n * }\n *\n * const gameObject = {\n * update: function(time){\n * // update my gamey state\n * }\n * }\n *\n * myGame.update.add(gameObject);\n *\n * myGame.update.emit(time);\n * ```\n * @memberof rendering\n */\nexport class SystemRunner\n{\n public items: any[];\n private _name: string;\n\n /**\n * @param name - The function name that will be executed on the listeners added to this Runner.\n */\n constructor(name: string)\n {\n this.items = [];\n this._name = name;\n }\n\n /* eslint-disable jsdoc/require-param, jsdoc/check-param-names */\n /**\n * Dispatch/Broadcast Runner to all listeners added to the queue.\n * @param {...any} params - (optional) parameters to pass to each listener\n */\n /* eslint-enable jsdoc/require-param, jsdoc/check-param-names */\n public emit(a0?: unknown, a1?: unknown, a2?: unknown, a3?: unknown,\n a4?: unknown, a5?: unknown, a6?: unknown, a7?: unknown): this\n {\n const { name, items } = this;\n\n for (let i = 0, len = items.length; i < len; i++)\n {\n items[i][name](a0, a1, a2, a3, a4, a5, a6, a7);\n }\n\n return this;\n }\n\n /**\n * Add a listener to the Runner\n *\n * Runners do not need to have scope or functions passed to them.\n * All that is required is to pass the listening object and ensure that it has contains a function that has the same name\n * as the name provided to the Runner when it was created.\n *\n * Eg A listener passed to this Runner will require a 'complete' function.\n *\n * ```\n * import { Runner } from 'pixi.js';\n *\n * const complete = new Runner('complete');\n * ```\n *\n * The scope used will be the object itself.\n * @param {any} item - The object that will be listening.\n */\n public add(item: unknown): this\n {\n if ((item as any)[this._name])\n {\n this.remove(item);\n this.items.push(item);\n }\n\n return this;\n }\n\n /**\n * Remove a single listener from the dispatch queue.\n * @param {any} item - The listener that you would like to remove.\n */\n public remove(item: unknown): this\n {\n const index = this.items.indexOf(item);\n\n if (index !== -1)\n {\n this.items.splice(index, 1);\n }\n\n return this;\n }\n\n /**\n * Check to see if the listener is already in the Runner\n * @param {any} item - The listener that you would like to check.\n */\n public contains(item: unknown): boolean\n {\n return this.items.indexOf(item) !== -1;\n }\n\n /** Remove all listeners from the Runner */\n public removeAll(): this\n {\n this.items.length = 0;\n\n return this;\n }\n\n /** Remove all references, don't use after this. */\n public destroy(): void\n {\n this.removeAll();\n this.items = null;\n this._name = null;\n }\n\n /**\n * `true` if there are no this Runner contains no listeners\n * @readonly\n */\n public get empty(): boolean\n {\n return this.items.length === 0;\n }\n\n /**\n * The name of the runner.\n * @readonly\n */\n public get name(): string\n {\n return this._name;\n }\n}\n","import { Color } from '../../../../color/Color';\nimport { loadEnvironmentExtensions } from '../../../../environment/autoDetectEnvironment';\nimport { Container } from '../../../../scene/container/Container';\nimport { unsafeEvalSupported } from '../../../../utils/browser/unsafeEvalSupported';\nimport { deprecation, v8_0_0 } from '../../../../utils/logging/deprecation';\nimport { EventEmitter } from '../../../../utils/utils';\nimport { CLEAR } from '../../gl/const';\nimport { SystemRunner } from './SystemRunner';\n\nimport type { ColorSource, RgbaArray } from '../../../../color/Color';\nimport type { ICanvas } from '../../../../environment/canvas/ICanvas';\nimport type { Matrix } from '../../../../maths/matrix/Matrix';\nimport type { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport type { TypeOrBool } from '../../../../scene/container/destroyTypes';\nimport type { CLEAR_OR_BOOL } from '../../gl/const';\nimport type { Renderer } from '../../types';\nimport type { BackgroundSystem } from '../background/BackgroundSystem';\nimport type { GenerateTextureOptions, GenerateTextureSystem } from '../extract/GenerateTextureSystem';\nimport type { PipeConstructor } from '../instructions/RenderPipe';\nimport type { RenderSurface } from '../renderTarget/RenderTargetSystem';\nimport type { Texture } from '../texture/Texture';\nimport type { ViewSystem, ViewSystemDestroyOptions } from '../view/ViewSystem';\nimport type { SharedRendererOptions } from './SharedSystems';\nimport type { System, SystemConstructor } from './System';\n\nexport interface RendererConfig\n{\n type: number;\n name: string;\n runners?: string[];\n systems: {name: string, value: SystemConstructor}[];\n renderPipes: {name: string, value: PipeConstructor}[];\n renderPipeAdaptors: {name: string, value: any}[];\n}\n\n/**\n * The options for rendering a view.\n * @memberof rendering\n */\nexport interface RenderOptions extends ClearOptions\n{\n /** The container to render. */\n container: Container;\n /** the transform to apply to the container. */\n transform?: Matrix;\n}\n\n/**\n * The options for clearing the render target.\n * @memberof rendering\n */\nexport interface ClearOptions\n{\n /** The render target to render. */\n target?: RenderSurface;\n /** The color to clear with. */\n clearColor?: ColorSource;\n /** The clear mode to use. */\n clear?: CLEAR_OR_BOOL\n}\n\nexport type RendererDestroyOptions = TypeOrBool;\n\nconst defaultRunners = [\n 'init',\n 'destroy',\n 'contextChange',\n 'resolutionChange',\n 'reset',\n 'renderEnd',\n 'renderStart',\n 'render',\n 'update',\n 'postrender',\n 'prerender'\n] as const;\n\ntype DefaultRunners = typeof defaultRunners[number];\ntype Runners = {[key in DefaultRunners]: SystemRunner} & {\n // eslint-disable-next-line @typescript-eslint/ban-types\n [K: ({} & string) | ({} & symbol)]: SystemRunner;\n};\n\n/* eslint-disable max-len */\n/**\n * The base class for a PixiJS Renderer. It contains the shared logic for all renderers.\n *\n * You should not use this class directly, but instead use {@linkrendering.WebGLRenderer}\n * or {@link rendering.WebGPURenderer}.\n * Alternatively, you can also use {@link rendering.autoDetectRenderer} if you want us to\n * determine the best renderer for you.\n *\n * The renderer is composed of systems that manage specific tasks. The following systems are added by default\n * whenever you create a renderer:\n *\n *\n * | Generic Systems | Systems that manage functionality that all renderer types share |\n * | ------------------------------------ | ----------------------------------------------------------------------------- |\n * | {@link rendering.ViewSystem} | This manages the main view of the renderer usually a Canvas |\n * | {@link rendering.BackgroundSystem} | This manages the main views background color and alpha |\n * | {@link events.EventSystem} | This manages UI events. |\n * | {@link accessibility.AccessibilitySystem} | This manages accessibility features. Requires `import 'pixi.js/accessibility'`|\n *\n * | Core Systems | Provide an optimised, easy to use API to work with WebGL/WebGPU |\n * | ------------------------------------ | ----------------------------------------------------------------------------- |\n * | {@link rendering.RenderGroupSystem} | This manages the what what we are rendering to (eg - canvas or texture) |\n * | {@link rendering.GlobalUniformSystem} | This manages shaders, programs that run on the GPU to calculate 'em pixels. |\n * | {@link rendering.TextureGCSystem} | This will automatically remove textures from the GPU if they are not used. |\n *\n * | PixiJS High-Level Systems | Set of specific systems designed to work with PixiJS objects |\n * | ------------------------------------ | ----------------------------------------------------------------------------- |\n * | {@link rendering.HelloSystem} | Says hello, buy printing out the pixi version into the console log (along with the renderer type) |\n * | {@link rendering.GenerateTextureSystem} | This adds the ability to generate textures from any Container |\n * | {@link rendering.FilterSystem} | This manages the filtering pipeline for post-processing effects. |\n * | {@link rendering.PrepareSystem} | This manages uploading assets to the GPU. Requires `import 'pixi.js/prepare'`|\n * | {@link rendering.ExtractSystem} | This extracts image data from display objects. |\n *\n * The breadth of the API surface provided by the renderer is contained within these systems.\n * @abstract\n * @memberof rendering\n * @property {rendering.HelloSystem} hello - HelloSystem instance.\n * @property {rendering.RenderGroupSystem} renderGroup - RenderGroupSystem instance.\n * @property {rendering.TextureGCSystem} textureGC - TextureGCSystem instance.\n * @property {rendering.FilterSystem} filter - FilterSystem instance.\n * @property {rendering.GlobalUniformSystem} globalUniforms - GlobalUniformSystem instance.\n * @property {rendering.TextureSystem} texture - TextureSystem instance.\n * @property {rendering.EventSystem} events - EventSystem instance.\n * @property {rendering.ExtractSystem} extract - ExtractSystem instance. Requires `import 'pixi.js/extract'`.\n * @property {rendering.PrepareSystem} prepare - PrepareSystem instance. Requires `import 'pixi.js/prepare'`.\n * @property {rendering.AccessibilitySystem} accessibility - AccessibilitySystem instance. Requires `import 'pixi.js/accessibility'`.\n */\n/* eslint-enable max-len */\nexport class AbstractRenderer<\n PIPES, OPTIONS extends SharedRendererOptions, CANVAS extends ICanvas = HTMLCanvasElement\n> extends EventEmitter<{resize: [number, number]}>\n{\n /** The default options for the renderer. */\n public static defaultOptions = {\n /**\n * Default resolution / device pixel ratio of the renderer.\n * @default 1\n */\n resolution: 1,\n /**\n * Should the `failIfMajorPerformanceCaveat` flag be enabled as a context option used in the `isWebGLSupported`\n * function. If set to true, a WebGL renderer can fail to be created if the browser thinks there could be\n * performance issues when using WebGL.\n *\n * In PixiJS v6 this has changed from true to false by default, to allow WebGL to work in as many\n * scenarios as possible. However, some users may have a poor experience, for example, if a user has a gpu or\n * driver version blacklisted by the\n * browser.\n *\n * If your application requires high performance rendering, you may wish to set this to false.\n * We recommend one of two options if you decide to set this flag to false:\n *\n * 1: Use the Canvas renderer as a fallback in case high performance WebGL is\n * not supported.\n *\n * 2: Call `isWebGLSupported` (which if found in the utils package) in your code before attempting to create a\n * PixiJS renderer, and show an error message to the user if the function returns false, explaining that their\n * device & browser combination does not support high performance WebGL.\n * This is a much better strategy than trying to create a PixiJS renderer and finding it then fails.\n * @default false\n */\n failIfMajorPerformanceCaveat: false,\n /**\n * Should round pixels be forced when rendering?\n * @default false\n */\n roundPixels: false\n };\n\n public readonly type: number;\n /** The name of the renderer. */\n public readonly name: string;\n\n public _roundPixels: 0 | 1;\n\n public readonly runners: Runners = Object.create(null) as Runners;\n public readonly renderPipes = Object.create(null) as PIPES;\n /** The view system manages the main canvas that is attached to the DOM */\n public view!: ViewSystem;\n /** The background system manages the background color and alpha of the main view. */\n public background: BackgroundSystem;\n /** System that manages the generation of textures from the renderer */\n public textureGenerator: GenerateTextureSystem;\n\n protected _initOptions: OPTIONS = {} as OPTIONS;\n protected config: RendererConfig;\n\n private _systemsHash: Record = Object.create(null);\n private _lastObjectRendered: Container;\n\n /**\n * Set up a system with a collection of SystemClasses and runners.\n * Systems are attached dynamically to this class when added.\n * @param config - the config for the system manager\n */\n constructor(config: RendererConfig)\n {\n super();\n this.type = config.type;\n this.name = config.name;\n this.config = config;\n\n const combinedRunners = [...defaultRunners, ...(this.config.runners ?? [])];\n\n this._addRunners(...combinedRunners);\n // Validation check that this environment support `new Function`\n this._unsafeEvalCheck();\n }\n\n /**\n * Initialize the renderer.\n * @param options - The options to use to create the renderer.\n */\n public async init(options: Partial = {})\n {\n const skip = options.skipExtensionImports === true ? true : options.manageImports === false;\n\n await loadEnvironmentExtensions(skip);\n\n this._addSystems(this.config.systems);\n this._addPipes(this.config.renderPipes, this.config.renderPipeAdaptors);\n\n // loop through all systems...\n for (const systemName in this._systemsHash)\n {\n const system = this._systemsHash[systemName];\n\n const defaultSystemOptions = (system.constructor as any).defaultOptions;\n\n options = { ...defaultSystemOptions, ...options };\n }\n\n options = { ...AbstractRenderer.defaultOptions, ...options };\n this._roundPixels = options.roundPixels ? 1 : 0;\n\n // await emits..\n for (let i = 0; i < this.runners.init.items.length; i++)\n {\n await this.runners.init.items[i].init(options);\n }\n\n // store options\n this._initOptions = options as OPTIONS;\n }\n\n /**\n * Renders the object to its view.\n * @param options - The options to render with.\n * @param options.container - The container to render.\n * @param [options.target] - The target to render to.\n */\n public render(options: RenderOptions | Container): void;\n /** @deprecated since 8.0.0 */\n public render(container: Container, options: {renderTexture: any}): void;\n public render(args: RenderOptions | Container, deprecated?: {renderTexture: any}): void\n {\n let options = args;\n\n if (options instanceof Container)\n {\n options = { container: options };\n\n if (deprecated)\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'passing a second argument is deprecated, please use render options instead');\n // #endif\n\n options.target = deprecated.renderTexture;\n }\n }\n\n options.target ||= this.view.renderTarget;\n\n // TODO: we should eventually fix events so that it can handle multiple canvas elements\n if (options.target === this.view.renderTarget)\n {\n // TODO get rid of this\n this._lastObjectRendered = options.container;\n options.clearColor = this.background.colorRgba;\n }\n\n if (options.clearColor)\n {\n const isRGBAArray = Array.isArray(options.clearColor) && options.clearColor.length === 4;\n\n options.clearColor = isRGBAArray ? options.clearColor : Color.shared.setValue(options.clearColor).toArray();\n }\n\n if (!options.transform)\n {\n options.container.updateLocalTransform();\n options.transform = options.container.localTransform;\n }\n\n this.runners.prerender.emit(options);\n this.runners.renderStart.emit(options);\n this.runners.render.emit(options);\n this.runners.renderEnd.emit(options);\n this.runners.postrender.emit(options);\n }\n\n /**\n * Resizes the WebGL view to the specified width and height.\n * @param desiredScreenWidth - The desired width of the screen.\n * @param desiredScreenHeight - The desired height of the screen.\n * @param resolution - The resolution / device pixel ratio of the renderer.\n */\n public resize(desiredScreenWidth: number, desiredScreenHeight: number, resolution?: number): void\n {\n this.view.resize(desiredScreenWidth, desiredScreenHeight, resolution);\n this.emit('resize', this.view.screen.width, this.view.screen.height);\n }\n\n public clear(options: ClearOptions = {}): void\n {\n // override!\n const renderer = this as unknown as Renderer;\n\n options.target ||= renderer.renderTarget.renderTarget;\n options.clearColor ||= this.background.colorRgba;\n options.clear ??= CLEAR.ALL;\n\n const { clear, clearColor, target } = options;\n\n Color.shared.setValue(clearColor ?? this.background.colorRgba);\n\n renderer.renderTarget.clear(target, clear, Color.shared.toArray() as RgbaArray);\n }\n\n /** The resolution / device pixel ratio of the renderer. */\n get resolution(): number\n {\n return this.view.resolution;\n }\n\n set resolution(value: number)\n {\n this.view.resolution = value;\n this.runners.resolutionChange.emit(value);\n }\n\n /**\n * Same as view.width, actual number of pixels in the canvas by horizontal.\n * @member {number}\n * @readonly\n * @default 800\n */\n get width(): number\n {\n return this.view.texture.frame.width;\n }\n\n /**\n * Same as view.height, actual number of pixels in the canvas by vertical.\n * @default 600\n */\n get height(): number\n {\n return this.view.texture.frame.height;\n }\n\n // NOTE: this was `view` in v7\n /**\n * The canvas element that everything is drawn to.\n * @type {environment.ICanvas}\n */\n get canvas(): CANVAS\n {\n return this.view.canvas as CANVAS;\n }\n\n /**\n * the last object rendered by the renderer. Useful for other plugins like interaction managers\n * @readonly\n */\n get lastObjectRendered(): Container\n {\n return this._lastObjectRendered;\n }\n\n /**\n * Flag if we are rendering to the screen vs renderTexture\n * @readonly\n * @default true\n */\n get renderingToScreen(): boolean\n {\n const renderer = this as unknown as Renderer;\n\n return renderer.renderTarget.renderingToScreen;\n }\n\n /**\n * Measurements of the screen. (0, 0, screenWidth, screenHeight).\n *\n * Its safe to use as filterArea or hitArea for the whole stage.\n */\n get screen(): Rectangle\n {\n return this.view.screen;\n }\n\n /**\n * Create a bunch of runners based of a collection of ids\n * @param runnerIds - the runner ids to add\n */\n private _addRunners(...runnerIds: string[]): void\n {\n runnerIds.forEach((runnerId) =>\n {\n this.runners[runnerId] = new SystemRunner(runnerId);\n });\n }\n\n private _addSystems(systems: RendererConfig['systems']): void\n {\n let i: keyof typeof systems;\n\n for (i in systems)\n {\n const val = systems[i];\n\n this._addSystem(val.value, val.name);\n }\n }\n\n /**\n * Add a new system to the renderer.\n * @param ClassRef - Class reference\n * @param name - Property name for system, if not specified\n * will use a static `name` property on the class itself. This\n * name will be assigned as s property on the Renderer so make\n * sure it doesn't collide with properties on Renderer.\n * @returns Return instance of renderer\n */\n private _addSystem(ClassRef: SystemConstructor, name: string): this\n {\n const system = new ClassRef(this as unknown as Renderer);\n\n if ((this as any)[name])\n {\n throw new Error(`Whoops! The name \"${name}\" is already in use`);\n }\n\n (this as any)[name] = system;\n\n this._systemsHash[name] = system;\n\n for (const i in this.runners)\n {\n this.runners[i].add(system);\n }\n\n return this;\n }\n\n private _addPipes(pipes: RendererConfig['renderPipes'], pipeAdaptors: RendererConfig['renderPipeAdaptors']): void\n {\n const adaptors = pipeAdaptors.reduce((acc, adaptor) =>\n {\n acc[adaptor.name] = adaptor.value;\n\n return acc;\n }, {} as Record);\n\n pipes.forEach((pipe) =>\n {\n const PipeClass = pipe.value;\n const name = pipe.name;\n\n const Adaptor = adaptors[name];\n\n // sorry typescript..\n (this.renderPipes as any)[name] = new PipeClass(\n this as unknown as Renderer,\n Adaptor ? new Adaptor() : null\n );\n });\n }\n\n public destroy(options: RendererDestroyOptions = false): void\n {\n this.runners.destroy.items.reverse();\n this.runners.destroy.emit(options);\n\n // destroy all runners\n Object.values(this.runners).forEach((runner) =>\n {\n runner.destroy();\n });\n\n this._systemsHash = null;\n\n // destroy all pipes\n (this.renderPipes as null) = null;\n }\n\n /**\n * Generate a texture from a container.\n * @param options - options or container target to use when generating the texture\n * @returns a texture\n */\n public generateTexture(options: GenerateTextureOptions | Container): Texture\n {\n return this.textureGenerator.generateTexture(options);\n }\n\n /**\n * Whether the renderer will round coordinates to whole pixels when rendering.\n * Can be overridden on a per scene item basis.\n */\n get roundPixels(): boolean\n {\n return !!this._roundPixels;\n }\n\n /**\n * Overrideable function by `pixi.js/unsafe-eval` to silence\n * throwing an error if platform doesn't support unsafe-evals.\n * @private\n * @ignore\n */\n public _unsafeEvalCheck(): void\n {\n if (!unsafeEvalSupported())\n {\n throw new Error('Current environment does not allow unsafe-eval, '\n + 'please use pixi.js/unsafe-eval module to enable support.');\n }\n }\n}\n","import { DOMAdapter } from '../../environment/adapter';\nimport { AbstractRenderer } from '../../rendering/renderers/shared/system/AbstractRenderer';\n\nlet _isWebGLSupported: boolean | undefined;\n\n/**\n * Helper for checking for WebGL support.\n * @param failIfMajorPerformanceCaveat - whether to fail if there is a major performance caveat, defaults to false\n * @memberof utils\n * @function isWebGLSupported\n * @returns {boolean} Is WebGL supported.\n */\nexport function isWebGLSupported(\n failIfMajorPerformanceCaveat?: boolean\n): boolean\n{\n if (_isWebGLSupported !== undefined) return _isWebGLSupported;\n\n _isWebGLSupported = ((): boolean =>\n {\n const contextOptions = {\n stencil: true,\n failIfMajorPerformanceCaveat:\n failIfMajorPerformanceCaveat\n ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat,\n };\n\n try\n {\n if (!DOMAdapter.get().getWebGLRenderingContext())\n {\n return false;\n }\n\n const canvas = DOMAdapter.get().createCanvas();\n let gl = canvas.getContext('webgl', contextOptions);\n\n const success = !!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 return _isWebGLSupported;\n}\n","import { DOMAdapter } from '../../environment/adapter';\n\nlet _isWebGPUSupported: boolean | undefined;\n\n/**\n * Helper for checking for WebGPU support.\n * @param options - The options for requesting a GPU adapter.\n * @memberof utils\n * @function isWebGPUSupported\n * @returns Is WebGPU supported.\n */\nexport async function isWebGPUSupported(options: GPURequestAdapterOptions = {}): Promise\n{\n if (_isWebGPUSupported !== undefined) return _isWebGPUSupported;\n\n _isWebGPUSupported = await (async (): Promise =>\n {\n const gpu = DOMAdapter.get().getNavigator().gpu;\n\n if (!gpu)\n {\n return false;\n }\n\n try\n {\n const adapter = await navigator.gpu.requestAdapter(options) as GPUAdapter;\n\n // TODO and one of these!\n await adapter.requestDevice();\n\n return true;\n }\n catch (e)\n {\n return false;\n }\n })();\n\n return _isWebGPUSupported;\n}\n","import { isWebGLSupported } from '../../utils/browser/isWebGLSupported';\nimport { isWebGPUSupported } from '../../utils/browser/isWebGPUSupported';\nimport { AbstractRenderer } from './shared/system/AbstractRenderer';\n\nimport type { WebGLOptions } from './gl/WebGLRenderer';\nimport type { WebGPUOptions } from './gpu/WebGPURenderer';\nimport type { Renderer, RendererOptions } from './types';\n\n/**\n * Options for {@link rendering.autoDetectRenderer}.\n * @memberof rendering\n */\nexport interface AutoDetectOptions extends RendererOptions\n{\n /** The preferred renderer type. WebGPU is recommended as its generally faster than WebGL. */\n preference?: 'webgl' | 'webgpu'// | 'canvas';\n /** Optional WebGPUOptions to pass only to WebGPU renderer. */\n webgpu?: Partial;\n /** Optional WebGLOptions to pass only to the WebGL renderer */\n webgl?: Partial;\n}\n\nconst renderPriority = ['webgl', 'webgpu', 'canvas'];\n\n/**\n * Automatically determines the most appropriate renderer for the current environment.\n *\n * The function will prioritize the WebGL renderer as it is the most tested safe API to use.\n * In the near future as WebGPU becomes more stable and ubiquitous, it will be prioritized over WebGL.\n *\n * The selected renderer's code is then dynamically imported to optimize\n * performance and minimize the initial bundle size.\n *\n * To maximize the benefits of dynamic imports, it's recommended to use a modern bundler\n * that supports code splitting. This will place the renderer code in a separate chunk,\n * which is loaded only when needed.\n * @example\n *\n * // create a renderer\n * const renderer = await autoDetectRenderer({\n * width: 800,\n * height: 600,\n * antialias: true,\n * });\n *\n * // custom for each renderer\n * const renderer = await autoDetectRenderer({\n * width: 800,\n * height: 600,\n * webgpu:{\n * antialias: true,\n * backgroundColor: 'red'\n * },\n * webgl:{\n * antialias: true,\n * backgroundColor: 'green'\n * }\n * });\n * @param options - A partial configuration object based on the `AutoDetectOptions` type.\n * @returns A Promise that resolves to an instance of the selected renderer.\n * @memberof rendering\n */\nexport async function autoDetectRenderer(options: Partial): Promise\n{\n let preferredOrder: string[] = [];\n\n if (options.preference)\n {\n preferredOrder.push(options.preference);\n\n renderPriority.forEach((item) =>\n {\n if (item !== options.preference)\n {\n preferredOrder.push(item);\n }\n });\n }\n else\n {\n preferredOrder = renderPriority.slice();\n }\n\n let RendererClass: new () => Renderer;\n let finalOptions: Partial = {};\n\n for (let i = 0; i < preferredOrder.length; i++)\n {\n const rendererType = preferredOrder[i];\n\n if (rendererType === 'webgpu' && (await isWebGPUSupported()))\n {\n const { WebGPURenderer } = await import('./gpu/WebGPURenderer');\n\n RendererClass = WebGPURenderer;\n\n finalOptions = { ...options, ...options.webgpu };\n\n break;\n }\n else if (\n rendererType === 'webgl'\n && isWebGLSupported(\n options.failIfMajorPerformanceCaveat\n ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat\n )\n )\n {\n const { WebGLRenderer } = await import('./gl/WebGLRenderer');\n\n RendererClass = WebGLRenderer;\n\n finalOptions = { ...options, ...options.webgl };\n\n break;\n }\n else if (rendererType === 'canvas')\n {\n finalOptions = { ...options };\n\n throw new Error('CanvasRenderer is not yet implemented');\n }\n }\n\n delete finalOptions.webgpu;\n delete finalOptions.webgl;\n\n if (!RendererClass)\n {\n throw new Error('No available renderer for the current environment');\n }\n\n const renderer = new RendererClass();\n\n await renderer.init(finalOptions);\n\n return renderer;\n}\n","import { type ExtensionMetadata, ExtensionType } from '../../extensions/Extensions';\n\nimport type { Application } from '../../app/Application';\nimport type { System } from '../../rendering/renderers/shared/system/System';\nimport type { Renderer } from '../../rendering/renderers/types';\n\ndeclare global\n{\n /* eslint-disable no-var */\n var __PIXI_APP_INIT__: undefined | ((arg: Application | Renderer) => void);\n var __PIXI_RENDERER_INIT__: undefined | ((arg: Application | Renderer) => void);\n /* eslint-enable no-var */\n}\n\n/**\n * Calls global __PIXI_APP_INIT__ hook with the application instance, after the application is initialized.\n * @memberof app\n */\nexport class ApplicationInitHook\n{\n /** @ignore */\n public static extension: ExtensionMetadata = ExtensionType.Application;\n public static init(): void\n {\n globalThis.__PIXI_APP_INIT__?.(this as unknown as Application);\n }\n public static destroy(): void\n {\n // nothing to do\n }\n}\n\n/**\n * Calls global __PIXI_RENDERER_INIT__ hook with the renderer instance, after the renderer is initialized.\n * @memberof rendering\n */\nexport class RendererInitHook implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ],\n name: 'initHook',\n priority: -10,\n } as const;\n\n private _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n public init(): void\n {\n globalThis.__PIXI_RENDERER_INIT__?.(this._renderer);\n }\n public destroy(): void\n {\n this._renderer = null;\n }\n}\n","import { extensions, ExtensionType } from '../extensions/Extensions';\nimport { autoDetectRenderer } from '../rendering/renderers/autoDetectRenderer';\nimport { Container } from '../scene/container/Container';\nimport { ApplicationInitHook } from '../utils/global/globalHooks';\nimport { deprecation, v8_0_0 } from '../utils/logging/deprecation';\n\nimport type { Rectangle } from '../maths/shapes/Rectangle';\nimport type { AutoDetectOptions } from '../rendering/renderers/autoDetectRenderer';\nimport type { RendererDestroyOptions } from '../rendering/renderers/shared/system/AbstractRenderer';\nimport type { Renderer } from '../rendering/renderers/types';\nimport type { DestroyOptions } from '../scene/container/destroyTypes';\n\n/**\n * The app module provides a set of classes to use as a starting point when building applications.\n *\n * \n *\n * ```js\n * import { Application } from 'pixi.js';\n *\n * const app = new Application();\n *\n * await app.init();\n *\n * // don't forget to add the canvas to the DOM\n * document.body.appendChild(app.canvas);\n * ```\n * @namespace app\n */\n\n/**\n * Any plugin that's usable for Application should contain these methods.\n * @example\n * import { ApplicationPlugin } from 'pixi.js';\n *\n * const plugin: ApplicationPlugin = {\n * init: (options: Partial) =>\n * {\n * // handle init here, use app options if needed\n * },\n * destroy: () =>\n * {\n * // handle destruction code here\n * }\n * }\n * @memberof app\n * @see {@link app.ApplicationOptions}\n * @ignore\n */\nexport interface ApplicationPlugin\n{\n /**\n * Called when Application is constructed, scoped to Application instance.\n * Passes in `options` as the only argument, which are Application `init()` options.\n * @param {object} options - Application options.\n */\n init(options: Partial): void;\n /** Called when destroying Application, scoped to Application instance. */\n destroy(): void;\n}\n\n/**\n * Application options supplied to the {@link app.Application#init} method.\n * @memberof app\n * @example\n * import { Application } from 'pixi.js';\n *\n * const app = new Application();\n *\n * await app.init({\n * autoStart: false,\n * resizeTo: window,\n * sharedTicker: true,\n * });\n */\nexport interface ApplicationOptions extends AutoDetectOptions, PixiMixins.ApplicationOptions { }\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface Application extends PixiMixins.Application { }\n\n/**\n * Convenience class to create a new PixiJS application.\n *\n * This class automatically creates the renderer, ticker and root container.\n * @example\n * import { Application, Sprite } from 'pixi.js';\n *\n * // Create the application\n * const app = new Application();\n *\n * await app.init({ width: 800, height: 600 });\n *\n * // Add the view to the DOM\n * document.body.appendChild(app.canvas);\n *\n * // ex, add display objects\n * app.stage.addChild(Sprite.from('something.png'));\n * @memberof app\n */\nexport class Application\n{\n /**\n * Collection of installed plugins.\n * @alias _plugins\n */\n public static _plugins: ApplicationPlugin[] = [];\n\n /** The root display container that's rendered. */\n public stage: Container = new Container();\n\n /**\n * WebGL renderer if available, otherwise CanvasRenderer.\n * @member {Renderer}\n */\n public renderer: R;\n\n /** Create new Application instance */\n constructor();\n\n /** @deprecated since 8.0.0 */\n constructor(options?: Partial);\n\n /** @ignore */\n constructor(...args: [Partial] | [])\n {\n // #if _DEBUG\n if (args[0] !== undefined)\n {\n deprecation(v8_0_0, 'Application constructor options are deprecated, please use Application.init() instead.');\n }\n // #endif\n }\n\n /**\n * @param options - The optional application and renderer parameters.\n */\n public async init(options?: Partial)\n {\n // The default options\n options = { ...options };\n\n this.renderer = await autoDetectRenderer(options as ApplicationOptions) as R;\n\n // install plugins here\n Application._plugins.forEach((plugin) =>\n {\n plugin.init.call(this, options);\n });\n }\n\n /** Render the current stage. */\n public render(): void\n {\n this.renderer.render({ container: this.stage });\n }\n\n /**\n * Reference to the renderer's canvas element.\n * @readonly\n * @member {HTMLCanvasElement}\n */\n get canvas(): R['canvas']\n {\n return this.renderer.canvas as R['canvas'];\n }\n\n /**\n * Reference to the renderer's canvas element.\n * @member {HTMLCanvasElement}\n * @deprecated since 8.0.0\n */\n get view(): R['canvas']\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Application.view is deprecated, please use Application.canvas instead.');\n // #endif\n\n return this.renderer.canvas as R['canvas'];\n }\n\n /**\n * Reference to the renderer's screen rectangle. Its safe to use as `filterArea` or `hitArea` for the whole screen.\n * @readonly\n */\n get screen(): Rectangle\n {\n return this.renderer.screen;\n }\n\n /**\n * Destroys the application and all of its resources.\n * @param {object|boolean}[rendererDestroyOptions=false] - The options for destroying the renderer.\n * @param {boolean}[rendererDestroyOptions.removeView=false] - Removes the Canvas element from the DOM.\n * @param {object|boolean} [options=false] - The options for destroying the stage.\n * @param {boolean} [options.children=false] - If set to true, all the children will have their destroy method\n * called as well. `options` will be passed on to those calls.\n * @param {boolean} [options.texture=false] - Only used for children with textures e.g. Sprites.\n * If options.children is set to true,\n * it should destroy the texture of the child sprite.\n * @param {boolean} [options.textureSource=false] - Only used for children with textures e.g. Sprites.\n * If options.children is set to true,\n * it should destroy the texture source of the child sprite.\n * @param {boolean} [options.context=false] - Only used for children with graphicsContexts e.g. Graphics.\n * If options.children is set to true,\n * it should destroy the context of the child graphics.\n */\n public destroy(rendererDestroyOptions: RendererDestroyOptions = false, options: DestroyOptions = false): void\n {\n // Destroy plugins in the opposite order\n // which they were constructed\n const plugins = Application._plugins.slice(0);\n\n plugins.reverse();\n plugins.forEach((plugin) =>\n {\n plugin.destroy.call(this);\n });\n\n this.stage.destroy(options);\n this.stage = null;\n\n this.renderer.destroy(rendererDestroyOptions);\n this.renderer = null;\n }\n}\n\nextensions.handleByList(ExtensionType.Application, Application._plugins);\nextensions.add(ApplicationInitHook);\n","import { Rectangle } from '../../maths/shapes/Rectangle';\nimport { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport { AbstractBitmapFont } from './AbstractBitmapFont';\nimport { BitmapFontManager } from './BitmapFontManager';\n\nimport type { FontMetrics } from '../text/canvas/CanvasTextMetrics';\nimport type { BitmapFontData } from './AbstractBitmapFont';\nimport type { BitmapFontInstallOptions } from './BitmapFontManager';\n\n/**\n * Options for creating a BitmapFont.\n * @memberof text\n */\nexport interface BitmapFontOptions\n{\n data: BitmapFontData\n textures: Texture[]\n}\n\n/**\n * A BitmapFont object represents a particular font face, size, and style.\n * @memberof text\n */\nexport class BitmapFont extends AbstractBitmapFont\n{\n /** the url of the font */\n public url?: string;\n\n constructor(options: BitmapFontOptions, url?: string)\n {\n super();\n\n const { textures, data } = options;\n\n Object.keys(data.pages).forEach((key: string) =>\n {\n const pageData = data.pages[parseInt(key, 10)];\n\n const texture = textures[pageData.id];\n\n this.pages.push({ texture });\n });\n\n Object.keys(data.chars).forEach((key: string) =>\n {\n const charData = data.chars[key];\n const {\n frame: textureFrame,\n source: textureSource,\n } = textures[charData.page];\n\n const frameReal = new Rectangle(\n charData.x + textureFrame.x,\n charData.y + textureFrame.y,\n charData.width,\n charData.height,\n );\n\n const texture = new Texture({\n source: textureSource,\n frame: frameReal\n });\n\n this.chars[key] = {\n id: key.codePointAt(0),\n xOffset: charData.xOffset,\n yOffset: charData.yOffset,\n xAdvance: charData.xAdvance,\n kerning: charData.kerning ?? {},\n texture,\n };\n });\n\n this.baseRenderedFontSize = data.fontSize;\n\n (this.baseMeasurementFontSize as number) = data.fontSize;\n (this.fontMetrics as FontMetrics) = {\n ascent: 0,\n descent: 0,\n fontSize: data.fontSize,\n };\n (this.baseLineOffset as number) = data.baseLineOffset;\n (this.lineHeight as number) = data.lineHeight;\n (this.fontFamily as string) = data.fontFamily;\n (this.distanceField as { type: string, range: number }) = data.distanceField ?? {\n type: 'none',\n range: 0,\n };\n\n this.url = url;\n }\n\n /** Destroys the BitmapFont object. */\n public override destroy(): void\n {\n super.destroy();\n\n for (let i = 0; i < this.pages.length; i++)\n {\n const { texture } = this.pages[i];\n\n texture.destroy(true);\n }\n\n (this.pages as null) = null;\n }\n\n /**\n * Generates a bitmap-font for the given style and character set\n * @param options - Setup options for font generation.\n * @returns Font generated by style options.\n * @example\n * import { BitmapFont, BitmapText } from 'pixi.js';\n *\n * BitmapFont.install('TitleFont', {\n * fontFamily: 'Arial',\n * fontSize: 12,\n * strokeThickness: 2,\n * fill: 'purple',\n * });\n *\n * const title = new BitmapText({ text: 'This is the title', fontFamily: 'TitleFont' });\n */\n public static install(options: BitmapFontInstallOptions)\n {\n BitmapFontManager.install(options);\n }\n /**\n * Uninstalls a bitmap font from the cache.\n * @param {string} name - The name of the bitmap font to uninstall.\n */\n public static uninstall(name: string)\n {\n BitmapFontManager.uninstall(name);\n }\n}\n","import type { BitmapFontData, RawCharData } from '../AbstractBitmapFont';\n\n/**\n * Internal data format used to convert to BitmapFontData.\n * @private\n */\nexport interface BitmapFontRawData\n{\n info: {\n face: string;\n size: string;\n }[];\n common: { lineHeight: string, base: string }[];\n page: {\n id: string;\n file: string;\n }[];\n chars: {\n count: number;\n }[];\n char: {\n id: string\n page: string\n xoffset: string\n yoffset: string\n xadvance: string,\n x: string\n y: string\n width: string\n height: string\n letter?: string\n char?: string\n }[];\n kernings?: {\n count: number;\n }[];\n kerning?: {\n first: string;\n second: string;\n amount: string;\n }[];\n distanceField?: {\n fieldType: 'sdf' | 'msdf' | 'none';\n distanceRange: string;\n }[]\n}\n\nexport const bitmapFontTextParser = {\n test(data: string | XMLDocument | BitmapFontData): boolean\n {\n return typeof data === 'string' && data.startsWith('info face=');\n },\n\n parse(txt: string): BitmapFontData\n {\n // Retrieve data item\n const items = txt.match(/^[a-z]+\\s+.+$/gm);\n const rawData: BitmapFontRawData = {\n info: [],\n common: [],\n page: [],\n char: [],\n chars: [],\n kerning: [],\n kernings: [],\n distanceField: [],\n };\n\n for (const i in items)\n {\n // Extract item name\n const name = items[i].match(/^[a-z]+/gm)[0] as keyof BitmapFontRawData;\n\n // Extract item attribute list as string ex.: \"width=10\"\n const attributeList = items[i].match(/[a-zA-Z]+=([^\\s\"']+|\"([^\"]*)\")/gm);\n\n // Convert attribute list into an object\n const itemData: any = {};\n\n for (const i in attributeList)\n {\n // Split key-value pairs\n const split = attributeList[i].split('=');\n const key = split[0];\n\n // Remove eventual quotes from value\n const strValue = split[1].replace(/\"/gm, '');\n\n // Try to convert value into float\n const floatValue = parseFloat(strValue);\n\n // Use string value case float value is NaN\n const value = isNaN(floatValue) ? strValue : floatValue;\n\n itemData[key] = value;\n }\n\n // Push current item to the resulting data\n rawData[name].push(itemData);\n }\n\n const font: BitmapFontData = {\n chars: {},\n pages: [],\n lineHeight: 0,\n fontSize: 0,\n fontFamily: '',\n distanceField: null,\n baseLineOffset: 0,\n };\n\n const [info] = rawData.info;\n const [common] = rawData.common;\n const [distanceField] = rawData.distanceField ?? [];\n\n if (distanceField)\n {\n font.distanceField = {\n range: parseInt(distanceField.distanceRange, 10),\n type: distanceField.fieldType\n };\n }\n\n font.fontSize = parseInt(info.size, 10);\n font.fontFamily = info.face;\n font.lineHeight = parseInt(common.lineHeight, 10);\n\n const page = rawData.page;\n\n for (let i = 0; i < page.length; i++)\n {\n font.pages.push({\n id: parseInt(page[i].id, 10) || 0,\n file: page[i].file,\n });\n }\n\n const map: Record = {};\n\n font.baseLineOffset = font.lineHeight - parseInt(common.base, 10);\n\n const char = rawData.char;\n\n for (let i = 0; i < char.length; i++)\n {\n const charNode = char[i];\n const id = parseInt(charNode.id, 10);\n\n let letter = charNode.letter ?? charNode.char ?? String.fromCharCode(id);\n\n if (letter === 'space')letter = ' ';\n\n map[id] = letter;\n\n font.chars[letter] = {\n id,\n // texture deets..\n page: parseInt(charNode.page, 10) || 0,\n x: parseInt(charNode.x, 10),\n y: parseInt(charNode.y, 10),\n width: parseInt(charNode.width, 10),\n height: parseInt(charNode.height, 10),\n xOffset: parseInt(charNode.xoffset, 10),\n yOffset: parseInt(charNode.yoffset, 10),\n xAdvance: parseInt(charNode.xadvance, 10),\n kerning: {},\n } as RawCharData;\n }\n\n const kerning = rawData.kerning || [];\n\n for (let i = 0; i < kerning.length; i++)\n {\n const first = parseInt(kerning[i].first, 10);\n const second = parseInt(kerning[i].second, 10);\n const amount = parseInt(kerning[i].amount, 10);\n\n font.chars[map[second]].kerning[map[first]] = amount;\n }\n\n return font;\n }\n};\n","import type { BitmapFontData, RawCharData } from '../AbstractBitmapFont';\n\nexport const bitmapFontXMLParser = {\n test(data: string | XMLDocument | BitmapFontData): boolean\n {\n const xml = data as Document;\n\n return typeof xml !== 'string'\n && 'getElementsByTagName' in xml\n && xml.getElementsByTagName('page').length\n && xml.getElementsByTagName('info')[0].getAttribute('face') !== null;\n },\n\n parse(xml: Document): BitmapFontData\n {\n const data: BitmapFontData = {\n chars: {},\n pages: [],\n lineHeight: 0,\n fontSize: 0,\n fontFamily: '',\n distanceField: null,\n baseLineOffset: 0,\n };\n\n const info = xml.getElementsByTagName('info')[0];\n const common = xml.getElementsByTagName('common')[0];\n const distanceField = xml.getElementsByTagName('distanceField')[0];\n\n if (distanceField)\n {\n data.distanceField = {\n type: distanceField.getAttribute('fieldType') as 'sdf' | 'msdf' | 'none',\n range: parseInt(distanceField.getAttribute('distanceRange'), 10),\n };\n }\n\n // pages and chars:\n const page = xml.getElementsByTagName('page');\n const char = xml.getElementsByTagName('char');\n const kerning = xml.getElementsByTagName('kerning');\n\n data.fontSize = parseInt(info.getAttribute('size'), 10);\n data.fontFamily = info.getAttribute('face');\n data.lineHeight = parseInt(common.getAttribute('lineHeight'), 10);\n\n for (let i = 0; i < page.length; i++)\n {\n data.pages.push({\n id: parseInt(page[i].getAttribute('id'), 10) || 0,\n file: page[i].getAttribute('file'),\n });\n }\n\n const map: Record = {};\n\n data.baseLineOffset = data.lineHeight - parseInt(common.getAttribute('base'), 10);\n\n for (let i = 0; i < char.length; i++)\n {\n const charNode = char[i];\n const id = parseInt(charNode.getAttribute('id'), 10);\n\n let letter = charNode.getAttribute('letter') ?? charNode.getAttribute('char') ?? String.fromCharCode(id);\n\n if (letter === 'space')letter = ' ';\n\n map[id] = letter;\n\n data.chars[letter] = {\n id,\n // texture deets..\n page: parseInt(charNode.getAttribute('page'), 10) || 0,\n x: parseInt(charNode.getAttribute('x'), 10),\n y: parseInt(charNode.getAttribute('y'), 10),\n width: parseInt(charNode.getAttribute('width'), 10),\n height: parseInt(charNode.getAttribute('height'), 10),\n\n // render deets..\n xOffset: parseInt(charNode.getAttribute('xoffset'), 10),\n yOffset: parseInt(charNode.getAttribute('yoffset'), 10), // + baseLineOffset,\n xAdvance: parseInt(charNode.getAttribute('xadvance'), 10),\n kerning: {},\n } as RawCharData;\n }\n\n for (let i = 0; i < kerning.length; i++)\n {\n const first = parseInt(kerning[i].getAttribute('first'), 10);\n const second = parseInt(kerning[i].getAttribute('second'), 10);\n const amount = parseInt(kerning[i].getAttribute('amount'), 10);\n\n data.chars[map[second]].kerning[map[first]] = amount;// * 10000;\n }\n\n return data;\n }\n};\n","import { DOMAdapter } from '../../../environment/adapter';\nimport { bitmapFontXMLParser } from './bitmapFontXMLParser';\n\nimport type { BitmapFontData } from '../AbstractBitmapFont';\n\nexport const bitmapFontXMLStringParser = {\n test(data: string | XMLDocument | BitmapFontData): boolean\n {\n if (typeof data === 'string' && data.includes(''))\n {\n return bitmapFontXMLParser.test(DOMAdapter.get().parseXML(data));\n }\n\n return false;\n },\n\n parse(data: string): BitmapFontData\n {\n return bitmapFontXMLParser.parse(DOMAdapter.get().parseXML(data));\n }\n};\n","import { LoaderParserPriority } from '../../../assets/loader/parsers/LoaderParser';\nimport { copySearchParams } from '../../../assets/utils/copySearchParams';\nimport { DOMAdapter } from '../../../environment/adapter';\nimport { ExtensionType } from '../../../extensions/Extensions';\nimport { path } from '../../../utils/path';\nimport { BitmapFont } from '../BitmapFont';\nimport { bitmapFontTextParser } from './bitmapFontTextParser';\nimport { bitmapFontXMLStringParser } from './bitmapFontXMLStringParser';\n\nimport type { CacheParser } from '../../../assets/cache/CacheParser';\nimport type { Loader } from '../../../assets/loader/Loader';\nimport type { LoaderParserAdvanced } from '../../../assets/loader/parsers/LoaderParser';\nimport type { ResolvedAsset } from '../../../assets/types';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\n\nconst validExtensions = ['.xml', '.fnt'];\n\n/** simple loader plugin for loading in bitmap fonts! */\nexport const bitmapFontCachePlugin = {\n extension: {\n type: ExtensionType.CacheParser,\n name: 'cacheBitmapFont',\n },\n test: (asset: BitmapFont) => asset instanceof BitmapFont,\n getCacheableAssets(keys: string[], asset: BitmapFont)\n {\n const out: Record = {};\n\n keys.forEach((key) =>\n {\n out[key] = asset;\n out[`${key}-bitmap`] = asset;\n });\n\n out[`${asset.fontFamily}-bitmap`] = asset;\n\n return out;\n }\n} satisfies CacheParser;\n\nexport const loadBitmapFont = {\n extension: {\n type: ExtensionType.LoadParser,\n priority: LoaderParserPriority.Normal,\n },\n\n name: 'loadBitmapFont',\n\n test(url: string): boolean\n {\n return validExtensions.includes(path.extname(url).toLowerCase());\n },\n\n async testParse(data: string): Promise\n {\n return bitmapFontTextParser.test(data) || bitmapFontXMLStringParser.test(data);\n },\n\n async parse(asset: string, data: ResolvedAsset, loader: Loader): Promise\n {\n const bitmapFontData = bitmapFontTextParser.test(asset)\n ? bitmapFontTextParser.parse(asset)\n : bitmapFontXMLStringParser.parse(asset);\n\n const { src } = data;\n const { pages } = bitmapFontData;\n const textureUrls = [];\n\n // if we have a distance field - we can assume this is a signed distance field font\n // and we should use force linear filtering and no alpha premultiply\n const textureOptions = (bitmapFontData.distanceField) ? {\n scaleMode: 'linear',\n alphaMode: 'premultiply-alpha-on-upload',\n autoGenerateMipmaps: false,\n resolution: 1,\n } : {};\n\n for (let i = 0; i < pages.length; ++i)\n {\n const pageFile = pages[i].file;\n let imagePath = path.join(path.dirname(src), pageFile);\n\n imagePath = copySearchParams(imagePath, src);\n\n textureUrls.push({\n src: imagePath,\n data: textureOptions\n });\n }\n\n const loadedTextures = await loader.load(textureUrls);\n const textures = textureUrls.map((url) => loadedTextures[url.src]);\n\n const bitmapFont = new BitmapFont({\n data: bitmapFontData,\n textures\n }, src);\n\n return bitmapFont;\n },\n\n async load(url: string, _options: ResolvedAsset): Promise\n {\n const response = await DOMAdapter.get().fetch(url);\n\n return await response.text();\n },\n\n async unload(bitmapFont: BitmapFont, _resolvedAsset, loader): Promise\n {\n await Promise.all(bitmapFont.pages.map((page) => loader.unload(page.texture.source._sourceOrigin)));\n\n bitmapFont.destroy();\n }\n} satisfies LoaderParserAdvanced;\n","import type { Loader } from './loader/Loader';\nimport type { ResolvedAsset } from './types';\n\n/**\n * Quietly Loads assets in the background.\n * @memberof assets\n */\nexport class BackgroundLoader\n{\n /** Whether or not the loader should continue loading. */\n private _isActive: boolean;\n\n /** Assets to load. */\n private readonly _assetList: ResolvedAsset[];\n\n /** Whether or not the loader is loading. */\n private _isLoading: boolean;\n\n /** Number of assets to load at a time. */\n private readonly _maxConcurrent: number;\n\n /** Should the loader log to the console. */\n public verbose: boolean;\n private readonly _loader: Loader;\n\n /**\n * @param loader\n * @param verbose - should the loader log to the console\n */\n constructor(loader: Loader, verbose = false)\n {\n this._loader = loader;\n this._assetList = [];\n this._isLoading = false;\n this._maxConcurrent = 1;\n this.verbose = verbose;\n }\n\n /**\n * Adds an array of assets to load.\n * @param assetUrls - assets to load\n */\n public add(assetUrls: ResolvedAsset[]): void\n {\n assetUrls.forEach((a) =>\n {\n this._assetList.push(a);\n });\n\n if (this.verbose)\n {\n // eslint-disable-next-line no-console\n console.log('[BackgroundLoader] assets: ', this._assetList);\n }\n\n if (this._isActive && !this._isLoading)\n {\n void this._next();\n }\n }\n\n /**\n * Loads the next set of assets. Will try to load as many assets as it can at the same time.\n *\n * The max assets it will try to load at one time will be 4.\n */\n private async _next(): Promise\n {\n if (this._assetList.length && this._isActive)\n {\n this._isLoading = true;\n\n const toLoad = [];\n\n const toLoadAmount = Math.min(this._assetList.length, this._maxConcurrent);\n\n for (let i = 0; i < toLoadAmount; i++)\n {\n toLoad.push(this._assetList.pop());\n }\n\n await this._loader.load(toLoad);\n\n this._isLoading = false;\n\n void this._next();\n }\n }\n\n /**\n * Activate/Deactivate the loading. If set to true then it will immediately continue to load the next asset.\n * @returns whether the class is active\n */\n get active(): boolean\n {\n return this._isActive;\n }\n\n set active(value: boolean)\n {\n if (this._isActive === value) return;\n\n this._isActive = value;\n\n if (value && !this._isLoading)\n {\n void this._next();\n }\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { Texture } from '../../../rendering/renderers/shared/texture/Texture';\n\nimport type { CacheParser } from '../CacheParser';\n\n/**\n * Returns an object of textures from an array of textures to be cached\n * @memberof assets\n */\nexport const cacheTextureArray: CacheParser = {\n extension: {\n type: ExtensionType.CacheParser,\n name: 'cacheTextureArray',\n },\n\n test: (asset: any[]) => Array.isArray(asset) && asset.every((t) => t instanceof Texture),\n\n getCacheableAssets: (keys: string[], asset: Texture[]) =>\n {\n const out: Record = {};\n\n keys.forEach((key: string) =>\n {\n asset.forEach((item: Texture, i: number) =>\n {\n out[key + (i === 0 ? '' : i + 1)] = item;\n });\n });\n\n return out;\n }\n};\n","export async function testImageFormat(imageData: string): Promise\n{\n // Some browsers currently do not support createImageBitmap with Blob, so new Image() is preferred when exist.\n // See https://caniuse.com/createimagebitmap for more information.\n\n if ('Image' in globalThis)\n {\n return new Promise((resolve) =>\n {\n const image = new Image();\n\n image.onload = () =>\n {\n resolve(true);\n };\n image.onerror = () =>\n {\n resolve(false);\n };\n image.src = imageData;\n });\n }\n\n if ('createImageBitmap' in globalThis && 'fetch' in globalThis)\n {\n try\n {\n const blob = await (await fetch(imageData)).blob();\n\n await createImageBitmap(blob);\n }\n catch (e)\n {\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { testImageFormat } from '../utils/testImageFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the AVIF image format.\n * @memberof assets\n */\nexport const detectAvif: FormatDetectionParser = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 1,\n },\n test: async (): Promise => testImageFormat(\n // eslint-disable-next-line max-len\n 'data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A='\n ),\n add: async (formats) => [...formats, 'avif'],\n remove: async (formats) => formats.filter((f) => f !== 'avif'),\n};\n","import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { FormatDetectionParser } from '../types';\n\nconst imageFormats = ['png', 'jpg', 'jpeg'];\n\n/**\n * Adds some default image formats to the detection parser\n * @memberof assets\n */\nexport const detectDefaults = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: -1,\n },\n test: (): Promise => Promise.resolve(true),\n add: async (formats) => [...formats, ...imageFormats],\n remove: async (formats) => formats.filter((f) => !imageFormats.includes(f)),\n} as FormatDetectionParser;\n","const inWorker = 'WorkerGlobalScope' in globalThis\n && globalThis instanceof (globalThis as any).WorkerGlobalScope;\n\nexport function testVideoFormat(mimeType: string): boolean\n{\n if (inWorker)\n {\n return false;\n }\n\n const video = document.createElement('video');\n\n return video.canPlayType(mimeType) !== '';\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { testVideoFormat } from '../utils/testVideoFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the MP4 video format.\n * @memberof assets\n */\nexport const detectMp4 = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 0,\n },\n test: async (): Promise => testVideoFormat('video/mp4'),\n add: async (formats) => [...formats, 'mp4', 'm4v'],\n remove: async (formats) => formats.filter((f) => f !== 'mp4' && f !== 'm4v'),\n} as FormatDetectionParser;\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { testVideoFormat } from '../utils/testVideoFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the OGV video format.\n * @memberof assets\n */\nexport const detectOgv = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 0,\n },\n test: async (): Promise => testVideoFormat('video/ogg'),\n add: async (formats) => [...formats, 'ogv'],\n remove: async (formats) => formats.filter((f) => f !== 'ogv'),\n} as FormatDetectionParser;\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { testVideoFormat } from '../utils/testVideoFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the WebM video format.\n * @memberof assets\n */\nexport const detectWebm = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 0,\n },\n test: async (): Promise => testVideoFormat('video/webm'),\n add: async (formats) => [...formats, 'webm'],\n remove: async (formats) => formats.filter((f) => f !== 'webm'),\n} as FormatDetectionParser;\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { testImageFormat } from '../utils/testImageFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the WebP image format.\n * @memberof assets\n */\nexport const detectWebp = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 0,\n },\n test: async (): Promise => testImageFormat(\n 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA='\n ),\n add: async (formats) => [...formats, 'webp'],\n remove: async (formats) => formats.filter((f) => f !== 'webp'),\n} as FormatDetectionParser;\n","import { warn } from '../../utils/logging/warn';\nimport { path } from '../../utils/path';\nimport { convertToList } from '../utils/convertToList';\nimport { isSingleItem } from '../utils/isSingleItem';\n\nimport type { ResolvedAsset } from '../types';\nimport type { LoaderParser } from './parsers/LoaderParser';\nimport type { PromiseAndParser } from './types';\n\n/**\n * The Loader is responsible for loading all assets, such as images, spritesheets, audio files, etc.\n * It does not do anything clever with URLs - it just loads stuff!\n * Behind the scenes all things are cached using promises. This means it's impossible to load an asset more than once.\n * Through the use of LoaderParsers, the loader can understand how to load any kind of file!\n *\n * It is not intended that this class is created by developers - its part of the Asset class\n * This is the second major system of PixiJS' main Assets class\n * @memberof assets\n */\nexport class Loader\n{\n private readonly _parsers: LoaderParser[] = [];\n private _parserHash: Record;\n\n private _parsersValidated = false;\n\n /**\n * All loader parsers registered\n * @type {assets.LoaderParser[]}\n */\n public parsers = new Proxy(this._parsers, {\n set: (target, key, value) =>\n {\n this._parsersValidated = false;\n\n target[key as any as number] = value;\n\n return true;\n }\n });\n\n /** Cache loading promises that ae currently active */\n public promiseCache: Record = {};\n\n /** function used for testing */\n public reset(): void\n {\n this._parsersValidated = false;\n this.promiseCache = {};\n }\n\n /**\n * Used internally to generate a promise for the asset to be loaded.\n * @param url - The URL to be loaded\n * @param data - any custom additional information relevant to the asset being loaded\n * @returns - a promise that will resolve to an Asset for example a Texture of a JSON object\n */\n private _getLoadPromiseAndParser(url: string, data?: ResolvedAsset): PromiseAndParser\n {\n const result: PromiseAndParser = {\n promise: null,\n parser: null\n };\n\n result.promise = (async () =>\n {\n let asset = null;\n\n let parser: LoaderParser = null;\n\n // first check to see if the user has specified a parser\n if (data.loadParser)\n {\n // they have? lovely, lets use it\n parser = this._parserHash[data.loadParser];\n\n if (!parser)\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n warn(`[Assets] specified load parser \"${data.loadParser}\" not found while loading ${url}`);\n // #endif\n }\n }\n\n // no parser specified, so lets try and find one using the tests\n if (!parser)\n {\n for (let i = 0; i < this.parsers.length; i++)\n {\n const parserX = this.parsers[i];\n\n if (parserX.load && parserX.test?.(url, data, this))\n {\n parser = parserX;\n break;\n }\n }\n\n if (!parser)\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n warn(`[Assets] ${url} could not be loaded as we don't know how to parse it, ensure the correct parser has been added`);\n // #endif\n\n return null;\n }\n }\n\n asset = await parser.load(url, data, this);\n result.parser = parser;\n\n for (let i = 0; i < this.parsers.length; i++)\n {\n const parser = this.parsers[i];\n\n if (parser.parse)\n {\n if (parser.parse && await parser.testParse?.(asset, data, this))\n {\n // transform the asset..\n asset = await parser.parse(asset, data, this) || asset;\n\n result.parser = parser;\n }\n }\n }\n\n return asset;\n })();\n\n return result;\n }\n\n /**\n * Loads one or more assets using the parsers added to the Loader.\n * @example\n * // Single asset:\n * const asset = await Loader.load('cool.png');\n * console.log(asset);\n *\n * // Multiple assets:\n * const assets = await Loader.load(['cool.png', 'cooler.png']);\n * console.log(assets);\n * @param assetsToLoadIn - urls that you want to load, or a single one!\n * @param onProgress - For multiple asset loading only, an optional function that is called\n * when progress on asset loading is made. The function is passed a single parameter, `progress`,\n * which represents the percentage (0.0 - 1.0) of the assets loaded. Do not use this function\n * to detect when assets are complete and available, instead use the Promise returned by this function.\n */\n public async load(\n assetsToLoadIn: string | ResolvedAsset,\n onProgress?: (progress: number) => void,\n ): Promise;\n public async load(\n assetsToLoadIn: string[] | ResolvedAsset[],\n onProgress?: (progress: number) => void,\n ): Promise>;\n public async load(\n assetsToLoadIn: string | string[] | ResolvedAsset | ResolvedAsset[],\n onProgress?: (progress: number) => void,\n ): Promise>\n {\n if (!this._parsersValidated)\n {\n this._validateParsers();\n }\n\n let count = 0;\n\n const assets: Record> = {};\n\n const singleAsset = isSingleItem(assetsToLoadIn);\n\n const assetsToLoad = convertToList(assetsToLoadIn, (item) => ({\n alias: [item],\n src: item,\n }));\n\n const total = assetsToLoad.length;\n\n const promises: Promise[] = assetsToLoad.map(async (asset: ResolvedAsset) =>\n {\n const url = path.toAbsolute(asset.src);\n\n if (!assets[asset.src])\n {\n try\n {\n if (!this.promiseCache[url])\n {\n this.promiseCache[url] = this._getLoadPromiseAndParser(url, asset);\n }\n\n assets[asset.src] = await this.promiseCache[url].promise;\n\n // Only progress if nothing goes wrong\n if (onProgress) onProgress(++count / total);\n }\n catch (e)\n {\n // Delete eventually registered file and promises from internal cache\n // so they can be eligible for another loading attempt\n delete this.promiseCache[url];\n delete assets[asset.src];\n\n // Stop further execution\n throw new Error(`[Loader.load] Failed to load ${url}.\\n${e}`);\n }\n }\n });\n\n await Promise.all(promises);\n\n return singleAsset ? assets[assetsToLoad[0].src] : assets;\n }\n\n /**\n * Unloads one or more assets. Any unloaded assets will be destroyed, freeing up memory for your app.\n * The parser that created the asset, will be the one that unloads it.\n * @example\n * // Single asset:\n * const asset = await Loader.load('cool.png');\n *\n * await Loader.unload('cool.png');\n *\n * console.log(asset.destroyed); // true\n * @param assetsToUnloadIn - urls that you want to unload, or a single one!\n */\n public async unload(\n assetsToUnloadIn: string | string[] | ResolvedAsset | ResolvedAsset[],\n ): Promise\n {\n const assetsToUnload = convertToList(assetsToUnloadIn, (item) => ({\n alias: [item],\n src: item,\n }));\n\n const promises: Promise[] = assetsToUnload.map(async (asset: ResolvedAsset) =>\n {\n const url = path.toAbsolute(asset.src);\n\n const loadPromise = this.promiseCache[url];\n\n if (loadPromise)\n {\n const loadedAsset = await loadPromise.promise;\n\n delete this.promiseCache[url];\n\n await loadPromise.parser?.unload?.(loadedAsset, asset, this);\n }\n });\n\n await Promise.all(promises);\n }\n\n /** validates our parsers, right now it only checks for name conflicts but we can add more here as required! */\n private _validateParsers()\n {\n this._parsersValidated = true;\n\n this._parserHash = this._parsers\n .filter((parser) => parser.name)\n .reduce((hash, parser) =>\n {\n if (!parser.name)\n {\n // #if _DEBUG\n warn(`[Assets] loadParser should have a name`);\n // #endif\n }\n else if (hash[parser.name])\n {\n // #if _DEBUG\n warn(`[Assets] loadParser name conflict \"${parser.name}\"`);\n // #endif\n }\n\n return { ...hash, [parser.name]: parser };\n }, {} as Record);\n }\n}\n","export function checkDataUrl(url: string, mimes: string | string[]): boolean\n{\n if (Array.isArray(mimes))\n {\n for (const mime of mimes)\n {\n if (url.startsWith(`data:${mime}`)) return true;\n }\n\n return false;\n }\n\n return url.startsWith(`data:${mimes}`);\n}\n","import { path } from '../../utils/path';\n\nexport function checkExtension(url: string, extension: string | string[]): boolean\n{\n const tempURL = url.split('?')[0];\n const ext = path.extname(tempURL).toLowerCase();\n\n if (Array.isArray(extension))\n {\n return extension.includes(ext);\n }\n\n return ext === extension;\n}\n\n","import { DOMAdapter } from '../../../environment/adapter';\nimport { ExtensionType } from '../../../extensions/Extensions';\nimport { checkDataUrl } from '../../utils/checkDataUrl';\nimport { checkExtension } from '../../utils/checkExtension';\nimport { LoaderParserPriority } from './LoaderParser';\n\nimport type { LoaderParser } from './LoaderParser';\n\nconst validJSONExtension = '.json';\nconst validJSONMIME = 'application/json';\n\n/**\n * A simple loader plugin for loading json data\n * @memberof assets\n */\nexport const loadJson = {\n extension: {\n type: ExtensionType.LoadParser,\n priority: LoaderParserPriority.Low,\n },\n\n name: 'loadJson',\n\n test(url: string): boolean\n {\n return checkDataUrl(url, validJSONMIME) || checkExtension(url, validJSONExtension);\n },\n\n async load(url: string): Promise\n {\n const response = await DOMAdapter.get().fetch(url);\n\n const json = await response.json();\n\n return json as T;\n },\n} satisfies LoaderParser;\n","import { DOMAdapter } from '../../../environment/adapter';\nimport { ExtensionType } from '../../../extensions/Extensions';\nimport { checkDataUrl } from '../../utils/checkDataUrl';\nimport { checkExtension } from '../../utils/checkExtension';\nimport { LoaderParserPriority } from './LoaderParser';\n\nimport type { LoaderParser } from './LoaderParser';\n\nconst validTXTExtension = '.txt';\nconst validTXTMIME = 'text/plain';\n\n/**\n * A simple loader plugin for loading text data\n * @memberof assets\n */\nexport const loadTxt = {\n\n name: 'loadTxt',\n\n extension: {\n type: ExtensionType.LoadParser,\n priority: LoaderParserPriority.Low,\n name: 'loadTxt',\n },\n\n test(url: string): boolean\n {\n return checkDataUrl(url, validTXTMIME) || checkExtension(url, validTXTExtension);\n },\n\n async load(url: string): Promise\n {\n const response = await DOMAdapter.get().fetch(url);\n\n const txt = await response.text();\n\n return txt;\n },\n} satisfies LoaderParser;\n","import { DOMAdapter } from '../../../environment/adapter';\nimport { ExtensionType } from '../../../extensions/Extensions';\nimport { warn } from '../../../utils/logging/warn';\nimport { path } from '../../../utils/path';\nimport { Cache } from '../../cache/Cache';\nimport { checkDataUrl } from '../../utils/checkDataUrl';\nimport { checkExtension } from '../../utils/checkExtension';\nimport { LoaderParserPriority } from './LoaderParser';\n\nimport type { ResolvedAsset } from '../../types';\nimport type { LoaderParser } from './LoaderParser';\n\nconst validWeights = [\n 'normal', 'bold',\n '100', '200', '300', '400', '500', '600', '700', '800', '900',\n];\nconst validFontExtensions = ['.ttf', '.otf', '.woff', '.woff2'];\nconst validFontMIMEs = [\n 'font/ttf',\n 'font/otf',\n 'font/woff',\n 'font/woff2',\n];\n\n/**\n * Data for loading a font\n * @memberof assets\n */\nexport type LoadFontData = {\n /** Font family name */\n family: string;\n /** A set of optional descriptors passed as an object. It can contain any of the descriptors available for @font-face: */\n display: string;\n /**\n * The featureSettings property of the FontFace interface retrieves or sets infrequently used\n * font features that are not available from a font's variant properties.\n */\n featureSettings: string;\n /** The stretch property of the FontFace interface retrieves or sets how the font stretches. */\n stretch: string;\n /** The style property of the FontFace interface retrieves or sets the font's style. */\n style: string;\n /**\n * The unicodeRange property of the FontFace interface retrieves or sets the range of\n * unicode code points encompassing the font.\n */\n unicodeRange: string;\n /** The variant property of the FontFace interface programmatically retrieves or sets font variant values. */\n variant: string;\n /** The weight property of the FontFace interface retrieves or sets the weight of the font. */\n weights: string[];\n};\n\n/**\n * RegExp for matching CSS . It doesn't consider escape and non-ASCII characters, but enough for us.\n * @see {@link https://www.w3.org/TR/css-syntax-3/#ident-token-diagram}\n */\nconst CSS_IDENT_TOKEN_REGEX = /^(--|-?[A-Z_])[0-9A-Z_-]*$/i;\n\n/**\n * Return font face name from a file name\n * Ex.: 'fonts/titan-one.woff' turns into 'Titan One'\n * @param url - File url\n * @memberof assets\n */\nexport function getFontFamilyName(url: string): string\n{\n const ext = path.extname(url);\n const name = path.basename(url, ext);\n\n // Replace dashes by white spaces\n const nameWithSpaces = name.replace(/(-|_)/g, ' ');\n\n // Upper case first character of each word\n const nameTokens = nameWithSpaces.toLowerCase()\n .split(' ')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1));\n\n let valid = nameTokens.length > 0;\n\n for (const token of nameTokens)\n {\n if (!token.match(CSS_IDENT_TOKEN_REGEX))\n {\n valid = false;\n break;\n }\n }\n\n let fontFamilyName = nameTokens.join(' ');\n\n if (!valid)\n {\n fontFamilyName = `\"${fontFamilyName.replace(/[\\\\\"]/g, '\\\\$&')}\"`;\n }\n\n return fontFamilyName;\n}\n\n// See RFC 3986 Chapter 2. Characters\nconst validURICharactersRegex = /^[0-9A-Za-z%:/?#\\[\\]@!\\$&'()\\*\\+,;=\\-._~]*$/;\n\n/**\n * Encode URI only when it contains invalid characters.\n * @param uri - URI to encode.\n */\nfunction encodeURIWhenNeeded(uri: string)\n{\n if (validURICharactersRegex.test(uri))\n {\n return uri;\n }\n\n return encodeURI(uri);\n}\n\n/**\n * A loader plugin for handling web fonts\n * @example\n * import { Assets } from 'pixi.js';\n *\n * Assets.load({\n * alias: 'font',\n * src: 'fonts/titan-one.woff',\n * data: {\n * family: 'Titan One',\n * weights: ['normal', 'bold'],\n * }\n * })\n * @memberof assets\n */\nexport const loadWebFont = {\n extension: {\n type: ExtensionType.LoadParser,\n priority: LoaderParserPriority.Low,\n },\n\n name: 'loadWebFont',\n\n test(url: string): boolean\n {\n return checkDataUrl(url, validFontMIMEs) || checkExtension(url, validFontExtensions);\n },\n\n async load(url: string, options?: ResolvedAsset): Promise\n {\n const fonts = DOMAdapter.get().getFontFaceSet();\n\n if (fonts)\n {\n const fontFaces: FontFace[] = [];\n const name = options.data?.family ?? getFontFamilyName(url);\n const weights = options.data?.weights?.filter((weight) => validWeights.includes(weight)) ?? ['normal'];\n const data = options.data ?? {};\n\n for (let i = 0; i < weights.length; i++)\n {\n const weight = weights[i];\n\n const font = new FontFace(name, `url(${encodeURIWhenNeeded(url)})`, {\n ...data,\n weight,\n });\n\n await font.load();\n\n fonts.add(font);\n\n fontFaces.push(font);\n }\n\n Cache.set(`${name}-and-url`, {\n url,\n fontFaces,\n });\n\n return fontFaces.length === 1 ? fontFaces[0] : fontFaces;\n }\n\n // #if _DEBUG\n warn('[loadWebFont] FontFace API is not supported. Skipping loading font');\n // #endif\n\n return null;\n },\n\n unload(font: FontFace | FontFace[]): void\n {\n (Array.isArray(font) ? font : [font])\n .forEach((t) =>\n {\n Cache.remove(t.family);\n DOMAdapter.get().getFontFaceSet().delete(t);\n });\n }\n} satisfies LoaderParser;\n","import { Resolver } from '../../assets/resolver/Resolver';\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 * @memberof 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 * @returns {number} resolution / device pixel ratio of an asset\n */\nexport function getResolutionOfUrl(url: string, defaultValue = 1): number\n{\n const resolution = Resolver.RETINA_PREFIX?.exec(url);\n\n if (resolution)\n {\n return parseFloat(resolution[1]);\n }\n\n return defaultValue;\n}\n","import { Texture } from '../../../../../rendering/renderers/shared/texture/Texture';\nimport { warn } from '../../../../../utils/logging/warn';\nimport { Cache } from '../../../../cache/Cache';\n\nimport type { TextureSource } from '../../../../../rendering/renderers/shared/texture/sources/TextureSource';\nimport type { Loader } from '../../../Loader';\n\n/**\n * Creates a texture from a source and adds it to the cache.\n * @param source - source of the texture\n * @param loader - loader\n * @param url - url of the texture\n * @ignore\n */\nexport function createTexture(source: TextureSource, loader: Loader, url: string)\n{\n source.label = url;\n source._sourceOrigin = url;\n\n const texture = new Texture({\n source,\n label: url,\n });\n\n const unload = () =>\n {\n delete loader.promiseCache[url];\n\n if (Cache.has(url))\n {\n Cache.remove(url);\n }\n };\n\n // remove the promise from the loader and the url from the cache when the texture is destroyed\n texture.source.once('destroy', () =>\n {\n if (loader.promiseCache[url])\n {\n // #if _DEBUG\n warn('[Assets] A TextureSource managed by Assets was destroyed instead of unloaded! '\n + 'Use Assets.unload() instead of destroying the TextureSource.');\n // #endif\n\n unload();\n }\n });\n\n texture.once('destroy', () =>\n {\n if (!source.destroyed)\n {\n // #if _DEBUG\n warn('[Assets] A Texture managed by Assets was destroyed instead of unloaded! '\n + 'Use Assets.unload() instead of destroying the Texture.');\n // #endif\n\n unload();\n }\n });\n\n return texture;\n}\n","import { DOMAdapter } from '../../../../environment/adapter';\nimport { ExtensionType } from '../../../../extensions/Extensions';\nimport { ImageSource } from '../../../../rendering/renderers/shared/texture/sources/ImageSource';\nimport { GraphicsContext } from '../../../../scene/graphics/shared/GraphicsContext';\nimport { getResolutionOfUrl } from '../../../../utils/network/getResolutionOfUrl';\nimport { checkDataUrl } from '../../../utils/checkDataUrl';\nimport { checkExtension } from '../../../utils/checkExtension';\nimport { type LoaderParser, LoaderParserPriority } from '../LoaderParser';\nimport { createTexture } from './utils/createTexture';\n\nimport type { TextureSourceOptions } from '../../../../rendering/renderers/shared/texture/sources/TextureSource';\nimport type { Texture } from '../../../../rendering/renderers/shared/texture/Texture';\nimport type { ResolvedAsset } from '../../../types';\nimport type { Loader } from '../../Loader';\n\n/**\n * Configuration for the [loadSVG]{@link assets.loadSVG} plugin.\n * @see assets.loadSVG\n * @memberof assets\n */\nexport interface LoadSVGConfig\n{\n /**\n * The crossOrigin value to use for loading the SVG as an image.\n * @default 'anonymous'\n */\n crossOrigin: HTMLImageElement['crossOrigin'];\n /**\n * When set to `true`, loading and decoding images will happen with `new Image()`,\n * @default false\n */\n parseAsGraphicsContext: boolean;\n}\n\n/**\n * Regular expression for SVG XML document.\n * @example <?xml version=\"1.0\" encoding=\"utf-8\" ?><!-- image/svg --><svg\n * @readonly\n */\nconst validSVGExtension = '.svg';\nconst validSVGMIME = 'image/svg+xml';\n\n/**\n * A simple loader plugin for loading json data\n * @memberof assets\n */\nexport const loadSvg: LoaderParser = {\n extension: {\n type: ExtensionType.LoadParser,\n priority: LoaderParserPriority.Low,\n name: 'loadSVG',\n },\n\n name: 'loadSVG',\n\n config: {\n crossOrigin: 'anonymous',\n parseAsGraphicsContext: false,\n },\n\n test(url: string): boolean\n {\n return checkDataUrl(url, validSVGMIME) || checkExtension(url, validSVGExtension);\n },\n\n async load(\n url: string,\n asset: ResolvedAsset,\n loader: Loader\n ): Promise\n {\n if (asset.data.parseAsGraphicsContext ?? this.config.parseAsGraphicsContext)\n {\n return loadAsGraphics(url);\n }\n\n return loadAsTexture(url, asset, loader, this.config.crossOrigin);\n },\n\n unload(asset: Texture | GraphicsContext): void\n {\n asset.destroy(true);\n }\n\n};\n\nasync function loadAsTexture(\n url: string,\n asset: ResolvedAsset,\n loader: Loader,\n crossOrigin: HTMLImageElement['crossOrigin']\n): Promise\n{\n const response = await DOMAdapter.get().fetch(url);\n\n const blob = await response.blob();\n\n const blobUrl = URL.createObjectURL(blob);\n\n const image = new Image();\n\n image.src = blobUrl;\n image.crossOrigin = crossOrigin;\n await image.decode();\n\n URL.revokeObjectURL(blobUrl);\n\n // convert to canvas...\n const canvas = document.createElement('canvas');\n const context = canvas.getContext('2d');\n\n const resolution = asset.data?.resolution || getResolutionOfUrl(url);\n\n const width = asset.data?.width ?? image.width;\n const height = asset.data?.height ?? image.height;\n\n canvas.width = width * resolution;\n canvas.height = height * resolution;\n\n context.drawImage(image, 0, 0, width * resolution, height * resolution);\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { parseAsGraphicsContext: _p, ...rest } = asset.data;\n const base = new ImageSource({\n resource: canvas,\n alphaMode: 'premultiply-alpha-on-upload',\n resolution,\n ...rest,\n });\n\n return createTexture(base, loader, url);\n}\n\nasync function loadAsGraphics(url: string): Promise\n{\n const response = await DOMAdapter.get().fetch(url);\n const svgSource = await response.text();\n\n const context = new GraphicsContext();\n\n context.svg(svgSource);\n\n return context;\n}\n","import CheckImageBitmapWorker from 'worker:./checkImageBitmap.worker.ts';\nimport LoadImageBitmapWorker from 'worker:./loadImageBitmap.worker.ts';\n\nlet UUID = 0;\nlet MAX_WORKERS: number;\n\ntype LoadImageBitmapResult = {\n data?: ImageBitmap,\n error?: Error,\n uuid: number,\n id: string,\n};\n\nclass WorkerManagerClass\n{\n public worker: Worker;\n private _resolveHash: {\n [key: string]: {\n resolve: (...param: any[]) => void;\n reject: (...param: any[]) => void;\n }\n };\n private readonly _workerPool: Worker[];\n private readonly _queue: {\n id: string;\n arguments: any[];\n resolve: (...param: any[]) => void;\n reject: (...param: any[]) => void;\n }[];\n private _initialized = false;\n private _createdWorkers = 0;\n private _isImageBitmapSupported?: Promise;\n\n constructor()\n {\n this._workerPool = [];\n this._queue = [];\n\n this._resolveHash = {};\n }\n\n public isImageBitmapSupported(): Promise\n {\n if (this._isImageBitmapSupported !== undefined) return this._isImageBitmapSupported;\n\n this._isImageBitmapSupported = new Promise((resolve) =>\n {\n const { worker } = new CheckImageBitmapWorker();\n\n worker.addEventListener('message', (event: MessageEvent) =>\n {\n worker.terminate();\n CheckImageBitmapWorker.revokeObjectURL();\n resolve(event.data);\n });\n });\n\n return this._isImageBitmapSupported;\n }\n\n public loadImageBitmap(src: string): Promise\n {\n return this._run('loadImageBitmap', [src]) as Promise;\n }\n\n private async _initWorkers()\n {\n if (this._initialized) return;\n\n this._initialized = true;\n }\n\n private _getWorker(): Worker\n {\n if (MAX_WORKERS === undefined)\n {\n MAX_WORKERS = navigator.hardwareConcurrency || 4;\n }\n let worker = this._workerPool.pop();\n\n if (!worker && this._createdWorkers < MAX_WORKERS)\n {\n // only create as many as MAX_WORKERS allows..\n this._createdWorkers++;\n worker = new LoadImageBitmapWorker().worker;\n\n worker.addEventListener('message', (event: MessageEvent) =>\n {\n this._complete(event.data);\n\n this._returnWorker(event.target as Worker);\n this._next();\n });\n }\n\n return worker;\n }\n\n private _returnWorker(worker: Worker)\n {\n this._workerPool.push(worker);\n }\n\n private _complete(data: LoadImageBitmapResult): void\n {\n if (data.error !== undefined)\n {\n this._resolveHash[data.uuid].reject(data.error);\n }\n else\n {\n this._resolveHash[data.uuid].resolve(data.data);\n }\n\n this._resolveHash[data.uuid] = null;\n }\n\n private async _run(id: string, args: any[]): Promise\n {\n await this._initWorkers();\n // push into the queue...\n\n const promise = new Promise((resolve, reject) =>\n {\n this._queue.push({ id, arguments: args, resolve, reject });\n });\n\n this._next();\n\n return promise;\n }\n\n private _next(): void\n {\n // nothing to do\n if (!this._queue.length) return;\n\n const worker = this._getWorker();\n\n // no workers available...\n if (!worker)\n {\n return;\n }\n\n const toDo = this._queue.pop();\n\n const id = toDo.id;\n\n this._resolveHash[UUID] = { resolve: toDo.resolve, reject: toDo.reject };\n\n worker.postMessage({\n data: toDo.arguments,\n uuid: UUID++,\n id,\n });\n }\n}\n\nconst WorkerManager = new WorkerManagerClass();\n\nexport {\n WorkerManager,\n};\n","import { DOMAdapter } from '../../../../environment/adapter';\nimport { ExtensionType } from '../../../../extensions/Extensions';\nimport { ImageSource } from '../../../../rendering/renderers/shared/texture/sources/ImageSource';\nimport { getResolutionOfUrl } from '../../../../utils/network/getResolutionOfUrl';\nimport { checkDataUrl } from '../../../utils/checkDataUrl';\nimport { checkExtension } from '../../../utils/checkExtension';\nimport { WorkerManager } from '../../workers/WorkerManager';\nimport { LoaderParserPriority } from '../LoaderParser';\nimport { createTexture } from './utils/createTexture';\n\nimport type { TextureSourceOptions } from '../../../../rendering/renderers/shared/texture/sources/TextureSource';\nimport type { Texture } from '../../../../rendering/renderers/shared/texture/Texture';\nimport type { ResolvedAsset } from '../../../types';\nimport type { Loader } from '../../Loader';\nimport type { LoaderParser } from '../LoaderParser';\n\nconst validImageExtensions = ['.jpeg', '.jpg', '.png', '.webp', '.avif'];\nconst validImageMIMEs = [\n 'image/jpeg',\n 'image/png',\n 'image/webp',\n 'image/avif',\n];\n\n/**\n * Configuration for the [loadTextures]{@link assets.loadTextures} plugin.\n * @see assets.loadTextures\n * @memberof assets\n */\nexport interface LoadTextureConfig\n{\n /**\n * When set to `true`, loading and decoding images will happen with Worker thread,\n * if available on the browser. This is much more performant as network requests\n * and decoding can be expensive on the CPU. However, not all environments support\n * Workers, in some cases it can be helpful to disable by setting to `false`.\n * @default true\n */\n preferWorkers: boolean;\n /**\n * When set to `true`, loading and decoding images will happen with `createImageBitmap`,\n * otherwise it will use `new Image()`.\n * @default true\n */\n preferCreateImageBitmap: boolean;\n /**\n * The crossOrigin value to use for images when `preferCreateImageBitmap` is `false`.\n * @default 'anonymous'\n */\n crossOrigin: HTMLImageElement['crossOrigin'];\n}\n\n/**\n * Returns a promise that resolves an ImageBitmaps.\n * This function is designed to be used by a worker.\n * Part of WorkerManager!\n * @param url - The image to load an image bitmap for\n * @ignore\n */\nexport async function loadImageBitmap(url: string): Promise\n{\n const response = await DOMAdapter.get().fetch(url);\n\n if (!response.ok)\n {\n throw new Error(`[loadImageBitmap] Failed to fetch ${url}: `\n + `${response.status} ${response.statusText}`);\n }\n\n const imageBlob = await response.blob();\n const imageBitmap = await createImageBitmap(imageBlob);\n\n return imageBitmap;\n}\n\n/**\n * A simple plugin to load our textures!\n * This makes use of imageBitmaps where available.\n * We load the `ImageBitmap` on a different thread using workers if possible.\n * We can then use the `ImageBitmap` as a source for a Pixi texture\n *\n * You can customize the behavior of this loader by setting the `config` property.\n * Which can be found [here]{@link assets.LoadTextureConfig}\n * ```js\n * // Set the config\n * import { loadTextures } from 'pixi.js';\n *\n * loadTextures.config = {\n * // If true we will use a worker to load the ImageBitmap\n * preferWorkers: true,\n * // If false we will use new Image() instead of createImageBitmap,\n * // we'll also disable the use of workers as it requires createImageBitmap\n * preferCreateImageBitmap: true,\n * crossOrigin: 'anonymous',\n * };\n * ```\n * @memberof assets\n */\nexport const loadTextures: LoaderParser = {\n\n name: 'loadTextures',\n\n extension: {\n type: ExtensionType.LoadParser,\n priority: LoaderParserPriority.High,\n name: 'loadTextures',\n },\n\n config: {\n preferWorkers: true,\n preferCreateImageBitmap: true,\n crossOrigin: 'anonymous',\n },\n\n test(url: string): boolean\n {\n return checkDataUrl(url, validImageMIMEs) || checkExtension(url, validImageExtensions);\n },\n\n async load(url: string, asset: ResolvedAsset, loader: Loader): Promise\n {\n let src: any = null;\n\n if (globalThis.createImageBitmap && this.config.preferCreateImageBitmap)\n {\n if (this.config.preferWorkers && await WorkerManager.isImageBitmapSupported())\n {\n src = await WorkerManager.loadImageBitmap(url);\n }\n else\n {\n src = await loadImageBitmap(url);\n }\n }\n else\n {\n src = await new Promise((resolve) =>\n {\n src = new Image();\n src.crossOrigin = this.config.crossOrigin;\n\n src.src = url;\n if (src.complete)\n {\n resolve(src);\n }\n else\n {\n src.onload = (): void =>\n {\n resolve(src);\n };\n }\n });\n }\n\n const base = new ImageSource({\n resource: src,\n alphaMode: 'premultiply-alpha-on-upload',\n resolution: asset.data?.resolution || getResolutionOfUrl(url),\n ...asset.data,\n });\n\n return createTexture(base, loader, url);\n },\n\n unload(texture: Texture): void\n {\n texture.destroy(true);\n }\n};\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { VideoSource } from '../../../../rendering/renderers/shared/texture/sources/VideoSource';\nimport { detectVideoAlphaMode } from '../../../../utils/browser/detectVideoAlphaMode';\nimport { getResolutionOfUrl } from '../../../../utils/network/getResolutionOfUrl';\nimport { checkDataUrl } from '../../../utils/checkDataUrl';\nimport { checkExtension } from '../../../utils/checkExtension';\nimport { createTexture } from './utils/createTexture';\n\nimport type { VideoSourceOptions } from '../../../../rendering/renderers/shared/texture/sources/VideoSource';\nimport type { Texture } from '../../../../rendering/renderers/shared/texture/Texture';\nimport type { ResolvedAsset } from '../../../types';\nimport type { Loader } from '../../Loader';\nimport type { LoaderParser } from '../LoaderParser';\n\nconst validVideoExtensions = ['.mp4', '.m4v', '.webm', '.ogg', '.ogv', '.h264', '.avi', '.mov'];\nconst validVideoMIMEs = validVideoExtensions.map((ext) => `video/${ext.substring(1)}`);\n\n/**\n * Set cross origin based detecting the url and the crossorigin\n * @param element - Element to apply crossOrigin\n * @param url - URL to check\n * @param crossorigin - Cross origin value to use\n * @memberof assets\n */\nexport function crossOrigin(element: HTMLImageElement | HTMLVideoElement, url: string, crossorigin?: boolean | string): void\n{\n if (crossorigin === undefined && !url.startsWith('data:'))\n {\n element.crossOrigin = determineCrossOrigin(url);\n }\n else if (crossorigin !== false)\n {\n element.crossOrigin = typeof crossorigin === 'string' ? crossorigin : 'anonymous';\n }\n}\n\n/**\n * Preload a video element\n * @param element - Video element to preload\n */\nexport function preloadVideo(element: HTMLVideoElement): Promise\n{\n return new Promise((resolve, reject) =>\n {\n element.addEventListener('canplaythrough', loaded);\n element.addEventListener('error', error);\n\n element.load();\n\n function loaded(): void\n {\n cleanup();\n resolve();\n }\n\n function error(err: ErrorEvent): void\n {\n cleanup();\n reject(err);\n }\n\n function cleanup(): void\n {\n element.removeEventListener('canplaythrough', loaded);\n element.removeEventListener('error', error);\n }\n });\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 * Nipped from the resource loader!\n * @ignore\n * @param url - The url to test.\n * @param {object} [loc=window.location] - The location object to test against.\n * @returns The crossOrigin value to use (or empty string for none).\n * @memberof assets\n */\nexport function determineCrossOrigin(url: string, loc: Location = globalThis.location): string\n{\n // data: and javascript: urls are considered same-origin\n if (url.startsWith('data:'))\n {\n return '';\n }\n\n // default is window.location\n loc = loc || globalThis.location;\n\n const parsedUrl = new URL(url, document.baseURI);\n\n // if cross origin\n if (parsedUrl.hostname !== loc.hostname || parsedUrl.port !== loc.port || parsedUrl.protocol !== loc.protocol)\n {\n return 'anonymous';\n }\n\n return '';\n}\n\n/**\n * A simple plugin to load video textures.\n *\n * You can pass VideoSource options to the loader via the .data property of the asset descriptor\n * when using Asset.load().\n * ```js\n * // Set the data\n * const texture = await Assets.load({\n * src: './assets/city.mp4',\n * data: {\n * preload: true,\n * autoPlay: true,\n * },\n * });\n * ```\n * @memberof assets\n */\nexport const loadVideoTextures = {\n\n name: 'loadVideo',\n\n extension: {\n type: ExtensionType.LoadParser,\n name: 'loadVideo',\n },\n\n test(url: string): boolean\n {\n const isValidDataUrl = checkDataUrl(url, validVideoMIMEs);\n const isValidExtension = checkExtension(url, validVideoExtensions);\n\n return isValidDataUrl || isValidExtension;\n },\n\n async load(url: string, asset: ResolvedAsset, loader: Loader): Promise\n {\n // --- Merge default and provided options ---\n const options: VideoSourceOptions = {\n ...VideoSource.defaultOptions,\n resolution: asset.data?.resolution || getResolutionOfUrl(url),\n alphaMode: asset.data?.alphaMode || await detectVideoAlphaMode(),\n ...asset.data,\n };\n\n // --- Create and configure HTMLVideoElement ---\n const videoElement = document.createElement('video');\n\n // Set attributes based on options\n const attributeMap = {\n preload: options.autoLoad !== false ? 'auto' : undefined,\n 'webkit-playsinline': options.playsinline !== false ? '' : undefined,\n playsinline: options.playsinline !== false ? '' : undefined,\n muted: options.muted === true ? '' : undefined,\n loop: options.loop === true ? '' : undefined,\n autoplay: options.autoPlay !== false ? '' : undefined\n };\n\n Object.keys(attributeMap).forEach((key) =>\n {\n const value = attributeMap[key as keyof typeof attributeMap];\n\n if (value !== undefined) videoElement.setAttribute(key, value);\n });\n\n if (options.muted === true)\n {\n videoElement.muted = true;\n }\n\n crossOrigin(videoElement, url, options.crossorigin); // Assume crossOrigin is globally available\n\n // --- Set up source and MIME type ---\n const sourceElement = document.createElement('source');\n\n // Determine MIME type\n let mime: string | undefined;\n\n if (url.startsWith('data:'))\n {\n mime = url.slice(5, url.indexOf(';'));\n }\n else if (!url.startsWith('blob:'))\n {\n const ext = url.split('?')[0].slice(url.lastIndexOf('.') + 1).toLowerCase();\n\n mime = VideoSource.MIME_TYPES[ext] || `video/${ext}`;\n }\n\n sourceElement.src = url;\n\n if (mime)\n {\n sourceElement.type = mime;\n }\n\n // this promise will make sure that video is ready to play - as in we have a valid width, height and it can be\n // uploaded to the GPU. Our textures are kind of dumb now, and don't want to handle resizing right now.\n return new Promise((resolve) =>\n {\n const onCanPlay = async () =>\n {\n const base = new VideoSource({ ...options, resource: videoElement });\n\n videoElement.removeEventListener('canplay', onCanPlay);\n\n if (asset.data.preload)\n {\n await preloadVideo(videoElement);\n }\n\n resolve(createTexture(base, loader, url));\n };\n\n videoElement.addEventListener('canplay', onCanPlay);\n videoElement.appendChild(sourceElement);\n });\n },\n\n unload(texture: Texture): void\n {\n texture.destroy(true);\n }\n} satisfies LoaderParser;\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { loadTextures } from '../../loader/parsers/textures/loadTextures';\nimport { Resolver } from '../Resolver';\n\nimport type { ResolveURLParser } from '../types';\n\n/**\n * A parser that will resolve a texture url\n * @memberof assets\n */\nexport const resolveTextureUrl = {\n extension: {\n type: ExtensionType.ResolveParser,\n name: 'resolveTexture',\n },\n test: loadTextures.test,\n parse: (value: string) =>\n ({\n resolution: parseFloat(Resolver.RETINA_PREFIX.exec(value)?.[1] ?? '1'),\n format: value.split('.').pop(),\n src: value,\n }),\n} satisfies ResolveURLParser;\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { Resolver } from '../Resolver';\nimport { resolveTextureUrl } from './resolveTextureUrl';\n\nimport type { ResolveURLParser } from '../types';\n\n/**\n * A parser that will resolve a json urls resolution for spritesheets\n * e.g. `assets/spritesheet@1x.json`\n * @memberof assets\n */\nexport const resolveJsonUrl = {\n extension: {\n type: ExtensionType.ResolveParser,\n priority: -2,\n name: 'resolveJson',\n },\n test: (value: string): boolean =>\n Resolver.RETINA_PREFIX.test(value) && value.endsWith('.json'),\n parse: resolveTextureUrl.parse,\n} satisfies ResolveURLParser;\n","/* eslint-disable max-len */\nimport { extensions, ExtensionType } from '../extensions/Extensions';\nimport { bitmapFontCachePlugin, loadBitmapFont } from '../scene/text-bitmap/asset/loadBitmapFont';\nimport { warn } from '../utils/logging/warn';\nimport { BackgroundLoader } from './BackgroundLoader';\nimport { Cache } from './cache/Cache';\nimport { cacheTextureArray } from './cache/parsers/cacheTextureArray';\nimport { detectAvif } from './detections/parsers/detectAvif';\nimport { detectDefaults } from './detections/parsers/detectDefaults';\nimport { detectMp4 } from './detections/parsers/detectMp4';\nimport { detectOgv } from './detections/parsers/detectOgv';\nimport { detectWebm } from './detections/parsers/detectWebm';\nimport { detectWebp } from './detections/parsers/detectWebp';\nimport { Loader } from './loader/Loader';\nimport { loadJson } from './loader/parsers/loadJson';\nimport { loadTxt } from './loader/parsers/loadTxt';\nimport { loadWebFont } from './loader/parsers/loadWebFont';\nimport { loadSvg } from './loader/parsers/textures/loadSVG';\nimport { type LoadTextureConfig, loadTextures } from './loader/parsers/textures/loadTextures';\nimport { loadVideoTextures } from './loader/parsers/textures/loadVideoTextures';\nimport { resolveJsonUrl } from './resolver/parsers/resolveJsonUrl';\nimport { resolveTextureUrl } from './resolver/parsers/resolveTextureUrl';\nimport { Resolver } from './resolver/Resolver';\nimport { convertToList } from './utils/convertToList';\nimport { isSingleItem } from './utils/isSingleItem';\n\nimport type { AssetExtension } from './AssetExtension';\nimport type { FormatDetectionParser } from './detections/types';\nimport type { LoadSVGConfig } from './loader/parsers/textures/loadSVG';\nimport type { BundleIdentifierOptions } from './resolver/Resolver';\nimport type { ArrayOr, AssetsBundle, AssetsManifest, ResolvedAsset, UnresolvedAsset } from './types';\n\n/**\n * Callback for when progress on asset loading is made.\n * The function is passed a single parameter, `progress`, which represents the percentage (0.0 - 1.0)\n * of the assets loaded.\n * @memberof assets\n * @callback ProgressCallback\n * @param {number} progress - The percentage (0.0 - 1.0) of the assets loaded.\n * @returns {void}\n * @example\n * (progress) => console.log(progress * 100 + '%')\n */\nexport type ProgressCallback = (progress: number) => void;\n\n/**\n * Extensible preferences that can be used, for instance, when configuring loaders.\n * @since 7.2.0\n * @memberof assets\n */\nexport interface AssetsPreferences extends LoadTextureConfig, LoadSVGConfig, PixiMixins.AssetsPreferences {}\n\n/**\n * Initialization options object for the Assets Class.\n * @memberof assets\n */\nexport interface AssetInitOptions\n{\n // basic...\n /** a base path for any assets loaded */\n basePath?: string;\n\n /** a default URL parameter string to append to all assets loaded */\n defaultSearchParams?: string | Record;\n\n /**\n * a manifest to tell the asset loader upfront what all your assets are\n * this can be the manifest object itself, or a URL to the manifest.\n */\n manifest?: string | AssetsManifest;\n /**\n * optional preferences for which textures preferences you have when resolving assets\n * for example you might set the resolution to 0.5 if the user is on a rubbish old phone\n * or you might set the resolution to 2 if the user is on a retina display\n */\n texturePreference?: {\n /** the resolution order you prefer, can be an array (priority order - first is prefered) or a single resolutions */\n resolution?: number | number[];\n /**\n * the formats you prefer, by default this will be:\n * ['avif', 'webp', 'png', 'jpg', 'jpeg', 'webm', 'mp4', 'm4v', 'ogv']\n */\n format?: ArrayOr;\n };\n\n /**\n * If true, don't attempt to detect whether browser has preferred formats available.\n * May result in increased performance as it skips detection step.\n */\n skipDetections?: boolean;\n\n /** advanced - override how bundlesIds are generated */\n bundleIdentifier?: BundleIdentifierOptions;\n\n /** Optional loader preferences */\n preferences?: Partial;\n}\n\n/**\n * A one stop shop for all Pixi resource management!\n * Super modern and easy to use, with enough flexibility to customize and do what you need!\n * @namespace assets\n *\n * Use the singleton class [Assets]{@link assets.Assets} to easily load and manage all your assets.\n *\n * ```typescript\n * import { Assets, Texture } from 'pixi.js';\n *\n * const bunnyTexture = await Assets.load('bunny.png');\n * const sprite = new Sprite(bunnyTexture);\n * ```\n *\n * Check out the sections below for more information on how to deal with assets.\n *\n *
\n *\n * Asset Loading\n *\n * Do not be afraid to load things multiple times - under the hood, it will **NEVER** load anything more than once.\n *\n * *For example:*\n *\n * ```js\n * import { Assets } from 'pixi.js';\n *\n * promise1 = Assets.load('bunny.png')\n * promise2 = Assets.load('bunny.png')\n *\n * // promise1 === promise2\n * ```\n *\n * Here both promises will be the same. Once resolved... Forever resolved! It makes for really easy resource management!\n *\n * Out of the box Pixi supports the following files:\n * - Textures (**_avif_**, **_webp_**, **_png_**, **_jpg_**, **_gif_**, **_svg_**) via {@link assets.loadTextures}, {@link assets.loadSvg}\n * - Video Textures (**_mp4_**, **_m4v_**, **_webm_**, **_ogg_**, **_ogv_**, **_h264_**, **_avi_**, **_mov_**) via {@link assets.loadVideoTextures}\n * - Sprite sheets (**_json_**) via {@link assets.spritesheetAsset}\n * - Bitmap fonts (**_xml_**, **_fnt_**, **_txt_**) via {@link assets.loadBitmapFont}\n * - Web fonts (**_ttf_**, **_woff_**, **_woff2_**) via {@link assets.loadWebFont}\n * - JSON files (**_json_**) via {@link assets.loadJson}\n * - Text Files (**_txt_**) via {@link assets.loadTxt}\n *
\n * More types can be added fairly easily by creating additional {@link assets.LoaderParser LoaderParsers}.\n *
\n *\n *
\n *\n * Textures\n *\n * - Textures are loaded as ImageBitmap on a worker thread where possible. Leading to much less janky load + parse times.\n * - By default, we will prefer to load AVIF and WebP image files if you specify them.\n * But if the browser doesn't support AVIF or WebP we will fall back to png and jpg.\n * - Textures can also be accessed via `Texture.from()` (see {@link core.from|Texture.from})\n * and now use this asset manager under the hood!\n * - Don't worry if you set preferences for textures that don't exist\n * (for example you prefer 2x resolutions images but only 1x is available for that texture,\n * the Assets manager will pick that up as a fallback automatically)\n *\n * #### Sprite sheets\n * - It's hard to know what resolution a sprite sheet is without loading it first, to address this\n * there is a naming convention we have added that will let Pixi understand the image format and resolution\n * of the spritesheet via its file name: `my-spritesheet{resolution}.{imageFormat}.json`\n *

For example:\n * - `my-spritesheet@2x.webp.json`* // 2x resolution, WebP sprite sheet*\n * - `my-spritesheet@0.5x.png.json`* // 0.5x resolution, png sprite sheet*\n * - This is optional! You can just load a sprite sheet as normal.\n * This is only useful if you have a bunch of different res / formatted spritesheets.\n *
\n *\n *
\n *\n * Fonts\n *\n * Web fonts will be loaded with all weights.\n * It is possible to load only specific weights by doing the following:\n *\n * ```js\n * import { Assets } from 'pixi.js';\n *\n * // Load specific weights..\n * await Assets.load({\n * data: {\n * weights: ['normal'], // Only loads the weight\n * },\n * src: `outfit.woff2`,\n * });\n *\n * // Load everything...\n * await Assets.load(`outfit.woff2`);\n * ```\n *
\n *\n *
\n *\n * Background Loading\n *\n * Background loading will load stuff for you passively behind the scenes. To minimize jank,\n * it will only load one asset at a time. As soon as a developer calls `Assets.load(...)` the\n * background loader is paused and requested assets are loaded as a priority.\n * Don't worry if something is in there that's already loaded, it will just get skipped!\n *\n * You still need to call `Assets.load(...)` to get an asset that has been loaded in the background.\n * It's just that this promise will resolve instantly if the asset\n * has already been loaded.\n *
\n *\n *
\n *\n * Manifest and Bundles\n *\n * - {@link assets.AssetsManifest Manifest} is a descriptor that contains a list of all assets and their properties.\n * - {@link assets.AssetsBundle Bundles} are a way to group assets together.\n *\n * ```js\n * import { Assets } from 'pixi.js';\n *\n * // Manifest Example\n * const manifest = {\n * bundles: [\n * {\n * name: 'load-screen',\n * assets: [\n * {\n * alias: 'background',\n * src: 'sunset.png',\n * },\n * {\n * alias: 'bar',\n * src: 'load-bar.{png,webp}',\n * },\n * ],\n * },\n * {\n * name: 'game-screen',\n * assets: [\n * {\n * alias: 'character',\n * src: 'robot.png',\n * },\n * {\n * alias: 'enemy',\n * src: 'bad-guy.png',\n * },\n * ],\n * },\n * ]\n * };\n *\n * await Assets.init({ manifest });\n *\n * // Load a bundle...\n * loadScreenAssets = await Assets.loadBundle('load-screen');\n * // Load another bundle...\n * gameScreenAssets = await Assets.loadBundle('game-screen');\n * ```\n *
\n */\n\n/**\n * The global Assets class, it's a singleton so you don't need to instantiate it.\n *\n * **The `Assets` class has four main responsibilities:**\n * 1. Allows users to map URLs to keys and resolve them according to the user's browser capabilities\n * 2. Loads the resources and transforms them into assets that developers understand.\n * 3. Caches the assets and provides a way to access them.\n * 4. Allow developers to unload assets and clear the cache.\n *\n *\n * **It also has a few advanced features:**\n * 1. Allows developers to provide a {@link assets.Manifest} upfront of all assets and help manage\n * them via {@link assets.AssetsBundles Bundles}.\n * 2. Allows users to background load assets. Shortening (or eliminating) load times and improving UX. With this feature,\n * in-game loading bars can be a thing of the past!\n * @example\n * import { Assets } from 'pixi.js';\n *\n * const bunny = await Assets.load('bunny.png');\n * @memberof assets\n * @class Assets\n */\nexport class AssetsClass\n{\n /** the resolver to map various urls */\n public resolver: Resolver;\n /** The loader, loads stuff! */\n public loader: Loader;\n /**\n * The global cache of all assets within PixiJS\n * @type {assets.Cache}\n */\n public cache: typeof Cache;\n\n /** takes care of loading assets in the background */\n private readonly _backgroundLoader: BackgroundLoader;\n\n private readonly _detections: FormatDetectionParser[] = [];\n\n private _initialized = false;\n\n constructor()\n {\n this.resolver = new Resolver();\n this.loader = new Loader();\n this.cache = Cache;\n\n this._backgroundLoader = new BackgroundLoader(this.loader);\n this._backgroundLoader.active = true;\n\n this.reset();\n }\n\n /**\n * Best practice is to call this function before any loading commences\n * Initiating is the best time to add any customization to the way things are loaded.\n *\n * you do not need to call this for the Assets class to work, only if you want to set any initial properties\n * @param options - options to initialize the Assets manager with\n */\n public async init(options: AssetInitOptions = {}): Promise\n {\n if (this._initialized)\n {\n // #if _DEBUG\n warn('[Assets]AssetManager already initialized, did you load before calling this Assets.init()?');\n // #endif\n\n return;\n }\n\n this._initialized = true;\n\n if (options.defaultSearchParams)\n {\n this.resolver.setDefaultSearchParams(options.defaultSearchParams);\n }\n\n if (options.basePath)\n {\n this.resolver.basePath = options.basePath;\n }\n\n if (options.bundleIdentifier)\n {\n this.resolver.setBundleIdentifier(options.bundleIdentifier);\n }\n\n if (options.manifest)\n {\n let manifest = options.manifest;\n\n if (typeof manifest === 'string')\n {\n manifest = await this.load(manifest);\n }\n\n this.resolver.addManifest(manifest);\n }\n\n const resolutionPref = options.texturePreference?.resolution ?? 1;\n const resolution = (typeof resolutionPref === 'number') ? [resolutionPref] : resolutionPref;\n\n const formats = await this._detectFormats({\n preferredFormats: options.texturePreference?.format,\n skipDetections: options.skipDetections,\n detections: this._detections\n });\n\n this.resolver.prefer({\n params: {\n format: formats,\n resolution,\n },\n });\n\n if (options.preferences)\n {\n this.setPreferences(options.preferences);\n }\n }\n\n /**\n * Allows you to specify how to resolve any assets load requests.\n * There are a few ways to add things here as shown below:\n * @example\n * import { Assets } from 'pixi.js';\n *\n * // Simple\n * Assets.add({alias: 'bunnyBooBoo', src: 'bunny.png'});\n * const bunny = await Assets.load('bunnyBooBoo');\n *\n * // Multiple keys:\n * Assets.add({alias: ['burger', 'chicken'], src: 'bunny.png'});\n *\n * const bunny = await Assets.load('burger');\n * const bunny2 = await Assets.load('chicken');\n *\n * // passing options to to the object\n * Assets.add({\n * alias: 'bunnyBooBooSmooth',\n * src: 'bunny{png,webp}',\n * data: { scaleMode: SCALE_MODES.NEAREST }, // Base texture options\n * });\n *\n * // Multiple assets\n *\n * // The following all do the same thing:\n *\n * Assets.add({alias: 'bunnyBooBoo', src: 'bunny{png,webp}'});\n *\n * Assets.add({\n * alias: 'bunnyBooBoo',\n * src: [\n * 'bunny.png',\n * 'bunny.webp',\n * ],\n * });\n *\n * const bunny = await Assets.load('bunnyBooBoo'); // Will try to load WebP if available\n * @param assets - the unresolved assets to add to the resolver\n */\n public add(assets: (ArrayOr)): void\n {\n this.resolver.add(assets);\n }\n\n /**\n * Loads your assets! You pass in a key or URL and it will return a promise that\n * resolves to the loaded asset. If multiple assets a requested, it will return a hash of assets.\n *\n * Don't worry about loading things multiple times, behind the scenes assets are only ever loaded\n * once and the same promise reused behind the scenes so you can safely call this function multiple\n * times with the same key and it will always return the same asset.\n * @example\n * import { Assets } from 'pixi.js';\n *\n * // Load a URL:\n * const myImageTexture = await Assets.load('http://some.url.com/image.png'); // => returns a texture\n *\n * Assets.add('thumper', 'bunny.png');\n * Assets.add('chicko', 'chicken.png');\n *\n * // Load multiple assets:\n * const textures = await Assets.load(['thumper', 'chicko']); // => {thumper: Texture, chicko: Texture}\n * @param urls - the urls to load\n * @param onProgress - optional function that is called when progress on asset loading is made.\n * The function is passed a single parameter, `progress`, which represents the percentage\n * (0.0 - 1.0) of the assets loaded.\n * @returns - the assets that were loaded, either a single asset or a hash of assets\n */\n public async load(\n urls: string | UnresolvedAsset,\n onProgress?: ProgressCallback,\n ): Promise;\n public async load(\n urls: string[] | UnresolvedAsset[],\n onProgress?: ProgressCallback,\n ): Promise>;\n public async load(\n urls: ArrayOr | ArrayOr,\n onProgress?: ProgressCallback\n ): Promise>\n {\n if (!this._initialized)\n {\n await this.init();\n }\n\n const singleAsset = isSingleItem(urls);\n\n const urlArray: string[] = convertToList(urls)\n .map((url) =>\n {\n if (typeof url !== 'string')\n {\n const aliases = this.resolver.getAlias(url);\n\n if (aliases.some((alias) => !this.resolver.hasKey(alias)))\n {\n this.add(url);\n }\n\n return Array.isArray(aliases) ? aliases[0] : aliases;\n }\n\n // if it hasn't been added, add it now\n if (!this.resolver.hasKey(url)) this.add({ alias: url, src: url });\n\n return url;\n }) as string[];\n\n // check cache first...\n const resolveResults = this.resolver.resolve(urlArray);\n\n // remap to the keys used..\n const out: Record = await this._mapLoadToResolve(resolveResults, onProgress);\n\n return singleAsset ? out[urlArray[0] as string] : out;\n }\n\n /**\n * This adds a bundle of assets in one go so that you can load them as a group.\n * For example you could add a bundle for each screen in you pixi app\n * @example\n * import { Assets } from 'pixi.js';\n *\n * Assets.addBundle('animals', [\n * { alias: 'bunny', src: 'bunny.png' },\n * { alias: 'chicken', src: 'chicken.png' },\n * { alias: 'thumper', src: 'thumper.png' },\n * ]);\n * // or\n * Assets.addBundle('animals', {\n * bunny: 'bunny.png',\n * chicken: 'chicken.png',\n * thumper: 'thumper.png',\n * });\n *\n * const assets = await Assets.loadBundle('animals');\n * @param bundleId - the id of the bundle to add\n * @param assets - a record of the asset or assets that will be chosen from when loading via the specified key\n */\n public addBundle(bundleId: string, assets: AssetsBundle['assets']): void\n {\n this.resolver.addBundle(bundleId, assets);\n }\n\n /**\n * Bundles are a way to load multiple assets at once.\n * If a manifest has been provided to the init function then you can load a bundle, or bundles.\n * you can also add bundles via `addBundle`\n * @example\n * import { Assets } from 'pixi.js';\n *\n * // Manifest Example\n * const manifest = {\n * bundles: [\n * {\n * name: 'load-screen',\n * assets: [\n * {\n * alias: 'background',\n * src: 'sunset.png',\n * },\n * {\n * alias: 'bar',\n * src: 'load-bar.{png,webp}',\n * },\n * ],\n * },\n * {\n * name: 'game-screen',\n * assets: [\n * {\n * alias: 'character',\n * src: 'robot.png',\n * },\n * {\n * alias: 'enemy',\n * src: 'bad-guy.png',\n * },\n * ],\n * },\n * ]\n * };\n *\n * await Assets.init({ manifest });\n *\n * // Load a bundle...\n * loadScreenAssets = await Assets.loadBundle('load-screen');\n * // Load another bundle...\n * gameScreenAssets = await Assets.loadBundle('game-screen');\n * @param bundleIds - the bundle id or ids to load\n * @param onProgress - Optional function that is called when progress on asset loading is made.\n * The function is passed a single parameter, `progress`, which represents the percentage (0.0 - 1.0)\n * of the assets loaded. Do not use this function to detect when assets are complete and available,\n * instead use the Promise returned by this function.\n * @returns all the bundles assets or a hash of assets for each bundle specified\n */\n public async loadBundle(bundleIds: ArrayOr, onProgress?: ProgressCallback): Promise\n {\n if (!this._initialized)\n {\n await this.init();\n }\n\n let singleAsset = false;\n\n if (typeof bundleIds === 'string')\n {\n singleAsset = true;\n bundleIds = [bundleIds];\n }\n\n const resolveResults = this.resolver.resolveBundle(bundleIds);\n\n const out: Record> = {};\n\n const keys = Object.keys(resolveResults);\n let count = 0;\n let total = 0;\n const _onProgress = () =>\n {\n onProgress?.(++count / total);\n };\n const promises = keys.map((bundleId) =>\n {\n const resolveResult = resolveResults[bundleId];\n\n total += Object.keys(resolveResult).length;\n\n return this._mapLoadToResolve(resolveResult, _onProgress)\n .then((resolveResult) =>\n {\n out[bundleId] = resolveResult;\n });\n });\n\n await Promise.all(promises);\n\n return singleAsset ? out[bundleIds[0]] : out;\n }\n\n /**\n * Initiate a background load of some assets. It will passively begin to load these assets in the background.\n * So when you actually come to loading them you will get a promise that resolves to the loaded assets immediately\n *\n * An example of this might be that you would background load game assets after your inital load.\n * then when you got to actually load your game screen assets when a player goes to the game - the loading\n * would already have stared or may even be complete, saving you having to show an interim load bar.\n * @example\n * import { Assets } from 'pixi.js';\n *\n * Assets.backgroundLoad('bunny.png');\n *\n * // later on in your app...\n * await Assets.loadBundle('bunny.png'); // Will resolve quicker as loading may have completed!\n * @param urls - the url / urls you want to background load\n */\n public async backgroundLoad(urls: ArrayOr): Promise\n {\n if (!this._initialized)\n {\n await this.init();\n }\n\n if (typeof urls === 'string')\n {\n urls = [urls];\n }\n\n const resolveResults = this.resolver.resolve(urls);\n\n this._backgroundLoader.add(Object.values(resolveResults));\n }\n\n /**\n * Initiate a background of a bundle, works exactly like backgroundLoad but for bundles.\n * this can only be used if the loader has been initiated with a manifest\n * @example\n * import { Assets } from 'pixi.js';\n *\n * await Assets.init({\n * manifest: {\n * bundles: [\n * {\n * name: 'load-screen',\n * assets: [...],\n * },\n * ...\n * ],\n * },\n * });\n *\n * Assets.backgroundLoadBundle('load-screen');\n *\n * // Later on in your app...\n * await Assets.loadBundle('load-screen'); // Will resolve quicker as loading may have completed!\n * @param bundleIds - the bundleId / bundleIds you want to background load\n */\n public async backgroundLoadBundle(bundleIds: ArrayOr): Promise\n {\n if (!this._initialized)\n {\n await this.init();\n }\n\n if (typeof bundleIds === 'string')\n {\n bundleIds = [bundleIds];\n }\n\n const resolveResults = this.resolver.resolveBundle(bundleIds);\n\n Object.values(resolveResults).forEach((resolveResult) =>\n {\n this._backgroundLoader.add(Object.values(resolveResult));\n });\n }\n\n /**\n * Only intended for development purposes.\n * This will wipe the resolver and caches.\n * You will need to reinitialize the Asset\n */\n public reset(): void\n {\n this.resolver.reset();\n this.loader.reset();\n this.cache.reset();\n\n this._initialized = false;\n }\n\n /**\n * Instantly gets an asset already loaded from the cache. If the asset has not yet been loaded,\n * it will return undefined. So it's on you! When in doubt just use `Assets.load` instead.\n * (Remember, the loader will never load things more than once!)\n * @param keys - The key or keys for the assets that you want to access\n * @returns - The assets or hash of assets requested\n */\n public get(keys: string): T;\n public get(keys: string[]): Record;\n public get(keys: ArrayOr): T | Record\n {\n if (typeof keys === 'string')\n {\n return Cache.get(keys);\n }\n\n const assets: Record = {};\n\n for (let i = 0; i < keys.length; i++)\n {\n assets[i] = Cache.get(keys[i]);\n }\n\n return assets;\n }\n\n /**\n * helper function to map resolved assets back to loaded assets\n * @param resolveResults - the resolve results from the resolver\n * @param onProgress - the progress callback\n */\n private async _mapLoadToResolve(\n resolveResults: ResolvedAsset | Record,\n onProgress?: ProgressCallback\n ): Promise>\n {\n const resolveArray = [...new Set(Object.values(resolveResults))] as ResolvedAsset[];\n\n // pause background loader...\n this._backgroundLoader.active = false;\n\n const loadedAssets = await this.loader.load(resolveArray, onProgress);\n\n // resume background loader...\n this._backgroundLoader.active = true;\n\n // remap to the keys used..\n\n const out: Record = {};\n\n resolveArray.forEach((resolveResult) =>\n {\n const asset = loadedAssets[resolveResult.src];\n\n const keys = [resolveResult.src];\n\n if (resolveResult.alias)\n {\n keys.push(...resolveResult.alias);\n }\n\n keys.forEach((key) =>\n {\n out[key] = asset;\n });\n\n Cache.set(keys, asset);\n });\n\n return out;\n }\n\n /**\n * Unload an asset or assets. As the Assets class is responsible for creating the assets via the `load` function\n * this will make sure to destroy any assets and release them from memory.\n * Once unloaded, you will need to load the asset again.\n *\n * Use this to help manage assets if you find that you have a large app and you want to free up memory.\n *\n * - it's up to you as the developer to make sure that textures are not actively being used when you unload them,\n * Pixi won't break but you will end up with missing assets. Not a good look for the user!\n * @example\n * import { Assets } from 'pixi.js';\n *\n * // Load a URL:\n * const myImageTexture = await Assets.load('http://some.url.com/image.png'); // => returns a texture\n *\n * await Assets.unload('http://some.url.com/image.png')\n *\n * // myImageTexture will be destroyed now.\n *\n * // Unload multiple assets:\n * const textures = await Assets.unload(['thumper', 'chicko']);\n * @param urls - the urls to unload\n */\n public async unload(\n urls: ArrayOr | ResolvedAsset | ResolvedAsset[]\n ): Promise\n {\n if (!this._initialized)\n {\n await this.init();\n }\n\n const urlArray = convertToList(urls)\n .map((url) =>\n ((typeof url !== 'string') ? url.src : url));\n\n // check cache first...\n const resolveResults = this.resolver.resolve(urlArray);\n\n await this._unloadFromResolved(resolveResults);\n }\n\n /**\n * Bundles are a way to manage multiple assets at once.\n * this will unload all files in a bundle.\n *\n * once a bundle has been unloaded, you need to load it again to have access to the assets.\n * @example\n * import { Assets } from 'pixi.js';\n *\n * Assets.addBundle({\n * 'thumper': 'http://some.url.com/thumper.png',\n * })\n *\n * const assets = await Assets.loadBundle('thumper');\n *\n * // Now to unload...\n *\n * await Assets.unloadBundle('thumper');\n *\n * // All assets in the assets object will now have been destroyed and purged from the cache\n * @param bundleIds - the bundle id or ids to unload\n */\n public async unloadBundle(bundleIds: ArrayOr): Promise\n {\n if (!this._initialized)\n {\n await this.init();\n }\n\n bundleIds = convertToList(bundleIds);\n\n const resolveResults = this.resolver.resolveBundle(bundleIds);\n\n const promises = Object.keys(resolveResults).map((bundleId) =>\n this._unloadFromResolved(resolveResults[bundleId]));\n\n await Promise.all(promises);\n }\n\n private async _unloadFromResolved(resolveResult: ResolvedAsset | Record)\n {\n const resolveArray = Object.values(resolveResult);\n\n resolveArray.forEach((resolveResult) =>\n {\n Cache.remove(resolveResult.src);\n });\n\n await this.loader.unload(resolveArray);\n }\n\n /**\n * Detects the supported formats for the browser, and returns an array of supported formats, respecting\n * the users preferred formats order.\n * @param options - the options to use when detecting formats\n * @param options.preferredFormats - the preferred formats to use\n * @param options.skipDetections - if we should skip the detections altogether\n * @param options.detections - the detections to use\n * @returns - the detected formats\n */\n private async _detectFormats(options: {\n preferredFormats: string | string[],\n skipDetections: boolean,\n detections: FormatDetectionParser[]\n }): Promise\n {\n let formats: string[] = [];\n\n // set preferred formats\n if (options.preferredFormats)\n {\n formats = Array.isArray(options.preferredFormats)\n ? options.preferredFormats : [options.preferredFormats];\n }\n\n // we should add any formats that are supported by the browser\n for (const detection of options.detections)\n {\n if (options.skipDetections || await detection.test())\n {\n formats = await detection.add(formats);\n }\n else if (!options.skipDetections)\n {\n formats = await detection.remove(formats);\n }\n }\n\n // remove any duplicates\n formats = formats.filter((format, index) => formats.indexOf(format) === index);\n\n return formats;\n }\n\n /** All the detection parsers currently added to the Assets class. */\n public get detections(): FormatDetectionParser[]\n {\n return this._detections;\n }\n\n /**\n * General setter for preferences. This is a helper function to set preferences on all parsers.\n * @param preferences - the preferences to set\n */\n public setPreferences(preferences: Partial): void\n {\n // Find matching config keys in loaders with preferences\n // and set the values\n this.loader.parsers.forEach((parser) =>\n {\n if (!parser.config) return;\n\n (Object.keys(parser.config) as (keyof AssetsPreferences)[])\n .filter((key) => key in preferences)\n .forEach((key) =>\n {\n parser.config[key] = preferences[key];\n });\n });\n }\n}\n\nexport const Assets = new AssetsClass();\n\n// Handle registration of extensions\nextensions\n .handleByList(ExtensionType.LoadParser, Assets.loader.parsers)\n .handleByList(ExtensionType.ResolveParser, Assets.resolver.parsers)\n .handleByList(ExtensionType.CacheParser, Assets.cache.parsers)\n .handleByList(ExtensionType.DetectionParser, Assets.detections);\nextensions.add(\n cacheTextureArray,\n\n detectDefaults,\n detectAvif,\n detectWebp,\n detectMp4,\n detectOgv,\n detectWebm,\n\n loadJson,\n loadTxt,\n loadWebFont,\n loadSvg,\n loadTextures,\n loadVideoTextures,\n loadBitmapFont,\n\n bitmapFontCachePlugin,\n\n resolveTextureUrl,\n resolveJsonUrl\n);\n\nconst assetKeyMap = {\n loader: ExtensionType.LoadParser,\n resolver: ExtensionType.ResolveParser,\n cache: ExtensionType.CacheParser,\n detection: ExtensionType.DetectionParser,\n};\n\ntype AssetType = keyof typeof assetKeyMap;\n\n// Split the Asset extension into it's various parts\n// these are handled in the Assets.ts file\nextensions.handle(ExtensionType.Asset, (extension) =>\n{\n const ref = extension.ref as AssetExtension;\n\n Object.entries(assetKeyMap)\n .filter(([key]) => !!ref[key as AssetType])\n .forEach(([key, type]) => extensions.add(Object.assign(\n ref[key as AssetType],\n // Allow the function to optionally define it's own\n // ExtensionMetadata, the use cases here is priority for LoaderParsers\n { extension: ref[key as AssetType].extension ?? type },\n )));\n}, (extension) =>\n{\n const ref = extension.ref as AssetExtension;\n\n Object.keys(assetKeyMap)\n .filter((key) => !!ref[key as AssetType])\n .forEach((key) => extensions.remove(ref[key as AssetType]));\n});\n","import { ExtensionType } from '../../extensions/Extensions';\nimport { isWebGLSupported } from '../../utils/browser/isWebGLSupported';\nimport { isWebGPUSupported } from '../../utils/browser/isWebGPUSupported';\n\nimport type { FormatDetectionParser } from '../../assets/detections/types';\n\nexport const detectBasis = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 3,\n },\n test: async (): Promise =>\n {\n if (await isWebGPUSupported()) return true;\n if (isWebGLSupported()) return true;\n\n return false;\n },\n add: async (formats) => [...formats, 'basis'],\n remove: async (formats) => formats.filter((f) => f !== 'basis'),\n} as FormatDetectionParser;\n","import { TextureSource } from './TextureSource';\n\nimport type { TextureSourceOptions } from './TextureSource';\n\nexport class CompressedSource extends TextureSource\n{\n public readonly uploadMethodId = 'compressed';\n\n constructor(options: TextureSourceOptions)\n {\n super(options);\n\n this.resource = options.resource;\n this.mipLevelCount = this.resource.length;\n }\n}\n","import type { TEXTURE_FORMATS } from '../../../shared/texture/const';\n\nlet supportedGLCompressedTextureFormats: TEXTURE_FORMATS[];\n\nexport function getSupportedGlCompressedTextureFormats(): TEXTURE_FORMATS[]\n{\n if (supportedGLCompressedTextureFormats) return supportedGLCompressedTextureFormats;\n\n // TODO: can we use already created context (webgl or webgl2)?\n const canvas = document.createElement('canvas');\n const gl = canvas.getContext('webgl');\n\n if (!gl)\n {\n return [];\n }\n\n supportedGLCompressedTextureFormats = [\n // BC compressed formats usable if \"texture-compression-bc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n // 'bc6h-rgb-ufloat'\n // 'bc6h-rgb-float'\n // 'bc7-rgba-unorm',\n // 'bc7-rgba-unorm-srgb',\n ...gl.getExtension('EXT_texture_compression_bptc') ? [\n 'bc6h-rgb-ufloat',\n 'bc6h-rgb-float',\n 'bc7-rgba-unorm',\n 'bc7-rgba-unorm-srgb',\n ] : [],\n // BC compressed formats usable if \"texture-compression-bc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n // 'bc1-rgba-unorm',\n // 'bc1-rgba-unorm-srgb',\n // 'bc4-r-unorm'\n // 'bc4-r-snorm'\n // 'bc5-rg-unorm'\n // 'bc5-rg-snorm'\n ...gl.getExtension('WEBGL_compressed_texture_s3tc') ? [\n 'bc1-rgba-unorm',\n 'bc2-rgba-unorm',\n 'bc3-rgba-unorm',\n ] : [],\n ...gl.getExtension('WEBGL_compressed_texture_s3tc_srgb') ? [\n 'bc1-rgba-unorm-srgb',\n 'bc2-rgba-unorm-srgb',\n 'bc3-rgba-unorm-srgb',\n ] : [],\n\n ...gl.getExtension('EXT_texture_compression_rgtc') ? [\n 'bc4-r-unorm',\n 'bc4-r-snorm',\n 'bc5-rg-unorm',\n 'bc5-rg-snorm',\n ] : [],\n\n // ETC2 compressed formats usable if \"texture-compression-etc2\" is both\n // supported by the device/user agent and enabled in requestDevice.\n ...gl.getExtension('WEBGL_compressed_texture_etc') ? [\n 'etc2-rgb8unorm',\n 'etc2-rgb8unorm-srgb',\n 'etc2-rgba8unorm',\n 'etc2-rgba8unorm-srgb',\n 'etc2-rgb8a1unorm',\n 'etc2-rgb8a1unorm-srgb',\n 'eac-r11unorm',\n 'eac-rg11unorm',\n ] : [],\n // 'eac-r11snorm',\n // 'eac-rg11snorm',\n // ASTC compressed formats usable if \"texture-compression-astc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n ...gl.getExtension('WEBGL_compressed_texture_astc') ? [\n 'astc-4x4-unorm',\n 'astc-4x4-unorm-srgb',\n 'astc-5x4-unorm',\n 'astc-5x4-unorm-srgb',\n 'astc-5x5-unorm',\n 'astc-5x5-unorm-srgb',\n 'astc-6x5-unorm',\n 'astc-6x5-unorm-srgb',\n 'astc-6x6-unorm',\n 'astc-6x6-unorm-srgb',\n 'astc-8x5-unorm',\n 'astc-8x5-unorm-srgb',\n 'astc-8x6-unorm',\n 'astc-8x6-unorm-srgb',\n 'astc-8x8-unorm',\n 'astc-8x8-unorm-srgb',\n 'astc-10x5-unorm',\n 'astc-10x5-unorm-srgb',\n 'astc-10x6-unorm',\n 'astc-10x6-unorm-srgb',\n 'astc-10x8-unorm',\n 'astc-10x8-unorm-srgb',\n 'astc-10x10-unorm',\n 'astc-10x10-unorm-srgb',\n 'astc-12x10-unorm',\n 'astc-12x10-unorm-srgb',\n 'astc-12x12-unorm',\n 'astc-12x12-unorm-srgb'\n ] : [],\n ] as TEXTURE_FORMATS[];\n\n return supportedGLCompressedTextureFormats;\n}\n","import type { TEXTURE_FORMATS } from '../../../shared/texture/const';\n\nlet supportedGPUCompressedTextureFormats: TEXTURE_FORMATS[];\n\nexport async function getSupportedGPUCompressedTextureFormats(): Promise\n{\n if (supportedGPUCompressedTextureFormats) return supportedGPUCompressedTextureFormats;\n\n const adapter = await navigator.gpu.requestAdapter();\n\n supportedGPUCompressedTextureFormats = [\n ...adapter.features.has('texture-compression-bc') ? [\n // BC compressed formats usable if \"texture-compression-bc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n 'bc1-rgba-unorm',\n 'bc1-rgba-unorm-srgb',\n 'bc2-rgba-unorm',\n 'bc2-rgba-unorm-srgb',\n 'bc3-rgba-unorm',\n 'bc3-rgba-unorm-srgb',\n 'bc4-r-unorm',\n 'bc4-r-snorm',\n 'bc5-rg-unorm',\n 'bc5-rg-snorm',\n 'bc6h-rgb-ufloat',\n 'bc6h-rgb-float',\n 'bc7-rgba-unorm',\n 'bc7-rgba-unorm-srgb',\n ] : [],\n ...adapter.features.has('texture-compression-etc2') ? [\n // ETC2 compressed formats usable if \"texture-compression-etc2\" is both\n // supported by the device/user agent and enabled in requestDevice.\n 'etc2-rgb8unorm',\n 'etc2-rgb8unorm-srgb',\n 'etc2-rgb8a1unorm',\n 'etc2-rgb8a1unorm-srgb',\n 'etc2-rgba8unorm',\n 'etc2-rgba8unorm-srgb',\n 'eac-r11unorm',\n 'eac-r11snorm',\n 'eac-rg11unorm',\n 'eac-rg11snorm',\n ] : [],\n ...adapter.features.has('texture-compression-astc') ? [\n // ASTC compressed formats usable if \"texture-compression-astc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n 'astc-4x4-unorm',\n 'astc-4x4-unorm-srgb',\n 'astc-5x4-unorm',\n 'astc-5x4-unorm-srgb',\n 'astc-5x5-unorm',\n 'astc-5x5-unorm-srgb',\n 'astc-6x5-unorm',\n 'astc-6x5-unorm-srgb',\n 'astc-6x6-unorm',\n 'astc-6x6-unorm-srgb',\n 'astc-8x5-unorm',\n 'astc-8x5-unorm-srgb',\n 'astc-8x6-unorm',\n 'astc-8x6-unorm-srgb',\n 'astc-8x8-unorm',\n 'astc-8x8-unorm-srgb',\n 'astc-10x5-unorm',\n 'astc-10x5-unorm-srgb',\n 'astc-10x6-unorm',\n 'astc-10x6-unorm-srgb',\n 'astc-10x8-unorm',\n 'astc-10x8-unorm-srgb',\n 'astc-10x10-unorm',\n 'astc-10x10-unorm-srgb',\n 'astc-12x10-unorm',\n 'astc-12x10-unorm-srgb',\n 'astc-12x12-unorm',\n 'astc-12x12-unorm-srgb',\n ] : [],\n ] as TEXTURE_FORMATS[];\n\n return supportedGPUCompressedTextureFormats;\n}\n","import { isWebGLSupported } from '../../../../../utils/browser/isWebGLSupported';\nimport { isWebGPUSupported } from '../../../../../utils/browser/isWebGPUSupported';\nimport { getSupportedGlCompressedTextureFormats } from '../../../gl/texture/utils/getSupportedGlCompressedTextureFormats';\nimport { getSupportedGPUCompressedTextureFormats } from '../../../gpu/texture/utils/getSupportedGPUCompressedTextureFormats';\n\nimport type { TEXTURE_FORMATS } from '../const';\n\nlet supportedCompressedTextureFormats: TEXTURE_FORMATS[];\n\nexport async function getSupportedCompressedTextureFormats(): Promise\n{\n if (supportedCompressedTextureFormats !== undefined) return supportedCompressedTextureFormats;\n\n supportedCompressedTextureFormats = await (async (): Promise =>\n {\n // find only overlapping ones..\n const _isWebGPUSupported = await isWebGPUSupported();\n const _isWebGLSupported = isWebGLSupported();\n\n if (_isWebGPUSupported && _isWebGLSupported)\n {\n const gpuTextureFormats = await getSupportedGPUCompressedTextureFormats();\n const glTextureFormats = getSupportedGlCompressedTextureFormats();\n\n return gpuTextureFormats.filter((format) => glTextureFormats.includes(format));\n }\n else if (_isWebGPUSupported)\n {\n return await getSupportedGPUCompressedTextureFormats();\n }\n else if (_isWebGLSupported)\n {\n return getSupportedGlCompressedTextureFormats();\n }\n\n return [];\n })();\n\n return supportedCompressedTextureFormats;\n}\n","import { getSupportedCompressedTextureFormats } from './getSupportedCompressedTextureFormats';\n\nimport type { TEXTURE_FORMATS } from '../const';\n\nexport const nonCompressedFormats: TEXTURE_FORMATS[] = [\n // 8-bit formats\n 'r8unorm',\n 'r8snorm',\n 'r8uint',\n 'r8sint',\n\n // 16-bit formats\n 'r16uint',\n 'r16sint',\n 'r16float',\n 'rg8unorm',\n 'rg8snorm',\n 'rg8uint',\n 'rg8sint',\n\n // 32-bit formats\n 'r32uint',\n 'r32sint',\n 'r32float',\n 'rg16uint',\n 'rg16sint',\n 'rg16float',\n 'rgba8unorm',\n 'rgba8unorm-srgb',\n 'rgba8snorm',\n 'rgba8uint',\n 'rgba8sint',\n 'bgra8unorm',\n 'bgra8unorm-srgb',\n // Packed 32-bit formats\n 'rgb9e5ufloat',\n 'rgb10a2unorm',\n 'rg11b10ufloat',\n\n // 64-bit formats\n 'rg32uint',\n 'rg32sint',\n 'rg32float',\n 'rgba16uint',\n 'rgba16sint',\n 'rgba16float',\n\n // 128-bit formats\n 'rgba32uint',\n 'rgba32sint',\n 'rgba32float',\n\n // Depth/stencil formats\n 'stencil8',\n 'depth16unorm',\n 'depth24plus',\n 'depth24plus-stencil8',\n 'depth32float',\n\n // \"depth32float-stencil8\" feature\n 'depth32float-stencil8',\n];\n\nlet supportedTextureFormats: TEXTURE_FORMATS[];\n\nexport async function getSupportedTextureFormats(): Promise\n{\n if (supportedTextureFormats !== undefined) return supportedTextureFormats;\n\n const compressedTextureFormats = await getSupportedCompressedTextureFormats();\n\n supportedTextureFormats = [\n ...nonCompressedFormats,\n ...compressedTextureFormats,\n ];\n\n return supportedTextureFormats;\n}\n\n","export const basisTranscoderUrls = {\n jsUrl: 'https://files.pixijs.download/transcoders/basis/basis_transcoder.js',\n wasmUrl: 'https://files.pixijs.download/transcoders/basis/basis_transcoder.wasm',\n};\n\nexport function setBasisTranscoderPath(config: Partial)\n{\n Object.assign(basisTranscoderUrls, config);\n}\n","import BasisWorker from 'worker:./basis.worker.ts';\nimport { basisTranscoderUrls } from '../utils/setBasisTranscoderPath';\n\nimport type { TEXTURE_FORMATS } from '../../../rendering/renderers/shared/texture/const';\nimport type { TextureSourceOptions } from '../../../rendering/renderers/shared/texture/sources/TextureSource';\n\nlet basisWorker: Worker;\nconst urlHash: Record void> = {};\n\nfunction getBasisWorker(supportedTextures: TEXTURE_FORMATS[]): Worker\n{\n if (!basisWorker)\n {\n basisWorker = new BasisWorker().worker;\n\n basisWorker.onmessage = (messageEvent) =>\n {\n const { success, url, textureOptions } = messageEvent.data;\n\n if (!success)\n {\n console.warn('Failed to load Basis texture', url);\n }\n\n urlHash[url](textureOptions);\n };\n\n basisWorker.postMessage({\n type: 'init',\n jsUrl: basisTranscoderUrls.jsUrl,\n wasmUrl: basisTranscoderUrls.wasmUrl,\n supportedTextures\n });\n }\n\n return basisWorker;\n}\n\nexport function loadBasisOnWorker(\n url: string,\n supportedTextures: TEXTURE_FORMATS[]\n): Promise\n{\n const ktxWorker = getBasisWorker(supportedTextures);\n\n return new Promise((resolve) =>\n {\n urlHash[url] = resolve;\n\n ktxWorker.postMessage({ type: 'load', url });\n });\n}\n","import { LoaderParserPriority } from '../../assets/loader/parsers/LoaderParser';\nimport { createTexture } from '../../assets/loader/parsers/textures/utils/createTexture';\nimport { checkExtension } from '../../assets/utils/checkExtension';\nimport { ExtensionType } from '../../extensions/Extensions';\nimport { CompressedSource } from '../../rendering/renderers/shared/texture/sources/CompressedSource';\nimport { getSupportedTextureFormats } from '../../rendering/renderers/shared/texture/utils/getSupportedTextureFormats';\nimport { loadBasisOnWorker } from './worker/loadBasisOnWorker';\n\nimport type { Loader } from '../../assets/loader/Loader';\nimport type { LoaderParser } from '../../assets/loader/parsers/LoaderParser';\nimport type { ResolvedAsset } from '../../assets/types';\nimport type { TextureSourceOptions } from '../../rendering/renderers/shared/texture/sources/TextureSource';\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\n\n/** Loads KTX textures! */\nexport const loadBasis = {\n extension: {\n type: ExtensionType.LoadParser,\n priority: LoaderParserPriority.High,\n name: 'loadBasis',\n },\n\n name: 'loadBasis',\n\n test(url: string): boolean\n {\n return checkExtension(url, ['.basis']);\n },\n\n async load(url: string, _asset: ResolvedAsset, loader: Loader): Promise\n {\n const supportedTextures = await getSupportedTextureFormats();\n\n const textureOptions = await loadBasisOnWorker(url, supportedTextures);\n\n const compressedTextureSource = new CompressedSource(textureOptions);\n\n return createTexture(compressedTextureSource, loader, url);\n },\n\n unload(texture: Texture | Texture[]): void\n {\n if (Array.isArray(texture))\n {\n texture.forEach((t) => t.destroy(true));\n }\n else\n {\n texture.destroy(true);\n }\n }\n\n} satisfies LoaderParser;\n","import type { BasisTexture } from '../types';\n\nexport function createLevelBuffers(basisTexture: BasisTexture, basisTranscoderFormat: number): Uint8Array[]\n{\n const images = basisTexture.getNumImages();\n const levels = basisTexture.getNumLevels(0);\n\n const success = basisTexture.startTranscoding();\n\n if (!success)\n {\n throw new Error('startTranscoding failed');\n }\n\n const levelBuffers = [];\n\n for (let levelIndex = 0; levelIndex < levels; ++levelIndex)\n {\n for (let sliceIndex = 0; sliceIndex < images; ++sliceIndex)\n {\n const transcodeSize = basisTexture.getImageTranscodedSizeInBytes(sliceIndex, levelIndex, basisTranscoderFormat);\n const levelBuffer = new Uint8Array(transcodeSize);\n\n const success = basisTexture.transcodeImage(levelBuffer, sliceIndex, levelIndex, basisTranscoderFormat, 1, 0);\n\n if (!success)\n {\n throw new Error('transcodeImage failed');\n }\n\n levelBuffers.push(levelBuffer);\n }\n }\n\n return levelBuffers;\n}\n","const gpuFormatToBasisTranscoderFormatMap: Record = {\n 'bc3-rgba-unorm': 3, // cTFBC3_RGBA\n 'bc7-rgba-unorm': 6, // cTFBC7_RGBA,\n 'etc2-rgba8unorm': 1, // cTFETC2_RGBA,\n 'astc-4x4-unorm': 10, // cTFASTC_4x4_RGBA,\n // Uncompressed\n rgba8unorm: 13, // cTFRGBA32,\n rgba4unorm: 16, // cTFRGBA4444,\n};\n\nexport function gpuFormatToBasisTranscoderFormat(transcoderFormat: string): number\n{\n const format = gpuFormatToBasisTranscoderFormatMap[transcoderFormat];\n\n if (format)\n {\n return format;\n }\n\n throw new Error(`Unsupported transcoderFormat: ${transcoderFormat}`);\n}\n","import type { TEXTURE_FORMATS } from '../../rendering/renderers/shared/texture/const';\n\n// http://msdn.microsoft.com/en-us/library/bb943991.aspx/\n/**\n * DWORD offsets of the DDS file header fields (relative to file start).\n * @ignore\n */\nconst DDS_HEADER_FIELDS = {\n MAGIC: 0,\n SIZE: 1,\n FLAGS: 2,\n HEIGHT: 3,\n WIDTH: 4,\n MIPMAP_COUNT: 7,\n PIXEL_FORMAT: 19,\n PF_FLAGS: 20,\n FOURCC: 21,\n RGB_BITCOUNT: 22,\n R_BIT_MASK: 23,\n G_BIT_MASK: 24,\n B_BIT_MASK: 25,\n A_BIT_MASK: 26,\n};\n\n/**\n * DWORD offsets of the DDS_HEADER_DX10 fields.\n * @ignore\n */\nconst DDS_DX10_FIELDS = {\n DXGI_FORMAT: 0,\n RESOURCE_DIMENSION: 1,\n MISC_FLAG: 2,\n ARRAY_SIZE: 3,\n MISC_FLAGS2: 4,\n};\n\n/**\n * @see https://docs.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format\n * This is way over-blown for us! Lend us a hand, and remove the ones that aren't used (but set the remaining\n * ones to their correct value)\n * @ignore\n */\nexport enum DXGI_FORMAT\n {\n DXGI_FORMAT_UNKNOWN,\n DXGI_FORMAT_R32G32B32A32_TYPELESS,\n DXGI_FORMAT_R32G32B32A32_FLOAT,\n DXGI_FORMAT_R32G32B32A32_UINT,\n DXGI_FORMAT_R32G32B32A32_SINT,\n DXGI_FORMAT_R32G32B32_TYPELESS,\n DXGI_FORMAT_R32G32B32_FLOAT,\n DXGI_FORMAT_R32G32B32_UINT,\n DXGI_FORMAT_R32G32B32_SINT,\n DXGI_FORMAT_R16G16B16A16_TYPELESS,\n DXGI_FORMAT_R16G16B16A16_FLOAT,\n DXGI_FORMAT_R16G16B16A16_UNORM,\n DXGI_FORMAT_R16G16B16A16_UINT,\n DXGI_FORMAT_R16G16B16A16_SNORM,\n DXGI_FORMAT_R16G16B16A16_SINT,\n DXGI_FORMAT_R32G32_TYPELESS,\n DXGI_FORMAT_R32G32_FLOAT,\n DXGI_FORMAT_R32G32_UINT,\n DXGI_FORMAT_R32G32_SINT,\n DXGI_FORMAT_R32G8X24_TYPELESS,\n DXGI_FORMAT_D32_FLOAT_S8X24_UINT,\n DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS,\n DXGI_FORMAT_X32_TYPELESS_G8X24_UINT,\n DXGI_FORMAT_R10G10B10A2_TYPELESS,\n DXGI_FORMAT_R10G10B10A2_UNORM,\n DXGI_FORMAT_R10G10B10A2_UINT,\n DXGI_FORMAT_R11G11B10_FLOAT,\n DXGI_FORMAT_R8G8B8A8_TYPELESS,\n DXGI_FORMAT_R8G8B8A8_UNORM,\n DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,\n DXGI_FORMAT_R8G8B8A8_UINT,\n DXGI_FORMAT_R8G8B8A8_SNORM,\n DXGI_FORMAT_R8G8B8A8_SINT,\n DXGI_FORMAT_R16G16_TYPELESS,\n DXGI_FORMAT_R16G16_FLOAT,\n DXGI_FORMAT_R16G16_UNORM,\n DXGI_FORMAT_R16G16_UINT,\n DXGI_FORMAT_R16G16_SNORM,\n DXGI_FORMAT_R16G16_SINT,\n DXGI_FORMAT_R32_TYPELESS,\n DXGI_FORMAT_D32_FLOAT,\n DXGI_FORMAT_R32_FLOAT,\n DXGI_FORMAT_R32_UINT,\n DXGI_FORMAT_R32_SINT,\n DXGI_FORMAT_R24G8_TYPELESS,\n DXGI_FORMAT_D24_UNORM_S8_UINT,\n DXGI_FORMAT_R24_UNORM_X8_TYPELESS,\n DXGI_FORMAT_X24_TYPELESS_G8_UINT,\n DXGI_FORMAT_R8G8_TYPELESS,\n DXGI_FORMAT_R8G8_UNORM,\n DXGI_FORMAT_R8G8_UINT,\n DXGI_FORMAT_R8G8_SNORM,\n DXGI_FORMAT_R8G8_SINT,\n DXGI_FORMAT_R16_TYPELESS,\n DXGI_FORMAT_R16_FLOAT,\n DXGI_FORMAT_D16_UNORM,\n DXGI_FORMAT_R16_UNORM,\n DXGI_FORMAT_R16_UINT,\n DXGI_FORMAT_R16_SNORM,\n DXGI_FORMAT_R16_SINT,\n DXGI_FORMAT_R8_TYPELESS,\n DXGI_FORMAT_R8_UNORM,\n DXGI_FORMAT_R8_UINT,\n DXGI_FORMAT_R8_SNORM,\n DXGI_FORMAT_R8_SINT,\n DXGI_FORMAT_A8_UNORM,\n DXGI_FORMAT_R1_UNORM,\n DXGI_FORMAT_R9G9B9E5_SHAREDEXP,\n DXGI_FORMAT_R8G8_B8G8_UNORM,\n DXGI_FORMAT_G8R8_G8B8_UNORM,\n DXGI_FORMAT_BC1_TYPELESS,\n DXGI_FORMAT_BC1_UNORM,\n DXGI_FORMAT_BC1_UNORM_SRGB,\n DXGI_FORMAT_BC2_TYPELESS,\n DXGI_FORMAT_BC2_UNORM,\n DXGI_FORMAT_BC2_UNORM_SRGB,\n DXGI_FORMAT_BC3_TYPELESS,\n DXGI_FORMAT_BC3_UNORM,\n DXGI_FORMAT_BC3_UNORM_SRGB,\n DXGI_FORMAT_BC4_TYPELESS,\n DXGI_FORMAT_BC4_UNORM,\n DXGI_FORMAT_BC4_SNORM,\n DXGI_FORMAT_BC5_TYPELESS,\n DXGI_FORMAT_BC5_UNORM,\n DXGI_FORMAT_BC5_SNORM,\n DXGI_FORMAT_B5G6R5_UNORM,\n DXGI_FORMAT_B5G5R5A1_UNORM,\n DXGI_FORMAT_B8G8R8A8_UNORM,\n DXGI_FORMAT_B8G8R8X8_UNORM,\n DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM,\n DXGI_FORMAT_B8G8R8A8_TYPELESS,\n DXGI_FORMAT_B8G8R8A8_UNORM_SRGB,\n DXGI_FORMAT_B8G8R8X8_TYPELESS,\n DXGI_FORMAT_B8G8R8X8_UNORM_SRGB,\n DXGI_FORMAT_BC6H_TYPELESS,\n DXGI_FORMAT_BC6H_UF16,\n DXGI_FORMAT_BC6H_SF16,\n DXGI_FORMAT_BC7_TYPELESS,\n DXGI_FORMAT_BC7_UNORM,\n DXGI_FORMAT_BC7_UNORM_SRGB,\n DXGI_FORMAT_AYUV,\n DXGI_FORMAT_Y410,\n DXGI_FORMAT_Y416,\n DXGI_FORMAT_NV12,\n DXGI_FORMAT_P010,\n DXGI_FORMAT_P016,\n DXGI_FORMAT_420_OPAQUE,\n DXGI_FORMAT_YUY2,\n DXGI_FORMAT_Y210,\n DXGI_FORMAT_Y216,\n DXGI_FORMAT_NV11,\n DXGI_FORMAT_AI44,\n DXGI_FORMAT_IA44,\n DXGI_FORMAT_P8,\n DXGI_FORMAT_A8P8,\n DXGI_FORMAT_B4G4R4A4_UNORM,\n DXGI_FORMAT_P208,\n DXGI_FORMAT_V208,\n DXGI_FORMAT_V408,\n DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE,\n DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE,\n DXGI_FORMAT_FORCE_UINT\n}\n\n/**\n * Possible values of the field {@link DDS_DX10_FIELDS.RESOURCE_DIMENSION}\n * @ignore\n */\nexport enum D3D10_RESOURCE_DIMENSION\n {\n DDS_DIMENSION_TEXTURE1D = 2,\n DDS_DIMENSION_TEXTURE2D = 3,\n DDS_DIMENSION_TEXTURE3D = 6\n}\n\nfunction fourCCToInt32(value: string)\n{\n return value.charCodeAt(0)\n + (value.charCodeAt(1) << 8)\n + (value.charCodeAt(2) << 16)\n + (value.charCodeAt(3) << 24);\n}\n\n// Four character codes for DXTn formats\n// https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dx-graphics-dds-pguide\n// https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dformat\nexport enum D3DFMT\n {\n UNKNOWN = 0,\n R8G8B8 = 20,\n A8R8G8B8 = 21,\n X8R8G8B8 = 22,\n R5G6B5 = 23,\n X1R5G5B5 = 24,\n A1R5G5B5 = 25,\n A4R4G4B4 = 26,\n R3G3B2 = 27,\n A8 = 28,\n A8R3G3B2 = 29,\n X4R4G4B4 = 30,\n A2B10G10R10 = 31,\n A8B8G8R8 = 32,\n X8B8G8R8 = 33,\n G16R16 = 34,\n A2R10G10B10 = 35,\n A16B16G16R16 = 36,\n A8P8 = 40,\n P8 = 41,\n L8 = 50,\n A8L8 = 51,\n A4L4 = 52,\n V8U8 = 60,\n L6V5U5 = 61,\n X8L8V8U8 = 62,\n Q8W8V8U8 = 63,\n V16U16 = 64,\n A2W10V10U10 = 67,\n Q16W16V16U16 = 110,\n R16F = 111,\n G16R16F = 112,\n A16B16G16R16F = 113,\n R32F = 114,\n G32R32F = 115,\n A32B32G32R32F = 116,\n UYVY = fourCCToInt32('UYVY'),\n R8G8_B8G8 = fourCCToInt32('RGBG'),\n YUY2 = fourCCToInt32('YUY2'),\n D3DFMT_G8R8_G8B8 = fourCCToInt32('GRGB'),\n DXT1 = fourCCToInt32('DXT1'),\n DXT2 = fourCCToInt32('DXT2'),\n DXT3 = fourCCToInt32('DXT3'),\n DXT4 = fourCCToInt32('DXT4'),\n DXT5 = fourCCToInt32('DXT5'),\n ATI1 = fourCCToInt32('ATI1'),\n AT1N = fourCCToInt32('AT1N'),\n ATI2 = fourCCToInt32('ATI2'),\n AT2N = fourCCToInt32('AT2N'),\n BC4U = fourCCToInt32('BC4U'),\n BC4S = fourCCToInt32('BC4S'),\n BC5U = fourCCToInt32('BC5U'),\n BC5S = fourCCToInt32('BC5S'),\n\n DX10 = fourCCToInt32('DX10'),\n}\n\n/**\n * Maps `FOURCC_*` formats to {@link TEXTURE_FORMATS}.\n * https://en.wikipedia.org/wiki/S3_Texture_Compression#S3TC_format_comparison\n * https://github.com/microsoft/DirectXTex/blob/main/DDSTextureLoader/DDSTextureLoader11.cpp\n * @ignore\n */\nexport const FOURCC_TO_TEXTURE_FORMAT: { [id: number]: TEXTURE_FORMATS } = {\n [D3DFMT.DXT1]: 'bc1-rgba-unorm',\n [D3DFMT.DXT2]: 'bc2-rgba-unorm',\n [D3DFMT.DXT3]: 'bc2-rgba-unorm',\n [D3DFMT.DXT4]: 'bc3-rgba-unorm',\n [D3DFMT.DXT5]: 'bc3-rgba-unorm',\n\n [D3DFMT.ATI1]: 'bc4-r-unorm',\n [D3DFMT.BC4U]: 'bc4-r-unorm',\n [D3DFMT.BC4S]: 'bc4-r-snorm',\n\n [D3DFMT.ATI2]: 'bc5-rg-unorm',\n [D3DFMT.BC5U]: 'bc5-rg-unorm',\n [D3DFMT.BC5S]: 'bc5-rg-snorm',\n\n [D3DFMT.A16B16G16R16]: 'rgba16uint',\n [D3DFMT.Q16W16V16U16]: 'rgba16sint',\n [D3DFMT.R16F]: 'r16float',\n [D3DFMT.G16R16F]: 'rg16float',\n [D3DFMT.A16B16G16R16F]: 'rgba16float',\n [D3DFMT.R32F]: 'r32float',\n [D3DFMT.G32R32F]: 'rg32float',\n [D3DFMT.A32B32G32R32F]: 'rgba32float',\n};\n\n/**\n * Maps {@link DXGI_FORMAT} to {@link TEXTURE_FORMATS}\n * @ignore\n */\nexport const DXGI_TO_TEXTURE_FORMAT: { [id: number]: TEXTURE_FORMATS } = {\n [DXGI_FORMAT.DXGI_FORMAT_BC1_TYPELESS]: 'bc1-rgba-unorm',\n [DXGI_FORMAT.DXGI_FORMAT_BC1_UNORM]: 'bc1-rgba-unorm',\n [DXGI_FORMAT.DXGI_FORMAT_BC1_UNORM_SRGB]: 'bc1-rgba-unorm-srgb',\n\n [DXGI_FORMAT.DXGI_FORMAT_BC2_TYPELESS]: 'bc2-rgba-unorm',\n [DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM]: 'bc2-rgba-unorm',\n [DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM_SRGB]: 'bc2-rgba-unorm-srgb',\n\n [DXGI_FORMAT.DXGI_FORMAT_BC3_TYPELESS]: 'bc3-rgba-unorm',\n [DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM]: 'bc3-rgba-unorm',\n [DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM_SRGB]: 'bc3-rgba-unorm-srgb',\n\n [DXGI_FORMAT.DXGI_FORMAT_BC4_TYPELESS]: 'bc4-r-unorm',\n [DXGI_FORMAT.DXGI_FORMAT_BC4_UNORM]: 'bc4-r-unorm',\n [DXGI_FORMAT.DXGI_FORMAT_BC4_SNORM]: 'bc4-r-snorm',\n\n [DXGI_FORMAT.DXGI_FORMAT_BC5_TYPELESS]: 'bc5-rg-unorm',\n [DXGI_FORMAT.DXGI_FORMAT_BC5_UNORM]: 'bc5-rg-unorm',\n [DXGI_FORMAT.DXGI_FORMAT_BC5_SNORM]: 'bc5-rg-snorm',\n\n [DXGI_FORMAT.DXGI_FORMAT_BC6H_TYPELESS]: 'bc6h-rgb-ufloat',\n [DXGI_FORMAT.DXGI_FORMAT_BC6H_UF16]: 'bc6h-rgb-ufloat',\n [DXGI_FORMAT.DXGI_FORMAT_BC6H_SF16]: 'bc6h-rgb-float',\n\n [DXGI_FORMAT.DXGI_FORMAT_BC7_TYPELESS]: 'bc7-rgba-unorm',\n [DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM]: 'bc7-rgba-unorm',\n [DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM_SRGB]: 'bc7-rgba-unorm-srgb',\n\n [DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM]: 'rgba8unorm',\n [DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB]: 'rgba8unorm-srgb',\n [DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM]: 'bgra8unorm',\n [DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM_SRGB]: 'bgra8unorm-srgb',\n [DXGI_FORMAT.DXGI_FORMAT_R32_FLOAT]: 'r32float',\n\n [DXGI_FORMAT.DXGI_FORMAT_R8G8_UNORM]: 'rg8unorm',\n [DXGI_FORMAT.DXGI_FORMAT_R16_UNORM]: 'r16uint',\n\n [DXGI_FORMAT.DXGI_FORMAT_R8_UNORM]: 'r8unorm',\n [DXGI_FORMAT.DXGI_FORMAT_R10G10B10A2_UNORM]: 'rgb10a2unorm',\n\n [DXGI_FORMAT.DXGI_FORMAT_R16G16B16A16_UNORM]: 'rgba16uint',\n [DXGI_FORMAT.DXGI_FORMAT_R16G16B16A16_SNORM]: 'rgba16sint',\n [DXGI_FORMAT.DXGI_FORMAT_R16G16B16A16_FLOAT]: 'rgba16float',\n [DXGI_FORMAT.DXGI_FORMAT_R16_FLOAT]: 'r16float',\n [DXGI_FORMAT.DXGI_FORMAT_R16G16_FLOAT]: 'rg16float',\n [DXGI_FORMAT.DXGI_FORMAT_R32G32_FLOAT]: 'rg32float',\n [DXGI_FORMAT.DXGI_FORMAT_R32G32B32A32_FLOAT]: 'rgba32float',\n\n};\n\nexport const DDS = {\n MAGIC_VALUE: 0x20534444,\n MAGIC_SIZE: 4,\n HEADER_SIZE: 124,\n HEADER_DX10_SIZE: 20,\n PIXEL_FORMAT_FLAGS: {\n // PIXEL_FORMAT flags\n // https://github.com/Microsoft/DirectXTex/blob/main/DirectXTex/DDS.h\n // https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dds-pixelformat\n ALPHAPIXELS: 0x1,\n ALPHA: 0x2,\n FOURCC: 0x4,\n RGB: 0x40,\n RGBA: 0x41,\n YUV: 0x200,\n LUMINANCE: 0x20000,\n LUMINANCEA: 0x20001,\n },\n\n RESOURCE_MISC_TEXTURECUBE: 0x4,\n\n HEADER_FIELDS: DDS_HEADER_FIELDS,\n HEADER_DX10_FIELDS: DDS_DX10_FIELDS,\n DXGI_FORMAT,\n D3D10_RESOURCE_DIMENSION,\n D3DFMT\n};\n\n// formats and block size (in bytes)\nexport const TEXTURE_FORMAT_BLOCK_SIZE: Record = {\n 'bc1-rgba-unorm': 8,\n 'bc1-rgba-unorm-srgb': 8,\n 'bc2-rgba-unorm': 16,\n 'bc2-rgba-unorm-srgb': 16,\n 'bc3-rgba-unorm': 16,\n 'bc3-rgba-unorm-srgb': 16,\n 'bc4-r-unorm': 8,\n 'bc4-r-snorm': 8,\n 'bc5-rg-unorm': 16,\n 'bc5-rg-snorm': 16,\n 'bc6h-rgb-ufloat': 16,\n 'bc6h-rgb-float': 16,\n 'bc7-rgba-unorm': 16,\n 'bc7-rgba-unorm-srgb': 16\n};\n","import { DDS, DXGI_TO_TEXTURE_FORMAT, FOURCC_TO_TEXTURE_FORMAT, TEXTURE_FORMAT_BLOCK_SIZE } from './const';\n\nimport type { TEXTURE_FORMATS } from '../../rendering/renderers/shared/texture/const';\nimport type { TextureSourceOptions } from '../../rendering/renderers/shared/texture/sources/TextureSource';\n\nexport function parseDDS(arrayBuffer: ArrayBuffer, supportedFormats: TEXTURE_FORMATS[]): TextureSourceOptions\n{\n const {\n format,\n fourCC,\n width,\n height,\n dataOffset,\n mipmapCount,\n } = parseDDSHeader(arrayBuffer);\n\n if (!supportedFormats.includes(format))\n {\n throw new Error(`Unsupported texture format: ${fourCC} ${format}, supported: ${supportedFormats}`);\n }\n\n if (mipmapCount <= 1)\n { // No need bothering with the imageSize calculation!\n return {\n format,\n width,\n height,\n resource: [new Uint8Array(arrayBuffer, dataOffset)],\n alphaMode: 'no-premultiply-alpha',\n } as TextureSourceOptions;\n }\n\n const levelBuffers = getMipmapLevelBuffers(format, width, height, dataOffset, mipmapCount, arrayBuffer);\n\n const textureOptions: TextureSourceOptions = {\n format,\n width,\n height,\n resource: levelBuffers,\n alphaMode: 'no-premultiply-alpha'\n };\n\n return textureOptions;\n}\n\nfunction getMipmapLevelBuffers(format: TEXTURE_FORMATS, width: number, height: number,\n dataOffset: any, mipmapCount: number, arrayBuffer: ArrayBuffer)\n{\n const levelBuffers = [];\n const blockBytes = TEXTURE_FORMAT_BLOCK_SIZE[format];\n\n let mipWidth = width;\n let mipHeight = height;\n let offset = dataOffset;\n\n for (let level = 0; level < mipmapCount; ++level)\n {\n const byteLength = blockBytes\n ? Math.max(4, mipWidth) / 4 * Math.max(4, mipHeight) / 4 * blockBytes\n : mipWidth * mipHeight * 4;\n\n const levelBuffer = new Uint8Array(arrayBuffer, offset, byteLength);\n\n levelBuffers.push(levelBuffer);\n\n offset += byteLength;\n\n mipWidth = Math.max(mipWidth >> 1, 1);\n mipHeight = Math.max(mipHeight >> 1, 1);\n }\n\n return levelBuffers;\n}\n\nfunction parseDDSHeader(buffer: ArrayBuffer)\n{\n const header = new Uint32Array(buffer, 0, DDS.HEADER_SIZE / Uint32Array.BYTES_PER_ELEMENT);\n\n if (header[DDS.HEADER_FIELDS.MAGIC] !== DDS.MAGIC_VALUE)\n {\n throw new Error('Invalid magic number in DDS header');\n }\n\n // DDS header fields\n const height = header[DDS.HEADER_FIELDS.HEIGHT];\n const width = header[DDS.HEADER_FIELDS.WIDTH];\n const mipmapCount = Math.max(1, header[DDS.HEADER_FIELDS.MIPMAP_COUNT]);\n const flags = header[DDS.HEADER_FIELDS.PF_FLAGS];\n const fourCC = header[DDS.HEADER_FIELDS.FOURCC];\n const format = getTextureFormat(header, flags, fourCC, buffer);\n\n const dataOffset = DDS.MAGIC_SIZE + DDS.HEADER_SIZE\n + ((fourCC === DDS.D3DFMT.DX10) ? DDS.HEADER_DX10_SIZE : 0);\n\n return {\n format,\n fourCC,\n width,\n height,\n dataOffset,\n mipmapCount\n };\n}\n\nfunction getTextureFormat(header: Uint32Array, flags: number, fourCC: number, buffer: ArrayBuffer)\n{\n if (flags & DDS.PIXEL_FORMAT_FLAGS.FOURCC)\n {\n if (fourCC === DDS.D3DFMT.DX10)\n {\n const dx10Header = new Uint32Array(\n buffer,\n DDS.MAGIC_SIZE + DDS.HEADER_SIZE, // there is a 20-byte DDS_HEADER_DX10 after DDS_HEADER\n DDS.HEADER_DX10_SIZE / Uint32Array.BYTES_PER_ELEMENT);\n\n const miscFlag = dx10Header[DDS.HEADER_DX10_FIELDS.MISC_FLAG];\n\n if (miscFlag === DDS.RESOURCE_MISC_TEXTURECUBE)\n {\n throw new Error('DDSParser does not support cubemap textures');\n }\n\n const resourceDimension = dx10Header[DDS.HEADER_DX10_FIELDS.RESOURCE_DIMENSION];\n\n if (resourceDimension === DDS.D3D10_RESOURCE_DIMENSION.DDS_DIMENSION_TEXTURE3D)\n {\n throw new Error('DDSParser does not supported 3D texture data');\n }\n\n const dxgiFormat = dx10Header[DDS.HEADER_DX10_FIELDS.DXGI_FORMAT];\n\n if (dxgiFormat in DXGI_TO_TEXTURE_FORMAT)\n {\n return DXGI_TO_TEXTURE_FORMAT[dxgiFormat];\n }\n\n throw new Error(`DDSParser cannot parse texture data with DXGI format ${dxgiFormat}`);\n }\n\n if (fourCC in FOURCC_TO_TEXTURE_FORMAT)\n {\n return FOURCC_TO_TEXTURE_FORMAT[fourCC];\n }\n\n throw new Error(`DDSParser cannot parse texture data with fourCC format ${fourCC}`);\n }\n\n if (flags & DDS.PIXEL_FORMAT_FLAGS.RGB || flags & DDS.PIXEL_FORMAT_FLAGS.RGBA)\n {\n return getUncompressedTextureFormat(header);\n }\n\n if (flags & DDS.PIXEL_FORMAT_FLAGS.YUV)\n {\n throw new Error('DDSParser does not supported YUV uncompressed texture data.');\n }\n if (flags & DDS.PIXEL_FORMAT_FLAGS.LUMINANCE || flags & DDS.PIXEL_FORMAT_FLAGS.LUMINANCEA)\n {\n throw new Error('DDSParser does not support single-channel (lumninance) texture data!');\n }\n if (flags & DDS.PIXEL_FORMAT_FLAGS.ALPHA || flags & DDS.PIXEL_FORMAT_FLAGS.ALPHAPIXELS)\n {\n throw new Error('DDSParser does not support single-channel (alpha) texture data!');\n }\n\n throw new Error('DDSParser failed to load a texture file due to an unknown reason!');\n}\n\nfunction getUncompressedTextureFormat(header: Uint32Array)\n{\n const bitCount = header[DDS.HEADER_FIELDS.RGB_BITCOUNT];\n const rBitMask = header[DDS.HEADER_FIELDS.R_BIT_MASK];\n const gBitMask = header[DDS.HEADER_FIELDS.G_BIT_MASK];\n const bBitMask = header[DDS.HEADER_FIELDS.B_BIT_MASK];\n const aBitMask = header[DDS.HEADER_FIELDS.A_BIT_MASK];\n\n // https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dx-graphics-dds-pguide\n // https://github.com/microsoft/DirectXTex/blob/main/DDSTextureLoader/DDSTextureLoader11.cpp#L892\n switch (bitCount)\n {\n case 32:\n if (rBitMask === 0x000000ff && gBitMask === 0x0000ff00 && bBitMask === 0x00ff0000 && aBitMask === 0xff000000)\n {\n return DXGI_TO_TEXTURE_FORMAT[DDS.DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM];\n }\n if (rBitMask === 0x00ff0000 && gBitMask === 0x0000ff00 && bBitMask === 0x000000ff && aBitMask === 0xff000000)\n {\n return DXGI_TO_TEXTURE_FORMAT[DDS.DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM];\n }\n if (rBitMask === 0x3ff00000 && gBitMask === 0x000ffc00 && bBitMask === 0x000003ff && aBitMask === 0xc0000000)\n {\n return DXGI_TO_TEXTURE_FORMAT[DDS.DXGI_FORMAT.DXGI_FORMAT_R10G10B10A2_UNORM];\n }\n if (rBitMask === 0x0000ffff && gBitMask === 0xffff0000 && bBitMask === 0 && aBitMask === 0)\n {\n return DXGI_TO_TEXTURE_FORMAT[DDS.DXGI_FORMAT.DXGI_FORMAT_R16G16_UNORM];\n }\n if (rBitMask === 0xffffffff && gBitMask === 0 && bBitMask === 0 && aBitMask === 0)\n {\n return DXGI_TO_TEXTURE_FORMAT[DDS.DXGI_FORMAT.DXGI_FORMAT_R32_FLOAT];\n }\n break;\n case 24:\n if (rBitMask === 0xff0000 && gBitMask === 0xff00 && bBitMask === 0xff && aBitMask === 0x8000)\n {\n // rgb8unorm not supported?\n // return DXGI_TO_TEXTURE_FORMAT[DDS.DXGI_FORMAT.DXGI_FORMAT_B5G5R5A1_UNORM];\n }\n break;\n case 16:\n if (rBitMask === 0x7c00 && gBitMask === 0x03e0 && bBitMask === 0x001f && aBitMask === 0x8000)\n {\n return DXGI_TO_TEXTURE_FORMAT[DDS.DXGI_FORMAT.DXGI_FORMAT_B5G5R5A1_UNORM];\n }\n if (rBitMask === 0xf800 && gBitMask === 0x07e0 && bBitMask === 0x001f && aBitMask === 0)\n {\n return DXGI_TO_TEXTURE_FORMAT[DDS.DXGI_FORMAT.DXGI_FORMAT_B5G6R5_UNORM];\n }\n if (rBitMask === 0x0f00 && gBitMask === 0x00f0 && bBitMask === 0x000f && aBitMask === 0xf000)\n {\n return DXGI_TO_TEXTURE_FORMAT[DDS.DXGI_FORMAT.DXGI_FORMAT_B4G4R4A4_UNORM];\n }\n if (rBitMask === 0x00ff && gBitMask === 0 && bBitMask === 0 && aBitMask === 0xff00)\n {\n return DXGI_TO_TEXTURE_FORMAT[DDS.DXGI_FORMAT.DXGI_FORMAT_R8G8_UNORM];\n }\n if (rBitMask === 0xffff && gBitMask === 0 && bBitMask === 0 && aBitMask === 0)\n {\n return DXGI_TO_TEXTURE_FORMAT[DDS.DXGI_FORMAT.DXGI_FORMAT_R16_UNORM];\n }\n break;\n\n case 8:\n if (rBitMask === 0xff && gBitMask === 0 && bBitMask === 0 && aBitMask === 0)\n {\n return DXGI_TO_TEXTURE_FORMAT[DDS.DXGI_FORMAT.DXGI_FORMAT_R8_UNORM];\n }\n break;\n }\n\n throw new Error(`DDSParser does not support uncompressed texture with configuration:\n bitCount = ${bitCount}, rBitMask = ${rBitMask}, gBitMask = ${gBitMask}, aBitMask = ${aBitMask}`);\n}\n","import { LoaderParserPriority } from '../../assets/loader/parsers/LoaderParser';\nimport { createTexture } from '../../assets/loader/parsers/textures/utils/createTexture';\nimport { checkExtension } from '../../assets/utils/checkExtension';\nimport { ExtensionType } from '../../extensions/Extensions';\nimport { CompressedSource } from '../../rendering/renderers/shared/texture/sources/CompressedSource';\nimport { getSupportedTextureFormats } from '../../rendering/renderers/shared/texture/utils/getSupportedTextureFormats';\nimport { parseDDS } from './parseDDS';\n\nimport type { Loader } from '../../assets/loader/Loader';\nimport type { LoaderParser } from '../../assets/loader/parsers/LoaderParser';\nimport type { ResolvedAsset } from '../../assets/types';\nimport type { TextureSourceOptions } from '../../rendering/renderers/shared/texture/sources/TextureSource';\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\n\n/** Loads KTX textures! */\nexport const loadDDS = {\n extension: {\n type: ExtensionType.LoadParser,\n priority: LoaderParserPriority.High,\n name: 'loadDDS',\n },\n\n name: 'loadDDS',\n\n test(url: string): boolean\n {\n return checkExtension(url, ['.dds']);\n },\n\n async load(url: string, _asset: ResolvedAsset, loader: Loader): Promise\n {\n const supportedTextures = await getSupportedTextureFormats();\n\n const ddsResponse = await fetch(url);\n\n const ddsArrayBuffer = await ddsResponse.arrayBuffer();\n\n const textureOptions = parseDDS(ddsArrayBuffer, supportedTextures);\n\n const compressedTextureSource = new CompressedSource(textureOptions);\n\n return createTexture(compressedTextureSource, loader, url);\n },\n\n unload(texture: Texture | Texture[]): void\n {\n if (Array.isArray(texture))\n {\n texture.forEach((t) => t.destroy(true));\n }\n else\n {\n texture.destroy(true);\n }\n }\n\n} satisfies LoaderParser;\n\n","import type { TEXTURE_FORMATS } from '../../rendering/renderers/shared/texture/const';\n\nexport enum GL_INTERNAL_FORMAT\n// eslint-disable-next-line @typescript-eslint/indent\n{\n RGBA8_SNORM = 0x8F97,\n RGBA = 0x1908,\n RGBA8UI = 0x8D7C,\n SRGB8_ALPHA8 = 0x8C43,\n RGBA8I = 0x8D8E,\n RGBA8 = 0x8058,\n\n COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0,\n COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1,\n COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2,\n COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3,\n COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 35917,\n COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 35918,\n COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 35919,\n COMPRESSED_SRGB_S3TC_DXT1_EXT = 35916,\n\n COMPRESSED_RED_RGTC1_EXT = 0x8DBB,\n COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC,\n COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD,\n COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE,\n\n COMPRESSED_R11_EAC = 0x9270,\n COMPRESSED_SIGNED_R11_EAC = 0x9271,\n COMPRESSED_RG11_EAC = 0x9272,\n COMPRESSED_SIGNED_RG11_EAC = 0x9273,\n COMPRESSED_RGB8_ETC2 = 0x9274,\n COMPRESSED_RGBA8_ETC2_EAC = 0x9278,\n COMPRESSED_SRGB8_ETC2 = 0x9275,\n COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279,\n COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276,\n COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277,\n\n COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0,\n COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1,\n COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2,\n COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3,\n COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4,\n COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5,\n COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6,\n COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7,\n COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8,\n COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9,\n COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA,\n COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB,\n COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC,\n COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD,\n COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0,\n COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1,\n COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2,\n COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3,\n COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4,\n COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5,\n COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6,\n COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7,\n COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8,\n COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9,\n COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA,\n COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB,\n COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC,\n COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD,\n\n COMPRESSED_RGBA_BPTC_UNORM_EXT = 0x8E8C,\n COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT = 0x8E8D,\n COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT = 0x8E8E,\n COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT = 0x8E8F\n}\n\nenum GL_FORMATS\n// eslint-disable-next-line @typescript-eslint/indent\n{\n RGBA = 6408,\n RGB = 6407,\n RG = 33319,\n RED = 6403,\n RGBA_INTEGER = 36249,\n RGB_INTEGER = 36248,\n RG_INTEGER = 33320,\n RED_INTEGER = 36244,\n ALPHA = 6406,\n LUMINANCE = 6409,\n LUMINANCE_ALPHA = 6410,\n DEPTH_COMPONENT = 6402,\n DEPTH_STENCIL = 34041,\n}\n\nenum GL_TYPES\n// eslint-disable-next-line @typescript-eslint/indent\n{\n UNSIGNED_BYTE = 5121,\n UNSIGNED_SHORT = 5123,\n UNSIGNED_SHORT_5_6_5 = 33635,\n UNSIGNED_SHORT_4_4_4_4 = 32819,\n UNSIGNED_SHORT_5_5_5_1 = 32820,\n UNSIGNED_INT = 5125,\n UNSIGNED_INT_10F_11F_11F_REV = 35899,\n UNSIGNED_INT_2_10_10_10_REV = 33640,\n UNSIGNED_INT_24_8 = 34042,\n UNSIGNED_INT_5_9_9_9_REV = 35902,\n BYTE = 5120,\n SHORT = 5122,\n INT = 5124,\n FLOAT = 5126,\n FLOAT_32_UNSIGNED_INT_24_8_REV = 36269,\n HALF_FLOAT = 36193,\n}\n\nconst INTERNAL_FORMAT_TO_TEXTURE_FORMATS: { [id: number]: TEXTURE_FORMATS } = {\n\n [GL_INTERNAL_FORMAT.COMPRESSED_RGB_S3TC_DXT1_EXT]: 'bc1-rgba-unorm', // TODO: ???\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_S3TC_DXT1_EXT]: 'bc1-rgba-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_S3TC_DXT3_EXT]: 'bc2-rgba-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_S3TC_DXT5_EXT]: 'bc3-rgba-unorm',\n\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB_S3TC_DXT1_EXT]: 'bc1-rgba-unorm-srgb', // TODO: ???\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT]: 'bc1-rgba-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT]: 'bc2-rgba-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT]: 'bc3-rgba-unorm-srgb',\n\n [GL_INTERNAL_FORMAT.COMPRESSED_RED_RGTC1_EXT]: 'bc4-r-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SIGNED_RED_RGTC1_EXT]: 'bc4-r-snorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_RED_GREEN_RGTC2_EXT]: 'bc5-rg-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT]: 'bc5-rg-snorm',\n\n [GL_INTERNAL_FORMAT.COMPRESSED_R11_EAC]: 'eac-r11unorm',\n // [GL_INTERNAL_FORMAT.COMPRESSED_SIGNED_R11_EAC]: 'eac-r11snorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_RG11_EAC]: 'eac-rg11snorm',\n // [GL_INTERNAL_FORMAT.COMPRESSED_SIGNED_RG11_EAC]: 'eac-rg11unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGB8_ETC2]: 'etc2-rgb8unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA8_ETC2_EAC]: 'etc2-rgba8unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ETC2]: 'etc2-rgb8unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC]: 'etc2-rgba8unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2]: 'etc2-rgb8a1unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2]: 'etc2-rgb8a1unorm-srgb',\n\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_4x4_KHR]: 'astc-4x4-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR]: 'astc-4x4-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_5x4_KHR]: 'astc-5x4-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR]: 'astc-5x4-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_5x5_KHR]: 'astc-5x5-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR]: 'astc-5x5-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_6x5_KHR]: 'astc-6x5-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR]: 'astc-6x5-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_6x6_KHR]: 'astc-6x6-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR]: 'astc-6x6-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_8x5_KHR]: 'astc-8x5-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR]: 'astc-8x5-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_8x6_KHR]: 'astc-8x6-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR]: 'astc-8x6-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_8x8_KHR]: 'astc-8x8-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR]: 'astc-8x8-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_10x5_KHR]: 'astc-10x5-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR]: 'astc-10x5-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_10x6_KHR]: 'astc-10x6-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR]: 'astc-10x6-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_10x8_KHR]: 'astc-10x8-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR]: 'astc-10x8-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_10x10_KHR]: 'astc-10x10-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR]: 'astc-10x10-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_12x10_KHR]: 'astc-12x10-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR]: 'astc-12x10-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_12x12_KHR]: 'astc-12x12-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR]: 'astc-12x12-unorm-srgb',\n\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_BPTC_UNORM_EXT]: 'bc7-rgba-unorm',\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT]: 'bc7-rgba-unorm-srgb',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT]: 'bc6h-rgb-float',\n [GL_INTERNAL_FORMAT.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT]: 'bc6h-rgb-ufloat',\n\n [GL_INTERNAL_FORMAT.SRGB8_ALPHA8]: 'rgba8unorm-srgb',\n\n [GL_INTERNAL_FORMAT.RGBA8_SNORM]: 'rgba8snorm',\n [GL_INTERNAL_FORMAT.RGBA8UI]: 'rgba8uint',\n [GL_INTERNAL_FORMAT.RGBA8I]: 'rgba8sint',\n [GL_INTERNAL_FORMAT.RGBA]: 'rgba8unorm',\n // [GL_INTERNAL_FORMAT.RGBA8]: 'bgra8unorm'\n};\n\n/**\n * The 12-byte KTX file identifier\n * @see https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/#2.1\n * @ignore\n */\nconst FILE_IDENTIFIER = [0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A];\n\n/**\n * The value stored in the \"endianness\" field.\n * @see https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/#2.2\n * @ignore\n */\n\nconst FIELDS = {\n FILE_IDENTIFIER: 0,\n ENDIANNESS: 12,\n GL_TYPE: 16,\n GL_TYPE_SIZE: 20,\n GL_FORMAT: 24,\n GL_INTERNAL_FORMAT: 28,\n GL_BASE_INTERNAL_FORMAT: 32,\n PIXEL_WIDTH: 36,\n PIXEL_HEIGHT: 40,\n PIXEL_DEPTH: 44,\n NUMBER_OF_ARRAY_ELEMENTS: 48,\n NUMBER_OF_FACES: 52,\n NUMBER_OF_MIPMAP_LEVELS: 56,\n BYTES_OF_KEY_VALUE_DATA: 60,\n};\n\nconst FILE_HEADER_SIZE = 64;\nconst ENDIANNESS = 0x04030201;\n\nconst TYPES_TO_BYTES_PER_COMPONENT: { [id: number]: number } = {\n [GL_TYPES.UNSIGNED_BYTE]: 1,\n [GL_TYPES.UNSIGNED_SHORT]: 2,\n [GL_TYPES.INT]: 4,\n [GL_TYPES.UNSIGNED_INT]: 4,\n [GL_TYPES.FLOAT]: 4,\n [GL_TYPES.HALF_FLOAT]: 8,\n};\n\nconst FORMATS_TO_COMPONENTS: { [id: number]: number } = {\n [GL_FORMATS.RGBA]: 4,\n [GL_FORMATS.RGB]: 3,\n [GL_FORMATS.RG]: 2,\n [GL_FORMATS.RED]: 1,\n [GL_FORMATS.LUMINANCE]: 1,\n [GL_FORMATS.LUMINANCE_ALPHA]: 2,\n [GL_FORMATS.ALPHA]: 1,\n};\n\nconst TYPES_TO_BYTES_PER_PIXEL: { [id: number]: number } = {\n [GL_TYPES.UNSIGNED_SHORT_4_4_4_4]: 2,\n [GL_TYPES.UNSIGNED_SHORT_5_5_5_1]: 2,\n [GL_TYPES.UNSIGNED_SHORT_5_6_5]: 2,\n};\n\nconst INTERNAL_FORMAT_TO_BYTES_PER_PIXEL: { [id: number]: number } = {\n [GL_INTERNAL_FORMAT.COMPRESSED_RGB_S3TC_DXT1_EXT]: 0.5,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_S3TC_DXT1_EXT]: 0.5,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_S3TC_DXT3_EXT]: 1,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_S3TC_DXT5_EXT]: 1,\n\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB_S3TC_DXT1_EXT]: 0.5,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT]: 0.5,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT]: 1,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT]: 1,\n\n [GL_INTERNAL_FORMAT.COMPRESSED_RED_RGTC1_EXT]: 0.5,\n [GL_INTERNAL_FORMAT.COMPRESSED_SIGNED_RED_RGTC1_EXT]: 0.5,\n [GL_INTERNAL_FORMAT.COMPRESSED_RED_GREEN_RGTC2_EXT]: 1,\n [GL_INTERNAL_FORMAT.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT]: 1,\n\n [GL_INTERNAL_FORMAT.COMPRESSED_R11_EAC]: 0.5,\n [GL_INTERNAL_FORMAT.COMPRESSED_SIGNED_R11_EAC]: 0.5,\n [GL_INTERNAL_FORMAT.COMPRESSED_RG11_EAC]: 1,\n [GL_INTERNAL_FORMAT.COMPRESSED_SIGNED_RG11_EAC]: 1,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGB8_ETC2]: 0.5,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA8_ETC2_EAC]: 1,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ETC2]: 0.5,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC]: 1,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2]: 0.5,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2]: 0.5,\n\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_4x4_KHR]: 1,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR]: 1,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_5x4_KHR]: 0.8,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR]: 0.8,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_5x5_KHR]: 0.64,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR]: 0.64,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_6x5_KHR]: 0.53375,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR]: 0.53375,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_6x6_KHR]: 0.445,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR]: 0.445,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_8x5_KHR]: 0.4,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR]: 0.4,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_8x6_KHR]: 0.33375,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR]: 0.33375,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_8x8_KHR]: 0.25,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR]: 0.25,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_10x5_KHR]: 0.32,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR]: 0.32,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_10x6_KHR]: 0.26625,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR]: 0.26625,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_10x8_KHR]: 0.2,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR]: 0.2,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_10x10_KHR]: 0.16,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR]: 0.16,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_12x10_KHR]: 0.13375,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR]: 0.13375,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_ASTC_12x12_KHR]: 0.11125,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR]: 0.11125,\n\n [GL_INTERNAL_FORMAT.COMPRESSED_RGBA_BPTC_UNORM_EXT]: 1,\n [GL_INTERNAL_FORMAT.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT]: 1,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT]: 1,\n [GL_INTERNAL_FORMAT.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT]: 1,\n};\n\nexport const KTX = {\n FILE_HEADER_SIZE,\n FILE_IDENTIFIER,\n FORMATS_TO_COMPONENTS,\n INTERNAL_FORMAT_TO_BYTES_PER_PIXEL,\n INTERNAL_FORMAT_TO_TEXTURE_FORMATS,\n FIELDS,\n TYPES_TO_BYTES_PER_COMPONENT,\n TYPES_TO_BYTES_PER_PIXEL,\n ENDIANNESS\n};\n","import { KTX } from '../ktx2/const';\n\nimport type { TEXTURE_FORMATS } from '../../rendering/renderers/shared/texture/const';\nimport type { TextureSourceOptions } from '../../rendering/renderers/shared/texture/sources/TextureSource';\n\nexport function parseKTX(arrayBuffer: ArrayBuffer, supportedFormats: TEXTURE_FORMATS[]): TextureSourceOptions\n{\n const dataView = new DataView(arrayBuffer);\n\n if (!validate(dataView))\n {\n throw new Error('Invalid KTX identifier in header');\n }\n\n const {\n littleEndian,\n glType,\n glFormat,\n glInternalFormat,\n pixelWidth,\n pixelHeight,\n numberOfMipmapLevels,\n offset,\n } = parseKTXHeader(dataView);\n\n const textureFormat = KTX.INTERNAL_FORMAT_TO_TEXTURE_FORMATS[glInternalFormat];\n\n if (!textureFormat)\n {\n throw new Error(`Unknown texture format ${glInternalFormat}`);\n }\n if (!supportedFormats.includes(textureFormat))\n {\n throw new Error(`Unsupported texture format: ${textureFormat}, supportedFormats: ${supportedFormats}`);\n }\n\n const imagePixelByteSize = getImagePixelByteSize(glType, glFormat, glInternalFormat);\n\n const imageBuffers = getImageBuffers(dataView, glType, imagePixelByteSize, pixelWidth, pixelHeight, offset,\n numberOfMipmapLevels, littleEndian);\n\n return {\n format: textureFormat,\n width: pixelWidth,\n height: pixelHeight,\n resource: imageBuffers,\n alphaMode: 'no-premultiply-alpha'\n };\n}\n\nfunction getImageBuffers(dataView: DataView, glType: number, imagePixelByteSize: number, pixelWidth: number,\n pixelHeight: number, offset: number, numberOfMipmapLevels: number, littleEndian: boolean)\n{\n const alignedWidth = (pixelWidth + 3) & ~3;\n const alignedHeight = (pixelHeight + 3) & ~3;\n let imagePixels = pixelWidth * pixelHeight;\n\n if (glType === 0)\n {\n // Align to 16 pixels (4x4 blocks)\n imagePixels = alignedWidth * alignedHeight;\n }\n\n let mipByteSize = imagePixels * imagePixelByteSize;\n let mipWidth = pixelWidth;\n let mipHeight = pixelHeight;\n let alignedMipWidth = alignedWidth;\n let alignedMipHeight = alignedHeight;\n let imageOffset = offset;\n\n const imageBuffers = new Array(numberOfMipmapLevels);\n\n for (let mipmapLevel = 0; mipmapLevel < numberOfMipmapLevels; mipmapLevel++)\n {\n const imageSize = dataView.getUint32(imageOffset, littleEndian);\n let elementOffset = imageOffset + 4;\n\n imageBuffers[mipmapLevel] = new Uint8Array(dataView.buffer, elementOffset, mipByteSize);\n\n elementOffset += mipByteSize;\n\n // HINT: Aligns to 4-byte boundary after jumping imageSize (in lieu of mipPadding)\n imageOffset += imageSize + 4;// (+4 to jump the imageSize field itself)\n imageOffset = imageOffset % 4 !== 0 ? imageOffset + 4 - (imageOffset % 4) : imageOffset;\n\n // Calculate mipWidth, mipHeight for _next_ iteration\n mipWidth = (mipWidth >> 1) || 1;\n mipHeight = (mipHeight >> 1) || 1;\n alignedMipWidth = (mipWidth + 4 - 1) & ~(4 - 1);\n alignedMipHeight = (mipHeight + 4 - 1) & ~(4 - 1);\n\n // Each mipmap level is 4-times smaller?\n mipByteSize = alignedMipWidth * alignedMipHeight * imagePixelByteSize;\n }\n\n return imageBuffers;\n}\n\nfunction getImagePixelByteSize(glType: number, glFormat: number, glInternalFormat: number)\n{\n let imagePixelByteSize = KTX.INTERNAL_FORMAT_TO_BYTES_PER_PIXEL[glInternalFormat];\n\n if (glType !== 0)\n {\n // Uncompressed texture format\n if (KTX.TYPES_TO_BYTES_PER_COMPONENT[glType])\n {\n imagePixelByteSize = KTX.TYPES_TO_BYTES_PER_COMPONENT[glType] * KTX.FORMATS_TO_COMPONENTS[glFormat];\n }\n else\n {\n imagePixelByteSize = KTX.TYPES_TO_BYTES_PER_PIXEL[glType];\n }\n }\n\n if (imagePixelByteSize === undefined)\n {\n throw new Error('Unable to resolve the pixel format stored in the *.ktx file!');\n }\n\n return imagePixelByteSize;\n}\n\nfunction parseKTXHeader(dataView: DataView)\n{\n const littleEndian = dataView.getUint32(KTX.FIELDS.ENDIANNESS, true) === KTX.ENDIANNESS;\n const glType = dataView.getUint32(KTX.FIELDS.GL_TYPE, littleEndian);\n const glFormat = dataView.getUint32(KTX.FIELDS.GL_FORMAT, littleEndian);\n const glInternalFormat = dataView.getUint32(KTX.FIELDS.GL_INTERNAL_FORMAT, littleEndian);\n const pixelWidth = dataView.getUint32(KTX.FIELDS.PIXEL_WIDTH, littleEndian);\n const pixelHeight = dataView.getUint32(KTX.FIELDS.PIXEL_HEIGHT, littleEndian) || 1;// \"pixelHeight = 0\" -> \"1\"\n const pixelDepth = dataView.getUint32(KTX.FIELDS.PIXEL_DEPTH, littleEndian) || 1;// ^^\n const numberOfArrayElements = dataView.getUint32(KTX.FIELDS.NUMBER_OF_ARRAY_ELEMENTS, littleEndian) || 1;// ^^\n const numberOfFaces = dataView.getUint32(KTX.FIELDS.NUMBER_OF_FACES, littleEndian);\n const numberOfMipmapLevels = dataView.getUint32(KTX.FIELDS.NUMBER_OF_MIPMAP_LEVELS, littleEndian);\n const bytesOfKeyValueData = dataView.getUint32(KTX.FIELDS.BYTES_OF_KEY_VALUE_DATA, littleEndian);\n\n if (pixelHeight === 0 || pixelDepth !== 1)\n {\n throw new Error('Only 2D textures are supported');\n }\n if (numberOfFaces !== 1)\n {\n throw new Error('CubeTextures are not supported by KTXLoader yet!');\n }\n if (numberOfArrayElements !== 1)\n {\n throw new Error('WebGL does not support array textures');\n }\n\n return {\n littleEndian,\n glType,\n glFormat,\n glInternalFormat,\n pixelWidth,\n pixelHeight,\n numberOfMipmapLevels,\n offset: KTX.FILE_HEADER_SIZE + bytesOfKeyValueData\n };\n}\n\n/**\n * Checks whether the arrayBuffer contains a valid *.ktx file.\n * @param dataView\n */\nfunction validate(dataView: DataView): boolean\n{\n // NOTE: Do not optimize this into 3 32-bit integer comparison because the endianness\n // of the data is not specified.\n for (let i = 0; i < KTX.FILE_IDENTIFIER.length; i++)\n {\n if (dataView.getUint8(i) !== KTX.FILE_IDENTIFIER[i])\n {\n return false;\n }\n }\n\n return true;\n}\n","import { LoaderParserPriority } from '../../assets/loader/parsers/LoaderParser';\nimport { createTexture } from '../../assets/loader/parsers/textures/utils/createTexture';\nimport { checkExtension } from '../../assets/utils/checkExtension';\nimport { ExtensionType } from '../../extensions/Extensions';\nimport { CompressedSource } from '../../rendering/renderers/shared/texture/sources/CompressedSource';\nimport { getSupportedTextureFormats } from '../../rendering/renderers/shared/texture/utils/getSupportedTextureFormats';\nimport { parseKTX } from './parseKTX';\n\nimport type { Loader } from '../../assets/loader/Loader';\nimport type { LoaderParser } from '../../assets/loader/parsers/LoaderParser';\nimport type { ResolvedAsset } from '../../assets/types';\nimport type { TextureSourceOptions } from '../../rendering/renderers/shared/texture/sources/TextureSource';\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\n\n/** Loads KTX textures! */\nexport const loadKTX = {\n extension: {\n type: ExtensionType.LoadParser,\n priority: LoaderParserPriority.High,\n name: 'loadKTX',\n },\n\n name: 'loadKTX',\n\n test(url: string): boolean\n {\n return checkExtension(url, '.ktx');\n },\n\n async load(url: string, _asset: ResolvedAsset, loader: Loader): Promise\n {\n const supportedTextures = await getSupportedTextureFormats();\n\n const ktxResponse = await fetch(url);\n\n const ktxArrayBuffer = await ktxResponse.arrayBuffer();\n\n const textureOptions = parseKTX(ktxArrayBuffer, supportedTextures);\n\n const compressedTextureSource = new CompressedSource(textureOptions);\n\n return createTexture(compressedTextureSource, loader, url);\n },\n\n unload(texture: Texture | Texture[]): void\n {\n if (Array.isArray(texture))\n {\n texture.forEach((t) => t.destroy(true));\n }\n else\n {\n texture.destroy(true);\n }\n }\n\n} satisfies LoaderParser;\n\n","export const ktxTranscoderUrls = {\n jsUrl: 'https://files.pixijs.download/transcoders/ktx/libktx.js',\n wasmUrl: 'https://files.pixijs.download/transcoders/ktx/libktx.wasm'\n};\n\nexport function setKTXTranscoderPath(config: Partial)\n{\n Object.assign(ktxTranscoderUrls, config);\n}\n","import KTXWorker from 'worker:./ktx.worker.ts';\nimport { ktxTranscoderUrls } from '../utils/setKTXTranscoderPath';\n\nimport type { TEXTURE_FORMATS } from '../../../rendering/renderers/shared/texture/const';\nimport type { TextureSourceOptions } from '../../../rendering/renderers/shared/texture/sources/TextureSource';\n\nlet ktxWorker: Worker;\nconst urlHash: Record void> = {};\n\nfunction getKTX2Worker(supportedTextures: TEXTURE_FORMATS[]): Worker\n{\n if (!ktxWorker)\n {\n ktxWorker = new KTXWorker().worker;\n\n ktxWorker.onmessage = (messageEvent) =>\n {\n const { success, url, textureOptions } = messageEvent.data;\n\n if (!success)\n {\n console.warn('Failed to load KTX texture', url);\n }\n\n urlHash[url](textureOptions);\n };\n\n ktxWorker.postMessage({\n type: 'init',\n jsUrl: ktxTranscoderUrls.jsUrl,\n wasmUrl: ktxTranscoderUrls.wasmUrl,\n supportedTextures\n });\n }\n\n return ktxWorker;\n}\n\nexport function loadKTX2onWorker(\n url: string,\n supportedTextures: TEXTURE_FORMATS[]\n): Promise\n{\n const ktxWorker = getKTX2Worker(supportedTextures);\n\n return new Promise((resolve) =>\n {\n urlHash[url] = resolve;\n\n ktxWorker.postMessage({ type: 'load', url });\n });\n}\n","import { LoaderParserPriority } from '../../assets/loader/parsers/LoaderParser';\nimport { createTexture } from '../../assets/loader/parsers/textures/utils/createTexture';\nimport { checkExtension } from '../../assets/utils/checkExtension';\nimport { ExtensionType } from '../../extensions/Extensions';\nimport { CompressedSource } from '../../rendering/renderers/shared/texture/sources/CompressedSource';\nimport { getSupportedTextureFormats } from '../../rendering/renderers/shared/texture/utils/getSupportedTextureFormats';\nimport { loadKTX2onWorker } from './worker/loadKTX2onWorker';\n\nimport type { Loader } from '../../assets/loader/Loader';\nimport type { LoaderParser } from '../../assets/loader/parsers/LoaderParser';\nimport type { ResolvedAsset } from '../../assets/types';\nimport type { TextureSourceOptions } from '../../rendering/renderers/shared/texture/sources/TextureSource';\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\n\n/** Loads KTX2 textures! */\nexport const loadKTX2 = {\n extension: {\n type: ExtensionType.LoadParser,\n priority: LoaderParserPriority.High,\n name: 'loadKTX2',\n },\n\n name: 'loadKTX2',\n\n test(url: string): boolean\n {\n return checkExtension(url, '.ktx2');\n },\n\n async load(url: string, _asset: ResolvedAsset, loader: Loader): Promise\n {\n const supportedTextures = await getSupportedTextureFormats();\n\n const textureOptions = await loadKTX2onWorker(url, supportedTextures);\n\n const compressedTextureSource = new CompressedSource(textureOptions);\n\n return createTexture(compressedTextureSource, loader, url);\n },\n\n async unload(texture: Texture | Texture[]): Promise\n {\n if (Array.isArray(texture))\n {\n texture.forEach((t) => t.destroy(true));\n }\n else\n {\n texture.destroy(true);\n }\n }\n\n} satisfies LoaderParser;\n\n","import type { TEXTURE_FORMATS } from '../../../rendering/renderers/shared/texture/const';\nimport type { TextureSourceOptions } from '../../../rendering/renderers/shared/texture/sources/TextureSource';\n\ninterface ColorConverter\n{\n convertedFormat: TEXTURE_FORMATS,\n convertFunction: (levelBuffer: Uint8Array) => Uint8Array\n}\n\nconst converters: Record = {\n rgb8unorm: {\n convertedFormat: 'rgba8unorm',\n convertFunction: convertRGBtoRGBA,\n },\n 'rgb8unorm-srgb': {\n convertedFormat: 'rgba8unorm-srgb',\n convertFunction: convertRGBtoRGBA,\n }\n};\n\nexport function convertFormatIfRequired(textureOptions: TextureSourceOptions)\n{\n const format = textureOptions.format;\n\n if (converters[format])\n {\n const convertFunction = converters[format].convertFunction;\n\n const levelBuffers = textureOptions.resource;\n\n for (let i = 0; i < levelBuffers.length; i++)\n {\n levelBuffers[i] = convertFunction(levelBuffers[i]);\n }\n\n textureOptions.format = converters[format].convertedFormat;\n }\n}\n\nfunction convertRGBtoRGBA(levelBuffer: Uint8Array): Uint8Array\n{\n const pixelCount = levelBuffer.byteLength / 3;\n\n const levelBufferWithAlpha = new Uint32Array(pixelCount);\n\n for (let i = 0; i < pixelCount; ++i)\n {\n levelBufferWithAlpha[i] = (levelBuffer[i * 3]) // R\n + (levelBuffer[(i * 3) + 1] << 8) // G\n + (levelBuffer[(i * 3) + 2] << 16) // B\n + 0xff000000; // A (255)\n }\n\n return new Uint8Array(levelBufferWithAlpha.buffer);\n}\n","import type { KTXTexture } from '../types';\n\nexport function createLevelBuffersFromKTX(ktxTexture: KTXTexture): Uint8Array[]\n{\n const levelBuffers = [];\n\n // create the levels..\n for (let i = 0; i < ktxTexture.numLevels; i++)\n {\n const imageData = ktxTexture.getImageData(i, 0, 0);\n\n const levelBuffer = new Uint8Array(imageData.byteLength);\n\n levelBuffer.set(imageData);\n\n levelBuffers.push(levelBuffer);\n }\n\n return levelBuffers;\n}\n","import type { COMPRESSED_TEXTURE_FORMATS } from '../types';\n\nconst glFormatToGPUFormatMap: Record = {\n 6408: 'rgba8unorm',\n 32856: 'bgra8unorm', //\n 32857: 'rgb10a2unorm',\n 33189: 'depth16unorm',\n 33190: 'depth24plus',\n 33321: 'r8unorm',\n 33323: 'rg8unorm',\n 33325: 'r16float',\n 33326: 'r32float',\n 33327: 'rg16float',\n 33328: 'rg32float',\n 33329: 'r8sint',\n 33330: 'r8uint',\n 33331: 'r16sint',\n 33332: 'r16uint',\n 33333: 'r32sint',\n 33334: 'r32uint',\n 33335: 'rg8sint',\n 33336: 'rg8uint',\n 33337: 'rg16sint',\n 33338: 'rg16uint',\n 33339: 'rg32sint',\n 33340: 'rg32uint',\n 33778: 'bc2-rgba-unorm',\n 33779: 'bc3-rgba-unorm',\n 34836: 'rgba32float',\n 34842: 'rgba16float',\n 35056: 'depth24plus-stencil8',\n 35898: 'rg11b10ufloat',\n 35901: 'rgb9e5ufloat',\n 35907: 'rgba8unorm-srgb', // bgra8unorm-srgb\n 36012: 'depth32float',\n 36013: 'depth32float-stencil8',\n 36168: 'stencil8',\n 36208: 'rgba32uint',\n 36214: 'rgba16uint',\n 36220: 'rgba8uint',\n 36226: 'rgba32sint',\n 36232: 'rgba16sint',\n 36238: 'rgba8sint',\n 36492: 'bc7-rgba-unorm',\n 36756: 'r8snorm',\n 36757: 'rg8snorm',\n 36759: 'rgba8snorm',\n 37496: 'etc2-rgba8unorm',\n 37808: 'astc-4x4-unorm'\n};\n\nexport function glFormatToGPUFormat(glInternalFormat: number): COMPRESSED_TEXTURE_FORMATS\n{\n const format = glFormatToGPUFormatMap[glInternalFormat];\n\n if (format)\n {\n return format;\n }\n\n throw new Error(`Unsupported glInternalFormat: ${glInternalFormat}`);\n}\n","import type { COMPRESSED_TEXTURE_FORMATS } from '../types';\n\nconst vkFormatToGPUFormatMap: Record = {\n 23: 'rgb8unorm', // VK_FORMAT_R8G8B8_UNORM\n 37: 'rgba8unorm', // VK_FORMAT_R8G8B8A8_UNORM\n 43: 'rgba8unorm-srgb', // VK_FORMAT_R8G8B8A8_SRGB\n // TODO add more!\n};\n\nexport function vkFormatToGPUFormat(vkFormat: number): COMPRESSED_TEXTURE_FORMATS\n{\n const format = vkFormatToGPUFormatMap[vkFormat];\n\n if (format)\n {\n return format;\n }\n\n throw new Error(`Unsupported VkFormat: ${vkFormat}`);\n}\n","import { glFormatToGPUFormat } from './glFormatToGPUFormat';\nimport { vkFormatToGPUFormat } from './vkFormatToGPUFormat';\n\nimport type { COMPRESSED_TEXTURE_FORMATS, KTXTexture } from '../types';\n\nexport function getTextureFormatFromKTXTexture(ktxTexture: KTXTexture): COMPRESSED_TEXTURE_FORMATS\n{\n if (ktxTexture.classId === 2)\n {\n return vkFormatToGPUFormat(ktxTexture.vkFormat);\n }\n\n return glFormatToGPUFormat(ktxTexture.glInternalformat);\n}\n","const gpuFormatToBasisTranscoderFormatMap: Record = {\n 'bc3-rgba-unorm': 'BC3_RGBA',\n 'bc7-rgba-unorm': 'BC7_M5_RGBA',\n 'etc2-rgba8unorm': 'ETC2_RGBA',\n 'astc-4x4-unorm': 'ASTC_4x4_RGBA',\n // Uncompressed\n rgba8unorm: 'RGBA32',\n rg11b10ufloat: 'R11F_G11F_B10F',\n};\n\nexport function gpuFormatToKTXBasisTranscoderFormat(transcoderFormat: string): string\n{\n const format = gpuFormatToBasisTranscoderFormatMap[transcoderFormat];\n\n if (format)\n {\n return format;\n }\n\n throw new Error(`Unsupported transcoderFormat: ${transcoderFormat}`);\n}\n","import { Resolver } from '../../assets/resolver/Resolver';\nimport { checkExtension } from '../../assets/utils/checkExtension';\nimport { ExtensionType } from '../../extensions/Extensions';\n\nimport type { ResolveURLParser } from '../../assets/resolver/types';\n\nexport const validFormats = ['basis', 'bc7', 'bc6h', 'astc', 'etc2', 'bc5', 'bc4', 'bc3', 'bc2', 'bc1', 'eac'];\n\nexport const resolveCompressedTextureUrl = {\n extension: ExtensionType.ResolveParser,\n test: (value: string) =>\n checkExtension(value, ['.ktx', '.ktx2', '.dds']),\n parse: (value: string) =>\n {\n let format;\n\n const splitValue = value.split('.');\n\n if (splitValue.length > 2)\n {\n const newFormat = splitValue[splitValue.length - 2];\n\n if (validFormats.includes(newFormat))\n {\n format = newFormat;\n }\n }\n else\n {\n format = splitValue[splitValue.length - 1];\n }\n\n return {\n resolution: parseFloat(Resolver.RETINA_PREFIX.exec(value)?.[1] ?? '1'),\n format,\n src: value,\n };\n }\n} satisfies ResolveURLParser;\n","import { ExtensionType } from '../../extensions/Extensions';\n// eslint-disable-next-line max-len\nimport { getSupportedCompressedTextureFormats } from '../../rendering/renderers/shared/texture/utils/getSupportedCompressedTextureFormats';\nimport { isWebGLSupported } from '../../utils/browser/isWebGLSupported';\nimport { isWebGPUSupported } from '../../utils/browser/isWebGPUSupported';\nimport { validFormats } from './resolveCompressedTextureUrl';\n\nimport type { FormatDetectionParser } from '../../assets/detections/types';\nimport type { TEXTURE_FORMATS } from '../../rendering/renderers/shared/texture/const';\n\nlet compressedTextureExtensions: string[];\n\nexport const detectCompressed = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 2,\n },\n test: async (): Promise =>\n {\n if (await isWebGPUSupported()) return true;\n if (isWebGLSupported()) return true;\n\n return false;\n },\n add: async (formats: string[]): Promise =>\n {\n const supportedCompressedTextureFormats = await getSupportedCompressedTextureFormats();\n\n compressedTextureExtensions = extractExtensionsForCompressedTextureFormats(supportedCompressedTextureFormats);\n\n return [...compressedTextureExtensions, ...formats];\n },\n remove: async (formats: string[]): Promise =>\n {\n if (compressedTextureExtensions)\n {\n return formats.filter((f) => !(f in compressedTextureExtensions));\n }\n\n return formats;\n },\n} as FormatDetectionParser;\n\nfunction extractExtensionsForCompressedTextureFormats(formats: TEXTURE_FORMATS[]): string[]\n{\n const extensions: string[] = ['basis'];\n\n const dupeMap: Record = {};\n\n formats.forEach((format) =>\n {\n const extension = format.split('-')[0];\n\n if (extension && !dupeMap[extension])\n {\n dupeMap[extension] = true;\n extensions.push(extension);\n }\n });\n\n // sort extensions by priority\n extensions.sort((a, b) =>\n {\n const aIndex = validFormats.indexOf(a);\n const bIndex = validFormats.indexOf(b);\n\n if (aIndex === -1)\n {\n return 1;\n }\n if (bIndex === -1)\n {\n return -1;\n }\n\n return aIndex - bIndex;\n });\n\n return extensions;\n}\n","import { Bounds } from '../scene/container/bounds/Bounds';\nimport { getGlobalBounds } from '../scene/container/bounds/getGlobalBounds';\n\nimport type { Container } from '../scene/container/Container';\n\nconst tempBounds = new Bounds();\n\ntype RectangleLike = {x: number, y: number, width: number, height: number};\n\n/**\n * The Culler class is responsible for managing and culling containers.\n *\n *\n * Culled containers will not be rendered, and their children will not be processed. This can be useful for\n * performance optimization when dealing with large scenes.\n * @example\n * import { Culler, Container } from 'pixi.js';\n *\n * const culler = new Culler();\n * const stage = new Container();\n *\n * ... set up stage ...\n *\n * culler.cull(stage, { x: 0, y: 0, width: 800, height: 600 });\n * renderer.render(stage);\n * @memberof scene\n */\nexport class Culler\n{\n /**\n * Culls the children of a specific container based on the given view. This will also cull items that are not\n * being explicitly managed by the culler.\n * @param container - The container to cull.\n * @param view - The view rectangle.\n * @param skipUpdateTransform - Whether to skip updating the transform.\n */\n public cull(container: Container, view: RectangleLike, skipUpdateTransform = true)\n {\n this._cullRecursive(container, view, skipUpdateTransform);\n }\n\n private _cullRecursive(container: Container, view: RectangleLike, skipUpdateTransform = true)\n {\n if (container.cullable && container.measurable && container.includeInBuild)\n {\n const bounds = container.cullArea ?? getGlobalBounds(container, skipUpdateTransform, tempBounds);\n\n // check view intersection..\n container.culled = !(bounds.x >= view.x + view.width\n || bounds.y >= view.y + view.height\n || bounds.x + bounds.width <= view.x\n || bounds.y + bounds.height <= view.y);\n }\n\n // dont process children if not needed\n if (\n !container.cullableChildren\n || container.culled\n || !container.renderable\n || !container.measurable\n || !container.includeInBuild\n ) return;\n\n for (let i = 0; i < container.children.length; i++)\n {\n this._cullRecursive(container.children[i], view, skipUpdateTransform);\n }\n }\n\n /** A shared instance of the Culler class. */\n public static shared = new Culler();\n}\n","import { ExtensionType } from '../extensions/Extensions';\nimport { Culler } from './Culler';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\nimport type { Renderer } from '../rendering/renderers/types';\nimport type { Container } from '../scene/container/Container';\n\n/**\n * An {@link app.Application} plugin that will automatically cull your stage using the renderers screen size.\n * @example\n * import { extensions, CullerPlugin } from 'pixi.js';\n *\n * extensions.add(CullerPlugin);\n * @memberof app\n * @see {@link scene.Culler}\n */\nexport class CullerPlugin\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n priority: 10,\n type: ExtensionType.Application,\n name: 'culler',\n };\n\n public static renderer: Renderer;\n public static stage: Container;\n public static render: () => void;\n private static _renderRef: () => void;\n\n public static init(): void\n {\n this._renderRef = this.render.bind(this);\n\n this.render = (): void =>\n {\n Culler.shared.cull(this.stage, this.renderer.screen);\n this.renderer.render({ container: this.stage });\n };\n }\n\n public static destroy(): void\n {\n this.render = this._renderRef;\n }\n}\n","import { ExtensionType } from '../extensions/Extensions';\n\n/**\n * Extension for the browser environment.\n * @memberof environment\n */\nexport const browserExt = {\n extension: {\n type: ExtensionType.Environment,\n name: 'browser',\n priority: -1,\n },\n test: () => true,\n load: async () =>\n {\n await import('./browserAll');\n },\n};\n","import { GlProgram } from '../rendering/renderers/gl/shader/GlProgram';\nimport { GpuProgram } from '../rendering/renderers/gpu/shader/GpuProgram';\nimport { Shader } from '../rendering/renderers/shared/shader/Shader';\nimport { State } from '../rendering/renderers/shared/state/State';\n\nimport type { RenderSurface } from '../rendering/renderers/shared/renderTarget/RenderTargetSystem';\nimport type {\n IShaderWithResources,\n ShaderFromResources,\n ShaderWithResources\n} from '../rendering/renderers/shared/shader/Shader';\nimport type { BLEND_MODES } from '../rendering/renderers/shared/state/const';\nimport type { Texture } from '../rendering/renderers/shared/texture/Texture';\nimport type { FilterSystem } from './FilterSystem';\n\n/**\n * Filters provide additional shading and post-processing effects to any display object and its children\n * they are attached to.\n *\n * You attached filters to a display object using its `filters` array property.\n *\n * ```js\n * import { Sprite, BlurFilter, HardMixBlend } from 'pixi.js';\n *\n * const sprite = Sprite.from('myTexture.png');\n *\n * // single filter\n * sprite.filters = new BlurFilter({ strength: 8 });\n *\n * // or multiple filters\n * sprite.filters = [new BlurFilter({ strength: 8 }), new HardMixBlend()];\n * ```\n *\n * Pixi has a number of built-in filters which can be used in your game or application:\n *\n * - {@link filters.AlphaFilter} - Applies alpha to the display object and any of its children.\n * - {@link filters.BlurFilter} - Applies a Gaussian blur to the display object.\n * - {@link filters.BlurFilterPass} - Applies a blur pass to an object.\n * - {@link filters.ColorBurnBlend} - Blend mode to add color burn to display objects.\n * - {@link filters.ColorDodgeBlend} - Blend mode to add color dodge to display objects.\n * - {@link filters.ColorMatrixFilter} - Transform the color channels by matrix multiplication.\n * - {@link filters.DarkenBlend} - Blend mode to darken display objects.\n * - {@link filters.DisplacementFilter} - Applies a displacement map to distort an object.\n * - {@link filters.DivideBlend} - Blend mode to divide display objects.\n * - {@link filters.HardMixBlend} - Blend mode to hard mix display objects.\n * - {@link filters.LinearBurnBlend} - Blend mode to add linear burn to display objects.\n * - {@link filters.LinearDodgeBlend} - Blend mode to add linear dodge to display objects.\n * - {@link filters.LinearLightBlend} - Blend mode to add linear light to display objects.\n * - {@link filters.NoiseFilter} - Applies random noise to an object.\n * - {@link filters.PinLightBlend} - Blend mode to add pin light to display objects.\n * - {@link filters.SubtractBlend} - Blend mode to subtract display objects.\n *\n *
\n * For more available filters, check out the\n * {@link https://pixijs.io/filters/docs/ pixi-filters} repository.\n *\n * You can also check out the awesome {@link https://pixijs.io/filters/examples/ Filter demo} to see\n * filters in action and combine them!\n * @namespace filters\n */\n\n/**\n * The options to use when creating a new filter.\n * @memberof filters\n */\nexport interface FilterOptions\n{\n /** optional blend mode used by the filter when rendering (defaults to 'normal') */\n blendMode?: BLEND_MODES;\n /**\n * the resolution the filter should be rendered at. The lower the resolution, the more performant\n * the filter will be, but the lower the quality of the output. (defaults to the renderers resolution)\n * Consider lowering this for things like blurs filters\n */\n resolution?: number;\n /**\n * the amount of pixels to pad the container with when applying the filter. For example a blur extends the\n * container out as it blurs, so padding is applied to ensure that extra detail is rendered as well\n * without clipping occurring. (default 0)\n */\n padding?: number;\n /**\n * If true the filter will make use of antialiasing. Although it looks better this can have a performance impact.\n * By default, the filter will detect the antialiasing of the renderer and change this automatically.\n * Definitely don't set this to true if the renderer has antialiasing set to false. As it will antialias,\n * but you won't see the difference.\n *\n * This can be a boolean or [FilterAntialias]{@link filters.FilterAntialias} string.\n */\n antialias?: FilterAntialias | boolean;\n /**\n * If this is set to true, the filter system will grab a snap shot oif the are being rendered\n * to and pass this into the shader. This is useful for blend modes that need to be aware of the pixels\n * they are rendering to. Only use if you need that data, otherwise its an extra gpu copy you don't need!\n * (default false)\n */\n blendRequired?: boolean;\n}\n\n/** Filter options mixed with shader resources. A filter needs a shader and some resources to work. */\nexport type FilterWithShader = FilterOptions & IShaderWithResources;\n\n/**\n * The antialiasing mode of the filter. This can be either:\n * - `on` - the filter is always antialiased regardless of the renderer settings\n * - `off` - the filter is never antialiased regardless of the renderer settings\n * - `inherit` - (default) the filter uses the antialias settings of the renderer\n * @memberof filters\n */\nexport type FilterAntialias = 'on' | 'off' | 'inherit';\n\n/**\n * The Filter class is the base for all filter effects used in Pixi.js\n * As it extends a shader, it requires that a glProgram is parsed in to work with WebGL and a gpuProgram for WebGPU.\n * If you don't proved one, then the filter is skipped and just rendered as if it wasn't there for that renderer.\n *\n * A filter can be applied to anything that extends Container in Pixi.js which also includes Sprites, Graphics etc.\n *\n * Its worth noting Performance-wise filters can be pretty expensive if used too much in a single scene.\n * The following happens under the hood when a filter is applied:\n *\n * .1. Break the current batch\n *
\n * .2. The target is measured using getGlobalBounds\n * (recursively go through all children and figure out how big the object is)\n *
\n * .3. Get the closest Po2 Textures from the texture pool\n *
\n * .4. Render the target to that texture\n *
\n * .5. Render that texture back to the main frame buffer as a quad using the filters program.\n *
\n *
\n * Some filters (such as blur) require multiple passes too which can result in an even bigger performance hit. So be careful!\n * Its not generally the complexity of the shader that is the bottle neck,\n * but all the framebuffer / shader switching that has to take place.\n * One filter applied to a container with many objects is MUCH faster than many filter applied to many objects.\n * @class\n * @memberof filters\n */\nexport class Filter extends Shader\n{\n /**\n * The default filter settings\n * @static\n */\n public static readonly defaultOptions: FilterOptions = {\n blendMode: 'normal',\n resolution: 1,\n padding: 0,\n antialias: 'off',\n blendRequired: false,\n };\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 * @default 0\n */\n public padding: number;\n\n /**\n * should the filter use antialiasing?\n * @default inherit\n */\n public antialias: FilterAntialias;\n\n /** If enabled is true the filter is applied, if false it will not. */\n public enabled = true;\n\n /**\n * The gpu state the filter requires to render.\n * @internal\n * @ignore\n */\n public _state = State.for2d();\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 * @default 1\n */\n public resolution: number;\n\n /**\n * Whether or not this filter requires the previous render texture for blending.\n * @default false\n */\n public blendRequired: boolean;\n\n /**\n * @param options - The optional parameters of this filter.\n */\n constructor(options: FilterWithShader)\n {\n options = { ...Filter.defaultOptions, ...options };\n\n super(options as ShaderWithResources);\n\n this.padding = options.padding;\n\n // check if is boolean\n if (typeof options.antialias === 'boolean')\n {\n this.antialias = options.antialias ? 'on' : 'off';\n }\n else\n {\n this.antialias = options.antialias;\n }\n\n this.resolution = options.resolution;\n this.blendRequired = options.blendRequired;\n\n this.addResource('uTexture', 0, 1);\n }\n\n /**\n * Applies the filter\n * @param filterManager - The renderer to retrieve the filter from\n * @param input - The input render target.\n * @param output - The target to output to.\n * @param clearMode - Should the output be cleared before rendering to it\n */\n public apply(\n filterManager: FilterSystem,\n input: Texture,\n output: RenderSurface,\n clearMode: boolean\n ): void\n {\n filterManager.applyFilter(this, input, output, clearMode);\n }\n\n /**\n * Get the blend mode of the filter.\n * @default \"normal\"\n */\n get blendMode(): BLEND_MODES\n {\n return this._state.blendMode;\n }\n\n /** Sets the blend mode of the filter. */\n set blendMode(value: BLEND_MODES)\n {\n this._state.blendMode = value;\n }\n\n /**\n * A short hand function to create a filter based of a vertex and fragment shader src.\n * @param options\n * @returns A shiny new PixiJS filter!\n */\n public static from(options: FilterOptions & ShaderFromResources): Filter\n {\n const { gpu, gl, ...rest } = options;\n\n let gpuProgram: GpuProgram;\n let glProgram: GlProgram;\n\n if (gpu)\n {\n gpuProgram = GpuProgram.from(gpu);\n }\n\n if (gl)\n {\n glProgram = GlProgram.from(gl);\n }\n\n return new Filter({\n gpuProgram,\n glProgram,\n ...rest\n });\n }\n}\n","import { GlProgram } from '../../rendering/renderers/gl/shader/GlProgram';\nimport { GpuProgram } from '../../rendering/renderers/gpu/shader/GpuProgram';\nimport { UniformGroup } from '../../rendering/renderers/shared/shader/UniformGroup';\nimport { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport { Filter } from '../Filter';\nimport blendTemplateFrag from './blend-template.frag';\nimport blendTemplateVert from './blend-template.vert';\nimport blendTemplate from './blend-template.wgsl';\n\nexport interface BlendModeFilterOptions\n{\n source?: string;\n gpu?: {\n functions?: string;\n main?: string;\n }\n gl?: {\n functions?: string;\n main?: string;\n }\n}\n\nexport class BlendModeFilter extends Filter\n{\n constructor(options: BlendModeFilterOptions)\n {\n const gpuOptions = options.gpu;\n\n const gpuSource = compileBlendModeShader({ source: blendTemplate, ...gpuOptions });\n\n const gpuProgram = GpuProgram.from({\n vertex: {\n source: gpuSource,\n entryPoint: 'mainVertex',\n },\n fragment: {\n source: gpuSource,\n entryPoint: 'mainFragment',\n },\n });\n\n const glOptions = options.gl;\n\n const glSource = compileBlendModeShader({ source: blendTemplateFrag, ...glOptions });\n\n const glProgram = GlProgram.from({\n vertex: blendTemplateVert,\n fragment: glSource\n });\n\n const uniformGroup = new UniformGroup({\n uBlend: {\n value: 1,\n type: 'f32'\n }\n });\n\n super({\n gpuProgram,\n glProgram,\n blendRequired: true,\n resources: {\n blendUniforms: uniformGroup,\n uBackTexture: Texture.EMPTY\n }\n });\n }\n}\n\nfunction compileBlendModeShader(options: {source: string, functions?: string, main?: string}): string\n{\n const { source, functions, main } = options;\n\n return source.replace('{FUNCTIONS}', functions).replace('{MAIN}', main);\n}\n","/** A helper object containing the hsl shader code for both glsl */\nexport const hslgl = `\n\tfloat getLuminosity(vec3 c) {\n\t\treturn 0.3 * c.r + 0.59 * c.g + 0.11 * c.b;\n\t}\n\n\tvec3 setLuminosity(vec3 c, float lum) {\n\t\tfloat modLum = lum - getLuminosity(c);\n\t\tvec3 color = c.rgb + vec3(modLum);\n\n\t\t// clip back into legal range\n\t\tmodLum = getLuminosity(color);\n\t\tvec3 modLumVec = vec3(modLum);\n\n\t\tfloat cMin = min(color.r, min(color.g, color.b));\n\t\tfloat cMax = max(color.r, max(color.g, color.b));\n\n\t\tif(cMin < 0.0) {\n\t\t\tcolor = mix(modLumVec, color, modLum / (modLum - cMin));\n\t\t}\n\n\t\tif(cMax > 1.0) {\n\t\t\tcolor = mix(modLumVec, color, (1.0 - modLum) / (cMax - modLum));\n\t\t}\n\n\t\treturn color;\n\t}\n\n\tfloat getSaturation(vec3 c) {\n\t\treturn max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b));\n\t}\n\n\tvec3 setSaturationMinMidMax(vec3 cSorted, float s) {\n\t\tvec3 colorSorted = cSorted;\n\n\t\tif(colorSorted.z > colorSorted.x) {\n\t\t\tcolorSorted.y = (((colorSorted.y - colorSorted.x) * s) / (colorSorted.z - colorSorted.x));\n\t\t\tcolorSorted.z = s;\n\t\t}\n\t\telse {\n\t\t\tcolorSorted.y = 0.0;\n\t\t\tcolorSorted.z = 0.0;\n\t\t}\n\n\t\tcolorSorted.x = 0.0;\n\n\t\treturn colorSorted;\n\t}\n\n\tvec3 setSaturation(vec3 c, float s) {\n\t\tvec3 color = c;\n\n\t\tif(color.r <= color.g && color.r <= color.b) {\n\t\t\tif(color.g <= color.b) {\n\t\t\t\tcolor = setSaturationMinMidMax(color.rgb, s).rgb;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcolor = setSaturationMinMidMax(color.rbg, s).rbg;\n\t\t\t}\n\t\t}\n\t\telse if(color.g <= color.r && color.g <= color.b) {\n\t\t\tif(color.r <= color.b) {\n\t\t\t\tcolor = setSaturationMinMidMax(color.grb, s).grb;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcolor = setSaturationMinMidMax(color.gbr, s).gbr;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Using bgr for both fixes part of hue\n\t\t\tif(color.r <= color.g) {\n\t\t\t\tcolor = setSaturationMinMidMax(color.brg, s).brg;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcolor = setSaturationMinMidMax(color.bgr, s).bgr;\n\t\t\t}\n\t\t}\n\n\t\treturn color;\n\t}\n `;\n","/** A helper object containing the hsl shader code for wgsl */\nexport const hslgpu = `\n\tfn getLuminosity(c: vec3) -> f32\n\t{\n\t\treturn 0.3*c.r + 0.59*c.g + 0.11*c.b;\n\t}\n\n\tfn setLuminosity(c: vec3, lum: f32) -> vec3\n\t{\n\t\tvar modLum: f32 = lum - getLuminosity(c);\n\t\tvar color: vec3 = c.rgb + modLum;\n\n\t\t// clip back into legal range\n\t\tmodLum = getLuminosity(color);\n\t\tlet modLumVec = vec3(modLum);\n\n\t\tlet cMin: f32 = min(color.r, min(color.g, color.b));\n\t\tlet cMax: f32 = max(color.r, max(color.g, color.b));\n\n\t\tif(cMin < 0.0)\n\t\t{\n\t\t\tcolor = mix(modLumVec, color, modLum / (modLum - cMin));\n\t\t}\n\n\t\tif(cMax > 1.0)\n\t\t{\n\t\t\tcolor = mix(modLumVec, color, (1 - modLum) / (cMax - modLum));\n\t\t}\n\n\t\treturn color;\n\t}\n\n\tfn getSaturation(c: vec3) -> f32\n\t{\n\t\treturn max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b));\n\t}\n\n\tfn setSaturationMinMidMax(cSorted: vec3, s: f32) -> vec3\n\t{\n\t\tvar colorSorted = cSorted;\n\n\t\tif(colorSorted.z > colorSorted.x)\n\t\t{\n\t\t\tcolorSorted.y = (((colorSorted.y - colorSorted.x) * s) / (colorSorted.z - colorSorted.x));\n\t\t\tcolorSorted.z = s;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcolorSorted.y = 0;\n\t\t\tcolorSorted.z = 0;\n\t\t}\n\n\t\tcolorSorted.x = 0;\n\n\t\treturn colorSorted;\n\t}\n\n\tfn setSaturation(c: vec3, s: f32) -> vec3\n\t{\n\t\tvar color = c;\n\n\t\tif (color.r <= color.g && color.r <= color.b)\n\t\t{\n\t\t\tif (color.g <= color.b)\n\t\t\t{\n\t\t\t\tcolor = vec3(setSaturationMinMidMax(color.rgb, s)).rgb;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcolor = vec3(setSaturationMinMidMax(color.rbg, s)).rbg;\n\t\t\t}\n\t\t}\n\t\telse if (color.g <= color.r && color.g <= color.b)\n\t\t{\n\t\t\tif (color.r <= color.b)\n\t\t\t{\n\t\t\t\tcolor = vec3(setSaturationMinMidMax(color.grb, s)).grb;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcolor = vec3(setSaturationMinMidMax(color.gbr, s)).gbr;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Using bgr for both fixes part of hue\n\t\t\tif (color.r <= color.g)\n\t\t\t{\n\t\t\t\tcolor = vec3(setSaturationMinMidMax(color.brg, s)).brg;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcolor = vec3(setSaturationMinMidMax(color.bgr, s)).bgr;\n\t\t\t}\n\t\t}\n\n\t\treturn color;\n\t}\n\t`;\n","import { GlProgram } from '../../../rendering/renderers/gl/shader/GlProgram';\nimport { GpuProgram } from '../../../rendering/renderers/gpu/shader/GpuProgram';\nimport { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup';\nimport { Filter } from '../../Filter';\nimport vertex from '../defaultFilter.vert';\nimport fragment from './alpha.frag';\nimport source from './alpha.wgsl';\n\nimport type { FilterOptions } from '../../Filter';\n\n/**\n * Options for AlphaFilter\n * @memberof filters\n */\nexport interface AlphaFilterOptions extends FilterOptions\n{\n /**\n * Amount of alpha from 0 to 1, where 0 is transparent\n * @default 1\n */\n alpha: number;\n}\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 * @memberof filters\n */\nexport class AlphaFilter extends Filter\n{\n /** Default filter options */\n public static readonly defaultOptions: AlphaFilterOptions = {\n /** Amount of alpha from 0 to 1, where 0 is transparent */\n alpha: 1,\n };\n\n constructor(options?: AlphaFilterOptions)\n {\n options = { ...AlphaFilter.defaultOptions, ...options };\n\n const gpuProgram = GpuProgram.from({\n vertex: {\n source,\n entryPoint: 'mainVertex',\n },\n fragment: {\n source,\n entryPoint: 'mainFragment',\n },\n });\n\n const glProgram = GlProgram.from({\n vertex,\n fragment,\n name: 'alpha-filter'\n });\n\n const { alpha, ...rest } = options;\n\n const alphaUniforms = new UniformGroup({\n uAlpha: { value: alpha, type: 'f32' },\n });\n\n super({\n ...rest,\n gpuProgram,\n glProgram,\n resources: {\n alphaUniforms\n },\n });\n }\n\n /**\n * Coefficient for alpha multiplication\n * @default 1\n */\n get alpha(): number { return this.resources.alphaUniforms.uniforms.uAlpha; }\n set alpha(value: number) { this.resources.alphaUniforms.uniforms.uAlpha = value; }\n}\n","export interface IGAUSSIAN_VALUES\n{\n [x: number]: number[];\n}\n\nexport const GAUSSIAN_VALUES: IGAUSSIAN_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","import { GAUSSIAN_VALUES } from '../const';\n\nconst fragTemplate = [\n 'in vec2 vBlurTexCoords[%size%];',\n 'uniform sampler2D uTexture;',\n 'out vec4 finalColor;',\n\n 'void main(void)',\n '{',\n ' finalColor = vec4(0.0);',\n ' %blur%',\n '}',\n\n].join('\\n');\n\nexport function generateBlurFragSource(kernelSize: number): string\n{\n const kernel = GAUSSIAN_VALUES[kernelSize];\n const halfLength = kernel.length;\n\n let fragSource = fragTemplate;\n\n let blurLoop = '';\n const template = 'finalColor += texture(uTexture, vBlurTexCoords[%index%]) * %value%;';\n let value: number;\n\n for (let i = 0; i < kernelSize; i++)\n {\n let blur = template.replace('%index%', i.toString());\n\n value = i;\n\n if (i >= halfLength)\n {\n value = kernelSize - i - 1;\n }\n\n blur = blur.replace('%value%', kernel[value].toString());\n\n blurLoop += blur;\n blurLoop += '\\n';\n }\n\n fragSource = fragSource.replace('%blur%', blurLoop);\n fragSource = fragSource.replace('%size%', kernelSize.toString());\n\n return fragSource;\n}\n","const vertTemplate = `\n in vec2 aPosition;\n\n uniform float uStrength;\n\n out vec2 vBlurTexCoords[%size%];\n\n uniform vec4 uInputSize;\n uniform vec4 uOutputFrame;\n uniform vec4 uOutputTexture;\n\n vec4 filterVertexPosition( void )\n{\n vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;\n \n position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\n vec2 filterTextureCoord( void )\n {\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\n }\n\n void main(void)\n {\n gl_Position = filterVertexPosition();\n\n float pixelStrength = uInputSize.%dimension% * uStrength;\n\n vec2 textureCoord = filterTextureCoord();\n %blur%\n }`;\n\nexport function generateBlurVertSource(kernelSize: number, x: boolean): string\n{\n const halfLength = Math.ceil(kernelSize / 2);\n\n let vertSource = vertTemplate;\n\n let blurLoop = '';\n let template;\n\n if (x)\n {\n template = 'vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * pixelStrength, 0.0);';\n }\n else\n {\n template = 'vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * pixelStrength);';\n }\n\n for (let i = 0; i < kernelSize; i++)\n {\n let blur = template.replace('%index%', i.toString());\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.toString());\n vertSource = vertSource.replace('%dimension%', x ? 'z' : 'w');\n\n return vertSource;\n}\n","import { GlProgram } from '../../../../rendering/renderers/gl/shader/GlProgram';\nimport { generateBlurFragSource } from './generateBlurFragSource';\nimport { generateBlurVertSource } from './generateBlurVertSource';\n\nexport function generateBlurGlProgram(horizontal: boolean, kernelSize: number)\n{\n const vertex = generateBlurVertSource(kernelSize, horizontal);\n const fragment = generateBlurFragSource(kernelSize);\n\n return GlProgram.from({\n vertex,\n fragment,\n name: `blur-${horizontal ? 'horizontal' : 'vertical'}-pass-filter`\n });\n}\n","import { GpuProgram } from '../../../../rendering/renderers/gpu/shader/GpuProgram';\nimport { GAUSSIAN_VALUES } from '../const';\nimport source from './blur-template.wgsl';\n\nexport function generateBlurProgram(horizontal: boolean, kernelSize: number)\n{\n const kernel = GAUSSIAN_VALUES[kernelSize];\n const halfLength = kernel.length;\n\n const blurStructSource: string[] = [];\n const blurOutSource: string[] = [];\n const blurSamplingSource: string[] = [];\n\n for (let i = 0; i < kernelSize; i++)\n {\n blurStructSource[i] = `@location(${i}) offset${i}: vec2,`;\n\n if (horizontal)\n {\n blurOutSource[i] = `filteredCord + vec2(${i - halfLength + 1} * strength, 0.0),`;\n }\n else\n {\n blurOutSource[i] = `filteredCord + vec2(0.0, ${i - halfLength + 1} * strength),`;\n }\n\n const kernelIndex = i < halfLength ? i : (kernelSize - i - 1);\n const kernelValue = kernel[kernelIndex].toString();\n\n blurSamplingSource[i] = `finalColor += textureSample(uTexture, uSampler, offset${i}) * ${kernelValue};`;\n }\n\n const blurStruct = blurStructSource.join('\\n');\n const blurOut = blurOutSource.join('\\n');\n const blurSampling = blurSamplingSource.join('\\n');\n\n const finalSource = source\n .replace('%blur-struct%', blurStruct)\n .replace('%blur-vertex-out%', blurOut)\n .replace('%blur-fragment-in%', blurStruct)\n .replace('%blur-sampling%', blurSampling);\n\n return GpuProgram.from({\n vertex: {\n source: finalSource,\n entryPoint: 'mainVertex',\n },\n fragment: {\n source: finalSource,\n entryPoint: 'mainFragment',\n },\n });\n}\n\n","import { TexturePool } from '../../../rendering/renderers/shared/texture/TexturePool';\nimport { RendererType } from '../../../rendering/renderers/types';\nimport { Filter } from '../../Filter';\nimport { generateBlurGlProgram } from './gl/generateBlurGlProgram';\nimport { generateBlurProgram } from './gpu/generateBlurProgram';\n\nimport type { RenderSurface } from '../../../rendering/renderers/shared/renderTarget/RenderTargetSystem';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport type { FilterSystem } from '../../FilterSystem';\nimport type { BlurFilterOptions } from './BlurFilter';\n\n/**\n * Options for BlurFilterPass\n * @memberof filters\n */\nexport interface BlurFilterPassOptions extends BlurFilterOptions\n{\n /** Do pass along the x-axis (`true`) or y-axis (`false`). */\n horizontal: boolean;\n}\n\n/**\n * The BlurFilterPass applies a horizontal or vertical Gaussian blur to an object.\n * @memberof filters\n */\nexport class BlurFilterPass extends Filter\n{\n /** Default blur filter pass options */\n public static defaultOptions: Partial = {\n /** The strength of the blur filter. */\n strength: 8,\n /** The quality of the blur filter. */\n quality: 4,\n /** The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15. */\n kernelSize: 5,\n };\n\n /** Do pass along the x-axis (`true`) or y-axis (`false`). */\n public horizontal: boolean;\n /** The number of passes to run the filter. */\n public passes!: number;\n /** The strength of the blur filter. */\n public strength!: number;\n\n private _quality: number;\n private readonly _uniforms: any;\n\n /**\n * @param options\n * @param options.horizontal - Do pass along the x-axis (`true`) or y-axis (`false`).\n * @param options.strength - The strength of the blur filter.\n * @param options.quality - The quality of the blur filter.\n * @param options.kernelSize - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15.\n */\n constructor(options: BlurFilterPassOptions)\n {\n options = { ...BlurFilterPass.defaultOptions, ...options };\n\n const glProgram = generateBlurGlProgram(options.horizontal, options.kernelSize);\n const gpuProgram = generateBlurProgram(options.horizontal, options.kernelSize);\n\n super({\n glProgram,\n gpuProgram,\n resources: {\n blurUniforms: {\n uStrength: { value: 0, type: 'f32' },\n }\n },\n ...options\n });\n\n this.horizontal = options.horizontal;\n\n this._quality = 0;\n\n this.quality = options.quality;\n\n this.blur = options.strength;\n\n this._uniforms = this.resources.blurUniforms.uniforms;\n }\n\n /**\n * Applies the filter.\n * @param filterManager - The manager.\n * @param input - The input target.\n * @param output - The output target.\n * @param clearMode - How to clear\n */\n public apply(\n filterManager: FilterSystem,\n input: Texture,\n output: RenderSurface,\n clearMode: boolean\n ): void\n {\n this._uniforms.uStrength = this.strength / this.passes;\n\n if (this.passes === 1)\n {\n filterManager.applyFilter(this, input, output, clearMode);\n }\n else\n {\n const tempTexture = TexturePool.getSameSizeTexture(input);\n\n let flip = input;\n let flop = tempTexture;\n\n this._state.blend = false;\n\n for (let i = 0; i < this.passes - 1; i++)\n {\n filterManager.applyFilter(this, flip, flop, filterManager.renderer.type === RendererType.WEBGPU);\n\n const temp = flop;\n\n flop = flip;\n flip = temp;\n }\n\n this._state.blend = true;\n filterManager.applyFilter(this, flip, output, clearMode);\n TexturePool.returnTexture(tempTexture);\n }\n }\n\n /**\n * Sets the strength of both the blur.\n * @default 16\n */\n get blur(): number\n {\n return this.strength;\n }\n\n set blur(value: number)\n {\n this.padding = 1 + (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 * quality blurring but the lower the performance.\n * @default 4\n */\n get quality(): number\n {\n return this._quality;\n }\n\n set quality(value: number)\n {\n this._quality = value;\n this.passes = value;\n }\n}\n","import { TexturePool } from '../../../rendering/renderers/shared/texture/TexturePool';\nimport { RendererType } from '../../../rendering/renderers/types';\nimport { deprecation, v8_0_0 } from '../../../utils/logging/deprecation';\nimport { Filter } from '../../Filter';\nimport { BlurFilterPass } from './BlurFilterPass';\n\nimport type { RenderSurface } from '../../../rendering/renderers/shared/renderTarget/RenderTargetSystem';\nimport type { BLEND_MODES } from '../../../rendering/renderers/shared/state/const';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport type { FilterOptions } from '../../Filter';\nimport type { FilterSystem } from '../../FilterSystem';\n\n/**\n * Options for BlurFilter\n * @memberof filters\n */\nexport interface BlurFilterOptions extends FilterOptions\n{\n /**\n * The strength of the blur filter.\n * @default 8\n */\n strength?: number;\n /**\n * The quality of the blur filter.\n * @default 4\n */\n quality?: number;\n /**\n * The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15.\n * @default 5\n */\n kernelSize?: number;\n}\n\n/**\n * The BlurFilter applies a Gaussian blur to an object.\n *\n * The strength of the blur can be set for the x-axis and y-axis separately.\n * @memberof filters\n */\nexport class BlurFilter extends Filter\n{\n /** Default blur filter options */\n public static defaultOptions: Partial = {\n /** The strength of the blur filter. */\n strength: 8,\n /** The quality of the blur filter. */\n quality: 4,\n /** The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15. */\n kernelSize: 5,\n };\n\n /** The horizontal blur filter */\n public blurXFilter: BlurFilterPass;\n /** The vertical blur filter */\n public blurYFilter: BlurFilterPass;\n\n private _repeatEdgePixels = false;\n\n /**\n * @param {filters.BlurFilterOptions} options - The options of the blur filter.\n */\n constructor(options?: BlurFilterOptions);\n /** @deprecated since 8.0.0 */\n constructor(strength?: number, quality?: number, resolution?: number, kernelSize?: number);\n constructor(...args: [BlurFilterOptions?] | [number?, number?, number?, number?])\n {\n let options = args[0] ?? {};\n\n // if options is a number)\n if (typeof options === 'number')\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'BlurFilter constructor params are now options object. See params: { strength, quality, resolution, kernelSize }');\n // #endif\n\n options = { strength: options };\n\n if (args[1])options.quality = args[1];\n if (args[2])options.resolution = args[2];\n if (args[3])options.kernelSize = args[3];\n }\n\n options = { ...BlurFilterPass.defaultOptions, ...options };\n\n const { strength, quality, ...rest } = options;\n\n super({\n ...rest,\n compatibleRenderers: RendererType.BOTH,\n resources: {}\n });\n\n this.blurXFilter = new BlurFilterPass({ horizontal: false, ...options });\n this.blurYFilter = new BlurFilterPass({ horizontal: true, ...options });\n\n this.quality = quality;\n this.blur = strength;\n\n this.repeatEdgePixels = false;\n }\n\n /**\n * Applies the filter.\n * @param filterManager - The manager.\n * @param input - The input target.\n * @param output - The output target.\n * @param clearMode - How to clear\n */\n public apply(\n filterManager: FilterSystem,\n input: Texture,\n output: RenderSurface,\n clearMode: boolean\n ): void\n {\n const xStrength = Math.abs(this.blurXFilter.strength);\n const yStrength = Math.abs(this.blurYFilter.strength);\n\n if (xStrength && yStrength)\n {\n const tempTexture = TexturePool.getSameSizeTexture(input);\n\n this.blurXFilter.apply(filterManager, input, tempTexture, true);\n this.blurYFilter.apply(filterManager, tempTexture, output, clearMode);\n\n TexturePool.returnTexture(tempTexture);\n }\n else if (yStrength)\n {\n this.blurYFilter.apply(filterManager, input, output, clearMode);\n }\n else\n {\n this.blurXFilter.apply(filterManager, input, output, clearMode);\n }\n }\n\n protected updatePadding(): void\n {\n if (this._repeatEdgePixels)\n {\n this.padding = 0;\n }\n else\n {\n this.padding = Math.max(Math.abs(this.blurXFilter.blur), Math.abs(this.blurYFilter.blur)) * 2;\n }\n }\n\n /**\n * Sets the strength of both the blurX and blurY properties simultaneously\n * @default 2\n */\n get blur(): number\n {\n return this.blurXFilter.blur;\n }\n\n set blur(value: number)\n {\n this.blurXFilter.blur = this.blurYFilter.blur = value;\n this.updatePadding();\n }\n\n /**\n * Sets the number of passes for blur. More passes means higher quality bluring.\n * @default 1\n */\n get quality(): number\n {\n return this.blurXFilter.quality;\n }\n\n set quality(value: number)\n {\n this.blurXFilter.quality = this.blurYFilter.quality = value;\n }\n\n /**\n * Sets the strength of the blurX property\n * @default 2\n */\n get blurX(): number\n {\n return this.blurXFilter.blur;\n }\n\n set blurX(value: number)\n {\n this.blurXFilter.blur = value;\n this.updatePadding();\n }\n\n /**\n * Sets the strength of the blurY property\n * @default 2\n */\n get blurY(): number\n {\n return this.blurYFilter.blur;\n }\n\n set blurY(value: number)\n {\n this.blurYFilter.blur = value;\n this.updatePadding();\n }\n\n /**\n * Sets the blendmode of the filter\n * @default \"normal\"\n */\n get blendMode(): BLEND_MODES\n {\n return this.blurYFilter.blendMode;\n }\n\n set blendMode(value: BLEND_MODES)\n {\n this.blurYFilter.blendMode = value;\n }\n\n /**\n * If set to true the edge of the target will be clamped\n * @default false\n */\n get repeatEdgePixels(): boolean\n {\n return this._repeatEdgePixels;\n }\n\n set repeatEdgePixels(value: boolean)\n {\n this._repeatEdgePixels = value;\n this.updatePadding();\n }\n}\n","import { Color } from '../../../color/Color';\nimport { GlProgram } from '../../../rendering/renderers/gl/shader/GlProgram';\nimport { GpuProgram } from '../../../rendering/renderers/gpu/shader/GpuProgram';\nimport { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup';\nimport { Filter } from '../../Filter';\nimport vertex from '../defaultFilter.vert';\nimport fragment from './colorMatrixFilter.frag';\nimport source from './colorMatrixFilter.wgsl';\n\nimport type { ColorSource } from '../../../color/Color';\nimport type { ArrayFixed } from '../../../utils/types';\nimport type { FilterOptions } from '../../Filter';\n\n/**\n * 5x4 matrix for transforming RGBA color and alpha\n * @memberof filters\n */\nexport type ColorMatrix = ArrayFixed;\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 container 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 filters.ColorMatrixFilter();\n * container.filters = [colorMatrix];\n * colorMatrix.contrast(2);\n * ```\n * @author Clément Chenebault \n * @memberof filters\n */\nexport class ColorMatrixFilter extends Filter\n{\n constructor(options: FilterOptions = {})\n {\n const colorMatrixUniforms = new UniformGroup({\n uColorMatrix: {\n value: [\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 type: 'f32',\n size: 20,\n },\n uAlpha: {\n value: 1,\n type: 'f32'\n }\n });\n\n const gpuProgram = GpuProgram.from({\n vertex: {\n source,\n entryPoint: 'mainVertex',\n },\n fragment: {\n source,\n entryPoint: 'mainFragment',\n },\n });\n\n const glProgram = GlProgram.from({\n vertex,\n fragment,\n name: 'color-matrix-filter'\n });\n\n super({\n ...options,\n gpuProgram,\n glProgram,\n resources: {\n colorMatrixUniforms\n },\n });\n\n this.alpha = 1;\n }\n\n /**\n * Transforms current matrix and set the new one\n * @param {number[]} matrix - 5x4 matrix\n * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n private _loadMatrix(matrix: ColorMatrix, multiply = false): void\n {\n let newMatrix = matrix;\n\n if (multiply)\n {\n this._multiply(newMatrix, this.matrix, matrix);\n newMatrix = this._colorMatrix(newMatrix) as any;\n }\n\n // set the new matrix\n\n this.resources.colorMatrixUniforms.uniforms.uColorMatrix = newMatrix;\n this.resources.colorMatrixUniforms.update();\n }\n\n /**\n * Multiplies two mat5's\n * @private\n * @param out - 5x4 matrix the receiving matrix\n * @param a - 5x4 matrix the first operand\n * @param b - 5x4 matrix the second operand\n * @returns {number[]} 5x4 matrix\n */\n private _multiply(out: ColorMatrix, a: ColorMatrix, b: ColorMatrix): ColorMatrix\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 * @param {number[]} matrix - 5x4 matrix\n * @returns {number[]} 5x4 matrix with all values between 0-1\n */\n private _colorMatrix(matrix: ColorMatrix): ColorMatrix\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 as any;\n }\n\n /**\n * Adjusts brightness\n * @param b - value of the brigthness (0-1, where 0 is black)\n * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public brightness(b: number, multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 * Sets each channel on the diagonal of the color matrix.\n * This can be used to achieve a tinting effect on Containers similar to the tint field of some\n * display objects like Sprite, Text, Graphics, and Mesh.\n * @param color - Color of the tint. This is a hex value.\n * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public tint(color: ColorSource, multiply?: boolean): void\n {\n const [r, g, b] = Color.shared.setValue(color).toArray();\n const matrix: ColorMatrix = [\n r, 0, 0, 0, 0,\n 0, g, 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 * @param scale - value of the grey (0-1, where 0 is black)\n * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public greyscale(scale: number, multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 * for our american friends!\n * @param scale\n * @param multiply\n */\n public grayscale(scale: number, multiply: boolean): void\n {\n this.greyscale(scale, multiply);\n }\n\n /**\n * Set the black and white matrice.\n * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public blackAndWhite(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 * @param rotation - in degrees\n * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public hue(rotation: number, multiply: boolean): void\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: ColorMatrix = [\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 * @param amount - value of the contrast (0-1)\n * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public contrast(amount: number, multiply: boolean): void\n {\n const v = (amount || 0) + 1;\n const o = -0.5 * (v - 1);\n\n const matrix: ColorMatrix = [\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 * @param amount - The saturation amount (0-1)\n * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public saturate(amount = 0, multiply?: boolean): void\n {\n const x = (amount * 2 / 3) + 1;\n const y = ((x - 1) * -0.5);\n\n const matrix: ColorMatrix = [\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 /** Desaturate image (remove color) Call the saturate function */\n public desaturate(): void // eslint-disable-line no-unused-vars\n {\n this.saturate(-1);\n }\n\n /**\n * Negative image (inverse of classic rgb matrix)\n * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public negative(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public sepia(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public technicolor(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public polaroid(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public toBGR(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public kodachrome(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public browni(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public vintage(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 * @param desaturation - Tone values.\n * @param toned - Tone values.\n * @param lightColor - Tone values, example: `0xFFE580`\n * @param darkColor - Tone values, example: `0xFFE580`\n * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public colorTone(\n desaturation: number,\n toned: number,\n lightColor: ColorSource,\n darkColor: ColorSource,\n multiply: boolean\n ): void\n {\n desaturation = desaturation || 0.2;\n toned = toned || 0.15;\n lightColor = lightColor || 0xFFE580;\n darkColor = darkColor || 0x338000;\n\n const temp = Color.shared;\n const [lR, lG, lB] = temp.setValue(lightColor).toArray();\n const [dR, dG, dB] = temp.setValue(darkColor).toArray();\n\n const matrix: ColorMatrix = [\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 * @param intensity - The intensity of the night effect.\n * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public night(intensity: number, multiply: boolean): void\n {\n intensity = intensity || 0.1;\n\n const matrix: ColorMatrix = [\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 * @param amount - how much the predator feels his future victim\n * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public predator(amount: number, multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 * @param multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public lsd(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\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 /** Erase the current matrix by setting the default one. */\n public reset(): void\n {\n const matrix: ColorMatrix = [\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 * @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(): ColorMatrix\n {\n return this.resources.colorMatrixUniforms.uniforms.uColorMatrix;\n }\n\n set matrix(value: ColorMatrix)\n {\n this.resources.colorMatrixUniforms.uniforms.uColorMatrix = 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 * @default 1\n */\n get alpha(): number\n {\n return this.resources.colorMatrixUniforms.uniforms.uAlpha;\n }\n\n set alpha(value: number)\n {\n this.resources.colorMatrixUniforms.uniforms.uAlpha = value;\n }\n}\n","import { Matrix } from '../../../maths/matrix/Matrix';\nimport { Point } from '../../../maths/point/Point';\nimport { GlProgram } from '../../../rendering/renderers/gl/shader/GlProgram';\nimport { GpuProgram } from '../../../rendering/renderers/gpu/shader/GpuProgram';\nimport { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup';\nimport { Sprite } from '../../../scene/sprite/Sprite';\nimport { deprecation, v8_0_0 } from '../../../utils/logging/deprecation';\nimport { Filter } from '../../Filter';\nimport fragment from './displacement.frag';\nimport vertex from './displacement.vert';\nimport source from './displacement.wgsl';\n\nimport type { PointData } from '../../../maths/point/PointData';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport type { FilterOptions } from '../../Filter';\nimport type { FilterSystem } from '../../FilterSystem';\n\n/**\n * Options for DisplacementFilter\n * @memberof filters\n */\nexport interface DisplacementFilterOptions extends FilterOptions\n{\n /** The texture used for the displacement map. */\n sprite: Sprite,\n /** The scale of the displacement. */\n scale?: number | PointData,\n}\n\n/**\n * A Noise effect filter.\n *\n * original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js\n * @memberof filters\n * @author Vico @vicocotea\n */\nexport class DisplacementFilter extends Filter\n{\n private readonly _sprite: Sprite;\n\n /**\n * **Note:** Our docs parser struggles to properly understand the constructor signature.\n * This is the correct signature.\n * ```ts\n * new DisplacementFilter(options?: DisplacementFilterOptions);\n * ```\n * @param options - The options for the filter.\n * @param options.sprite - The texture used for the displacement map.\n * @param options.scale - The scale of the displacement.\n */\n constructor(options: Sprite | DisplacementFilterOptions);\n constructor(sprite: Sprite, scale?: number | PointData);\n constructor(...args: [Sprite | DisplacementFilterOptions] | [Sprite, (number | PointData)?])\n {\n let options = args[0];\n\n if (options instanceof Sprite)\n {\n // #if _DEBUG\n if (args[1])\n {\n deprecation(v8_0_0, 'DisplacementFilter now uses options object instead of params. {sprite, scale}');\n }\n // #endif\n\n options = { sprite: options, scale: args[1] };\n }\n\n const { sprite, scale: scaleOption, ...rest } = options;\n\n let scale = scaleOption ?? 20;\n\n // check if is a number or a point\n if (typeof scale === 'number')\n {\n scale = new Point(scale, scale);\n }\n\n const filterUniforms = new UniformGroup({\n uFilterMatrix: { value: new Matrix(), type: 'mat3x3' },\n uScale: { value: scale, type: 'vec2' },\n uRotation: { value: new Float32Array([0, 0, 0, 0]), type: 'mat2x2' },\n });\n\n const glProgram = GlProgram.from({\n vertex,\n fragment,\n name: 'displacement-filter'\n });\n\n const gpuProgram = GpuProgram.from({\n vertex: {\n source,\n entryPoint: 'mainVertex',\n },\n fragment: {\n source,\n entryPoint: 'mainFragment',\n },\n });\n\n const textureSource = sprite.texture.source;\n\n super({\n ...rest,\n gpuProgram,\n glProgram,\n resources: {\n filterUniforms,\n uMapTexture: textureSource,\n uMapSampler: textureSource.style,\n },\n });\n\n this._sprite = options.sprite;\n this._sprite.renderable = false;\n }\n\n /**\n * Applies the filter.\n * @param filterManager - The manager.\n * @param input - The input target.\n * @param output - The output target.\n * @param clearMode - clearMode.\n */\n public apply(\n filterManager: FilterSystem,\n input: Texture,\n output: Texture,\n clearMode: boolean\n ): void\n {\n const uniforms = this.resources.filterUniforms.uniforms;\n\n filterManager.calculateSpriteMatrix(\n uniforms.uFilterMatrix,\n this._sprite\n );\n\n // Extract rotation from world transform\n const wt = this._sprite.worldTransform;\n const lenX = Math.sqrt((wt.a * wt.a) + (wt.b * wt.b));\n const lenY = Math.sqrt((wt.c * wt.c) + (wt.d * wt.d));\n\n if (lenX !== 0 && lenY !== 0)\n {\n uniforms.uRotation[0] = wt.a / lenX;\n uniforms.uRotation[1] = wt.b / lenX;\n uniforms.uRotation[2] = wt.c / lenY;\n uniforms.uRotation[3] = wt.d / lenY;\n }\n\n this.resources.uMapTexture = this._sprite.texture.source;\n\n filterManager.applyFilter(this, input, output, clearMode);\n }\n\n /** scaleX, scaleY for displacements */\n get scale(): Point\n {\n return this.resources.filterUniforms.uniforms.uScale as Point;\n }\n}\n","import { GlProgram } from '../../../rendering/renderers/gl/shader/GlProgram';\nimport { GpuProgram } from '../../../rendering/renderers/gpu/shader/GpuProgram';\nimport { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup';\nimport { Filter } from '../../Filter';\nimport vertex from '../defaultFilter.vert';\nimport fragment from './noise.frag';\nimport source from './noise.wgsl';\n\nimport type { FilterOptions } from '../../Filter';\n\n/**\n * Options for NoiseFilter\n * @memberof filters\n */\nexport interface NoiseFilterOptions extends FilterOptions\n{\n /** The amount of noise to apply, this value should be in the range (0, 1]. */\n noise?: number;\n /** A seed value to apply to the random noise generation. `Math.random()` is a good value to use. */\n seed?: number;\n}\n\n/**\n * A Noise effect filter.\n *\n * original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js\n * @memberof filters\n * @author Vico @vicocotea\n */\nexport class NoiseFilter extends Filter\n{\n public static readonly defaultOptions: NoiseFilterOptions = {\n noise: 0.5,\n };\n\n /**\n * @param options - The options of the noise filter.\n */\n constructor(options: NoiseFilterOptions = {})\n {\n options = { ...NoiseFilter.defaultOptions, ...options };\n\n const gpuProgram = GpuProgram.from({\n vertex: {\n source,\n entryPoint: 'mainVertex',\n },\n fragment: {\n source,\n entryPoint: 'mainFragment',\n },\n });\n\n const glProgram = GlProgram.from({\n vertex,\n fragment,\n name: 'noise-filter'\n });\n\n const { noise, seed, ...rest } = options;\n\n super({\n ...rest,\n gpuProgram,\n glProgram,\n resources: {\n noiseUniforms: new UniformGroup({\n uNoise: { value: 1, type: 'f32' },\n uSeed: { value: 1, type: 'f32' },\n })\n },\n });\n\n this.noise = noise;\n this.seed = seed ?? Math.random();\n }\n\n /**\n * The amount of noise to apply, this value should be in the range (0, 1].\n * @default 0.5\n */\n get noise(): number\n {\n return this.resources.noiseUniforms.uniforms.uNoise;\n }\n\n set noise(value: number)\n {\n this.resources.noiseUniforms.uniforms.uNoise = value;\n }\n\n /** A seed value to apply to the random noise generation. `Math.random()` is a good value to use. */\n get seed(): number\n {\n return this.resources.noiseUniforms.uniforms.uSeed;\n }\n\n set seed(value: number)\n {\n this.resources.noiseUniforms.uniforms.uSeed = value;\n }\n}\n","import { Matrix } from '../../maths/matrix/Matrix';\nimport { GlProgram } from '../../rendering/renderers/gl/shader/GlProgram';\nimport { GpuProgram } from '../../rendering/renderers/gpu/shader/GpuProgram';\nimport { UniformGroup } from '../../rendering/renderers/shared/shader/UniformGroup';\nimport { TextureMatrix } from '../../rendering/renderers/shared/texture/TextureMatrix';\nimport { Filter } from '../Filter';\nimport fragment from './mask.frag';\nimport vertex from './mask.vert';\nimport source from './mask.wgsl';\n\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport type { Sprite } from '../../scene/sprite/Sprite';\nimport type { FilterOptions } from '../Filter';\nimport type { FilterSystem } from '../FilterSystem';\n\nexport interface MaskFilterOptions extends FilterOptions\n{\n sprite: Sprite,\n scale?: number | { x: number, y: number },\n}\n\nexport class MaskFilter extends Filter\n{\n public sprite: Sprite;\n private readonly _textureMatrix: TextureMatrix;\n\n constructor(options: MaskFilterOptions)\n {\n const { sprite, ...rest } = options;\n\n const textureMatrix = new TextureMatrix(sprite.texture);\n\n const filterUniforms = new UniformGroup({\n uFilterMatrix: { value: new Matrix(), type: 'mat3x3' },\n uMaskClamp: { value: textureMatrix.uClampFrame, type: 'vec4' },\n uAlpha: { value: 1, type: 'f32' },\n });\n\n const gpuProgram = GpuProgram.from({\n vertex: {\n source,\n entryPoint: 'mainVertex',\n },\n fragment: {\n source,\n entryPoint: 'mainFragment',\n },\n });\n\n const glProgram = GlProgram.from({\n vertex,\n fragment,\n name: 'mask-filter',\n });\n\n super({\n ...rest,\n gpuProgram,\n glProgram,\n resources: {\n filterUniforms,\n uMaskTexture: sprite.texture.source,\n },\n });\n\n this.sprite = sprite;\n\n this._textureMatrix = textureMatrix;\n }\n\n public apply(\n filterManager: FilterSystem,\n input: Texture,\n output: Texture,\n clearMode: boolean\n ): void\n {\n // will trigger an update if the texture changed..\n this._textureMatrix.texture = this.sprite.texture;\n\n filterManager.calculateSpriteMatrix(\n this.resources.filterUniforms.uniforms.uFilterMatrix as Matrix,\n this.sprite\n ).prepend(this._textureMatrix.mapCoord);\n\n this.resources.uMaskTexture = this.sprite.texture.source;\n\n filterManager.applyFilter(this, input, output, clearMode);\n }\n}\n","/**\n * Check if a point is inside a triangle.\n * @param px - x coordinate of the point\n * @param py - y coordinate of the point\n * @param x1 - x coordinate of the first vertex of the triangle\n * @param y1 - y coordinate of the first vertex of the triangle\n * @param x2 - x coordinate of the second vertex of the triangle\n * @param y2 - y coordinate of the second vertex of the triangle\n * @param x3 - x coordinate of the third vertex of the triangle\n * @param y3 - y coordinate of the third vertex of the triangle\n * @returns `true` if the point is inside the triangle, `false` otherwise\n */\nexport function pointInTriangle(\n px: number, py: number,\n x1: number, y1: number,\n x2: number, y2: number,\n x3: number, y3: number\n)\n{\n // Calculate vectors from point p to each vertex of the triangle\n const v2x = x3 - x1;\n const v2y = y3 - y1;\n const v1x = x2 - x1;\n const v1y = y2 - y1;\n const v0x = px - x1;\n const v0y = py - y1;\n\n // Compute dot products\n const dot00 = (v2x * v2x) + (v2y * v2y);\n const dot01 = (v2x * v1x) + (v2y * v1y);\n const dot02 = (v2x * v0x) + (v2y * v0y);\n const dot11 = (v1x * v1x) + (v1y * v1y);\n const dot12 = (v1x * v0x) + (v1y * v0y);\n\n // Calculate barycentric coordinates\n const invDenom = 1 / ((dot00 * dot11) - (dot01 * dot01));\n const u = ((dot11 * dot02) - (dot01 * dot12)) * invDenom;\n const v = ((dot00 * dot12) - (dot01 * dot02)) * invDenom;\n\n // Check if point is in triangle\n return (u >= 0) && (v >= 0) && (u + v < 1);\n}\n","import { squaredDistanceToLineSegment } from '../misc/squaredDistanceToLineSegment';\nimport { Rectangle } from './Rectangle';\n\nimport type { SHAPE_PRIMITIVE } from '../misc/const';\nimport type { ShapePrimitive } from './ShapePrimitive';\n\n/**\n * A class to define a shape of a triangle via user defined coordinates.\n *\n * Create a `Triangle` object with the `x`, `y`, `x2`, `y2`, `x3`, `y3` properties.\n *\n * ```js\n * import { Triangle } from 'pixi.js';\n *\n * const triangle = new Triangle(0, 0, 100, 0, 50, 50);\n * ```\n * @memberof maths\n */\nexport class Triangle implements ShapePrimitive\n{\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n * @default 'triangle'\n */\n public readonly type: SHAPE_PRIMITIVE = 'triangle';\n\n /**\n * The X coord of the first point.\n * @default 0\n */\n public x: number;\n /**\n * The Y coord of the first point.\n * @default 0\n */\n public y: number;\n /**\n * The X coord of the second point.\n * @default 0\n */\n public x2: number;\n /**\n * The Y coord of the second point.\n * @default 0\n */\n public y2: number;\n /**\n * The X coord of the third point.\n * @default 0\n */\n public x3: number;\n /**\n * The Y coord of the third point.\n * @default 0\n */\n public y3: number;\n\n /**\n * @param x - The X coord of the first point.\n * @param y - The Y coord of the first point.\n * @param x2 - The X coord of the second point.\n * @param y2 - The Y coord of the second point.\n * @param x3 - The X coord of the third point.\n * @param y3 - The Y coord of the third point.\n */\n constructor(x = 0, y = 0, x2 = 0, y2 = 0, x3 = 0, y3 = 0)\n {\n this.x = x;\n this.y = y;\n this.x2 = x2;\n this.y2 = y2;\n this.x3 = x3;\n this.y3 = y3;\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this triangle\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @returns Whether the x/y coordinates are within this Triangle\n */\n public contains(x: number, y: number): boolean\n {\n const s = ((this.x - this.x3) * (y - this.y3)) - ((this.y - this.y3) * (x - this.x3));\n const t = ((this.x2 - this.x) * (y - this.y)) - ((this.y2 - this.y) * (x - this.x));\n\n if ((s < 0) !== (t < 0) && s !== 0 && t !== 0)\n { return false; }\n\n const d = ((this.x3 - this.x2) * (y - this.y2)) - ((this.y3 - this.y2) * (x - this.x2));\n\n return d === 0 || (d < 0) === (s + t <= 0);\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this triangle including the stroke.\n * @param pointX - The X coordinate of the point to test\n * @param pointY - The Y coordinate of the point to test\n * @param strokeWidth - The width of the line to check\n * @returns Whether the x/y coordinates are within this triangle\n */\n public strokeContains(pointX: number, pointY: number, strokeWidth: number): boolean\n {\n const halfStrokeWidth = strokeWidth / 2;\n const halfStrokeWidthSquared = halfStrokeWidth * halfStrokeWidth;\n\n const { x, x2, x3, y, y2, y3 } = this;\n\n if (squaredDistanceToLineSegment(pointX, pointY, x, y, x2, y3) <= halfStrokeWidthSquared\n || squaredDistanceToLineSegment(pointX, pointY, x2, y2, x3, y3) <= halfStrokeWidthSquared\n || squaredDistanceToLineSegment(pointX, pointY, x3, y3, x, y) <= halfStrokeWidthSquared)\n {\n return true;\n }\n\n return false;\n }\n\n /**\n * Creates a clone of this Triangle\n * @returns a copy of the triangle\n */\n public clone(): ShapePrimitive\n {\n const triangle = new Triangle(\n this.x,\n this.y,\n this.x2,\n this.y2,\n this.x3,\n this.y3\n );\n\n return triangle;\n }\n\n /**\n * Copies another triangle to this one.\n * @param triangle - The triangle to copy from.\n * @returns Returns itself.\n */\n public copyFrom(triangle: Triangle): this\n {\n this.x = triangle.x;\n this.y = triangle.y;\n this.x2 = triangle.x2;\n this.y2 = triangle.y2;\n this.x3 = triangle.x3;\n this.y3 = triangle.y3;\n\n return this;\n }\n\n /**\n * Copies this triangle to another one.\n * @param triangle - The triangle to copy to.\n * @returns Returns given parameter.\n */\n public copyTo(triangle: Triangle): Triangle\n {\n triangle.copyFrom(this);\n\n return triangle;\n }\n\n /**\n * Returns the framing rectangle of the triangle as a Rectangle object\n * @param out - optional rectangle to store the result\n * @returns The framing rectangle\n */\n public getBounds(out?: Rectangle): Rectangle\n {\n out = out || new Rectangle();\n\n const minX = Math.min(this.x, this.x2, this.x3);\n const maxX = Math.max(this.x, this.x2, this.x3);\n const minY = Math.min(this.y, this.y2, this.y3);\n const maxY = Math.max(this.y, this.y2, this.y3);\n\n out.x = minX;\n out.y = minY;\n out.width = maxX - minX;\n out.height = maxY - minY;\n\n return out;\n }\n}\n","import { Container } from '../scene/container/Container';\nimport { UPDATE_PRIORITY } from '../ticker/const';\nimport { Ticker } from '../ticker/Ticker';\n\nimport type { TextureSource } from '../rendering/renderers/shared/texture/sources/TextureSource';\nimport type { Texture } from '../rendering/renderers/shared/texture/Texture';\nimport type { Renderer } from '../rendering/renderers/types';\nimport type { GraphicsContext } from '../scene/graphics/shared/GraphicsContext';\nimport type { Text } from '../scene/text/Text';\n\n/** The accepted types to pass to the prepare system */\nexport type PrepareSourceItem = Container | TextureSource | Texture | GraphicsContext;\n\n/** The valid types resolved to the queue ready for upload */\nexport type PrepareQueueItem = TextureSource | Text | GraphicsContext;\n\n/**\n * Part of the prepare system. Responsible for uploading all the items to the GPU.\n * This class provides the base functionality and handles processing the queue asynchronously.\n * @memberof rendering\n */\nexport abstract class PrepareBase\n{\n /** The number of uploads to process per frame */\n public static uploadsPerFrame = 4;\n\n /** Reference to the renderer */\n protected renderer: Renderer;\n\n /** The queue to process over a async timer */\n protected queue: PrepareQueueItem[];\n\n /** Collection of callbacks to call when the uploads are finished */\n protected resolves: ((value: void | PromiseLike) => void)[];\n\n /** Timeout id for next processing call */\n protected timeout?: number;\n\n /**\n * * @param {Renderer} renderer - A reference to the current renderer\n * @param renderer\n */\n constructor(renderer: Renderer)\n {\n this.renderer = renderer;\n this.queue = [];\n this.resolves = [];\n }\n\n /** Resolve the given resource type and return an item for the queue */\n protected abstract resolveQueueItem(source: PrepareSourceItem, queue: PrepareQueueItem[]): void;\n protected abstract uploadQueueItem(item: PrepareQueueItem): void;\n\n /**\n * Return a copy of the queue\n * @returns {PrepareQueueItem[]} The queue\n */\n public getQueue(): PrepareQueueItem[]\n {\n return [...this.queue];\n }\n\n /**\n * Add a textures or graphics resource to the queue\n * @param {PrepareSourceItem | PrepareSourceItem[]} resource\n */\n public add(resource: PrepareSourceItem | PrepareSourceItem[]): this\n {\n const resourceArray = Array.isArray(resource) ? resource : [resource];\n\n for (const resourceItem of resourceArray)\n {\n // handle containers and their children\n if (resourceItem instanceof Container)\n {\n this._addContainer(resourceItem);\n }\n else\n {\n this.resolveQueueItem(resourceItem, this.queue);\n }\n }\n\n return this;\n }\n\n /**\n * Recursively add a container and its children to the queue\n * @param {Container} container - The container to add to the queue\n */\n private _addContainer(container: Container): void\n {\n this.resolveQueueItem(container, this.queue);\n\n // recursively add children\n for (const child of container.children)\n {\n this._addContainer(child);\n }\n }\n\n /**\n * Upload all the textures and graphics to the GPU (optionally add more resources to the queue first)\n * @param {PrepareSourceItem | PrepareSourceItem[] | undefined} resource\n */\n public upload(resource?: PrepareSourceItem | PrepareSourceItem[]): Promise\n {\n if (resource)\n {\n this.add(resource);\n }\n\n return new Promise((resolve) =>\n {\n if (this.queue.length)\n {\n // add resolve callback to the collection\n this.resolves.push(resolve);\n\n // eliminate duplicates first\n this.dedupeQueue();\n\n // launch first tick\n Ticker.system.addOnce(this._tick, this, UPDATE_PRIORITY.UTILITY);\n }\n else\n {\n // queue is empty, resolve immediately\n resolve();\n }\n });\n }\n\n /** eliminate duplicates before processing */\n public dedupeQueue(): void\n {\n const hash = Object.create(null);\n let nextUnique = 0;\n\n for (let i = 0; i < this.queue.length; i++)\n {\n const current = this.queue[i];\n\n if (!hash[current.uid])\n {\n hash[current.uid] = true;\n this.queue[nextUnique++] = current;\n }\n }\n\n this.queue.length = nextUnique;\n }\n\n /** called per frame by the ticker, defer processing to next tick */\n private readonly _tick = () =>\n {\n this.timeout = setTimeout(this._processQueue, 0) as unknown as number;\n };\n\n /** process the queue up to max item limit per frame */\n private readonly _processQueue = () =>\n {\n const { queue } = this;\n let itemsProcessed = 0;\n\n // process the maximum number of items per frame\n while (queue.length && itemsProcessed < PrepareBase.uploadsPerFrame)\n {\n const queueItem = queue.shift();\n\n this.uploadQueueItem(queueItem);\n\n itemsProcessed++;\n }\n\n if (queue.length)\n {\n // queue is not empty, continue processing on next frame\n Ticker.system.addOnce(this._tick, this, UPDATE_PRIORITY.UTILITY);\n }\n else\n {\n // queue is empty, resolve immediately\n this._resolve();\n }\n };\n\n /** Call all the resolve callbacks */\n private _resolve(): void\n {\n const { resolves } = this;\n\n // call all resolve callbacks\n const array = resolves.slice(0);\n\n resolves.length = 0;\n\n for (const resolve of array)\n {\n resolve();\n }\n }\n}\n","import { pointInTriangle } from '../../../maths/point/pointInTriangle';\nimport { Geometry } from '../../../rendering/renderers/shared/geometry/Geometry';\nimport { State } from '../../../rendering/renderers/shared/state/State';\nimport { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport { deprecation, v8_0_0 } from '../../../utils/logging/deprecation';\nimport { Container } from '../../container/Container';\nimport { MeshGeometry } from './MeshGeometry';\n\nimport type { PointData } from '../../../maths/point/PointData';\nimport type { Topology } from '../../../rendering/renderers/shared/geometry/const';\nimport type { Instruction } from '../../../rendering/renderers/shared/instructions/Instruction';\nimport type { Shader } from '../../../rendering/renderers/shared/shader/Shader';\nimport type { View } from '../../../rendering/renderers/shared/view/View';\nimport type { Bounds } from '../../container/bounds/Bounds';\nimport type { ContainerOptions } from '../../container/Container';\nimport type { DestroyOptions } from '../../container/destroyTypes';\n\nexport interface TextureShader extends Shader\n{\n texture: Texture;\n}\n\n/**\n * Constructor options used for `Mesh` instances. Extends {@link scene.MeshViewOptions}\n * ```js\n * const mesh = new Mesh({\n * texture: Texture.from('assets/image.png'),\n * geometry: new PlaneGeometry(),\n * shader: Shader.from(VERTEX, FRAGMENT),\n * });\n * ```\n * @see {@link scene.Mesh}\n * @see {@link scene.MeshViewOptions}\n * @memberof scene\n */\n\n/**\n * @memberof scene\n */\nexport interface MeshOptions<\n GEOMETRY extends Geometry = MeshGeometry,\n SHADER extends Shader = TextureShader\n> extends ContainerOptions\n{\n /**\n * Includes vertex positions, face indices, colors, UVs, and\n * custom attributes within buffers, reducing the cost of passing all\n * this data to the GPU. Can be shared between multiple Mesh objects.\n */\n geometry: GEOMETRY;\n /**\n * Represents the vertex and fragment shaders that processes the geometry and runs on the GPU.\n * Can be shared between multiple Mesh objects.\n */\n shader?: SHADER;\n /** The state of WebGL required to render the mesh. */\n state?: State;\n /** The texture that the Mesh uses. Null for non-MeshMaterial shaders */\n texture?: Texture;\n /** Whether or not to round the x/y position. */\n roundPixels?: boolean;\n}\n/**\n * Base mesh class.\n *\n * This class empowers you to have maximum flexibility to render any kind of WebGL/WebGPU visuals you can think of.\n * This class assumes a certain level of WebGL/WebGPU knowledge.\n * If you know a bit this should abstract enough away to make your life easier!\n *\n * Pretty much ALL WebGL/WebGPU can be broken down into the following:\n * - Geometry - The structure and data for the mesh. This can include anything from positions, uvs, normals, colors etc..\n * - Shader - This is the shader that PixiJS will render the geometry with (attributes in the shader must match the geometry)\n * - State - This is the state of WebGL required to render the mesh.\n *\n * Through a combination of the above elements you can render anything you want, 2D or 3D!\n * @memberof scene\n */\nexport class Mesh<\n GEOMETRY extends Geometry = MeshGeometry,\n SHADER extends Shader = TextureShader\n> extends Container implements View, Instruction\n{\n public readonly renderPipeId = 'mesh';\n public readonly canBundle = true;\n public state: State;\n\n /** @ignore */\n public _texture: Texture;\n /** @ignore */\n public _geometry: GEOMETRY;\n /** @ignore */\n public _shader?: SHADER;\n\n public _roundPixels: 0 | 1 = 0;\n\n /**\n * @param {scene.MeshOptions} options - options for the mesh instance\n */\n constructor(options: MeshOptions);\n /** @deprecated since 8.0.0 */\n constructor(geometry: GEOMETRY, shader: SHADER, state?: State, drawMode?: Topology);\n constructor(...args: [MeshOptions] | [GEOMETRY, SHADER, State?, Topology?])\n {\n let options = args[0];\n\n if (options instanceof Geometry)\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Mesh: use new Mesh({ geometry, shader }) instead');\n // #endif\n\n options = {\n geometry: options,\n shader: args[1],\n } as MeshOptions;\n\n if (args[3])\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Mesh: drawMode argument has been removed, use geometry.topology instead');\n // #endif\n\n options.geometry.topology = args[3];\n }\n }\n\n const { geometry, shader, texture, roundPixels, state, ...rest } = options;\n\n super({\n label: 'Mesh',\n ...rest\n });\n\n this.allowChildren = false;\n\n this.shader = shader;\n this.texture = texture ?? (shader as unknown as TextureShader)?.texture ?? Texture.WHITE;\n this.state = state ?? State.for2d();\n\n this._geometry = geometry;\n this._geometry.on('update', this.onViewUpdate, this);\n\n this.roundPixels = roundPixels ?? false;\n }\n\n /**\n * Whether or not to round the x/y position of the mesh.\n * @type {boolean}\n */\n get roundPixels()\n {\n return !!this._roundPixels;\n }\n\n set roundPixels(value: boolean)\n {\n this._roundPixels = value ? 1 : 0;\n }\n\n /** Alias for {@link scene.Mesh#shader}. */\n get material()\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'mesh.material property has been removed, use mesh.shader instead');\n // #endif\n\n return this._shader;\n }\n\n /**\n * Represents the vertex and fragment shaders that processes the geometry and runs on the GPU.\n * Can be shared between multiple Mesh objects.\n */\n set shader(value: SHADER)\n {\n if (this._shader === value) return;\n\n this._shader = value;\n this.onViewUpdate();\n }\n\n get shader()\n {\n return this._shader;\n }\n\n /**\n * Includes vertex positions, face indices, colors, UVs, and\n * custom attributes within buffers, reducing the cost of passing all\n * this data to the GPU. Can be shared between multiple Mesh objects.\n */\n set geometry(value: GEOMETRY)\n {\n if (this._geometry === value) return;\n\n this._geometry?.off('update', this.onViewUpdate, this);\n value.on('update', this.onViewUpdate, this);\n\n this._geometry = value;\n this.onViewUpdate();\n }\n\n get geometry()\n {\n return this._geometry;\n }\n\n /** The texture that the Mesh uses. Null for non-MeshMaterial shaders */\n set texture(value: Texture)\n {\n value ||= Texture.EMPTY;\n\n const currentTexture = this._texture;\n\n if (currentTexture === value) return;\n\n if (currentTexture && currentTexture.dynamic) currentTexture.off('update', this.onViewUpdate, this);\n if (value.dynamic) value.on('update', this.onViewUpdate, this);\n\n if (this.shader)\n {\n (this.shader as unknown as TextureShader).texture = value;\n }\n\n this._texture = value;\n this.onViewUpdate();\n }\n\n get texture()\n {\n return this._texture;\n }\n\n get batched()\n {\n if (this._shader) return false;\n\n if (this._geometry instanceof MeshGeometry)\n {\n if (this._geometry.batchMode === 'auto')\n {\n return this._geometry.positions.length / 2 <= 100;\n }\n\n return this._geometry.batchMode === 'batch';\n }\n\n return false;\n }\n\n /**\n * The local bounds of the mesh.\n * @type {rendering.Bounds}\n */\n get bounds()\n {\n return this._geometry.bounds;\n }\n\n /**\n * Adds the bounds of this object to the bounds object.\n * @param bounds - The output bounds object.\n */\n public addBounds(bounds: Bounds)\n {\n bounds.addBounds(this.geometry.bounds);\n }\n\n /**\n * Checks if the object contains the given point.\n * @param point - The point to check\n */\n public containsPoint(point: PointData)\n {\n const { x, y } = point;\n\n if (!this.bounds.containsPoint(x, y)) return false;\n\n const vertices = this.geometry.getBuffer('aPosition').data;\n\n const step = this.geometry.topology === 'triangle-strip' ? 3 : 1;\n\n if (this.geometry.getIndex())\n {\n const indices = this.geometry.getIndex().data;\n const len = indices.length;\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 if (pointInTriangle(\n x, y,\n vertices[ind0],\n vertices[ind0 + 1],\n vertices[ind1],\n vertices[ind1 + 1],\n vertices[ind2],\n vertices[ind2 + 1],\n ))\n {\n return true;\n }\n }\n }\n else\n {\n const len = vertices.length / 2; // Each vertex has 2 coordinates, x and y\n\n for (let i = 0; i + 2 < len; i += step)\n {\n const ind0 = i * 2;\n const ind1 = (i + 1) * 2;\n const ind2 = (i + 2) * 2;\n\n if (pointInTriangle(\n x, y,\n vertices[ind0],\n vertices[ind0 + 1],\n vertices[ind1],\n vertices[ind1 + 1],\n vertices[ind2],\n vertices[ind2 + 1],\n ))\n {\n return true;\n }\n }\n }\n\n return false;\n }\n\n /** @ignore */\n public onViewUpdate()\n {\n // increment from the 12th bit!\n this._didChangeId += 1 << 12;\n\n if (this.didViewUpdate) return;\n this.didViewUpdate = true;\n\n const renderGroup = this.renderGroup || this.parentRenderGroup;\n\n if (renderGroup)\n {\n renderGroup.onChildViewUpdate(this);\n }\n }\n\n /**\n * Destroys this sprite renderable and optionally its texture.\n * @param options - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.texture=false] - Should it destroy the current texture of the renderable as well\n * @param {boolean} [options.textureSource=false] - Should it destroy the textureSource of the renderable as well\n */\n public destroy(options?: DestroyOptions): void\n {\n super.destroy(options);\n\n const destroyTexture = typeof options === 'boolean' ? options : options?.texture;\n\n if (destroyTexture)\n {\n const destroyTextureSource = typeof options === 'boolean' ? options : options?.textureSource;\n\n this._texture.destroy(destroyTextureSource);\n }\n\n this._geometry?.off('update', this.onViewUpdate, this);\n\n this._texture = null;\n this._geometry = null;\n this._shader = null;\n }\n}\n","import { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport { UPDATE_PRIORITY } from '../../ticker/const';\nimport { Ticker } from '../../ticker/Ticker';\nimport { Sprite } from '../sprite/Sprite';\n\n/**\n * An AnimatedSprite is a simple way to display an animation depicted by a list of textures.\n *\n * ```js\n * import { AnimatedSprite, Texture } from 'pixi.js';\n *\n * const alienImages = [\n * 'image_sequence_01.png',\n * 'image_sequence_02.png',\n * 'image_sequence_03.png',\n * 'image_sequence_04.png',\n * ];\n * const textureArray = [];\n *\n * for (let i = 0; i < 4; i++)\n * {\n * const texture = Texture.from(alienImages[i]);\n * textureArray.push(texture);\n * }\n *\n * const animatedSprite = new AnimatedSprite(textureArray);\n * ```\n *\n * The more efficient and simpler way to create an animated sprite is using a {@link Spritesheet}\n * containing the animation definitions:\n * @example\n * import { AnimatedSprite, Assets } from 'pixi.js';\n *\n * const sheet = await Assets.load('assets/spritesheet.json');\n * animatedSprite = new AnimatedSprite(sheet.animations['image_sequence']);\n * @memberof scene\n */\nexport class AnimatedSprite extends Sprite\n{\n /**\n * The speed that the AnimatedSprite will play at. Higher is faster, lower is slower.\n * @default 1\n */\n public animationSpeed: number;\n\n /**\n * Whether or not the animate sprite repeats after playing.\n * @default true\n */\n public loop: boolean;\n\n /**\n * Update anchor to [Texture's defaultAnchor]{@link Texture#defaultAnchor} when frame changes.\n *\n * Useful with [sprite sheet animations]{@link 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 * @default false\n */\n public updateAnchor: boolean;\n\n /**\n * User-assigned function to call when an AnimatedSprite finishes playing.\n * @example\n * animation.onComplete = () => {\n * // Finished!\n * };\n */\n public onComplete?: () => void;\n\n /**\n * User-assigned function to call when an AnimatedSprite changes which texture is being rendered.\n * @example\n * animation.onFrameChange = () => {\n * // Updated!\n * };\n */\n public onFrameChange?: (currentFrame: number) => void;\n\n /**\n * User-assigned function to call when `loop` is true, and an AnimatedSprite is played and\n * loops around to start again.\n * @example\n * animation.onLoop = () => {\n * // Looped!\n * };\n */\n public onLoop?: () => void;\n\n private _playing: boolean;\n private _textures: Texture[];\n private _durations: number[];\n\n /**\n * `true` uses Ticker.shared to auto update animation time.\n * @default true\n */\n private _autoUpdate: boolean;\n\n /**\n * `true` if the instance is currently connected to Ticker.shared to auto update animation time.\n * @default false\n */\n private _isConnectedToTicker: boolean;\n\n /** Elapsed time since animation has been started, used internally to display current texture. */\n private _currentTime: number;\n\n /** The texture index that was displayed last time. */\n private _previousFrame: number;\n\n /**\n * @param textures - An array of {@link Texture} or frame\n * objects that make up the animation.\n * @param {boolean} [autoUpdate=true] - Whether to use Ticker.shared to auto update animation time.\n */\n constructor(textures: Texture[] | FrameObject[], autoUpdate = true)\n {\n super(textures[0] instanceof Texture ? textures[0] : textures[0].texture);\n\n this._textures = null;\n this._durations = null;\n this._autoUpdate = autoUpdate;\n this._isConnectedToTicker = false;\n\n this.animationSpeed = 1;\n this.loop = true;\n this.updateAnchor = false;\n this.onComplete = null;\n this.onFrameChange = null;\n this.onLoop = null;\n\n this._currentTime = 0;\n\n this._playing = false;\n this._previousFrame = null;\n\n this.textures = textures;\n }\n\n /** Stops the AnimatedSprite. */\n public stop(): void\n {\n if (!this._playing)\n {\n return;\n }\n\n this._playing = false;\n if (this._autoUpdate && this._isConnectedToTicker)\n {\n Ticker.shared.remove(this.update, this);\n this._isConnectedToTicker = false;\n }\n }\n\n /** Plays the AnimatedSprite. */\n public play(): void\n {\n if (this._playing)\n {\n return;\n }\n\n this._playing = true;\n if (this._autoUpdate && !this._isConnectedToTicker)\n {\n Ticker.shared.add(this.update, this, UPDATE_PRIORITY.HIGH);\n this._isConnectedToTicker = true;\n }\n }\n\n /**\n * Stops the AnimatedSprite and goes to a specific frame.\n * @param frameNumber - Frame index to stop at.\n */\n public gotoAndStop(frameNumber: number): void\n {\n this.stop();\n this.currentFrame = frameNumber;\n }\n\n /**\n * Goes to a specific frame and begins playing the AnimatedSprite.\n * @param frameNumber - Frame index to start at.\n */\n public gotoAndPlay(frameNumber: number): void\n {\n this.currentFrame = frameNumber;\n this.play();\n }\n\n /**\n * Updates the object transform for rendering.\n * @param ticker - the ticker to use to update the object.\n */\n public update(ticker: Ticker): void\n {\n // If the animation isn't playing, no update is needed.\n if (!this._playing)\n {\n return;\n }\n\n // Calculate elapsed time based on ticker's deltaTime and animation speed.\n const deltaTime = ticker.deltaTime;\n const elapsed = this.animationSpeed * deltaTime;\n const previousFrame = this.currentFrame;\n\n // If there are specific durations set for each frame:\n if (this._durations !== null)\n {\n // Calculate the lag for the current frame based on the current time.\n let lag = this._currentTime % 1 * this._durations[this.currentFrame];\n\n // Adjust the lag based on elapsed time.\n lag += elapsed / 60 * 1000;\n\n // If the lag is negative, adjust the current time and the lag.\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 // Floor the current time to get a whole number frame.\n this._currentTime = Math.floor(this._currentTime);\n\n // Adjust the current time and the lag until the lag is less than the current frame's duration.\n while (lag >= this._durations[this.currentFrame])\n {\n lag -= this._durations[this.currentFrame] * sign;\n this._currentTime += sign;\n }\n\n // Adjust the current time based on the lag and current frame's duration.\n this._currentTime += lag / this._durations[this.currentFrame];\n }\n else\n {\n // If no specific durations set, simply adjust the current time by elapsed time.\n this._currentTime += elapsed;\n }\n\n // Handle scenarios when animation reaches the start or the end.\n if (this._currentTime < 0 && !this.loop)\n {\n // If the animation shouldn't loop and it reaches the start, go to the first frame.\n this.gotoAndStop(0);\n\n // If there's an onComplete callback, call it.\n if (this.onComplete)\n {\n this.onComplete();\n }\n }\n else if (this._currentTime >= this._textures.length && !this.loop)\n {\n // If the animation shouldn't loop and it reaches the end, go to the last frame.\n this.gotoAndStop(this._textures.length - 1);\n\n // If there's an onComplete callback, call it.\n if (this.onComplete)\n {\n this.onComplete();\n }\n }\n else if (previousFrame !== this.currentFrame)\n {\n // If the current frame is different from the last update, handle loop scenarios.\n if (this.loop && this.onLoop)\n {\n if ((this.animationSpeed > 0 && this.currentFrame < previousFrame)\n || (this.animationSpeed < 0 && this.currentFrame > previousFrame))\n {\n // If the animation loops, and there's an onLoop callback, call it.\n this.onLoop();\n }\n }\n\n // Update the texture for the current frame.\n this._updateTexture();\n }\n }\n\n /** Updates the displayed texture to match the current frame index. */\n private _updateTexture(): void\n {\n const currentFrame = this.currentFrame;\n\n if (this._previousFrame === currentFrame)\n {\n return;\n }\n\n this._previousFrame = currentFrame;\n\n this.texture = this._textures[currentFrame];\n\n if (this.updateAnchor)\n {\n this.anchor.copyFrom(this.texture.defaultAnchor);\n }\n\n if (this.onFrameChange)\n {\n this.onFrameChange(this.currentFrame);\n }\n }\n\n /** Stops the AnimatedSprite and destroys it. */\n public destroy(): void\n {\n this.stop();\n super.destroy();\n\n this.onComplete = null;\n this.onFrameChange = null;\n this.onLoop = null;\n }\n\n /**\n * A short hand way of creating an AnimatedSprite from an array of frame ids.\n * @param frames - The array of frames ids the AnimatedSprite will use as its texture frames.\n * @returns - The new animated sprite with the specified frames.\n */\n public static fromFrames(frames: string[]): AnimatedSprite\n {\n const textures = [];\n\n for (let i = 0; i < frames.length; ++i)\n {\n textures.push(Texture.from(frames[i]));\n }\n\n return new AnimatedSprite(textures);\n }\n\n /**\n * A short hand way of creating an AnimatedSprite from an array of image ids.\n * @param images - The array of image urls the AnimatedSprite will use as its texture frames.\n * @returns The new animate sprite with the specified images as frames.\n */\n public static fromImages(images: string[]): AnimatedSprite\n {\n const textures = [];\n\n for (let i = 0; i < images.length; ++i)\n {\n textures.push(Texture.from(images[i]));\n }\n\n return new AnimatedSprite(textures);\n }\n\n /**\n * The total number of frames in the AnimatedSprite. This is the same as number of textures\n * assigned to the AnimatedSprite.\n * @readonly\n * @default 0\n */\n get totalFrames(): number\n {\n return this._textures.length;\n }\n\n /** The array of textures used for this AnimatedSprite. */\n get textures(): Texture[] | FrameObject[]\n {\n return this._textures;\n }\n\n set textures(value: Texture[] | FrameObject[])\n {\n if (value[0] instanceof Texture)\n {\n this._textures = value as Texture[];\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] as FrameObject).texture);\n this._durations.push((value[i] as FrameObject).time);\n }\n }\n this._previousFrame = null;\n this.gotoAndStop(0);\n this._updateTexture();\n }\n\n /** The AnimatedSprite's current frame index. */\n get currentFrame(): number\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 set currentFrame(value: number)\n {\n if (value < 0 || value > this.totalFrames - 1)\n {\n throw new Error(`[AnimatedSprite]: Invalid frame index value ${value}, `\n + `expected to be between 0 and totalFrames ${this.totalFrames}.`);\n }\n\n const previousFrame = this.currentFrame;\n\n this._currentTime = value;\n\n if (previousFrame !== this.currentFrame)\n {\n this._updateTexture();\n }\n }\n\n /**\n * Indicates if the AnimatedSprite is currently playing.\n * @readonly\n */\n get playing(): boolean\n {\n return this._playing;\n }\n\n /** Whether to use Ticker.shared to auto update animation time. */\n get autoUpdate(): boolean\n {\n return this._autoUpdate;\n }\n\n set autoUpdate(value: boolean)\n {\n if (value !== this._autoUpdate)\n {\n this._autoUpdate = value;\n\n if (!this._autoUpdate && this._isConnectedToTicker)\n {\n Ticker.shared.remove(this.update, this);\n this._isConnectedToTicker = false;\n }\n else if (this._autoUpdate && !this._isConnectedToTicker && this._playing)\n {\n Ticker.shared.add(this.update, this);\n this._isConnectedToTicker = true;\n }\n }\n }\n}\n\n/**\n * A reference to a frame in an {@link scene.AnimatedSprite}\n * @memberof scene\n */\nexport interface FrameObject\n{\n /** The {@link Texture} of the frame. */\n texture: Texture;\n\n /** The duration of the frame, in milliseconds. */\n time: number;\n}\n","import { Matrix } from '../../maths/matrix/Matrix';\nimport { ObservablePoint } from '../../maths/point/ObservablePoint';\n\nimport type { Observer } from '../../maths/point/ObservablePoint';\n\n/**\n * Options for the {@link utils.Transform} constructor.\n * @memberof utils.Transform\n */\nexport interface TransformOptions\n{\n /** The matrix to use. */\n matrix?: Matrix;\n /** The observer to use. */\n observer?: {_onUpdate: (transform: Transform) => void}\n}\n\n/**\n * The Transform class facilitates the manipulation of a 2D transformation matrix through\n * user-friendly properties: position, scale, rotation, skew, and pivot.\n * @memberof utils\n */\nexport class Transform\n{\n /**\n * The local transformation matrix.\n * @internal\n * @private\n */\n public _matrix: Matrix;\n\n /** The coordinate of the object relative to the local coordinates of the parent. */\n public position: ObservablePoint;\n\n /** The scale factor of the object. */\n public scale: ObservablePoint;\n\n /** The pivot point of the container that it rotates around. */\n public pivot: ObservablePoint;\n\n /** The skew amount, on the x and y axis. */\n public skew: ObservablePoint;\n\n /** The rotation amount. */\n protected _rotation: number;\n\n /**\n * The X-coordinate value of the normalized local X axis,\n * the first column of the local transformation matrix without a scale.\n */\n protected _cx: number;\n\n /**\n * The Y-coordinate value of the normalized local X axis,\n * the first column of the local transformation matrix without a scale.\n */\n protected _sx: number;\n\n /**\n * The X-coordinate value of the normalized local Y axis,\n * the second column of the local transformation matrix without a scale.\n */\n protected _cy: number;\n\n /**\n * The Y-coordinate value of the normalized local Y axis,\n * the second column of the local transformation matrix without a scale.\n */\n protected _sy: number;\n\n protected dirty = true;\n protected observer: Observer;\n\n /**\n * @param options - Options for the transform.\n * @param options.matrix - The matrix to use.\n * @param options.observer - The observer to use.\n */\n constructor({ matrix, observer }: TransformOptions = {})\n {\n this._matrix = matrix ?? new Matrix();\n this.observer = observer;\n\n this.position = new ObservablePoint(this, 0, 0);\n this.scale = new ObservablePoint(this, 1, 1);\n this.pivot = new ObservablePoint(this, 0, 0);\n this.skew = new ObservablePoint(this, 0, 0);\n\n this._rotation = 0;\n this._cx = 1;\n this._sx = 0;\n this._cy = 0;\n this._sy = 1;\n }\n\n /**\n * This matrix is computed by combining this Transforms position, scale, rotation, skew, and pivot\n * properties into a single matrix.\n * @readonly\n */\n get matrix(): Matrix\n {\n const lt = this._matrix;\n\n if (!this.dirty) return lt;\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 this.dirty = false;\n\n return lt;\n }\n /**\n * Called when a value changes.\n * @param point\n * @internal\n * @private\n */\n public _onUpdate(point?: ObservablePoint): void\n {\n this.dirty = true;\n\n if (point === this.skew)\n {\n this.updateSkew();\n }\n\n this.observer?._onUpdate(this);\n }\n\n /** Called when the skew or the rotation changes. */\n protected updateSkew(): void\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.dirty = true;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:Transform `\n + `position=(${this.position.x}, ${this.position.y}) `\n + `rotation=${this.rotation} `\n + `scale=(${this.scale.x}, ${this.scale.y}) `\n + `skew=(${this.skew.x}, ${this.skew.y}) `\n + `]`;\n }\n // #endif\n\n /**\n * Decomposes a matrix and sets the transforms properties based on it.\n * @param matrix - The matrix to decompose\n */\n public setFromMatrix(matrix: Matrix): void\n {\n matrix.decompose(this);\n this.dirty = true;\n }\n\n /** The rotation of the object in radians. */\n get rotation(): number\n {\n return this._rotation;\n }\n\n set rotation(value: number)\n {\n if (this._rotation !== value)\n {\n this._rotation = value;\n this._onUpdate(this.skew);\n }\n }\n}\n","import { Cache } from '../../assets/cache/Cache';\nimport { ObservablePoint } from '../../maths/point/ObservablePoint';\nimport { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport { deprecation, v8_0_0 } from '../../utils/logging/deprecation';\nimport { Transform } from '../../utils/misc/Transform';\nimport { Container } from '../container/Container';\n\nimport type { PointData } from '../../maths/point/PointData';\nimport type { Instruction } from '../../rendering/renderers/shared/instructions/Instruction';\nimport type { View } from '../../rendering/renderers/shared/view/View';\nimport type { Bounds, BoundsData } from '../container/bounds/Bounds';\nimport type { ContainerOptions } from '../container/Container';\nimport type { DestroyOptions } from '../container/destroyTypes';\n\n/**\n * Constructor options used for `TilingSprite` instances. Extends {@link scene.TilingSpriteViewOptions}\n * ```js\n * const tilingSprite = new TilingSprite({\n * texture: Texture.from('assets/image.png'),\n * width: 100,\n * height: 100,\n * tilePosition: { x: 100, y: 100 },\n * tileScale: { x: 2, y: 2 },\n * });\n * ```\n * @see {@link scene.TilingSprite}\n * @see {@link scene.TilingSpriteViewOptions}\n * @memberof scene\n */\nexport interface TilingSpriteOptions extends ContainerOptions\n{\n /**\n * The anchor point of the sprite\n * @default {x: 0, y: 0}\n */\n anchor?: PointData\n /**\n * The offset of the image that is being tiled.\n * @default {x: 0, y: 0}\n */\n tilePosition?: PointData\n /**\n * Scaling of the image that is being tiled.\n * @default {x: 1, y: 1}\n */\n tileScale?: PointData\n /**\n * The rotation of the image that is being tiled.\n * @default 0\n */\n tileRotation?: number\n /**\n * The texture to use for the sprite.\n * @default Texture.WHITE\n */\n texture?: Texture\n /**\n * The width of the tiling sprite. #\n * @default 256\n */\n width?: number\n /**\n * The height of the tiling sprite.\n * @default 256\n */\n height?: number\n // TODO needs a better name..\n /**\n * @todo\n * @default false\n */\n applyAnchorToTexture?: boolean\n /** Whether or not to round the x/y position. */\n roundPixels?: boolean;\n}\n\n/**\n * A tiling sprite is a fast way of rendering a tiling image.\n * @example\n * const tilingSprite = new TilingSprite({\n * texture: Texture.from('assets/image.png'),\n * width: 100,\n * height: 100,\n * });\n *\n * tilingSprite.tilePosition.x = 100;\n * tilingSprite.tilePosition.y = 100;\n *\n * app.stage.addChild(tilingSprite);\n * @memberof scene\n * @extends scene.Container\n */\nexport class TilingSprite extends Container implements View, Instruction\n{\n /**\n * Creates a new tiling sprite.\n * @param source - The source to create the texture from.\n * @param options - The options for creating the tiling sprite.\n * @returns A new tiling sprite.\n */\n public static from(source: Texture | string, options: TilingSpriteOptions = {})\n {\n if (typeof source === 'string')\n {\n return new TilingSprite({\n texture: Cache.get(source),\n ...options,\n });\n }\n\n return new TilingSprite({\n texture: source,\n ...options,\n });\n }\n\n /** default options for the TilingSprite */\n public static defaultOptions: TilingSpriteOptions = {\n /** The texture to use for the sprite. */\n texture: Texture.EMPTY,\n /** The anchor point of the sprite */\n anchor: { x: 0, y: 0 },\n /** The offset of the image that is being tiled. */\n tilePosition: { x: 0, y: 0 },\n /** Scaling of the image that is being tiled. */\n tileScale: { x: 1, y: 1 },\n /** The rotation of the image that is being tiled. */\n tileRotation: 0,\n /** TODO */\n applyAnchorToTexture: false,\n };\n\n public readonly renderPipeId = 'tilingSprite';\n public readonly canBundle = true;\n public readonly batched = true;\n\n public _anchor: ObservablePoint;\n\n public _tileTransform: Transform;\n public _texture: Texture;\n public _applyAnchorToTexture: boolean;\n public _didTilingSpriteUpdate: boolean;\n\n public _roundPixels: 0 | 1 = 0;\n\n private _bounds: BoundsData = { minX: 0, maxX: 1, minY: 0, maxY: 0 };\n private _boundsDirty = true;\n private _width: number;\n private _height: number;\n\n /**\n * @param {rendering.Texture | scene.TilingSpriteOptions} options - The options for creating the tiling sprite.\n */\n constructor(options?: Texture | TilingSpriteOptions);\n /** @deprecated since 8.0.0 */\n constructor(texture: Texture, width: number, height: number);\n constructor(...args: [(Texture | TilingSpriteOptions)?] | [Texture, number, number])\n {\n let options = args[0] || {};\n\n if (options instanceof Texture)\n {\n options = { texture: options };\n }\n\n if (args.length > 1)\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'use new TilingSprite({ texture, width:100, height:100 }) instead');\n // #endif\n\n options.width = args[1];\n options.height = args[2];\n }\n\n options = { ...TilingSprite.defaultOptions, ...options };\n\n const {\n texture,\n anchor,\n tilePosition,\n tileScale,\n tileRotation,\n width,\n height,\n applyAnchorToTexture,\n roundPixels,\n ...rest\n } = options ?? {};\n\n super({\n\n label: 'TilingSprite',\n ...rest\n });\n\n this.allowChildren = false;\n\n this._anchor = new ObservablePoint(\n {\n _onUpdate: () =>\n {\n this.onViewUpdate();\n }\n },\n );\n\n this._applyAnchorToTexture = applyAnchorToTexture;\n\n this.texture = texture;\n this._width = width ?? texture.width;\n this._height = height ?? texture.height;\n\n this._tileTransform = new Transform({\n observer: {\n _onUpdate: () => this.onViewUpdate(),\n }\n });\n\n if (anchor) this.anchor = anchor;\n this.tilePosition = tilePosition;\n this.tileScale = tileScale;\n this.tileRotation = tileRotation;\n\n this.roundPixels = roundPixels ?? false;\n }\n\n /**\n * Changes frame clamping in corresponding textureMatrix\n * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas\n * @default 0.5\n * @member {number}\n */\n get clampMargin()\n {\n return this._texture.textureMatrix.clampMargin;\n }\n\n set clampMargin(value: number)\n {\n this._texture.textureMatrix.clampMargin = value;\n }\n\n /**\n * The anchor sets the origin point of the sprite. The default value is taken from the {@link Texture}\n * and passed to the constructor.\n *\n * The default is `(0,0)`, this means the sprite's origin is the top left.\n *\n * Setting the anchor to `(0.5,0.5)` means the sprite's origin is centered.\n *\n * Setting the anchor to `(1,1)` would mean the sprite's origin point will be the bottom right corner.\n *\n * If you pass only single parameter, it will set both x and y to the same value as shown in the example below.\n * @example\n * import { TilingSprite } from 'pixi.js';\n *\n * const sprite = new TilingSprite({texture: Texture.WHITE});\n * sprite.anchor.set(0.5); // This will set the origin to center. (0.5) is same as (0.5, 0.5).\n */\n get anchor(): ObservablePoint\n {\n return this._anchor;\n }\n\n set anchor(value: PointData | number)\n {\n typeof value === 'number' ? this._anchor.set(value) : this._anchor.copyFrom(value);\n }\n\n /** The offset of the image that is being tiled. */\n get tilePosition(): ObservablePoint\n {\n return this._tileTransform.position;\n }\n\n set tilePosition(value: PointData)\n {\n this._tileTransform.position.copyFrom(value);\n }\n\n /** The scaling of the image that is being tiled. */\n get tileScale(): ObservablePoint\n {\n return this._tileTransform.scale;\n }\n\n set tileScale(value: PointData | number)\n {\n typeof value === 'number' ? this._tileTransform.scale.set(value) : this._tileTransform.scale.copyFrom(value);\n }\n\n set tileRotation(value)\n {\n this._tileTransform.rotation = value;\n }\n\n /** The rotation of the image that is being tiled. */\n get tileRotation()\n {\n return this._tileTransform.rotation;\n }\n\n /** The transform of the image that is being tiled. */\n get tileTransform()\n {\n return this._tileTransform;\n }\n\n /**\n * Whether or not to round the x/y position of the sprite.\n * @type {boolean}\n */\n get roundPixels()\n {\n return !!this._roundPixels;\n }\n\n set roundPixels(value: boolean)\n {\n this._roundPixels = value ? 1 : 0;\n }\n\n /**\n * The local bounds of the sprite.\n * @type {rendering.Bounds}\n */\n get bounds()\n {\n if (this._boundsDirty)\n {\n this._updateBounds();\n this._boundsDirty = false;\n }\n\n return this._bounds;\n }\n\n set texture(value: Texture)\n {\n value ||= Texture.EMPTY;\n\n const currentTexture = this._texture;\n\n if (currentTexture === value) return;\n\n if (currentTexture && currentTexture.dynamic) currentTexture.off('update', this.onViewUpdate, this);\n if (value.dynamic) value.on('update', this.onViewUpdate, this);\n\n this._texture = value;\n\n this.onViewUpdate();\n }\n\n /** The texture that the sprite is using. */\n get texture()\n {\n return this._texture;\n }\n\n /** The width of the tiling area. */\n set width(value: number)\n {\n this._width = value;\n this.onViewUpdate();\n }\n\n get width()\n {\n return this._width;\n }\n\n set height(value: number)\n {\n this._height = value;\n this.onViewUpdate();\n }\n\n /** The height of the tiling area. */\n get height()\n {\n return this._height;\n }\n\n private _updateBounds()\n {\n const bounds = this._bounds;\n\n const anchor = this._anchor;\n\n const width = this._width;\n const height = this._height;\n\n bounds.maxX = -anchor._x * width;\n bounds.minX = bounds.maxX + width;\n\n bounds.maxY = -anchor._y * height;\n bounds.minY = bounds.maxY + height;\n }\n\n /**\n * Adds the bounds of this object to the bounds object.\n * @param bounds - The output bounds object.\n */\n public addBounds(bounds: Bounds)\n {\n const _bounds = this.bounds;\n\n bounds.addFrame(\n _bounds.minX,\n _bounds.minY,\n _bounds.maxX,\n _bounds.maxY,\n );\n }\n\n /**\n * Checks if the object contains the given point.\n * @param point - The point to check\n */\n public containsPoint(point: PointData)\n {\n const width = this._width;\n const height = this._height;\n const x1 = -width * this._anchor._x;\n let y1 = 0;\n\n if (point.x >= x1 && point.x <= x1 + width)\n {\n y1 = -height * this._anchor._y;\n\n if (point.y >= y1 && point.y <= y1 + height) return true;\n }\n\n return false;\n }\n\n public onViewUpdate()\n {\n this._boundsDirty = true;\n this._didTilingSpriteUpdate = true;\n\n this._didChangeId += 1 << 12;\n\n if (this.didViewUpdate) return;\n this.didViewUpdate = true;\n\n const renderGroup = this.renderGroup || this.parentRenderGroup;\n\n if (renderGroup)\n {\n renderGroup.onChildViewUpdate(this);\n }\n }\n\n /**\n * Destroys this sprite renderable and optionally its texture.\n * @param options - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.texture=false] - Should it destroy the current texture of the renderable as well\n * @param {boolean} [options.textureSource=false] - Should it destroy the textureSource of the renderable as well\n */\n public destroy(options: DestroyOptions = false)\n {\n super.destroy(options);\n\n this._anchor = null;\n this._tileTransform = null;\n this._bounds = null;\n\n const destroyTexture = typeof options === 'boolean' ? options : options?.texture;\n\n if (destroyTexture)\n {\n const destroyTextureSource = typeof options === 'boolean' ? options : options?.textureSource;\n\n this._texture.destroy(destroyTextureSource);\n }\n\n this._texture = null;\n }\n}\n\n","import { ObservablePoint } from '../../maths/point/ObservablePoint';\nimport { deprecation, v8_0_0 } from '../../utils/logging/deprecation';\nimport { Bounds } from '../container/bounds/Bounds';\nimport { Container } from '../container/Container';\n\nimport type { Size } from '../../maths/misc/Size';\nimport type { PointData } from '../../maths/point/PointData';\nimport type { View } from '../../rendering/renderers/shared/view/View';\nimport type { ContainerOptions } from '../container/Container';\nimport type { Optional } from '../container/container-mixins/measureMixin';\nimport type { DestroyOptions } from '../container/destroyTypes';\nimport type { HTMLTextStyle, HTMLTextStyleOptions } from '../text-html/HtmlTextStyle';\nimport type { TextStyle, TextStyleOptions } from './TextStyle';\n\n/**\n * A string or number that can be used as text.\n * @memberof text\n */\nexport type TextString = string | number | { toString: () => string };\n/**\n * A union of all text styles, including HTML, Bitmap and Canvas text styles.\n * @memberof text\n * @see text.TextStyle\n * @see text.HTMLTextStyle\n */\nexport type AnyTextStyle = TextStyle | HTMLTextStyle;\n/**\n * A union of all text style options, including HTML, Bitmap and Canvas text style options.\n * @memberof text\n * @see text.TextStyleOptions\n * @see text.HTMLTextStyleOptions\n */\nexport type AnyTextStyleOptions = TextStyleOptions | HTMLTextStyleOptions;\n\n/**\n * Options for the {@link scene.Text} class.\n * @example\n * const text = new Text({\n * text: 'Hello Pixi!',\n * style: {\n * fontFamily: 'Arial',\n * fontSize: 24,\n * fill: 0xff1010,\n * align: 'center',\n * }\n * });\n * @memberof text\n */\nexport interface TextOptions<\n TEXT_STYLE extends TextStyle = TextStyle,\n TEXT_STYLE_OPTIONS extends TextStyleOptions = TextStyleOptions,\n> extends ContainerOptions\n{\n /** The anchor point of the text. */\n anchor?: PointData | number;\n /** The copy for the text object. To split a line you can use '\\n'. */\n text?: TextString;\n /** The resolution of the text. */\n resolution?: number;\n /**\n * The text style\n * @type {\n * text.TextStyle |\n * Partial |\n * text.TextStyleOptions |\n * text.HTMLTextStyle |\n * Partial |\n * text.HTMLTextStyleOptions\n * }\n */\n style?: TEXT_STYLE | TEXT_STYLE_OPTIONS;\n /** Whether or not to round the x/y position. */\n roundPixels?: boolean;\n}\n\n/**\n * An abstract Text class, used by all text type in Pixi. This includes Canvas, HTML, and Bitmap Text.\n * @see scene.Text\n * @see scene.BitmapText\n * @see scene.HTMLText\n * @memberof scene\n */\nexport abstract class AbstractText<\n TEXT_STYLE extends TextStyle = TextStyle,\n TEXT_STYLE_OPTIONS extends TextStyleOptions = TextStyleOptions,\n> extends Container implements View\n{\n public abstract readonly renderPipeId: string;\n public batched = true;\n public _anchor: ObservablePoint;\n\n public _resolution: number = null;\n public _autoResolution: boolean = true;\n\n public _style: TEXT_STYLE;\n public _didTextUpdate = true;\n public _roundPixels: 0 | 1 = 0;\n\n protected _bounds: Bounds = new Bounds();\n protected _boundsDirty = true;\n protected _text: string;\n private readonly _styleClass: new (options: TEXT_STYLE_OPTIONS) => TEXT_STYLE;\n\n constructor(\n options: TextOptions,\n styleClass: new (options: TEXT_STYLE_OPTIONS) => TEXT_STYLE\n )\n {\n const { text, resolution, style, anchor, width, height, roundPixels, ...rest } = options;\n\n super({\n ...rest\n });\n\n this._styleClass = styleClass;\n\n this.text = text ?? '';\n\n this.style = style;\n\n this.resolution = resolution ?? null;\n\n this.allowChildren = false;\n\n this._anchor = new ObservablePoint(\n {\n _onUpdate: () =>\n {\n this.onViewUpdate();\n },\n },\n );\n\n if (anchor) this.anchor = anchor;\n this.roundPixels = roundPixels ?? false;\n\n // needs to be set after the container has initiated\n if (width) this.width = width;\n if (height) this.height = height;\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 *\n * Setting the anchor to `(0.5,0.5)` means the text's origin is centered.\n *\n * Setting the anchor to `(1,1)` would mean the text's origin point will be the bottom right corner.\n *\n * If you pass only single parameter, it will set both x and y to the same value as shown in the example below.\n * @example\n * import { Text } from 'pixi.js';\n *\n * const text = new Text('hello world');\n * text.anchor.set(0.5); // This will set the origin to center. (0.5) is same as (0.5, 0.5).\n */\n get anchor(): ObservablePoint\n {\n return this._anchor;\n }\n\n set anchor(value: PointData | number)\n {\n typeof value === 'number' ? this._anchor.set(value) : this._anchor.copyFrom(value);\n }\n\n /**\n * Whether or not to round the x/y position of the text.\n * @type {boolean}\n */\n get roundPixels()\n {\n return !!this._roundPixels;\n }\n\n set roundPixels(value: boolean)\n {\n this._roundPixels = value ? 1 : 0;\n }\n\n /** Set the copy for the text object. To split a line you can use '\\n'. */\n set text(value: TextString)\n {\n // check its a string\n value = value.toString();\n\n if (this._text === value) return;\n\n this._text = value as string;\n this.onViewUpdate();\n }\n\n get text(): string\n {\n return this._text;\n }\n\n /**\n * The resolution / device pixel ratio of the canvas.\n * @default 1\n */\n set resolution(value: number)\n {\n this._autoResolution = value === null;\n this._resolution = value;\n this.onViewUpdate();\n }\n\n get resolution(): number\n {\n return this._resolution;\n }\n\n get style(): TEXT_STYLE\n {\n return this._style;\n }\n\n /**\n * Set the style of the text.\n *\n * Set up an event listener to listen for changes on the style object and mark the text as dirty.\n *\n * If setting the `style` can also be partial {@link AnyTextStyleOptions}.\n * @type {\n * text.TextStyle |\n * Partial |\n * text.TextStyleOptions |\n * text.HTMLTextStyle |\n * Partial |\n * text.HTMLTextStyleOptions\n * }\n */\n set style(style: TEXT_STYLE | Partial | TEXT_STYLE_OPTIONS)\n {\n style = style || {};\n\n this._style?.off('update', this.onViewUpdate, this);\n\n if (style instanceof this._styleClass)\n {\n this._style = style as TEXT_STYLE;\n }\n else\n {\n this._style = new this._styleClass(style as TEXT_STYLE_OPTIONS);\n }\n\n this._style.on('update', this.onViewUpdate, this);\n this.onViewUpdate();\n }\n\n /**\n * The local bounds of the Text.\n * @type {rendering.Bounds}\n */\n get bounds()\n {\n if (this._boundsDirty)\n {\n this._updateBounds();\n this._boundsDirty = false;\n }\n\n return this._bounds;\n }\n\n /** The width of the sprite, setting this will actually modify the scale to achieve the value set. */\n override get width(): number\n {\n return Math.abs(this.scale.x) * this.bounds.width;\n }\n\n override set width(value: number)\n {\n this._setWidth(value, this.bounds.width);\n }\n\n /** The height of the sprite, setting this will actually modify the scale to achieve the value set. */\n override get height(): number\n {\n return Math.abs(this.scale.y) * this.bounds.height;\n }\n\n override set height(value: number)\n {\n this._setHeight(value, this.bounds.height);\n }\n\n /**\n * Retrieves the size of the Text as a [Size]{@link Size} object.\n * This is faster than get the width and height separately.\n * @param out - Optional object to store the size in.\n * @returns - The size of the Text.\n */\n public override getSize(out?: Size): Size\n {\n if (!out)\n {\n out = {} as Size;\n }\n\n out.width = Math.abs(this.scale.x) * this.bounds.width;\n out.height = Math.abs(this.scale.y) * this.bounds.height;\n\n return out;\n }\n\n /**\n * Sets the size of the Text to the specified width and height.\n * This is faster than setting the width and height separately.\n * @param value - This can be either a number or a [Size]{@link Size} object.\n * @param height - The height to set. Defaults to the value of `width` if not provided.\n */\n public override setSize(value: number | Optional, height?: number)\n {\n let convertedWidth: number;\n let convertedHeight: number;\n\n if (typeof value !== 'object')\n {\n convertedWidth = value;\n convertedHeight = height ?? value;\n }\n else\n {\n convertedWidth = value.width;\n convertedHeight = value.height ?? value.width;\n }\n\n if (convertedWidth !== undefined)\n {\n this._setWidth(convertedWidth, this.bounds.width);\n }\n\n if (convertedHeight !== undefined)\n {\n this._setHeight(convertedHeight, this.bounds.height);\n }\n }\n\n /**\n * Adds the bounds of this text to the bounds object.\n * @param bounds - The output bounds object.\n */\n public addBounds(bounds: Bounds)\n {\n const _bounds = this.bounds;\n\n bounds.addFrame(\n _bounds.minX,\n _bounds.minY,\n _bounds.maxX,\n _bounds.maxY,\n );\n }\n\n /**\n * Checks if the text contains the given point.\n * @param point - The point to check\n */\n public containsPoint(point: PointData)\n {\n const width = this.bounds.width;\n const height = this.bounds.height;\n\n const x1 = -width * this.anchor.x;\n let y1 = 0;\n\n if (point.x >= x1 && point.x <= x1 + width)\n {\n y1 = -height * this.anchor.y;\n\n if (point.y >= y1 && point.y <= y1 + height) return true;\n }\n\n return false;\n }\n\n public onViewUpdate()\n {\n this._didChangeId += 1 << 12;\n this._boundsDirty = true;\n\n if (this.didViewUpdate) return;\n this.didViewUpdate = true;\n\n this._didTextUpdate = true;\n\n const renderGroup = this.renderGroup || this.parentRenderGroup;\n\n if (renderGroup)\n {\n renderGroup.onChildViewUpdate(this);\n }\n }\n\n public _getKey(): string\n {\n return `${this.text}:${this._style.styleKey}:${this._resolution}`;\n }\n\n protected abstract _updateBounds(): void;\n\n /**\n * Destroys this text renderable and optionally its style texture.\n * @param options - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.texture=false] - Should it destroy the texture of the text style\n * @param {boolean} [options.textureSource=false] - Should it destroy the textureSource of the text style\n * @param {boolean} [options.style=false] - Should it destroy the style of the text\n */\n public destroy(options: DestroyOptions = false): void\n {\n super.destroy(options);\n\n (this as any).owner = null;\n this._bounds = null;\n this._anchor = null;\n\n if (typeof options === 'boolean' ? options : options?.style)\n {\n this._style.destroy(options);\n }\n\n this._style = null;\n this._text = null;\n }\n}\n\nexport function ensureOptions<\n TEXT_STYLE extends TextStyle,\n TEXT_STYLE_OPTIONS extends TextStyleOptions\n>(\n args: any[],\n name: string\n): TextOptions\n{\n let options = (args[0] ?? {}) as TextOptions;\n\n // @deprecated\n if (typeof options === 'string' || args[1])\n {\n // #if _DEBUG\n deprecation(v8_0_0, `use new ${name}({ text: \"hi!\", style }) instead`);\n // #endif\n\n options = {\n text: options,\n style: args[1],\n } as TextOptions;\n }\n\n return options;\n}\n","import { AbstractText, ensureOptions } from './AbstractText';\nimport { CanvasTextMetrics } from './canvas/CanvasTextMetrics';\nimport { TextStyle } from './TextStyle';\n\nimport type { View } from '../../rendering/renderers/shared/view/View';\nimport type { TextOptions, TextString } from './AbstractText';\nimport type { TextStyleOptions } from './TextStyle';\n\n/**\n * A Text Object will create a line or multiple lines of text.\n *\n * To split a line you can use '\\n' in your text string, or, on the `style` object,\n * change its `wordWrap` property to true and and givae the `wordWrapWidth` property a value.\n *\n * The primary advantage of this class over BitmapText is that you have great control over the style of the text,\n * which you can change at runtime.\n *\n * The primary disadvantages is that each piece of text has it's own texture, which can use more memory.\n * When text changes, this texture has to be re-generated and re-uploaded to the GPU, taking up time.\n * @example\n * import { Text } from 'pixi.js';\n *\n * const text = new Text({\n * text: 'Hello Pixi!',\n * style: {\n * fontFamily: 'Arial',\n * fontSize: 24,\n * fill: 0xff1010,\n * align: 'center',\n * }\n * });\n * @memberof scene\n */\nexport class Text\n extends AbstractText\n implements View\n{\n public readonly renderPipeId: string = 'text';\n\n /**\n * @param {text.TextOptions} options - The options of the text.\n */\n constructor(options?: TextOptions);\n /** @deprecated since 8.0.0 */\n constructor(text?: TextString, options?: Partial);\n constructor(...args: [TextOptions?] | [TextString, Partial])\n {\n const options = ensureOptions(args, 'Text');\n\n super(options, TextStyle);\n }\n\n protected _updateBounds()\n {\n const bounds = this._bounds;\n const padding = this._style.padding;\n const anchor = this._anchor;\n\n const canvasMeasurement = CanvasTextMetrics.measureText(\n this._text,\n this._style\n );\n\n const { width, height } = canvasMeasurement;\n\n bounds.minX = (-anchor._x * width) - padding;\n bounds.maxX = bounds.minX + width + (padding * 2);\n bounds.minY = (-anchor._y * height) - padding;\n bounds.maxY = bounds.minY + height + (padding * 2);\n }\n}\n","import { TextureSource } from '../rendering/renderers/shared/texture/sources/TextureSource';\nimport { Texture } from '../rendering/renderers/shared/texture/Texture';\nimport { Container } from '../scene/container/Container';\nimport { Graphics } from '../scene/graphics/shared/Graphics';\nimport { GraphicsContext } from '../scene/graphics/shared/GraphicsContext';\nimport { Mesh } from '../scene/mesh/shared/Mesh';\nimport { Sprite } from '../scene/sprite/Sprite';\nimport { AnimatedSprite } from '../scene/sprite-animated/AnimatedSprite';\nimport { TilingSprite } from '../scene/sprite-tiling/TilingSprite';\nimport { Text } from '../scene/text/Text';\nimport { PrepareBase } from './PrepareBase';\n\nimport type { FillInstruction, TextureInstruction } from '../scene/graphics/shared/GraphicsContext';\nimport type { FrameObject } from '../scene/sprite-animated/AnimatedSprite';\nimport type { PrepareQueueItem, PrepareSourceItem } from './PrepareBase';\n\n/**\n * Part of the prepare system. Responsible for uploading all the items to the GPU.\n * This class extends the base functionality and resolves given resource items ready for the queue.\n * @memberof rendering\n */\nexport abstract class PrepareQueue extends PrepareBase\n{\n /**\n * Resolve the given resource type and return an item for the queue\n * @param source\n * @param queue\n */\n protected resolveQueueItem(source: PrepareSourceItem, queue: PrepareQueueItem[]): void\n {\n if (source instanceof Container)\n {\n this.resolveContainerQueueItem(source, queue);\n }\n else if (source instanceof TextureSource || source instanceof Texture)\n {\n queue.push(source.source);\n }\n else if (source instanceof GraphicsContext)\n {\n queue.push(source);\n }\n\n // could not resolve the resource type\n return null;\n }\n\n /**\n * Resolve the given container and return an item for the queue\n * @param container\n * @param queue\n */\n protected resolveContainerQueueItem(container: Container, queue: PrepareQueueItem[]): void\n {\n // Note: we are just concerned with the given view.\n // Children are handled by the recursive call of the base class\n\n if (container instanceof Sprite || container instanceof TilingSprite || container instanceof Mesh)\n {\n queue.push(container.texture.source);\n }\n else if (container instanceof Text)\n {\n queue.push(container);\n }\n else if (container instanceof Graphics)\n {\n queue.push(container.context);\n }\n else if (container instanceof AnimatedSprite)\n {\n container.textures.forEach((textureOrFrame) =>\n {\n if ((textureOrFrame as Texture).source)\n {\n queue.push((textureOrFrame as Texture).source);\n }\n else\n {\n queue.push((textureOrFrame as FrameObject).texture.source);\n }\n });\n }\n }\n\n /**\n * Resolve the given graphics context and return an item for the queue\n * @param graphicsContext\n */\n protected resolveGraphicsContextQueueItem(graphicsContext: GraphicsContext): PrepareQueueItem | null\n {\n this.renderer.graphicsContext.getContextRenderData(graphicsContext);\n\n const { instructions } = graphicsContext;\n\n for (const instruction of instructions)\n {\n if (instruction.action === 'texture')\n {\n const { image } = (instruction as TextureInstruction).data;\n\n return image.source;\n }\n else if (instruction.action === 'fill')\n {\n const { texture } = (instruction as FillInstruction).data.style;\n\n return texture.source;\n }\n }\n\n return null;\n }\n}\n","import { AbstractText, ensureOptions } from '../text/AbstractText';\nimport { TextStyle } from '../text/TextStyle';\nimport { BitmapFontManager } from './BitmapFontManager';\n\nimport type { View } from '../../rendering/renderers/shared/view/View';\nimport type { TextOptions, TextString } from '../text/AbstractText';\nimport type { TextStyleOptions } from '../text/TextStyle';\n\n/**\n * A BitmapText Object will create a line or multiple lines of text.\n *\n * To split a line you can use '\\n' in your text string, or, on the `style` object,\n * change its `wordWrap` property to true and and give the `wordWrapWidth` property a value.\n *\n * The text is created using a bitmap font (a sprite sheet of characters).\n *\n * The primary advantage of this render mode over `text` is that all of your textures are pre-generated and loaded,\n * meaning that rendering is fast, and changing text is much faster than Text.\n *\n * The primary disadvantage is that supporting character sets other than latin, such as CJK languages,\n * may be impractical due to the number of characters.\n *\n * Pre-loaded BitmapFonts:\n *\n *\n * PixiJS enables the loading of BitmapFonts through its Asset Manager, supporting both XML and FNT formats.\n * Additionally, PixiJS is compatible with MSDF (Multi-channel Signed Distance Field) and SDF (Signed Distance Field) fonts.\n * These advanced font types allow for scaling without quality degradation and must be created with specific tools,\n * such as the one available at https://msdf-bmfont.donmccurdy.com/.\n *\n * Dynamically Generated BitmapFonts:\n *\n *\n * PixiJS also offers the capability to generate BitmapFonts dynamically. This means that fonts are created in real-time\n * based on specified styles, eliminating the need for pre-loading. This process is initiated simply by assigning a style\n * to a BitmapText object, which then automatically generates the required font.\n *\n * However, dynamically generating a large number of fonts may lead to significant memory use. To prevent this,\n * PixiJS smartly attempts to reuse fonts that closely match the desired style parameters. For instance, if a text style\n * requires a font size of 80 but a similar font of size 100 has already been generated, PixiJS will scale the existing\n * font to fit the new requirement, rather than creating a new font from scratch.\n *\n * For those who prefer to manage BitmapFonts manually, PixiJS provides the BitmapFont.install method. This method\n * allows for the pre-generation and preparation of fonts, making them readily available for use by specifying the\n * fontFamily in your text styling.\n *\n * This approach ensures efficient font management within PixiJS, balancing between dynamic generation for flexibility\n * and manual management for optimized performance.\n * @example\n * import { BitmapText, BitmapFont } from 'pixi.js';\n *\n * // generate a dynamic font behind the scenes:\n * const text = new BitmapText({\n * text: 'Hello Pixi!',\n * style: {\n * fontFamily: 'Arial',\n * fontSize: 24,\n * fill: 0xff1010,\n * align: 'center',\n * }\n * });\n *\n * // pre install\n * BitmapFont.install({\n * name: 'myFont',\n * style:{\n * fontFamily: 'Arial',\n * }\n * })\n *\n * // new bitmap text with preinstalled font\n * const text = new BitmapText({\n * text: 'Hello Pixi!',\n * style: {\n * fontFamily: 'myFont',\n * fontSize: 24,\n * fill: 0xff1010,\n * align: 'center',\n * }\n * }\n *\n * // load a font from an xml file\n * const font = await Assets.load('path/to/myLoadedFont.fnt');\n *\n * // new bitmap text with loaded font\n * const text = new BitmapText({\n * text: 'Hello Pixi!',\n * style: {\n * fontFamily: 'myLoadedFont', // the name of the font in the fnt file\n * fontSize: 24,\n * fill: 0xff1010,\n * align: 'center',\n * }\n * }\n * @memberof scene\n */\nexport class BitmapText extends AbstractText implements View\n{\n public readonly renderPipeId: string = 'bitmapText';\n\n /**\n * **Note:** Our docs parser struggles to properly understand the constructor signature.\n * This is the correct signature.\n * ```ts\n * new BitmapText(options?: TextOptions);\n * ```\n * @param { text.TextOptions } options - The options of the bitmap text.\n */\n constructor(options?: TextOptions);\n /** @deprecated since 8.0.0 */\n constructor(text?: TextString, options?: Partial);\n constructor(...args: [TextOptions?] | [TextString, Partial])\n {\n const options = ensureOptions(args, 'BitmapText');\n\n options.style ??= options.style || {};\n options.style.fill ??= 0xffffff;\n\n super(options, TextStyle);\n }\n\n protected _updateBounds()\n {\n const bounds = this._bounds;\n const padding = this._style.padding;\n const anchor = this._anchor;\n\n const bitmapMeasurement = BitmapFontManager.measureText(this.text, this._style);\n const scale = bitmapMeasurement.scale;\n const offset = bitmapMeasurement.offsetY * scale;\n\n let width = bitmapMeasurement.width * scale;\n let height = bitmapMeasurement.height * scale;\n\n const stroke = this._style._stroke;\n\n if (stroke)\n {\n width += stroke.width;\n height += stroke.width;\n }\n\n bounds.minX = (-anchor._x * width) - padding;\n bounds.maxX = bounds.minX + width;\n bounds.minY = (-anchor._y * (height + offset)) - padding;\n bounds.maxY = bounds.minY + height;\n }\n}\n","import { AbstractText, ensureOptions } from '../text/AbstractText';\nimport { HTMLTextStyle } from './HtmlTextStyle';\nimport { measureHtmlText } from './utils/measureHtmlText';\n\nimport type { View } from '../../rendering/renderers/shared/view/View';\nimport type { TextOptions, TextString } from '../text/AbstractText';\nimport type { HTMLTextStyleOptions } from './HtmlTextStyle';\n\n/**\n * Constructor options used for `HTMLText` instances.\n * @property {string} [text=''] - The string that you would like the text to display.\n * @property {text.HTMLTextStyle | text.HTMLTextStyleOptions} [style] - The style of the text.\n * @memberof text\n */\nexport type HTMLTextOptions = TextOptions;\n\n/**\n * A HTMLText Object will create a line or multiple lines of text.\n *\n * To split a line you can use '\\n' in your text string, or, on the `style` object,\n * change its `wordWrap` property to true and and give the `wordWrapWidth` property a value.\n *\n * HTMLText uses an svg foreignObject to render HTML text.\n *\n *\n * The primary advantages of this render mode are:\n *\n * - Supports [HTML tags](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals)\n * for styling such as ``, or ``, as well as ``\n *\n * - Better support for emojis and other HTML layout features, better compatibility with CSS\n * line-height and letter-spacing.\n *\n *\n * The primary disadvantages are:\n * - Unlike `text`, `html` rendering will vary slightly between platforms and browsers.\n * `html` uses SVG/DOM to render text and not Context2D's fillText like `text`.\n *\n * - Performance and memory usage is on-par with `text` (that is to say, slow and heavy)\n *\n * - Only works with browsers that support .\n * @example\n * import { HTMLText } from 'pixi.js';\n *\n * const text = new HTMLText({\n * text: 'Hello Pixi!',\n * style: {\n * fontFamily: 'Arial',\n * fontSize: 24,\n * fill: 0xff1010,\n * align: 'center',\n * }\n * });\n * @memberof scene\n */\nexport class HTMLText extends AbstractText implements View\n{\n public readonly renderPipeId: string = 'htmlText';\n\n /**\n * @param {text.HTMLTextOptions} options - The options of the html text.\n */\n constructor(options?: HTMLTextOptions);\n /** @deprecated since 8.0.0 */\n constructor(text?: TextString, options?: Partial);\n constructor(...args: [HTMLTextOptions?] | [TextString, Partial])\n {\n const options = ensureOptions(args, 'HtmlText');\n\n super(options, HTMLTextStyle);\n }\n\n protected _updateBounds()\n {\n const bounds = this._bounds;\n const padding = this._style.padding;\n const anchor = this._anchor;\n\n const htmlMeasurement = measureHtmlText(this.text, this._style as HTMLTextStyle);\n\n const { width, height } = htmlMeasurement;\n\n bounds.minX = (-anchor._x * width) - padding;\n bounds.maxX = bounds.minX + width;\n bounds.minY = (-anchor._y * height) - padding;\n bounds.maxY = bounds.minY + height;\n }\n}\n","import { TextureSource } from '../rendering/renderers/shared/texture/sources/TextureSource';\nimport { GraphicsContext } from '../scene/graphics/shared/GraphicsContext';\nimport { Text } from '../scene/text/Text';\nimport { BitmapText } from '../scene/text-bitmap/BitmapText';\nimport { HTMLText } from '../scene/text-html/HTMLText';\nimport { PrepareQueue } from './PrepareQueue';\n\nimport type { FillInstruction, TextureInstruction } from '../scene/graphics/shared/GraphicsContext';\nimport type { PrepareQueueItem } from './PrepareBase';\n\n/**\n * Part of the prepare system. Responsible for uploading all the items to the GPU.\n * This class extends the resolver functionality and uploads the given queue items.\n * @memberof rendering\n */\nexport abstract class PrepareUpload extends PrepareQueue\n{\n /**\n * Upload the given queue item\n * @param item\n */\n protected uploadQueueItem(item: PrepareQueueItem): void\n {\n if (item instanceof TextureSource)\n {\n this.uploadTextureSource(item);\n }\n else if (item instanceof Text)\n {\n this.uploadText(item);\n }\n else if (item instanceof HTMLText)\n {\n this.uploadHTMLText(item);\n }\n else if (item instanceof BitmapText)\n {\n this.uploadBitmapText(item);\n }\n else if (item instanceof GraphicsContext)\n {\n this.uploadGraphicsContext(item);\n }\n }\n\n protected uploadTextureSource(textureSource: TextureSource): void\n {\n this.renderer.texture.initSource(textureSource);\n }\n\n protected uploadText(_text: Text): void\n {\n this.renderer.renderPipes.text.initGpuText(_text);\n }\n\n protected uploadBitmapText(_text: BitmapText): void\n {\n this.renderer.renderPipes.bitmapText.initGpuText(_text);\n }\n\n protected uploadHTMLText(_text: HTMLText): void\n {\n this.renderer.renderPipes.htmlText.initGpuText(_text);\n }\n\n /**\n * Resolve the given graphics context and return an item for the queue\n * @param graphicsContext\n */\n protected uploadGraphicsContext(graphicsContext: GraphicsContext): void\n {\n this.renderer.graphicsContext.getContextRenderData(graphicsContext);\n\n const { instructions } = graphicsContext;\n\n for (const instruction of instructions)\n {\n if (instruction.action === 'texture')\n {\n const { image } = (instruction as TextureInstruction).data;\n\n this.uploadTextureSource(image.source);\n }\n else if (instruction.action === 'fill')\n {\n const { texture } = (instruction as FillInstruction).data.style;\n\n this.uploadTextureSource(texture.source);\n }\n }\n\n return null;\n }\n}\n","import { ExtensionType } from '../extensions/Extensions';\nimport { PrepareUpload } from './PrepareUpload';\n\nimport type { System } from '../rendering/renderers/shared/system/System';\n\n/**\n * The prepare system provides renderer-specific plugins for pre-rendering DisplayObjects. This is useful for\n * asynchronously preparing and uploading to the GPU assets, textures, graphics waiting to be displayed.\n *\n * Do not instantiate this plugin directly. It is available from the `renderer.prepare` property.\n * @example\n * import 'pixi.js/prepare';\n * import { Application, Graphics } from 'pixi.js';\n *\n * // Create a new application (prepare will be auto-added to renderer)\n * const app = new Application();\n * await app.init();\n * document.body.appendChild(app.view);\n *\n * // Don't start rendering right away\n * app.stop();\n *\n * // Create a display object\n * const rect = new Graphics()\n * .beginFill(0x00ff00)\n * .drawRect(40, 40, 200, 200);\n *\n * // Add to the stage\n * app.stage.addChild(rect);\n *\n * // Don't start rendering until the graphic is uploaded to the GPU\n * app.renderer.prepare.upload(app.stage, () => {\n * app.start();\n * });\n * @memberof rendering\n */\nexport class PrepareSystem extends PrepareUpload implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ],\n name: 'prepare',\n } as const;\n\n /** Destroys the plugin, don't use after this. */\n public destroy(): void\n {\n clearTimeout(this.timeout);\n this.renderer = null;\n this.queue = null;\n this.resolves = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { compileHighShaderGlProgram } from '../../high-shader/compileHighShaderToProgram';\nimport { colorBitGl } from '../../high-shader/shader-bits/colorBit';\nimport { generateTextureBatchBitGl } from '../../high-shader/shader-bits/generateTextureBatchBit';\nimport { roundPixelsBitGl } from '../../high-shader/shader-bits/roundPixelsBit';\nimport { getBatchSamplersUniformGroup } from '../../renderers/gl/shader/getBatchSamplersUniformGroup';\nimport { Shader } from '../../renderers/shared/shader/Shader';\nimport { State } from '../../renderers/shared/state/State';\nimport { getMaxTexturesPerBatch } from './utils/maxRecommendedTextures';\n\nimport type { WebGLRenderer } from '../../renderers/gl/WebGLRenderer';\nimport type { Geometry } from '../../renderers/shared/geometry/Geometry';\nimport type { Batch } from '../shared/Batcher';\nimport type { BatcherAdaptor, BatcherPipe } from '../shared/BatcherPipe';\n\n/**\n * A BatcherAdaptor that uses WebGL to render batches.\n * @memberof rendering\n * @ignore\n */\nexport class GlBatchAdaptor implements BatcherAdaptor\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipesAdaptor,\n ],\n name: 'batch',\n } as const;\n\n private _shader: Shader;\n private _didUpload = false;\n private readonly _tempState = State.for2d();\n\n public init(batcherPipe: BatcherPipe): void\n {\n const maxTextures = getMaxTexturesPerBatch();\n\n const glProgram = compileHighShaderGlProgram({\n name: 'batch',\n bits: [\n colorBitGl,\n generateTextureBatchBitGl(maxTextures),\n roundPixelsBitGl,\n ]\n });\n\n this._shader = new Shader({\n glProgram,\n resources: {\n batchSamplers: getBatchSamplersUniformGroup(maxTextures),\n }\n });\n\n batcherPipe.renderer.runners.contextChange.add(this);\n }\n\n public contextChange(): void\n {\n this._didUpload = false;\n }\n\n public start(batchPipe: BatcherPipe, geometry: Geometry): void\n {\n const renderer = batchPipe.renderer as WebGLRenderer;\n\n renderer.shader.bind(this._shader, this._didUpload);\n\n renderer.shader.updateUniformGroup(renderer.globalUniforms.uniformGroup);\n\n renderer.geometry.bind(geometry, this._shader.glProgram);\n }\n\n public execute(batchPipe: BatcherPipe, batch: Batch): void\n {\n const renderer = batchPipe.renderer as WebGLRenderer;\n\n this._didUpload = true;\n\n this._tempState.blendMode = batch.blendMode;\n\n renderer.state.set(this._tempState);\n\n const textures = batch.textures.textures;\n\n for (let i = 0; i < textures.length; i++)\n {\n renderer.texture.bind(textures[i], i);\n }\n\n renderer.geometry.draw('triangle-list', batch.size, batch.start);\n }\n\n public destroy(): void\n {\n this._shader.destroy(true);\n this._shader = null;\n }\n}\n","export function generateGPULayout(maxTextures: number): GPUBindGroupLayoutEntry[]\n{\n const gpuLayout: GPUBindGroupLayoutEntry[] = [];\n\n let bindIndex = 0;\n\n for (let i = 0; i < maxTextures; i++)\n {\n gpuLayout[bindIndex] = {\n texture: {\n sampleType: 'float',\n viewDimension: '2d',\n multisampled: false,\n },\n binding: bindIndex,\n visibility: GPUShaderStage.FRAGMENT,\n };\n bindIndex++;\n\n gpuLayout[bindIndex] = {\n sampler: {\n type: 'filtering',\n },\n binding: bindIndex,\n visibility: GPUShaderStage.FRAGMENT,\n };\n\n bindIndex++;\n }\n\n return gpuLayout;\n}\n","export function generateLayout(maxTextures: number): Record\n{\n const layout: Record = {};\n\n let bindIndex = 0;\n\n for (let i = 0; i < maxTextures; i++)\n {\n layout[`textureSource${i + 1}`] = bindIndex++;\n layout[`textureSampler${i + 1}`] = bindIndex++;\n }\n\n return layout;\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { compileHighShaderGpuProgram } from '../../high-shader/compileHighShaderToProgram';\nimport { colorBit } from '../../high-shader/shader-bits/colorBit';\nimport { generateTextureBatchBit } from '../../high-shader/shader-bits/generateTextureBatchBit';\nimport { roundPixelsBit } from '../../high-shader/shader-bits/roundPixelsBit';\nimport { Shader } from '../../renderers/shared/shader/Shader';\nimport { State } from '../../renderers/shared/state/State';\nimport { getMaxTexturesPerBatch } from '../gl/utils/maxRecommendedTextures';\nimport { getTextureBatchBindGroup } from './getTextureBatchBindGroup';\n\nimport type { GpuEncoderSystem } from '../../renderers/gpu/GpuEncoderSystem';\nimport type { WebGPURenderer } from '../../renderers/gpu/WebGPURenderer';\nimport type { Geometry } from '../../renderers/shared/geometry/Geometry';\nimport type { Batch } from '../shared/Batcher';\nimport type { BatcherAdaptor, BatcherPipe } from '../shared/BatcherPipe';\n\nconst tempState = State.for2d();\n\n/**\n * A BatcherAdaptor that uses the GPU to render batches.\n * @memberof rendering\n * @ignore\n */\nexport class GpuBatchAdaptor implements BatcherAdaptor\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGPUPipesAdaptor,\n ],\n name: 'batch',\n } as const;\n\n private _shader: Shader;\n private _geometry: Geometry;\n\n public init()\n {\n const gpuProgram = compileHighShaderGpuProgram({\n name: 'batch',\n bits: [\n colorBit,\n generateTextureBatchBit(getMaxTexturesPerBatch()),\n roundPixelsBit,\n ]\n });\n\n this._shader = new Shader({\n gpuProgram,\n groups: {\n // these will be dynamically allocated\n },\n });\n }\n\n public start(batchPipe: BatcherPipe, geometry: Geometry): void\n {\n const renderer = batchPipe.renderer as WebGPURenderer;\n const encoder = renderer.encoder as GpuEncoderSystem;\n const program = this._shader.gpuProgram;\n\n this._geometry = geometry;\n\n encoder.setGeometry(geometry);\n\n tempState.blendMode = 'normal';\n\n // this just initiates the pipeline, so we can then set bind groups on it\n renderer.pipeline.getPipeline(\n geometry,\n program,\n tempState\n );\n\n const globalUniformsBindGroup = renderer.globalUniforms.bindGroup;\n\n // low level - we need to reset the bind group at location 1 to null\n // this is because we directly manipulate the bound buffer in the execture function for\n // performance reasons.\n // setting it to null ensures that the next bind group we set at location 1 will\n // be the one we want.\n encoder.resetBindGroup(1);\n\n encoder.setBindGroup(0, globalUniformsBindGroup, program);\n }\n\n public execute(batchPipe: BatcherPipe, batch: Batch): void\n {\n const program = this._shader.gpuProgram;\n const renderer = batchPipe.renderer as WebGPURenderer;\n const encoder = renderer.encoder as GpuEncoderSystem;\n\n if (!batch.bindGroup)\n {\n const textureBatch = batch.textures;\n\n batch.bindGroup = getTextureBatchBindGroup(textureBatch.textures, textureBatch.count);\n }\n\n tempState.blendMode = batch.blendMode;\n\n const gpuBindGroup = renderer.bindGroup.getBindGroup(\n batch.bindGroup, program, 1\n );\n\n const pipeline = renderer.pipeline.getPipeline(\n this._geometry,\n program,\n tempState\n );\n\n batch.bindGroup._touch(renderer.textureGC.count);\n\n encoder.setPipeline(pipeline);\n\n encoder.renderPassEncoder.setBindGroup(1, gpuBindGroup);\n encoder.renderPassEncoder.drawIndexed(batch.size, 1, batch.start);\n }\n\n public destroy(): void\n {\n this._shader.destroy(true);\n this._shader = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { State } from '../../renderers/shared/state/State';\nimport { BatchGeometry } from '../gpu/BatchGeometry';\nimport { Batcher } from './Batcher';\n\nimport type { Geometry } from '../../renderers/shared/geometry/Geometry';\nimport type { InstructionSet } from '../../renderers/shared/instructions/InstructionSet';\nimport type { BatchPipe, InstructionPipe } from '../../renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../../renderers/types';\nimport type { Batch, BatchableObject } from './Batcher';\n\nexport interface BatcherAdaptor\n{\n start(batchPipe: BatcherPipe, geometry: Geometry): void\n init(batchPipe: BatcherPipe): void;\n execute(batchPipe: BatcherPipe, batch: Batch): void\n destroy(): void;\n contextChange?(): void;\n}\n\n// eslint-disable-next-line max-len\nexport class BatcherPipe implements InstructionPipe, BatchPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'batch',\n } as const;\n\n public state: State = State.for2d();\n public renderer: Renderer;\n\n private _batches: Record = Object.create(null);\n private _geometries: Record = Object.create(null);\n private _adaptor: BatcherAdaptor;\n\n private _activeBatch: Batcher;\n private _activeGeometry: Geometry;\n\n constructor(renderer: Renderer, adaptor: BatcherAdaptor)\n {\n this.renderer = renderer;\n this._adaptor = adaptor;\n\n this._adaptor.init(this);\n }\n\n public buildStart(instructionSet: InstructionSet)\n {\n if (!this._batches[instructionSet.uid])\n {\n const batcher = new Batcher();\n\n this._batches[instructionSet.uid] = batcher;\n this._geometries[batcher.uid] = new BatchGeometry();\n }\n\n this._activeBatch = this._batches[instructionSet.uid];\n this._activeGeometry = this._geometries[this._activeBatch.uid];\n\n this._activeBatch.begin();\n }\n\n public addToBatch(batchableObject: BatchableObject)\n {\n this._activeBatch.add(batchableObject);\n }\n\n public break(instructionSet: InstructionSet)\n {\n this._activeBatch.break(instructionSet);\n }\n\n public buildEnd(instructionSet: InstructionSet)\n {\n const activeBatch = this._activeBatch;\n const geometry = this._activeGeometry;\n\n activeBatch.finish(instructionSet);\n\n geometry.indexBuffer.setDataWithSize(activeBatch.indexBuffer, activeBatch.indexSize, true);\n\n geometry.buffers[0].setDataWithSize(activeBatch.attributeBuffer.float32View, activeBatch.attributeSize, false);\n }\n\n public upload(instructionSet: InstructionSet)\n {\n const batcher = this._batches[instructionSet.uid];\n const geometry = this._geometries[batcher.uid];\n\n if (batcher.dirty)\n {\n batcher.dirty = false;\n geometry.buffers[0].update(batcher.attributeSize * 4);\n }\n }\n\n public execute(batch: Batch)\n {\n if (batch.action === 'startBatch')\n {\n const batcher = batch.batcher;\n const geometry = this._geometries[batcher.uid];\n\n this._adaptor.start(this, geometry);\n }\n\n this._adaptor.execute(this, batch);\n }\n\n public destroy()\n {\n this.state = null;\n this.renderer = null;\n\n this._adaptor.destroy();\n this._adaptor = null;\n\n for (const i in this._batches)\n {\n this._batches[i].destroy();\n }\n\n this._batches = null;\n\n for (const i in this._geometries)\n {\n this._geometries[i].destroy();\n }\n\n this._geometries = null;\n }\n}\n","/**\n * formats a shader so its more pleasant to read!\n * @param shader - a glsl shader program source\n */\nexport function formatShader(shader: string): string\n{\n const spl = shader.split(/([\\n{}])/g)\n .map((a) => a.trim())\n .filter((a) => a.length);\n\n let indent = '';\n\n const formatted = spl.map((a) =>\n {\n let indentedLine = indent + a;\n\n if (a === '{')\n {\n indent += ' ';\n }\n else if (a === '}')\n {\n indent = indent.substr(0, indent.length - 4);\n\n indentedLine = indent + a;\n }\n\n return indentedLine;\n }).join('\\n');\n\n return formatted;\n}\n\n","export const textureBit = {\n name: 'texture-bit',\n vertex: {\n header: /* wgsl */`\n\n struct TextureUniforms {\n uTextureMatrix:mat3x3,\n }\n\n @group(2) @binding(2) var textureUniforms : TextureUniforms;\n `,\n main: /* wgsl */`\n uv = (textureUniforms.uTextureMatrix * vec3(uv, 1.0)).xy;\n `\n },\n fragment: {\n header: /* wgsl */`\n @group(2) @binding(0) var uTexture: texture_2d;\n @group(2) @binding(1) var uSampler: sampler;\n\n \n `,\n main: /* wgsl */`\n outColor = textureSample(uTexture, uSampler, vUV);\n `\n }\n};\n\nexport const textureBitGl = {\n name: 'texture-bit',\n vertex: {\n header: /* glsl */`\n uniform mat3 uTextureMatrix;\n `,\n main: /* glsl */`\n uv = (uTextureMatrix * vec3(uv, 1.0)).xy;\n `\n },\n fragment: {\n header: /* glsl */`\n uniform sampler2D uTexture;\n\n \n `,\n main: /* glsl */`\n outColor = texture(uTexture, vUV);\n `\n }\n};\n\n","import type { InstructionSet } from '../../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { InstructionPipe, RenderPipe } from '../../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Renderable } from '../../../rendering/renderers/shared/Renderable';\nimport type { RenderPipes } from '../../../rendering/renderers/types';\nimport type { Container } from '../Container';\nimport type { RenderGroup } from '../RenderGroup';\n\nexport function buildInstructions(renderGroup: RenderGroup, renderPipes: RenderPipes)\n{\n const root = renderGroup.root;\n const instructionSet = renderGroup.instructionSet;\n\n instructionSet.reset();\n\n // TODO add some events / runners for build start\n renderPipes.batch.buildStart(instructionSet);\n renderPipes.blendMode.buildStart();\n renderPipes.colorMask.buildStart();\n\n if (root.sortableChildren)\n {\n root.sortChildren();\n }\n\n collectAllRenderablesAdvanced(root, instructionSet, renderPipes, true);\n\n // instructionSet.log();\n // TODO add some events / runners for build end\n renderPipes.batch.buildEnd(instructionSet);\n renderPipes.blendMode.buildEnd(instructionSet);\n\n // instructionSet.log();\n}\n\nexport function collectAllRenderables(\n container: Container,\n instructionSet: InstructionSet,\n rendererPipes: RenderPipes\n): void\n{\n // if there is 0b01 or 0b10 the return value\n\n if (container.globalDisplayStatus < 0b111 || !container.includeInBuild) return;\n\n if (container.sortableChildren)\n {\n container.sortChildren();\n }\n\n if (container.isSimple)\n {\n collectAllRenderablesSimple(container, instructionSet, rendererPipes);\n }\n else\n {\n collectAllRenderablesAdvanced(container, instructionSet, rendererPipes, false);\n }\n}\n\nfunction collectAllRenderablesSimple(\n container: Container,\n instructionSet: InstructionSet,\n renderPipes: RenderPipes\n): void\n{\n if (container.renderPipeId)\n {\n // TODO add blends in\n renderPipes.blendMode.setBlendMode(container as Renderable, container.groupBlendMode, instructionSet);\n\n container.didViewUpdate = false;\n\n const rp = renderPipes as unknown as Record;\n\n rp[container.renderPipeId].addRenderable(container as Renderable, instructionSet);\n }\n\n if (!container.renderGroup)\n {\n const children = container.children;\n const length = children.length;\n\n for (let i = 0; i < length; i++)\n {\n collectAllRenderables(children[i], instructionSet, renderPipes);\n }\n }\n}\n\nfunction collectAllRenderablesAdvanced(\n container: Container,\n instructionSet: InstructionSet,\n renderPipes: RenderPipes,\n isRoot: boolean\n): void\n{\n if (!isRoot && container.renderGroup)\n {\n renderPipes.renderGroup.addRenderGroup(container.renderGroup, instructionSet);\n }\n else\n {\n for (let i = 0; i < container.effects.length; i++)\n {\n const effect = container.effects[i];\n const pipe = renderPipes[effect.pipe as keyof RenderPipes]as InstructionPipe;\n\n pipe.push(effect, container, instructionSet);\n }\n\n const renderPipeId = container.renderPipeId;\n\n if (renderPipeId)\n {\n // TODO add blends in\n renderPipes.blendMode.setBlendMode(container as Renderable, container.groupBlendMode, instructionSet);\n container.didViewUpdate = false;\n\n const pipe = renderPipes[renderPipeId as keyof RenderPipes]as RenderPipe;\n\n pipe.addRenderable(container, instructionSet);\n }\n\n const children = container.children;\n\n if (children.length)\n {\n for (let i = 0; i < children.length; i++)\n {\n collectAllRenderables(children[i], instructionSet, renderPipes);\n }\n }\n\n // loop backwards through effects\n for (let i = container.effects.length - 1; i >= 0; i--)\n {\n const effect = container.effects[i];\n const pipe = renderPipes[effect.pipe as keyof RenderPipes]as InstructionPipe;\n\n pipe.pop(effect, container, instructionSet);\n }\n }\n}\n\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { FilterEffect } from '../../../filters/FilterEffect';\nimport { MaskFilter } from '../../../filters/mask/MaskFilter';\nimport { Bounds } from '../../../scene/container/bounds/Bounds';\nimport { getGlobalBounds } from '../../../scene/container/bounds/getGlobalBounds';\nimport { collectAllRenderables } from '../../../scene/container/utils/buildInstructions';\nimport { Sprite } from '../../../scene/sprite/Sprite';\nimport { BigPool } from '../../../utils/pool/PoolGroup';\nimport { Texture } from '../../renderers/shared/texture/Texture';\nimport { TexturePool } from '../../renderers/shared/texture/TexturePool';\n\nimport type { Container } from '../../../scene/container/Container';\nimport type { Effect } from '../../../scene/container/Effect';\nimport type { PoolItem } from '../../../utils/pool/Pool';\nimport type { Instruction } from '../../renderers/shared/instructions/Instruction';\nimport type { InstructionSet } from '../../renderers/shared/instructions/InstructionSet';\nimport type { InstructionPipe } from '../../renderers/shared/instructions/RenderPipe';\nimport type { RenderTarget } from '../../renderers/shared/renderTarget/RenderTarget';\nimport type { Renderer } from '../../renderers/types';\nimport type { AlphaMask } from './AlphaMask';\n\ntype MaskMode = 'pushMaskBegin' | 'pushMaskEnd' | 'popMaskBegin' | 'popMaskEnd';\n\nconst tempBounds = new Bounds();\n\nclass AlphaMaskEffect extends FilterEffect implements PoolItem\n{\n constructor()\n {\n super();\n\n this.filters = [new MaskFilter({\n sprite: new Sprite(Texture.EMPTY)\n })];\n }\n\n get sprite(): Sprite\n {\n return (this.filters[0] as MaskFilter).sprite;\n }\n\n set sprite(value: Sprite)\n {\n (this.filters[0] as MaskFilter).sprite = value;\n }\n\n public init: () => void;\n}\n\nexport interface AlphaMaskInstruction extends Instruction\n{\n renderPipeId: 'alphaMask',\n action: MaskMode,\n mask: AlphaMask,\n maskedContainer: Container,\n renderMask: boolean,\n}\n\nexport interface AlphaMaskData\n{\n filterEffect: AlphaMaskEffect,\n maskedContainer: Container,\n previousRenderTarget?: RenderTarget,\n filterTexture?: Texture,\n}\n\nexport class AlphaMaskPipe implements InstructionPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'alphaMask',\n } as const;\n\n private _renderer: Renderer;\n private _activeMaskStage: AlphaMaskData[] = [];\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public push(mask: Effect, maskedContainer: Container, instructionSet: InstructionSet): void\n {\n const renderer = this._renderer;\n\n renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'alphaMask',\n action: 'pushMaskBegin',\n mask,\n canBundle: false,\n maskedContainer\n } as AlphaMaskInstruction);\n\n if ((mask as AlphaMask).renderMaskToTexture)\n {\n const maskContainer = (mask as AlphaMask).mask;\n\n maskContainer.includeInBuild = true;\n\n collectAllRenderables(\n maskContainer,\n instructionSet,\n renderer.renderPipes\n );\n\n maskContainer.includeInBuild = false;\n }\n\n renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'alphaMask',\n action: 'pushMaskEnd',\n mask,\n maskedContainer,\n canBundle: false,\n } as AlphaMaskInstruction);\n }\n\n public pop(mask: Effect, _maskedContainer: Container, instructionSet: InstructionSet): void\n {\n const renderer = this._renderer;\n\n renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'alphaMask',\n action: 'popMaskEnd',\n mask,\n canBundle: false,\n } as AlphaMaskInstruction);\n }\n\n public execute(instruction: AlphaMaskInstruction)\n {\n const renderer = this._renderer;\n const renderMask = instruction.mask.renderMaskToTexture;\n\n if (instruction.action === 'pushMaskBegin')\n {\n const filterEffect = BigPool.get(AlphaMaskEffect);\n\n if (renderMask)\n {\n instruction.mask.mask.measurable = true;\n\n const bounds = getGlobalBounds(instruction.mask.mask, true, tempBounds);\n\n instruction.mask.mask.measurable = false;\n\n bounds.ceil();\n\n const filterTexture = TexturePool.getOptimalTexture(\n bounds.width,\n bounds.height,\n 1,\n false\n );\n\n renderer.renderTarget.push(filterTexture, true);\n\n renderer.globalUniforms.push({\n offset: bounds,\n worldColor: 0xFFFFFFFF\n });\n\n const sprite = filterEffect.sprite;\n\n sprite.texture = filterTexture;\n\n sprite.worldTransform.tx = bounds.minX;\n sprite.worldTransform.ty = bounds.minY;\n\n this._activeMaskStage.push({\n filterEffect,\n maskedContainer: instruction.maskedContainer,\n filterTexture,\n });\n }\n else\n {\n filterEffect.sprite = instruction.mask.mask as Sprite;\n\n this._activeMaskStage.push({\n filterEffect,\n maskedContainer: instruction.maskedContainer,\n });\n }\n }\n else if (instruction.action === 'pushMaskEnd')\n {\n const maskData = this._activeMaskStage[this._activeMaskStage.length - 1];\n\n if (renderMask)\n {\n renderer.renderTarget.pop();\n renderer.globalUniforms.pop();\n }\n\n renderer.filter.push({\n renderPipeId: 'filter',\n action: 'pushFilter',\n container: maskData.maskedContainer,\n filterEffect: maskData.filterEffect,\n canBundle: false,\n });\n }\n else if (instruction.action === 'popMaskEnd')\n {\n renderer.filter.pop();\n\n const maskData = this._activeMaskStage.pop();\n\n if (renderMask)\n {\n TexturePool.returnTexture(maskData.filterTexture);\n }\n\n BigPool.return(maskData.filterEffect);\n }\n }\n\n public destroy(): void\n {\n this._renderer = null;\n this._activeMaskStage = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { Container } from '../../../scene/container/Container';\nimport type { Effect } from '../../../scene/container/Effect';\nimport type { Instruction } from '../../renderers/shared/instructions/Instruction';\nimport type { InstructionSet } from '../../renderers/shared/instructions/InstructionSet';\nimport type { InstructionPipe } from '../../renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../../renderers/types';\nimport type { ColorMask } from './ColorMask';\n\nexport interface ColorMaskInstruction extends Instruction\n{\n renderPipeId: 'colorMask',\n colorMask: number,\n}\n\nexport class ColorMaskPipe implements InstructionPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'colorMask',\n } as const;\n\n private readonly _renderer: Renderer;\n private _colorStack: number[] = [];\n private _colorStackIndex = 0;\n private _currentColor = 0;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public buildStart()\n {\n this._colorStack[0] = 0xF;\n this._colorStackIndex = 1;\n this._currentColor = 0xF;\n }\n\n public push(mask: Effect, _container: Container, instructionSet: InstructionSet): void\n {\n const renderer = this._renderer;\n\n renderer.renderPipes.batch.break(instructionSet);\n\n const colorStack = this._colorStack;\n\n colorStack[this._colorStackIndex] = colorStack[this._colorStackIndex - 1] & (mask as ColorMask).mask;\n\n const currentColor = this._colorStack[this._colorStackIndex];\n\n if (currentColor !== this._currentColor)\n {\n this._currentColor = currentColor;\n instructionSet.add({\n renderPipeId: 'colorMask',\n colorMask: currentColor,\n canBundle: false,\n } as ColorMaskInstruction);\n }\n\n this._colorStackIndex++;\n }\n\n public pop(_mask: Effect, _container: Container, instructionSet: InstructionSet): void\n {\n const renderer = this._renderer;\n\n renderer.renderPipes.batch.break(instructionSet);\n\n const colorStack = this._colorStack;\n\n this._colorStackIndex--;\n\n const currentColor = colorStack[this._colorStackIndex - 1];\n\n if (currentColor !== this._currentColor)\n {\n this._currentColor = currentColor;\n\n instructionSet.add({\n renderPipeId: 'colorMask',\n colorMask: currentColor,\n canBundle: false,\n } as ColorMaskInstruction);\n }\n }\n\n public execute(instruction: ColorMaskInstruction)\n {\n const renderer = this._renderer;\n\n renderer.colorMask.setMask(instruction.colorMask);\n }\n\n public destroy()\n {\n this._colorStack = null;\n }\n}\n","import { addMaskBounds } from '../utils/addMaskBounds';\nimport { addMaskLocalBounds } from '../utils/addMaskLocalBounds';\n\nimport type { Point } from '../../../maths/point/Point';\nimport type { Bounds } from '../../../scene/container/bounds/Bounds';\nimport type { Container } from '../../../scene/container/Container';\nimport type { Effect } from '../../../scene/container/Effect';\n\nexport class ScissorMask implements Effect\n{\n public priority = 0;\n public mask: Container;\n public pipe = 'scissorMask';\n\n constructor(mask: Container)\n {\n this.mask = mask;\n\n this.mask.renderable = false;\n this.mask.measurable = false;\n }\n\n public addBounds(bounds: Bounds, skipUpdateTransform?: boolean): void\n {\n addMaskBounds(this.mask, bounds, skipUpdateTransform);\n }\n\n public addLocalBounds(bounds: Bounds, localRoot: Container): void\n {\n addMaskLocalBounds(this.mask, bounds, localRoot);\n }\n\n public containsPoint(point: Point, hitTestFn: (container: Container, point: Point) => boolean): boolean\n {\n const mask = this.mask as any;\n\n // if the point is in the mask, yay!\n return hitTestFn(mask, point);\n }\n\n public reset()\n {\n this.mask.measurable = true;\n this.mask = null;\n }\n\n public destroy(): void\n {\n this.reset();\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { collectAllRenderables } from '../../../scene/container/utils/buildInstructions';\nimport { CLEAR } from '../../renderers/gl/const';\nimport { STENCIL_MODES } from '../../renderers/shared/state/const';\n\nimport type { Container } from '../../../scene/container/Container';\nimport type { Effect } from '../../../scene/container/Effect';\nimport type { Instruction } from '../../renderers/shared/instructions/Instruction';\nimport type { InstructionSet } from '../../renderers/shared/instructions/InstructionSet';\nimport type { InstructionPipe } from '../../renderers/shared/instructions/RenderPipe';\nimport type { Renderable } from '../../renderers/shared/Renderable';\nimport type { Renderer } from '../../renderers/types';\nimport type { StencilMask } from './StencilMask';\n\ntype MaskMode = 'pushMaskBegin' | 'pushMaskEnd' | 'popMaskBegin' | 'popMaskEnd';\n\nexport interface StencilMaskInstruction extends Instruction\n{\n renderPipeId: 'stencilMask',\n action: MaskMode,\n mask: StencilMask,\n}\n\nexport class StencilMaskPipe implements InstructionPipe\n{\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'stencilMask',\n } as const;\n\n private _renderer: Renderer;\n\n // used when building and also when executing..\n private _maskStackHash: Record = {};\n\n private _maskHash = new WeakMap();\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public push(mask: Effect, _container: Container, instructionSet: InstructionSet): void\n {\n const effect = mask as StencilMask;\n\n const renderer = this._renderer;\n\n renderer.renderPipes.batch.break(instructionSet);\n\n renderer.renderPipes.blendMode.setBlendMode(effect.mask as Renderable, 'none', instructionSet);\n\n instructionSet.add({\n renderPipeId: 'stencilMask',\n action: 'pushMaskBegin',\n mask,\n canBundle: false,\n } as StencilMaskInstruction);\n\n const maskContainer = effect.mask;\n\n maskContainer.includeInBuild = true;\n\n if (!this._maskHash.has(effect))\n {\n this._maskHash.set(effect, {\n instructionsStart: 0,\n instructionsLength: 0,\n });\n }\n\n const maskData = this._maskHash.get(effect);\n\n maskData.instructionsStart = instructionSet.instructionSize;\n\n collectAllRenderables(\n maskContainer,\n instructionSet,\n renderer.renderPipes,\n );\n\n maskContainer.includeInBuild = false;\n\n renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'stencilMask',\n action: 'pushMaskEnd',\n mask,\n canBundle: false,\n } as StencilMaskInstruction);\n\n const instructionsLength = instructionSet.instructionSize - maskData.instructionsStart - 1;\n\n maskData.instructionsLength = instructionsLength;\n\n const renderTargetUid = renderer.renderTarget.renderTarget.uid;\n\n this._maskStackHash[renderTargetUid] ??= 0;\n }\n\n public pop(mask: Effect, _container: Container, instructionSet: InstructionSet): void\n {\n const effect = mask as StencilMask;\n\n const renderer = this._renderer;\n\n // stencil is stored based on current render target..\n renderer.renderPipes.batch.break(instructionSet);\n renderer.renderPipes.blendMode.setBlendMode(effect.mask as Renderable, 'none', instructionSet);\n\n instructionSet.add({\n renderPipeId: 'stencilMask',\n action: 'popMaskBegin',\n canBundle: false,\n });\n\n const maskData = this._maskHash.get(mask as StencilMask);\n\n for (let i = 0; i < maskData.instructionsLength; i++)\n {\n // eslint-disable-next-line max-len\n instructionSet.instructions[instructionSet.instructionSize++] = instructionSet.instructions[maskData.instructionsStart++];\n }\n\n instructionSet.add({\n renderPipeId: 'stencilMask',\n action: 'popMaskEnd',\n canBundle: false,\n });\n }\n\n public execute(instruction: StencilMaskInstruction)\n {\n const renderer = this._renderer;\n const renderTargetUid = renderer.renderTarget.renderTarget.uid;\n\n let maskStackIndex = this._maskStackHash[renderTargetUid] ??= 0;\n\n if (instruction.action === 'pushMaskBegin')\n {\n // we create the depth and stencil buffers JIT\n // as no point allocating the memory if we don't use it\n renderer.renderTarget.ensureDepthStencil();\n\n renderer.stencil.setStencilMode(STENCIL_MODES.RENDERING_MASK_ADD, maskStackIndex);\n\n maskStackIndex++;\n\n renderer.colorMask.setMask(0);\n }\n else if (instruction.action === 'pushMaskEnd')\n {\n renderer.stencil.setStencilMode(STENCIL_MODES.MASK_ACTIVE, maskStackIndex);\n renderer.colorMask.setMask(0xF);\n }\n else if (instruction.action === 'popMaskBegin')\n {\n renderer.colorMask.setMask(0);\n\n if (maskStackIndex !== 0)\n {\n renderer.stencil.setStencilMode(STENCIL_MODES.RENDERING_MASK_REMOVE, maskStackIndex);\n }\n else\n {\n renderer.renderTarget.clear(null, CLEAR.STENCIL);\n renderer.stencil.setStencilMode(STENCIL_MODES.DISABLED, maskStackIndex);\n }\n\n maskStackIndex--;\n }\n else if (instruction.action === 'popMaskEnd')\n {\n renderer.stencil.setStencilMode(STENCIL_MODES.MASK_ACTIVE, maskStackIndex);\n\n renderer.colorMask.setMask(0xF);\n }\n\n this._maskStackHash[renderTargetUid] = maskStackIndex;\n }\n\n public destroy()\n {\n this._renderer = null;\n this._maskStackHash = null;\n this._maskHash = null;\n }\n}\n","/**\n * Constants for various buffer types in Pixi\n * @see BUFFER_TYPE\n * @name BUFFER_TYPE\n * @static\n * @enum {number}\n * @property {number} ELEMENT_ARRAY_BUFFER - buffer type for using as an index buffer\n * @property {number} ARRAY_BUFFER - buffer type for using attribute data\n * @property {number} UNIFORM_BUFFER - the buffer type is for uniform buffer objects\n */\nexport enum BUFFER_TYPE\n // eslint-disable-next-line @typescript-eslint/indent\n {\n ELEMENT_ARRAY_BUFFER = 34963,\n ARRAY_BUFFER = 34962,\n UNIFORM_BUFFER = 35345,\n}\n\n","import type { BUFFER_TYPE } from './const';\n\nexport class GlBuffer\n{\n public buffer: WebGLBuffer;\n public updateID: number;\n public byteLength: number;\n public type: number;\n\n constructor(buffer: WebGLBuffer, type: BUFFER_TYPE)\n {\n this.buffer = buffer || null;\n this.updateID = -1;\n this.byteLength = -1;\n this.type = type;\n }\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { BufferUsage } from '../../shared/buffer/const';\nimport { BUFFER_TYPE } from './const';\nimport { GlBuffer } from './GlBuffer';\n\nimport type { Buffer } from '../../shared/buffer/Buffer';\nimport type { System } from '../../shared/system/System';\nimport type { GlRenderingContext } from '../context/GlRenderingContext';\nimport type { WebGLRenderer } from '../WebGLRenderer';\n\n/**\n * System plugin to the renderer to manage buffers.\n *\n * WebGL uses Buffers as a way to store objects to the GPU.\n * This system makes working with them a lot easier.\n *\n * Buffers are used in three main places in WebGL\n * - geometry information\n * - Uniform information (via uniform buffer objects - a WebGL 2 only feature)\n * - Transform feedback information. (WebGL 2 only feature)\n *\n * This system will handle the binding of buffers to the GPU as well as uploading\n * them. With this system, you never need to work directly with GPU buffers, but instead work with\n * the Buffer class.\n * @class\n * @memberof rendering\n */\nexport class GlBufferSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ],\n name: 'buffer',\n } as const;\n\n private _gl: GlRenderingContext;\n private _gpuBuffers: {[key: number]: GlBuffer} = Object.create(null);\n\n /** Cache keeping track of the base bound buffer bases */\n private readonly _boundBufferBases: {[key: number]: Buffer} = Object.create(null);\n\n private _renderer: WebGLRenderer;\n\n /**\n * @param {Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: WebGLRenderer)\n {\n this._renderer = renderer;\n }\n\n /**\n * @ignore\n */\n public destroy(): void\n {\n this._renderer = null;\n this._gl = null;\n this._gpuBuffers = null;\n (this._boundBufferBases as null) = null;\n }\n\n /** Sets up the renderer context and necessary buffers. */\n protected contextChange(): void\n {\n this._gpuBuffers = Object.create(null);\n this._gl = this._renderer.gl;\n }\n\n public getGlBuffer(buffer: Buffer): GlBuffer\n {\n return this._gpuBuffers[buffer.uid] || this.createGLBuffer(buffer);\n }\n\n /**\n * This binds specified buffer. On first run, it will create the webGL buffers for the context too\n * @param buffer - the buffer to bind to the renderer\n */\n public bind(buffer: Buffer): void\n {\n const { _gl: gl } = this;\n\n const glBuffer = this.getGlBuffer(buffer);\n\n gl.bindBuffer(glBuffer.type, glBuffer.buffer);\n }\n\n /**\n * Binds an uniform buffer to at the given index.\n *\n * A cache is used so a buffer will not be bound again if already bound.\n * @param buffer - the buffer to bind\n * @param index - the base index to bind it to.\n */\n public bindBufferBase(buffer: Buffer, index: number): void\n {\n const { _gl: gl } = this;\n\n if (this._boundBufferBases[index] !== buffer)\n {\n const glBuffer = this.getGlBuffer(buffer);\n\n this._boundBufferBases[index] = buffer;\n\n gl.bindBufferBase(gl.UNIFORM_BUFFER, index, glBuffer.buffer);\n }\n }\n\n /**\n * Binds a buffer whilst also binding its range.\n * This will make the buffer start from the offset supplied rather than 0 when it is read.\n * @param buffer - the buffer to bind\n * @param index - the base index to bind at, defaults to 0\n * @param offset - the offset to bind at (this is blocks of 256). 0 = 0, 1 = 256, 2 = 512 etc\n */\n public bindBufferRange(buffer: Buffer, index?: number, offset?: number): void\n {\n const { _gl: gl } = this;\n\n offset = offset || 0;\n\n const glBuffer = this.getGlBuffer(buffer);\n\n gl.bindBufferRange(gl.UNIFORM_BUFFER, index || 0, glBuffer.buffer, offset * 256, 256);\n }\n\n /**\n * Will ensure the data in the buffer is uploaded to the GPU.\n * @param {Buffer} buffer - the buffer to update\n */\n public updateBuffer(buffer: Buffer): GlBuffer\n {\n const { _gl: gl } = this;\n\n const glBuffer = this.getGlBuffer(buffer);\n\n if (buffer._updateID === glBuffer.updateID)\n {\n return glBuffer;\n }\n\n glBuffer.updateID = buffer._updateID;\n\n gl.bindBuffer(glBuffer.type, glBuffer.buffer);\n\n const data = buffer.data;\n\n if (glBuffer.byteLength >= buffer.data.byteLength)\n {\n // assuming our buffers are aligned to 4 bits...\n // offset is always zero for now!\n gl.bufferSubData(glBuffer.type, 0, data, 0, buffer._updateSize / data.BYTES_PER_ELEMENT);\n }\n else\n {\n const drawType = (buffer.descriptor.usage & BufferUsage.STATIC) ? gl.STATIC_DRAW : gl.DYNAMIC_DRAW;\n\n glBuffer.byteLength = data.byteLength;\n\n // assuming our buffers are aligned to 4 bits...\n gl.bufferData(glBuffer.type, data, drawType);\n }\n\n return glBuffer;\n }\n\n /** dispose all WebGL resources of all managed buffers */\n public destroyAll(): void\n {\n const gl = this._gl;\n\n for (const id in this._gpuBuffers)\n {\n gl.deleteBuffer(this._gpuBuffers[id].buffer);\n }\n\n this._gpuBuffers = Object.create(null);\n }\n\n /**\n * Disposes buffer\n * @param {Buffer} buffer - buffer with data\n * @param {boolean} [contextLost=false] - If context was lost, we suppress deleteVertexArray\n */\n protected onBufferDestroy(buffer: Buffer, contextLost?: boolean): void\n {\n const glBuffer = this._gpuBuffers[buffer.uid];\n\n const gl = this._gl;\n\n if (!contextLost)\n {\n gl.deleteBuffer(glBuffer.buffer);\n }\n\n this._gpuBuffers[buffer.uid] = null;\n }\n\n /**\n * creates and attaches a GLBuffer object tied to the current context.\n * @param buffer\n * @protected\n */\n protected createGLBuffer(buffer: Buffer): GlBuffer\n {\n const { _gl: gl } = this;\n\n let type = BUFFER_TYPE.ARRAY_BUFFER;\n\n if ((buffer.descriptor.usage & BufferUsage.INDEX))\n {\n type = BUFFER_TYPE.ELEMENT_ARRAY_BUFFER;\n }\n else if ((buffer.descriptor.usage & BufferUsage.UNIFORM))\n {\n type = BUFFER_TYPE.UNIFORM_BUFFER;\n }\n\n const glBuffer = new GlBuffer(gl.createBuffer(), type);\n\n this._gpuBuffers[buffer.uid] = glBuffer;\n\n buffer.on('destroy', this.onBufferDestroy, this);\n\n return glBuffer;\n }\n}\n","import { DOMAdapter } from '../../../../environment/adapter';\nimport { ExtensionType } from '../../../../extensions/Extensions';\nimport { warn } from '../../../../utils/logging/warn';\nimport { type GpuPowerPreference } from '../../types';\n\nimport type { System } from '../../shared/system/System';\nimport type { WebGLRenderer } from '../WebGLRenderer';\nimport type { WebGLExtensions } from './WebGLExtensions';\n\n/**\n * Options for the context system.\n * @memberof rendering\n * @property {WebGL2RenderingContext | null} [context=null] - User-provided WebGL rendering context object.\n * @property {GpuPowerPreference} [powerPreference='default'] - An optional hint indicating what configuration\n * of GPU is suitable for the WebGL context, can be `'high-performance'` or `'low-power'`. Setting to `'high-performance'`\n * will prioritize rendering performance over power consumption, while setting to `'low-power'` will prioritize power saving\n * over rendering performance.\n * @property {boolean} [premultipliedAlpha=true] - Whether the compositor will assume the drawing buffer contains\n * colors with premultiplied alpha.\n * @property {boolean} [preserveDrawingBuffer=false] - Whether to enable drawing buffer preservation.\n * If enabled, the drawing buffer will preserve\n * its value until cleared or overwritten. Enable this if you need to call `toDataUrl` on the WebGL context.\n * @property {boolean} [antialias] - Whether to enable antialiasing.\n * @property {1 | 2} [preferWebGLVersion=2] - The preferred WebGL version to use.\n */\nexport interface ContextSystemOptions\n{\n /**\n * User-provided WebGL rendering context object.\n * @default null\n * @memberof rendering.SharedRendererOptions\n */\n context: WebGL2RenderingContext | null;\n /**\n * An optional hint indicating what configuration of GPU is suitable for the WebGL context,\n * can be `'high-performance'` or `'low-power'`.\n * Setting to `'high-performance'` will prioritize rendering performance over power consumption,\n * while setting to `'low-power'` will prioritize power saving over rendering performance.\n * @memberof rendering.SharedRendererOptions\n * @default undefined\n */\n powerPreference?: GpuPowerPreference;\n\n /**\n * Whether the compositor will assume the drawing buffer contains colors with premultiplied alpha.\n * @default true\n * @memberof rendering.SharedRendererOptions\n */\n premultipliedAlpha: boolean;\n /**\n * Whether to enable drawing buffer preservation. If enabled, the drawing buffer will preserve\n * its value until cleared or overwritten. Enable this if you need to call `toDataUrl` on the WebGL context.\n * @default false\n * @memberof rendering.SharedRendererOptions\n */\n preserveDrawingBuffer: boolean;\n\n antialias?: boolean;\n\n /**\n * The preferred WebGL version to use.\n * @default 2\n * @memberof rendering.SharedRendererOptions\n */\n preferWebGLVersion?: 1 | 2;\n}\n\n/**\n * System plugin to the renderer to manage the context\n * @memberof rendering\n */\nexport class GlContextSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ],\n name: 'context',\n } as const;\n\n /** The default options for the system. */\n public static defaultOptions: ContextSystemOptions = {\n /**\n * {@link WebGLOptions.context}\n * @default null\n */\n context: null,\n /**\n * {@link WebGLOptions.premultipliedAlpha}\n * @default true\n */\n premultipliedAlpha: true,\n /**\n * {@link WebGLOptions.preserveDrawingBuffer}\n * @default false\n */\n preserveDrawingBuffer: false,\n /**\n * {@link WebGLOptions.powerPreference}\n * @default default\n */\n powerPreference: undefined,\n /**\n * {@link WebGLOptions.webGLVersion}\n * @default 2\n */\n preferWebGLVersion: 2,\n };\n\n protected CONTEXT_UID: number;\n protected gl: WebGL2RenderingContext;\n\n /**\n * Features supported by current renderer.\n * @type {object}\n * @readonly\n */\n public supports = {\n /** Support for 32-bit indices buffer. */\n uint32Indices: true,\n /** Support for UniformBufferObjects */\n uniformBufferObject: true,\n /** Support for VertexArrayObjects */\n vertexArrayObject: true,\n /** Support for SRGB texture format */\n srgbTextures: true,\n /** Support for wrapping modes if a texture is non-power of two */\n nonPowOf2wrapping: true,\n /** Support for MSAA (antialiasing of dynamic textures) */\n msaa: true,\n /** Support for mipmaps if a texture is non-power of two */\n nonPowOf2mipmaps: true,\n };\n\n /**\n * Extensions available.\n * @type {object}\n * @readonly\n * @property {WEBGL_draw_buffers} drawBuffers - WebGL v1 extension\n * @property {WEBGL_depth_texture} depthTexture - WebGL v1 extension\n * @property {OES_texture_float} floatTexture - WebGL v1 extension\n * @property {WEBGL_lose_context} loseContext - WebGL v1 extension\n * @property {OES_vertex_array_object} vertexArrayObject - WebGL v1 extension\n * @property {EXT_texture_filter_anisotropic} anisotropicFiltering - WebGL v1 and v2 extension\n */\n public extensions: WebGLExtensions;\n\n public webGLVersion: 1 | 2;\n\n private _renderer: WebGLRenderer;\n private _contextLossForced: boolean;\n\n /** @param renderer - The renderer this System works for. */\n constructor(renderer: WebGLRenderer)\n {\n this._renderer = renderer;\n\n this.extensions = Object.create(null);\n\n // Bind functions\n this.handleContextLost = this.handleContextLost.bind(this);\n this.handleContextRestored = this.handleContextRestored.bind(this);\n }\n\n /**\n * `true` if the context is lost\n * @readonly\n */\n get isLost(): boolean\n {\n return (!this.gl || this.gl.isContextLost());\n }\n\n /**\n * Handles the context change event.\n * @param {WebGLRenderingContext} gl - New WebGL context.\n */\n protected contextChange(gl: WebGL2RenderingContext): void\n {\n this.gl = gl;\n this._renderer.gl = gl;\n }\n\n public init(options: ContextSystemOptions): void\n {\n options = { ...GlContextSystem.defaultOptions, ...options };\n\n /*\n * The options passed in to create a new WebGL context.\n */\n if (options.context)\n {\n this.initFromContext(options.context);\n }\n else\n {\n const alpha = this._renderer.background.alpha < 1;\n const premultipliedAlpha = options.premultipliedAlpha ?? true;\n const antialias = options.antialias && !this._renderer.backBuffer.useBackBuffer;\n\n this.createContext(options.preferWebGLVersion, {\n alpha,\n premultipliedAlpha,\n antialias,\n stencil: true,\n preserveDrawingBuffer: options.preserveDrawingBuffer,\n powerPreference: options.powerPreference ?? 'default',\n });\n }\n }\n\n /**\n * Initializes the context.\n * @protected\n * @param {WebGLRenderingContext} gl - WebGL context\n */\n protected initFromContext(gl: WebGL2RenderingContext): void\n {\n this.gl = gl;\n\n this.webGLVersion = gl instanceof DOMAdapter.get().getWebGLRenderingContext() ? 1 : 2;\n\n this.getExtensions();\n\n this.validateContext(gl);\n\n this._renderer.runners.contextChange.emit(gl);\n\n const element = this._renderer.view.canvas;\n\n (element as any).addEventListener('webglcontextlost', this.handleContextLost, false);\n element.addEventListener('webglcontextrestored', this.handleContextRestored, false);\n }\n\n /**\n * Initialize from context options\n * @protected\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext\n * @param preferWebGLVersion\n * @param {object} options - context attributes\n */\n protected createContext(preferWebGLVersion: 1 | 2, options: WebGLContextAttributes): void\n {\n let gl: WebGL2RenderingContext | WebGLRenderingContext;\n const canvas = this._renderer.view.canvas;\n\n if (preferWebGLVersion === 2)\n {\n gl = canvas.getContext('webgl2', options);\n }\n\n if (!gl)\n {\n gl = canvas.getContext('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\n this.gl = gl as WebGL2RenderingContext;\n\n this.initFromContext(this.gl);\n }\n\n /** Auto-populate the {@link GlContextSystem.extensions extensions}. */\n protected getExtensions(): void\n {\n // time to set up default extensions that Pixi uses.\n const { gl } = this;\n\n const common = {\n anisotropicFiltering: gl.getExtension('EXT_texture_filter_anisotropic'),\n floatTextureLinear: gl.getExtension('OES_texture_float_linear'),\n\n s3tc: gl.getExtension('WEBGL_compressed_texture_s3tc'),\n s3tc_sRGB: gl.getExtension('WEBGL_compressed_texture_s3tc_srgb'), // eslint-disable-line camelcase\n etc: gl.getExtension('WEBGL_compressed_texture_etc'),\n etc1: gl.getExtension('WEBGL_compressed_texture_etc1'),\n pvrtc: gl.getExtension('WEBGL_compressed_texture_pvrtc')\n || gl.getExtension('WEBKIT_WEBGL_compressed_texture_pvrtc'),\n atc: gl.getExtension('WEBGL_compressed_texture_atc'),\n astc: gl.getExtension('WEBGL_compressed_texture_astc'),\n bptc: gl.getExtension('EXT_texture_compression_bptc'),\n rgtc: gl.getExtension('EXT_texture_compression_rgtc'),\n loseContext: gl.getExtension('WEBGL_lose_context'),\n };\n\n if (this.webGLVersion === 1)\n {\n this.extensions = {\n ...common,\n\n drawBuffers: gl.getExtension('WEBGL_draw_buffers'),\n depthTexture: gl.getExtension('WEBGL_depth_texture'),\n vertexArrayObject: gl.getExtension('OES_vertex_array_object')\n || gl.getExtension('MOZ_OES_vertex_array_object')\n || gl.getExtension('WEBKIT_OES_vertex_array_object'),\n uint32ElementIndex: gl.getExtension('OES_element_index_uint'),\n // Floats and half-floats\n floatTexture: gl.getExtension('OES_texture_float'),\n floatTextureLinear: gl.getExtension('OES_texture_float_linear'),\n textureHalfFloat: gl.getExtension('OES_texture_half_float'),\n textureHalfFloatLinear: gl.getExtension('OES_texture_half_float_linear'),\n vertexAttribDivisorANGLE: gl.getExtension('ANGLE_instanced_arrays'),\n srgb: gl.getExtension('EXT_sRGB'),\n };\n }\n else\n {\n this.extensions = {\n ...common,\n colorBufferFloat: gl.getExtension('EXT_color_buffer_float'),\n };\n\n const provokeExt = gl.getExtension('WEBGL_provoking_vertex');\n\n if (provokeExt)\n {\n provokeExt.provokingVertexWEBGL(provokeExt.FIRST_VERTEX_CONVENTION_WEBGL);\n }\n }\n }\n\n /**\n * Handles a lost webgl context\n * @param {WebGLContextEvent} event - The context lost event.\n */\n protected handleContextLost(event: WebGLContextEvent): void\n {\n event.preventDefault();\n\n // only restore if we purposefully nuked it\n if (this._contextLossForced)\n {\n this._contextLossForced = false;\n // Restore the context after this event has exited\n setTimeout(() =>\n {\n if (this.gl.isContextLost())\n {\n this.extensions.loseContext?.restoreContext();\n }\n }, 0);\n }\n }\n\n /** Handles a restored webgl context. */\n protected handleContextRestored(): void\n {\n this._renderer.runners.contextChange.emit(this.gl);\n }\n\n public destroy(): void\n {\n const element = this._renderer.view.canvas;\n\n this._renderer = null;\n\n // remove listeners\n (element as any).removeEventListener('webglcontextlost', this.handleContextLost);\n element.removeEventListener('webglcontextrestored', this.handleContextRestored);\n\n this.gl.useProgram(null);\n\n this.extensions.loseContext?.loseContext();\n }\n\n /**\n * this function can be called to force a webGL context loss\n * this will release all resources on the GPU.\n * Useful if you need to put Pixi to sleep, and save some GPU memory\n *\n * As soon as render is called - all resources will be created again.\n */\n public forceContextLoss(): void\n {\n this.extensions.loseContext?.loseContext();\n this._contextLossForced = true;\n }\n /**\n * Validate context.\n * @param {WebGLRenderingContext} gl - Render context.\n */\n protected validateContext(gl: WebGL2RenderingContext): void\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 && !attributes.stencil)\n {\n // #if _DEBUG\n /* eslint-disable max-len, no-console */\n warn('Provided WebGL context does not have a stencil buffer, masks may not render correctly');\n /* eslint-enable max-len, no-console */\n // #endif\n }\n\n // support\n const supports = this.supports;\n\n const isWebGl2 = this.webGLVersion === 2;\n const extensions = this.extensions;\n\n supports.uint32Indices = isWebGl2 || !!extensions.uint32ElementIndex;\n supports.uniformBufferObject = isWebGl2;\n supports.vertexArrayObject = isWebGl2 || !!extensions.vertexArrayObject;\n supports.srgbTextures = isWebGl2 || !!extensions.srgb;\n supports.nonPowOf2wrapping = isWebGl2;\n supports.nonPowOf2mipmaps = isWebGl2;\n supports.msaa = isWebGl2;\n\n if (!supports.uint32Indices)\n {\n // #if _DEBUG\n /* eslint-disable max-len, no-console */\n warn('Provided WebGL context does not support 32 index buffer, large scenes may not render correctly');\n /* eslint-enable max-len, no-console */\n // #endif\n }\n }\n}\n","import { warn } from '../../../../../utils/logging/warn';\nimport { getAttributeInfoFromFormat } from '../../../shared/geometry/utils/getAttributeInfoFromFormat';\n\nimport type { Geometry } from '../../../shared/geometry/Geometry';\nimport type { ExtractedAttributeData } from './extractAttributesFromGlProgram';\n\n/**\n * This function looks at the attribute information provided to the geometry and attempts\n * to fill in an gaps. WE do this by looking at the extracted data from the shader and\n * making best guesses.\n *\n * Most of th etime users don't need to provide all the attribute info beyond the data itself, so we\n * can fill in the gaps for them. If you are using attributes in a more advanced way, you can\n * don't forget to add all the info at creation!\n * @param geometry - the geometry to ensure attributes for\n * @param extractedData - the extracted data from the shader\n */\nexport function ensureAttributes(\n geometry: Geometry,\n extractedData: Record\n): void\n{\n for (const i in geometry.attributes)\n {\n const attribute = geometry.attributes[i];\n const attributeData = extractedData[i];\n\n if (attributeData)\n {\n attribute.location ??= attributeData.location;\n attribute.format ??= attributeData.format;\n attribute.offset ??= attributeData.offset;\n attribute.instance ??= attributeData.instance;\n }\n else\n {\n // eslint-disable-next-line max-len\n warn(`Attribute ${i} is not present in the shader, but is present in the geometry. Unable to infer attribute details.`);\n }\n }\n\n ensureStartAndStride(geometry);\n}\n\nfunction ensureStartAndStride(geometry: Geometry): void\n{\n const { buffers, attributes } = geometry;\n\n const tempStride: Record = {};\n const tempStart: Record = {};\n\n for (const j in buffers)\n {\n const buffer = buffers[j];\n\n tempStride[buffer.uid] = 0;\n tempStart[buffer.uid] = 0;\n }\n\n for (const j in attributes)\n {\n const attribute = attributes[j];\n\n tempStride[attribute.buffer.uid] += getAttributeInfoFromFormat(attribute.format).stride;\n }\n\n for (const j in attributes)\n {\n const attribute = attributes[j];\n\n attribute.stride ??= tempStride[attribute.buffer.uid];\n\n attribute.start ??= tempStart[attribute.buffer.uid];\n\n tempStart[attribute.buffer.uid] += getAttributeInfoFromFormat(attribute.format).stride;\n }\n}\n","/**\n * Various GL texture/resources formats.\n * @static\n * @name FORMATS\n * @enum {number}\n * @property {number} [RGBA=6408] -\n * @property {number} [RGB=6407] -\n * @property {number} [RG=33319] -\n * @property {number} [RED=6403] -\n * @property {number} [RGBA_INTEGER=36249] -\n * @property {number} [RGB_INTEGER=36248] -\n * @property {number} [RG_INTEGER=33320] -\n * @property {number} [RED_INTEGER=36244] -\n * @property {number} [ALPHA=6406] -\n * @property {number} [LUMINANCE=6409] -\n * @property {number} [LUMINANCE_ALPHA=6410] -\n * @property {number} [DEPTH_COMPONENT=6402] -\n * @property {number} [DEPTH_STENCIL=34041] -\n */\nexport enum GL_FORMATS\n// eslint-disable-next-line @typescript-eslint/indent\n{\n RGBA = 6408,\n RGB = 6407,\n RG = 33319,\n RED = 6403,\n RGBA_INTEGER = 36249,\n RGB_INTEGER = 36248,\n RG_INTEGER = 33320,\n RED_INTEGER = 36244,\n ALPHA = 6406,\n LUMINANCE = 6409,\n LUMINANCE_ALPHA = 6410,\n DEPTH_COMPONENT = 6402,\n DEPTH_STENCIL = 34041,\n}\n\n/**\n * Various GL target types.\n * @static\n * @name TARGETS\n * @enum {number}\n * @property {number} [TEXTURE_2D=3553] -\n * @property {number} [TEXTURE_CUBE_MAP=34067] -\n * @property {number} [TEXTURE_2D_ARRAY=35866] -\n * @property {number} [TEXTURE_CUBE_MAP_POSITIVE_X=34069] -\n * @property {number} [TEXTURE_CUBE_MAP_NEGATIVE_X=34070] -\n * @property {number} [TEXTURE_CUBE_MAP_POSITIVE_Y=34071] -\n * @property {number} [TEXTURE_CUBE_MAP_NEGATIVE_Y=34072] -\n * @property {number} [TEXTURE_CUBE_MAP_POSITIVE_Z=34073] -\n * @property {number} [TEXTURE_CUBE_MAP_NEGATIVE_Z=34074] -\n */\nexport enum GL_TARGETS\n // eslint-disable-next-line @typescript-eslint/indent\n {\n TEXTURE_2D = 3553,\n TEXTURE_CUBE_MAP = 34067,\n TEXTURE_2D_ARRAY = 35866,\n TEXTURE_CUBE_MAP_POSITIVE_X = 34069,\n TEXTURE_CUBE_MAP_NEGATIVE_X = 34070,\n TEXTURE_CUBE_MAP_POSITIVE_Y = 34071,\n TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072,\n TEXTURE_CUBE_MAP_POSITIVE_Z = 34073,\n TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074,\n}\n\n/**\n * The wrap modes that are supported by pixi.\n *\n * The {@link 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 * @name WRAP_MODES\n * @static\n * @enum {number}\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 enum GL_WRAP_MODES\n // eslint-disable-next-line @typescript-eslint/indent\n {\n CLAMP = 33071,\n REPEAT = 10497,\n MIRRORED_REPEAT = 33648,\n}\n\nexport enum GL_TYPES\n// eslint-disable-next-line @typescript-eslint/indent\n{\n /**\n * 8 bits per channel for gl.RGBA\n * @default 5121\n */\n UNSIGNED_BYTE = 5121,\n /**\n * @default 5123\n */\n UNSIGNED_SHORT = 5123,\n /**\n * 5 red bits, 6 green bits, 5 blue bits.\n * @default 33635\n */\n UNSIGNED_SHORT_5_6_5 = 33635,\n /**\n * 4 red bits, 4 green bits, 4 blue bits, 4 alpha bits.\n * @default 32819\n */\n UNSIGNED_SHORT_4_4_4_4 = 32819,\n /**\n * 5 red bits, 5 green bits, 5 blue bits, 1 alpha bit.\n * @default 32820\n */\n UNSIGNED_SHORT_5_5_5_1 = 32820,\n /**\n * @default 5125\n */\n UNSIGNED_INT = 5125,\n /**\n * @default 35899\n */\n UNSIGNED_INT_10F_11F_11F_REV = 35899,\n /**\n * @default 33640\n */\n UNSIGNED_INT_2_10_10_10_REV = 33640,\n /**\n * @default 34042\n */\n UNSIGNED_INT_24_8 = 34042,\n /**\n * @default 35902\n */\n UNSIGNED_INT_5_9_9_9_REV = 35902,\n /**\n * @default 5120\n */\n BYTE = 5120,\n /**\n * @default 5122\n */\n SHORT = 5122,\n /**\n * @default 5124\n */\n INT = 5124,\n /**\n * @default 5126\n */\n FLOAT = 5126,\n /**\n * @default 36269\n */\n FLOAT_32_UNSIGNED_INT_24_8_REV = 36269,\n /**\n * @default 36193\n */\n HALF_FLOAT = 36193,\n}\n\n","import { GL_TYPES } from '../../texture/const';\n\nimport type { VertexFormat } from '../../../shared/geometry/const';\n\nconst infoMap = {\n uint8x2: GL_TYPES.UNSIGNED_BYTE,\n uint8x4: GL_TYPES.UNSIGNED_BYTE,\n sint8x2: GL_TYPES.BYTE,\n sint8x4: GL_TYPES.BYTE,\n unorm8x2: GL_TYPES.UNSIGNED_BYTE,\n unorm8x4: GL_TYPES.UNSIGNED_BYTE,\n snorm8x2: GL_TYPES.BYTE,\n snorm8x4: GL_TYPES.BYTE,\n uint16x2: GL_TYPES.UNSIGNED_SHORT,\n uint16x4: GL_TYPES.UNSIGNED_SHORT,\n sint16x2: GL_TYPES.SHORT,\n sint16x4: GL_TYPES.SHORT,\n unorm16x2: GL_TYPES.UNSIGNED_SHORT,\n unorm16x4: GL_TYPES.UNSIGNED_SHORT,\n snorm16x2: GL_TYPES.SHORT,\n snorm16x4: GL_TYPES.SHORT,\n float16x2: GL_TYPES.HALF_FLOAT,\n float16x4: GL_TYPES.HALF_FLOAT,\n float32: GL_TYPES.FLOAT,\n float32x2: GL_TYPES.FLOAT,\n float32x3: GL_TYPES.FLOAT,\n float32x4: GL_TYPES.FLOAT,\n uint32: GL_TYPES.UNSIGNED_INT,\n uint32x2: GL_TYPES.UNSIGNED_INT,\n uint32x3: GL_TYPES.UNSIGNED_INT,\n uint32x4: GL_TYPES.UNSIGNED_INT,\n sint32: GL_TYPES.INT,\n sint32x2: GL_TYPES.INT,\n sint32x3: GL_TYPES.INT,\n sint32x4: GL_TYPES.INT\n};\n\nexport function getGlTypeFromFormat(format: VertexFormat): number\n{\n return infoMap[format] ?? infoMap.float32;\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { getAttributeInfoFromFormat } from '../../shared/geometry/utils/getAttributeInfoFromFormat';\nimport { ensureAttributes } from '../shader/program/ensureAttributes';\nimport { getGlTypeFromFormat } from './utils/getGlTypeFromFormat';\n\nimport type { Topology } from '../../shared/geometry/const';\nimport type { Geometry } from '../../shared/geometry/Geometry';\nimport type { System } from '../../shared/system/System';\nimport type { GlRenderingContext } from '../context/GlRenderingContext';\nimport type { GlProgram } from '../shader/GlProgram';\nimport type { WebGLRenderer } from '../WebGLRenderer';\n\nconst topologyToGlMap = {\n 'point-list': 0x0000,\n 'line-list': 0x0001,\n 'line-strip': 0x0003,\n 'triangle-list': 0x0004,\n 'triangle-strip': 0x0005\n};\n\n/**\n * System plugin to the renderer to manage geometry.\n * @memberof rendering\n */\nexport class GlGeometrySystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ],\n name: 'geometry',\n } as const;\n\n /**\n * `true` if we has `*_vertex_array_object` extension.\n * @readonly\n */\n public hasVao: boolean;\n\n /**\n * `true` if has `ANGLE_instanced_arrays` extension.\n * @readonly\n */\n public hasInstance: boolean;\n\n protected gl: GlRenderingContext;\n protected _activeGeometry: Geometry;\n protected _activeVao: WebGLVertexArrayObject;\n\n protected _geometryVaoHash: Record> = Object.create(null);\n\n /** Renderer that owns this {@link GeometrySystem}. */\n private _renderer: WebGLRenderer;\n\n /** @param renderer - The renderer this System works for. */\n constructor(renderer: WebGLRenderer)\n {\n this._renderer = renderer;\n this._activeGeometry = null;\n this._activeVao = null;\n\n this.hasVao = true;\n this.hasInstance = true;\n }\n\n /** Sets up the renderer context and necessary buffers. */\n protected contextChange(): void\n {\n const gl = this.gl = this._renderer.gl;\n\n if (!this._renderer.context.supports.vertexArrayObject)\n {\n throw new Error('[PixiJS] Vertex Array Objects are not supported on this device');\n }\n\n const nativeVaoExtension = this._renderer.context.extensions.vertexArrayObject;\n\n if (nativeVaoExtension)\n {\n gl.createVertexArray = (): WebGLVertexArrayObject =>\n nativeVaoExtension.createVertexArrayOES();\n\n gl.bindVertexArray = (vao): void =>\n nativeVaoExtension.bindVertexArrayOES(vao);\n\n gl.deleteVertexArray = (vao): void =>\n nativeVaoExtension.deleteVertexArrayOES(vao);\n }\n\n const nativeInstancedExtension = this._renderer.context.extensions.vertexAttribDivisorANGLE;\n\n if (nativeInstancedExtension)\n {\n gl.drawArraysInstanced = (a, b, c, d): void =>\n {\n nativeInstancedExtension.drawArraysInstancedANGLE(a, b, c, d);\n };\n\n gl.drawElementsInstanced = (a, b, c, d, e): void =>\n {\n nativeInstancedExtension.drawElementsInstancedANGLE(a, b, c, d, e);\n };\n\n gl.vertexAttribDivisor = (a, b): void =>\n nativeInstancedExtension.vertexAttribDivisorANGLE(a, b);\n }\n\n this._activeGeometry = null;\n this._activeVao = null;\n this._geometryVaoHash = Object.create(null);\n }\n\n /**\n * Binds geometry so that is can be drawn. Creating a Vao if required\n * @param geometry - Instance of geometry to bind.\n * @param program - Instance of program to use vao for.\n */\n public bind(geometry?: Geometry, program?: GlProgram): void\n {\n // shader = shader || this.renderer.shader.shader;\n\n const gl = this.gl;\n\n this._activeGeometry = geometry;\n\n const vao = this.getVao(geometry, program);\n\n if (this._activeVao !== vao)\n {\n this._activeVao = vao;\n\n gl.bindVertexArray(vao);\n }\n\n this.updateBuffers();\n }\n\n /** Reset and unbind any active VAO and geometry. */\n public reset(): void\n {\n this.unbind();\n }\n\n /** Update buffers of the currently bound geometry. */\n public updateBuffers(): void\n {\n const geometry = this._activeGeometry;\n\n const bufferSystem = this._renderer.buffer;\n\n for (let i = 0; i < geometry.buffers.length; i++)\n {\n const buffer = geometry.buffers[i];\n\n bufferSystem.updateBuffer(buffer);\n }\n }\n\n /**\n * Check compatibility between a geometry and a program\n * @param geometry - Geometry instance.\n * @param program - Program instance.\n */\n protected checkCompatibility(geometry: Geometry, program: GlProgram): void\n {\n // geometry must have at least all the attributes that the shader requires.\n const geometryAttributes = geometry.attributes;\n const shaderAttributes = program._attributeData;\n\n for (const j in shaderAttributes)\n {\n if (!geometryAttributes[j])\n {\n throw new Error(`shader and geometry incompatible, geometry missing the \"${j}\" attribute`);\n }\n }\n }\n\n /**\n * Takes a geometry and program and generates a unique signature for them.\n * @param geometry - To get signature from.\n * @param program - To test geometry against.\n * @returns - Unique signature of the geometry and program\n */\n protected getSignature(geometry: Geometry, program: GlProgram): string\n {\n const attribs = geometry.attributes;\n const shaderAttributes = program._attributeData;\n\n const strings = ['g', geometry.uid];\n\n for (const i in attribs)\n {\n if (shaderAttributes[i])\n {\n strings.push(i, shaderAttributes[i].location);\n }\n }\n\n return strings.join('-');\n }\n\n protected getVao(geometry: Geometry, program: GlProgram): WebGLVertexArrayObject\n {\n return this._geometryVaoHash[geometry.uid]?.[program._key] || this.initGeometryVao(geometry, program);\n }\n\n /**\n * Creates or gets Vao with the same structure as the geometry and stores it on the geometry.\n * If vao is created, it is bound automatically. We use a shader to infer what and how to set up the\n * attribute locations.\n * @param geometry - Instance of geometry to to generate Vao for.\n * @param program\n * @param _incRefCount - Increment refCount of all geometry buffers.\n */\n protected initGeometryVao(geometry: Geometry, program: GlProgram, _incRefCount = true): WebGLVertexArrayObject\n {\n const gl = this._renderer.gl;\n // const CONTEXT_UID = this.CONTEXT_UID;\n const bufferSystem = this._renderer.buffer;\n\n this._renderer.shader._getProgramData(program);\n\n this.checkCompatibility(geometry, program);\n\n const signature = this.getSignature(geometry, program);\n\n if (!this._geometryVaoHash[geometry.uid])\n {\n this._geometryVaoHash[geometry.uid] = Object.create(null);\n\n geometry.on('destroy', this.onGeometryDestroy, this);\n }\n\n const vaoObjectHash = this._geometryVaoHash[geometry.uid];\n\n let vao = vaoObjectHash[signature];\n\n if (vao)\n {\n // this will give us easy access to the vao\n vaoObjectHash[program._key] = vao;\n\n return vao;\n }\n\n ensureAttributes(geometry, program._attributeData);\n\n const buffers = geometry.buffers;\n\n // @TODO: We don't know if VAO is supported.\n vao = gl.createVertexArray();\n\n gl.bindVertexArray(vao);\n\n // first update - and create the buffers!\n // only create a gl buffer if it actually gets\n for (let i = 0; i < buffers.length; i++)\n {\n const buffer = buffers[i];\n\n bufferSystem.bind(buffer);\n }\n\n // TODO - maybe make this a data object?\n // lets wait to see if we need to first!\n\n this.activateVao(geometry, program);\n\n // add it to the cache!\n vaoObjectHash[program._key] = vao;\n vaoObjectHash[signature] = vao;\n\n gl.bindVertexArray(null);\n\n return vao;\n }\n\n /**\n * Disposes geometry.\n * @param geometry - Geometry with buffers. Only VAO will be disposed\n * @param [contextLost=false] - If context was lost, we suppress deleteVertexArray\n */\n protected onGeometryDestroy(geometry: Geometry, contextLost?: boolean): void\n {\n const vaoObjectHash = this._geometryVaoHash[geometry.uid];\n\n const gl = this.gl;\n\n if (vaoObjectHash)\n {\n if (contextLost)\n {\n for (const i in vaoObjectHash)\n {\n if (this._activeVao !== vaoObjectHash[i])\n {\n this.unbind();\n }\n\n gl.deleteVertexArray(vaoObjectHash[i]);\n }\n }\n\n this._geometryVaoHash[geometry.uid] = null;\n }\n }\n\n /**\n * Dispose all WebGL resources of all managed geometries.\n * @param [contextLost=false] - If context was lost, we suppress `gl.delete` calls\n */\n public destroyAll(contextLost = false): void\n {\n const gl = this.gl;\n\n for (const i in this._geometryVaoHash)\n {\n if (contextLost)\n {\n for (const j in this._geometryVaoHash[i])\n {\n const vaoObjectHash = this._geometryVaoHash[i];\n\n if (this._activeVao !== vaoObjectHash)\n {\n this.unbind();\n }\n\n gl.deleteVertexArray(vaoObjectHash[j]);\n }\n }\n\n this._geometryVaoHash[i] = null;\n }\n }\n\n /**\n * Activate vertex array object.\n * @param geometry - Geometry instance.\n * @param program - Shader program instance.\n */\n protected activateVao(geometry: Geometry, program: GlProgram): void\n {\n const gl = this._renderer.gl;\n\n const bufferSystem = this._renderer.buffer;\n const attributes = geometry.attributes;\n\n if (geometry.indexBuffer)\n {\n // first update the index buffer if we have one..\n bufferSystem.bind(geometry.indexBuffer);\n }\n\n let lastBuffer = null;\n\n // add a new one!\n for (const j in attributes)\n {\n const attribute = attributes[j];\n const buffer = attribute.buffer;\n const glBuffer = bufferSystem.getGlBuffer(buffer);\n const programAttrib = program._attributeData[j];\n\n if (programAttrib)\n {\n if (lastBuffer !== glBuffer)\n {\n bufferSystem.bind(buffer);\n\n lastBuffer = glBuffer;\n }\n\n const location = attribute.location;\n\n // TODO introduce state again\n // we can optimise this for older devices that have no VAOs\n gl.enableVertexAttribArray(location);\n\n const attributeInfo = getAttributeInfoFromFormat(attribute.format);\n\n const type = getGlTypeFromFormat(attribute.format);\n\n if (programAttrib.format?.substring(1, 4) === 'int')\n {\n gl.vertexAttribIPointer(location,\n attributeInfo.size,\n type,\n attribute.stride,\n attribute.offset);\n }\n else\n {\n gl.vertexAttribPointer(location,\n attributeInfo.size,\n type,\n attributeInfo.normalised,\n attribute.stride,\n attribute.offset);\n }\n\n if (attribute.instance)\n {\n // TODO calculate instance count based of this...\n if (this.hasInstance)\n {\n // Can't use truthiness check to determine if divisor is set,\n // since 0 is a valid value for divisor\n const divisor = attribute.divisor ?? 1;\n\n gl.vertexAttribDivisor(location, divisor);\n }\n else\n {\n throw new Error('geometry error, GPU Instancing is not supported on this device');\n }\n }\n }\n }\n }\n\n /**\n * Draws the currently bound geometry.\n * @param topology - The type primitive to render.\n * @param size - The number of elements to be rendered. If not specified, all vertices after the\n * starting vertex will be drawn.\n * @param start - The starting vertex in the geometry to start drawing from. If not specified,\n * drawing will start from the first vertex.\n * @param instanceCount - The number of instances of the set of elements to execute. If not specified,\n * all instances will be drawn.\n */\n public draw(topology?: Topology, size?: number, start?: number, instanceCount?: number): this\n {\n const { gl } = this._renderer;\n const geometry = this._activeGeometry;\n\n const glTopology = topologyToGlMap[geometry.topology || topology];\n\n instanceCount ||= geometry.instanceCount;\n\n if (geometry.indexBuffer)\n {\n const byteSize = geometry.indexBuffer.data.BYTES_PER_ELEMENT;\n const glType = byteSize === 2 ? gl.UNSIGNED_SHORT : gl.UNSIGNED_INT;\n\n if (instanceCount > 1)\n {\n /* eslint-disable max-len */\n gl.drawElementsInstanced(glTopology, size || geometry.indexBuffer.data.length, glType, (start || 0) * byteSize, instanceCount);\n /* eslint-enable max-len */\n }\n else\n {\n /* eslint-disable max-len */\n gl.drawElements(glTopology, size || geometry.indexBuffer.data.length, glType, (start || 0) * byteSize);\n /* eslint-enable max-len */\n }\n }\n else if (instanceCount > 1)\n {\n // TODO need a better way to calculate size..\n gl.drawArraysInstanced(glTopology, start || 0, size || geometry.getSize(), instanceCount);\n }\n else\n {\n gl.drawArrays(glTopology, start || 0, size || geometry.getSize());\n }\n\n return this;\n }\n\n /** Unbind/reset everything. */\n protected unbind(): void\n {\n this.gl.bindVertexArray(null);\n this._activeVao = null;\n this._activeGeometry = null;\n }\n\n public destroy(): void\n {\n this._renderer = null;\n this.gl = null;\n this._activeVao = null;\n this._activeGeometry = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { warn } from '../../../utils/logging/warn';\nimport { Geometry } from '../shared/geometry/Geometry';\nimport { Shader } from '../shared/shader/Shader';\nimport { State } from '../shared/state/State';\nimport { TextureSource } from '../shared/texture/sources/TextureSource';\nimport { Texture } from '../shared/texture/Texture';\nimport { GlProgram } from './shader/GlProgram';\n\nimport type { RenderOptions } from '../shared/system/AbstractRenderer';\nimport type { System } from '../shared/system/System';\nimport type { WebGLRenderer } from './WebGLRenderer';\n\nconst bigTriangleGeometry = new Geometry({\n attributes: {\n aPosition: [\n -1.0, -1.0, // Bottom left corner\n 3.0, -1.0, // Bottom right corner, extending beyond right edge\n -1.0, 3.0 // Top left corner, extending beyond top edge\n ],\n },\n});\n\n/**\n * The options for the back buffer system.\n * @memberof rendering\n * @property {boolean} [useBackBuffer=false] - if true will use the back buffer where required\n * @property {boolean} [antialias=false] - if true will ensure the texture is antialiased\n */\nexport interface GlBackBufferOptions\n{\n /**\n * if true will use the back buffer where required\n * @default false\n * @memberof rendering.WebGLOptions\n */\n useBackBuffer?: boolean;\n /** if true will ensure the texture is antialiased */\n antialias?: boolean;\n}\n\n/**\n * For blend modes you need to know what pixels you are actually drawing to. For this to be possible in WebGL\n * we need to render to a texture and then present that texture to the screen. This system manages that process.\n *\n * As the main scene is rendered to a texture, it means we can sample it anc copy its pixels,\n * something not possible on the main canvas.\n *\n * If antialiasing is set to to true and useBackBuffer is set to true, then the back buffer will be antialiased.\n * and the main gl context will not.\n *\n * You only need to activate this back buffer if you are using a blend mode that requires it.\n *\n * to activate is simple, you pass `useBackBuffer:true` to your render options\n * @memberof rendering\n */\nexport class GlBackBufferSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ],\n name: 'backBuffer',\n priority: 1\n } as const;\n\n /** default options for the back buffer system */\n public static defaultOptions: GlBackBufferOptions = {\n /** if true will use the back buffer where required */\n useBackBuffer: false,\n };\n\n /** if true, the back buffer is used */\n public useBackBuffer = false;\n\n private _backBufferTexture: Texture;\n private readonly _renderer: WebGLRenderer;\n private _targetTexture: TextureSource;\n private _useBackBufferThisRender = false;\n private _antialias: boolean;\n private _state: State;\n private _bigTriangleShader: Shader;\n\n constructor(renderer: WebGLRenderer)\n {\n this._renderer = renderer;\n }\n\n public init(options: GlBackBufferOptions = {})\n {\n const { useBackBuffer, antialias } = { ...GlBackBufferSystem.defaultOptions, ...options };\n\n this.useBackBuffer = useBackBuffer;\n\n this._antialias = antialias;\n\n if (!this._renderer.context.supports.msaa)\n {\n warn('antialiasing, is not supported on when using the back buffer');\n\n this._antialias = false;\n }\n\n this._state = State.for2d();\n\n const bigTriangleProgram = new GlProgram({\n vertex: `\n attribute vec2 aPosition;\n out vec2 vUv;\n\n void main() {\n gl_Position = vec4(aPosition, 0.0, 1.0);\n\n vUv = (aPosition + 1.0) / 2.0;\n\n // flip dem UVs\n vUv.y = 1.0 - vUv.y;\n }`,\n fragment: `\n in vec2 vUv;\n out vec4 finalColor;\n\n uniform sampler2D uTexture;\n\n void main() {\n finalColor = texture(uTexture, vUv);\n }`,\n name: 'big-triangle',\n });\n\n this._bigTriangleShader = new Shader({\n glProgram: bigTriangleProgram,\n resources: {\n uTexture: Texture.WHITE.source,\n },\n });\n }\n\n /**\n * This is called before the RenderTargetSystem is started. This is where\n * we replace the target with the back buffer if required.\n * @param options - The options for this render.\n */\n protected renderStart(options: RenderOptions)\n {\n const renderTarget = this._renderer.renderTarget.getRenderTarget(options.target);\n\n this._useBackBufferThisRender = this.useBackBuffer && !!renderTarget.isRoot;\n\n if (this._useBackBufferThisRender)\n {\n const renderTarget = this._renderer.renderTarget.getRenderTarget(options.target);\n\n this._targetTexture = renderTarget.colorTexture;\n\n options.target = this._getBackBufferTexture(renderTarget.colorTexture);\n }\n }\n\n protected renderEnd()\n {\n this._presentBackBuffer();\n }\n\n private _presentBackBuffer()\n {\n const renderer = this._renderer;\n\n renderer.renderTarget.finishRenderPass();\n\n if (!this._useBackBufferThisRender) return;\n\n renderer.renderTarget.bind(this._targetTexture, false);\n\n this._bigTriangleShader.resources.uTexture = this._backBufferTexture.source;\n\n renderer.encoder.draw({\n geometry: bigTriangleGeometry,\n shader: this._bigTriangleShader,\n state: this._state,\n });\n }\n\n private _getBackBufferTexture(targetSourceTexture: TextureSource)\n {\n this._backBufferTexture = this._backBufferTexture || new Texture({\n source: new TextureSource({\n width: targetSourceTexture.width,\n height: targetSourceTexture.height,\n resolution: targetSourceTexture._resolution,\n antialias: this._antialias,\n }),\n });\n\n // this will not resize if its the same size already! No extra check required\n this._backBufferTexture.source.resize(\n targetSourceTexture.width,\n targetSourceTexture.height,\n targetSourceTexture._resolution,\n );\n\n return this._backBufferTexture;\n }\n\n /** destroys the back buffer */\n public destroy()\n {\n if (this._backBufferTexture)\n {\n this._backBufferTexture.destroy();\n this._backBufferTexture = null;\n }\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { System } from '../shared/system/System';\nimport type { WebGLRenderer } from './WebGLRenderer';\n\n/**\n * The system that handles color masking for the WebGL.\n * @memberof rendering\n */\nexport class GlColorMaskSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ],\n name: 'colorMask',\n } as const;\n\n private readonly _renderer: WebGLRenderer;\n private _colorMaskCache = 0b1111;\n\n constructor(renderer: WebGLRenderer)\n {\n this._renderer = renderer;\n }\n\n public setMask(colorMask: number)\n {\n if (this._colorMaskCache === colorMask) return;\n this._colorMaskCache = colorMask;\n\n this._renderer.gl.colorMask(\n !!(colorMask & 0b1000),\n !!(colorMask & 0b0100),\n !!(colorMask & 0b0010),\n !!(colorMask & 0b0001)\n );\n }\n\n public destroy?: () => void;\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { Topology } from '../shared/geometry/const';\nimport type { Geometry } from '../shared/geometry/Geometry';\nimport type { Shader } from '../shared/shader/Shader';\nimport type { State } from '../shared/state/State';\nimport type { System } from '../shared/system/System';\nimport type { WebGLRenderer } from './WebGLRenderer';\n\n/**\n * The system that handles encoding commands for the WebGL.\n * @memberof rendering\n */\nexport class GlEncoderSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ],\n name: 'encoder',\n } as const;\n\n public readonly commandFinished = Promise.resolve();\n private readonly _renderer: WebGLRenderer;\n\n constructor(renderer: WebGLRenderer)\n {\n this._renderer = renderer;\n }\n\n public setGeometry(geometry: Geometry, shader?: Shader)\n {\n this._renderer.geometry.bind(geometry, shader.glProgram);\n }\n\n public finishRenderPass()\n {\n // noop\n }\n\n public draw(options: {\n geometry: Geometry,\n shader: Shader,\n state?: State,\n topology?: Topology,\n size?: number,\n start?: number,\n instanceCount?: number\n skipSync?: boolean,\n })\n {\n const renderer = this._renderer;\n const { geometry, shader, state, skipSync, topology: type, size, start, instanceCount } = options;\n\n renderer.shader.bind(shader, skipSync);\n\n renderer.geometry.bind(geometry, renderer.shader._activeProgram);\n\n if (state)\n {\n renderer.state.set(state);\n }\n\n renderer.geometry.draw(type, size, start, instanceCount ?? geometry.instanceCount);\n }\n\n public destroy()\n {\n (this._renderer as null) = null;\n }\n}\n","/**\n * Represents a render target.\n * @memberof rendering\n * @ignore\n */\nexport class GlRenderTarget\n{\n public width = -1;\n public height = -1;\n public msaa = false;\n public framebuffer: WebGLFramebuffer;\n public resolveTargetFramebuffer: WebGLFramebuffer;\n public msaaRenderBuffer: WebGLRenderbuffer[] = [];\n public depthStencilRenderBuffer: WebGLRenderbuffer;\n}\n","import { STENCIL_MODES } from '../../shared/state/const';\n\nexport interface StencilState\n{\n stencilWriteMask?: number\n stencilReadMask?: number;\n stencilFront?: {\n compare: 'always' | 'equal';\n passOp: 'increment-clamp' | 'decrement-clamp' | 'keep';\n },\n stencilBack?: {\n compare: 'always' | 'equal';\n passOp: 'increment-clamp' | 'decrement-clamp' | 'keep';\n }\n}\n\nexport const GpuStencilModesToPixi: StencilState[] = [];\n\nGpuStencilModesToPixi[STENCIL_MODES.NONE] = undefined;\n\nGpuStencilModesToPixi[STENCIL_MODES.DISABLED] = {\n stencilWriteMask: 0,\n stencilReadMask: 0,\n};\n\nGpuStencilModesToPixi[STENCIL_MODES.RENDERING_MASK_ADD] = {\n stencilFront: {\n compare: 'equal',\n passOp: 'increment-clamp',\n },\n stencilBack: {\n compare: 'equal',\n passOp: 'increment-clamp',\n },\n};\n\nGpuStencilModesToPixi[STENCIL_MODES.RENDERING_MASK_REMOVE] = {\n stencilFront: {\n compare: 'equal',\n passOp: 'decrement-clamp',\n },\n stencilBack: {\n compare: 'equal',\n passOp: 'decrement-clamp',\n },\n};\n\nGpuStencilModesToPixi[STENCIL_MODES.MASK_ACTIVE] = {\n stencilWriteMask: 0,\n stencilFront: {\n compare: 'equal',\n passOp: 'keep',\n },\n stencilBack: {\n compare: 'equal',\n passOp: 'keep',\n },\n};\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { GpuStencilModesToPixi } from '../gpu/state/GpuStencilModesToPixi';\nimport { STENCIL_MODES } from '../shared/state/const';\n\nimport type { RenderTarget } from '../shared/renderTarget/RenderTarget';\nimport type { System } from '../shared/system/System';\nimport type { WebGLRenderer } from './WebGLRenderer';\n\n/**\n * This manages the stencil buffer. Used primarily for masking\n * @memberof rendering\n */\nexport class GlStencilSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ],\n name: 'stencil',\n } as const;\n\n private _gl: WebGLRenderingContext;\n\n private readonly _stencilCache = {\n enabled: false,\n stencilReference: 0,\n stencilMode: STENCIL_MODES.NONE,\n };\n\n private _renderTargetStencilState: Record = Object.create(null);\n\n private _stencilOpsMapping: {\n keep: number;\n zero: number;\n replace: number;\n invert: number;\n 'increment-clamp': number;\n 'decrement-clamp': number;\n 'increment-wrap': number;\n 'decrement-wrap': number;\n };\n\n private _comparisonFuncMapping: {\n always: number;\n never: number;\n equal: number;\n 'not-equal': number;\n less: number;\n 'less-equal': number;\n greater: number;\n 'greater-equal': number;\n };\n\n private _activeRenderTarget: RenderTarget;\n\n constructor(renderer: WebGLRenderer)\n {\n renderer.renderTarget.onRenderTargetChange.add(this);\n }\n\n protected contextChange(gl: WebGLRenderingContext)\n {\n // TODO - this could be declared in a gl const\n // we know the numbers don't tend to change!\n this._gl = gl;\n\n this._comparisonFuncMapping = {\n always: gl.ALWAYS,\n never: gl.NEVER,\n equal: gl.EQUAL,\n 'not-equal': gl.NOTEQUAL,\n less: gl.LESS,\n 'less-equal': gl.LEQUAL,\n greater: gl.GREATER,\n 'greater-equal': gl.GEQUAL,\n };\n\n this._stencilOpsMapping = {\n keep: gl.KEEP,\n zero: gl.ZERO,\n replace: gl.REPLACE,\n invert: gl.INVERT,\n 'increment-clamp': gl.INCR,\n 'decrement-clamp': gl.DECR,\n 'increment-wrap': gl.INCR_WRAP,\n 'decrement-wrap': gl.DECR_WRAP,\n };\n\n // reset stencil cache\n this._stencilCache.enabled = false;\n this._stencilCache.stencilMode = STENCIL_MODES.NONE;\n this._stencilCache.stencilReference = 0;\n }\n\n protected onRenderTargetChange(renderTarget: RenderTarget)\n {\n if (this._activeRenderTarget === renderTarget) return;\n\n this._activeRenderTarget = renderTarget;\n\n let stencilState = this._renderTargetStencilState[renderTarget.uid];\n\n if (!stencilState)\n {\n stencilState = this._renderTargetStencilState[renderTarget.uid] = {\n stencilMode: STENCIL_MODES.DISABLED,\n stencilReference: 0,\n };\n }\n\n // restore the current render targets stencil state..\n this.setStencilMode(stencilState.stencilMode, stencilState.stencilReference);\n }\n\n public setStencilMode(stencilMode: STENCIL_MODES, stencilReference: number)\n {\n const stencilState = this._renderTargetStencilState[this._activeRenderTarget.uid];\n\n const gl = this._gl;\n const mode = GpuStencilModesToPixi[stencilMode];\n\n const _stencilCache = this._stencilCache;\n\n // store the stencil state for restoration later, if a render target changes\n stencilState.stencilMode = stencilMode;\n stencilState.stencilReference = stencilReference;\n\n if (stencilMode === STENCIL_MODES.DISABLED)\n {\n if (this._stencilCache.enabled)\n {\n this._stencilCache.enabled = false;\n\n gl.disable(gl.STENCIL_TEST);\n }\n\n return;\n }\n\n if (!this._stencilCache.enabled)\n {\n this._stencilCache.enabled = true;\n gl.enable(gl.STENCIL_TEST);\n }\n\n if (stencilMode !== _stencilCache.stencilMode || _stencilCache.stencilReference !== stencilReference)\n {\n _stencilCache.stencilMode = stencilMode;\n _stencilCache.stencilReference = stencilReference;\n\n // this is pretty simple mapping.\n // will work for pixi's simple mask cases.\n // although a true mapping of the GPU state to webGL state should be done\n gl.stencilFunc(this._comparisonFuncMapping[mode.stencilBack.compare], stencilReference, 0xFF);\n gl.stencilOp(gl.KEEP, gl.KEEP, this._stencilOpsMapping[mode.stencilBack.passOp]);\n }\n }\n\n public destroy?: () => void;\n}\n","import { unsafeEvalSupported } from '../../../../utils/browser/unsafeEvalSupported';\nimport { Buffer } from '../buffer/Buffer';\nimport { BufferUsage } from '../buffer/const';\n\nimport type { System } from '../system/System';\nimport type { UboElement, UboLayout, UniformData, UniformsSyncCallback } from './types';\nimport type { UniformGroup } from './UniformGroup';\n\nexport interface UboAdaptor\n{\n createUboElements: (uniformData: UniformData[]) => UboLayout;\n generateUboSync: (uboElements: UboElement[]) => UniformsSyncCallback;\n}\n\n/**\n * System plugin to the renderer to manage uniform buffers.\n * @memberof rendering\n */\nexport class UboSystem implements System\n{\n /** Cache of uniform buffer layouts and sync functions, so we don't have to re-create them */\n private _syncFunctionHash: Record, data: Float32Array, offset: number) => void\n }> = Object.create(null);\n\n private readonly _adaptor: UboAdaptor;\n\n constructor(adaptor: UboAdaptor)\n {\n this._adaptor = adaptor;\n\n // Validation check that this environment support `new Function`\n this._systemCheck();\n }\n\n /**\n * Overrideable function by `pixi.js/unsafe-eval` to silence\n * throwing an error if platform doesn't support unsafe-evals.\n * @private\n */\n private _systemCheck(): void\n {\n if (!unsafeEvalSupported())\n {\n throw new Error('Current environment does not allow unsafe-eval, '\n + 'please use pixi.js/unsafe-eval module to enable support.');\n }\n }\n\n public ensureUniformGroup(uniformGroup: UniformGroup): void\n {\n const uniformData = this.getUniformGroupData(uniformGroup);\n\n uniformGroup.buffer ||= new Buffer({\n data: new Float32Array(uniformData.layout.size / 4),\n usage: BufferUsage.UNIFORM | BufferUsage.COPY_DST,\n });\n }\n\n public getUniformGroupData(uniformGroup: UniformGroup)\n {\n return this._syncFunctionHash[uniformGroup._signature] || this._initUniformGroup(uniformGroup);\n }\n\n private _initUniformGroup(uniformGroup: UniformGroup)\n {\n const uniformGroupSignature = uniformGroup._signature;\n\n let uniformData = this._syncFunctionHash[uniformGroupSignature];\n\n if (!uniformData)\n {\n const elements = Object.keys(uniformGroup.uniformStructures).map((i) => uniformGroup.uniformStructures[i]);\n\n const layout = this._adaptor.createUboElements(elements);\n\n const syncFunction = this._generateUboSync(layout.uboElements);\n\n uniformData = this._syncFunctionHash[uniformGroupSignature] = {\n layout,\n syncFunction\n };\n }\n\n return this._syncFunctionHash[uniformGroupSignature];\n }\n\n private _generateUboSync(\n uboElements: UboElement[],\n ): UniformsSyncCallback\n {\n return this._adaptor.generateUboSync(uboElements);\n }\n\n public syncUniformGroup(uniformGroup: UniformGroup, data?: Float32Array, offset?: number): boolean\n {\n const uniformGroupData = this.getUniformGroupData(uniformGroup);\n\n uniformGroup.buffer ||= new Buffer({\n data: new Float32Array(uniformGroupData.layout.size / 4),\n usage: BufferUsage.UNIFORM | BufferUsage.COPY_DST,\n });\n\n data ||= (uniformGroup.buffer.data as Float32Array);\n offset ||= 0;\n\n uniformGroupData.syncFunction(uniformGroup.uniforms, data, offset);\n\n return true;\n }\n\n public updateUniformGroup(uniformGroup: UniformGroup): boolean\n {\n if (uniformGroup.isStatic && !uniformGroup._dirtyId) return false;\n uniformGroup._dirtyId = 0;\n\n const synced = this.syncUniformGroup(uniformGroup);\n\n uniformGroup.buffer.update();\n\n return synced;\n }\n\n public destroy(): void\n {\n this._syncFunctionHash = null;\n }\n}\n","import type { UboElement, UboLayout, UniformData } from '../../../shared/shader/types';\n\nexport const WGSL_TO_STD40_SIZE: Record = {\n f32: 4,\n 'vec2': 8,\n 'vec3': 12,\n 'vec4': 16,\n\n 'mat2x2': 16 * 2,\n 'mat3x3': 16 * 3,\n 'mat4x4': 16 * 4,\n\n // TODO - not essential for now but support these in the future\n // int: 4,\n // ivec2: 8,\n // ivec3: 12,\n // ivec4: 16,\n\n // uint: 4,\n // uvec2: 8,\n // uvec3: 12,\n // uvec4: 16,\n\n // bool: 4,\n // bvec2: 8,\n // bvec3: 12,\n // bvec4: 16,\n\n // mat2: 16 * 2,\n // mat3: 16 * 3,\n // mat4: 16 * 4,\n};\n\nexport function createUboElementsSTD40(uniformData: UniformData[]): UboLayout\n{\n const uboElements: UboElement[] = uniformData.map((data: UniformData) =>\n ({\n data,\n offset: 0,\n size: 0,\n }));\n\n let size = 0;\n let chunkSize = 0;\n let offset = 0;\n\n for (let i = 0; i < uboElements.length; i++)\n {\n const uboElement = uboElements[i];\n\n size = WGSL_TO_STD40_SIZE[uboElement.data.type];\n\n if (!size)\n {\n throw new Error(`Unknown type ${uboElement.data.type}`);\n }\n\n if (uboElement.data.size > 1)\n {\n size = Math.max(size, 16) * uboElement.data.size;\n }\n\n uboElement.size = size;\n\n // add some size offset..\n // must align to the nearest 16 bytes or internally nearest round size\n if (chunkSize % size !== 0 && chunkSize < 16)\n {\n // diff required to line up..\n const lineUpValue = (chunkSize % size) % 16;\n\n chunkSize += lineUpValue;\n offset += lineUpValue;\n }\n\n if ((chunkSize + size) > 16)\n {\n offset = Math.ceil(offset / 16) * 16;\n uboElement.offset = offset;\n offset += size;\n chunkSize = size;\n }\n else\n {\n uboElement.offset = offset;\n chunkSize += size;\n offset += size;\n }\n }\n\n offset = Math.ceil(offset / 16) * 16;\n\n return { uboElements, size: offset };\n}\n\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n// Parsers, each one of these will take a look at the type of shader property and uniform.\n// if they pass the test function then the code function is called that returns a the shader upload code for that uniform.\n// Shader upload code is automagically generated with these parsers.\n// If no parser is valid then the default upload functions are used.\n// exposing Parsers means that custom upload logic can be added to pixi's shaders.\n// A good example would be a pixi rectangle can be directly set on a uniform.\n// If the shader sees it it knows how to upload the rectangle structure as a vec4\n// format is as follows:\n//\n// {\n// test: (data, uniform) => {} <--- test is this code should be used for this uniform\n// code: (name, uniform) => {} <--- returns the string of the piece of code that uploads the uniform\n// codeUbo: (name, uniform) => {} <--- returns the string of the piece of code that uploads the\n// uniform to a uniform buffer\n// }\n// import { Texture } from '../../texture/Texture';\n\nimport type { Color } from '../../../../../color/Color';\nimport type { Matrix } from '../../../../../maths/matrix/Matrix';\nimport type { PointLike } from '../../../../../maths/point/PointLike';\nimport type { Rectangle } from '../../../../../maths/shapes/Rectangle';\nimport type { UNIFORM_TYPES, UniformData } from '../types';\n\nexport interface UniformParserDefinition\n{\n type: UNIFORM_TYPES;\n test(data: UniformData): boolean;\n ubo?: string;\n uboWgsl?: string;\n uboStd40?: string;\n uniform?: string;\n}\n\nexport const uniformParsers: UniformParserDefinition[] = [\n // uploading pixi matrix object to mat3\n {\n type: 'mat3x3',\n test: (data: UniformData): boolean =>\n {\n const value = data.value as Matrix;\n\n return value.a !== undefined;\n },\n ubo: `\n var matrix = uv[name].toArray(true);\n data[offset] = matrix[0];\n data[offset + 1] = matrix[1];\n data[offset + 2] = matrix[2];\n data[offset + 4] = matrix[3];\n data[offset + 5] = matrix[4];\n data[offset + 6] = matrix[5];\n data[offset + 8] = matrix[6];\n data[offset + 9] = matrix[7];\n data[offset + 10] = matrix[8];\n `,\n uniform: `\n gl.uniformMatrix3fv(ud[name].location, false, uv[name].toArray(true));\n `\n },\n // uploading a pixi rectangle as a vec4\n {\n type: 'vec4',\n test: (data: UniformData): boolean =>\n data.type === 'vec4' && data.size === 1 && (data.value as Rectangle).width !== undefined,\n ubo: `\n v = uv[name];\n data[offset] = v.x;\n data[offset + 1] = v.y;\n data[offset + 2] = v.width;\n data[offset + 3] = v.height;\n `,\n uniform: `\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud[name].location, v.x, v.y, v.width, v.height);\n }\n `\n },\n // uploading a pixi point as a vec2\n {\n type: 'vec2',\n test: (data: UniformData): boolean =>\n data.type === 'vec2' && data.size === 1 && (data.value as PointLike).x !== undefined,\n ubo: `\n v = uv[name];\n data[offset] = v.x;\n data[offset + 1] = v.y;\n `,\n uniform: `\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.x || cv[1] !== v.y) {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud[name].location, v.x, v.y);\n }\n `\n },\n // uploading a pixi color as a vec4\n {\n type: 'vec4',\n test: (data: UniformData): boolean =>\n data.type === 'vec4' && data.size === 1 && (data.value as Color).red !== undefined,\n ubo: `\n v = uv[name];\n data[offset] = v.red;\n data[offset + 1] = v.green;\n data[offset + 2] = v.blue;\n data[offset + 3] = v.alpha;\n `,\n uniform: `\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n cv[3] = v.alpha;\n gl.uniform4f(ud[name].location, v.red, v.green, v.blue, v.alpha);\n }\n `\n },\n // uploading a pixi color as a vec3\n {\n type: 'vec3',\n test: (data: UniformData): boolean =>\n data.type === 'vec3' && data.size === 1 && (data.value as Color).red !== undefined,\n ubo: `\n v = uv[name];\n data[offset] = v.red;\n data[offset + 1] = v.green;\n data[offset + 2] = v.blue;\n `,\n uniform: `\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue) {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n gl.uniform3f(ud[name].location, v.red, v.green, v.blue);\n }\n `\n },\n];\n","/* eslint-disable quote-props */\nimport { uniformParsers } from './uniformParsers';\n\nimport type { UboElement, UNIFORM_TYPES_SINGLE, UniformsSyncCallback } from '../types';\n\nexport function createUboSyncFunction(\n uboElements: UboElement[],\n parserCode: 'uboWgsl' | 'uboStd40',\n arrayGenerationFunction: (uboElement: UboElement, offsetToAdd: number) => string,\n singleSettersMap: Record,\n): UniformsSyncCallback\n{\n const funcFragments = [`\n var v = null;\n var v2 = null;\n var t = 0;\n var index = 0;\n var name = null;\n var arrayOffset = null;\n `];\n\n let prev = 0;\n\n for (let i = 0; i < uboElements.length; i++)\n {\n const uboElement = uboElements[i];\n\n const name = uboElement.data.name;\n\n let parsed = false;\n let offset = 0;\n\n for (let j = 0; j < uniformParsers.length; j++)\n {\n const uniformParser = uniformParsers[j];\n\n if (uniformParser.test(uboElement.data))\n {\n offset = uboElement.offset / 4;\n\n funcFragments.push(\n `name = \"${name}\";`,\n `offset += ${offset - prev};`,\n uniformParsers[j][parserCode] || uniformParsers[j].ubo);\n parsed = true;\n\n break;\n }\n }\n\n if (!parsed)\n {\n if (uboElement.data.size > 1)\n {\n offset = uboElement.offset / 4;\n\n funcFragments.push(arrayGenerationFunction(uboElement, offset - prev));\n }\n else\n {\n const template = singleSettersMap[uboElement.data.type as UNIFORM_TYPES_SINGLE];\n\n offset = uboElement.offset / 4;\n\n funcFragments.push(/* wgsl */`\n v = uv.${name};\n offset += ${offset - prev};\n ${template};\n `);\n }\n }\n\n prev = offset;\n }\n\n const fragmentSrc = funcFragments.join('\\n');\n\n // eslint-disable-next-line no-new-func\n return new Function(\n 'uv',\n 'data',\n 'offset',\n fragmentSrc,\n ) as UniformsSyncCallback;\n}\n","import type { UNIFORM_TYPES_SINGLE } from '../types';\n\nfunction loopMatrix(col: number, row: number)\n{\n const total = col * row;\n\n return `\n for (let i = 0; i < ${total}; i++) {\n data[offset + (((i / ${col})|0) * 4) + (i % ${col})] = v[i];\n }\n `;\n}\n\nexport const uboSyncFunctionsSTD40: Record = {\n f32: `\n data[offset] = v;`,\n i32: `\n data[offset] = v;`,\n 'vec2': `\n data[offset] = v[0];\n data[offset + 1] = v[1];`,\n 'vec3': `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];`,\n 'vec4': `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];\n data[offset + 3] = v[3];`,\n 'mat2x2': `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 4] = v[2];\n data[offset + 5] = v[3];`,\n 'mat3x3': `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];\n data[offset + 4] = v[3];\n data[offset + 5] = v[4];\n data[offset + 6] = v[5];\n data[offset + 8] = v[6];\n data[offset + 9] = v[7];\n data[offset + 10] = v[8];`,\n 'mat4x4': `\n for (let i = 0; i < 16; i++) {\n data[offset + i] = v[i];\n }`,\n 'mat3x2': loopMatrix(3, 2),\n 'mat4x2': loopMatrix(4, 2),\n 'mat2x3': loopMatrix(2, 3),\n 'mat4x3': loopMatrix(4, 3),\n 'mat2x4': loopMatrix(2, 4),\n 'mat3x4': loopMatrix(3, 4),\n};\n\nexport const uboSyncFunctionsWGSL: Record = {\n ...uboSyncFunctionsSTD40,\n 'mat2x2': `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];\n data[offset + 3] = v[3];\n `,\n};\n","import { WGSL_TO_STD40_SIZE } from './createUboElementsSTD40';\n\nimport type { UboElement } from '../../../shared/shader/types';\n\n/**\n * This generates a function that will sync an array to the uniform buffer\n * following the std140 layout\n * @param uboElement - the element to generate the array sync for\n * @param offsetToAdd - the offset to append at the start of the code\n * @returns - the generated code\n */\nexport function generateArraySyncSTD40(uboElement: UboElement, offsetToAdd: number): string\n{\n const rowSize = Math.max(WGSL_TO_STD40_SIZE[uboElement.data.type] / 16, 1);\n const elementSize = (uboElement.data.value as Array).length / uboElement.data.size;// size / rowSize;\n\n const remainder = (4 - (elementSize % 4)) % 4;\n\n return `\n v = uv.${uboElement.data.name};\n offset += ${offsetToAdd};\n\n arrayOffset = offset;\n\n t = 0;\n\n for(var i=0; i < ${uboElement.data.size * rowSize}; i++)\n {\n for(var j = 0; j < ${elementSize}; j++)\n {\n data[arrayOffset++] = v[t++];\n }\n ${remainder !== 0 ? `arrayOffset += ${remainder};` : ''}\n }\n `;\n}\n","/* eslint-disable quote-props */\n\nimport { createUboSyncFunction } from '../../../shared/shader/utils/createUboSyncFunction';\nimport { uboSyncFunctionsSTD40 } from '../../../shared/shader/utils/uboSyncFunctions';\nimport { generateArraySyncSTD40 } from './generateArraySyncSTD40';\n\nimport type { UboElement, UniformsSyncCallback } from '../../../shared/shader/types';\n\nexport function createUboSyncFunctionSTD40(\n uboElements: UboElement[],\n): UniformsSyncCallback\n{\n return createUboSyncFunction(\n uboElements,\n 'uboStd40',\n generateArraySyncSTD40,\n uboSyncFunctionsSTD40,\n );\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { UboSystem } from '../shared/shader/UboSystem';\nimport { createUboElementsSTD40 } from './shader/utils/createUboElementsSTD40';\nimport { createUboSyncFunctionSTD40 } from './shader/utils/createUboSyncSTD40';\n\n/**\n * System plugin to the renderer to manage uniform buffers. But with an WGSL adaptor.\n * @memberof rendering\n */\nexport class GlUboSystem extends UboSystem\n{\n /** @ignore */\n public static extension = {\n type: [ExtensionType.WebGLSystem],\n name: 'ubo',\n } as const;\n\n constructor()\n {\n super({\n createUboElements: createUboElementsSTD40,\n generateUboSync: createUboSyncFunctionSTD40,\n });\n }\n}\n","import { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { warn } from '../../../../utils/logging/warn';\nimport { CLEAR } from '../const';\nimport { GlRenderTarget } from '../GlRenderTarget';\n\nimport type { RgbaArray } from '../../../../color/Color';\nimport type { RenderTarget } from '../../shared/renderTarget/RenderTarget';\nimport type { RenderTargetAdaptor, RenderTargetSystem } from '../../shared/renderTarget/RenderTargetSystem';\nimport type { Texture } from '../../shared/texture/Texture';\nimport type { CLEAR_OR_BOOL } from '../const';\nimport type { WebGLRenderer } from '../WebGLRenderer';\n\n/**\n * The WebGL adaptor for the render target system. Allows the Render Target System to be used with the WebGL renderer\n * @memberof rendering\n * @ignore\n */\nexport class GlRenderTargetAdaptor implements RenderTargetAdaptor\n{\n private _renderTargetSystem: RenderTargetSystem;\n private _renderer: WebGLRenderer;\n private _clearColorCache: RgbaArray = [0, 0, 0, 0];\n private _viewPortCache: Rectangle = new Rectangle();\n\n public init(renderer: WebGLRenderer, renderTargetSystem: RenderTargetSystem): void\n {\n this._renderer = renderer;\n this._renderTargetSystem = renderTargetSystem;\n\n renderer.runners.contextChange.add(this);\n }\n\n public contextChange(): void\n {\n this._clearColorCache = [0, 0, 0, 0];\n this._viewPortCache = new Rectangle();\n }\n\n public copyToTexture(\n sourceRenderSurfaceTexture: RenderTarget,\n destinationTexture: Texture,\n originSrc: { x: number; y: number; },\n size: { width: number; height: number; },\n originDest: { x: number; y: number; },\n )\n {\n const renderTargetSystem = this._renderTargetSystem;\n\n const renderer = this._renderer;\n const glRenderTarget = renderTargetSystem.getGpuRenderTarget(sourceRenderSurfaceTexture);\n const gl = renderer.gl;\n\n this.finishRenderPass(sourceRenderSurfaceTexture);\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, glRenderTarget.resolveTargetFramebuffer);\n\n renderer.texture.bind(destinationTexture, 0);\n\n gl.copyTexSubImage2D(gl.TEXTURE_2D, 0,\n originDest.x, originDest.y,\n originSrc.x,\n originSrc.y,\n size.width,\n size.height\n );\n\n return destinationTexture;\n }\n\n public startRenderPass(\n renderTarget: RenderTarget,\n clear: CLEAR_OR_BOOL = true,\n clearColor?: RgbaArray,\n viewport?: Rectangle\n )\n {\n const renderTargetSystem = this._renderTargetSystem;\n\n const source = renderTarget.colorTexture;\n const gpuRenderTarget = renderTargetSystem.getGpuRenderTarget(renderTarget);\n\n let viewPortY = viewport.y;\n\n if (renderTarget.isRoot)\n {\n // /TODO this is the same logic?\n viewPortY = source.pixelHeight - viewport.height;\n }\n\n // unbind the current render texture..\n renderTarget.colorTextures.forEach((texture) =>\n {\n this._renderer.texture.unbind(texture);\n });\n\n const gl = this._renderer.gl;\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, gpuRenderTarget.framebuffer);\n\n const viewPortCache = this._viewPortCache;\n\n if (viewPortCache.x !== viewport.x\n || viewPortCache.y !== viewPortY\n || viewPortCache.width !== viewport.width\n || viewPortCache.height !== viewport.height)\n {\n viewPortCache.x = viewport.x;\n viewPortCache.y = viewPortY;\n viewPortCache.width = viewport.width;\n viewPortCache.height = viewport.height;\n\n gl.viewport(\n viewport.x,\n viewPortY,\n viewport.width,\n viewport.height,\n );\n }\n\n // if the stencil buffer has been requested, we need to create a stencil buffer\n if (!gpuRenderTarget.depthStencilRenderBuffer && (renderTarget.stencil || renderTarget.depth))\n {\n this._initStencil(gpuRenderTarget);\n }\n\n this.clear(renderTarget, clear, clearColor);\n }\n\n public finishRenderPass(renderTarget?: RenderTarget)\n {\n const renderTargetSystem = this._renderTargetSystem;\n\n const glRenderTarget = renderTargetSystem.getGpuRenderTarget(renderTarget);\n\n if (!glRenderTarget.msaa) return;\n\n const gl = this._renderer.gl;\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, glRenderTarget.resolveTargetFramebuffer);\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, glRenderTarget.framebuffer);\n\n gl.blitFramebuffer(\n 0, 0, glRenderTarget.width, glRenderTarget.height,\n 0, 0, glRenderTarget.width, glRenderTarget.height,\n gl.COLOR_BUFFER_BIT, gl.NEAREST,\n );\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, glRenderTarget.framebuffer);\n\n // dont think we need this anymore? keeping around just in case the wheels fall off\n // gl.bindFramebuffer(gl.READ_FRAMEBUFFER, null);\n }\n\n public initGpuRenderTarget(renderTarget: RenderTarget): GlRenderTarget\n {\n const renderer = this._renderer;\n\n const gl = renderer.gl;\n\n // do single...\n\n const glRenderTarget = new GlRenderTarget();\n\n // we are rendering to the main canvas..\n if (renderTarget.colorTexture.resource === renderer.gl.canvas)\n {\n glRenderTarget.framebuffer = null;\n\n return glRenderTarget;\n }\n\n this._initColor(renderTarget, glRenderTarget);\n\n // set up a depth texture..\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\n return glRenderTarget;\n }\n\n public destroyGpuRenderTarget(gpuRenderTarget: GlRenderTarget)\n {\n const gl = this._renderer.gl;\n\n if (gpuRenderTarget.framebuffer)\n {\n gl.deleteFramebuffer(gpuRenderTarget.framebuffer);\n gpuRenderTarget.framebuffer = null;\n }\n\n if (gpuRenderTarget.resolveTargetFramebuffer)\n {\n gl.deleteFramebuffer(gpuRenderTarget.resolveTargetFramebuffer);\n gpuRenderTarget.resolveTargetFramebuffer = null;\n }\n\n if (gpuRenderTarget.depthStencilRenderBuffer)\n {\n gl.deleteRenderbuffer(gpuRenderTarget.depthStencilRenderBuffer);\n gpuRenderTarget.depthStencilRenderBuffer = null;\n }\n\n gpuRenderTarget.msaaRenderBuffer.forEach((renderBuffer) =>\n {\n gl.deleteRenderbuffer(renderBuffer);\n });\n\n gpuRenderTarget.msaaRenderBuffer = null;\n }\n\n public clear(_renderTarget: RenderTarget, clear: CLEAR_OR_BOOL, clearColor?: RgbaArray)\n {\n if (!clear) return;\n\n const renderTargetSystem = this._renderTargetSystem;\n\n // if clear is boolean..\n if (typeof clear === 'boolean')\n {\n clear = clear ? CLEAR.ALL : CLEAR.NONE;\n }\n\n const gl = this._renderer.gl;\n\n if (clear & CLEAR.COLOR)\n {\n clearColor ??= renderTargetSystem.defaultClearColor;\n\n const clearColorCache = this._clearColorCache;\n const clearColorArray = clearColor as number[];\n\n if (clearColorCache[0] !== clearColorArray[0]\n || clearColorCache[1] !== clearColorArray[1]\n || clearColorCache[2] !== clearColorArray[2]\n || clearColorCache[3] !== clearColorArray[3])\n {\n clearColorCache[0] = clearColorArray[0];\n clearColorCache[1] = clearColorArray[1];\n clearColorCache[2] = clearColorArray[2];\n clearColorCache[3] = clearColorArray[3];\n\n gl.clearColor(clearColorArray[0], clearColorArray[1], clearColorArray[2], clearColorArray[3]);\n }\n }\n\n gl.clear(clear);\n }\n\n public resizeGpuRenderTarget(renderTarget: RenderTarget)\n {\n if (renderTarget.isRoot) return;\n\n const renderTargetSystem = this._renderTargetSystem;\n\n const glRenderTarget = renderTargetSystem.getGpuRenderTarget(renderTarget);\n\n this._resizeColor(renderTarget, glRenderTarget);\n\n if (renderTarget.stencil)\n {\n this._resizeStencil(glRenderTarget);\n }\n }\n\n private _initColor(renderTarget: RenderTarget, glRenderTarget: GlRenderTarget)\n {\n const renderer = this._renderer;\n\n const gl = renderer.gl;\n // deal with our outputs..\n const resolveTargetFramebuffer = gl.createFramebuffer();\n\n glRenderTarget.resolveTargetFramebuffer = resolveTargetFramebuffer;\n\n // set up the texture..\n gl.bindFramebuffer(gl.FRAMEBUFFER, resolveTargetFramebuffer);\n\n glRenderTarget.width = renderTarget.colorTexture.source.pixelWidth;\n glRenderTarget.height = renderTarget.colorTexture.source.pixelHeight;\n\n renderTarget.colorTextures.forEach((colorTexture, i) =>\n {\n const source = colorTexture.source;\n\n if (source.antialias)\n {\n if (renderer.context.supports.msaa)\n {\n glRenderTarget.msaa = true;\n }\n else\n {\n warn('[RenderTexture] Antialiasing on textures is not supported in WebGL1');\n }\n }\n\n // TODO bindSource could return the glTexture\n renderer.texture.bindSource(source, 0);\n const glSource = renderer.texture.getGlSource(source);\n\n const glTexture = glSource.texture;\n\n gl.framebufferTexture2D(gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0 + i,\n 3553, // texture.target,\n glTexture,\n 0);// mipLevel);\n });\n\n if (glRenderTarget.msaa)\n {\n const viewFramebuffer = gl.createFramebuffer();\n\n glRenderTarget.framebuffer = viewFramebuffer;\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, viewFramebuffer);\n\n renderTarget.colorTextures.forEach((_, i) =>\n {\n const msaaRenderBuffer = gl.createRenderbuffer();\n\n glRenderTarget.msaaRenderBuffer[i] = msaaRenderBuffer;\n });\n }\n else\n {\n glRenderTarget.framebuffer = resolveTargetFramebuffer;\n }\n\n this._resizeColor(renderTarget, glRenderTarget);\n }\n\n private _resizeColor(renderTarget: RenderTarget, glRenderTarget: GlRenderTarget)\n {\n const source = renderTarget.colorTexture.source;\n\n glRenderTarget.width = source.pixelWidth;\n glRenderTarget.height = source.pixelHeight;\n\n renderTarget.colorTextures.forEach((colorTexture, i) =>\n {\n // nno need to resize the first texture..\n if (i === 0) return;\n\n colorTexture.source.resize(source.width, source.height, source._resolution);\n });\n\n if (glRenderTarget.msaa)\n {\n const renderer = this._renderer;\n const gl = renderer.gl;\n\n const viewFramebuffer = glRenderTarget.framebuffer;\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, viewFramebuffer);\n\n renderTarget.colorTextures.forEach((colorTexture, i) =>\n {\n const source = colorTexture.source;\n\n renderer.texture.bindSource(source, 0);\n const glSource = renderer.texture.getGlSource(source);\n\n const glInternalFormat = glSource.internalFormat;\n\n const msaaRenderBuffer = glRenderTarget.msaaRenderBuffer[i];\n\n gl.bindRenderbuffer(\n gl.RENDERBUFFER,\n msaaRenderBuffer\n );\n\n gl.renderbufferStorageMultisample(\n gl.RENDERBUFFER,\n 4,\n glInternalFormat,\n source.pixelWidth,\n source.pixelHeight\n );\n\n gl.framebufferRenderbuffer(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0 + i,\n gl.RENDERBUFFER,\n msaaRenderBuffer\n );\n });\n }\n }\n\n private _initStencil(glRenderTarget: GlRenderTarget)\n {\n // this already exists on the default screen\n if (glRenderTarget.framebuffer === null) return;\n\n const gl = this._renderer.gl;\n\n const depthStencilRenderBuffer = gl.createRenderbuffer();\n\n glRenderTarget.depthStencilRenderBuffer = depthStencilRenderBuffer;\n\n gl.bindRenderbuffer(\n gl.RENDERBUFFER,\n depthStencilRenderBuffer\n );\n\n gl.framebufferRenderbuffer(\n gl.FRAMEBUFFER,\n gl.DEPTH_STENCIL_ATTACHMENT,\n gl.RENDERBUFFER,\n depthStencilRenderBuffer\n );\n\n // TDO DO>>\n this._resizeStencil(glRenderTarget);\n }\n\n private _resizeStencil(glRenderTarget: GlRenderTarget)\n {\n const gl = this._renderer.gl;\n\n gl.bindRenderbuffer(\n gl.RENDERBUFFER,\n glRenderTarget.depthStencilRenderBuffer\n );\n\n if (glRenderTarget.msaa)\n {\n gl.renderbufferStorageMultisample(\n gl.RENDERBUFFER,\n 4,\n gl.DEPTH24_STENCIL8,\n glRenderTarget.width,\n glRenderTarget.height\n );\n }\n else\n {\n gl.renderbufferStorage(\n gl.RENDERBUFFER,\n this._renderer.context.webGLVersion === 2\n ? gl.DEPTH24_STENCIL8\n : gl.DEPTH_STENCIL,\n glRenderTarget.width,\n glRenderTarget.height\n );\n }\n }\n}\n","import type { Matrix } from '../../../../maths/matrix/Matrix';\n\nexport function calculateProjection(\n pm: Matrix,\n x: number,\n y: number,\n width: number,\n height: number,\n flipY: boolean\n): Matrix\n{\n const sign = flipY ? 1 : -1;\n\n pm.identity();\n\n pm.a = (1 / width * 2);\n pm.d = sign * (1 / height * 2);\n\n pm.tx = -1 - (x * pm.a);\n pm.ty = -sign - (y * pm.d);\n\n return pm;\n}\n","import { CanvasSource } from '../sources/CanvasSource';\nimport { Texture } from '../Texture';\n\nimport type { ICanvas } from '../../../../../environment/canvas/ICanvas';\nimport type { CanvasSourceOptions } from '../sources/CanvasSource';\n\nconst canvasCache: Map = new Map();\n\nexport function getCanvasTexture(canvas: ICanvas, options?: CanvasSourceOptions): Texture\n{\n if (!canvasCache.has(canvas))\n {\n const texture = new Texture({\n source: new CanvasSource({\n resource: canvas,\n ...options,\n })\n });\n\n const onDestroy = () =>\n {\n if (canvasCache.get(canvas) === texture)\n {\n canvasCache.delete(canvas);\n }\n };\n\n texture.once('destroy', onDestroy);\n texture.source.once('destroy', onDestroy);\n\n canvasCache.set(canvas, texture);\n }\n\n return canvasCache.get(canvas);\n}\n\nexport function hasCachedCanvasTexture(canvas: ICanvas): boolean\n{\n return canvasCache.has(canvas);\n}\n","import type { RenderTarget } from './RenderTarget';\n\n/**\n * Checks if the render target is viewable on the screen\n * Basically, is it a canvas element and is that canvas element in the DOM\n * @param renderTarget - the render target to check\n * @returns true if the render target is viewable on the screen\n */\nexport function isRenderingToScreen(renderTarget: RenderTarget): boolean\n{\n const resource = renderTarget.colorTexture.source.resource;\n\n return ((globalThis.HTMLCanvasElement && resource instanceof HTMLCanvasElement) && document.body.contains(resource));\n}\n","// what we are building is a platform and a framework.\n// import { Matrix } from '../../shared/maths/Matrix';\nimport { uid } from '../../../../utils/data/uid';\nimport { TextureSource } from '../texture/sources/TextureSource';\nimport { Texture } from '../texture/Texture';\n\nimport type { BindableTexture } from '../texture/Texture';\n\n/**\n * Options for creating a render target.\n * @memberof rendering\n */\nexport interface RenderTargetOptions\n{\n /** the width of the RenderTarget */\n width?: number;\n /** the height of the RenderTarget */\n height?: number;\n /** the resolution of the RenderTarget */\n resolution?: number;\n /** an array of textures, or a number indicating how many color textures there should be */\n colorTextures?: BindableTexture[] | number;\n /** should this render target have a stencil buffer? */\n stencil?: boolean;\n /** should this render target have a depth buffer? */\n depth?: boolean;\n /** a depth stencil texture that the depth and stencil outputs will be written to */\n depthStencilTexture?: BindableTexture | boolean;\n /** should this render target be antialiased? */\n antialias?: boolean;\n /** is this a root element, true if this is gl context owners render target */\n isRoot?: boolean;\n}\n\n/**\n * A class that describes what the renderers are rendering to.\n * This can be as simple as a Texture, or as complex as a multi-texture, multi-sampled render target.\n * Support for stencil and depth buffers is also included.\n *\n * If you need something more complex than a Texture to render to, you should use this class.\n * Under the hood, all textures you render to have a RenderTarget created on their behalf.\n * @memberof rendering\n */\nexport class RenderTarget\n{\n /** The default options for a render target */\n public static defaultOptions: RenderTargetOptions = {\n /** the width of the RenderTarget */\n width: 0,\n /** the height of the RenderTarget */\n height: 0,\n /** the resolution of the RenderTarget */\n resolution: 1,\n /** an array of textures, or a number indicating how many color textures there should be */\n colorTextures: 1,\n /** should this render target have a stencil buffer? */\n stencil: false,\n /** should this render target have a depth buffer? */\n depth: false,\n /** should this render target be antialiased? */\n antialias: false, // save on perf by default!\n /** is this a root element, true if this is gl context owners render target */\n isRoot: false\n };\n\n public uid = uid('renderTarget');\n\n /**\n * An array of textures that can be written to by the GPU - mostly this has one texture in Pixi, but you could\n * write to multiple if required! (eg deferred lighting)\n */\n public colorTextures: TextureSource[] = [];\n /** the stencil and depth buffer will right to this texture in WebGPU */\n public depthStencilTexture: TextureSource;\n /** if true, will ensure a stencil buffer is added. For WebGPU, this will automatically create a depthStencilTexture */\n public stencil: boolean;\n /** if true, will ensure a depth buffer is added. For WebGPU, this will automatically create a depthStencilTexture */\n public depth: boolean;\n\n public dirtyId = 0;\n public isRoot = false;\n\n private readonly _size = new Float32Array(2);\n /** if true, then when the render target is destroyed, it will destroy all the textures that were created for it. */\n private readonly _managedColorTextures: boolean = false;\n\n /**\n * @param [descriptor] - Options for creating a render target.\n */\n constructor(descriptor: RenderTargetOptions = {})\n {\n descriptor = { ...RenderTarget.defaultOptions, ...descriptor };\n\n this.stencil = descriptor.stencil;\n this.depth = descriptor.depth;\n this.isRoot = descriptor.isRoot;\n\n if (typeof descriptor.colorTextures === 'number')\n {\n this._managedColorTextures = true;\n\n for (let i = 0; i < descriptor.colorTextures; i++)\n {\n this.colorTextures.push(new TextureSource({\n width: descriptor.width,\n height: descriptor.height,\n resolution: descriptor.resolution,\n antialias: descriptor.antialias,\n })\n );\n }\n }\n else\n {\n this.colorTextures = [...descriptor.colorTextures.map((texture) => texture.source)];\n\n const colorSource = this.colorTexture.source;\n\n this.resize(colorSource.width, colorSource.height, colorSource._resolution);\n }\n\n // the first color texture drives the size of all others..\n this.colorTexture.source.on('resize', this.onSourceResize, this);\n\n // TODO should listen for texture destroyed?\n\n if (descriptor.depthStencilTexture || this.stencil)\n {\n // TODO add a test\n if (descriptor.depthStencilTexture instanceof Texture\n || descriptor.depthStencilTexture instanceof TextureSource)\n {\n this.depthStencilTexture = descriptor.depthStencilTexture.source;\n }\n else\n {\n this.ensureDepthStencilTexture();\n }\n }\n }\n\n get size(): [number, number]\n {\n const _size = this._size;\n\n _size[0] = this.pixelWidth;\n _size[1] = this.pixelHeight;\n\n return _size as any as [number, number];\n }\n\n get width(): number\n {\n return this.colorTexture.source.width;\n }\n\n get height(): number\n {\n return this.colorTexture.source.height;\n }\n get pixelWidth(): number\n {\n return this.colorTexture.source.pixelWidth;\n }\n\n get pixelHeight(): number\n {\n return this.colorTexture.source.pixelHeight;\n }\n\n get resolution(): number\n {\n return this.colorTexture.source._resolution;\n }\n\n get colorTexture(): TextureSource\n {\n return this.colorTextures[0];\n }\n\n protected onSourceResize(source: TextureSource)\n {\n this.resize(source.width, source.height, source._resolution, true);\n }\n\n /**\n * This will ensure a depthStencil texture is created for this render target.\n * Most likely called by the mask system to make sure we have stencil buffer added.\n * @internal\n * @ignore\n */\n public ensureDepthStencilTexture()\n {\n if (!this.depthStencilTexture)\n {\n this.depthStencilTexture = new TextureSource({\n width: this.width,\n height: this.height,\n resolution: this.resolution,\n format: 'depth24plus-stencil8',\n autoGenerateMipmaps: false,\n antialias: false,\n mipLevelCount: 1,\n // sampleCount: handled by the render target system..\n });\n }\n }\n\n public resize(width: number, height: number, resolution = this.resolution, skipColorTexture = false)\n {\n this.dirtyId++;\n\n this.colorTextures.forEach((colorTexture, i) =>\n {\n if (skipColorTexture && i === 0) return;\n\n colorTexture.source.resize(width, height, resolution);\n });\n\n if (this.depthStencilTexture)\n {\n this.depthStencilTexture.source.resize(width, height, resolution);\n }\n }\n\n public destroy()\n {\n this.colorTexture.source.off('resize', this.onSourceResize, this);\n\n if (this._managedColorTextures)\n {\n this.colorTextures.forEach((texture) =>\n {\n texture.destroy();\n });\n }\n\n if (this.depthStencilTexture)\n {\n this.depthStencilTexture.destroy();\n delete this.depthStencilTexture;\n }\n }\n}\n","import { Matrix } from '../../../../maths/matrix/Matrix';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { CLEAR } from '../../gl/const';\nimport { calculateProjection } from '../../gpu/renderTarget/calculateProjection';\nimport { SystemRunner } from '../system/SystemRunner';\nimport { CanvasSource } from '../texture/sources/CanvasSource';\nimport { TextureSource } from '../texture/sources/TextureSource';\nimport { Texture } from '../texture/Texture';\nimport { getCanvasTexture } from '../texture/utils/getCanvasTexture';\nimport { isRenderingToScreen } from './isRenderingToScreen';\nimport { RenderTarget } from './RenderTarget';\n\nimport type { RgbaArray } from '../../../../color/Color';\nimport type { ICanvas } from '../../../../environment/canvas/ICanvas';\nimport type { CLEAR_OR_BOOL } from '../../gl/const';\nimport type { GlRenderTarget } from '../../gl/GlRenderTarget';\nimport type { GpuRenderTarget } from '../../gpu/renderTarget/GpuRenderTarget';\nimport type { Renderer } from '../../types';\nimport type { System } from '../system/System';\nimport type { BindableTexture } from '../texture/Texture';\n\n/**\n * A render surface is a texture, canvas, or render target\n * @memberof rendering\n * @see environment.ICanvas\n * @see rendering.Texture\n * @see rendering.RenderTarget\n */\nexport type RenderSurface = ICanvas | BindableTexture | RenderTarget;\n\n/**\n * stores a render target and its frame\n * @ignore\n */\ninterface RenderTargetAndFrame\n{\n /** the render target */\n renderTarget: RenderTarget;\n /** the frame to use when using the render target */\n frame: Rectangle\n}\n\n/**\n * An adaptor interface for RenderTargetSystem to support WebGL and WebGPU.\n * This is used internally by the renderer, and is not intended to be used directly.\n * @ignore\n */\nexport interface RenderTargetAdaptor\n{\n init(\n /** the renderer */\n renderer: Renderer,\n /** the render target system */\n renderTargetSystem: RenderTargetSystem\n ): void\n\n /** A function copies the contents of a render surface to a texture */\n copyToTexture(\n /** the render surface to copy from */\n sourceRenderSurfaceTexture: RenderTarget,\n /** the texture to copy to */\n destinationTexture: Texture,\n /** the origin of the copy */\n originSrc: { x: number; y: number },\n /** the size of the copy */\n size: { width: number; height: number },\n /** the destination origin (top left to paste from!) */\n originDest?: { x: number; y: number },\n ): Texture\n\n /** starts a render pass on the render target */\n startRenderPass(\n /** the render target to start the render pass on */\n renderTarget: RenderTarget,\n /* the clear mode to use. Can be true or a CLEAR number 'COLOR | DEPTH | STENCIL' 0b111* */\n clear: CLEAR_OR_BOOL,\n /** the color to clear to */\n clearColor?: RgbaArray,\n /** the viewport to use */\n viewport?: Rectangle\n ): void\n\n /** clears the current render target to the specified color */\n clear(\n /** the render target to clear */\n renderTarget: RenderTarget,\n /** the clear mode to use. Can be true or a CLEAR number 'COLOR | DEPTH | STENCIL' 0b111 */\n clear: CLEAR_OR_BOOL,\n /** the color to clear to */\n clearColor?: RgbaArray,\n /** the viewport to use */\n viewport?: Rectangle\n ): void\n\n /** finishes the current render pass */\n finishRenderPass(renderTarget: RenderTarget): void\n\n /**\n * initializes a gpu render target. Both renderers use this function to initialize a gpu render target\n * Its different type of object depending on the renderer.\n */\n initGpuRenderTarget(\n /** the render target to initialize */\n renderTarget: RenderTarget\n ): RENDER_TARGET\n\n /** called when a render target is resized */\n resizeGpuRenderTarget(\n /** the render target to resize */\n renderTarget: RenderTarget\n ): void\n\n /** destroys the gpu render target */\n destroyGpuRenderTarget(\n /** the render target to destroy */\n gpuRenderTarget: RENDER_TARGET\n ): void\n}\n\n/**\n * A system that manages render targets. A render target is essentially a place where the shaders can color in the pixels.\n * The render target system is responsible for binding the render target to the renderer, and managing the viewport.\n * Render targets can be pushed and popped.\n *\n * To make it easier, you can also bind textures and canvases too. This will automatically create a render target for you.\n * The render target itself is a lot more powerful than just a texture or canvas,\n * as it can have multiple textures attached to it.\n * It will also give ou fine grain control over the stencil buffer / depth texture.\n * @example\n *\n * ```js\n *\n * // create a render target\n * const renderTarget = new RenderTarget({\n * colorTextures: [new TextureSource({ width: 100, height: 100 })],\n * });\n *\n * // bind the render target\n * renderer.renderTarget.bind(renderTarget);\n *\n * // draw something!\n * ```\n * @memberof rendering\n */\nexport class RenderTargetSystem implements System\n{\n /** When rendering of a scene begins, this is where the root render surface is stored */\n public rootRenderTarget: RenderTarget;\n /** This is the root viewport for the render pass*/\n public rootViewPort = new Rectangle();\n /** A boolean that lets the dev know if the current render pass is rendering to the screen. Used by some plugins */\n public renderingToScreen: boolean;\n /** the current active render target */\n public renderTarget: RenderTarget;\n /** the current active render surface that the render target is created from */\n public renderSurface: RenderSurface;\n /** the current viewport that the gpu is using */\n public readonly viewport = new Rectangle();\n /**\n * a runner that lets systems know if the active render target has changed.\n * Eg the Stencil System needs to know so it can manage the stencil buffer\n */\n public readonly onRenderTargetChange = new SystemRunner('onRenderTargetChange');\n /** the projection matrix that is used by the shaders based on the active render target and the viewport */\n public readonly projectionMatrix = new Matrix();\n /** the default clear color for render targets */\n public readonly defaultClearColor: RgbaArray = [0, 0, 0, 0];\n /** a reference to the adaptor that interfaces with WebGL / WebGP */\n public readonly adaptor: RenderTargetAdaptor;\n /**\n * a hash that stores the render target for a given render surface. When you pass in a texture source,\n * a render target is created for it. This map stores and makes it easy to retrieve the render target\n */\n private readonly _renderSurfaceToRenderTargetHash: Map\n = new Map();\n /** A hash that stores a gpu render target for a given render target. */\n private _gpuRenderTargetHash: Record = Object.create(null);\n /**\n * A stack that stores the render target and frame that is currently being rendered to.\n * When push is called, the current render target is stored in this stack.\n * When pop is called, the previous render target is restored.\n */\n private readonly _renderTargetStack: RenderTargetAndFrame[] = [];\n /** A reference to the renderer */\n private readonly _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n /** called when dev wants to finish a render pass */\n public finishRenderPass()\n {\n this.adaptor.finishRenderPass(this.renderTarget);\n }\n\n /**\n * called when the renderer starts to render a scene.\n * @param options\n * @param options.target - the render target to render to\n * @param options.clear - the clear mode to use. Can be true or a CLEAR number 'COLOR | DEPTH | STENCIL' 0b111\n * @param options.clearColor - the color to clear to\n * @param options.frame - the frame to render to\n */\n public renderStart({\n target,\n clear,\n clearColor,\n frame\n }: {\n target: RenderSurface;\n clear: CLEAR_OR_BOOL;\n clearColor: RgbaArray;\n frame?: Rectangle\n }): void\n {\n // TODO no need to reset this - use optimised index instead\n this._renderTargetStack.length = 0;\n\n this.push(\n target,\n clear,\n clearColor,\n frame\n );\n\n this.rootViewPort.copyFrom(this.viewport);\n this.rootRenderTarget = this.renderTarget;\n this.renderingToScreen = isRenderingToScreen(this.rootRenderTarget);\n }\n\n /**\n * Binding a render surface! This is the main function of the render target system.\n * It will take the RenderSurface (which can be a texture, canvas, or render target) and bind it to the renderer.\n * Once bound all draw calls will be rendered to the render surface.\n *\n * If a frame is not provide and the render surface is a texture, the frame of the texture will be used.\n * @param renderSurface - the render surface to bind\n * @param clear - the clear mode to use. Can be true or a CLEAR number 'COLOR | DEPTH | STENCIL' 0b111\n * @param clearColor - the color to clear to\n * @param frame - the frame to render to\n * @returns the render target that was bound\n */\n public bind(\n renderSurface: RenderSurface,\n clear: CLEAR_OR_BOOL = true,\n clearColor?: RgbaArray,\n frame?: Rectangle\n ): RenderTarget\n {\n const renderTarget = this.getRenderTarget(renderSurface);\n\n const didChange = this.renderTarget !== renderTarget;\n\n this.renderTarget = renderTarget;\n this.renderSurface = renderSurface;\n\n const gpuRenderTarget = this.getGpuRenderTarget(renderTarget);\n\n if (renderTarget.pixelWidth !== gpuRenderTarget.width\n || renderTarget.pixelHeight !== gpuRenderTarget.height)\n {\n this.adaptor.resizeGpuRenderTarget(renderTarget);\n\n gpuRenderTarget.width = renderTarget.pixelWidth;\n gpuRenderTarget.height = renderTarget.pixelHeight;\n }\n\n const source = renderTarget.colorTexture;\n const viewport = this.viewport;\n\n const pixelWidth = source.pixelWidth;\n const pixelHeight = source.pixelHeight;\n\n if (!frame && renderSurface instanceof Texture)\n {\n frame = renderSurface.frame;\n }\n\n if (frame)\n {\n const resolution = source._resolution;\n\n viewport.x = ((frame.x * resolution) + 0.5) | 0;\n viewport.y = ((frame.y * resolution) + 0.5) | 0;\n viewport.width = ((frame.width * resolution) + 0.5) | 0;\n viewport.height = ((frame.height * resolution) + 0.5) | 0;\n }\n else\n {\n viewport.x = 0;\n viewport.y = 0;\n viewport.width = pixelWidth;\n viewport.height = pixelHeight;\n }\n\n calculateProjection(\n this.projectionMatrix,\n 0, 0,\n viewport.width / source.resolution,\n viewport.height / source.resolution,\n !renderTarget.isRoot\n );\n\n this.adaptor.startRenderPass(renderTarget, clear, clearColor, viewport);\n\n if (didChange)\n {\n this.onRenderTargetChange.emit(renderTarget);\n }\n\n return renderTarget;\n }\n\n public clear(\n target?: RenderSurface,\n clear: CLEAR_OR_BOOL = CLEAR.ALL,\n clearColor?: RgbaArray,\n )\n {\n if (!clear) return;\n\n if (target)\n {\n target = this.getRenderTarget(target);\n }\n\n this.adaptor.clear(\n (target as RenderTarget) || this.renderTarget,\n clear,\n clearColor,\n this.viewport\n );\n }\n\n protected contextChange(): void\n {\n this._gpuRenderTargetHash = Object.create(null);\n }\n\n /**\n * Push a render surface to the renderer. This will bind the render surface to the renderer,\n * @param renderSurface - the render surface to push\n * @param clear - the clear mode to use. Can be true or a CLEAR number 'COLOR | DEPTH | STENCIL' 0b111\n * @param clearColor - the color to clear to\n * @param frame - the frame to use when rendering to the render surface\n */\n public push(\n renderSurface: RenderSurface,\n clear: CLEAR | boolean = CLEAR.ALL,\n clearColor?: RgbaArray,\n frame?: Rectangle\n )\n {\n const renderTarget = this.bind(renderSurface, clear, clearColor, frame);\n\n this._renderTargetStack.push({\n renderTarget,\n frame,\n });\n\n return renderTarget;\n }\n\n /** Pops the current render target from the renderer and restores the previous render target. */\n public pop()\n {\n this._renderTargetStack.pop();\n\n const currentRenderTargetData = this._renderTargetStack[this._renderTargetStack.length - 1];\n\n this.bind(currentRenderTargetData.renderTarget, false, null, currentRenderTargetData.frame);\n }\n\n /**\n * Gets the render target from the provide render surface. Eg if its a texture,\n * it will return the render target for the texture.\n * If its a render target, it will return the same render target.\n * @param renderSurface - the render surface to get the render target for\n * @returns the render target for the render surface\n */\n public getRenderTarget(renderSurface: RenderSurface): RenderTarget\n {\n if (((renderSurface as Texture).isTexture))\n {\n renderSurface = (renderSurface as Texture).source;\n }\n\n return this._renderSurfaceToRenderTargetHash.get(renderSurface)\n ?? this._initRenderTarget(renderSurface);\n }\n\n /**\n * Copies a render surface to another texture\n * @param sourceRenderSurfaceTexture - the render surface to copy from\n * @param destinationTexture - the texture to copy to\n * @param originSrc - the origin of the copy\n * @param originSrc.x - the x origin of the copy\n * @param originSrc.y - the y origin of the copy\n * @param size - the size of the copy\n * @param size.width - the width of the copy\n * @param size.height - the height of the copy\n * @param originDest - the destination origin (top left to paste from!)\n * @param originDest.x - the x origin of the paste\n * @param originDest.y - the y origin of the paste\n */\n public copyToTexture(\n sourceRenderSurfaceTexture: RenderTarget,\n destinationTexture: Texture,\n originSrc: { x: number; y: number },\n size: { width: number; height: number },\n originDest: { x: number; y: number; },\n )\n {\n // fit the size to the source we don't want to go out of bounds\n\n if (originSrc.x < 0)\n {\n size.width += originSrc.x;\n originDest.x -= originSrc.x;\n originSrc.x = 0;\n }\n\n if (originSrc.y < 0)\n {\n size.height += originSrc.y;\n originDest.y -= originSrc.y;\n originSrc.y = 0;\n }\n\n const { pixelWidth, pixelHeight } = sourceRenderSurfaceTexture;\n\n size.width = Math.min(size.width, pixelWidth - originSrc.x);\n size.height = Math.min(size.height, pixelHeight - originSrc.y);\n\n return this.adaptor.copyToTexture(\n sourceRenderSurfaceTexture,\n destinationTexture,\n originSrc,\n size,\n originDest\n );\n }\n\n /**\n * ensures that we have a depth stencil buffer available to render to\n * This is used by the mask system to make sure we have a stencil buffer.\n */\n public ensureDepthStencil()\n {\n if (!this.renderTarget.stencil)\n {\n this.renderTarget.stencil = true;\n\n this.adaptor.startRenderPass(this.renderTarget, false, null, this.viewport);\n }\n }\n\n /** nukes the render target system */\n public destroy()\n {\n (this._renderer as null) = null;\n\n this._renderSurfaceToRenderTargetHash.forEach((renderTarget, key) =>\n {\n if (renderTarget !== key)\n {\n renderTarget.destroy();\n }\n });\n\n this._renderSurfaceToRenderTargetHash.clear();\n\n this._gpuRenderTargetHash = Object.create(null);\n }\n\n private _initRenderTarget(renderSurface: RenderSurface): RenderTarget\n {\n let renderTarget: RenderTarget = null;\n\n if (CanvasSource.test(renderSurface))\n {\n renderSurface = getCanvasTexture(renderSurface as ICanvas).source;\n }\n\n if (renderSurface instanceof RenderTarget)\n {\n renderTarget = renderSurface;\n }\n else if (renderSurface instanceof TextureSource)\n {\n renderTarget = new RenderTarget({\n colorTextures: [renderSurface],\n });\n\n if (CanvasSource.test(renderSurface.source.resource))\n {\n renderTarget.isRoot = true;\n }\n\n // TODO add a test for this\n renderSurface.once('destroy', () =>\n {\n renderTarget.destroy();\n\n const gpuRenderTarget = this._gpuRenderTargetHash[renderTarget.uid];\n\n if (gpuRenderTarget)\n {\n this._gpuRenderTargetHash[renderTarget.uid] = null;\n this.adaptor.destroyGpuRenderTarget(gpuRenderTarget);\n }\n });\n }\n\n this._renderSurfaceToRenderTargetHash.set(renderSurface, renderTarget);\n\n return renderTarget;\n }\n\n public getGpuRenderTarget(renderTarget: RenderTarget)\n {\n return this._gpuRenderTargetHash[renderTarget.uid]\n || (this._gpuRenderTargetHash[renderTarget.uid] = this.adaptor.initGpuRenderTarget(renderTarget));\n }\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { RenderTargetSystem } from '../../shared/renderTarget/RenderTargetSystem';\nimport { GlRenderTargetAdaptor } from './GlRenderTargetAdaptor';\n\nimport type { GlRenderTarget } from '../GlRenderTarget';\nimport type { WebGLRenderer } from '../WebGLRenderer';\n\n/**\n * The WebGL adaptor for the render target system. Allows the Render Target System to be used with the WebGl renderer\n * @memberof rendering\n */\nexport class GlRenderTargetSystem extends RenderTargetSystem\n{\n /** @ignore */\n public static extension = {\n type: [ExtensionType.WebGLSystem],\n name: 'renderTarget',\n } as const;\n\n public adaptor = new GlRenderTargetAdaptor();\n\n constructor(renderer: WebGLRenderer)\n {\n super(renderer);\n\n this.adaptor.init(renderer, this);\n }\n}\n","import EventEmitter from 'eventemitter3';\nimport { uid } from '../../../../utils/data/uid';\n\nimport type { BindResource } from '../../gpu/shader/BindResource';\nimport type { Buffer } from './Buffer';\n\n/**\n * A resource that can be bound to a bind group and used in a shader.\n * Whilst a buffer can be used as a resource, this class allows you to specify an offset and size of the buffer to use.\n * This is useful if you have a large buffer and only part of it is used in a shader.\n *\n * This resource, will listen for changes on the underlying buffer and emit a itself if the buffer changes shape.\n * @example\n *\n * const buffer = new Buffer({\n * data: new Float32Array(1000),\n * usage: BufferUsage.UNIFORM,\n * });\n * // Create a buffer resource that uses the first 100 bytes of a buffer\n * const bufferResource = new BufferResource({\n * buffer,\n * offset: 0,\n * size: 100,\n * });\n * @memberof rendering\n */\nexport class BufferResource extends EventEmitter<{\n change: BindResource,\n}> implements BindResource\n{\n /**\n * emits when the underlying buffer has changed shape (i.e. resized)\n * letting the renderer know that it needs to discard the old buffer on the GPU and create a new one\n * @event change\n */\n\n /**\n * a unique id for this uniform group used through the renderer\n * @internal\n * @ignore\n */\n public readonly uid = uid('buffer');\n\n /**\n * a resource type, used to identify how to handle it when its in a bind group / shader resource\n * @internal\n * @ignore\n */\n public readonly _resourceType = 'bufferResource';\n\n /**\n * used internally to know if a uniform group was used in the last render pass\n * @internal\n * @ignore\n */\n public _touched = 0;\n\n /**\n * the resource id used internally by the renderer to build bind group keys\n * @internal\n * @ignore\n */\n public _resourceId = uid('resource');\n\n /** the underlying buffer that this resource is using */\n public buffer: Buffer;\n /** the offset of the buffer this resource is using. If not provided, then it will use the offset of the buffer. */\n public readonly offset: number;\n /** the size of the buffer this resource is using. If not provided, then it will use the size of the buffer. */\n public readonly size: number;\n /**\n * A cheeky hint to the GL renderer to let it know this is a BufferResource\n * @internal\n * @ignore\n */\n public readonly _bufferResource = true;\n\n /**\n * Has the Buffer resource been destroyed?\n * @readonly\n */\n public destroyed = false;\n\n /**\n * Create a new Buffer Resource.\n * @param options - The options for the buffer resource\n * @param options.buffer - The underlying buffer that this resource is using\n * @param options.offset - The offset of the buffer this resource is using.\n * If not provided, then it will use the offset of the buffer.\n * @param options.size - The size of the buffer this resource is using.\n * If not provided, then it will use the size of the buffer.\n */\n constructor({ buffer, offset, size }: { buffer: Buffer; offset?: number; size?: number; })\n {\n super();\n\n this.buffer = buffer;\n this.offset = offset | 0;\n this.size = size;\n\n this.buffer.on('change', this.onBufferChange, this);\n }\n\n protected onBufferChange(): void\n {\n this._resourceId = uid('resource');\n\n this.emit('change', this);\n }\n\n /**\n * Destroys this resource. Make sure the underlying buffer is not used anywhere else\n * if you want to destroy it as well, or code will explode\n * @param destroyBuffer - Should the underlying buffer be destroyed as well?\n */\n public destroy(destroyBuffer = false): void\n {\n this.destroyed = true;\n\n if (destroyBuffer)\n {\n this.buffer.destroy();\n }\n\n this.emit('change', this);\n\n this.buffer = null;\n }\n}\n","import { BufferResource } from '../../shared/buffer/BufferResource';\nimport { UniformGroup } from '../../shared/shader/UniformGroup';\nimport { TextureSource } from '../../shared/texture/sources/TextureSource';\n\nimport type { Shader } from '../../shared/shader/Shader';\nimport type { GlShaderSystem, ShaderSyncFunction } from './GlShaderSystem';\n\n/**\n * Generates the a function that will efficiantly sync shader resources with the GPU.\n * @param shader - The shader to generate the code for\n * @param shaderSystem - An instance of the shader system\n */\nexport function generateShaderSyncCode(shader: Shader, shaderSystem: GlShaderSystem): ShaderSyncFunction\n{\n const funcFragments: string[] = [];\n\n /**\n * rS = renderer.shader\n * sS = shaderSystem\n * sD = shaderData\n * g = shader.groups\n * s = shader\n * r = renderer\n * ugS = renderer.uniformGroupSystem\n */\n const headerFragments: string[] = [`\n var g = s.groups;\n var sS = r.shader;\n var p = s.glProgram;\n var ugS = r.uniformGroup;\n var resources;\n `];\n\n let addedTextreSystem = false;\n let blockIndex = 0;\n let textureCount = 0;\n\n const programData = shaderSystem._getProgramData(shader.glProgram);\n\n for (const i in shader.groups)\n {\n const group = shader.groups[i];\n\n funcFragments.push(`\n resources = g[${i}].resources;\n `);\n\n for (const j in group.resources)\n {\n const resource = group.resources[j];\n\n if (resource instanceof UniformGroup)\n {\n if (resource.ubo)\n {\n funcFragments.push(`\n sS.bindUniformBlock(\n resources[${j}],\n sS._uniformBindMap[${i}[${j}],\n ${blockIndex++}\n );\n `);\n }\n else\n {\n funcFragments.push(`\n ugS.updateUniformGroup(resources[${j}], p, sD);\n `);\n }\n }\n else if (resource instanceof BufferResource)\n {\n funcFragments.push(`\n sS.bindUniformBlock(\n resources[${j}],\n sS._uniformBindMap[${i}[${j}],\n ${blockIndex++}\n );\n `);\n }\n else if (resource instanceof TextureSource)\n {\n const uniformName = shader._uniformBindMap[i as unknown as number][j as unknown as number];\n\n const uniformData = programData.uniformData[uniformName];\n\n if (uniformData)\n {\n if (!addedTextreSystem)\n {\n addedTextreSystem = true;\n headerFragments.push(`\n var tS = r.texture;\n `);\n }\n\n shaderSystem._gl.uniform1i(uniformData.location, textureCount);\n\n funcFragments.push(`\n tS.bind(resources[${j}], ${textureCount});\n `);\n\n textureCount++;\n }\n }\n }\n }\n\n const functionSource = [...headerFragments, ...funcFragments].join('\\n');\n\n // eslint-disable-next-line no-new-func\n return new Function('r', 's', 'sD', functionSource) as ShaderSyncFunction;\n}\n","/**\n * @private\n */\nexport class IGLUniformData\n{\n public location: WebGLUniformLocation;\n public value: number | boolean | Float32Array | Int32Array | Uint32Array | boolean[];\n}\n\n/**\n * Helper class to create a WebGL Program\n * @private\n */\nexport class GlProgramData\n{\n /** The shader program. */\n public program: WebGLProgram;\n\n /**\n * Holds the uniform data which contains uniform locations\n * and current uniform values used for caching and preventing unneeded GPU commands.\n */\n public uniformData: Record;\n\n /**\n * UniformGroups holds the various upload functions for the shader. Each uniform group\n * and program have a unique upload function generated.\n */\n public uniformGroups: Record;\n\n /** A hash that stores where UBOs are bound to on the program. */\n public uniformBlockBindings: Record;\n\n /** A hash for lazily-generated uniform uploading functions. */\n public uniformSync: Record;\n\n /**\n * A place where dirty ticks are stored for groups\n * If a tick here does not match with the Higher level Programs tick, it means\n * we should re upload the data.\n */\n public uniformDirtyGroups: Record;\n\n /**\n * Makes a new Pixi program.\n * @param program - webgl program\n * @param uniformData - uniforms\n */\n constructor(program: WebGLProgram, uniformData: {[key: string]: IGLUniformData})\n {\n this.program = program;\n this.uniformData = uniformData;\n this.uniformGroups = {};\n this.uniformDirtyGroups = {};\n this.uniformBlockBindings = {};\n }\n\n /** Destroys this program. */\n public destroy(): void\n {\n this.uniformData = null;\n this.uniformGroups = null;\n this.uniformDirtyGroups = null;\n this.uniformBlockBindings = null;\n this.program = null;\n }\n}\n","/**\n * @private\n * @param {WebGLRenderingContext} gl - The current WebGL context {WebGLProgram}\n * @param {number} type - the type, can be either VERTEX_SHADER or FRAGMENT_SHADER\n * @param {string} src - The vertex shader source as an array of strings.\n * @returns {WebGLShader} the shader\n */\nexport function compileShader(gl: WebGLRenderingContextBase, type: number, src: string): WebGLShader\n{\n const shader = gl.createShader(type);\n\n gl.shaderSource(shader, src);\n gl.compileShader(shader);\n\n return shader;\n}\n","function booleanArray(size: number): Array\n{\n const array = new Array(size);\n\n for (let i = 0; i < array.length; i++)\n {\n array[i] = false;\n }\n\n return array;\n}\n\n/**\n * @method defaultValue\n * @param {string} type - Type of value\n * @param {number} size\n * @private\n */\nexport function defaultValue(\n type: string,\n size: number\n): number | Float32Array | Int32Array | Uint32Array | boolean | boolean[]\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 'uint':\n case 'sampler2D':\n case 'sampler2DArray':\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 'uvec2':\n return new Uint32Array(2 * size);\n\n case 'uvec3':\n return new Uint32Array(3 * size);\n\n case 'uvec4':\n return new Uint32Array(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 return null;\n}\n","import type { Dict } from '../../../../../utils/types';\nimport type { VertexFormat } from '../../../shared/geometry/const';\n\nlet GL_TABLE: Dict = null;\n\nconst GL_TO_GLSL_TYPES: Dict = {\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 UNSIGNED_INT: 'uint',\n UNSIGNED_INT_VEC2: 'uvec2',\n UNSIGNED_INT_VEC3: 'uvec3',\n UNSIGNED_INT_VEC4: 'uvec4',\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 INT_SAMPLER_2D: 'sampler2D',\n UNSIGNED_INT_SAMPLER_2D: 'sampler2D',\n SAMPLER_CUBE: 'samplerCube',\n INT_SAMPLER_CUBE: 'samplerCube',\n UNSIGNED_INT_SAMPLER_CUBE: 'samplerCube',\n SAMPLER_2D_ARRAY: 'sampler2DArray',\n INT_SAMPLER_2D_ARRAY: 'sampler2DArray',\n UNSIGNED_INT_SAMPLER_2D_ARRAY: 'sampler2DArray',\n};\n\nconst GLSL_TO_VERTEX_TYPES: Record = {\n\n float: 'float32',\n vec2: 'float32x2',\n vec3: 'float32x3',\n vec4: 'float32x4',\n\n int: 'sint32',\n ivec2: 'sint32x2',\n ivec3: 'sint32x3',\n ivec4: 'sint32x4',\n\n uint: 'uint32',\n uvec2: 'uint32x2',\n uvec3: 'uint32x3',\n uvec4: 'uint32x4',\n\n bool: 'uint32',\n bvec2: 'uint32x2',\n bvec3: 'uint32x3',\n bvec4: 'uint32x4',\n};\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nexport function mapType(gl: any, type: number): string\n{\n if (!GL_TABLE)\n {\n const typeNames = Object.keys(GL_TO_GLSL_TYPES);\n\n GL_TABLE = {};\n\n for (let i = 0; i < typeNames.length; ++i)\n {\n const tn = typeNames[i];\n\n GL_TABLE[gl[tn]] = GL_TO_GLSL_TYPES[tn];\n }\n }\n\n return GL_TABLE[type];\n}\n\nexport function mapGlToVertexFormat(gl: any, type: number): VertexFormat\n{\n const typeValue = mapType(gl, type);\n\n return GLSL_TO_VERTEX_TYPES[typeValue] || 'float32';\n}\n","import { getAttributeInfoFromFormat } from '../../../shared/geometry/utils/getAttributeInfoFromFormat';\nimport { mapGlToVertexFormat } from './mapType';\n\nimport type { Attribute } from '../../../shared/geometry/Geometry';\n\nexport type ExtractedAttributeData = Omit;\n\n/**\n * returns the attribute data from the program\n * @private\n * @param {WebGLProgram} [program] - the WebGL program\n * @param {WebGLRenderingContext} [gl] - the WebGL context\n * @returns {object} the attribute data for this program\n */\n\nexport function extractAttributesFromGlProgram(\n program: WebGLProgram,\n gl: WebGLRenderingContextBase,\n sortAttributes = false\n): Record\n{\n const attributes: {[key: string]: ExtractedAttributeData} = {};\n\n const totalAttributes = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES);\n\n for (let i = 0; i < totalAttributes; i++)\n {\n const attribData = gl.getActiveAttrib(program, i);\n\n // ignore the default ones!\n if (attribData.name.startsWith('gl_'))\n {\n continue;\n }\n\n const format = mapGlToVertexFormat(gl, attribData.type);\n\n attributes[attribData.name] = {\n location: 0, // set further down..\n format,\n stride: getAttributeInfoFromFormat(format).stride,\n offset: 0,\n instance: false,\n start: 0,\n };\n }\n\n const keys = Object.keys(attributes);\n\n if (sortAttributes)\n {\n keys.sort((a, b) => (a > b) ? 1 : -1); // eslint-disable-line no-confusing-arrow\n\n for (let i = 0; i < keys.length; i++)\n {\n attributes[keys[i]].location = i;\n\n gl.bindAttribLocation(program, i, keys[i]);\n }\n\n gl.linkProgram(program);\n }\n else\n {\n for (let i = 0; i < keys.length; i++)\n {\n attributes[keys[i]].location = gl.getAttribLocation(program, keys[i]);\n }\n }\n\n return attributes;\n}\n","import type { GlUniformBlockData } from '../GlProgram';\n\n/**\n * returns the uniform block data from the program\n * @private\n * @param program - the webgl program\n * @param gl - the WebGL context\n * @returns {object} the uniform data for this program\n */\nexport function getUboData(program: WebGLProgram, gl: WebGL2RenderingContext): Record\n{\n // if uniform buffer data is not supported, early out\n if (!gl.ACTIVE_UNIFORM_BLOCKS) return {};\n\n const uniformBlocks: Record = {};\n\n // const totalUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);\n\n const totalUniformsBlocks = gl.getProgramParameter(program, gl.ACTIVE_UNIFORM_BLOCKS);\n\n for (let i = 0; i < totalUniformsBlocks; i++)\n {\n const name = gl.getActiveUniformBlockName(program, i);\n const uniformBlockIndex = gl.getUniformBlockIndex(program, name);\n\n const size = gl.getActiveUniformBlockParameter(program, i, gl.UNIFORM_BLOCK_DATA_SIZE);\n\n uniformBlocks[name] = {\n name,\n index: uniformBlockIndex,\n size,\n };\n }\n\n return uniformBlocks;\n}\n","import { defaultValue } from './defaultValue';\nimport { mapType } from './mapType';\n\nimport type { GlUniformData } from '../GlProgram';\n\n/**\n * returns the uniform data from the program\n * @private\n * @param program - the webgl program\n * @param gl - the WebGL context\n * @returns {object} the uniform data for this program\n */\nexport function getUniformData(program: WebGLProgram, gl: WebGLRenderingContextBase): {[key: string]: GlUniformData}\n{\n const uniforms: {[key: string]: GlUniformData} = {};\n\n const totalUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);\n\n for (let i = 0; i < totalUniforms; i++)\n {\n const uniformData = gl.getActiveUniform(program, i);\n const name = uniformData.name.replace(/\\[.*?\\]$/, '');\n\n const isArray = !!(uniformData.name.match(/\\[.*?\\]$/));\n\n const type = mapType(gl, uniformData.type);\n\n uniforms[name] = {\n name,\n index: i,\n type,\n size: uniformData.size,\n isArray,\n value: defaultValue(type, uniformData.size),\n };\n }\n\n return uniforms;\n}\n","/**\n * will log a shader error highlighting the lines with the error\n * also will add numbers along the side.\n * @param gl - the WebGLContext\n * @param shader - the shader to log errors for\n */\nfunction logPrettyShaderError(gl: WebGLRenderingContext, shader: WebGLShader): void\n{\n const shaderSrc = gl.getShaderSource(shader)\n .split('\\n')\n .map((line, index) => `${index}: ${line}`);\n\n const shaderLog = gl.getShaderInfoLog(shader);\n const splitShader = shaderLog.split('\\n');\n\n const dedupe: Record = {};\n\n const lineNumbers = splitShader.map((line) => parseFloat(line.replace(/^ERROR\\: 0\\:([\\d]+)\\:.*$/, '$1')))\n .filter((n) =>\n {\n if (n && !dedupe[n])\n {\n dedupe[n] = true;\n\n return true;\n }\n\n return false;\n });\n\n const logArgs = [''];\n\n lineNumbers.forEach((number) =>\n {\n shaderSrc[number - 1] = `%c${shaderSrc[number - 1]}%c`;\n logArgs.push('background: #FF0000; color:#FFFFFF; font-size: 10px', 'font-size: 10px');\n });\n\n const fragmentSourceToLog = shaderSrc\n .join('\\n');\n\n logArgs[0] = fragmentSourceToLog;\n\n console.error(shaderLog);\n\n // eslint-disable-next-line no-console\n console.groupCollapsed('click to view full shader code');\n console.warn(...logArgs);\n // eslint-disable-next-line no-console\n console.groupEnd();\n}\n\n/**\n *\n * logs out any program errors\n * @param gl - The current WebGL context\n * @param program - the WebGL program to display errors for\n * @param vertexShader - the fragment WebGL shader program\n * @param fragmentShader - the vertex WebGL shader program\n * @private\n */\nexport function logProgramError(\n gl: WebGLRenderingContext,\n program: WebGLProgram,\n vertexShader: WebGLShader,\n fragmentShader: WebGLShader\n): void\n{\n // if linking fails, then log and cleanup\n if (!gl.getProgramParameter(program, gl.LINK_STATUS))\n {\n if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS))\n {\n logPrettyShaderError(gl, vertexShader);\n }\n\n if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS))\n {\n logPrettyShaderError(gl, fragmentShader);\n }\n\n console.error('PixiJS Error: Could not initialize shader.');\n\n // if there is a program info log, log it\n if (gl.getProgramInfoLog(program) !== '')\n {\n console.warn('PixiJS Warning: gl.getProgramInfoLog()', gl.getProgramInfoLog(program));\n }\n }\n}\n","import { warn } from '../../../../../utils/logging/warn';\nimport { GlProgramData } from '../GlProgramData';\nimport { compileShader } from './compileShader';\nimport { defaultValue } from './defaultValue';\nimport { extractAttributesFromGlProgram } from './extractAttributesFromGlProgram';\nimport { getUboData } from './getUboData';\nimport { getUniformData } from './getUniformData';\nimport { logProgramError } from './logProgramError';\n\nimport type { GlRenderingContext } from '../../context/GlRenderingContext';\nimport type { GlProgram } from '../GlProgram';\nimport type { IGLUniformData } from '../GlProgramData';\n\n/**\n * generates a WebGL Program object from a high level Pixi Program.\n * @param gl - a rendering context on which to generate the program\n * @param program - the high level Pixi Program.\n * @private\n */\nexport function generateProgram(gl: GlRenderingContext, program: GlProgram): GlProgramData\n{\n const glVertShader = compileShader(gl, gl.VERTEX_SHADER, program.vertex);\n const glFragShader = compileShader(gl, gl.FRAGMENT_SHADER, program.fragment);\n\n const webGLProgram = gl.createProgram();\n\n gl.attachShader(webGLProgram, glVertShader);\n gl.attachShader(webGLProgram, glFragShader);\n\n const transformFeedbackVaryings = program.transformFeedbackVaryings;\n\n if (transformFeedbackVaryings)\n {\n if (typeof gl.transformFeedbackVaryings !== 'function')\n {\n // #if _DEBUG\n warn(`TransformFeedback is not supported but TransformFeedbackVaryings are given.`);\n // #endif\n }\n else\n {\n gl.transformFeedbackVaryings(\n webGLProgram,\n transformFeedbackVaryings.names,\n transformFeedbackVaryings.bufferMode === 'separate'\n ? gl.SEPARATE_ATTRIBS\n : gl.INTERLEAVED_ATTRIBS\n );\n }\n }\n\n gl.linkProgram(webGLProgram);\n\n if (!gl.getProgramParameter(webGLProgram, gl.LINK_STATUS))\n {\n logProgramError(gl, webGLProgram, glVertShader, glFragShader);\n }\n\n // GLSL 1.00: bind attributes sorted by name in ascending order\n // GLSL 3.00: don't change the attribute locations that where chosen by the compiler\n // or assigned by the layout specifier in the shader source code\n program._attributeData = extractAttributesFromGlProgram(\n webGLProgram,\n gl,\n !(/^[ \\t]*#[ \\t]*version[ \\t]+300[ \\t]+es[ \\t]*$/m).test(program.vertex)\n );\n\n program._uniformData = getUniformData(webGLProgram, gl);\n program._uniformBlockData = getUboData(webGLProgram, gl);\n\n gl.deleteShader(glVertShader);\n gl.deleteShader(glFragShader);\n\n const uniformData: {[key: string]: IGLUniformData} = {};\n\n for (const i in program._uniformData)\n {\n const data = program._uniformData[i];\n\n uniformData[i] = {\n location: gl.getUniformLocation(webGLProgram, i),\n value: defaultValue(data.type, data.size),\n };\n }\n\n const glProgram = new GlProgramData(webGLProgram, uniformData);\n\n return glProgram;\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { generateShaderSyncCode } from './GenerateShaderSyncCode';\nimport { generateProgram } from './program/generateProgram';\n\nimport type { BufferResource } from '../../shared/buffer/BufferResource';\nimport type { Shader } from '../../shared/shader/Shader';\nimport type { UniformGroup } from '../../shared/shader/UniformGroup';\nimport type { GlRenderingContext } from '../context/GlRenderingContext';\nimport type { WebGLRenderer } from '../WebGLRenderer';\nimport type { GlProgram } from './GlProgram';\nimport type { GlProgramData } from './GlProgramData';\n\nexport interface ShaderSyncData\n{\n textureCount: number;\n blockIndex: number;\n}\n\nexport type ShaderSyncFunction = (renderer: WebGLRenderer, shader: Shader, syncData: ShaderSyncData) => void;\n\n// default sync data so we don't create a new one each time!\nconst defaultSyncData: ShaderSyncData = {\n textureCount: 0,\n blockIndex: 0,\n};\n\n/**\n * System plugin to the renderer to manage the shaders for WebGL.\n * @memberof rendering\n */\nexport class GlShaderSystem\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ],\n name: 'shader',\n } as const;\n\n /**\n * @internal\n * @private\n */\n public _activeProgram: GlProgram = null;\n\n private _programDataHash: Record = Object.create(null);\n private readonly _renderer: WebGLRenderer;\n public _gl: WebGL2RenderingContext;\n private _maxBindings: number;\n private _nextIndex = 0;\n private _boundUniformsIdsToIndexHash: Record = Object.create(null);\n private _boundIndexToUniformsHash: Record = Object.create(null);\n private _shaderSyncFunctions: Record = Object.create(null);\n\n constructor(renderer: WebGLRenderer)\n {\n this._renderer = renderer;\n }\n\n protected contextChange(gl: GlRenderingContext): void\n {\n this._gl = gl;\n\n this._maxBindings = gl.MAX_UNIFORM_BUFFER_BINDINGS ? gl.getParameter(gl.MAX_UNIFORM_BUFFER_BINDINGS) : 0;\n\n this._programDataHash = Object.create(null);\n this._boundUniformsIdsToIndexHash = Object.create(null);\n this._boundIndexToUniformsHash = Object.create(null);\n /**\n * these need to also be cleared as internally some uniforms are set as an optimisation as the sync\n * function is generated. Specifically the texture ints.\n */\n this._shaderSyncFunctions = Object.create(null);\n this._activeProgram = null;\n }\n\n /**\n * Changes the current shader to the one given in parameter.\n * @param shader - the new shader\n * @param skipSync - false if the shader should automatically sync its uniforms.\n * @returns the glProgram that belongs to the shader.\n */\n public bind(shader: Shader, skipSync?: boolean): void\n {\n this._setProgram(shader.glProgram);\n\n if (skipSync) return;\n\n defaultSyncData.textureCount = 0;\n defaultSyncData.blockIndex = 0;\n\n let syncFunction = this._shaderSyncFunctions[shader.glProgram._key];\n\n if (!syncFunction)\n {\n syncFunction = this._shaderSyncFunctions[shader.glProgram._key] = this._generateShaderSync(shader, this);\n }\n\n syncFunction(this._renderer, shader, defaultSyncData);\n }\n\n /**\n * Updates the uniform group.\n * @param uniformGroup - the uniform group to update\n */\n public updateUniformGroup(uniformGroup: UniformGroup): void\n {\n this._renderer.uniformGroup.updateUniformGroup(uniformGroup, this._activeProgram, defaultSyncData);\n }\n\n /**\n * Binds a uniform block to the shader.\n * @param uniformGroup - the uniform group to bind\n * @param name - the name of the uniform block\n * @param index - the index of the uniform block\n */\n public bindUniformBlock(uniformGroup: UniformGroup | BufferResource, name: string, index = 0): void\n {\n const bufferSystem = this._renderer.buffer;\n const programData = this._getProgramData(this._activeProgram);\n\n const isBufferResource = (uniformGroup as BufferResource)._bufferResource;\n\n if (isBufferResource)\n {\n this._renderer.ubo.updateUniformGroup(uniformGroup as UniformGroup);\n }\n\n bufferSystem.updateBuffer(uniformGroup.buffer);\n\n let boundIndex = this._boundUniformsIdsToIndexHash[uniformGroup.uid];\n\n // check if it is already bound..\n if (boundIndex === undefined)\n {\n const nextIndex = this._nextIndex++ % this._maxBindings;\n\n const currentBoundUniformGroup = this._boundIndexToUniformsHash[nextIndex];\n\n if (currentBoundUniformGroup)\n {\n this._boundUniformsIdsToIndexHash[currentBoundUniformGroup.uid] = undefined;\n }\n\n // find a free slot..\n boundIndex = this._boundUniformsIdsToIndexHash[uniformGroup.uid] = nextIndex;\n this._boundIndexToUniformsHash[nextIndex] = uniformGroup;\n\n if (isBufferResource)\n {\n bufferSystem.bindBufferRange(uniformGroup.buffer, nextIndex, (uniformGroup as BufferResource).offset);\n }\n else\n {\n bufferSystem.bindBufferBase(uniformGroup.buffer, nextIndex);\n }\n }\n\n const gl = this._gl;\n\n const uniformBlockIndex = this._activeProgram._uniformBlockData[name].index;\n\n if (programData.uniformBlockBindings[index] === boundIndex) return;\n programData.uniformBlockBindings[index] = boundIndex;\n\n gl.uniformBlockBinding(programData.program, uniformBlockIndex, boundIndex);\n }\n\n private _setProgram(program: GlProgram)\n {\n if (this._activeProgram === program) return;\n\n this._activeProgram = program;\n\n const programData = this._getProgramData(program);\n\n this._gl.useProgram(programData.program);\n }\n\n /**\n * @param program - the program to get the data for\n * @internal\n * @private\n */\n public _getProgramData(program: GlProgram): GlProgramData\n {\n return this._programDataHash[program._key] || this._createProgramData(program);\n }\n\n private _createProgramData(program: GlProgram): GlProgramData\n {\n const key = program._key;\n\n this._programDataHash[key] = generateProgram(this._gl, program);\n\n return this._programDataHash[key];\n }\n\n public destroy(): void\n {\n for (const key of Object.keys(this._programDataHash))\n {\n const programData = this._programDataHash[key];\n\n programData.destroy();\n this._programDataHash[key] = null;\n }\n\n this._programDataHash = null;\n this._boundUniformsIdsToIndexHash = null;\n }\n\n /**\n * Creates a function that can be executed that will sync the shader as efficiently as possible.\n * Overridden by the unsafe eval package if you don't want eval used in your project.\n * @param shader - the shader to generate the sync function for\n * @param shaderSystem - the shader system to use\n * @returns - the generated sync function\n * @ignore\n */\n public _generateShaderSync(shader: Shader, shaderSystem: GlShaderSystem): ShaderSyncFunction\n {\n return generateShaderSyncCode(shader, shaderSystem);\n }\n}\n","// cu = Cached value's uniform data field\n// cv = Cached value\n// v = value to upload\n// ud = uniformData\n// uv = uniformValue\n\nimport type { UNIFORM_TYPES } from '../../../shared/shader/types';\n\nexport type ArraySetterFunction = (v: any, location: WebGLUniformLocation, gl: any) => void;\n\nexport const UNIFORM_TO_SINGLE_SETTERS: Record = {\n f32: `if (cv !== v) {\n cu.value = v;\n gl.uniform1f(location, v);\n }`,\n 'vec2': `if (cv[0] !== v[0] || cv[1] !== v[1]) {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(location, v[0], v[1]);\n }`,\n 'vec3': `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n gl.uniform3f(location, v[0], v[1], v[2]);\n }`,\n 'vec4': `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n gl.uniform4f(location, v[0], v[1], v[2], v[3]);\n }`,\n i32: `if (cv !== v) {\n cu.value = v;\n gl.uniform1i(location, v);\n }`,\n 'vec2': `if (cv[0] !== v[0] || cv[1] !== v[1]) {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2i(location, v[0], v[1]);\n }`,\n 'vec3': `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n gl.uniform3i(location, v[0], v[1], v[2]);\n }`,\n 'vec4': `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }`,\n u32: `if (cv !== v) {\n cu.value = v;\n gl.uniform1ui(location, v);\n }`,\n 'vec2': `if (cv[0] !== v[0] || cv[1] !== v[1]) {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2ui(location, v[0], v[1]);\n }`,\n 'vec3': `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n gl.uniform3ui(location, v[0], v[1], v[2]);\n }`,\n 'vec4': `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n gl.uniform4ui(location, v[0], v[1], v[2], v[3]);\n }`,\n bool: `if (cv !== v) {\n cu.value = v;\n gl.uniform1i(location, v);\n }`,\n 'vec2': `if (cv[0] !== v[0] || cv[1] !== v[1]) {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2i(location, v[0], v[1]);\n }`,\n 'vec3': `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n gl.uniform3i(location, v[0], v[1], v[2]);\n }`,\n 'vec4': `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }`,\n 'mat2x2': `gl.uniformMatrix2fv(location, false, v);`,\n 'mat3x3': `gl.uniformMatrix3fv(location, false, v);`,\n 'mat4x4': `gl.uniformMatrix4fv(location, false, v);`,\n};\n\nexport const UNIFORM_TO_ARRAY_SETTERS: Record = {\n f32: `gl.uniform1fv(location, v);`,\n 'vec2': `gl.uniform2fv(location, v);`,\n 'vec3': `gl.uniform3fv(location, v);`,\n 'vec4': `gl.uniform4fv(location, v);`,\n 'mat2x2': `gl.uniformMatrix2fv(location, false, v);`,\n 'mat3x3': `gl.uniformMatrix3fv(location, false, v);`,\n 'mat4x4': `gl.uniformMatrix4fv(location, false, v);`,\n i32: `gl.uniform1iv(location, v);`,\n 'vec2': `gl.uniform2iv(location, v);`,\n 'vec3': `gl.uniform3iv(location, v);`,\n 'vec4': `gl.uniform4iv(location, v);`,\n u32: `gl.uniform1iv(location, v);`,\n 'vec2': `gl.uniform2iv(location, v);`,\n 'vec3': `gl.uniform3iv(location, v);`,\n 'vec4': `gl.uniform4iv(location, v);`,\n bool: `gl.uniform1iv(location, v);`,\n 'vec2': `gl.uniform2iv(location, v);`,\n 'vec3': `gl.uniform3iv(location, v);`,\n 'vec4': `gl.uniform4iv(location, v);`,\n};\n","// cu = Cached value's uniform data field\n// cv = Cached value\n// v = value to upload\n// ud = uniformData\n// uv = uniformValue\n\nimport { BufferResource } from '../../../shared/buffer/BufferResource';\nimport { UniformGroup } from '../../../shared/shader/UniformGroup';\nimport { uniformParsers } from '../../../shared/shader/utils/uniformParsers';\nimport { UNIFORM_TO_ARRAY_SETTERS, UNIFORM_TO_SINGLE_SETTERS } from './generateUniformsSyncTypes';\n\nimport type { UniformsSyncCallback } from '../../../shared/shader/types';\n\nexport function generateUniformsSync(group: UniformGroup, uniformData: Record): UniformsSyncCallback\n{\n const funcFragments = [`\n var v = null;\n var cv = null;\n var cu = null;\n var t = 0;\n var gl = renderer.gl;\n var name = null;\n `];\n\n for (const i in group.uniforms)\n {\n if (!uniformData[i])\n {\n if (group.uniforms[i] instanceof UniformGroup)\n {\n if ((group.uniforms[i] as UniformGroup).ubo)\n {\n funcFragments.push(`\n renderer.shader.bindUniformBlock(uv.${i}, \"${i}\");\n `);\n }\n else\n {\n funcFragments.push(`\n renderer.shader.updateUniformGroup(uv.${i});\n `);\n }\n }\n else if (group.uniforms[i] instanceof BufferResource)\n {\n funcFragments.push(`\n renderer.shader.bindBufferResource(uv.${i}, \"${i}\");\n `);\n }\n\n continue;\n }\n\n const uniform = group.uniformStructures[i];\n\n let parsed = false;\n\n for (let j = 0; j < uniformParsers.length; j++)\n {\n const parser = uniformParsers[j];\n\n if (uniform.type === parser.type && parser.test(uniform))\n {\n funcFragments.push(`name = \"${i}\";`, uniformParsers[j].uniform);\n parsed = true;\n\n break;\n }\n }\n\n if (!parsed)\n {\n const templateType = uniform.size === 1 ? UNIFORM_TO_SINGLE_SETTERS : UNIFORM_TO_ARRAY_SETTERS;\n\n const template = templateType[uniform.type].replace('location', `ud[\"${i}\"].location`);\n\n funcFragments.push(`\n cu = ud[\"${i}\"];\n cv = cu.value;\n v = uv[\"${i}\"];\n ${template};`);\n }\n }\n\n /*\n * the introduction of syncData is to solve an issue where textures in uniform groups are not set correctly\n * the texture count was always starting from 0 in each group. This needs to increment each time a texture is used\n * no matter which group is being used\n *\n */\n // eslint-disable-next-line no-new-func\n return new Function('ud', 'uv', 'renderer', 'syncData', funcFragments.join('\\n')) as UniformsSyncCallback;\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { generateUniformsSync } from './utils/generateUniformsSync';\n\nimport type { UniformsSyncCallback } from '../../shared/shader/types';\nimport type { UniformGroup } from '../../shared/shader/UniformGroup';\nimport type { System } from '../../shared/system/System';\nimport type { GlRenderingContext } from '../context/GlRenderingContext';\nimport type { WebGLRenderer } from '../WebGLRenderer';\nimport type { GlProgram, GlUniformData } from './GlProgram';\n\n/**\n * System plugin to the renderer to manage shaders.\n * @memberof rendering\n */\nexport class GlUniformGroupSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ],\n name: 'uniformGroup',\n } as const;\n\n /**\n * The current WebGL rendering context.\n * @member {WebGLRenderingContext}\n */\n protected gl: GlRenderingContext;\n\n /** Cache to holds the generated functions. Stored against UniformObjects unique signature. */\n private _cache: Record = {};\n private _renderer: WebGLRenderer;\n\n private _uniformGroupSyncHash: Record> = {};\n\n /** @param renderer - The renderer this System works for. */\n constructor(renderer: WebGLRenderer)\n {\n this._renderer = renderer;\n\n this.gl = null;\n this._cache = {};\n }\n\n protected contextChange(gl: GlRenderingContext): void\n {\n this.gl = gl;\n }\n\n /**\n * Uploads the uniforms values to the currently bound shader.\n * @param group - the uniforms values that be applied to the current shader\n * @param program\n * @param syncData\n * @param syncData.textureCount\n */\n public updateUniformGroup(group: UniformGroup, program: GlProgram, syncData: { textureCount: number }): void\n {\n const programData = this._renderer.shader._getProgramData(program);\n\n if (!group.isStatic || group._dirtyId !== programData.uniformDirtyGroups[group.uid])\n {\n programData.uniformDirtyGroups[group.uid] = group._dirtyId;\n\n const syncFunc = this._getUniformSyncFunction(group, program);\n\n syncFunc(programData.uniformData, group.uniforms, this._renderer, syncData);\n }\n }\n\n /**\n * Overrideable by the pixi.js/unsafe-eval package to use static syncUniforms instead.\n * @param group\n * @param program\n */\n private _getUniformSyncFunction(group: UniformGroup, program: GlProgram): UniformsSyncCallback\n {\n return this._uniformGroupSyncHash[group._signature]?.[program._key]\n || this._createUniformSyncFunction(group, program);\n }\n\n private _createUniformSyncFunction(group: UniformGroup, program: GlProgram): UniformsSyncCallback\n {\n const uniformGroupSyncHash = this._uniformGroupSyncHash[group._signature]\n || (this._uniformGroupSyncHash[group._signature] = {});\n\n const id = this._getSignature(group, program._uniformData, 'u');\n\n if (!this._cache[id])\n {\n this._cache[id] = this._generateUniformsSync(group, program._uniformData);\n }\n\n uniformGroupSyncHash[program._key] = this._cache[id];\n\n return uniformGroupSyncHash[program._key];\n }\n\n private _generateUniformsSync(group: UniformGroup, uniformData: Record): UniformsSyncCallback\n {\n return generateUniformsSync(group, uniformData);\n }\n\n /**\n * Takes a uniform group and data and generates a unique signature for them.\n * @param group - The uniform group to get signature of\n * @param group.uniforms\n * @param uniformData - Uniform information generated by the shader\n * @param preFix\n * @returns Unique signature of the uniform group\n */\n private _getSignature(group: UniformGroup, uniformData: Record, preFix: string): string\n {\n const uniforms = group.uniforms;\n\n const strings = [`${preFix}-`];\n\n for (const i in uniforms)\n {\n strings.push(i);\n\n if (uniformData[i])\n {\n strings.push(uniformData[i].type);\n }\n }\n\n return strings.join('-');\n }\n\n /** Destroys this System and removes all its textures. */\n public destroy(): void\n {\n this._renderer = null;\n this._cache = null;\n }\n}\n","export function migrateFragmentFromV7toV8(fragmentShader: string): string\n{\n fragmentShader = fragmentShader\n .replaceAll('texture2D', 'texture')\n .replaceAll('gl_FragColor', 'finalColor')\n .replaceAll('varying', 'in');\n\n fragmentShader = `\n out vec4 finalColor;\n ${fragmentShader}\n `;\n\n return fragmentShader;\n}\n","import type { Dict } from '../../../../../utils/types';\n\nconst GLSL_TO_SIZE: Dict = {\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 uint: 1,\n uvec2: 2,\n uvec3: 3,\n uvec4: 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\n/**\n * @private\n * @method mapSize\n * @param {string} type\n */\nexport function mapSize(type: string): number\n{\n return GLSL_TO_SIZE[type];\n}\n","import type { BLEND_MODES } from '../../shared/state/const';\nimport type { GlRenderingContext } from '../context/GlRenderingContext';\n\n/**\n * Maps gl blend combinations to WebGL.\n * @param gl\n * @returns {object} Map of gl blend combinations to WebGL.\n */\nexport function mapWebGLBlendModesToPixi(gl: GlRenderingContext): Record\n{\n const blendMap: Partial> = {};\n\n // TODO - premultiply alpha would be different.\n // add a boolean for that!\n blendMap.normal = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n blendMap.add = [gl.ONE, gl.ONE];\n blendMap.multiply = [gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n blendMap.screen = [gl.ONE, gl.ONE_MINUS_SRC_COLOR, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n blendMap.none = [0, 0];\n\n // not-premultiplied blend modes\n blendMap['normal-npm'] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n blendMap['add-npm'] = [gl.SRC_ALPHA, gl.ONE, gl.ONE, gl.ONE];\n blendMap['screen-npm'] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_COLOR, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n\n blendMap.erase = [gl.ZERO, gl.ONE_MINUS_SRC_ALPHA];\n // TODO - implement if requested!\n // composite operations\n // array[BLEND_MODES.SRC_IN] = [gl.DST_ALPHA, gl.ZERO];\n // array[BLEND_MODES.SRC_OUT] = [gl.ONE_MINUS_DST_ALPHA, gl.ZERO];\n // array[BLEND_MODES.SRC_ATOP] = [gl.DST_ALPHA, gl.ONE_MINUS_SRC_ALPHA];\n // array[BLEND_MODES.DST_OVER] = [gl.ONE_MINUS_DST_ALPHA, gl.ONE];\n // array[BLEND_MODES.DST_IN] = [gl.ZERO, gl.SRC_ALPHA];\n // array[BLEND_MODES.DST_OUT] = [gl.ZERO, gl.ONE_MINUS_SRC_ALPHA];\n // array[BLEND_MODES.DST_ATOP] = [gl.ONE_MINUS_DST_ALPHA, gl.SRC_ALPHA];\n // array[BLEND_MODES.XOR] = [gl.ONE_MINUS_DST_ALPHA, gl.ONE_MINUS_SRC_ALPHA];\n // SUBTRACT from flash\n // array[BLEND_MODES.SUBTRACT] = [gl.ONE, gl.ONE, gl.ONE, gl.ONE, gl.FUNC_REVERSE_SUBTRACT, gl.FUNC_ADD];\n\n return blendMap as Record;\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { State } from '../../shared/state/State';\nimport { mapWebGLBlendModesToPixi } from './mapWebGLBlendModesToPixi';\n\nimport type { BLEND_MODES } from '../../shared/state/const';\nimport type { System } from '../../shared/system/System';\nimport type { GlRenderingContext } from '../context/GlRenderingContext';\n\nconst BLEND = 0;\nconst OFFSET = 1;\nconst CULLING = 2;\nconst DEPTH_TEST = 3;\nconst WINDING = 4;\nconst DEPTH_MASK = 5;\n\n/**\n * System plugin to the renderer to manage WebGL state machines\n * @memberof rendering\n */\nexport class GlStateSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ],\n name: 'state',\n } as const;\n\n /**\n * State ID\n * @readonly\n */\n public stateId: number;\n\n /**\n * Polygon offset\n * @readonly\n */\n public polygonOffset: number;\n\n /**\n * Blend mode\n * @default 'none'\n * @readonly\n */\n public blendMode: BLEND_MODES;\n\n /** Whether current blend equation is different */\n protected _blendEq: boolean;\n\n /**\n * GL context\n * @member {WebGLRenderingContext}\n * @readonly\n */\n protected gl: GlRenderingContext;\n\n protected blendModesMap: Record;\n\n /**\n * Collection of calls\n * @member {Function[]}\n */\n protected readonly map: ((value: boolean) => void)[];\n\n /**\n * Collection of check calls\n * @member {Function[]}\n */\n protected readonly checks: ((system: this, state: State) => void)[];\n\n /**\n * Default WebGL State\n * @readonly\n */\n protected defaultState: State;\n\n constructor()\n {\n this.gl = null;\n\n this.stateId = 0;\n this.polygonOffset = 0;\n this.blendMode = 'none';\n\n this._blendEq = false;\n\n // map functions for when we set state..\n this.map = [];\n this.map[BLEND] = this.setBlend;\n this.map[OFFSET] = this.setOffset;\n this.map[CULLING] = this.setCullFace;\n this.map[DEPTH_TEST] = this.setDepthTest;\n this.map[WINDING] = this.setFrontFace;\n this.map[DEPTH_MASK] = this.setDepthMask;\n\n this.checks = [];\n\n this.defaultState = State.for2d();\n }\n\n protected contextChange(gl: GlRenderingContext): void\n {\n this.gl = gl;\n\n this.blendModesMap = mapWebGLBlendModesToPixi(gl);\n\n this.reset();\n }\n\n /**\n * Sets the current state\n * @param {*} state - The state to set.\n */\n public set(state: State): void\n {\n state = state || this.defaultState;\n\n // TODO maybe to an object check? ( this.state === state )?\n if (this.stateId !== state.data)\n {\n let diff = this.stateId ^ state.data;\n let i = 0;\n\n // order from least to most common\n while (diff)\n {\n if (diff & 1)\n {\n // state change!\n this.map[i].call(this, !!(state.data & (1 << i)));\n }\n\n diff = diff >> 1;\n i++;\n }\n\n this.stateId = state.data;\n }\n\n // based on the above settings we check for specific modes..\n // for example if blend is active we check and set the blend modes\n // or of polygon offset is active we check the poly depth.\n for (let i = 0; i < this.checks.length; i++)\n {\n this.checks[i](this, state);\n }\n }\n\n /**\n * Sets the state, when previous state is unknown.\n * @param {*} state - The state to set\n */\n public forceState(state: State): void\n {\n state = state || this.defaultState;\n for (let i = 0; i < this.map.length; i++)\n {\n this.map[i].call(this, !!(state.data & (1 << i)));\n }\n for (let i = 0; i < this.checks.length; i++)\n {\n this.checks[i](this, state);\n }\n\n this.stateId = state.data;\n }\n\n /**\n * Sets whether to enable or disable blending.\n * @param value - Turn on or off WebGl blending.\n */\n public setBlend(value: boolean): void\n {\n this._updateCheck(GlStateSystem._checkBlendMode, value);\n\n this.gl[value ? 'enable' : 'disable'](this.gl.BLEND);\n }\n\n /**\n * Sets whether to enable or disable polygon offset fill.\n * @param value - Turn on or off webgl polygon offset testing.\n */\n public setOffset(value: boolean): void\n {\n this._updateCheck(GlStateSystem._checkPolygonOffset, value);\n\n this.gl[value ? 'enable' : 'disable'](this.gl.POLYGON_OFFSET_FILL);\n }\n\n /**\n * Sets whether to enable or disable depth test.\n * @param value - Turn on or off webgl depth testing.\n */\n public setDepthTest(value: boolean): void\n {\n this.gl[value ? 'enable' : 'disable'](this.gl.DEPTH_TEST);\n }\n\n /**\n * Sets whether to enable or disable depth mask.\n * @param value - Turn on or off webgl depth mask.\n */\n public setDepthMask(value: boolean): void\n {\n this.gl.depthMask(value);\n }\n\n /**\n * Sets whether to enable or disable cull face.\n * @param {boolean} value - Turn on or off webgl cull face.\n */\n public setCullFace(value: boolean): void\n {\n this.gl[value ? 'enable' : 'disable'](this.gl.CULL_FACE);\n }\n\n /**\n * Sets the gl front face.\n * @param {boolean} value - true is clockwise and false is counter-clockwise\n */\n public setFrontFace(value: boolean): void\n {\n this.gl.frontFace(this.gl[value ? 'CW' : 'CCW']);\n }\n\n /**\n * Sets the blend mode.\n * @param {number} value - The blend mode to set to.\n */\n public setBlendMode(value: BLEND_MODES): void\n {\n if (!this.blendModesMap[value])\n {\n value = 'normal';\n }\n\n if (value === this.blendMode)\n {\n return;\n }\n\n this.blendMode = value;\n\n const mode = this.blendModesMap[value];\n const gl = this.gl;\n\n if (mode.length === 2)\n {\n gl.blendFunc(mode[0], mode[1]);\n }\n else\n {\n gl.blendFuncSeparate(mode[0], mode[1], mode[2], mode[3]);\n }\n\n if (mode.length === 6)\n {\n this._blendEq = true;\n gl.blendEquationSeparate(mode[4], mode[5]);\n }\n else if (this._blendEq)\n {\n this._blendEq = false;\n gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);\n }\n }\n\n /**\n * Sets the polygon offset.\n * @param {number} value - the polygon offset\n * @param {number} scale - the polygon offset scale\n */\n public setPolygonOffset(value: number, scale: number): void\n {\n this.gl.polygonOffset(value, scale);\n }\n\n // used\n /** Resets all the logic and disables the VAOs. */\n public reset(): void\n {\n this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, false);\n\n this.forceState(this.defaultState);\n\n this._blendEq = true;\n // setting to '' means the blend mode will be set as soon as we set the first blend mode when rendering!\n this.blendMode = '' as BLEND_MODES;\n this.setBlendMode('normal');\n }\n\n /**\n * Checks to see which updates should be checked based on which settings have been activated.\n *\n * For example, if blend is enabled then we should check the blend modes each time the state is changed\n * or if polygon fill is activated then we need to check if the polygon offset changes.\n * The idea is that we only check what we have too.\n * @param func - the checking function to add or remove\n * @param value - should the check function be added or removed.\n */\n private _updateCheck(func: (system: this, state: State) => void, value: boolean): void\n {\n const index = this.checks.indexOf(func);\n\n if (value && index === -1)\n {\n this.checks.push(func);\n }\n else if (!value && index !== -1)\n {\n this.checks.splice(index, 1);\n }\n }\n\n /**\n * A private little wrapper function that we call to check the blend mode.\n * @param system - the System to perform the state check on\n * @param state - the state that the blendMode will pulled from\n */\n private static _checkBlendMode(system: GlStateSystem, state: State): void\n {\n system.setBlendMode(state.blendMode);\n }\n\n /**\n * A private little wrapper function that we call to check the polygon offset.\n * @param system - the System to perform the state check on\n * @param state - the state that the blendMode will pulled from\n */\n private static _checkPolygonOffset(system: GlStateSystem, state: State): void\n {\n system.setPolygonOffset(1, state.polygonOffset);\n }\n\n /**\n * @ignore\n */\n public destroy(): void\n {\n this.gl = null;\n this.checks.length = 0;\n }\n}\n","import { GL_FORMATS, GL_TARGETS, GL_TYPES } from './const';\n\n/**\n * Internal texture for WebGL context\n * @memberof rendering\n * @ignore\n */\nexport class GlTexture\n{\n public target: GL_TARGETS = GL_TARGETS.TEXTURE_2D;\n\n /** The WebGL texture. */\n public texture: WebGLTexture;\n\n /** Width of texture that was used in texImage2D. */\n public width: number;\n\n /** Height of texture that was used in texImage2D. */\n public height: number;\n\n /** Whether mip levels has to be generated. */\n public mipmap: boolean;\n\n /** Type copied from texture source. */\n public type: number;\n\n /** Type copied from texture source. */\n public internalFormat: number;\n\n /** Type of sampler corresponding to this texture. See {@link SAMPLER_TYPES} */\n public samplerType: number;\n\n public format: GL_FORMATS;\n\n constructor(texture: WebGLTexture)\n {\n this.texture = texture;\n this.width = -1;\n this.height = -1;\n this.type = GL_TYPES.UNSIGNED_BYTE;\n this.internalFormat = GL_FORMATS.RGBA;\n this.format = GL_FORMATS.RGBA;\n this.samplerType = 0;\n }\n}\n","import type { TextureSource } from '../../../shared/texture/sources/TextureSource';\nimport type { GlRenderingContext } from '../../context/GlRenderingContext';\nimport type { GlTexture } from '../GlTexture';\nimport type { GLTextureUploader } from './GLTextureUploader';\n\nexport const glUploadBufferImageResource = {\n\n id: 'buffer',\n\n upload(source: TextureSource, glTexture: GlTexture, gl: GlRenderingContext)\n {\n if (glTexture.width === source.width || glTexture.height === source.height)\n {\n gl.texSubImage2D(\n gl.TEXTURE_2D,\n 0,\n 0,\n 0,\n source.width,\n source.height,\n glTexture.format,\n glTexture.type,\n source.resource\n );\n }\n else\n {\n gl.texImage2D(\n glTexture.target,\n 0,\n glTexture.internalFormat,\n source.width,\n source.height,\n 0,\n glTexture.format,\n glTexture.type,\n source.resource\n );\n }\n\n glTexture.width = source.width;\n glTexture.height = source.height;\n }\n} as GLTextureUploader;\n\n","import type { CompressedSource } from '../../../shared/texture/sources/CompressedSource';\nimport type { GlRenderingContext } from '../../context/GlRenderingContext';\nimport type { GlTexture } from '../GlTexture';\nimport type { GLTextureUploader } from './GLTextureUploader';\n\nconst compressedFormatMap: Record = {\n 'bc1-rgba-unorm': true,\n 'bc1-rgba-unorm-srgb': true,\n 'bc2-rgba-unorm': true,\n 'bc2-rgba-unorm-srgb': true,\n 'bc3-rgba-unorm': true,\n 'bc3-rgba-unorm-srgb': true,\n 'bc4-r-unorm': true,\n 'bc4-r-snorm': true,\n 'bc5-rg-unorm': true,\n 'bc5-rg-snorm': true,\n 'bc6h-rgb-ufloat': true,\n 'bc6h-rgb-float': true,\n 'bc7-rgba-unorm': true,\n 'bc7-rgba-unorm-srgb': true,\n\n // ETC2 compressed formats usable if \"texture-compression-etc2\" is both\n // supported by the device/user agent and enabled in requestDevice.\n 'etc2-rgb8unorm': true,\n 'etc2-rgb8unorm-srgb': true,\n 'etc2-rgb8a1unorm': true,\n 'etc2-rgb8a1unorm-srgb': true,\n 'etc2-rgba8unorm': true,\n 'etc2-rgba8unorm-srgb': true,\n 'eac-r11unorm': true,\n 'eac-r11snorm': true,\n 'eac-rg11unorm': true,\n 'eac-rg11snorm': true,\n\n // ASTC compressed formats usable if \"texture-compression-astc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n 'astc-4x4-unorm': true,\n 'astc-4x4-unorm-srgb': true,\n 'astc-5x4-unorm': true,\n 'astc-5x4-unorm-srgb': true,\n 'astc-5x5-unorm': true,\n 'astc-5x5-unorm-srgb': true,\n 'astc-6x5-unorm': true,\n 'astc-6x5-unorm-srgb': true,\n 'astc-6x6-unorm': true,\n 'astc-6x6-unorm-srgb': true,\n 'astc-8x5-unorm': true,\n 'astc-8x5-unorm-srgb': true,\n 'astc-8x6-unorm': true,\n 'astc-8x6-unorm-srgb': true,\n 'astc-8x8-unorm': true,\n 'astc-8x8-unorm-srgb': true,\n 'astc-10x5-unorm': true,\n 'astc-10x5-unorm-srgb': true,\n 'astc-10x6-unorm': true,\n 'astc-10x6-unorm-srgb': true,\n 'astc-10x8-unorm': true,\n 'astc-10x8-unorm-srgb': true,\n 'astc-10x10-unorm': true,\n 'astc-10x10-unorm-srgb': true,\n 'astc-12x10-unorm': true,\n 'astc-12x10-unorm-srgb': true,\n 'astc-12x12-unorm': true,\n 'astc-12x12-unorm-srgb': true,\n};\n\nexport const glUploadCompressedTextureResource = {\n\n id: 'compressed',\n\n upload(source: CompressedSource, glTexture: GlTexture, gl: GlRenderingContext)\n {\n gl.pixelStorei(gl.UNPACK_ALIGNMENT, 4);\n\n let mipWidth = source.pixelWidth;\n let mipHeight = source.pixelHeight;\n\n const compressed = !!compressedFormatMap[source.format];\n\n for (let i = 0; i < source.resource.length; i++)\n {\n const levelBuffer = source.resource[i];\n\n if (compressed)\n {\n gl.compressedTexImage2D(\n gl.TEXTURE_2D, i, glTexture.internalFormat,\n mipWidth, mipHeight, 0,\n levelBuffer\n );\n }\n else\n {\n gl.texImage2D(\n gl.TEXTURE_2D, i, glTexture.internalFormat,\n mipWidth, mipHeight, 0,\n glTexture.format, glTexture.type,\n levelBuffer);\n }\n\n mipWidth = Math.max(mipWidth >> 1, 1);\n mipHeight = Math.max(mipHeight >> 1, 1);\n }\n }\n} as GLTextureUploader;\n\n","import type { CanvasSource } from '../../../shared/texture/sources/CanvasSource';\nimport type { ImageSource } from '../../../shared/texture/sources/ImageSource';\nimport type { GlRenderingContext } from '../../context/GlRenderingContext';\nimport type { GlTexture } from '../GlTexture';\nimport type { GLTextureUploader } from './GLTextureUploader';\n\nexport const glUploadImageResource = {\n\n id: 'image',\n\n upload(source: ImageSource | CanvasSource, glTexture: GlTexture, gl: GlRenderingContext, webGLVersion: number)\n {\n const premultipliedAlpha = source.alphaMode === 'premultiply-alpha-on-upload';\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, premultipliedAlpha);\n\n const glWidth = glTexture.width;\n const glHeight = glTexture.height;\n\n const textureWidth = source.pixelWidth;\n const textureHeight = source.pixelHeight;\n\n const resourceWidth = source.resourceWidth;\n const resourceHeight = source.resourceHeight;\n\n if (resourceWidth < textureWidth || resourceHeight < textureHeight)\n {\n if (glWidth !== textureWidth || glHeight !== textureHeight)\n {\n gl.texImage2D(\n glTexture.target,\n 0,\n glTexture.internalFormat,\n textureWidth,\n textureHeight,\n 0,\n glTexture.format,\n glTexture.type,\n null\n );\n }\n\n if (webGLVersion === 2)\n {\n gl.texSubImage2D(\n gl.TEXTURE_2D,\n 0,\n 0,\n 0,\n resourceWidth,\n resourceHeight,\n glTexture.format,\n glTexture.type,\n source.resource as TexImageSource\n );\n }\n else\n {\n gl.texSubImage2D(\n gl.TEXTURE_2D,\n 0,\n 0,\n 0,\n glTexture.format,\n glTexture.type,\n source.resource as TexImageSource\n );\n }\n }\n else if (glWidth === textureWidth || glHeight === textureHeight)\n {\n gl.texSubImage2D(\n gl.TEXTURE_2D,\n 0,\n 0,\n 0,\n glTexture.format,\n glTexture.type,\n source.resource as TexImageSource\n );\n }\n else if (webGLVersion === 2)\n {\n gl.texImage2D(\n glTexture.target,\n 0,\n glTexture.internalFormat,\n textureWidth,\n textureHeight,\n 0,\n glTexture.format,\n glTexture.type,\n source.resource as TexImageSource\n );\n }\n else\n {\n gl.texImage2D(\n glTexture.target,\n 0,\n glTexture.internalFormat,\n glTexture.format,\n glTexture.type,\n source.resource as TexImageSource\n );\n }\n\n glTexture.width = textureWidth;\n glTexture.height = textureHeight;\n }\n} as GLTextureUploader;\n\n","import { glUploadImageResource } from './glUploadImageResource';\n\nimport type { VideoSource } from '../../../shared/texture/sources/VideoSource';\nimport type { GlRenderingContext } from '../../context/GlRenderingContext';\nimport type { GlTexture } from '../GlTexture';\nimport type { GLTextureUploader } from './GLTextureUploader';\n\nexport const glUploadVideoResource = {\n\n id: 'video',\n\n upload(source: VideoSource, glTexture: GlTexture, gl: GlRenderingContext, webGLVersion: number)\n {\n if (!source.isValid)\n {\n gl.texImage2D(\n glTexture.target,\n 0,\n glTexture.internalFormat,\n 1,\n 1,\n 0,\n glTexture.format,\n glTexture.type,\n null\n );\n\n return;\n }\n\n glUploadImageResource.upload(source, glTexture, gl, webGLVersion);\n }\n} as GLTextureUploader;\n\n","export const scaleModeToGlFilter = {\n linear: 9729,\n nearest: 9728,\n};\n\nexport const mipmapScaleModeToGlFilter = {\n linear: {\n linear: 9987,\n nearest: 9985,\n },\n nearest: {\n linear: 9986,\n nearest: 9984,\n }\n};\n\nexport const wrapModeToGlAddress = {\n 'clamp-to-edge': 33071,\n repeat: 10497,\n 'mirror-repeat': 33648,\n};\n\nexport const compareModeToGlCompare = {\n never: 512,\n less: 513,\n equal: 514,\n 'less-equal': 515,\n greater: 516,\n 'not-equal': 517,\n 'greater-equal': 518,\n always: 519,\n};\n\n","import {\n compareModeToGlCompare,\n mipmapScaleModeToGlFilter,\n scaleModeToGlFilter,\n wrapModeToGlAddress\n} from './pixiToGlMaps';\n\nimport type { TextureStyle } from '../../../shared/texture/TextureStyle';\n\nexport function applyStyleParams(\n style: TextureStyle,\n gl: WebGL2RenderingContext,\n mipmaps: boolean,\n // eslint-disable-next-line camelcase\n anisotropicExt: EXT_texture_filter_anisotropic,\n glFunctionName: 'samplerParameteri' | 'texParameteri',\n firstParam: 3553 | WebGLSampler,\n forceClamp: boolean,\n /** if true we can skip setting certain values if the values is the same as the default gl values */\n firstCreation: boolean\n)\n{\n const castParam = firstParam as 3553;\n\n if (!firstCreation\n || style.addressModeU !== 'repeat'\n || style.addressModeV !== 'repeat'\n || style.addressModeW !== 'repeat'\n )\n {\n // 1. set the wrapping mode\n const wrapModeS = wrapModeToGlAddress[forceClamp ? 'clamp-to-edge' : style.addressModeU];\n const wrapModeT = wrapModeToGlAddress[forceClamp ? 'clamp-to-edge' : style.addressModeV];\n const wrapModeR = wrapModeToGlAddress[forceClamp ? 'clamp-to-edge' : style.addressModeW];\n\n gl[glFunctionName](castParam, gl.TEXTURE_WRAP_S, wrapModeS);\n gl[glFunctionName](castParam, gl.TEXTURE_WRAP_T, wrapModeT);\n\n // does not exist in webGL1\n if (gl.TEXTURE_WRAP_R) gl[glFunctionName](castParam, gl.TEXTURE_WRAP_R, wrapModeR);\n }\n\n if (!firstCreation || style.magFilter !== 'linear')\n {\n // 2. set the filtering mode\n gl[glFunctionName](castParam, gl.TEXTURE_MAG_FILTER, scaleModeToGlFilter[style.magFilter]);\n }\n\n // assuming the currently bound texture is the one we want to set the filter for\n // the only smelly part of this code, WebGPU is much better here :P\n if (mipmaps)\n {\n if (!firstCreation || style.mipmapFilter !== 'linear')\n {\n const glFilterMode = mipmapScaleModeToGlFilter[style.minFilter][style.mipmapFilter];\n\n gl[glFunctionName](castParam, gl.TEXTURE_MIN_FILTER, glFilterMode);\n }\n }\n\n else\n {\n gl[glFunctionName](castParam, gl.TEXTURE_MIN_FILTER, scaleModeToGlFilter[style.minFilter]);\n }\n\n // 3. set the anisotropy\n if (anisotropicExt && style.maxAnisotropy > 1)\n {\n const level = Math.min(style.maxAnisotropy, gl.getParameter(anisotropicExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT));\n\n gl[glFunctionName](castParam, anisotropicExt.TEXTURE_MAX_ANISOTROPY_EXT, level);\n }\n\n // 4. set the compare mode\n if (style.compare)\n {\n gl[glFunctionName](castParam, gl.TEXTURE_COMPARE_FUNC, compareModeToGlCompare[style.compare]);\n }\n}\n","import type { GlRenderingContext } from '../../context/GlRenderingContext';\n\n/**\n * Returns a lookup table that maps each type-format pair to a compatible internal format.\n * @function mapTypeAndFormatToInternalFormat\n * @private\n * @param {WebGLRenderingContext} gl - The rendering context.\n * @returns Lookup table.\n */\nexport function mapFormatToGlFormat(gl: GlRenderingContext): Record\n{\n return {\n // 8-bit formats\n r8unorm: gl.RED,\n r8snorm: gl.RED,\n r8uint: gl.RED,\n r8sint: gl.RED,\n\n // 16-bit formats\n r16uint: gl.RED,\n r16sint: gl.RED,\n r16float: gl.RED,\n rg8unorm: gl.RG,\n rg8snorm: gl.RG,\n rg8uint: gl.RG,\n rg8sint: gl.RG,\n\n // 32-bit formats\n r32uint: gl.RED,\n r32sint: gl.RED,\n r32float: gl.RED,\n rg16uint: gl.RG,\n rg16sint: gl.RG,\n rg16float: gl.RG,\n rgba8unorm: gl.RGBA,\n 'rgba8unorm-srgb': gl.RGBA,\n\n // Packed 32-bit formats\n rgba8snorm: gl.RGBA,\n rgba8uint: gl.RGBA,\n rgba8sint: gl.RGBA,\n bgra8unorm: gl.RGBA,\n 'bgra8unorm-srgb': gl.RGBA,\n rgb9e5ufloat: gl.RGB,\n rgb10a2unorm: gl.RGBA,\n rg11b10ufloat: gl.RGB,\n\n // 64-bit formats\n rg32uint: gl.RG,\n rg32sint: gl.RG,\n rg32float: gl.RG,\n rgba16uint: gl.RGBA,\n rgba16sint: gl.RGBA,\n rgba16float: gl.RGBA,\n\n // 128-bit formats\n rgba32uint: gl.RGBA,\n rgba32sint: gl.RGBA,\n rgba32float: gl.RGBA,\n\n // Depth/stencil formats\n stencil8: gl.STENCIL_INDEX8,\n depth16unorm: gl.DEPTH_COMPONENT,\n depth24plus: gl.DEPTH_COMPONENT,\n 'depth24plus-stencil8': gl.DEPTH_STENCIL,\n depth32float: gl.DEPTH_COMPONENT,\n 'depth32float-stencil8': gl.DEPTH_STENCIL,\n\n };\n}\n","import { DOMAdapter } from '../../../../../environment/adapter';\n\nimport type { GlRenderingContext } from '../../context/GlRenderingContext';\nimport type { WebGLExtensions } from '../../context/WebGLExtensions';\n\n/**\n * Returns a lookup table that maps each type-format pair to a compatible internal format.\n * @function mapTypeAndFormatToInternalFormat\n * @private\n * @param gl - The rendering context.\n * @param extensions - The WebGL extensions.\n * @returns Lookup table.\n */\nexport function mapFormatToGlInternalFormat(\n gl: GlRenderingContext,\n extensions: WebGLExtensions,\n): Record\n{\n let srgb = {};\n let bgra8unorm: number = gl.RGBA;\n\n if (!(gl instanceof DOMAdapter.get().getWebGLRenderingContext()))\n {\n srgb = {\n 'rgba8unorm-srgb': gl.SRGB8_ALPHA8,\n 'bgra8unorm-srgb': gl.SRGB8_ALPHA8,\n };\n\n bgra8unorm = gl.RGBA8;\n }\n else if (extensions.srgb)\n {\n srgb = {\n 'rgba8unorm-srgb': extensions.srgb.SRGB8_ALPHA8_EXT,\n 'bgra8unorm-srgb': extensions.srgb.SRGB8_ALPHA8_EXT,\n };\n }\n\n return {\n // 8-bit formats\n r8unorm: gl.R8,\n r8snorm: gl.R8_SNORM,\n r8uint: gl.R8UI,\n r8sint: gl.R8I,\n\n // 16-bit formats\n r16uint: gl.R16UI,\n r16sint: gl.R16I,\n r16float: gl.R16F,\n rg8unorm: gl.RG8,\n rg8snorm: gl.RG8_SNORM,\n rg8uint: gl.RG8UI,\n rg8sint: gl.RG8I,\n\n // 32-bit formats\n r32uint: gl.R32UI,\n r32sint: gl.R32I,\n r32float: gl.R32F,\n rg16uint: gl.RG16UI,\n rg16sint: gl.RG16I,\n rg16float: gl.RG16F,\n rgba8unorm: gl.RGBA,\n\n ...srgb,\n\n // Packed 32-bit formats\n rgba8snorm: gl.RGBA8_SNORM,\n rgba8uint: gl.RGBA8UI,\n rgba8sint: gl.RGBA8I,\n bgra8unorm,\n rgb9e5ufloat: gl.RGB9_E5,\n rgb10a2unorm: gl.RGB10_A2,\n rg11b10ufloat: gl.R11F_G11F_B10F,\n\n // 64-bit formats\n rg32uint: gl.RG32UI,\n rg32sint: gl.RG32I,\n rg32float: gl.RG32F,\n rgba16uint: gl.RGBA16UI,\n rgba16sint: gl.RGBA16I,\n rgba16float: gl.RGBA16F,\n\n // 128-bit formats\n rgba32uint: gl.RGBA32UI,\n rgba32sint: gl.RGBA32I,\n rgba32float: gl.RGBA32F,\n\n // Depth/stencil formats\n stencil8: gl.STENCIL_INDEX8,\n depth16unorm: gl.DEPTH_COMPONENT16,\n depth24plus: gl.DEPTH_COMPONENT24,\n 'depth24plus-stencil8': gl.DEPTH24_STENCIL8,\n depth32float: gl.DEPTH_COMPONENT32F,\n 'depth32float-stencil8': gl.DEPTH32F_STENCIL8,\n\n // Compressed formats\n ...extensions.s3tc ? {\n 'bc1-rgba-unorm': extensions.s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT,\n 'bc2-rgba-unorm': extensions.s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT,\n 'bc3-rgba-unorm': extensions.s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT,\n } : {},\n ...extensions.s3tc_sRGB ? {\n 'bc1-rgba-unorm-srgb': extensions.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,\n 'bc2-rgba-unorm-srgb': extensions.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,\n 'bc3-rgba-unorm-srgb': extensions.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,\n } : {},\n ...extensions.rgtc ? {\n 'bc4-r-unorm': extensions.rgtc.COMPRESSED_RED_RGTC1_EXT,\n 'bc4-r-snorm': extensions.rgtc.COMPRESSED_SIGNED_RED_RGTC1_EXT,\n 'bc5-rg-unorm': extensions.rgtc.COMPRESSED_RED_GREEN_RGTC2_EXT,\n 'bc5-rg-snorm': extensions.rgtc.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,\n } : {},\n ...extensions.bptc ? {\n 'bc6h-rgb-float': extensions.bptc.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,\n 'bc6h-rgb-ufloat': extensions.bptc.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,\n 'bc7-rgba-unorm': extensions.bptc.COMPRESSED_RGBA_BPTC_UNORM_EXT,\n 'bc7-rgba-unorm-srgb': extensions.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT,\n } : {},\n ...extensions.etc ? {\n 'etc2-rgb8unorm': extensions.etc.COMPRESSED_RGB8_ETC2,\n 'etc2-rgb8unorm-srgb': extensions.etc.COMPRESSED_SRGB8_ETC2,\n 'etc2-rgb8a1unorm': extensions.etc.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,\n 'etc2-rgb8a1unorm-srgb': extensions.etc.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,\n 'etc2-rgba8unorm': extensions.etc.COMPRESSED_RGBA8_ETC2_EAC,\n 'etc2-rgba8unorm-srgb': extensions.etc.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,\n 'eac-r11unorm': extensions.etc.COMPRESSED_R11_EAC,\n // 'eac-r11snorm'\n 'eac-rg11unorm': extensions.etc.COMPRESSED_SIGNED_RG11_EAC,\n // 'eac-rg11snorm'\n } : {},\n ...extensions.astc ? {\n 'astc-4x4-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_4x4_KHR,\n 'astc-4x4-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,\n 'astc-5x4-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_5x4_KHR,\n 'astc-5x4-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,\n 'astc-5x5-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_5x5_KHR,\n 'astc-5x5-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,\n 'astc-6x5-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_6x5_KHR,\n 'astc-6x5-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,\n 'astc-6x6-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_6x6_KHR,\n 'astc-6x6-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,\n 'astc-8x5-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_8x5_KHR,\n 'astc-8x5-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,\n 'astc-8x6-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_8x6_KHR,\n 'astc-8x6-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,\n 'astc-8x8-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_8x8_KHR,\n 'astc-8x8-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,\n 'astc-10x5-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_10x5_KHR,\n 'astc-10x5-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,\n 'astc-10x6-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_10x6_KHR,\n 'astc-10x6-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,\n 'astc-10x8-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_10x8_KHR,\n 'astc-10x8-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,\n 'astc-10x10-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_10x10_KHR,\n 'astc-10x10-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,\n 'astc-12x10-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_12x10_KHR,\n 'astc-12x10-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,\n 'astc-12x12-unorm': extensions.astc.COMPRESSED_RGBA_ASTC_12x12_KHR,\n 'astc-12x12-unorm-srgb': extensions.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,\n } : {},\n };\n}\n","import type { GlRenderingContext } from '../../context/GlRenderingContext';\n\n/**\n * Returns a lookup table that maps each type-format pair to a compatible internal format.\n * @function mapTypeAndFormatToInternalFormat\n * @private\n * @param {WebGLRenderingContext} gl - The rendering context.\n * @returns Lookup table.\n */\nexport function mapFormatToGlType(gl: GlRenderingContext): Record\n{\n return {\n // 8-bit formats\n r8unorm: gl.UNSIGNED_BYTE,\n r8snorm: gl.BYTE,\n r8uint: gl.UNSIGNED_BYTE,\n r8sint: gl.BYTE,\n\n // 16-bit formats\n r16uint: gl.UNSIGNED_SHORT,\n r16sint: gl.SHORT,\n r16float: gl.HALF_FLOAT,\n rg8unorm: gl.UNSIGNED_BYTE,\n rg8snorm: gl.BYTE,\n rg8uint: gl.UNSIGNED_BYTE,\n rg8sint: gl.BYTE,\n\n // 32-bit formats\n r32uint: gl.UNSIGNED_INT,\n r32sint: gl.INT,\n r32float: gl.FLOAT,\n rg16uint: gl.UNSIGNED_SHORT,\n rg16sint: gl.SHORT,\n rg16float: gl.HALF_FLOAT,\n rgba8unorm: gl.UNSIGNED_BYTE,\n 'rgba8unorm-srgb': gl.UNSIGNED_BYTE,\n\n // Packed 32-bit formats\n rgba8snorm: gl.BYTE,\n rgba8uint: gl.UNSIGNED_BYTE,\n rgba8sint: gl.BYTE,\n bgra8unorm: gl.UNSIGNED_BYTE,\n 'bgra8unorm-srgb': gl.UNSIGNED_BYTE,\n rgb9e5ufloat: gl.UNSIGNED_INT_5_9_9_9_REV,\n rgb10a2unorm: gl.UNSIGNED_INT_2_10_10_10_REV,\n rg11b10ufloat: gl.UNSIGNED_INT_10F_11F_11F_REV,\n\n // 64-bit formats\n rg32uint: gl.UNSIGNED_INT,\n rg32sint: gl.INT,\n rg32float: gl.FLOAT,\n rgba16uint: gl.UNSIGNED_SHORT,\n rgba16sint: gl.SHORT,\n rgba16float: gl.HALF_FLOAT,\n\n // 128-bit formats\n rgba32uint: gl.UNSIGNED_INT,\n rgba32sint: gl.INT,\n rgba32float: gl.FLOAT,\n\n // Depth/stencil formats\n stencil8: gl.UNSIGNED_BYTE,\n depth16unorm: gl.UNSIGNED_SHORT,\n depth24plus: gl.UNSIGNED_INT,\n 'depth24plus-stencil8': gl.UNSIGNED_INT_24_8,\n depth32float: gl.FLOAT,\n 'depth32float-stencil8': gl.FLOAT_32_UNSIGNED_INT_24_8_REV,\n\n };\n}\n","export function unpremultiplyAlpha(pixels: Uint8Array | Uint8ClampedArray): void\n{\n if (pixels instanceof Uint8ClampedArray)\n {\n pixels = new Uint8Array(pixels.buffer);\n }\n\n const n = pixels.length;\n\n for (let i = 0; i < n; i += 4)\n {\n const alpha = pixels[i + 3];\n\n if (alpha !== 0)\n {\n const a = 255.001 / alpha;\n\n pixels[i] = (pixels[i] * a) + 0.5;\n pixels[i + 1] = (pixels[i + 1] * a) + 0.5;\n pixels[i + 2] = (pixels[i + 2] * a) + 0.5;\n }\n }\n}\n","import { DOMAdapter } from '../../../../environment/adapter';\nimport { ExtensionType } from '../../../../extensions/Extensions';\nimport { Texture } from '../../shared/texture/Texture';\nimport { GlTexture } from './GlTexture';\nimport { glUploadBufferImageResource } from './uploaders/glUploadBufferImageResource';\nimport { glUploadCompressedTextureResource } from './uploaders/glUploadCompressedTextureResource';\nimport { glUploadImageResource } from './uploaders/glUploadImageResource';\nimport { glUploadVideoResource } from './uploaders/glUploadVideoResource';\nimport { applyStyleParams } from './utils/applyStyleParams';\nimport { mapFormatToGlFormat } from './utils/mapFormatToGlFormat';\nimport { mapFormatToGlInternalFormat } from './utils/mapFormatToGlInternalFormat';\nimport { mapFormatToGlType } from './utils/mapFormatToGlType';\nimport { unpremultiplyAlpha } from './utils/unpremultiplyAlpha';\n\nimport type { ICanvas } from '../../../../environment/canvas/ICanvas';\nimport type { System } from '../../shared/system/System';\nimport type { CanvasGenerator, GetPixelsOutput } from '../../shared/texture/GenerateCanvas';\nimport type { TextureSource } from '../../shared/texture/sources/TextureSource';\nimport type { BindableTexture } from '../../shared/texture/Texture';\nimport type { TextureStyle } from '../../shared/texture/TextureStyle';\nimport type { GlRenderingContext } from '../context/GlRenderingContext';\nimport type { WebGLRenderer } from '../WebGLRenderer';\nimport type { GLTextureUploader } from './uploaders/GLTextureUploader';\n\nconst BYTES_PER_PIXEL = 4;\n\n/**\n * The system for managing textures in WebGL.\n * @memberof rendering\n */\nexport class GlTextureSystem implements System, CanvasGenerator\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ],\n name: 'texture',\n } as const;\n\n public readonly managedTextures: TextureSource[] = [];\n\n private readonly _renderer: WebGLRenderer;\n\n private _glTextures: Record = Object.create(null);\n private _glSamplers: Record = Object.create(null);\n\n private _boundTextures: TextureSource[] = [];\n private _activeTextureLocation = -1;\n\n private _boundSamplers: Record = Object.create(null);\n\n private readonly _uploads: Record = {\n image: glUploadImageResource,\n buffer: glUploadBufferImageResource,\n video: glUploadVideoResource,\n compressed: glUploadCompressedTextureResource,\n };\n\n private _gl: GlRenderingContext;\n private _mapFormatToInternalFormat: Record;\n private _mapFormatToType: Record;\n private _mapFormatToFormat: Record;\n\n // TODO - separate samplers will be a cool thing to add, but not right now!\n private readonly _useSeparateSamplers = false;\n\n constructor(renderer: WebGLRenderer)\n {\n this._renderer = renderer;\n }\n\n protected contextChange(gl: GlRenderingContext): void\n {\n this._gl = gl;\n\n if (!this._mapFormatToInternalFormat)\n {\n this._mapFormatToInternalFormat = mapFormatToGlInternalFormat(gl, this._renderer.context.extensions);\n\n this._mapFormatToType = mapFormatToGlType(gl);\n this._mapFormatToFormat = mapFormatToGlFormat(gl);\n }\n\n this._glTextures = Object.create(null);\n this._glSamplers = Object.create(null);\n this._boundSamplers = Object.create(null);\n\n for (let i = 0; i < 16; i++)\n {\n this.bind(Texture.EMPTY, i);\n }\n }\n\n public initSource(source: TextureSource)\n {\n this.bind(source);\n }\n\n public bind(texture: BindableTexture, location = 0)\n {\n const source = texture.source;\n\n if (texture)\n {\n this.bindSource(source, location);\n\n if (this._useSeparateSamplers)\n {\n this._bindSampler(source.style, location);\n }\n }\n else\n {\n this.bindSource(null, location);\n\n if (this._useSeparateSamplers)\n {\n this._bindSampler(null, location);\n }\n }\n }\n\n public bindSource(source: TextureSource, location = 0): void\n {\n const gl = this._gl;\n\n source._touched = this._renderer.textureGC.count;\n\n if (this._boundTextures[location] !== source)\n {\n this._boundTextures[location] = source;\n this._activateLocation(location);\n\n source = source || Texture.EMPTY.source;\n\n // bind texture and source!\n const glTexture = this.getGlSource(source);\n\n gl.bindTexture(glTexture.target, glTexture.texture);\n }\n }\n\n private _bindSampler(style: TextureStyle, location = 0): void\n {\n const gl = this._gl;\n\n if (!style)\n {\n this._boundSamplers[location] = null;\n gl.bindSampler(location, null);\n\n return;\n }\n\n const sampler = this._getGlSampler(style);\n\n if (this._boundSamplers[location] !== sampler)\n {\n this._boundSamplers[location] = sampler;\n gl.bindSampler(location, sampler);\n }\n }\n\n public unbind(texture: BindableTexture): void\n {\n const source = texture.source;\n const boundTextures = this._boundTextures;\n const gl = this._gl;\n\n for (let i = 0; i < boundTextures.length; i++)\n {\n if (boundTextures[i] === source)\n {\n this._activateLocation(i);\n\n const glTexture = this.getGlSource(source);\n\n gl.bindTexture(glTexture.target, null);\n boundTextures[i] = null;\n }\n }\n }\n\n private _activateLocation(location: number): void\n {\n if (this._activeTextureLocation !== location)\n {\n this._activeTextureLocation = location;\n this._gl.activeTexture(this._gl.TEXTURE0 + location);\n }\n }\n\n private _initSource(source: TextureSource): GlTexture\n {\n const gl = this._gl;\n\n const glTexture = new GlTexture(gl.createTexture());\n\n glTexture.type = this._mapFormatToType[source.format];\n glTexture.internalFormat = this._mapFormatToInternalFormat[source.format];\n glTexture.format = this._mapFormatToFormat[source.format];\n\n if (source.autoGenerateMipmaps && (this._renderer.context.supports.nonPowOf2mipmaps || source.isPowerOfTwo))\n {\n const biggestDimension = Math.max(source.width, source.height);\n\n source.mipLevelCount = Math.floor(Math.log2(biggestDimension)) + 1;\n }\n\n this._glTextures[source.uid] = glTexture;\n\n if (!this.managedTextures.includes(source))\n {\n source.on('update', this.onSourceUpdate, this);\n source.on('resize', this.onSourceUpdate, this);\n source.on('styleChange', this.onStyleChange, this);\n source.on('destroy', this.onSourceDestroy, this);\n source.on('unload', this.onSourceUnload, this);\n source.on('updateMipmaps', this.onUpdateMipmaps, this);\n\n this.managedTextures.push(source);\n }\n\n this.onSourceUpdate(source);\n this.updateStyle(source, false);\n\n return glTexture;\n }\n\n protected onStyleChange(source: TextureSource): void\n {\n this.updateStyle(source, false);\n }\n\n protected updateStyle(source: TextureSource, firstCreation: boolean): void\n {\n const gl = this._gl;\n\n const glTexture = this.getGlSource(source);\n\n gl.bindTexture(gl.TEXTURE_2D, glTexture.texture);\n\n this._boundTextures[this._activeTextureLocation] = source;\n\n applyStyleParams(\n source.style,\n gl,\n source.mipLevelCount > 1,\n this._renderer.context.extensions.anisotropicFiltering,\n 'texParameteri',\n gl.TEXTURE_2D,\n // will force a clamp to edge if the texture is not a power of two\n !this._renderer.context.supports.nonPowOf2wrapping && !source.isPowerOfTwo,\n firstCreation,\n );\n }\n\n protected onSourceUnload(source: TextureSource): void\n {\n const glTexture = this._glTextures[source.uid];\n\n if (!glTexture) return;\n\n this.unbind(source);\n this._glTextures[source.uid] = null;\n\n this._gl.deleteTexture(glTexture.texture);\n }\n\n protected onSourceUpdate(source: TextureSource): void\n {\n const gl = this._gl;\n\n const glTexture = this.getGlSource(source);\n\n gl.bindTexture(gl.TEXTURE_2D, glTexture.texture);\n\n this._boundTextures[this._activeTextureLocation] = source;\n\n if (this._uploads[source.uploadMethodId])\n {\n this._uploads[source.uploadMethodId].upload(source, glTexture, gl, this._renderer.context.webGLVersion);\n }\n else\n {\n // eslint-disable-next-line max-len\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, source.pixelWidth, source.pixelHeight, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n }\n\n if (source.autoGenerateMipmaps && source.mipLevelCount > 1)\n {\n this.onUpdateMipmaps(source, false);\n }\n }\n\n protected onUpdateMipmaps(source: TextureSource, bind = true): void\n {\n if (bind) this.bindSource(source, 0);\n\n const glTexture = this.getGlSource(source);\n\n this._gl.generateMipmap(glTexture.target);\n }\n\n protected onSourceDestroy(source: TextureSource): void\n {\n source.off('destroy', this.onSourceDestroy, this);\n source.off('update', this.onSourceUpdate, this);\n source.off('resize', this.onSourceUpdate, this);\n source.off('unload', this.onSourceUnload, this);\n source.off('styleChange', this.onStyleChange, this);\n source.off('updateMipmaps', this.onUpdateMipmaps, this);\n\n this.managedTextures.splice(this.managedTextures.indexOf(source), 1);\n\n this.onSourceUnload(source);\n }\n\n private _initSampler(style: TextureStyle): WebGLSampler\n {\n const gl = this._gl;\n\n const glSampler = this._gl.createSampler();\n\n this._glSamplers[style._resourceId] = glSampler;\n\n applyStyleParams(\n style,\n gl,\n this._boundTextures[this._activeTextureLocation].mipLevelCount > 1,\n this._renderer.context.extensions.anisotropicFiltering,\n 'samplerParameteri',\n glSampler,\n false,\n true,\n );\n\n return this._glSamplers[style._resourceId];\n }\n\n private _getGlSampler(sampler: TextureStyle): WebGLSampler\n {\n return this._glSamplers[sampler._resourceId] || this._initSampler(sampler);\n }\n\n public getGlSource(source: TextureSource): GlTexture\n {\n return this._glTextures[source.uid] || this._initSource(source);\n }\n\n public generateCanvas(texture: Texture): ICanvas\n {\n const { pixels, width, height } = this.getPixels(texture);\n\n const canvas = DOMAdapter.get().createCanvas();\n\n canvas.width = width;\n canvas.height = height;\n\n const ctx = canvas.getContext('2d');\n\n if (ctx)\n {\n const imageData = ctx.createImageData(width, height);\n\n imageData.data.set(pixels);\n ctx.putImageData(imageData, 0, 0);\n }\n\n return canvas;\n }\n\n public getPixels(texture: Texture): GetPixelsOutput\n {\n const resolution = texture.source.resolution;\n const frame = texture.frame;\n\n const width = Math.max(Math.round(frame.width * resolution), 1);\n const height = Math.max(Math.round(frame.height * resolution), 1);\n const pixels = new Uint8Array(BYTES_PER_PIXEL * width * height);\n\n const renderer = this._renderer;\n\n const renderTarget = renderer.renderTarget.getRenderTarget(texture);\n const glRenterTarget = renderer.renderTarget.getGpuRenderTarget(renderTarget);\n\n const gl = renderer.gl;\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, glRenterTarget.resolveTargetFramebuffer);\n\n gl.readPixels(\n Math.round(frame.x * resolution),\n Math.round(frame.y * resolution),\n width,\n height,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n pixels\n );\n\n // if (texture.source.premultiplyAlpha > 0)\n // TODO - premultiplied alpha does not exist right now, need to add that back in!\n // eslint-disable-next-line no-constant-condition\n if (false)\n {\n unpremultiplyAlpha(pixels);\n }\n\n return { pixels: new Uint8ClampedArray(pixels.buffer), width, height };\n }\n\n public destroy(): void\n {\n // we copy the array as the array with a slice as onSourceDestroy\n // will remove the source from the real managedTextures array\n this.managedTextures\n .slice()\n .forEach((source) => this.onSourceDestroy(source));\n\n (this.managedTextures as null) = null;\n\n (this._renderer as null) = null;\n }\n}\n\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { Matrix } from '../../../maths/matrix/Matrix';\nimport { getMaxTexturesPerBatch } from '../../../rendering/batcher/gl/utils/maxRecommendedTextures';\nimport { compileHighShaderGlProgram } from '../../../rendering/high-shader/compileHighShaderToProgram';\nimport { colorBitGl } from '../../../rendering/high-shader/shader-bits/colorBit';\nimport { generateTextureBatchBitGl } from '../../../rendering/high-shader/shader-bits/generateTextureBatchBit';\nimport { localUniformBitGl } from '../../../rendering/high-shader/shader-bits/localUniformBit';\nimport { roundPixelsBitGl } from '../../../rendering/high-shader/shader-bits/roundPixelsBit';\nimport { getBatchSamplersUniformGroup } from '../../../rendering/renderers/gl/shader/getBatchSamplersUniformGroup';\nimport { Shader } from '../../../rendering/renderers/shared/shader/Shader';\nimport { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup';\n\nimport type { Batch } from '../../../rendering/batcher/shared/Batcher';\nimport type { WebGLRenderer } from '../../../rendering/renderers/gl/WebGLRenderer';\nimport type { Graphics } from '../shared/Graphics';\nimport type { GraphicsAdaptor, GraphicsPipe } from '../shared/GraphicsPipe';\n\n/**\n * A GraphicsAdaptor that uses WebGL to render graphics.\n * @memberof rendering\n * @ignore\n */\nexport class GlGraphicsAdaptor implements GraphicsAdaptor\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipesAdaptor,\n ],\n name: 'graphics',\n } as const;\n\n public shader: Shader;\n\n public init()\n {\n const uniforms = new UniformGroup({\n uColor: { value: new Float32Array([1, 1, 1, 1]), type: 'vec4' },\n uTransformMatrix: { value: new Matrix(), type: 'mat3x3' },\n uRound: { value: 0, type: 'f32' },\n });\n\n const maxTextures = getMaxTexturesPerBatch();\n\n const glProgram = compileHighShaderGlProgram({\n name: 'graphics',\n bits: [\n colorBitGl,\n generateTextureBatchBitGl(maxTextures),\n localUniformBitGl,\n roundPixelsBitGl,\n ]\n });\n\n this.shader = new Shader({\n glProgram,\n resources: {\n localUniforms: uniforms,\n batchSamplers: getBatchSamplersUniformGroup(maxTextures),\n }\n });\n }\n\n public execute(graphicsPipe: GraphicsPipe, renderable: Graphics): void\n {\n const context = renderable.context;\n const shader = context.customShader || this.shader;\n const renderer = graphicsPipe.renderer as WebGLRenderer;\n const contextSystem = renderer.graphicsContext;\n\n const {\n geometry, instructions,\n } = contextSystem.getContextRenderData(context);\n\n // WebGL specific..\n shader.groups[0] = renderer.globalUniforms.bindGroup;\n\n renderer.state.set(graphicsPipe.state);\n\n renderer.shader.bind(shader);\n\n renderer.geometry.bind(geometry, shader.glProgram);\n\n const batches = instructions.instructions as Batch[];\n\n for (let i = 0; i < instructions.instructionSize; i++)\n {\n const batch = batches[i];\n\n if (batch.size)\n {\n for (let j = 0; j < batch.textures.textures.length; j++)\n {\n renderer.texture.bind(batch.textures.textures[j], j);\n }\n\n renderer.geometry.draw('triangle-list', batch.size, batch.start);\n }\n }\n }\n\n public destroy(): void\n {\n this.shader.destroy(true);\n this.shader = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { Matrix } from '../../../maths/matrix/Matrix';\nimport { compileHighShaderGlProgram } from '../../../rendering/high-shader/compileHighShaderToProgram';\nimport { localUniformBitGl } from '../../../rendering/high-shader/shader-bits/localUniformBit';\nimport { roundPixelsBitGl } from '../../../rendering/high-shader/shader-bits/roundPixelsBit';\nimport { textureBitGl } from '../../../rendering/high-shader/shader-bits/textureBit';\nimport { Shader } from '../../../rendering/renderers/shared/shader/Shader';\nimport { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport { warn } from '../../../utils/logging/warn';\n\nimport type { Mesh } from '../shared/Mesh';\nimport type { MeshAdaptor, MeshPipe } from '../shared/MeshPipe';\n\n/**\n * A MeshAdaptor that uses the WebGL to render meshes.\n * @memberof rendering\n * @ignore\n */\nexport class GlMeshAdaptor implements MeshAdaptor\n{\n public static extension = {\n type: [\n ExtensionType.WebGLPipesAdaptor,\n ],\n name: 'mesh',\n } as const;\n\n private _shader: Shader;\n\n public init(): void\n {\n const glProgram = compileHighShaderGlProgram({\n name: 'mesh',\n bits: [\n localUniformBitGl,\n textureBitGl,\n roundPixelsBitGl,\n ]\n });\n\n this._shader = new Shader({\n glProgram,\n resources: {\n uTexture: Texture.EMPTY.source,\n textureUniforms: {\n uTextureMatrix: { type: 'mat3x3', value: new Matrix() },\n }\n }\n });\n }\n\n public execute(meshPipe: MeshPipe, mesh: Mesh): void\n {\n const renderer = meshPipe.renderer;\n\n let shader: Shader = mesh._shader;\n\n if (!shader)\n {\n shader = this._shader;\n\n const texture = mesh.texture;\n const source = texture.source;\n\n shader.resources.uTexture = source;\n shader.resources.uSampler = source.style;\n shader.resources.textureUniforms.uniforms.uTextureMatrix = texture.textureMatrix.mapCoord;\n }\n else if (!shader.glProgram)\n {\n // #if _DEBUG\n warn('Mesh shader has no glProgram', mesh.shader);\n // #endif\n\n return;\n }\n\n // setting the groups to be high to be compatible and not\n // overlap any other groups\n shader.groups[100] = renderer.globalUniforms.bindGroup;\n shader.groups[101] = meshPipe.localUniformsBindGroup;\n\n renderer.encoder.draw({\n geometry: mesh._geometry,\n shader,\n state: mesh.state,\n });\n }\n\n public destroy(): void\n {\n this._shader.destroy(true);\n this._shader = null;\n }\n}\n","import { ExtensionType } from '../../extensions/Extensions';\n\nimport type { InstructionSet } from '../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { InstructionPipe } from '../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../../rendering/renderers/types';\nimport type { RenderContainer } from './RenderContainer';\n\n/**\n * The CustomRenderPipe is a render pipe that allows for custom rendering logic for your renderable objects.\n * @example\n * import { RenderContainer } from 'pixi.js';\n *\n * const renderContainer = new RenderContainer(\n * (renderer) => {\n * renderer.clear({\n * clearColor: 'green', // clear the screen to green when rendering this item\n * });\n * })\n * @memberof rendering\n */\nexport class CustomRenderPipe implements InstructionPipe\n{\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'customRender',\n } as const;\n\n private _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public addRenderable(container: RenderContainer, instructionSet: InstructionSet): void\n {\n this._renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add(container);\n }\n\n public execute(container: RenderContainer)\n {\n if (!container.isRenderable) return;\n\n container.render(this._renderer);\n }\n\n public destroy(): void\n {\n this._renderer = null;\n }\n}\n","import type { InstructionPipe } from '../../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { RenderPipes } from '../../../rendering/renderers/types';\nimport type { RenderGroup } from '../RenderGroup';\n\nexport function executeInstructions(renderGroup: RenderGroup, renderer: RenderPipes)\n{\n const instructionSet = renderGroup.instructionSet;\n const instructions = instructionSet.instructions;\n\n for (let i = 0; i < instructionSet.instructionSize; i++)\n {\n const instruction = instructions[i];\n\n (renderer[instruction.renderPipeId as keyof RenderPipes] as InstructionPipe).execute(instruction);\n }\n}\n","import { ExtensionType } from '../../extensions/Extensions';\nimport { executeInstructions } from './utils/executeInstructions';\n\nimport type { InstructionSet } from '../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { InstructionPipe } from '../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../../rendering/renderers/types';\nimport type { RenderGroup } from './RenderGroup';\n\nexport class RenderGroupPipe implements InstructionPipe\n{\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'renderGroup',\n } as const;\n\n private _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public addRenderGroup(renderGroup: RenderGroup, instructionSet: InstructionSet): void\n {\n this._renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add(renderGroup);\n }\n\n public execute(renderGroup: RenderGroup)\n {\n if (!renderGroup.isRenderable) return;\n\n this._renderer.globalUniforms.push({\n worldTransformMatrix: renderGroup.worldTransform,\n worldColor: renderGroup.worldColorAlpha,\n });\n\n executeInstructions(renderGroup, this._renderer.renderPipes);\n\n this._renderer.globalUniforms.pop();\n\n // now render a quad..\n }\n\n public destroy(): void\n {\n this._renderer = null;\n }\n}\n","import type { RenderGroup } from '../RenderGroup';\n\nexport function collectRenderGroups(renderGroup: RenderGroup, out: RenderGroup[] = [])\n{\n out.push(renderGroup);\n\n for (let i = 0; i < renderGroup.renderGroupChildren.length; i++)\n {\n collectRenderGroups(renderGroup.renderGroupChildren[i], out);\n }\n\n return out;\n}\n","export function mixHexColors(color1: number, color2: number, ratio: number): number\n{\n const r1 = (color1 >> 16) & 0xFF;\n const g1 = (color1 >> 8) & 0xFF;\n const b1 = color1 & 0xFF;\n\n const r2 = (color2 >> 16) & 0xFF;\n const g2 = (color2 >> 8) & 0xFF;\n const b2 = color2 & 0xFF;\n\n const r = r1 + ((r2 - r1) * ratio);\n const g = g1 + ((g2 - g1) * ratio);\n const b = b1 + ((b2 - b1) * ratio);\n\n return (r << 16) + (g << 8) + b;\n}\n\n","import { mixHexColors } from './mixHexColors';\n\nconst WHITE_BGR = 0xFFFFFF;\n\nexport function mixColors(localBGRColor: number, parentBGRColor: number)\n{\n if (localBGRColor === WHITE_BGR || parentBGRColor === WHITE_BGR)\n {\n return localBGRColor + parentBGRColor - WHITE_BGR;\n }\n\n return mixHexColors(localBGRColor, parentBGRColor, 0.5);\n}\n\nexport function mixStandardAnd32BitColors(localColorRGB: number, localAlpha: number, parentColor: number)\n{\n const parentAlpha = ((parentColor >> 24) & 0xFF) / 255;\n\n const globalAlpha = ((localAlpha * parentAlpha) * 255);\n\n // flip rgb to bgr\n const localBGRColor = ((localColorRGB & 0xFF) << 16) + (localColorRGB & 0xFF00) + ((localColorRGB >> 16) & 0xFF);\n\n const parentBGRColor = parentColor & 0x00FFFFFF;\n\n let sharedBGRColor: number;\n\n if (localBGRColor === WHITE_BGR || parentBGRColor === WHITE_BGR)\n {\n sharedBGRColor = localBGRColor + parentBGRColor - WHITE_BGR;\n }\n else\n {\n sharedBGRColor = mixHexColors(localBGRColor, parentBGRColor, 0.5);\n }\n\n return sharedBGRColor + (globalAlpha << 24);\n}\n","import { Container, UPDATE_BLEND, UPDATE_COLOR, UPDATE_VISIBLE } from '../Container';\nimport { mixColors } from './mixColors';\n\nimport type { RenderGroup } from '../RenderGroup';\n\nconst tempContainer = new Container();\n\nexport function updateRenderGroupTransforms(renderGroup: RenderGroup, updateChildRenderGroups = false)\n{\n updateRenderGroupTransform(renderGroup);\n\n const childrenToUpdate = renderGroup.childrenToUpdate;\n\n const updateTick = renderGroup.updateTick++;\n\n for (const j in childrenToUpdate)\n {\n const renderGroupDepth = Number(j);\n\n const childrenAtDepth = childrenToUpdate[j];\n\n const list = childrenAtDepth.list;\n const index = childrenAtDepth.index;\n\n for (let i = 0; i < index; i++)\n {\n const child = list[i];\n\n // check that these things match our layer and depth - if the renderGroup does not match,\n // the child has been re-parented into another rendergroup since it asked to be updated so we can ignore it here\n // secondly if the relativeRenderGroupDepth has changed, then the it means it will have been nested at a\n // different different level in the render group - so we can wait for the update that does in fact match\n if (child.parentRenderGroup === renderGroup && child.relativeRenderGroupDepth === renderGroupDepth)\n {\n updateTransformAndChildren(child, updateTick, 0);\n }\n }\n\n childrenAtDepth.index = 0;\n }\n\n if (updateChildRenderGroups)\n {\n for (let i = 0; i < renderGroup.renderGroupChildren.length; i++)\n {\n updateRenderGroupTransforms(renderGroup.renderGroupChildren[i], updateChildRenderGroups);\n }\n }\n}\n\nexport function updateRenderGroupTransform(renderGroup: RenderGroup)\n{\n const root = renderGroup.root;\n\n let worldAlpha;\n\n if (renderGroup.renderGroupParent)\n {\n const renderGroupParent = renderGroup.renderGroupParent;\n\n renderGroup.worldTransform.appendFrom(\n root.relativeGroupTransform,\n renderGroupParent.worldTransform,\n );\n\n renderGroup.worldColor = mixColors(\n root.groupColor,\n renderGroupParent.worldColor,\n );\n\n worldAlpha = root.groupAlpha * renderGroupParent.worldAlpha;\n }\n else\n {\n renderGroup.worldTransform.copyFrom(root.localTransform);\n renderGroup.worldColor = root.localColor;\n worldAlpha = root.localAlpha;\n }\n\n // eslint-disable-next-line no-nested-ternary\n worldAlpha = worldAlpha < 0 ? 0 : (worldAlpha > 1 ? 1 : worldAlpha);\n renderGroup.worldAlpha = worldAlpha;\n\n renderGroup.worldColorAlpha = renderGroup.worldColor\n + (((worldAlpha * 255) | 0) << 24);\n}\n\nexport function updateTransformAndChildren(container: Container, updateTick: number, updateFlags: number)\n{\n if (updateTick === container.updateTick) return;\n container.updateTick = updateTick;\n\n container.didChange = false;\n\n const localTransform = container.localTransform;\n\n container.updateLocalTransform();\n\n const parent = container.parent;\n\n if ((parent && !parent.renderGroup))\n {\n updateFlags = updateFlags | container._updateFlags;\n\n container.relativeGroupTransform.appendFrom(\n localTransform,\n parent.relativeGroupTransform,\n );\n\n if (updateFlags)\n {\n updateColorBlendVisibility(container, parent, updateFlags);\n }\n }\n else\n {\n updateFlags = container._updateFlags;\n\n container.relativeGroupTransform.copyFrom(localTransform);\n\n if (updateFlags)\n {\n updateColorBlendVisibility(container, tempContainer, updateFlags);\n }\n }\n\n // don't update children if its a layer..\n if (!container.renderGroup)\n {\n const children = container.children;\n const length = children.length;\n\n for (let i = 0; i < length; i++)\n {\n updateTransformAndChildren(children[i], updateTick, updateFlags);\n }\n\n const renderGroup = container.parentRenderGroup;\n\n if (container.renderPipeId && !renderGroup.structureDidChange)\n {\n renderGroup.updateRenderable(container);\n }\n }\n}\n\nfunction updateColorBlendVisibility(\n container: Container,\n parent: Container,\n updateFlags: number,\n): void\n{\n if (updateFlags & UPDATE_COLOR)\n {\n container.groupColor = mixColors(\n container.localColor,\n parent.groupColor\n );\n\n let groupAlpha = container.localAlpha * parent.groupAlpha;\n\n // eslint-disable-next-line no-nested-ternary\n groupAlpha = groupAlpha < 0 ? 0 : (groupAlpha > 1 ? 1 : groupAlpha);\n\n container.groupAlpha = groupAlpha;\n container.groupColorAlpha = container.groupColor + (((groupAlpha * 255) | 0) << 24);\n }\n\n if (updateFlags & UPDATE_BLEND)\n {\n container.groupBlendMode = container.localBlendMode === 'inherit' ? parent.groupBlendMode : container.localBlendMode;\n }\n\n if (updateFlags & UPDATE_VISIBLE)\n {\n container.globalDisplayStatus = container.localDisplayStatus & parent.globalDisplayStatus;\n }\n\n container._updateFlags = 0;\n}\n\n","import type { RenderPipe } from '../../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { RenderPipes } from '../../../rendering/renderers/types';\nimport type { RenderGroup } from '../RenderGroup';\n\nexport function validateRenderables(renderGroup: RenderGroup, renderPipes: RenderPipes): boolean\n{\n const { list, index } = renderGroup.childrenRenderablesToUpdate;\n\n let rebuildRequired = false;\n\n for (let i = 0; i < index; i++)\n {\n const container = list[i];\n\n const renderable = container;\n const pipe = renderPipes[renderable.renderPipeId as keyof RenderPipes] as RenderPipe;\n\n rebuildRequired = pipe.validateRenderable(container);\n\n if (rebuildRequired)\n {\n break;\n }\n }\n\n renderGroup.structureDidChange = rebuildRequired;\n\n return rebuildRequired;\n}\n","import { ExtensionType } from '../../extensions/Extensions';\nimport { Matrix } from '../../maths/matrix/Matrix';\nimport { buildInstructions } from './utils/buildInstructions';\nimport { collectRenderGroups } from './utils/collectRenderGroups';\nimport { executeInstructions } from './utils/executeInstructions';\nimport { updateRenderGroupTransforms } from './utils/updateRenderGroupTransforms';\nimport { validateRenderables } from './utils/validateRenderables';\n\nimport type { WebGPURenderer } from '../../rendering/renderers/gpu/WebGPURenderer';\nimport type { System } from '../../rendering/renderers/shared/system/System';\nimport type { Renderer } from '../../rendering/renderers/types';\nimport type { Container } from './Container';\nimport type { RenderGroup } from './RenderGroup';\n\nconst tempMatrix = new Matrix();\n\n/**\n * The view system manages the main canvas that is attached to the DOM.\n * This main role is to deal with how the holding the view reference and dealing with how it is resized.\n * @memberof rendering\n */\nexport class RenderGroupSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'renderGroup',\n } as const;\n\n private readonly _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n protected render({ container, transform }: {container: Container, transform: Matrix}): void\n {\n container.isRenderGroup = true;\n\n const parent = container.parent;\n const renderGroupParent = container.renderGroup.renderGroupParent;\n\n container.parent = null;\n container.renderGroup.renderGroupParent = null;\n\n const renderer = this._renderer;\n\n // collect all the renderGroups in the scene and then render them one by one..\n const renderGroups = collectRenderGroups(container.renderGroup, []);\n\n let originalLocalTransform: Matrix = tempMatrix;\n\n if (transform)\n {\n originalLocalTransform = originalLocalTransform.copyFrom(container.renderGroup.localTransform);\n container.renderGroup.localTransform.copyFrom(transform);\n }\n\n const renderPipes = (renderer as WebGPURenderer).renderPipes;\n\n for (let i = 0; i < renderGroups.length; i++)\n {\n const renderGroup = renderGroups[i];\n\n renderGroup.runOnRender();\n\n renderGroup.instructionSet.renderPipes = renderPipes;\n\n if (!renderGroup.structureDidChange)\n {\n // phase 1 - validate all the renderables\n validateRenderables(renderGroup, renderPipes);\n }\n\n // phase 2 - update all the transforms\n // including updating the renderables..\n updateRenderGroupTransforms(renderGroup);\n\n if (renderGroup.structureDidChange)\n {\n renderGroup.structureDidChange = false;\n\n // build the renderables\n buildInstructions(renderGroup, renderPipes);\n }\n else\n {\n // update remaining renderables\n updateRenderables(renderGroup);\n }\n\n // reset the renderables to update\n renderGroup.childrenRenderablesToUpdate.index = 0;\n\n // upload all the things!\n renderer.renderPipes.batch.upload(renderGroup.instructionSet);\n }\n\n renderer.globalUniforms.start({\n worldTransformMatrix: transform ? container.renderGroup.localTransform : container.renderGroup.worldTransform,\n worldColor: container.renderGroup.worldColorAlpha,\n\n });\n\n executeInstructions(container.renderGroup, renderPipes);\n\n // TODO need to add some events / runners for things like this to hook up to\n if (renderPipes.uniformBatch)\n {\n renderPipes.uniformBatch.renderEnd();\n }\n\n if (transform)\n {\n container.renderGroup.localTransform.copyFrom(originalLocalTransform);\n }\n\n container.parent = parent;\n container.renderGroup.renderGroupParent = renderGroupParent;\n }\n\n public destroy()\n {\n (this._renderer as null) = null;\n }\n}\n\nfunction updateRenderables(renderGroup: RenderGroup)\n{\n const { list, index } = renderGroup.childrenRenderablesToUpdate;\n\n for (let i = 0; i < index; i++)\n {\n const container = list[i];\n\n if (container.didViewUpdate)\n {\n renderGroup.updateRenderable(container);\n }\n }\n}\n\n","import { ExtensionType } from '../../extensions/Extensions';\nimport { BigPool } from '../../utils/pool/PoolGroup';\nimport { BatchableSprite } from './BatchableSprite';\n\nimport type { InstructionSet } from '../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { RenderPipe } from '../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../../rendering/renderers/types';\nimport type { PoolItem } from '../../utils/pool/Pool';\nimport type { Sprite } from './Sprite';\n\nexport class SpritePipe implements RenderPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'sprite',\n } as const;\n\n private _renderer: Renderer;\n private _gpuSpriteHash: Record = Object.create(null);\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public addRenderable(sprite: Sprite, _instructionSet: InstructionSet)\n {\n const gpuSprite = this._getGpuSprite(sprite);\n\n if (sprite._didSpriteUpdate) this._updateBatchableSprite(sprite, gpuSprite);\n\n // TODO visibility\n this._renderer.renderPipes.batch.addToBatch(gpuSprite);\n }\n\n public updateRenderable(sprite: Sprite)\n {\n const gpuSprite = this._gpuSpriteHash[sprite.uid];\n\n if (sprite._didSpriteUpdate) this._updateBatchableSprite(sprite, gpuSprite);\n\n gpuSprite.batcher.updateElement(gpuSprite);\n }\n\n public validateRenderable(sprite: Sprite): boolean\n {\n const texture = sprite._texture;\n const gpuSprite = this._getGpuSprite(sprite);\n\n if (gpuSprite.texture._source !== texture._source)\n {\n return !gpuSprite.batcher.checkAndUpdateTexture(gpuSprite, texture);\n }\n\n return false;\n }\n\n public destroyRenderable(sprite: Sprite)\n {\n const batchableSprite = this._gpuSpriteHash[sprite.uid];\n\n // this will call reset!\n BigPool.return(batchableSprite as PoolItem);\n\n this._gpuSpriteHash[sprite.uid] = null;\n }\n\n private _updateBatchableSprite(sprite: Sprite, batchableSprite: BatchableSprite)\n {\n sprite._didSpriteUpdate = false;\n batchableSprite.bounds = sprite.bounds;\n batchableSprite.texture = sprite._texture;\n }\n\n private _getGpuSprite(sprite: Sprite): BatchableSprite\n {\n return this._gpuSpriteHash[sprite.uid] || this._initGPUSprite(sprite);\n }\n\n private _initGPUSprite(sprite: Sprite): BatchableSprite\n {\n const batchableSprite = BigPool.get(BatchableSprite);\n\n batchableSprite.renderable = sprite;\n\n batchableSprite.texture = sprite._texture;\n batchableSprite.bounds = sprite.bounds;\n batchableSprite.roundPixels = (this._renderer._roundPixels | sprite._roundPixels) as 0 | 1;\n\n this._gpuSpriteHash[sprite.uid] = batchableSprite;\n\n sprite._didSpriteUpdate = false;\n\n // TODO perhaps manage this outside this pipe? (a bit like how we update / add)\n sprite.on('destroyed', () =>\n {\n this.destroyRenderable(sprite);\n });\n\n return batchableSprite;\n }\n\n public destroy()\n {\n for (const i in this._gpuSpriteHash)\n {\n BigPool.return(this._gpuSpriteHash[i] as PoolItem);\n }\n\n this._gpuSpriteHash = null;\n this._renderer = null;\n }\n}\n","import { Color } from '../../../../color/Color';\nimport { ExtensionType } from '../../../../extensions/Extensions';\n\nimport type { ColorSource, RgbaArray } from '../../../../color/Color';\nimport type { System } from '../system/System';\n\n/**\n * Options for the background system.\n * @property {ColorSource} [backgroundColor='black']\n * The background color used to clear the canvas. See {@link ColorSource} for accepted color values.\n * @property {ColorSource} [background] - Alias for backgroundColor\n * @property {number} [backgroundAlpha=1] -\n * Transparency of the background color, value from `0` (fully transparent) to `1` (fully opaque).\n * @property {boolean} [clearBeforeRender=true] - Whether to clear the canvas before new render passes.\n * @memberof rendering\n */\nexport interface BackgroundSystemOptions\n{\n /**\n * The background color used to clear the canvas. See {@link ColorSource} for accepted color values.\n * @memberof rendering.SharedRendererOptions\n * @default 'black'\n */\n backgroundColor: ColorSource;\n /**\n * Alias for backgroundColor\n * @memberof rendering.SharedRendererOptions\n */\n background?: ColorSource\n /**\n * Transparency of the background color, value from `0` (fully transparent) to `1` (fully opaque).\n * @memberof rendering.SharedRendererOptions\n * @default 1\n */\n backgroundAlpha: number;\n /**\n * Whether to clear the canvas before new render passes.\n * @memberof rendering.SharedRendererOptions\n * @default true\n */\n clearBeforeRender: boolean;\n}\n\n/**\n * The background system manages the background color and alpha of the main view.\n * @memberof rendering\n */\nexport class BackgroundSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'background',\n priority: 0,\n } as const;\n\n /** default options used by the system */\n public static defaultOptions: BackgroundSystemOptions = {\n /**\n * {@link WebGLOptions.backgroundAlpha}\n * @default 1\n */\n backgroundAlpha: 1,\n /**\n * {@link WebGLOptions.backgroundColor}\n * @default 0x000000\n */\n backgroundColor: 0x0,\n /**\n * {@link WebGLOptions.clearBeforeRender}\n * @default true\n */\n clearBeforeRender: true,\n };\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 public clearBeforeRender: boolean;\n\n private readonly _backgroundColor: Color;\n\n constructor()\n {\n this.clearBeforeRender = true;\n\n this._backgroundColor = new Color(0x000000);\n\n this.color = this._backgroundColor; // run bg color setter\n this.alpha = 1;\n }\n\n /**\n * initiates the background system\n * @param options - the options for the background colors\n */\n public init(options: BackgroundSystemOptions): void\n {\n options = { ...BackgroundSystem.defaultOptions, ...options };\n\n this.clearBeforeRender = options.clearBeforeRender;\n this.color = options.background || options.backgroundColor || this._backgroundColor; // run bg color setter\n this.alpha = options.backgroundAlpha;\n\n this._backgroundColor.setAlpha(options.backgroundAlpha);\n }\n\n /** The background color to fill if not transparent */\n get color(): Color\n {\n return this._backgroundColor;\n }\n\n set color(value: ColorSource)\n {\n this._backgroundColor.setValue(value);\n }\n\n /** The background color alpha. Setting this to 0 will make the canvas transparent. */\n get alpha(): number\n {\n return this._backgroundColor.alpha;\n }\n\n set alpha(value: number)\n {\n this._backgroundColor.setAlpha(value);\n }\n\n /** The background color as an [R, G, B, A] array. */\n get colorRgba(): RgbaArray\n {\n return this._backgroundColor.toArray() as RgbaArray;\n }\n\n /**\n * destroys the background system\n * @internal\n * @ignore\n */\n public destroy(): void\n {\n // No cleanup required\n }\n}\n","import { extensions, ExtensionType } from '../../../../extensions/Extensions';\nimport { FilterEffect } from '../../../../filters/FilterEffect';\nimport { warn } from '../../../../utils/logging/warn';\n\nimport type { BlendModeFilter } from '../../../../filters/blend-modes/BlendModeFilter';\nimport type { FilterInstruction } from '../../../../filters/FilterSystem';\nimport type { Renderer } from '../../types';\nimport type { Instruction } from '../instructions/Instruction';\nimport type { InstructionSet } from '../instructions/InstructionSet';\nimport type { InstructionPipe } from '../instructions/RenderPipe';\nimport type { Renderable } from '../Renderable';\nimport type { BLEND_MODES } from '../state/const';\n\ninterface AdvancedBlendInstruction extends Instruction\n{\n renderPipeId: 'blendMode',\n blendMode: BLEND_MODES,\n activeBlend: Renderable[],\n}\n\n// class map\nconst BLEND_MODE_FILTERS: Partial BlendModeFilter>> = {} as const;\n\nextensions.handle(ExtensionType.BlendMode, (value) =>\n{\n if (!value.name)\n {\n throw new Error('BlendMode extension must have a name property');\n }\n BLEND_MODE_FILTERS[value.name as BLEND_MODES] = value.ref;\n}, (value) =>\n{\n delete BLEND_MODE_FILTERS[value.name as BLEND_MODES];\n});\n\n/**\n * This Pipe handles the blend mode switching of the renderer.\n * It will insert instructions into the {@link renderers.InstructionSet} to switch the blend mode according to the\n * blend modes of the scene graph.\n *\n * This pipe is were wwe handle Advanced blend modes. Advanced blend modes essentially wrap the renderables\n * in a filter that applies the blend mode.\n *\n * You only need to use this class if you are building your own render instruction set rather than letting PixiJS build\n * the instruction set for you by traversing the scene graph\n * @memberof rendering\n */\nexport class BlendModePipe implements InstructionPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'blendMode',\n } as const;\n\n private _renderer: Renderer;\n\n private _renderableList: Renderable[];\n private _activeBlendMode: BLEND_MODES;\n\n private _isAdvanced = false;\n\n private _filterHash: Partial> = Object.create(null);\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n /**\n * This ensures that a blendMode switch is added to the instruction set if the blend mode has changed.\n * @param renderable - The renderable we are adding to the instruction set\n * @param blendMode - The blend mode of the renderable\n * @param instructionSet - The instruction set we are adding to\n */\n public setBlendMode(renderable: Renderable, blendMode: BLEND_MODES, instructionSet: InstructionSet)\n {\n if (this._activeBlendMode === blendMode)\n {\n if (this._isAdvanced) this._renderableList.push(renderable);\n\n return;\n }\n\n this._activeBlendMode = blendMode;\n\n if (this._isAdvanced)\n {\n this._endAdvancedBlendMode(instructionSet);\n }\n\n this._isAdvanced = !!BLEND_MODE_FILTERS[blendMode];\n\n if (this._isAdvanced)\n {\n this._beginAdvancedBlendMode(instructionSet);\n\n this._renderableList.push(renderable);\n }\n }\n\n private _beginAdvancedBlendMode(instructionSet: InstructionSet)\n {\n this._renderer.renderPipes.batch.break(instructionSet);\n\n const blendMode = this._activeBlendMode;\n\n if (!BLEND_MODE_FILTERS[blendMode as keyof typeof BLEND_MODE_FILTERS])\n {\n // #if _DEBUG\n warn(`Unable to assign BlendMode: '${blendMode}'. `\n + `You may want to include: import 'pixi.js/advanced-blend-modes'`);\n // #endif\n\n return;\n }\n\n let filterEffect = this._filterHash[blendMode];\n\n // this does need an execute?\n if (!filterEffect)\n {\n filterEffect = this._filterHash[blendMode] = new FilterEffect();\n\n filterEffect.filters = [new BLEND_MODE_FILTERS[blendMode as keyof typeof BLEND_MODE_FILTERS]()];\n }\n\n const instruction: FilterInstruction = {\n renderPipeId: 'filter',\n action: 'pushFilter',\n renderables: [],\n filterEffect,\n canBundle: false,\n };\n\n this._renderableList = instruction.renderables;\n instructionSet.add(instruction);\n }\n\n private _endAdvancedBlendMode(instructionSet: InstructionSet)\n {\n this._renderableList = null;\n this._renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'filter',\n action: 'popFilter',\n canBundle: false,\n });\n }\n\n /**\n * called when the instruction build process is starting this will reset internally to the default blend mode\n * @internal\n * @ignore\n */\n public buildStart()\n {\n this._isAdvanced = false;\n }\n\n /**\n * called when the instruction build process is finished, ensuring that if there is an advanced blend mode\n * active, we add the final render instructions added to the instruction set\n * @param instructionSet - The instruction set we are adding to\n * @internal\n * @ignore\n */\n public buildEnd(instructionSet: InstructionSet)\n {\n if (this._isAdvanced)\n {\n this._endAdvancedBlendMode(instructionSet);\n }\n }\n\n /**\n * @internal\n * @ignore\n */\n public destroy()\n {\n this._renderer = null;\n this._renderableList = null;\n\n for (const i in this._filterHash)\n {\n this._filterHash[i as BLEND_MODES].destroy();\n }\n\n this._filterHash = null;\n }\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { Container } from '../../../../scene/container/Container';\nimport { Texture } from '../texture/Texture';\n\nimport type { ColorSource } from '../../../../color/Color';\nimport type { ICanvas } from '../../../../environment/canvas/ICanvas';\nimport type { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport type { Renderer } from '../../types';\nimport type { System } from '../system/System';\nimport type { GetPixelsOutput } from '../texture/GenerateCanvas';\nimport type { GenerateTextureOptions } from './GenerateTextureSystem';\n\nconst imageTypes = {\n png: 'image/png',\n jpg: 'image/jpeg',\n webp: 'image/webp',\n};\n\ntype Formats = keyof typeof imageTypes;\n\n/**\n * Options for creating an image from a renderer.\n * @memberof rendering\n */\nexport interface ImageOptions\n{\n /** The format of the image. */\n format?: Formats;\n /** The quality of the image. */\n quality?: number;\n}\n\n/**\n * Options for extracting content from a renderer.\n * @memberof rendering\n */\nexport interface BaseExtractOptions\n{\n /** The target to extract. */\n target: Container | Texture;\n /** The region of the target to extract. */\n frame?: Rectangle;\n /** The resolution of the extracted content. */\n resolution?: number;\n /** The color used to clear the extracted content. */\n clearColor?: ColorSource;\n /** Whether to enable anti-aliasing. This may affect performance. */\n antialias?: boolean;\n}\n/**\n * Options for extracting an HTMLImage from the renderer.\n * @memberof rendering\n */\nexport type ExtractImageOptions = BaseExtractOptions & ImageOptions;\n/**\n * Options for extracting and downloading content from a renderer.\n * @memberof rendering\n */\nexport type ExtractDownloadOptions = BaseExtractOptions & {\n /** The filename to use when downloading the content. */\n filename: string;\n};\n/**\n * Options for extracting content from a renderer.\n * @memberof rendering\n */\nexport type ExtractOptions = BaseExtractOptions | ExtractImageOptions | ExtractDownloadOptions;\n\n/**\n * This class provides renderer-specific plugins for exporting content from a renderer.\n * For instance, these plugins can be used for saving an Image, Canvas element or for exporting the raw image data (pixels).\n *\n * Do not instantiate these plugins directly. It is available from the `renderer.extract` property.\n * @example\n * import { Application, Graphics } from 'pixi.js';\n *\n * // Create a new application (extract will be auto-added to renderer)\n * const app = new Application();\n * await app.init();\n *\n * // Draw a red circle\n * const graphics = new Graphics()\n * .circle(0, 0, 50);\n * .fill(0xFF0000)\n *\n * // Render the graphics as an HTMLImageElement\n * const image = await app.renderer.extract.image(graphics);\n * document.body.appendChild(image);\n * @memberof rendering\n */\nexport class ExtractSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ],\n name: 'extract',\n } as const;\n\n /** Default options for creating an image. */\n public static defaultImageOptions: ImageOptions = {\n /** The format of the image. */\n format: 'png' as Formats,\n /** The quality of the image. */\n quality: 1,\n };\n\n private _renderer: Renderer;\n\n /** @param renderer - The renderer this System works for. */\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n private _normalizeOptions(\n options: ExtractImageOptions | Container | Texture,\n defaults: Partial = {},\n ): T\n {\n if (options instanceof Container || options instanceof Texture)\n {\n return {\n target: options,\n ...defaults\n } as T;\n }\n\n return {\n ...defaults,\n ...options,\n } as T;\n }\n\n /**\n * Will return a HTML Image of the target\n * @param options - The options for creating the image, or the target to extract\n * @returns - HTML Image of the target\n */\n public async image(options: ExtractImageOptions | Container | Texture): Promise\n {\n const image = new Image();\n\n image.src = await this.base64(options);\n\n return image;\n }\n\n /**\n * Will return a base64 encoded string of this target. It works by calling\n * `Extract.canvas` and then running toDataURL on that.\n * @param options - The options for creating the image, or the target to extract\n */\n public async base64(options: ExtractImageOptions | Container | Texture): Promise\n {\n options = this._normalizeOptions(\n options,\n ExtractSystem.defaultImageOptions\n );\n\n const { format, quality } = options;\n\n const canvas = this.canvas(options);\n\n if (canvas.toBlob !== undefined)\n {\n return new Promise((resolve, reject) =>\n {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n canvas.toBlob!((blob) =>\n {\n if (!blob)\n {\n reject(new Error('ICanvas.toBlob failed!'));\n\n return;\n }\n\n const reader = new FileReader();\n\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n }, imageTypes[format], quality);\n });\n }\n if (canvas.toDataURL !== undefined)\n {\n return canvas.toDataURL(imageTypes[format], quality);\n }\n if (canvas.convertToBlob !== undefined)\n {\n const blob = await canvas.convertToBlob({ type: imageTypes[format], quality });\n\n return new Promise((resolve, reject) =>\n {\n const reader = new FileReader();\n\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n }\n\n throw new Error('Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, '\n + 'or ICanvas.convertToBlob to be implemented');\n }\n\n /**\n * Creates a Canvas element, renders this target to it and then returns it.\n * @param options - The options for creating the canvas, or the target to extract\n * @returns - A Canvas element with the texture rendered on.\n */\n public canvas(options: ExtractOptions | Container | Texture): ICanvas\n {\n options = this._normalizeOptions(options);\n\n const target = options.target;\n\n const renderer = this._renderer;\n\n if (target instanceof Texture)\n {\n return renderer.texture.generateCanvas(target);\n }\n\n const texture = renderer.textureGenerator.generateTexture(options as GenerateTextureOptions);\n\n const canvas = renderer.texture.generateCanvas(texture);\n\n texture.destroy();\n\n return 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 * @param options - The options for extracting the image, or the target to extract\n * @returns - One-dimensional array containing the pixel data of the entire texture\n */\n public pixels(options: ExtractOptions | Container | Texture): GetPixelsOutput\n {\n options = this._normalizeOptions(options);\n\n const target = options.target;\n\n const renderer = this._renderer;\n const texture = target instanceof Texture\n ? target\n : renderer.textureGenerator.generateTexture(options as GenerateTextureOptions);\n\n const pixelInfo = renderer.texture.getPixels(texture);\n\n if (target instanceof Container)\n {\n // destroy generated texture\n texture.destroy();\n }\n\n return pixelInfo;\n }\n\n /**\n * Will return a texture of the target\n * @param options - The options for creating the texture, or the target to extract\n * @returns - A texture of the target\n */\n public texture(options: ExtractOptions | Container | Texture): Texture\n {\n options = this._normalizeOptions(options);\n\n if (options.target instanceof Texture) return options.target;\n\n return this._renderer.textureGenerator.generateTexture(options as GenerateTextureOptions);\n }\n\n /**\n * Will extract a HTMLImage of the target and download it\n * @param options - The options for downloading and extracting the image, or the target to extract\n */\n public download(options: ExtractDownloadOptions | Container | Texture)\n {\n options = this._normalizeOptions(options);\n\n const canvas = this.canvas(options);\n\n const link = document.createElement('a');\n\n link.download = options.filename ?? 'image.png';\n link.href = canvas.toDataURL('image/png');\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n\n /**\n * Logs the target to the console as an image. This is a useful way to debug what's happening in the renderer.\n * @param options - The options for logging the image, or the target to log\n */\n public log(options: (ExtractOptions & {width?: number}) | Container | Texture)\n {\n const width = options.width ?? 200;\n\n options = this._normalizeOptions(options);\n\n const canvas = this.canvas(options);\n\n const base64 = canvas.toDataURL();\n\n // eslint-disable-next-line no-console\n console.log(`[Pixi Texture] ${canvas.width}px ${canvas.height}px`);\n\n const style = [\n 'font-size: 1px;',\n `padding: ${width}px ${300}px;`,\n `background: url(${base64}) no-repeat;`,\n 'background-size: contain;',\n ].join(' ');\n\n // eslint-disable-next-line no-console\n console.log('%c ', style);\n }\n\n public destroy(): void\n {\n this._renderer = null as any as Renderer;\n }\n}\n","import { TextureSource } from './sources/TextureSource';\nimport { Texture } from './Texture';\n\nimport type { TextureSourceOptions } from './sources/TextureSource';\n\n/**\n * A render texture, extends `Texture`.\n * @see {@link rendering.Texture}\n * @memberof rendering\n */\nexport class RenderTexture extends Texture\n{\n public static create(options: TextureSourceOptions): Texture\n {\n return new Texture({\n source: new TextureSource(options)\n });\n }\n\n /**\n * Resizes the render texture.\n * @param width - The new width of the render texture.\n * @param height - The new height of the render texture.\n * @param resolution - The new resolution of the render texture.\n * @returns This texture.\n */\n public resize(width: number, height: number, resolution?: number): this\n {\n this.source.resize(width, height, resolution);\n\n return this;\n }\n}\n","import { Color, type ColorSource } from '../../../../color/Color';\nimport { ExtensionType } from '../../../../extensions/Extensions';\nimport { Matrix } from '../../../../maths/matrix/Matrix';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { Bounds } from '../../../../scene/container/bounds/Bounds';\nimport { getLocalBounds } from '../../../../scene/container/bounds/getLocalBounds';\nimport { Container } from '../../../../scene/container/Container';\nimport { RenderTexture } from '../texture/RenderTexture';\n\nimport type { Renderer } from '../../types';\nimport type { System } from '../system/System';\nimport type { TextureSourceOptions } from '../texture/sources/TextureSource';\nimport type { Texture } from '../texture/Texture';\n\nexport type GenerateTextureSourceOptions = Omit;\n\n/**\n * Options for generating a texture from a container.\n * @memberof rendering\n */\nexport type GenerateTextureOptions =\n{\n /** The container to generate the texture from */\n target: Container;\n /**\n * The region of the container, that shall be rendered,\n * if no region is specified, defaults to the local bounds of the container.\n */\n frame?: Rectangle;\n /** The resolution of the texture being generated. */\n resolution?: number;\n /** The color used to clear the texture. */\n clearColor?: ColorSource;\n /** Whether to enable anti-aliasing. This may affect performance. */\n antialias?: boolean;\n /** The options passed to the texture source. */\n textureSourceOptions?: GenerateTextureSourceOptions,\n};\n\nconst tempRect = new Rectangle();\nconst tempBounds = new Bounds();\nconst noColor: ColorSource = [0, 0, 0, 0];\n\n/**\n * System that manages the generation of textures from the renderer\n *\n *\n * Do not instantiate these plugins directly. It is available from the `renderer.textureGenerator` property.\n * @memberof rendering\n */\nexport class GenerateTextureSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ],\n name: 'textureGenerator',\n } as const;\n\n private readonly _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n /**\n * A 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 container is complicated and needs to be reused multiple times.\n * @param {GenerateTextureOptions | Container} options - Generate texture options.\n * @param {Container} [options.container] - If not given, the renderer's resolution is used.\n * @param {Rectangle} options.region - The region of the container, that shall be rendered,\n * @param {number} [options.resolution] - The resolution of the texture being generated.\n * if no region is specified, defaults to the local bounds of the container.\n * @param {GenerateTextureSourceOptions} [options.textureSourceOptions] - Texture options for GPU.\n * @returns a shiny new texture of the container passed in\n */\n public generateTexture(options: GenerateTextureOptions | Container): Texture\n {\n if (options instanceof Container)\n {\n options = {\n target: options,\n frame: undefined,\n textureSourceOptions: {},\n resolution: undefined,\n };\n }\n\n const resolution = options.resolution || this._renderer.resolution;\n const antialias = options.antialias || this._renderer.view.antialias;\n\n const container = options.target;\n\n let clearColor = options.clearColor;\n\n if (clearColor)\n {\n const isRGBAArray = Array.isArray(clearColor) && clearColor.length === 4;\n\n clearColor = isRGBAArray ? clearColor : Color.shared.setValue(clearColor).toArray();\n }\n else\n {\n clearColor = noColor;\n }\n\n const region = options.frame?.copyTo(tempRect)\n || getLocalBounds(container, tempBounds).rectangle;\n\n region.width = Math.max(region.width, 1 / resolution) | 0;\n region.height = Math.max(region.height, 1 / resolution) | 0;\n\n const target = RenderTexture.create({\n ...options.textureSourceOptions,\n width: region.width,\n height: region.height,\n resolution,\n antialias,\n });\n\n const transform = Matrix.shared.translate(-region.x, -region.y);\n\n this._renderer.render({\n container,\n transform,\n target,\n clearColor,\n });\n\n target.source.updateMipmaps();\n\n return target;\n }\n\n public destroy(): void\n {\n (this._renderer as null) = null;\n }\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { Matrix } from '../../../../maths/matrix/Matrix';\nimport { Point } from '../../../../maths/point/Point';\nimport { color32BitToUniform } from '../../../../scene/graphics/gpu/colorToUniform';\nimport { BindGroup } from '../../gpu/shader/BindGroup';\nimport { type Renderer, RendererType } from '../../types';\nimport { UniformGroup } from '../shader/UniformGroup';\n\nimport type { PointData } from '../../../../maths/point/PointData';\nimport type { GlRenderTargetSystem } from '../../gl/renderTarget/GlRenderTargetSystem';\nimport type { GpuRenderTargetSystem } from '../../gpu/renderTarget/GpuRenderTargetSystem';\nimport type { WebGPURenderer } from '../../gpu/WebGPURenderer';\nimport type { UboSystem } from '../shader/UboSystem';\nimport type { System } from '../system/System';\n\nexport type GlobalUniformGroup = UniformGroup<{\n uProjectionMatrix: { value: Matrix; type: 'mat3x3' }\n uWorldTransformMatrix: { value: Matrix; type: 'mat3x3' }\n uWorldColorAlpha: { value: Float32Array; type: 'vec4' }\n uResolution: { value: number[]; type: 'vec2' }\n}>;\n\nexport interface GlobalUniformOptions\n{\n size?: number[],\n projectionMatrix?: Matrix,\n worldTransformMatrix?: Matrix\n worldColor?: number\n offset?: PointData\n}\n\nexport interface GlobalUniformData\n{\n projectionMatrix: Matrix\n worldTransformMatrix: Matrix\n worldColor: number\n resolution: number[]\n offset: PointData\n bindGroup: BindGroup\n}\n\nexport interface GlobalUniformRenderer\n{\n renderTarget: GlRenderTargetSystem | GpuRenderTargetSystem\n renderPipes: Renderer['renderPipes'];\n ubo: UboSystem;\n type: RendererType;\n}\n\n/**\n * System plugin to the renderer to manage global uniforms for the renderer.\n * @memberof rendering\n */\nexport class GlobalUniformSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'globalUniforms',\n } as const;\n\n private readonly _renderer: GlobalUniformRenderer;\n\n private _stackIndex = 0;\n private _globalUniformDataStack: GlobalUniformData[] = [];\n\n private readonly _uniformsPool: GlobalUniformGroup[] = [];\n private readonly _activeUniforms: GlobalUniformGroup[] = [];\n\n private readonly _bindGroupPool: BindGroup[] = [];\n private readonly _activeBindGroups: BindGroup[] = [];\n\n private _currentGlobalUniformData: GlobalUniformData;\n\n constructor(renderer: GlobalUniformRenderer)\n {\n this._renderer = renderer;\n }\n\n public reset()\n {\n this._stackIndex = 0;\n\n for (let i = 0; i < this._activeUniforms.length; i++)\n {\n this._uniformsPool.push(this._activeUniforms[i]);\n }\n\n for (let i = 0; i < this._activeBindGroups.length; i++)\n {\n this._bindGroupPool.push(this._activeBindGroups[i]);\n }\n\n this._activeUniforms.length = 0;\n this._activeBindGroups.length = 0;\n }\n\n public start(options: GlobalUniformOptions): void\n {\n this.reset();\n\n this.push(options);\n }\n\n public bind({\n size,\n projectionMatrix,\n worldTransformMatrix,\n worldColor,\n offset,\n }: GlobalUniformOptions)\n {\n const renderTarget = this._renderer.renderTarget.renderTarget;\n\n const currentGlobalUniformData = this._stackIndex ? this._globalUniformDataStack[this._stackIndex - 1] : {\n projectionData: renderTarget,\n worldTransformMatrix: new Matrix(),\n worldColor: 0xFFFFFFFF,\n offset: new Point(),\n };\n\n const globalUniformData: GlobalUniformData = {\n projectionMatrix: projectionMatrix || this._renderer.renderTarget.projectionMatrix,\n resolution: size || renderTarget.size,\n worldTransformMatrix: worldTransformMatrix || currentGlobalUniformData.worldTransformMatrix,\n worldColor: worldColor || currentGlobalUniformData.worldColor,\n offset: offset || currentGlobalUniformData.offset,\n bindGroup: null,\n };\n\n const uniformGroup = this._uniformsPool.pop() || this._createUniforms();\n\n this._activeUniforms.push(uniformGroup);\n\n const uniforms = uniformGroup.uniforms;\n\n uniforms.uProjectionMatrix = globalUniformData.projectionMatrix;\n\n uniforms.uResolution = globalUniformData.resolution;\n\n uniforms.uWorldTransformMatrix.copyFrom(globalUniformData.worldTransformMatrix);\n\n uniforms.uWorldTransformMatrix.tx -= globalUniformData.offset.x;\n uniforms.uWorldTransformMatrix.ty -= globalUniformData.offset.y;\n\n color32BitToUniform(\n globalUniformData.worldColor,\n uniforms.uWorldColorAlpha,\n 0\n );\n\n uniformGroup.update();\n\n let bindGroup: BindGroup;\n\n if ((this._renderer as WebGPURenderer).renderPipes.uniformBatch)\n {\n bindGroup = (this._renderer as WebGPURenderer).renderPipes.uniformBatch.getUniformBindGroup(uniformGroup, false);\n }\n else\n {\n bindGroup = this._bindGroupPool.pop() || new BindGroup();\n this._activeBindGroups.push(bindGroup);\n bindGroup.setResource(uniformGroup, 0);\n }\n\n globalUniformData.bindGroup = bindGroup;\n\n this._currentGlobalUniformData = globalUniformData;\n }\n\n public push(options: GlobalUniformOptions)\n {\n this.bind(options);\n\n this._globalUniformDataStack[this._stackIndex++] = this._currentGlobalUniformData;\n }\n\n public pop()\n {\n this._currentGlobalUniformData = this._globalUniformDataStack[--this._stackIndex - 1];\n\n // for webGL we need to update the uniform group here\n // as we are not using bind groups\n if (this._renderer.type === RendererType.WEBGL)\n {\n (this._currentGlobalUniformData.bindGroup.resources[0] as UniformGroup).update();\n }\n }\n\n get bindGroup(): BindGroup\n {\n return this._currentGlobalUniformData.bindGroup;\n }\n\n get uniformGroup()\n {\n return this._currentGlobalUniformData.bindGroup.resources[0] as UniformGroup;\n }\n\n private _createUniforms(): GlobalUniformGroup\n {\n const globalUniforms = new UniformGroup({\n uProjectionMatrix: { value: new Matrix(), type: 'mat3x3' },\n uWorldTransformMatrix: { value: new Matrix(), type: 'mat3x3' },\n // TODO - someone smart - set this to be a unorm8x4 rather than a vec4\n uWorldColorAlpha: { value: new Float32Array(4), type: 'vec4' },\n uResolution: { value: [0, 0], type: 'vec2' },\n }, {\n isStatic: true,\n });\n\n return globalUniforms;\n }\n\n public destroy()\n {\n (this._renderer as null) = null;\n }\n}\n","import { DOMAdapter } from '../environment/adapter';\n\nlet saidHello = false;\n\nexport const VERSION = '$_VERSION';\n\n/**\n * Prints out the version and renderer information for this running instance of PixiJS.\n * @param type - The name of the renderer this instance is using.\n * @returns {void}\n */\nexport function sayHello(type: string): void\n{\n if (saidHello)\n {\n return;\n }\n\n if (DOMAdapter.get().getNavigator().userAgent.toLowerCase().indexOf('chrome') > -1)\n {\n const args = [\n `%c %c %c %c %c PixiJS %c v${VERSION} (${type}) http://www.pixijs.com/\\n\\n`,\n 'background: #E72264; padding:5px 0;',\n 'background: #6CA2EA; padding:5px 0;',\n 'background: #B5D33D; padding:5px 0;',\n 'background: #FED23F; padding:5px 0;',\n 'color: #FFFFFF; background: #E72264; padding:5px 0;',\n 'color: #E72264; background: #FFFFFF; padding:5px 0;',\n ];\n\n globalThis.console.log(...args);\n }\n else if (globalThis.console)\n {\n globalThis.console.log(`PixiJS ${VERSION} - ${type} - http://www.pixijs.com/`);\n }\n\n saidHello = true;\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { sayHello } from '../../../../utils/sayHello';\nimport { type Renderer, RendererType } from '../../types';\n\nimport type { WebGLRenderer } from '../../gl/WebGLRenderer';\nimport type { System } from '../system/System';\n\n/**\n * Options for the startup system.\n * @property {boolean} [hello=false] - Whether to log the version and type information of renderer to console.\n * @memberof rendering\n */\nexport interface HelloSystemOptions\n{\n /**\n * Whether to log the version and type information of renderer to console.\n * @memberof rendering.SharedRendererOptions\n * @default false\n */\n hello: boolean;\n}\n\n/**\n * A simple system responsible for initiating the renderer.\n * @memberof rendering\n */\nexport class HelloSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'hello',\n priority: -2,\n } as const;\n\n /** The default options for the system. */\n public static defaultOptions: HelloSystemOptions = {\n /** {@link WebGLOptions.hello} */\n hello: false,\n };\n\n private readonly _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n /**\n * It all starts here! This initiates every system, passing in the options for any system by name.\n * @param options - the config for the renderer and all its systems\n */\n public init(options: HelloSystemOptions): void\n {\n if (options.hello)\n {\n let name = this._renderer.name;\n\n if (this._renderer.type === RendererType.WEBGL)\n {\n name += ` ${(this._renderer as WebGLRenderer).context.webGLVersion}`;\n }\n\n sayHello(name);\n }\n }\n}\n","import { extensions, ExtensionType } from '../../../../extensions/Extensions';\n\nimport type { Renderer } from '../../types';\nimport type { System } from '../system/System';\n\n/**\n * Options for the {@link TextureGCSystem}.\n * @memberof rendering\n * @property {boolean} [textureGCActive=true] - If set to true, this will enable the garbage collector on the GPU.\n * @property {number} [textureGCAMaxIdle=60 * 60] -\n * The maximum idle frames before a texture is destroyed by garbage collection.\n * @property {number} [textureGCCheckCountMax=600] - Frames between two garbage collections.\n */\nexport interface TextureGCSystemOptions\n{\n /**\n * If set to true, this will enable the garbage collector on the GPU.\n * @default true\n * @memberof rendering.SharedRendererOptions\n */\n textureGCActive: boolean;\n /**\n * The maximum idle frames before a texture is destroyed by garbage collection.\n * @default 60 * 60\n * @memberof rendering.SharedRendererOptions\n */\n textureGCAMaxIdle: number;\n /**\n * Frames between two garbage collections.\n * @default 600\n * @memberof rendering.SharedRendererOptions\n */\n textureGCCheckCountMax: number;\n}\n/**\n * System plugin to the renderer to manage texture garbage collection on the GPU,\n * ensuring that it does not get clogged up with textures that are no longer being used.\n * @memberof rendering\n */\nexport class TextureGCSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ],\n name: 'textureGC',\n } as const;\n\n /** default options for the TextureGCSystem */\n public static defaultOptions: TextureGCSystemOptions = {\n /**\n * If set to true, this will enable the garbage collector on the GPU.\n * @default true\n */\n textureGCActive: true,\n /**\n * The maximum idle frames before a texture is destroyed by garbage collection.\n * @default 60 * 60\n */\n textureGCAMaxIdle: 60 * 60,\n /**\n * Frames between two garbage collections.\n * @default 600\n */\n textureGCCheckCountMax: 600,\n };\n\n /**\n * Frame count since started.\n * @readonly\n */\n public count: number;\n\n /**\n * Frame count since last garbage collection.\n * @readonly\n */\n public checkCount: number;\n\n /**\n * Maximum idle frames before a texture is destroyed by garbage collection.\n * @see TextureGCSystem.defaultMaxIdle\n */\n public maxIdle: number;\n\n /**\n * Frames between two garbage collections.\n * @see TextureGCSystem.defaultCheckCountMax\n */\n public checkCountMax: number;\n\n /**\n * Current garbage collection mode.\n * @see TextureGCSystem.defaultMode\n */\n public active: boolean;\n private _renderer: Renderer;\n\n /** @param renderer - The renderer this System works for. */\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n\n this.count = 0;\n this.checkCount = 0;\n }\n\n public init(options: TextureGCSystemOptions): void\n {\n options = { ...TextureGCSystem.defaultOptions, ...options };\n\n this.checkCountMax = options.textureGCCheckCountMax;\n this.maxIdle = options.textureGCAMaxIdle;\n this.active = options.textureGCActive;\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 protected postrender(): void\n {\n if (!this._renderer.renderingToScreen)\n {\n return;\n }\n\n this.count++;\n\n if (!this.active) return;\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 public run(): void\n {\n const managedTextures = this._renderer.texture.managedTextures;\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 (\n texture.autoGarbageCollect\n && texture.resource\n && texture._touched > -1\n && this.count - texture._touched > this.maxIdle\n )\n {\n texture._touched = -1;\n texture.unload();\n }\n }\n }\n\n public destroy(): void\n {\n this._renderer = null as any as Renderer;\n }\n}\n\nextensions.add(TextureGCSystem);\n","import { DOMAdapter } from '../../../../environment/adapter';\nimport { ExtensionType } from '../../../../extensions/Extensions';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { deprecation, v8_0_0 } from '../../../../utils/logging/deprecation';\nimport { RenderTarget } from '../renderTarget/RenderTarget';\nimport { getCanvasTexture } from '../texture/utils/getCanvasTexture';\n\nimport type { ICanvas } from '../../../../environment/canvas/ICanvas';\nimport type { TypeOrBool } from '../../../../scene/container/destroyTypes';\nimport type { System } from '../system/System';\nimport type { CanvasSource, CanvasSourceOptions } from '../texture/sources/CanvasSource';\nimport type { Texture } from '../texture/Texture';\n\n/**\n * Options passed to the ViewSystem\n * @memberof rendering\n * @property {number} [width=800] - The width of the screen.\n * @property {number} [height=600] - The height of the screen.\n * @property {ICanvas} [canvas] - The canvas to use as a view, optional.\n * @property {boolean} [autoDensity=false] - Resizes renderer view in CSS pixels to allow for resolutions other than 1.\n * @property {number} [resolution] - The resolution / device pixel ratio of the renderer.\n * @property {boolean} [antialias=false] - Whether to enable anti-aliasing. This may affect performance.\n * @property {boolean} [depth] -\n * Whether to ensure the main view has can make use of the depth buffer. Always true for WebGL renderer.\n * @property {boolean} [multiView] - TODO: multiView\n * @property {number} [backgroundAlpha] - The alpha of the background.\n */\nexport interface ViewSystemOptions\n{\n /**\n * The width of the screen.\n * @default 800\n * @memberof rendering.SharedRendererOptions\n */\n width?: number;\n /**\n * The height of the screen.\n * @default 600\n * @memberof rendering.SharedRendererOptions\n */\n height?: number;\n /**\n * The canvas to use as a view, optional.\n * @memberof rendering.SharedRendererOptions\n */\n canvas?: ICanvas;\n /** @deprecated */\n view?: ICanvas;\n /**\n * Resizes renderer view in CSS pixels to allow for resolutions other than 1.\n * @memberof rendering.SharedRendererOptions\n */\n autoDensity?: boolean;\n /**\n * The resolution / device pixel ratio of the renderer.\n * @memberof rendering.SharedRendererOptions\n */\n resolution?: number;\n /**\n * Whether to enable anti-aliasing. This may affect performance.\n * @memberof rendering.SharedRendererOptions\n */\n antialias?: boolean;\n /**\n * Whether to ensure the main view has can make use of the depth buffer. Always true for WebGL renderer.\n * @memberof rendering.SharedRendererOptions\n */\n depth?: boolean;\n /**\n * TODO: multiView\n * @memberof rendering.SharedRendererOptions\n */\n multiView?: boolean;\n\n /**\n * Transparency of the background color, value from `0` (fully transparent) to `1` (fully opaque).\n * @default 1\n */\n backgroundAlpha?: number;\n}\n\nexport interface ViewSystemDestroyOptions\n{\n /** Whether to remove the view element from the DOM. Defaults to `false`. */\n removeView?: boolean;\n}\n\n/**\n * The view system manages the main canvas that is attached to the DOM.\n * This main role is to deal with how the holding the view reference and dealing with how it is resized.\n * @memberof rendering\n */\nexport class ViewSystem implements System>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'view',\n priority: 0,\n } as const;\n\n /** The default options for the view system. */\n public static defaultOptions: ViewSystemOptions = {\n /**\n * {@link WebGLOptions.width}\n * @default 800\n */\n width: 800,\n /**\n * {@link WebGLOptions.height}\n * @default 600\n */\n height: 600,\n /**\n * {@link WebGLOptions.autoDensity}\n * @default false\n */\n autoDensity: false,\n /**\n * {@link WebGLOptions.antialias}\n * @default false\n */\n antialias: false,\n };\n\n public multiView: boolean;\n\n /** The canvas element that everything is drawn to. */\n public canvas!: ICanvas;\n\n /** The texture that is used to draw the canvas to the screen. */\n public texture: Texture;\n\n /**\n * Whether CSS dimensions of canvas view should be resized to screen dimensions automatically.\n * @member {boolean}\n */\n public autoDensity: boolean;\n\n /** Whether to enable anti-aliasing. This may affect performance. */\n public antialias: boolean;\n\n /**\n * Measurements of the screen. (0, 0, screenWidth, screenHeight).\n *\n * Its safe to use as filterArea or hitArea for the whole stage.\n */\n public screen: Rectangle;\n /** The render target that the view is drawn to. */\n public renderTarget: RenderTarget;\n\n /** The resolution / device pixel ratio of the renderer. */\n get resolution(): number\n {\n return this.texture.source._resolution;\n }\n\n set resolution(value: number)\n {\n this.texture.source.resize(\n this.texture.source.width,\n this.texture.source.height,\n value\n );\n }\n\n /**\n * initiates the view system\n * @param options - the options for the view\n */\n public init(options: ViewSystemOptions): void\n {\n options = {\n ...ViewSystem.defaultOptions,\n ...options,\n };\n\n if (options.view)\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'ViewSystem.view has been renamed to ViewSystem.canvas');\n // #endif\n\n options.canvas = options.view;\n }\n\n this.screen = new Rectangle(0, 0, options.width, options.height);\n this.canvas = options.canvas || DOMAdapter.get().createCanvas();\n this.antialias = !!options.antialias;\n this.texture = getCanvasTexture(this.canvas, options as CanvasSourceOptions);\n this.renderTarget = new RenderTarget({\n colorTextures: [this.texture],\n depth: !!options.depth,\n isRoot: true,\n });\n\n (this.texture.source as CanvasSource).transparent = options.backgroundAlpha < 1;\n this.multiView = !!options.multiView;\n\n if (this.autoDensity)\n {\n this.canvas.style.width = `${this.texture.width}px`;\n this.canvas.style.height = `${this.texture.height}px`;\n }\n\n this.resolution = options.resolution;\n }\n\n /**\n * Resizes the screen and canvas to the specified dimensions.\n * @param desiredScreenWidth - The new width of the screen.\n * @param desiredScreenHeight - The new height of the screen.\n * @param resolution\n */\n public resize(desiredScreenWidth: number, desiredScreenHeight: number, resolution: number): void\n {\n this.texture.source.resize(desiredScreenWidth, desiredScreenHeight, resolution);\n\n this.screen.width = this.texture.frame.width;\n this.screen.height = this.texture.frame.height;\n\n if (this.autoDensity)\n {\n this.canvas.style.width = `${desiredScreenWidth}px`;\n this.canvas.style.height = `${desiredScreenHeight}px`;\n }\n }\n\n /**\n * Destroys this System and optionally removes the canvas from the dom.\n * @param {options | false} options - The options for destroying the view, or \"false\".\n * @param options.removeView - Whether to remove the view element from the DOM. Defaults to `false`.\n */\n public destroy(options: TypeOrBool = false): void\n {\n const removeView = typeof options === 'boolean' ? options : !!options?.removeView;\n\n if (removeView && this.canvas.parentNode)\n {\n this.canvas.parentNode.removeChild(this.canvas);\n }\n\n // note: don't nullify the element\n // other systems may need to unbind from it during the destroy iteration (eg. GLContextSystem)\n }\n}\n","import { CustomRenderPipe } from '../../../../scene/container/CustomRenderPipe';\nimport { RenderGroupPipe } from '../../../../scene/container/RenderGroupPipe';\nimport { RenderGroupSystem } from '../../../../scene/container/RenderGroupSystem';\nimport { SpritePipe } from '../../../../scene/sprite/SpritePipe';\nimport { RendererInitHook } from '../../../../utils/global/globalHooks';\nimport { BatcherPipe } from '../../../batcher/shared/BatcherPipe';\nimport { AlphaMaskPipe } from '../../../mask/alpha/AlphaMaskPipe';\nimport { ColorMaskPipe } from '../../../mask/color/ColorMaskPipe';\nimport { StencilMaskPipe } from '../../../mask/stencil/StencilMaskPipe';\nimport { BackgroundSystem } from '../background/BackgroundSystem';\nimport { BlendModePipe } from '../blendModes/BlendModePipe';\nimport { ExtractSystem } from '../extract/ExtractSystem';\nimport { GenerateTextureSystem } from '../extract/GenerateTextureSystem';\nimport { GlobalUniformSystem } from '../renderTarget/GlobalUniformSystem';\nimport { HelloSystem } from '../startup/HelloSystem';\nimport { TextureGCSystem } from '../texture/TextureGCSystem';\nimport { ViewSystem } from '../view/ViewSystem';\n\nimport type { ExtractRendererOptions } from './utils/typeUtils';\n\nexport const SharedSystems = [\n BackgroundSystem,\n GlobalUniformSystem,\n HelloSystem,\n ViewSystem,\n RenderGroupSystem,\n TextureGCSystem,\n GenerateTextureSystem,\n ExtractSystem,\n RendererInitHook\n];\n\nexport const SharedRenderPipes = [\n BlendModePipe,\n BatcherPipe,\n SpritePipe,\n RenderGroupPipe,\n AlphaMaskPipe,\n StencilMaskPipe,\n ColorMaskPipe,\n CustomRenderPipe\n];\n\n/**\n * Options for the shared systems of a renderer.\n * @memberof rendering\n */\nexport interface SharedRendererOptions extends ExtractRendererOptions, PixiMixins.RendererOptions\n{\n /**\n * Whether to stop PixiJS from dynamically importing default extensions for the renderer.\n * It is false by default, and means PixiJS will load all the default extensions, based\n * on the environment e.g browser/webworker.\n * If you set this to true, then you will need to manually import the systems and extensions you need.\n *\n * e.g.\n * ```js\n * import 'accessibility';\n * import 'app';\n * import 'events';\n * import 'spritesheet';\n * import 'graphics';\n * import 'mesh';\n * import 'text';\n * import 'text-bitmap';\n * import 'text-html';\n * import { autoDetectRenderer } from 'pixi.js';\n *\n * const renderer = await autoDetectRenderer({\n * width: 800,\n * height: 600,\n * skipExtensionImports: true,\n * });\n * ```\n * @default false\n */\n skipExtensionImports?: boolean;\n /**\n * @default true\n * @deprecated since 8.1.6\n * @see `skipExtensionImports`\n */\n manageImports?: boolean;\n}\n","import { extensions, ExtensionType } from '../../../extensions/Extensions';\nimport { GlGraphicsAdaptor } from '../../../scene/graphics/gl/GlGraphicsAdaptor';\nimport { GlMeshAdaptor } from '../../../scene/mesh/gl/GlMeshAdaptor';\nimport { GlBatchAdaptor } from '../../batcher/gl/GlBatchAdaptor';\nimport { AbstractRenderer } from '../shared/system/AbstractRenderer';\nimport { SharedRenderPipes, SharedSystems } from '../shared/system/SharedSystems';\nimport { RendererType } from '../types';\nimport { GlBufferSystem } from './buffer/GlBufferSystem';\nimport { GlContextSystem } from './context/GlContextSystem';\nimport { GlGeometrySystem } from './geometry/GlGeometrySystem';\nimport { GlBackBufferSystem } from './GlBackBufferSystem';\nimport { GlColorMaskSystem } from './GlColorMaskSystem';\nimport { GlEncoderSystem } from './GlEncoderSystem';\nimport { GlStencilSystem } from './GlStencilSystem';\nimport { GlUboSystem } from './GlUboSystem';\nimport { GlRenderTargetSystem } from './renderTarget/GlRenderTargetSystem';\nimport { GlShaderSystem } from './shader/GlShaderSystem';\nimport { GlUniformGroupSystem } from './shader/GlUniformGroupSystem';\nimport { GlStateSystem } from './state/GlStateSystem';\nimport { GlTextureSystem } from './texture/GlTextureSystem';\n\nimport type { ICanvas } from '../../../environment/canvas/ICanvas';\nimport type { PipeConstructor } from '../shared/instructions/RenderPipe';\nimport type { SharedRendererOptions } from '../shared/system/SharedSystems';\nimport type { SystemConstructor } from '../shared/system/System';\nimport type { ExtractRendererOptions, ExtractSystemTypes } from '../shared/system/utils/typeUtils';\nimport type { GlRenderingContext } from './context/GlRenderingContext';\n\nconst DefaultWebGLSystems = [\n ...SharedSystems,\n GlUboSystem,\n GlBackBufferSystem,\n GlContextSystem,\n GlBufferSystem,\n GlTextureSystem,\n GlRenderTargetSystem,\n GlGeometrySystem,\n GlUniformGroupSystem,\n GlShaderSystem,\n GlEncoderSystem,\n GlStateSystem,\n GlStencilSystem,\n GlColorMaskSystem,\n];\nconst DefaultWebGLPipes = [...SharedRenderPipes];\nconst DefaultWebGLAdapters = [GlBatchAdaptor, GlMeshAdaptor, GlGraphicsAdaptor];\n\n// installed systems will bbe added to this array by the extensions manager..\nconst systems: { name: string; value: SystemConstructor }[] = [];\nconst renderPipes: { name: string; value: PipeConstructor }[] = [];\nconst renderPipeAdaptors: { name: string; value: any }[] = [];\n\nextensions.handleByNamedList(ExtensionType.WebGLSystem, systems);\nextensions.handleByNamedList(ExtensionType.WebGLPipes, renderPipes);\nextensions.handleByNamedList(ExtensionType.WebGLPipesAdaptor, renderPipeAdaptors);\n\n// add all the default systems as well as any user defined ones from the extensions\nextensions.add(...DefaultWebGLSystems, ...DefaultWebGLPipes, ...DefaultWebGLAdapters);\n\n/** The default WebGL renderer, uses WebGL2 contexts. */\ntype WebGLSystems = ExtractSystemTypes & PixiMixins.RendererSystems & PixiMixins.WebGLSystems;\n\n/** The default WebGL renderer, uses WebGL2 contexts. */\nexport type WebGLPipes = ExtractSystemTypes & PixiMixins.RendererPipes & PixiMixins.WebGLPipes;\n\n/**\n * Options for WebGLRenderer.\n * @memberof rendering\n */\nexport interface WebGLOptions\n extends\n SharedRendererOptions,\n ExtractRendererOptions,\n PixiMixins.WebGLOptions {}\n\n/**\n * The default WebGL renderer, uses WebGL2 contexts.\n * @memberof rendering\n */\nexport interface WebGLRenderer\n extends AbstractRenderer,\n WebGLSystems {}\n\n/* eslint-disable max-len */\n/**\n * The WebGL PixiJS Renderer. This renderer allows you to use the most common graphics API, WebGL (and WebGL2).\n *\n * ```ts\n * // Create a new renderer\n * const renderer = new WebGLRenderer();\n * await renderer.init();\n *\n * // Add the renderer to the stage\n * document.body.appendChild(renderer.canvas);\n *\n * // Create a new stage\n * const stage = new Container();\n *\n * // Render the stage\n * renderer.render(stage);\n * ```\n *\n * You can use {@link rendering.autoDetectRenderer} to create a renderer that will automatically detect the best\n * renderer for the environment.\n *\n *\n * ```ts\n * // Create a new renderer\n * const renderer = await rendering.autoDetectRenderer({\n * preference:'webgl',\n * });\n * ```\n *\n * The renderer is composed of systems that manage specific tasks. The following systems are added by default\n * whenever you create a WebGL renderer:\n *\n * | WebGL Core Systems | Systems that are specific to the WebGL renderer |\n * | ------------------------------------------- | ----------------------------------------------------------------------------- |\n * | {@link rendering.GlUboSystem} | This manages WebGL2 uniform buffer objects feature for shaders |\n * | {@link rendering.GlBackBufferSystem} | manages the back buffer, used so that we can pixi can pixels from the screen |\n * | {@link rendering.GlContextSystem} | This manages the WebGL context and its extensions |\n * | {@link rendering.GlBufferSystem} | This manages buffers and their GPU resources, keeps everything in sync |\n * | {@link rendering.GlTextureSystem} | This manages textures and their GPU resources, keeps everything in sync |\n * | {@link rendering.GlRenderTargetSystem} | This manages what we render too. For example the screen, or another texture |\n * | {@link rendering.GlGeometrySystem} | This manages geometry, used for drawing meshes via the GPU |\n * | {@link rendering.GlUniformGroupSystem} | This manages uniform groups. Syncing shader properties with the GPU |\n * | {@link rendering.GlShaderSystem} | This manages shaders, programs that run on the GPU to output lovely pixels |\n * | {@link rendering.GlEncoderSystem} | This manages encoders, a WebGPU Paradigm, use it to draw a mesh + shader |\n * | {@link rendering.GlStateSystem} | This manages the state of the WebGL context. eg the various flags that can be set blend modes / depthTesting etc |\n * | {@link rendering.GlStencilSystem} | This manages the stencil buffer. Used primarily for masking |\n * | {@link rendering.GlColorMaskSystem} | This manages the color mask. Used for color masking |\n *\n * The breadth of the API surface provided by the renderer is contained within these systems.\n * @memberof rendering\n * @property {rendering.GlUboSystem} ubo - UboSystem instance.\n * @property {rendering.GlBackBufferSystem} backBuffer - BackBufferSystem instance.\n * @property {rendering.GlContextSystem} context - ContextSystem instance.\n * @property {rendering.GlBufferSystem} buffer - BufferSystem instance.\n * @property {rendering.GlTextureSystem} texture - TextureSystem instance.\n * @property {rendering.GlRenderTargetSystem} renderTarget - RenderTargetSystem instance.\n * @property {rendering.GlGeometrySystem} geometry - GeometrySystem instance.\n * @property {rendering.GlUniformGroupSystem} uniformGroup - UniformGroupSystem instance.\n * @property {rendering.GlShaderSystem} shader - ShaderSystem instance.\n * @property {rendering.GlEncoderSystem} encoder - EncoderSystem instance.\n * @property {rendering.GlStateSystem} state - StateSystem instance.\n * @property {rendering.GlStencilSystem} stencil - StencilSystem instance.\n * @property {rendering.GlColorMaskSystem} colorMask - ColorMaskSystem instance.\n * @extends rendering.AbstractRenderer\n */\n/* eslint-enable max-len */\nexport class WebGLRenderer\n extends AbstractRenderer\n implements WebGLSystems\n{\n public gl: GlRenderingContext;\n\n constructor()\n {\n const systemConfig = {\n name: 'webgl',\n type: RendererType.WEBGL,\n systems,\n renderPipes,\n renderPipeAdaptors,\n };\n\n super(systemConfig);\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { Buffer } from '../shared/buffer/Buffer';\nimport type { BufferResource } from '../shared/buffer/BufferResource';\nimport type { UniformGroup } from '../shared/shader/UniformGroup';\nimport type { System } from '../shared/system/System';\nimport type { TextureSource } from '../shared/texture/sources/TextureSource';\nimport type { TextureStyle } from '../shared/texture/TextureStyle';\nimport type { GPU } from './GpuDeviceSystem';\nimport type { BindGroup } from './shader/BindGroup';\nimport type { BindResource } from './shader/BindResource';\nimport type { GpuProgram } from './shader/GpuProgram';\nimport type { WebGPURenderer } from './WebGPURenderer';\n\n/**\n * This manages the WebGPU bind groups. this is how data is bound to a shader when rendering\n * @memberof rendering\n */\nexport class BindGroupSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGPUSystem,\n ],\n name: 'bindGroup',\n } as const;\n\n private readonly _renderer: WebGPURenderer;\n\n private _hash: Record = Object.create(null);\n private _gpu: GPU;\n\n constructor(renderer: WebGPURenderer)\n {\n this._renderer = renderer;\n }\n\n protected contextChange(gpu: GPU): void\n {\n this._gpu = gpu;\n }\n\n public getBindGroup(bindGroup: BindGroup, program: GpuProgram, groupIndex: number): GPUBindGroup\n {\n bindGroup._updateKey();\n\n const gpuBindGroup = this._hash[bindGroup._key] || this._createBindGroup(bindGroup, program, groupIndex);\n\n return gpuBindGroup;\n }\n\n private _createBindGroup(group: BindGroup, program: GpuProgram, groupIndex: number): GPUBindGroup\n {\n const device = this._gpu.device;\n const groupLayout = program.layout[groupIndex];\n const entries: GPUBindGroupEntry[] = [];\n const renderer = this._renderer;\n\n for (const j in groupLayout)\n {\n const resource: BindResource = group.resources[j] ?? group.resources[groupLayout[j]];\n let gpuResource: GPUSampler | GPUTextureView | GPUExternalTexture | GPUBufferBinding;\n // TODO make this dynamic..\n\n if (resource._resourceType === 'uniformGroup')\n {\n const uniformGroup = resource as UniformGroup;\n\n renderer.ubo.updateUniformGroup(uniformGroup as UniformGroup);\n\n const buffer = uniformGroup.buffer;\n\n gpuResource = {\n buffer: renderer.buffer.getGPUBuffer(buffer),\n offset: 0,\n size: buffer.descriptor.size,\n };\n }\n else if (resource._resourceType === 'buffer')\n {\n const buffer = resource as Buffer;\n\n gpuResource = {\n buffer: renderer.buffer.getGPUBuffer(buffer),\n offset: 0,\n size: buffer.descriptor.size,\n };\n }\n else if (resource._resourceType === 'bufferResource')\n {\n const bufferResource = resource as BufferResource;\n\n gpuResource = {\n buffer: renderer.buffer.getGPUBuffer(bufferResource.buffer),\n offset: bufferResource.offset,\n size: bufferResource.size,\n };\n }\n else if (resource._resourceType === 'textureSampler')\n {\n const sampler = resource as TextureStyle;\n\n gpuResource = renderer.texture.getGpuSampler(sampler);\n }\n else if (resource._resourceType === 'textureSource')\n {\n const texture = resource as TextureSource;\n\n gpuResource = renderer.texture.getGpuSource(texture).createView({\n\n });\n }\n\n entries.push({\n binding: groupLayout[j],\n resource: gpuResource,\n });\n }\n\n const layout = renderer.shader.getProgramData(program).bindGroups[groupIndex];\n\n const gpuBindGroup = device.createBindGroup({\n layout,\n entries,\n });\n\n this._hash[group._key] = gpuBindGroup;\n\n return gpuBindGroup;\n }\n\n public destroy(): void\n {\n for (const key of Object.keys(this._hash))\n {\n this._hash[key] = null;\n }\n\n this._hash = null;\n\n (this._renderer as null) = null;\n }\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { fastCopy } from '../../shared/buffer/utils/fastCopy';\n\nimport type { Buffer } from '../../shared/buffer/Buffer';\nimport type { System } from '../../shared/system/System';\nimport type { GPU } from '../GpuDeviceSystem';\n\n/**\n * System plugin to the renderer to manage buffers.\n * @memberof rendering\n */\nexport class GpuBufferSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGPUSystem,\n ],\n name: 'buffer',\n } as const;\n\n protected CONTEXT_UID: number;\n private _gpuBuffers: { [key: number]: GPUBuffer } = Object.create(null);\n private readonly _managedBuffers: Buffer[] = [];\n\n private _gpu: GPU;\n\n protected contextChange(gpu: GPU): void\n {\n this._gpu = gpu;\n }\n\n public getGPUBuffer(buffer: Buffer): GPUBuffer\n {\n return this._gpuBuffers[buffer.uid] || this.createGPUBuffer(buffer);\n }\n\n public updateBuffer(buffer: Buffer): GPUBuffer\n {\n const gpuBuffer = this._gpuBuffers[buffer.uid] || this.createGPUBuffer(buffer);\n\n const data = buffer.data;\n\n // TODO this can be better...\n if (buffer._updateID && data)\n {\n buffer._updateID = 0;\n\n // make sure\n this._gpu.device.queue.writeBuffer(\n gpuBuffer, 0, data.buffer, 0,\n // round to the nearest 4 bytes\n ((buffer._updateSize || data.byteLength) + 3) & ~3\n );\n }\n\n return gpuBuffer;\n }\n\n /** dispose all WebGL resources of all managed buffers */\n public destroyAll(): void\n {\n for (const id in this._gpuBuffers)\n {\n this._gpuBuffers[id].destroy();\n }\n\n this._gpuBuffers = {};\n }\n\n public createGPUBuffer(buffer: Buffer): GPUBuffer\n {\n if (!this._gpuBuffers[buffer.uid])\n {\n buffer.on('update', this.updateBuffer, this);\n buffer.on('change', this.onBufferChange, this);\n buffer.on('destroy', this.onBufferDestroy, this);\n }\n\n const gpuBuffer = this._gpu.device.createBuffer(buffer.descriptor);\n\n buffer._updateID = 0;\n\n if (buffer.data)\n {\n // TODO if data is static, this can be mapped at creation\n fastCopy(buffer.data.buffer, gpuBuffer.getMappedRange());\n\n gpuBuffer.unmap();\n }\n\n this._gpuBuffers[buffer.uid] = gpuBuffer;\n\n this._managedBuffers.push(buffer);\n\n return gpuBuffer;\n }\n\n protected onBufferChange(buffer: Buffer)\n {\n const gpuBuffer = this._gpuBuffers[buffer.uid];\n\n gpuBuffer.destroy();\n buffer._updateID = 0;\n this._gpuBuffers[buffer.uid] = this.createGPUBuffer(buffer);\n }\n\n /**\n * Disposes buffer\n * @param buffer - buffer with data\n */\n protected onBufferDestroy(buffer: Buffer): void\n {\n this._managedBuffers.splice(this._managedBuffers.indexOf(buffer), 1);\n\n this._destroyBuffer(buffer);\n }\n\n public destroy(): void\n {\n this._managedBuffers.forEach((buffer) => this._destroyBuffer(buffer));\n\n (this._managedBuffers as null) = null;\n\n this._gpuBuffers = null;\n }\n\n private _destroyBuffer(buffer: Buffer): void\n {\n const gpuBuffer = this._gpuBuffers[buffer.uid];\n\n gpuBuffer.destroy();\n\n buffer.off('update', this.updateBuffer, this);\n buffer.off('change', this.onBufferChange, this);\n buffer.off('destroy', this.onBufferDestroy, this);\n\n this._gpuBuffers[buffer.uid] = null;\n }\n}\n\n","import { Buffer } from '../../shared/buffer/Buffer';\nimport { BufferUsage } from '../../shared/buffer/const';\n\nimport type { WebGPURenderer } from '../WebGPURenderer';\n\nexport function GpuReadBuffer(buffer: Buffer, renderer: WebGPURenderer)\n{\n const bufferSize = buffer.descriptor.size;\n\n const device = renderer.gpu.device;\n\n const stagingBuffer = new Buffer({\n data: new Float32Array(2400000),\n usage: BufferUsage.MAP_READ | BufferUsage.COPY_DST,\n });\n\n const stagingGPUBuffer = renderer.buffer.createGPUBuffer(stagingBuffer);\n\n const commandEncoder = device.createCommandEncoder();\n\n commandEncoder.copyBufferToBuffer(\n renderer.buffer.getGPUBuffer(buffer),\n 0, // Source offset\n stagingGPUBuffer,\n 0, // Destination offset\n bufferSize,\n );\n\n device.queue.submit([commandEncoder.finish()]);\n\n void stagingGPUBuffer.mapAsync(\n GPUMapMode.READ,\n 0, // Offset\n bufferSize, // Length\n ).then(() =>\n {\n stagingGPUBuffer.getMappedRange(0, bufferSize);\n stagingGPUBuffer.unmap();\n });\n}\n","import type { Buffer } from '../../shared/buffer/Buffer';\n\nexport class UboBatch\n{\n private _buffer: Buffer;\n public data: Float32Array;\n private readonly _minUniformOffsetAlignment: number = 256;\n\n public byteIndex = 0;\n\n constructor({ minUniformOffsetAlignment }: {minUniformOffsetAlignment: number})\n {\n this._minUniformOffsetAlignment = minUniformOffsetAlignment;\n this.data = new Float32Array(65535);\n }\n\n public clear(): void\n {\n this.byteIndex = 0;\n }\n\n public addEmptyGroup(size: number): number\n {\n // update the buffer.. only float32 for now!\n if (size > this._minUniformOffsetAlignment / 4)\n {\n throw new Error(`UniformBufferBatch: array is too large: ${size * 4}`);\n }\n\n const start = this.byteIndex;\n\n let newSize = start + (size * 4);\n\n newSize = Math.ceil(newSize / this._minUniformOffsetAlignment) * this._minUniformOffsetAlignment;\n\n if (newSize > this.data.length * 4)\n {\n // TODO push a new buffer\n throw new Error('UniformBufferBatch: ubo batch got too big');\n }\n\n this.byteIndex = newSize;\n\n return start;\n }\n\n public addGroup(array: Float32Array): number\n {\n const offset = this.addEmptyGroup(array.length);\n\n for (let i = 0; i < array.length; i++)\n {\n this.data[(offset / 4) + i] = array[i];\n }\n\n return offset;\n }\n\n public destroy()\n {\n this._buffer.destroy();\n this._buffer = null;\n\n this.data = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { System } from '../shared/system/System';\nimport type { WebGPURenderer } from './WebGPURenderer';\n\n/**\n * The system that handles color masking for the GPU.\n * @memberof rendering\n */\nexport class GpuColorMaskSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGPUSystem,\n ],\n name: 'colorMask',\n } as const;\n\n private readonly _renderer: WebGPURenderer;\n\n private _colorMaskCache = 0b1111;\n\n constructor(renderer: WebGPURenderer)\n {\n this._renderer = renderer;\n }\n\n public setMask(colorMask: number)\n {\n if (this._colorMaskCache === colorMask) return;\n this._colorMaskCache = colorMask;\n\n this._renderer.pipeline.setColorMask(colorMask);\n }\n\n public destroy()\n {\n (this._renderer as null) = null;\n this._colorMaskCache = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { System } from '../shared/system/System';\nimport type { GpuPowerPreference } from '../types';\nimport type { WebGPURenderer } from './WebGPURenderer';\n\n/** The GPU object. */\nexport interface GPU\n{\n /** The GPU adapter */\n adapter: GPUAdapter;\n /** The GPU device */\n device: GPUDevice;\n}\n\n/**\n * Options for the WebGPU context.\n * @property {GpuPowerPreference} [powerPreference=default] - An optional hint indicating what configuration of GPU\n * is suitable for the WebGPU context, can be `'high-performance'` or `'low-power'`.\n * Setting to `'high-performance'` will prioritize rendering performance over power consumption,\n * while setting to `'low-power'` will prioritize power saving over rendering performance.\n * @property {boolean} [forceFallbackAdapter=false] - Force the use of the fallback adapter\n * @memberof rendering\n */\nexport interface GpuContextOptions\n{\n /**\n * An optional hint indicating what configuration of GPU is suitable for the WebGPU context,\n * can be `'high-performance'` or `'low-power'`.\n * Setting to `'high-performance'` will prioritize rendering performance over power consumption,\n * while setting to `'low-power'` will prioritize power saving over rendering performance.\n * @default undefined\n * @memberof rendering.WebGPUOptions\n */\n powerPreference?: GpuPowerPreference;\n /**\n * Force the use of the fallback adapter\n * @default false\n * @memberof rendering.WebGPUOptions\n */\n forceFallbackAdapter: boolean;\n}\n\n/**\n * System plugin to the renderer to manage the context.\n * @class\n * @memberof rendering\n */\nexport class GpuDeviceSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGPUSystem,\n ],\n name: 'device',\n } as const;\n\n /** The default options for the GpuDeviceSystem. */\n public static defaultOptions: GpuContextOptions = {\n /**\n * {@link WebGPUOptions.powerPreference}\n * @default default\n */\n powerPreference: undefined,\n /**\n * Force the use of the fallback adapter\n * @default false\n */\n forceFallbackAdapter: false,\n };\n\n /** The GPU device */\n public gpu: GPU;\n\n private _renderer: WebGPURenderer;\n private _initPromise: Promise;\n\n /**\n * @param {WebGPURenderer} renderer - The renderer this System works for.\n */\n constructor(renderer: WebGPURenderer)\n {\n this._renderer = renderer;\n }\n\n public async init(options: GpuContextOptions): Promise\n {\n if (this._initPromise) return this._initPromise;\n\n this._initPromise = this._createDeviceAndAdaptor(options)\n .then((gpu) =>\n {\n this.gpu = gpu;\n\n this._renderer.runners.contextChange.emit(this.gpu);\n });\n\n return this._initPromise;\n }\n\n /**\n * Handle the context change event\n * @param gpu\n */\n protected contextChange(gpu: GPU): void\n {\n this._renderer.gpu = gpu;\n }\n\n /**\n * Helper class to create a WebGL Context\n * @param {object} options - An options object that gets passed in to the canvas element containing the\n * context attributes\n * @see https://developer.mozilla.org/en/docs/Web/API/HTMLCanvasElement/getContext\n * @returns {WebGLRenderingContext} the WebGL context\n */\n private async _createDeviceAndAdaptor(options: GpuContextOptions): Promise\n {\n // TODO we only need one of these..\n const adapter = await navigator.gpu.requestAdapter({\n powerPreference: options.powerPreference,\n forceFallbackAdapter: options.forceFallbackAdapter,\n });\n\n const requiredFeatures = [\n 'texture-compression-bc',\n 'texture-compression-astc',\n 'texture-compression-etc2',\n ].filter((feature) => adapter.features.has(feature)) as GPUFeatureName[];\n\n // TODO and one of these!\n const device = await adapter.requestDevice({\n requiredFeatures\n });\n\n return { adapter, device };\n }\n\n public destroy(): void\n {\n this.gpu = null;\n this._renderer = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { Rectangle } from '../../../maths/shapes/Rectangle';\nimport type { Buffer } from '../shared/buffer/Buffer';\nimport type { Topology } from '../shared/geometry/const';\nimport type { Geometry } from '../shared/geometry/Geometry';\nimport type { Shader } from '../shared/shader/Shader';\nimport type { UniformGroup } from '../shared/shader/UniformGroup';\nimport type { State } from '../shared/state/State';\nimport type { System } from '../shared/system/System';\nimport type { GPU } from './GpuDeviceSystem';\nimport type { GpuRenderTarget } from './renderTarget/GpuRenderTarget';\nimport type { GpuRenderTargetAdaptor } from './renderTarget/GpuRenderTargetAdaptor';\nimport type { BindGroup } from './shader/BindGroup';\nimport type { GpuProgram } from './shader/GpuProgram';\nimport type { WebGPURenderer } from './WebGPURenderer';\n\n/**\n * The system that handles encoding commands for the GPU.\n * @memberof rendering\n */\nexport class GpuEncoderSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [ExtensionType.WebGPUSystem],\n name: 'encoder',\n priority: 1\n } as const;\n\n public commandEncoder: GPUCommandEncoder;\n public renderPassEncoder: GPURenderPassEncoder;\n public commandFinished: Promise;\n\n private _resolveCommandFinished: (value: void) => void;\n\n private _gpu: GPU;\n private _boundBindGroup: Record = Object.create(null);\n private _boundVertexBuffer: Record = Object.create(null);\n private _boundIndexBuffer: Buffer;\n private _boundPipeline: GPURenderPipeline;\n\n private readonly _renderer: WebGPURenderer;\n\n constructor(renderer: WebGPURenderer)\n {\n this._renderer = renderer;\n }\n\n public renderStart(): void\n {\n this.commandFinished = new Promise((resolve) =>\n {\n this._resolveCommandFinished = resolve;\n });\n\n // generate a render pass description..\n // create an encoder..\n this.commandEncoder = this._renderer.gpu.device.createCommandEncoder();\n }\n\n public beginRenderPass(gpuRenderTarget: GpuRenderTarget)\n {\n this.endRenderPass();\n\n this._clearCache();\n\n this.renderPassEncoder = this.commandEncoder.beginRenderPass(gpuRenderTarget.descriptor);\n }\n\n public endRenderPass()\n {\n if (this.renderPassEncoder)\n {\n this.renderPassEncoder.end();\n }\n\n this.renderPassEncoder = null;\n }\n\n public setViewport(viewport: Rectangle): void\n {\n this.renderPassEncoder.setViewport(viewport.x, viewport.y, viewport.width, viewport.height, 0, 1);\n }\n\n public setPipelineFromGeometryProgramAndState(\n geometry: Geometry,\n program: GpuProgram,\n state: any,\n topology?: Topology,\n ): void\n {\n const pipeline = this._renderer.pipeline.getPipeline(geometry, program, state, topology);\n\n this.setPipeline(pipeline);\n }\n\n public setPipeline(pipeline: GPURenderPipeline)\n {\n if (this._boundPipeline === pipeline) return;\n this._boundPipeline = pipeline;\n\n this.renderPassEncoder.setPipeline(pipeline);\n }\n\n private _setVertexBuffer(index: number, buffer: Buffer)\n {\n if (this._boundVertexBuffer[index] === buffer) return;\n\n this._boundVertexBuffer[index] = buffer;\n\n this.renderPassEncoder.setVertexBuffer(index, this._renderer.buffer.updateBuffer(buffer));\n }\n\n private _setIndexBuffer(buffer: Buffer)\n {\n if (this._boundIndexBuffer === buffer) return;\n\n this._boundIndexBuffer = buffer;\n\n const indexFormat = buffer.data.BYTES_PER_ELEMENT === 2 ? 'uint16' : 'uint32';\n\n this.renderPassEncoder.setIndexBuffer(this._renderer.buffer.updateBuffer(buffer), indexFormat);\n }\n\n public resetBindGroup(index: number)\n {\n this._boundBindGroup[index] = null;\n }\n\n public setBindGroup(index: number, bindGroup: BindGroup, program: GpuProgram)\n {\n if (this._boundBindGroup[index] === bindGroup) return;\n this._boundBindGroup[index] = bindGroup;\n\n bindGroup._touch(this._renderer.textureGC.count);\n\n // TODO getting the bind group works as it looks at th e assets and generates a key\n // should this just be hidden behind a dirty flag?\n const gpuBindGroup = this._renderer.bindGroup.getBindGroup(bindGroup, program, index);\n\n // mark each item as having been used..\n this.renderPassEncoder.setBindGroup(index, gpuBindGroup);\n }\n\n public setGeometry(geometry: Geometry)\n {\n for (const i in geometry.attributes)\n {\n const attribute = geometry.attributes[i];\n\n this._setVertexBuffer(attribute.location, attribute.buffer);\n }\n\n if (geometry.indexBuffer)\n {\n this._setIndexBuffer(geometry.indexBuffer);\n }\n }\n\n private _setShaderBindGroups(shader: Shader, skipSync?: boolean)\n {\n for (const i in shader.groups)\n {\n const bindGroup = shader.groups[i] as BindGroup;\n\n // update any uniforms?\n if (!skipSync)\n {\n this._syncBindGroup(bindGroup);\n }\n\n this.setBindGroup(i as unknown as number, bindGroup, shader.gpuProgram);\n }\n }\n\n private _syncBindGroup(bindGroup: BindGroup)\n {\n for (const j in bindGroup.resources)\n {\n const resource = bindGroup.resources[j];\n\n if ((resource as UniformGroup).isUniformGroup)\n {\n this._renderer.ubo.updateUniformGroup(resource as UniformGroup);\n }\n }\n }\n\n public draw(options: {\n geometry: Geometry;\n shader: Shader;\n state?: State;\n topology?: Topology;\n size?: number;\n start?: number;\n instanceCount?: number;\n skipSync?: boolean;\n })\n {\n const { geometry, shader, state, topology, size, start, instanceCount, skipSync } = options;\n\n this.setPipelineFromGeometryProgramAndState(geometry, shader.gpuProgram, state, topology);\n this.setGeometry(geometry);\n this._setShaderBindGroups(shader, skipSync);\n\n if (geometry.indexBuffer)\n {\n this.renderPassEncoder.drawIndexed(\n size || geometry.indexBuffer.data.length,\n instanceCount || geometry.instanceCount,\n start || 0\n );\n }\n else\n {\n this.renderPassEncoder.draw(size || geometry.getSize(), instanceCount || geometry.instanceCount, start || 0);\n }\n }\n\n public finishRenderPass()\n {\n if (this.renderPassEncoder)\n {\n this.renderPassEncoder.end();\n this.renderPassEncoder = null;\n }\n }\n\n public postrender()\n {\n this.finishRenderPass();\n\n this._gpu.device.queue.submit([this.commandEncoder.finish()]);\n\n this._resolveCommandFinished();\n\n this.commandEncoder = null;\n }\n\n // restores a render pass if finishRenderPass was called\n // not optimised as really used for debugging!\n // used when we want to stop drawing and log a texture..\n public restoreRenderPass()\n {\n const descriptor = (this._renderer.renderTarget.adaptor as GpuRenderTargetAdaptor).getDescriptor(\n this._renderer.renderTarget.renderTarget,\n false,\n [0, 0, 0, 1],\n );\n\n this.renderPassEncoder = this.commandEncoder.beginRenderPass(descriptor);\n\n const boundPipeline = this._boundPipeline;\n const boundVertexBuffer = { ...this._boundVertexBuffer };\n const boundIndexBuffer = this._boundIndexBuffer;\n const boundBindGroup = { ...this._boundBindGroup };\n\n this._clearCache();\n\n const viewport = this._renderer.renderTarget.viewport;\n\n this.renderPassEncoder.setViewport(viewport.x, viewport.y, viewport.width, viewport.height, 0, 1);\n\n // reinstate the cache...\n\n this.setPipeline(boundPipeline);\n\n for (const i in boundVertexBuffer)\n {\n this._setVertexBuffer(i as unknown as number, boundVertexBuffer[i]);\n }\n\n for (const i in boundBindGroup)\n {\n this.setBindGroup(i as unknown as number, boundBindGroup[i], null);\n }\n\n this._setIndexBuffer(boundIndexBuffer);\n }\n\n private _clearCache()\n {\n for (let i = 0; i < 16; i++)\n {\n this._boundBindGroup[i] = null;\n this._boundVertexBuffer[i] = null;\n }\n\n this._boundIndexBuffer = null;\n this._boundPipeline = null;\n }\n\n public destroy()\n {\n (this._renderer as null) = null;\n this._gpu = null;\n this._boundBindGroup = null;\n this._boundVertexBuffer = null;\n this._boundIndexBuffer = null;\n this._boundPipeline = null;\n }\n\n protected contextChange(gpu: GPU): void\n {\n this._gpu = gpu;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { STENCIL_MODES } from '../shared/state/const';\n\nimport type { RenderTarget } from '../shared/renderTarget/RenderTarget';\nimport type { System } from '../shared/system/System';\nimport type { WebGPURenderer } from './WebGPURenderer';\n\n/**\n * This manages the stencil buffer. Used primarily for masking\n * @memberof rendering\n */\nexport class GpuStencilSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGPUSystem,\n ],\n name: 'stencil',\n } as const;\n\n private readonly _renderer: WebGPURenderer;\n\n private _renderTargetStencilState: Record = Object.create(null);\n\n private _activeRenderTarget: RenderTarget;\n\n constructor(renderer: WebGPURenderer)\n {\n this._renderer = renderer;\n\n renderer.renderTarget.onRenderTargetChange.add(this);\n }\n\n protected onRenderTargetChange(renderTarget: RenderTarget)\n {\n let stencilState = this._renderTargetStencilState[renderTarget.uid];\n\n if (!stencilState)\n {\n stencilState = this._renderTargetStencilState[renderTarget.uid] = {\n stencilMode: STENCIL_MODES.DISABLED,\n stencilReference: 0,\n };\n }\n\n this._activeRenderTarget = renderTarget;\n\n this.setStencilMode(stencilState.stencilMode, stencilState.stencilReference);\n }\n\n public setStencilMode(stencilMode: STENCIL_MODES, stencilReference: number)\n {\n const stencilState = this._renderTargetStencilState[this._activeRenderTarget.uid];\n\n stencilState.stencilMode = stencilMode;\n stencilState.stencilReference = stencilReference;\n\n const renderer = this._renderer;\n\n renderer.pipeline.setStencilMode(stencilMode);\n renderer.encoder.renderPassEncoder.setStencilReference(stencilReference);\n }\n\n public destroy()\n {\n this._renderer.renderTarget.onRenderTargetChange.remove(this);\n\n (this._renderer as null) = null;\n\n this._activeRenderTarget = null;\n this._renderTargetStencilState = null;\n }\n}\n","import type { UboElement, UboLayout, UNIFORM_TYPES, UniformData } from '../../../shared/shader/types';\n\nexport const WGSL_ALIGN_SIZE_DATA: Record = {\n i32: { align: 4, size: 4 },\n u32: { align: 4, size: 4 },\n f32: { align: 4, size: 4 },\n f16: { align: 2, size: 2 },\n 'vec2': { align: 8, size: 8 },\n 'vec2': { align: 8, size: 8 },\n 'vec2': { align: 8, size: 8 },\n 'vec2': { align: 4, size: 4 },\n 'vec3': { align: 16, size: 12 },\n 'vec3': { align: 16, size: 12 },\n 'vec3': { align: 16, size: 12 },\n 'vec3': { align: 8, size: 6 },\n 'vec4': { align: 16, size: 16 },\n 'vec4': { align: 16, size: 16 },\n 'vec4': { align: 16, size: 16 },\n 'vec4': { align: 8, size: 8 },\n 'mat2x2': { align: 8, size: 16 },\n 'mat2x2': { align: 4, size: 8 },\n 'mat3x2': { align: 8, size: 24 },\n 'mat3x2': { align: 4, size: 12 },\n 'mat4x2': { align: 8, size: 32 },\n 'mat4x2': { align: 4, size: 16 },\n 'mat2x3': { align: 16, size: 32 },\n 'mat2x3': { align: 8, size: 16 },\n 'mat3x3': { align: 16, size: 48 },\n 'mat3x3': { align: 8, size: 24 },\n 'mat4x3': { align: 16, size: 64 },\n 'mat4x3': { align: 8, size: 32 },\n 'mat2x4': { align: 16, size: 32 },\n 'mat2x4': { align: 8, size: 16 },\n 'mat3x4': { align: 16, size: 48 },\n 'mat3x4': { align: 8, size: 24 },\n 'mat4x4': { align: 16, size: 64 },\n 'mat4x4': { align: 8, size: 32 },\n};\n\nexport function createUboElementsWGSL(uniformData: UniformData[]): UboLayout\n{\n const uboElements: UboElement[] = uniformData.map((data: UniformData) =>\n ({\n data,\n offset: 0,\n size: 0,\n }));\n\n let offset = 0;\n\n for (let i = 0; i < uboElements.length; i++)\n {\n const uboElement = uboElements[i];\n\n let size = WGSL_ALIGN_SIZE_DATA[uboElement.data.type].size;\n const align = WGSL_ALIGN_SIZE_DATA[uboElement.data.type].align;\n\n if (!WGSL_ALIGN_SIZE_DATA[uboElement.data.type])\n {\n throw new Error(`[Pixi.js] WebGPU UniformBuffer: Unknown type ${uboElement.data.type}`);\n }\n\n if (uboElement.data.size > 1)\n {\n size = Math.max(size, align) * uboElement.data.size;\n }\n\n offset = Math.ceil((offset) / align) * align;\n\n // TODO deal with Arrays\n uboElement.size = size;\n\n uboElement.offset = offset;\n\n offset += size;\n }\n\n // must align to 16 bits!\n offset = Math.ceil(offset / 16) * 16;\n\n return { uboElements, size: offset };\n}\n\n","import { WGSL_ALIGN_SIZE_DATA } from './createUboElementsWGSL';\n\nimport type { UboElement } from '../../../shared/shader/types';\n\n/**\n * This generates a function that will sync an array to the uniform buffer\n * following the wgsl layout\n * @param uboElement - the element to generate the array sync for\n * @param offsetToAdd - the offset to append at the start of the code\n * @returns - the generated code\n */\nexport function generateArraySyncWGSL(uboElement: UboElement, offsetToAdd: number): string\n{\n // this is in byte..\n const { size, align } = WGSL_ALIGN_SIZE_DATA[uboElement.data.type];\n\n const remainder = (align - size) / 4;\n\n return `\n v = uv.${uboElement.data.name};\n ${offsetToAdd !== 0 ? `offset += ${offsetToAdd};` : ''}\n\n arrayOffset = offset;\n\n t = 0;\n\n for(var i=0; i < ${uboElement.data.size * (size / 4)}; i++)\n {\n for(var j = 0; j < ${size / 4}; j++)\n {\n data[arrayOffset++] = v[t++];\n }\n ${remainder !== 0 ? `arrayOffset += ${remainder};` : ''}\n }\n `;\n}\n","/* eslint-disable quote-props */\nimport { createUboSyncFunction } from '../../../shared/shader/utils/createUboSyncFunction';\nimport { uboSyncFunctionsWGSL } from '../../../shared/shader/utils/uboSyncFunctions';\nimport { generateArraySyncWGSL } from './generateArraySyncWGSL';\n\nimport type { UboElement, UniformsSyncCallback } from '../../../shared/shader/types';\n\nexport function createUboSyncFunctionWGSL(\n uboElements: UboElement[],\n): UniformsSyncCallback\n{\n return createUboSyncFunction(\n uboElements,\n 'uboWgsl',\n generateArraySyncWGSL,\n uboSyncFunctionsWGSL,\n );\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { UboSystem } from '../shared/shader/UboSystem';\nimport { createUboElementsWGSL } from './shader/utils/createUboElementsWGSL';\nimport { createUboSyncFunctionWGSL } from './shader/utils/createUboSyncFunctionWGSL';\n\n/**\n * System plugin to the renderer to manage uniform buffers. With a WGSL twist!\n * @memberof rendering\n */\nexport class GpuUboSystem extends UboSystem\n{\n /** @ignore */\n public static extension = {\n type: [ExtensionType.WebGPUSystem],\n name: 'ubo',\n } as const;\n\n constructor()\n {\n super({\n createUboElements: createUboElementsWGSL,\n generateUboSync: createUboSyncFunctionWGSL,\n });\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { Buffer } from '../shared/buffer/Buffer';\nimport { BufferResource } from '../shared/buffer/BufferResource';\nimport { BufferUsage } from '../shared/buffer/const';\nimport { UboBatch } from './buffer/UboBatch';\nimport { BindGroup } from './shader/BindGroup';\n\nimport type { UniformGroup } from '../shared/shader/UniformGroup';\nimport type { WebGPURenderer } from './WebGPURenderer';\n\nconst minUniformOffsetAlignment = 128;// 256 / 2;\n\n// TODO renderStart and renderFinish - perhaps just make them instructions to fit the architecture of the\n// rest of the system\nexport class GpuUniformBatchPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGPUPipes,\n ],\n name: 'uniformBatch',\n } as const;\n\n private _renderer: WebGPURenderer;\n\n private _bindGroupHash: Record = Object.create(null);\n private readonly _batchBuffer: UboBatch;\n\n // number of buffers..\n private _buffers: Buffer[] = [];\n\n private _bindGroups: BindGroup[] = [];\n private _bufferResources: BufferResource[] = [];\n\n constructor(renderer: WebGPURenderer)\n {\n this._renderer = renderer;\n\n this._batchBuffer = new UboBatch({ minUniformOffsetAlignment });\n\n const totalBuffers = (256 / minUniformOffsetAlignment);\n\n for (let i = 0; i < totalBuffers; i++)\n {\n let usage = BufferUsage.UNIFORM | BufferUsage.COPY_DST;\n\n if (i === 0) usage |= BufferUsage.COPY_SRC;\n\n this._buffers.push(new Buffer({\n data: this._batchBuffer.data,\n usage\n }));\n }\n }\n\n public renderEnd()\n {\n this._uploadBindGroups();\n this._resetBindGroups();\n }\n\n private _resetBindGroups()\n {\n for (const i in this._bindGroupHash)\n {\n this._bindGroupHash[i] = null;\n }\n\n this._batchBuffer.clear();\n }\n\n // just works for single bind groups for now\n public getUniformBindGroup(group: UniformGroup, duplicate: boolean): BindGroup\n {\n if (!duplicate && this._bindGroupHash[group.uid])\n {\n return this._bindGroupHash[group.uid];\n }\n\n this._renderer.ubo.ensureUniformGroup(group);\n\n const data = group.buffer.data as Float32Array;\n\n const offset = this._batchBuffer.addEmptyGroup(data.length);\n\n this._renderer.ubo.syncUniformGroup(group, this._batchBuffer.data, offset / 4);\n\n this._bindGroupHash[group.uid] = this._getBindGroup(offset / minUniformOffsetAlignment);\n\n return this._bindGroupHash[group.uid];\n }\n\n public getUboResource(group: UniformGroup): BufferResource\n {\n this._renderer.ubo.updateUniformGroup(group);\n\n const data = group.buffer.data as Float32Array;\n\n const offset = this._batchBuffer.addGroup(data);\n\n return this._getBufferResource(offset / minUniformOffsetAlignment);\n }\n\n public getArrayBindGroup(data: Float32Array): BindGroup\n {\n const offset = this._batchBuffer.addGroup(data);\n\n return this._getBindGroup(offset / minUniformOffsetAlignment);\n }\n\n public getArrayBufferResource(data: Float32Array): BufferResource\n {\n const offset = this._batchBuffer.addGroup(data);\n\n const index = offset / minUniformOffsetAlignment;\n\n return this._getBufferResource(index);\n }\n\n private _getBufferResource(index: number): BufferResource\n {\n if (!this._bufferResources[index])\n {\n const buffer = this._buffers[index % 2];\n\n this._bufferResources[index] = new BufferResource({\n buffer,\n offset: ((index / 2) | 0) * 256,\n size: minUniformOffsetAlignment\n });\n }\n\n return this._bufferResources[index];\n }\n\n private _getBindGroup(index: number): BindGroup\n {\n if (!this._bindGroups[index])\n {\n // even!\n const bindGroup = new BindGroup({\n 0: this._getBufferResource(index),\n });\n\n this._bindGroups[index] = bindGroup;\n }\n\n return this._bindGroups[index];\n }\n\n private _uploadBindGroups()\n {\n const bufferSystem = this._renderer.buffer;\n\n const firstBuffer = this._buffers[0];\n\n firstBuffer.update(this._batchBuffer.byteIndex);\n\n bufferSystem.updateBuffer(firstBuffer);\n\n const commandEncoder = this._renderer.gpu.device.createCommandEncoder();\n\n for (let i = 1; i < this._buffers.length; i++)\n {\n const buffer = this._buffers[i];\n\n commandEncoder.copyBufferToBuffer(\n bufferSystem.getGPUBuffer(firstBuffer),\n minUniformOffsetAlignment,\n bufferSystem.getGPUBuffer(buffer),\n 0,\n this._batchBuffer.byteIndex\n );\n }\n\n // TODO make a system that will que up all commands in to one array?\n this._renderer.gpu.device.queue.submit([commandEncoder.finish()]);\n }\n\n public destroy()\n {\n for (let i = 0; i < this._bindGroups.length; i++)\n {\n this._bindGroups[i].destroy();\n }\n\n this._bindGroups = null;\n this._bindGroupHash = null;\n\n for (let i = 0; i < this._buffers.length; i++)\n {\n this._buffers[i].destroy();\n }\n this._buffers = null;\n\n for (let i = 0; i < this._bufferResources.length; i++)\n {\n this._bufferResources[i].destroy();\n }\n\n this._bufferResources = null;\n\n this._batchBuffer.destroy();\n this._bindGroupHash = null;\n\n this._renderer = null;\n }\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { warn } from '../../../../utils/logging/warn';\nimport { ensureAttributes } from '../../gl/shader/program/ensureAttributes';\nimport { STENCIL_MODES } from '../../shared/state/const';\nimport { createIdFromString } from '../../shared/utils/createIdFromString';\nimport { GpuStencilModesToPixi } from '../state/GpuStencilModesToPixi';\n\nimport type { Topology } from '../../shared/geometry/const';\nimport type { Geometry } from '../../shared/geometry/Geometry';\nimport type { State } from '../../shared/state/State';\nimport type { System } from '../../shared/system/System';\nimport type { GPU } from '../GpuDeviceSystem';\nimport type { GpuRenderTarget } from '../renderTarget/GpuRenderTarget';\nimport type { GpuProgram } from '../shader/GpuProgram';\nimport type { StencilState } from '../state/GpuStencilModesToPixi';\nimport type { WebGPURenderer } from '../WebGPURenderer';\n\nconst topologyStringToId = {\n 'point-list': 0,\n 'line-list': 1,\n 'line-strip': 2,\n 'triangle-list': 3,\n 'triangle-strip': 4,\n};\n\n// geometryLayouts = 256; // 8 bits // 256 states // value 0-255;\n// shaderKeys = 256; // 8 bits // 256 states // value 0-255;\n// state = 64; // 6 bits // 64 states // value 0-63;\n// blendMode = 32; // 5 bits // 32 states // value 0-31;\n// topology = 8; // 3 bits // 8 states // value 0-7;\nfunction getGraphicsStateKey(\n geometryLayout: number,\n shaderKey: number,\n state: number,\n blendMode: number,\n topology: number,\n): number\n{\n return (geometryLayout << 24) // Allocate the 8 bits for geometryLayouts at the top\n | (shaderKey << 16) // Next 8 bits for shaderKeys\n | (state << 10) // 6 bits for state\n | (blendMode << 5) // 5 bits for blendMode\n | topology; // And 3 bits for topology at the least significant position\n}\n\n// colorMask = 16;// 4 bits // 16 states // value 0-15;\n// stencilState = 8; // 3 bits // 8 states // value 0-7;\n// renderTarget = 1; // 2 bit // 3 states // value 0-3; // none, stencil, depth, depth-stencil\n// multiSampleCount = 1; // 1 bit // 2 states // value 0-1;\nfunction getGlobalStateKey(\n stencilStateId: number,\n multiSampleCount: number,\n colorMask: number,\n renderTarget: number,\n): number\n{\n return (colorMask << 6) // Allocate the 4 bits for colorMask at the top\n | (stencilStateId << 3) // Next 3 bits for stencilStateId\n | (renderTarget << 1) // 2 bits for renderTarget\n | multiSampleCount; // And 1 bit for multiSampleCount at the least significant position\n}\n\ntype PipeHash = Record;\n\n/**\n * A system that creates and manages the GPU pipelines.\n *\n * Caching Mechanism: At its core, the system employs a two-tiered caching strategy to minimize\n * the redundant creation of GPU pipelines (or \"pipes\"). This strategy is based on generating unique\n * keys that represent the state of the graphics settings and the specific requirements of the\n * item being rendered. By caching these pipelines, subsequent draw calls with identical configurations\n * can reuse existing pipelines instead of generating new ones.\n *\n * State Management: The system differentiates between \"global\" state properties (like color masks\n * and stencil masks, which do not change frequently) and properties that may vary between draw calls\n * (such as geometry, shaders, and blend modes). Unique keys are generated for both these categories\n * using getStateKey for global state and getGraphicsStateKey for draw-specific settings. These keys are\n * then then used to caching the pipe. The next time we need a pipe we can check\n * the cache by first looking at the state cache and then the pipe cache.\n * @memberof rendering\n */\nexport class PipelineSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [ExtensionType.WebGPUSystem],\n name: 'pipeline',\n } as const;\n private readonly _renderer: WebGPURenderer;\n\n protected CONTEXT_UID: number;\n\n private _moduleCache: Record = Object.create(null);\n private _bufferLayoutsCache: Record = Object.create(null);\n\n private _pipeCache: PipeHash = Object.create(null);\n private readonly _pipeStateCaches: Record = Object.create(null);\n\n private _gpu: GPU;\n private _stencilState: StencilState;\n\n private _stencilMode: STENCIL_MODES;\n private _colorMask = 0b1111;\n private _multisampleCount = 1;\n private _depthStencilAttachment: 0 | 1;\n\n constructor(renderer: WebGPURenderer)\n {\n this._renderer = renderer;\n }\n\n protected contextChange(gpu: GPU): void\n {\n this._gpu = gpu;\n this.setStencilMode(STENCIL_MODES.DISABLED);\n\n this._updatePipeHash();\n }\n\n public setMultisampleCount(multisampleCount: number): void\n {\n if (this._multisampleCount === multisampleCount) return;\n\n this._multisampleCount = multisampleCount;\n\n this._updatePipeHash();\n }\n\n public setRenderTarget(renderTarget: GpuRenderTarget)\n {\n this._multisampleCount = renderTarget.msaaSamples;\n this._depthStencilAttachment = renderTarget.descriptor.depthStencilAttachment ? 1 : 0;\n\n this._updatePipeHash();\n }\n\n public setColorMask(colorMask: number): void\n {\n if (this._colorMask === colorMask) return;\n\n this._colorMask = colorMask;\n\n this._updatePipeHash();\n }\n\n public setStencilMode(stencilMode: STENCIL_MODES): void\n {\n if (this._stencilMode === stencilMode) return;\n\n this._stencilMode = stencilMode;\n this._stencilState = GpuStencilModesToPixi[stencilMode];\n\n this._updatePipeHash();\n }\n\n public setPipeline(geometry: Geometry, program: GpuProgram, state: State, passEncoder: GPURenderPassEncoder): void\n {\n const pipeline = this.getPipeline(geometry, program, state);\n\n passEncoder.setPipeline(pipeline);\n }\n\n public getPipeline(\n geometry: Geometry,\n program: GpuProgram,\n state: State,\n topology?: Topology,\n ): GPURenderPipeline\n {\n if (!geometry._layoutKey)\n {\n ensureAttributes(geometry, program.attributeData);\n\n // prepare the geometry for the pipeline\n this._generateBufferKey(geometry);\n }\n\n topology = topology || geometry.topology;\n\n // now we have set the Ids - the key is different...\n // eslint-disable-next-line max-len\n const key = getGraphicsStateKey(\n geometry._layoutKey,\n program._layoutKey,\n state.data,\n state._blendModeId,\n topologyStringToId[topology],\n );\n\n if (this._pipeCache[key]) return this._pipeCache[key];\n\n this._pipeCache[key] = this._createPipeline(geometry, program, state, topology);\n\n return this._pipeCache[key];\n }\n\n private _createPipeline(geometry: Geometry, program: GpuProgram, state: State, topology: Topology): GPURenderPipeline\n {\n const device = this._gpu.device;\n\n const buffers = this._createVertexBufferLayouts(geometry);\n\n const blendModes = this._renderer.state.getColorTargets(state);\n\n blendModes[0].writeMask = this._stencilMode === STENCIL_MODES.RENDERING_MASK_ADD ? 0 : this._colorMask;\n\n const layout = this._renderer.shader.getProgramData(program).pipeline;\n\n const descriptor: GPURenderPipelineDescriptor = {\n // TODO later check if its helpful to create..\n // layout,\n vertex: {\n module: this._getModule(program.vertex.source),\n entryPoint: program.vertex.entryPoint,\n // geometry..\n buffers,\n },\n fragment: {\n module: this._getModule(program.fragment.source),\n entryPoint: program.fragment.entryPoint,\n targets: blendModes,\n },\n primitive: {\n topology,\n cullMode: state.cullMode,\n },\n layout,\n multisample: {\n count: this._multisampleCount,\n },\n // depthStencil,\n label: `PIXI Pipeline`,\n };\n\n // only apply if the texture has stencil or depth\n if (this._depthStencilAttachment)\n {\n // mask states..\n descriptor.depthStencil = {\n ...this._stencilState,\n format: 'depth24plus-stencil8',\n depthWriteEnabled: state.depthTest,\n depthCompare: state.depthTest ? 'less' : 'always',\n };\n }\n\n const pipeline = device.createRenderPipeline(descriptor);\n\n return pipeline;\n }\n\n private _getModule(code: string): GPUShaderModule\n {\n return this._moduleCache[code] || this._createModule(code);\n }\n\n private _createModule(code: string): GPUShaderModule\n {\n const device = this._gpu.device;\n\n this._moduleCache[code] = device.createShaderModule({\n code,\n });\n\n return this._moduleCache[code];\n }\n\n private _generateBufferKey(geometry: Geometry): number\n {\n const keyGen = [];\n let index = 0;\n // generate a key..\n\n const attributeKeys = Object.keys(geometry.attributes).sort();\n\n for (let i = 0; i < attributeKeys.length; i++)\n {\n const attribute = geometry.attributes[attributeKeys[i]];\n\n keyGen[index++] = attribute.location;\n keyGen[index++] = attribute.offset;\n keyGen[index++] = attribute.format;\n keyGen[index++] = attribute.stride;\n }\n\n const stringKey = keyGen.join('');\n\n geometry._layoutKey = createIdFromString(stringKey, 'geometry');\n\n return geometry._layoutKey;\n }\n\n private _createVertexBufferLayouts(geometry: Geometry): GPUVertexBufferLayout[]\n {\n if (this._bufferLayoutsCache[geometry._layoutKey])\n {\n return this._bufferLayoutsCache[geometry._layoutKey];\n }\n\n const vertexBuffersLayout: GPUVertexBufferLayout[] = [];\n\n geometry.buffers.forEach((buffer) =>\n {\n const bufferEntry: GPUVertexBufferLayout = {\n arrayStride: 0,\n stepMode: 'vertex',\n attributes: [],\n };\n\n const bufferEntryAttributes = bufferEntry.attributes as GPUVertexAttribute[];\n\n for (const i in geometry.attributes)\n {\n const attribute = geometry.attributes[i];\n\n if ((attribute.divisor ?? 1) !== 1)\n {\n // TODO: Maybe emulate divisor with storage_buffers/float_textures?\n // For now just issue a warning\n warn(`Attribute ${i} has an invalid divisor value of '${attribute.divisor}'. `\n + 'WebGPU only supports a divisor value of 1');\n }\n\n if (attribute.buffer === buffer)\n {\n bufferEntry.arrayStride = attribute.stride;\n bufferEntry.stepMode = attribute.instance ? 'instance' : 'vertex';\n\n bufferEntryAttributes.push({\n shaderLocation: attribute.location,\n offset: attribute.offset,\n format: attribute.format,\n });\n }\n }\n\n if (bufferEntryAttributes.length)\n {\n vertexBuffersLayout.push(bufferEntry);\n }\n });\n\n this._bufferLayoutsCache[geometry._layoutKey] = vertexBuffersLayout;\n\n return vertexBuffersLayout;\n }\n\n private _updatePipeHash(): void\n {\n const key = getGlobalStateKey(\n this._stencilMode,\n this._multisampleCount,\n this._colorMask,\n this._depthStencilAttachment\n );\n\n if (!this._pipeStateCaches[key])\n {\n this._pipeStateCaches[key] = Object.create(null);\n }\n\n this._pipeCache = this._pipeStateCaches[key];\n }\n\n public destroy(): void\n {\n (this._renderer as null) = null;\n this._bufferLayoutsCache = null;\n }\n}\n","import type { TextureSource } from '../../shared/texture/sources/TextureSource';\n\n/**\n * A class which holds the canvas contexts and textures for a render target.\n * @memberof rendering\n * @ignore\n */\nexport class GpuRenderTarget\n{\n public contexts: GPUCanvasContext[] = [];\n public msaaTextures: TextureSource[] = [];\n public msaa: boolean;\n public msaaSamples = 1;\n public width: number;\n public height: number;\n public descriptor: GPURenderPassDescriptor;\n}\n","import { CLEAR } from '../../gl/const';\nimport { CanvasSource } from '../../shared/texture/sources/CanvasSource';\nimport { TextureSource } from '../../shared/texture/sources/TextureSource';\nimport { GpuRenderTarget } from './GpuRenderTarget';\n\nimport type { RgbaArray } from '../../../../color/Color';\nimport type { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport type { CLEAR_OR_BOOL } from '../../gl/const';\nimport type { RenderTarget } from '../../shared/renderTarget/RenderTarget';\nimport type { RenderTargetAdaptor, RenderTargetSystem } from '../../shared/renderTarget/RenderTargetSystem';\nimport type { Texture } from '../../shared/texture/Texture';\nimport type { WebGPURenderer } from '../WebGPURenderer';\n\n/**\n * The WebGPU adaptor for the render target system. Allows the Render Target System to\n * be used with the WebGPU renderer\n * @memberof rendering\n * @ignore\n */\nexport class GpuRenderTargetAdaptor implements RenderTargetAdaptor\n{\n private _renderTargetSystem: RenderTargetSystem;\n private _renderer: WebGPURenderer;\n\n public init(renderer: WebGPURenderer, renderTargetSystem: RenderTargetSystem): void\n {\n this._renderer = renderer;\n this._renderTargetSystem = renderTargetSystem;\n }\n\n public copyToTexture(\n sourceRenderSurfaceTexture: RenderTarget,\n destinationTexture: Texture,\n originSrc: { x: number; y: number; },\n size: { width: number; height: number; },\n originDest: { x: number; y: number; },\n )\n {\n const renderer = this._renderer;\n\n const baseGpuTexture = this._getGpuColorTexture(\n sourceRenderSurfaceTexture\n );\n\n const backGpuTexture = renderer.texture.getGpuSource(\n destinationTexture.source\n );\n\n renderer.encoder.commandEncoder.copyTextureToTexture(\n {\n texture: baseGpuTexture,\n origin: originSrc,\n },\n {\n texture: backGpuTexture,\n origin: originDest,\n },\n size\n );\n\n return destinationTexture;\n }\n\n public startRenderPass(\n renderTarget: RenderTarget,\n clear: CLEAR_OR_BOOL = true,\n clearColor?: RgbaArray,\n viewport?: Rectangle\n )\n {\n const renderTargetSystem = this._renderTargetSystem;\n\n const gpuRenderTarget = renderTargetSystem.getGpuRenderTarget(renderTarget);\n\n const descriptor = this.getDescriptor(renderTarget, clear, clearColor);\n\n gpuRenderTarget.descriptor = descriptor;\n\n // TODO we should not finish a render pass each time we bind\n // for example filters - we would want to push / pop render targets\n this._renderer.pipeline.setRenderTarget(gpuRenderTarget);\n this._renderer.encoder.beginRenderPass(gpuRenderTarget);\n this._renderer.encoder.setViewport(viewport);\n }\n\n public finishRenderPass()\n {\n this._renderer.encoder.endRenderPass();\n }\n\n /**\n * returns the gpu texture for the first color texture in the render target\n * mainly used by the filter manager to get copy the texture for blending\n * @param renderTarget\n * @returns a gpu texture\n */\n private _getGpuColorTexture(renderTarget: RenderTarget): GPUTexture\n {\n const gpuRenderTarget = this._renderTargetSystem.getGpuRenderTarget(renderTarget);\n\n if (gpuRenderTarget.contexts[0])\n {\n return gpuRenderTarget.contexts[0].getCurrentTexture();\n }\n\n return this._renderer.texture.getGpuSource(\n renderTarget.colorTextures[0].source\n );\n }\n\n public getDescriptor(\n renderTarget: RenderTarget,\n clear: CLEAR_OR_BOOL,\n clearValue: RgbaArray\n ): GPURenderPassDescriptor\n {\n if (typeof clear === 'boolean')\n {\n clear = clear ? CLEAR.ALL : CLEAR.NONE;\n }\n\n const renderTargetSystem = this._renderTargetSystem;\n\n const gpuRenderTarget = renderTargetSystem.getGpuRenderTarget(renderTarget);\n\n const colorAttachments = renderTarget.colorTextures.map(\n (texture, i) =>\n {\n const context = gpuRenderTarget.contexts[i];\n\n let view: GPUTextureView;\n let resolveTarget: GPUTextureView;\n\n if (context)\n {\n const currentTexture = context.getCurrentTexture();\n\n const canvasTextureView = currentTexture.createView();\n\n view = canvasTextureView;\n }\n else\n {\n view = this._renderer.texture.getGpuSource(texture).createView({\n mipLevelCount: 1,\n });\n }\n\n if (gpuRenderTarget.msaaTextures[i])\n {\n resolveTarget = view;\n view = this._renderer.texture.getTextureView(\n gpuRenderTarget.msaaTextures[i]\n );\n }\n\n const loadOp = ((clear as CLEAR) & CLEAR.COLOR ? 'clear' : 'load') as GPULoadOp;\n\n clearValue ??= renderTargetSystem.defaultClearColor;\n\n return {\n view,\n resolveTarget,\n clearValue,\n storeOp: 'store',\n loadOp\n };\n }\n ) as GPURenderPassColorAttachment[];\n\n let depthStencilAttachment: GPURenderPassDepthStencilAttachment;\n\n // if we have a depth or stencil buffer, we need to ensure we have a texture for it\n // this is WebGPU specific - as WebGL does not require textures to run a depth / stencil buffer\n if ((renderTarget.stencil || renderTarget.depth) && !renderTarget.depthStencilTexture)\n {\n renderTarget.ensureDepthStencilTexture();\n renderTarget.depthStencilTexture.source.sampleCount = gpuRenderTarget.msaa ? 4 : 1;\n }\n\n if (renderTarget.depthStencilTexture)\n {\n const stencilLoadOp = (clear & CLEAR.STENCIL ? 'clear' : 'load') as GPULoadOp;\n const depthLoadOp = (clear & CLEAR.DEPTH ? 'clear' : 'load') as GPULoadOp;\n\n depthStencilAttachment = {\n view: this._renderer.texture\n .getGpuSource(renderTarget.depthStencilTexture.source)\n .createView(),\n stencilStoreOp: 'store',\n stencilLoadOp,\n depthClearValue: 1.0,\n depthLoadOp,\n depthStoreOp: 'store',\n };\n }\n\n const descriptor: GPURenderPassDescriptor = {\n colorAttachments,\n depthStencilAttachment,\n };\n\n return descriptor;\n }\n\n public clear(renderTarget: RenderTarget, clear: CLEAR_OR_BOOL = true, clearColor?: RgbaArray, viewport?: Rectangle)\n {\n if (!clear) return;\n\n const { gpu, encoder } = this._renderer;\n\n const device = gpu.device;\n\n const standAlone = encoder.commandEncoder === null;\n\n if (standAlone)\n {\n const commandEncoder = device.createCommandEncoder();\n const renderPassDescriptor = this.getDescriptor(renderTarget, clear, clearColor);\n\n const passEncoder = commandEncoder.beginRenderPass(renderPassDescriptor);\n\n passEncoder.setViewport(viewport.x, viewport.y, viewport.width, viewport.height, 0, 1);\n\n passEncoder.end();\n\n const gpuCommands = commandEncoder.finish();\n\n device.queue.submit([gpuCommands]);\n }\n else\n {\n this.startRenderPass(renderTarget, clear, clearColor, viewport);\n }\n }\n\n public initGpuRenderTarget(renderTarget: RenderTarget): GpuRenderTarget\n {\n // always false for WebGPU\n renderTarget.isRoot = true;\n\n const gpuRenderTarget = new GpuRenderTarget();\n\n // create a context...\n // is a canvas...\n renderTarget.colorTextures.forEach((colorTexture, i) =>\n {\n if (CanvasSource.test(colorTexture.resource))\n {\n const context = colorTexture.resource.getContext(\n 'webgpu'\n ) as unknown as GPUCanvasContext;\n\n const alphaMode = (colorTexture as CanvasSource).transparent ? 'premultiplied' : 'opaque';\n\n try\n {\n context.configure({\n device: this._renderer.gpu.device,\n // eslint-disable-next-line max-len\n usage: GPUTextureUsage.TEXTURE_BINDING\n | GPUTextureUsage.COPY_DST\n | GPUTextureUsage.RENDER_ATTACHMENT\n | GPUTextureUsage.COPY_SRC,\n format: 'bgra8unorm',\n alphaMode,\n });\n }\n catch (e)\n {\n console.error(e);\n }\n\n gpuRenderTarget.contexts[i] = context;\n }\n\n gpuRenderTarget.msaa = colorTexture.source.antialias;\n\n if (colorTexture.source.antialias)\n {\n const msaaTexture = new TextureSource({\n width: 0,\n height: 0,\n sampleCount: 4,\n });\n\n gpuRenderTarget.msaaTextures[i] = msaaTexture;\n }\n });\n\n if (gpuRenderTarget.msaa)\n {\n gpuRenderTarget.msaaSamples = 4;\n\n if (renderTarget.depthStencilTexture)\n {\n renderTarget.depthStencilTexture.source.sampleCount = 4;\n }\n }\n\n return gpuRenderTarget;\n }\n\n public destroyGpuRenderTarget(gpuRenderTarget: GpuRenderTarget)\n {\n gpuRenderTarget.contexts.forEach((context) =>\n {\n context.unconfigure();\n });\n\n gpuRenderTarget.msaaTextures.forEach((texture) =>\n {\n texture.destroy();\n });\n\n gpuRenderTarget.msaaTextures.length = 0;\n gpuRenderTarget.contexts.length = 0;\n }\n\n public ensureDepthStencilTexture(renderTarget: RenderTarget)\n {\n // TODO This function will be more useful once we cache the descriptors\n const gpuRenderTarget = this._renderTargetSystem.getGpuRenderTarget(renderTarget);\n\n if (renderTarget.depthStencilTexture && gpuRenderTarget.msaa)\n {\n renderTarget.depthStencilTexture.source.sampleCount = 4;\n }\n }\n\n public resizeGpuRenderTarget(renderTarget: RenderTarget)\n {\n const gpuRenderTarget = this._renderTargetSystem.getGpuRenderTarget(renderTarget);\n\n gpuRenderTarget.width = renderTarget.width;\n gpuRenderTarget.height = renderTarget.height;\n\n if (gpuRenderTarget.msaa)\n {\n renderTarget.colorTextures.forEach((colorTexture, i) =>\n {\n const msaaTexture = gpuRenderTarget.msaaTextures[i];\n\n msaaTexture?.resize(\n colorTexture.source.width,\n colorTexture.source.height,\n colorTexture.source._resolution\n );\n });\n }\n }\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { RenderTargetSystem } from '../../shared/renderTarget/RenderTargetSystem';\nimport { GpuRenderTargetAdaptor } from './GpuRenderTargetAdaptor';\n\nimport type { WebGPURenderer } from '../WebGPURenderer';\nimport type { GpuRenderTarget } from './GpuRenderTarget';\n\n/**\n * The WebGL adaptor for the render target system. Allows the Render Target System to be used with the WebGl renderer\n * @memberof rendering\n */\nexport class GpuRenderTargetSystem extends RenderTargetSystem\n{\n /** @ignore */\n public static extension = {\n type: [ExtensionType.WebGPUSystem],\n name: 'renderTarget',\n } as const;\n\n public adaptor = new GpuRenderTargetAdaptor();\n\n constructor(renderer: WebGPURenderer)\n {\n super(renderer);\n\n this.adaptor.init(renderer, this);\n }\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\n\nimport type { System } from '../../shared/system/System';\nimport type { GPU } from '../GpuDeviceSystem';\nimport type { GpuProgram } from './GpuProgram';\n\nexport interface GPUProgramData\n{\n bindGroups: GPUBindGroupLayout[]\n pipeline: GPUPipelineLayout\n}\n\n/**\n * A system that manages the rendering of GpuPrograms.\n * @memberof rendering\n */\nexport class GpuShaderSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGPUSystem,\n ],\n name: 'shader',\n } as const;\n\n private _gpu: GPU;\n\n private readonly _gpuProgramData: Record = Object.create(null);\n\n protected contextChange(gpu: GPU): void\n {\n this._gpu = gpu;\n }\n\n public getProgramData(program: GpuProgram)\n {\n return this._gpuProgramData[program._layoutKey] || this._createGPUProgramData(program);\n }\n\n private _createGPUProgramData(program: GpuProgram)\n {\n const device = this._gpu.device;\n\n const bindGroups = program.gpuLayout.map((group) => device.createBindGroupLayout({ entries: group }));\n\n const pipelineLayoutDesc = { bindGroupLayouts: bindGroups };\n\n this._gpuProgramData[program._layoutKey] = {\n bindGroups,\n pipeline: device.createPipelineLayout(pipelineLayoutDesc),\n };\n\n // generally we avoid having to make this automatically\n // keeping this for a reminder, if any issues popup\n // program._gpuLayout = {\n // bindGroups: null,\n // pipeline: 'auto',\n // };\n\n return this._gpuProgramData[program._layoutKey];\n }\n\n public destroy(): void\n {\n // TODO destroy the _gpuProgramData\n this._gpu = null;\n (this._gpuProgramData as null) = null;\n }\n}\n","import type { BLEND_MODES } from '../../shared/state/const';\n\nexport const GpuBlendModesToPixi: Partial> = {};\n\nGpuBlendModesToPixi.normal = {\n alpha: {\n srcFactor: 'one',\n dstFactor: 'one-minus-src-alpha',\n operation: 'add',\n },\n color: {\n srcFactor: 'one',\n dstFactor: 'one-minus-src-alpha',\n operation: 'add',\n },\n};\n\nGpuBlendModesToPixi.add = {\n alpha: {\n srcFactor: 'src-alpha',\n dstFactor: 'one-minus-src-alpha',\n operation: 'add',\n },\n color: {\n srcFactor: 'one',\n dstFactor: 'one',\n operation: 'add',\n },\n};\n\nGpuBlendModesToPixi.multiply = {\n alpha: {\n srcFactor: 'one',\n dstFactor: 'one-minus-src-alpha',\n operation: 'add',\n },\n color: {\n srcFactor: 'dst',\n dstFactor: 'one-minus-src-alpha',\n operation: 'add',\n },\n};\n\nGpuBlendModesToPixi.screen = {\n alpha: {\n srcFactor: 'one',\n dstFactor: 'one-minus-src-alpha',\n operation: 'add',\n },\n color: {\n srcFactor: 'one',\n dstFactor: 'one-minus-src',\n operation: 'add',\n },\n};\n\nGpuBlendModesToPixi.overlay = {\n alpha: {\n srcFactor: 'one',\n dstFactor: 'one-minus-src-alpha',\n operation: 'add',\n },\n color: {\n srcFactor: 'one',\n dstFactor: 'one-minus-src',\n operation: 'add',\n },\n};\n\nGpuBlendModesToPixi.none = {\n alpha: {\n srcFactor: 'one',\n dstFactor: 'one-minus-src-alpha',\n operation: 'add',\n },\n color: {\n srcFactor: 'zero',\n dstFactor: 'zero',\n operation: 'add',\n },\n};\n\n// not-premultiplied blend modes\nGpuBlendModesToPixi['normal-npm'] = {\n alpha: {\n srcFactor: 'one',\n dstFactor: 'one-minus-src-alpha',\n operation: 'add',\n },\n color: {\n srcFactor: 'src-alpha',\n dstFactor: 'one-minus-src-alpha',\n operation: 'add',\n },\n};\n\nGpuBlendModesToPixi['add-npm'] = {\n alpha: {\n srcFactor: 'one',\n dstFactor: 'one',\n operation: 'add',\n },\n color: {\n srcFactor: 'src-alpha',\n dstFactor: 'one',\n operation: 'add',\n },\n};\n\nGpuBlendModesToPixi['screen-npm'] = {\n alpha: {\n srcFactor: 'one',\n dstFactor: 'one-minus-src-alpha',\n operation: 'add',\n },\n color: {\n srcFactor: 'src-alpha',\n dstFactor: 'one-minus-src',\n operation: 'add',\n },\n};\n\nGpuBlendModesToPixi.erase = {\n alpha: {\n srcFactor: 'zero',\n dstFactor: 'one-minus-src-alpha',\n operation: 'add',\n },\n color: {\n srcFactor: 'zero',\n dstFactor: 'one-minus-src',\n operation: 'add',\n },\n};\n\n// composite operations\n// GpuBlendModesToPixi[BLEND_MODES.SRC_IN] = {\n// alpha: {\n// srcFactor: 'src-alpha',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// color: {\n// srcFactor: 'dst-alpha',\n// dstFactor: 'zero',\n// operation: 'add',\n// },\n// };\n\n// GpuBlendModesToPixi[BLEND_MODES.SRC_OUT] = {\n// alpha: {\n// srcFactor: 'src-alpha',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// color: {\n// srcFactor: 'one-minus-dst-alpha',\n// dstFactor: 'zero',\n// operation: 'add',\n// },\n// };\n\n// GpuBlendModesToPixi[BLEND_MODES.SRC_ATOP] = {\n// alpha: {\n// srcFactor: 'src-alpha',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// color: {\n// srcFactor: 'dst-alpha',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// };\n\n// GpuBlendModesToPixi[BLEND_MODES.DST_OVER] = {\n// alpha: {\n// srcFactor: 'src-alpha',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// color: {\n// srcFactor: 'one-minus-dst-alpha',\n// dstFactor: 'one',\n// operation: 'add',\n// },\n// };\n\n// GpuBlendModesToPixi[BLEND_MODES.DST_IN] = {\n// alpha: {\n// srcFactor: 'src-alpha',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// color: {\n// srcFactor: 'zero',\n// dstFactor: 'src-alpha',\n// operation: 'add',\n// },\n// };\n\n// GpuBlendModesToPixi[BLEND_MODES.DST_OUT] = {\n// alpha: {\n// srcFactor: 'src-alpha',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// color: {\n// srcFactor: 'zero',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// };\n\n// GpuBlendModesToPixi[BLEND_MODES.DST_ATOP] = {\n// alpha: {\n// srcFactor: 'src-alpha',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// color: {\n// srcFactor: 'one-minus-dst-alpha',\n// dstFactor: 'src-alpha',\n// operation: 'add',\n// },\n// };\n\n// GpuBlendModesToPixi[BLEND_MODES.XOR] = {\n// alpha: {\n// srcFactor: 'src-alpha',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// color: {\n// srcFactor: 'one-minus-dst-alpha',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// };\n\n// TODO - fix me\n// GLBlendModesToPixi[BLEND_MODES.SUBTRACT] = {\n// alpha: {\n// srcFactor: 'one',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// color: {\n// srcFactor: 'one-minus-dst-alpha',\n// dstFactor: 'one-minus-src-alpha',\n// operation: 'add',\n// },\n// };\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { State } from '../../shared/state/State';\nimport { GpuBlendModesToPixi } from './GpuBlendModesToPixi';\n\nimport type { BLEND_MODES } from '../../shared/state/const';\nimport type { System } from '../../shared/system/System';\nimport type { GPU } from '../GpuDeviceSystem';\n\n/**\n * System plugin to the renderer to manage WebGL state machines.\n * @memberof rendering\n */\nexport class GpuStateSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGPUSystem,\n ],\n name: 'state',\n } as const;\n /**\n * State ID\n * @readonly\n */\n public stateId: number;\n\n /**\n * Polygon offset\n * @readonly\n */\n public polygonOffset: number;\n\n /**\n * Blend mode\n * @default 'none'\n * @readonly\n */\n public blendMode: BLEND_MODES;\n\n /** Whether current blend equation is different */\n protected _blendEq: boolean;\n\n /**\n * GL context\n * @member {WebGLRenderingContext}\n * @readonly\n */\n protected gpu: GPU;\n\n /**\n * Default WebGL State\n * @readonly\n */\n protected defaultState: State;\n\n constructor()\n {\n this.defaultState = new State();\n this.defaultState.blend = true;\n }\n\n protected contextChange(gpu: GPU): void\n {\n this.gpu = gpu;\n }\n\n /**\n * Gets the blend mode data for the current state\n * @param state - The state to get the blend mode from\n */\n public getColorTargets(state: State): GPUColorTargetState[]\n {\n const blend = GpuBlendModesToPixi[state.blendMode] || GpuBlendModesToPixi.normal;\n\n return [\n {\n format: 'bgra8unorm',\n writeMask: 0,\n blend,\n },\n ];\n }\n\n public destroy(): void\n {\n this.gpu = null;\n }\n}\n","import type { BufferImageSource } from '../../../shared/texture/sources/BufferImageSource';\nimport type { GPU } from '../../GpuDeviceSystem';\nimport type { GpuTextureUploader } from './GpuTextureUploader';\n\nexport const gpuUploadBufferImageResource = {\n\n type: 'image',\n\n upload(source: BufferImageSource, gpuTexture: GPUTexture, gpu: GPU)\n {\n const resource = source.resource;\n\n const total = (source.pixelWidth | 0) * (source.pixelHeight | 0);\n\n const bytesPerPixel = resource.byteLength / total;\n\n gpu.device.queue.writeTexture(\n { texture: gpuTexture },\n resource,\n {\n offset: 0,\n rowsPerImage: source.pixelHeight,\n bytesPerRow: source.pixelHeight * bytesPerPixel,\n },\n {\n width: source.pixelWidth,\n height: source.pixelHeight,\n depthOrArrayLayers: 1,\n }\n );\n }\n} as GpuTextureUploader;\n\n","import type { CompressedSource } from '../../../shared/texture/sources/CompressedSource';\nimport type { GPU } from '../../GpuDeviceSystem';\nimport type { GpuTextureUploader } from './GpuTextureUploader';\n\nexport const blockDataMap: Record = {\n 'bc1-rgba-unorm': { blockBytes: 8, blockWidth: 4, blockHeight: 4 },\n 'bc2-rgba-unorm': { blockBytes: 16, blockWidth: 4, blockHeight: 4 },\n 'bc3-rgba-unorm': { blockBytes: 16, blockWidth: 4, blockHeight: 4 },\n 'bc7-rgba-unorm': { blockBytes: 16, blockWidth: 4, blockHeight: 4 },\n 'etc1-rgb-unorm': { blockBytes: 8, blockWidth: 4, blockHeight: 4 },\n 'etc2-rgba8unorm': { blockBytes: 16, blockWidth: 4, blockHeight: 4 },\n 'astc-4x4-unorm': { blockBytes: 16, blockWidth: 4, blockHeight: 4 },\n};\n\nconst defaultBlockData = { blockBytes: 4, blockWidth: 1, blockHeight: 1 };\n\nexport const gpuUploadCompressedTextureResource = {\n\n type: 'compressed',\n\n upload(source: CompressedSource, gpuTexture: GPUTexture, gpu: GPU)\n {\n let mipWidth = source.pixelWidth;\n let mipHeight = source.pixelHeight;\n\n const blockData = blockDataMap[source.format] || defaultBlockData;\n\n for (let i = 0; i < source.resource.length; i++)\n {\n const levelBuffer = source.resource[i];\n\n const bytesPerRow = Math.ceil(mipWidth / blockData.blockWidth) * blockData.blockBytes;\n\n gpu.device.queue.writeTexture(\n {\n texture: gpuTexture,\n mipLevel: i\n },\n levelBuffer,\n {\n offset: 0,\n bytesPerRow,\n },\n {\n width: Math.ceil(mipWidth / blockData.blockWidth) * blockData.blockWidth,\n height: Math.ceil(mipHeight / blockData.blockHeight) * blockData.blockHeight,\n depthOrArrayLayers: 1,\n }\n );\n\n mipWidth = Math.max(mipWidth >> 1, 1);\n mipHeight = Math.max(mipHeight >> 1, 1);\n }\n }\n} as GpuTextureUploader;\n\n","import type { TextureSource } from '../../../shared/texture/sources/TextureSource';\nimport type { GPU } from '../../GpuDeviceSystem';\nimport type { GpuTextureUploader } from './GpuTextureUploader';\n\nexport const gpuUploadImageResource = {\n\n type: 'image',\n\n upload(source: TextureSource, gpuTexture: GPUTexture, gpu: GPU)\n {\n const resource = source.resource as ImageBitmap | HTMLCanvasElement | OffscreenCanvas;\n\n if (!resource) return;\n\n const width = Math.min(gpuTexture.width, source.resourceWidth || source.pixelWidth);\n const height = Math.min(gpuTexture.height, source.resourceHeight || source.pixelHeight);\n\n const premultipliedAlpha = source.alphaMode === 'premultiply-alpha-on-upload';\n\n gpu.device.queue.copyExternalImageToTexture(\n { source: resource },\n { texture: gpuTexture, premultipliedAlpha },\n {\n width,\n height,\n }\n );\n }\n} as GpuTextureUploader;\n\n","import { gpuUploadImageResource } from './gpuUploadImageSource';\n\nimport type { VideoSource } from '../../../shared/texture/sources/VideoSource';\nimport type { GPU } from '../../GpuDeviceSystem';\nimport type { GpuTextureUploader } from './GpuTextureUploader';\n\nexport const gpuUploadVideoResource = {\n\n type: 'video',\n\n upload(source: VideoSource, gpuTexture: GPUTexture, gpu: GPU)\n {\n gpuUploadImageResource.upload(source, gpuTexture, gpu);\n }\n} as GpuTextureUploader;\n\n","/**\n * A class which generates mipmaps for a GPUTexture.\n * Thanks to @toji for the original implementation\n * https://github.com/toji/web-texture-tool/blob/main/src/webgpu-mipmap-generator.js\n * @memberof rendering\n * @ignore\n */\nexport class GpuMipmapGenerator\n{\n public device: GPUDevice;\n public sampler: GPUSampler;\n public pipelines: Record;\n\n public mipmapShaderModule: any;\n\n constructor(device: GPUDevice)\n {\n this.device = device;\n this.sampler = device.createSampler({ minFilter: 'linear' });\n // We'll need a new pipeline for every texture format used.\n this.pipelines = {};\n }\n\n private _getMipmapPipeline(format: GPUTextureFormat)\n {\n let pipeline = this.pipelines[format];\n\n if (!pipeline)\n {\n // Shader modules is shared between all pipelines, so only create once.\n if (!this.mipmapShaderModule)\n {\n this.mipmapShaderModule = this.device.createShaderModule({\n code: /* wgsl */ `\n var pos : array, 3> = array, 3>(\n vec2(-1.0, -1.0), vec2(-1.0, 3.0), vec2(3.0, -1.0));\n\n struct VertexOutput {\n @builtin(position) position : vec4,\n @location(0) texCoord : vec2,\n };\n\n @vertex\n fn vertexMain(@builtin(vertex_index) vertexIndex : u32) -> VertexOutput {\n var output : VertexOutput;\n output.texCoord = pos[vertexIndex] * vec2(0.5, -0.5) + vec2(0.5);\n output.position = vec4(pos[vertexIndex], 0.0, 1.0);\n return output;\n }\n\n @group(0) @binding(0) var imgSampler : sampler;\n @group(0) @binding(1) var img : texture_2d;\n\n @fragment\n fn fragmentMain(@location(0) texCoord : vec2) -> @location(0) vec4 {\n return textureSample(img, imgSampler, texCoord);\n }\n `,\n });\n }\n\n pipeline = this.device.createRenderPipeline({\n layout: 'auto',\n vertex: {\n module: this.mipmapShaderModule,\n entryPoint: 'vertexMain',\n },\n fragment: {\n module: this.mipmapShaderModule,\n entryPoint: 'fragmentMain',\n targets: [{ format }],\n }\n });\n\n this.pipelines[format] = pipeline;\n }\n\n return pipeline;\n }\n\n /**\n * Generates mipmaps for the given GPUTexture from the data in level 0.\n * @param {module:External.GPUTexture} texture - Texture to generate mipmaps for.\n * @returns {module:External.GPUTexture} - The originally passed texture\n */\n public generateMipmap(texture: GPUTexture)\n {\n const pipeline = this._getMipmapPipeline(texture.format);\n\n if (texture.dimension === '3d' || texture.dimension === '1d')\n {\n throw new Error('Generating mipmaps for non-2d textures is currently unsupported!');\n }\n\n let mipTexture = texture;\n const arrayLayerCount = texture.depthOrArrayLayers || 1; // Only valid for 2D textures.\n\n // If the texture was created with RENDER_ATTACHMENT usage we can render directly between mip levels.\n const renderToSource = texture.usage & GPUTextureUsage.RENDER_ATTACHMENT;\n\n if (!renderToSource)\n {\n // Otherwise we have to use a separate texture to render into. It can be one mip level smaller than the source\n // texture, since we already have the top level.\n const mipTextureDescriptor = {\n size: {\n width: Math.ceil(texture.width / 2),\n height: Math.ceil(texture.height / 2),\n depthOrArrayLayers: arrayLayerCount,\n },\n format: texture.format,\n usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_SRC | GPUTextureUsage.RENDER_ATTACHMENT,\n mipLevelCount: texture.mipLevelCount - 1,\n };\n\n mipTexture = this.device.createTexture(mipTextureDescriptor);\n }\n\n const commandEncoder = this.device.createCommandEncoder({});\n // TODO: Consider making this static.\n const bindGroupLayout = pipeline.getBindGroupLayout(0);\n\n for (let arrayLayer = 0; arrayLayer < arrayLayerCount; ++arrayLayer)\n {\n let srcView = texture.createView({\n baseMipLevel: 0,\n mipLevelCount: 1,\n dimension: '2d',\n baseArrayLayer: arrayLayer,\n arrayLayerCount: 1,\n });\n\n let dstMipLevel = renderToSource ? 1 : 0;\n\n for (let i = 1; i < texture.mipLevelCount; ++i)\n {\n const dstView = mipTexture.createView({\n baseMipLevel: dstMipLevel++,\n mipLevelCount: 1,\n dimension: '2d',\n baseArrayLayer: arrayLayer,\n arrayLayerCount: 1,\n });\n\n const passEncoder = commandEncoder.beginRenderPass({\n colorAttachments: [{\n view: dstView,\n storeOp: 'store',\n loadOp: 'clear',\n clearValue: { r: 0, g: 0, b: 0, a: 0 },\n }],\n });\n\n const bindGroup = this.device.createBindGroup({\n layout: bindGroupLayout,\n entries: [{\n binding: 0,\n resource: this.sampler,\n }, {\n binding: 1,\n resource: srcView,\n }],\n });\n\n passEncoder.setPipeline(pipeline);\n passEncoder.setBindGroup(0, bindGroup);\n passEncoder.draw(3, 1, 0, 0);\n\n passEncoder.end();\n\n srcView = dstView;\n }\n }\n\n // If we didn't render to the source texture, finish by copying the mip results from the temporary mipmap texture\n // to the source.\n if (!renderToSource)\n {\n const mipLevelSize = {\n width: Math.ceil(texture.width / 2),\n height: Math.ceil(texture.height / 2),\n depthOrArrayLayers: arrayLayerCount,\n };\n\n for (let i = 1; i < texture.mipLevelCount; ++i)\n {\n commandEncoder.copyTextureToTexture({\n texture: mipTexture,\n mipLevel: i - 1,\n }, {\n texture,\n mipLevel: i,\n }, mipLevelSize);\n\n mipLevelSize.width = Math.ceil(mipLevelSize.width / 2);\n mipLevelSize.height = Math.ceil(mipLevelSize.height / 2);\n }\n }\n\n this.device.queue.submit([commandEncoder.finish()]);\n\n if (!renderToSource)\n {\n mipTexture.destroy();\n }\n\n return texture;\n }\n}\n","import { DOMAdapter } from '../../../../environment/adapter';\nimport { ExtensionType } from '../../../../extensions/Extensions';\nimport { CanvasPool } from '../../shared/texture/CanvasPool';\nimport { BindGroup } from '../shader/BindGroup';\nimport { gpuUploadBufferImageResource } from './uploaders/gpuUploadBufferImageResource';\nimport { blockDataMap, gpuUploadCompressedTextureResource } from './uploaders/gpuUploadCompressedTextureResource';\nimport { gpuUploadImageResource } from './uploaders/gpuUploadImageSource';\nimport { gpuUploadVideoResource } from './uploaders/gpuUploadVideoSource';\nimport { GpuMipmapGenerator } from './utils/GpuMipmapGenerator';\n\nimport type { ICanvas } from '../../../../environment/canvas/ICanvas';\nimport type { System } from '../../shared/system/System';\nimport type { CanvasGenerator, GetPixelsOutput } from '../../shared/texture/GenerateCanvas';\nimport type { TextureSource } from '../../shared/texture/sources/TextureSource';\nimport type { BindableTexture, Texture } from '../../shared/texture/Texture';\nimport type { TextureStyle } from '../../shared/texture/TextureStyle';\nimport type { GPU } from '../GpuDeviceSystem';\nimport type { WebGPURenderer } from '../WebGPURenderer';\nimport type { GpuTextureUploader } from './uploaders/GpuTextureUploader';\n\n/**\n * The system that handles textures for the GPU.\n * @memberof rendering\n */\nexport class GpuTextureSystem implements System, CanvasGenerator\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGPUSystem,\n ],\n name: 'texture',\n } as const;\n\n public readonly managedTextures: TextureSource[] = [];\n\n protected CONTEXT_UID: number;\n private _gpuSources: Record = Object.create(null);\n private _gpuSamplers: Record = Object.create(null);\n private _bindGroupHash: Record = Object.create(null);\n private _textureViewHash: Record = Object.create(null);\n\n private readonly _uploads: Record = {\n image: gpuUploadImageResource,\n buffer: gpuUploadBufferImageResource,\n video: gpuUploadVideoResource,\n compressed: gpuUploadCompressedTextureResource\n };\n\n private _gpu: GPU;\n private _mipmapGenerator?: GpuMipmapGenerator;\n\n private readonly _renderer: WebGPURenderer;\n\n constructor(renderer: WebGPURenderer)\n {\n this._renderer = renderer;\n }\n\n protected contextChange(gpu: GPU): void\n {\n this._gpu = gpu;\n }\n\n public initSource(source: TextureSource): GPUTexture\n {\n if (source.autoGenerateMipmaps)\n {\n const biggestDimension = Math.max(source.pixelWidth, source.pixelHeight);\n\n source.mipLevelCount = Math.floor(Math.log2(biggestDimension)) + 1;\n }\n\n let usage = GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST;\n\n if (source.uploadMethodId !== 'compressed')\n {\n usage |= GPUTextureUsage.RENDER_ATTACHMENT;\n usage |= GPUTextureUsage.COPY_SRC;\n }\n\n const blockData = blockDataMap[source.format] || { blockBytes: 4, blockWidth: 1, blockHeight: 1 };\n\n const width = Math.ceil(source.pixelWidth / blockData.blockWidth) * blockData.blockWidth;\n const height = Math.ceil(source.pixelHeight / blockData.blockHeight) * blockData.blockHeight;\n\n const textureDescriptor: GPUTextureDescriptor = {\n label: source.label,\n size: { width, height },\n format: source.format,\n sampleCount: source.sampleCount,\n mipLevelCount: source.mipLevelCount,\n dimension: source.dimension,\n usage\n };\n\n const gpuTexture = this._gpu.device.createTexture(textureDescriptor);\n\n this._gpuSources[source.uid] = gpuTexture;\n\n if (!this.managedTextures.includes(source))\n {\n source.on('update', this.onSourceUpdate, this);\n source.on('resize', this.onSourceResize, this);\n source.on('destroy', this.onSourceDestroy, this);\n source.on('unload', this.onSourceUnload, this);\n source.on('updateMipmaps', this.onUpdateMipmaps, this);\n\n this.managedTextures.push(source);\n }\n\n this.onSourceUpdate(source);\n\n return gpuTexture;\n }\n\n protected onSourceUpdate(source: TextureSource): void\n {\n const gpuTexture = this.getGpuSource(source);\n\n // destroyed!\n if (!gpuTexture) return;\n\n if (this._uploads[source.uploadMethodId])\n {\n this._uploads[source.uploadMethodId].upload(source, gpuTexture, this._gpu);\n }\n\n if (source.autoGenerateMipmaps && source.mipLevelCount > 1)\n {\n this.onUpdateMipmaps(source);\n }\n }\n\n protected onSourceUnload(source: TextureSource): void\n {\n const gpuTexture = this._gpuSources[source.uid];\n\n if (gpuTexture)\n {\n this._gpuSources[source.uid] = null;\n\n gpuTexture.destroy();\n }\n }\n\n protected onUpdateMipmaps(source: TextureSource): void\n {\n if (!this._mipmapGenerator)\n {\n this._mipmapGenerator = new GpuMipmapGenerator(this._gpu.device);\n }\n\n const gpuTexture = this.getGpuSource(source);\n\n this._mipmapGenerator.generateMipmap(gpuTexture);\n }\n\n protected onSourceDestroy(source: TextureSource): void\n {\n source.off('update', this.onSourceUpdate, this);\n source.off('unload', this.onSourceUnload, this);\n source.off('destroy', this.onSourceDestroy, this);\n source.off('resize', this.onSourceResize, this);\n source.off('updateMipmaps', this.onUpdateMipmaps, this);\n\n this.managedTextures.splice(this.managedTextures.indexOf(source), 1);\n\n this.onSourceUnload(source);\n }\n\n protected onSourceResize(source: TextureSource): void\n {\n const gpuTexture = this._gpuSources[source.uid];\n\n if (!gpuTexture)\n {\n this.initSource(source);\n }\n else if (gpuTexture.width !== source.pixelWidth || gpuTexture.height !== source.pixelHeight)\n {\n this._textureViewHash[source.uid] = null;\n this._bindGroupHash[source.uid] = null;\n\n this.onSourceUnload(source);\n this.initSource(source);\n }\n }\n\n private _initSampler(sampler: TextureStyle): GPUSampler\n {\n this._gpuSamplers[sampler._resourceId] = this._gpu.device.createSampler(sampler);\n\n return this._gpuSamplers[sampler._resourceId];\n }\n\n public getGpuSampler(sampler: TextureStyle): GPUSampler\n {\n return this._gpuSamplers[sampler._resourceId] || this._initSampler(sampler);\n }\n\n public getGpuSource(source: TextureSource): GPUTexture\n {\n return this._gpuSources[source.uid] || this.initSource(source);\n }\n\n public getTextureBindGroup(texture: Texture)\n {\n return this._bindGroupHash[texture.uid] ?? this._createTextureBindGroup(texture);\n }\n\n private _createTextureBindGroup(texture: BindableTexture)\n {\n const source = texture.source;\n\n const bindGroupId = source.uid;\n\n this._bindGroupHash[bindGroupId] = new BindGroup({\n 0: source,\n 1: source.style,\n });\n\n return this._bindGroupHash[bindGroupId];\n }\n\n public getTextureView(texture: BindableTexture)\n {\n const source = texture.source;\n\n return this._textureViewHash[source.uid] ?? this._createTextureView(source);\n }\n\n private _createTextureView(texture: TextureSource)\n {\n this._textureViewHash[texture.uid] = this.getGpuSource(texture).createView();\n\n return this._textureViewHash[texture.uid];\n }\n\n public generateCanvas(texture: Texture): ICanvas\n {\n const renderer = this._renderer;\n\n const commandEncoder = renderer.gpu.device.createCommandEncoder();\n\n // create canvas\n const canvas = DOMAdapter.get().createCanvas();\n\n canvas.width = texture.source.pixelWidth;\n canvas.height = texture.source.pixelHeight;\n\n const context = canvas.getContext('webgpu') as unknown as GPUCanvasContext;\n\n context.configure({\n device: renderer.gpu.device,\n // eslint-disable-next-line max-len\n usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.COPY_SRC,\n format: navigator.gpu.getPreferredCanvasFormat(),\n alphaMode: 'premultiplied',\n });\n\n commandEncoder.copyTextureToTexture({\n texture: renderer.texture.getGpuSource(texture.source),\n origin: {\n x: 0,\n y: 0,\n },\n }, {\n texture: context.getCurrentTexture(),\n }, {\n width: canvas.width,\n height: canvas.height,\n });\n\n renderer.gpu.device.queue.submit([commandEncoder.finish()]);\n\n return canvas;\n }\n\n public getPixels(texture: Texture): GetPixelsOutput\n {\n const webGPUCanvas = this.generateCanvas(texture);\n\n const canvasAndContext = CanvasPool.getOptimalCanvasAndContext(webGPUCanvas.width, webGPUCanvas.height);\n\n const context = canvasAndContext.context;\n\n context.drawImage(webGPUCanvas, 0, 0);\n\n const { width, height } = webGPUCanvas;\n\n const imageData = context.getImageData(0, 0, width, height);\n\n const pixels = new Uint8ClampedArray(imageData.data.buffer);\n\n CanvasPool.returnCanvasAndContext(canvasAndContext);\n\n return { pixels, width, height };\n }\n\n public destroy(): void\n {\n // we copy the array as the aarry with a slice as onSourceDestroy\n // will remove the source from the real managedTextures array\n this.managedTextures\n .slice()\n .forEach((source) => this.onSourceDestroy(source));\n\n (this.managedTextures as null) = null;\n\n for (const k of Object.keys(this._bindGroupHash))\n {\n const key = Number(k);\n const bindGroup = this._bindGroupHash[key];\n\n bindGroup?.destroy();\n this._bindGroupHash[key] = null;\n }\n\n this._gpu = null;\n this._mipmapGenerator = null;\n this._gpuSources = null;\n this._bindGroupHash = null;\n this._textureViewHash = null;\n this._gpuSamplers = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { Matrix } from '../../../maths/matrix/Matrix';\nimport { getMaxTexturesPerBatch } from '../../../rendering/batcher/gl/utils/maxRecommendedTextures';\nimport { getTextureBatchBindGroup } from '../../../rendering/batcher/gpu/getTextureBatchBindGroup';\nimport { compileHighShaderGpuProgram } from '../../../rendering/high-shader/compileHighShaderToProgram';\nimport { colorBit } from '../../../rendering/high-shader/shader-bits/colorBit';\nimport { generateTextureBatchBit } from '../../../rendering/high-shader/shader-bits/generateTextureBatchBit';\nimport { localUniformBitGroup2 } from '../../../rendering/high-shader/shader-bits/localUniformBit';\nimport { roundPixelsBit } from '../../../rendering/high-shader/shader-bits/roundPixelsBit';\nimport { Shader } from '../../../rendering/renderers/shared/shader/Shader';\nimport { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup';\n\nimport type { Batch } from '../../../rendering/batcher/shared/Batcher';\nimport type { GpuEncoderSystem } from '../../../rendering/renderers/gpu/GpuEncoderSystem';\nimport type { WebGPURenderer } from '../../../rendering/renderers/gpu/WebGPURenderer';\nimport type { Graphics } from '../shared/Graphics';\nimport type { GraphicsAdaptor, GraphicsPipe } from '../shared/GraphicsPipe';\n\n/**\n * A GraphicsAdaptor that uses the GPU to render graphics.\n * @memberof rendering\n * @ignore\n */\nexport class GpuGraphicsAdaptor implements GraphicsAdaptor\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGPUPipesAdaptor,\n ],\n name: 'graphics',\n } as const;\n\n public shader: Shader;\n\n public init()\n {\n const localUniforms = new UniformGroup({\n uTransformMatrix: { value: new Matrix(), type: 'mat3x3' },\n uColor: { value: new Float32Array([1, 1, 1, 1]), type: 'vec4' },\n uRound: { value: 0, type: 'f32' },\n });\n\n const gpuProgram = compileHighShaderGpuProgram({\n name: 'graphics',\n bits: [\n colorBit,\n generateTextureBatchBit(getMaxTexturesPerBatch()),\n\n localUniformBitGroup2,\n roundPixelsBit\n ]\n });\n\n this.shader = new Shader({\n gpuProgram,\n resources: {\n // added on the fly!\n localUniforms,\n },\n });\n }\n\n public execute(graphicsPipe: GraphicsPipe, renderable: Graphics): void\n {\n const context = renderable.context;\n const shader = context.customShader || this.shader;\n const renderer = graphicsPipe.renderer as WebGPURenderer;\n const contextSystem = renderer.graphicsContext;\n\n const {\n geometry, instructions\n } = contextSystem.getContextRenderData(context);\n\n // WebGPU specific...\n\n // TODO perf test this a bit...\n const encoder = renderer.encoder as GpuEncoderSystem;\n\n encoder.setPipelineFromGeometryProgramAndState(\n geometry,\n shader.gpuProgram,\n graphicsPipe.state\n );\n\n encoder.setGeometry(geometry);\n\n const globalUniformsBindGroup = renderer.globalUniforms.bindGroup;\n\n encoder.setBindGroup(0, globalUniformsBindGroup, shader.gpuProgram);\n\n const localBindGroup = (renderer as WebGPURenderer)\n .renderPipes.uniformBatch.getUniformBindGroup(shader.resources.localUniforms, true);\n\n encoder.setBindGroup(2, localBindGroup, shader.gpuProgram);\n\n const batches = instructions.instructions as Batch[];\n\n for (let i = 0; i < instructions.instructionSize; i++)\n {\n const batch = batches[i];\n\n shader.groups[1] = batch.bindGroup;\n\n if (!batch.gpuBindGroup)\n {\n const textureBatch = batch.textures;\n\n batch.bindGroup = getTextureBatchBindGroup(textureBatch.textures, textureBatch.count);\n batch.gpuBindGroup = renderer.bindGroup.getBindGroup(\n batch.bindGroup, shader.gpuProgram, 1\n );\n }\n\n encoder.setBindGroup(1, batch.bindGroup, shader.gpuProgram);\n\n encoder.renderPassEncoder.drawIndexed(batch.size, 1, batch.start);\n }\n }\n\n public destroy(): void\n {\n this.shader.destroy(true);\n this.shader = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { Matrix } from '../../../maths/matrix/Matrix';\nimport { compileHighShaderGpuProgram } from '../../../rendering/high-shader/compileHighShaderToProgram';\nimport { localUniformBit } from '../../../rendering/high-shader/shader-bits/localUniformBit';\nimport { roundPixelsBit } from '../../../rendering/high-shader/shader-bits/roundPixelsBit';\nimport { textureBit } from '../../../rendering/high-shader/shader-bits/textureBit';\nimport { Shader } from '../../../rendering/renderers/shared/shader/Shader';\nimport { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport { warn } from '../../../utils/logging/warn';\n\nimport type { WebGPURenderer } from '../../../rendering/renderers/gpu/WebGPURenderer';\nimport type { Mesh } from '../shared/Mesh';\nimport type { MeshAdaptor, MeshPipe } from '../shared/MeshPipe';\n\n/**\n * The WebGL adaptor for the mesh system. Allows the Mesh System to be used with the WebGl renderer\n * @memberof rendering\n * @ignore\n */\nexport class GpuMeshAdapter implements MeshAdaptor\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGPUPipesAdaptor,\n ],\n name: 'mesh',\n } as const;\n\n private _shader: Shader;\n\n public init(): void\n {\n const gpuProgram = compileHighShaderGpuProgram({\n name: 'mesh',\n bits: [\n localUniformBit,\n textureBit,\n roundPixelsBit,\n ]\n });\n\n this._shader = new Shader({\n gpuProgram,\n resources: {\n uTexture: Texture.EMPTY._source,\n uSampler: Texture.EMPTY._source.style,\n textureUniforms: {\n uTextureMatrix: { type: 'mat3x3', value: new Matrix() },\n }\n }\n });\n }\n\n public execute(meshPipe: MeshPipe, mesh: Mesh)\n {\n const renderer = meshPipe.renderer;\n\n let shader: Shader = mesh._shader;\n\n if (!shader)\n {\n shader = this._shader;\n\n shader.resources.uTexture = mesh.texture.source;\n shader.resources.uSampler = mesh.texture.source.style;\n shader.resources.textureUniforms.uniforms.uTextureMatrix = mesh.texture.textureMatrix.mapCoord;\n }\n else if (!shader.gpuProgram)\n {\n // #if _DEBUG\n warn('Mesh shader has no gpuProgram', mesh.shader);\n // #endif\n\n return;\n }\n\n const gpuProgram = shader.gpuProgram;\n // GPU..\n\n if (gpuProgram.autoAssignGlobalUniforms)\n {\n shader.groups[0] = renderer.globalUniforms.bindGroup;\n }\n\n if (gpuProgram.autoAssignLocalUniforms)\n {\n const localUniforms = meshPipe.localUniforms;\n\n shader.groups[1] = (renderer as WebGPURenderer)\n .renderPipes.uniformBatch.getUniformBindGroup(localUniforms, true);\n }\n\n renderer.encoder.draw({\n geometry: mesh._geometry,\n shader,\n state: mesh.state\n });\n }\n\n public destroy(): void\n {\n this._shader.destroy(true);\n this._shader = null;\n }\n}\n","import { extensions, ExtensionType } from '../../../extensions/Extensions';\nimport { GpuGraphicsAdaptor } from '../../../scene/graphics/gpu/GpuGraphicsAdaptor';\nimport { GpuMeshAdapter } from '../../../scene/mesh/gpu/GpuMeshAdapter';\nimport { GpuBatchAdaptor } from '../../batcher/gpu/GpuBatchAdaptor';\nimport { AbstractRenderer } from '../shared/system/AbstractRenderer';\nimport { SharedRenderPipes, SharedSystems } from '../shared/system/SharedSystems';\nimport { RendererType } from '../types';\nimport { BindGroupSystem } from './BindGroupSystem';\nimport { GpuBufferSystem } from './buffer/GpuBufferSystem';\nimport { GpuColorMaskSystem } from './GpuColorMaskSystem';\nimport { type GPU, GpuDeviceSystem } from './GpuDeviceSystem';\nimport { GpuEncoderSystem } from './GpuEncoderSystem';\nimport { GpuStencilSystem } from './GpuStencilSystem';\nimport { GpuUboSystem } from './GpuUboSystem';\nimport { GpuUniformBatchPipe } from './GpuUniformBatchPipe';\nimport { PipelineSystem } from './pipeline/PipelineSystem';\nimport { GpuRenderTargetSystem } from './renderTarget/GpuRenderTargetSystem';\nimport { GpuShaderSystem } from './shader/GpuShaderSystem';\nimport { GpuStateSystem } from './state/GpuStateSystem';\nimport { GpuTextureSystem } from './texture/GpuTextureSystem';\n\nimport type { ICanvas } from '../../../environment/canvas/ICanvas';\nimport type { PipeConstructor } from '../shared/instructions/RenderPipe';\nimport type { SharedRendererOptions } from '../shared/system/SharedSystems';\nimport type { SystemConstructor } from '../shared/system/System';\nimport type { ExtractRendererOptions, ExtractSystemTypes } from '../shared/system/utils/typeUtils';\n\nconst DefaultWebGPUSystems = [\n ...SharedSystems,\n GpuUboSystem,\n GpuEncoderSystem,\n GpuDeviceSystem,\n GpuBufferSystem,\n GpuTextureSystem,\n GpuRenderTargetSystem,\n GpuShaderSystem,\n GpuStateSystem,\n PipelineSystem,\n GpuColorMaskSystem,\n GpuStencilSystem,\n BindGroupSystem,\n];\nconst DefaultWebGPUPipes = [...SharedRenderPipes, GpuUniformBatchPipe];\nconst DefaultWebGPUAdapters = [GpuBatchAdaptor, GpuMeshAdapter, GpuGraphicsAdaptor];\n\n// installed systems will bbe added to this array by the extensions manager..\nconst systems: { name: string; value: SystemConstructor }[] = [];\nconst renderPipes: { name: string; value: PipeConstructor }[] = [];\nconst renderPipeAdaptors: { name: string; value: any }[] = [];\n\nextensions.handleByNamedList(ExtensionType.WebGPUSystem, systems);\nextensions.handleByNamedList(ExtensionType.WebGPUPipes, renderPipes);\nextensions.handleByNamedList(ExtensionType.WebGPUPipesAdaptor, renderPipeAdaptors);\n\n// add all the default systems as well as any user defined ones from the extensions\nextensions.add(...DefaultWebGPUSystems, ...DefaultWebGPUPipes, ...DefaultWebGPUAdapters);\n\ntype WebGPUSystems = ExtractSystemTypes &\nPixiMixins.RendererSystems &\nPixiMixins.WebGPUSystems;\n\nexport type WebGPUPipes = ExtractSystemTypes &\nPixiMixins.RendererPipes &\nPixiMixins.WebGPUPipes;\n\n/**\n * Options for WebGPURenderer.\n * @memberof rendering\n */\nexport interface WebGPUOptions extends\n SharedRendererOptions,\n ExtractRendererOptions,\n PixiMixins.WebGPUOptions{}\n\nexport interface WebGPURenderer\n extends AbstractRenderer,\n WebGPUSystems {}\n\n/* eslint-disable max-len */\n/**\n * The WebGPU PixiJS Renderer. This renderer allows you to use the next-generation graphics API, WebGPU.\n * ```ts\n * // Create a new renderer\n * const renderer = new WebGPURenderer();\n * await renderer.init();\n *\n * // Add the renderer to the stage\n * document.body.appendChild(renderer.canvas);\n *\n * // Create a new stage\n * const stage = new Container();\n *\n * // Render the stage\n * renderer.render(stage);\n * ```\n *\n * You can use {@link rendering.autoDetectRenderer} to create a renderer that will automatically detect the best\n * renderer for the environment.\n * ```ts\n * // Create a new renderer\n * const renderer = await rendering.autoDetectRenderer();\n * ```\n *\n * The renderer is composed of systems that manage specific tasks. The following systems are added by default\n * whenever you create a WebGPU renderer:\n *\n * | WebGPU Core Systems | Systems that are specific to the WebGL renderer |\n * | ---------------------------------------- | ----------------------------------------------------------------------------- |\n * | {@link rendering.GpuUboSystem} | This manages WebGPU uniform buffer objects feature for shaders |\n * | {@link rendering.GpuEncoderSystem} | This manages the WebGPU command encoder |\n * | {@link rendering.GpuDeviceSystem} | This manages the WebGPU Device and its extensions |\n * | {@link rendering.GpuBufferSystem} | This manages buffers and their GPU resources, keeps everything in sync |\n * | {@link rendering.GpuTextureSystem} | This manages textures and their GPU resources, keeps everything in sync |\n * | {@link rendering.GpuRenderTargetSystem} | This manages what we render too. For example the screen, or another texture |\n * | {@link rendering.GpuShaderSystem} | This manages shaders, programs that run on the GPU to output lovely pixels |\n * | {@link rendering.GpuStateSystem} | This manages the state of the WebGPU Pipelines. eg the various flags that can be set blend modes / depthTesting etc |\n * | {@link rendering.PipelineSystem} | This manages the WebGPU pipelines, used for rendering |\n * | {@link rendering.GpuColorMaskSystem} | This manages the color mask. Used for color masking |\n * | {@link rendering.GpuStencilSystem} | This manages the stencil buffer. Used primarily for masking |\n * | {@link rendering.BindGroupSystem} | This manages the WebGPU bind groups. this is how data is bound to a shader when rendering |\n *\n * The breadth of the API surface provided by the renderer is contained within these systems.\n * @memberof rendering\n * @property {rendering.GpuUboSystem} ubo - UboSystem instance.\n * @property {rendering.GpuEncoderSystem} encoder - EncoderSystem instance.\n * @property {rendering.GpuDeviceSystem} device - DeviceSystem instance.\n * @property {rendering.GpuBufferSystem} buffer - BufferSystem instance.\n * @property {rendering.GpuTextureSystem} texture - TextureSystem instance.\n * @property {rendering.GpuRenderTargetSystem} renderTarget - RenderTargetSystem instance.\n * @property {rendering.GpuShaderSystem} shader - ShaderSystem instance.\n * @property {rendering.GpuStateSystem} state - StateSystem instance.\n * @property {rendering.PipelineSystem} pipeline - PipelineSystem instance.\n * @property {rendering.GpuColorMaskSystem} colorMask - ColorMaskSystem instance.\n * @property {rendering.GpuStencilSystem} stencil - StencilSystem instance.\n * @property {rendering.BindGroupSystem} bindGroup - BindGroupSystem instance.\n * @extends rendering.AbstractRenderer\n */\nexport class WebGPURenderer\n extends AbstractRenderer\n implements WebGPUSystems\n{\n /** The WebGPU Device. */\n public gpu: GPU;\n\n constructor()\n {\n const systemConfig = {\n name: 'webgpu',\n type: RendererType.WEBGPU,\n systems,\n renderPipes,\n renderPipeAdaptors,\n };\n\n super(systemConfig);\n }\n}\n","import { deprecation, v8_0_0 } from '../../../../utils/logging/deprecation';\n\n/**\n * The different topology types supported by the renderer used to describe how the geometry should be renderer\n * @memberof rendering\n */\nexport type Topology =\n 'point-list'\n | 'line-list'\n | 'line-strip'\n | 'triangle-list'\n | 'triangle-strip';\n\nconst DEPRECATED_DRAW_MODES = {\n POINTS: 'point-list',\n LINES: 'line-list',\n LINE_STRIP: 'line-strip',\n TRIANGLES: 'triangle-list',\n TRIANGLE_STRIP: 'triangle-strip',\n};\n\n/** @deprecated since 8.0.0 */\nexport const DRAW_MODES = new Proxy(DEPRECATED_DRAW_MODES, {\n get(target, prop: keyof typeof DEPRECATED_DRAW_MODES)\n {\n // #if _DEBUG\n deprecation(v8_0_0, `DRAW_MODES.${prop} is deprecated, use '${DEPRECATED_DRAW_MODES[prop]}' instead`);\n // #endif\n\n return target[prop];\n },\n});\n\n/**\n * The different types of vertex formats supported by the renderer\n * @memberof rendering\n */\nexport type VertexFormat =\n | 'uint8x2'\n | 'uint8x4'\n | 'sint8x2'\n | 'sint8x4'\n | 'unorm8x2'\n | 'unorm8x4'\n | 'snorm8x2'\n | 'snorm8x4'\n | 'uint16x2'\n | 'uint16x4'\n | 'sint16x2'\n | 'sint16x4'\n | 'unorm16x2'\n | 'unorm16x4'\n | 'snorm16x2'\n | 'snorm16x4'\n | 'float16x2'\n | 'float16x4'\n | 'float32'\n | 'float32x2'\n | 'float32x3'\n | 'float32x4'\n | 'uint32'\n | 'uint32x2'\n | 'uint32x3'\n | 'uint32x4'\n | 'sint32'\n | 'sint32x2'\n | 'sint32x3'\n | 'sint32x4';\n\n","import { Rectangle } from '../../../../maths/shapes/Rectangle';\n\nimport type { TextureSource } from '../texture/sources/TextureSource';\n\nconst fullFrame = new Rectangle(0, 0, 1, 1);\n\n/**\n * Takes a Texture source and a normalised frame\n * and returns a viewport for that frame.\n * @param viewport - The viewport rectangle to set.\n * @param source - The source to get the pixel width and height from.\n * @param frame - The frame to get the viewport from.\n * @returns the passed in viewport.\n */\nexport function viewportFromFrame(\n viewport: Rectangle,\n source: TextureSource,\n frame?: Rectangle\n)\n{\n frame ||= fullFrame;\n\n const pixelWidth = source.pixelWidth;\n const pixelHeight = source.pixelHeight;\n\n viewport.x = (frame.x * pixelWidth) | 0;\n viewport.y = (frame.y * pixelHeight) | 0;\n viewport.width = (frame.width * pixelWidth) | 0;\n viewport.height = (frame.height * pixelHeight) | 0;\n\n return viewport;\n}\n","/* eslint-disable @typescript-eslint/indent */\n\nimport { deprecation, v8_0_0 } from '../../../../utils/logging/deprecation';\n\n/**\n * Specifies the alpha composition mode for textures.\n *\n * - `no-premultiply-alpha`: Does not premultiply alpha.\n * - `premultiply-alpha-on-upload`: Premultiplies alpha on texture upload.\n * - `premultiplied-alpha`: Assumes the texture is already in premultiplied alpha format.\n * @typedef {'no-premultiply-alpha' | 'premultiply-alpha-on-upload' | 'premultiplied-alpha'} ALPHA_MODES\n */\nexport type ALPHA_MODES =\n 'no-premultiply-alpha' |\n 'premultiply-alpha-on-upload' |\n 'premultiplied-alpha';\n\n/**\n * Constants for multi-sampling antialiasing.\n * @see Framebuffer#multisample\n * @name MSAA_QUALITY\n * @static\n * @enum {number}\n * @property {number} NONE - No multisampling for this renderTexture\n * @property {number} LOW - Try 2 samples\n * @property {number} MEDIUM - Try 4 samples\n * @property {number} HIGH - Try 8 samples\n */\nexport enum MSAA_QUALITY\n // eslint-disable-next-line @typescript-eslint/indent\n{\n NONE = 0,\n LOW = 2,\n MEDIUM = 4,\n HIGH = 8\n}\n\nexport type TEXTURE_FORMATS =\n // eslint-disable-next-line @typescript-eslint/indent\n\n // 8-bit formats\n 'r8unorm' |\n 'r8snorm' |\n 'r8uint' |\n 'r8sint' |\n\n // 16-bit formats\n 'r16uint' |\n 'r16sint' |\n 'r16float' |\n 'rg8unorm' |\n 'rg8snorm' |\n 'rg8uint' |\n 'rg8sint' |\n\n // 32-bit formats\n 'r32uint' |\n 'r32sint' |\n 'r32float' |\n 'rg16uint' |\n 'rg16sint' |\n 'rg16float' |\n 'rgba8unorm' |\n 'rgba8unorm-srgb' |\n 'rgba8snorm' |\n 'rgba8uint' |\n 'rgba8sint' |\n 'bgra8unorm' |\n 'bgra8unorm-srgb' |\n // Packed 32-bit formats\n 'rgb9e5ufloat' |\n 'rgb10a2unorm' |\n 'rg11b10ufloat' |\n\n // 64-bit formats\n 'rg32uint' |\n 'rg32sint' |\n 'rg32float' |\n 'rgba16uint' |\n 'rgba16sint' |\n 'rgba16float' |\n\n // 128-bit formats\n 'rgba32uint' |\n 'rgba32sint' |\n 'rgba32float' |\n\n // Depth/stencil formats\n 'stencil8' |\n 'depth16unorm' |\n 'depth24plus' |\n 'depth24plus-stencil8' |\n 'depth32float' |\n\n // \"depth32float-stencil8\" feature\n 'depth32float-stencil8' |\n\n // BC compressed formats usable if \"texture-compression-bc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n 'bc1-rgba-unorm' |\n 'bc1-rgba-unorm-srgb' |\n 'bc2-rgba-unorm' |\n 'bc2-rgba-unorm-srgb' |\n 'bc3-rgba-unorm' |\n 'bc3-rgba-unorm-srgb' |\n 'bc4-r-unorm' |\n 'bc4-r-snorm' |\n 'bc5-rg-unorm' |\n 'bc5-rg-snorm' |\n 'bc6h-rgb-ufloat' |\n 'bc6h-rgb-float' |\n 'bc7-rgba-unorm' |\n 'bc7-rgba-unorm-srgb' |\n\n // ETC2 compressed formats usable if \"texture-compression-etc2\" is both\n // supported by the device/user agent and enabled in requestDevice.\n 'etc2-rgb8unorm' |\n 'etc2-rgb8unorm-srgb' |\n 'etc2-rgb8a1unorm' |\n 'etc2-rgb8a1unorm-srgb' |\n 'etc2-rgba8unorm' |\n 'etc2-rgba8unorm-srgb' |\n 'eac-r11unorm' |\n 'eac-r11snorm' |\n 'eac-rg11unorm' |\n 'eac-rg11snorm' |\n\n // ASTC compressed formats usable if \"texture-compression-astc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n 'astc-4x4-unorm' |\n 'astc-4x4-unorm-srgb' |\n 'astc-5x4-unorm' |\n 'astc-5x4-unorm-srgb' |\n 'astc-5x5-unorm' |\n 'astc-5x5-unorm-srgb' |\n 'astc-6x5-unorm' |\n 'astc-6x5-unorm-srgb' |\n 'astc-6x6-unorm' |\n 'astc-6x6-unorm-srgb' |\n 'astc-8x5-unorm' |\n 'astc-8x5-unorm-srgb' |\n 'astc-8x6-unorm' |\n 'astc-8x6-unorm-srgb' |\n 'astc-8x8-unorm' |\n 'astc-8x8-unorm-srgb' |\n 'astc-10x5-unorm' |\n 'astc-10x5-unorm-srgb' |\n 'astc-10x6-unorm' |\n 'astc-10x6-unorm-srgb' |\n 'astc-10x8-unorm' |\n 'astc-10x8-unorm-srgb' |\n 'astc-10x10-unorm' |\n 'astc-10x10-unorm-srgb' |\n 'astc-12x10-unorm' |\n 'astc-12x10-unorm-srgb' |\n 'astc-12x12-unorm' |\n 'astc-12x12-unorm-srgb';\n\nexport type TEXTURE_VIEW_DIMENSIONS =\n '1d' |\n '2d' |\n '2d-array' |\n 'cube' |\n 'cube-array' |\n '3d';\n\nexport type TEXTURE_DIMENSIONS =\n | '1d'\n | '2d'\n | '3d';\n\nexport type WRAP_MODE =\n /**\n * The texture uvs are clamped\n * @default 33071\n */\n | 'clamp-to-edge'\n /**\n * The texture uvs tile and repeat\n * @default 10497\n */\n | 'repeat'\n /**\n * The texture uvs tile and repeat with mirroring\n * @default 33648\n */\n | 'mirror-repeat';\n\nexport enum DEPRECATED_WRAP_MODES\n{\n CLAMP = 'clamp-to-edge',\n\n REPEAT = 'repeat',\n\n MIRRORED_REPEAT = 'mirror-repeat',\n}\n\n/** @deprecated since 8.0.0 */\nexport const WRAP_MODES = new Proxy(DEPRECATED_WRAP_MODES, {\n get(target, prop: keyof typeof DEPRECATED_WRAP_MODES)\n {\n // #if _DEBUG\n deprecation(v8_0_0, `DRAW_MODES.${prop} is deprecated, use '${DEPRECATED_WRAP_MODES[prop]}' instead`);\n // #endif\n\n return target[prop];\n },\n});\n\n/**\n * The scale modes that are supported by pixi.\n *\n * The {@link 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 * @static\n */\nexport type SCALE_MODE =\n /** Pixelating scaling */\n | 'nearest'\n /** Smooth scaling */\n | 'linear';\n\nexport enum DEPRECATED_SCALE_MODES\n{\n NEAREST = 'nearest',\n LINEAR = 'linear',\n}\n\n/**\n * @deprecated since 8.0.0\n */\nexport const SCALE_MODES = new Proxy(DEPRECATED_SCALE_MODES, {\n get(target, prop: keyof typeof DEPRECATED_SCALE_MODES)\n {\n // #if _DEBUG\n deprecation(v8_0_0, `DRAW_MODES.${prop} is deprecated, use '${DEPRECATED_SCALE_MODES[prop]}' instead`);\n // #endif\n\n return target[prop];\n },\n});\n\nexport type COMPARE_FUNCTION =\n | 'never'\n | 'less'\n | 'equal'\n | 'less-equal'\n | 'greater'\n | 'not-equal'\n | 'greater-equal'\n | 'always';\n","import { groupD8 } from '../../../../maths/matrix/groupD8';\n\nimport type { Size } from '../../../../maths/misc/Size';\nimport type { Rectangle } from '../../../../maths/shapes/Rectangle';\n\n/**\n * Stores a texture's frame in UV coordinates, in\n * which everything lies in the rectangle `[(0,0), (1,0),\n * (1,1), (0,1)]`.\n *\n * | Corner | Coordinates |\n * |--------------|-------------|\n * | Top-Left | `(x0,y0)` |\n * | Top-Right | `(x1,y1)` |\n * | Bottom-Right | `(x2,y2)` |\n * | Bottom-Left | `(x3,y3)` |\n * @protected\n * @memberof rendering\n */\nexport class TextureUvs\n{\n /** X-component of top-left corner `(x0,y0)`. */\n public x0: number;\n\n /** Y-component of top-left corner `(x0,y0)`. */\n public y0: number;\n\n /** X-component of top-right corner `(x1,y1)`. */\n public x1: number;\n\n /** Y-component of top-right corner `(x1,y1)`. */\n public y1: number;\n\n /** X-component of bottom-right corner `(x2,y2)`. */\n public x2: number;\n\n /** Y-component of bottom-right corner `(x2,y2)`. */\n public y2: number;\n\n /** X-component of bottom-left corner `(x3,y3)`. */\n public x3: number;\n\n /** Y-component of bottom-right corner `(x3,y3)`. */\n public y3: number;\n public uvsFloat32: Float32Array;\n\n constructor()\n {\n this.x0 = 0;\n this.y0 = 0;\n this.x1 = 1;\n this.y1 = 0;\n this.x2 = 1;\n this.y2 = 1;\n this.x3 = 0;\n this.y3 = 1;\n\n this.uvsFloat32 = new Float32Array(8);\n }\n\n /**\n * Sets the texture Uvs based on the given frame information.\n * @protected\n * @param frame - The frame of the texture\n * @param baseFrame - The base frame of the texture\n * @param rotate - Rotation of frame, see {@link groupD8}\n */\n public set(frame: Rectangle, baseFrame: Size, rotate: number): void\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.uvsFloat32[0] = this.x0;\n this.uvsFloat32[1] = this.y0;\n this.uvsFloat32[2] = this.x1;\n this.uvsFloat32[3] = this.y1;\n this.uvsFloat32[4] = this.x2;\n this.uvsFloat32[5] = this.y2;\n this.uvsFloat32[6] = this.x3;\n this.uvsFloat32[7] = this.y3;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/core:TextureUvs `\n + `x0=${this.x0} y0=${this.y0} `\n + `x1=${this.x1} y1=${this.y1} x2=${this.x2} `\n + `y2=${this.y2} x3=${this.x3} y3=${this.y3}`\n + `]`;\n }\n // #endif\n}\n","let uidCount = 0;\n\nexport function generateUID(): number\n{\n return uidCount++;\n}\n","export function parseFunctionBody(fn: (...args: any[]) => any): string\n{\n const fnStr = fn.toString();\n const bodyStart = fnStr.indexOf('{');\n const bodyEnd = fnStr.lastIndexOf('}');\n\n if (bodyStart === -1 || bodyEnd === -1)\n {\n throw new Error('getFunctionBody: No body found in function definition');\n }\n\n return fnStr.slice(bodyStart + 1, bodyEnd).trim();\n}\n","import { Bounds, type BoundsData } from './bounds/Bounds';\nimport { Container } from './Container';\n\nimport type { Point } from '../../maths/point/Point';\nimport type { Instruction } from '../../rendering/renderers/shared/instructions/Instruction';\nimport type { View } from '../../rendering/renderers/shared/view/View';\nimport type { Renderer } from '../../rendering/renderers/types';\nimport type { ContainerOptions } from './Container';\n\ntype RenderFunction = (renderer: Renderer) => void;\n\n/**\n * Options for the {@link scene.RenderContainer} constructor.\n * @memberof scene\n */\nexport interface RenderContainerOptions extends ContainerOptions\n{\n /** the optional custom render function if you want to inject the function via the constructor */\n render?: RenderFunction;\n /** how to know if the custom render logic contains a point or not, used for interaction */\n containsPoint?: (point: Point) => boolean;\n /** how to add the bounds of this object when measuring */\n addBounds?: (bounds: BoundsData) => void;\n}\n\n/**\n * A container that allows for custom rendering logic. Its essentially calls the render function each frame\n * and allows for custom rendering logic - the render could be a WebGL renderer or WebGPU render or even a canvas render.\n * Its up to you to define the logic.\n *\n * This can be used in two ways, either by extending the class and overriding the render method,\n * or by passing a custom render function\n * @example\n * ```js\n * import { RenderContainer } from 'pixi.js';\n *\n * // extend the class\n * class MyRenderContainer extends RenderContainer\n * {\n * render(renderer)\n * {\n * renderer.clear({\n * clearColor: 'green', // clear the screen to green when rendering this item\n * });\n * }\n * }\n *\n * // override the render method\n * const renderContainer = new RenderContainer(\n * (renderer) => {\n * renderer.clear({\n * clearColor: 'green', // clear the screen to green when rendering this item\n * });\n * })\n * ```\n * @memberof scene\n * @extends scene.Container\n */\nexport class RenderContainer extends Container implements View, Instruction\n{\n public batched = false;\n /**\n * Whether or not to round the x/y position of the sprite.\n * @type {boolean}\n */\n public roundPixels: boolean;\n public _roundPixels: 0 | 1;\n\n /**\n * The local bounds of the sprite.\n * @type {rendering.Bounds}\n */\n public bounds = new Bounds();\n /**\n * Checks if the object contains the given point.\n * @param point - The point to check\n */\n public containsPoint: (point: Point) => boolean;\n /**\n * Adds the bounds of this text to the bounds object.\n * @param bounds - The output bounds object.\n */\n public addBounds: (bounds: Bounds) => void;\n\n public canBundle = false;\n public renderPipeId = 'customRender';\n\n /**\n * @param options - The options for the container.\n */\n constructor(options: RenderContainerOptions | RenderFunction)\n {\n if (typeof options === 'function')\n {\n options = { render: options };\n }\n\n const { render, ...rest } = options;\n\n super({\n label: 'RenderContainer',\n ...rest,\n });\n\n if (render) this.render = render;\n\n this.containsPoint = options.containsPoint ?? (() => false);\n this.addBounds = options.addBounds ?? (() => false);\n }\n\n /**\n * An overrideable function that can be used to render the object using the current renderer.\n * @param _renderer - The current renderer\n */\n public render(_renderer: Renderer): void\n {\n // override me!\n }\n}\n","import type { Matrix } from '../../../maths/matrix/Matrix';\nimport type { Container } from '../Container';\n\nexport function updateLocalTransform(lt: Matrix, container: Container): void\n{\n const scale = container._scale;\n const pivot = container._pivot;\n const position = container._position;\n\n const sx = scale._x;\n const sy = scale._y;\n\n const px = pivot._x;\n const py = pivot._y;\n\n // get the matrix values of the container based on its this properties..\n lt.a = container._cx * sx;\n lt.b = container._sx * sx;\n lt.c = container._cy * sy;\n lt.d = container._sy * sy;\n\n lt.tx = position._x - ((px * lt.a) + (py * lt.c));\n lt.ty = position._y - ((px * lt.b) + (py * lt.d));\n}\n","import type { Matrix } from '../../../maths/matrix/Matrix';\n\nexport function updateWorldTransform(local: Matrix, parent: Matrix, world: Matrix): void\n{\n const lta = local.a;\n const ltb = local.b;\n const ltc = local.c;\n const ltd = local.d;\n const lttx = local.tx;\n const ltty = local.ty;\n\n const pta = parent.a;\n const ptb = parent.b;\n const ptc = parent.c;\n const ptd = parent.d;\n\n world.a = (lta * pta) + (ltb * ptc);\n world.b = (lta * ptb) + (ltb * ptd);\n world.c = (ltc * pta) + (ltd * ptc);\n world.d = (ltc * ptb) + (ltd * ptd);\n world.tx = (lttx * pta) + (ltty * ptc) + parent.tx;\n world.ty = (lttx * ptb) + (ltty * ptd) + parent.ty;\n}\n","import { buildSimpleUvs, buildUvs } from '../../../../rendering/renderers/shared/geometry/utils/buildUvs';\nimport { transformVertices } from '../../../../rendering/renderers/shared/geometry/utils/transformVertices';\nimport { MeshGeometry } from '../../../mesh/shared/MeshGeometry';\nimport { buildCircle } from '../buildCommands/buildCircle';\nimport { buildPolygon } from '../buildCommands/buildPolygon';\nimport { buildRectangle } from '../buildCommands/buildRectangle';\nimport { buildTriangle } from '../buildCommands/buildTriangle';\nimport { GraphicsPath } from '../path/GraphicsPath';\n\nimport type { Matrix } from '../../../../maths/matrix/Matrix';\nimport type { ShapeBuildCommand } from '../buildCommands/ShapeBuildCommand';\n\nconst buildMap: Record = {\n rectangle: buildRectangle,\n polygon: buildPolygon,\n triangle: buildTriangle,\n circle: buildCircle,\n ellipse: buildCircle,\n roundedRectangle: buildCircle,\n};\n\nexport interface GeometryPathOptions\n{\n /** the path to build the geometry from */\n path: GraphicsPath\n /** a `Matrix` that can be used to modify the the texture UVs of the the path being built */\n textureMatrix?: Matrix\n /** an optional `MeshGeometry` to write too instead of creating a new one*/\n out?: MeshGeometry\n}\n\n/**\n * When building a mesh, it helps to leverage the simple API we have in `GraphicsPath` as it can often be easier to\n * to define the geometry in a more human readable way. This function takes a `GraphicsPath` and returns a `MeshGeometry`.\n * @example\n * ```ts\n *\n * const path = new GraphicsPath()\n * .drawRect(0, 0, 100, 100)\n *\n * const geometry:MeshGeometry = buildGeometryFromPath(path);\n *\n * const mesh = new Mesh({geometry});\n *\n * ```\n * You can also pass in a Matrix to transform the uvs as by defualt you may want to control how they are set up.\n * @param options - either a `GraphicsPath` or `GeometryPathOptions`\n * @returns a new `MeshGeometry` instance build from the path\n */\nexport function buildGeometryFromPath(options: GraphicsPath | GeometryPathOptions): MeshGeometry\n{\n if (options instanceof GraphicsPath)\n {\n options = {\n path: options,\n textureMatrix: null,\n out: null,\n };\n }\n\n const vertices: number[] = [];\n const uvs: number[] = [];\n const indices: number[] = [];\n\n // build path collection of polygons and shapes points..\n const shapePath = options.path.shapePath;\n const textureMatrix = options.textureMatrix;\n\n shapePath.shapePrimitives.forEach(({ shape, transform: matrix }) =>\n {\n const indexOffset = indices.length;\n const vertOffset = vertices.length / 2;\n\n const points: number[] = [];\n\n const build = buildMap[shape.type];\n\n build.build(shape, points);\n\n if (matrix)\n {\n transformVertices(points, matrix);\n }\n\n build.triangulate(points, vertices, 2, vertOffset, indices, indexOffset);\n\n const uvsOffset = uvs.length / 2;\n\n if (textureMatrix)\n {\n // todo can prolly do this before calculating uvs..\n if (matrix)\n {\n textureMatrix.append(matrix.clone().invert());\n }\n\n buildUvs(vertices, 2, vertOffset, uvs, uvsOffset, 2, (vertices.length / 2) - vertOffset, textureMatrix);\n }\n else\n {\n buildSimpleUvs(uvs, uvsOffset, 2, (vertices.length / 2) - vertOffset);\n }\n });\n\n const out = options.out;\n\n if (out)\n {\n out.positions = new Float32Array(vertices);\n out.uvs = new Float32Array(uvs);\n out.indices = new Uint32Array(indices);\n\n return out;\n }\n\n const geometry = new MeshGeometry({\n positions: new Float32Array(vertices),\n uvs: new Float32Array(uvs),\n indices: new Uint32Array(indices),\n });\n\n return geometry;\n}\n","import { definedProps } from '../container/utils/definedProps';\nimport { Mesh } from '../mesh/shared/Mesh';\nimport { PlaneGeometry } from './PlaneGeometry';\n\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport type { DestroyOptions } from '../container/destroyTypes';\nimport type { MeshOptions } from '../mesh/shared/Mesh';\n\n/**\n * Constructor options used for `MeshPlane` instances.\n * ```js\n * const meshPlane = new MeshPlane({\n * texture: Texture.from('snake.png'),\n * verticesX: 20,\n * verticesY: 20,\n * });\n * ```\n * @see {@link scene.MeshPlane}\n * @memberof scene\n */\nexport interface MeshPlaneOptions extends Omit\n{\n /** The texture to use on the plane. */\n texture: Texture;\n /** The number of vertices in the x-axis */\n verticesX?: number;\n /** The number of vertices in the y-axis */\n verticesY?: number;\n}\n\n/**\n * The MeshPlane allows you to draw a texture across several points and then manipulate these points\n * @example\n * import { Point, MeshPlane, Texture } from 'pixi.js';\n *\n * for (let i = 0; i < 20; i++) {\n * points.push(new Point(i * 50, 0));\n * }\n * const MeshPlane = new MeshPlane({ texture: Texture.from('snake.png'), verticesX: points });\n * @memberof scene\n */\nexport class MeshPlane extends Mesh\n{\n /** The geometry is automatically updated when the texture size changes. */\n public autoResize: boolean;\n protected _textureID: number;\n\n /**\n * @param options - Options to be applied to MeshPlane\n */\n constructor(options: MeshPlaneOptions)\n {\n const { texture, verticesX, verticesY, ...rest } = options;\n const planeGeometry = new PlaneGeometry(definedProps({\n width: texture.width,\n height: texture.height,\n verticesX,\n verticesY,\n }));\n\n super(definedProps({ ...rest, geometry: planeGeometry, texture }));\n\n // lets call the setter to ensure all necessary updates are performed\n this.texture = texture;\n this.autoResize = true;\n }\n\n /**\n * Method used for overrides, to do something in case texture frame was changed.\n * Meshes based on plane can override it and change more details based on texture.\n */\n public textureUpdated(): void\n {\n const geometry: PlaneGeometry = this.geometry as any;\n const { width, height } = this.texture;\n\n if (this.autoResize && (geometry.width !== width || geometry.height !== height))\n {\n geometry.width = width;\n geometry.height = height;\n geometry.build({});\n }\n }\n\n set texture(value: Texture)\n {\n this._texture?.off('update', this.textureUpdated, this);\n\n super.texture = value;\n\n value.on('update', this.textureUpdated, this);\n\n this.textureUpdated();\n }\n\n /** The texture of the MeshPlane */\n get texture(): Texture\n {\n return this._texture;\n }\n\n /**\n * Destroys this sprite renderable and optionally its texture.\n * @param options - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.texture=false] - Should it destroy the current texture of the renderable as well\n * @param {boolean} [options.textureSource=false] - Should it destroy the textureSource of the renderable as well\n */\n public destroy(options?: DestroyOptions): void\n {\n this.texture.off('update', this.textureUpdated, this);\n super.destroy(options);\n }\n}\n","import { MeshGeometry } from '../mesh/shared/MeshGeometry';\n\nimport type { PointData } from '../../maths/point/PointData';\nimport type { MeshGeometryOptions } from '../mesh/shared/MeshGeometry';\n\n/**\n * Constructor options used for `RopeGeometry` instances.\n * ```js\n * const ropeGeometry = new RopeGeometry({\n * points: [new Point(0, 0), new Point(100, 0)],\n * width: 10,\n * textureScale: 0,\n * });\n * ```\n * @see {@link scene.RopeGeometry}\n * @memberof scene\n */\nexport interface RopeGeometryOptions\n{\n /** The width (i.e., thickness) of the rope. */\n width?: number;\n /** An array of points that determine the rope. */\n points?: PointData[];\n /**\n * Rope texture scale, if zero then the rope texture is stretched.\n * By default the rope texture will be stretched to match\n * rope length. If textureScale is positive this value will be treated as a scaling\n * factor and the texture will preserve its aspect ratio instead. To create a tiling rope\n * set baseTexture.wrapMode to 'repeat' and use a power of two texture,\n * then set textureScale=1 to keep the original texture pixel size.\n * In order to reduce alpha channel artifacts provide a larger texture and downsample -\n * i.e. set textureScale=0.5 to scale it down twice.\n */\n textureScale?: number;\n}\n\n/**\n * RopeGeometry allows you to draw a geometry across several points and then manipulate these points.\n * @example\n * import { Point, RopeGeometry } from 'pixi.js';\n *\n * for (let i = 0; i < 20; i++) {\n * points.push(new Point(i * 50, 0));\n * };\n * const rope = new RopeGeometry(100, points);\n * @memberof scene\n */\nexport class RopeGeometry extends MeshGeometry\n{\n /** Default options for RopeGeometry constructor. */\n public static defaultOptions: RopeGeometryOptions & MeshGeometryOptions = {\n /** The width (i.e., thickness) of the rope. */\n width: 200,\n /** An array of points that determine the rope. */\n points: [],\n /** Rope texture scale, if zero then the rope texture is stretched. */\n textureScale: 0,\n };\n\n /** An array of points that determine the rope. */\n public points: PointData[];\n\n /** Rope texture scale, if zero then the rope texture is stretched. */\n public readonly textureScale: number;\n\n /**\n * The width (i.e., thickness) of the rope.\n * @readonly\n */\n public _width: number;\n\n /**\n * @param options - Options to be applied to rope geometry\n */\n constructor(options: RopeGeometryOptions)\n {\n const { width, points, textureScale } = { ...RopeGeometry.defaultOptions, ...options };\n\n super({\n positions: new Float32Array(points.length * 4),\n uvs: new Float32Array(points.length * 4),\n indices: new Uint32Array((points.length - 1) * 6),\n });\n\n this.points = points;\n this._width = width;\n this.textureScale = textureScale;\n\n this._build();\n }\n\n /**\n * The width (i.e., thickness) of the rope.\n * @readonly\n */\n get width(): number\n {\n return this._width;\n }\n\n /** Refreshes Rope indices and uvs */\n private _build(): void\n {\n const points = this.points;\n\n if (!points) return;\n\n const vertexBuffer = this.getBuffer('aPosition');\n const uvBuffer = this.getBuffer('aUV');\n const indexBuffer = this.getIndex();\n\n // if too little points, or texture hasn't got UVs set yet just move on.\n if (points.length < 1)\n {\n return;\n }\n\n // if the number of points has changed we will need to recreate the arraybuffers\n if (vertexBuffer.data.length / 4 !== points.length)\n {\n vertexBuffer.data = new Float32Array(points.length * 4);\n uvBuffer.data = new Float32Array(points.length * 4);\n indexBuffer.data = new Uint16Array((points.length - 1) * 6);\n }\n\n const uvs = uvBuffer.data;\n const indices = indexBuffer.data;\n\n uvs[0] = 0;\n uvs[1] = 0;\n uvs[2] = 0;\n uvs[3] = 1;\n\n let amount = 0;\n let prev = points[0];\n const textureWidth = this._width * this.textureScale;\n const total = points.length; // - 1;\n\n for (let i = 0; i < total; i++)\n {\n // time to do some smart drawing!\n const index = i * 4;\n\n if (this.textureScale > 0)\n {\n // calculate pixel distance from previous point\n const dx = prev.x - points[i].x;\n const dy = prev.y - points[i].y;\n const distance = Math.sqrt((dx * dx) + (dy * dy));\n\n prev = points[i];\n amount += distance / textureWidth;\n }\n else\n {\n // stretch texture\n amount = i / (total - 1);\n }\n\n uvs[index] = amount;\n uvs[index + 1] = 0;\n\n uvs[index + 2] = amount;\n uvs[index + 3] = 1;\n }\n\n let indexCount = 0;\n\n for (let i = 0; i < total - 1; i++)\n {\n const index = i * 2;\n\n indices[indexCount++] = index;\n indices[indexCount++] = index + 1;\n indices[indexCount++] = index + 2;\n\n indices[indexCount++] = index + 2;\n indices[indexCount++] = index + 1;\n indices[indexCount++] = index + 3;\n }\n\n // ensure that the changes are uploaded\n uvBuffer.update();\n indexBuffer.update();\n\n this.updateVertices();\n }\n\n /** refreshes vertices of Rope mesh */\n public updateVertices(): void\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 const vertices = this.buffers[0].data;\n const total = points.length;\n const halfWidth = this.textureScale > 0 ? this.textureScale * this._width / 2 : this._width / 2;\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\n if (perpLength < 1e-6)\n {\n perpX = 0;\n perpY = 0;\n }\n else\n {\n perpX /= perpLength;\n perpY /= perpLength;\n\n perpX *= halfWidth;\n perpY *= halfWidth;\n }\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 this.buffers[0].update();\n }\n\n /** Refreshes Rope indices and uvs */\n public update(): void\n {\n if (this.textureScale > 0)\n {\n this._build(); // we need to update UVs\n }\n else\n {\n this.updateVertices();\n }\n }\n}\n","import { definedProps } from '../container/utils/definedProps';\nimport { Mesh } from '../mesh/shared/Mesh';\nimport { RopeGeometry } from './RopeGeometry';\n\nimport type { PointData } from '../../maths/point/PointData';\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport type { MeshOptions } from '../mesh/shared/Mesh';\n\n/**\n * Constructor options used for `MeshRope` instances.\n * ```js\n * const meshRope = new MeshRope({\n * texture: Texture.from('snake.png'),\n * points: [new Point(0, 0), new Point(100, 0)],\n * textureScale: 0,\n * });\n * ```\n * @see {@link scene.MeshRope}\n * @memberof scene\n */\nexport interface MeshRopeOptions extends Omit\n{\n /** The texture to use on the rope. */\n texture: Texture;\n /** An array of points that determine the rope. */\n points: PointData[];\n /**\n * Rope texture scale, if zero then the rope texture is stretched.\n * Positive values scale rope texture\n * keeping its aspect ratio. You can reduce alpha channel artifacts by providing a larger texture\n * and downsampling here. If set to zero, texture will be stretched instead.\n */\n textureScale?: number;\n}\n\n/**\n * The rope allows you to draw a texture across several points and then manipulate these points\n * @example\n * import { Point, MeshRope, Texture } from 'pixi.js';\n *\n * for (let i = 0; i < 20; i++) {\n * points.push(new Point(i * 50, 0));\n * };\n * const rope = new MeshRope(Texture.from('snake.png'), points);\n * @memberof scene\n */\nexport class MeshRope extends Mesh\n{\n public static defaultOptions: Partial = {\n textureScale: 0,\n };\n\n /** re-calculate vertices by rope points each frame */\n public autoUpdate: boolean;\n\n /**\n * Note: The wrap mode of the texture is set to REPEAT if `textureScale` is positive.\n * @param options\n * @param options.texture - The texture to use on the rope.\n * @param options.points - An array of {@link math.Point} objects to construct this rope.\n * @param {number} options.textureScale - Optional. Positive values scale rope texture\n * keeping its aspect ratio. You can reduce alpha channel artifacts by providing a larger texture\n * and downsampling here. If set to zero, texture will be stretched instead.\n */\n constructor(options: MeshRopeOptions)\n {\n const { texture, points, textureScale, ...rest } = { ...MeshRope.defaultOptions, ...options };\n const ropeGeometry = new RopeGeometry(definedProps({ width: texture.height, points, textureScale }));\n\n if (textureScale > 0)\n {\n // attempt to set UV wrapping, will fail on non-power of two textures\n texture.source.style.addressMode = 'repeat';\n }\n super(definedProps({\n ...rest,\n texture,\n geometry: ropeGeometry,\n }));\n\n this.autoUpdate = true;\n\n this.onRender = this._render;\n }\n\n private _render(): void\n {\n const geometry: RopeGeometry = this.geometry as any;\n\n if (this.autoUpdate || geometry._width !== this.texture.height)\n {\n geometry._width = this.texture.height;\n geometry.update();\n }\n }\n}\n","import { definedProps } from '../container/utils/definedProps';\nimport { Mesh } from '../mesh/shared/Mesh';\nimport { MeshGeometry } from '../mesh/shared/MeshGeometry';\n\nimport type { TypedArray } from '../../rendering/renderers/shared/buffer/Buffer';\nimport type { Topology } from '../../rendering/renderers/shared/geometry/const';\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport type { MeshOptions } from '../mesh/shared/Mesh';\n\n/**\n * Options for the simple mesh.\n * @memberof scene\n */\nexport interface SimpleMeshOptions extends Omit\n{\n /** The texture to use */\n texture: Texture,\n /** if you want to specify the vertices */\n vertices?: Float32Array,\n /** if you want to specify the uvs */\n uvs?: Float32Array,\n /** if you want to specify the indices */\n indices?: Uint32Array,\n /** the topology, can be any of the Topology values */\n topology?: Topology\n}\n\n/**\n * The Simple Mesh class mimics Mesh in PixiJS, providing easy-to-use constructor arguments.\n * For more robust customization, use {@link scene.Mesh}.\n * @memberof scene\n */\nexport class MeshSimple extends Mesh\n{\n /** Upload vertices buffer each frame. */\n public autoUpdate: boolean;\n\n /**\n * @param options - Options to be used for construction\n */\n constructor(options: SimpleMeshOptions)\n {\n const { texture, vertices, uvs, indices, topology, ...rest } = options;\n const geometry = new MeshGeometry(definedProps({\n positions: vertices,\n uvs,\n indices,\n topology\n }));\n\n // geometry.getBuffer('aPosition').static = false;\n\n super(definedProps({\n ...rest,\n texture,\n geometry,\n }));\n\n this.autoUpdate = true;\n this.onRender = this._render;\n }\n\n /**\n * Collection of vertices data.\n * @type {Float32Array}\n */\n get vertices(): TypedArray\n {\n return this.geometry.getBuffer('aPosition').data;\n }\n set vertices(value: TypedArray)\n {\n this.geometry.getBuffer('aPosition').data = value;\n }\n\n private _render(): void\n {\n if (this.autoUpdate)\n {\n this.geometry.getBuffer('aPosition').update();\n }\n }\n}\n","import type { Matrix } from '../../../maths/matrix/Matrix';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\n\nexport function getTextureDefaultMatrix(texture: Texture, out: Matrix): Matrix\n{\n const { width, height } = texture.frame;\n\n out.scale(1 / width, 1 / height);\n\n return out;\n}\n","import { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport { deprecation, v8_0_0 } from '../../utils/logging/deprecation';\nimport { Container } from '../container/Container';\nimport { NineSliceGeometry } from './NineSliceGeometry';\n\nimport type { Point } from '../../maths/point/Point';\nimport type { View } from '../../rendering/renderers/shared/view/View';\nimport type { Bounds, BoundsData } from '../container/bounds/Bounds';\nimport type { ContainerOptions } from '../container/Container';\nimport type { DestroyOptions } from '../container/destroyTypes';\n\n/**\n * Constructor options used for `NineSliceSprite` instances.\n * ```js\n * const nineSliceSprite = new NineSliceSprite({\n * texture: Texture.from('button.png'),\n * leftWidth: 20,\n * topHeight: 20,\n * rightWidth: 20,\n * bottomHeight: 20,\n * });\n * ```\n * @see {@link scene.NineSliceSprite}\n * @memberof scene\n */\nexport interface NineSliceSpriteOptions extends ContainerOptions\n{\n /** The texture to use on the NineSliceSprite. */\n texture: Texture;\n /** Width of the left vertical bar (A) */\n leftWidth?: number;\n /** Height of the top horizontal bar (C) */\n topHeight?: number;\n /** Width of the right vertical bar (B) */\n rightWidth?: number;\n /** Height of the bottom horizontal bar (D) */\n bottomHeight?: number;\n /** Width of the NineSliceSprite, setting this will actually modify the vertices and not the UV's of this plane. */\n width?: number;\n /** Height of the NineSliceSprite, setting this will actually modify the vertices and not UV's of this plane. */\n height?: number;\n /** Whether or not to round the x/y position. */\n roundPixels?: boolean;\n}\n\n/**\n * The NineSliceSprite 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 *
\n *      A                          B\n *    +---+----------------------+---+\n *  C | 1 |          2           | 3 |\n *    +---+----------------------+---+\n *    |   |                      |   |\n *    | 4 |          5           | 6 |\n *    |   |                      |   |\n *    +---+----------------------+---+\n *  D | 7 |          8           | 9 |\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 * 
\n * @example\n * import { NineSliceSprite, Texture } from 'pixi.js';\n *\n * const plane9 = new NineSliceSprite(Texture.from('BoxWithRoundedCorners.png'), 15, 15, 15, 15);\n * @memberof scene\n */\nexport class NineSliceSprite extends Container implements View\n{\n /** The default options, used to override the initial values of any options passed in the constructor. */\n public static defaultOptions: NineSliceSpriteOptions = {\n /** @default Texture.EMPTY */\n texture: Texture.EMPTY,\n };\n\n public _roundPixels: 0 | 1 = 0;\n public readonly renderPipeId = 'nineSliceSprite';\n public _texture: Texture;\n\n public batched = true;\n\n private _leftWidth: number;\n private _topHeight: number;\n private _rightWidth: number;\n private _bottomHeight: number;\n private _width: number;\n private _height: number;\n\n public _didSpriteUpdate = true;\n\n public bounds: BoundsData = { minX: 0, minY: 0, maxX: 0, maxY: 0 };\n\n /**\n * @param {scene.NineSliceSpriteOptions|Texture} options - Options to use\n * @param options.texture - The texture to use on the NineSliceSprite.\n * @param options.leftWidth - Width of the left vertical bar (A)\n * @param options.topHeight - Height of the top horizontal bar (C)\n * @param options.rightWidth - Width of the right vertical bar (B)\n * @param options.bottomHeight - Height of the bottom horizontal bar (D)\n * @param options.width - Width of the NineSliceSprite,\n * setting this will actually modify the vertices and not the UV's of this plane.\n * @param options.height - Height of the NineSliceSprite,\n * setting this will actually modify the vertices and not UV's of this plane.\n */\n constructor(options: NineSliceSpriteOptions | Texture)\n {\n if ((options instanceof Texture))\n {\n options = { texture: options };\n }\n\n const {\n width,\n height,\n leftWidth,\n rightWidth,\n topHeight,\n bottomHeight,\n texture,\n roundPixels,\n ...rest\n } = options;\n\n super({\n label: 'NineSliceSprite',\n ...rest\n });\n\n this._leftWidth = leftWidth ?? texture?.defaultBorders?.left ?? NineSliceGeometry.defaultOptions.leftWidth;\n this._topHeight = topHeight ?? texture?.defaultBorders?.top ?? NineSliceGeometry.defaultOptions.topHeight;\n this._rightWidth = rightWidth ?? texture?.defaultBorders?.right ?? NineSliceGeometry.defaultOptions.rightWidth;\n this._bottomHeight = bottomHeight\n ?? texture?.defaultBorders?.bottom\n ?? NineSliceGeometry.defaultOptions.bottomHeight;\n this.bounds.maxX = this._width = width ?? texture.width ?? NineSliceGeometry.defaultOptions.width;\n this.bounds.maxY = this._height = height ?? texture.height ?? NineSliceGeometry.defaultOptions.height;\n\n this.allowChildren = false;\n this.texture = texture ?? NineSliceSprite.defaultOptions.texture;\n this.roundPixels = roundPixels ?? false;\n }\n\n /** The width of the NineSliceSprite, setting this will actually modify the vertices and UV's of this plane. */\n get width(): number\n {\n return this._width;\n }\n\n set width(value: number)\n {\n this.bounds.maxX = this._width = value;\n this.onViewUpdate();\n }\n\n /** The height of the NineSliceSprite, setting this will actually modify the vertices and UV's of this plane. */\n get height(): number\n {\n return this._height;\n }\n\n set height(value: number)\n {\n this.bounds.maxY = this._height = value;\n this.onViewUpdate();\n }\n\n /** The width of the left column (a) of the NineSliceSprite. */\n get leftWidth(): number\n {\n return this._leftWidth;\n }\n\n set leftWidth(value: number)\n {\n this._leftWidth = value;\n\n this.onViewUpdate();\n }\n\n /** The width of the right column (b) of the NineSliceSprite. */\n get topHeight(): number\n {\n return this._topHeight;\n }\n\n set topHeight(value: number)\n {\n this._topHeight = value;\n this.onViewUpdate();\n }\n\n /** The width of the right column (b) of the NineSliceSprite. */\n get rightWidth(): number\n {\n return this._rightWidth;\n }\n\n set rightWidth(value: number)\n {\n this._rightWidth = value;\n this.onViewUpdate();\n }\n\n /** The width of the right column (b) of the NineSliceSprite. */\n get bottomHeight(): number\n {\n return this._bottomHeight;\n }\n\n set bottomHeight(value: number)\n {\n this._bottomHeight = value;\n this.onViewUpdate();\n }\n\n /** The texture that the NineSliceSprite is using. */\n get texture(): Texture\n {\n return this._texture;\n }\n\n set texture(value: Texture)\n {\n value ||= Texture.EMPTY;\n\n const currentTexture = this._texture;\n\n if (currentTexture === value) return;\n\n if (currentTexture && currentTexture.dynamic) currentTexture.off('update', this.onViewUpdate, this);\n if (value.dynamic) value.on('update', this.onViewUpdate, this);\n\n this._texture = value;\n\n this.onViewUpdate();\n }\n\n /**\n * Whether or not to round the x/y position of the sprite.\n * @type {boolean}\n */\n get roundPixels()\n {\n return !!this._roundPixels;\n }\n\n set roundPixels(value: boolean)\n {\n this._roundPixels = value ? 1 : 0;\n }\n\n /** The original width of the texture */\n get originalWidth()\n {\n return this._texture.width;\n }\n\n /** The original height of the texture */\n get originalHeight()\n {\n return this._texture.height;\n }\n\n public onViewUpdate()\n {\n // increment from the 12th bit!\n this._didChangeId += 1 << 12;\n this._didSpriteUpdate = true;\n\n if (this.didViewUpdate) return;\n this.didViewUpdate = true;\n\n const renderGroup = this.renderGroup || this.parentRenderGroup;\n\n if (renderGroup)\n {\n renderGroup.onChildViewUpdate(this);\n }\n }\n\n /**\n * Adds the bounds of this object to the bounds object.\n * @param bounds - The output bounds object.\n */\n public addBounds(bounds: Bounds)\n {\n const _bounds = this.bounds;\n\n bounds.addFrame(_bounds.minX, _bounds.minY, _bounds.maxX, _bounds.maxY);\n }\n\n /**\n * Checks if the object contains the given point.\n * @param point - The point to check\n */\n public containsPoint(point: Point)\n {\n const bounds = this.bounds;\n\n if (point.x >= bounds.minX && point.x <= bounds.maxX)\n {\n if (point.y >= bounds.minY && point.y <= bounds.maxY)\n {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Destroys this sprite renderable and optionally its texture.\n * @param options - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.texture=false] - Should it destroy the current texture of the renderable as well\n * @param {boolean} [options.textureSource=false] - Should it destroy the textureSource of the renderable as well\n */\n public destroy(options?: DestroyOptions): void\n {\n super.destroy(options);\n\n const destroyTexture = typeof options === 'boolean' ? options : options?.texture;\n\n if (destroyTexture)\n {\n const destroyTextureSource = typeof options === 'boolean' ? options : options?.textureSource;\n\n this._texture.destroy(destroyTextureSource);\n }\n\n this._texture = null;\n (this.bounds as null) = null;\n }\n}\n\n/**\n * Please use the `NineSliceSprite` class instead.\n * @deprecated since 8.0.0\n * @memberof scene\n */\nexport class NineSlicePlane extends NineSliceSprite\n{\n constructor(options: NineSliceSpriteOptions | Texture);\n /** @deprecated since 8.0.0 */\n constructor(texture: Texture, leftWidth: number, topHeight: number, rightWidth: number, bottomHeight: number);\n constructor(...args: [NineSliceSpriteOptions | Texture] | [Texture, number, number, number, number])\n {\n let options = args[0];\n\n if (options instanceof Texture)\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'NineSlicePlane now uses the options object {texture, leftWidth, rightWidth, topHeight, bottomHeight}');\n // #endif\n\n options = {\n texture: options,\n leftWidth: args[1],\n topHeight: args[2],\n rightWidth: args[3],\n bottomHeight: args[4],\n };\n }\n\n // #if _DEBUG\n deprecation(v8_0_0, 'NineSlicePlane is deprecated. Use NineSliceSprite instead.');\n // #endif\n\n super(options);\n }\n}\n","import { HTMLTextStyle } from '../../text-html/HtmlTextStyle';\nimport { TextStyle } from '../TextStyle';\n\nimport type { HTMLTextStyleOptions } from '../../text-html/HtmlTextStyle';\nimport type { TextStyleOptions } from '../TextStyle';\n\n/**\n * converts the style input into the correct type of TextStyle\n * either HTMLTextStyle or TextStyle based on the renderMode.\n * @param renderMode - The render mode to use\n * @param style - The style to use\n * @returns - The style class\n */\nexport function ensureTextStyle(\n renderMode: string,\n style: TextStyle | HTMLTextStyle | TextStyleOptions | HTMLTextStyleOptions\n)\n{\n if (style instanceof TextStyle || style instanceof HTMLTextStyle)\n {\n return style;\n }\n\n return renderMode === 'html'\n ? new HTMLTextStyle(style)\n : new TextStyle(style);\n}\n","import EventEmitter from 'eventemitter3';\n\n/**\n * Regexp for data URI.\n * Based on: {@link https://github.com/ragingwind/data-uri-regex}\n * @static\n * @type {RegExp}\n * @default /(?:^data:image\\/([\\w+]+);(?:[\\w=]+|charset=[\\w-]+)?(?:;base64)?,)/i\n * @example\n * import { DATA_URI } from 'pixi.js';\n *\n * DATA_URI.test('data:image/png;base64,foobar'); // => true\n * @memberof utils\n */\nexport const DATA_URI = /^\\s*data:(?:([\\w-]+)\\/([\\w+.-]+))?(?:;charset=([\\w-]+))?(?:;(base64))?,(.*)/i;\n\n// export the event emitter so we can use it in external modules\nexport { EventEmitter };\n","import type { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport type { Renderer } from '../../rendering/renderers/types';\n\n/**\n * Logs a texture to the console as a base64 image.\n * This can be very useful for debugging issues with rendering.\n * @param texture - The texture to log\n * @param renderer - The renderer to use\n * @param size - The size of the texture to log in the console\n * @ignore\n */\nexport async function logDebugTexture(texture: Texture, renderer: Renderer, size = 200)\n{\n const base64 = await renderer.extract.base64(texture);\n\n await renderer.encoder.commandFinished;\n\n const width = size;\n\n // eslint-disable-next-line no-console\n console.log(`logging texture ${texture.source.width}px ${texture.source.height}px`);\n\n const style = [\n 'font-size: 1px;',\n `padding: ${width}px ${300}px;`,\n `background: url(${base64}) no-repeat;`,\n 'background-size: contain;',\n ].join(' ');\n\n // eslint-disable-next-line no-console\n console.log('%c ', style);\n}\n","/* eslint-disable no-console */\n\nimport { Sprite } from '../../scene/sprite/Sprite';\n\nimport type { Container } from '../../scene/container/Container';\nimport type { RenderGroup } from '../../scene/container/RenderGroup';\n\nconst colors = [\n '#000080', // Navy Blue\n '#228B22', // Forest Green\n '#8B0000', // Dark Red\n '#4169E1', // Royal Blue\n '#008080', // Teal\n '#800000', // Maroon\n '#9400D3', // Dark Violet\n '#FF8C00', // Dark Orange\n '#556B2F', // Olive Green\n '#8B008B' // Dark Magenta\n];\n\nlet colorTick = 0;\n\nexport function logScene(container: Container, depth = 0, data: {color?: string} = { color: '#000000' })\n{\n if (container.renderGroup)\n {\n data.color = colors[colorTick++];\n }\n\n // turn depth into number of spaces:\n let spaces = '';\n\n for (let i = 0; i < depth; i++)\n {\n spaces += ' ';\n }\n\n let label = container.label;\n\n if (!label && container instanceof Sprite)\n {\n label = `sprite:${container.texture.label}`;\n }\n\n // eslint-disable-next-line max-len\n let output = `%c ${spaces}|- ${label} (worldX:${container.worldTransform.tx}, relativeRenderX:${container.relativeGroupTransform.tx}, renderX:${container.groupTransform.tx}, localX:${container.x})`;\n\n if (container.renderGroup)\n {\n output += ' (RenderGroup)';\n }\n\n if (container.filters)\n {\n output += '(*filters)';\n }\n\n console.log(output, `color:${data.color}; font-weight:bold;`);\n\n depth++;\n\n for (let i = 0; i < container.children.length; i++)\n {\n const child = container.children[i];\n\n logScene(child, depth, { ...data });\n }\n}\n\nexport function logRenderGroupScene(\n renderGroup: RenderGroup, depth = 0,\n data: {index: number, color?: string} = { index: 0, color: '#000000' }\n)\n{\n // turn depth into number of spaces:\n let spaces = '';\n\n for (let i = 0; i < depth; i++)\n {\n spaces += ' ';\n }\n\n const output = `%c ${spaces}- ${data.index}: ${renderGroup.root.label} worldX:${renderGroup.worldTransform.tx}`;\n\n console.log(output, `color:${data.color}; font-weight:bold;`);\n\n depth++;\n\n for (let i = 0; i < renderGroup.renderGroupChildren.length; i++)\n {\n const child = renderGroup.renderGroupChildren[i];\n\n logRenderGroupScene(child, depth, { ...data, index: i });\n }\n}\n"],"names":["ExtensionType","__spreadProps","__spreadValues","extensions","extend","colord","tempMatrix","x0","x1","y0","y1","isMobile","isMobileJs","type","UPDATE_PRIORITY","nativeEvent","LoaderParserPriority","path","src","idHash","tempBounds","video","key","BufferUsage","fragTemplate","STENCIL_MODES","y2","x2","earcutModule","pointInTriangle","earcut","tempRect","BLEND","OFFSET","CULLING","DEPTH_TEST","WINDING","DEPTH_MASK","parse","RECURSION_LIMIT","FLT_EPSILON","PATH_DISTANCE_EPSILON","curveAngleToleranceEpsilon","mAngleTolerance","begin","recursive","out","__objRest","i","programCache","name","ShaderStage","RendererType","gpuProgram","glProgram","j","pageData","fontFamily","resolve","Buffer","filterData","CLEAR","_a","parser","CheckImageBitmapWorker","LoadImageBitmapWorker","resolveResult","urlHash","BasisWorker","success","gpuFormatToBasisTranscoderFormatMap","DXGI_FORMAT","D3D10_RESOURCE_DIMENSION","D3DFMT","GL_INTERNAL_FORMAT","GL_FORMATS","GL_TYPES","KTXWorker","ktxWorker","source","vertex","fragment","BUFFER_TYPE","GL_TARGETS","GL_WRAP_MODES","renderTarget","unpremultiplyAlpha","systems","renderPipes","renderPipeAdaptors","MSAA_QUALITY","DEPRECATED_WRAP_MODES","DEPRECATED_SCALE_MODES"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCK,IAAA,aAAA,qBAAAA,cAAL,KAAA;AAII,EAAAA,eAAA,aAAc,CAAA,GAAA,aAAA,CAAA;AAGd,EAAAA,eAAA,YAAa,CAAA,GAAA,aAAA,CAAA;AAEb,EAAAA,eAAA,mBAAoB,CAAA,GAAA,qBAAA,CAAA;AAEpB,EAAAA,eAAA,aAAc,CAAA,GAAA,cAAA,CAAA;AAGd,EAAAA,eAAA,aAAc,CAAA,GAAA,cAAA,CAAA;AAEd,EAAAA,eAAA,oBAAqB,CAAA,GAAA,sBAAA,CAAA;AAErB,EAAAA,eAAA,cAAe,CAAA,GAAA,eAAA,CAAA;AAGf,EAAAA,eAAA,cAAe,CAAA,GAAA,eAAA,CAAA;AAEf,EAAAA,eAAA,oBAAqB,CAAA,GAAA,sBAAA,CAAA;AAErB,EAAAA,eAAA,aAAc,CAAA,GAAA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