@industry-theme/repository-composition-panels 0.2.60 → 0.2.62

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.
Files changed (33) hide show
  1. package/dist/{BufferResource-CkqEod2p.js → BufferResource-D-qYLgbY.js} +2 -2
  2. package/dist/{BufferResource-CkqEod2p.js.map → BufferResource-D-qYLgbY.js.map} +1 -1
  3. package/dist/{CanvasRenderer-Dr_Cv8Dc.js → CanvasRenderer-CYJLQIYQ.js} +3 -3
  4. package/dist/{CanvasRenderer-Dr_Cv8Dc.js.map → CanvasRenderer-CYJLQIYQ.js.map} +1 -1
  5. package/dist/{Filter-Be7Gagsd.js → Filter-BAwXUca-.js} +2 -2
  6. package/dist/{Filter-Be7Gagsd.js.map → Filter-BAwXUca-.js.map} +1 -1
  7. package/dist/{RenderTargetSystem-C9oPzIqc.js → RenderTargetSystem-BrLrRZqC.js} +3 -3
  8. package/dist/{RenderTargetSystem-C9oPzIqc.js.map → RenderTargetSystem-BrLrRZqC.js.map} +1 -1
  9. package/dist/{WebGLRenderer-D2it_58F.js → WebGLRenderer-DTTtXSAz.js} +4 -4
  10. package/dist/{WebGLRenderer-D2it_58F.js.map → WebGLRenderer-DTTtXSAz.js.map} +1 -1
  11. package/dist/{WebGPURenderer-DxUZO3nG.js → WebGPURenderer-Dw5euE6h.js} +4 -4
  12. package/dist/{WebGPURenderer-DxUZO3nG.js.map → WebGPURenderer-Dw5euE6h.js.map} +1 -1
  13. package/dist/{browserAll-CpFra-kV.js → browserAll-NVcZTmV1.js} +3 -3
  14. package/dist/{browserAll-CpFra-kV.js.map → browserAll-NVcZTmV1.js.map} +1 -1
  15. package/dist/{index-C6MgM63s.js → index-DP0q9yO1.js} +242 -61
  16. package/dist/{index-C6MgM63s.js.map → index-DP0q9yO1.js.map} +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/{init-te6qDnVZ.js → init-BsBxpyBv.js} +3 -3
  20. package/dist/{init-te6qDnVZ.js.map → init-BsBxpyBv.js.map} +1 -1
  21. package/dist/panels/CollectionMapPanel.d.ts +16 -11
  22. package/dist/panels/CollectionMapPanel.d.ts.map +1 -1
  23. package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -1
  24. package/dist/panels/overworld-map/spriteGenerator.d.ts +11 -1
  25. package/dist/panels/overworld-map/spriteGenerator.d.ts.map +1 -1
  26. package/dist/panels/overworld-map/types.d.ts +1 -0
  27. package/dist/panels/overworld-map/types.d.ts.map +1 -1
  28. package/dist/panels.bundle.js +1 -1
  29. package/dist/webworkerAll-DYw1TGzb.js +3 -0
  30. package/dist/webworkerAll-DYw1TGzb.js.map +1 -0
  31. package/package.json +3 -1
  32. package/dist/webworkerAll-D_TIOa40.js +0 -3
  33. package/dist/webworkerAll-D_TIOa40.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { w as warn, g as getAttributeInfoFromFormat, h as STENCIL_MODES, u as unsafeEvalSupported, i as Buffer, j as BufferUsage, k as EventEmitter, l as uid } from "./index-C6MgM63s.js";
1
+ import { w as warn, g as getAttributeInfoFromFormat, h as STENCIL_MODES, u as unsafeEvalSupported, i as Buffer, j as BufferUsage, k as EventEmitter, l as uid } from "./index-DP0q9yO1.js";
2
2
  const textureBit = {
3
3
  name: "texture-bit",
4
4
  vertex: {
@@ -515,4 +515,4 @@ export {
515
515
  textureBit as t,
516
516
  uboSyncFunctionsWGSL as u
517
517
  };
518
- //# sourceMappingURL=BufferResource-CkqEod2p.js.map
518
+ //# sourceMappingURL=BufferResource-D-qYLgbY.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BufferResource-CkqEod2p.js","sources":["../node_modules/pixi.js/lib/rendering/high-shader/shader-bits/textureBit.mjs","../node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/ensureAttributes.mjs","../node_modules/pixi.js/lib/rendering/renderers/gpu/state/GpuStencilModesToPixi.mjs","../node_modules/pixi.js/lib/rendering/renderers/shared/shader/UboSystem.mjs","../node_modules/pixi.js/lib/rendering/renderers/shared/shader/utils/uniformParsers.mjs","../node_modules/pixi.js/lib/rendering/renderers/shared/shader/utils/createUboSyncFunction.mjs","../node_modules/pixi.js/lib/rendering/renderers/shared/shader/utils/uboSyncFunctions.mjs","../node_modules/pixi.js/lib/rendering/renderers/shared/buffer/BufferResource.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.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};\nGpuStencilModesToPixi[STENCIL_MODES.INVERSE_MASK_ACTIVE] = {\n stencilWriteMask: 0,\n stencilFront: {\n compare: \"not-equal\",\n passOp: \"keep\"\n },\n stencilBack: {\n compare: \"not-equal\",\n passOp: \"keep\"\n }\n};\n\nexport { GpuStencilModesToPixi };\n//# sourceMappingURL=GpuStencilModesToPixi.mjs.map\n","import { unsafeEvalSupported } from '../../../../utils/browser/unsafeEvalSupported.mjs';\nimport { Buffer } from '../buffer/Buffer.mjs';\nimport { BufferUsage } from '../buffer/const.mjs';\n\n\"use strict\";\nclass UboSystem {\n constructor(adaptor) {\n /** Cache of uniform buffer layouts and sync functions, so we don't have to re-create them */\n this._syncFunctionHash = /* @__PURE__ */ Object.create(null);\n this._adaptor = adaptor;\n this._systemCheck();\n }\n /**\n * Overridable function by `pixi.js/unsafe-eval` to silence\n * throwing an error if platform doesn't support unsafe-evals.\n * @private\n */\n _systemCheck() {\n if (!unsafeEvalSupported()) {\n throw new Error(\"Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.\");\n }\n }\n ensureUniformGroup(uniformGroup) {\n const uniformData = this.getUniformGroupData(uniformGroup);\n uniformGroup.buffer || (uniformGroup.buffer = new Buffer({\n data: new Float32Array(uniformData.layout.size / 4),\n usage: BufferUsage.UNIFORM | BufferUsage.COPY_DST\n }));\n }\n getUniformGroupData(uniformGroup) {\n return this._syncFunctionHash[uniformGroup._signature] || this._initUniformGroup(uniformGroup);\n }\n _initUniformGroup(uniformGroup) {\n const uniformGroupSignature = uniformGroup._signature;\n let uniformData = this._syncFunctionHash[uniformGroupSignature];\n if (!uniformData) {\n const elements = Object.keys(uniformGroup.uniformStructures).map((i) => uniformGroup.uniformStructures[i]);\n const layout = this._adaptor.createUboElements(elements);\n const syncFunction = this._generateUboSync(layout.uboElements);\n uniformData = this._syncFunctionHash[uniformGroupSignature] = {\n layout,\n syncFunction\n };\n }\n return this._syncFunctionHash[uniformGroupSignature];\n }\n _generateUboSync(uboElements) {\n return this._adaptor.generateUboSync(uboElements);\n }\n syncUniformGroup(uniformGroup, data, offset) {\n const uniformGroupData = this.getUniformGroupData(uniformGroup);\n uniformGroup.buffer || (uniformGroup.buffer = new Buffer({\n data: new Float32Array(uniformGroupData.layout.size / 4),\n usage: BufferUsage.UNIFORM | BufferUsage.COPY_DST\n }));\n let dataInt32 = null;\n if (!data) {\n data = uniformGroup.buffer.data;\n dataInt32 = uniformGroup.buffer.dataInt32;\n }\n offset || (offset = 0);\n uniformGroupData.syncFunction(uniformGroup.uniforms, data, dataInt32, offset);\n return true;\n }\n updateUniformGroup(uniformGroup) {\n if (uniformGroup.isStatic && !uniformGroup._dirtyId) return false;\n uniformGroup._dirtyId = 0;\n const synced = this.syncUniformGroup(uniformGroup);\n uniformGroup.buffer.update();\n return synced;\n }\n destroy() {\n this._syncFunctionHash = null;\n }\n}\n\nexport { UboSystem };\n//# sourceMappingURL=UboSystem.mjs.map\n","\"use strict\";\nconst uniformParsers = [\n // uploading pixi matrix object to mat3\n {\n type: \"mat3x3<f32>\",\n test: (data) => {\n const value = data.value;\n return value.a !== void 0;\n },\n ubo: `\n var matrix = uv[name].toArray(true);\n data[offset] = matrix[0];\n data[offset + 1] = matrix[1];\n data[offset + 2] = matrix[2];\n data[offset + 4] = matrix[3];\n data[offset + 5] = matrix[4];\n data[offset + 6] = matrix[5];\n data[offset + 8] = matrix[6];\n data[offset + 9] = matrix[7];\n data[offset + 10] = matrix[8];\n `,\n uniform: `\n gl.uniformMatrix3fv(ud[name].location, false, uv[name].toArray(true));\n `\n },\n // uploading a pixi rectangle as a vec4\n {\n type: \"vec4<f32>\",\n test: (data) => data.type === \"vec4<f32>\" && data.size === 1 && data.value.width !== void 0,\n ubo: `\n v = uv[name];\n data[offset] = v.x;\n data[offset + 1] = v.y;\n data[offset + 2] = v.width;\n data[offset + 3] = v.height;\n `,\n uniform: `\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud[name].location, v.x, v.y, v.width, v.height);\n }\n `\n },\n // uploading a pixi point as a vec2\n {\n type: \"vec2<f32>\",\n test: (data) => data.type === \"vec2<f32>\" && data.size === 1 && data.value.x !== void 0,\n ubo: `\n v = uv[name];\n data[offset] = v.x;\n data[offset + 1] = v.y;\n `,\n uniform: `\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.x || cv[1] !== v.y) {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud[name].location, v.x, v.y);\n }\n `\n },\n // uploading a pixi color as a vec4\n {\n type: \"vec4<f32>\",\n test: (data) => data.type === \"vec4<f32>\" && data.size === 1 && data.value.red !== void 0,\n ubo: `\n v = uv[name];\n data[offset] = v.red;\n data[offset + 1] = v.green;\n data[offset + 2] = v.blue;\n data[offset + 3] = v.alpha;\n `,\n uniform: `\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n cv[3] = v.alpha;\n gl.uniform4f(ud[name].location, v.red, v.green, v.blue, v.alpha);\n }\n `\n },\n // uploading a pixi color as a vec3\n {\n type: \"vec3<f32>\",\n test: (data) => data.type === \"vec3<f32>\" && data.size === 1 && data.value.red !== void 0,\n ubo: `\n v = uv[name];\n data[offset] = v.red;\n data[offset + 1] = v.green;\n data[offset + 2] = v.blue;\n `,\n uniform: `\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue) {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n gl.uniform3f(ud[name].location, v.red, v.green, v.blue);\n }\n `\n }\n];\n\nexport { uniformParsers };\n//# sourceMappingURL=uniformParsers.mjs.map\n","import { uniformParsers } from './uniformParsers.mjs';\n\n\"use strict\";\nfunction createUboSyncFunction(uboElements, parserCode, arrayGenerationFunction, singleSettersMap) {\n const funcFragments = [`\n var v = null;\n var v2 = null;\n var t = 0;\n var index = 0;\n var name = null;\n var arrayOffset = null;\n `];\n let prev = 0;\n for (let i = 0; i < uboElements.length; i++) {\n const uboElement = uboElements[i];\n const name = uboElement.data.name;\n let parsed = false;\n let offset = 0;\n for (let j = 0; j < uniformParsers.length; j++) {\n const uniformParser = uniformParsers[j];\n if (uniformParser.test(uboElement.data)) {\n offset = uboElement.offset / 4;\n funcFragments.push(\n `name = \"${name}\";`,\n `offset += ${offset - prev};`,\n uniformParsers[j][parserCode] || uniformParsers[j].ubo\n );\n parsed = true;\n break;\n }\n }\n if (!parsed) {\n if (uboElement.data.size > 1) {\n offset = uboElement.offset / 4;\n funcFragments.push(arrayGenerationFunction(uboElement, offset - prev));\n } else {\n const template = singleSettersMap[uboElement.data.type];\n offset = uboElement.offset / 4;\n funcFragments.push(\n /* wgsl */\n `\n v = uv.${name};\n offset += ${offset - prev};\n ${template};\n `\n );\n }\n }\n prev = offset;\n }\n const fragmentSrc = funcFragments.join(\"\\n\");\n return new Function(\n \"uv\",\n \"data\",\n \"dataInt32\",\n \"offset\",\n fragmentSrc\n );\n}\n\nexport { createUboSyncFunction };\n//# sourceMappingURL=createUboSyncFunction.mjs.map\n","\"use strict\";\nfunction loopMatrix(col, row) {\n const total = col * row;\n return `\n for (let i = 0; i < ${total}; i++) {\n data[offset + (((i / ${col})|0) * 4) + (i % ${col})] = v[i];\n }\n `;\n}\nconst uboSyncFunctionsSTD40 = {\n f32: `\n data[offset] = v;`,\n i32: `\n dataInt32[offset] = v;`,\n \"vec2<f32>\": `\n data[offset] = v[0];\n data[offset + 1] = v[1];`,\n \"vec3<f32>\": `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];`,\n \"vec4<f32>\": `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];\n data[offset + 3] = v[3];`,\n \"vec2<i32>\": `\n dataInt32[offset] = v[0];\n dataInt32[offset + 1] = v[1];`,\n \"vec3<i32>\": `\n dataInt32[offset] = v[0];\n dataInt32[offset + 1] = v[1];\n dataInt32[offset + 2] = v[2];`,\n \"vec4<i32>\": `\n dataInt32[offset] = v[0];\n dataInt32[offset + 1] = v[1];\n dataInt32[offset + 2] = v[2];\n dataInt32[offset + 3] = v[3];`,\n \"mat2x2<f32>\": `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 4] = v[2];\n data[offset + 5] = v[3];`,\n \"mat3x3<f32>\": `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];\n data[offset + 4] = v[3];\n data[offset + 5] = v[4];\n data[offset + 6] = v[5];\n data[offset + 8] = v[6];\n data[offset + 9] = v[7];\n data[offset + 10] = v[8];`,\n \"mat4x4<f32>\": `\n for (let i = 0; i < 16; i++) {\n data[offset + i] = v[i];\n }`,\n \"mat3x2<f32>\": loopMatrix(3, 2),\n \"mat4x2<f32>\": loopMatrix(4, 2),\n \"mat2x3<f32>\": loopMatrix(2, 3),\n \"mat4x3<f32>\": loopMatrix(4, 3),\n \"mat2x4<f32>\": loopMatrix(2, 4),\n \"mat3x4<f32>\": loopMatrix(3, 4)\n};\nconst uboSyncFunctionsWGSL = {\n ...uboSyncFunctionsSTD40,\n \"mat2x2<f32>\": `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];\n data[offset + 3] = v[3];\n `\n};\n\nexport { uboSyncFunctionsSTD40, uboSyncFunctionsWGSL };\n//# sourceMappingURL=uboSyncFunctions.mjs.map\n","import EventEmitter from 'eventemitter3';\nimport { uid } from '../../../../utils/data/uid.mjs';\n\n\"use strict\";\nclass BufferResource extends EventEmitter {\n /**\n * Create a new Buffer Resource.\n * @param options - The options for the buffer resource\n * @param options.buffer - The underlying buffer that this resource is using\n * @param options.offset - The offset of the buffer this resource is using.\n * If not provided, then it will use the offset of the buffer.\n * @param options.size - The size of the buffer this resource is using.\n * If not provided, then it will use the size of the buffer.\n */\n constructor({ buffer, offset, size }) {\n super();\n /**\n * emits when the underlying buffer has changed shape (i.e. resized)\n * letting the renderer know that it needs to discard the old buffer on the GPU and create a new one\n * @event change\n */\n /** a unique id for this uniform group used through the renderer */\n this.uid = uid(\"buffer\");\n /**\n * a resource type, used to identify how to handle it when its in a bind group / shader resource\n * @internal\n */\n this._resourceType = \"bufferResource\";\n /**\n * used internally to know if a uniform group was used in the last render pass\n * @internal\n */\n this._touched = 0;\n /**\n * the resource id used internally by the renderer to build bind group keys\n * @internal\n */\n this._resourceId = uid(\"resource\");\n /**\n * A cheeky hint to the GL renderer to let it know this is a BufferResource\n * @internal\n */\n this._bufferResource = true;\n /**\n * Has the Buffer resource been destroyed?\n * @readonly\n */\n this.destroyed = false;\n this.buffer = buffer;\n this.offset = offset | 0;\n this.size = size;\n this.buffer.on(\"change\", this.onBufferChange, this);\n }\n onBufferChange() {\n this._resourceId = uid(\"resource\");\n this.emit(\"change\", this);\n }\n /**\n * Destroys this resource. Make sure the underlying buffer is not used anywhere else\n * if you want to destroy it as well, or code will explode\n * @param destroyBuffer - Should the underlying buffer be destroyed as well?\n */\n destroy(destroyBuffer = false) {\n this.destroyed = true;\n if (destroyBuffer) {\n this.buffer.destroy();\n }\n this.emit(\"change\", this);\n this.buffer = null;\n this.removeAllListeners();\n }\n}\n\nexport { BufferResource };\n//# sourceMappingURL=BufferResource.mjs.map\n"],"names":[],"mappings":";AACK,MAAC,aAAa;AAAA,EACjB,MAAM;AAAA,EACN,QAAQ;AAAA,IACN;AAAA;AAAA,MAEE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASF;AAAA;AAAA,MAEE;AAAA;AAAA;AAAA;AAAA,EAIN;AAAA,EACE,UAAU;AAAA,IACR;AAAA;AAAA,MAEE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOF;AAAA;AAAA,MAEE;AAAA;AAAA;AAAA;A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AAK;AAOL,SAAK,MAAM,IAAI,QAAQ;AAKvB,SAAK,gBAAgB;AAKrB,SAAK,WAAW;AAKhB,SAAK,cAAc,IAAI,UAAU;AAKjC,SAAK,kBAAkB;AAKvB,SAAK,YAAY;AACjB,SAAK,SAAS;AACd,SAAK,SAAS,SAAS;AACvB,SAAK,OAAO;AACZ,SAAK,OAAO,GAAG,UAAU,KAAK,gBAAgB,IAAI;AAAA,EACpD;AAAA,EACA,iBAAiB;AACf,SAAK,cAAc,IAAI,UAAU;AACjC,SAAK,KAAK,UAAU,IAAI;AAAA,EAC1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,QAAQ,gBAAgB,OAAO;AAC7B,SAAK,YAAY;AACjB,QAAI,eAAe;AACjB,WAAK,OAAO,QAAO;AAAA,IACrB;AACA,SAAK,KAAK,UAAU,IAAI;AACxB,SAAK,SAAS;AACd,SAAK,mBAAkB;AAAA,EACzB;AACF;","x_google_ignoreList":[0,1,2,3,4,5,6,7]}
1
+ {"version":3,"file":"BufferResource-D-qYLgbY.js","sources":["../node_modules/pixi.js/lib/rendering/high-shader/shader-bits/textureBit.mjs","../node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/ensureAttributes.mjs","../node_modules/pixi.js/lib/rendering/renderers/gpu/state/GpuStencilModesToPixi.mjs","../node_modules/pixi.js/lib/rendering/renderers/shared/shader/UboSystem.mjs","../node_modules/pixi.js/lib/rendering/renderers/shared/shader/utils/uniformParsers.mjs","../node_modules/pixi.js/lib/rendering/renderers/shared/shader/utils/createUboSyncFunction.mjs","../node_modules/pixi.js/lib/rendering/renderers/shared/shader/utils/uboSyncFunctions.mjs","../node_modules/pixi.js/lib/rendering/renderers/shared/buffer/BufferResource.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.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};\nGpuStencilModesToPixi[STENCIL_MODES.INVERSE_MASK_ACTIVE] = {\n stencilWriteMask: 0,\n stencilFront: {\n compare: \"not-equal\",\n passOp: \"keep\"\n },\n stencilBack: {\n compare: \"not-equal\",\n passOp: \"keep\"\n }\n};\n\nexport { GpuStencilModesToPixi };\n//# sourceMappingURL=GpuStencilModesToPixi.mjs.map\n","import { unsafeEvalSupported } from '../../../../utils/browser/unsafeEvalSupported.mjs';\nimport { Buffer } from '../buffer/Buffer.mjs';\nimport { BufferUsage } from '../buffer/const.mjs';\n\n\"use strict\";\nclass UboSystem {\n constructor(adaptor) {\n /** Cache of uniform buffer layouts and sync functions, so we don't have to re-create them */\n this._syncFunctionHash = /* @__PURE__ */ Object.create(null);\n this._adaptor = adaptor;\n this._systemCheck();\n }\n /**\n * Overridable function by `pixi.js/unsafe-eval` to silence\n * throwing an error if platform doesn't support unsafe-evals.\n * @private\n */\n _systemCheck() {\n if (!unsafeEvalSupported()) {\n throw new Error(\"Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.\");\n }\n }\n ensureUniformGroup(uniformGroup) {\n const uniformData = this.getUniformGroupData(uniformGroup);\n uniformGroup.buffer || (uniformGroup.buffer = new Buffer({\n data: new Float32Array(uniformData.layout.size / 4),\n usage: BufferUsage.UNIFORM | BufferUsage.COPY_DST\n }));\n }\n getUniformGroupData(uniformGroup) {\n return this._syncFunctionHash[uniformGroup._signature] || this._initUniformGroup(uniformGroup);\n }\n _initUniformGroup(uniformGroup) {\n const uniformGroupSignature = uniformGroup._signature;\n let uniformData = this._syncFunctionHash[uniformGroupSignature];\n if (!uniformData) {\n const elements = Object.keys(uniformGroup.uniformStructures).map((i) => uniformGroup.uniformStructures[i]);\n const layout = this._adaptor.createUboElements(elements);\n const syncFunction = this._generateUboSync(layout.uboElements);\n uniformData = this._syncFunctionHash[uniformGroupSignature] = {\n layout,\n syncFunction\n };\n }\n return this._syncFunctionHash[uniformGroupSignature];\n }\n _generateUboSync(uboElements) {\n return this._adaptor.generateUboSync(uboElements);\n }\n syncUniformGroup(uniformGroup, data, offset) {\n const uniformGroupData = this.getUniformGroupData(uniformGroup);\n uniformGroup.buffer || (uniformGroup.buffer = new Buffer({\n data: new Float32Array(uniformGroupData.layout.size / 4),\n usage: BufferUsage.UNIFORM | BufferUsage.COPY_DST\n }));\n let dataInt32 = null;\n if (!data) {\n data = uniformGroup.buffer.data;\n dataInt32 = uniformGroup.buffer.dataInt32;\n }\n offset || (offset = 0);\n uniformGroupData.syncFunction(uniformGroup.uniforms, data, dataInt32, offset);\n return true;\n }\n updateUniformGroup(uniformGroup) {\n if (uniformGroup.isStatic && !uniformGroup._dirtyId) return false;\n uniformGroup._dirtyId = 0;\n const synced = this.syncUniformGroup(uniformGroup);\n uniformGroup.buffer.update();\n return synced;\n }\n destroy() {\n this._syncFunctionHash = null;\n }\n}\n\nexport { UboSystem };\n//# sourceMappingURL=UboSystem.mjs.map\n","\"use strict\";\nconst uniformParsers = [\n // uploading pixi matrix object to mat3\n {\n type: \"mat3x3<f32>\",\n test: (data) => {\n const value = data.value;\n return value.a !== void 0;\n },\n ubo: `\n var matrix = uv[name].toArray(true);\n data[offset] = matrix[0];\n data[offset + 1] = matrix[1];\n data[offset + 2] = matrix[2];\n data[offset + 4] = matrix[3];\n data[offset + 5] = matrix[4];\n data[offset + 6] = matrix[5];\n data[offset + 8] = matrix[6];\n data[offset + 9] = matrix[7];\n data[offset + 10] = matrix[8];\n `,\n uniform: `\n gl.uniformMatrix3fv(ud[name].location, false, uv[name].toArray(true));\n `\n },\n // uploading a pixi rectangle as a vec4\n {\n type: \"vec4<f32>\",\n test: (data) => data.type === \"vec4<f32>\" && data.size === 1 && data.value.width !== void 0,\n ubo: `\n v = uv[name];\n data[offset] = v.x;\n data[offset + 1] = v.y;\n data[offset + 2] = v.width;\n data[offset + 3] = v.height;\n `,\n uniform: `\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud[name].location, v.x, v.y, v.width, v.height);\n }\n `\n },\n // uploading a pixi point as a vec2\n {\n type: \"vec2<f32>\",\n test: (data) => data.type === \"vec2<f32>\" && data.size === 1 && data.value.x !== void 0,\n ubo: `\n v = uv[name];\n data[offset] = v.x;\n data[offset + 1] = v.y;\n `,\n uniform: `\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.x || cv[1] !== v.y) {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud[name].location, v.x, v.y);\n }\n `\n },\n // uploading a pixi color as a vec4\n {\n type: \"vec4<f32>\",\n test: (data) => data.type === \"vec4<f32>\" && data.size === 1 && data.value.red !== void 0,\n ubo: `\n v = uv[name];\n data[offset] = v.red;\n data[offset + 1] = v.green;\n data[offset + 2] = v.blue;\n data[offset + 3] = v.alpha;\n `,\n uniform: `\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n cv[3] = v.alpha;\n gl.uniform4f(ud[name].location, v.red, v.green, v.blue, v.alpha);\n }\n `\n },\n // uploading a pixi color as a vec3\n {\n type: \"vec3<f32>\",\n test: (data) => data.type === \"vec3<f32>\" && data.size === 1 && data.value.red !== void 0,\n ubo: `\n v = uv[name];\n data[offset] = v.red;\n data[offset + 1] = v.green;\n data[offset + 2] = v.blue;\n `,\n uniform: `\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue) {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n gl.uniform3f(ud[name].location, v.red, v.green, v.blue);\n }\n `\n }\n];\n\nexport { uniformParsers };\n//# sourceMappingURL=uniformParsers.mjs.map\n","import { uniformParsers } from './uniformParsers.mjs';\n\n\"use strict\";\nfunction createUboSyncFunction(uboElements, parserCode, arrayGenerationFunction, singleSettersMap) {\n const funcFragments = [`\n var v = null;\n var v2 = null;\n var t = 0;\n var index = 0;\n var name = null;\n var arrayOffset = null;\n `];\n let prev = 0;\n for (let i = 0; i < uboElements.length; i++) {\n const uboElement = uboElements[i];\n const name = uboElement.data.name;\n let parsed = false;\n let offset = 0;\n for (let j = 0; j < uniformParsers.length; j++) {\n const uniformParser = uniformParsers[j];\n if (uniformParser.test(uboElement.data)) {\n offset = uboElement.offset / 4;\n funcFragments.push(\n `name = \"${name}\";`,\n `offset += ${offset - prev};`,\n uniformParsers[j][parserCode] || uniformParsers[j].ubo\n );\n parsed = true;\n break;\n }\n }\n if (!parsed) {\n if (uboElement.data.size > 1) {\n offset = uboElement.offset / 4;\n funcFragments.push(arrayGenerationFunction(uboElement, offset - prev));\n } else {\n const template = singleSettersMap[uboElement.data.type];\n offset = uboElement.offset / 4;\n funcFragments.push(\n /* wgsl */\n `\n v = uv.${name};\n offset += ${offset - prev};\n ${template};\n `\n );\n }\n }\n prev = offset;\n }\n const fragmentSrc = funcFragments.join(\"\\n\");\n return new Function(\n \"uv\",\n \"data\",\n \"dataInt32\",\n \"offset\",\n fragmentSrc\n );\n}\n\nexport { createUboSyncFunction };\n//# sourceMappingURL=createUboSyncFunction.mjs.map\n","\"use strict\";\nfunction loopMatrix(col, row) {\n const total = col * row;\n return `\n for (let i = 0; i < ${total}; i++) {\n data[offset + (((i / ${col})|0) * 4) + (i % ${col})] = v[i];\n }\n `;\n}\nconst uboSyncFunctionsSTD40 = {\n f32: `\n data[offset] = v;`,\n i32: `\n dataInt32[offset] = v;`,\n \"vec2<f32>\": `\n data[offset] = v[0];\n data[offset + 1] = v[1];`,\n \"vec3<f32>\": `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];`,\n \"vec4<f32>\": `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];\n data[offset + 3] = v[3];`,\n \"vec2<i32>\": `\n dataInt32[offset] = v[0];\n dataInt32[offset + 1] = v[1];`,\n \"vec3<i32>\": `\n dataInt32[offset] = v[0];\n dataInt32[offset + 1] = v[1];\n dataInt32[offset + 2] = v[2];`,\n \"vec4<i32>\": `\n dataInt32[offset] = v[0];\n dataInt32[offset + 1] = v[1];\n dataInt32[offset + 2] = v[2];\n dataInt32[offset + 3] = v[3];`,\n \"mat2x2<f32>\": `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 4] = v[2];\n data[offset + 5] = v[3];`,\n \"mat3x3<f32>\": `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];\n data[offset + 4] = v[3];\n data[offset + 5] = v[4];\n data[offset + 6] = v[5];\n data[offset + 8] = v[6];\n data[offset + 9] = v[7];\n data[offset + 10] = v[8];`,\n \"mat4x4<f32>\": `\n for (let i = 0; i < 16; i++) {\n data[offset + i] = v[i];\n }`,\n \"mat3x2<f32>\": loopMatrix(3, 2),\n \"mat4x2<f32>\": loopMatrix(4, 2),\n \"mat2x3<f32>\": loopMatrix(2, 3),\n \"mat4x3<f32>\": loopMatrix(4, 3),\n \"mat2x4<f32>\": loopMatrix(2, 4),\n \"mat3x4<f32>\": loopMatrix(3, 4)\n};\nconst uboSyncFunctionsWGSL = {\n ...uboSyncFunctionsSTD40,\n \"mat2x2<f32>\": `\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];\n data[offset + 3] = v[3];\n `\n};\n\nexport { uboSyncFunctionsSTD40, uboSyncFunctionsWGSL };\n//# sourceMappingURL=uboSyncFunctions.mjs.map\n","import EventEmitter from 'eventemitter3';\nimport { uid } from '../../../../utils/data/uid.mjs';\n\n\"use strict\";\nclass BufferResource extends EventEmitter {\n /**\n * Create a new Buffer Resource.\n * @param options - The options for the buffer resource\n * @param options.buffer - The underlying buffer that this resource is using\n * @param options.offset - The offset of the buffer this resource is using.\n * If not provided, then it will use the offset of the buffer.\n * @param options.size - The size of the buffer this resource is using.\n * If not provided, then it will use the size of the buffer.\n */\n constructor({ buffer, offset, size }) {\n super();\n /**\n * emits when the underlying buffer has changed shape (i.e. resized)\n * letting the renderer know that it needs to discard the old buffer on the GPU and create a new one\n * @event change\n */\n /** a unique id for this uniform group used through the renderer */\n this.uid = uid(\"buffer\");\n /**\n * a resource type, used to identify how to handle it when its in a bind group / shader resource\n * @internal\n */\n this._resourceType = \"bufferResource\";\n /**\n * used internally to know if a uniform group was used in the last render pass\n * @internal\n */\n this._touched = 0;\n /**\n * the resource id used internally by the renderer to build bind group keys\n * @internal\n */\n this._resourceId = uid(\"resource\");\n /**\n * A cheeky hint to the GL renderer to let it know this is a BufferResource\n * @internal\n */\n this._bufferResource = true;\n /**\n * Has the Buffer resource been destroyed?\n * @readonly\n */\n this.destroyed = false;\n this.buffer = buffer;\n this.offset = offset | 0;\n this.size = size;\n this.buffer.on(\"change\", this.onBufferChange, this);\n }\n onBufferChange() {\n this._resourceId = uid(\"resource\");\n this.emit(\"change\", this);\n }\n /**\n * Destroys this resource. Make sure the underlying buffer is not used anywhere else\n * if you want to destroy it as well, or code will explode\n * @param destroyBuffer - Should the underlying buffer be destroyed as well?\n */\n destroy(destroyBuffer = false) {\n this.destroyed = true;\n if (destroyBuffer) {\n this.buffer.destroy();\n }\n this.emit(\"change\", this);\n this.buffer = null;\n this.removeAllListeners();\n }\n}\n\nexport { BufferResource };\n//# sourceMappingURL=BufferResource.mjs.map\n"],"names":[],"mappings":";AACK,MAAC,aAAa;AAAA,EACjB,MAAM;AAAA,EACN,QAAQ;AAAA,IACN;AAAA;AAAA,MAEE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASF;AAAA;AAAA,MAEE;AAAA;AAAA;AAAA;AAAA,EAIN;AAAA,EACE,UAAU;AAAA,IACR;AAAA;AAAA,MAEE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOF;AAAA;AAAA,MAEE;AAAA;AAAA;AAAA;AAAA,EAIN;AACA;AACK,MAAC,eAAe;AAAA,EACnB,MAAM;AAAA,EACN,QAAQ;AAAA,IACN;AAAA;AAAA,MAEE;AAAA;AAAA;AAAA;AAAA,IAIF;AAAA;AAAA,MAEE;AAAA;AAAA;AAAA;AAAA,EAIN;AAAA,EACE,UAAU;AAAA,IACR;AAAA;AAAA,MAEE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMF;AAAA;AAAA,MAEE;AAAA;AAAA;AAAA;AAAA,EAIN;AACA;ACpEA,SAAS,iBAAiB,UAAU,eAAe;AACjD,aAAW,KAAK,SAAS,YAAY;AACnC,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AAAA;AAAA,EAMA,QAAQ,gBAAgB,OAAO;AAC7B,SAAK,YAAY;AACjB,QAAI,eAAe;AACjB,WAAK,OAAO,QAAO;AAAA,IACrB;AACA,SAAK,KAAK,UAAU,IAAI;AACxB,SAAK,SAAS;AACd,SAAK,mBAAkB;AAAA,EACzB;AACF;","x_google_ignoreList":[0,1,2,3,4,5,6,7]}
@@ -1,5 +1,5 @@
1
- import { m as canvasUtils, n as groupD8, o as bgr2rgb, p as multiplyHexColors, M as Matrix, E as ExtensionType, q as Graphics, w as warn, r as canUseNewCanvasBlendModes, C as Color, c as Texture, s as generateTextureMatrix, t as shapeBuilders, v as buildLine, F as FillGradient, x as FillPattern, y as CanvasSource, D as DOMAdapter, A as AbstractRenderer, R as RendererType, f as extensions } from "./index-C6MgM63s.js";
2
- import { R as RenderTargetSystem, S as SharedSystems, B as BlendModePipe, a as BatcherPipe, b as SpritePipe, c as RenderGroupPipe, A as AlphaMaskPipe, C as CustomRenderPipe } from "./RenderTargetSystem-C9oPzIqc.js";
1
+ import { m as canvasUtils, n as groupD8, o as bgr2rgb, p as multiplyHexColors, M as Matrix, E as ExtensionType, q as Graphics, w as warn, r as canUseNewCanvasBlendModes, C as Color, c as Texture, s as generateTextureMatrix, t as shapeBuilders, v as buildLine, F as FillGradient, x as FillPattern, y as CanvasSource, D as DOMAdapter, A as AbstractRenderer, R as RendererType, f as extensions } from "./index-DP0q9yO1.js";
2
+ import { R as RenderTargetSystem, S as SharedSystems, B as BlendModePipe, a as BatcherPipe, b as SpritePipe, c as RenderGroupPipe, A as AlphaMaskPipe, C as CustomRenderPipe } from "./RenderTargetSystem-BrLrRZqC.js";
3
3
  const _CanvasBatchAdaptor = class _CanvasBatchAdaptor2 {
4
4
  static _getPatternRepeat(addressModeU, addressModeV) {
5
5
  const repeatU = addressModeU && addressModeU !== "clamp-to-edge";
@@ -1186,4 +1186,4 @@ class CanvasRenderer extends AbstractRenderer {
1186
1186
  export {
1187
1187
  CanvasRenderer
1188
1188
  };
1189
- //# sourceMappingURL=CanvasRenderer-Dr_Cv8Dc.js.map
1189
+ //# sourceMappingURL=CanvasRenderer-CYJLQIYQ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CanvasRenderer-Dr_Cv8Dc.js","sources":["../node_modules/pixi.js/lib/rendering/batcher/canvas/CanvasBatchAdaptor.mjs","../node_modules/pixi.js/lib/rendering/mask/color/CanvasColorMaskPipe.mjs","../node_modules/pixi.js/lib/rendering/mask/stencil/CanvasStencilMaskPipe.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/utils/mapCanvasBlendModesToPixi.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/CanvasContextSystem.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/CanvasLimitsSystem.mjs","../node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsAdaptor.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/renderTarget/CanvasRenderTargetAdaptor.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/renderTarget/CanvasRenderTargetSystem.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/texture/CanvasTextureSystem.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/CanvasRenderer.mjs"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { groupD8 } from '../../../maths/matrix/groupD8.mjs';\nimport { Matrix } from '../../../maths/matrix/Matrix.mjs';\nimport { bgr2rgb } from '../../../scene/container/container-mixins/getGlobalMixin.mjs';\nimport { multiplyHexColors } from '../../../scene/container/utils/multiplyHexColors.mjs';\nimport { canvasUtils } from '../../renderers/canvas/utils/canvasUtils.mjs';\n\n\"use strict\";\nconst _CanvasBatchAdaptor = class _CanvasBatchAdaptor {\n static _getPatternRepeat(addressModeU, addressModeV) {\n const repeatU = addressModeU && addressModeU !== \"clamp-to-edge\";\n const repeatV = addressModeV && addressModeV !== \"clamp-to-edge\";\n if (repeatU && repeatV) return \"repeat\";\n if (repeatU) return \"repeat-x\";\n if (repeatV) return \"repeat-y\";\n return \"no-repeat\";\n }\n start(batchPipe, geometry, shader) {\n void batchPipe;\n void geometry;\n void shader;\n }\n execute(batchPipe, batch) {\n const elements = batch.elements;\n if (!elements || !elements.length) return;\n const renderer = batchPipe.renderer;\n const contextSystem = renderer.canvasContext;\n const context = contextSystem.activeContext;\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n if (!element.packAsQuad) continue;\n const quad = element;\n const texture = quad.texture;\n const source = texture ? canvasUtils.getCanvasSource(texture) : null;\n if (!source) continue;\n const textureStyle = texture.source.style;\n const smoothProperty = contextSystem.smoothProperty;\n const shouldSmooth = textureStyle.scaleMode !== \"nearest\";\n if (context[smoothProperty] !== shouldSmooth) {\n context[smoothProperty] = shouldSmooth;\n }\n contextSystem.setBlendMode(batch.blendMode);\n const globalColor = renderer.globalUniforms.globalUniformData?.worldColor ?? 4294967295;\n const argb = quad.color;\n const globalAlpha = (globalColor >>> 24 & 255) / 255;\n const quadAlpha = (argb >>> 24 & 255) / 255;\n const filterAlpha = renderer.filter?.alphaMultiplier ?? 1;\n const alpha = globalAlpha * quadAlpha * filterAlpha;\n if (alpha <= 0) continue;\n context.globalAlpha = alpha;\n const globalTint = globalColor & 16777215;\n const quadTint = argb & 16777215;\n const tint = bgr2rgb(multiplyHexColors(quadTint, globalTint));\n const frame = texture.frame;\n const repeatU = textureStyle.addressModeU ?? textureStyle.addressMode;\n const repeatV = textureStyle.addressModeV ?? textureStyle.addressMode;\n const repeat = _CanvasBatchAdaptor._getPatternRepeat(repeatU, repeatV);\n const resolution = texture.source._resolution ?? texture.source.resolution ?? 1;\n const isFromCachedRenderGroup = quad.renderable?.renderGroup?.isCachedAsTexture;\n const sx = frame.x * resolution;\n const sy = frame.y * resolution;\n const sw = frame.width * resolution;\n const sh = frame.height * resolution;\n const bounds = quad.bounds;\n const isRootTarget = renderer.renderTarget.renderTarget.isRoot;\n const dx = bounds.minX;\n const dy = bounds.minY;\n const dw = bounds.maxX - bounds.minX;\n const dh = bounds.maxY - bounds.minY;\n const rotate = texture.rotate;\n const uvs = texture.uvs;\n const uvMin = Math.min(uvs.x0, uvs.x1, uvs.x2, uvs.x3, uvs.y0, uvs.y1, uvs.y2, uvs.y3);\n const uvMax = Math.max(uvs.x0, uvs.x1, uvs.x2, uvs.x3, uvs.y0, uvs.y1, uvs.y2, uvs.y3);\n const needsRepeat = repeat !== \"no-repeat\" && (uvMin < 0 || uvMax > 1);\n const willUseProcessedCanvas = !needsRepeat && (tint !== 16777215 || rotate);\n const applyRotateTransform = rotate && !willUseProcessedCanvas;\n if (applyRotateTransform) {\n _CanvasBatchAdaptor._tempPatternMatrix.copyFrom(quad.transform);\n groupD8.matrixAppendRotationInv(\n _CanvasBatchAdaptor._tempPatternMatrix,\n rotate,\n dx,\n dy,\n dw,\n dh\n );\n contextSystem.setContextTransform(\n _CanvasBatchAdaptor._tempPatternMatrix,\n quad.roundPixels === 1,\n void 0,\n isFromCachedRenderGroup && isRootTarget\n );\n } else {\n contextSystem.setContextTransform(\n quad.transform,\n quad.roundPixels === 1,\n void 0,\n isFromCachedRenderGroup && isRootTarget\n );\n }\n const drawX = applyRotateTransform ? 0 : dx;\n const drawY = applyRotateTransform ? 0 : dy;\n const drawW = dw;\n const drawH = dh;\n if (needsRepeat) {\n let patternSource = source;\n const canTint = tint !== 16777215 && !rotate;\n const fitsFrame = frame.width <= texture.source.width && frame.height <= texture.source.height;\n if (canTint && fitsFrame) {\n patternSource = canvasUtils.getTintedCanvas({ texture }, tint);\n }\n const pattern = context.createPattern(patternSource, repeat);\n if (!pattern) continue;\n const denomX = drawW;\n const denomY = drawH;\n if (denomX === 0 || denomY === 0) continue;\n const invDx = 1 / denomX;\n const invDy = 1 / denomY;\n const a = (uvs.x1 - uvs.x0) * invDx;\n const b = (uvs.y1 - uvs.y0) * invDx;\n const c = (uvs.x3 - uvs.x0) * invDy;\n const d = (uvs.y3 - uvs.y0) * invDy;\n const tx = uvs.x0 - a * drawX - c * drawY;\n const ty = uvs.y0 - b * drawX - d * drawY;\n const pixelWidth = texture.source.pixelWidth;\n const pixelHeight = texture.source.pixelHeight;\n _CanvasBatchAdaptor._tempPatternMatrix.set(\n a * pixelWidth,\n b * pixelHeight,\n c * pixelWidth,\n d * pixelHeight,\n tx * pixelWidth,\n ty * pixelHeight\n );\n canvasUtils.applyPatternTransform(pattern, _CanvasBatchAdaptor._tempPatternMatrix);\n context.fillStyle = pattern;\n context.fillRect(drawX, drawY, drawW, drawH);\n } else {\n const needsProcessing = tint !== 16777215 || rotate;\n const processedSource = needsProcessing ? canvasUtils.getTintedCanvas({ texture }, tint) : source;\n const isProcessed = processedSource !== source;\n context.drawImage(\n processedSource,\n isProcessed ? 0 : sx,\n isProcessed ? 0 : sy,\n isProcessed ? processedSource.width : sw,\n isProcessed ? processedSource.height : sh,\n drawX,\n drawY,\n drawW,\n drawH\n );\n }\n }\n }\n};\n_CanvasBatchAdaptor._tempPatternMatrix = new Matrix();\n/** @ignore */\n_CanvasBatchAdaptor.extension = {\n type: [\n ExtensionType.CanvasPipesAdaptor\n ],\n name: \"batch\"\n};\nlet CanvasBatchAdaptor = _CanvasBatchAdaptor;\n\nexport { CanvasBatchAdaptor };\n//# sourceMappingURL=CanvasBatchAdaptor.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\n\n\"use strict\";\nclass CanvasColorMaskPipe {\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 this._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 this._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 }\n destroy() {\n this._renderer = null;\n this._colorStack = null;\n }\n}\n/** @ignore */\nCanvasColorMaskPipe.extension = {\n type: [\n ExtensionType.CanvasPipes\n ],\n name: \"colorMask\"\n};\n\nexport { CanvasColorMaskPipe };\n//# sourceMappingURL=CanvasColorMaskPipe.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { Graphics } from '../../../scene/graphics/shared/Graphics.mjs';\nimport { warn } from '../../../utils/logging/warn.mjs';\n\n\"use strict\";\nfunction buildRoundedRectPath(context, x, y, width, height, radius) {\n radius = Math.max(0, Math.min(radius, Math.min(width, height) / 2));\n context.moveTo(x + radius, y);\n context.lineTo(x + width - radius, y);\n context.quadraticCurveTo(x + width, y, x + width, y + radius);\n context.lineTo(x + width, y + height - radius);\n context.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\n context.lineTo(x + radius, y + height);\n context.quadraticCurveTo(x, y + height, x, y + height - radius);\n context.lineTo(x, y + radius);\n context.quadraticCurveTo(x, y, x + radius, y);\n}\nfunction buildShapePath(context, shape) {\n switch (shape.type) {\n case \"rectangle\": {\n const rect = shape;\n context.rect(rect.x, rect.y, rect.width, rect.height);\n break;\n }\n case \"roundedRectangle\": {\n const rect = shape;\n buildRoundedRectPath(context, rect.x, rect.y, rect.width, rect.height, rect.radius);\n break;\n }\n case \"circle\": {\n const circle = shape;\n context.moveTo(circle.x + circle.radius, circle.y);\n context.arc(circle.x, circle.y, circle.radius, 0, Math.PI * 2);\n break;\n }\n case \"ellipse\": {\n const ellipse = shape;\n if (context.ellipse) {\n context.moveTo(ellipse.x + ellipse.halfWidth, ellipse.y);\n context.ellipse(ellipse.x, ellipse.y, ellipse.halfWidth, ellipse.halfHeight, 0, 0, Math.PI * 2);\n } else {\n context.save();\n context.translate(ellipse.x, ellipse.y);\n context.scale(ellipse.halfWidth, ellipse.halfHeight);\n context.moveTo(1, 0);\n context.arc(0, 0, 1, 0, Math.PI * 2);\n context.restore();\n }\n break;\n }\n case \"triangle\": {\n const tri = shape;\n context.moveTo(tri.x, tri.y);\n context.lineTo(tri.x2, tri.y2);\n context.lineTo(tri.x3, tri.y3);\n context.closePath();\n break;\n }\n case \"polygon\":\n default: {\n const poly = shape;\n const points = poly.points;\n if (!points?.length) break;\n context.moveTo(points[0], points[1]);\n for (let i = 2; i < points.length; i += 2) {\n context.lineTo(points[i], points[i + 1]);\n }\n if (poly.closePath) {\n context.closePath();\n }\n break;\n }\n }\n}\nfunction addHolePaths(context, holes) {\n if (!holes?.length) return false;\n for (let i = 0; i < holes.length; i++) {\n const hole = holes[i];\n if (!hole?.shape) continue;\n const transform = hole.transform;\n const hasTransform = transform && !transform.isIdentity();\n if (hasTransform) {\n context.save();\n context.transform(transform.a, transform.b, transform.c, transform.d, transform.tx, transform.ty);\n }\n buildShapePath(context, hole.shape);\n if (hasTransform) {\n context.restore();\n }\n }\n return true;\n}\nclass CanvasStencilMaskPipe {\n constructor(renderer) {\n this._warnedMaskTypes = /* @__PURE__ */ new Set();\n this._canvasMaskStack = [];\n this._renderer = renderer;\n }\n push(mask, _container, instructionSet) {\n this._renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add({\n renderPipeId: \"stencilMask\",\n action: \"pushMaskBegin\",\n mask,\n inverse: _container._maskOptions.inverse,\n canBundle: false\n });\n }\n pop(_mask, _container, instructionSet) {\n this._renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add({\n renderPipeId: \"stencilMask\",\n action: \"popMaskEnd\",\n mask: _mask,\n inverse: _container._maskOptions.inverse,\n canBundle: false\n });\n }\n execute(instruction) {\n if (instruction.action !== \"pushMaskBegin\" && instruction.action !== \"popMaskEnd\") {\n return;\n }\n const canvasRenderer = this._renderer;\n const contextSystem = canvasRenderer.canvasContext;\n const context = contextSystem?.activeContext;\n if (!context) return;\n if (instruction.action === \"popMaskEnd\") {\n const didClip = this._canvasMaskStack.pop();\n if (didClip) {\n context.restore();\n }\n return;\n }\n if (instruction.inverse) {\n this._warnOnce(\n \"inverse\",\n \"CanvasRenderer: inverse masks are not supported on Canvas2D; ignoring inverse flag.\"\n );\n }\n const maskContainer = instruction.mask.mask;\n if (!(maskContainer instanceof Graphics)) {\n this._warnOnce(\n \"nonGraphics\",\n \"CanvasRenderer: only Graphics masks are supported in Canvas2D; skipping mask.\"\n );\n this._canvasMaskStack.push(false);\n return;\n }\n const graphics = maskContainer;\n const instructions = graphics.context?.instructions;\n if (!instructions?.length) {\n this._canvasMaskStack.push(false);\n return;\n }\n context.save();\n contextSystem.setContextTransform(\n graphics.groupTransform,\n (canvasRenderer._roundPixels | graphics._roundPixels) === 1\n );\n context.beginPath();\n let drewPath = false;\n let hasHoles = false;\n for (let i = 0; i < instructions.length; i++) {\n const instructionData = instructions[i];\n const action = instructionData.action;\n if (action !== \"fill\" && action !== \"stroke\") continue;\n const data = instructionData.data;\n const shapePath = data?.path?.shapePath;\n if (!shapePath?.shapePrimitives?.length) continue;\n const shapePrimitives = shapePath.shapePrimitives;\n for (let j = 0; j < shapePrimitives.length; j++) {\n const primitive = shapePrimitives[j];\n if (!primitive?.shape) continue;\n const transform = primitive.transform;\n const hasTransform = transform && !transform.isIdentity();\n if (hasTransform) {\n context.save();\n context.transform(transform.a, transform.b, transform.c, transform.d, transform.tx, transform.ty);\n }\n buildShapePath(context, primitive.shape);\n hasHoles = addHolePaths(context, primitive.holes) || hasHoles;\n drewPath = true;\n if (hasTransform) {\n context.restore();\n }\n }\n }\n if (!drewPath) {\n context.restore();\n this._canvasMaskStack.push(false);\n return;\n }\n if (hasHoles) {\n context.clip(\"evenodd\");\n } else {\n context.clip();\n }\n this._canvasMaskStack.push(true);\n }\n destroy() {\n this._renderer = null;\n this._warnedMaskTypes = null;\n this._canvasMaskStack = null;\n }\n _warnOnce(key, message) {\n if (this._warnedMaskTypes.has(key)) return;\n this._warnedMaskTypes.add(key);\n warn(message);\n }\n}\nCanvasStencilMaskPipe.extension = {\n type: [\n ExtensionType.CanvasPipes\n ],\n name: \"stencilMask\"\n};\n\nexport { CanvasStencilMaskPipe };\n//# sourceMappingURL=CanvasStencilMaskPipe.mjs.map\n","import { canUseNewCanvasBlendModes } from './canUseNewCanvasBlendModes.mjs';\n\n\"use strict\";\nconst FALLBACK_BLEND = \"source-over\";\nfunction mapCanvasBlendModesToPixi() {\n const supportsAdvanced = canUseNewCanvasBlendModes();\n const map = /* @__PURE__ */ Object.create(null);\n map.inherit = FALLBACK_BLEND;\n map.none = FALLBACK_BLEND;\n map.normal = \"source-over\";\n map.add = \"lighter\";\n map.multiply = supportsAdvanced ? \"multiply\" : FALLBACK_BLEND;\n map.screen = supportsAdvanced ? \"screen\" : FALLBACK_BLEND;\n map.overlay = supportsAdvanced ? \"overlay\" : FALLBACK_BLEND;\n map.darken = supportsAdvanced ? \"darken\" : FALLBACK_BLEND;\n map.lighten = supportsAdvanced ? \"lighten\" : FALLBACK_BLEND;\n map[\"color-dodge\"] = supportsAdvanced ? \"color-dodge\" : FALLBACK_BLEND;\n map[\"color-burn\"] = supportsAdvanced ? \"color-burn\" : FALLBACK_BLEND;\n map[\"hard-light\"] = supportsAdvanced ? \"hard-light\" : FALLBACK_BLEND;\n map[\"soft-light\"] = supportsAdvanced ? \"soft-light\" : FALLBACK_BLEND;\n map.difference = supportsAdvanced ? \"difference\" : FALLBACK_BLEND;\n map.exclusion = supportsAdvanced ? \"exclusion\" : FALLBACK_BLEND;\n map.saturation = supportsAdvanced ? \"saturation\" : FALLBACK_BLEND;\n map.color = supportsAdvanced ? \"color\" : FALLBACK_BLEND;\n map.luminosity = supportsAdvanced ? \"luminosity\" : FALLBACK_BLEND;\n map[\"linear-burn\"] = supportsAdvanced ? \"color-burn\" : FALLBACK_BLEND;\n map[\"linear-dodge\"] = supportsAdvanced ? \"color-dodge\" : FALLBACK_BLEND;\n map[\"linear-light\"] = supportsAdvanced ? \"hard-light\" : FALLBACK_BLEND;\n map[\"pin-light\"] = supportsAdvanced ? \"hard-light\" : FALLBACK_BLEND;\n map[\"vivid-light\"] = supportsAdvanced ? \"hard-light\" : FALLBACK_BLEND;\n map[\"hard-mix\"] = FALLBACK_BLEND;\n map.negation = supportsAdvanced ? \"difference\" : FALLBACK_BLEND;\n map[\"normal-npm\"] = map.normal;\n map[\"add-npm\"] = map.add;\n map[\"screen-npm\"] = map.screen;\n map.erase = \"destination-out\";\n map.subtract = FALLBACK_BLEND;\n map.divide = FALLBACK_BLEND;\n map.min = FALLBACK_BLEND;\n map.max = FALLBACK_BLEND;\n return map;\n}\n\nexport { mapCanvasBlendModesToPixi };\n//# sourceMappingURL=mapCanvasBlendModesToPixi.mjs.map\n","import { Color } from '../../../color/Color.mjs';\nimport { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { Matrix } from '../../../maths/matrix/Matrix.mjs';\nimport { mapCanvasBlendModesToPixi } from './utils/mapCanvasBlendModesToPixi.mjs';\n\n\"use strict\";\nconst tempMatrix = new Matrix();\nclass CanvasContextSystem {\n /**\n * @param renderer - The owning CanvasRenderer.\n */\n constructor(renderer) {\n /** Resolution of the active context. */\n this.activeResolution = 1;\n /** The image smoothing property to toggle for this browser. */\n this.smoothProperty = \"imageSmoothingEnabled\";\n /** Map of Pixi blend modes to canvas composite operations. */\n this.blendModes = mapCanvasBlendModesToPixi();\n /** Current canvas blend mode. */\n this._activeBlendMode = \"normal\";\n /** Optional projection transform for render targets. */\n this._projTransform = null;\n /** True when external blend mode control is in use. */\n this._outerBlend = false;\n /** Tracks unsupported blend mode warnings to avoid spam. */\n this._warnedBlendModes = /* @__PURE__ */ new Set();\n this._renderer = renderer;\n }\n resolutionChange(resolution) {\n this.activeResolution = resolution;\n }\n /** Initializes the root context and smoothing flag selection. */\n init() {\n const alpha = this._renderer.background.alpha < 1;\n this.rootContext = this._renderer.canvas.getContext(\n \"2d\",\n { alpha }\n );\n this.activeContext = this.rootContext;\n this.activeResolution = this._renderer.resolution;\n if (!this.rootContext.imageSmoothingEnabled) {\n const rc = this.rootContext;\n if (rc.webkitImageSmoothingEnabled) {\n this.smoothProperty = \"webkitImageSmoothingEnabled\";\n } else if (rc.mozImageSmoothingEnabled) {\n this.smoothProperty = \"mozImageSmoothingEnabled\";\n } else if (rc.oImageSmoothingEnabled) {\n this.smoothProperty = \"oImageSmoothingEnabled\";\n } else if (rc.msImageSmoothingEnabled) {\n this.smoothProperty = \"msImageSmoothingEnabled\";\n }\n }\n }\n /**\n * Sets the current transform on the active context.\n * @param transform - Transform to apply.\n * @param roundPixels - Whether to round translation to integers.\n * @param localResolution - Optional local resolution multiplier.\n * @param skipGlobalTransform - If true, skip applying the global world transform matrix.\n */\n setContextTransform(transform, roundPixels, localResolution, skipGlobalTransform) {\n const globalTransform = skipGlobalTransform ? Matrix.IDENTITY : this._renderer.globalUniforms.globalUniformData?.worldTransformMatrix || Matrix.IDENTITY;\n let mat = tempMatrix;\n mat.copyFrom(globalTransform);\n mat.append(transform);\n const proj = this._projTransform;\n const contextResolution = this.activeResolution;\n localResolution = localResolution || contextResolution;\n if (proj) {\n const finalMat = Matrix.shared;\n finalMat.copyFrom(mat);\n finalMat.prepend(proj);\n mat = finalMat;\n }\n if (roundPixels) {\n this.activeContext.setTransform(\n mat.a * localResolution,\n mat.b * localResolution,\n mat.c * localResolution,\n mat.d * localResolution,\n mat.tx * contextResolution | 0,\n mat.ty * contextResolution | 0\n );\n } else {\n this.activeContext.setTransform(\n mat.a * localResolution,\n mat.b * localResolution,\n mat.c * localResolution,\n mat.d * localResolution,\n mat.tx * contextResolution,\n mat.ty * contextResolution\n );\n }\n }\n /**\n * Clears the current render target, optionally filling with a color.\n * @param clearColor - Color to fill after clearing.\n * @param alpha - Alpha override for the clear color.\n */\n clear(clearColor, alpha) {\n const context = this.activeContext;\n const renderer = this._renderer;\n context.clearRect(0, 0, renderer.width, renderer.height);\n if (clearColor) {\n const color = Color.shared.setValue(clearColor);\n context.globalAlpha = alpha ?? color.alpha;\n context.fillStyle = color.toHex();\n context.fillRect(0, 0, renderer.width, renderer.height);\n context.globalAlpha = 1;\n }\n }\n /**\n * Sets the active blend mode.\n * @param blendMode - Pixi blend mode.\n */\n setBlendMode(blendMode) {\n if (this._activeBlendMode === blendMode) return;\n this._activeBlendMode = blendMode;\n this._outerBlend = false;\n const mappedBlend = this.blendModes[blendMode];\n if (!mappedBlend) {\n if (!this._warnedBlendModes.has(blendMode)) {\n console.warn(\n `CanvasRenderer: blend mode \"${blendMode}\" is not supported in Canvas2D; falling back to \"source-over\".`\n );\n this._warnedBlendModes.add(blendMode);\n }\n this.activeContext.globalCompositeOperation = \"source-over\";\n return;\n }\n this.activeContext.globalCompositeOperation = mappedBlend;\n }\n /** Releases context references. */\n destroy() {\n this.rootContext = null;\n this.activeContext = null;\n this._warnedBlendModes.clear();\n }\n}\n/** @ignore */\nCanvasContextSystem.extension = {\n type: [\n ExtensionType.CanvasSystem\n ],\n name: \"canvasContext\"\n};\n\nexport { CanvasContextSystem };\n//# sourceMappingURL=CanvasContextSystem.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\n\n\"use strict\";\nclass CanvasLimitsSystem {\n constructor() {\n this.maxTextures = 16;\n this.maxBatchableTextures = 16;\n this.maxUniformBindings = 0;\n }\n init() {\n }\n}\n/** @ignore */\nCanvasLimitsSystem.extension = {\n type: [\n ExtensionType.CanvasSystem\n ],\n name: \"limits\"\n};\n\nexport { CanvasLimitsSystem };\n//# sourceMappingURL=CanvasLimitsSystem.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { groupD8 } from '../../../maths/matrix/groupD8.mjs';\nimport { Matrix } from '../../../maths/matrix/Matrix.mjs';\nimport { canvasUtils } from '../../../rendering/renderers/canvas/utils/canvasUtils.mjs';\nimport { Texture } from '../../../rendering/renderers/shared/texture/Texture.mjs';\nimport { bgr2rgb } from '../../container/container-mixins/getGlobalMixin.mjs';\nimport { multiplyHexColors } from '../../container/utils/multiplyHexColors.mjs';\nimport { buildLine } from '../shared/buildCommands/buildLine.mjs';\nimport { FillGradient } from '../shared/fill/FillGradient.mjs';\nimport { FillPattern } from '../shared/fill/FillPattern.mjs';\nimport { shapeBuilders } from '../shared/utils/buildContextBatches.mjs';\nimport { generateTextureMatrix } from '../shared/utils/generateTextureFillMatrix.mjs';\n\n\"use strict\";\nconst emptyCanvasStyle = \"#808080\";\nconst tempMatrix = new Matrix();\nconst tempTextureMatrix = new Matrix();\nconst tempGradientMatrix = new Matrix();\nconst tempPatternMatrix = new Matrix();\nfunction fillTriangles(context, vertices, indices) {\n context.beginPath();\n for (let i = 0; i < indices.length; i += 3) {\n const i0 = indices[i] * 2;\n const i1 = indices[i + 1] * 2;\n const i2 = indices[i + 2] * 2;\n context.moveTo(vertices[i0], vertices[i0 + 1]);\n context.lineTo(vertices[i1], vertices[i1 + 1]);\n context.lineTo(vertices[i2], vertices[i2 + 1]);\n context.closePath();\n }\n context.fill();\n}\nfunction colorToHex(color) {\n const clamped = color & 16777215;\n return `#${clamped.toString(16).padStart(6, \"0\")}`;\n}\nfunction buildRoundedRectPath(context, x, y, width, height, radius) {\n radius = Math.max(0, Math.min(radius, Math.min(width, height) / 2));\n context.moveTo(x + radius, y);\n context.lineTo(x + width - radius, y);\n context.quadraticCurveTo(x + width, y, x + width, y + radius);\n context.lineTo(x + width, y + height - radius);\n context.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\n context.lineTo(x + radius, y + height);\n context.quadraticCurveTo(x, y + height, x, y + height - radius);\n context.lineTo(x, y + radius);\n context.quadraticCurveTo(x, y, x + radius, y);\n}\nfunction buildShapePath(context, shape) {\n switch (shape.type) {\n case \"rectangle\": {\n const rect = shape;\n context.rect(rect.x, rect.y, rect.width, rect.height);\n break;\n }\n case \"roundedRectangle\": {\n const rect = shape;\n buildRoundedRectPath(context, rect.x, rect.y, rect.width, rect.height, rect.radius);\n break;\n }\n case \"circle\": {\n const circle = shape;\n context.arc(circle.x, circle.y, circle.radius, 0, Math.PI * 2);\n break;\n }\n case \"ellipse\": {\n const ellipse = shape;\n if (context.ellipse) {\n context.ellipse(ellipse.x, ellipse.y, ellipse.halfWidth, ellipse.halfHeight, 0, 0, Math.PI * 2);\n } else {\n context.save();\n context.translate(ellipse.x, ellipse.y);\n context.scale(ellipse.halfWidth, ellipse.halfHeight);\n context.arc(0, 0, 1, 0, Math.PI * 2);\n context.restore();\n }\n break;\n }\n case \"triangle\": {\n const tri = shape;\n context.moveTo(tri.x, tri.y);\n context.lineTo(tri.x2, tri.y2);\n context.lineTo(tri.x3, tri.y3);\n context.closePath();\n break;\n }\n case \"polygon\":\n default: {\n const poly = shape;\n const points = poly.points;\n if (!points?.length) break;\n context.moveTo(points[0], points[1]);\n for (let i = 2; i < points.length; i += 2) {\n context.lineTo(points[i], points[i + 1]);\n }\n if (poly.closePath) {\n context.closePath();\n }\n break;\n }\n }\n}\nfunction addHolePaths(context, holes) {\n if (!holes?.length) return false;\n for (let i = 0; i < holes.length; i++) {\n const hole = holes[i];\n if (!hole?.shape) continue;\n const transform = hole.transform;\n const hasTransform = transform && !transform.isIdentity();\n if (hasTransform) {\n context.save();\n context.transform(transform.a, transform.b, transform.c, transform.d, transform.tx, transform.ty);\n }\n buildShapePath(context, hole.shape);\n if (hasTransform) {\n context.restore();\n }\n }\n return true;\n}\nfunction getCanvasStyle(style, tint, textureMatrix, currentTransform) {\n const fill = style.fill;\n if (fill instanceof FillGradient) {\n fill.buildGradient();\n const gradientTexture = fill.texture;\n if (gradientTexture) {\n const pattern = canvasUtils.getTintedPattern(gradientTexture, tint);\n const patternMatrix = textureMatrix ? tempPatternMatrix.copyFrom(textureMatrix).scale(gradientTexture.source.pixelWidth, gradientTexture.source.pixelHeight) : tempPatternMatrix.copyFrom(fill.transform);\n if (currentTransform && !style.textureSpace) {\n patternMatrix.append(currentTransform);\n }\n canvasUtils.applyPatternTransform(pattern, patternMatrix);\n return pattern;\n }\n }\n if (fill instanceof FillPattern) {\n const pattern = canvasUtils.getTintedPattern(fill.texture, tint);\n canvasUtils.applyPatternTransform(pattern, fill.transform);\n return pattern;\n }\n const texture = style.texture;\n if (texture && texture !== Texture.WHITE) {\n if (!texture.source.resource) {\n return emptyCanvasStyle;\n }\n const pattern = canvasUtils.getTintedPattern(texture, tint);\n const patternMatrix = textureMatrix ? tempPatternMatrix.copyFrom(textureMatrix).scale(texture.source.pixelWidth, texture.source.pixelHeight) : style.matrix;\n canvasUtils.applyPatternTransform(pattern, patternMatrix);\n return pattern;\n }\n return colorToHex(tint);\n}\nclass CanvasGraphicsAdaptor {\n constructor() {\n this.shader = null;\n }\n contextChange(renderer) {\n void renderer;\n }\n execute(graphicsPipe, renderable) {\n const renderer = graphicsPipe.renderer;\n const contextSystem = renderer.canvasContext;\n const context = contextSystem.activeContext;\n const baseTransform = renderable.groupTransform;\n const globalColor = renderer.globalUniforms.globalUniformData?.worldColor ?? 4294967295;\n const groupColorAlpha = renderable.groupColorAlpha;\n const globalAlpha = (globalColor >>> 24 & 255) / 255;\n const groupAlphaValue = (groupColorAlpha >>> 24 & 255) / 255;\n const filterAlpha = renderer.filter?.alphaMultiplier ?? 1;\n const groupAlpha = globalAlpha * groupAlphaValue * filterAlpha;\n if (groupAlpha <= 0) return;\n const globalTint = globalColor & 16777215;\n const groupTintBGR = groupColorAlpha & 16777215;\n const groupTint = bgr2rgb(multiplyHexColors(groupTintBGR, globalTint));\n const roundPixels = renderer._roundPixels | renderable._roundPixels;\n context.save();\n contextSystem.setContextTransform(baseTransform, roundPixels === 1);\n contextSystem.setBlendMode(renderable.groupBlendMode);\n const instructions = renderable.context.instructions;\n for (let i = 0; i < instructions.length; i++) {\n const instruction = instructions[i];\n if (instruction.action === \"texture\") {\n const data2 = instruction.data;\n const texture = data2.image;\n const source = texture ? canvasUtils.getCanvasSource(texture) : null;\n if (!source) continue;\n const alpha2 = data2.alpha * groupAlpha;\n if (alpha2 <= 0) continue;\n const tint2 = multiplyHexColors(data2.style, groupTint);\n context.globalAlpha = alpha2;\n let drawSource = source;\n if (tint2 !== 16777215) {\n drawSource = canvasUtils.getTintedCanvas({ texture }, tint2);\n }\n const frame = texture.frame;\n const resolution = texture.source._resolution ?? texture.source.resolution ?? 1;\n let sx = frame.x * resolution;\n let sy = frame.y * resolution;\n const sw = frame.width * resolution;\n const sh = frame.height * resolution;\n if (drawSource !== source) {\n sx = 0;\n sy = 0;\n }\n const transform = data2.transform;\n const hasTransform = transform && !transform.isIdentity();\n const rotate = texture.rotate;\n if (hasTransform || rotate) {\n tempMatrix.copyFrom(baseTransform);\n if (hasTransform) {\n tempMatrix.append(transform);\n }\n if (rotate) {\n groupD8.matrixAppendRotationInv(tempMatrix, rotate, data2.dx, data2.dy, data2.dw, data2.dh);\n }\n contextSystem.setContextTransform(tempMatrix, roundPixels === 1);\n } else {\n contextSystem.setContextTransform(baseTransform, roundPixels === 1);\n }\n context.drawImage(\n drawSource,\n sx,\n sy,\n drawSource === source ? sw : drawSource.width,\n drawSource === source ? sh : drawSource.height,\n rotate ? 0 : data2.dx,\n rotate ? 0 : data2.dy,\n data2.dw,\n data2.dh\n );\n if (hasTransform || rotate) {\n contextSystem.setContextTransform(baseTransform, roundPixels === 1);\n }\n continue;\n }\n const data = instruction.data;\n const shapePath = data?.path?.shapePath;\n if (!shapePath?.shapePrimitives?.length) continue;\n const style = data.style;\n const tint = multiplyHexColors(style.color, groupTint);\n const alpha = style.alpha * groupAlpha;\n if (alpha <= 0) continue;\n const isStroke = instruction.action === \"stroke\";\n context.globalAlpha = alpha;\n if (isStroke) {\n const strokeStyle = style;\n context.lineWidth = strokeStyle.width;\n context.lineCap = strokeStyle.cap;\n context.lineJoin = strokeStyle.join;\n context.miterLimit = strokeStyle.miterLimit;\n }\n const shapePrimitives = shapePath.shapePrimitives;\n if (!isStroke && data.hole?.shapePath?.shapePrimitives?.length) {\n const lastShape = shapePrimitives[shapePrimitives.length - 1];\n lastShape.holes = data.hole.shapePath.shapePrimitives;\n }\n for (let j = 0; j < shapePrimitives.length; j++) {\n const primitive = shapePrimitives[j];\n if (!primitive?.shape) continue;\n const transform = primitive.transform;\n const hasTransform = transform && !transform.isIdentity();\n const hasTexture = style.texture && style.texture !== Texture.WHITE;\n const textureTransform = style.textureSpace === \"global\" ? transform : null;\n const textureMatrix = hasTexture ? generateTextureMatrix(tempTextureMatrix, style, primitive.shape, textureTransform) : null;\n const currentTransform = hasTransform ? tempGradientMatrix.copyFrom(baseTransform).append(transform) : baseTransform;\n const canvasStyle = getCanvasStyle(\n style,\n tint,\n textureMatrix,\n currentTransform\n );\n if (hasTransform) {\n context.save();\n context.transform(transform.a, transform.b, transform.c, transform.d, transform.tx, transform.ty);\n }\n if (isStroke) {\n const strokeStyle = style;\n const useStrokeGeometry = strokeStyle.alignment !== 0.5 && !strokeStyle.pixelLine;\n if (useStrokeGeometry) {\n const points = [];\n const vertices = [];\n const indices = [];\n const shapeBuilder = shapeBuilders[primitive.shape.type];\n if (shapeBuilder?.build(primitive.shape, points)) {\n const close = primitive.shape.closePath ?? true;\n buildLine(points, strokeStyle, false, close, vertices, indices);\n context.fillStyle = canvasStyle;\n fillTriangles(context, vertices, indices);\n } else {\n context.strokeStyle = canvasStyle;\n context.beginPath();\n buildShapePath(context, primitive.shape);\n context.stroke();\n }\n } else {\n context.strokeStyle = canvasStyle;\n context.beginPath();\n buildShapePath(context, primitive.shape);\n context.stroke();\n }\n } else {\n context.fillStyle = canvasStyle;\n context.beginPath();\n buildShapePath(context, primitive.shape);\n const hasHoles = addHolePaths(context, primitive.holes);\n if (hasHoles) {\n context.fill(\"evenodd\");\n } else {\n context.fill();\n }\n }\n if (hasTransform) {\n context.restore();\n }\n }\n }\n context.restore();\n }\n destroy() {\n this.shader = null;\n }\n}\n/** @ignore */\nCanvasGraphicsAdaptor.extension = {\n type: [\n ExtensionType.CanvasPipesAdaptor\n ],\n name: \"graphics\"\n};\n\nexport { CanvasGraphicsAdaptor };\n//# sourceMappingURL=CanvasGraphicsAdaptor.mjs.map\n","import { Color } from '../../../../color/Color.mjs';\nimport { DOMAdapter } from '../../../../environment/adapter.mjs';\nimport { CanvasSource } from '../../shared/texture/sources/CanvasSource.mjs';\n\n\"use strict\";\nclass CanvasRenderTargetAdaptor {\n /**\n * Initializes the adaptor.\n * @param renderer - Canvas renderer instance.\n * @param renderTargetSystem - The render target system.\n * @advanced\n */\n init(renderer, renderTargetSystem) {\n this._renderer = renderer;\n this._renderTargetSystem = renderTargetSystem;\n }\n /**\n * Creates a GPU render target for canvas.\n * @param renderTarget - Render target to initialize.\n * @advanced\n */\n initGpuRenderTarget(renderTarget) {\n const colorTexture = renderTarget.colorTexture;\n const { canvas, context } = this._ensureCanvas(colorTexture);\n return {\n canvas,\n context,\n width: canvas.width,\n height: canvas.height\n };\n }\n /**\n * Resizes the backing canvas for a render target.\n * @param renderTarget - Render target to resize.\n * @advanced\n */\n resizeGpuRenderTarget(renderTarget) {\n const colorTexture = renderTarget.colorTexture;\n const { canvas } = this._ensureCanvas(colorTexture);\n canvas.width = renderTarget.pixelWidth;\n canvas.height = renderTarget.pixelHeight;\n }\n /**\n * Starts a render pass on the canvas target.\n * @param renderTarget - Target to render to.\n * @param clear - Clear mode.\n * @param clearColor - Optional clear color.\n * @param viewport - Optional viewport.\n * @advanced\n */\n startRenderPass(renderTarget, clear, clearColor, viewport) {\n const gpuRenderTarget = this._renderTargetSystem.getGpuRenderTarget(renderTarget);\n this._renderer.canvasContext.activeContext = gpuRenderTarget.context;\n this._renderer.canvasContext.activeResolution = renderTarget.resolution;\n if (clear) {\n this.clear(renderTarget, clear, clearColor, viewport);\n }\n }\n /**\n * Clears the render target.\n * @param renderTarget - Target to clear.\n * @param _clear - Clear mode (unused).\n * @param clearColor - Optional clear color.\n * @param viewport - Optional viewport rectangle.\n * @advanced\n */\n clear(renderTarget, _clear, clearColor, viewport) {\n const gpuRenderTarget = this._renderTargetSystem.getGpuRenderTarget(renderTarget);\n const context = gpuRenderTarget.context;\n const bounds = viewport || { x: 0, y: 0, width: renderTarget.pixelWidth, height: renderTarget.pixelHeight };\n context.setTransform(1, 0, 0, 1, 0, 0);\n context.clearRect(bounds.x, bounds.y, bounds.width, bounds.height);\n if (clearColor) {\n const color = Color.shared.setValue(clearColor);\n if (color.alpha > 0) {\n context.globalAlpha = color.alpha;\n context.fillStyle = color.toHex();\n context.fillRect(bounds.x, bounds.y, bounds.width, bounds.height);\n context.globalAlpha = 1;\n }\n }\n }\n /**\n * Finishes the render pass (no-op for canvas).\n * @advanced\n */\n finishRenderPass() {\n }\n /**\n * Copies a render target into a texture source.\n * @param {RenderTarget} sourceRenderSurfaceTexture - Source render target.\n * @param {Texture} destinationTexture - Destination texture.\n * @param {object} originSrc - Source origin.\n * @param {number} originSrc.x - Source x origin.\n * @param {number} originSrc.y - Source y origin.\n * @param {object} size - Copy size.\n * @param {number} size.width - Copy width.\n * @param {number} size.height - Copy height.\n * @param {object} [originDest] - Destination origin.\n * @param {number} originDest.x - Destination x origin.\n * @param {number} originDest.y - Destination y origin.\n * @advanced\n */\n copyToTexture(sourceRenderSurfaceTexture, destinationTexture, originSrc, size, originDest) {\n const sourceGpuTarget = this._renderTargetSystem.getGpuRenderTarget(sourceRenderSurfaceTexture);\n const sourceCanvas = sourceGpuTarget.canvas;\n const destSource = destinationTexture.source;\n const { context } = this._ensureCanvas(destSource);\n const dx = originDest?.x ?? 0;\n const dy = originDest?.y ?? 0;\n context.drawImage(\n sourceCanvas,\n originSrc.x,\n originSrc.y,\n size.width,\n size.height,\n dx,\n dy,\n size.width,\n size.height\n );\n destSource.update();\n return destinationTexture;\n }\n /**\n * Destroys a GPU render target (no-op for canvas).\n * @param _gpuRenderTarget - Target to destroy.\n * @advanced\n */\n destroyGpuRenderTarget(_gpuRenderTarget) {\n }\n _ensureCanvas(source) {\n let canvas = source.resource;\n if (!canvas || !CanvasSource.test(canvas)) {\n canvas = DOMAdapter.get().createCanvas(source.pixelWidth, source.pixelHeight);\n source.resource = canvas;\n }\n if (canvas.width !== source.pixelWidth || canvas.height !== source.pixelHeight) {\n canvas.width = source.pixelWidth;\n canvas.height = source.pixelHeight;\n }\n const context = canvas.getContext(\"2d\");\n return { canvas, context };\n }\n}\n\nexport { CanvasRenderTargetAdaptor };\n//# sourceMappingURL=CanvasRenderTargetAdaptor.mjs.map\n","import { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { RenderTargetSystem } from '../../shared/renderTarget/RenderTargetSystem.mjs';\nimport { CanvasRenderTargetAdaptor } from './CanvasRenderTargetAdaptor.mjs';\n\n\"use strict\";\nclass CanvasRenderTargetSystem extends RenderTargetSystem {\n constructor(renderer) {\n super(renderer);\n this.adaptor = new CanvasRenderTargetAdaptor();\n this.adaptor.init(renderer, this);\n }\n}\n/** @ignore */\nCanvasRenderTargetSystem.extension = {\n type: [ExtensionType.CanvasSystem],\n name: \"renderTarget\"\n};\n\nexport { CanvasRenderTargetSystem };\n//# sourceMappingURL=CanvasRenderTargetSystem.mjs.map\n","import { DOMAdapter } from '../../../../environment/adapter.mjs';\nimport { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { canvasUtils } from '../utils/canvasUtils.mjs';\n\n\"use strict\";\nclass CanvasTextureSystem {\n /**\n * @param renderer - The owning CanvasRenderer.\n */\n constructor(renderer) {\n void renderer;\n }\n /** Initializes the system (no-op for canvas). */\n init() {\n }\n /**\n * Initializes a texture source (no-op for canvas).\n * @param _source - Texture source.\n */\n initSource(_source) {\n }\n /**\n * Creates a canvas containing the texture's frame.\n * @param texture - Texture to render.\n */\n generateCanvas(texture) {\n const canvas = DOMAdapter.get().createCanvas();\n const context = canvas.getContext(\"2d\");\n const source = canvasUtils.getCanvasSource(texture);\n if (!source) {\n return canvas;\n }\n const frame = texture.frame;\n const resolution = texture.source._resolution ?? texture.source.resolution ?? 1;\n const sx = frame.x * resolution;\n const sy = frame.y * resolution;\n const sw = frame.width * resolution;\n const sh = frame.height * resolution;\n canvas.width = Math.ceil(sw);\n canvas.height = Math.ceil(sh);\n context.drawImage(\n source,\n sx,\n sy,\n sw,\n sh,\n 0,\n 0,\n sw,\n sh\n );\n return canvas;\n }\n /**\n * Reads pixel data from a texture.\n * @param texture - Texture to read.\n */\n getPixels(texture) {\n const canvas = this.generateCanvas(texture);\n const context = canvas.getContext(\"2d\", { willReadFrequently: true });\n const imageData = context.getImageData(0, 0, canvas.width, canvas.height);\n return {\n pixels: imageData.data,\n width: canvas.width,\n height: canvas.height\n };\n }\n /** Destroys the system (no-op for canvas). */\n destroy() {\n }\n}\n/** @ignore */\nCanvasTextureSystem.extension = {\n type: [\n ExtensionType.CanvasSystem\n ],\n name: \"texture\"\n};\n\nexport { CanvasTextureSystem };\n//# sourceMappingURL=CanvasTextureSystem.mjs.map\n","import { extensions, ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { CustomRenderPipe } from '../../../scene/container/CustomRenderPipe.mjs';\nimport { RenderGroupPipe } from '../../../scene/container/RenderGroupPipe.mjs';\nimport { CanvasGraphicsAdaptor } from '../../../scene/graphics/canvas/CanvasGraphicsAdaptor.mjs';\nimport { SpritePipe } from '../../../scene/sprite/SpritePipe.mjs';\nimport { CanvasBatchAdaptor } from '../../batcher/canvas/CanvasBatchAdaptor.mjs';\nimport { BatcherPipe } from '../../batcher/shared/BatcherPipe.mjs';\nimport { AlphaMaskPipe } from '../../mask/alpha/AlphaMaskPipe.mjs';\nimport { CanvasColorMaskPipe } from '../../mask/color/CanvasColorMaskPipe.mjs';\nimport { CanvasStencilMaskPipe } from '../../mask/stencil/CanvasStencilMaskPipe.mjs';\nimport { BlendModePipe } from '../shared/blendModes/BlendModePipe.mjs';\nimport { AbstractRenderer } from '../shared/system/AbstractRenderer.mjs';\nimport { SharedSystems } from '../shared/system/SharedSystems.mjs';\nimport { RendererType } from '../types.mjs';\nimport { CanvasContextSystem } from './CanvasContextSystem.mjs';\nimport { CanvasLimitsSystem } from './CanvasLimitsSystem.mjs';\nimport { CanvasRenderTargetSystem } from './renderTarget/CanvasRenderTargetSystem.mjs';\nimport { CanvasTextureSystem } from './texture/CanvasTextureSystem.mjs';\n\n\"use strict\";\nconst DefaultCanvasSystems = [\n ...SharedSystems,\n CanvasContextSystem,\n CanvasLimitsSystem,\n CanvasTextureSystem,\n CanvasRenderTargetSystem\n];\nconst DefaultCanvasPipes = [\n BlendModePipe,\n BatcherPipe,\n SpritePipe,\n RenderGroupPipe,\n AlphaMaskPipe,\n CanvasStencilMaskPipe,\n CanvasColorMaskPipe,\n CustomRenderPipe\n];\nconst DefaultCanvasAdapters = [\n CanvasBatchAdaptor,\n CanvasGraphicsAdaptor\n];\nconst systems = [];\nconst renderPipes = [];\nconst renderPipeAdaptors = [];\nextensions.handleByNamedList(ExtensionType.CanvasSystem, systems);\nextensions.handleByNamedList(ExtensionType.CanvasPipes, renderPipes);\nextensions.handleByNamedList(ExtensionType.CanvasPipesAdaptor, renderPipeAdaptors);\nextensions.add(...DefaultCanvasSystems, ...DefaultCanvasPipes, ...DefaultCanvasAdapters);\nclass CanvasRenderer extends AbstractRenderer {\n constructor() {\n const systemConfig = {\n name: \"canvas\",\n type: RendererType.CANVAS,\n systems,\n renderPipes,\n renderPipeAdaptors\n };\n super(systemConfig);\n }\n}\n\nexport { CanvasRenderer };\n//# sourceMappingURL=CanvasRenderer.mjs.map\n"],"names":["_CanvasBatchAdaptor","buildRoundedRectPath","buildShapePath","addHolePaths","tempMatrix"],"mappings":";;AAQA,MAAM,sBAAsB,MAAMA,qBAAoB;AAAA,EACpD,OAAO,kBAAkB,cAAc,cAAc;AACnD,UAAM,UAAU,gBAAgB,iBAAiB;AACjD,UAAM,UAAU,gBAAgB,iBAAiB;AACjD,QAAI,WAAW,QAAS,QAAO;AAC/B,QAAI,QAAS,QAAO;AACpB,QAAI,QAAS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cAAc,aAAa,WAAW;AACnE,WAAW,kBAAkB,cAAc,oBAAoB,kBAAkB;AACjF,WAAW,IAAI,GAAG,sBAAsB,GAAG,oBAAoB,GAAG,qBAAqB;AACvF,MAAM,uBAAuB,iBAAiB;AAAA,EAC5C,cAAc;AACZ,UAAM,eAAe;AAAA,MACnB,MAAM;AAAA,MACN,MAAM,aAAa;AAAA,MACnB;AAAA,MACA;AAAA,MACA;AAAA,IACN;AACI,UAAM,YAAY;AAAA,EACpB;AACF;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
1
+ {"version":3,"file":"CanvasRenderer-CYJLQIYQ.js","sources":["../node_modules/pixi.js/lib/rendering/batcher/canvas/CanvasBatchAdaptor.mjs","../node_modules/pixi.js/lib/rendering/mask/color/CanvasColorMaskPipe.mjs","../node_modules/pixi.js/lib/rendering/mask/stencil/CanvasStencilMaskPipe.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/utils/mapCanvasBlendModesToPixi.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/CanvasContextSystem.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/CanvasLimitsSystem.mjs","../node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsAdaptor.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/renderTarget/CanvasRenderTargetAdaptor.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/renderTarget/CanvasRenderTargetSystem.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/texture/CanvasTextureSystem.mjs","../node_modules/pixi.js/lib/rendering/renderers/canvas/CanvasRenderer.mjs"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { groupD8 } from '../../../maths/matrix/groupD8.mjs';\nimport { Matrix } from '../../../maths/matrix/Matrix.mjs';\nimport { bgr2rgb } from '../../../scene/container/container-mixins/getGlobalMixin.mjs';\nimport { multiplyHexColors } from '../../../scene/container/utils/multiplyHexColors.mjs';\nimport { canvasUtils } from '../../renderers/canvas/utils/canvasUtils.mjs';\n\n\"use strict\";\nconst _CanvasBatchAdaptor = class _CanvasBatchAdaptor {\n static _getPatternRepeat(addressModeU, addressModeV) {\n const repeatU = addressModeU && addressModeU !== \"clamp-to-edge\";\n const repeatV = addressModeV && addressModeV !== \"clamp-to-edge\";\n if (repeatU && repeatV) return \"repeat\";\n if (repeatU) return \"repeat-x\";\n if (repeatV) return \"repeat-y\";\n return \"no-repeat\";\n }\n start(batchPipe, geometry, shader) {\n void batchPipe;\n void geometry;\n void shader;\n }\n execute(batchPipe, batch) {\n const elements = batch.elements;\n if (!elements || !elements.length) return;\n const renderer = batchPipe.renderer;\n const contextSystem = renderer.canvasContext;\n const context = contextSystem.activeContext;\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n if (!element.packAsQuad) continue;\n const quad = element;\n const texture = quad.texture;\n const source = texture ? canvasUtils.getCanvasSource(texture) : null;\n if (!source) continue;\n const textureStyle = texture.source.style;\n const smoothProperty = contextSystem.smoothProperty;\n const shouldSmooth = textureStyle.scaleMode !== \"nearest\";\n if (context[smoothProperty] !== shouldSmooth) {\n context[smoothProperty] = shouldSmooth;\n }\n contextSystem.setBlendMode(batch.blendMode);\n const globalColor = renderer.globalUniforms.globalUniformData?.worldColor ?? 4294967295;\n const argb = quad.color;\n const globalAlpha = (globalColor >>> 24 & 255) / 255;\n const quadAlpha = (argb >>> 24 & 255) / 255;\n const filterAlpha = renderer.filter?.alphaMultiplier ?? 1;\n const alpha = globalAlpha * quadAlpha * filterAlpha;\n if (alpha <= 0) continue;\n context.globalAlpha = alpha;\n const globalTint = globalColor & 16777215;\n const quadTint = argb & 16777215;\n const tint = bgr2rgb(multiplyHexColors(quadTint, globalTint));\n const frame = texture.frame;\n const repeatU = textureStyle.addressModeU ?? textureStyle.addressMode;\n const repeatV = textureStyle.addressModeV ?? textureStyle.addressMode;\n const repeat = _CanvasBatchAdaptor._getPatternRepeat(repeatU, repeatV);\n const resolution = texture.source._resolution ?? texture.source.resolution ?? 1;\n const isFromCachedRenderGroup = quad.renderable?.renderGroup?.isCachedAsTexture;\n const sx = frame.x * resolution;\n const sy = frame.y * resolution;\n const sw = frame.width * resolution;\n const sh = frame.height * resolution;\n const bounds = quad.bounds;\n const isRootTarget = renderer.renderTarget.renderTarget.isRoot;\n const dx = bounds.minX;\n const dy = bounds.minY;\n const dw = bounds.maxX - bounds.minX;\n const dh = bounds.maxY - bounds.minY;\n const rotate = texture.rotate;\n const uvs = texture.uvs;\n const uvMin = Math.min(uvs.x0, uvs.x1, uvs.x2, uvs.x3, uvs.y0, uvs.y1, uvs.y2, uvs.y3);\n const uvMax = Math.max(uvs.x0, uvs.x1, uvs.x2, uvs.x3, uvs.y0, uvs.y1, uvs.y2, uvs.y3);\n const needsRepeat = repeat !== \"no-repeat\" && (uvMin < 0 || uvMax > 1);\n const willUseProcessedCanvas = !needsRepeat && (tint !== 16777215 || rotate);\n const applyRotateTransform = rotate && !willUseProcessedCanvas;\n if (applyRotateTransform) {\n _CanvasBatchAdaptor._tempPatternMatrix.copyFrom(quad.transform);\n groupD8.matrixAppendRotationInv(\n _CanvasBatchAdaptor._tempPatternMatrix,\n rotate,\n dx,\n dy,\n dw,\n dh\n );\n contextSystem.setContextTransform(\n _CanvasBatchAdaptor._tempPatternMatrix,\n quad.roundPixels === 1,\n void 0,\n isFromCachedRenderGroup && isRootTarget\n );\n } else {\n contextSystem.setContextTransform(\n quad.transform,\n quad.roundPixels === 1,\n void 0,\n isFromCachedRenderGroup && isRootTarget\n );\n }\n const drawX = applyRotateTransform ? 0 : dx;\n const drawY = applyRotateTransform ? 0 : dy;\n const drawW = dw;\n const drawH = dh;\n if (needsRepeat) {\n let patternSource = source;\n const canTint = tint !== 16777215 && !rotate;\n const fitsFrame = frame.width <= texture.source.width && frame.height <= texture.source.height;\n if (canTint && fitsFrame) {\n patternSource = canvasUtils.getTintedCanvas({ texture }, tint);\n }\n const pattern = context.createPattern(patternSource, repeat);\n if (!pattern) continue;\n const denomX = drawW;\n const denomY = drawH;\n if (denomX === 0 || denomY === 0) continue;\n const invDx = 1 / denomX;\n const invDy = 1 / denomY;\n const a = (uvs.x1 - uvs.x0) * invDx;\n const b = (uvs.y1 - uvs.y0) * invDx;\n const c = (uvs.x3 - uvs.x0) * invDy;\n const d = (uvs.y3 - uvs.y0) * invDy;\n const tx = uvs.x0 - a * drawX - c * drawY;\n const ty = uvs.y0 - b * drawX - d * drawY;\n const pixelWidth = texture.source.pixelWidth;\n const pixelHeight = texture.source.pixelHeight;\n _CanvasBatchAdaptor._tempPatternMatrix.set(\n a * pixelWidth,\n b * pixelHeight,\n c * pixelWidth,\n d * pixelHeight,\n tx * pixelWidth,\n ty * pixelHeight\n );\n canvasUtils.applyPatternTransform(pattern, _CanvasBatchAdaptor._tempPatternMatrix);\n context.fillStyle = pattern;\n context.fillRect(drawX, drawY, drawW, drawH);\n } else {\n const needsProcessing = tint !== 16777215 || rotate;\n const processedSource = needsProcessing ? canvasUtils.getTintedCanvas({ texture }, tint) : source;\n const isProcessed = processedSource !== source;\n context.drawImage(\n processedSource,\n isProcessed ? 0 : sx,\n isProcessed ? 0 : sy,\n isProcessed ? processedSource.width : sw,\n isProcessed ? processedSource.height : sh,\n drawX,\n drawY,\n drawW,\n drawH\n );\n }\n }\n }\n};\n_CanvasBatchAdaptor._tempPatternMatrix = new Matrix();\n/** @ignore */\n_CanvasBatchAdaptor.extension = {\n type: [\n ExtensionType.CanvasPipesAdaptor\n ],\n name: \"batch\"\n};\nlet CanvasBatchAdaptor = _CanvasBatchAdaptor;\n\nexport { CanvasBatchAdaptor };\n//# sourceMappingURL=CanvasBatchAdaptor.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\n\n\"use strict\";\nclass CanvasColorMaskPipe {\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 this._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 this._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 }\n destroy() {\n this._renderer = null;\n this._colorStack = null;\n }\n}\n/** @ignore */\nCanvasColorMaskPipe.extension = {\n type: [\n ExtensionType.CanvasPipes\n ],\n name: \"colorMask\"\n};\n\nexport { CanvasColorMaskPipe };\n//# sourceMappingURL=CanvasColorMaskPipe.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { Graphics } from '../../../scene/graphics/shared/Graphics.mjs';\nimport { warn } from '../../../utils/logging/warn.mjs';\n\n\"use strict\";\nfunction buildRoundedRectPath(context, x, y, width, height, radius) {\n radius = Math.max(0, Math.min(radius, Math.min(width, height) / 2));\n context.moveTo(x + radius, y);\n context.lineTo(x + width - radius, y);\n context.quadraticCurveTo(x + width, y, x + width, y + radius);\n context.lineTo(x + width, y + height - radius);\n context.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\n context.lineTo(x + radius, y + height);\n context.quadraticCurveTo(x, y + height, x, y + height - radius);\n context.lineTo(x, y + radius);\n context.quadraticCurveTo(x, y, x + radius, y);\n}\nfunction buildShapePath(context, shape) {\n switch (shape.type) {\n case \"rectangle\": {\n const rect = shape;\n context.rect(rect.x, rect.y, rect.width, rect.height);\n break;\n }\n case \"roundedRectangle\": {\n const rect = shape;\n buildRoundedRectPath(context, rect.x, rect.y, rect.width, rect.height, rect.radius);\n break;\n }\n case \"circle\": {\n const circle = shape;\n context.moveTo(circle.x + circle.radius, circle.y);\n context.arc(circle.x, circle.y, circle.radius, 0, Math.PI * 2);\n break;\n }\n case \"ellipse\": {\n const ellipse = shape;\n if (context.ellipse) {\n context.moveTo(ellipse.x + ellipse.halfWidth, ellipse.y);\n context.ellipse(ellipse.x, ellipse.y, ellipse.halfWidth, ellipse.halfHeight, 0, 0, Math.PI * 2);\n } else {\n context.save();\n context.translate(ellipse.x, ellipse.y);\n context.scale(ellipse.halfWidth, ellipse.halfHeight);\n context.moveTo(1, 0);\n context.arc(0, 0, 1, 0, Math.PI * 2);\n context.restore();\n }\n break;\n }\n case \"triangle\": {\n const tri = shape;\n context.moveTo(tri.x, tri.y);\n context.lineTo(tri.x2, tri.y2);\n context.lineTo(tri.x3, tri.y3);\n context.closePath();\n break;\n }\n case \"polygon\":\n default: {\n const poly = shape;\n const points = poly.points;\n if (!points?.length) break;\n context.moveTo(points[0], points[1]);\n for (let i = 2; i < points.length; i += 2) {\n context.lineTo(points[i], points[i + 1]);\n }\n if (poly.closePath) {\n context.closePath();\n }\n break;\n }\n }\n}\nfunction addHolePaths(context, holes) {\n if (!holes?.length) return false;\n for (let i = 0; i < holes.length; i++) {\n const hole = holes[i];\n if (!hole?.shape) continue;\n const transform = hole.transform;\n const hasTransform = transform && !transform.isIdentity();\n if (hasTransform) {\n context.save();\n context.transform(transform.a, transform.b, transform.c, transform.d, transform.tx, transform.ty);\n }\n buildShapePath(context, hole.shape);\n if (hasTransform) {\n context.restore();\n }\n }\n return true;\n}\nclass CanvasStencilMaskPipe {\n constructor(renderer) {\n this._warnedMaskTypes = /* @__PURE__ */ new Set();\n this._canvasMaskStack = [];\n this._renderer = renderer;\n }\n push(mask, _container, instructionSet) {\n this._renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add({\n renderPipeId: \"stencilMask\",\n action: \"pushMaskBegin\",\n mask,\n inverse: _container._maskOptions.inverse,\n canBundle: false\n });\n }\n pop(_mask, _container, instructionSet) {\n this._renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add({\n renderPipeId: \"stencilMask\",\n action: \"popMaskEnd\",\n mask: _mask,\n inverse: _container._maskOptions.inverse,\n canBundle: false\n });\n }\n execute(instruction) {\n if (instruction.action !== \"pushMaskBegin\" && instruction.action !== \"popMaskEnd\") {\n return;\n }\n const canvasRenderer = this._renderer;\n const contextSystem = canvasRenderer.canvasContext;\n const context = contextSystem?.activeContext;\n if (!context) return;\n if (instruction.action === \"popMaskEnd\") {\n const didClip = this._canvasMaskStack.pop();\n if (didClip) {\n context.restore();\n }\n return;\n }\n if (instruction.inverse) {\n this._warnOnce(\n \"inverse\",\n \"CanvasRenderer: inverse masks are not supported on Canvas2D; ignoring inverse flag.\"\n );\n }\n const maskContainer = instruction.mask.mask;\n if (!(maskContainer instanceof Graphics)) {\n this._warnOnce(\n \"nonGraphics\",\n \"CanvasRenderer: only Graphics masks are supported in Canvas2D; skipping mask.\"\n );\n this._canvasMaskStack.push(false);\n return;\n }\n const graphics = maskContainer;\n const instructions = graphics.context?.instructions;\n if (!instructions?.length) {\n this._canvasMaskStack.push(false);\n return;\n }\n context.save();\n contextSystem.setContextTransform(\n graphics.groupTransform,\n (canvasRenderer._roundPixels | graphics._roundPixels) === 1\n );\n context.beginPath();\n let drewPath = false;\n let hasHoles = false;\n for (let i = 0; i < instructions.length; i++) {\n const instructionData = instructions[i];\n const action = instructionData.action;\n if (action !== \"fill\" && action !== \"stroke\") continue;\n const data = instructionData.data;\n const shapePath = data?.path?.shapePath;\n if (!shapePath?.shapePrimitives?.length) continue;\n const shapePrimitives = shapePath.shapePrimitives;\n for (let j = 0; j < shapePrimitives.length; j++) {\n const primitive = shapePrimitives[j];\n if (!primitive?.shape) continue;\n const transform = primitive.transform;\n const hasTransform = transform && !transform.isIdentity();\n if (hasTransform) {\n context.save();\n context.transform(transform.a, transform.b, transform.c, transform.d, transform.tx, transform.ty);\n }\n buildShapePath(context, primitive.shape);\n hasHoles = addHolePaths(context, primitive.holes) || hasHoles;\n drewPath = true;\n if (hasTransform) {\n context.restore();\n }\n }\n }\n if (!drewPath) {\n context.restore();\n this._canvasMaskStack.push(false);\n return;\n }\n if (hasHoles) {\n context.clip(\"evenodd\");\n } else {\n context.clip();\n }\n this._canvasMaskStack.push(true);\n }\n destroy() {\n this._renderer = null;\n this._warnedMaskTypes = null;\n this._canvasMaskStack = null;\n }\n _warnOnce(key, message) {\n if (this._warnedMaskTypes.has(key)) return;\n this._warnedMaskTypes.add(key);\n warn(message);\n }\n}\nCanvasStencilMaskPipe.extension = {\n type: [\n ExtensionType.CanvasPipes\n ],\n name: \"stencilMask\"\n};\n\nexport { CanvasStencilMaskPipe };\n//# sourceMappingURL=CanvasStencilMaskPipe.mjs.map\n","import { canUseNewCanvasBlendModes } from './canUseNewCanvasBlendModes.mjs';\n\n\"use strict\";\nconst FALLBACK_BLEND = \"source-over\";\nfunction mapCanvasBlendModesToPixi() {\n const supportsAdvanced = canUseNewCanvasBlendModes();\n const map = /* @__PURE__ */ Object.create(null);\n map.inherit = FALLBACK_BLEND;\n map.none = FALLBACK_BLEND;\n map.normal = \"source-over\";\n map.add = \"lighter\";\n map.multiply = supportsAdvanced ? \"multiply\" : FALLBACK_BLEND;\n map.screen = supportsAdvanced ? \"screen\" : FALLBACK_BLEND;\n map.overlay = supportsAdvanced ? \"overlay\" : FALLBACK_BLEND;\n map.darken = supportsAdvanced ? \"darken\" : FALLBACK_BLEND;\n map.lighten = supportsAdvanced ? \"lighten\" : FALLBACK_BLEND;\n map[\"color-dodge\"] = supportsAdvanced ? \"color-dodge\" : FALLBACK_BLEND;\n map[\"color-burn\"] = supportsAdvanced ? \"color-burn\" : FALLBACK_BLEND;\n map[\"hard-light\"] = supportsAdvanced ? \"hard-light\" : FALLBACK_BLEND;\n map[\"soft-light\"] = supportsAdvanced ? \"soft-light\" : FALLBACK_BLEND;\n map.difference = supportsAdvanced ? \"difference\" : FALLBACK_BLEND;\n map.exclusion = supportsAdvanced ? \"exclusion\" : FALLBACK_BLEND;\n map.saturation = supportsAdvanced ? \"saturation\" : FALLBACK_BLEND;\n map.color = supportsAdvanced ? \"color\" : FALLBACK_BLEND;\n map.luminosity = supportsAdvanced ? \"luminosity\" : FALLBACK_BLEND;\n map[\"linear-burn\"] = supportsAdvanced ? \"color-burn\" : FALLBACK_BLEND;\n map[\"linear-dodge\"] = supportsAdvanced ? \"color-dodge\" : FALLBACK_BLEND;\n map[\"linear-light\"] = supportsAdvanced ? \"hard-light\" : FALLBACK_BLEND;\n map[\"pin-light\"] = supportsAdvanced ? \"hard-light\" : FALLBACK_BLEND;\n map[\"vivid-light\"] = supportsAdvanced ? \"hard-light\" : FALLBACK_BLEND;\n map[\"hard-mix\"] = FALLBACK_BLEND;\n map.negation = supportsAdvanced ? \"difference\" : FALLBACK_BLEND;\n map[\"normal-npm\"] = map.normal;\n map[\"add-npm\"] = map.add;\n map[\"screen-npm\"] = map.screen;\n map.erase = \"destination-out\";\n map.subtract = FALLBACK_BLEND;\n map.divide = FALLBACK_BLEND;\n map.min = FALLBACK_BLEND;\n map.max = FALLBACK_BLEND;\n return map;\n}\n\nexport { mapCanvasBlendModesToPixi };\n//# sourceMappingURL=mapCanvasBlendModesToPixi.mjs.map\n","import { Color } from '../../../color/Color.mjs';\nimport { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { Matrix } from '../../../maths/matrix/Matrix.mjs';\nimport { mapCanvasBlendModesToPixi } from './utils/mapCanvasBlendModesToPixi.mjs';\n\n\"use strict\";\nconst tempMatrix = new Matrix();\nclass CanvasContextSystem {\n /**\n * @param renderer - The owning CanvasRenderer.\n */\n constructor(renderer) {\n /** Resolution of the active context. */\n this.activeResolution = 1;\n /** The image smoothing property to toggle for this browser. */\n this.smoothProperty = \"imageSmoothingEnabled\";\n /** Map of Pixi blend modes to canvas composite operations. */\n this.blendModes = mapCanvasBlendModesToPixi();\n /** Current canvas blend mode. */\n this._activeBlendMode = \"normal\";\n /** Optional projection transform for render targets. */\n this._projTransform = null;\n /** True when external blend mode control is in use. */\n this._outerBlend = false;\n /** Tracks unsupported blend mode warnings to avoid spam. */\n this._warnedBlendModes = /* @__PURE__ */ new Set();\n this._renderer = renderer;\n }\n resolutionChange(resolution) {\n this.activeResolution = resolution;\n }\n /** Initializes the root context and smoothing flag selection. */\n init() {\n const alpha = this._renderer.background.alpha < 1;\n this.rootContext = this._renderer.canvas.getContext(\n \"2d\",\n { alpha }\n );\n this.activeContext = this.rootContext;\n this.activeResolution = this._renderer.resolution;\n if (!this.rootContext.imageSmoothingEnabled) {\n const rc = this.rootContext;\n if (rc.webkitImageSmoothingEnabled) {\n this.smoothProperty = \"webkitImageSmoothingEnabled\";\n } else if (rc.mozImageSmoothingEnabled) {\n this.smoothProperty = \"mozImageSmoothingEnabled\";\n } else if (rc.oImageSmoothingEnabled) {\n this.smoothProperty = \"oImageSmoothingEnabled\";\n } else if (rc.msImageSmoothingEnabled) {\n this.smoothProperty = \"msImageSmoothingEnabled\";\n }\n }\n }\n /**\n * Sets the current transform on the active context.\n * @param transform - Transform to apply.\n * @param roundPixels - Whether to round translation to integers.\n * @param localResolution - Optional local resolution multiplier.\n * @param skipGlobalTransform - If true, skip applying the global world transform matrix.\n */\n setContextTransform(transform, roundPixels, localResolution, skipGlobalTransform) {\n const globalTransform = skipGlobalTransform ? Matrix.IDENTITY : this._renderer.globalUniforms.globalUniformData?.worldTransformMatrix || Matrix.IDENTITY;\n let mat = tempMatrix;\n mat.copyFrom(globalTransform);\n mat.append(transform);\n const proj = this._projTransform;\n const contextResolution = this.activeResolution;\n localResolution = localResolution || contextResolution;\n if (proj) {\n const finalMat = Matrix.shared;\n finalMat.copyFrom(mat);\n finalMat.prepend(proj);\n mat = finalMat;\n }\n if (roundPixels) {\n this.activeContext.setTransform(\n mat.a * localResolution,\n mat.b * localResolution,\n mat.c * localResolution,\n mat.d * localResolution,\n mat.tx * contextResolution | 0,\n mat.ty * contextResolution | 0\n );\n } else {\n this.activeContext.setTransform(\n mat.a * localResolution,\n mat.b * localResolution,\n mat.c * localResolution,\n mat.d * localResolution,\n mat.tx * contextResolution,\n mat.ty * contextResolution\n );\n }\n }\n /**\n * Clears the current render target, optionally filling with a color.\n * @param clearColor - Color to fill after clearing.\n * @param alpha - Alpha override for the clear color.\n */\n clear(clearColor, alpha) {\n const context = this.activeContext;\n const renderer = this._renderer;\n context.clearRect(0, 0, renderer.width, renderer.height);\n if (clearColor) {\n const color = Color.shared.setValue(clearColor);\n context.globalAlpha = alpha ?? color.alpha;\n context.fillStyle = color.toHex();\n context.fillRect(0, 0, renderer.width, renderer.height);\n context.globalAlpha = 1;\n }\n }\n /**\n * Sets the active blend mode.\n * @param blendMode - Pixi blend mode.\n */\n setBlendMode(blendMode) {\n if (this._activeBlendMode === blendMode) return;\n this._activeBlendMode = blendMode;\n this._outerBlend = false;\n const mappedBlend = this.blendModes[blendMode];\n if (!mappedBlend) {\n if (!this._warnedBlendModes.has(blendMode)) {\n console.warn(\n `CanvasRenderer: blend mode \"${blendMode}\" is not supported in Canvas2D; falling back to \"source-over\".`\n );\n this._warnedBlendModes.add(blendMode);\n }\n this.activeContext.globalCompositeOperation = \"source-over\";\n return;\n }\n this.activeContext.globalCompositeOperation = mappedBlend;\n }\n /** Releases context references. */\n destroy() {\n this.rootContext = null;\n this.activeContext = null;\n this._warnedBlendModes.clear();\n }\n}\n/** @ignore */\nCanvasContextSystem.extension = {\n type: [\n ExtensionType.CanvasSystem\n ],\n name: \"canvasContext\"\n};\n\nexport { CanvasContextSystem };\n//# sourceMappingURL=CanvasContextSystem.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\n\n\"use strict\";\nclass CanvasLimitsSystem {\n constructor() {\n this.maxTextures = 16;\n this.maxBatchableTextures = 16;\n this.maxUniformBindings = 0;\n }\n init() {\n }\n}\n/** @ignore */\nCanvasLimitsSystem.extension = {\n type: [\n ExtensionType.CanvasSystem\n ],\n name: \"limits\"\n};\n\nexport { CanvasLimitsSystem };\n//# sourceMappingURL=CanvasLimitsSystem.mjs.map\n","import { ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { groupD8 } from '../../../maths/matrix/groupD8.mjs';\nimport { Matrix } from '../../../maths/matrix/Matrix.mjs';\nimport { canvasUtils } from '../../../rendering/renderers/canvas/utils/canvasUtils.mjs';\nimport { Texture } from '../../../rendering/renderers/shared/texture/Texture.mjs';\nimport { bgr2rgb } from '../../container/container-mixins/getGlobalMixin.mjs';\nimport { multiplyHexColors } from '../../container/utils/multiplyHexColors.mjs';\nimport { buildLine } from '../shared/buildCommands/buildLine.mjs';\nimport { FillGradient } from '../shared/fill/FillGradient.mjs';\nimport { FillPattern } from '../shared/fill/FillPattern.mjs';\nimport { shapeBuilders } from '../shared/utils/buildContextBatches.mjs';\nimport { generateTextureMatrix } from '../shared/utils/generateTextureFillMatrix.mjs';\n\n\"use strict\";\nconst emptyCanvasStyle = \"#808080\";\nconst tempMatrix = new Matrix();\nconst tempTextureMatrix = new Matrix();\nconst tempGradientMatrix = new Matrix();\nconst tempPatternMatrix = new Matrix();\nfunction fillTriangles(context, vertices, indices) {\n context.beginPath();\n for (let i = 0; i < indices.length; i += 3) {\n const i0 = indices[i] * 2;\n const i1 = indices[i + 1] * 2;\n const i2 = indices[i + 2] * 2;\n context.moveTo(vertices[i0], vertices[i0 + 1]);\n context.lineTo(vertices[i1], vertices[i1 + 1]);\n context.lineTo(vertices[i2], vertices[i2 + 1]);\n context.closePath();\n }\n context.fill();\n}\nfunction colorToHex(color) {\n const clamped = color & 16777215;\n return `#${clamped.toString(16).padStart(6, \"0\")}`;\n}\nfunction buildRoundedRectPath(context, x, y, width, height, radius) {\n radius = Math.max(0, Math.min(radius, Math.min(width, height) / 2));\n context.moveTo(x + radius, y);\n context.lineTo(x + width - radius, y);\n context.quadraticCurveTo(x + width, y, x + width, y + radius);\n context.lineTo(x + width, y + height - radius);\n context.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\n context.lineTo(x + radius, y + height);\n context.quadraticCurveTo(x, y + height, x, y + height - radius);\n context.lineTo(x, y + radius);\n context.quadraticCurveTo(x, y, x + radius, y);\n}\nfunction buildShapePath(context, shape) {\n switch (shape.type) {\n case \"rectangle\": {\n const rect = shape;\n context.rect(rect.x, rect.y, rect.width, rect.height);\n break;\n }\n case \"roundedRectangle\": {\n const rect = shape;\n buildRoundedRectPath(context, rect.x, rect.y, rect.width, rect.height, rect.radius);\n break;\n }\n case \"circle\": {\n const circle = shape;\n context.arc(circle.x, circle.y, circle.radius, 0, Math.PI * 2);\n break;\n }\n case \"ellipse\": {\n const ellipse = shape;\n if (context.ellipse) {\n context.ellipse(ellipse.x, ellipse.y, ellipse.halfWidth, ellipse.halfHeight, 0, 0, Math.PI * 2);\n } else {\n context.save();\n context.translate(ellipse.x, ellipse.y);\n context.scale(ellipse.halfWidth, ellipse.halfHeight);\n context.arc(0, 0, 1, 0, Math.PI * 2);\n context.restore();\n }\n break;\n }\n case \"triangle\": {\n const tri = shape;\n context.moveTo(tri.x, tri.y);\n context.lineTo(tri.x2, tri.y2);\n context.lineTo(tri.x3, tri.y3);\n context.closePath();\n break;\n }\n case \"polygon\":\n default: {\n const poly = shape;\n const points = poly.points;\n if (!points?.length) break;\n context.moveTo(points[0], points[1]);\n for (let i = 2; i < points.length; i += 2) {\n context.lineTo(points[i], points[i + 1]);\n }\n if (poly.closePath) {\n context.closePath();\n }\n break;\n }\n }\n}\nfunction addHolePaths(context, holes) {\n if (!holes?.length) return false;\n for (let i = 0; i < holes.length; i++) {\n const hole = holes[i];\n if (!hole?.shape) continue;\n const transform = hole.transform;\n const hasTransform = transform && !transform.isIdentity();\n if (hasTransform) {\n context.save();\n context.transform(transform.a, transform.b, transform.c, transform.d, transform.tx, transform.ty);\n }\n buildShapePath(context, hole.shape);\n if (hasTransform) {\n context.restore();\n }\n }\n return true;\n}\nfunction getCanvasStyle(style, tint, textureMatrix, currentTransform) {\n const fill = style.fill;\n if (fill instanceof FillGradient) {\n fill.buildGradient();\n const gradientTexture = fill.texture;\n if (gradientTexture) {\n const pattern = canvasUtils.getTintedPattern(gradientTexture, tint);\n const patternMatrix = textureMatrix ? tempPatternMatrix.copyFrom(textureMatrix).scale(gradientTexture.source.pixelWidth, gradientTexture.source.pixelHeight) : tempPatternMatrix.copyFrom(fill.transform);\n if (currentTransform && !style.textureSpace) {\n patternMatrix.append(currentTransform);\n }\n canvasUtils.applyPatternTransform(pattern, patternMatrix);\n return pattern;\n }\n }\n if (fill instanceof FillPattern) {\n const pattern = canvasUtils.getTintedPattern(fill.texture, tint);\n canvasUtils.applyPatternTransform(pattern, fill.transform);\n return pattern;\n }\n const texture = style.texture;\n if (texture && texture !== Texture.WHITE) {\n if (!texture.source.resource) {\n return emptyCanvasStyle;\n }\n const pattern = canvasUtils.getTintedPattern(texture, tint);\n const patternMatrix = textureMatrix ? tempPatternMatrix.copyFrom(textureMatrix).scale(texture.source.pixelWidth, texture.source.pixelHeight) : style.matrix;\n canvasUtils.applyPatternTransform(pattern, patternMatrix);\n return pattern;\n }\n return colorToHex(tint);\n}\nclass CanvasGraphicsAdaptor {\n constructor() {\n this.shader = null;\n }\n contextChange(renderer) {\n void renderer;\n }\n execute(graphicsPipe, renderable) {\n const renderer = graphicsPipe.renderer;\n const contextSystem = renderer.canvasContext;\n const context = contextSystem.activeContext;\n const baseTransform = renderable.groupTransform;\n const globalColor = renderer.globalUniforms.globalUniformData?.worldColor ?? 4294967295;\n const groupColorAlpha = renderable.groupColorAlpha;\n const globalAlpha = (globalColor >>> 24 & 255) / 255;\n const groupAlphaValue = (groupColorAlpha >>> 24 & 255) / 255;\n const filterAlpha = renderer.filter?.alphaMultiplier ?? 1;\n const groupAlpha = globalAlpha * groupAlphaValue * filterAlpha;\n if (groupAlpha <= 0) return;\n const globalTint = globalColor & 16777215;\n const groupTintBGR = groupColorAlpha & 16777215;\n const groupTint = bgr2rgb(multiplyHexColors(groupTintBGR, globalTint));\n const roundPixels = renderer._roundPixels | renderable._roundPixels;\n context.save();\n contextSystem.setContextTransform(baseTransform, roundPixels === 1);\n contextSystem.setBlendMode(renderable.groupBlendMode);\n const instructions = renderable.context.instructions;\n for (let i = 0; i < instructions.length; i++) {\n const instruction = instructions[i];\n if (instruction.action === \"texture\") {\n const data2 = instruction.data;\n const texture = data2.image;\n const source = texture ? canvasUtils.getCanvasSource(texture) : null;\n if (!source) continue;\n const alpha2 = data2.alpha * groupAlpha;\n if (alpha2 <= 0) continue;\n const tint2 = multiplyHexColors(data2.style, groupTint);\n context.globalAlpha = alpha2;\n let drawSource = source;\n if (tint2 !== 16777215) {\n drawSource = canvasUtils.getTintedCanvas({ texture }, tint2);\n }\n const frame = texture.frame;\n const resolution = texture.source._resolution ?? texture.source.resolution ?? 1;\n let sx = frame.x * resolution;\n let sy = frame.y * resolution;\n const sw = frame.width * resolution;\n const sh = frame.height * resolution;\n if (drawSource !== source) {\n sx = 0;\n sy = 0;\n }\n const transform = data2.transform;\n const hasTransform = transform && !transform.isIdentity();\n const rotate = texture.rotate;\n if (hasTransform || rotate) {\n tempMatrix.copyFrom(baseTransform);\n if (hasTransform) {\n tempMatrix.append(transform);\n }\n if (rotate) {\n groupD8.matrixAppendRotationInv(tempMatrix, rotate, data2.dx, data2.dy, data2.dw, data2.dh);\n }\n contextSystem.setContextTransform(tempMatrix, roundPixels === 1);\n } else {\n contextSystem.setContextTransform(baseTransform, roundPixels === 1);\n }\n context.drawImage(\n drawSource,\n sx,\n sy,\n drawSource === source ? sw : drawSource.width,\n drawSource === source ? sh : drawSource.height,\n rotate ? 0 : data2.dx,\n rotate ? 0 : data2.dy,\n data2.dw,\n data2.dh\n );\n if (hasTransform || rotate) {\n contextSystem.setContextTransform(baseTransform, roundPixels === 1);\n }\n continue;\n }\n const data = instruction.data;\n const shapePath = data?.path?.shapePath;\n if (!shapePath?.shapePrimitives?.length) continue;\n const style = data.style;\n const tint = multiplyHexColors(style.color, groupTint);\n const alpha = style.alpha * groupAlpha;\n if (alpha <= 0) continue;\n const isStroke = instruction.action === \"stroke\";\n context.globalAlpha = alpha;\n if (isStroke) {\n const strokeStyle = style;\n context.lineWidth = strokeStyle.width;\n context.lineCap = strokeStyle.cap;\n context.lineJoin = strokeStyle.join;\n context.miterLimit = strokeStyle.miterLimit;\n }\n const shapePrimitives = shapePath.shapePrimitives;\n if (!isStroke && data.hole?.shapePath?.shapePrimitives?.length) {\n const lastShape = shapePrimitives[shapePrimitives.length - 1];\n lastShape.holes = data.hole.shapePath.shapePrimitives;\n }\n for (let j = 0; j < shapePrimitives.length; j++) {\n const primitive = shapePrimitives[j];\n if (!primitive?.shape) continue;\n const transform = primitive.transform;\n const hasTransform = transform && !transform.isIdentity();\n const hasTexture = style.texture && style.texture !== Texture.WHITE;\n const textureTransform = style.textureSpace === \"global\" ? transform : null;\n const textureMatrix = hasTexture ? generateTextureMatrix(tempTextureMatrix, style, primitive.shape, textureTransform) : null;\n const currentTransform = hasTransform ? tempGradientMatrix.copyFrom(baseTransform).append(transform) : baseTransform;\n const canvasStyle = getCanvasStyle(\n style,\n tint,\n textureMatrix,\n currentTransform\n );\n if (hasTransform) {\n context.save();\n context.transform(transform.a, transform.b, transform.c, transform.d, transform.tx, transform.ty);\n }\n if (isStroke) {\n const strokeStyle = style;\n const useStrokeGeometry = strokeStyle.alignment !== 0.5 && !strokeStyle.pixelLine;\n if (useStrokeGeometry) {\n const points = [];\n const vertices = [];\n const indices = [];\n const shapeBuilder = shapeBuilders[primitive.shape.type];\n if (shapeBuilder?.build(primitive.shape, points)) {\n const close = primitive.shape.closePath ?? true;\n buildLine(points, strokeStyle, false, close, vertices, indices);\n context.fillStyle = canvasStyle;\n fillTriangles(context, vertices, indices);\n } else {\n context.strokeStyle = canvasStyle;\n context.beginPath();\n buildShapePath(context, primitive.shape);\n context.stroke();\n }\n } else {\n context.strokeStyle = canvasStyle;\n context.beginPath();\n buildShapePath(context, primitive.shape);\n context.stroke();\n }\n } else {\n context.fillStyle = canvasStyle;\n context.beginPath();\n buildShapePath(context, primitive.shape);\n const hasHoles = addHolePaths(context, primitive.holes);\n if (hasHoles) {\n context.fill(\"evenodd\");\n } else {\n context.fill();\n }\n }\n if (hasTransform) {\n context.restore();\n }\n }\n }\n context.restore();\n }\n destroy() {\n this.shader = null;\n }\n}\n/** @ignore */\nCanvasGraphicsAdaptor.extension = {\n type: [\n ExtensionType.CanvasPipesAdaptor\n ],\n name: \"graphics\"\n};\n\nexport { CanvasGraphicsAdaptor };\n//# sourceMappingURL=CanvasGraphicsAdaptor.mjs.map\n","import { Color } from '../../../../color/Color.mjs';\nimport { DOMAdapter } from '../../../../environment/adapter.mjs';\nimport { CanvasSource } from '../../shared/texture/sources/CanvasSource.mjs';\n\n\"use strict\";\nclass CanvasRenderTargetAdaptor {\n /**\n * Initializes the adaptor.\n * @param renderer - Canvas renderer instance.\n * @param renderTargetSystem - The render target system.\n * @advanced\n */\n init(renderer, renderTargetSystem) {\n this._renderer = renderer;\n this._renderTargetSystem = renderTargetSystem;\n }\n /**\n * Creates a GPU render target for canvas.\n * @param renderTarget - Render target to initialize.\n * @advanced\n */\n initGpuRenderTarget(renderTarget) {\n const colorTexture = renderTarget.colorTexture;\n const { canvas, context } = this._ensureCanvas(colorTexture);\n return {\n canvas,\n context,\n width: canvas.width,\n height: canvas.height\n };\n }\n /**\n * Resizes the backing canvas for a render target.\n * @param renderTarget - Render target to resize.\n * @advanced\n */\n resizeGpuRenderTarget(renderTarget) {\n const colorTexture = renderTarget.colorTexture;\n const { canvas } = this._ensureCanvas(colorTexture);\n canvas.width = renderTarget.pixelWidth;\n canvas.height = renderTarget.pixelHeight;\n }\n /**\n * Starts a render pass on the canvas target.\n * @param renderTarget - Target to render to.\n * @param clear - Clear mode.\n * @param clearColor - Optional clear color.\n * @param viewport - Optional viewport.\n * @advanced\n */\n startRenderPass(renderTarget, clear, clearColor, viewport) {\n const gpuRenderTarget = this._renderTargetSystem.getGpuRenderTarget(renderTarget);\n this._renderer.canvasContext.activeContext = gpuRenderTarget.context;\n this._renderer.canvasContext.activeResolution = renderTarget.resolution;\n if (clear) {\n this.clear(renderTarget, clear, clearColor, viewport);\n }\n }\n /**\n * Clears the render target.\n * @param renderTarget - Target to clear.\n * @param _clear - Clear mode (unused).\n * @param clearColor - Optional clear color.\n * @param viewport - Optional viewport rectangle.\n * @advanced\n */\n clear(renderTarget, _clear, clearColor, viewport) {\n const gpuRenderTarget = this._renderTargetSystem.getGpuRenderTarget(renderTarget);\n const context = gpuRenderTarget.context;\n const bounds = viewport || { x: 0, y: 0, width: renderTarget.pixelWidth, height: renderTarget.pixelHeight };\n context.setTransform(1, 0, 0, 1, 0, 0);\n context.clearRect(bounds.x, bounds.y, bounds.width, bounds.height);\n if (clearColor) {\n const color = Color.shared.setValue(clearColor);\n if (color.alpha > 0) {\n context.globalAlpha = color.alpha;\n context.fillStyle = color.toHex();\n context.fillRect(bounds.x, bounds.y, bounds.width, bounds.height);\n context.globalAlpha = 1;\n }\n }\n }\n /**\n * Finishes the render pass (no-op for canvas).\n * @advanced\n */\n finishRenderPass() {\n }\n /**\n * Copies a render target into a texture source.\n * @param {RenderTarget} sourceRenderSurfaceTexture - Source render target.\n * @param {Texture} destinationTexture - Destination texture.\n * @param {object} originSrc - Source origin.\n * @param {number} originSrc.x - Source x origin.\n * @param {number} originSrc.y - Source y origin.\n * @param {object} size - Copy size.\n * @param {number} size.width - Copy width.\n * @param {number} size.height - Copy height.\n * @param {object} [originDest] - Destination origin.\n * @param {number} originDest.x - Destination x origin.\n * @param {number} originDest.y - Destination y origin.\n * @advanced\n */\n copyToTexture(sourceRenderSurfaceTexture, destinationTexture, originSrc, size, originDest) {\n const sourceGpuTarget = this._renderTargetSystem.getGpuRenderTarget(sourceRenderSurfaceTexture);\n const sourceCanvas = sourceGpuTarget.canvas;\n const destSource = destinationTexture.source;\n const { context } = this._ensureCanvas(destSource);\n const dx = originDest?.x ?? 0;\n const dy = originDest?.y ?? 0;\n context.drawImage(\n sourceCanvas,\n originSrc.x,\n originSrc.y,\n size.width,\n size.height,\n dx,\n dy,\n size.width,\n size.height\n );\n destSource.update();\n return destinationTexture;\n }\n /**\n * Destroys a GPU render target (no-op for canvas).\n * @param _gpuRenderTarget - Target to destroy.\n * @advanced\n */\n destroyGpuRenderTarget(_gpuRenderTarget) {\n }\n _ensureCanvas(source) {\n let canvas = source.resource;\n if (!canvas || !CanvasSource.test(canvas)) {\n canvas = DOMAdapter.get().createCanvas(source.pixelWidth, source.pixelHeight);\n source.resource = canvas;\n }\n if (canvas.width !== source.pixelWidth || canvas.height !== source.pixelHeight) {\n canvas.width = source.pixelWidth;\n canvas.height = source.pixelHeight;\n }\n const context = canvas.getContext(\"2d\");\n return { canvas, context };\n }\n}\n\nexport { CanvasRenderTargetAdaptor };\n//# sourceMappingURL=CanvasRenderTargetAdaptor.mjs.map\n","import { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { RenderTargetSystem } from '../../shared/renderTarget/RenderTargetSystem.mjs';\nimport { CanvasRenderTargetAdaptor } from './CanvasRenderTargetAdaptor.mjs';\n\n\"use strict\";\nclass CanvasRenderTargetSystem extends RenderTargetSystem {\n constructor(renderer) {\n super(renderer);\n this.adaptor = new CanvasRenderTargetAdaptor();\n this.adaptor.init(renderer, this);\n }\n}\n/** @ignore */\nCanvasRenderTargetSystem.extension = {\n type: [ExtensionType.CanvasSystem],\n name: \"renderTarget\"\n};\n\nexport { CanvasRenderTargetSystem };\n//# sourceMappingURL=CanvasRenderTargetSystem.mjs.map\n","import { DOMAdapter } from '../../../../environment/adapter.mjs';\nimport { ExtensionType } from '../../../../extensions/Extensions.mjs';\nimport { canvasUtils } from '../utils/canvasUtils.mjs';\n\n\"use strict\";\nclass CanvasTextureSystem {\n /**\n * @param renderer - The owning CanvasRenderer.\n */\n constructor(renderer) {\n void renderer;\n }\n /** Initializes the system (no-op for canvas). */\n init() {\n }\n /**\n * Initializes a texture source (no-op for canvas).\n * @param _source - Texture source.\n */\n initSource(_source) {\n }\n /**\n * Creates a canvas containing the texture's frame.\n * @param texture - Texture to render.\n */\n generateCanvas(texture) {\n const canvas = DOMAdapter.get().createCanvas();\n const context = canvas.getContext(\"2d\");\n const source = canvasUtils.getCanvasSource(texture);\n if (!source) {\n return canvas;\n }\n const frame = texture.frame;\n const resolution = texture.source._resolution ?? texture.source.resolution ?? 1;\n const sx = frame.x * resolution;\n const sy = frame.y * resolution;\n const sw = frame.width * resolution;\n const sh = frame.height * resolution;\n canvas.width = Math.ceil(sw);\n canvas.height = Math.ceil(sh);\n context.drawImage(\n source,\n sx,\n sy,\n sw,\n sh,\n 0,\n 0,\n sw,\n sh\n );\n return canvas;\n }\n /**\n * Reads pixel data from a texture.\n * @param texture - Texture to read.\n */\n getPixels(texture) {\n const canvas = this.generateCanvas(texture);\n const context = canvas.getContext(\"2d\", { willReadFrequently: true });\n const imageData = context.getImageData(0, 0, canvas.width, canvas.height);\n return {\n pixels: imageData.data,\n width: canvas.width,\n height: canvas.height\n };\n }\n /** Destroys the system (no-op for canvas). */\n destroy() {\n }\n}\n/** @ignore */\nCanvasTextureSystem.extension = {\n type: [\n ExtensionType.CanvasSystem\n ],\n name: \"texture\"\n};\n\nexport { CanvasTextureSystem };\n//# sourceMappingURL=CanvasTextureSystem.mjs.map\n","import { extensions, ExtensionType } from '../../../extensions/Extensions.mjs';\nimport { CustomRenderPipe } from '../../../scene/container/CustomRenderPipe.mjs';\nimport { RenderGroupPipe } from '../../../scene/container/RenderGroupPipe.mjs';\nimport { CanvasGraphicsAdaptor } from '../../../scene/graphics/canvas/CanvasGraphicsAdaptor.mjs';\nimport { SpritePipe } from '../../../scene/sprite/SpritePipe.mjs';\nimport { CanvasBatchAdaptor } from '../../batcher/canvas/CanvasBatchAdaptor.mjs';\nimport { BatcherPipe } from '../../batcher/shared/BatcherPipe.mjs';\nimport { AlphaMaskPipe } from '../../mask/alpha/AlphaMaskPipe.mjs';\nimport { CanvasColorMaskPipe } from '../../mask/color/CanvasColorMaskPipe.mjs';\nimport { CanvasStencilMaskPipe } from '../../mask/stencil/CanvasStencilMaskPipe.mjs';\nimport { BlendModePipe } from '../shared/blendModes/BlendModePipe.mjs';\nimport { AbstractRenderer } from '../shared/system/AbstractRenderer.mjs';\nimport { SharedSystems } from '../shared/system/SharedSystems.mjs';\nimport { RendererType } from '../types.mjs';\nimport { CanvasContextSystem } from './CanvasContextSystem.mjs';\nimport { CanvasLimitsSystem } from './CanvasLimitsSystem.mjs';\nimport { CanvasRenderTargetSystem } from './renderTarget/CanvasRenderTargetSystem.mjs';\nimport { CanvasTextureSystem } from './texture/CanvasTextureSystem.mjs';\n\n\"use strict\";\nconst DefaultCanvasSystems = [\n ...SharedSystems,\n CanvasContextSystem,\n CanvasLimitsSystem,\n CanvasTextureSystem,\n CanvasRenderTargetSystem\n];\nconst DefaultCanvasPipes = [\n BlendModePipe,\n BatcherPipe,\n SpritePipe,\n RenderGroupPipe,\n AlphaMaskPipe,\n CanvasStencilMaskPipe,\n CanvasColorMaskPipe,\n CustomRenderPipe\n];\nconst DefaultCanvasAdapters = [\n CanvasBatchAdaptor,\n CanvasGraphicsAdaptor\n];\nconst systems = [];\nconst renderPipes = [];\nconst renderPipeAdaptors = [];\nextensions.handleByNamedList(ExtensionType.CanvasSystem, systems);\nextensions.handleByNamedList(ExtensionType.CanvasPipes, renderPipes);\nextensions.handleByNamedList(ExtensionType.CanvasPipesAdaptor, renderPipeAdaptors);\nextensions.add(...DefaultCanvasSystems, ...DefaultCanvasPipes, ...DefaultCanvasAdapters);\nclass CanvasRenderer extends AbstractRenderer {\n constructor() {\n const systemConfig = {\n name: \"canvas\",\n type: RendererType.CANVAS,\n systems,\n renderPipes,\n renderPipeAdaptors\n };\n super(systemConfig);\n }\n}\n\nexport { CanvasRenderer };\n//# sourceMappingURL=CanvasRenderer.mjs.map\n"],"names":["_CanvasBatchAdaptor","buildRoundedRectPath","buildShapePath","addHolePa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A,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,MAAM,wBAAwB;AAAA,EAC5B;AAAA,EACA;AACF;AACA,MAAM,UAAU,CAAA;AAChB,MAAM,cAAc,CAAA;AACpB,MAAM,qBAAqB,CAAA;AAC3B,WAAW,kBAAkB,cAAc,cAAc,OAAO;AAChE,WAAW,kBAAkB,cAAc,aAAa,WAAW;AACnE,WAAW,kBAAkB,cAAc,oBAAoB,kBAAkB;AACjF,WAAW,IAAI,GAAG,sBAAsB,GAAG,oBAAoB,GAAG,qBAAqB;AACvF,MAAM,uBAAuB,iBAAiB;AAAA,EAC5C,cAAc;AACZ,UAAM,eAAe;AAAA,MACnB,MAAM;AAAA,MACN,MAAM,aAAa;AAAA,MACnB;AAAA,MACA;AAAA,MACA;AAAA,IACN;AACI,UAAM,YAAY;AAAA,EACpB;AACF;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
@@ -1,4 +1,4 @@
1
- import { S as Shader, a as State, G as GpuProgram, b as GlProgram } from "./index-C6MgM63s.js";
1
+ import { S as Shader, a as State, G as GpuProgram, b as GlProgram } from "./index-DP0q9yO1.js";
2
2
  const _Filter = class _Filter2 extends Shader {
3
3
  /**
4
4
  * @param options - The optional parameters of this filter.
@@ -78,4 +78,4 @@ let Filter = _Filter;
78
78
  export {
79
79
  Filter as F
80
80
  };
81
- //# sourceMappingURL=Filter-Be7Gagsd.js.map
81
+ //# sourceMappingURL=Filter-BAwXUca-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Filter-Be7Gagsd.js","sources":["../node_modules/pixi.js/lib/filters/Filter.mjs"],"sourcesContent":["import { GlProgram } from '../rendering/renderers/gl/shader/GlProgram.mjs';\nimport { GpuProgram } from '../rendering/renderers/gpu/shader/GpuProgram.mjs';\nimport { Shader } from '../rendering/renderers/shared/shader/Shader.mjs';\nimport { State } from '../rendering/renderers/shared/state/State.mjs';\n\n\"use strict\";\nconst _Filter = class _Filter extends Shader {\n /**\n * @param options - The optional parameters of this filter.\n */\n constructor(options) {\n options = { ..._Filter.defaultOptions, ...options };\n super(options);\n /** If enabled is true the filter is applied, if false it will not. */\n this.enabled = true;\n /**\n * The gpu state the filter requires to render.\n * @internal\n */\n this._state = State.for2d();\n this.blendMode = options.blendMode;\n this.padding = options.padding;\n if (typeof options.antialias === \"boolean\") {\n this.antialias = options.antialias ? \"on\" : \"off\";\n } else {\n this.antialias = options.antialias;\n }\n this.resolution = options.resolution;\n this.blendRequired = options.blendRequired;\n this.clipToViewport = options.clipToViewport;\n this.addResource(\"uTexture\", 0, 1);\n if (options.blendRequired) {\n this.addResource(\"uBackTexture\", 0, 3);\n }\n }\n /**\n * Applies the filter\n * @param filterManager - The renderer to retrieve the filter from\n * @param input - The input render target.\n * @param output - The target to output to.\n * @param clearMode - Should the output be cleared before rendering to it\n */\n apply(filterManager, input, output, clearMode) {\n filterManager.applyFilter(this, input, output, clearMode);\n }\n /**\n * Get the blend mode of the filter.\n * @default \"normal\"\n */\n get blendMode() {\n return this._state.blendMode;\n }\n /** Sets the blend mode of the filter. */\n set blendMode(value) {\n this._state.blendMode = value;\n }\n /**\n * A short hand function to create a filter based of a vertex and fragment shader src.\n * @param options\n * @returns A shiny new PixiJS filter!\n */\n static from(options) {\n const { gpu, gl, ...rest } = options;\n let gpuProgram;\n let glProgram;\n if (gpu) {\n gpuProgram = GpuProgram.from(gpu);\n }\n if (gl) {\n glProgram = GlProgram.from(gl);\n }\n return new _Filter({\n gpuProgram,\n glProgram,\n ...rest\n });\n }\n};\n/** The default filter settings */\n_Filter.defaultOptions = {\n blendMode: \"normal\",\n resolution: 1,\n padding: 0,\n antialias: \"off\",\n blendRequired: false,\n clipToViewport: true\n};\nlet Filter = _Filter;\n\nexport { Filter };\n//# sourceMappingURL=Filter.mjs.map\n"],"names":["_Filter"],"mappings":";AAMA,MAAM,UAAU,MAAMA,iBAAgB,OAAO;AAAA;AAAA;AAAA;AAAA,EAI3C,YAAY,SAAS;AACnB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AA,EACT,WAAW;AAAA,EACX,eAAe;AAAA,EACf,gBAAgB;AAClB;AACG,IAAC,SAAS;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"Filter-BAwXUca-.js","sources":["../node_modules/pixi.js/lib/filters/Filter.mjs"],"sourcesContent":["import { GlProgram } from '../rendering/renderers/gl/shader/GlProgram.mjs';\nimport { GpuProgram } from '../rendering/renderers/gpu/shader/GpuProgram.mjs';\nimport { Shader } from '../rendering/renderers/shared/shader/Shader.mjs';\nimport { State } from '../rendering/renderers/shared/state/State.mjs';\n\n\"use strict\";\nconst _Filter = class _Filter extends Shader {\n /**\n * @param options - The optional parameters of this filter.\n */\n constructor(options) {\n options = { ..._Filter.defaultOptions, ...options };\n super(options);\n /** If enabled is true the filter is applied, if false it will not. */\n this.enabled = true;\n /**\n * The gpu state the filter requires to render.\n * @internal\n */\n this._state = State.for2d();\n this.blendMode = options.blendMode;\n this.padding = options.padding;\n if (typeof options.antialias === \"boolean\") {\n this.antialias = options.antialias ? \"on\" : \"off\";\n } else {\n this.antialias = options.antialias;\n }\n this.resolution = options.resolution;\n this.blendRequired = options.blendRequired;\n this.clipToViewport = options.clipToViewport;\n this.addResource(\"uTexture\", 0, 1);\n if (options.blendRequired) {\n this.addResource(\"uBackTexture\", 0, 3);\n }\n }\n /**\n * Applies the filter\n * @param filterManager - The renderer to retrieve the filter from\n * @param input - The input render target.\n * @param output - The target to output to.\n * @param clearMode - Should the output be cleared before rendering to it\n */\n apply(filterManager, input, output, clearMode) {\n filterManager.applyFilter(this, input, output, clearMode);\n }\n /**\n * Get the blend mode of the filter.\n * @default \"normal\"\n */\n get blendMode() {\n return this._state.blendMode;\n }\n /** Sets the blend mode of the filter. */\n set blendMode(value) {\n this._state.blendMode = value;\n }\n /**\n * A short hand function to create a filter based of a vertex and fragment shader src.\n * @param options\n * @returns A shiny new PixiJS filter!\n */\n static from(options) {\n const { gpu, gl, ...rest } = options;\n let gpuProgram;\n let glProgram;\n if (gpu) {\n gpuProgram = GpuProgram.from(gpu);\n }\n if (gl) {\n glProgram = GlProgram.from(gl);\n }\n return new _Filter({\n gpuProgram,\n glProgram,\n ...rest\n });\n }\n};\n/** The default filter settings */\n_Filter.defaultOptions = {\n blendMode: \"normal\",\n resolution: 1,\n padding: 0,\n antialias: \"off\",\n blendRequired: false,\n clipToViewport: true\n};\nlet Filter = _Filter;\n\nexport { Filter };\n//# sourceMappingURL=Filter.mjs.map\n"],"names":["_Filter"],"mappings":";AAMA,MAAM,UAAU,MAAMA,iBAAgB,OAAO;AAAA;AAAA;AAAA;AAAA,EAI3C,YAAY,SAAS;AACnB,cAAU,EAAE,GAAGA,SAAQ,gBAAgB,GAAG,QAAO;AACjD,UAAM,OAAO;AAEb,SAAK,UAAU;AAKf,SAAK,SAAS,MAAM,MAAK;AACzB,SAAK,YAAY,QAAQ;AACzB,SAAK,UAAU,QAAQ;AACvB,QAAI,OAAO,QAAQ,cAAc,WAAW;AAC1C,WAAK,YAAY,QAAQ,YAAY,OAAO;AAAA,IAC9C,OAAO;AACL,WAAK,YAAY,QAAQ;AAAA,IAC3B;AACA,SAAK,aAAa,QAAQ;AAC1B,SAAK,gBAAgB,QAAQ;AAC7B,SAAK,iBAAiB,QAAQ;AAC9B,SAAK,YAAY,YAAY,GAAG,CAAC;AACjC,QAAI,QAAQ,eAAe;AACzB,WAAK,YAAY,gBAAgB,GAAG,CAAC;AAAA,IACvC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,eAAe,OAAO,QAAQ,WAAW;AAC7C,kBAAc,YAAY,MAAM,OAAO,QAAQ,SAAS;AAAA,EAC1D;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,YAAY;AACd,WAAO,KAAK,OAAO;AAAA,EACrB;AAAA;AAAA,EAEA,IAAI,UAAU,OAAO;AACnB,SAAK,OAAO,YAAY;AAAA,EAC1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OAAO,KAAK,SAAS;AACnB,UAAM,EAAE,KAAK,IAAI,GAAG,KAAI,IAAK;AAC7B,QAAI;AACJ,QAAI;AACJ,QAAI,KAAK;AACP,mBAAa,WAAW,KAAK,GAAG;AAAA,IAClC;AACA,QAAI,IAAI;AACN,kBAAY,UAAU,KAAK,EAAE;AAAA,IAC/B;AACA,WAAO,IAAIA,SAAQ;AAAA,MACjB;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACT,CAAK;AAAA,EACH;AACF;AAEA,QAAQ,iBAAiB;AAAA,EACvB,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,WAAW;AAAA,EACX,eAAe;AAAA,EACf,gBAAgB;AAClB;AACG,IAAC,SAAS;","x_google_ignoreList":[0]}
@@ -1,5 +1,5 @@
1
- import { a1 as TextureMatrix, U as UniformGroup, M as Matrix, G as GpuProgram, b as GlProgram, a as State, a2 as DefaultBatcher, E as ExtensionType, f as extensions, a3 as BigPool, a4 as getGlobalBounds, e as Bounds, T as TexturePool, R as RendererType, a5 as FilterEffect, a6 as Sprite, c as Texture, h as STENCIL_MODES, Q as CLEAR, a7 as BatchableSprite, w as warn, a8 as RenderGroup, a9 as multiplyColors, aa as UPDATE_VISIBLE, ab as UPDATE_COLOR, ac as UPDATE_BLEND, J as Container, ad as TextureStyle, C as Color, D as DOMAdapter, V as TextureSource, ae as Rectangle, af as getLocalBounds, P as Point, ag as color32BitToUniform, B as BindGroup, z as Ticker, ah as VERSION, ai as deprecation, l as uid$1, y as CanvasSource, aj as GlobalResourceRegistry, ak as v8_0_0, al as RendererInitHook, am as SystemRunner } from "./index-C6MgM63s.js";
2
- import { F as Filter } from "./Filter-Be7Gagsd.js";
1
+ import { a1 as TextureMatrix, U as UniformGroup, M as Matrix, G as GpuProgram, b as GlProgram, a as State, a2 as DefaultBatcher, E as ExtensionType, f as extensions, a3 as BigPool, a4 as getGlobalBounds, e as Bounds, T as TexturePool, R as RendererType, a5 as FilterEffect, a6 as Sprite, c as Texture, h as STENCIL_MODES, Q as CLEAR, a7 as BatchableSprite, w as warn, a8 as RenderGroup, a9 as multiplyColors, aa as UPDATE_VISIBLE, ab as UPDATE_COLOR, ac as UPDATE_BLEND, J as Container, ad as TextureStyle, C as Color, D as DOMAdapter, V as TextureSource, ae as Rectangle, af as getLocalBounds, P as Point, ag as color32BitToUniform, B as BindGroup, z as Ticker, ah as VERSION, ai as deprecation, l as uid$1, y as CanvasSource, aj as GlobalResourceRegistry, ak as v8_0_0, al as RendererInitHook, am as SystemRunner } from "./index-DP0q9yO1.js";
2
+ import { F as Filter } from "./Filter-BAwXUca-.js";
3
3
  var fragment = "in vec2 vMaskCoord;\nin vec2 vTextureCoord;\n\nuniform sampler2D uTexture;\nuniform sampler2D uMaskTexture;\n\nuniform float uAlpha;\nuniform vec4 uMaskClamp;\nuniform float uInverse;\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 float a = alphaMul * masky.r * npmAlpha * clip;\n\n if (uInverse == 1.0) {\n a = 1.0 - a;\n }\n\n finalColor = original * a;\n}\n";
4
4
  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";
5
5
  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 uInverse:f32,\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 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 var uAlpha = filterUniforms.uAlpha;\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 var alphaMul = 1.0 - uAlpha * (1.0 - mask.a);\n\n var a: f32 = alphaMul * mask.r * uAlpha * clip;\n\n if (filterUniforms.uInverse == 1.0) {\n a = 1.0 - a;\n }\n\n return source * a;\n}\n";
@@ -3043,4 +3043,4 @@ export {
3043
3043
  RenderGroupPipe as c,
3044
3044
  SharedRenderPipes as d
3045
3045
  };
3046
- //# sourceMappingURL=RenderTargetSystem-C9oPzIqc.js.map
3046
+ //# sourceMappingURL=RenderTargetSystem-BrLrRZqC.js.map