{"version":3,"sources":["node_modules/@arcgis/core/views/webgl/checkWebGLError.js","node_modules/@arcgis/core/views/webgl/GLObjectType.js","node_modules/@arcgis/core/views/webgl/getDataTypeBytes.js","node_modules/@arcgis/core/views/webgl/Util.js","node_modules/@arcgis/core/views/webgl/TextureDescriptor.js","node_modules/@arcgis/core/views/webgl/ValidatedTextureDescriptor.js","node_modules/@arcgis/core/views/webgl/Texture.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport e from \"../../core/Error.js\";\nimport has from \"../../core/has.js\";\nimport r from \"../../core/Logger.js\";\nconst o = () => r.getLogger(\"esri.views.webgl.checkWebGLError\");\nfunction t(e, r) {\n switch (r) {\n case e.INVALID_ENUM:\n return \"Invalid Enum. An unacceptable value has been specified for an enumerated argument.\";\n case e.INVALID_VALUE:\n return \"Invalid Value. A numeric argument is out of range.\";\n case e.INVALID_OPERATION:\n return \"Invalid Operation. The specified command is not allowed for the current state.\";\n case e.INVALID_FRAMEBUFFER_OPERATION:\n return \"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.\";\n case e.OUT_OF_MEMORY:\n return \"Out of memory. Not enough memory is left to execute the command.\";\n case e.CONTEXT_LOST_WEBGL:\n return \"WebGL context has been lost\";\n default:\n return \"Unknown error\";\n }\n}\nconst n = !!has(\"enable-feature:webgl-debug\");\nfunction a() {\n return n;\n}\nfunction c() {\n return n;\n}\nfunction u(r) {\n if (a()) {\n const n = r.getError();\n if (n) {\n const a = t(r, n),\n c = new Error().stack;\n o().error(new e(\"webgl-error\", \"WebGL error occurred\", {\n message: a,\n stack: c\n }));\n }\n }\n}\nexport { u as checkWebGLError, n as hasFeatureFlagWebGLDebug, a as webglDebugEnabled, c as webglValidateShadersEnabled };","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nvar e;\n!function (e) {\n e[e.Texture = 0] = \"Texture\", e[e.RenderBuffer = 1] = \"RenderBuffer\";\n}(e || (e = {}));\nexport { e as GLObjectType };","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { DataType as e } from \"./enums.js\";\nfunction s(s) {\n switch (s) {\n case e.BYTE:\n case e.UNSIGNED_BYTE:\n return 1;\n case e.SHORT:\n case e.UNSIGNED_SHORT:\n case e.HALF_FLOAT:\n return 2;\n case e.FLOAT:\n case e.INT:\n case e.UNSIGNED_INT:\n return 4;\n }\n}\nexport { s as getDataTypeBytes };","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport \"../../core/has.js\";\nimport { webglDebugEnabled as e } from \"./checkWebGLError.js\";\nimport { BufferType as r, CompressedTextureFormat as t, SizedPixelFormat as s, RenderbufferFormat as a, PixelFormat as c } from \"./enums.js\";\nimport { getDataTypeBytes as n } from \"./getDataTypeBytes.js\";\nfunction o(e) {\n const r = e.gl;\n switch (r.getError()) {\n case r.NO_ERROR:\n return null;\n case r.INVALID_ENUM:\n return \"An unacceptable value has been specified for an enumerated argument\";\n case r.INVALID_VALUE:\n return \"An unacceptable value has been specified for an argument\";\n case r.INVALID_OPERATION:\n return \"The specified command is not allowed for the current state\";\n case r.INVALID_FRAMEBUFFER_OPERATION:\n return \"The currently bound framebuffer is not framebuffer complete\";\n case r.OUT_OF_MEMORY:\n return \"Not enough memory is left to execute the command\";\n case r.CONTEXT_LOST_WEBGL:\n return \"WebGL context is lost\";\n }\n return \"Unknown error\";\n}\nfunction i(e, r) {\n return (e.vertexBuffers.get(r)?.usedMemory ?? 0) / R(e.layout.get(r));\n}\nfunction R(e) {\n return e[0].stride;\n}\nfunction E(r, t, s, a, c = 0) {\n const i = r.gl;\n r.bindBuffer(s);\n for (const R of a) {\n const s = t.get(R.name);\n if (null == s) {\n console.warn(`There is no location for vertex attribute '${R.name}' defined.`);\n continue;\n }\n const a = c * R.stride;\n if (R.count <= 4) i.vertexAttribPointer(s, R.count, R.type, R.normalized, R.stride, R.offset + a), i.enableVertexAttribArray(s), R.divisor > 0 && r.gl.vertexAttribDivisor(s, R.divisor);else if (9 === R.count) for (let e = 0; e < 3; e++) i.vertexAttribPointer(s + e, 3, R.type, R.normalized, R.stride, R.offset + 12 * e + a), i.enableVertexAttribArray(s + e), R.divisor > 0 && r.gl.vertexAttribDivisor(s + e, R.divisor);else if (16 === R.count) for (let e = 0; e < 4; e++) i.vertexAttribPointer(s + e, 4, R.type, R.normalized, R.stride, R.offset + 16 * e + a), i.enableVertexAttribArray(s + e), R.divisor > 0 && r.gl?.vertexAttribDivisor(s + e, R.divisor);else console.error(\"Unsupported vertex attribute element count: \" + R.count);\n if (e()) {\n const e = o(r),\n t = n(R.type),\n s = R.offset,\n c = Math.round(t / s) !== t / s ? `. Offset not a multiple of stride. DataType requires ${t} bytes, but descriptor has an offset of ${s}` : \"\";\n e && console.error(`Unable to bind vertex attribute \"${R.name}\" with baseInstanceOffset ${a}${c}:`, e, R);\n }\n }\n}\nfunction _(e, t, s, a) {\n const c = e.gl;\n e.bindBuffer(s);\n for (const r of a) {\n const s = t.get(r.name);\n if (r.count <= 4) c.disableVertexAttribArray(s), r.divisor && r.divisor > 0 && e.gl?.vertexAttribDivisor(s, 0);else if (9 === r.count) for (let t = 0; t < 3; t++) c.disableVertexAttribArray(s + t), r.divisor && r.divisor > 0 && e.gl?.vertexAttribDivisor(s + t, 0);else if (16 === r.count) for (let t = 0; t < 4; t++) c.disableVertexAttribArray(s + t), r.divisor && r.divisor > 0 && e.gl?.vertexAttribDivisor(s + t, 0);else console.error(\"Unsupported vertex attribute element count: \" + r.count);\n }\n e.unbindBuffer(r.ARRAY_BUFFER);\n}\nfunction u(e) {\n switch (e) {\n case c.ALPHA:\n case c.LUMINANCE:\n case c.RED:\n case c.RED_INTEGER:\n case s.R8:\n case s.R8I:\n case s.R8UI:\n case s.R8_SNORM:\n case a.STENCIL_INDEX8:\n return 1;\n case c.LUMINANCE_ALPHA:\n case c.RG:\n case c.RG_INTEGER:\n case s.RGBA4:\n case s.R16F:\n case s.R16I:\n case s.R16UI:\n case s.RG8:\n case s.RG8I:\n case s.RG8UI:\n case s.RG8_SNORM:\n case s.RGB565:\n case s.RGB5_A1:\n case a.DEPTH_COMPONENT16:\n return 2;\n case c.DEPTH_COMPONENT:\n case c.RGB:\n case c.RGB_INTEGER:\n case s.RGB8:\n case s.RGB8I:\n case s.RGB8UI:\n case s.RGB8_SNORM:\n case s.SRGB8:\n case a.DEPTH_COMPONENT24:\n return 3;\n case c.DEPTH_STENCIL:\n case c.DEPTH24_STENCIL8:\n case c.RGBA:\n case c.RGBA_INTEGER:\n case s.RGBA8:\n case s.R32F:\n case s.R11F_G11F_B10F:\n case s.RG16F:\n case s.R32I:\n case s.R32UI:\n case s.RG16I:\n case s.RG16UI:\n case s.RGBA8I:\n case s.RGBA8UI:\n case s.RGBA8_SNORM:\n case s.SRGB8_ALPHA8:\n case s.RGB9_E5:\n case s.RGB10_A2UI:\n case s.RGB10_A2:\n case a.DEPTH_STENCIL:\n case a.DEPTH_COMPONENT32F:\n case a.DEPTH24_STENCIL8:\n return 4;\n case a.DEPTH32F_STENCIL8:\n return 5;\n case s.RGB16F:\n case s.RGB16I:\n case s.RGB16UI:\n return 6;\n case s.RG32F:\n case s.RG32I:\n case s.RG32UI:\n case s.RGBA16F:\n case s.RGBA16I:\n case s.RGBA16UI:\n return 8;\n case s.RGB32F:\n case s.RGB32I:\n case s.RGB32UI:\n return 12;\n case s.RGBA32F:\n case s.RGBA32I:\n case s.RGBA32UI:\n return 16;\n case t.COMPRESSED_RGB_S3TC_DXT1_EXT:\n case t.COMPRESSED_RGBA_S3TC_DXT1_EXT:\n return .5;\n case t.COMPRESSED_RGBA_S3TC_DXT3_EXT:\n case t.COMPRESSED_RGBA_S3TC_DXT5_EXT:\n return 1;\n case t.COMPRESSED_R11_EAC:\n case t.COMPRESSED_SIGNED_R11_EAC:\n case t.COMPRESSED_RGB8_ETC2:\n case t.COMPRESSED_SRGB8_ETC2:\n case t.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:\n case t.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:\n return .5;\n case t.COMPRESSED_RG11_EAC:\n case t.COMPRESSED_SIGNED_RG11_EAC:\n case t.COMPRESSED_RGBA8_ETC2_EAC:\n case t.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:\n return 1;\n }\n return 0;\n}\nexport { E as bindVertexBufferLayout, u as getBytesPerElementFormat, o as getErrorString, R as getStride, _ as unbindVertexBufferLayout, i as vertexCount };","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { TextureType as t, PixelFormat as i, PixelType as h, TextureSamplingMode as s, TextureWrapMode as a } from \"./enums.js\";\nimport { getBytesPerElementFormat as e } from \"./Util.js\";\nclass p {\n constructor(e = 0, p = e) {\n this.width = e, this.height = p, this.target = t.TEXTURE_2D, this.pixelFormat = i.RGBA, this.dataType = h.UNSIGNED_BYTE, this.samplingMode = s.LINEAR, this.wrapMode = a.REPEAT, this.maxAnisotropy = 1, this.flipped = !1, this.hasMipmap = !1, this.isOpaque = !1, this.unpackAlignment = 4, this.preMultiplyAlpha = !1, this.depth = 1, this.isImmutable = !1;\n }\n}\nfunction r(i) {\n return i.width <= 0 || i.height <= 0 ? 0 : Math.round(i.width * i.height * (i.hasMipmap ? 4 / 3 : 1) * (null == i.internalFormat ? 4 : e(i.internalFormat)) * (i.target === t.TEXTURE_CUBE_MAP ? 6 : 1));\n}\nexport { p as TextureDescriptor, r as estimateMemory };","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { SizedPixelFormat as s, PixelFormat as e } from \"./enums.js\";\nimport { TextureDescriptor as t } from \"./TextureDescriptor.js\";\nclass a extends t {\n constructor(t, a) {\n switch (super(), this.context = t, Object.assign(this, a), this.internalFormat) {\n case s.R16F:\n case s.R16I:\n case s.R16UI:\n case s.R32F:\n case s.R32I:\n case s.R32UI:\n case s.R8_SNORM:\n case s.R8:\n case s.R8I:\n case s.R8UI:\n this.pixelFormat = e.RED;\n }\n }\n static validate(s, e) {\n return new a(s, e);\n }\n}\nexport { a as ValidatedTextureDescriptor };","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport t from \"../../core/Error.js\";\nimport \"../../core/has.js\";\nimport { checkWebGLError as e } from \"./checkWebGLError.js\";\nimport { TextureType as i, ResourceType as r, TextureSamplingMode as s, PixelFormat as o, PixelType as a, SizedPixelFormat as n, CompressedTextureFormat as l } from \"./enums.js\";\nimport { GLObjectType as h } from \"./GLObjectType.js\";\nimport { estimateMemory as p } from \"./TextureDescriptor.js\";\nimport { ValidatedTextureDescriptor as d } from \"./ValidatedTextureDescriptor.js\";\nconst _ = null;\nlet m = class l {\n constructor(e, r = null, s = null) {\n if (this.type = h.Texture, this._glName = null, this._samplingModeDirty = !1, this._wrapModeDirty = !1, this._wasImmutablyAllocated = !1, \"context\" in e) this._descriptor = e, s = r;else {\n const i = d.validate(e, r);\n if (!i) throw new t(\"Texture descriptor invalid\");\n this._descriptor = i;\n }\n this._descriptor.target === i.TEXTURE_CUBE_MAP ? this._setDataCubeMap(s) : this.setData(s);\n }\n get glName() {\n return this._glName;\n }\n get descriptor() {\n return this._descriptor;\n }\n get usedMemory() {\n return p(this._descriptor);\n }\n get isDirty() {\n return this._samplingModeDirty || this._wrapModeDirty;\n }\n dispose() {\n this._glName && this._descriptor.context.instanceCounter.decrement(r.Texture, this), this._descriptor.context.gl && this._glName && (this._descriptor.context.unbindTexture(this), this._descriptor.context.gl.deleteTexture(this._glName), this._glName = null);\n }\n release() {\n this.dispose();\n }\n resize(e, r) {\n const s = this._descriptor;\n if (s.width !== e || s.height !== r) {\n if (this._wasImmutablyAllocated) throw new t(\"Immutable textures can't be resized!\");\n s.width = e, s.height = r, this._descriptor.target === i.TEXTURE_CUBE_MAP ? this._setDataCubeMap(null) : this.setData(null);\n }\n }\n _setDataCubeMap(t = null) {\n for (let e = i.TEXTURE_CUBE_MAP_POSITIVE_X; e <= i.TEXTURE_CUBE_MAP_NEGATIVE_Z; e++) this._setData(t, e);\n }\n setData(t) {\n this._setData(t);\n }\n _setData(i, s) {\n const o = this._descriptor.context?.gl;\n if (!o) return;\n e(o), this._glName || (this._glName = o.createTexture(), this._glName && this._descriptor.context.instanceCounter.increment(r.Texture, this));\n const a = this._descriptor,\n n = s ?? a.target,\n h = f(n),\n p = this._descriptor.context.bindTexture(this, l.TEXTURE_UNIT_FOR_UPDATES);\n this._descriptor.context.setActiveTexture(l.TEXTURE_UNIT_FOR_UPDATES), c(a), this._configurePixelStorage(), e(o);\n const d = this._deriveInternalFormat();\n if (I(i)) {\n let t = \"width\" in i ? i.width : i.codedWidth,\n r = \"height\" in i ? i.height : i.codedHeight;\n const s = 1;\n i instanceof HTMLVideoElement && (t = i.videoWidth, r = i.videoHeight), a.width && a.height, h && a.depth, a.isImmutable && !this._wasImmutablyAllocated && this._texStorage(n, d, a.hasMipmap, t, r, s), this._texImage(n, 0, d, t, r, s, i), e(o), a.hasMipmap && (this.generateMipmap(), e(o)), a.width || (a.width = t), a.height || (a.height = r), h && !a.depth && (a.depth = s);\n } else {\n const {\n width: r,\n height: s,\n depth: l\n } = a;\n if (null == r || null == s) throw new t(\"Width and height must be specified!\");\n if (h && null == l) throw new t(\"Depth must be specified!\");\n if (a.isImmutable && !this._wasImmutablyAllocated && this._texStorage(n, d, a.hasMipmap, r, s, l), M(i)) {\n const e = i.levels,\n h = R(n, r, s, l),\n p = Math.min(h - 1, e.length - 1);\n o.texParameteri(a.target, this._descriptor.context.gl.TEXTURE_MAX_LEVEL, p);\n const _ = d;\n if (!x(_)) throw new t(\"Attempting to use compressed data with an uncompressed format!\");\n this._forEachMipmapLevel((t, i, r, s) => {\n const o = e[Math.min(t, e.length - 1)];\n this._compressedTexImage(n, t, _, i, r, s, o);\n }, p);\n } else this._texImage(n, 0, d, r, s, l, i), e(o), a.hasMipmap && this.generateMipmap();\n }\n u(o, this._descriptor), T(o, this._descriptor), E(this._descriptor.context, this._descriptor), e(o), this._descriptor.context.bindTexture(p, l.TEXTURE_UNIT_FOR_UPDATES);\n }\n updateData(e, i, r, s, o, a, n = 0) {\n a || console.error(\"An attempt to use uninitialized data!\"), this._glName || console.error(\"An attempt to update uninitialized texture!\");\n const h = this._descriptor,\n p = this._deriveInternalFormat(),\n {\n context: d,\n pixelFormat: _,\n dataType: m,\n target: c,\n isImmutable: u\n } = h;\n if (u && !this._wasImmutablyAllocated) throw new t(\"Cannot update immutable texture before allocation!\");\n const T = d.bindTexture(this, l.TEXTURE_UNIT_FOR_UPDATES, !0);\n (i < 0 || r < 0 || i + s > h.width || r + o > h.height) && console.error(\"An attempt to update out of bounds of the texture!\"), this._configurePixelStorage();\n const {\n gl: E\n } = d;\n n && E.pixelStorei(E.UNPACK_SKIP_ROWS, n), I(a) ? E.texSubImage2D(c, e, i, r, s, o, _, m, a) : M(a) ? E.compressedTexSubImage2D(c, e, i, r, s, o, p, a.levels[e]) : E.texSubImage2D(c, e, i, r, s, o, _, m, a), n && E.pixelStorei(E.UNPACK_SKIP_ROWS, 0), d.bindTexture(T, l.TEXTURE_UNIT_FOR_UPDATES);\n }\n updateData3D(e, i, r, s, o, a, n, h) {\n h || console.error(\"An attempt to use uninitialized data!\"), this._glName || console.error(\"An attempt to update uninitialized texture!\");\n const p = this._descriptor,\n d = this._deriveInternalFormat(),\n {\n context: _,\n pixelFormat: m,\n dataType: c,\n isImmutable: u,\n target: T\n } = p;\n if (u && !this._wasImmutablyAllocated) throw new t(\"Cannot update immutable texture before allocation!\");\n f(T) || console.warn(\"Attempting to set 3D texture data on a non-3D texture\");\n const E = _.bindTexture(this, l.TEXTURE_UNIT_FOR_UPDATES);\n _.setActiveTexture(l.TEXTURE_UNIT_FOR_UPDATES), (i < 0 || r < 0 || s < 0 || i + o > p.width || r + a > p.height || s + n > p.depth) && console.error(\"An attempt to update out of bounds of the texture!\"), this._configurePixelStorage();\n const {\n gl: g\n } = _;\n if (M(h)) h = h.levels[e], g.compressedTexSubImage3D(T, e, i, r, s, o, a, n, d, h);else {\n const t = h;\n g.texSubImage3D(T, e, i, r, s, o, a, n, m, c, t);\n }\n _.bindTexture(E, l.TEXTURE_UNIT_FOR_UPDATES);\n }\n generateMipmap() {\n const e = this._descriptor;\n if (!e.hasMipmap) {\n if (this._wasImmutablyAllocated) throw new t(\"Cannot add mipmaps to immutable texture after allocation\");\n e.hasMipmap = !0, this._samplingModeDirty = !0, c(e);\n }\n e.samplingMode === s.LINEAR ? (this._samplingModeDirty = !0, e.samplingMode = s.LINEAR_MIPMAP_NEAREST) : e.samplingMode === s.NEAREST && (this._samplingModeDirty = !0, e.samplingMode = s.NEAREST_MIPMAP_NEAREST);\n const i = this._descriptor.context.bindTexture(this, l.TEXTURE_UNIT_FOR_UPDATES);\n this._descriptor.context.setActiveTexture(l.TEXTURE_UNIT_FOR_UPDATES), this._descriptor.context.gl.generateMipmap(e.target), this._descriptor.context.bindTexture(i, l.TEXTURE_UNIT_FOR_UPDATES);\n }\n clearMipmap() {\n const e = this._descriptor;\n if (e.hasMipmap) {\n if (this._wasImmutablyAllocated) throw new t(\"Cannot delete mipmaps to immutable texture after allocation\");\n e.hasMipmap = !1, this._samplingModeDirty = !0, c(e);\n }\n e.samplingMode === s.LINEAR_MIPMAP_NEAREST ? (this._samplingModeDirty = !0, e.samplingMode = s.LINEAR) : e.samplingMode === s.NEAREST_MIPMAP_NEAREST && (this._samplingModeDirty = !0, e.samplingMode = s.NEAREST);\n }\n setSamplingMode(t) {\n t !== this._descriptor.samplingMode && (this._descriptor.samplingMode = t, this._samplingModeDirty = !0);\n }\n setWrapMode(t) {\n t !== this._descriptor.wrapMode && (this._descriptor.wrapMode = t, c(this._descriptor), this._wrapModeDirty = !0);\n }\n applyChanges() {\n const t = this._descriptor,\n e = t.context.gl;\n this._samplingModeDirty && (u(e, t), this._samplingModeDirty = !1), this._wrapModeDirty && (T(e, t), this._wrapModeDirty = !1);\n }\n _deriveInternalFormat() {\n if (null != this._descriptor.internalFormat) return this._descriptor.internalFormat === o.DEPTH_STENCIL && (this._descriptor.internalFormat = o.DEPTH24_STENCIL8), this._descriptor.internalFormat;\n switch (this._descriptor.dataType) {\n case a.FLOAT:\n switch (this._descriptor.pixelFormat) {\n case o.RGBA:\n return this._descriptor.internalFormat = n.RGBA32F;\n case o.RGB:\n return this._descriptor.internalFormat = n.RGB32F;\n default:\n throw new t(\"Unable to derive format\");\n }\n case a.UNSIGNED_BYTE:\n switch (this._descriptor.pixelFormat) {\n case o.RGBA:\n return this._descriptor.internalFormat = n.RGBA8;\n case o.RGB:\n return this._descriptor.internalFormat = n.RGB8;\n }\n }\n return this._descriptor.internalFormat = this._descriptor.pixelFormat === o.DEPTH_STENCIL ? o.DEPTH24_STENCIL8 : this._descriptor.pixelFormat;\n }\n _configurePixelStorage() {\n const t = this._descriptor.context.gl,\n {\n unpackAlignment: e,\n flipped: i,\n preMultiplyAlpha: r\n } = this._descriptor;\n t.pixelStorei(t.UNPACK_ALIGNMENT, e), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, i ? 1 : 0), t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL, r ? 1 : 0);\n }\n _texStorage(e, i, r, s, o, a) {\n const {\n gl: n\n } = this._descriptor.context;\n if (!g(i)) throw new t(\"Immutable textures must have a sized internal format\");\n if (!this._descriptor.isImmutable) return;\n const l = r ? R(e, s, o, a) : 1;\n if (f(e)) {\n if (null == a) throw new t(\"Missing depth dimension for 3D texture upload\");\n n.texStorage3D(e, l, i, s, o, a);\n } else n.texStorage2D(e, l, i, s, o);\n this._wasImmutablyAllocated = !0;\n }\n _texImage(e, i, r, s, o, a, n) {\n const l = this._descriptor.context.gl,\n h = f(e),\n {\n isImmutable: p,\n pixelFormat: d,\n dataType: _\n } = this._descriptor;\n if (p) {\n if (null != n) {\n const r = n;\n if (h) {\n if (null == a) throw new t(\"Missing depth dimension for 3D texture upload\");\n l.texSubImage3D(e, i, 0, 0, 0, s, o, a, d, _, r);\n } else l.texSubImage2D(e, i, 0, 0, s, o, d, _, r);\n }\n } else {\n const p = n;\n if (h) {\n if (null == a) throw new t(\"Missing depth dimension for 3D texture upload\");\n l.texImage3D(e, i, r, s, o, a, 0, d, _, p);\n } else l.texImage2D(e, i, r, s, o, 0, d, _, p);\n }\n }\n _compressedTexImage(e, i, r, s, o, a, n) {\n const l = this._descriptor.context.gl,\n h = f(e);\n if (this._descriptor.isImmutable) {\n if (null != n) if (h) {\n if (null == a) throw new t(\"Missing depth dimension for 3D texture upload\");\n l.compressedTexSubImage3D(e, i, 0, 0, 0, s, o, a, r, n);\n } else l.compressedTexSubImage2D(e, i, 0, 0, s, o, r, n);\n } else if (h) {\n if (null == a) throw new t(\"Missing depth dimension for 3D texture upload\");\n l.compressedTexImage3D(e, i, r, s, o, a, 0, n);\n } else l.compressedTexImage2D(e, i, r, s, o, 0, n);\n }\n _forEachMipmapLevel(e, r = 1 / 0) {\n let {\n width: s,\n height: o,\n depth: a,\n hasMipmap: n,\n target: l\n } = this._descriptor;\n const h = l === i.TEXTURE_3D;\n if (null == s || null == o || h && null == a) throw new t(\"Missing texture dimensions for mipmap calculation\");\n for (let t = 0; e(t, s, o, a), n && (1 !== s || 1 !== o || h && 1 !== a) && !(t >= r); ++t) s = Math.max(1, s >> 1), o = Math.max(1, o >> 1), h && (a = Math.max(1, a >> 1));\n }\n};\nfunction c(t) {\n (null != t.width && t.width < 0 || null != t.height && t.height < 0 || null != t.depth && t.depth < 0) && console.error(\"Negative dimension parameters are not allowed!\");\n}\nfunction u(t, e) {\n let i = e.samplingMode,\n r = e.samplingMode;\n i === s.LINEAR_MIPMAP_NEAREST || i === s.LINEAR_MIPMAP_LINEAR ? (i = s.LINEAR, e.hasMipmap || (r = s.LINEAR)) : i !== s.NEAREST_MIPMAP_NEAREST && i !== s.NEAREST_MIPMAP_LINEAR || (i = s.NEAREST, e.hasMipmap || (r = s.NEAREST)), t.texParameteri(e.target, t.TEXTURE_MAG_FILTER, i), t.texParameteri(e.target, t.TEXTURE_MIN_FILTER, r);\n}\nfunction T(t, e) {\n \"number\" == typeof e.wrapMode ? (t.texParameteri(e.target, t.TEXTURE_WRAP_S, e.wrapMode), t.texParameteri(e.target, t.TEXTURE_WRAP_T, e.wrapMode)) : (t.texParameteri(e.target, t.TEXTURE_WRAP_S, e.wrapMode.s), t.texParameteri(e.target, t.TEXTURE_WRAP_T, e.wrapMode.t));\n}\nfunction E(t, e) {\n const i = t.capabilities.textureFilterAnisotropic;\n if (!i) return;\n t.gl.texParameterf(e.target, i.TEXTURE_MAX_ANISOTROPY, e.maxAnisotropy ?? 1);\n}\nfunction g(t) {\n return t in n;\n}\nfunction x(t) {\n return t in l;\n}\nfunction M(t) {\n return null != t && \"type\" in t && \"compressed\" === t.type;\n}\nfunction A(t) {\n return null != t && \"byteLength\" in t;\n}\nfunction I(t) {\n return null != t && !M(t) && !A(t);\n}\nfunction f(t) {\n return t === i.TEXTURE_3D || t === i.TEXTURE_2D_ARRAY;\n}\nfunction R(t, e, r, s = 1) {\n let o = Math.max(e, r);\n return t === i.TEXTURE_3D && (o = Math.max(o, s)), Math.round(Math.log(o) / Math.LN2) + 1;\n}\nm.TEXTURE_UNIT_FOR_UPDATES = 0;\nexport { m as Texture, _ as tracer };"],"mappings":"qMAOA,IAAMA,EAAI,IAAMC,EAAE,UAAU,kCAAkC,EAC9D,SAASC,EAAEC,EAAGC,EAAG,CACf,OAAQA,EAAG,CACT,KAAKD,EAAE,aACL,MAAO,qFACT,KAAKA,EAAE,cACL,MAAO,qDACT,KAAKA,EAAE,kBACL,MAAO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AAO,EAAE,UAArB,UAAiC,EAAE,cAAc,EAAE,OAAQ,EAAE,eAAgB,EAAE,QAAQ,EAAG,EAAE,cAAc,EAAE,OAAQ,EAAE,eAAgB,EAAE,QAAQ,IAAM,EAAE,cAAc,EAAE,OAAQ,EAAE,eAAgB,EAAE,SAAS,CAAC,EAAG,EAAE,cAAc,EAAE,OAAQ,EAAE,eAAgB,EAAE,SAAS,CAAC,EAC3Q,CACA,SAASC,GAAE,EAAG,EAAG,CACf,IAAMlB,EAAI,EAAE,aAAa,yBACpBA,GACL,EAAE,GAAG,cAAc,EAAE,OAAQA,EAAE,uBAAwB,EAAE,eAAiB,CAAC,CAC7E,CACA,SAASoB,GAAE,EAAG,CACZ,OAAO,KAAKI,CACd,CACA,SAAST,GAAE,EAAG,CACZ,OAAO,KAAKL,CACd,CACA,SAASR,EAAE,EAAG,CACZ,OAAe,GAAR,MAAa,SAAU,GAAsB,EAAE,OAAnB,YACrC,CACA,SAASuB,GAAE,EAAG,CACZ,OAAe,GAAR,MAAa,eAAgB,CACtC,CACA,SAASb,EAAE,EAAG,CACZ,OAAe,GAAR,MAAa,CAACV,EAAE,CAAC,GAAK,CAACuB,GAAE,CAAC,CACnC,CACA,SAASjB,EAAE,EAAG,CACZ,OAAO,IAAMN,EAAE,YAAc,IAAMA,EAAE,gBACvC,CACA,SAASW,EAAE,EAAG,EAAG,EAAGf,EAAI,EAAG,CACzB,IAAIkB,EAAI,KAAK,IAAI,EAAG,CAAC,EACrB,OAAO,IAAMd,EAAE,aAAec,EAAI,KAAK,IAAIA,EAAGlB,CAAC,GAAI,KAAK,MAAM,KAAK,IAAIkB,CAAC,EAAI,KAAK,GAAG,EAAI,CAC1F,CACApB,GAAE,yBAA2B","names":["o","n","t","e","r","has","a","c","u","s","e","s","C","o","e","r","E","r","t","s","a","c","i","R","e","o","_","A","u","G","P","B","p","M","G","U","L","D","r","i","u","a","_a","p","t","P","G","s","e","m","l","s","e","i","a","M","r","V","t","u","h","f","p","c","d","I","R","_","x","o","T","E","n","g","L","G","U","P","A"],"x_google_ignoreList":[0,1,2,3,4,5,6]}