tsg-web/public/Cesium/Workers/transcodeKTX2.js

57 lines
59 KiB
JavaScript
Raw Normal View History

2025-08-07 13:14:50 +08:00
/**
* @license
* Cesium - https://github.com/CesiumGS/cesium
* Version 1.132
*
* Copyright 2011-2022 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
*/
import{a as on}from"./chunk-WZDE3RYP.js";import{a as f}from"./chunk-OSW76XDF.js";import{a as re}from"./chunk-ED5JPB3S.js";import{b as sn}from"./chunk-LEYMRMBK.js";import{a as Vt,c as rr,d as sr,e as Le}from"./chunk-VTAIKJXX.js";var cn=rr((ot,pt)=>{var Pt=function(){var s=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(s=s||__filename),function(T){T=T||{};var r=typeof T<"u"?T:{},M,B;r.ready=new Promise(function(e,t){M=e,B=t});var E={},F;for(F in r)r.hasOwnProperty(F)&&(E[F]=r[F]);var L=[],D="./this.program",b=function(e,t){throw t},N=!1,d=!1,P=!1,Q=!1;N=typeof window=="object",d=typeof importScripts=="function",P=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",Q=!N&&!P&&!d;var O="";function W(e){return r.locateFile?r.locateFile(e,O):O+e}var J,ae,j,Ke,Ce,Fe;P?(d?O=Vt("path").dirname(O)+"/":O=__dirname+"/",J=function(t,n){return Ce||(Ce=Vt("fs")),Fe||(Fe=Vt("path")),t=Fe.normalize(t),Ce.readFileSync(t,n?null:"utf8")},j=function(t){var n=J(t,!0);return n.buffer||(n=new Uint8Array(n)),I(n.buffer),n},process.argv.length>1&&(D=process.argv[1].replace(/\\/g,"/")),L=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof nr))throw e}),process.on("unhandledRejection",Oe),b=function(e){process.exit(e)},r.inspect=function(){return"[Emscripten Module object]"}):Q?(typeof read<"u"&&(J=function(t){return read(t)}),j=function(t){var n;return typeof readbuffer=="function"?new Uint8Array(readbuffer(t)):(n=read(t,"binary"),I(typeof n=="object"),n)},typeof scriptArgs<"u"?L=scriptArgs:typeof arguments<"u"&&(L=arguments),typeof quit=="function"&&(b=function(e){quit(e)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(N||d)&&(d?O=self.location.href:typeof document<"u"&&document.currentScript&&(O=document.currentScript.src),s&&(O=s),O.indexOf("blob:")!==0?O=O.substr(0,O.lastIndexOf("/")+1):O="",J=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(j=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),ae=function(e,t,n){var _=new XMLHttpRequest;_.open("GET",e,!0),_.responseType="arraybuffer",_.onload=function(){if(_.status==200||_.status==0&&_.response){t(_.response);return}n()},_.onerror=n,_.send(null)},Ke=function(e){document.title=e});var it=r.print||console.log.bind(console),se=r.printErr||console.warn.bind(console);for(F in E)E.hasOwnProperty(F)&&(r[F]=E[F]);E=null,r.arguments&&(L=r.arguments),r.thisProgram&&(D=r.thisProgram),r.quit&&(b=r.quit);var Rt=0,Ut=function(e){Rt=e},oe;r.wasmBinary&&(oe=r.wasmBinary);var On=r.noExitRuntime||!0;typeof WebAssembly!="object"&&Oe("no native wasm support detected");var de,Ie=!1,ce;function I(e,t){e||Oe("Assertion failed: "+t)}var be=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function we(e,t,n){for(var _=t+n,o=t;e[o]&&!(o>=_);)++o;if(o-t>16&&e.subarray&&be)return be.decode(e.subarray(t,o));for(var c="";t<o;){var A=e[t++];if(!(A&128)){c+=String.fromCharCode(A);continue}var R=e[t++]&63;if((A&224)==192){c+=String.fromCharCode((A&31)<<6|R);continue}var a=e[t++]&63;if((A&240)==224?A=(A&15)<<12|R<<6|a:A=(A&7)<<18|R<<12|a<<6|e[t++]&63,A<65536)c+=String.fromCharCode(A);else{var u=A-65536;c+=String.fromCharCode(55296|u>>10,56320|u&1023)}}return c}function Ge(e,t){return e?we(p,e,t):""}function He(e,t,n,_){if(!(_>0))return 0;for(var o=n,c=n+_-1,A=0;A<e.length;++A){var R=e.charCodeAt(A);if(R>=55296&&R<=57343){var a=e.charCodeAt(++A);R=65536+((R&1023)<<10)|a&1023}if(R<=127){if(n>=c)break;t[n++]=R}else if(R<=2047){if(n+1>=c)break;t[n++]=192|R>>6,t[n++]=128|R&63}else if(R<=65535){if(n+2>=c)break;t[n++]=224|R>>12,t[n++]=128|R>>6&63,t[n++]=128|R&63}else{if(n+3>=c)break;t[n++]=240|R>>18,t[n++]=128|R>>12&63,t[n++]=128|R>>6&63,t[n++]=128|R&63}}return t[n]=0,n-o}function Xe(e,t,n){return He(e,p,t,n)}function at(e){for(var t=0,n=0;n<e.length;++n){var _=e.charCodeAt(n)
"use strict"; return body.apply(this, arguments);
};
`)(t)}function Ot(e,t){var n=Ze(t,function(_){this.name=t,this.message=_;var o=new Error(_).stack;o!==void 0&&(this.stack=this.toString()+`
`+o.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},n}var Ht=void 0;function Qe(e){throw new Ht(e)}function ie(e,t,n){e.forEach(function(R){ze[R]=t});function _(R){var a=n(R);a.length!==e.length&&Qe("Mismatched type converter count");for(var u=0;u<e.length;++u)q(e[u],a[u])}var o=new Array(t.length),c=[],A=0;t.forEach(function(R,a){ue.hasOwnProperty(R)?o[a]=ue[R]:(c.push(R),le.hasOwnProperty(R)||(le[R]=[]),le[R].push(function(){o[a]=ue[R],++A,A===c.length&&_(o)}))}),c.length===0&&_(o)}function yn(e){var t=je[e];delete je[e];var n=t.rawConstructor,_=t.rawDestructor,o=t.fields,c=o.map(function(A){return A.getterReturnType}).concat(o.map(function(A){return A.setterArgumentType}));ie([e],c,function(A){var R={};return o.forEach(function(a,u){var l=a.fieldName,K=A[u],S=a.getter,V=a.getterContext,g=A[u+o.length],w=a.setter,$=a.setterContext;R[l]={read:function(Z){return K.fromWireType(S(V,Z))},write:function(Z,ge){var _e=[];w($,Z,g.toWireType(_e,ge)),Ye(_e)}}}),[{name:t.name,fromWireType:function(a){var u={};for(var l in R)u[l]=R[l].read(a);return _(a),u},toWireType:function(a,u){for(var l in R)if(!(l in u))throw new TypeError('Missing field: "'+l+'"');var K=n();for(l in R)R[l].write(K,u[l]);return a!==null&&a.push(_,K),K},argPackAdvance:8,readValueFromPointer:Pe,destructorFunction:_}]})}function Je(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function gn(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Xt=e}var Xt=void 0;function h(e){for(var t="",n=e;p[n];)t+=Xt[p[n++]];return t}var Be=void 0;function G(e){throw new Be(e)}function q(e,t,n){if(n=n||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var _=t.name;if(e||G('type "'+_+'" must have a positive integer typeid pointer'),ue.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;G("Cannot register type '"+_+"' twice")}if(ue[e]=t,delete ze[e],le.hasOwnProperty(e)){var o=le[e];delete le[e],o.forEach(function(c){c()})}}function Ln(e,t,n,_,o){var c=Je(n);t=h(t),q(e,{name:t,fromWireType:function(A){return!!A},toWireType:function(A,R){return R?_:o},argPackAdvance:8,readValueFromPointer:function(A){var R;if(n===1)R=v;else if(n===2)R=k;else if(n===4)R=m;else throw new TypeError("Unknown boolean type size: "+t);return this.fromWireType(R[A>>c])},destructorFunction:null})}function mn(e){if(!(this instanceof Re)||!(e instanceof Re))return!1;for(var t=this.$$.ptrType.registeredClass,n=this.$$.ptr,_=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;_.baseClass;)o=_.upcast(o),_=_.baseClass;return t===_&&n===o}function Dn(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function lt(e){function t(n){return n.$$.ptrType.registeredClass.name}G(t(e)+" instance already deleted")}var Bt=!1;function xt(e){}function In(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function kt(e){e.count.value-=1;var t=e.count.value===0;t&&In(e)}function pe(e){return typeof FinalizationGroup>"u"?(pe=function(t){return t},e):(Bt=new FinalizationGroup(function(t){for(var n=t.next();!n.done;n=t.next()){var _=n.value;_.ptr?kt(_):console.warn("object already deleted: "+_.ptr)}}),pe=function(t){return Bt.register(t,t.$$,t.$$),t},xt=function(t){Bt.unregister(t.$$)},pe(e))}function bn(){if(this.$$.ptr||lt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=pe(Object.create(Object.getPrototypeOf(this),{$$:{value:Dn(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function wn(){this.$$.ptr||lt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&G("Object already scheduled for deletion"),xt(this),kt(this.$$),this.$$.prese
if (arguments.length !== `+(c-2)+`) {
throwBindingError('function `+e+" called with ' + arguments.length + ' arguments, expected "+(c-2)+` args!');
}
`;R&&(S+=`var destructors = [];
`);var V=R?"destructors":"null",g=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],w=[G,_,o,Ye,t[0],t[1]];A&&(S+="var thisWired = classParam.toWireType("+V+`, this);
`);for(var a=0;a<c-2;++a)S+="var arg"+a+"Wired = argType"+a+".toWireType("+V+", arg"+a+"); // "+t[a+2].name+`
`,g.push("argType"+a),w.push(t[a+2]);if(A&&(K="thisWired"+(K.length>0?", ":"")+K),S+=(u?"var rv = ":"")+"invoker(fn"+(K.length>0?", ":"")+K+`);
`,R)S+=`runDestructors(destructors);
`;else for(var a=A?1:2;a<t.length;++a){var $=a===1?"thisWired":"arg"+(a-2)+"Wired";t[a].destructorFunction!==null&&(S+=$+"_dtor("+$+"); // "+t[a].name+`
`,g.push($+"_dtor"),w.push(t[a].destructorFunction))}u&&(S+=`var ret = retType.fromWireType(rv);
return ret;
`),S+=`}
`,g.push(S);var Z=Zt(Function,g).apply(null,w);return Z}function c_(e,t,n,_,o,c,A,R){var a=Ft(n,_);t=h(t),c=Y(o,c),ie([],[e],function(u){u=u[0];var l=u.name+"."+t;R&&u.registeredClass.pureVirtualFunctions.push(t);function K(){tt("Cannot call "+l+" due to unbound types",a)}var S=u.registeredClass.instancePrototype,V=S[t];return V===void 0||V.overloadTable===void 0&&V.className!==u.name&&V.argCount===n-2?(K.argCount=n-2,K.className=u.name,S[t]=K):(Wt(S,t,l),S[t].overloadTable[n-2]=K),ie([],a,function(g){var w=Qt(l,g,u,c,A);return S[t].overloadTable===void 0?(w.argCount=n-2,S[t]=w):S[t].overloadTable[n-2]=w,[]}),[]})}function A_(e,t,n){e=h(e),ie([],[t],function(_){return _=_[0],r[e]=_.fromWireType(n),[]})}var dt=[],x=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Gt(e){e>4&&--x[e].refcount===0&&(x[e]=void 0,dt.push(e))}function T_(){for(var e=0,t=5;t<x.length;++t)x[t]!==void 0&&++e;return e}function u_(){for(var e=5;e<x.length;++e)if(x[e]!==void 0)return x[e];return null}function f_(){r.count_emval_handles=T_,r.get_first_emval=u_}function te(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:{var t=dt.length?dt.pop():x.length;return x[t]={refcount:1,value:e},t}}}function O_(e,t){t=h(t),q(e,{name:t,fromWireType:function(n){var _=x[n].value;return Gt(n),_},toWireType:function(n,_){return te(_)},argPackAdvance:8,readValueFromPointer:Pe,destructorFunction:null})}function l_(e,t,n){switch(t){case 0:return function(_){var o=n?v:p;return this.fromWireType(o[_])};case 1:return function(_){var o=n?k:Ae;return this.fromWireType(o[_>>1])};case 2:return function(_){var o=n?m:z;return this.fromWireType(o[_>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function B_(e,t,n,_){var o=Je(n);t=h(t);function c(){}c.values={},q(e,{name:t,constructor:c,fromWireType:function(A){return this.constructor.values[A]},toWireType:function(A,R){return R.value},argPackAdvance:8,readValueFromPointer:l_(t,o,_),destructorFunction:null}),Kt(t,c)}function nt(e,t){var n=ue[e];return n===void 0&&G(t+" has unknown type "+qt(e)),n}function M_(e,t,n){var _=nt(e,"enum");t=h(t);var o=_.constructor,c=Object.create(_.constructor.prototype,{value:{value:n},constructor:{value:Ze(_.name+"_"+t,function(){})}});o.values[n]=c,o[t]=c}function Me(e){if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e}function K_(e,t){switch(t){case 2:return function(n){return this.fromWireType(vt[n>>2])};case 3:return function(n){return this.fromWireType(ht[n>>3])};default:throw new TypeError("Unknown float type: "+e)}}function C_(e,t,n){var _=Je(n);t=h(t),q(e,{name:t,fromWireType:function(o){return o},toWireType:function(o,c){if(typeof c!="number"&&typeof c!="boolean")throw new TypeError('Cannot convert "'+Me(c)+'" to '+this.name);return c},argPackAdvance:8,readValueFromPointer:K_(t,_),destructorFunction:null})}function F_(e,t,n,_,o,c){var A=Ft(t,n);e=h(e),o=Y(_,o),Kt(e,function(){tt("Cannot call "+e+" due to unbound types",A)},t-1),ie([],A,function(R){var a=[R[0],null].concat(R.slice(1));return Yt(e,Qt(e,a,null,o,c),t-1),[]})}function d_(e,t,n){switch(t){case 0:return n?function(o){return v[o]}:function(o){return p[o]};case 1:return n?function(o){return k[o>>1]}:function(o){return Ae[o>>1]};case 2:return n?function(o){return m[o>>2]}:function(o){return z[o>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function G_(e,t,n,_,o){t=h(t),o===-1&&(o=4294967295);var c=Je(n),A=function(u){return u};if(_===0){var R=32-8*n;A=function(u){return u<<R>>>R}}var a=t.indexOf("unsigned")!=-1;q(e,{name:t,fromWireType:A,toWireType:function(u,l){if(typeof l!="number"&&typeof l!="boolean")throw new TypeError('Cannot convert "'+Me(l)+'" to '+this.name);if(l<_||l>o)throw new TypeError('Passing a number "'+Me(l)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+_+", "+o+"]!");return a?l>>>0:l|0},argPackAdvance:8,readValueFromPointer:d_(t,c,_!==0),destructorFunction:null})}function S_(e,t,n){var _=[Int8Array,Uint8Array,Int16Arr
`,K=0,a=0;a<e-1;++a)l+=" var arg"+a+" = argType"+a+".readValueFromPointer(args"+(K?"+"+K:"")+`);
`,K+=n[a+1].argPackAdvance;l+=" var rv = handle[name]("+R+`);
`;for(var a=0;a<e-1;++a)n[a+1].deleteObject&&(l+=" argType"+a+".deleteObject(arg"+a+`);
`);_.isVoid||(l+=` return retType.toWireType(destructors, rv);
`),l+=`};
`,c.push(l);var S=Zt(Function,c).apply(null,A);return g_(S)}function D_(e){return e=_t(e),te(r[e])}function I_(e,t){return e=ye(e),t=ye(t),te(e[t])}function b_(e){e>4&&(x[e].refcount+=1)}function w_(e){for(var t="",n=0;n<e;++n)t+=(n!==0?", ":"")+"arg"+n;for(var _="return function emval_allocator_"+e+`(constructor, argTypes, args) {
`,n=0;n<e;++n)_+="var argType"+n+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+n+'], "parameter '+n+`");
var arg`+n+" = argType"+n+`.readValueFromPointer(args);
args += argType`+n+`['argPackAdvance'];
`;return _+="var obj = new constructor("+t+`);
return __emval_register(obj);
}
`,new Function("requireRegisteredType","Module","__emval_register",_)(nt,r,te)}var en={};function H_(e,t,n,_){e=ye(e);var o=en[t];return o||(o=w_(t),en[t]=o),o(e,n,_)}function X_(e){return te(_t(e))}function x_(e){var t=x[e].value;Ye(t),Gt(e)}function k_(){Oe()}function $_(e,t,n){p.copyWithin(e,t,t+n)}function W_(e){try{return de.grow(e-Ne.byteLength+65535>>>16),yt(de.buffer),1}catch{}}function j_(e){var t=p.length;e=e>>>0;var n=2147483648;if(e>n)return!1;for(var _=1;_<=4;_*=2){var o=t*(1+.2/_);o=Math.min(o,e+100663296);var c=Math.min(n,ut(Math.max(e,o),65536)),A=W_(c);if(A)return!0}return!1}var rt={mappings:{},buffers:[null,[],[]],printChar:function(e,t){var n=rt.buffers[e];t===0||t===10?((e===1?it:se)(we(n,0)),n.length=0):n.push(t)},varargs:void 0,get:function(){rt.varargs+=4;var e=m[rt.varargs-4>>2];return e},getStr:function(e){var t=Ge(e);return t},get64:function(e,t){return e}};function Y_(e){return 0}function z_(e,t,n,_,o){}function q_(e,t,n,_){for(var o=0,c=0;c<n;c++){for(var A=m[t+c*8>>2],R=m[t+(c*8+4)>>2],a=0;a<R;a++)rt.printChar(e,p[A+a]);o+=R}return m[_>>2]=o,0}function Z_(e){Ut(e|0)}Ht=r.InternalError=Ot(Error,"InternalError"),gn(),Be=r.BindingError=Ot(Error,"BindingError"),xn(),r_(),e_(),zt=r.UnboundTypeError=Ot(Error,"UnboundTypeError"),f_();var Q_={t:yn,I:Ln,x:R_,w:a_,d:c_,k:A_,H:O_,n:B_,a:M_,A:C_,i:F_,j:G_,h:S_,B:N_,v:E_,u:V_,c:P_,J:p_,m:U_,s:h_,b:Gt,y:y_,p:m_,r:D_,e:I_,g:b_,q:H_,f:X_,l:x_,o:k_,E:$_,F:j_,G:Y_,C:z_,z:q_,D:Z_},fr=Un(),J_=r.___wasm_call_ctors=function(){return(J_=r.___wasm_call_ctors=r.asm.L).apply(null,arguments)},Nt=r._malloc=function(){return(Nt=r._malloc=r.asm.M).apply(null,arguments)},ne=r._free=function(){return(ne=r._free=r.asm.N).apply(null,arguments)},tn=r.___getTypeName=function(){return(tn=r.___getTypeName=r.asm.P).apply(null,arguments)},er=r.___embind_register_native_and_builtin_types=function(){return(er=r.___embind_register_native_and_builtin_types=r.asm.Q).apply(null,arguments)},tr=r.dynCall_jiji=function(){return(tr=r.dynCall_jiji=r.asm.R).apply(null,arguments)},st;function nr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}Ve=function e(){st||Et(),st||(Ve=e)};function Et(e){if(e=e||L,Te>0||(Mn(),Te>0))return;function t(){st||(st=!0,r.calledRun=!0,!Ie&&(Kn(),Cn(),M(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),Fn()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),t()},1)):t()}if(r.run=Et,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Et(),T.ready}}();typeof ot=="object"&&typeof pt=="object"?pt.exports=Pt:typeof define=="function"&&define.amd?define([],function(){return Pt}):typeof ot=="object"&&(ot.BASIS=Pt)});var C={UNSIGNED_BYTE:f.UNSIGNED_BYTE,UNSIGNED_SHORT:f.UNSIGNED_SHORT,UNSIGNED_INT:f.UNSIGNED_INT,FLOAT:f.FLOAT,HALF_FLOAT:f.HALF_FLOAT_OES,UNSIGNED_INT_24_8:f.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:f.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:f.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:f.UNSIGNED_SHORT_5_6_5};C.toWebGLConstant=function(s,T){switch(s){case C.UNSIGNED_BYTE:return f.UNSIGNED_BYTE;case C.UNSIGNED_SHORT:return f.UNSIGNED_SHORT;case C.UNSIGNED_INT:return f.UNSIGNED_INT;case C.FLOAT:return f.FLOAT;case C.HALF_FLOAT:return T.webgl2?f.HALF_FLOAT:f.HALF_FLOAT_OES;case C.UNSIGNED_INT_24_8:return f.UNSIGNED_INT_24_8;case C.UNSIGNED_SHORT_4_4_4_4:return f.UNSIGNED_SHORT_4_4_4_4;case C.UNSIGNED_SHORT_5_5_5_1:return f.UNSIGNED_SHORT_5_5_5_1;case C.UNSIGNED_SHORT_5_6_5:return C.UNSIGNED_SHORT_5_6_5}};C.isPacked=function(s){return s===C.UNSIGNED_INT_24_8||s===C.UNSIGNED_SHORT_4_4_4_4||s===C.UNSIGNED_SHORT_5_5_5_1||s===C.UNSIGNED_SHORT_5_6_5};C.sizeInBytes=function(s){switch(s){case C.UNSIGNED_BYTE:return 1;case C.UNSIGNED_SHORT:case C.UNSIGNED_SHORT_4_4_4_4:case C.UNSIGNED_SHORT_5_5_5_1:case C.UNSIGNED_SHORT_5_6_5:case C.HALF_FLOAT:return 2;case C.UNSIGNED_INT:case C.FLOAT:case C.UNSIGNED_INT_24_8:return 4}};C.validate=function(s){return s===C.UNSIGNED_BYTE||s===C.UNSIGNED_SHORT||s===C.UNSIGNED