57 lines
58 KiB
JavaScript
57 lines
58 KiB
JavaScript
![]() |
/**
|
||
|
* @license
|
||
|
* Cesium - https://github.com/CesiumGS/cesium
|
||
|
* Version 1.124
|
||
|
*
|
||
|
* 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 rn}from"./chunk-4BYMTYMT.js";import{a as M}from"./chunk-54PMPXZ4.js";import{a as ie}from"./chunk-R62IKKEC.js";import{a as _n}from"./chunk-N3A5CZ2S.js";import{b as nn}from"./chunk-G75U3WZT.js";import{a as Gt,c as sr,d as or,e as ge}from"./chunk-3THTQ4QB.js";var Rn=sr((it,pt)=>{var Nt=function(){var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(i=i||__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 P={},F;for(F in r)r.hasOwnProperty(F)&&(P[F]=r[F]);var U=[],y="./this.program",m=function(e,t){throw t},V=!1,d=!1,p=!1,Q=!1;V=typeof window=="object",d=typeof importScripts=="function",p=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",Q=!V&&!p&&!d;var u="";function X(e){return r.locateFile?r.locateFile(e,u):u+e}var se,le,W,J,g,Fe;p?(d?u=Gt("path").dirname(u)+"/":u=__dirname+"/",se=function(t,n){return g||(g=Gt("fs")),Fe||(Fe=Gt("path")),t=Fe.normalize(t),g.readFileSync(t,n?null:"utf8")},W=function(t){var n=se(t,!0);return n.buffer||(n=new Uint8Array(n)),Se(n.buffer),n},process.argv.length>1&&(y=process.argv[1].replace(/\\/g,"/")),U=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof rr))throw e}),process.on("unhandledRejection",Me),m=function(e){process.exit(e)},r.inspect=function(){return"[Emscripten Module object]"}):Q?(typeof read<"u"&&(se=function(t){return read(t)}),W=function(t){var n;return typeof readbuffer=="function"?new Uint8Array(readbuffer(t)):(n=read(t,"binary"),Se(typeof n=="object"),n)},typeof scriptArgs<"u"?U=scriptArgs:typeof arguments<"u"&&(U=arguments),typeof quit=="function"&&(m=function(e){quit(e)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(V||d)&&(d?u=self.location.href:typeof document<"u"&&document.currentScript&&(u=document.currentScript.src),i&&(u=i),u.indexOf("blob:")!==0?u=u.substr(0,u.lastIndexOf("/")+1):u="",se=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(W=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),le=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)},J=function(e){document.title=e});var st=r.print||console.log.bind(console),ee=r.printErr||console.warn.bind(console);for(F in P)P.hasOwnProperty(F)&&(r[F]=P[F]);P=null,r.arguments&&(U=r.arguments),r.thisProgram&&(y=r.thisProgram),r.quit&&(m=r.quit);var De=0,Ie=function(e){De=e},ae;r.wasmBinary&&(ae=r.wasmBinary);var ot=r.noExitRuntime||!0;typeof WebAssembly!="object"&&Me("no native wasm support detected");var ce,de=!1,be;function Se(e,t){e||Me("Assertion failed: "+t)}var we=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function He(e,t,n){for(var _=t+n,s=t;e[s]&&!(s>=_);)++s;if(s-t>16&&e.subarray&&we)return we.decode(e.subarray(t,s));for(var a="";t<s;){var c=e[t++];if(!(c&128)){a+=String.fromCharCode(c);continue}var o=e[t++]&63;if((c&224)==192){a+=String.fromCharCode((c&31)<<6|o);continue}var R=e[t++]&63;if((c&240)==224?c=(c&15)<<12|o<<6|R:c=(c&7)<<18|o<<12|R<<6|e[t++]&63,c<65536)a+=String.fromCharCode(c);else{var T=c-65536;a+=String.fromCharCode(55296|T>>10,56320|T&1023)}}return a}function Xe(e,t){return e?He(D,e,t):""}function Rt(e,t,n,_){if(!(_>0))return 0;for(var s=n,a=n+_-1,c=0;c<e.length;++c){var o=e.charCodeAt(c);if(o>=55296&&o<=57343){var R=e.charCodeAt(++c);o=65536+((o&1023)<<10)|R&1023}if(o<=127){if(n>=a)break;t[n++]=o}else if(o<=2047){if(n+1>=a)break;t[n++]=192|o>>6,t[n++]=128|o&63}else if(o<=65535){if(n+2>=a)break;t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|o&63}else{if(n+3>=a)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|o&63}}return t[n]=0,n-s}function L(e,t,n){return Rt(e,D,t,n)}function j(e){for(var t=0,
|
||
|
"use strict"; return body.apply(this, arguments);
|
||
|
};
|
||
|
`)(t)}function ft(e,t){var n=qe(t,function(_){this.name=t,this.message=_;var s=new Error(_).stack;s!==void 0&&(this.stack=this.toString()+`
|
||
|
`+s.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 It=void 0;function Ze(e){throw new It(e)}function oe(e,t,n){e.forEach(function(o){ze[o]=t});function _(o){var R=n(o);R.length!==e.length&&Ze("Mismatched type converter count");for(var T=0;T<e.length;++T)q(e[T],R[T])}var s=new Array(t.length),a=[],c=0;t.forEach(function(o,R){ue.hasOwnProperty(o)?s[R]=ue[o]:(a.push(o),Ke.hasOwnProperty(o)||(Ke[o]=[]),Ke[o].push(function(){s[R]=ue[o],++c,c===a.length&&_(s)}))}),a.length===0&&_(s)}function Ln(e){var t=We[e];delete We[e];var n=t.rawConstructor,_=t.rawDestructor,s=t.fields,a=s.map(function(c){return c.getterReturnType}).concat(s.map(function(c){return c.setterArgumentType}));oe([e],a,function(c){var o={};return s.forEach(function(R,T){var O=R.fieldName,K=c[T],G=R.getter,N=R.getterContext,h=c[T+s.length],I=R.setter,$=R.setterContext;o[O]={read:function(Z){return K.fromWireType(G(N,Z))},write:function(Z,ye){var re=[];I($,Z,h.toWireType(re,ye)),je(re)}}}),[{name:t.name,fromWireType:function(R){var T={};for(var O in o)T[O]=o[O].read(R);return _(R),T},toWireType:function(R,T){for(var O in o)if(!(O in T))throw new TypeError('Missing field: "'+O+'"');var K=n();for(O in o)o[O].write(K,T[O]);return R!==null&&R.push(_,K),K},argPackAdvance:8,readValueFromPointer:pe,destructorFunction:_}]})}function Qe(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 mn(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);bt=e}var bt=void 0;function v(e){for(var t="",n=e;D[n];)t+=bt[D[n++]];return t}var Be=void 0;function S(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||S('type "'+_+'" must have a positive integer typeid pointer'),ue.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;S("Cannot register type '"+_+"' twice")}if(ue[e]=t,delete ze[e],Ke.hasOwnProperty(e)){var s=Ke[e];delete Ke[e],s.forEach(function(a){a()})}}function Dn(e,t,n,_,s){var a=Qe(n);t=v(t),q(e,{name:t,fromWireType:function(c){return!!c},toWireType:function(c,o){return o?_:s},argPackAdvance:8,readValueFromPointer:function(c){var o;if(n===1)o=ke;else if(n===2)o=fe;else if(n===4)o=w;else throw new TypeError("Unknown boolean type size: "+t);return this.fromWireType(o[c>>a])},destructorFunction:null})}function In(e){if(!(this instanceof Re)||!(e instanceof Re))return!1;for(var t=this.$$.ptrType.registeredClass,n=this.$$.ptr,_=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;_.baseClass;)s=_.upcast(s),_=_.baseClass;return t===_&&n===s}function bn(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function Tt(e){function t(n){return n.$$.ptrType.registeredClass.name}S(t(e)+" instance already deleted")}var ut=!1;function wt(e){}function wn(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function Ht(e){e.count.value-=1;var t=e.count.value===0;t&&wn(e)}function Pe(e){return typeof FinalizationGroup>"u"?(Pe=function(t){return t},e):(ut=new FinalizationGroup(function(t){for(var n=t.next();!n.done;n=t.next()){var _=n.value;_.ptr?Ht(_):console.warn("object already deleted: "+_.ptr)}}),Pe=function(t){return ut.register(t,t.$$,t.$$),t},wt=function(t){ut.unregister(t.$$)},Pe(e))}function Hn(){if(this.$$.ptr||Tt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Pe(Object.create(Object.getPrototypeOf(this),{$$:{value:bn(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Xn(){this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&S("Object already scheduled for deletion"),wt(this),Ht(this.$$),this.$$.pre
|
||
|
if (arguments.length !== `+(a-2)+`) {
|
||
|
throwBindingError('function `+e+" called with ' + arguments.length + ' arguments, expected "+(a-2)+` args!');
|
||
|
}
|
||
|
`;o&&(G+=`var destructors = [];
|
||
|
`);var N=o?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],I=[S,_,s,je,t[0],t[1]];c&&(G+="var thisWired = classParam.toWireType("+N+`, this);
|
||
|
`);for(var R=0;R<a-2;++R)G+="var arg"+R+"Wired = argType"+R+".toWireType("+N+", arg"+R+"); // "+t[R+2].name+`
|
||
|
`,h.push("argType"+R),I.push(t[R+2]);if(c&&(K="thisWired"+(K.length>0?", ":"")+K),G+=(T?"var rv = ":"")+"invoker(fn"+(K.length>0?", ":"")+K+`);
|
||
|
`,o)G+=`runDestructors(destructors);
|
||
|
`;else for(var R=c?1:2;R<t.length;++R){var $=R===1?"thisWired":"arg"+(R-2)+"Wired";t[R].destructorFunction!==null&&(G+=$+"_dtor("+$+"); // "+t[R].name+`
|
||
|
`,h.push($+"_dtor"),I.push(t[R].destructorFunction))}T&&(G+=`var ret = retType.fromWireType(rv);
|
||
|
return ret;
|
||
|
`),G+=`}
|
||
|
`,h.push(G);var Z=zt(Function,h).apply(null,I);return Z}function f_(e,t,n,_,s,a,c,o){var R=Kt(n,_);t=v(t),a=z(s,a),oe([],[e],function(T){T=T[0];var O=T.name+"."+t;o&&T.registeredClass.pureVirtualFunctions.push(t);function K(){et("Cannot call "+O+" due to unbound types",R)}var G=T.registeredClass.instancePrototype,N=G[t];return N===void 0||N.overloadTable===void 0&&N.className!==T.name&&N.argCount===n-2?(K.argCount=n-2,K.className=T.name,G[t]=K):(xt(G,t,O),G[t].overloadTable[n-2]=K),oe([],R,function(h){var I=Yt(O,h,T,a,c);return G[t].overloadTable===void 0?(I.argCount=n-2,G[t]=I):G[t].overloadTable[n-2]=I,[]}),[]})}function T_(e,t,n){e=v(e),oe([],[t],function(_){return _=_[0],r[e]=_.fromWireType(n),[]})}var Bt=[],k=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Ct(e){e>4&&--k[e].refcount===0&&(k[e]=void 0,Bt.push(e))}function u_(){for(var e=0,t=5;t<k.length;++t)k[t]!==void 0&&++e;return e}function O_(){for(var e=5;e<k.length;++e)if(k[e]!==void 0)return k[e];return null}function l_(){r.count_emval_handles=u_,r.get_first_emval=O_}function ne(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:{var t=Bt.length?Bt.pop():k.length;return k[t]={refcount:1,value:e},t}}}function M_(e,t){t=v(t),q(e,{name:t,fromWireType:function(n){var _=k[n].value;return Ct(n),_},toWireType:function(n,_){return ne(_)},argPackAdvance:8,readValueFromPointer:pe,destructorFunction:null})}function K_(e,t,n){switch(t){case 0:return function(_){var s=n?ke:D;return this.fromWireType(s[_])};case 1:return function(_){var s=n?fe:Ge;return this.fromWireType(s[_>>1])};case 2:return function(_){var s=n?w:Y;return this.fromWireType(s[_>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function B_(e,t,n,_){var s=Qe(n);t=v(t);function a(){}a.values={},q(e,{name:t,constructor:a,fromWireType:function(c){return this.constructor.values[c]},toWireType:function(c,o){return o.value},argPackAdvance:8,readValueFromPointer:K_(t,s,_),destructorFunction:null}),lt(t,a)}function tt(e,t){var n=ue[e];return n===void 0&&S(t+" has unknown type "+jt(e)),n}function C_(e,t,n){var _=tt(e,"enum");t=v(t);var s=_.constructor,a=Object.create(_.constructor.prototype,{value:{value:n},constructor:{value:qe(_.name+"_"+t,function(){})}});s.values[n]=a,s[t]=a}function Ce(e){if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e}function F_(e,t){switch(t){case 2:return function(n){return this.fromWireType(Pt[n>>2])};case 3:return function(n){return this.fromWireType(Et[n>>3])};default:throw new TypeError("Unknown float type: "+e)}}function d_(e,t,n){var _=Qe(n);t=v(t),q(e,{name:t,fromWireType:function(s){return s},toWireType:function(s,a){if(typeof a!="number"&&typeof a!="boolean")throw new TypeError('Cannot convert "'+Ce(a)+'" to '+this.name);return a},argPackAdvance:8,readValueFromPointer:F_(t,_),destructorFunction:null})}function S_(e,t,n,_,s,a){var c=Kt(t,n);e=v(e),s=z(_,s),lt(e,function(){et("Cannot call "+e+" due to unbound types",c)},t-1),oe([],c,function(o){var R=[o[0],null].concat(o.slice(1));return $t(e,Yt(e,R,null,s,a),t-1),[]})}function G_(e,t,n){switch(t){case 0:return n?function(s){return ke[s]}:function(s){return D[s]};case 1:return n?function(s){return fe[s>>1]}:function(s){return Ge[s>>1]};case 2:return n?function(s){return w[s>>2]}:function(s){return Y[s>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function V_(e,t,n,_,s){t=v(t),s===-1&&(s=4294967295);var a=Qe(n),c=function(T){return T};if(_===0){var o=32-8*n;c=function(T){return T<<o>>>o}}var R=t.indexOf("unsigned")!=-1;q(e,{name:t,fromWireType:c,toWireType:function(T,O){if(typeof O!="number"&&typeof O!="boolean")throw new TypeError('Cannot convert "'+Ce(O)+'" to '+this.name);if(O<_||O>s)throw new TypeError('Passing a number "'+Ce(O)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+_+", "+s+"]!");return R?O>>>0:O|0},argPackAdvance:8,readValueFromPointer:G_(t,a,_!==0),destructorFunction:null})}function N_(e,t,n){var _=[Int8Array,Uint8Array,Int1
|
||
|
`,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]("+o+`);
|
||
|
`;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,c);return m_(G)}function b_(e){return e=nt(e),ne(r[e])}function w_(e,t){return e=Ue(e),t=Ue(t),ne(e[t])}function H_(e){e>4&&(k[e].refcount+=1)}function X_(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",_)(tt,r,ne)}var Zt={};function x_(e,t,n,_){e=Ue(e);var s=Zt[t];return s||(s=X_(t),Zt[t]=s),s(e,n,_)}function k_(e){return ne(nt(e))}function $_(e){var t=k[e].value;je(t),Ct(e)}function W_(){Me()}function j_(e,t,n){D.copyWithin(e,t,t+n)}function z_(e){try{return ce.grow(e-ct.byteLength+65535>>>16),vt(ce.buffer),1}catch{}}function Y_(e){var t=D.length;e=e>>>0;var n=2147483648;if(e>n)return!1;for(var _=1;_<=4;_*=2){var s=t*(1+.2/_);s=Math.min(s,e+100663296);var a=Math.min(n,Mn(Math.max(e,s),65536)),c=z_(a);if(c)return!0}return!1}var _t={mappings:{},buffers:[null,[],[]],printChar:function(e,t){var n=_t.buffers[e];t===0||t===10?((e===1?st:ee)(He(n,0)),n.length=0):n.push(t)},varargs:void 0,get:function(){_t.varargs+=4;var e=w[_t.varargs-4>>2];return e},getStr:function(e){var t=Xe(e);return t},get64:function(e,t){return e}};function q_(e){return 0}function Z_(e,t,n,_,s){}function Q_(e,t,n,_){for(var s=0,a=0;a<n;a++){for(var c=w[t+a*8>>2],o=w[t+(a*8+4)>>2],R=0;R<o;R++)_t.printChar(e,D[c+R]);s+=o}return w[_>>2]=s,0}function J_(e){Ie(e|0)}It=r.InternalError=ft(Error,"InternalError"),mn(),Be=r.BindingError=ft(Error,"BindingError"),$n(),s_(),n_(),Wt=r.UnboundTypeError=ft(Error,"UnboundTypeError"),l_();var er={t:Ln,I:Dn,x:c_,w:A_,d:f_,k:T_,H:M_,n:B_,a:C_,A:d_,i:S_,j:V_,h:N_,B:p_,v:P_,u:E_,c:v_,J:h_,m:U_,s:g_,b:Ct,y:L_,p:I_,r:b_,e:w_,g:H_,q:x_,f:k_,l:$_,o:W_,E:j_,F:Y_,G:q_,C:Z_,z:Q_,D:J_},Or=Un(),tr=r.___wasm_call_ctors=function(){return(tr=r.___wasm_call_ctors=r.asm.L).apply(null,arguments)},dt=r._malloc=function(){return(dt=r._malloc=r.asm.M).apply(null,arguments)},_e=r._free=function(){return(_e=r._free=r.asm.N).apply(null,arguments)},Qt=r.___getTypeName=function(){return(Qt=r.___getTypeName=r.asm.P).apply(null,arguments)},nr=r.___embind_register_native_and_builtin_types=function(){return(nr=r.___embind_register_native_and_builtin_types=r.asm.Q).apply(null,arguments)},_r=r.dynCall_jiji=function(){return(_r=r.dynCall_jiji=r.asm.R).apply(null,arguments)},rt;function rr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}Ne=function e(){rt||St(),rt||(Ne=e)};function St(e){if(e=e||U,Te>0||(Cn(),Te>0))return;function t(){rt||(rt=!0,r.calledRun=!0,!de&&(Fn(),dn(),C(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),Sn()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),t()},1)):t()}if(r.run=St,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return St(),f.ready}}();typeof it=="object"&&typeof pt=="object"?pt.exports=Nt:typeof define=="function"&&define.amd?define([],function(){return Nt}):typeof it=="object"&&(it.BASIS=Nt)});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(i,f){switch(i){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(i){return i===B.UNSIGNED_INT_24_8||i===B.UNSIGNED_SHORT_4_4_4_4||i===B.UNSIGNED_SHORT_5_5_5_1||i===B.UNSIGNED_SHORT_5_6_5};B.sizeInBytes=function(i){switch(i){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(i){return i===B.UNSIGNED_BYTE||i===B.UNSIGNED_SHORT||i===B.UNSIGNED
|