You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
18 KiB
2 lines
18 KiB
2 years ago
|
!function(_,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((_||self).KTX={})}(this,function(_){var t=function(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null},e=/*#__PURE__*/function(){function _(_,t,e,R){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(_.buffer,_.byteOffset+t,e),this._littleEndian=R,this._offset=0}var t=_.prototype;return t._nextUint8=function(){var _=this._dataView.getUint8(this._offset);return this._offset+=1,_},t._nextUint16=function(){var _=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,_},t._nextUint32=function(){var _=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,_},t._nextUint64=function(){var _=this._dataView.getUint32(this._offset,this._littleEndian),t=this._dataView.getUint32(this._offset+4,this._littleEndian),e=_+Math.pow(2,32)*t;return this._offset+=8,e},t._nextInt32=function(){var _=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,_},t._skip=function(_){return this._offset+=_,this},t._scan=function(_,t){void 0===t&&(t=0);for(var e=this._offset,R=0;this._dataView.getUint8(this._offset)!==t&&R<_;)R++,this._offset++;return R<_&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+e,R)},_}(),R=new Uint8Array([0]),n=[171,75,84,88,32,50,48,187,13,10,26,10];function A(){return A=Object.assign?Object.assign.bind():function(_){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var R in e)Object.prototype.hasOwnProperty.call(e,R)&&(_[R]=e[R])}return _},A.apply(this,arguments)}function O(_,t){(null==t||t>_.length)&&(t=_.length);for(var e=0,R=new Array(t);e<t;e++)R[e]=_[e];return R}function i(_,t){var e="undefined"!=typeof Symbol&&_[Symbol.iterator]||_["@@iterator"];if(e)return(e=e.call(_)).next.bind(e);if(Array.isArray(_)||(e=function(_,t){if(_){if("string"==typeof _)return O(_,t);var e=Object.prototype.toString.call(_).slice(8,-1);return"Object"===e&&_.constructor&&(e=_.constructor.name),"Map"===e||"Set"===e?Array.from(_):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?O(_,t):void 0}}(_))||t&&_&&"number"==typeof _.length){e&&(_=e);var R=0;return function(){return R>=_.length?{done:!0}:{done:!1,value:_[R++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(_){return"undefined"!=typeof TextEncoder?(new TextEncoder).encode(_):Buffer.from(_)}function K(_){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(_):Buffer.from(_).toString("utf8")}function r(_){for(var t,e=0,R=i(_);!(t=R()).done;)e+=t.value.byteLength;for(var n,A=new Uint8Array(e),O=0,T=i(_);!(n=T()).done;){var K=n.value;A.set(new Uint8Array(K),O),O+=K.byteLength}return A}var a={keepWriter:!1};_.KDF_DF_MODEL_UASTC=166,_.KHR_DF_CHANNEL_RGBSDA_ALPHA=15,_.KHR_DF_CHANNEL_RGBSDA_BLUE=2,_.KHR_DF_CHANNEL_RGBSDA_DEPTH=14,_.KHR_DF_CHANNEL_RGBSDA_GREEN=1,_.KHR_DF_CHANNEL_RGBSDA_RED=0,_.KHR_DF_CHANNEL_RGBSDA_STENCIL=13,_.KHR_DF_FLAG_ALPHA_PREMULTIPLIED=1,_.KHR_DF_FLAG_ALPHA_STRAIGHT=0,_.KHR_DF_KHR_DESCRIPTORTYPE_BASICFORMAT=0,_.KHR_DF_MODEL_ASTC=162,_.KHR_DF_MODEL_ETC1=160,_.KHR_DF_MODEL_ETC1S=163,_.KHR_DF_MODEL_ETC2=161,_.KHR_DF_MODEL_RGBSDA=1,_.KHR_DF_MODEL_UNSPECIFIED=0,_.KHR_DF_PRIMARIES_ACES=6,_.KHR_DF_PRIMARIES_ACESCC=7,_.KHR_DF_PRIMARIES_ADOBERGB=11,_.KHR_DF_PRIMARIES_BT2020=4,_.KHR_DF_PRIMARIES_BT601_EBU=2,_.KHR_DF_PRIMARIES_BT601_SMPTE=3,_.KHR_DF_PRIMARIES_BT709=1,_.KHR_DF_PRIMARIES_CIEXYZ=5,_.KHR_DF_PRIMARIES_DISPLAYP3=10,_.KHR_DF_PRIMARIES_NTSC1953=8,_.KHR_DF_PRIM
|