@midscene/android-playground 1.0.1-beta-20251125082516.0 → 1.0.1-beta-20251125123731.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/static/index.html +1 -1
- package/static/static/css/index.b63b4d27.css.map +1 -1
- package/static/static/js/9.1bed77ad.js +644 -0
- package/static/static/js/{70.e64c22f8.js.LICENSE.txt → 9.1bed77ad.js.LICENSE.txt} +0 -17
- package/static/static/js/{70.e64c22f8.js.map → 9.1bed77ad.js.map} +1 -1
- package/static/static/js/async/{195.aa1e3152.js → 195.35f1e68e.js} +3 -3
- package/static/static/js/async/195.35f1e68e.js.map +1 -0
- package/static/static/js/async/{779.e7bfc2ed.js → 199.ea3634f6.js} +7 -7
- package/static/static/js/async/199.ea3634f6.js.map +1 -0
- package/static/static/js/async/221.3f81253d.js +21 -0
- package/static/static/js/async/221.3f81253d.js.map +1 -0
- package/static/static/js/async/{631.9799e85f.js → 271.aad1ebb5.js} +4 -4
- package/static/static/js/async/271.aad1ebb5.js.map +1 -0
- package/static/static/js/async/35.c1ca8ab2.js +1 -0
- package/static/static/js/async/{782.f77f2205.js → 376.b7913581.js} +1 -1
- package/static/static/js/async/376.b7913581.js.map +1 -0
- package/static/static/js/async/{441.675c15a8.js → 467.887e5efa.js} +1 -1
- package/static/static/js/async/{271.71b3326b.js → 652.26c99dbf.js} +3 -3
- package/static/static/js/async/652.26c99dbf.js.map +1 -0
- package/static/static/js/async/856.20036e0a.js +158 -0
- package/static/static/js/async/{150.d439b38c.js.map → 856.20036e0a.js.map} +1 -1
- package/static/static/js/async/860.9fc10f4b.js +2 -0
- package/static/static/js/async/860.9fc10f4b.js.map +1 -0
- package/static/static/js/async/{586.ffc417d5.js → 990.65e3a3ab.js} +3 -3
- package/static/static/js/async/990.65e3a3ab.js.map +1 -0
- package/static/static/js/{index.b28abd77.js → index.3b68506d.js} +5 -5
- package/static/static/js/index.3b68506d.js.map +1 -0
- package/static/static/js/lib-react.d7dec362.js.map +1 -1
- package/static/static/js/70.e64c22f8.js +0 -697
- package/static/static/js/async/150.d439b38c.js +0 -158
- package/static/static/js/async/195.aa1e3152.js.map +0 -1
- package/static/static/js/async/260.d838b3b7.js +0 -2
- package/static/static/js/async/260.d838b3b7.js.map +0 -1
- package/static/static/js/async/271.71b3326b.js.map +0 -1
- package/static/static/js/async/355.76c31308.js +0 -1
- package/static/static/js/async/45.ce50b37f.js +0 -21
- package/static/static/js/async/45.ce50b37f.js.map +0 -1
- package/static/static/js/async/586.ffc417d5.js.map +0 -1
- package/static/static/js/async/631.9799e85f.js.map +0 -1
- package/static/static/js/async/779.e7bfc2ed.js.map +0 -1
- package/static/static/js/async/782.f77f2205.js.map +0 -1
- package/static/static/js/index.b28abd77.js.map +0 -1
- /package/static/static/js/{index.b28abd77.js.LICENSE.txt → index.3b68506d.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/async/586.ffc417d5.js","sources":["webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/graphics/gpu/GpuGraphicsAdaptor.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/mesh/gpu/GpuMeshAdapter.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/batcher/gpu/GpuBatchAdaptor.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/BindGroupSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/buffer/GpuBufferSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/GpuColorMaskSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/GpuDeviceSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/GpuEncoderSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/GpuStencilSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/buffer/UboBatch.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/GpuUniformBatchPipe.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/renderTarget/GpuRenderTarget.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/renderTarget/GpuRenderTargetAdaptor.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/renderTarget/GpuRenderTargetSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/GpuShaderSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/state/GpuBlendModesToPixi.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/state/GpuStateSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/texture/uploaders/gpuUploadBufferImageResource.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/texture/uploaders/gpuUploadCompressedTextureResource.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/texture/uploaders/gpuUploadImageSource.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/texture/uploaders/gpuUploadVideoSource.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/texture/utils/GpuMipmapGenerator.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/texture/GpuTextureSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/WebGPURenderer.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/shared/texture/CanvasPool.mjs"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { Matrix } from '../../../maths/matrix/Matrix.mjs';\nimport { getTextureBatchBindGroup } from '../../../rendering/batcher/gpu/getTextureBatchBindGroup.mjs';\nimport { MAX_TEXTURES } from '../../../rendering/batcher/shared/const.mjs';\nimport { compileHighShaderGpuProgram } from '../../../rendering/high-shader/compileHighShaderToProgram.mjs';\nimport { colorBit } from '../../../rendering/high-shader/shader-bits/colorBit.mjs';\nimport { generateTextureBatchBit } from '../../../rendering/high-shader/shader-bits/generateTextureBatchBit.mjs';\nimport { localUniformBitGroup2 } from '../../../rendering/high-shader/shader-bits/localUniformBit.mjs';\nimport { roundPixelsBit } from '../../../rendering/high-shader/shader-bits/roundPixelsBit.mjs';\nimport { Shader } from '../../../rendering/renderers/shared/shader/Shader.mjs';\nimport { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup.mjs';\n\n\"use strict\";\nclass GpuGraphicsAdaptor {\n init() {\n const localUniforms = new UniformGroup({\n uTransformMatrix: { value: new Matrix(), type: \"mat3x3<f32>\" },\n uColor: { value: new Float32Array([1, 1, 1, 1]), type: \"vec4<f32>\" },\n uRound: { value: 0, type: \"f32\" }\n });\n const gpuProgram = compileHighShaderGpuProgram({\n name: \"graphics\",\n bits: [\n colorBit,\n generateTextureBatchBit(MAX_TEXTURES),\n localUniformBitGroup2,\n roundPixelsBit\n ]\n });\n this.shader = new Shader({\n gpuProgram,\n resources: {\n // added on the fly!\n localUniforms\n }\n });\n }\n execute(graphicsPipe, renderable) {\n const context = renderable.context;\n const shader = context.customShader || this.shader;\n const renderer = graphicsPipe.renderer;\n const contextSystem = renderer.graphicsContext;\n const {\n geometry,\n instructions\n } = contextSystem.getContextRenderData(context);\n const encoder = renderer.encoder;\n encoder.setPipelineFromGeometryProgramAndState(\n geometry,\n shader.gpuProgram,\n graphicsPipe.state\n );\n encoder.setGeometry(geometry);\n const globalUniformsBindGroup = renderer.globalUniforms.bindGroup;\n encoder.setBindGroup(0, globalUniformsBindGroup, shader.gpuProgram);\n const localBindGroup = renderer.renderPipes.uniformBatch.getUniformBindGroup(shader.resources.localUniforms, true);\n encoder.setBindGroup(2, localBindGroup, shader.gpuProgram);\n const batches = instructions.instructions;\n for (let i = 0; i < instructions.instructionSize; i++) {\n const batch = batches[i];\n shader.groups[1] = batch.bindGroup;\n if (!batch.gpuBindGroup) {\n const textureBatch = batch.textures;\n batch.bindGroup = getTextureBatchBindGroup(textureBatch.textures, textureBatch.count);\n batch.gpuBindGroup = renderer.bindGroup.getBindGroup(\n batch.bindGroup,\n shader.gpuProgram,\n 1\n );\n }\n encoder.setBindGroup(1, batch.bindGroup, shader.gpuProgram);\n encoder.renderPassEncoder.drawIndexed(batch.size, 1, batch.start);\n }\n }\n destroy() {\n this.shader.destroy(true);\n this.shader = null;\n }\n}\n/** @ignore */\nGpuGraphicsAdaptor.extension = {\n type: [\n ExtensionType.WebGPUPipesAdaptor\n ],\n name: \"graphics\"\n};\n\nexport { GpuGraphicsAdaptor };\n//# sourceMappingURL=GpuGraphicsAdaptor.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { Matrix } from '../../../maths/matrix/Matrix.mjs';\nimport { compileHighShaderGpuProgram } from '../../../rendering/high-shader/compileHighShaderToProgram.mjs';\nimport { localUniformBit } from '../../../rendering/high-shader/shader-bits/localUniformBit.mjs';\nimport { roundPixelsBit } from '../../../rendering/high-shader/shader-bits/roundPixelsBit.mjs';\nimport { textureBit } from '../../../rendering/high-shader/shader-bits/textureBit.mjs';\nimport { Shader } from '../../../rendering/renderers/shared/shader/Shader.mjs';\nimport { Texture } from '../../../rendering/renderers/shared/texture/Texture.mjs';\nimport { warn } from '../../../utils/logging/warn.mjs';\n\n\"use strict\";\nclass GpuMeshAdapter {\n init() {\n const gpuProgram = compileHighShaderGpuProgram({\n name: \"mesh\",\n bits: [\n localUniformBit,\n textureBit,\n roundPixelsBit\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<f32>\", value: new Matrix() }\n }\n }\n });\n }\n execute(meshPipe, mesh) {\n const renderer = meshPipe.renderer;\n let shader = mesh._shader;\n if (!shader) {\n shader = this._shader;\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 } else if (!shader.gpuProgram) {\n warn(\"Mesh shader has no gpuProgram\", mesh.shader);\n return;\n }\n const gpuProgram = shader.gpuProgram;\n if (gpuProgram.autoAssignGlobalUniforms) {\n shader.groups[0] = renderer.globalUniforms.bindGroup;\n }\n if (gpuProgram.autoAssignLocalUniforms) {\n const localUniforms = meshPipe.localUniforms;\n shader.groups[1] = renderer.renderPipes.uniformBatch.getUniformBindGroup(localUniforms, true);\n }\n renderer.encoder.draw({\n geometry: mesh._geometry,\n shader,\n state: mesh.state\n });\n }\n destroy() {\n this._shader.destroy(true);\n this._shader = null;\n }\n}\n/** @ignore */\nGpuMeshAdapter.extension = {\n type: [\n ExtensionType.WebGPUPipesAdaptor\n ],\n name: \"mesh\"\n};\n\nexport { GpuMeshAdapter };\n//# sourceMappingURL=GpuMeshAdapter.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { compileHighShaderGpuProgram } from '../../high-shader/compileHighShaderToProgram.mjs';\nimport { colorBit } from '../../high-shader/shader-bits/colorBit.mjs';\nimport { generateTextureBatchBit } from '../../high-shader/shader-bits/generateTextureBatchBit.mjs';\nimport { roundPixelsBit } from '../../high-shader/shader-bits/roundPixelsBit.mjs';\nimport { Shader } from '../../renderers/shared/shader/Shader.mjs';\nimport { State } from '../../renderers/shared/state/State.mjs';\nimport { MAX_TEXTURES } from '../shared/const.mjs';\nimport { getTextureBatchBindGroup } from './getTextureBatchBindGroup.mjs';\n\n\"use strict\";\nconst tempState = State.for2d();\nclass GpuBatchAdaptor {\n init() {\n const gpuProgram = compileHighShaderGpuProgram({\n name: \"batch\",\n bits: [\n colorBit,\n generateTextureBatchBit(MAX_TEXTURES),\n roundPixelsBit\n ]\n });\n this._shader = new Shader({\n gpuProgram,\n groups: {\n // these will be dynamically allocated\n }\n });\n }\n start(batchPipe, geometry) {\n const renderer = batchPipe.renderer;\n const encoder = renderer.encoder;\n const program = this._shader.gpuProgram;\n this._geometry = geometry;\n encoder.setGeometry(geometry);\n tempState.blendMode = \"normal\";\n renderer.pipeline.getPipeline(\n geometry,\n program,\n tempState\n );\n const globalUniformsBindGroup = renderer.globalUniforms.bindGroup;\n encoder.resetBindGroup(1);\n encoder.setBindGroup(0, globalUniformsBindGroup, program);\n }\n execute(batchPipe, batch) {\n const program = this._shader.gpuProgram;\n const renderer = batchPipe.renderer;\n const encoder = renderer.encoder;\n if (!batch.bindGroup) {\n const textureBatch = batch.textures;\n batch.bindGroup = getTextureBatchBindGroup(textureBatch.textures, textureBatch.count);\n }\n tempState.blendMode = batch.blendMode;\n const gpuBindGroup = renderer.bindGroup.getBindGroup(\n batch.bindGroup,\n program,\n 1\n );\n const pipeline = renderer.pipeline.getPipeline(\n this._geometry,\n program,\n tempState\n );\n batch.bindGroup._touch(renderer.textureGC.count);\n encoder.setPipeline(pipeline);\n encoder.renderPassEncoder.setBindGroup(1, gpuBindGroup);\n encoder.renderPassEncoder.drawIndexed(batch.size, 1, batch.start);\n }\n destroy() {\n this._shader.destroy(true);\n this._shader = null;\n }\n}\n/** @ignore */\nGpuBatchAdaptor.extension = {\n type: [\n ExtensionType.WebGPUPipesAdaptor\n ],\n name: \"batch\"\n};\n\nexport { GpuBatchAdaptor };\n//# sourceMappingURL=GpuBatchAdaptor.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\n\n\"use strict\";\nclass BindGroupSystem {\n constructor(renderer) {\n this._hash = /* @__PURE__ */ Object.create(null);\n this._renderer = renderer;\n }\n contextChange(gpu) {\n this._gpu = gpu;\n }\n getBindGroup(bindGroup, program, groupIndex) {\n bindGroup._updateKey();\n const gpuBindGroup = this._hash[bindGroup._key] || this._createBindGroup(bindGroup, program, groupIndex);\n return gpuBindGroup;\n }\n _createBindGroup(group, program, groupIndex) {\n const device = this._gpu.device;\n const groupLayout = program.layout[groupIndex];\n const entries = [];\n const renderer = this._renderer;\n for (const j in groupLayout) {\n const resource = group.resources[j] ?? group.resources[groupLayout[j]];\n let gpuResource;\n if (resource._resourceType === \"uniformGroup\") {\n const uniformGroup = resource;\n renderer.ubo.updateUniformGroup(uniformGroup);\n const buffer = uniformGroup.buffer;\n gpuResource = {\n buffer: renderer.buffer.getGPUBuffer(buffer),\n offset: 0,\n size: buffer.descriptor.size\n };\n } else if (resource._resourceType === \"buffer\") {\n const buffer = resource;\n gpuResource = {\n buffer: renderer.buffer.getGPUBuffer(buffer),\n offset: 0,\n size: buffer.descriptor.size\n };\n } else if (resource._resourceType === \"bufferResource\") {\n const bufferResource = resource;\n gpuResource = {\n buffer: renderer.buffer.getGPUBuffer(bufferResource.buffer),\n offset: bufferResource.offset,\n size: bufferResource.size\n };\n } else if (resource._resourceType === \"textureSampler\") {\n const sampler = resource;\n gpuResource = renderer.texture.getGpuSampler(sampler);\n } else if (resource._resourceType === \"textureSource\") {\n const texture = resource;\n gpuResource = renderer.texture.getGpuSource(texture).createView({});\n }\n entries.push({\n binding: groupLayout[j],\n resource: gpuResource\n });\n }\n const layout = renderer.shader.getProgramData(program).bindGroups[groupIndex];\n const gpuBindGroup = device.createBindGroup({\n layout,\n entries\n });\n this._hash[group._key] = gpuBindGroup;\n return gpuBindGroup;\n }\n destroy() {\n for (const key of Object.keys(this._hash)) {\n this._hash[key] = null;\n }\n this._hash = null;\n this._renderer = null;\n }\n}\n/** @ignore */\nBindGroupSystem.extension = {\n type: [\n ExtensionType.WebGPUSystem\n ],\n name: \"bindGroup\"\n};\n\nexport { BindGroupSystem };\n//# sourceMappingURL=BindGroupSystem.mjs.map\n","import { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { fastCopy } from '../../shared/buffer/utils/fastCopy.mjs';\n\n\"use strict\";\nclass GpuBufferSystem {\n constructor() {\n this._gpuBuffers = /* @__PURE__ */ Object.create(null);\n this._managedBuffers = [];\n }\n contextChange(gpu) {\n this._gpu = gpu;\n }\n getGPUBuffer(buffer) {\n return this._gpuBuffers[buffer.uid] || this.createGPUBuffer(buffer);\n }\n updateBuffer(buffer) {\n const gpuBuffer = this._gpuBuffers[buffer.uid] || this.createGPUBuffer(buffer);\n const data = buffer.data;\n if (buffer._updateID && data) {\n buffer._updateID = 0;\n this._gpu.device.queue.writeBuffer(\n gpuBuffer,\n 0,\n data.buffer,\n 0,\n // round to the nearest 4 bytes\n (buffer._updateSize || data.byteLength) + 3 & ~3\n );\n }\n return gpuBuffer;\n }\n /** dispose all WebGL resources of all managed buffers */\n destroyAll() {\n for (const id in this._gpuBuffers) {\n this._gpuBuffers[id].destroy();\n }\n this._gpuBuffers = {};\n }\n createGPUBuffer(buffer) {\n if (!this._gpuBuffers[buffer.uid]) {\n buffer.on(\"update\", this.updateBuffer, this);\n buffer.on(\"change\", this.onBufferChange, this);\n buffer.on(\"destroy\", this.onBufferDestroy, this);\n }\n const gpuBuffer = this._gpu.device.createBuffer(buffer.descriptor);\n buffer._updateID = 0;\n if (buffer.data) {\n fastCopy(buffer.data.buffer, gpuBuffer.getMappedRange());\n gpuBuffer.unmap();\n }\n this._gpuBuffers[buffer.uid] = gpuBuffer;\n this._managedBuffers.push(buffer);\n return gpuBuffer;\n }\n onBufferChange(buffer) {\n const gpuBuffer = this._gpuBuffers[buffer.uid];\n gpuBuffer.destroy();\n buffer._updateID = 0;\n this._gpuBuffers[buffer.uid] = this.createGPUBuffer(buffer);\n }\n /**\n * Disposes buffer\n * @param buffer - buffer with data\n */\n onBufferDestroy(buffer) {\n this._managedBuffers.splice(this._managedBuffers.indexOf(buffer), 1);\n this._destroyBuffer(buffer);\n }\n destroy() {\n this._managedBuffers.forEach((buffer) => this._destroyBuffer(buffer));\n this._managedBuffers = null;\n this._gpuBuffers = null;\n }\n _destroyBuffer(buffer) {\n const gpuBuffer = this._gpuBuffers[buffer.uid];\n gpuBuffer.destroy();\n buffer.off(\"update\", this.updateBuffer, this);\n buffer.off(\"change\", this.onBufferChange, this);\n buffer.off(\"destroy\", this.onBufferDestroy, this);\n this._gpuBuffers[buffer.uid] = null;\n }\n}\n/** @ignore */\nGpuBufferSystem.extension = {\n type: [\n ExtensionType.WebGPUSystem\n ],\n name: \"buffer\"\n};\n\nexport { GpuBufferSystem };\n//# sourceMappingURL=GpuBufferSystem.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\n\n\"use strict\";\nclass GpuColorMaskSystem {\n constructor(renderer) {\n this._colorMaskCache = 15;\n this._renderer = renderer;\n }\n setMask(colorMask) {\n if (this._colorMaskCache === colorMask)\n return;\n this._colorMaskCache = colorMask;\n this._renderer.pipeline.setColorMask(colorMask);\n }\n destroy() {\n this._renderer = null;\n this._colorMaskCache = null;\n }\n}\n/** @ignore */\nGpuColorMaskSystem.extension = {\n type: [\n ExtensionType.WebGPUSystem\n ],\n name: \"colorMask\"\n};\n\nexport { GpuColorMaskSystem };\n//# sourceMappingURL=GpuColorMaskSystem.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\n\n\"use strict\";\nclass GpuDeviceSystem {\n /**\n * @param {WebGPURenderer} renderer - The renderer this System works for.\n */\n constructor(renderer) {\n this._renderer = renderer;\n }\n async init(options) {\n if (this._initPromise)\n return this._initPromise;\n this._initPromise = this._createDeviceAndAdaptor(options).then((gpu) => {\n this.gpu = gpu;\n this._renderer.runners.contextChange.emit(this.gpu);\n });\n return this._initPromise;\n }\n /**\n * Handle the context change event\n * @param gpu\n */\n contextChange(gpu) {\n this._renderer.gpu = gpu;\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 async _createDeviceAndAdaptor(options) {\n const adapter = await navigator.gpu.requestAdapter({\n powerPreference: options.powerPreference,\n forceFallbackAdapter: options.forceFallbackAdapter\n });\n const requiredFeatures = [\n \"texture-compression-bc\",\n \"texture-compression-astc\",\n \"texture-compression-etc2\"\n ].filter((feature) => adapter.features.has(feature));\n const device = await adapter.requestDevice({\n requiredFeatures\n });\n return { adapter, device };\n }\n destroy() {\n this.gpu = null;\n this._renderer = null;\n }\n}\n/** @ignore */\nGpuDeviceSystem.extension = {\n type: [\n ExtensionType.WebGPUSystem\n ],\n name: \"device\"\n};\n/** The default options for the GpuDeviceSystem. */\nGpuDeviceSystem.defaultOptions = {\n /**\n * {@link WebGPUOptions.powerPreference}\n * @default default\n */\n powerPreference: void 0,\n /**\n * Force the use of the fallback adapter\n * @default false\n */\n forceFallbackAdapter: false\n};\n\nexport { GpuDeviceSystem };\n//# sourceMappingURL=GpuDeviceSystem.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\n\n\"use strict\";\nclass GpuEncoderSystem {\n constructor(renderer) {\n this._boundBindGroup = /* @__PURE__ */ Object.create(null);\n this._boundVertexBuffer = /* @__PURE__ */ Object.create(null);\n this._renderer = renderer;\n }\n renderStart() {\n this.commandFinished = new Promise((resolve) => {\n this._resolveCommandFinished = resolve;\n });\n this.commandEncoder = this._renderer.gpu.device.createCommandEncoder();\n }\n beginRenderPass(gpuRenderTarget) {\n this.endRenderPass();\n this._clearCache();\n this.renderPassEncoder = this.commandEncoder.beginRenderPass(gpuRenderTarget.descriptor);\n }\n endRenderPass() {\n if (this.renderPassEncoder) {\n this.renderPassEncoder.end();\n }\n this.renderPassEncoder = null;\n }\n setViewport(viewport) {\n this.renderPassEncoder.setViewport(viewport.x, viewport.y, viewport.width, viewport.height, 0, 1);\n }\n setPipelineFromGeometryProgramAndState(geometry, program, state, topology) {\n const pipeline = this._renderer.pipeline.getPipeline(geometry, program, state, topology);\n this.setPipeline(pipeline);\n }\n setPipeline(pipeline) {\n if (this._boundPipeline === pipeline)\n return;\n this._boundPipeline = pipeline;\n this.renderPassEncoder.setPipeline(pipeline);\n }\n _setVertexBuffer(index, buffer) {\n if (this._boundVertexBuffer[index] === buffer)\n return;\n this._boundVertexBuffer[index] = buffer;\n this.renderPassEncoder.setVertexBuffer(index, this._renderer.buffer.updateBuffer(buffer));\n }\n _setIndexBuffer(buffer) {\n if (this._boundIndexBuffer === buffer)\n return;\n this._boundIndexBuffer = buffer;\n const indexFormat = buffer.data.BYTES_PER_ELEMENT === 2 ? \"uint16\" : \"uint32\";\n this.renderPassEncoder.setIndexBuffer(this._renderer.buffer.updateBuffer(buffer), indexFormat);\n }\n resetBindGroup(index) {\n this._boundBindGroup[index] = null;\n }\n setBindGroup(index, bindGroup, program) {\n if (this._boundBindGroup[index] === bindGroup)\n return;\n this._boundBindGroup[index] = bindGroup;\n bindGroup._touch(this._renderer.textureGC.count);\n const gpuBindGroup = this._renderer.bindGroup.getBindGroup(bindGroup, program, index);\n this.renderPassEncoder.setBindGroup(index, gpuBindGroup);\n }\n setGeometry(geometry) {\n for (const i in geometry.attributes) {\n const attribute = geometry.attributes[i];\n this._setVertexBuffer(attribute.location, attribute.buffer);\n }\n if (geometry.indexBuffer) {\n this._setIndexBuffer(geometry.indexBuffer);\n }\n }\n _setShaderBindGroups(shader, skipSync) {\n for (const i in shader.groups) {\n const bindGroup = shader.groups[i];\n if (!skipSync) {\n this._syncBindGroup(bindGroup);\n }\n this.setBindGroup(i, bindGroup, shader.gpuProgram);\n }\n }\n _syncBindGroup(bindGroup) {\n for (const j in bindGroup.resources) {\n const resource = bindGroup.resources[j];\n if (resource.isUniformGroup) {\n this._renderer.ubo.updateUniformGroup(resource);\n }\n }\n }\n draw(options) {\n const { geometry, shader, state, topology, size, start, instanceCount, skipSync } = options;\n this.setPipelineFromGeometryProgramAndState(geometry, shader.gpuProgram, state, topology);\n this.setGeometry(geometry);\n this._setShaderBindGroups(shader, skipSync);\n if (geometry.indexBuffer) {\n this.renderPassEncoder.drawIndexed(\n size || geometry.indexBuffer.data.length,\n instanceCount || geometry.instanceCount,\n start || 0\n );\n } else {\n this.renderPassEncoder.draw(size || geometry.getSize(), instanceCount || geometry.instanceCount, start || 0);\n }\n }\n finishRenderPass() {\n if (this.renderPassEncoder) {\n this.renderPassEncoder.end();\n this.renderPassEncoder = null;\n }\n }\n postrender() {\n this.finishRenderPass();\n this._gpu.device.queue.submit([this.commandEncoder.finish()]);\n this._resolveCommandFinished();\n this.commandEncoder = null;\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 restoreRenderPass() {\n const descriptor = this._renderer.renderTarget.adaptor.getDescriptor(\n this._renderer.renderTarget.renderTarget,\n false,\n [0, 0, 0, 1]\n );\n this.renderPassEncoder = this.commandEncoder.beginRenderPass(descriptor);\n const boundPipeline = this._boundPipeline;\n const boundVertexBuffer = { ...this._boundVertexBuffer };\n const boundIndexBuffer = this._boundIndexBuffer;\n const boundBindGroup = { ...this._boundBindGroup };\n this._clearCache();\n const viewport = this._renderer.renderTarget.viewport;\n this.renderPassEncoder.setViewport(viewport.x, viewport.y, viewport.width, viewport.height, 0, 1);\n this.setPipeline(boundPipeline);\n for (const i in boundVertexBuffer) {\n this._setVertexBuffer(i, boundVertexBuffer[i]);\n }\n for (const i in boundBindGroup) {\n this.setBindGroup(i, boundBindGroup[i], null);\n }\n this._setIndexBuffer(boundIndexBuffer);\n }\n _clearCache() {\n for (let i = 0; i < 16; i++) {\n this._boundBindGroup[i] = null;\n this._boundVertexBuffer[i] = null;\n }\n this._boundIndexBuffer = null;\n this._boundPipeline = null;\n }\n destroy() {\n this._renderer = null;\n this._gpu = null;\n this._boundBindGroup = null;\n this._boundVertexBuffer = null;\n this._boundIndexBuffer = null;\n this._boundPipeline = null;\n }\n contextChange(gpu) {\n this._gpu = gpu;\n }\n}\n/** @ignore */\nGpuEncoderSystem.extension = {\n type: [ExtensionType.WebGPUSystem],\n name: \"encoder\",\n priority: 1\n};\n\nexport { GpuEncoderSystem };\n//# sourceMappingURL=GpuEncoderSystem.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { STENCIL_MODES } from '../shared/state/const.mjs';\n\n\"use strict\";\nclass GpuStencilSystem {\n constructor(renderer) {\n this._renderTargetStencilState = /* @__PURE__ */ Object.create(null);\n this._renderer = renderer;\n renderer.renderTarget.onRenderTargetChange.add(this);\n }\n onRenderTargetChange(renderTarget) {\n let stencilState = this._renderTargetStencilState[renderTarget.uid];\n if (!stencilState) {\n stencilState = this._renderTargetStencilState[renderTarget.uid] = {\n stencilMode: STENCIL_MODES.DISABLED,\n stencilReference: 0\n };\n }\n this._activeRenderTarget = renderTarget;\n this.setStencilMode(stencilState.stencilMode, stencilState.stencilReference);\n }\n setStencilMode(stencilMode, stencilReference) {\n const stencilState = this._renderTargetStencilState[this._activeRenderTarget.uid];\n stencilState.stencilMode = stencilMode;\n stencilState.stencilReference = stencilReference;\n const renderer = this._renderer;\n renderer.pipeline.setStencilMode(stencilMode);\n renderer.encoder.renderPassEncoder.setStencilReference(stencilReference);\n }\n destroy() {\n this._renderer.renderTarget.onRenderTargetChange.remove(this);\n this._renderer = null;\n this._activeRenderTarget = null;\n this._renderTargetStencilState = null;\n }\n}\n/** @ignore */\nGpuStencilSystem.extension = {\n type: [\n ExtensionType.WebGPUSystem\n ],\n name: \"stencil\"\n};\n\nexport { GpuStencilSystem };\n//# sourceMappingURL=GpuStencilSystem.mjs.map\n","\"use strict\";\nclass UboBatch {\n constructor({ minUniformOffsetAlignment }) {\n this._minUniformOffsetAlignment = 256;\n this.byteIndex = 0;\n this._minUniformOffsetAlignment = minUniformOffsetAlignment;\n this.data = new Float32Array(65535);\n }\n clear() {\n this.byteIndex = 0;\n }\n addEmptyGroup(size) {\n if (size > this._minUniformOffsetAlignment / 4) {\n throw new Error(`UniformBufferBatch: array is too large: ${size * 4}`);\n }\n const start = this.byteIndex;\n let newSize = start + size * 4;\n newSize = Math.ceil(newSize / this._minUniformOffsetAlignment) * this._minUniformOffsetAlignment;\n if (newSize > this.data.length * 4) {\n throw new Error(\"UniformBufferBatch: ubo batch got too big\");\n }\n this.byteIndex = newSize;\n return start;\n }\n addGroup(array) {\n const offset = this.addEmptyGroup(array.length);\n for (let i = 0; i < array.length; i++) {\n this.data[offset / 4 + i] = array[i];\n }\n return offset;\n }\n destroy() {\n this._buffer.destroy();\n this._buffer = null;\n this.data = null;\n }\n}\n\nexport { UboBatch };\n//# sourceMappingURL=UboBatch.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { Buffer } from '../shared/buffer/Buffer.mjs';\nimport { BufferResource } from '../shared/buffer/BufferResource.mjs';\nimport { BufferUsage } from '../shared/buffer/const.mjs';\nimport { UboBatch } from './buffer/UboBatch.mjs';\nimport { BindGroup } from './shader/BindGroup.mjs';\n\n\"use strict\";\nconst minUniformOffsetAlignment = 128;\nclass GpuUniformBatchPipe {\n constructor(renderer) {\n this._bindGroupHash = /* @__PURE__ */ Object.create(null);\n // number of buffers..\n this._buffers = [];\n this._bindGroups = [];\n this._bufferResources = [];\n this._renderer = renderer;\n this._batchBuffer = new UboBatch({ minUniformOffsetAlignment });\n const totalBuffers = 256 / minUniformOffsetAlignment;\n for (let i = 0; i < totalBuffers; i++) {\n let usage = BufferUsage.UNIFORM | BufferUsage.COPY_DST;\n if (i === 0)\n usage |= BufferUsage.COPY_SRC;\n this._buffers.push(new Buffer({\n data: this._batchBuffer.data,\n usage\n }));\n }\n }\n renderEnd() {\n this._uploadBindGroups();\n this._resetBindGroups();\n }\n _resetBindGroups() {\n for (const i in this._bindGroupHash) {\n this._bindGroupHash[i] = null;\n }\n this._batchBuffer.clear();\n }\n // just works for single bind groups for now\n getUniformBindGroup(group, duplicate) {\n if (!duplicate && this._bindGroupHash[group.uid]) {\n return this._bindGroupHash[group.uid];\n }\n this._renderer.ubo.ensureUniformGroup(group);\n const data = group.buffer.data;\n const offset = this._batchBuffer.addEmptyGroup(data.length);\n this._renderer.ubo.syncUniformGroup(group, this._batchBuffer.data, offset / 4);\n this._bindGroupHash[group.uid] = this._getBindGroup(offset / minUniformOffsetAlignment);\n return this._bindGroupHash[group.uid];\n }\n getUboResource(group) {\n this._renderer.ubo.updateUniformGroup(group);\n const data = group.buffer.data;\n const offset = this._batchBuffer.addGroup(data);\n return this._getBufferResource(offset / minUniformOffsetAlignment);\n }\n getArrayBindGroup(data) {\n const offset = this._batchBuffer.addGroup(data);\n return this._getBindGroup(offset / minUniformOffsetAlignment);\n }\n getArrayBufferResource(data) {\n const offset = this._batchBuffer.addGroup(data);\n const index = offset / minUniformOffsetAlignment;\n return this._getBufferResource(index);\n }\n _getBufferResource(index) {\n if (!this._bufferResources[index]) {\n const buffer = this._buffers[index % 2];\n this._bufferResources[index] = new BufferResource({\n buffer,\n offset: (index / 2 | 0) * 256,\n size: minUniformOffsetAlignment\n });\n }\n return this._bufferResources[index];\n }\n _getBindGroup(index) {\n if (!this._bindGroups[index]) {\n const bindGroup = new BindGroup({\n 0: this._getBufferResource(index)\n });\n this._bindGroups[index] = bindGroup;\n }\n return this._bindGroups[index];\n }\n _uploadBindGroups() {\n const bufferSystem = this._renderer.buffer;\n const firstBuffer = this._buffers[0];\n firstBuffer.update(this._batchBuffer.byteIndex);\n bufferSystem.updateBuffer(firstBuffer);\n const commandEncoder = this._renderer.gpu.device.createCommandEncoder();\n for (let i = 1; i < this._buffers.length; i++) {\n const buffer = this._buffers[i];\n commandEncoder.copyBufferToBuffer(\n bufferSystem.getGPUBuffer(firstBuffer),\n minUniformOffsetAlignment,\n bufferSystem.getGPUBuffer(buffer),\n 0,\n this._batchBuffer.byteIndex\n );\n }\n this._renderer.gpu.device.queue.submit([commandEncoder.finish()]);\n }\n destroy() {\n for (let i = 0; i < this._bindGroups.length; i++) {\n this._bindGroups[i].destroy();\n }\n this._bindGroups = null;\n this._bindGroupHash = null;\n for (let i = 0; i < this._buffers.length; i++) {\n this._buffers[i].destroy();\n }\n this._buffers = null;\n for (let i = 0; i < this._bufferResources.length; i++) {\n this._bufferResources[i].destroy();\n }\n this._bufferResources = null;\n this._batchBuffer.destroy();\n this._bindGroupHash = null;\n this._renderer = null;\n }\n}\n/** @ignore */\nGpuUniformBatchPipe.extension = {\n type: [\n ExtensionType.WebGPUPipes\n ],\n name: \"uniformBatch\"\n};\n\nexport { GpuUniformBatchPipe };\n//# sourceMappingURL=GpuUniformBatchPipe.mjs.map\n","import { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { ensureAttributes } from '../../gl/shader/program/ensureAttributes.mjs';\nimport { STENCIL_MODES } from '../../shared/state/const.mjs';\nimport { createIdFromString } from '../../shared/utils/createIdFromString.mjs';\nimport { GpuStencilModesToPixi } from '../state/GpuStencilModesToPixi.mjs';\n\n\"use strict\";\nconst topologyStringToId = {\n \"point-list\": 0,\n \"line-list\": 1,\n \"line-strip\": 2,\n \"triangle-list\": 3,\n \"triangle-strip\": 4\n};\nfunction getGraphicsStateKey(geometryLayout, shaderKey, state, blendMode, topology) {\n return geometryLayout << 24 | shaderKey << 16 | state << 10 | blendMode << 5 | topology;\n}\nfunction getGlobalStateKey(stencilStateId, multiSampleCount, colorMask, renderTarget) {\n return colorMask << 6 | stencilStateId << 3 | renderTarget << 1 | multiSampleCount;\n}\nclass PipelineSystem {\n constructor(renderer) {\n this._moduleCache = /* @__PURE__ */ Object.create(null);\n this._bufferLayoutsCache = /* @__PURE__ */ Object.create(null);\n this._pipeCache = /* @__PURE__ */ Object.create(null);\n this._pipeStateCaches = /* @__PURE__ */ Object.create(null);\n this._colorMask = 15;\n this._multisampleCount = 1;\n this._renderer = renderer;\n }\n contextChange(gpu) {\n this._gpu = gpu;\n this.setStencilMode(STENCIL_MODES.DISABLED);\n this._updatePipeHash();\n }\n setMultisampleCount(multisampleCount) {\n if (this._multisampleCount === multisampleCount)\n return;\n this._multisampleCount = multisampleCount;\n this._updatePipeHash();\n }\n setRenderTarget(renderTarget) {\n this._multisampleCount = renderTarget.msaaSamples;\n this._depthStencilAttachment = renderTarget.descriptor.depthStencilAttachment ? 1 : 0;\n this._updatePipeHash();\n }\n setColorMask(colorMask) {\n if (this._colorMask === colorMask)\n return;\n this._colorMask = colorMask;\n this._updatePipeHash();\n }\n setStencilMode(stencilMode) {\n if (this._stencilMode === stencilMode)\n return;\n this._stencilMode = stencilMode;\n this._stencilState = GpuStencilModesToPixi[stencilMode];\n this._updatePipeHash();\n }\n setPipeline(geometry, program, state, passEncoder) {\n const pipeline = this.getPipeline(geometry, program, state);\n passEncoder.setPipeline(pipeline);\n }\n getPipeline(geometry, program, state, topology) {\n if (!geometry._layoutKey) {\n ensureAttributes(geometry, program.attributeData);\n this._generateBufferKey(geometry);\n }\n topology = topology || geometry.topology;\n const key = getGraphicsStateKey(\n geometry._layoutKey,\n program._layoutKey,\n state.data,\n state._blendModeId,\n topologyStringToId[topology]\n );\n if (this._pipeCache[key])\n return this._pipeCache[key];\n this._pipeCache[key] = this._createPipeline(geometry, program, state, topology);\n return this._pipeCache[key];\n }\n _createPipeline(geometry, program, state, topology) {\n const device = this._gpu.device;\n const buffers = this._createVertexBufferLayouts(geometry);\n const blendModes = this._renderer.state.getColorTargets(state);\n blendModes[0].writeMask = this._stencilMode === STENCIL_MODES.RENDERING_MASK_ADD ? 0 : this._colorMask;\n const layout = this._renderer.shader.getProgramData(program).pipeline;\n const descriptor = {\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 if (this._depthStencilAttachment) {\n descriptor.depthStencil = {\n ...this._stencilState,\n format: \"depth24plus-stencil8\",\n depthWriteEnabled: state.depthTest,\n depthCompare: state.depthTest ? \"less\" : \"always\"\n };\n }\n const pipeline = device.createRenderPipeline(descriptor);\n return pipeline;\n }\n _getModule(code) {\n return this._moduleCache[code] || this._createModule(code);\n }\n _createModule(code) {\n const device = this._gpu.device;\n this._moduleCache[code] = device.createShaderModule({\n code\n });\n return this._moduleCache[code];\n }\n _generateBufferKey(geometry) {\n const keyGen = [];\n let index = 0;\n const attributeKeys = Object.keys(geometry.attributes).sort();\n for (let i = 0; i < attributeKeys.length; i++) {\n const attribute = geometry.attributes[attributeKeys[i]];\n keyGen[index++] = attribute.location;\n keyGen[index++] = attribute.offset;\n keyGen[index++] = attribute.format;\n keyGen[index++] = attribute.stride;\n }\n const stringKey = keyGen.join(\"\");\n geometry._layoutKey = createIdFromString(stringKey, \"geometry\");\n return geometry._layoutKey;\n }\n _createVertexBufferLayouts(geometry) {\n if (this._bufferLayoutsCache[geometry._layoutKey]) {\n return this._bufferLayoutsCache[geometry._layoutKey];\n }\n const vertexBuffersLayout = [];\n geometry.buffers.forEach((buffer) => {\n const bufferEntry = {\n arrayStride: 0,\n stepMode: \"vertex\",\n attributes: []\n };\n const bufferEntryAttributes = bufferEntry.attributes;\n for (const i in geometry.attributes) {\n const attribute = geometry.attributes[i];\n if (attribute.buffer === buffer) {\n bufferEntry.arrayStride = attribute.stride;\n bufferEntry.stepMode = attribute.instance ? \"instance\" : \"vertex\";\n bufferEntryAttributes.push({\n shaderLocation: attribute.location,\n offset: attribute.offset,\n format: attribute.format\n });\n }\n }\n if (bufferEntryAttributes.length) {\n vertexBuffersLayout.push(bufferEntry);\n }\n });\n this._bufferLayoutsCache[geometry._layoutKey] = vertexBuffersLayout;\n return vertexBuffersLayout;\n }\n _updatePipeHash() {\n const key = getGlobalStateKey(\n this._stencilMode,\n this._multisampleCount,\n this._colorMask,\n this._depthStencilAttachment\n );\n if (!this._pipeStateCaches[key]) {\n this._pipeStateCaches[key] = /* @__PURE__ */ Object.create(null);\n }\n this._pipeCache = this._pipeStateCaches[key];\n }\n destroy() {\n this._renderer = null;\n this._bufferLayoutsCache = null;\n }\n}\n/** @ignore */\nPipelineSystem.extension = {\n type: [ExtensionType.WebGPUSystem],\n name: \"pipeline\"\n};\n\nexport { PipelineSystem };\n//# sourceMappingURL=PipelineSystem.mjs.map\n","\"use strict\";\nclass GpuRenderTarget {\n constructor() {\n this.contexts = [];\n this.msaaTextures = [];\n this.msaaSamples = 1;\n }\n}\n\nexport { GpuRenderTarget };\n//# sourceMappingURL=GpuRenderTarget.mjs.map\n","import { CLEAR } from '../../gl/const.mjs';\nimport { CanvasSource } from '../../shared/texture/sources/CanvasSource.mjs';\nimport { TextureSource } from '../../shared/texture/sources/TextureSource.mjs';\nimport { GpuRenderTarget } from './GpuRenderTarget.mjs';\n\n\"use strict\";\nclass GpuRenderTargetAdaptor {\n init(renderer, renderTargetSystem) {\n this._renderer = renderer;\n this._renderTargetSystem = renderTargetSystem;\n }\n copyToTexture(sourceRenderSurfaceTexture, destinationTexture, originSrc, size, originDest) {\n const renderer = this._renderer;\n const baseGpuTexture = this._getGpuColorTexture(\n sourceRenderSurfaceTexture\n );\n const backGpuTexture = renderer.texture.getGpuSource(\n destinationTexture.source\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 return destinationTexture;\n }\n startRenderPass(renderTarget, clear = true, clearColor, viewport) {\n const renderTargetSystem = this._renderTargetSystem;\n const gpuRenderTarget = renderTargetSystem.getGpuRenderTarget(renderTarget);\n const descriptor = this.getDescriptor(renderTarget, clear, clearColor);\n gpuRenderTarget.descriptor = descriptor;\n this._renderer.pipeline.setRenderTarget(gpuRenderTarget);\n this._renderer.encoder.beginRenderPass(gpuRenderTarget);\n this._renderer.encoder.setViewport(viewport);\n }\n finishRenderPass() {\n this._renderer.encoder.endRenderPass();\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 _getGpuColorTexture(renderTarget) {\n const gpuRenderTarget = this._renderTargetSystem.getGpuRenderTarget(renderTarget);\n if (gpuRenderTarget.contexts[0]) {\n return gpuRenderTarget.contexts[0].getCurrentTexture();\n }\n return this._renderer.texture.getGpuSource(\n renderTarget.colorTextures[0].source\n );\n }\n getDescriptor(renderTarget, clear, clearValue) {\n if (typeof clear === \"boolean\") {\n clear = clear ? CLEAR.ALL : CLEAR.NONE;\n }\n const renderTargetSystem = this._renderTargetSystem;\n const gpuRenderTarget = renderTargetSystem.getGpuRenderTarget(renderTarget);\n const colorAttachments = renderTarget.colorTextures.map(\n (texture, i) => {\n const context = gpuRenderTarget.contexts[i];\n let view;\n let resolveTarget;\n if (context) {\n const currentTexture = context.getCurrentTexture();\n const canvasTextureView = currentTexture.createView();\n view = canvasTextureView;\n } else {\n view = this._renderer.texture.getGpuSource(texture).createView({\n mipLevelCount: 1\n });\n }\n if (gpuRenderTarget.msaaTextures[i]) {\n resolveTarget = view;\n view = this._renderer.texture.getTextureView(\n gpuRenderTarget.msaaTextures[i]\n );\n }\n const loadOp = clear & CLEAR.COLOR ? \"clear\" : \"load\";\n clearValue ?? (clearValue = renderTargetSystem.defaultClearColor);\n return {\n view,\n resolveTarget,\n clearValue,\n storeOp: \"store\",\n loadOp\n };\n }\n );\n let depthStencilAttachment;\n if ((renderTarget.stencil || renderTarget.depth) && !renderTarget.depthStencilTexture) {\n renderTarget.ensureDepthStencilTexture();\n renderTarget.depthStencilTexture.source.sampleCount = gpuRenderTarget.msaa ? 4 : 1;\n }\n if (renderTarget.depthStencilTexture) {\n const stencilLoadOp = clear & CLEAR.STENCIL ? \"clear\" : \"load\";\n const depthLoadOp = clear & CLEAR.DEPTH ? \"clear\" : \"load\";\n depthStencilAttachment = {\n view: this._renderer.texture.getGpuSource(renderTarget.depthStencilTexture.source).createView(),\n stencilStoreOp: \"store\",\n stencilLoadOp,\n depthClearValue: 1,\n depthLoadOp,\n depthStoreOp: \"store\"\n };\n }\n const descriptor = {\n colorAttachments,\n depthStencilAttachment\n };\n return descriptor;\n }\n clear(renderTarget, clear = true, clearColor, viewport) {\n if (!clear)\n return;\n const { gpu, encoder } = this._renderer;\n const device = gpu.device;\n const standAlone = encoder.commandEncoder === null;\n if (standAlone) {\n const commandEncoder = device.createCommandEncoder();\n const renderPassDescriptor = this.getDescriptor(renderTarget, clear, clearColor);\n const passEncoder = commandEncoder.beginRenderPass(renderPassDescriptor);\n passEncoder.setViewport(viewport.x, viewport.y, viewport.width, viewport.height, 0, 1);\n passEncoder.end();\n const gpuCommands = commandEncoder.finish();\n device.queue.submit([gpuCommands]);\n } else {\n this.startRenderPass(renderTarget, clear, clearColor, viewport);\n }\n }\n initGpuRenderTarget(renderTarget) {\n renderTarget.isRoot = true;\n const gpuRenderTarget = new GpuRenderTarget();\n renderTarget.colorTextures.forEach((colorTexture, i) => {\n if (CanvasSource.test(colorTexture.resource)) {\n const context = colorTexture.resource.getContext(\n \"webgpu\"\n );\n const alphaMode = colorTexture.transparent ? \"premultiplied\" : \"opaque\";\n try {\n context.configure({\n device: this._renderer.gpu.device,\n // eslint-disable-next-line max-len\n usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST | GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC,\n format: \"bgra8unorm\",\n alphaMode\n });\n } catch (e) {\n console.error(e);\n }\n gpuRenderTarget.contexts[i] = context;\n }\n gpuRenderTarget.msaa = colorTexture.source.antialias;\n if (colorTexture.source.antialias) {\n const msaaTexture = new TextureSource({\n width: 0,\n height: 0,\n sampleCount: 4\n });\n gpuRenderTarget.msaaTextures[i] = msaaTexture;\n }\n });\n if (gpuRenderTarget.msaa) {\n gpuRenderTarget.msaaSamples = 4;\n if (renderTarget.depthStencilTexture) {\n renderTarget.depthStencilTexture.source.sampleCount = 4;\n }\n }\n return gpuRenderTarget;\n }\n destroyGpuRenderTarget(gpuRenderTarget) {\n gpuRenderTarget.contexts.forEach((context) => {\n context.unconfigure();\n });\n gpuRenderTarget.msaaTextures.forEach((texture) => {\n texture.destroy();\n });\n gpuRenderTarget.msaaTextures.length = 0;\n gpuRenderTarget.contexts.length = 0;\n }\n ensureDepthStencilTexture(renderTarget) {\n const gpuRenderTarget = this._renderTargetSystem.getGpuRenderTarget(renderTarget);\n if (renderTarget.depthStencilTexture && gpuRenderTarget.msaa) {\n renderTarget.depthStencilTexture.source.sampleCount = 4;\n }\n }\n resizeGpuRenderTarget(renderTarget) {\n const gpuRenderTarget = this._renderTargetSystem.getGpuRenderTarget(renderTarget);\n gpuRenderTarget.width = renderTarget.width;\n gpuRenderTarget.height = renderTarget.height;\n if (gpuRenderTarget.msaa) {\n renderTarget.colorTextures.forEach((colorTexture, i) => {\n const msaaTexture = gpuRenderTarget.msaaTextures[i];\n msaaTexture?.resize(\n colorTexture.source.width,\n colorTexture.source.height,\n colorTexture.source._resolution\n );\n });\n }\n }\n}\n\nexport { GpuRenderTargetAdaptor };\n//# sourceMappingURL=GpuRenderTargetAdaptor.mjs.map\n","import { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { RenderTargetSystem } from '../../shared/renderTarget/RenderTargetSystem.mjs';\nimport { GpuRenderTargetAdaptor } from './GpuRenderTargetAdaptor.mjs';\n\n\"use strict\";\nclass GpuRenderTargetSystem extends RenderTargetSystem {\n constructor(renderer) {\n super(renderer);\n this.adaptor = new GpuRenderTargetAdaptor();\n this.adaptor.init(renderer, this);\n }\n}\n/** @ignore */\nGpuRenderTargetSystem.extension = {\n type: [ExtensionType.WebGPUSystem],\n name: \"renderTarget\"\n};\n\nexport { GpuRenderTargetSystem };\n//# sourceMappingURL=GpuRenderTargetSystem.mjs.map\n","import { ExtensionType } from '../../../../extensions/Extensions.mjs';\n\n\"use strict\";\nclass GpuShaderSystem {\n constructor() {\n this._gpuProgramData = /* @__PURE__ */ Object.create(null);\n }\n contextChange(gpu) {\n this._gpu = gpu;\n }\n getProgramData(program) {\n return this._gpuProgramData[program._layoutKey] || this._createGPUProgramData(program);\n }\n _createGPUProgramData(program) {\n const device = this._gpu.device;\n const bindGroups = program.gpuLayout.map((group) => device.createBindGroupLayout({ entries: group }));\n const pipelineLayoutDesc = { bindGroupLayouts: bindGroups };\n this._gpuProgramData[program._layoutKey] = {\n bindGroups,\n pipeline: device.createPipelineLayout(pipelineLayoutDesc)\n };\n return this._gpuProgramData[program._layoutKey];\n }\n destroy() {\n this._gpu = null;\n this._gpuProgramData = null;\n }\n}\n/** @ignore */\nGpuShaderSystem.extension = {\n type: [\n ExtensionType.WebGPUSystem\n ],\n name: \"shader\"\n};\n\nexport { GpuShaderSystem };\n//# sourceMappingURL=GpuShaderSystem.mjs.map\n","\"use strict\";\nconst GpuBlendModesToPixi = {};\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};\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};\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};\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};\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};\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};\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};\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};\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};\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\nexport { GpuBlendModesToPixi };\n//# sourceMappingURL=GpuBlendModesToPixi.mjs.map\n","import { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { State } from '../../shared/state/State.mjs';\nimport { GpuBlendModesToPixi } from './GpuBlendModesToPixi.mjs';\n\n\"use strict\";\nclass GpuStateSystem {\n constructor() {\n this.defaultState = new State();\n this.defaultState.blend = true;\n }\n contextChange(gpu) {\n this.gpu = gpu;\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 getColorTargets(state) {\n const blend = GpuBlendModesToPixi[state.blendMode] || GpuBlendModesToPixi.normal;\n return [\n {\n format: \"bgra8unorm\",\n writeMask: 0,\n blend\n }\n ];\n }\n destroy() {\n this.gpu = null;\n }\n}\n/** @ignore */\nGpuStateSystem.extension = {\n type: [\n ExtensionType.WebGPUSystem\n ],\n name: \"state\"\n};\n\nexport { GpuStateSystem };\n//# sourceMappingURL=GpuStateSystem.mjs.map\n","\"use strict\";\nconst gpuUploadBufferImageResource = {\n type: \"image\",\n upload(source, gpuTexture, gpu) {\n const resource = source.resource;\n const total = (source.pixelWidth | 0) * (source.pixelHeight | 0);\n const bytesPerPixel = resource.byteLength / total;\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};\n\nexport { gpuUploadBufferImageResource };\n//# sourceMappingURL=gpuUploadBufferImageResource.mjs.map\n","\"use strict\";\nconst blockDataMap = {\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};\nconst defaultBlockData = { blockBytes: 4, blockWidth: 1, blockHeight: 1 };\nconst gpuUploadCompressedTextureResource = {\n type: \"compressed\",\n upload(source, gpuTexture, gpu) {\n let mipWidth = source.pixelWidth;\n let mipHeight = source.pixelHeight;\n const blockData = blockDataMap[source.format] || defaultBlockData;\n for (let i = 0; i < source.resource.length; i++) {\n const levelBuffer = source.resource[i];\n const bytesPerRow = Math.ceil(mipWidth / blockData.blockWidth) * blockData.blockBytes;\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 mipWidth = Math.max(mipWidth >> 1, 1);\n mipHeight = Math.max(mipHeight >> 1, 1);\n }\n }\n};\n\nexport { blockDataMap, gpuUploadCompressedTextureResource };\n//# sourceMappingURL=gpuUploadCompressedTextureResource.mjs.map\n","\"use strict\";\nconst gpuUploadImageResource = {\n type: \"image\",\n upload(source, gpuTexture, gpu) {\n const resource = source.resource;\n if (!resource)\n return;\n const width = Math.min(gpuTexture.width, source.resourceWidth || source.pixelWidth);\n const height = Math.min(gpuTexture.height, source.resourceHeight || source.pixelHeight);\n const premultipliedAlpha = source.alphaMode === \"premultiply-alpha-on-upload\";\n gpu.device.queue.copyExternalImageToTexture(\n { source: resource },\n { texture: gpuTexture, premultipliedAlpha },\n {\n width,\n height\n }\n );\n }\n};\n\nexport { gpuUploadImageResource };\n//# sourceMappingURL=gpuUploadImageSource.mjs.map\n","import { gpuUploadImageResource } from './gpuUploadImageSource.mjs';\n\n\"use strict\";\nconst gpuUploadVideoResource = {\n type: \"video\",\n upload(source, gpuTexture, gpu) {\n gpuUploadImageResource.upload(source, gpuTexture, gpu);\n }\n};\n\nexport { gpuUploadVideoResource };\n//# sourceMappingURL=gpuUploadVideoSource.mjs.map\n","\"use strict\";\nclass GpuMipmapGenerator {\n constructor(device) {\n this.device = device;\n this.sampler = device.createSampler({ minFilter: \"linear\" });\n this.pipelines = {};\n }\n _getMipmapPipeline(format) {\n let pipeline = this.pipelines[format];\n if (!pipeline) {\n if (!this.mipmapShaderModule) {\n this.mipmapShaderModule = this.device.createShaderModule({\n code: (\n /* wgsl */\n `\n var<private> pos : array<vec2<f32>, 3> = array<vec2<f32>, 3>(\n vec2<f32>(-1.0, -1.0), vec2<f32>(-1.0, 3.0), vec2<f32>(3.0, -1.0));\n\n struct VertexOutput {\n @builtin(position) position : vec4<f32>,\n @location(0) texCoord : vec2<f32>,\n };\n\n @vertex\n fn vertexMain(@builtin(vertex_index) vertexIndex : u32) -> VertexOutput {\n var output : VertexOutput;\n output.texCoord = pos[vertexIndex] * vec2<f32>(0.5, -0.5) + vec2<f32>(0.5);\n output.position = vec4<f32>(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<f32>;\n\n @fragment\n fn fragmentMain(@location(0) texCoord : vec2<f32>) -> @location(0) vec4<f32> {\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 this.pipelines[format] = pipeline;\n }\n return pipeline;\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 generateMipmap(texture) {\n const pipeline = this._getMipmapPipeline(texture.format);\n if (texture.dimension === \"3d\" || texture.dimension === \"1d\") {\n throw new Error(\"Generating mipmaps for non-2d textures is currently unsupported!\");\n }\n let mipTexture = texture;\n const arrayLayerCount = texture.depthOrArrayLayers || 1;\n const renderToSource = texture.usage & GPUTextureUsage.RENDER_ATTACHMENT;\n if (!renderToSource) {\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 mipTexture = this.device.createTexture(mipTextureDescriptor);\n }\n const commandEncoder = this.device.createCommandEncoder({});\n const bindGroupLayout = pipeline.getBindGroupLayout(0);\n for (let arrayLayer = 0; arrayLayer < arrayLayerCount; ++arrayLayer) {\n let srcView = texture.createView({\n baseMipLevel: 0,\n mipLevelCount: 1,\n dimension: \"2d\",\n baseArrayLayer: arrayLayer,\n arrayLayerCount: 1\n });\n let dstMipLevel = renderToSource ? 1 : 0;\n for (let i = 1; i < texture.mipLevelCount; ++i) {\n const dstView = mipTexture.createView({\n baseMipLevel: dstMipLevel++,\n mipLevelCount: 1,\n dimension: \"2d\",\n baseArrayLayer: arrayLayer,\n arrayLayerCount: 1\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 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 passEncoder.setPipeline(pipeline);\n passEncoder.setBindGroup(0, bindGroup);\n passEncoder.draw(3, 1, 0, 0);\n passEncoder.end();\n srcView = dstView;\n }\n }\n if (!renderToSource) {\n const mipLevelSize = {\n width: Math.ceil(texture.width / 2),\n height: Math.ceil(texture.height / 2),\n depthOrArrayLayers: arrayLayerCount\n };\n for (let i = 1; i < texture.mipLevelCount; ++i) {\n commandEncoder.copyTextureToTexture({\n texture: mipTexture,\n mipLevel: i - 1\n }, {\n texture,\n mipLevel: i\n }, mipLevelSize);\n mipLevelSize.width = Math.ceil(mipLevelSize.width / 2);\n mipLevelSize.height = Math.ceil(mipLevelSize.height / 2);\n }\n }\n this.device.queue.submit([commandEncoder.finish()]);\n if (!renderToSource) {\n mipTexture.destroy();\n }\n return texture;\n }\n}\n\nexport { GpuMipmapGenerator };\n//# sourceMappingURL=GpuMipmapGenerator.mjs.map\n","import { DOMAdapter } from '../../../../environment/adapter.mjs';\nimport { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { CanvasPool } from '../../shared/texture/CanvasPool.mjs';\nimport { BindGroup } from '../shader/BindGroup.mjs';\nimport { gpuUploadBufferImageResource } from './uploaders/gpuUploadBufferImageResource.mjs';\nimport { gpuUploadCompressedTextureResource, blockDataMap } from './uploaders/gpuUploadCompressedTextureResource.mjs';\nimport { gpuUploadImageResource } from './uploaders/gpuUploadImageSource.mjs';\nimport { gpuUploadVideoResource } from './uploaders/gpuUploadVideoSource.mjs';\nimport { GpuMipmapGenerator } from './utils/GpuMipmapGenerator.mjs';\n\n\"use strict\";\nclass GpuTextureSystem {\n constructor(renderer) {\n this.managedTextures = [];\n this._gpuSources = /* @__PURE__ */ Object.create(null);\n this._gpuSamplers = /* @__PURE__ */ Object.create(null);\n this._bindGroupHash = /* @__PURE__ */ Object.create(null);\n this._textureViewHash = /* @__PURE__ */ Object.create(null);\n this._uploads = {\n image: gpuUploadImageResource,\n buffer: gpuUploadBufferImageResource,\n video: gpuUploadVideoResource,\n compressed: gpuUploadCompressedTextureResource\n };\n this._renderer = renderer;\n }\n contextChange(gpu) {\n this._gpu = gpu;\n }\n initSource(source) {\n if (source.autoGenerateMipmaps) {\n const biggestDimension = Math.max(source.pixelWidth, source.pixelHeight);\n source.mipLevelCount = Math.floor(Math.log2(biggestDimension)) + 1;\n }\n let usage = GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST;\n if (source.uploadMethodId !== \"compressed\") {\n usage |= GPUTextureUsage.RENDER_ATTACHMENT;\n usage |= GPUTextureUsage.COPY_SRC;\n }\n const blockData = blockDataMap[source.format] || { blockBytes: 4, blockWidth: 1, blockHeight: 1 };\n const width = Math.ceil(source.pixelWidth / blockData.blockWidth) * blockData.blockWidth;\n const height = Math.ceil(source.pixelHeight / blockData.blockHeight) * blockData.blockHeight;\n const textureDescriptor = {\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 const gpuTexture = this._gpu.device.createTexture(textureDescriptor);\n this._gpuSources[source.uid] = gpuTexture;\n if (!this.managedTextures.includes(source)) {\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 this.managedTextures.push(source);\n }\n this.onSourceUpdate(source);\n return gpuTexture;\n }\n onSourceUpdate(source) {\n const gpuTexture = this.getGpuSource(source);\n if (!gpuTexture)\n return;\n if (this._uploads[source.uploadMethodId]) {\n this._uploads[source.uploadMethodId].upload(source, gpuTexture, this._gpu);\n }\n if (source.autoGenerateMipmaps && source.mipLevelCount > 1) {\n this.onUpdateMipmaps(source);\n }\n }\n onSourceUnload(source) {\n const gpuTexture = this._gpuSources[source.uid];\n if (gpuTexture) {\n this._gpuSources[source.uid] = null;\n gpuTexture.destroy();\n }\n }\n onUpdateMipmaps(source) {\n if (!this._mipmapGenerator) {\n this._mipmapGenerator = new GpuMipmapGenerator(this._gpu.device);\n }\n const gpuTexture = this.getGpuSource(source);\n this._mipmapGenerator.generateMipmap(gpuTexture);\n }\n onSourceDestroy(source) {\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 this.managedTextures.splice(this.managedTextures.indexOf(source), 1);\n this.onSourceUnload(source);\n }\n onSourceResize(source) {\n const gpuTexture = this._gpuSources[source.uid];\n if (!gpuTexture) {\n this.initSource(source);\n } else if (gpuTexture.width !== source.pixelWidth || gpuTexture.height !== source.pixelHeight) {\n this._textureViewHash[source.uid] = null;\n this._bindGroupHash[source.uid] = null;\n this.onSourceUnload(source);\n this.initSource(source);\n }\n }\n _initSampler(sampler) {\n this._gpuSamplers[sampler._resourceId] = this._gpu.device.createSampler(sampler);\n return this._gpuSamplers[sampler._resourceId];\n }\n getGpuSampler(sampler) {\n return this._gpuSamplers[sampler._resourceId] || this._initSampler(sampler);\n }\n getGpuSource(source) {\n return this._gpuSources[source.uid] || this.initSource(source);\n }\n getTextureBindGroup(texture) {\n return this._bindGroupHash[texture.uid] ?? this._createTextureBindGroup(texture);\n }\n _createTextureBindGroup(texture) {\n const source = texture.source;\n const bindGroupId = source.uid;\n this._bindGroupHash[bindGroupId] = new BindGroup({\n 0: source,\n 1: source.style\n });\n return this._bindGroupHash[bindGroupId];\n }\n getTextureView(texture) {\n const source = texture.source;\n return this._textureViewHash[source.uid] ?? this._createTextureView(source);\n }\n _createTextureView(texture) {\n this._textureViewHash[texture.uid] = this.getGpuSource(texture).createView();\n return this._textureViewHash[texture.uid];\n }\n generateCanvas(texture) {\n const renderer = this._renderer;\n const commandEncoder = renderer.gpu.device.createCommandEncoder();\n const canvas = DOMAdapter.get().createCanvas();\n canvas.width = texture.source.pixelWidth;\n canvas.height = texture.source.pixelHeight;\n const context = canvas.getContext(\"webgpu\");\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 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 renderer.gpu.device.queue.submit([commandEncoder.finish()]);\n return canvas;\n }\n getPixels(texture) {\n const webGPUCanvas = this.generateCanvas(texture);\n const canvasAndContext = CanvasPool.getOptimalCanvasAndContext(webGPUCanvas.width, webGPUCanvas.height);\n const context = canvasAndContext.context;\n context.drawImage(webGPUCanvas, 0, 0);\n const { width, height } = webGPUCanvas;\n const imageData = context.getImageData(0, 0, width, height);\n const pixels = new Uint8ClampedArray(imageData.data.buffer);\n CanvasPool.returnCanvasAndContext(canvasAndContext);\n return { pixels, width, height };\n }\n destroy() {\n this.managedTextures.slice().forEach((source) => this.onSourceDestroy(source));\n this.managedTextures = null;\n for (const k of Object.keys(this._bindGroupHash)) {\n const key = Number(k);\n const bindGroup = this._bindGroupHash[key];\n bindGroup?.destroy();\n this._bindGroupHash[key] = null;\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/** @ignore */\nGpuTextureSystem.extension = {\n type: [\n ExtensionType.WebGPUSystem\n ],\n name: \"texture\"\n};\n\nexport { GpuTextureSystem };\n//# sourceMappingURL=GpuTextureSystem.mjs.map\n","import { extensions, ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { GpuGraphicsAdaptor } from '../../../scene/graphics/gpu/GpuGraphicsAdaptor.mjs';\nimport { GpuMeshAdapter } from '../../../scene/mesh/gpu/GpuMeshAdapter.mjs';\nimport { GpuBatchAdaptor } from '../../batcher/gpu/GpuBatchAdaptor.mjs';\nimport { AbstractRenderer } from '../shared/system/AbstractRenderer.mjs';\nimport { SharedSystems, SharedRenderPipes } from '../shared/system/SharedSystems.mjs';\nimport { RendererType } from '../types.mjs';\nimport { BindGroupSystem } from './BindGroupSystem.mjs';\nimport { GpuBufferSystem } from './buffer/GpuBufferSystem.mjs';\nimport { GpuColorMaskSystem } from './GpuColorMaskSystem.mjs';\nimport { GpuDeviceSystem } from './GpuDeviceSystem.mjs';\nimport { GpuEncoderSystem } from './GpuEncoderSystem.mjs';\nimport { GpuStencilSystem } from './GpuStencilSystem.mjs';\nimport { GpuUboSystem } from './GpuUboSystem.mjs';\nimport { GpuUniformBatchPipe } from './GpuUniformBatchPipe.mjs';\nimport { PipelineSystem } from './pipeline/PipelineSystem.mjs';\nimport { GpuRenderTargetSystem } from './renderTarget/GpuRenderTargetSystem.mjs';\nimport { GpuShaderSystem } from './shader/GpuShaderSystem.mjs';\nimport { GpuStateSystem } from './state/GpuStateSystem.mjs';\nimport { GpuTextureSystem } from './texture/GpuTextureSystem.mjs';\n\n\"use strict\";\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];\nconst systems = [];\nconst renderPipes = [];\nconst renderPipeAdaptors = [];\nextensions.handleByNamedList(ExtensionType.WebGPUSystem, systems);\nextensions.handleByNamedList(ExtensionType.WebGPUPipes, renderPipes);\nextensions.handleByNamedList(ExtensionType.WebGPUPipesAdaptor, renderPipeAdaptors);\nextensions.add(...DefaultWebGPUSystems, ...DefaultWebGPUPipes, ...DefaultWebGPUAdapters);\nclass WebGPURenderer extends AbstractRenderer {\n constructor() {\n const systemConfig = {\n name: \"webgpu\",\n type: RendererType.WEBGPU,\n systems,\n renderPipes,\n renderPipeAdaptors\n };\n super(systemConfig);\n }\n}\n\nexport { WebGPURenderer };\n//# sourceMappingURL=WebGPURenderer.mjs.map\n","import { DOMAdapter } from '../../../../environment/adapter.mjs';\nimport { nextPow2 } from '../../../../maths/misc/pow2.mjs';\n\n\"use strict\";\nclass CanvasPoolClass {\n constructor(canvasOptions) {\n this._canvasPool = /* @__PURE__ */ Object.create(null);\n this.canvasOptions = canvasOptions || {};\n this.enableFullScreen = false;\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 _createCanvasAndContext(pixelWidth, pixelHeight) {\n const canvas = DOMAdapter.get().createCanvas();\n canvas.width = pixelWidth;\n canvas.height = pixelHeight;\n const context = canvas.getContext(\"2d\");\n return { canvas, context };\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 getOptimalCanvasAndContext(minWidth, minHeight, resolution = 1) {\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 const key = (minWidth << 17) + (minHeight << 1);\n if (!this._canvasPool[key]) {\n this._canvasPool[key] = [];\n }\n let canvasAndContext = this._canvasPool[key].pop();\n if (!canvasAndContext) {\n canvasAndContext = this._createCanvasAndContext(minWidth, minHeight);\n }\n return canvasAndContext;\n }\n /**\n * Place a render texture back into the pool.\n * @param canvasAndContext\n */\n returnCanvasAndContext(canvasAndContext) {\n const { width, height } = canvasAndContext.canvas;\n const key = (width << 17) + (height << 1);\n this._canvasPool[key].push(canvasAndContext);\n }\n clear() {\n this._canvasPool = {};\n }\n}\nconst CanvasPool = new CanvasPoolClass();\n\nexport { CanvasPool, CanvasPoolClass };\n//# sourceMappingURL=CanvasPool.mjs.map\n"],"names":["Float32Array","s","r","Object","navigator","Promise","Error","Math","i","GPUTextureUsage","e","console","a","Uint8ClampedArray","Number"],"mappings":"gRAaA,OAAM,EACJ,MAAO,CACL,IAAM,EAAgB,IAAI,GAAY,CAAC,CACrC,iBAAkB,CAAE,MAAO,IAAI,GAAM,CAAI,KAAM,aAAc,EAC7D,OAAQ,CAAE,MAAO,IAAIA,aAAa,CAAC,EAAG,EAAG,EAAG,EAAE,EAAG,KAAM,WAAY,EACnE,OAAQ,CAAE,MAAO,EAAG,KAAM,KAAM,CAClC,GACM,EAAa,QAA4B,CAC7C,KAAM,WACN,KAAM,CACJ,GAAQ,CACR,QAAwB,IACxB,IAAqB,CACrB,GAAc,CACf,AACH,EACA,KAAI,CAAC,MAAM,CAAG,IAAI,GAAM,CAAC,CACvB,aACA,UAAW,CAET,eACF,CACF,EACF,CACA,QAAQ,CAAY,CAAE,CAAU,CAAE,CAChC,IAAM,EAAU,EAAW,OAAO,CAC5BC,EAAS,EAAQ,YAAY,EAAI,IAAI,CAAC,MAAM,CAC5C,EAAW,EAAa,QAAQ,CAEhC,CACJ,UAAQ,CACR,cAAY,CACb,CAAG,AAJkB,EAAS,eAAe,CAI5B,oBAAoB,CAAC,GACjC,EAAU,EAAS,OAAO,CAChC,EAAQ,sCAAsC,CAC5C,EACAA,EAAO,UAAU,CACjB,EAAa,KAAK,EAEpB,EAAQ,WAAW,CAAC,GACpB,IAAM,EAA0B,EAAS,cAAc,CAAC,SAAS,CACjE,EAAQ,YAAY,CAAC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AM,CAEjD,IAAI,CAAC,WAAW,CADJ,AAAC,IAAS,EAAC,EAAM,IAAU,GAClB,CAAC,IAAI,CAAC,EAC7B,CACA,OAAQ,CACN,IAAI,CAAC,WAAW,CAAG,CAAC,CACtB,CACF,C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/async/631.9799e85f.js","sources":["webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/high-shader/shader-bits/textureBit.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/ensureAttributes.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/state/GpuStencilModesToPixi.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/shared/renderTarget/RenderTargetSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/shared/renderTarget/isRenderingToScreen.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/gpu/renderTarget/calculateProjection.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/container/CustomRenderPipe.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/container/utils/executeInstructions.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/container/RenderGroupPipe.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/container/utils/buildInstructions.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/container/utils/mixColors.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/container/utils/mixHexColors.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/container/utils/updateRenderGroupTransforms.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/container/RenderGroupSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/container/utils/collectRenderGroups.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/container/utils/validateRenderables.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/scene/sprite/SpritePipe.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/batcher/shared/BatcherPipe.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/filters/mask/mask.wgsl.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/filters/mask/MaskFilter.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/filters/mask/mask.vert.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/filters/mask/mask.frag.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/mask/alpha/AlphaMaskPipe.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/mask/color/ColorMaskPipe.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/mask/stencil/StencilMaskPipe.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/shared/blendModes/BlendModePipe.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/shared/extract/ExtractSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/shared/texture/RenderTexture.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/shared/extract/GenerateTextureSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/shared/renderTarget/GlobalUniformSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/utils/sayHello.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/shared/startup/HelloSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureGCSystem.mjs","webpack://android-playground/../../node_modules/.pnpm/pixi.js@8.1.1/node_modules/pixi.js/lib/rendering/renderers/shared/system/SharedSystems.mjs"],"sourcesContent":["\"use strict\";\nconst textureBit = {\n name: \"texture-bit\",\n vertex: {\n header: (\n /* wgsl */\n `\n\n struct TextureUniforms {\n uTextureMatrix:mat3x3<f32>,\n }\n\n @group(2) @binding(2) var<uniform> textureUniforms : TextureUniforms;\n `\n ),\n main: (\n /* wgsl */\n `\n uv = (textureUniforms.uTextureMatrix * vec3(uv, 1.0)).xy;\n `\n )\n },\n fragment: {\n header: (\n /* wgsl */\n `\n @group(2) @binding(0) var uTexture: texture_2d<f32>;\n @group(2) @binding(1) var uSampler: sampler;\n\n \n `\n ),\n main: (\n /* wgsl */\n `\n outColor = textureSample(uTexture, uSampler, vUV);\n `\n )\n }\n};\nconst textureBitGl = {\n name: \"texture-bit\",\n vertex: {\n header: (\n /* glsl */\n `\n uniform mat3 uTextureMatrix;\n `\n ),\n main: (\n /* glsl */\n `\n uv = (uTextureMatrix * vec3(uv, 1.0)).xy;\n `\n )\n },\n fragment: {\n header: (\n /* glsl */\n `\n uniform sampler2D uTexture;\n\n \n `\n ),\n main: (\n /* glsl */\n `\n outColor = texture(uTexture, vUV);\n `\n )\n }\n};\n\nexport { textureBit, textureBitGl };\n//# sourceMappingURL=textureBit.mjs.map\n","import { warn } from '../../../../../utils/logging/warn.mjs';\nimport { getAttributeInfoFromFormat } from '../../../shared/geometry/utils/getAttributeInfoFromFormat.mjs';\n\n\"use strict\";\nfunction ensureAttributes(geometry, extractedData) {\n for (const i in geometry.attributes) {\n const attribute = geometry.attributes[i];\n const attributeData = extractedData[i];\n if (attributeData) {\n attribute.location ?? (attribute.location = attributeData.location);\n attribute.format ?? (attribute.format = attributeData.format);\n attribute.offset ?? (attribute.offset = attributeData.offset);\n attribute.instance ?? (attribute.instance = attributeData.instance);\n } else {\n warn(`Attribute ${i} is not present in the shader, but is present in the geometry. Unable to infer attribute details.`);\n }\n }\n ensureStartAndStride(geometry);\n}\nfunction ensureStartAndStride(geometry) {\n const { buffers, attributes } = geometry;\n const tempStride = {};\n const tempStart = {};\n for (const j in buffers) {\n const buffer = buffers[j];\n tempStride[buffer.uid] = 0;\n tempStart[buffer.uid] = 0;\n }\n for (const j in attributes) {\n const attribute = attributes[j];\n tempStride[attribute.buffer.uid] += getAttributeInfoFromFormat(attribute.format).stride;\n }\n for (const j in attributes) {\n const attribute = attributes[j];\n attribute.stride ?? (attribute.stride = tempStride[attribute.buffer.uid]);\n attribute.start ?? (attribute.start = tempStart[attribute.buffer.uid]);\n tempStart[attribute.buffer.uid] += getAttributeInfoFromFormat(attribute.format).stride;\n }\n}\n\nexport { ensureAttributes };\n//# sourceMappingURL=ensureAttributes.mjs.map\n","import { STENCIL_MODES } from '../../shared/state/const.mjs';\n\n\"use strict\";\nconst GpuStencilModesToPixi = [];\nGpuStencilModesToPixi[STENCIL_MODES.NONE] = void 0;\nGpuStencilModesToPixi[STENCIL_MODES.DISABLED] = {\n stencilWriteMask: 0,\n stencilReadMask: 0\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};\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};\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\nexport { GpuStencilModesToPixi };\n//# sourceMappingURL=GpuStencilModesToPixi.mjs.map\n","import { Matrix } from '../../../../maths/matrix/Matrix.mjs';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle.mjs';\nimport { CLEAR } from '../../gl/const.mjs';\nimport { calculateProjection } from '../../gpu/renderTarget/calculateProjection.mjs';\nimport { SystemRunner } from '../system/SystemRunner.mjs';\nimport { CanvasSource } from '../texture/sources/CanvasSource.mjs';\nimport { TextureSource } from '../texture/sources/TextureSource.mjs';\nimport { Texture } from '../texture/Texture.mjs';\nimport { getCanvasTexture } from '../texture/utils/getCanvasTexture.mjs';\nimport { isRenderingToScreen } from './isRenderingToScreen.mjs';\nimport { RenderTarget } from './RenderTarget.mjs';\n\n\"use strict\";\nclass RenderTargetSystem {\n constructor(renderer) {\n /** This is the root viewport for the render pass*/\n this.rootViewPort = new Rectangle();\n /** the current viewport that the gpu is using */\n this.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 this.onRenderTargetChange = new SystemRunner(\"onRenderTargetChange\");\n /** the projection matrix that is used by the shaders based on the active render target and the viewport */\n this.projectionMatrix = new Matrix();\n /** the default clear color for render targets */\n this.defaultClearColor = [0, 0, 0, 0];\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 this._renderSurfaceToRenderTargetHash = /* @__PURE__ */ new Map();\n /** A hash that stores a gpu render target for a given render target. */\n this._gpuRenderTargetHash = /* @__PURE__ */ 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 this._renderTargetStack = [];\n this._renderer = renderer;\n }\n /** called when dev wants to finish a render pass */\n finishRenderPass() {\n this.adaptor.finishRenderPass(this.renderTarget);\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 renderStart({\n target,\n clear,\n clearColor,\n frame\n }) {\n this._renderTargetStack.length = 0;\n this.push(\n target,\n clear,\n clearColor,\n frame\n );\n this.rootViewPort.copyFrom(this.viewport);\n this.rootRenderTarget = this.renderTarget;\n this.renderingToScreen = isRenderingToScreen(this.rootRenderTarget);\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 bind(renderSurface, clear = true, clearColor, frame) {\n const renderTarget = this.getRenderTarget(renderSurface);\n const didChange = this.renderTarget !== renderTarget;\n this.renderTarget = renderTarget;\n this.renderSurface = renderSurface;\n const gpuRenderTarget = this.getGpuRenderTarget(renderTarget);\n if (renderTarget.pixelWidth !== gpuRenderTarget.width || renderTarget.pixelHeight !== gpuRenderTarget.height) {\n this.adaptor.resizeGpuRenderTarget(renderTarget);\n gpuRenderTarget.width = renderTarget.pixelWidth;\n gpuRenderTarget.height = renderTarget.pixelHeight;\n }\n const source = renderTarget.colorTexture;\n const viewport = this.viewport;\n const pixelWidth = source.pixelWidth;\n const pixelHeight = source.pixelHeight;\n if (!frame && renderSurface instanceof Texture) {\n frame = renderSurface.frame;\n }\n if (frame) {\n const resolution = source._resolution;\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 } else {\n viewport.x = 0;\n viewport.y = 0;\n viewport.width = pixelWidth;\n viewport.height = pixelHeight;\n }\n calculateProjection(\n this.projectionMatrix,\n 0,\n 0,\n viewport.width / source.resolution,\n viewport.height / source.resolution,\n !renderTarget.isRoot\n );\n this.adaptor.startRenderPass(renderTarget, clear, clearColor, viewport);\n if (didChange) {\n this.onRenderTargetChange.emit(renderTarget);\n }\n return renderTarget;\n }\n clear(target, clear = CLEAR.ALL, clearColor) {\n if (!clear)\n return;\n if (target) {\n target = this.getRenderTarget(target);\n }\n this.adaptor.clear(\n target || this.renderTarget,\n clear,\n clearColor,\n this.viewport\n );\n }\n contextChange() {\n this._gpuRenderTargetHash = /* @__PURE__ */ Object.create(null);\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 push(renderSurface, clear = CLEAR.ALL, clearColor, frame) {\n const renderTarget = this.bind(renderSurface, clear, clearColor, frame);\n this._renderTargetStack.push({\n renderTarget,\n frame\n });\n return renderTarget;\n }\n /** Pops the current render target from the renderer and restores the previous render target. */\n pop() {\n this._renderTargetStack.pop();\n const currentRenderTargetData = this._renderTargetStack[this._renderTargetStack.length - 1];\n this.bind(currentRenderTargetData.renderTarget, false, null, currentRenderTargetData.frame);\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 getRenderTarget(renderSurface) {\n if (renderSurface.isTexture) {\n renderSurface = renderSurface.source;\n }\n return this._renderSurfaceToRenderTargetHash.get(renderSurface) ?? this._initRenderTarget(renderSurface);\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 copyToTexture(sourceRenderSurfaceTexture, destinationTexture, originSrc, size, originDest) {\n if (originSrc.x < 0) {\n size.width += originSrc.x;\n originDest.x -= originSrc.x;\n originSrc.x = 0;\n }\n if (originSrc.y < 0) {\n size.height += originSrc.y;\n originDest.y -= originSrc.y;\n originSrc.y = 0;\n }\n const { pixelWidth, pixelHeight } = sourceRenderSurfaceTexture;\n size.width = Math.min(size.width, pixelWidth - originSrc.x);\n size.height = Math.min(size.height, pixelHeight - originSrc.y);\n return this.adaptor.copyToTexture(\n sourceRenderSurfaceTexture,\n destinationTexture,\n originSrc,\n size,\n originDest\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 ensureDepthStencil() {\n if (!this.renderTarget.stencil) {\n this.renderTarget.stencil = true;\n this.adaptor.startRenderPass(this.renderTarget, false, null, this.viewport);\n }\n }\n /** nukes the render target system */\n destroy() {\n this._renderer = null;\n this._renderSurfaceToRenderTargetHash.forEach((renderTarget, key) => {\n if (renderTarget !== key) {\n renderTarget.destroy();\n }\n });\n this._renderSurfaceToRenderTargetHash.clear();\n this._gpuRenderTargetHash = /* @__PURE__ */ Object.create(null);\n }\n _initRenderTarget(renderSurface) {\n let renderTarget = null;\n if (CanvasSource.test(renderSurface)) {\n renderSurface = getCanvasTexture(renderSurface);\n }\n if (renderSurface instanceof RenderTarget) {\n renderTarget = renderSurface;\n } else if (renderSurface instanceof TextureSource) {\n renderTarget = new RenderTarget({\n colorTextures: [renderSurface]\n });\n if (CanvasSource.test(renderSurface.source.resource)) {\n renderTarget.isRoot = true;\n }\n renderSurface.once(\"destroy\", () => {\n renderTarget.destroy();\n const gpuRenderTarget = this._gpuRenderTargetHash[renderTarget.uid];\n if (gpuRenderTarget) {\n this._gpuRenderTargetHash[renderTarget.uid] = null;\n this.adaptor.destroyGpuRenderTarget(gpuRenderTarget);\n }\n });\n }\n this._renderSurfaceToRenderTargetHash.set(renderSurface, renderTarget);\n return renderTarget;\n }\n getGpuRenderTarget(renderTarget) {\n return this._gpuRenderTargetHash[renderTarget.uid] || (this._gpuRenderTargetHash[renderTarget.uid] = this.adaptor.initGpuRenderTarget(renderTarget));\n }\n}\n\nexport { RenderTargetSystem };\n//# sourceMappingURL=RenderTargetSystem.mjs.map\n","\"use strict\";\nfunction isRenderingToScreen(renderTarget) {\n const resource = renderTarget.colorTexture.source.resource;\n return globalThis.HTMLCanvasElement && resource instanceof HTMLCanvasElement && document.body.contains(resource);\n}\n\nexport { isRenderingToScreen };\n//# sourceMappingURL=isRenderingToScreen.mjs.map\n","\"use strict\";\nfunction calculateProjection(pm, x, y, width, height, flipY) {\n const sign = flipY ? 1 : -1;\n pm.identity();\n pm.a = 1 / width * 2;\n pm.d = sign * (1 / height * 2);\n pm.tx = -1 - x * pm.a;\n pm.ty = -sign - y * pm.d;\n return pm;\n}\n\nexport { calculateProjection };\n//# sourceMappingURL=calculateProjection.mjs.map\n","import { ExtensionType } from '../../extensions/Extensions.mjs';\n\n\"use strict\";\nclass CustomRenderPipe {\n constructor(renderer) {\n this._renderer = renderer;\n }\n addRenderable(container, instructionSet) {\n this._renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add(container);\n }\n execute(container) {\n if (!container.isRenderable)\n return;\n container.render(this._renderer);\n }\n destroy() {\n this._renderer = null;\n }\n}\nCustomRenderPipe.extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes\n ],\n name: \"customRender\"\n};\n\nexport { CustomRenderPipe };\n//# sourceMappingURL=CustomRenderPipe.mjs.map\n","\"use strict\";\nfunction executeInstructions(renderGroup, renderer) {\n const instructionSet = renderGroup.instructionSet;\n const instructions = instructionSet.instructions;\n for (let i = 0; i < instructionSet.instructionSize; i++) {\n const instruction = instructions[i];\n renderer[instruction.renderPipeId].execute(instruction);\n }\n}\n\nexport { executeInstructions };\n//# sourceMappingURL=executeInstructions.mjs.map\n","import { ExtensionType } from '../../extensions/Extensions.mjs';\nimport { executeInstructions } from './utils/executeInstructions.mjs';\n\n\"use strict\";\nclass RenderGroupPipe {\n constructor(renderer) {\n this._renderer = renderer;\n }\n addRenderGroup(renderGroup, instructionSet) {\n this._renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add(renderGroup);\n }\n execute(renderGroup) {\n if (!renderGroup.isRenderable)\n return;\n this._renderer.globalUniforms.push({\n worldTransformMatrix: renderGroup.worldTransform,\n worldColor: renderGroup.worldColorAlpha\n });\n executeInstructions(renderGroup, this._renderer.renderPipes);\n this._renderer.globalUniforms.pop();\n }\n destroy() {\n this._renderer = null;\n }\n}\nRenderGroupPipe.extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes\n ],\n name: \"renderGroup\"\n};\n\nexport { RenderGroupPipe };\n//# sourceMappingURL=RenderGroupPipe.mjs.map\n","\"use strict\";\nfunction buildInstructions(renderGroup, renderPipes) {\n const root = renderGroup.root;\n const instructionSet = renderGroup.instructionSet;\n instructionSet.reset();\n renderPipes.batch.buildStart(instructionSet);\n renderPipes.blendMode.buildStart();\n renderPipes.colorMask.buildStart();\n if (root.sortableChildren) {\n root.sortChildren();\n }\n collectAllRenderablesAdvanced(root, instructionSet, renderPipes, true);\n renderPipes.batch.buildEnd(instructionSet);\n renderPipes.blendMode.buildEnd(instructionSet);\n}\nfunction collectAllRenderables(container, instructionSet, rendererPipes) {\n if (container.globalDisplayStatus < 7 || !container.includeInBuild)\n return;\n if (container.sortableChildren) {\n container.sortChildren();\n }\n if (container.isSimple) {\n collectAllRenderablesSimple(container, instructionSet, rendererPipes);\n } else {\n collectAllRenderablesAdvanced(container, instructionSet, rendererPipes, false);\n }\n}\nfunction collectAllRenderablesSimple(container, instructionSet, renderPipes) {\n if (container.renderPipeId) {\n renderPipes.blendMode.setBlendMode(container, container.groupBlendMode, instructionSet);\n container.didViewUpdate = false;\n const rp = renderPipes;\n rp[container.renderPipeId].addRenderable(container, instructionSet);\n }\n if (!container.isRenderGroupRoot) {\n const children = container.children;\n const length = children.length;\n for (let i = 0; i < length; i++) {\n collectAllRenderables(children[i], instructionSet, renderPipes);\n }\n }\n}\nfunction collectAllRenderablesAdvanced(container, instructionSet, renderPipes, isRoot) {\n if (!isRoot && container.isRenderGroupRoot) {\n renderPipes.renderGroup.addRenderGroup(container.renderGroup, instructionSet);\n } else {\n for (let i = 0; i < container.effects.length; i++) {\n const effect = container.effects[i];\n const pipe = renderPipes[effect.pipe];\n pipe.push(effect, container, instructionSet);\n }\n const renderPipeId = container.renderPipeId;\n if (renderPipeId) {\n renderPipes.blendMode.setBlendMode(container, container.groupBlendMode, instructionSet);\n container.didViewUpdate = false;\n const pipe = renderPipes[renderPipeId];\n pipe.addRenderable(container, instructionSet);\n }\n const children = container.children;\n if (children.length) {\n for (let i = 0; i < children.length; i++) {\n collectAllRenderables(children[i], instructionSet, renderPipes);\n }\n }\n for (let i = container.effects.length - 1; i >= 0; i--) {\n const effect = container.effects[i];\n const pipe = renderPipes[effect.pipe];\n pipe.pop(effect, container, instructionSet);\n }\n }\n}\n\nexport { buildInstructions, collectAllRenderables };\n//# sourceMappingURL=buildInstructions.mjs.map\n","import { mixHexColors } from './mixHexColors.mjs';\n\n\"use strict\";\nconst WHITE_BGR = 16777215;\nfunction mixColors(localBGRColor, parentBGRColor) {\n if (localBGRColor === WHITE_BGR || parentBGRColor === WHITE_BGR) {\n return localBGRColor + parentBGRColor - WHITE_BGR;\n }\n return mixHexColors(localBGRColor, parentBGRColor, 0.5);\n}\nfunction mixStandardAnd32BitColors(localColorRGB, localAlpha, parentColor) {\n const parentAlpha = (parentColor >> 24 & 255) / 255;\n const globalAlpha = localAlpha * parentAlpha * 255;\n const localBGRColor = ((localColorRGB & 255) << 16) + (localColorRGB & 65280) + (localColorRGB >> 16 & 255);\n const parentBGRColor = parentColor & 16777215;\n let sharedBGRColor;\n if (localBGRColor === WHITE_BGR || parentBGRColor === WHITE_BGR) {\n sharedBGRColor = localBGRColor + parentBGRColor - WHITE_BGR;\n } else {\n sharedBGRColor = mixHexColors(localBGRColor, parentBGRColor, 0.5);\n }\n return sharedBGRColor + (globalAlpha << 24);\n}\n\nexport { mixColors, mixStandardAnd32BitColors };\n//# sourceMappingURL=mixColors.mjs.map\n","\"use strict\";\nfunction mixHexColors(color1, color2, ratio) {\n const r1 = color1 >> 16 & 255;\n const g1 = color1 >> 8 & 255;\n const b1 = color1 & 255;\n const r2 = color2 >> 16 & 255;\n const g2 = color2 >> 8 & 255;\n const b2 = color2 & 255;\n const r = r1 + (r2 - r1) * ratio;\n const g = g1 + (g2 - g1) * ratio;\n const b = b1 + (b2 - b1) * ratio;\n return (r << 16) + (g << 8) + b;\n}\n\nexport { mixHexColors };\n//# sourceMappingURL=mixHexColors.mjs.map\n","import { Container, UPDATE_COLOR, UPDATE_BLEND, UPDATE_VISIBLE } from '../Container.mjs';\nimport { mixColors } from './mixColors.mjs';\n\n\"use strict\";\nconst tempContainer = new Container();\nfunction updateRenderGroupTransforms(renderGroup, updateChildRenderGroups = false) {\n updateRenderGroupTransform(renderGroup);\n const childrenToUpdate = renderGroup.childrenToUpdate;\n const updateTick = renderGroup.updateTick;\n renderGroup.updateTick++;\n for (const j in childrenToUpdate) {\n const childrenAtDepth = childrenToUpdate[j];\n const list = childrenAtDepth.list;\n const index = childrenAtDepth.index;\n for (let i = 0; i < index; i++) {\n updateTransformAndChildren(list[i], updateTick, 0);\n }\n childrenAtDepth.index = 0;\n }\n if (updateChildRenderGroups) {\n for (let i = 0; i < renderGroup.renderGroupChildren.length; i++) {\n updateRenderGroupTransforms(renderGroup.renderGroupChildren[i], updateChildRenderGroups);\n }\n }\n}\nfunction updateRenderGroupTransform(renderGroup) {\n const root = renderGroup.root;\n let worldAlpha;\n if (renderGroup.renderGroupParent) {\n const renderGroupParent = renderGroup.renderGroupParent;\n renderGroup.worldTransform.appendFrom(\n root.relativeGroupTransform,\n renderGroupParent.worldTransform\n );\n renderGroup.worldColor = mixColors(\n root.groupColor,\n renderGroupParent.worldColor\n );\n worldAlpha = root.groupAlpha * renderGroupParent.worldAlpha;\n } else {\n renderGroup.worldTransform.copyFrom(root.localTransform);\n renderGroup.worldColor = root.localColor;\n worldAlpha = root.localAlpha;\n }\n worldAlpha = worldAlpha < 0 ? 0 : worldAlpha > 1 ? 1 : worldAlpha;\n renderGroup.worldAlpha = worldAlpha;\n renderGroup.worldColorAlpha = renderGroup.worldColor + ((worldAlpha * 255 | 0) << 24);\n}\nfunction updateTransformAndChildren(container, updateTick, updateFlags) {\n if (updateTick === container.updateTick)\n return;\n container.updateTick = updateTick;\n container.didChange = false;\n const localTransform = container.localTransform;\n container.updateLocalTransform();\n const parent = container.parent;\n if (parent && !parent.isRenderGroupRoot) {\n updateFlags = updateFlags | container._updateFlags;\n container.relativeGroupTransform.appendFrom(\n localTransform,\n parent.relativeGroupTransform\n );\n if (updateFlags) {\n updateColorBlendVisibility(container, parent, updateFlags);\n }\n } else {\n updateFlags = container._updateFlags;\n container.relativeGroupTransform.copyFrom(localTransform);\n if (updateFlags) {\n updateColorBlendVisibility(container, tempContainer, updateFlags);\n }\n }\n if (!container.isRenderGroupRoot) {\n const children = container.children;\n const length = children.length;\n for (let i = 0; i < length; i++) {\n updateTransformAndChildren(children[i], updateTick, updateFlags);\n }\n const renderGroup = container.renderGroup;\n if (container.renderPipeId && !renderGroup.structureDidChange) {\n renderGroup.updateRenderable(container);\n }\n }\n}\nfunction updateColorBlendVisibility(container, parent, updateFlags) {\n if (updateFlags & UPDATE_COLOR) {\n container.groupColor = mixColors(\n container.localColor,\n parent.groupColor\n );\n let groupAlpha = container.localAlpha * parent.groupAlpha;\n groupAlpha = groupAlpha < 0 ? 0 : groupAlpha > 1 ? 1 : groupAlpha;\n container.groupAlpha = groupAlpha;\n container.groupColorAlpha = container.groupColor + ((groupAlpha * 255 | 0) << 24);\n }\n if (updateFlags & UPDATE_BLEND) {\n container.groupBlendMode = container.localBlendMode === \"inherit\" ? parent.groupBlendMode : container.localBlendMode;\n }\n if (updateFlags & UPDATE_VISIBLE) {\n container.globalDisplayStatus = container.localDisplayStatus & parent.globalDisplayStatus;\n }\n container._updateFlags = 0;\n}\n\nexport { updateRenderGroupTransform, updateRenderGroupTransforms, updateTransformAndChildren };\n//# sourceMappingURL=updateRenderGroupTransforms.mjs.map\n","import { ExtensionType } from '../../extensions/Extensions.mjs';\nimport { Matrix } from '../../maths/matrix/Matrix.mjs';\nimport { buildInstructions } from './utils/buildInstructions.mjs';\nimport { collectRenderGroups } from './utils/collectRenderGroups.mjs';\nimport { executeInstructions } from './utils/executeInstructions.mjs';\nimport { updateRenderGroupTransforms } from './utils/updateRenderGroupTransforms.mjs';\nimport { validateRenderables } from './utils/validateRenderables.mjs';\n\n\"use strict\";\nconst tempMatrix = new Matrix();\nclass RenderGroupSystem {\n constructor(renderer) {\n this._renderer = renderer;\n }\n render({ container, transform }) {\n container.isRenderGroup = true;\n const parent = container.parent;\n const renderGroupParent = container.renderGroup.renderGroupParent;\n container.parent = null;\n container.renderGroup.renderGroupParent = null;\n const renderer = this._renderer;\n const renderGroups = collectRenderGroups(container.renderGroup, []);\n let originalLocalTransform = tempMatrix;\n if (transform) {\n originalLocalTransform = originalLocalTransform.copyFrom(container.renderGroup.localTransform);\n container.renderGroup.localTransform.copyFrom(transform);\n }\n const renderPipes = renderer.renderPipes;\n for (let i = 0; i < renderGroups.length; i++) {\n const renderGroup = renderGroups[i];\n renderGroup.runOnRender();\n renderGroup.instructionSet.renderPipes = renderPipes;\n if (!renderGroup.structureDidChange) {\n validateRenderables(renderGroup, renderPipes);\n }\n updateRenderGroupTransforms(renderGroup);\n if (renderGroup.structureDidChange) {\n renderGroup.structureDidChange = false;\n buildInstructions(renderGroup, renderPipes);\n } else {\n updateRenderables(renderGroup);\n }\n renderGroup.childrenRenderablesToUpdate.index = 0;\n renderer.renderPipes.batch.upload(renderGroup.instructionSet);\n }\n renderer.globalUniforms.start({\n worldTransformMatrix: transform ? container.renderGroup.localTransform : container.renderGroup.worldTransform,\n worldColor: container.renderGroup.worldColorAlpha\n });\n executeInstructions(container.renderGroup, renderPipes);\n if (renderPipes.uniformBatch) {\n renderPipes.uniformBatch.renderEnd();\n }\n if (transform) {\n container.renderGroup.localTransform.copyFrom(originalLocalTransform);\n }\n container.parent = parent;\n container.renderGroup.renderGroupParent = renderGroupParent;\n }\n destroy() {\n this._renderer = null;\n }\n}\n/** @ignore */\nRenderGroupSystem.extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem\n ],\n name: \"renderGroup\"\n};\nfunction updateRenderables(renderGroup) {\n const { list, index } = renderGroup.childrenRenderablesToUpdate;\n for (let i = 0; i < index; i++) {\n const container = list[i];\n if (container.didViewUpdate) {\n renderGroup.updateRenderable(container);\n }\n }\n}\n\nexport { RenderGroupSystem };\n//# sourceMappingURL=RenderGroupSystem.mjs.map\n","\"use strict\";\nfunction collectRenderGroups(renderGroup, out = []) {\n out.push(renderGroup);\n for (let i = 0; i < renderGroup.renderGroupChildren.length; i++) {\n collectRenderGroups(renderGroup.renderGroupChildren[i], out);\n }\n return out;\n}\n\nexport { collectRenderGroups };\n//# sourceMappingURL=collectRenderGroups.mjs.map\n","\"use strict\";\nfunction validateRenderables(renderGroup, renderPipes) {\n const { list, index } = renderGroup.childrenRenderablesToUpdate;\n let rebuildRequired = false;\n for (let i = 0; i < index; i++) {\n const container = list[i];\n const renderable = container;\n const pipe = renderPipes[renderable.renderPipeId];\n rebuildRequired = pipe.validateRenderable(container);\n if (rebuildRequired) {\n break;\n }\n }\n renderGroup.structureDidChange = rebuildRequired;\n return rebuildRequired;\n}\n\nexport { validateRenderables };\n//# sourceMappingURL=validateRenderables.mjs.map\n","import { ExtensionType } from '../../extensions/Extensions.mjs';\nimport { BigPool } from '../../utils/pool/PoolGroup.mjs';\nimport { BatchableSprite } from './BatchableSprite.mjs';\n\n\"use strict\";\nclass SpritePipe {\n constructor(renderer) {\n this._gpuSpriteHash = /* @__PURE__ */ Object.create(null);\n this._renderer = renderer;\n }\n addRenderable(sprite, _instructionSet) {\n const gpuSprite = this._getGpuSprite(sprite);\n if (sprite._didSpriteUpdate)\n this._updateBatchableSprite(sprite, gpuSprite);\n this._renderer.renderPipes.batch.addToBatch(gpuSprite);\n }\n updateRenderable(sprite) {\n const gpuSprite = this._gpuSpriteHash[sprite.uid];\n if (sprite._didSpriteUpdate)\n this._updateBatchableSprite(sprite, gpuSprite);\n gpuSprite.batcher.updateElement(gpuSprite);\n }\n validateRenderable(sprite) {\n const texture = sprite._texture;\n const gpuSprite = this._getGpuSprite(sprite);\n if (gpuSprite.texture._source !== texture._source) {\n return !gpuSprite.batcher.checkAndUpdateTexture(gpuSprite, texture);\n }\n return false;\n }\n destroyRenderable(sprite) {\n const batchableSprite = this._gpuSpriteHash[sprite.uid];\n BigPool.return(batchableSprite);\n this._gpuSpriteHash[sprite.uid] = null;\n }\n _updateBatchableSprite(sprite, batchableSprite) {\n sprite._didSpriteUpdate = false;\n batchableSprite.bounds = sprite.bounds;\n batchableSprite.texture = sprite._texture;\n }\n _getGpuSprite(sprite) {\n return this._gpuSpriteHash[sprite.uid] || this._initGPUSprite(sprite);\n }\n _initGPUSprite(sprite) {\n const batchableSprite = BigPool.get(BatchableSprite);\n batchableSprite.renderable = sprite;\n batchableSprite.texture = sprite._texture;\n batchableSprite.bounds = sprite.bounds;\n batchableSprite.roundPixels = this._renderer._roundPixels | sprite._roundPixels;\n this._gpuSpriteHash[sprite.uid] = batchableSprite;\n sprite._didSpriteUpdate = false;\n sprite.on(\"destroyed\", () => {\n this.destroyRenderable(sprite);\n });\n return batchableSprite;\n }\n destroy() {\n for (const i in this._gpuSpriteHash) {\n BigPool.return(this._gpuSpriteHash[i]);\n }\n this._gpuSpriteHash = null;\n this._renderer = null;\n }\n}\n/** @ignore */\nSpritePipe.extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes\n ],\n name: \"sprite\"\n};\n\nexport { SpritePipe };\n//# sourceMappingURL=SpritePipe.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { State } from '../../renderers/shared/state/State.mjs';\nimport { BatchGeometry } from '../gpu/BatchGeometry.mjs';\nimport { Batcher } from './Batcher.mjs';\n\n\"use strict\";\nclass BatcherPipe {\n constructor(renderer, adaptor) {\n this.state = State.for2d();\n this._batches = /* @__PURE__ */ Object.create(null);\n this._geometries = /* @__PURE__ */ Object.create(null);\n this.renderer = renderer;\n this._adaptor = adaptor;\n this._adaptor.init(this);\n }\n buildStart(instructionSet) {\n if (!this._batches[instructionSet.uid]) {\n const batcher = new Batcher();\n this._batches[instructionSet.uid] = batcher;\n this._geometries[batcher.uid] = new BatchGeometry();\n }\n this._activeBatch = this._batches[instructionSet.uid];\n this._activeGeometry = this._geometries[this._activeBatch.uid];\n this._activeBatch.begin();\n }\n addToBatch(batchableObject) {\n this._activeBatch.add(batchableObject);\n }\n break(instructionSet) {\n this._activeBatch.break(instructionSet);\n }\n buildEnd(instructionSet) {\n const activeBatch = this._activeBatch;\n const geometry = this._activeGeometry;\n activeBatch.finish(instructionSet);\n geometry.indexBuffer.setDataWithSize(activeBatch.indexBuffer, activeBatch.indexSize, true);\n geometry.buffers[0].setDataWithSize(activeBatch.attributeBuffer.float32View, activeBatch.attributeSize, false);\n }\n upload(instructionSet) {\n const batcher = this._batches[instructionSet.uid];\n const geometry = this._geometries[batcher.uid];\n if (batcher.dirty) {\n batcher.dirty = false;\n geometry.buffers[0].update(batcher.attributeSize * 4);\n }\n }\n execute(batch) {\n if (batch.action === \"startBatch\") {\n const batcher = batch.batcher;\n const geometry = this._geometries[batcher.uid];\n this._adaptor.start(this, geometry);\n }\n this._adaptor.execute(this, batch);\n }\n destroy() {\n this.state = null;\n this.renderer = null;\n this._adaptor.destroy();\n this._adaptor = null;\n for (const i in this._batches) {\n this._batches[i].destroy();\n }\n this._batches = null;\n for (const i in this._geometries) {\n this._geometries[i].destroy();\n }\n this._geometries = null;\n }\n}\n/** @ignore */\nBatcherPipe.extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes\n ],\n name: \"batch\"\n};\n\nexport { BatcherPipe };\n//# sourceMappingURL=BatcherPipe.mjs.map\n","var source = \"struct GlobalFilterUniforms {\\n uInputSize:vec4<f32>,\\n uInputPixel:vec4<f32>,\\n uInputClamp:vec4<f32>,\\n uOutputFrame:vec4<f32>,\\n uGlobalFrame:vec4<f32>,\\n uOutputTexture:vec4<f32>, \\n};\\n\\nstruct MaskUniforms {\\n uFilterMatrix:mat3x3<f32>,\\n uMaskClamp:vec4<f32>,\\n uAlpha:f32,\\n};\\n\\n\\n@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;\\n@group(0) @binding(1) var uTexture: texture_2d<f32>;\\n@group(0) @binding(2) var uSampler : sampler;\\n\\n@group(1) @binding(0) var<uniform> filterUniforms : MaskUniforms;\\n@group(1) @binding(1) var uMaskTexture: texture_2d<f32>;\\n\\nstruct VSOutput {\\n @builtin(position) position: vec4<f32>,\\n @location(0) uv : vec2<f32>,\\n @location(1) filterUv : vec2<f32>,\\n };\\n\\nfn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>\\n{\\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\\n\\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\\n position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\\n\\n return vec4(position, 0.0, 1.0);\\n}\\n\\nfn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>\\n{\\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\\n}\\n\\nfn globalTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>\\n{\\n return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); \\n}\\n\\nfn getFilterCoord(aPosition:vec2<f32> ) -> vec2<f32>\\n{\\n return ( filterUniforms.uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy;\\n}\\n\\nfn getSize() -> vec2<f32>\\n{\\n\\n \\n return gfu.uGlobalFrame.zw;\\n}\\n \\n@vertex\\nfn mainVertex(\\n @location(0) aPosition : vec2<f32>, \\n) -> VSOutput {\\n return VSOutput(\\n filterVertexPosition(aPosition),\\n filterTextureCoord(aPosition),\\n getFilterCoord(aPosition)\\n );\\n}\\n\\n@fragment\\nfn mainFragment(\\n @location(0) uv: vec2<f32>,\\n @location(1) filterUv: vec2<f32>,\\n @builtin(position) position: vec4<f32>\\n) -> @location(0) vec4<f32> {\\n\\n var maskClamp = filterUniforms.uMaskClamp;\\n\\n var clip = step(3.5,\\n step(maskClamp.x, filterUv.x) +\\n step(maskClamp.y, filterUv.y) +\\n step(filterUv.x, maskClamp.z) +\\n step(filterUv.y, maskClamp.w));\\n\\n var mask = textureSample(uMaskTexture, uSampler, filterUv);\\n var source = textureSample(uTexture, uSampler, uv);\\n \\n var npmAlpha = 0.0;\\n\\n var alphaMul = 1.0 - npmAlpha * (1.0 - mask.a);\\n\\n var a = (alphaMul * mask.r) * clip;\\n\\n return vec4(source.rgb, source.a) * a;\\n}\";\n\nexport { source as default };\n//# sourceMappingURL=mask.wgsl.mjs.map\n","import { Matrix } from '../../maths/matrix/Matrix.mjs';\nimport { GlProgram } from '../../rendering/renderers/gl/shader/GlProgram.mjs';\nimport { GpuProgram } from '../../rendering/renderers/gpu/shader/GpuProgram.mjs';\nimport { UniformGroup } from '../../rendering/renderers/shared/shader/UniformGroup.mjs';\nimport { TextureMatrix } from '../../rendering/renderers/shared/texture/TextureMatrix.mjs';\nimport { Filter } from '../Filter.mjs';\nimport fragment from './mask.frag.mjs';\nimport vertex from './mask.vert.mjs';\nimport source from './mask.wgsl.mjs';\n\n\"use strict\";\nclass MaskFilter extends Filter {\n constructor(options) {\n const { sprite, ...rest } = options;\n const textureMatrix = new TextureMatrix(sprite.texture);\n const filterUniforms = new UniformGroup({\n uFilterMatrix: { value: new Matrix(), type: \"mat3x3<f32>\" },\n uMaskClamp: { value: textureMatrix.uClampFrame, type: \"vec4<f32>\" },\n uAlpha: { value: 1, type: \"f32\" }\n });\n const gpuProgram = GpuProgram.from({\n vertex: {\n source,\n entryPoint: \"mainVertex\"\n },\n fragment: {\n source,\n entryPoint: \"mainFragment\"\n }\n });\n const glProgram = GlProgram.from({\n vertex,\n fragment,\n name: \"mask-filter\"\n });\n super({\n ...rest,\n gpuProgram,\n glProgram,\n resources: {\n filterUniforms,\n uMaskTexture: sprite.texture.source\n }\n });\n this.sprite = sprite;\n this._textureMatrix = textureMatrix;\n }\n apply(filterManager, input, output, clearMode) {\n this._textureMatrix.texture = this.sprite.texture;\n filterManager.calculateSpriteMatrix(\n this.resources.filterUniforms.uniforms.uFilterMatrix,\n this.sprite\n ).prepend(this._textureMatrix.mapCoord);\n this.resources.uMaskTexture = this.sprite.texture.source;\n filterManager.applyFilter(this, input, output, clearMode);\n }\n}\n\nexport { MaskFilter };\n//# sourceMappingURL=MaskFilter.mjs.map\n","var vertex = \"in vec2 aPosition;\\n\\nout vec2 vTextureCoord;\\nout vec2 vMaskCoord;\\n\\n\\nuniform vec4 uInputSize;\\nuniform vec4 uOutputFrame;\\nuniform vec4 uOutputTexture;\\nuniform mat3 uFilterMatrix;\\n\\nvec4 filterVertexPosition( vec2 aPosition )\\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\\nvec2 filterTextureCoord( vec2 aPosition )\\n{\\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\\n}\\n\\nvec2 getFilterCoord( vec2 aPosition )\\n{\\n return ( uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy;\\n} \\n\\nvoid main(void)\\n{\\n gl_Position = filterVertexPosition(aPosition);\\n vTextureCoord = filterTextureCoord(aPosition);\\n vMaskCoord = getFilterCoord(aPosition);\\n}\\n\";\n\nexport { vertex as default };\n//# sourceMappingURL=mask.vert.mjs.map\n","var fragment = \"in vec2 vMaskCoord;\\nin vec2 vTextureCoord;\\n\\nuniform sampler2D uTexture;\\nuniform sampler2D uMaskTexture;\\n\\nuniform float uAlpha;\\nuniform vec4 uMaskClamp;\\n\\nout vec4 finalColor;\\n\\nvoid main(void)\\n{\\n float clip = step(3.5,\\n step(uMaskClamp.x, vMaskCoord.x) +\\n step(uMaskClamp.y, vMaskCoord.y) +\\n step(vMaskCoord.x, uMaskClamp.z) +\\n step(vMaskCoord.y, uMaskClamp.w));\\n\\n // TODO look into why this is needed\\n float npmAlpha = uAlpha; \\n vec4 original = texture(uTexture, vTextureCoord);\\n vec4 masky = texture(uMaskTexture, vMaskCoord);\\n float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\\n\\n original *= (alphaMul * masky.r * uAlpha * clip);\\n\\n finalColor = original;\\n}\\n\";\n\nexport { fragment as default };\n//# sourceMappingURL=mask.frag.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { FilterEffect } from '../../../filters/FilterEffect.mjs';\nimport { MaskFilter } from '../../../filters/mask/MaskFilter.mjs';\nimport { Bounds } from '../../../scene/container/bounds/Bounds.mjs';\nimport { getGlobalBounds } from '../../../scene/container/bounds/getGlobalBounds.mjs';\nimport { collectAllRenderables } from '../../../scene/container/utils/buildInstructions.mjs';\nimport { Sprite } from '../../../scene/sprite/Sprite.mjs';\nimport { BigPool } from '../../../utils/pool/PoolGroup.mjs';\nimport { Texture } from '../../renderers/shared/texture/Texture.mjs';\nimport { TexturePool } from '../../renderers/shared/texture/TexturePool.mjs';\n\n\"use strict\";\nconst tempBounds = new Bounds();\nclass AlphaMaskEffect extends FilterEffect {\n constructor() {\n super({\n filters: [new MaskFilter({\n sprite: new Sprite(Texture.EMPTY)\n })]\n });\n }\n get sprite() {\n return this.filters[0].sprite;\n }\n set sprite(value) {\n this.filters[0].sprite = value;\n }\n}\nclass AlphaMaskPipe {\n constructor(renderer) {\n this._activeMaskStage = [];\n this._renderer = renderer;\n }\n push(mask, maskedContainer, instructionSet) {\n const renderer = this._renderer;\n renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add({\n renderPipeId: \"alphaMask\",\n action: \"pushMaskBegin\",\n mask,\n canBundle: false,\n maskedContainer\n });\n if (mask.renderMaskToTexture) {\n const maskContainer = mask.mask;\n maskContainer.includeInBuild = true;\n collectAllRenderables(\n maskContainer,\n instructionSet,\n renderer.renderPipes\n );\n maskContainer.includeInBuild = false;\n }\n renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add({\n renderPipeId: \"alphaMask\",\n action: \"pushMaskEnd\",\n mask,\n maskedContainer,\n canBundle: false\n });\n }\n pop(mask, _maskedContainer, instructionSet) {\n const renderer = this._renderer;\n renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add({\n renderPipeId: \"alphaMask\",\n action: \"popMaskEnd\",\n mask,\n canBundle: false\n });\n }\n execute(instruction) {\n const renderer = this._renderer;\n const renderMask = instruction.mask.renderMaskToTexture;\n if (instruction.action === \"pushMaskBegin\") {\n const filterEffect = BigPool.get(AlphaMaskEffect);\n if (renderMask) {\n instruction.mask.mask.measurable = true;\n const bounds = getGlobalBounds(instruction.mask.mask, true, tempBounds);\n instruction.mask.mask.measurable = false;\n bounds.ceil();\n const filterTexture = TexturePool.getOptimalTexture(\n bounds.width,\n bounds.height,\n 1,\n false\n );\n renderer.renderTarget.push(filterTexture, true);\n renderer.globalUniforms.push({\n offset: bounds,\n worldColor: 4294967295\n });\n const sprite = filterEffect.sprite;\n sprite.texture = filterTexture;\n sprite.worldTransform.tx = bounds.minX;\n sprite.worldTransform.ty = bounds.minY;\n this._activeMaskStage.push({\n filterEffect,\n maskedContainer: instruction.maskedContainer,\n filterTexture\n });\n } else {\n filterEffect.sprite = instruction.mask.mask;\n this._activeMaskStage.push({\n filterEffect,\n maskedContainer: instruction.maskedContainer\n });\n }\n } else if (instruction.action === \"pushMaskEnd\") {\n const maskData = this._activeMaskStage[this._activeMaskStage.length - 1];\n if (renderMask) {\n renderer.renderTarget.pop();\n renderer.globalUniforms.pop();\n }\n renderer.filter.push({\n renderPipeId: \"filter\",\n action: \"pushFilter\",\n container: maskData.maskedContainer,\n filterEffect: maskData.filterEffect,\n canBundle: false\n });\n } else if (instruction.action === \"popMaskEnd\") {\n renderer.filter.pop();\n const maskData = this._activeMaskStage.pop();\n if (renderMask) {\n TexturePool.returnTexture(maskData.filterTexture);\n }\n BigPool.return(maskData.filterEffect);\n }\n }\n destroy() {\n this._renderer = null;\n this._activeMaskStage = null;\n }\n}\n/** @ignore */\nAlphaMaskPipe.extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes\n ],\n name: \"alphaMask\"\n};\n\nexport { AlphaMaskPipe };\n//# sourceMappingURL=AlphaMaskPipe.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\n\n\"use strict\";\nclass ColorMaskPipe {\n constructor(renderer) {\n this._colorStack = [];\n this._colorStackIndex = 0;\n this._currentColor = 0;\n this._renderer = renderer;\n }\n buildStart() {\n this._colorStack[0] = 15;\n this._colorStackIndex = 1;\n this._currentColor = 15;\n }\n push(mask, _container, instructionSet) {\n const renderer = this._renderer;\n renderer.renderPipes.batch.break(instructionSet);\n const colorStack = this._colorStack;\n colorStack[this._colorStackIndex] = colorStack[this._colorStackIndex - 1] & mask.mask;\n const currentColor = this._colorStack[this._colorStackIndex];\n if (currentColor !== this._currentColor) {\n this._currentColor = currentColor;\n instructionSet.add({\n renderPipeId: \"colorMask\",\n colorMask: currentColor,\n canBundle: false\n });\n }\n this._colorStackIndex++;\n }\n pop(_mask, _container, instructionSet) {\n const renderer = this._renderer;\n renderer.renderPipes.batch.break(instructionSet);\n const colorStack = this._colorStack;\n this._colorStackIndex--;\n const currentColor = colorStack[this._colorStackIndex - 1];\n if (currentColor !== this._currentColor) {\n this._currentColor = currentColor;\n instructionSet.add({\n renderPipeId: \"colorMask\",\n colorMask: currentColor,\n canBundle: false\n });\n }\n }\n execute(instruction) {\n const renderer = this._renderer;\n renderer.colorMask.setMask(instruction.colorMask);\n }\n destroy() {\n this._colorStack = null;\n }\n}\n/** @ignore */\nColorMaskPipe.extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes\n ],\n name: \"colorMask\"\n};\n\nexport { ColorMaskPipe };\n//# sourceMappingURL=ColorMaskPipe.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { collectAllRenderables } from '../../../scene/container/utils/buildInstructions.mjs';\nimport { CLEAR } from '../../renderers/gl/const.mjs';\nimport { STENCIL_MODES } from '../../renderers/shared/state/const.mjs';\n\n\"use strict\";\nclass StencilMaskPipe {\n constructor(renderer) {\n // used when building and also when executing..\n this._maskStackHash = {};\n this._maskHash = /* @__PURE__ */ new WeakMap();\n this._renderer = renderer;\n }\n push(mask, _container, instructionSet) {\n var _a;\n const effect = mask;\n const renderer = this._renderer;\n renderer.renderPipes.batch.break(instructionSet);\n renderer.renderPipes.blendMode.setBlendMode(effect.mask, \"none\", instructionSet);\n instructionSet.add({\n renderPipeId: \"stencilMask\",\n action: \"pushMaskBegin\",\n mask,\n canBundle: false\n });\n const maskContainer = effect.mask;\n maskContainer.includeInBuild = true;\n if (!this._maskHash.has(effect)) {\n this._maskHash.set(effect, {\n instructionsStart: 0,\n instructionsLength: 0\n });\n }\n const maskData = this._maskHash.get(effect);\n maskData.instructionsStart = instructionSet.instructionSize;\n collectAllRenderables(\n maskContainer,\n instructionSet,\n renderer.renderPipes\n );\n maskContainer.includeInBuild = false;\n renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add({\n renderPipeId: \"stencilMask\",\n action: \"pushMaskEnd\",\n mask,\n canBundle: false\n });\n const instructionsLength = instructionSet.instructionSize - maskData.instructionsStart - 1;\n maskData.instructionsLength = instructionsLength;\n const renderTargetUid = renderer.renderTarget.renderTarget.uid;\n (_a = this._maskStackHash)[renderTargetUid] ?? (_a[renderTargetUid] = 0);\n }\n pop(mask, _container, instructionSet) {\n const effect = mask;\n const renderer = this._renderer;\n renderer.renderPipes.batch.break(instructionSet);\n renderer.renderPipes.blendMode.setBlendMode(effect.mask, \"none\", instructionSet);\n instructionSet.add({\n renderPipeId: \"stencilMask\",\n action: \"popMaskBegin\",\n canBundle: false\n });\n const maskData = this._maskHash.get(mask);\n for (let i = 0; i < maskData.instructionsLength; i++) {\n instructionSet.instructions[instructionSet.instructionSize++] = instructionSet.instructions[maskData.instructionsStart++];\n }\n instructionSet.add({\n renderPipeId: \"stencilMask\",\n action: \"popMaskEnd\",\n canBundle: false\n });\n }\n execute(instruction) {\n var _a;\n const renderer = this._renderer;\n const renderTargetUid = renderer.renderTarget.renderTarget.uid;\n let maskStackIndex = (_a = this._maskStackHash)[renderTargetUid] ?? (_a[renderTargetUid] = 0);\n if (instruction.action === \"pushMaskBegin\") {\n renderer.renderTarget.ensureDepthStencil();\n renderer.stencil.setStencilMode(STENCIL_MODES.RENDERING_MASK_ADD, maskStackIndex);\n maskStackIndex++;\n renderer.colorMask.setMask(0);\n } else if (instruction.action === \"pushMaskEnd\") {\n renderer.stencil.setStencilMode(STENCIL_MODES.MASK_ACTIVE, maskStackIndex);\n renderer.colorMask.setMask(15);\n } else if (instruction.action === \"popMaskBegin\") {\n renderer.colorMask.setMask(0);\n if (maskStackIndex !== 0) {\n renderer.stencil.setStencilMode(STENCIL_MODES.RENDERING_MASK_REMOVE, maskStackIndex);\n } else {\n renderer.renderTarget.clear(null, CLEAR.STENCIL);\n renderer.stencil.setStencilMode(STENCIL_MODES.DISABLED, maskStackIndex);\n }\n maskStackIndex--;\n } else if (instruction.action === \"popMaskEnd\") {\n renderer.stencil.setStencilMode(STENCIL_MODES.MASK_ACTIVE, maskStackIndex);\n renderer.colorMask.setMask(15);\n }\n this._maskStackHash[renderTargetUid] = maskStackIndex;\n }\n destroy() {\n this._renderer = null;\n this._maskStackHash = null;\n this._maskHash = null;\n }\n}\nStencilMaskPipe.extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes\n ],\n name: \"stencilMask\"\n};\n\nexport { StencilMaskPipe };\n//# sourceMappingURL=StencilMaskPipe.mjs.map\n","import { Color } from '../../../../color/Color.mjs';\nimport { ExtensionType } from '../../../../extensions/Extensions.mjs';\n\n\"use strict\";\nconst _BackgroundSystem = class _BackgroundSystem {\n constructor() {\n this.clearBeforeRender = true;\n this._backgroundColor = new Color(0);\n this.color = this._backgroundColor;\n this.alpha = 1;\n }\n /**\n * initiates the background system\n * @param options - the options for the background colors\n */\n init(options) {\n options = { ..._BackgroundSystem.defaultOptions, ...options };\n this.clearBeforeRender = options.clearBeforeRender;\n this.color = options.background || options.backgroundColor || this._backgroundColor;\n this.alpha = options.backgroundAlpha;\n this._backgroundColor.setAlpha(options.backgroundAlpha);\n }\n /** The background color to fill if not transparent */\n get color() {\n return this._backgroundColor;\n }\n set color(value) {\n this._backgroundColor.setValue(value);\n }\n /** The background color alpha. Setting this to 0 will make the canvas transparent. */\n get alpha() {\n return this._backgroundColor.alpha;\n }\n set alpha(value) {\n this._backgroundColor.setAlpha(value);\n }\n /** The background color as an [R, G, B, A] array. */\n get colorRgba() {\n return this._backgroundColor.toArray();\n }\n /**\n * destroys the background system\n * @internal\n * @ignore\n */\n destroy() {\n }\n};\n/** @ignore */\n_BackgroundSystem.extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem\n ],\n name: \"background\",\n priority: 0\n};\n/** default options used by the system */\n_BackgroundSystem.defaultOptions = {\n /**\n * {@link WebGLOptions.backgroundAlpha}\n * @default 1\n */\n backgroundAlpha: 1,\n /**\n * {@link WebGLOptions.backgroundColor}\n * @default 0x000000\n */\n backgroundColor: 0,\n /**\n * {@link WebGLOptions.clearBeforeRender}\n * @default true\n */\n clearBeforeRender: true\n};\nlet BackgroundSystem = _BackgroundSystem;\n\nexport { BackgroundSystem };\n//# sourceMappingURL=BackgroundSystem.mjs.map\n","import { extensions, ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { FilterEffect } from '../../../../filters/FilterEffect.mjs';\nimport { warn } from '../../../../utils/logging/warn.mjs';\n\n\"use strict\";\nconst BLEND_MODE_FILTERS = {};\nextensions.handle(ExtensionType.BlendMode, (value) => {\n if (!value.name) {\n throw new Error(\"BlendMode extension must have a name property\");\n }\n BLEND_MODE_FILTERS[value.name] = value.ref;\n}, (value) => {\n delete BLEND_MODE_FILTERS[value.name];\n});\nclass BlendModePipe {\n constructor(renderer) {\n this._isAdvanced = false;\n this._filterHash = /* @__PURE__ */ Object.create(null);\n this._renderer = renderer;\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 setBlendMode(renderable, blendMode, instructionSet) {\n if (this._activeBlendMode === blendMode) {\n if (this._isAdvanced)\n this._renderableList.push(renderable);\n return;\n }\n this._activeBlendMode = blendMode;\n if (this._isAdvanced) {\n this._endAdvancedBlendMode(instructionSet);\n }\n this._isAdvanced = !!BLEND_MODE_FILTERS[blendMode];\n if (this._isAdvanced) {\n this._beginAdvancedBlendMode(instructionSet);\n this._renderableList.push(renderable);\n }\n }\n _beginAdvancedBlendMode(instructionSet) {\n this._renderer.renderPipes.batch.break(instructionSet);\n const blendMode = this._activeBlendMode;\n if (!BLEND_MODE_FILTERS[blendMode]) {\n warn(`Unable to assign BlendMode: '${blendMode}'. You may want to include: import 'pixi.js/advanced-blend-modes'`);\n return;\n }\n if (!this._filterHash[blendMode]) {\n this._filterHash[blendMode] = new FilterEffect({\n filters: [new BLEND_MODE_FILTERS[blendMode]()]\n });\n }\n const instruction = {\n renderPipeId: \"filter\",\n action: \"pushFilter\",\n renderables: [],\n filterEffect: this._filterHash[blendMode],\n canBundle: false\n };\n this._renderableList = instruction.renderables;\n instructionSet.add(instruction);\n }\n _endAdvancedBlendMode(instructionSet) {\n this._renderableList = null;\n this._renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add({\n renderPipeId: \"filter\",\n action: \"popFilter\",\n canBundle: false\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 buildStart() {\n this._isAdvanced = false;\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 buildEnd(instructionSet) {\n if (this._isAdvanced) {\n this._endAdvancedBlendMode(instructionSet);\n }\n }\n /**\n * @internal\n * @ignore\n */\n destroy() {\n this._renderer = null;\n this._renderableList = null;\n for (const i in this._filterHash) {\n this._filterHash[i].destroy();\n }\n this._filterHash = null;\n }\n}\n/** @ignore */\nBlendModePipe.extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes\n ],\n name: \"blendMode\"\n};\n\nexport { BlendModePipe };\n//# sourceMappingURL=BlendModePipe.mjs.map\n","import { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { Container } from '../../../../scene/container/Container.mjs';\nimport { Texture } from '../texture/Texture.mjs';\n\n\"use strict\";\nconst imageTypes = {\n png: \"image/png\",\n jpg: \"image/jpeg\",\n webp: \"image/webp\"\n};\nconst _ExtractSystem = class _ExtractSystem {\n /** @param renderer - The renderer this System works for. */\n constructor(renderer) {\n this._renderer = renderer;\n }\n _normalizeOptions(options, defaults = {}) {\n if (options instanceof Container || options instanceof Texture) {\n return {\n target: options,\n ...defaults\n };\n }\n return {\n ...defaults,\n ...options\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 async image(options) {\n const image = new Image();\n image.src = await this.base64(options);\n return image;\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 async base64(options) {\n options = this._normalizeOptions(\n options,\n _ExtractSystem.defaultImageOptions\n );\n const { format, quality } = options;\n const canvas = this.canvas(options);\n if (canvas.toBlob !== void 0) {\n return new Promise((resolve, reject) => {\n canvas.toBlob((blob) => {\n if (!blob) {\n reject(new Error(\"ICanvas.toBlob failed!\"));\n return;\n }\n const reader = new FileReader();\n reader.onload = () => resolve(reader.result);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n }, imageTypes[format], quality);\n });\n }\n if (canvas.toDataURL !== void 0) {\n return canvas.toDataURL(imageTypes[format], quality);\n }\n if (canvas.convertToBlob !== void 0) {\n const blob = await canvas.convertToBlob({ type: imageTypes[format], quality });\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => resolve(reader.result);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n }\n throw new Error(\"Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented\");\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 canvas(options) {\n options = this._normalizeOptions(options);\n const target = options.target;\n const renderer = this._renderer;\n if (target instanceof Texture) {\n return renderer.texture.generateCanvas(target);\n }\n const texture = renderer.textureGenerator.generateTexture(options);\n const canvas = renderer.texture.generateCanvas(texture);\n texture.destroy();\n return canvas;\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 pixels(options) {\n options = this._normalizeOptions(options);\n const target = options.target;\n const renderer = this._renderer;\n const texture = target instanceof Texture ? target : renderer.textureGenerator.generateTexture(options);\n const pixelInfo = renderer.texture.getPixels(texture);\n if (target instanceof Container) {\n texture.destroy();\n }\n return pixelInfo;\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 texture(options) {\n options = this._normalizeOptions(options);\n if (options.target instanceof Texture)\n return options.target;\n return this._renderer.textureGenerator.generateTexture(options);\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 download(options) {\n options = this._normalizeOptions(options);\n const canvas = this.canvas(options);\n const link = document.createElement(\"a\");\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 * 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 log(options) {\n const width = options.width ?? 200;\n options = this._normalizeOptions(options);\n const canvas = this.canvas(options);\n const base64 = canvas.toDataURL();\n console.log(`[Pixi Texture] ${canvas.width}px ${canvas.height}px`);\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 console.log(\"%c \", style);\n }\n destroy() {\n this._renderer = null;\n }\n};\n/** @ignore */\n_ExtractSystem.extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem\n ],\n name: \"extract\"\n};\n/** Default options for creating an image. */\n_ExtractSystem.defaultImageOptions = {\n /** The format of the image. */\n format: \"png\",\n /** The quality of the image. */\n quality: 1\n};\nlet ExtractSystem = _ExtractSystem;\n\nexport { ExtractSystem };\n//# sourceMappingURL=ExtractSystem.mjs.map\n","import { TextureSource } from './sources/TextureSource.mjs';\nimport { Texture } from './Texture.mjs';\n\n\"use strict\";\nclass RenderTexture extends Texture {\n static create(options) {\n return new Texture({\n source: new TextureSource(options)\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 resize(width, height, resolution) {\n this.source.resize(width, height, resolution);\n return this;\n }\n}\n\nexport { RenderTexture };\n//# sourceMappingURL=RenderTexture.mjs.map\n","import { Color } from '../../../../color/Color.mjs';\nimport { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { Matrix } from '../../../../maths/matrix/Matrix.mjs';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle.mjs';\nimport { Bounds } from '../../../../scene/container/bounds/Bounds.mjs';\nimport { getLocalBounds } from '../../../../scene/container/bounds/getLocalBounds.mjs';\nimport { Container } from '../../../../scene/container/Container.mjs';\nimport { RenderTexture } from '../texture/RenderTexture.mjs';\n\n\"use strict\";\nconst tempRect = new Rectangle();\nconst tempBounds = new Bounds();\nconst noColor = [0, 0, 0, 0];\nclass GenerateTextureSystem {\n constructor(renderer) {\n this._renderer = renderer;\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 generateTexture(options) {\n if (options instanceof Container) {\n options = {\n target: options,\n frame: void 0,\n textureSourceOptions: {},\n resolution: void 0\n };\n }\n const resolution = options.resolution || this._renderer.resolution;\n const antialias = options.antialias || this._renderer.view.antialias;\n const container = options.target;\n let clearColor = options.clearColor;\n if (clearColor) {\n const isRGBAArray = Array.isArray(clearColor) && clearColor.length === 4;\n clearColor = isRGBAArray ? clearColor : Color.shared.setValue(clearColor).toArray();\n } else {\n clearColor = noColor;\n }\n const region = options.frame?.copyTo(tempRect) || getLocalBounds(container, tempBounds).rectangle;\n region.width = Math.max(region.width, 1 / resolution) | 0;\n region.height = Math.max(region.height, 1 / resolution) | 0;\n const target = RenderTexture.create({\n ...options.textureSourceOptions,\n width: region.width,\n height: region.height,\n resolution,\n antialias\n });\n const transform = Matrix.shared.translate(-region.x, -region.y);\n this._renderer.render({\n container,\n transform,\n target,\n clearColor\n });\n return target;\n }\n destroy() {\n this._renderer = null;\n }\n}\n/** @ignore */\nGenerateTextureSystem.extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem\n ],\n name: \"textureGenerator\"\n};\n\nexport { GenerateTextureSystem };\n//# sourceMappingURL=GenerateTextureSystem.mjs.map\n","import { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { Matrix } from '../../../../maths/matrix/Matrix.mjs';\nimport { Point } from '../../../../maths/point/Point.mjs';\nimport { color32BitToUniform } from '../../../../scene/graphics/gpu/colorToUniform.mjs';\nimport { BindGroup } from '../../gpu/shader/BindGroup.mjs';\nimport { RendererType } from '../../types.mjs';\nimport { UniformGroup } from '../shader/UniformGroup.mjs';\n\n\"use strict\";\nclass GlobalUniformSystem {\n constructor(renderer) {\n this._stackIndex = 0;\n this._globalUniformDataStack = [];\n this._uniformsPool = [];\n this._activeUniforms = [];\n this._bindGroupPool = [];\n this._activeBindGroups = [];\n this._renderer = renderer;\n }\n reset() {\n this._stackIndex = 0;\n for (let i = 0; i < this._activeUniforms.length; i++) {\n this._uniformsPool.push(this._activeUniforms[i]);\n }\n for (let i = 0; i < this._activeBindGroups.length; i++) {\n this._bindGroupPool.push(this._activeBindGroups[i]);\n }\n this._activeUniforms.length = 0;\n this._activeBindGroups.length = 0;\n }\n start(options) {\n this.reset();\n this.push(options);\n }\n bind({\n size,\n projectionMatrix,\n worldTransformMatrix,\n worldColor,\n offset\n }) {\n const renderTarget = this._renderer.renderTarget.renderTarget;\n const currentGlobalUniformData = this._stackIndex ? this._globalUniformDataStack[this._stackIndex - 1] : {\n projectionData: renderTarget,\n worldTransformMatrix: new Matrix(),\n worldColor: 4294967295,\n offset: new Point()\n };\n const 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 const uniformGroup = this._uniformsPool.pop() || this._createUniforms();\n this._activeUniforms.push(uniformGroup);\n const uniforms = uniformGroup.uniforms;\n uniforms.uProjectionMatrix = globalUniformData.projectionMatrix;\n uniforms.uResolution = globalUniformData.resolution;\n uniforms.uWorldTransformMatrix.copyFrom(globalUniformData.worldTransformMatrix);\n uniforms.uWorldTransformMatrix.tx -= globalUniformData.offset.x;\n uniforms.uWorldTransformMatrix.ty -= globalUniformData.offset.y;\n color32BitToUniform(\n globalUniformData.worldColor,\n uniforms.uWorldColorAlpha,\n 0\n );\n uniformGroup.update();\n let bindGroup;\n if (this._renderer.renderPipes.uniformBatch) {\n bindGroup = this._renderer.renderPipes.uniformBatch.getUniformBindGroup(uniformGroup, false);\n } else {\n bindGroup = this._bindGroupPool.pop() || new BindGroup();\n this._activeBindGroups.push(bindGroup);\n bindGroup.setResource(uniformGroup, 0);\n }\n globalUniformData.bindGroup = bindGroup;\n this._currentGlobalUniformData = globalUniformData;\n }\n push(options) {\n this.bind(options);\n this._globalUniformDataStack[this._stackIndex++] = this._currentGlobalUniformData;\n }\n pop() {\n this._currentGlobalUniformData = this._globalUniformDataStack[--this._stackIndex - 1];\n if (this._renderer.type === RendererType.WEBGL) {\n this._currentGlobalUniformData.bindGroup.resources[0].update();\n }\n }\n get bindGroup() {\n return this._currentGlobalUniformData.bindGroup;\n }\n get uniformGroup() {\n return this._currentGlobalUniformData.bindGroup.resources[0];\n }\n _createUniforms() {\n const globalUniforms = new UniformGroup({\n uProjectionMatrix: { value: new Matrix(), type: \"mat3x3<f32>\" },\n uWorldTransformMatrix: { value: new Matrix(), type: \"mat3x3<f32>\" },\n // TODO - someone smart - set this to be a unorm8x4 rather than a vec4<f32>\n uWorldColorAlpha: { value: new Float32Array(4), type: \"vec4<f32>\" },\n uResolution: { value: [0, 0], type: \"vec2<f32>\" }\n }, {\n isStatic: true\n });\n return globalUniforms;\n }\n destroy() {\n this._renderer = null;\n }\n}\n/** @ignore */\nGlobalUniformSystem.extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem\n ],\n name: \"globalUniforms\"\n};\n\nexport { GlobalUniformSystem };\n//# sourceMappingURL=GlobalUniformSystem.mjs.map\n","import { DOMAdapter } from '../environment/adapter.mjs';\n\n\"use strict\";\nlet saidHello = false;\nconst VERSION = \"8.1.1\";\nfunction sayHello(type) {\n if (saidHello) {\n return;\n }\n if (DOMAdapter.get().getNavigator().userAgent.toLowerCase().indexOf(\"chrome\") > -1) {\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 globalThis.console.log(...args);\n } else if (globalThis.console) {\n globalThis.console.log(`PixiJS ${VERSION} - ${type} - http://www.pixijs.com/`);\n }\n saidHello = true;\n}\n\nexport { VERSION, sayHello };\n//# sourceMappingURL=sayHello.mjs.map\n","import { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { sayHello } from '../../../../utils/sayHello.mjs';\nimport { RendererType } from '../../types.mjs';\n\n\"use strict\";\nclass HelloSystem {\n constructor(renderer) {\n this._renderer = renderer;\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 init(options) {\n if (options.hello) {\n let name = this._renderer.name;\n if (this._renderer.type === RendererType.WEBGL) {\n name += ` ${this._renderer.context.webGLVersion}`;\n }\n sayHello(name);\n }\n }\n}\n/** @ignore */\nHelloSystem.extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem\n ],\n name: \"hello\",\n priority: -2\n};\n/** The default options for the system. */\nHelloSystem.defaultOptions = {\n /** {@link WebGLOptions.hello} */\n hello: false\n};\n\nexport { HelloSystem };\n//# sourceMappingURL=HelloSystem.mjs.map\n","import { ExtensionType, extensions } from '../../../../extensions/Extensions.mjs';\n\n\"use strict\";\nconst _TextureGCSystem = class _TextureGCSystem {\n /** @param renderer - The renderer this System works for. */\n constructor(renderer) {\n this._renderer = renderer;\n this.count = 0;\n this.checkCount = 0;\n }\n init(options) {\n options = { ..._TextureGCSystem.defaultOptions, ...options };\n this.checkCountMax = options.textureGCCheckCountMax;\n this.maxIdle = options.textureGCAMaxIdle;\n this.active = options.textureGCActive;\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 postrender() {\n if (!this._renderer.renderingToScreen) {\n return;\n }\n this.count++;\n if (!this.active)\n return;\n this.checkCount++;\n if (this.checkCount > this.checkCountMax) {\n this.checkCount = 0;\n this.run();\n }\n }\n /**\n * Checks to see when the last time a texture was used.\n * If the texture has not been used for a specified amount of time, it will be removed from the GPU.\n */\n run() {\n const managedTextures = this._renderer.texture.managedTextures;\n for (let i = 0; i < managedTextures.length; i++) {\n const texture = managedTextures[i];\n if (texture.autoGarbageCollect && texture.resource && texture._touched > -1 && this.count - texture._touched > this.maxIdle) {\n texture._touched = -1;\n texture.unload();\n }\n }\n }\n destroy() {\n this._renderer = null;\n }\n};\n/** @ignore */\n_TextureGCSystem.extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem\n ],\n name: \"textureGC\"\n};\n/** default options for the TextureGCSystem */\n_TextureGCSystem.defaultOptions = {\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};\nlet TextureGCSystem = _TextureGCSystem;\nextensions.add(TextureGCSystem);\n\nexport { TextureGCSystem };\n//# sourceMappingURL=TextureGCSystem.mjs.map\n","import { CustomRenderPipe } from '../../../../scene/container/CustomRenderPipe.mjs';\nimport { RenderGroupPipe } from '../../../../scene/container/RenderGroupPipe.mjs';\nimport { RenderGroupSystem } from '../../../../scene/container/RenderGroupSystem.mjs';\nimport { SpritePipe } from '../../../../scene/sprite/SpritePipe.mjs';\nimport { BatcherPipe } from '../../../batcher/shared/BatcherPipe.mjs';\nimport { AlphaMaskPipe } from '../../../mask/alpha/AlphaMaskPipe.mjs';\nimport { ColorMaskPipe } from '../../../mask/color/ColorMaskPipe.mjs';\nimport { StencilMaskPipe } from '../../../mask/stencil/StencilMaskPipe.mjs';\nimport { BackgroundSystem } from '../background/BackgroundSystem.mjs';\nimport { BlendModePipe } from '../blendModes/BlendModePipe.mjs';\nimport { ExtractSystem } from '../extract/ExtractSystem.mjs';\nimport { GenerateTextureSystem } from '../extract/GenerateTextureSystem.mjs';\nimport { GlobalUniformSystem } from '../renderTarget/GlobalUniformSystem.mjs';\nimport { HelloSystem } from '../startup/HelloSystem.mjs';\nimport { TextureGCSystem } from '../texture/TextureGCSystem.mjs';\nimport { ViewSystem } from '../view/ViewSystem.mjs';\n\n\"use strict\";\nconst SharedSystems = [\n BackgroundSystem,\n GlobalUniformSystem,\n HelloSystem,\n ViewSystem,\n RenderGroupSystem,\n TextureGCSystem,\n GenerateTextureSystem,\n ExtractSystem\n];\nconst SharedRenderPipes = [\n BlendModePipe,\n BatcherPipe,\n SpritePipe,\n RenderGroupPipe,\n AlphaMaskPipe,\n StencilMaskPipe,\n ColorMaskPipe,\n CustomRenderPipe\n];\n\nexport { SharedRenderPipes, SharedSystems };\n//# sourceMappingURL=SharedSystems.mjs.map\n"],"names":["a","Map","Object","globalThis","HTMLCanvasElement","document","s","Math","r","t","WeakMap","Error","Image","Promise","FileReader","console","Array","u","Float32Array"],"mappings":"yJACA,IAAM,EAAa,CACjB,KAAM,cACN,OAAQ,CACN,OAEE;;AAEN;AACA;AACA;;AAEA;AACA,QAAQ,CAAC,CAEL,KAEE;AACN;AACA,QAAQ,CAAC,AAEP,EACA,SAAU,CACR,OAEE;AACN;AACA;;AAEA;AACA,QAAQ,CAAC,CAEL,KAEE;AACN;AACA,QAAQ,CAAC,AAEP,CACF,EACM,EAAe,CACnB,KAAM,cACN,OAAQ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