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.
57 lines
58 KiB
57 lines
58 KiB
4 weeks ago
|
/**
|
||
|
* @license
|
||
|
* Cesium - https://github.com/CesiumGS/cesium
|
||
|
* Version 1.128
|
||
|
*
|
||
|
* 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-CRNKVPOJ.js";import{a as M}from"./chunk-7SDYTY36.js";import{a as re}from"./chunk-JBTCQLOL.js";import{b as sn}from"./chunk-IQDUXDOM.js";import{a as Pt,c as rr,d as sr,e as Le}from"./chunk-GDY26PU3.js";var cn=rr((ot,Et)=>{var pt=function(){var s=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(s=s||__filename),function(f){f=f||{};var r=typeof f<"u"?f:{},C,l;r.ready=new Promise(function(e,t){C=e,l=t});var E={},F;for(F in r)r.hasOwnProperty(F)&&(E[F]=r[F]);var g=[],m="./this.program",I=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 u="";function W(e){return r.locateFile?r.locateFile(e,u):u+e}var J,ae,j,Be,Ce,Fe;P?(d?u=Pt("path").dirname(u)+"/":u=__dirname+"/",J=function(t,n){return Ce||(Ce=Pt("fs")),Fe||(Fe=Pt("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)),D(n.buffer),n},process.argv.length>1&&(m=process.argv[1].replace(/\\/g,"/")),g=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof nr))throw e}),process.on("unhandledRejection",Oe),I=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"),D(typeof n=="object"),n)},typeof scriptArgs<"u"?g=scriptArgs:typeof arguments<"u"&&(g=arguments),typeof quit=="function"&&(I=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?u=self.location.href:typeof document<"u"&&document.currentScript&&(u=document.currentScript.src),s&&(u=s),u.indexOf("blob:")!==0?u=u.substr(0,u.lastIndexOf("/")+1):u="",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)},Be=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&&(g=r.arguments),r.thisProgram&&(m=r.thisProgram),r.quit&&(I=r.quit);var Rt=0,vt=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 D(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 a="";t<o;){var A=e[t++];if(!(A&128)){a+=String.fromCharCode(A);continue}var i=e[t++]&63;if((A&224)==192){a+=String.fromCharCode((A&31)<<6|i);continue}var R=e[t++]&63;if((A&240)==224?A=(A&15)<<12|i<<6|R:A=(A&7)<<18|i<<12|R<<6|e[t++]&63,A<65536)a+=String.fromCharCode(A);else{var T=A-65536;a+=String.fromCharCode(55296|T>>10,56320|T&1023)}}return a}function Se(e,t){return e?we(p,e,t):""}function He(e,t,n,_){if(!(_>0))return 0;for(var o=n,a=n+_-1,A=0;A<e.length;++A){var i=e.charCodeAt(A);if(i>=55296&&i<=57343){var R=e.charCodeAt(++A);i=65536+((i&1023)<<10)|R&1023}if(i<=127){if(n>=a)break;t[n++]=i}else if(i<=2047){if(n+1>=a)break;t[n++]=192|i>>6,t[n++]=128|i&63}else if(i<=65535){if(n+2>=a)break;t[n++]=224|i>>12,t[n++]=128|i>>6&63,t[n++]=128|i&63}else{if(n+3>=a)break;t[n++]=240|i>>18,t[n++]=128|i>>12&63,t[n++]=128|i>>6&63,t[n++]=128|i&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(i){ze[i]=t});function _(i){var R=n(i);R.length!==e.length&&Qe("Mismatched type converter count");for(var T=0;T<e.length;++T)q(e[T],R[T])}var o=new Array(t.length),a=[],A=0;t.forEach(function(i,R){Te.hasOwnProperty(i)?o[R]=Te[i]:(a.push(i),le.hasOwnProperty(i)||(le[i]=[]),le[i].push(function(){o[R]=Te[i],++A,A===a.length&&_(o)}))}),a.length===0&&_(o)}function yn(e){var t=je[e];delete je[e];var n=t.rawConstructor,_=t.rawDestructor,o=t.fields,a=o.map(function(A){return A.getterReturnType}).concat(o.map(function(A){return A.setterArgumentType}));ie([e],a,function(A){var i={};return o.forEach(function(R,T){var O=R.fieldName,K=A[T],G=R.getter,V=R.getterContext,y=A[T+o.length],b=R.setter,$=R.setterContext;i[O]={read:function(Z){return K.fromWireType(G(V,Z))},write:function(Z,ge){var _e=[];b($,Z,y.toWireType(_e,ge)),Ye(_e)}}}),[{name:t.name,fromWireType:function(R){var T={};for(var O in i)T[O]=i[O].read(R);return _(R),T},toWireType:function(R,T){for(var O in i)if(!(O in T))throw new TypeError('Missing field: "'+O+'"');var K=n();for(O in i)i[O].write(K,T[O]);return R!==null&&R.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 Me=void 0;function S(e){throw new Me(e)}function q(e,t,n){if(n=n||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var _=t.name;if(e||S('type "'+_+'" must have a positive integer typeid pointer'),Te.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;S("Cannot register type '"+_+"' twice")}if(Te[e]=t,delete ze[e],le.hasOwnProperty(e)){var o=le[e];delete le[e],o.forEach(function(a){a()})}}function Ln(e,t,n,_,o){var a=Je(n);t=h(t),q(e,{name:t,fromWireType:function(A){return!!A},toWireType:function(A,i){return i?_:o},argPackAdvance:8,readValueFromPointer:function(A){var i;if(n===1)i=U;else if(n===2)i=k;else if(n===4)i=L;else throw new TypeError("Unknown boolean type size: "+t);return this.fromWireType(i[A>>a])},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}S(t(e)+" instance already deleted")}var Mt=!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 Ee(e){return typeof FinalizationGroup>"u"?(Ee=function(t){return t},e):(Mt=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)}}),Ee=function(t){return Mt.register(t,t.$$,t.$$),t},xt=function(t){Mt.unregister(t.$$)},Ee(e))}function bn(){if(this.$$.ptr||lt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Ee(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&&S("Object already scheduled for deletion"),xt(this),kt(this.$$),this.$$.prese
|
||
|
if (arguments.length !== `+(a-2)+`) {
|
||
|
throwBindingError('function `+e+" called with ' + arguments.length + ' arguments, expected "+(a-2)+` args!');
|
||
|
}
|
||
|
`;i&&(G+=`var destructors = [];
|
||
|
`);var V=i?"destructors":"null",y=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],b=[S,_,o,Ye,t[0],t[1]];A&&(G+="var thisWired = classParam.toWireType("+V+`, this);
|
||
|
`);for(var R=0;R<a-2;++R)G+="var arg"+R+"Wired = argType"+R+".toWireType("+V+", arg"+R+"); // "+t[R+2].name+`
|
||
|
`,y.push("argType"+R),b.push(t[R+2]);if(A&&(K="thisWired"+(K.length>0?", ":"")+K),G+=(T?"var rv = ":"")+"invoker(fn"+(K.length>0?", ":"")+K+`);
|
||
|
`,i)G+=`runDestructors(destructors);
|
||
|
`;else for(var R=A?1:2;R<t.length;++R){var $=R===1?"thisWired":"arg"+(R-2)+"Wired";t[R].destructorFunction!==null&&(G+=$+"_dtor("+$+"); // "+t[R].name+`
|
||
|
`,y.push($+"_dtor"),b.push(t[R].destructorFunction))}T&&(G+=`var ret = retType.fromWireType(rv);
|
||
|
return ret;
|
||
|
`),G+=`}
|
||
|
`,y.push(G);var Z=Zt(Function,y).apply(null,b);return Z}function c_(e,t,n,_,o,a,A,i){var R=Ft(n,_);t=h(t),a=Y(o,a),ie([],[e],function(T){T=T[0];var O=T.name+"."+t;i&&T.registeredClass.pureVirtualFunctions.push(t);function K(){tt("Cannot call "+O+" due to unbound types",R)}var G=T.registeredClass.instancePrototype,V=G[t];return V===void 0||V.overloadTable===void 0&&V.className!==T.name&&V.argCount===n-2?(K.argCount=n-2,K.className=T.name,G[t]=K):(Wt(G,t,O),G[t].overloadTable[n-2]=K),ie([],R,function(y){var b=Qt(O,y,T,a,A);return G[t].overloadTable===void 0?(b.argCount=n-2,G[t]=b):G[t].overloadTable[n-2]=b,[]}),[]})}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 St(e){e>4&&--x[e].refcount===0&&(x[e]=void 0,dt.push(e))}function f_(){for(var e=0,t=5;t<x.length;++t)x[t]!==void 0&&++e;return e}function T_(){for(var e=5;e<x.length;++e)if(x[e]!==void 0)return x[e];return null}function u_(){r.count_emval_handles=f_,r.get_first_emval=T_}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 St(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?U: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?L:z;return this.fromWireType(o[_>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function M_(e,t,n,_){var o=Je(n);t=h(t);function a(){}a.values={},q(e,{name:t,constructor:a,fromWireType:function(A){return this.constructor.values[A]},toWireType:function(A,i){return i.value},argPackAdvance:8,readValueFromPointer:l_(t,o,_),destructorFunction:null}),Bt(t,a)}function nt(e,t){var n=Te[e];return n===void 0&&S(t+" has unknown type "+qt(e)),n}function K_(e,t,n){var _=nt(e,"enum");t=h(t);var o=_.constructor,a=Object.create(_.constructor.prototype,{value:{value:n},constructor:{value:Ze(_.name+"_"+t,function(){})}});o.values[n]=a,o[t]=a}function Ke(e){if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e}function B_(e,t){switch(t){case 2:return function(n){return this.fromWireType(Ut[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,a){if(typeof a!="number"&&typeof a!="boolean")throw new TypeError('Cannot convert "'+Ke(a)+'" to '+this.name);return a},argPackAdvance:8,readValueFromPointer:B_(t,_),destructorFunction:null})}function F_(e,t,n,_,o,a){var A=Ft(t,n);e=h(e),o=Y(_,o),Bt(e,function(){tt("Cannot call "+e+" due to unbound types",A)},t-1),ie([],A,function(i){var R=[i[0],null].concat(i.slice(1));return Yt(e,Qt(e,R,null,o,a),t-1),[]})}function d_(e,t,n){switch(t){case 0:return n?function(o){return U[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 L[o>>2]}:function(o){return z[o>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function S_(e,t,n,_,o){t=h(t),o===-1&&(o=4294967295);var a=Je(n),A=function(T){return T};if(_===0){var i=32-8*n;A=function(T){return T<<i>>>i}}var R=t.indexOf("unsigned")!=-1;q(e,{name:t,fromWireType:A,toWireType:function(T,O){if(typeof O!="number"&&typeof O!="boolean")throw new TypeError('Cannot convert "'+Ke(O)+'" to '+this.name);if(O<_||O>o)throw new TypeError('Passing a number "'+Ke(O)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+_+", "+o+"]!");return R?O>>>0:O|0},argPackAdvance:8,readValueFromPointer:d_(t,a,_!==0),destructorFunction:null})}function G_(e,t,n){var _=[Int8Array,Uint8Array,Int16Arr
|
||
|
`,K=0,R=0;R<e-1;++R)O+=" var arg"+R+" = argType"+R+".readValueFromPointer(args"+(K?"+"+K:"")+`);
|
||
|
`,K+=n[R+1].argPackAdvance;O+=" var rv = handle[name]("+i+`);
|
||
|
`;for(var R=0;R<e-1;++R)n[R+1].deleteObject&&(O+=" argType"+R+".deleteObject(arg"+R+`);
|
||
|
`);_.isVoid||(O+=` return retType.toWireType(destructors, rv);
|
||
|
`),O+=`};
|
||
|
`,a.push(O);var G=Zt(Function,a).apply(null,A);return g_(G)}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),St(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 a=Math.min(n,Tt(Math.max(e,o),65536)),A=W_(a);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=L[rt.varargs-4>>2];return e},getStr:function(e){var t=Se(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,a=0;a<n;a++){for(var A=L[t+a*8>>2],i=L[t+(a*8+4)>>2],R=0;R<i;R++)rt.printChar(e,p[A+R]);o+=i}return L[_>>2]=o,0}function Z_(e){vt(e|0)}Ht=r.InternalError=Ot(Error,"InternalError"),gn(),Me=r.BindingError=Ot(Error,"BindingError"),xn(),r_(),e_(),zt=r.UnboundTypeError=Ot(Error,"UnboundTypeError"),u_();var Q_={t:yn,I:Ln,x:R_,w:a_,d:c_,k:A_,H:O_,n:M_,a:K_,A:C_,i:F_,j:S_,h:G_,B:N_,v:V_,u:P_,c:p_,J:E_,m:v_,s:h_,b:St,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_},ur=vn(),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}Pe=function e(){st||Vt(),st||(Pe=e)};function Vt(e){if(e=e||g,fe>0||(Kn(),fe>0))return;function t(){st||(st=!0,r.calledRun=!0,!Ie&&(Bn(),Cn(),C(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),Fn()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),t()},1)):t()}if(r.run=Vt,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Vt(),f.ready}}();typeof ot=="object"&&typeof Et=="object"?Et.exports=pt:typeof define=="function"&&define.amd?define([],function(){return pt}):typeof ot=="object"&&(ot.BASIS=pt)});var B={UNSIGNED_BYTE:M.UNSIGNED_BYTE,UNSIGNED_SHORT:M.UNSIGNED_SHORT,UNSIGNED_INT:M.UNSIGNED_INT,FLOAT:M.FLOAT,HALF_FLOAT:M.HALF_FLOAT_OES,UNSIGNED_INT_24_8:M.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:M.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:M.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:M.UNSIGNED_SHORT_5_6_5};B.toWebGLConstant=function(s,f){switch(s){case B.UNSIGNED_BYTE:return M.UNSIGNED_BYTE;case B.UNSIGNED_SHORT:return M.UNSIGNED_SHORT;case B.UNSIGNED_INT:return M.UNSIGNED_INT;case B.FLOAT:return M.FLOAT;case B.HALF_FLOAT:return f.webgl2?M.HALF_FLOAT:M.HALF_FLOAT_OES;case B.UNSIGNED_INT_24_8:return M.UNSIGNED_INT_24_8;case B.UNSIGNED_SHORT_4_4_4_4:return M.UNSIGNED_SHORT_4_4_4_4;case B.UNSIGNED_SHORT_5_5_5_1:return M.UNSIGNED_SHORT_5_5_5_1;case B.UNSIGNED_SHORT_5_6_5:return B.UNSIGNED_SHORT_5_6_5}};B.isPacked=function(s){return s===B.UNSIGNED_INT_24_8||s===B.UNSIGNED_SHORT_4_4_4_4||s===B.UNSIGNED_SHORT_5_5_5_1||s===B.UNSIGNED_SHORT_5_6_5};B.sizeInBytes=function(s){switch(s){case B.UNSIGNED_BYTE:return 1;case B.UNSIGNED_SHORT:case B.UNSIGNED_SHORT_4_4_4_4:case B.UNSIGNED_SHORT_5_5_5_1:case B.UNSIGNED_SHORT_5_6_5:case B.HALF_FLOAT:return 2;case B.UNSIGNED_INT:case B.FLOAT:case B.UNSIGNED_INT_24_8:return 4}};B.validate=function(s){return s===B.UNSIGNED_BYTE||s===B.UNSIGNED_SHORT||s===B.UNSIGNED
|