Agriculture-front-end/dist/Cesium/Workers/transcodeKTX2.js

2 lines
24 KiB
JavaScript
Raw Normal View History

2023-04-23 09:41:12 +08:00
define(["./defaultValue-f6d5e6da","./WebGLConstants-7f557f93","./RuntimeError-9b4ce3fb","./createTaskProcessorWorker"],(function(_,R,t,e){"use strict";const A={UNSIGNED_BYTE:R.WebGLConstants.UNSIGNED_BYTE,UNSIGNED_SHORT:R.WebGLConstants.UNSIGNED_SHORT,UNSIGNED_INT:R.WebGLConstants.UNSIGNED_INT,FLOAT:R.WebGLConstants.FLOAT,HALF_FLOAT:R.WebGLConstants.HALF_FLOAT_OES,UNSIGNED_INT_24_8:R.WebGLConstants.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:R.WebGLConstants.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:R.WebGLConstants.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:R.WebGLConstants.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(_,t){switch(_){case A.UNSIGNED_BYTE:return R.WebGLConstants.UNSIGNED_BYTE;case A.UNSIGNED_SHORT:return R.WebGLConstants.UNSIGNED_SHORT;case A.UNSIGNED_INT:return R.WebGLConstants.UNSIGNED_INT;case A.FLOAT:return R.WebGLConstants.FLOAT;case A.HALF_FLOAT:return t.webgl2?R.WebGLConstants.HALF_FLOAT:R.WebGLConstants.HALF_FLOAT_OES;case A.UNSIGNED_INT_24_8:return R.WebGLConstants.UNSIGNED_INT_24_8;case A.UNSIGNED_SHORT_4_4_4_4:return R.WebGLConstants.UNSIGNED_SHORT_4_4_4_4;case A.UNSIGNED_SHORT_5_5_5_1:return R.WebGLConstants.UNSIGNED_SHORT_5_5_5_1;case A.UNSIGNED_SHORT_5_6_5:return A.UNSIGNED_SHORT_5_6_5}},isPacked:function(_){return _===A.UNSIGNED_INT_24_8||_===A.UNSIGNED_SHORT_4_4_4_4||_===A.UNSIGNED_SHORT_5_5_5_1||_===A.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(_){switch(_){case A.UNSIGNED_BYTE:return 1;case A.UNSIGNED_SHORT:case A.UNSIGNED_SHORT_4_4_4_4:case A.UNSIGNED_SHORT_5_5_5_1:case A.UNSIGNED_SHORT_5_6_5:case A.HALF_FLOAT:return 2;case A.UNSIGNED_INT:case A.FLOAT:case A.UNSIGNED_INT_24_8:return 4}},validate:function(_){return _===A.UNSIGNED_BYTE||_===A.UNSIGNED_SHORT||_===A.UNSIGNED_INT||_===A.FLOAT||_===A.HALF_FLOAT||_===A.UNSIGNED_INT_24_8||_===A.UNSIGNED_SHORT_4_4_4_4||_===A.UNSIGNED_SHORT_5_5_5_1||_===A.UNSIGNED_SHORT_5_6_5}};var T=Object.freeze(A);const O={DEPTH_COMPONENT:R.WebGLConstants.DEPTH_COMPONENT,DEPTH_STENCIL:R.WebGLConstants.DEPTH_STENCIL,ALPHA:R.WebGLConstants.ALPHA,RED:R.WebGLConstants.RED,RG:R.WebGLConstants.RG,RGB:R.WebGLConstants.RGB,RGBA:R.WebGLConstants.RGBA,LUMINANCE:R.WebGLConstants.LUMINANCE,LUMINANCE_ALPHA:R.WebGLConstants.LUMINANCE_ALPHA,RGB_DXT1:R.WebGLConstants.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:R.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:R.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:R.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:R.WebGLConstants.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:R.WebGLConstants.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:R.WebGLConstants.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:R.WebGLConstants.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:R.WebGLConstants.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:R.WebGLConstants.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:R.WebGLConstants.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:R.WebGLConstants.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:R.WebGLConstants.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(_){switch(_){case O.RGB:return 3;case O.RGBA:return 4;case O.LUMINANCE_ALPHA:case O.RG:return 2;case O.ALPHA:case O.RED:case O.LUMINANCE:default:return 1}},validate:function(_){return _===O.DEPTH_COMPONENT||_===O.DEPTH_STENCIL||_===O.ALPHA||_===O.RED||_===O.RG||_===O.RGB||_===O.RGBA||_===O.LUMINANCE||_===O.LUMINANCE_ALPHA||_===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5||_===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1||_===O.RGBA_ASTC||_===O.RGB_ETC1||_===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC||_===O.RGBA_BC7},isColorFormat:function(_){return _===O.ALPHA||_===O.RGB||_===O.RGBA||_===O.LUMINANCE||_===O.LUMINANCE_ALPHA},isDepthFormat:function(_){return _===O.DEPTH_COMPONENT||_===O.DEPTH_STENCIL},isCompressedFormat:function(_){return _===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5||_===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1||_===O.RGBA_ASTC||_===O.RGB_ETC1||_===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC||_===O.RGBA_BC7},isDXTFormat:function(_)