rayshon-cesium-expander 1.5.2 → 1.5.4

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.
@@ -1 +0,0 @@
1
- {"version":3,"file":"packages_cesium-expander_src_Workers_LayerPNG_worker_js.index.dev.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA;;AAEAC,IAAI,CAACC,SAAL;AAAA,qEAAiB,iBAAeC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAEb;AAEA,gBAAI;AACA;AACMC,cAAAA,IAFN,GAEaJ,iEAAkB,CAAC,CAAD,CAF/B;AAGAC,cAAAA,IAAI,CAACI,WAAL,CAAiB;AAAEC,gBAAAA,OAAO,EAAE,IAAX;AAAiBF,gBAAAA,IAAI,EAAJA;AAAjB,eAAjB;AACH,aAJD,CAIE,OAAOG,KAAP,EAAc;AACZN,cAAAA,IAAI,CAACI,WAAL,CAAiB;AAAEC,gBAAAA,OAAO,EAAE,KAAX;AAAkBC,gBAAAA,KAAK,EAAEA,KAAK,CAACC;AAA/B,eAAjB;AACH;;AAVY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAAjB;;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;ACFO,SAASR,kBAAT,CAA4BS,KAA5B,EAAmC;AACtC,SAAOA,KAAK,GAAG,CAAf;AACH,EAED;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;;AACA,SAASC,OAAT,CAAiBC,OAAjB,EAA0B;AACtBA,EAAAA,OAAO,GAAGC,YAAY,CAACD,OAAD,EAAUC,YAAY,CAACC,YAAvB,CAAtB,CADsB,CAGtB;;AACAC,EAAAA,KAAK,CAACC,OAAN,CAAc,iBAAd,EAAiCJ,OAAO,CAACK,OAAzC,EAJsB,CAKtB;;AAEA,MAAMA,OAAO,GAAGL,OAAO,CAACK,OAAxB;AAC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AAEA,MAAMlD,EAAE,GAAG,KAAKuC,QAAL,CAActC,GAAzB;AACA,MAAMoF,MAAM,GAAG,KAAK5C,cAApB;AAEAzC,EAAAA,EAAE,CAAC4G,IAAH,CAAQ5G,EAAE,CAACiH,oBAAX,EAAiCL,IAAjC;AACA5G,EAAAA,EAAE,CAACM,aAAH,CAAiBN,EAAE,CAACO,QAApB;AACAP,EAAAA,EAAE,CAACQ,WAAH,CAAe6E,MAAf,EAAuB,KAAK3C,QAA5B;AACA1C,EAAAA,EAAE,CAAC2G,cAAH,CAAkBtB,MAAlB;AACArF,EAAAA,EAAE,CAACQ,WAAH,CAAe6E,MAAf,EAAuB,IAAvB;AACC,CAzCD;;AA2CAlJ,OAAO,CAACiI,SAAR,CAAkB8C,WAAlB,GAAgC,YAAY;AAC5C,SAAO,KAAP;AACC,CAFD;;AAIA/K,OAAO,CAACiI,SAAR,CAAkB+C,OAAlB,GAA4B,YAAY;AACxC,OAAK5E,QAAL,CAActC,GAAd,CAAkBmH,aAAlB,CAAgC,KAAK1E,QAArC;;AACA,SAAO2E,aAAa,CAAC,IAAD,CAApB;AACC,CAHD;;AAIA,iEAAelL,OAAf","sources":["webpack://root/./packages/cesium-expander/src/Workers/LayerPNG_worker.js","webpack://root/./packages/cesium-expander/src/Workers/Worker_Utils.js"],"sourcesContent":["import 'regenerator-runtime/runtime';\r\nimport {calculateSomething} from './Worker_Utils'\r\n\r\nself.onmessage = async function(event) {\r\n\r\n // const {url,minColorValue, maxColorValue} = event.data;\r\n \r\n try {\r\n // const data = new Cartesian3(1.0, 1.0, 1.0);\r\n const data = calculateSomething(1);\r\n self.postMessage({ success: true, data });\r\n } catch (error) {\r\n self.postMessage({ success: false, error: error.message });\r\n }\r\n};","\r\nexport function calculateSomething(input) {\r\n return input * 2;\r\n}\r\n\r\n// 将 Cesium.Texture 相关的内容复制进来. 目标: 可以在 worker 里面 创建 Texture 实例\r\n// Texture 需要的其他 Cesium 文件\r\n/* \r\nimport Cartesian2 from \"../Core/Cartesian2.js\";\r\nimport Check from \"../Core/Check.js\";\r\nimport createGuid from \"../Core/createGuid.js\";\r\nimport defaultValue from \"../Core/defaultValue.js\";\r\nimport defined from \"../Core/defined.js\";\r\nimport destroyObject from \"../Core/destroyObject.js\";\r\nimport DeveloperError from \"../Core/DeveloperError.js\";\r\nimport CesiumMath from \"../Core/Math.js\";\r\nimport PixelFormat from \"../Core/PixelFormat.js\";\r\nimport ContextLimits from \"./ContextLimits.js\";\r\nimport MipmapHint from \"./MipmapHint.js\";\r\nimport PixelDatatype from \"./PixelDatatype.js\";\r\nimport Sampler from \"./Sampler.js\";\r\nimport TextureMagnificationFilter from \"./TextureMagnificationFilter.js\";\r\nimport TextureMinificationFilter from \"./TextureMinificationFilter.js\";\r\n*/\r\n// Texture 本身\r\n/**\r\n * @private\r\n */\r\nfunction Texture(options) {\r\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\r\n \r\n //>>includeStart('debug', pragmas.debug);\r\n Check.defined(\"options.context\", options.context);\r\n //>>includeEnd('debug');\r\n \r\n const context = options.context;\r\n let width = options.width;\r\n let height = options.height;\r\n const source = options.source;\r\n \r\n if (defined(source)) {\r\n if (!defined(width)) {\r\n width = defaultValue(source.videoWidth, source.width);\r\n }\r\n if (!defined(height)) {\r\n height = defaultValue(source.videoHeight, source.height);\r\n }\r\n }\r\n \r\n const pixelFormat = defaultValue(options.pixelFormat, PixelFormat.RGBA);\r\n const pixelDatatype = defaultValue(\r\n options.pixelDatatype,\r\n PixelDatatype.UNSIGNED_BYTE\r\n );\r\n const internalFormat = PixelFormat.toInternalFormat(\r\n pixelFormat,\r\n pixelDatatype,\r\n context\r\n );\r\n \r\n const isCompressed = PixelFormat.isCompressedFormat(internalFormat);\r\n \r\n //>>includeStart('debug', pragmas.debug);\r\n if (!defined(width) || !defined(height)) {\r\n throw new DeveloperError(\r\n \"options requires a source field to create an initialized texture or width and height fields to create a blank texture.\"\r\n );\r\n }\r\n \r\n Check.typeOf.number.greaterThan(\"width\", width, 0);\r\n \r\n if (width > ContextLimits.maximumTextureSize) {\r\n throw new DeveloperError(\r\n `Width must be less than or equal to the maximum texture size (${ContextLimits.maximumTextureSize}). Check maximumTextureSize.`\r\n );\r\n }\r\n \r\n Check.typeOf.number.greaterThan(\"height\", height, 0);\r\n \r\n if (height > ContextLimits.maximumTextureSize) {\r\n throw new DeveloperError(\r\n `Height must be less than or equal to the maximum texture size (${ContextLimits.maximumTextureSize}). Check maximumTextureSize.`\r\n );\r\n }\r\n \r\n if (!PixelFormat.validate(pixelFormat)) {\r\n throw new DeveloperError(\"Invalid options.pixelFormat.\");\r\n }\r\n \r\n if (!isCompressed && !PixelDatatype.validate(pixelDatatype)) {\r\n throw new DeveloperError(\"Invalid options.pixelDatatype.\");\r\n }\r\n \r\n if (\r\n pixelFormat === PixelFormat.DEPTH_COMPONENT &&\r\n pixelDatatype !== PixelDatatype.UNSIGNED_SHORT &&\r\n pixelDatatype !== PixelDatatype.UNSIGNED_INT\r\n ) {\r\n throw new DeveloperError(\r\n \"When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.\"\r\n );\r\n }\r\n \r\n if (\r\n pixelFormat === PixelFormat.DEPTH_STENCIL &&\r\n pixelDatatype !== PixelDatatype.UNSIGNED_INT_24_8\r\n ) {\r\n throw new DeveloperError(\r\n \"When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.\"\r\n );\r\n }\r\n \r\n if (pixelDatatype === PixelDatatype.FLOAT && !context.floatingPointTexture) {\r\n throw new DeveloperError(\r\n \"When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.\"\r\n );\r\n }\r\n \r\n if (\r\n pixelDatatype === PixelDatatype.HALF_FLOAT &&\r\n !context.halfFloatingPointTexture\r\n ) {\r\n throw new DeveloperError(\r\n \"When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.\"\r\n );\r\n }\r\n \r\n if (PixelFormat.isDepthFormat(pixelFormat)) {\r\n if (defined(source)) {\r\n throw new DeveloperError(\r\n \"When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, source cannot be provided.\"\r\n );\r\n }\r\n \r\n if (!context.depthTexture) {\r\n throw new DeveloperError(\r\n \"When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.\"\r\n );\r\n }\r\n }\r\n \r\n if (isCompressed) {\r\n if (!defined(source) || !defined(source.arrayBufferView)) {\r\n throw new DeveloperError(\r\n \"When options.pixelFormat is compressed, options.source.arrayBufferView must be defined.\"\r\n );\r\n }\r\n \r\n if (PixelFormat.isDXTFormat(internalFormat) && !context.s3tc) {\r\n throw new DeveloperError(\r\n \"When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_compressed_texture_s3tc extension. Check context.s3tc.\"\r\n );\r\n } else if (PixelFormat.isPVRTCFormat(internalFormat) && !context.pvrtc) {\r\n throw new DeveloperError(\r\n \"When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_compressed_texture_pvrtc extension. Check context.pvrtc.\"\r\n );\r\n } else if (PixelFormat.isASTCFormat(internalFormat) && !context.astc) {\r\n throw new DeveloperError(\r\n \"When options.pixelFormat is ASTC compressed, this WebGL implementation must support the WEBGL_compressed_texture_astc extension. Check context.astc.\"\r\n );\r\n } else if (PixelFormat.isETC2Format(internalFormat) && !context.etc) {\r\n throw new DeveloperError(\r\n \"When options.pixelFormat is ETC2 compressed, this WebGL implementation must support the WEBGL_compressed_texture_etc extension. Check context.etc.\"\r\n );\r\n } else if (PixelFormat.isETC1Format(internalFormat) && !context.etc1) {\r\n throw new DeveloperError(\r\n \"When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_compressed_texture_etc1 extension. Check context.etc1.\"\r\n );\r\n } else if (PixelFormat.isBC7Format(internalFormat) && !context.bc7) {\r\n throw new DeveloperError(\r\n \"When options.pixelFormat is BC7 compressed, this WebGL implementation must support the EXT_texture_compression_bptc extension. Check context.bc7.\"\r\n );\r\n }\r\n \r\n if (\r\n PixelFormat.compressedTextureSizeInBytes(\r\n internalFormat,\r\n width,\r\n height\r\n ) !== source.arrayBufferView.byteLength\r\n ) {\r\n throw new DeveloperError(\r\n \"The byte length of the array buffer is invalid for the compressed texture with the given width and height.\"\r\n );\r\n }\r\n }\r\n //>>includeEnd('debug');\r\n \r\n // Use premultiplied alpha for opaque textures should perform better on Chrome:\r\n // http://media.tojicode.com/webglCamp4/#20\r\n const preMultiplyAlpha =\r\n options.preMultiplyAlpha ||\r\n pixelFormat === PixelFormat.RGB ||\r\n pixelFormat === PixelFormat.LUMINANCE;\r\n const flipY = defaultValue(options.flipY, true);\r\n const skipColorSpaceConversion = defaultValue(\r\n options.skipColorSpaceConversion,\r\n false\r\n );\r\n \r\n let initialized = true;\r\n \r\n const gl = context._gl;\r\n const textureTarget = gl.TEXTURE_2D;\r\n const texture = gl.createTexture();\r\n \r\n gl.activeTexture(gl.TEXTURE0);\r\n gl.bindTexture(textureTarget, texture);\r\n \r\n let unpackAlignment = 4;\r\n if (defined(source) && defined(source.arrayBufferView) && !isCompressed) {\r\n unpackAlignment = PixelFormat.alignmentInBytes(\r\n pixelFormat,\r\n pixelDatatype,\r\n width\r\n );\r\n }\r\n \r\n gl.pixelStorei(gl.UNPACK_ALIGNMENT, unpackAlignment);\r\n \r\n if (skipColorSpaceConversion) {\r\n gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);\r\n } else {\r\n gl.pixelStorei(\r\n gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,\r\n gl.BROWSER_DEFAULT_WEBGL\r\n );\r\n }\r\n \r\n if (defined(source)) {\r\n if (defined(source.arrayBufferView)) {\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\r\n \r\n // Source: typed array\r\n let arrayBufferView = source.arrayBufferView;\r\n let i, mipWidth, mipHeight;\r\n if (isCompressed) {\r\n gl.compressedTexImage2D(\r\n textureTarget,\r\n 0,\r\n internalFormat,\r\n width,\r\n height,\r\n 0,\r\n arrayBufferView\r\n );\r\n if (defined(source.mipLevels)) {\r\n mipWidth = width;\r\n mipHeight = height;\r\n for (i = 0; i < source.mipLevels.length; ++i) {\r\n mipWidth = Math.floor(mipWidth / 2) | 0;\r\n if (mipWidth < 1) {\r\n mipWidth = 1;\r\n }\r\n mipHeight = Math.floor(mipHeight / 2) | 0;\r\n if (mipHeight < 1) {\r\n mipHeight = 1;\r\n }\r\n gl.compressedTexImage2D(\r\n textureTarget,\r\n i + 1,\r\n internalFormat,\r\n mipWidth,\r\n mipHeight,\r\n 0,\r\n source.mipLevels[i]\r\n );\r\n }\r\n }\r\n } else {\r\n if (flipY) {\r\n arrayBufferView = PixelFormat.flipY(\r\n arrayBufferView,\r\n pixelFormat,\r\n pixelDatatype,\r\n width,\r\n height\r\n );\r\n }\r\n gl.texImage2D(\r\n textureTarget,\r\n 0,\r\n internalFormat,\r\n width,\r\n height,\r\n 0,\r\n pixelFormat,\r\n PixelDatatype.toWebGLConstant(pixelDatatype, context),\r\n arrayBufferView\r\n );\r\n \r\n if (defined(source.mipLevels)) {\r\n mipWidth = width;\r\n mipHeight = height;\r\n for (i = 0; i < source.mipLevels.length; ++i) {\r\n mipWidth = Math.floor(mipWidth / 2) | 0;\r\n if (mipWidth < 1) {\r\n mipWidth = 1;\r\n }\r\n mipHeight = Math.floor(mipHeight / 2) | 0;\r\n if (mipHeight < 1) {\r\n mipHeight = 1;\r\n }\r\n gl.texImage2D(\r\n textureTarget,\r\n i + 1,\r\n internalFormat,\r\n mipWidth,\r\n mipHeight,\r\n 0,\r\n pixelFormat,\r\n PixelDatatype.toWebGLConstant(pixelDatatype, context),\r\n source.mipLevels[i]\r\n );\r\n }\r\n }\r\n }\r\n } else if (defined(source.framebuffer)) {\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\r\n \r\n // Source: framebuffer\r\n if (source.framebuffer !== context.defaultFramebuffer) {\r\n source.framebuffer._bind();\r\n }\r\n \r\n gl.copyTexImage2D(\r\n textureTarget,\r\n 0,\r\n internalFormat,\r\n source.xOffset,\r\n source.yOffset,\r\n width,\r\n height,\r\n 0\r\n );\r\n \r\n if (source.framebuffer !== context.defaultFramebuffer) {\r\n source.framebuffer._unBind();\r\n }\r\n } else {\r\n // Only valid for DOM-Element uploads\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, preMultiplyAlpha);\r\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);\r\n \r\n // Source: ImageData, HTMLImageElement, HTMLCanvasElement, or HTMLVideoElement\r\n gl.texImage2D(\r\n textureTarget,\r\n 0,\r\n internalFormat,\r\n pixelFormat,\r\n PixelDatatype.toWebGLConstant(pixelDatatype, context),\r\n source\r\n );\r\n }\r\n } else {\r\n gl.texImage2D(\r\n textureTarget,\r\n 0,\r\n internalFormat,\r\n width,\r\n height,\r\n 0,\r\n pixelFormat,\r\n PixelDatatype.toWebGLConstant(pixelDatatype, context),\r\n null\r\n );\r\n initialized = false;\r\n }\r\n gl.bindTexture(textureTarget, null);\r\n \r\n let sizeInBytes;\r\n if (isCompressed) {\r\n sizeInBytes = PixelFormat.compressedTextureSizeInBytes(\r\n pixelFormat,\r\n width,\r\n height\r\n );\r\n } else {\r\n sizeInBytes = PixelFormat.textureSizeInBytes(\r\n pixelFormat,\r\n pixelDatatype,\r\n width,\r\n height\r\n );\r\n }\r\n \r\n this._id = createGuid();\r\n this._context = context;\r\n this._textureFilterAnisotropic = context._textureFilterAnisotropic;\r\n this._textureTarget = textureTarget;\r\n this._texture = texture;\r\n this._internalFormat = internalFormat;\r\n this._pixelFormat = pixelFormat;\r\n this._pixelDatatype = pixelDatatype;\r\n this._width = width;\r\n this._height = height;\r\n this._dimensions = new Cartesian2(width, height);\r\n this._hasMipmap = false;\r\n this._sizeInBytes = sizeInBytes;\r\n this._preMultiplyAlpha = preMultiplyAlpha;\r\n this._flipY = flipY;\r\n this._initialized = initialized;\r\n this._sampler = undefined;\r\n \r\n this.sampler = defined(options.sampler) ? options.sampler : new Sampler();\r\n}\r\n\r\n/**\r\n * This function is identical to using the Texture constructor except that it can be\r\n * replaced with a mock/spy in tests.\r\n * @private\r\n */\r\nTexture.create = function (options) {\r\nreturn new Texture(options);\r\n};\r\n\r\n/**\r\n * Creates a texture, and copies a subimage of the framebuffer to it. When called without arguments,\r\n * the texture is the same width and height as the framebuffer and contains its contents.\r\n *\r\n * @param {object} options Object with the following properties:\r\n * @param {Context} options.context The context in which the Texture gets created.\r\n * @param {PixelFormat} [options.pixelFormat=PixelFormat.RGB] The texture's internal pixel format.\r\n * @param {number} [options.framebufferXOffset=0] An offset in the x direction in the framebuffer where copying begins from.\r\n * @param {number} [options.framebufferYOffset=0] An offset in the y direction in the framebuffer where copying begins from.\r\n * @param {number} [options.width=canvas.clientWidth] The width of the texture in texels.\r\n * @param {number} [options.height=canvas.clientHeight] The height of the texture in texels.\r\n * @param {Framebuffer} [options.framebuffer=defaultFramebuffer] The framebuffer from which to create the texture. If this\r\n * parameter is not specified, the default framebuffer is used.\r\n * @returns {Texture} A texture with contents from the framebuffer.\r\n *\r\n * @exception {DeveloperError} Invalid pixelFormat.\r\n * @exception {DeveloperError} pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.\r\n * @exception {DeveloperError} framebufferXOffset must be greater than or equal to zero.\r\n * @exception {DeveloperError} framebufferYOffset must be greater than or equal to zero.\r\n * @exception {DeveloperError} framebufferXOffset + width must be less than or equal to canvas.clientWidth.\r\n * @exception {DeveloperError} framebufferYOffset + height must be less than or equal to canvas.clientHeight.\r\n *\r\n *\r\n * @example\r\n * // Create a texture with the contents of the framebuffer.\r\n * const t = Texture.fromFramebuffer({\r\n * context : context\r\n * });\r\n *\r\n * @see Sampler\r\n *\r\n * @private\r\n */\r\nTexture.fromFramebuffer = function (options) {\r\noptions = defaultValue(options, defaultValue.EMPTY_OBJECT);\r\n\r\n//>>includeStart('debug', pragmas.debug);\r\nCheck.defined(\"options.context\", options.context);\r\n//>>includeEnd('debug');\r\n\r\nconst context = options.context;\r\nconst gl = context._gl;\r\n\r\nconst pixelFormat = defaultValue(options.pixelFormat, PixelFormat.RGB);\r\nconst framebufferXOffset = defaultValue(options.framebufferXOffset, 0);\r\nconst framebufferYOffset = defaultValue(options.framebufferYOffset, 0);\r\nconst width = defaultValue(options.width, gl.drawingBufferWidth);\r\nconst height = defaultValue(options.height, gl.drawingBufferHeight);\r\nconst framebuffer = options.framebuffer;\r\n\r\n//>>includeStart('debug', pragmas.debug);\r\nif (!PixelFormat.validate(pixelFormat)) {\r\n throw new DeveloperError(\"Invalid pixelFormat.\");\r\n}\r\nif (\r\n PixelFormat.isDepthFormat(pixelFormat) ||\r\n PixelFormat.isCompressedFormat(pixelFormat)\r\n) {\r\n throw new DeveloperError(\r\n \"pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.\"\r\n );\r\n}\r\nCheck.defined(\"options.context\", options.context);\r\nCheck.typeOf.number.greaterThanOrEquals(\r\n \"framebufferXOffset\",\r\n framebufferXOffset,\r\n 0\r\n);\r\nCheck.typeOf.number.greaterThanOrEquals(\r\n \"framebufferYOffset\",\r\n framebufferYOffset,\r\n 0\r\n);\r\nif (framebufferXOffset + width > gl.drawingBufferWidth) {\r\n throw new DeveloperError(\r\n \"framebufferXOffset + width must be less than or equal to drawingBufferWidth\"\r\n );\r\n}\r\nif (framebufferYOffset + height > gl.drawingBufferHeight) {\r\n throw new DeveloperError(\r\n \"framebufferYOffset + height must be less than or equal to drawingBufferHeight.\"\r\n );\r\n}\r\n//>>includeEnd('debug');\r\n\r\nconst texture = new Texture({\r\n context: context,\r\n width: width,\r\n height: height,\r\n pixelFormat: pixelFormat,\r\n source: {\r\n framebuffer: defined(framebuffer)\r\n ? framebuffer\r\n : context.defaultFramebuffer,\r\n xOffset: framebufferXOffset,\r\n yOffset: framebufferYOffset,\r\n width: width,\r\n height: height,\r\n },\r\n});\r\n\r\nreturn texture;\r\n};\r\n\r\nObject.defineProperties(Texture.prototype, {\r\n/**\r\n * A unique id for the texture\r\n * @memberof Texture.prototype\r\n * @type {string}\r\n * @readonly\r\n * @private\r\n */\r\nid: {\r\n get: function () {\r\n return this._id;\r\n },\r\n},\r\n/**\r\n * The sampler to use when sampling this texture.\r\n * Create a sampler by calling {@link Sampler}. If this\r\n * parameter is not specified, a default sampler is used. The default sampler clamps texture\r\n * coordinates in both directions, uses linear filtering for both magnification and minification,\r\n * and uses a maximum anisotropy of 1.0.\r\n * @memberof Texture.prototype\r\n * @type {object}\r\n */\r\nsampler: {\r\n get: function () {\r\n return this._sampler;\r\n },\r\n set: function (sampler) {\r\n let minificationFilter = sampler.minificationFilter;\r\n let magnificationFilter = sampler.magnificationFilter;\r\n const context = this._context;\r\n const pixelFormat = this._pixelFormat;\r\n const pixelDatatype = this._pixelDatatype;\r\n\r\n const mipmap =\r\n minificationFilter ===\r\n TextureMinificationFilter.NEAREST_MIPMAP_NEAREST ||\r\n minificationFilter ===\r\n TextureMinificationFilter.NEAREST_MIPMAP_LINEAR ||\r\n minificationFilter ===\r\n TextureMinificationFilter.LINEAR_MIPMAP_NEAREST ||\r\n minificationFilter === TextureMinificationFilter.LINEAR_MIPMAP_LINEAR;\r\n\r\n // float textures only support nearest filtering unless the linear extensions are supported, so override the sampler's settings\r\n if (\r\n (pixelDatatype === PixelDatatype.FLOAT &&\r\n !context.textureFloatLinear) ||\r\n (pixelDatatype === PixelDatatype.HALF_FLOAT &&\r\n !context.textureHalfFloatLinear)\r\n ) {\r\n minificationFilter = mipmap\r\n ? TextureMinificationFilter.NEAREST_MIPMAP_NEAREST\r\n : TextureMinificationFilter.NEAREST;\r\n magnificationFilter = TextureMagnificationFilter.NEAREST;\r\n }\r\n\r\n // WebGL 2 depth texture only support nearest filtering. See section 3.8.13 OpenGL ES 3 spec\r\n if (context.webgl2) {\r\n if (PixelFormat.isDepthFormat(pixelFormat)) {\r\n minificationFilter = TextureMinificationFilter.NEAREST;\r\n magnificationFilter = TextureMagnificationFilter.NEAREST;\r\n }\r\n }\r\n\r\n const gl = context._gl;\r\n const target = this._textureTarget;\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n gl.bindTexture(target, this._texture);\r\n gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, minificationFilter);\r\n gl.texParameteri(target, gl.TEXTURE_MAG_FILTER, magnificationFilter);\r\n gl.texParameteri(target, gl.TEXTURE_WRAP_S, sampler.wrapS);\r\n gl.texParameteri(target, gl.TEXTURE_WRAP_T, sampler.wrapT);\r\n if (defined(this._textureFilterAnisotropic)) {\r\n gl.texParameteri(\r\n target,\r\n this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,\r\n sampler.maximumAnisotropy\r\n );\r\n }\r\n gl.bindTexture(target, null);\r\n\r\n this._sampler = sampler;\r\n },\r\n},\r\npixelFormat: {\r\n get: function () {\r\n return this._pixelFormat;\r\n },\r\n},\r\npixelDatatype: {\r\n get: function () {\r\n return this._pixelDatatype;\r\n },\r\n},\r\ndimensions: {\r\n get: function () {\r\n return this._dimensions;\r\n },\r\n},\r\npreMultiplyAlpha: {\r\n get: function () {\r\n return this._preMultiplyAlpha;\r\n },\r\n},\r\nflipY: {\r\n get: function () {\r\n return this._flipY;\r\n },\r\n},\r\nwidth: {\r\n get: function () {\r\n return this._width;\r\n },\r\n},\r\nheight: {\r\n get: function () {\r\n return this._height;\r\n },\r\n},\r\nsizeInBytes: {\r\n get: function () {\r\n if (this._hasMipmap) {\r\n return Math.floor((this._sizeInBytes * 4) / 3);\r\n }\r\n return this._sizeInBytes;\r\n },\r\n},\r\n_target: {\r\n get: function () {\r\n return this._textureTarget;\r\n },\r\n},\r\n});\r\n\r\n/**\r\n * Copy new image data into this texture, from a source {@link ImageData}, {@link HTMLImageElement}, {@link HTMLCanvasElement}, or {@link HTMLVideoElement}.\r\n * or an object with width, height, and arrayBufferView properties.\r\n * @param {object} options Object with the following properties:\r\n * @param {object} options.source The source {@link ImageData}, {@link HTMLImageElement}, {@link HTMLCanvasElement}, or {@link HTMLVideoElement},\r\n * or an object with width, height, and arrayBufferView properties.\r\n * @param {number} [options.xOffset=0] The offset in the x direction within the texture to copy into.\r\n * @param {number} [options.yOffset=0] The offset in the y direction within the texture to copy into.\r\n * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the texture will be ignored.\r\n *\r\n * @exception {DeveloperError} Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.\r\n * @exception {DeveloperError} Cannot call copyFrom with a compressed texture pixel format.\r\n * @exception {DeveloperError} xOffset must be greater than or equal to zero.\r\n * @exception {DeveloperError} yOffset must be greater than or equal to zero.\r\n * @exception {DeveloperError} xOffset + source.width must be less than or equal to width.\r\n * @exception {DeveloperError} yOffset + source.height must be less than or equal to height.\r\n * @exception {DeveloperError} This texture was destroyed, i.e., destroy() was called.\r\n *\r\n * @example\r\n * texture.copyFrom({\r\n * source: {\r\n * width : 1,\r\n * height : 1,\r\n * arrayBufferView : new Uint8Array([255, 0, 0, 255])\r\n * }\r\n * });\r\n */\r\nTexture.prototype.copyFrom = function (options) {\r\n//>>includeStart('debug', pragmas.debug);\r\nCheck.defined(\"options\", options);\r\n//>>includeEnd('debug');\r\n\r\nconst xOffset = defaultValue(options.xOffset, 0);\r\nconst yOffset = defaultValue(options.yOffset, 0);\r\n\r\n//>>includeStart('debug', pragmas.debug);\r\nCheck.defined(\"options.source\", options.source);\r\nif (PixelFormat.isDepthFormat(this._pixelFormat)) {\r\n throw new DeveloperError(\r\n \"Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.\"\r\n );\r\n}\r\nif (PixelFormat.isCompressedFormat(this._pixelFormat)) {\r\n throw new DeveloperError(\r\n \"Cannot call copyFrom with a compressed texture pixel format.\"\r\n );\r\n}\r\nCheck.typeOf.number.greaterThanOrEquals(\"xOffset\", xOffset, 0);\r\nCheck.typeOf.number.greaterThanOrEquals(\"yOffset\", yOffset, 0);\r\nCheck.typeOf.number.lessThanOrEquals(\r\n \"xOffset + options.source.width\",\r\n xOffset + options.source.width,\r\n this._width\r\n);\r\nCheck.typeOf.number.lessThanOrEquals(\r\n \"yOffset + options.source.height\",\r\n yOffset + options.source.height,\r\n this._height\r\n);\r\n//>>includeEnd('debug');\r\n\r\nconst source = options.source;\r\n\r\nconst context = this._context;\r\nconst gl = context._gl;\r\nconst target = this._textureTarget;\r\n\r\ngl.activeTexture(gl.TEXTURE0);\r\ngl.bindTexture(target, this._texture);\r\n\r\nconst width = source.width;\r\nconst height = source.height;\r\nlet arrayBufferView = source.arrayBufferView;\r\n\r\nconst textureWidth = this._width;\r\nconst textureHeight = this._height;\r\nconst internalFormat = this._internalFormat;\r\nconst pixelFormat = this._pixelFormat;\r\nconst pixelDatatype = this._pixelDatatype;\r\n\r\nconst preMultiplyAlpha = this._preMultiplyAlpha;\r\nconst flipY = this._flipY;\r\nconst skipColorSpaceConversion = defaultValue(\r\n options.skipColorSpaceConversion,\r\n false\r\n);\r\n\r\nlet unpackAlignment = 4;\r\nif (defined(arrayBufferView)) {\r\n unpackAlignment = PixelFormat.alignmentInBytes(\r\n pixelFormat,\r\n pixelDatatype,\r\n width\r\n );\r\n}\r\n\r\ngl.pixelStorei(gl.UNPACK_ALIGNMENT, unpackAlignment);\r\n\r\nif (skipColorSpaceConversion) {\r\n gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);\r\n} else {\r\n gl.pixelStorei(\r\n gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,\r\n gl.BROWSER_DEFAULT_WEBGL\r\n );\r\n}\r\n\r\nlet uploaded = false;\r\nif (!this._initialized) {\r\n if (\r\n xOffset === 0 &&\r\n yOffset === 0 &&\r\n width === textureWidth &&\r\n height === textureHeight\r\n ) {\r\n // initialize the entire texture\r\n if (defined(arrayBufferView)) {\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\r\n\r\n if (flipY) {\r\n arrayBufferView = PixelFormat.flipY(\r\n arrayBufferView,\r\n pixelFormat,\r\n pixelDatatype,\r\n textureWidth,\r\n textureHeight\r\n );\r\n }\r\n gl.texImage2D(\r\n target,\r\n 0,\r\n internalFormat,\r\n textureWidth,\r\n textureHeight,\r\n 0,\r\n pixelFormat,\r\n PixelDatatype.toWebGLConstant(pixelDatatype, context),\r\n arrayBufferView\r\n );\r\n } else {\r\n // Only valid for DOM-Element uploads\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, preMultiplyAlpha);\r\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);\r\n\r\n gl.texImage2D(\r\n target,\r\n 0,\r\n internalFormat,\r\n pixelFormat,\r\n PixelDatatype.toWebGLConstant(pixelDatatype, context),\r\n source\r\n );\r\n }\r\n uploaded = true;\r\n } else {\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\r\n\r\n // initialize the entire texture to zero\r\n const bufferView = PixelFormat.createTypedArray(\r\n pixelFormat,\r\n pixelDatatype,\r\n textureWidth,\r\n textureHeight\r\n );\r\n gl.texImage2D(\r\n target,\r\n 0,\r\n internalFormat,\r\n textureWidth,\r\n textureHeight,\r\n 0,\r\n pixelFormat,\r\n PixelDatatype.toWebGLConstant(pixelDatatype, context),\r\n bufferView\r\n );\r\n }\r\n this._initialized = true;\r\n}\r\n\r\nif (!uploaded) {\r\n if (defined(arrayBufferView)) {\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\r\n\r\n if (flipY) {\r\n arrayBufferView = PixelFormat.flipY(\r\n arrayBufferView,\r\n pixelFormat,\r\n pixelDatatype,\r\n width,\r\n height\r\n );\r\n }\r\n gl.texSubImage2D(\r\n target,\r\n 0,\r\n xOffset,\r\n yOffset,\r\n width,\r\n height,\r\n pixelFormat,\r\n PixelDatatype.toWebGLConstant(pixelDatatype, context),\r\n arrayBufferView\r\n );\r\n } else {\r\n // Only valid for DOM-Element uploads\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, preMultiplyAlpha);\r\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);\r\n\r\n gl.texSubImage2D(\r\n target,\r\n 0,\r\n xOffset,\r\n yOffset,\r\n pixelFormat,\r\n PixelDatatype.toWebGLConstant(pixelDatatype, context),\r\n source\r\n );\r\n }\r\n}\r\n\r\ngl.bindTexture(target, null);\r\n};\r\n\r\n/**\r\n * @param {number} [xOffset=0] The offset in the x direction within the texture to copy into.\r\n * @param {number} [yOffset=0] The offset in the y direction within the texture to copy into.\r\n * @param {number} [framebufferXOffset=0] optional\r\n * @param {number} [framebufferYOffset=0] optional\r\n * @param {number} [width=width] optional\r\n * @param {number} [height=height] optional\r\n *\r\n * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.\r\n * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.\r\n * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.\r\n * @exception {DeveloperError} Cannot call copyFrom with a compressed texture pixel format.\r\n * @exception {DeveloperError} This texture was destroyed, i.e., destroy() was called.\r\n * @exception {DeveloperError} xOffset must be greater than or equal to zero.\r\n * @exception {DeveloperError} yOffset must be greater than or equal to zero.\r\n * @exception {DeveloperError} framebufferXOffset must be greater than or equal to zero.\r\n * @exception {DeveloperError} framebufferYOffset must be greater than or equal to zero.\r\n * @exception {DeveloperError} xOffset + width must be less than or equal to width.\r\n * @exception {DeveloperError} yOffset + height must be less than or equal to height.\r\n */\r\nTexture.prototype.copyFromFramebuffer = function (\r\nxOffset,\r\nyOffset,\r\nframebufferXOffset,\r\nframebufferYOffset,\r\nwidth,\r\nheight\r\n) {\r\nxOffset = defaultValue(xOffset, 0);\r\nyOffset = defaultValue(yOffset, 0);\r\nframebufferXOffset = defaultValue(framebufferXOffset, 0);\r\nframebufferYOffset = defaultValue(framebufferYOffset, 0);\r\nwidth = defaultValue(width, this._width);\r\nheight = defaultValue(height, this._height);\r\n\r\n//>>includeStart('debug', pragmas.debug);\r\nif (PixelFormat.isDepthFormat(this._pixelFormat)) {\r\n throw new DeveloperError(\r\n \"Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.\"\r\n );\r\n}\r\nif (this._pixelDatatype === PixelDatatype.FLOAT) {\r\n throw new DeveloperError(\r\n \"Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.\"\r\n );\r\n}\r\nif (this._pixelDatatype === PixelDatatype.HALF_FLOAT) {\r\n throw new DeveloperError(\r\n \"Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.\"\r\n );\r\n}\r\nif (PixelFormat.isCompressedFormat(this._pixelFormat)) {\r\n throw new DeveloperError(\r\n \"Cannot call copyFrom with a compressed texture pixel format.\"\r\n );\r\n}\r\n\r\nCheck.typeOf.number.greaterThanOrEquals(\"xOffset\", xOffset, 0);\r\nCheck.typeOf.number.greaterThanOrEquals(\"yOffset\", yOffset, 0);\r\nCheck.typeOf.number.greaterThanOrEquals(\r\n \"framebufferXOffset\",\r\n framebufferXOffset,\r\n 0\r\n);\r\nCheck.typeOf.number.greaterThanOrEquals(\r\n \"framebufferYOffset\",\r\n framebufferYOffset,\r\n 0\r\n);\r\nCheck.typeOf.number.lessThanOrEquals(\r\n \"xOffset + width\",\r\n xOffset + width,\r\n this._width\r\n);\r\nCheck.typeOf.number.lessThanOrEquals(\r\n \"yOffset + height\",\r\n yOffset + height,\r\n this._height\r\n);\r\n//>>includeEnd('debug');\r\n\r\nconst gl = this._context._gl;\r\nconst target = this._textureTarget;\r\n\r\ngl.activeTexture(gl.TEXTURE0);\r\ngl.bindTexture(target, this._texture);\r\ngl.copyTexSubImage2D(\r\n target,\r\n 0,\r\n xOffset,\r\n yOffset,\r\n framebufferXOffset,\r\n framebufferYOffset,\r\n width,\r\n height\r\n);\r\ngl.bindTexture(target, null);\r\nthis._initialized = true;\r\n};\r\n\r\n/**\r\n * @param {MipmapHint} [hint=MipmapHint.DONT_CARE] optional.\r\n *\r\n * @exception {DeveloperError} Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.\r\n * @exception {DeveloperError} Cannot call generateMipmap when the texture pixel format is a compressed format.\r\n * @exception {DeveloperError} hint is invalid.\r\n * @exception {DeveloperError} This texture's width must be a power of two to call generateMipmap() in a WebGL1 context.\r\n * @exception {DeveloperError} This texture's height must be a power of two to call generateMipmap() in a WebGL1 context.\r\n * @exception {DeveloperError} This texture was destroyed, i.e., destroy() was called.\r\n */\r\nTexture.prototype.generateMipmap = function (hint) {\r\nhint = defaultValue(hint, MipmapHint.DONT_CARE);\r\n\r\n//>>includeStart('debug', pragmas.debug);\r\nif (PixelFormat.isDepthFormat(this._pixelFormat)) {\r\n throw new DeveloperError(\r\n \"Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.\"\r\n );\r\n}\r\nif (PixelFormat.isCompressedFormat(this._pixelFormat)) {\r\n throw new DeveloperError(\r\n \"Cannot call generateMipmap with a compressed pixel format.\"\r\n );\r\n}\r\nif (!this._context.webgl2) {\r\n if (this._width > 1 && !CesiumMath.isPowerOfTwo(this._width)) {\r\n throw new DeveloperError(\r\n \"width must be a power of two to call generateMipmap() in a WebGL1 context.\"\r\n );\r\n }\r\n if (this._height > 1 && !CesiumMath.isPowerOfTwo(this._height)) {\r\n throw new DeveloperError(\r\n \"height must be a power of two to call generateMipmap() in a WebGL1 context.\"\r\n );\r\n }\r\n}\r\nif (!MipmapHint.validate(hint)) {\r\n throw new DeveloperError(\"hint is invalid.\");\r\n}\r\n//>>includeEnd('debug');\r\n\r\nthis._hasMipmap = true;\r\n\r\nconst gl = this._context._gl;\r\nconst target = this._textureTarget;\r\n\r\ngl.hint(gl.GENERATE_MIPMAP_HINT, hint);\r\ngl.activeTexture(gl.TEXTURE0);\r\ngl.bindTexture(target, this._texture);\r\ngl.generateMipmap(target);\r\ngl.bindTexture(target, null);\r\n};\r\n\r\nTexture.prototype.isDestroyed = function () {\r\nreturn false;\r\n};\r\n\r\nTexture.prototype.destroy = function () {\r\nthis._context._gl.deleteTexture(this._texture);\r\nreturn destroyObject(this);\r\n};\r\nexport default Texture;"],"names":["calculateSomething","self","onmessage","event","data","postMessage","success","error","message","input","Texture","options","defaultValue","EMPTY_OBJECT","Check","defined","context","width","height","source","videoWidth","videoHeight","pixelFormat","PixelFormat","RGBA","pixelDatatype","PixelDatatype","UNSIGNED_BYTE","internalFormat","toInternalFormat","isCompressed","isCompressedFormat","DeveloperError","typeOf","number","greaterThan","ContextLimits","maximumTextureSize","validate","DEPTH_COMPONENT","UNSIGNED_SHORT","UNSIGNED_INT","DEPTH_STENCIL","UNSIGNED_INT_24_8","FLOAT","floatingPointTexture","HALF_FLOAT","halfFloatingPointTexture","isDepthFormat","depthTexture","arrayBufferView","isDXTFormat","s3tc","isPVRTCFormat","pvrtc","isASTCFormat","astc","isETC2Format","etc","isETC1Format","etc1","isBC7Format","bc7","compressedTextureSizeInBytes","byteLength","preMultiplyAlpha","RGB","LUMINANCE","flipY","skipColorSpaceConversion","initialized","gl","_gl","textureTarget","TEXTURE_2D","texture","createTexture","activeTexture","TEXTURE0","bindTexture","unpackAlignment","alignmentInBytes","pixelStorei","UNPACK_ALIGNMENT","UNPACK_COLORSPACE_CONVERSION_WEBGL","NONE","BROWSER_DEFAULT_WEBGL","UNPACK_PREMULTIPLY_ALPHA_WEBGL","UNPACK_FLIP_Y_WEBGL","i","mipWidth","mipHeight","compressedTexImage2D","mipLevels","length","Math","floor","texImage2D","toWebGLConstant","framebuffer","defaultFramebuffer","_bind","copyTexImage2D","xOffset","yOffset","_unBind","sizeInBytes","textureSizeInBytes","_id","createGuid","_context","_textureFilterAnisotropic","_textureTarget","_texture","_internalFormat","_pixelFormat","_pixelDatatype","_width","_height","_dimensions","Cartesian2","_hasMipmap","_sizeInBytes","_preMultiplyAlpha","_flipY","_initialized","_sampler","undefined","sampler","Sampler","create","fromFramebuffer","framebufferXOffset","framebufferYOffset","drawingBufferWidth","drawingBufferHeight","greaterThanOrEquals","Object","defineProperties","prototype","id","get","set","minificationFilter","magnificationFilter","mipmap","TextureMinificationFilter","NEAREST_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_NEAREST","LINEAR_MIPMAP_LINEAR","textureFloatLinear","textureHalfFloatLinear","NEAREST","TextureMagnificationFilter","webgl2","target","texParameteri","TEXTURE_MIN_FILTER","TEXTURE_MAG_FILTER","TEXTURE_WRAP_S","wrapS","TEXTURE_WRAP_T","wrapT","TEXTURE_MAX_ANISOTROPY_EXT","maximumAnisotropy","dimensions","_target","copyFrom","lessThanOrEquals","textureWidth","textureHeight","uploaded","bufferView","createTypedArray","texSubImage2D","copyFromFramebuffer","copyTexSubImage2D","generateMipmap","hint","MipmapHint","DONT_CARE","CesiumMath","isPowerOfTwo","GENERATE_MIPMAP_HINT","isDestroyed","destroy","deleteTexture","destroyObject"],"sourceRoot":""}