mars3d-cesium
Advanced tools
Comparing version 1.84.3 to 1.87.0
@@ -1,1 +0,1 @@ | ||
var BASIS=function(){var Dt="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(Dt=Dt||__filename),function(e){var r,i,a=void 0!==(e=e||{})?e:{};a.ready=new Promise(function(e,t){r=e,readyPromiseRejectza=t});var t,n={};for(t in a)a.hasOwnProperty(t)&&(n[t]=a[t]);var o,u,s,c,f,l=!1,p=!1,l="object"==typeof window,p="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h=!l&&!d&&!p,y="";d?(y=p?require("path").dirname(y)+"/":__dirname+"/",o=function(e,t){return c=c||require("fs"),e=(f=f||require("path")).normalize(e),c.readFileSync(e,t?null:"utf8")},s=function(e){e=o(e,!0);return T((e=!e.buffer?new Uint8Array(e):e).buffer),e},1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}))throw e}),process.on("unhandledRejection",Z),a.inspect=function(){return"[Emscripten Module object]"}):h?("undefined"!=typeof read&&(o=function(e){return read(e)}),s=function(e){return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(T("object"==typeof(e=read(e,"binary"))),e)},"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(l||p)&&(p?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),y=0!==(y=Dt?Dt:y).indexOf("blob:")?y.substr(0,y.lastIndexOf("/")+1):"",o=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},p&&(s=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),u=function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var v=a.print||console.log.bind(console),m=a.printErr||console.warn.bind(console);for(t in n)n.hasOwnProperty(t)&&(a[t]=n[t]);n=null,a.arguments&&a.arguments,a.thisProgram&&a.thisProgram,a.quit&&a.quit;var g;a.wasmBinary&&(g=a.wasmBinary);var w;a.noExitRuntime;"object"!=typeof WebAssembly&&Z("no native wasm support detected");var b=!1;function T(e,t){e||Z("Assertion failed: "+t)}var C="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function $(e,t,r){for(var n=t+r,o=t;e[o]&&!(n<=o);)++o;if(16<o-t&&e.subarray&&C)return C.decode(e.subarray(t,o));for(var i="";t<o;){var a,u,s=e[t++];128&s?(a=63&e[t++],192!=(224&s)?(u=63&e[t++],(s=224==(240&s)?(15&s)<<12|a<<6|u:(7&s)<<18|a<<12|u<<6|63&e[t++])<65536?i+=String.fromCharCode(s):(u=s-65536,i+=String.fromCharCode(55296|u>>10,56320|1023&u))):i+=String.fromCharCode((31&s)<<6|a)):i+=String.fromCharCode(s)}return i}function P(e,t){return e?$(W,e,t):""}function A(e,t,r){return function(e,t,r,n){if(!(0<n))return;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var u=e.charCodeAt(a);if((u=55296<=u&&u<=57343?65536+((1023&u)<<10)|1023&e.charCodeAt(++a):u)<=127){if(i<=r)break;t[r++]=u}else if(u<=2047){if(i<=r+1)break;t[r++]=192|u>>6,t[r++]=128|63&u}else if(u<=65535){if(i<=r+2)break;t[r++]=224|u>>12,t[r++]=128|u>>6&63,t[r++]=128|63&u}else{if(i<=r+3)break;t[r++]=240|u>>18,t[r++]=128|u>>12&63,t[r++]=128|u>>6&63,t[r++]=128|63&u}}return t[r]=0,r-o}(e,W,t,r)}var _,S,W,E,F,k,O,j,R,I="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function x(e,t){for(var r,n=e>>1,o=n+t/2;!(o<=n)&&F[n];)++n;if(32<(r=n<<1)-e&&I)return I.decode(W.subarray(e,r));for(var i="",a=0;!(t/2<=a);++a){var u=E[e+2*a>>1];if(0==u)break;i+=String.fromCharCode(u)}return i}function D(e,t,r){if((r=void 0===r?2147483647:r)<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);E[t>>1]=a,t+=2}return E[t>>1]=0,t-n}function U(e){return 2*e.length}function B(e,t){for(var r=0,n="";!(t/4<=r);){var o,i=k[e+4*r>>2];if(0==i)break;++r,65536<=i?(o=i-65536,n+=String.fromCharCode(55296|o>>10,56320|1023&o)):n+=String.fromCharCode(i)}return n}function M(e,t,r){if((r=void 0===r?2147483647:r)<4)return 0;for(var n=t,o=n+r-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),k[t>>2]=a,o<(t+=4)+4)break}return k[t>>2]=0,t-n}function V(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);55296<=n&&n<=57343&&++r,t+=4}return t}function H(e){_=e,a.HEAP8=S=new Int8Array(e),a.HEAP16=E=new Int16Array(e),a.HEAP32=k=new Int32Array(e),a.HEAPU8=W=new Uint8Array(e),a.HEAPU16=F=new Uint16Array(e),a.HEAPU32=O=new Uint32Array(e),a.HEAPF32=j=new Float32Array(e),a.HEAPF64=R=new Float64Array(e)}a.INITIAL_MEMORY;var q,z=[],N=[],G=[],L=[];function X(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)e=a.preRun.shift(),z.unshift(e);var e;ue(z)}function J(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)e=a.postRun.shift(),L.unshift(e);var e;ue(L)}var K=0,Q=null,Y=null;function Z(e){a.onAbort&&a.onAbort(e),m(e+=""),b=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";e=new WebAssembly.RuntimeError(e);throw i(e),e}function ee(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}a.preloadedImages={},a.preloadedAudios={};function te(e){return ee(e,"data:application/octet-stream;base64,")}var re="file://";function ne(e){return ee(e,re)}var oe,ie="basis_transcoder.wasm";function ae(e){try{if(e==ie&&g)return new Uint8Array(g);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}catch(e){Z(e)}}function ue(e){for(;0<e.length;){var t,r=e.shift();"function"!=typeof r?"number"==typeof(t=r.func)?void 0===r.arg?q.get(t)():q.get(t)(r.arg):t(void 0===r.arg?null:r.arg):r(a)}}te(ie)||(oe=ie,ie=a.locateFile?a.locateFile(oe,y):y+oe);var se={};function ce(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function fe(e){return this.fromWireType(O[e>>2])}var le={},pe={},de={},he=48,ye=57;function ve(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return he<=t&&t<=ye?"_"+e:e}function me(e,t){return e=ve(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function ge(e,t){var r=me(t,function(e){this.name=t,this.message=e;e=new Error(e).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(e.prototype),(r.prototype.constructor=r).prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var we=void 0;function be(e){throw new we(e)}function Te(n,t,o){function r(e){var t=o(e);t.length!==n.length&&be("Mismatched type converter count");for(var r=0;r<n.length;++r)Se(n[r],t[r])}n.forEach(function(e){de[e]=t});var i=new Array(t.length),a=[],u=0;t.forEach(function(e,t){pe.hasOwnProperty(e)?i[t]=pe[e]:(a.push(e),le.hasOwnProperty(e)||(le[e]=[]),le[e].push(function(){i[t]=pe[e],++u===a.length&&r(i)}))}),0===a.length&&r(i)}function Ce(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)}}var $e=void 0;function Pe(e){for(var t="",r=e;W[r];)t+=$e[W[r++]];return t}var Ae=void 0;function _e(e){throw new Ae(e)}function Se(e,t,r){if(r=r||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||_e('type "'+n+'" must have a positive integer typeid pointer'),pe.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;_e("Cannot register type '"+n+"' twice")}pe[e]=t,delete de[e],le.hasOwnProperty(e)&&(t=le[e],delete le[e],t.forEach(function(e){e()}))}function We(e){if(!(this instanceof Ve))return!1;if(!(e instanceof Ve))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o}function Ee(e){_e(e.$$.ptrType.registeredClass.name+" instance already deleted")}var Fe=!1;function ke(e){}function Oe(e){--e.count.value,0===e.count.value&&((e=e).smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr))}function je(e){return"undefined"==typeof FinalizationGroup?(je=function(e){return e},e):(Fe=new FinalizationGroup(function(e){for(var t=e.next();!t.done;t=e.next()){var r=t.value;r.ptr?Oe(r):console.warn("object already deleted: "+r.ptr)}}),ke=function(e){Fe.unregister(e.$$)},(je=function(e){return Fe.register(e,e.$$,e.$$),e})(e))}function Re(){if(this.$$.ptr||Ee(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,e=je(Object.create(Object.getPrototypeOf(this),{$$:{value:{count:(e=this.$$).count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Ie(){this.$$.ptr||Ee(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_e("Object already scheduled for deletion"),ke(this),Oe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function xe(){return!this.$$.ptr}var De=void 0,Ue=[];function Be(){for(;Ue.length;){var e=Ue.pop();e.$$.deleteScheduled=!1,e.delete()}}function Me(){return this.$$.ptr||Ee(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_e("Object already scheduled for deletion"),Ue.push(this),1===Ue.length&&De&&De(Be),this.$$.deleteScheduled=!0,this}function Ve(){}var He={};function qe(e,t,r){var n;void 0===e[t].overloadTable&&(n=e[t],e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||_e("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n)}function ze(e,t,r){a.hasOwnProperty(e)?((void 0===r||void 0!==a[e].overloadTable&&void 0!==a[e].overloadTable[r])&&_e("Cannot register public name '"+e+"' twice"),qe(a,e,e),a.hasOwnProperty(r)&&_e("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),a[e].overloadTable[r]=t):(a[e]=t,void 0!==r&&(a[e].numArguments=r))}function Ne(e,t,r,n,o,i,a,u){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=u,this.pureVirtualFunctions=[]}function Ge(e,t,r){for(;t!==r;)t.upcast||_e("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Le(e,t){if(null===t)return this.isReference&&_e("null is not a valid "+this.name),0;t.$$||_e('Cannot pass "'+$t(t)+'" as a '+this.name),t.$$.ptr||_e("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return Ge(t.$$.ptr,r,this.registeredClass)}function Xe(e,t){if(null===t)return this.isReference&&_e("null is not a valid "+this.name),this.isSmartPointer?(n=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,n),n):0;t.$$||_e('Cannot pass "'+$t(t)+'" as a '+this.name),t.$$.ptr||_e("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&_e("Cannot convert argument of type "+(t.$$.smartPtrType||t.$$.ptrType).name+" to parameter type "+this.name);var r,n,o=t.$$.ptrType.registeredClass;if(n=Ge(t.$$.ptr,o,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&_e("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:_e("Cannot convert argument of type "+(t.$$.smartPtrType||t.$$.ptrType).name+" to parameter type "+this.name);break;case 1:n=t.$$.smartPtr;break;case 2:t.$$.smartPtrType===this?n=t.$$.smartPtr:(r=t.clone(),n=this.rawShare(n,Tt(function(){r.delete()})),null!==e&&e.push(this.rawDestructor,n));break;default:_e("Unsupporting sharing policy")}return n}function Je(e,t){if(null===t)return this.isReference&&_e("null is not a valid "+this.name),0;t.$$||_e('Cannot pass "'+$t(t)+'" as a '+this.name),t.$$.ptr||_e("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&_e("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return Ge(t.$$.ptr,r,this.registeredClass)}function Ke(e){return e=this.rawGetPointee?this.rawGetPointee(e):e}function Qe(e){this.rawDestructor&&this.rawDestructor(e)}function Ye(e){null!==e&&e.delete()}function Ze(){return Object.keys(rt).length}function et(){var e,t=[];for(e in rt)rt.hasOwnProperty(e)&&t.push(rt[e]);return t}function tt(e){De=e,Ue.length&&De&&De(Be)}var rt={};function nt(e,t){return t=function(e,t){for(void 0===t&&_e("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),rt[t]}function ot(e,t){return t.ptrType&&t.ptr||be("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&be("Both smartPtrType and smartPtr must be specified"),t.count={value:1},je(Object.create(e,{$$:{value:t}}))}function it(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=nt(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?ot(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ot(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}r=this.registeredClass.getActualType(t),n=He[r];if(!n)return o.call(this);r=this.isConst?n.constPointerType:n.pointerType,n=function e(t,r,n){if(r===n)return t;if(void 0===n.baseClass)return null;r=e(t,r,n.baseClass);return null===r?null:n.downcast(r)}(t,this.registeredClass,r.registeredClass);return null===n?o.call(this):this.isSmartPointer?ot(r.registeredClass.instancePrototype,{ptrType:r,ptr:n,smartPtrType:this,smartPtr:e}):ot(r.registeredClass.instancePrototype,{ptrType:r,ptr:n})}function at(e,t,r,n,o,i,a,u,s,c,f){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=u,this.rawConstructor=s,this.rawShare=c,this.rawDestructor=f,o||void 0!==t.baseClass?this.toWireType=Xe:(this.toWireType=n?Le:Je,this.destructorFunction=null)}function ut(e,t,r){a.hasOwnProperty(e)||be("Replacing nonexistant public symbol"),void 0!==a[e].overloadTable&&void 0!==r?a[e].overloadTable[r]=t:(a[e]=t,a[e].argCount=r)}function st(e,t,r){return-1!=e.indexOf("j")?(n=t,o=r,e=a["dynCall_"+(e=e)],o&&o.length?e.apply(null,[n].concat(o)):e.call(null,n)):q.get(t).apply(null,r);var n,o}function ct(e,t){var r,n,o,i=-1!=(e=Pe(e)).indexOf("j")?(r=e,n=t,o=[],function(){o.length=arguments.length;for(var e=0;e<arguments.length;e++)o[e]=arguments[e];return st(r,n,o)}):q.get(t);return"function"!=typeof i&&_e("unknown function pointer with signature "+e+": "+t),i}var ft=void 0;function lt(e){var t=It(e),e=Pe(t);return Rt(t),e}function pt(e,t){var r=[],n={};throw t.forEach(function e(t){n[t]||pe[t]||(de[t]?de[t].forEach(e):(r.push(t),n[t]=!0))}),new ft(e+": "+r.map(lt).join([", "]))}function dt(e,t){for(var r=[],n=0;n<e;n++)r.push(k[(t>>2)+n]);return r}function ht(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=me(e.name||"unknownFunctionName",function(){});r.prototype=e.prototype;r=new r,t=e.apply(r,t);return t instanceof Object?t:r}function yt(e,t,r,n,o){var i=t.length;i<2&&_e("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,u=!1,s=1;s<t.length;++s)if(null!==t[s]&&void 0===t[s].destructorFunction){u=!0;break}for(var r="void"!==t[0].name,c="",f="",s=0;s<i-2;++s)c+=(0!==s?", ":"")+"arg"+s,f+=(0!==s?", ":"")+"arg"+s+"Wired";var l="return function "+ve(e)+"("+c+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";u&&(l+="var destructors = [];\n");var p=u?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],h=[_e,n,o,ce,t[0],t[1]];a&&(l+="var thisWired = classParam.toWireType("+p+", this);\n");for(s=0;s<i-2;++s)l+="var arg"+s+"Wired = argType"+s+".toWireType("+p+", arg"+s+"); // "+t[s+2].name+"\n",d.push("argType"+s),h.push(t[s+2]);if(l+=(r?"var rv = ":"")+"invoker(fn"+(0<(f=a?"thisWired"+(0<f.length?", ":"")+f:f).length?", ":"")+f+");\n",u)l+="runDestructors(destructors);\n";else for(s=a?1:2;s<t.length;++s){var y=1===s?"thisWired":"arg"+(s-2)+"Wired";null!==t[s].destructorFunction&&(l+=y+"_dtor("+y+"); // "+t[s].name+"\n",d.push(y+"_dtor"),h.push(t[s].destructorFunction))}return r&&(l+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),d.push(l+="}\n"),ht(Function,d).apply(null,h)}var vt=[],mt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function gt(e){4<e&&0==--mt[e].refcount&&(mt[e]=void 0,vt.push(e))}function wt(){for(var e=0,t=5;t<mt.length;++t)void 0!==mt[t]&&++e;return e}function bt(){for(var e=5;e<mt.length;++e)if(void 0!==mt[e])return mt[e];return null}function Tt(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=vt.length?vt.pop():mt.length;return mt[t]={refcount:1,value:e},t}}function Ct(e,t){var r=pe[e];return void 0===r&&_e(t+" has unknown type "+lt(e)),r}function $t(e){if(null===e)return"null";var t=typeof e;return"object"==t||"array"==t||"function"==t?e.toString():""+e}function Pt(e){return e||_e("Cannot use deleted val. handle = "+e),mt[e].value}var At={};function _t(e){var t=At[e];return void 0===t?Pe(e):t}var St=[];function Wt(){return"object"==typeof globalThis?globalThis:Function("return this")()}var Et={};var Ft={mappings:{},buffers:[null,[],[]],printChar:function(e,t){var r=Ft.buffers[e];0===t||10===t?((1===e?v:m)($(r,0)),r.length=0):r.push(t)},varargs:void 0,get:function(){return Ft.varargs+=4,k[Ft.varargs-4>>2]},getStr:function(e){return P(e)},get64:function(e,t){return e}};we=a.InternalError=ge(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);$e=e}(),Ae=a.BindingError=ge(Error,"BindingError"),Ve.prototype.isAliasOf=We,Ve.prototype.clone=Re,Ve.prototype.delete=Ie,Ve.prototype.isDeleted=xe,Ve.prototype.deleteLater=Me,at.prototype.getPointee=Ke,at.prototype.destructor=Qe,at.prototype.argPackAdvance=8,at.prototype.readValueFromPointer=fe,at.prototype.deleteObject=Ye,at.prototype.fromWireType=it,a.getInheritedInstanceCount=Ze,a.getLiveInheritedInstances=et,a.flushPendingDeletes=Be,a.setDelayFunction=tt,ft=a.UnboundTypeError=ge(Error,"UnboundTypeError"),a.count_emval_handles=wt,a.get_first_emval=bt;var kt,Ot={t:function(e){var t=se[e];delete se[e];var o=t.rawConstructor,i=t.rawDestructor,l=t.fields;Te([e],l.map(function(e){return e.getterReturnType}).concat(l.map(function(e){return e.setterArgumentType})),function(c){var f={};return l.forEach(function(e,t){var r=e.fieldName,n=c[t],o=e.getter,i=e.getterContext,a=c[t+l.length],u=e.setter,s=e.setterContext;f[r]={read:function(e){return n.fromWireType(o(i,e))},write:function(e,t){var r=[];u(s,e,a.toWireType(r,t)),ce(r)}}}),[{name:t.name,fromWireType:function(e){var t,r={};for(t in f)r[t]=f[t].read(e);return i(e),r},toWireType:function(e,t){for(var r in f)if(!(r in t))throw new TypeError('Missing field: "'+r+'"');var n=o();for(r in f)f[r].write(n,t[r]);return null!==e&&e.push(i,n),n},argPackAdvance:8,readValueFromPointer:fe,destructorFunction:i}]})},I:function(e,r,n,o,i){var a=Ce(n);Se(e,{name:r=Pe(r),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?o:i},argPackAdvance:8,readValueFromPointer:function(e){var t;if(1===n)t=S;else if(2===n)t=E;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+r);t=k}return this.fromWireType(t[e>>a])},destructorFunction:null})},x:function(a,e,t,u,r,s,n,c,o,f,l,i,p){l=Pe(l),s=ct(r,s),c=c&&ct(n,c),f=f&&ct(o,f),p=ct(i,p);var d=ve(l);ze(d,function(){pt("Cannot construct "+l+" due to unbound types",[u])}),Te([a,e,t],u?[u]:[],function(e){e=e[0];var t=u?(i=e.registeredClass).instancePrototype:Ve.prototype,r=me(d,function(){if(Object.getPrototypeOf(this)!==n)throw new Ae("Use 'new' to construct "+l);if(void 0===o.constructor_body)throw new Ae(l+" has no accessible constructor");var e=o.constructor_body[arguments.length];if(void 0===e)throw new Ae("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(o.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)}),n=Object.create(t,{constructor:{value:r}});r.prototype=n;var o=new Ne(l,r,n,p,i,s,c,f),e=new at(l,o,!0,!1,!1),t=new at(l+"*",o,!1,!1,!1),i=new at(l+" const*",o,!1,!0,!1);return He[a]={pointerType:t,constPointerType:i},ut(d,r),[e,t,i]})},w:function(e,o,t,r,i,n){T(0<o);var a=dt(o,t);i=ct(r,i);var u=[n],s=[];Te([],[e],function(e){var n="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[o-1])throw new Ae("Cannot register multiple constructors with identical number of parameters ("+(o-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[o-1]=function(){pt("Cannot construct "+e.name+" due to unbound types",a)},Te([],a,function(r){return e.registeredClass.constructor_body[o-1]=function(){arguments.length!==o-1&&_e(n+" called with "+arguments.length+" arguments, expected "+(o-1)),s.length=0,u.length=o;for(var e=1;e<o;++e)u[e]=r[e].toWireType(s,arguments[e-1]);var t=i.apply(null,u);return ce(s),r[0].fromWireType(t)},[]}),[]})},d:function(e,i,a,t,r,u,s,c){var f=dt(a,t);i=Pe(i),u=ct(r,u),Te([],[e],function(t){var r=(t=t[0]).name+"."+i;function e(){pt("Cannot call "+r+" due to unbound types",f)}c&&t.registeredClass.pureVirtualFunctions.push(i);var n=t.registeredClass.instancePrototype,o=n[i];return void 0===o||void 0===o.overloadTable&&o.className!==t.name&&o.argCount===a-2?(e.argCount=a-2,e.className=t.name,n[i]=e):(qe(n,i,r),n[i].overloadTable[a-2]=e),Te([],f,function(e){e=yt(r,e,t,u,s);return void 0===n[i].overloadTable?(e.argCount=a-2,n[i]=e):n[i].overloadTable[a-2]=e,[]}),[]})},k:function(t,e,r){t=Pe(t),Te([],[e],function(e){return e=e[0],a[t]=e.fromWireType(r),[]})},H:function(e,t){Se(e,{name:t=Pe(t),fromWireType:function(e){var t=mt[e].value;return gt(e),t},toWireType:function(e,t){return Tt(t)},argPackAdvance:8,readValueFromPointer:fe,destructorFunction:null})},n:function(e,t,r,n){function o(){}r=Ce(r),t=Pe(t),o.values={},Se(e,{name:t,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:function(e,t,r){switch(t){case 0:return function(e){var t=r?S:W;return this.fromWireType(t[e])};case 1:return function(e){var t=r?E:F;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=r?k:O;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}(t,r,n),destructorFunction:null}),ze(t,o)},a:function(e,t,r){var n=Ct(e,"enum");t=Pe(t),e=n.constructor,n=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:me(n.name+"_"+t,function(){})}}),e.values[r]=n,e[t]=n},A:function(e,t,r){r=Ce(r),Se(e,{name:t=Pe(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+$t(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:function(e,t){switch(t){case 2:return function(e){return this.fromWireType(j[e>>2])};case 3:return function(e){return this.fromWireType(R[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}(t,r),destructorFunction:null})},i:function(t,r,e,n,o,i){var a=dt(r,e);t=Pe(t),o=ct(n,o),ze(t,function(){pt("Cannot call "+t+" due to unbound types",a)},r-1),Te([],a,function(e){e=[e[0],null].concat(e.slice(1));return ut(t,yt(t,e,null,o,i),r-1),[]})},j:function(e,r,t,n,o){r=Pe(r),-1===o&&(o=4294967295);var i,a=Ce(t),u=function(e){return e};0===n&&(i=32-8*t,u=function(e){return e<<i>>>i});var s=-1!=r.indexOf("unsigned");Se(e,{name:r,fromWireType:u,toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+$t(t)+'" to '+this.name);if(t<n||o<t)throw new TypeError('Passing a number "'+$t(t)+'" from JS side to C/C++ side to an argument of type "'+r+'", which is outside the valid range ['+n+", "+o+"]!");return s?t>>>0:0|t},argPackAdvance:8,readValueFromPointer:function(e,t,r){switch(t){case 0:return r?function(e){return S[e]}:function(e){return W[e]};case 1:return r?function(e){return E[e>>1]}:function(e){return F[e>>1]};case 2:return r?function(e){return k[e>>2]}:function(e){return O[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}(r,a,0!==n),destructorFunction:null})},h:function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=O,r=t[e>>=2],e=t[e+1];return new n(_,e,r)}Se(e,{name:r=Pe(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},B:function(e,t){var s="std::string"===(t=Pe(t));Se(e,{name:t,fromWireType:function(e){var t,r=O[e>>2];if(s)for(var n=e+4,o=0;o<=r;++o){var i,a=e+4+o;o!=r&&0!=W[a]||(i=P(n,a-n),void 0===t?t=i:(t+=String.fromCharCode(0),t+=i),n=a+1)}else{for(var u=new Array(r),o=0;o<r;++o)u[o]=String.fromCharCode(W[e+4+o]);t=u.join("")}return Rt(e),t},toWireType:function(e,t){var r="string"==typeof(t=t instanceof ArrayBuffer?new Uint8Array(t):t);r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||_e("Cannot pass non-string to std::string");var n=(s&&r?function(){return function(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);(n=55296<=n&&n<=57343?65536+((1023&n)<<10)|1023&e.charCodeAt(++r):n)<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}(t)}:function(){return t.length})(),o=jt(4+n+1);if(O[o>>2]=n,s&&r)A(t,o+4,n+1);else if(r)for(var i=0;i<n;++i){var a=t.charCodeAt(i);255<a&&(Rt(o),_e("String has UTF-16 code units that do not fit in 8 bits")),W[o+4+i]=a}else for(i=0;i<n;++i)W[o+4+i]=t[i];return null!==e&&e.push(Rt,o),o},argPackAdvance:8,readValueFromPointer:fe,destructorFunction:function(e){Rt(e)}})},v:function(e,s,o){var c,i,f,a,l;o=Pe(o),2===s?(c=x,i=D,a=U,f=function(){return F},l=1):4===s&&(c=B,i=M,a=V,f=function(){return O},l=2),Se(e,{name:o,fromWireType:function(e){for(var t,r=O[e>>2],n=f(),o=e+4,i=0;i<=r;++i){var a,u=e+4+i*s;i!=r&&0!=n[u>>l]||(a=c(o,u-o),void 0===t?t=a:(t+=String.fromCharCode(0),t+=a),o=u+s)}return Rt(e),t},toWireType:function(e,t){"string"!=typeof t&&_e("Cannot pass non-string to C++ string type "+o);var r=a(t),n=jt(4+r+s);return O[n>>2]=r>>l,i(t,n+4,r+s),null!==e&&e.push(Rt,n),n},argPackAdvance:8,readValueFromPointer:fe,destructorFunction:function(e){Rt(e)}})},u:function(e,t,r,n,o,i){se[e]={name:Pe(t),rawConstructor:ct(r,n),rawDestructor:ct(o,i),fields:[]}},c:function(e,t,r,n,o,i,a,u,s,c){se[e].fields.push({fieldName:Pe(t),getterReturnType:r,getter:ct(n,o),getterContext:i,setterArgumentType:a,setter:ct(u,s),setterContext:c})},J:function(e,t){Se(e,{isVoid:!0,name:t=Pe(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},m:function(e,t,r){e=Pt(e),t=Ct(t,"emval::as");var n=[],o=Tt(n);return k[r>>2]=o,t.toWireType(n,e)},s:function(e,t,r,n){(e=St[e])(t=Pt(t),r=_t(r),null,n)},b:gt,y:function(e){return 0===e?Tt(Wt()):(e=_t(e),Tt(Wt()[e]))},p:function(e,t){for(var r=function(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=Ct(k[(t>>2)+n],"parameter "+n);return r}(e,t),n=r[0],t=n.name+"_$"+r.slice(1).map(function(e){return e.name}).join("_")+"$",o=["retType"],i=[n],a="",u=0;u<e-1;++u)a+=(0!==u?", ":"")+"arg"+u,o.push("argType"+u),i.push(r[1+u]);for(var s="return function "+ve("methodCaller_"+t)+"(handle, name, destructors, args) {\n",c=0,u=0;u<e-1;++u)s+=" var arg"+u+" = argType"+u+".readValueFromPointer(args"+(c?"+"+c:"")+");\n",c+=r[u+1].argPackAdvance;for(s+=" var rv = handle[name]("+a+");\n",u=0;u<e-1;++u)r[u+1].deleteObject&&(s+=" argType"+u+".deleteObject(arg"+u+");\n");return n.isVoid||(s+=" return retType.toWireType(destructors, rv);\n"),o.push(s+="};\n"),t=ht(Function,o).apply(null,i),n=St.length,St.push(t),n},r:function(e){return e=_t(e),Tt(a[e])},e:function(e,t){return Tt((e=Pt(e))[t=Pt(t)])},g:function(e){4<e&&(mt[e].refcount+=1)},q:function(e,t,r,n){e=Pt(e);var o=Et[t];return o||(o=function(e){for(var t="",r=0;r<e;++r)t+=(0!==r?", ":"")+"arg"+r;for(var n="return function emval_allocator_"+e+"(constructor, argTypes, args) {\n",r=0;r<e;++r)n+="var argType"+r+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+r+'], "parameter '+r+'");\nvar arg'+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\n";return n+="var obj = new constructor("+t+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",n)(Ct,a,Tt)}(t),Et[t]=o),o(e,r,n)},f:function(e){return Tt(_t(e))},l:function(e){ce(mt[e].value),gt(e)},o:function(){Z()},E:function(e,t,r){W.copyWithin(e,t,t+r)},F:function(e){var t=W.length,r=2147483648;if(r<(e>>>=0))return!1;for(var n,o=1;o<=4;o*=2){var i=t*(1+.2/o),i=Math.min(i,e+100663296);if(function(e){try{return w.grow(e-_.byteLength+65535>>>16),H(w.buffer),1}catch(e){}}(Math.min(r,(0<(n=Math.max(e,i))%(i=65536)&&(n+=i-n%i),n))))return!0}return!1},G:function(e){return 0},C:function(e,t,r,n,o){},z:function(e,t,r,n){for(var o=0,i=0;i<r;i++){for(var a=k[t+8*i>>2],u=k[t+(8*i+4)>>2],s=0;s<u;s++)Ft.printChar(e,W[a+s]);o+=u}return k[n>>2]=o,0},D:function(e){0}},jt=(function(){var t={a:Ot};function r(e,t){e=e.exports;a.asm=e,H((w=a.asm.K).buffer),q=a.asm.O,e=a.asm.L,N.unshift(e),K--,a.monitorRunDependencies&&a.monitorRunDependencies(K),0==K&&(null!==Q&&(clearInterval(Q),Q=null),Y&&(e=Y,Y=null,e()))}function n(e){r(e.instance)}function o(e){return function(){if(!g&&(l||p)){if("function"==typeof fetch&&!ne(ie))return fetch(ie,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ie+"'";return e.arrayBuffer()}).catch(function(){return ae(ie)});if(u)return new Promise(function(t,e){u(ie,function(e){t(new Uint8Array(e))},e)})}return Promise.resolve().then(function(){return ae(ie)})}().then(function(e){return WebAssembly.instantiate(e,t)}).then(e,function(e){m("failed to asynchronously prepare wasm: "+e),Z(e)})}if(K++,a.monitorRunDependencies&&a.monitorRunDependencies(K),a.instantiateWasm)try{return a.instantiateWasm(t,r)}catch(e){return m("Module.instantiateWasm callback failed with error: "+e)}(g||"function"!=typeof WebAssembly.instantiateStreaming||te(ie)||ne(ie)||"function"!=typeof fetch?o(n):fetch(ie,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,t).then(n,function(e){return m("wasm streaming compile failed: "+e),m("falling back to ArrayBuffer instantiation"),o(n)})})).catch(i)}(),a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.L).apply(null,arguments)},a._malloc=function(){return(jt=a._malloc=a.asm.M).apply(null,arguments)}),Rt=a._free=function(){return(Rt=a._free=a.asm.N).apply(null,arguments)},It=a.___getTypeName=function(){return(It=a.___getTypeName=a.asm.P).apply(null,arguments)};a.___embind_register_native_and_builtin_types=function(){return(a.___embind_register_native_and_builtin_types=a.asm.Q).apply(null,arguments)},a.dynCall_jiji=function(){return(a.dynCall_jiji=a.asm.R).apply(null,arguments)};function xt(e){function t(){kt||(kt=!0,a.calledRun=!0,b||(ue(N),ue(G),r(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),J()))}0<K||(X(),0<K||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),t()},1)):t()))}if(Y=function e(){kt||xt(),kt||(Y=e)},a.run=xt,a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();return xt(),e.ready}}();"object"==typeof exports&&"object"==typeof module?module.exports=BASIS:"function"==typeof define&&define.amd?define([],function(){return BASIS}):"object"==typeof exports&&(exports.BASIS=BASIS); | ||
var BASIS=function(){var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(r=r||__filename),function(t){var e,n,o=void 0!==(t=t||{})?t:{};o.ready=new Promise((function(r,t){e=r,readyPromiseRejectza=t}));var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var u=[],s=!1,c=!1,f=!1,l=!1;s="object"==typeof window,c="function"==typeof importScripts,f="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,l=!s&&!f&&!c;var p,d,h,v,y,m="";function g(r){return o.locateFile?o.locateFile(r,m):m+r}f?(m=c?require("path").dirname(m)+"/":__dirname+"/",p=function(r,t){return v||(v=require("fs")),y||(y=require("path")),r=y.normalize(r),v.readFileSync(r,t?null:"utf8")},h=function(r){var t=p(r,!0);return t.buffer||(t=new Uint8Array(t)),A(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),u=process.argv.slice(2),process.on("uncaughtException",(function(r){if(!(r instanceof Qe))throw r})),process.on("unhandledRejection",dr),function(r){process.exit(r)},o.inspect=function(){return"[Emscripten Module object]"}):l?("undefined"!=typeof read&&(p=function(r){return read(r)}),h=function(r){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(r)):(A("object"==typeof(t=read(r,"binary"))),t)},"undefined"!=typeof scriptArgs?u=scriptArgs:void 0!==arguments&&(u=arguments),"function"==typeof quit&&function(r){quit(r)},"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(s||c)&&(c?m=self.location.href:"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),r&&(m=r),m=0!==m.indexOf("blob:")?m.substr(0,m.lastIndexOf("/")+1):"",p=function(r){var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText},c&&(h=function(r){var t=new XMLHttpRequest;return t.open("GET",r,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),d=function(r,t,e){var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):e()},n.onerror=e,n.send(null)});var w=o.print||console.log.bind(console),T=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments&&(u=o.arguments),o.thisProgram&&o.thisProgram,o.quit&&o.quit;var b,C=function(r){r};o.wasmBinary&&(b=o.wasmBinary);var $;o.noExitRuntime;"object"!=typeof WebAssembly&&dr("no native wasm support detected");var P=!1;function A(r,t){r||dr("Assertion failed: "+t)}var _="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function S(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.subarray&&_)return _.decode(r.subarray(t,o));for(var i="";t<o;){var a=r[t++];if(128&a){var u=63&r[t++];if(192!=(224&a)){var s=63&r[t++];if((a=224==(240&a)?(15&a)<<12|u<<6|s:(7&a)<<18|u<<12|s<<6|63&r[t++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|u)}else i+=String.fromCharCode(a)}return i}function W(r,t){return r?S(R,r,t):""}function E(r,t,e,n){if(!(n>0))return 0;for(var o=e,i=e+n-1,a=0;a<r.length;++a){var u=r.charCodeAt(a);if(u>=55296&&u<=57343)u=65536+((1023&u)<<10)|1023&r.charCodeAt(++a);if(u<=127){if(e>=i)break;t[e++]=u}else if(u<=2047){if(e+1>=i)break;t[e++]=192|u>>6,t[e++]=128|63&u}else if(u<=65535){if(e+2>=i)break;t[e++]=224|u>>12,t[e++]=128|u>>6&63,t[e++]=128|63&u}else{if(e+3>=i)break;t[e++]=240|u>>18,t[e++]=128|u>>12&63,t[e++]=128|u>>6&63,t[e++]=128|63&u}}return t[e]=0,e-o}function F(r,t,e){return E(r,R,t,e)}function k(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++e)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}var O,j,R,x,I,D,U,B,M,V="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function q(r,t){for(var e=r,n=e>>1,o=n+t/2;!(n>=o)&&I[n];)++n;if((e=n<<1)-r>32&&V)return V.decode(R.subarray(r,e));for(var i="",a=0;!(a>=t/2);++a){var u=x[r+2*a>>1];if(0==u)break;i+=String.fromCharCode(u)}return i}function H(r,t,e){if(void 0===e&&(e=2147483647),e<2)return 0;for(var n=t,o=(e-=2)<2*r.length?e/2:r.length,i=0;i<o;++i){var a=r.charCodeAt(i);x[t>>1]=a,t+=2}return x[t>>1]=0,t-n}function z(r){return 2*r.length}function N(r,t){for(var e=0,n="";!(e>=t/4);){var o=D[r+4*e>>2];if(0==o)break;if(++e,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function G(r,t,e){if(void 0===e&&(e=2147483647),e<4)return 0;for(var n=t,o=n+e-4,i=0;i<r.length;++i){var a=r.charCodeAt(i);if(a>=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&r.charCodeAt(++i);if(D[t>>2]=a,(t+=4)+4>o)break}return D[t>>2]=0,t-n}function L(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&++e,t+=4}return t}function X(r,t){return r%t>0&&(r+=t-r%t),r}function J(r){O=r,o.HEAP8=j=new Int8Array(r),o.HEAP16=x=new Int16Array(r),o.HEAP32=D=new Int32Array(r),o.HEAPU8=R=new Uint8Array(r),o.HEAPU16=I=new Uint16Array(r),o.HEAPU32=U=new Uint32Array(r),o.HEAPF32=B=new Float32Array(r),o.HEAPF64=M=new Float64Array(r)}o.INITIAL_MEMORY;var K,Q=[],Y=[],Z=[],rr=[];function tr(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)ir(o.preRun.shift());$r(Q)}function er(){!0,$r(Y)}function nr(){$r(Z)}function or(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)ur(o.postRun.shift());$r(rr)}function ir(r){Q.unshift(r)}function ar(r){Y.unshift(r)}function ur(r){rr.unshift(r)}var sr=0,cr=null,fr=null;function lr(r){sr++,o.monitorRunDependencies&&o.monitorRunDependencies(sr)}function pr(r){if(sr--,o.monitorRunDependencies&&o.monitorRunDependencies(sr),0==sr&&(null!==cr&&(clearInterval(cr),cr=null),fr)){var t=fr;fr=null,t()}}function dr(r){o.onAbort&&o.onAbort(r),T(r+=""),P=!0,1,r="abort("+r+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(r);throw n(t),t}function hr(r,t){return String.prototype.startsWith?r.startsWith(t):0===r.indexOf(t)}o.preloadedImages={},o.preloadedAudios={};var vr="data:application/octet-stream;base64,";function yr(r){return hr(r,vr)}var mr="file://";function gr(r){return hr(r,mr)}var wr="basis_transcoder.wasm";function Tr(r){try{if(r==wr&&b)return new Uint8Array(b);if(h)return h(r);throw"both async and sync fetching of the wasm failed"}catch(r){dr(r)}}function br(){if(!b&&(s||c)){if("function"==typeof fetch&&!gr(wr))return fetch(wr,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+wr+"'";return r.arrayBuffer()})).catch((function(){return Tr(wr)}));if(d)return new Promise((function(r,t){d(wr,(function(t){r(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return Tr(wr)}))}function Cr(){var r={a:Le};function t(r,t){var e=r.exports;o.asm=e,J(($=o.asm.K).buffer),K=o.asm.O,ar(o.asm.L),pr()}function e(r){t(r.instance)}function i(t){return br().then((function(t){return WebAssembly.instantiate(t,r)})).then(t,(function(r){T("failed to asynchronously prepare wasm: "+r),dr(r)}))}if(lr(),o.instantiateWasm)try{return o.instantiateWasm(r,t)}catch(r){return T("Module.instantiateWasm callback failed with error: "+r),!1}return(b||"function"!=typeof WebAssembly.instantiateStreaming||yr(wr)||gr(wr)||"function"!=typeof fetch?i(e):fetch(wr,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(e,(function(r){return T("wasm streaming compile failed: "+r),T("falling back to ArrayBuffer instantiation"),i(e)}))}))).catch(n),{}}function $r(r){for(;r.length>0;){var t=r.shift();if("function"!=typeof t){var e=t.func;"number"==typeof e?void 0===t.arg?K.get(e)():K.get(e)(t.arg):e(void 0===t.arg?null:t.arg)}else t(o)}}yr(wr)||(wr=g(wr));var Pr={};function Ar(r){for(;r.length;){var t=r.pop();r.pop()(t)}}function _r(r){return this.fromWireType(U[r>>2])}var Sr={},Wr={},Er={},Fr=48,kr=57;function Or(r){if(void 0===r)return"_unknown";var t=(r=r.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Fr&&t<=kr?"_"+r:r}function jr(r,t){return r=Or(r),new Function("body","return function "+r+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Rr(r,t){var e=jr(t,(function(r){this.name=t,this.message=r;var e=new Error(r).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},e}var xr=void 0;function Ir(r){throw new xr(r)}function Dr(r,t,e){function n(t){var n=e(t);n.length!==r.length&&Ir("Mismatched type converter count");for(var o=0;o<r.length;++o)Nr(r[o],n[o])}r.forEach((function(r){Er[r]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(r,t){Wr.hasOwnProperty(r)?o[t]=Wr[r]:(i.push(r),Sr.hasOwnProperty(r)||(Sr[r]=[]),Sr[r].push((function(){o[t]=Wr[r],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Ur(r){var t=Pr[r];delete Pr[r];var e=t.rawConstructor,n=t.rawDestructor,o=t.fields;Dr([r],o.map((function(r){return r.getterReturnType})).concat(o.map((function(r){return r.setterArgumentType}))),(function(r){var i={};return o.forEach((function(t,e){var n=t.fieldName,a=r[e],u=t.getter,s=t.getterContext,c=r[e+o.length],f=t.setter,l=t.setterContext;i[n]={read:function(r){return a.fromWireType(u(s,r))},write:function(r,t){var e=[];f(l,r,c.toWireType(e,t)),Ar(e)}}})),[{name:t.name,fromWireType:function(r){var t={};for(var e in i)t[e]=i[e].read(r);return n(r),t},toWireType:function(r,t){for(var o in i)if(!(o in t))throw new TypeError('Missing field: "'+o+'"');var a=e();for(o in i)i[o].write(a,t[o]);return null!==r&&r.push(n,a),a},argPackAdvance:8,readValueFromPointer:_r,destructorFunction:n}]}))}function Br(r){switch(r){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+r)}}function Mr(){for(var r=new Array(256),t=0;t<256;++t)r[t]=String.fromCharCode(t);Vr=r}var Vr=void 0;function qr(r){for(var t="",e=r;R[e];)t+=Vr[R[e++]];return t}var Hr=void 0;function zr(r){throw new Hr(r)}function Nr(r,t,e){if(e=e||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(r||zr('type "'+n+'" must have a positive integer typeid pointer'),Wr.hasOwnProperty(r)){if(e.ignoreDuplicateRegistrations)return;zr("Cannot register type '"+n+"' twice")}if(Wr[r]=t,delete Er[r],Sr.hasOwnProperty(r)){var o=Sr[r];delete Sr[r],o.forEach((function(r){r()}))}}function Gr(r,t,e,n,o){var i=Br(e);Nr(r,{name:t=qr(t),fromWireType:function(r){return!!r},toWireType:function(r,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(r){var n;if(1===e)n=j;else if(2===e)n=x;else{if(4!==e)throw new TypeError("Unknown boolean type size: "+t);n=D}return this.fromWireType(n[r>>i])},destructorFunction:null})}function Lr(r){if(!(this instanceof ct))return!1;if(!(r instanceof ct))return!1;for(var t=this.$$.ptrType.registeredClass,e=this.$$.ptr,n=r.$$.ptrType.registeredClass,o=r.$$.ptr;t.baseClass;)e=t.upcast(e),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&e===o}function Xr(r){return{count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType}}function Jr(r){zr(r.$$.ptrType.registeredClass.name+" instance already deleted")}var Kr=!1;function Qr(r){}function Yr(r){r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)}function Zr(r){r.count.value-=1,0===r.count.value&&Yr(r)}function rt(r){return"undefined"==typeof FinalizationGroup?(rt=function(r){return r},r):(Kr=new FinalizationGroup((function(r){for(var t=r.next();!t.done;t=r.next()){var e=t.value;e.ptr?Zr(e):console.warn("object already deleted: "+e.ptr)}})),rt=function(r){return Kr.register(r,r.$$,r.$$),r},Qr=function(r){Kr.unregister(r.$$)},rt(r))}function tt(){if(this.$$.ptr||Jr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=rt(Object.create(Object.getPrototypeOf(this),{$$:{value:Xr(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r}function et(){this.$$.ptr||Jr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&zr("Object already scheduled for deletion"),Qr(this),Zr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function nt(){return!this.$$.ptr}var ot=void 0,it=[];function at(){for(;it.length;){var r=it.pop();r.$$.deleteScheduled=!1,r.delete()}}function ut(){return this.$$.ptr||Jr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&zr("Object already scheduled for deletion"),it.push(this),1===it.length&&ot&&ot(at),this.$$.deleteScheduled=!0,this}function st(){ct.prototype.isAliasOf=Lr,ct.prototype.clone=tt,ct.prototype.delete=et,ct.prototype.isDeleted=nt,ct.prototype.deleteLater=ut}function ct(){}var ft={};function lt(r,t,e){if(void 0===r[t].overloadTable){var n=r[t];r[t]=function(){return r[t].overloadTable.hasOwnProperty(arguments.length)||zr("Function '"+e+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+r[t].overloadTable+")!"),r[t].overloadTable[arguments.length].apply(this,arguments)},r[t].overloadTable=[],r[t].overloadTable[n.argCount]=n}}function pt(r,t,e){o.hasOwnProperty(r)?((void 0===e||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[e])&&zr("Cannot register public name '"+r+"' twice"),lt(o,r,r),o.hasOwnProperty(e)&&zr("Cannot register multiple overloads of a function with the same number of arguments ("+e+")!"),o[r].overloadTable[e]=t):(o[r]=t,void 0!==e&&(o[r].numArguments=e))}function dt(r,t,e,n,o,i,a,u){this.name=r,this.constructor=t,this.instancePrototype=e,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=u,this.pureVirtualFunctions=[]}function ht(r,t,e){for(;t!==e;)t.upcast||zr("Expected null or instance of "+e.name+", got an instance of "+t.name),r=t.upcast(r),t=t.baseClass;return r}function vt(r,t){if(null===t)return this.isReference&&zr("null is not a valid "+this.name),0;t.$$||zr('Cannot pass "'+ae(t)+'" as a '+this.name),t.$$.ptr||zr("Cannot pass deleted object as a pointer of type "+this.name);var e=t.$$.ptrType.registeredClass;return ht(t.$$.ptr,e,this.registeredClass)}function yt(r,t){var e;if(null===t)return this.isReference&&zr("null is not a valid "+this.name),this.isSmartPointer?(e=this.rawConstructor(),null!==r&&r.push(this.rawDestructor,e),e):0;t.$$||zr('Cannot pass "'+ae(t)+'" as a '+this.name),t.$$.ptr||zr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&zr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(e=ht(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&zr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?e=t.$$.smartPtr:zr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:e=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)e=t.$$.smartPtr;else{var o=t.clone();e=this.rawShare(e,re((function(){o.delete()}))),null!==r&&r.push(this.rawDestructor,e)}break;default:zr("Unsupporting sharing policy")}return e}function mt(r,t){if(null===t)return this.isReference&&zr("null is not a valid "+this.name),0;t.$$||zr('Cannot pass "'+ae(t)+'" as a '+this.name),t.$$.ptr||zr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&zr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var e=t.$$.ptrType.registeredClass;return ht(t.$$.ptr,e,this.registeredClass)}function gt(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function wt(r){this.rawDestructor&&this.rawDestructor(r)}function Tt(r){null!==r&&r.delete()}function bt(r,t,e){if(t===e)return r;if(void 0===e.baseClass)return null;var n=bt(r,t,e.baseClass);return null===n?null:e.downcast(n)}function Ct(){return Object.keys(_t).length}function $t(){var r=[];for(var t in _t)_t.hasOwnProperty(t)&&r.push(_t[t]);return r}function Pt(r){ot=r,it.length&&ot&&ot(at)}function At(){o.getInheritedInstanceCount=Ct,o.getLiveInheritedInstances=$t,o.flushPendingDeletes=at,o.setDelayFunction=Pt}var _t={};function St(r,t){for(void 0===t&&zr("ptr should not be undefined");r.baseClass;)t=r.upcast(t),r=r.baseClass;return t}function Wt(r,t){return t=St(r,t),_t[t]}function Et(r,t){return t.ptrType&&t.ptr||Ir("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&Ir("Both smartPtrType and smartPtr must be specified"),t.count={value:1},rt(Object.create(r,{$$:{value:t}}))}function Ft(r){var t=this.getPointee(r);if(!t)return this.destructor(r),null;var e=Wt(this.registeredClass,t);if(void 0!==e){if(0===e.$$.count.value)return e.$$.ptr=t,e.$$.smartPtr=r,e.clone();var n=e.clone();return this.destructor(r),n}function o(){return this.isSmartPointer?Et(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:r}):Et(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var i,a=this.registeredClass.getActualType(t),u=ft[a];if(!u)return o.call(this);i=this.isConst?u.constPointerType:u.pointerType;var s=bt(t,this.registeredClass,i.registeredClass);return null===s?o.call(this):this.isSmartPointer?Et(i.registeredClass.instancePrototype,{ptrType:i,ptr:s,smartPtrType:this,smartPtr:r}):Et(i.registeredClass.instancePrototype,{ptrType:i,ptr:s})}function kt(){Ot.prototype.getPointee=gt,Ot.prototype.destructor=wt,Ot.prototype.argPackAdvance=8,Ot.prototype.readValueFromPointer=_r,Ot.prototype.deleteObject=Tt,Ot.prototype.fromWireType=Ft}function Ot(r,t,e,n,o,i,a,u,s,c,f){this.name=r,this.registeredClass=t,this.isReference=e,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=u,this.rawConstructor=s,this.rawShare=c,this.rawDestructor=f,o||void 0!==t.baseClass?this.toWireType=yt:n?(this.toWireType=vt,this.destructorFunction=null):(this.toWireType=mt,this.destructorFunction=null)}function jt(r,t,e){o.hasOwnProperty(r)||Ir("Replacing nonexistant public symbol"),void 0!==o[r].overloadTable&&void 0!==e?o[r].overloadTable[e]=t:(o[r]=t,o[r].argCount=e)}function Rt(r,t,e){var n=o["dynCall_"+r];return e&&e.length?n.apply(null,[t].concat(e)):n.call(null,t)}function xt(r,t,e){return-1!=r.indexOf("j")?Rt(r,t,e):K.get(t).apply(null,e)}function It(r,t){var e=[];return function(){e.length=arguments.length;for(var n=0;n<arguments.length;n++)e[n]=arguments[n];return xt(r,t,e)}}function Dt(r,t){var e=-1!=(r=qr(r)).indexOf("j")?It(r,t):K.get(t);return"function"!=typeof e&&zr("unknown function pointer with signature "+r+": "+t),e}var Ut=void 0;function Bt(r){var t=Ke(r),e=qr(t);return Je(t),e}function Mt(r,t){var e=[],n={};throw t.forEach((function r(t){n[t]||Wr[t]||(Er[t]?Er[t].forEach(r):(e.push(t),n[t]=!0))})),new Ut(r+": "+e.map(Bt).join([", "]))}function Vt(r,t,e,n,o,i,a,u,s,c,f,l,p){f=qr(f),i=Dt(o,i),u&&(u=Dt(a,u)),c&&(c=Dt(s,c)),p=Dt(l,p);var d=Or(f);pt(d,(function(){Mt("Cannot construct "+f+" due to unbound types",[n])})),Dr([r,t,e],n?[n]:[],(function(t){var e,o;t=t[0],o=n?(e=t.registeredClass).instancePrototype:ct.prototype;var a=jr(d,(function(){if(Object.getPrototypeOf(this)!==s)throw new Hr("Use 'new' to construct "+f);if(void 0===l.constructor_body)throw new Hr(f+" has no accessible constructor");var r=l.constructor_body[arguments.length];if(void 0===r)throw new Hr("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(l.constructor_body).toString()+") parameters instead!");return r.apply(this,arguments)})),s=Object.create(o,{constructor:{value:a}});a.prototype=s;var l=new dt(f,a,s,p,e,i,u,c),h=new Ot(f,l,!0,!1,!1),v=new Ot(f+"*",l,!1,!1,!1),y=new Ot(f+" const*",l,!1,!0,!1);return ft[r]={pointerType:v,constPointerType:y},jt(d,a),[h,v,y]}))}function qt(r,t){for(var e=[],n=0;n<r;n++)e.push(D[(t>>2)+n]);return e}function Ht(r,t,e,n,o,i){A(t>0);var a=qt(t,e);o=Dt(n,o);var u=[i],s=[];Dr([],[r],(function(r){var e="constructor "+(r=r[0]).name;if(void 0===r.registeredClass.constructor_body&&(r.registeredClass.constructor_body=[]),void 0!==r.registeredClass.constructor_body[t-1])throw new Hr("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+r.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return r.registeredClass.constructor_body[t-1]=function(){Mt("Cannot construct "+r.name+" due to unbound types",a)},Dr([],a,(function(n){return r.registeredClass.constructor_body[t-1]=function(){arguments.length!==t-1&&zr(e+" called with "+arguments.length+" arguments, expected "+(t-1)),s.length=0,u.length=t;for(var r=1;r<t;++r)u[r]=n[r].toWireType(s,arguments[r-1]);var i=o.apply(null,u);return Ar(s),n[0].fromWireType(i)},[]})),[]}))}function zt(r,t){if(!(r instanceof Function))throw new TypeError("new_ called with constructor type "+typeof r+" which is not a function");var e=jr(r.name||"unknownFunctionName",(function(){}));e.prototype=r.prototype;var n=new e,o=r.apply(n,t);return o instanceof Object?o:n}function Nt(r,t,e,n,o){var i=t.length;i<2&&zr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==e,u=!1,s=1;s<t.length;++s)if(null!==t[s]&&void 0===t[s].destructorFunction){u=!0;break}var c="void"!==t[0].name,f="",l="";for(s=0;s<i-2;++s)f+=(0!==s?", ":"")+"arg"+s,l+=(0!==s?", ":"")+"arg"+s+"Wired";var p="return function "+Or(r)+"("+f+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+r+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";u&&(p+="var destructors = [];\n");var d=u?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[zr,n,o,Ar,t[0],t[1]];a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n");for(s=0;s<i-2;++s)p+="var arg"+s+"Wired = argType"+s+".toWireType("+d+", arg"+s+"); // "+t[s+2].name+"\n",h.push("argType"+s),v.push(t[s+2]);if(a&&(l="thisWired"+(l.length>0?", ":"")+l),p+=(c?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",u)p+="runDestructors(destructors);\n";else for(s=a?1:2;s<t.length;++s){var y=1===s?"thisWired":"arg"+(s-2)+"Wired";null!==t[s].destructorFunction&&(p+=y+"_dtor("+y+"); // "+t[s].name+"\n",h.push(y+"_dtor"),v.push(t[s].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.push(p),zt(Function,h).apply(null,v)}function Gt(r,t,e,n,o,i,a,u){var s=qt(e,n);t=qr(t),i=Dt(o,i),Dr([],[r],(function(r){var n=(r=r[0]).name+"."+t;function o(){Mt("Cannot call "+n+" due to unbound types",s)}u&&r.registeredClass.pureVirtualFunctions.push(t);var c=r.registeredClass.instancePrototype,f=c[t];return void 0===f||void 0===f.overloadTable&&f.className!==r.name&&f.argCount===e-2?(o.argCount=e-2,o.className=r.name,c[t]=o):(lt(c,t,n),c[t].overloadTable[e-2]=o),Dr([],s,(function(o){var u=Nt(n,o,r,i,a);return void 0===c[t].overloadTable?(u.argCount=e-2,c[t]=u):c[t].overloadTable[e-2]=u,[]})),[]}))}function Lt(r,t,e){r=qr(r),Dr([],[t],(function(t){return t=t[0],o[r]=t.fromWireType(e),[]}))}var Xt=[],Jt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Kt(r){r>4&&0==--Jt[r].refcount&&(Jt[r]=void 0,Xt.push(r))}function Qt(){for(var r=0,t=5;t<Jt.length;++t)void 0!==Jt[t]&&++r;return r}function Yt(){for(var r=5;r<Jt.length;++r)if(void 0!==Jt[r])return Jt[r];return null}function Zt(){o.count_emval_handles=Qt,o.get_first_emval=Yt}function re(r){switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Xt.length?Xt.pop():Jt.length;return Jt[t]={refcount:1,value:r},t}}function te(r,t){Nr(r,{name:t=qr(t),fromWireType:function(r){var t=Jt[r].value;return Kt(r),t},toWireType:function(r,t){return re(t)},argPackAdvance:8,readValueFromPointer:_r,destructorFunction:null})}function ee(r,t,e){switch(t){case 0:return function(r){var t=e?j:R;return this.fromWireType(t[r])};case 1:return function(r){var t=e?x:I;return this.fromWireType(t[r>>1])};case 2:return function(r){var t=e?D:U;return this.fromWireType(t[r>>2])};default:throw new TypeError("Unknown integer type: "+r)}}function ne(r,t,e,n){var o=Br(e);function i(){}t=qr(t),i.values={},Nr(r,{name:t,constructor:i,fromWireType:function(r){return this.constructor.values[r]},toWireType:function(r,t){return t.value},argPackAdvance:8,readValueFromPointer:ee(t,o,n),destructorFunction:null}),pt(t,i)}function oe(r,t){var e=Wr[r];return void 0===e&&zr(t+" has unknown type "+Bt(r)),e}function ie(r,t,e){var n=oe(r,"enum");t=qr(t);var o=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:e},constructor:{value:jr(n.name+"_"+t,(function(){}))}});o.values[e]=i,o[t]=i}function ae(r){if(null===r)return"null";var t=typeof r;return"object"===t||"array"===t||"function"===t?r.toString():""+r}function ue(r,t){switch(t){case 2:return function(r){return this.fromWireType(B[r>>2])};case 3:return function(r){return this.fromWireType(M[r>>3])};default:throw new TypeError("Unknown float type: "+r)}}function se(r,t,e){var n=Br(e);Nr(r,{name:t=qr(t),fromWireType:function(r){return r},toWireType:function(r,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+ae(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:ue(t,n),destructorFunction:null})}function ce(r,t,e,n,o,i){var a=qt(t,e);r=qr(r),o=Dt(n,o),pt(r,(function(){Mt("Cannot call "+r+" due to unbound types",a)}),t-1),Dr([],a,(function(e){var n=[e[0],null].concat(e.slice(1));return jt(r,Nt(r,n,null,o,i),t-1),[]}))}function fe(r,t,e){switch(t){case 0:return e?function(r){return j[r]}:function(r){return R[r]};case 1:return e?function(r){return x[r>>1]}:function(r){return I[r>>1]};case 2:return e?function(r){return D[r>>2]}:function(r){return U[r>>2]};default:throw new TypeError("Unknown integer type: "+r)}}function le(r,t,e,n,o){t=qr(t),-1===o&&(o=4294967295);var i=Br(e),a=function(r){return r};if(0===n){var u=32-8*e;a=function(r){return r<<u>>>u}}var s=-1!=t.indexOf("unsigned");Nr(r,{name:t,fromWireType:a,toWireType:function(r,e){if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+ae(e)+'" to '+this.name);if(e<n||e>o)throw new TypeError('Passing a number "'+ae(e)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!");return s?e>>>0:0|e},argPackAdvance:8,readValueFromPointer:fe(t,i,0!==n),destructorFunction:null})}function pe(r,t,e){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(r){var t=U,e=t[r>>=2],o=t[r+1];return new n(O,o,e)}Nr(r,{name:e=qr(e),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function de(r,t){var e="std::string"===(t=qr(t));Nr(r,{name:t,fromWireType:function(r){var t,n=U[r>>2];if(e)for(var o=r+4,i=0;i<=n;++i){var a=r+4+i;if(i==n||0==R[a]){var u=W(o,a-o);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),o=a+1}}else{var s=new Array(n);for(i=0;i<n;++i)s[i]=String.fromCharCode(R[r+4+i]);t=s.join("")}return Je(r),t},toWireType:function(r,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||zr("Cannot pass non-string to std::string");var o=(e&&n?function(){return k(t)}:function(){return t.length})(),i=Xe(4+o+1);if(U[i>>2]=o,e&&n)F(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var u=t.charCodeAt(a);u>255&&(Je(i),zr("String has UTF-16 code units that do not fit in 8 bits")),R[i+4+a]=u}else for(a=0;a<o;++a)R[i+4+a]=t[a];return null!==r&&r.push(Je,i),i},argPackAdvance:8,readValueFromPointer:_r,destructorFunction:function(r){Je(r)}})}function he(r,t,e){var n,o,i,a,u;e=qr(e),2===t?(n=q,o=H,a=z,i=function(){return I},u=1):4===t&&(n=N,o=G,a=L,i=function(){return U},u=2),Nr(r,{name:e,fromWireType:function(r){for(var e,o=U[r>>2],a=i(),s=r+4,c=0;c<=o;++c){var f=r+4+c*t;if(c==o||0==a[f>>u]){var l=n(s,f-s);void 0===e?e=l:(e+=String.fromCharCode(0),e+=l),s=f+t}}return Je(r),e},toWireType:function(r,n){"string"!=typeof n&&zr("Cannot pass non-string to C++ string type "+e);var i=a(n),s=Xe(4+i+t);return U[s>>2]=i>>u,o(n,s+4,i+t),null!==r&&r.push(Je,s),s},argPackAdvance:8,readValueFromPointer:_r,destructorFunction:function(r){Je(r)}})}function ve(r,t,e,n,o,i){Pr[r]={name:qr(t),rawConstructor:Dt(e,n),rawDestructor:Dt(o,i),fields:[]}}function ye(r,t,e,n,o,i,a,u,s,c){Pr[r].fields.push({fieldName:qr(t),getterReturnType:e,getter:Dt(n,o),getterContext:i,setterArgumentType:a,setter:Dt(u,s),setterContext:c})}function me(r,t){Nr(r,{isVoid:!0,name:t=qr(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(r,t){}})}function ge(r){return r||zr("Cannot use deleted val. handle = "+r),Jt[r].value}function we(r,t,e){r=ge(r),t=oe(t,"emval::as");var n=[],o=re(n);return D[e>>2]=o,t.toWireType(n,r)}var Te={};function be(r){var t=Te[r];return void 0===t?qr(r):t}var Ce=[];function $e(r,t,e,n){(r=Ce[r])(t=ge(t),e=be(e),null,n)}function Pe(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Ae(r){return 0===r?re(Pe()):(r=be(r),re(Pe()[r]))}function _e(r){var t=Ce.length;return Ce.push(r),t}function Se(r,t){for(var e=new Array(r),n=0;n<r;++n)e[n]=oe(D[(t>>2)+n],"parameter "+n);return e}function We(r,t){for(var e=Se(r,t),n=e[0],o=n.name+"_$"+e.slice(1).map((function(r){return r.name})).join("_")+"$",i=["retType"],a=[n],u="",s=0;s<r-1;++s)u+=(0!==s?", ":"")+"arg"+s,i.push("argType"+s),a.push(e[1+s]);var c="return function "+Or("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(s=0;s<r-1;++s)c+=" var arg"+s+" = argType"+s+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=e[s+1].argPackAdvance;c+=" var rv = handle[name]("+u+");\n";for(s=0;s<r-1;++s)e[s+1].deleteObject&&(c+=" argType"+s+".deleteObject(arg"+s+");\n");return n.isVoid||(c+=" return retType.toWireType(destructors, rv);\n"),c+="};\n",i.push(c),_e(zt(Function,i).apply(null,a))}function Ee(r){return r=be(r),re(o[r])}function Fe(r,t){return re((r=ge(r))[t=ge(t)])}function ke(r){r>4&&(Jt[r].refcount+=1)}function Oe(r){for(var t="",e=0;e<r;++e)t+=(0!==e?", ":"")+"arg"+e;var n="return function emval_allocator_"+r+"(constructor, argTypes, args) {\n";for(e=0;e<r;++e)n+="var argType"+e+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+e+'], "parameter '+e+'");\nvar arg'+e+" = argType"+e+".readValueFromPointer(args);\nargs += argType"+e+"['argPackAdvance'];\n";return n+="var obj = new constructor("+t+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",n)(oe,o,re)}var je={};function Re(r,t,e,n){r=ge(r);var o=je[t];return o||(o=Oe(t),je[t]=o),o(r,e,n)}function xe(r){return re(be(r))}function Ie(r){Ar(Jt[r].value),Kt(r)}function De(){dr()}function Ue(r,t,e){R.copyWithin(r,t,t+e)}function Be(r){try{return $.grow(r-O.byteLength+65535>>>16),J($.buffer),1}catch(r){}}function Me(r){var t=R.length,e=2147483648;if((r>>>=0)>e)return!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);if(o=Math.min(o,r+100663296),Be(Math.min(e,X(Math.max(r,o),65536))))return!0}return!1}var Ve={mappings:{},buffers:[null,[],[]],printChar:function(r,t){var e=Ve.buffers[r];0===t||10===t?((1===r?w:T)(S(e,0)),e.length=0):e.push(t)},varargs:void 0,get:function(){return Ve.varargs+=4,D[Ve.varargs-4>>2]},getStr:function(r){return W(r)},get64:function(r,t){return r}};function qe(r){return 0}function He(r,t,e,n,o){}function ze(r,t,e,n){for(var o=0,i=0;i<e;i++){for(var a=D[t+8*i>>2],u=D[t+(8*i+4)>>2],s=0;s<u;s++)Ve.printChar(r,R[a+s]);o+=u}return D[n>>2]=o,0}function Ne(r){C(0|r)}xr=o.InternalError=Rr(Error,"InternalError"),Mr(),Hr=o.BindingError=Rr(Error,"BindingError"),st(),kt(),At(),Ut=o.UnboundTypeError=Rr(Error,"UnboundTypeError"),Zt();var Ge,Le={t:Ur,I:Gr,x:Vt,w:Ht,d:Gt,k:Lt,H:te,n:ne,a:ie,A:se,i:ce,j:le,h:pe,B:de,v:he,u:ve,c:ye,J:me,m:we,s:$e,b:Kt,y:Ae,p:We,r:Ee,e:Fe,g:ke,q:Re,f:xe,l:Ie,o:De,E:Ue,F:Me,G:qe,C:He,z:ze,D:Ne},Xe=(Cr(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.L).apply(null,arguments)},o._malloc=function(){return(Xe=o._malloc=o.asm.M).apply(null,arguments)}),Je=o._free=function(){return(Je=o._free=o.asm.N).apply(null,arguments)},Ke=o.___getTypeName=function(){return(Ke=o.___getTypeName=o.asm.P).apply(null,arguments)};o.___embind_register_native_and_builtin_types=function(){return(o.___embind_register_native_and_builtin_types=o.asm.Q).apply(null,arguments)},o.dynCall_jiji=function(){return(o.dynCall_jiji=o.asm.R).apply(null,arguments)};function Qe(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function Ye(r){function t(){Ge||(Ge=!0,o.calledRun=!0,P||(er(),nr(),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),or()))}r=r||u,sr>0||(tr(),sr>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(fr=function r(){Ge||Ye(),Ge||(fr=r)},o.run=Ye,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return Ye(),t.ready}}();"object"==typeof exports&&"object"==typeof module?module.exports=BASIS:"function"==typeof define&&define.amd?define([],(function(){return BASIS})):"object"==typeof exports&&(exports.BASIS=BASIS); |
@@ -1,1 +0,1 @@ | ||
define(["exports"],function(e){"use strict";var r=Object.freeze({NONE:0,GEODESIC:1,RHUMB:2});e.ArcType=r}); | ||
define(["exports"],(function(e){"use strict";var r=Object.freeze({NONE:0,GEODESIC:1,RHUMB:2});e.ArcType=r})); |
@@ -1,1 +0,6 @@ | ||
function setTimeout(e){e()}var requirejs,require,define;"undefined"==typeof self&&(self={}),self.onmessage=function(e){var t=e.data;require(t.loaderConfig,[t.workerModule],function(e){self.onmessage=e,CESIUM_BASE_URL=t.loaderConfig.baseUrl})},function(global){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.20",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){if(e)for(var i=0;i<e.length&&(!e[i]||!t(e[i],i,e));i+=1);}function eachReverse(e,t){if(e)for(var i=e.length-1;-1<i&&(!e[i]||!t(e[i],i,e));--i);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){for(var i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(i,e,r,n){return e&&eachProp(e,function(e,t){!r&&hasProp(i,t)||(!n||"object"!=typeof e||!e||isArray(e)||isFunction(e)||e instanceof RegExp?i[t]=e:(i[t]||(i[t]={}),mixin(i[t],e,r,n)))}),i}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,i,r){t=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return t.requireType=e,t.requireModules=r,i&&(t.originalError=i),t}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,r){var n,o=defContextName;return isArray(e)||"string"==typeof e||(n=e,isArray(t)?(e=t,t=i,i=r):e=[]),n&&n.context&&(o=n.context),r=(r=getOwn(contexts,o))||(contexts[o]=req.s.newContext(o)),n&&r.configure(n),r.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require=require||req,req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(t){req[t]=function(){var e=contexts[defContextName];return e.require[t].apply(e,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var r=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return r.type=e.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r},req.load=function(t,i,r){var e,n=t&&t.config||{};if(isBrowser)return e=req.createNode(n,i,r),n.onNodeCreated&&n.onNodeCreated(e,n,i,r),e.setAttribute("data-requirecontext",t.contextName),e.setAttribute("data-requiremodule",i),!e.attachEvent||e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0||isOpera?(e.addEventListener("load",t.onScriptLoad,!1),e.addEventListener("error",t.onScriptError,!1)):(useInteractive=!0,e.attachEvent("onreadystatechange",t.onScriptLoad)),e.src=r,currentlyAddingScript=e,baseElement?head.insertBefore(e,baseElement):head.appendChild(e),currentlyAddingScript=null,e;if(isWebWorker)try{importScripts(r),t.completeLoad(i)}catch(e){t.onError(makeError("importscripts","importScripts failed for "+i+" at "+r,e,[i]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head=head||e.parentNode,dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||(mainScript=(src=mainScript.split("/")).pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,i,t){var r,n;"string"!=typeof e&&(t=i,i=e,e=null),isArray(i)||(t=i,i=null),!i&&isFunction(t)&&(i=[],t.length&&(t.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(e,t){i.push(t)}),i=(1===t.length?["require"]:["require","exports","module"]).concat(i))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript())&&(e=e||r.getAttribute("data-requiremodule"),n=contexts[r.getAttribute("data-requirecontext")]),n?(n.defQueue.push([e,i,t]),n.defQueueMap[e]=!0):globalDefQueue.push([e,i,t])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}function newContext(u){var t,e,f,c,i,m={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},d={},p={},r={},l=[],h={},n={},g={},x=1,v=1;function b(e,t,i){var r,n,o,a,s,u,c,d,p,f=t&&t.split("/"),l=m.map,h=l&&l["*"];if(e&&(t=(e=e.split("/")).length-1,m.nodeIdCompat&&jsSuffixRegExp.test(e[t])&&(e[t]=e[t].replace(jsSuffixRegExp,"")),function(e){for(var t,i=0;i<e.length;i++)"."===(t=e[i])?(e.splice(i,1),--i):".."===t&&(0===i||1===i&&".."===e[2]||".."===e[i-1]||0<i&&(e.splice(i-1,2),i-=2))}(e="."===e[0].charAt(0)&&f?f.slice(0,f.length-1).concat(e):e),e=e.join("/")),i&&l&&(f||h)){e:for(o=(n=e.split("/")).length;0<o;--o){if(s=n.slice(0,o).join("/"),f)for(a=f.length;0<a;--a)if(r=(r=getOwn(l,f.slice(0,a).join("/")))&&getOwn(r,s)){u=r,c=o;break e}!d&&h&&getOwn(h,s)&&(d=getOwn(h,s),p=o)}!u&&d&&(u=d,c=p),u&&(n.splice(0,c,u),e=n.join("/"))}return getOwn(m.pkgs,e)||e}function q(t){isBrowser&&each(scripts(),function(e){if(e.getAttribute("data-requiremodule")===t&&e.getAttribute("data-requirecontext")===f.contextName)return e.parentNode.removeChild(e),!0})}function E(e){var t=getOwn(m.paths,e);return t&&isArray(t)&&1<t.length&&(t.shift(),f.require.undef(e),f.makeRequire(null,{skipMap:!0})([e]),1)}function w(e){var t,i=e?e.indexOf("!"):-1;return-1<i&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function y(e,t,i,r){var n,o,a,s=null,u=t?t.name:null,c=e,d=!0,p="";return e||(d=!1,e="_@r"+(x+=1)),s=(a=w(e))[0],e=a[1],s&&(s=b(s,u,r),o=getOwn(h,s)),e&&(s?p=o&&o.normalize?o.normalize(e,function(e){return b(e,u,r)}):-1===e.indexOf("!")?b(e,u,r):e:(s=(a=w(p=b(e,u,r)))[0],p=a[1],i=!0,n=f.nameToUrl(p))),{prefix:s,name:p,parentMap:t,unnormalized:!!(i=!s||o||i?"":"_unnormalized"+(v+=1)),url:n,originalName:c,isDefine:d,id:(s?s+"!"+p:p)+i}}function S(e){var t=e.id;return getOwn(d,t)||(d[t]=new f.Module(e))}function k(e,t,i){var r=e.id,n=getOwn(d,r);!hasProp(h,r)||n&&!n.defineEmitComplete?(n=S(e)).error&&"error"===t?i(n.error):n.on(t,i):"defined"===t&&i(h[r])}function M(t,e){var i=t.requireModules,r=!1;e?e(t):(each(i,function(e){e=getOwn(d,e);e&&(e.error=t,e.events.error&&(r=!0,e.emit("error",t)))}),r||req.onError(t))}function O(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(f.defQueueMap[t]=!0),l.push(e)}),globalDefQueue=[])}function j(e){delete d[e],delete p[e]}function P(){var r,e=1e3*m.waitSeconds,n=e&&f.startTime+e<(new Date).getTime(),o=[],a=[],s=!1,u=!0;if(!t){if(t=!0,eachProp(p,function(e){var t=e.map,i=t.id;if(e.enabled&&(t.isDefine||a.push(e),!e.error))if(!e.inited&&n)E(i)?s=r=!0:(o.push(i),q(i));else if(!e.inited&&e.fetched&&t.isDefine&&(s=!0,!t.prefix))return u=!1}),n&&o.length)return(e=makeError("timeout","Load timeout for modules: "+o,null,o)).contextName=f.contextName,M(e),0;u&&each(a,function(e){!function r(n,o,a){var e=n.map.id;n.error?n.emit("error",n.error):(o[e]=!0,each(n.depMaps,function(e,t){var i=e.id;!(e=getOwn(d,i))||n.depMatched[t]||a[i]||(getOwn(o,i)?(n.defineDep(t,h[i]),n.check()):r(e,o,a))}),a[e]=!0)}(e,{},{})}),n&&!r||!s||!isBrowser&&!isWebWorker||i||(i=setTimeout(function(){i=0,P()},50)),t=!1}}function a(e){hasProp(h,e[0])||S(y(e[0],null,!0)).init(e[1],e[2])}function o(e,t,i,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(i,t,!1)}function s(e){e=e.currentTarget||e.srcElement;return o(e,f.onScriptLoad,"load","onreadystatechange"),o(e,f.onScriptError,"error"),{node:e,id:e&&e.getAttribute("data-requiremodule")}}function R(){var e;for(O();l.length;){if(null===(e=l.shift())[0])return M(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1])),0;a(e)}f.defQueueMap={}}return c={require:function(e){return e.require||(e.require=f.makeRequire(e.map))},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?h[e.map.id]=e.exports:e.exports=h[e.map.id]={}},module:function(e){return e.module||(e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(m.config,e.map.id)||{}},exports:e.exports||(e.exports={})})}},(e=function(e){this.events=getOwn(r,e.id)||{},this.map=e,this.shim=getOwn(m.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,i,r){r=r||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,--this.depCount,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,f.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();f.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;n[e]||(n[e]=!0,f.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var t,e=this.map.id,i=this.depExports,r=this.exports,n=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(n)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{r=f.execCb(e,n,i,r)}catch(e){t=e}else r=f.execCb(e,n,i,r);if(this.map.isDefine&&void 0===r&&((i=this.module)?r=i.exports:this.usingExports&&(r=this.exports)),t)return t.requireMap=this.map,t.requireModules=this.map.isDefine?[this.map.id]:null,t.requireType=this.map.isDefine?"define":"require",M(this.error=t)}else r=n;this.exports=r,this.map.isDefine&&!this.ignore&&(h[e]=r,req.onResourceLoad&&req.onResourceLoad(f,this.map,this.depMaps)),j(e),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(f.defQueueMap,e)||this.fetch()}},callPlugin:function(){var s=this.map,u=s.id,e=y(s.prefix);this.depMaps.push(e),k(e,"defined",bind(this,function(e){var o,t,i=getOwn(g,this.map.id),r=this.map.name,n=this.map.parentMap?this.map.parentMap.name:null,a=f.makeRequire(s.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(e.normalize&&(r=e.normalize(r,function(e){return b(e,n,!0)})||""),k(t=y(s.prefix+"!"+r,this.map.parentMap),"defined",bind(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),void((r=getOwn(d,t.id))&&(this.depMaps.push(t),this.events.error&&r.on("error",bind(this,function(e){this.emit("error",e)})),r.enable()))):i?(this.map.url=f.nameToUrl(i),void this.load()):((o=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})})).error=bind(this,function(e){this.inited=!0,(this.error=e).requireModules=[u],eachProp(d,function(e){0===e.map.id.indexOf(u+"_unnormalized")&&j(e.map.id)}),M(e)}),o.fromText=bind(this,function(e,t){var i=s.name,r=y(i),n=useInteractive;t&&(e=t),n&&(useInteractive=!1),S(r),hasProp(m.config,u)&&(m.config[i]=m.config[u]);try{req.exec(e)}catch(e){return M(makeError("fromtexteval","fromText eval for "+u+" failed: "+e,e,[u]))}n&&(useInteractive=!0),this.depMaps.push(r),f.completeLoad(i),a([i],o)}),void e.load(s.name,a,o,m))})),f.enable(e,this),this.pluginMaps[e.id]=e},enable:function(){(p[this.map.id]=this).enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var i,r;if("string"==typeof e){if(e=y(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,r=getOwn(c,e.id))return void(this.depExports[t]=r(this));this.depCount+=1,k(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?k(e,"error",bind(this,this.errback)):this.events.error&&k(e,"error",bind(this,function(e){this.emit("error",e)}))}i=e.id,r=d[i],hasProp(c,i)||!r||r.enabled||f.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(d,e.id);t&&!t.enabled&&f.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){(this.events[e]||(this.events[e]=[])).push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},(f={config:m,contextName:u,registry:d,defined:h,urlFetched:n,defQueue:l,defQueueMap:{},Module:e,makeModuleMap:y,nextTick:req.nextTick,onError:M,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");var i=m.shim,r={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){r[t]?(m[t]||(m[t]={}),mixin(m[t],e,!0,!0)):m[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(g[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){!(e=isArray(e)?{deps:e}:e).exports&&!e.init||e.exportsFn||(e.exportsFn=f.makeShimExports(e)),i[t]=e}),m.shim=i),e.packages&&each(e.packages,function(e){var t=(e="string"==typeof e?{name:e}:e).name;e.location&&(m.paths[t]=e.location),m.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(d,function(e,t){e.inited||e.map.unnormalized||(e.map=y(t,null,!0))}),(e.deps||e.callback)&&f.require(e.deps||[],e.callback)},makeShimExports:function(t){return function(){var e;return(e=t.init?t.init.apply(global,arguments):e)||t.exports&&getGlobal(t.exports)}},makeRequire:function(o,a){function s(e,t,i){var r,n;return a.enableBuildCallback&&t&&isFunction(t)&&(t.__requireJsBuild=!0),"string"==typeof e?isFunction(t)?M(makeError("requireargs","Invalid require call"),i):o&&hasProp(c,e)?c[e](d[o.id]):req.get?req.get(f,e,o,s):(r=y(e,o,!1,!0).id,hasProp(h,r)?h[r]:M(makeError("notloaded",'Module name "'+r+'" has not been loaded yet for context: '+u+(o?"":". Use require([])")))):(R(),f.nextTick(function(){R(),(n=S(y(null,o))).skipMap=a.skipMap,n.init(e,t,i,{enabled:!0}),P()}),s)}return a=a||{},mixin(s,{isBrowser:isBrowser,toUrl:function(e){var t,i=e.lastIndexOf("."),r=e.split("/")[0];return-1!==i&&(!("."===r||".."===r)||1<i)&&(t=e.substring(i,e.length),e=e.substring(0,i)),f.nameToUrl(b(e,o&&o.id,!0),t,!0)},defined:function(e){return hasProp(h,y(e,o,!1,!0).id)},specified:function(e){return e=y(e,o,!1,!0).id,hasProp(h,e)||hasProp(d,e)}}),o||(s.undef=function(i){O();var e=y(i,o,!0),t=getOwn(d,i);t.undefed=!0,q(i),delete h[i],delete n[e.url],delete r[i],eachReverse(l,function(e,t){e[0]===i&&l.splice(t,1)}),delete f.defQueueMap[i],t&&(t.events.defined&&(r[i]=t.events),j(i))}),s},enable:function(e){getOwn(d,e.id)&&S(e).enable()},completeLoad:function(e){var t,i,r,n=getOwn(m.shim,e)||{},o=n.exports;for(O();l.length;){if(null===(i=l.shift())[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);a(i)}if(f.defQueueMap={},r=getOwn(d,e),!t&&!hasProp(h,e)&&r&&!r.inited){if(!(!m.enforceDefine||o&&getGlobal(o)))return E(e)?void 0:M(makeError("nodefine","No define call for "+e,null,[e]));a([e,n.deps||[],n.exportsFn])}P()},nameToUrl:function(e,t,i){var r,n,o,a,s,u=getOwn(m.pkgs,e);if(u=getOwn(g,e=u?u:e))return f.nameToUrl(u,t,i);if(req.jsExtRegExp.test(e))a=e+(t||"");else{for(r=m.paths,o=(n=e.split("/")).length;0<o;--o)if(s=getOwn(r,n.slice(0,o).join("/"))){isArray(s)&&(s=s[0]),n.splice(0,o,s);break}a=n.join("/"),a=("/"===(a+=t||(/^data\:|\?/.test(a)||i?"":".js")).charAt(0)||a.match(/^[\w\+\.\-]+:/)?"":m.baseUrl)+a}return m.urlArgs?a+((-1===a.indexOf("?")?"?":"&")+m.urlArgs):a},load:function(e,t){req.load(f,e,t)},execCb:function(e,t,i,r){return t.apply(r,i)},onScriptLoad:function(e){"load"!==e.type&&!readyRegExp.test((e.currentTarget||e.srcElement).readyState)||(interactiveScript=null,e=s(e),f.completeLoad(e.id))},onScriptError:function(e){var t=s(e);if(!E(t.id))return M(makeError("scripterror","Script error for: "+t.id,e,[t.id]))}}).require=f.makeRequire(),f}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState||eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript}}(this); | ||
function setTimeout(e){e()} | ||
/** vim: et:ts=4:sw=4:sts=4 | ||
* @license RequireJS 2.1.20 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. | ||
* Available via the MIT or new BSD license. | ||
* see: http://github.com/jrburke/requirejs for details | ||
*/var requirejs,require,define;"undefined"==typeof self&&(self={}),self.onmessage=function(e){var t=e.data;require(t.loaderConfig,[t.workerModule],(function(e){self.onmessage=e,CESIUM_BASE_URL=t.loaderConfig.baseUrl}))},function(global){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.20",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var i;if(e)for(i=0;i<e.length&&(!e[i]||!t(e[i],i,e));i+=1);}function eachReverse(e,t){var i;if(e)for(i=e.length-1;i>-1&&(!e[i]||!t(e[i],i,e));i-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,r){return t&&eachProp(t,(function(t,n){!i&&hasProp(e,n)||(!r||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[n]=t:(e[n]||(e[n]={}),mixin(e[n],t,i,r)))})),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),(function(e){t=t[e]})),t}function makeError(e,t,i,r){var n=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return n.requireType=e,n.requireModules=r,i&&(n.originalError=i),n}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,r){var n,o,a=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=i,i=r):e=[]),o&&o.context&&(a=o.context),(n=getOwn(contexts,a))||(n=contexts[a]=req.s.newContext(a)),o&&n.configure(o),n.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],(function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}})),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var r=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return r.type=e.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r},req.load=function(e,t,i){var r,n=e&&e.config||{};if(isBrowser)return r=req.createNode(n,t,i),n.onNodeCreated&&n.onNodeCreated(r,n,t,i),r.setAttribute("data-requirecontext",e.contextName),r.setAttribute("data-requiremodule",t),!r.attachEvent||r.attachEvent.toString&&r.attachEvent.toString().indexOf("[native code")<0||isOpera?(r.addEventListener("load",e.onScriptLoad,!1),r.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,r.attachEvent("onreadystatechange",e.onScriptLoad)),r.src=i,currentlyAddingScript=r,baseElement?head.insertBefore(r,baseElement):head.appendChild(r),currentlyAddingScript=null,r;if(isWebWorker)try{importScripts(i),e.completeLoad(t)}catch(r){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+i,r,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),(function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0})),define=function(e,t,i){var r,n;"string"!=typeof e&&(i=t,t=e,e=null),isArray(t)||(i=t,t=null),!t&&isFunction(i)&&(t=[],i.length&&(i.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,(function(e,i){t.push(i)})),t=(1===i.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript())&&(e||(e=r.getAttribute("data-requiremodule")),n=contexts[r.getAttribute("data-requirecontext")]),n?(n.defQueue.push([e,t,i]),n.defQueueMap[e]=!0):globalDefQueue.push([e,t,i])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}function newContext(e){var t,i,r,n,o,a={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},s={},u={},c={},d=[],p={},f={},l={},h=1,m=1;function g(e,t,i){var r,n,o,s,u,c,d,p,f,l,h=t&&t.split("/"),m=a.map,g=m&&m["*"];if(e&&(c=(e=e.split("/")).length-1,a.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),function(e){var t,i;for(t=0;t<e.length;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),i&&m&&(h||g)){e:for(o=(n=e.split("/")).length;o>0;o-=1){if(u=n.slice(0,o).join("/"),h)for(s=h.length;s>0;s-=1)if((r=getOwn(m,h.slice(0,s).join("/")))&&(r=getOwn(r,u))){d=r,p=o;break e}!f&&g&&getOwn(g,u)&&(f=getOwn(g,u),l=o)}!d&&f&&(d=f,p=l),d&&(n.splice(0,p,d),e=n.join("/"))}return getOwn(a.pkgs,e)||e}function v(e){isBrowser&&each(scripts(),(function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===r.contextName)return t.parentNode.removeChild(t),!0}))}function x(e){var t=getOwn(a.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),r.require.undef(e),r.makeRequire(null,{skipMap:!0})([e]),!0}function b(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function q(e,t,i,n){var o,a,s,u,c=null,d=t?t.name:null,f=e,l=!0,v="";return e||(l=!1,e="_@r"+(h+=1)),c=(u=b(e))[0],e=u[1],c&&(c=g(c,d,n),a=getOwn(p,c)),e&&(c?v=a&&a.normalize?a.normalize(e,(function(e){return g(e,d,n)})):-1===e.indexOf("!")?g(e,d,n):e:(c=(u=b(v=g(e,d,n)))[0],v=u[1],i=!0,o=r.nameToUrl(v))),{prefix:c,name:v,parentMap:t,unnormalized:!!(s=!c||a||i?"":"_unnormalized"+(m+=1)),url:o,originalName:f,isDefine:l,id:(c?c+"!"+v:v)+s}}function E(e){var t=e.id,i=getOwn(s,t);return i||(i=s[t]=new r.Module(e)),i}function w(e,t,i){var r=e.id,n=getOwn(s,r);!hasProp(p,r)||n&&!n.defineEmitComplete?(n=E(e)).error&&"error"===t?i(n.error):n.on(t,i):"defined"===t&&i(p[r])}function y(e,t){var i=e.requireModules,r=!1;t?t(e):(each(i,(function(t){var i=getOwn(s,t);i&&(i.error=e,i.events.error&&(r=!0,i.emit("error",e)))})),r||req.onError(e))}function S(){globalDefQueue.length&&(each(globalDefQueue,(function(e){var t=e[0];"string"==typeof t&&(r.defQueueMap[t]=!0),d.push(e)})),globalDefQueue=[])}function k(e){delete s[e],delete u[e]}function M(e,t,i){var r=e.map.id;e.error?e.emit("error",e.error):(t[r]=!0,each(e.depMaps,(function(r,n){var o=r.id,a=getOwn(s,o);!a||e.depMatched[n]||i[o]||(getOwn(t,o)?(e.defineDep(n,p[o]),e.check()):M(a,t,i))})),i[r]=!0)}function O(){var e,i,n=1e3*a.waitSeconds,s=n&&r.startTime+n<(new Date).getTime(),c=[],d=[],p=!1,f=!0;if(!t){if(t=!0,eachProp(u,(function(e){var t=e.map,r=t.id;if(e.enabled&&(t.isDefine||d.push(e),!e.error))if(!e.inited&&s)x(r)?(i=!0,p=!0):(c.push(r),v(r));else if(!e.inited&&e.fetched&&t.isDefine&&(p=!0,!t.prefix))return f=!1})),s&&c.length)return(e=makeError("timeout","Load timeout for modules: "+c,null,c)).contextName=r.contextName,y(e);f&&each(d,(function(e){M(e,{},{})})),s&&!i||!p||!isBrowser&&!isWebWorker||o||(o=setTimeout((function(){o=0,O()}),50)),t=!1}}function j(e){hasProp(p,e[0])||E(q(e[0],null,!0)).init(e[1],e[2])}function P(e,t,i,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(i,t,!1)}function R(e){var t=e.currentTarget||e.srcElement;return P(t,r.onScriptLoad,"load","onreadystatechange"),P(t,r.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function A(){var e;for(S();d.length;){if(null===(e=d.shift())[0])return y(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));j(e)}r.defQueueMap={}}return n={require:function(e){return e.require?e.require:e.require=r.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?p[e.map.id]=e.exports:e.exports=p[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(a.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(i=function(e){this.events=getOwn(c,e.id)||{},this.map=e,this.shim=getOwn(a.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,i,r){r=r||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,(function(e){this.emit("error",e)}))),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,r.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();r.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,(function(){return e.prefix?this.callPlugin():this.load()})))}},load:function(){var e=this.map.url;f[e]||(f[e]=!0,r.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,i=this.map.id,n=this.depExports,o=this.exports,a=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(a)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{o=r.execCb(i,a,n,o)}catch(t){e=t}else o=r.execCb(i,a,n,o);if(this.map.isDefine&&void 0===o&&((t=this.module)?o=t.exports:this.usingExports&&(o=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",y(this.error=e)}else o=a;this.exports=o,this.map.isDefine&&!this.ignore&&(p[i]=o,req.onResourceLoad&&req.onResourceLoad(r,this.map,this.depMaps)),k(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(r.defQueueMap,i)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,i=q(e.prefix);this.depMaps.push(i),w(i,"defined",bind(this,(function(i){var n,o,u,c=getOwn(l,this.map.id),d=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,f=r.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(i.normalize&&(d=i.normalize(d,(function(e){return g(e,p,!0)}))||""),w(o=q(e.prefix+"!"+d,this.map.parentMap),"defined",bind(this,(function(e){this.init([],(function(){return e}),null,{enabled:!0,ignore:!0})}))),void((u=getOwn(s,o.id))&&(this.depMaps.push(o),this.events.error&&u.on("error",bind(this,(function(e){this.emit("error",e)}))),u.enable()))):c?(this.map.url=r.nameToUrl(c),void this.load()):((n=bind(this,(function(e){this.init([],(function(){return e}),null,{enabled:!0})}))).error=bind(this,(function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(s,(function(e){0===e.map.id.indexOf(t+"_unnormalized")&&k(e.map.id)})),y(e)})),n.fromText=bind(this,(function(i,o){var s=e.name,u=q(s),c=useInteractive;o&&(i=o),c&&(useInteractive=!1),E(u),hasProp(a.config,t)&&(a.config[s]=a.config[t]);try{req.exec(i)}catch(e){return y(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}c&&(useInteractive=!0),this.depMaps.push(u),r.completeLoad(s),f([s],n)})),void i.load(e.name,f,n,a))}))),r.enable(i,this),this.pluginMaps[i.id]=i},enable:function(){u[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,(function(e,t){var i,o,a;if("string"==typeof e){if(e=q(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,a=getOwn(n,e.id))return void(this.depExports[t]=a(this));this.depCount+=1,w(e,"defined",bind(this,(function(e){this.undefed||(this.defineDep(t,e),this.check())}))),this.errback?w(e,"error",bind(this,this.errback)):this.events.error&&w(e,"error",bind(this,(function(e){this.emit("error",e)})))}i=e.id,o=s[i],hasProp(n,i)||!o||o.enabled||r.enable(e,this)}))),eachProp(this.pluginMaps,bind(this,(function(e){var t=getOwn(s,e.id);t&&!t.enabled&&r.enable(e,this)}))),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],(function(e){e(t)})),"error"===e&&delete this.events[e]}},r={config:a,contextName:e,registry:s,defined:p,urlFetched:f,defQueue:d,defQueueMap:{},Module:i,makeModuleMap:q,nextTick:req.nextTick,onError:y,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");var t=a.shim,i={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,(function(e,t){i[t]?(a[t]||(a[t]={}),mixin(a[t],e,!0,!0)):a[t]=e})),e.bundles&&eachProp(e.bundles,(function(e,t){each(e,(function(e){e!==t&&(l[e]=t)}))})),e.shim&&(eachProp(e.shim,(function(e,i){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=r.makeShimExports(e)),t[i]=e})),a.shim=t),e.packages&&each(e.packages,(function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(a.paths[t]=e.location),a.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")})),eachProp(s,(function(e,t){e.inited||e.map.unnormalized||(e.map=q(t,null,!0))})),(e.deps||e.callback)&&r.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}},makeRequire:function(t,i){function o(a,u,c){var d,f;return i.enableBuildCallback&&u&&isFunction(u)&&(u.__requireJsBuild=!0),"string"==typeof a?isFunction(u)?y(makeError("requireargs","Invalid require call"),c):t&&hasProp(n,a)?n[a](s[t.id]):req.get?req.get(r,a,t,o):(d=q(a,t,!1,!0).id,hasProp(p,d)?p[d]:y(makeError("notloaded",'Module name "'+d+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(A(),r.nextTick((function(){A(),(f=E(q(null,t))).skipMap=i.skipMap,f.init(a,u,c,{enabled:!0}),O()})),o)}return i=i||{},mixin(o,{isBrowser:isBrowser,toUrl:function(e){var i,n=e.lastIndexOf("."),o=e.split("/")[0];return-1!==n&&(!("."===o||".."===o)||n>1)&&(i=e.substring(n,e.length),e=e.substring(0,n)),r.nameToUrl(g(e,t&&t.id,!0),i,!0)},defined:function(e){return hasProp(p,q(e,t,!1,!0).id)},specified:function(e){return e=q(e,t,!1,!0).id,hasProp(p,e)||hasProp(s,e)}}),t||(o.undef=function(e){S();var i=q(e,t,!0),n=getOwn(s,e);n.undefed=!0,v(e),delete p[e],delete f[i.url],delete c[e],eachReverse(d,(function(t,i){t[0]===e&&d.splice(i,1)})),delete r.defQueueMap[e],n&&(n.events.defined&&(c[e]=n.events),k(e))}),o},enable:function(e){getOwn(s,e.id)&&E(e).enable()},completeLoad:function(e){var t,i,n,o=getOwn(a.shim,e)||{},u=o.exports;for(S();d.length;){if(null===(i=d.shift())[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);j(i)}if(r.defQueueMap={},n=getOwn(s,e),!t&&!hasProp(p,e)&&n&&!n.inited){if(!(!a.enforceDefine||u&&getGlobal(u)))return x(e)?void 0:y(makeError("nodefine","No define call for "+e,null,[e]));j([e,o.deps||[],o.exportsFn])}O()},nameToUrl:function(e,t,i){var n,o,s,u,c,d,p=getOwn(a.pkgs,e);if(p&&(e=p),d=getOwn(l,e))return r.nameToUrl(d,t,i);if(req.jsExtRegExp.test(e))u=e+(t||"");else{for(n=a.paths,s=(o=e.split("/")).length;s>0;s-=1)if(c=getOwn(n,o.slice(0,s).join("/"))){isArray(c)&&(c=c[0]),o.splice(0,s,c);break}u=o.join("/"),u=("/"===(u+=t||(/^data\:|\?/.test(u)||i?"":".js")).charAt(0)||u.match(/^[\w\+\.\-]+:/)?"":a.baseUrl)+u}return a.urlArgs?u+(-1===u.indexOf("?")?"?":"&")+a.urlArgs:u},load:function(e,t){req.load(r,e,t)},execCb:function(e,t,i,r){return t.apply(r,i)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=R(e);r.completeLoad(t.id)}},onScriptError:function(e){var t=R(e);if(!x(t.id))return y(makeError("scripterror","Script error for: "+t.id,e,[t.id]))}},r.require=r.makeRequire(),r}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState||eachReverse(scripts(),(function(e){if("interactive"===e.readyState)return interactiveScript=e})),interactiveScript}}(this); |
@@ -1,1 +0,1 @@ | ||
define(["./PrimitivePipeline-a6e712f7","./createTaskProcessorWorker","./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./when-7b580518","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./GeometryPipeline-d4d3acd7","./AttributeCompression-56959beb","./EncodedCartesian3-942c4568","./IndexDatatype-b42089ce","./IntersectionTests-587a744a","./Plane-9d4e3328","./WebMercatorProjection-bdaffcea"],function(i,e,t,r,n,a,o,c,s,m,b,d,P,f,p,u,y,C,l,G){"use strict";return e(function(e,t){return e=i.PrimitivePipeline.unpackCombineGeometryParameters(e),e=i.PrimitivePipeline.combineGeometry(e),i.PrimitivePipeline.packCombineGeometryResults(e,t)})}); | ||
define(["./PrimitivePipeline-82a942e9","./createTaskProcessorWorker","./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./when-229515d6","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./combine-8ce3f24b","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./GeometryPipeline-5b3fba53","./AttributeCompression-0af3c035","./EncodedCartesian3-d4f305ce","./IndexDatatype-b10faa0b","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./WebMercatorProjection-d69cec15"],(function(e,t,i,r,n,a,o,b,c,m,s,P,f,p,u,d,y,l){"use strict";return t((function(t,i){var r=e.PrimitivePipeline.unpackCombineGeometryParameters(t),n=e.PrimitivePipeline.combineGeometry(r);return e.PrimitivePipeline.packCombineGeometryResults(n,i)}))})); |
@@ -1,1 +0,1 @@ | ||
define(["./BoxGeometry-16d67add","./when-7b580518","./GeometryOffsetAttribute-964ec9ef","./Check-3917d765","./Transforms-70f396e0","./Cartesian2-40b13f31","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./VertexFormat-8d463a4f"],function(r,o,e,t,n,a,f,c,m,d,i,b,u,s){"use strict";return function(e,t){return o.defined(t)&&(e=r.BoxGeometry.unpack(e,t)),r.BoxGeometry.createGeometry(e)}}); | ||
define(["./BoxGeometry-a530ddad","./when-229515d6","./GeometryOffsetAttribute-ff1e192c","./RuntimeError-ffe03243","./Transforms-7cd3197b","./Matrix2-f2da41d4","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./combine-8ce3f24b","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./VertexFormat-565d6a6c"],(function(e,t,r,o,n,a,f,m,d,i,b,c){"use strict";return function(r,o){return t.defined(o)&&(r=e.BoxGeometry.unpack(r,o)),e.BoxGeometry.createGeometry(r)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./GeometryOffsetAttribute-964ec9ef","./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./ComponentDatatype-6c2e43c1","./when-7b580518","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a"],function(u,m,o,e,s,f,c,d,t,a,n,i){"use strict";var p=new o.Cartesian3;function r(e){var t=(e=f.defaultValue(e,f.defaultValue.EMPTY_OBJECT)).minimum,a=e.maximum;this._min=o.Cartesian3.clone(t),this._max=o.Cartesian3.clone(a),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}r.fromDimensions=function(e){var t=(e=f.defaultValue(e,f.defaultValue.EMPTY_OBJECT)).dimensions,t=o.Cartesian3.multiplyByScalar(t,.5,new o.Cartesian3);return new r({minimum:o.Cartesian3.negate(t,new o.Cartesian3),maximum:t,offsetAttribute:e.offsetAttribute})},r.fromAxisAlignedBoundingBox=function(e){return new r({minimum:e.minimum,maximum:e.maximum})},r.packedLength=2*o.Cartesian3.packedLength+1,r.pack=function(e,t,a){return a=f.defaultValue(a,0),o.Cartesian3.pack(e._min,t,a),o.Cartesian3.pack(e._max,t,a+o.Cartesian3.packedLength),t[a+2*o.Cartesian3.packedLength]=f.defaultValue(e._offsetAttribute,-1),t};var y=new o.Cartesian3,C=new o.Cartesian3,b={minimum:y,maximum:C,offsetAttribute:void 0};return r.unpack=function(e,t,a){t=f.defaultValue(t,0);var n=o.Cartesian3.unpack(e,t,y),i=o.Cartesian3.unpack(e,t+o.Cartesian3.packedLength,C),t=e[t+2*o.Cartesian3.packedLength];return f.defined(a)?(a._min=o.Cartesian3.clone(n,a._min),a._max=o.Cartesian3.clone(i,a._max),a._offsetAttribute=-1===t?void 0:t,a):(b.offsetAttribute=-1===t?void 0:t,new r(b))},r.createGeometry=function(e){var t=e._min,a=e._max;if(!o.Cartesian3.equals(t,a)){var n=new d.GeometryAttributes,i=new Uint16Array(24),r=new Float64Array(24);r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=a.x,r[4]=t.y,r[5]=t.z,r[6]=a.x,r[7]=a.y,r[8]=t.z,r[9]=t.x,r[10]=a.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=a.z,r[15]=a.x,r[16]=t.y,r[17]=a.z,r[18]=a.x,r[19]=a.y,r[20]=a.z,r[21]=t.x,r[22]=a.y,r[23]=a.z,n.position=new c.GeometryAttribute({componentDatatype:s.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:r}),i[0]=4,i[1]=5,i[2]=5,i[3]=6,i[4]=6,i[5]=7,i[6]=7,i[7]=4,i[8]=0,i[9]=1,i[10]=1,i[11]=2,i[12]=2,i[13]=3,i[14]=3,i[15]=0,i[16]=0,i[17]=4,i[18]=1,i[19]=5,i[20]=2,i[21]=6,i[22]=3,i[23]=7;a=o.Cartesian3.subtract(a,t,p),t=.5*o.Cartesian3.magnitude(a);return f.defined(e._offsetAttribute)&&(a=r.length,r=new Uint8Array(a/3),a=e._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,u.arrayFill(r,a),n.applyOffset=new c.GeometryAttribute({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})),new c.Geometry({attributes:n,indices:i,primitiveType:c.PrimitiveType.LINES,boundingSphere:new m.BoundingSphere(o.Cartesian3.ZERO,t),offsetAttribute:e._offsetAttribute})}},function(e,t){return f.defined(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}}); | ||
define(["./GeometryOffsetAttribute-ff1e192c","./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./when-229515d6","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./combine-8ce3f24b","./WebGLConstants-4e26b85a"],(function(e,t,a,n,i,r,u,m,o,s){"use strict";var f=new a.Cartesian3;function c(e){var t=(e=r.defaultValue(e,r.defaultValue.EMPTY_OBJECT)).minimum,n=e.maximum;this._min=a.Cartesian3.clone(t),this._max=a.Cartesian3.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}c.fromDimensions=function(e){var t=(e=r.defaultValue(e,r.defaultValue.EMPTY_OBJECT)).dimensions,n=a.Cartesian3.multiplyByScalar(t,.5,new a.Cartesian3);return new c({minimum:a.Cartesian3.negate(n,new a.Cartesian3),maximum:n,offsetAttribute:e.offsetAttribute})},c.fromAxisAlignedBoundingBox=function(e){return new c({minimum:e.minimum,maximum:e.maximum})},c.packedLength=2*a.Cartesian3.packedLength+1,c.pack=function(e,t,n){return n=r.defaultValue(n,0),a.Cartesian3.pack(e._min,t,n),a.Cartesian3.pack(e._max,t,n+a.Cartesian3.packedLength),t[n+2*a.Cartesian3.packedLength]=r.defaultValue(e._offsetAttribute,-1),t};var d=new a.Cartesian3,p=new a.Cartesian3,y={minimum:d,maximum:p,offsetAttribute:void 0};return c.unpack=function(e,t,n){t=r.defaultValue(t,0);var i=a.Cartesian3.unpack(e,t,d),u=a.Cartesian3.unpack(e,t+a.Cartesian3.packedLength,p),m=e[t+2*a.Cartesian3.packedLength];return r.defined(n)?(n._min=a.Cartesian3.clone(i,n._min),n._max=a.Cartesian3.clone(u,n._max),n._offsetAttribute=-1===m?void 0:m,n):(y.offsetAttribute=-1===m?void 0:m,new c(y))},c.createGeometry=function(n){var o=n._min,s=n._max;if(!a.Cartesian3.equals(o,s)){var c=new m.GeometryAttributes,d=new Uint16Array(24),p=new Float64Array(24);p[0]=o.x,p[1]=o.y,p[2]=o.z,p[3]=s.x,p[4]=o.y,p[5]=o.z,p[6]=s.x,p[7]=s.y,p[8]=o.z,p[9]=o.x,p[10]=s.y,p[11]=o.z,p[12]=o.x,p[13]=o.y,p[14]=s.z,p[15]=s.x,p[16]=o.y,p[17]=s.z,p[18]=s.x,p[19]=s.y,p[20]=s.z,p[21]=o.x,p[22]=s.y,p[23]=s.z,c.position=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p}),d[0]=4,d[1]=5,d[2]=5,d[3]=6,d[4]=6,d[5]=7,d[6]=7,d[7]=4,d[8]=0,d[9]=1,d[10]=1,d[11]=2,d[12]=2,d[13]=3,d[14]=3,d[15]=0,d[16]=0,d[17]=4,d[18]=1,d[19]=5,d[20]=2,d[21]=6,d[22]=3,d[23]=7;var y=a.Cartesian3.subtract(s,o,f),b=.5*a.Cartesian3.magnitude(y);if(r.defined(n._offsetAttribute)){var l=p.length,C=new Uint8Array(l/3),A=n._offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;e.arrayFill(C,A),c.applyOffset=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}return new u.Geometry({attributes:c,indices:d,primitiveType:u.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(a.Cartesian3.ZERO,b),offsetAttribute:n._offsetAttribute})}},function(e,t){return r.defined(t)&&(e=c.unpack(e,t)),c.createGeometry(e)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./Cartesian2-40b13f31","./Check-3917d765","./when-7b580518","./EllipseGeometry-953964d7","./VertexFormat-8d463a4f","./Math-87254c13","./GeometryOffsetAttribute-964ec9ef","./Transforms-70f396e0","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./EllipseGeometryLibrary-e73d797b","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./GeometryInstance-5c9d46a4","./GeometryPipeline-d4d3acd7","./AttributeCompression-56959beb","./EncodedCartesian3-942c4568","./IndexDatatype-b42089ce","./IntersectionTests-587a744a","./Plane-9d4e3328"],function(r,e,o,n,a,t,i,s,l,d,m,c,u,p,y,_,h,G,x,f,g,E){"use strict";function v(e){var t=(e=o.defaultValue(e,o.defaultValue.EMPTY_OBJECT)).radius,e={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new n.EllipseGeometry(e),this._workerName="createCircleGeometry"}v.packedLength=n.EllipseGeometry.packedLength,v.pack=function(e,t,i){return n.EllipseGeometry.pack(e._ellipseGeometry,t,i)};var b=new n.EllipseGeometry({center:new r.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),w={center:new r.Cartesian3,radius:void 0,ellipsoid:r.Ellipsoid.clone(r.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new a.VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return v.unpack=function(e,t,i){t=n.EllipseGeometry.unpack(e,t,b);return w.center=r.Cartesian3.clone(t._center,w.center),w.ellipsoid=r.Ellipsoid.clone(t._ellipsoid,w.ellipsoid),w.height=t._height,w.extrudedHeight=t._extrudedHeight,w.granularity=t._granularity,w.vertexFormat=a.VertexFormat.clone(t._vertexFormat,w.vertexFormat),w.stRotation=t._stRotation,w.shadowVolume=t._shadowVolume,o.defined(i)?(w.semiMajorAxis=t._semiMajorAxis,w.semiMinorAxis=t._semiMinorAxis,i._ellipseGeometry=new n.EllipseGeometry(w),i):(w.radius=t._semiMajorAxis,new v(w))},v.createGeometry=function(e){return n.EllipseGeometry.createGeometry(e._ellipseGeometry)},v.createShadowVolume=function(e,t,i){var r=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,t=t(r,o),i=i(r,o);return new v({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:r,extrudedHeight:t,height:i,vertexFormat:a.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(v.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(e,t){return(e=o.defined(t)?v.unpack(e,t):e)._ellipseGeometry._center=r.Cartesian3.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=r.Ellipsoid.clone(e._ellipseGeometry._ellipsoid),v.createGeometry(e)}}); | ||
define(["./Matrix2-f2da41d4","./RuntimeError-ffe03243","./when-229515d6","./EllipseGeometry-0fca35c1","./VertexFormat-565d6a6c","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./GeometryOffsetAttribute-ff1e192c","./Transforms-7cd3197b","./combine-8ce3f24b","./EllipseGeometryLibrary-69f5ff56","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./GeometryInstance-16601d2a","./GeometryPipeline-5b3fba53","./AttributeCompression-0af3c035","./EncodedCartesian3-d4f305ce","./IndexDatatype-b10faa0b","./IntersectionTests-1b8a3cb9","./Plane-0421a8be"],(function(e,t,i,r,o,a,n,l,s,m,d,c,u,p,y,_,G,x,f,h){"use strict";function g(e){var t=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).radius,o={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new r.EllipseGeometry(o),this._workerName="createCircleGeometry"}g.packedLength=r.EllipseGeometry.packedLength,g.pack=function(e,t,i){return r.EllipseGeometry.pack(e._ellipseGeometry,t,i)};var b=new r.EllipseGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),v={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new o.VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return g.unpack=function(t,a,n){var l=r.EllipseGeometry.unpack(t,a,b);return v.center=e.Cartesian3.clone(l._center,v.center),v.ellipsoid=e.Ellipsoid.clone(l._ellipsoid,v.ellipsoid),v.height=l._height,v.extrudedHeight=l._extrudedHeight,v.granularity=l._granularity,v.vertexFormat=o.VertexFormat.clone(l._vertexFormat,v.vertexFormat),v.stRotation=l._stRotation,v.shadowVolume=l._shadowVolume,i.defined(n)?(v.semiMajorAxis=l._semiMajorAxis,v.semiMinorAxis=l._semiMinorAxis,n._ellipseGeometry=new r.EllipseGeometry(v),n):(v.radius=l._semiMajorAxis,new g(v))},g.createGeometry=function(e){return r.EllipseGeometry.createGeometry(e._ellipseGeometry)},g.createShadowVolume=function(e,t,i){var r=e._ellipseGeometry._granularity,a=e._ellipseGeometry._ellipsoid,n=t(r,a),l=i(r,a);return new g({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:a,stRotation:e._ellipseGeometry._stRotation,granularity:r,extrudedHeight:n,height:l,vertexFormat:o.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(g.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(t,r){return i.defined(r)&&(t=g.unpack(t,r)),t._ellipseGeometry._center=e.Cartesian3.clone(t._ellipseGeometry._center),t._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(t._ellipseGeometry._ellipsoid),g.createGeometry(t)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./Cartesian2-40b13f31","./Check-3917d765","./when-7b580518","./EllipseOutlineGeometry-c0f37151","./Math-87254c13","./GeometryOffsetAttribute-964ec9ef","./Transforms-70f396e0","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./EllipseGeometryLibrary-e73d797b","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce"],function(r,e,n,l,i,t,s,o,a,u,c,d,m,p,y){"use strict";function f(e){var i=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).radius,e={center:e.center,semiMajorAxis:i,semiMinorAxis:i,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new l.EllipseOutlineGeometry(e),this._workerName="createCircleOutlineGeometry"}f.packedLength=l.EllipseOutlineGeometry.packedLength,f.pack=function(e,i,t){return l.EllipseOutlineGeometry.pack(e._ellipseGeometry,i,t)};var G=new l.EllipseOutlineGeometry({center:new r.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),_={center:new r.Cartesian3,radius:void 0,ellipsoid:r.Ellipsoid.clone(r.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};return f.unpack=function(e,i,t){i=l.EllipseOutlineGeometry.unpack(e,i,G);return _.center=r.Cartesian3.clone(i._center,_.center),_.ellipsoid=r.Ellipsoid.clone(i._ellipsoid,_.ellipsoid),_.height=i._height,_.extrudedHeight=i._extrudedHeight,_.granularity=i._granularity,_.numberOfVerticalLines=i._numberOfVerticalLines,n.defined(t)?(_.semiMajorAxis=i._semiMajorAxis,_.semiMinorAxis=i._semiMinorAxis,t._ellipseGeometry=new l.EllipseOutlineGeometry(_),t):(_.radius=i._semiMajorAxis,new f(_))},f.createGeometry=function(e){return l.EllipseOutlineGeometry.createGeometry(e._ellipseGeometry)},function(e,i){return(e=n.defined(i)?f.unpack(e,i):e)._ellipseGeometry._center=r.Cartesian3.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=r.Ellipsoid.clone(e._ellipseGeometry._ellipsoid),f.createGeometry(e)}}); | ||
define(["./Matrix2-f2da41d4","./RuntimeError-ffe03243","./when-229515d6","./EllipseOutlineGeometry-c29842bd","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./GeometryOffsetAttribute-ff1e192c","./Transforms-7cd3197b","./combine-8ce3f24b","./EllipseGeometryLibrary-69f5ff56","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b"],(function(e,i,t,r,l,n,s,o,a,u,d,m,c){"use strict";function p(e){var i=(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT)).radius,l={center:e.center,semiMajorAxis:i,semiMinorAxis:i,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new r.EllipseOutlineGeometry(l),this._workerName="createCircleOutlineGeometry"}p.packedLength=r.EllipseOutlineGeometry.packedLength,p.pack=function(e,i,t){return r.EllipseOutlineGeometry.pack(e._ellipseGeometry,i,t)};var y=new r.EllipseOutlineGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),f={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};return p.unpack=function(i,l,n){var s=r.EllipseOutlineGeometry.unpack(i,l,y);return f.center=e.Cartesian3.clone(s._center,f.center),f.ellipsoid=e.Ellipsoid.clone(s._ellipsoid,f.ellipsoid),f.height=s._height,f.extrudedHeight=s._extrudedHeight,f.granularity=s._granularity,f.numberOfVerticalLines=s._numberOfVerticalLines,t.defined(n)?(f.semiMajorAxis=s._semiMajorAxis,f.semiMinorAxis=s._semiMinorAxis,n._ellipseGeometry=new r.EllipseOutlineGeometry(f),n):(f.radius=s._semiMajorAxis,new p(f))},p.createGeometry=function(e){return r.EllipseOutlineGeometry.createGeometry(e._ellipseGeometry)},function(i,r){return t.defined(r)&&(i=p.unpack(i,r)),i._ellipseGeometry._center=e.Cartesian3.clone(i._ellipseGeometry._center),i._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(i._ellipseGeometry._ellipsoid),p.createGeometry(i)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./arrayRemoveDuplicates-47b233f1","./BoundingRectangle-0c269568","./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./ComponentDatatype-6c2e43c1","./CoplanarPolygonGeometryLibrary-8e195db6","./when-7b580518","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./GeometryInstance-5c9d46a4","./GeometryPipeline-d4d3acd7","./IndexDatatype-b42089ce","./Math-87254c13","./PolygonGeometryLibrary-c09bef45","./PolygonPipeline-5dc6dac0","./VertexFormat-8d463a4f","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./OrientedBoundingBox-f7557a9b","./EllipsoidTangentPlane-66f520e3","./AxisAlignedBoundingBox-445c3009","./IntersectionTests-587a744a","./Plane-9d4e3328","./AttributeCompression-56959beb","./EncodedCartesian3-942c4568","./ArcType-1da7fdca","./EllipsoidRhumbLine-6baec512"],function(h,e,L,E,t,T,C,l,D,_,f,v,k,V,x,R,s,n,a,r,o,i,p,c,y,m,u,d,g){"use strict";var I=new E.Cartesian3,P=new e.BoundingRectangle,M=new E.Cartesian2,B=new E.Cartesian2,A=new E.Cartesian3,w=new E.Cartesian3,F=new E.Cartesian3,G=new E.Cartesian3,H=new E.Cartesian3,O=new E.Cartesian3,z=new L.Quaternion,S=new L.Matrix3,N=new L.Matrix3,Q=new E.Cartesian3;function b(e){var t=(e=l.defaultValue(e,l.defaultValue.EMPTY_OBJECT)).polygonHierarchy,n=l.defaultValue(e.vertexFormat,s.VertexFormat.DEFAULT);this._vertexFormat=s.VertexFormat.clone(n),this._polygonHierarchy=t,this._stRotation=l.defaultValue(e.stRotation,0),this._ellipsoid=E.Ellipsoid.clone(l.defaultValue(e.ellipsoid,E.Ellipsoid.WGS84)),this._workerName="createCoplanarPolygonGeometry",this.packedLength=x.PolygonGeometryLibrary.computeHierarchyPackedLength(t)+s.VertexFormat.packedLength+E.Ellipsoid.packedLength+2}b.fromPositions=function(e){return new b({polygonHierarchy:{positions:(e=l.defaultValue(e,l.defaultValue.EMPTY_OBJECT)).positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid})},b.pack=function(e,t,n){return n=l.defaultValue(n,0),n=x.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,n),E.Ellipsoid.pack(e._ellipsoid,t,n),n+=E.Ellipsoid.packedLength,s.VertexFormat.pack(e._vertexFormat,t,n),n+=s.VertexFormat.packedLength,t[n++]=e._stRotation,t[n]=e.packedLength,t};var j=E.Ellipsoid.clone(E.Ellipsoid.UNIT_SPHERE),U=new s.VertexFormat,Y={polygonHierarchy:{}};return b.unpack=function(e,t,n){t=l.defaultValue(t,0);var a=x.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=a.startingIndex,delete a.startingIndex;var r=E.Ellipsoid.unpack(e,t,j);t+=E.Ellipsoid.packedLength;var o=s.VertexFormat.unpack(e,t,U);t+=s.VertexFormat.packedLength;var i=e[t++],t=e[t];return(n=!l.defined(n)?new b(Y):n)._polygonHierarchy=a,n._ellipsoid=E.Ellipsoid.clone(r,n._ellipsoid),n._vertexFormat=s.VertexFormat.clone(o,n._vertexFormat),n._stRotation=i,n.packedLength=t,n},b.createGeometry=function(e){var t=e._vertexFormat,n=e._polygonHierarchy,a=e._stRotation,r=n.positions;if(!((r=h.arrayRemoveDuplicates(r,E.Cartesian3.equalsEpsilon,!0)).length<3)){var o=A,i=w,l=F,s=H,p=O;if(C.CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments(r,G,s,p)){o=E.Cartesian3.cross(s,p,o);o=E.Cartesian3.normalize(o,o),E.Cartesian3.equalsEpsilon(G,E.Cartesian3.ZERO,V.CesiumMath.EPSILON6)||(c=e._ellipsoid.geodeticSurfaceNormal(G,Q),E.Cartesian3.dot(o,c)<0&&(o=E.Cartesian3.negate(o,o),s=E.Cartesian3.negate(s,s)));var c=C.CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction(G,s,p),y=C.CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction(G,s,p);t.tangent&&(i=E.Cartesian3.clone(s,i)),t.bitangent&&(l=E.Cartesian3.clone(p,l));var n=x.PolygonGeometryLibrary.polygonsFromHierarchy(n,c,!1),c=n.hierarchy,m=n.polygons;if(0!==c.length){for(var r=c[0].outerRing,n=L.BoundingSphere.fromPoints(r),u=x.PolygonGeometryLibrary.computeBoundingRectangle(o,y,r,a,P),d=[],g=0;g<m.length;g++){var b=new f.GeometryInstance({geometry:function(e,t,n,a,r,o,i,l){var s=e.positions,p=R.PolygonPipeline.triangulate(e.positions2D,e.holes);p.length<3&&(p=[0,1,2]),(e=k.IndexDatatype.createTypedArray(s.length,p.length)).set(p);var c=S;0!==a?(p=L.Quaternion.fromAxisAngle(o,a,z),c=L.Matrix3.fromQuaternion(p,c),(t.tangent||t.bitangent)&&(p=L.Quaternion.fromAxisAngle(o,-a,z),u=L.Matrix3.fromQuaternion(p,N),i=E.Cartesian3.normalize(L.Matrix3.multiplyByVector(u,i,i),i),t.bitangent&&(l=E.Cartesian3.normalize(E.Cartesian3.cross(o,i,l),l)))):c=L.Matrix3.clone(L.Matrix3.IDENTITY,c);var y=B;t.st&&(y.x=n.x,y.y=n.y);for(var m=s.length,u=3*m,d=new Float64Array(u),g=t.normal?new Float32Array(u):void 0,b=t.tangent?new Float32Array(u):void 0,h=t.bitangent?new Float32Array(u):void 0,C=t.st?new Float32Array(2*m):void 0,f=0,v=0,x=0,P=0,A=0,w=0;w<m;w++){var F,G=s[w];d[f++]=G.x,d[f++]=G.y,d[f++]=G.z,t.st&&(F=r(L.Matrix3.multiplyByVector(c,G,I),M),E.Cartesian2.subtract(F,y,F),G=V.CesiumMath.clamp(F.x/n.width,0,1),F=V.CesiumMath.clamp(F.y/n.height,0,1),C[A++]=G,C[A++]=F),t.normal&&(g[v++]=o.x,g[v++]=o.y,g[v++]=o.z),t.tangent&&(b[P++]=i.x,b[P++]=i.y,b[P++]=i.z),t.bitangent&&(h[x++]=l.x,h[x++]=l.y,h[x++]=l.z)}return u=new _.GeometryAttributes,t.position&&(u.position=new D.GeometryAttribute({componentDatatype:T.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:d})),t.normal&&(u.normal=new D.GeometryAttribute({componentDatatype:T.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:g})),t.tangent&&(u.tangent=new D.GeometryAttribute({componentDatatype:T.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:b})),t.bitangent&&(u.bitangent=new D.GeometryAttribute({componentDatatype:T.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:h})),t.st&&(u.st=new D.GeometryAttribute({componentDatatype:T.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:C})),new D.Geometry({attributes:u,indices:e,primitiveType:D.PrimitiveType.TRIANGLES})}(m[g],t,u,a,y,o,i,l)});d.push(b)}c=v.GeometryPipeline.combineInstances(d)[0];c.attributes.position.values=new Float64Array(c.attributes.position.values),c.indices=k.IndexDatatype.createTypedArray(c.attributes.position.values.length/3,c.indices);r=c.attributes;return t.position||delete r.position,new D.Geometry({attributes:r,indices:c.indices,primitiveType:c.primitiveType,boundingSphere:n})}}}},function(e,t){return l.defined(t)&&(e=b.unpack(e,t)),b.createGeometry(e)}}); | ||
define(["./arrayRemoveDuplicates-bb548aa3","./BoundingRectangle-18e42324","./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./CoplanarPolygonGeometryLibrary-4653bf5b","./when-229515d6","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./GeometryInstance-16601d2a","./GeometryPipeline-5b3fba53","./IndexDatatype-b10faa0b","./PolygonGeometryLibrary-f129e954","./PolygonPipeline-5582b1ec","./VertexFormat-565d6a6c","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./OrientedBoundingBox-86debc5a","./EllipsoidTangentPlane-b27cd2f7","./AxisAlignedBoundingBox-1feb0c48","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./AttributeCompression-0af3c035","./EncodedCartesian3-d4f305ce","./ArcType-1da7fdca","./EllipsoidRhumbLine-afd6cd20"],(function(e,t,a,n,r,o,i,l,s,p,y,c,m,u,d,g,b,v,f,h,x,C,P,A,w,F,G){"use strict";var L=new n.Cartesian3,E=new t.BoundingRectangle,T=new n.Cartesian2,D=new n.Cartesian2,_=new n.Cartesian3,V=new n.Cartesian3,k=new n.Cartesian3,R=new n.Cartesian3,I=new n.Cartesian3,M=new n.Cartesian3,B=new a.Quaternion,H=new n.Matrix3,O=new n.Matrix3,z=new n.Cartesian3;function S(e,t,r,i,l,y,c,u){var g=e.positions,b=d.PolygonPipeline.triangulate(e.positions2D,e.holes);b.length<3&&(b=[0,1,2]);var v=m.IndexDatatype.createTypedArray(g.length,b.length);v.set(b);var f=H;if(0!==i){var h=a.Quaternion.fromAxisAngle(y,i,B);if(f=n.Matrix3.fromQuaternion(h,f),t.tangent||t.bitangent){h=a.Quaternion.fromAxisAngle(y,-i,B);var x=n.Matrix3.fromQuaternion(h,O);c=n.Cartesian3.normalize(n.Matrix3.multiplyByVector(x,c,c),c),t.bitangent&&(u=n.Cartesian3.normalize(n.Cartesian3.cross(y,c,u),u))}}else f=n.Matrix3.clone(n.Matrix3.IDENTITY,f);var C=D;t.st&&(C.x=r.x,C.y=r.y);for(var P=g.length,A=3*P,w=new Float64Array(A),F=t.normal?new Float32Array(A):void 0,G=t.tangent?new Float32Array(A):void 0,E=t.bitangent?new Float32Array(A):void 0,_=t.st?new Float32Array(2*P):void 0,V=0,k=0,R=0,I=0,M=0,z=0;z<P;z++){var S=g[z];if(w[V++]=S.x,w[V++]=S.y,w[V++]=S.z,t.st){var N=l(n.Matrix3.multiplyByVector(f,S,L),T);n.Cartesian2.subtract(N,C,N);var Q=o.CesiumMath.clamp(N.x/r.width,0,1),j=o.CesiumMath.clamp(N.y/r.height,0,1);_[M++]=Q,_[M++]=j}t.normal&&(F[k++]=y.x,F[k++]=y.y,F[k++]=y.z),t.tangent&&(G[I++]=c.x,G[I++]=c.y,G[I++]=c.z),t.bitangent&&(E[R++]=u.x,E[R++]=u.y,E[R++]=u.z)}var U=new p.GeometryAttributes;return t.position&&(U.position=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w})),t.normal&&(U.normal=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:F})),t.tangent&&(U.tangent=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),t.bitangent&&(U.bitangent=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:E})),t.st&&(U.st=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:_})),new s.Geometry({attributes:U,indices:v,primitiveType:s.PrimitiveType.TRIANGLES})}function N(e){var t=(e=l.defaultValue(e,l.defaultValue.EMPTY_OBJECT)).polygonHierarchy,a=l.defaultValue(e.vertexFormat,g.VertexFormat.DEFAULT);this._vertexFormat=g.VertexFormat.clone(a),this._polygonHierarchy=t,this._stRotation=l.defaultValue(e.stRotation,0),this._ellipsoid=n.Ellipsoid.clone(l.defaultValue(e.ellipsoid,n.Ellipsoid.WGS84)),this._workerName="createCoplanarPolygonGeometry",this.packedLength=u.PolygonGeometryLibrary.computeHierarchyPackedLength(t)+g.VertexFormat.packedLength+n.Ellipsoid.packedLength+2}N.fromPositions=function(e){return new N({polygonHierarchy:{positions:(e=l.defaultValue(e,l.defaultValue.EMPTY_OBJECT)).positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid})},N.pack=function(e,t,a){return a=l.defaultValue(a,0),a=u.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,a),n.Ellipsoid.pack(e._ellipsoid,t,a),a+=n.Ellipsoid.packedLength,g.VertexFormat.pack(e._vertexFormat,t,a),a+=g.VertexFormat.packedLength,t[a++]=e._stRotation,t[a]=e.packedLength,t};var Q=n.Ellipsoid.clone(n.Ellipsoid.UNIT_SPHERE),j=new g.VertexFormat,U={polygonHierarchy:{}};return N.unpack=function(e,t,a){t=l.defaultValue(t,0);var r=u.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=r.startingIndex,delete r.startingIndex;var o=n.Ellipsoid.unpack(e,t,Q);t+=n.Ellipsoid.packedLength;var i=g.VertexFormat.unpack(e,t,j);t+=g.VertexFormat.packedLength;var s=e[t++],p=e[t];return l.defined(a)||(a=new N(U)),a._polygonHierarchy=r,a._ellipsoid=n.Ellipsoid.clone(o,a._ellipsoid),a._vertexFormat=g.VertexFormat.clone(i,a._vertexFormat),a._stRotation=s,a.packedLength=p,a},N.createGeometry=function(t){var r=t._vertexFormat,l=t._polygonHierarchy,p=t._stRotation,d=l.positions;if(!((d=e.arrayRemoveDuplicates(d,n.Cartesian3.equalsEpsilon,!0)).length<3)){var g=_,b=V,v=k,f=I,h=M;if(i.CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments(d,R,f,h)){if(g=n.Cartesian3.cross(f,h,g),g=n.Cartesian3.normalize(g,g),!n.Cartesian3.equalsEpsilon(R,n.Cartesian3.ZERO,o.CesiumMath.EPSILON6)){var x=t._ellipsoid.geodeticSurfaceNormal(R,z);n.Cartesian3.dot(g,x)<0&&(g=n.Cartesian3.negate(g,g),f=n.Cartesian3.negate(f,f))}var C=i.CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction(R,f,h),P=i.CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction(R,f,h);r.tangent&&(b=n.Cartesian3.clone(f,b)),r.bitangent&&(v=n.Cartesian3.clone(h,v));var A=u.PolygonGeometryLibrary.polygonsFromHierarchy(l,C,!1),w=A.hierarchy,F=A.polygons;if(0!==w.length){d=w[0].outerRing;for(var G=a.BoundingSphere.fromPoints(d),L=u.PolygonGeometryLibrary.computeBoundingRectangle(g,P,d,p,E),T=[],D=0;D<F.length;D++){var B=new y.GeometryInstance({geometry:S(F[D],r,L,p,P,g,b,v)});T.push(B)}var H=c.GeometryPipeline.combineInstances(T)[0];H.attributes.position.values=new Float64Array(H.attributes.position.values),H.indices=m.IndexDatatype.createTypedArray(H.attributes.position.values.length/3,H.indices);var O=H.attributes;return r.position||delete O.position,new s.Geometry({attributes:O,indices:H.indices,primitiveType:H.primitiveType,boundingSphere:G})}}}},function(e,t){return l.defined(t)&&(e=N.unpack(e,t)),N.createGeometry(e)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./arrayRemoveDuplicates-47b233f1","./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./ComponentDatatype-6c2e43c1","./CoplanarPolygonGeometryLibrary-8e195db6","./when-7b580518","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./GeometryInstance-5c9d46a4","./GeometryPipeline-d4d3acd7","./IndexDatatype-b42089ce","./PolygonGeometryLibrary-c09bef45","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./OrientedBoundingBox-f7557a9b","./EllipsoidTangentPlane-66f520e3","./AxisAlignedBoundingBox-445c3009","./IntersectionTests-587a744a","./Plane-9d4e3328","./AttributeCompression-56959beb","./EncodedCartesian3-942c4568","./ArcType-1da7fdca","./EllipsoidRhumbLine-6baec512","./PolygonPipeline-5dc6dac0"],function(a,y,c,e,l,p,o,s,u,d,m,g,b,t,n,r,i,f,h,P,G,v,L,C,T,E,k){"use strict";function A(e){e=(e=o.defaultValue(e,o.defaultValue.EMPTY_OBJECT)).polygonHierarchy;this._polygonHierarchy=e,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=b.PolygonGeometryLibrary.computeHierarchyPackedLength(e)+1}A.fromPositions=function(e){return new A({polygonHierarchy:{positions:(e=o.defaultValue(e,o.defaultValue.EMPTY_OBJECT)).positions}})},A.pack=function(e,t,n){return n=o.defaultValue(n,0),t[n=b.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,n)]=e.packedLength,t};var H={polygonHierarchy:{}};return A.unpack=function(e,t,n){t=o.defaultValue(t,0);var r=b.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=r.startingIndex,delete r.startingIndex;t=e[t];return(n=!o.defined(n)?new A(H):n)._polygonHierarchy=r,n.packedLength=t,n},A.createGeometry=function(e){var t=e._polygonHierarchy,e=t.positions,e=a.arrayRemoveDuplicates(e,c.Cartesian3.equalsEpsilon,!0);if(!(e.length<3)&&p.CoplanarPolygonGeometryLibrary.validOutline(e)){var n=b.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(t,!1);if(0!==n.length){for(var r=[],o=0;o<n.length;o++){var i=new d.GeometryInstance({geometry:function(e){for(var t=e.length,n=new Float64Array(3*t),r=g.IndexDatatype.createTypedArray(t,2*t),o=0,i=0,a=0;a<t;a++){var y=e[a];n[o++]=y.x,n[o++]=y.y,n[o++]=y.z,r[i++]=a,r[i++]=(a+1)%t}var c=new u.GeometryAttributes({position:new s.GeometryAttribute({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})});return new s.Geometry({attributes:c,indices:r,primitiveType:s.PrimitiveType.LINES})}(n[o])});r.push(i)}e=m.GeometryPipeline.combineInstances(r)[0],t=y.BoundingSphere.fromPoints(t.positions);return new s.Geometry({attributes:e.attributes,indices:e.indices,primitiveType:e.primitiveType,boundingSphere:t})}}},function(e,t){return(e=o.defined(t)?A.unpack(e,t):e)._ellipsoid=c.Ellipsoid.clone(e._ellipsoid),A.createGeometry(e)}}); | ||
define(["./arrayRemoveDuplicates-bb548aa3","./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./CoplanarPolygonGeometryLibrary-4653bf5b","./when-229515d6","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./GeometryInstance-16601d2a","./GeometryPipeline-5b3fba53","./IndexDatatype-b10faa0b","./PolygonGeometryLibrary-f129e954","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./OrientedBoundingBox-86debc5a","./EllipsoidTangentPlane-b27cd2f7","./AxisAlignedBoundingBox-1feb0c48","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./AttributeCompression-0af3c035","./EncodedCartesian3-d4f305ce","./ArcType-1da7fdca","./EllipsoidRhumbLine-afd6cd20","./PolygonPipeline-5582b1ec"],(function(e,t,r,n,o,a,i,y,l,c,p,s,u,d,m,b,f,g,h,P,G,v,L,T,E){"use strict";function A(e){for(var t=e.length,r=new Float64Array(3*t),n=s.IndexDatatype.createTypedArray(t,2*t),a=0,i=0,c=0;c<t;c++){var p=e[c];r[a++]=p.x,r[a++]=p.y,r[a++]=p.z,n[i++]=c,n[i++]=(c+1)%t}var u=new l.GeometryAttributes({position:new y.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:r})});return new y.Geometry({attributes:u,indices:n,primitiveType:y.PrimitiveType.LINES})}function C(e){var t=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=u.PolygonGeometryLibrary.computeHierarchyPackedLength(t)+1}C.fromPositions=function(e){return new C({polygonHierarchy:{positions:(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).positions}})},C.pack=function(e,t,r){return r=i.defaultValue(r,0),t[r=u.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,r)]=e.packedLength,t};var H={polygonHierarchy:{}};return C.unpack=function(e,t,r){t=i.defaultValue(t,0);var n=u.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var o=e[t];return i.defined(r)||(r=new C(H)),r._polygonHierarchy=n,r.packedLength=o,r},C.createGeometry=function(n){var o=n._polygonHierarchy,i=o.positions;if(!((i=e.arrayRemoveDuplicates(i,r.Cartesian3.equalsEpsilon,!0)).length<3)&&a.CoplanarPolygonGeometryLibrary.validOutline(i)){var l=u.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(o,!1);if(0!==l.length){for(var s=[],d=0;d<l.length;d++){var m=new c.GeometryInstance({geometry:A(l[d])});s.push(m)}var b=p.GeometryPipeline.combineInstances(s)[0],f=t.BoundingSphere.fromPoints(o.positions);return new y.Geometry({attributes:b.attributes,indices:b.indices,primitiveType:b.primitiveType,boundingSphere:f})}}},function(e,t){return i.defined(t)&&(e=C.unpack(e,t)),e._ellipsoid=r.Ellipsoid.clone(e._ellipsoid),C.createGeometry(e)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./GeometryOffsetAttribute-964ec9ef","./arrayRemoveDuplicates-47b233f1","./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./ComponentDatatype-6c2e43c1","./PolylineVolumeGeometryLibrary-247a98de","./CorridorGeometryLibrary-9730e150","./when-7b580518","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce","./Math-87254c13","./PolygonPipeline-5dc6dac0","./VertexFormat-8d463a4f","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-66f520e3","./AxisAlignedBoundingBox-445c3009","./IntersectionTests-587a744a","./Plane-9d4e3328","./PolylinePipeline-ff2b6881","./EllipsoidGeodesic-bdbae7c8","./EllipsoidRhumbLine-6baec512"],function(E,y,m,rt,t,at,f,it,ot,nt,st,lt,dt,V,F,e,r,a,i,o,n,s,l,d,u){"use strict";var ut=new rt.Cartesian3,mt=new rt.Cartesian3,yt=new rt.Cartesian3,ft=new rt.Cartesian3,L=new rt.Cartesian3,ct=new rt.Cartesian3,pt=new rt.Cartesian3,ht=new rt.Cartesian3;function c(t,e){for(var r=0;r<t.length;r++)t[r]=e.scaleToGeodeticSurface(t[r],t[r]);return t}function gt(t,e,r,a,i,o){var n=t.normals,s=t.tangents,l=t.bitangents,t=rt.Cartesian3.normalize(rt.Cartesian3.cross(r,e,pt),pt);o.normal&&it.CorridorGeometryLibrary.addAttribute(n,e,a,i),o.tangent&&it.CorridorGeometryLibrary.addAttribute(s,t,a,i),o.bitangent&&it.CorridorGeometryLibrary.addAttribute(l,r,a,i)}function x(t,e,r){var a,i=t.positions,o=t.corners,n=t.endPositions,s=t.lefts,l=t.normals,d=new st.GeometryAttributes,u=0,m=0,y=0;for(D=0;D<i.length;D+=2)u+=a=i[D].length-3,y+=2*a,m+=i[D+1].length-3;for(u+=3,m+=3,D=0;D<o.length;D++){var f=o[D],c=o[D].leftPositions;ot.defined(c)?u+=a=c.length:m+=a=o[D].rightPositions.length,y+=a}var p,h=ot.defined(n);h&&(u+=p=n[0].length-3,m+=p,y+=6*(p/=3));var g,C,b,A,t=u+m,v=new Float64Array(t),_={normals:e.normal?new Float32Array(t):void 0,tangents:e.tangent?new Float32Array(t):void 0,bitangents:e.bitangent?new Float32Array(t):void 0},w=0,T=t-1,G=ut,E=mt,V=p/2,F=lt.IndexDatatype.createTypedArray(t/3,y),L=0;if(h)for(var x=yt,P=ft,N=n[0],G=rt.Cartesian3.fromArray(l,0,G),E=rt.Cartesian3.fromArray(s,0,E),D=0;D<V;D++)x=rt.Cartesian3.fromArray(N,3*(V-1-D),x),P=rt.Cartesian3.fromArray(N,3*(V+D),P),it.CorridorGeometryLibrary.addAttribute(v,P,w),it.CorridorGeometryLibrary.addAttribute(v,x,void 0,T),gt(_,G,E,w,T,e),A=(C=w/3)+1,b=(g=(T-2)/3)-1,F[L++]=g,F[L++]=C,F[L++]=b,F[L++]=b,F[L++]=C,F[L++]=A,w+=3,T-=3;var M,O,I=0,S=0,R=i[I++],k=i[I++];for(v.set(R,w),v.set(k,T-k.length+1),E=rt.Cartesian3.fromArray(s,S,E),a=k.length-3,D=0;D<a;D+=3)M=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(R,D,pt),pt),O=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(k,a-D,ht),ht),gt(_,G=rt.Cartesian3.normalize(rt.Cartesian3.add(M,O,G),G),E,w,T,e),A=(C=w/3)+1,b=(g=(T-2)/3)-1,F[L++]=g,F[L++]=C,F[L++]=b,F[L++]=b,F[L++]=C,F[L++]=A,w+=3,T-=3;for(M=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(R,a,pt),pt),O=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(k,a,ht),ht),G=rt.Cartesian3.normalize(rt.Cartesian3.add(M,O,G),G),S+=3,D=0;D<o.length;D++){var H,z,B,U=(f=o[D]).leftPositions,Y=f.rightPositions,W=ct,q=yt,J=ft;if(G=rt.Cartesian3.fromArray(l,S,G),ot.defined(U)){for(gt(_,G,E,void 0,T,e),T-=3,z=A,B=b,H=0;H<U.length/3;H++)W=rt.Cartesian3.fromArray(U,3*H,W),F[L++]=z,F[L++]=B-H-1,F[L++]=B-H,it.CorridorGeometryLibrary.addAttribute(v,W,void 0,T),q=rt.Cartesian3.fromArray(v,3*(B-H-1),q),J=rt.Cartesian3.fromArray(v,3*z,J),gt(_,G,E=rt.Cartesian3.normalize(rt.Cartesian3.subtract(q,J,E),E),void 0,T,e),T-=3;W=rt.Cartesian3.fromArray(v,3*z,W),q=rt.Cartesian3.subtract(rt.Cartesian3.fromArray(v,3*B,q),W,q),J=rt.Cartesian3.subtract(rt.Cartesian3.fromArray(v,3*(B-H),J),W,J),gt(_,G,E=rt.Cartesian3.normalize(rt.Cartesian3.add(q,J,E),E),w,void 0,e),w+=3}else{for(gt(_,G,E,w,void 0,e),w+=3,z=b,B=A,H=0;H<Y.length/3;H++)W=rt.Cartesian3.fromArray(Y,3*H,W),F[L++]=z,F[L++]=B+H,F[L++]=B+H+1,it.CorridorGeometryLibrary.addAttribute(v,W,w),q=rt.Cartesian3.fromArray(v,3*z,q),J=rt.Cartesian3.fromArray(v,3*(B+H),J),gt(_,G,E=rt.Cartesian3.normalize(rt.Cartesian3.subtract(q,J,E),E),w,void 0,e),w+=3;W=rt.Cartesian3.fromArray(v,3*z,W),q=rt.Cartesian3.subtract(rt.Cartesian3.fromArray(v,3*(B+H),q),W,q),J=rt.Cartesian3.subtract(rt.Cartesian3.fromArray(v,3*B,J),W,J),gt(_,G,E=rt.Cartesian3.normalize(rt.Cartesian3.negate(rt.Cartesian3.add(J,q,E),E),E),void 0,T,e),T-=3}for(R=i[I++],k=i[I++],R.splice(0,3),k.splice(k.length-3,3),v.set(R,w),v.set(k,T-k.length+1),a=k.length-3,S+=3,E=rt.Cartesian3.fromArray(s,S,E),H=0;H<k.length;H+=3)M=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(R,H,pt),pt),O=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(k,a-H,ht),ht),gt(_,G=rt.Cartesian3.normalize(rt.Cartesian3.add(M,O,G),G),E,w,T,e),C=(A=w/3)-1,F[L++]=g=(b=(T-2)/3)+1,F[L++]=C,F[L++]=b,F[L++]=b,F[L++]=C,F[L++]=A,w+=3,T-=3;w-=3,T+=3}if(gt(_,G=rt.Cartesian3.fromArray(l,l.length-3,G),E,w,T,e),h){w+=3,T-=3,x=yt,P=ft;var j=n[1];for(D=0;D<V;D++)x=rt.Cartesian3.fromArray(j,3*(p-D-1),x),P=rt.Cartesian3.fromArray(j,3*D,P),it.CorridorGeometryLibrary.addAttribute(v,x,void 0,T),it.CorridorGeometryLibrary.addAttribute(v,P,w),gt(_,G,E,w,T,e),C=(A=w/3)-1,F[L++]=g=(b=(T-2)/3)+1,F[L++]=C,F[L++]=b,F[L++]=b,F[L++]=C,F[L++]=A,w+=3,T-=3}if(d.position=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v}),e.st){var K=new Float32Array(t/3*2),Q=0;if(h){u/=3,m/=3;var X,Z=Math.PI/(p+1),$=1/(u-p+1),tt=1/(m-p+1),et=p/2;for(D=1+et;D<p+1;D++)X=dt.CesiumMath.PI_OVER_TWO+Z*D,K[Q++]=tt*(1+Math.cos(X)),K[Q++]=.5*(1+Math.sin(X));for(D=1;D<m-p+1;D++)K[Q++]=D*tt,K[Q++]=0;for(D=p;et<D;D--)X=dt.CesiumMath.PI_OVER_TWO-D*Z,K[Q++]=1-tt*(1+Math.cos(X)),K[Q++]=.5*(1+Math.sin(X));for(D=et;0<D;D--)X=dt.CesiumMath.PI_OVER_TWO-Z*D,K[Q++]=1-$*(1+Math.cos(X)),K[Q++]=.5*(1+Math.sin(X));for(D=u-p;0<D;D--)K[Q++]=D*$,K[Q++]=1;for(D=1;D<1+et;D++)X=dt.CesiumMath.PI_OVER_TWO+Z*D,K[Q++]=$*(1+Math.cos(X)),K[Q++]=.5*(1+Math.sin(X))}else{for($=1/((u/=3)-1),tt=1/((m/=3)-1),D=0;D<m;D++)K[Q++]=D*tt,K[Q++]=0;for(D=u;0<D;D--)K[Q++]=(D-1)*$,K[Q++]=1}d.st=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:K})}return e.normal&&(d.normal=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:_.normals})),e.tangent&&(d.tangent=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:_.tangents})),e.bitangent&&(d.bitangent=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:_.bitangents})),{attributes:d,indices:F}}function P(t,e,r){r[e++]=t[0],r[e++]=t[1],r[e++]=t[2];for(var a=3;a<t.length;a+=3){var i=t[a],o=t[a+1],n=t[a+2];r[e++]=i,r[e++]=o,r[e++]=n,r[e++]=i,r[e++]=o,r[e++]=n}return r[e++]=t[0],r[e++]=t[1],r[e++]=t[2],r}function p(t,e){var r=new F.VertexFormat({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),a=t.ellipsoid,i=x(it.CorridorGeometryLibrary.computePositions(t),r,a),o=t.height,n=t.extrudedHeight,s=i.attributes,l=i.indices,d=s.position.values,u=d.length,m=new Float64Array(6*u),r=new Float64Array(u);r.set(d);i=new Float64Array(4*u),i=P(d=V.PolygonPipeline.scaleToGeodeticHeight(d,o,a),0,i);i=P(r=V.PolygonPipeline.scaleToGeodeticHeight(r,n,a),2*u,i),m.set(d),m.set(r,u),m.set(i,2*u),s.position.values=m;var s=function(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;var r,a=t.position.values;(e.normal||e.bitangent)&&(r=t.normal.values,l=t.bitangent.values);var i=t.position.values.length/18,o=3*i,n=2*i,s=2*o;if(e.normal||e.bitangent||e.tangent){for(var l,d=e.normal?new Float32Array(6*o):void 0,u=e.tangent?new Float32Array(6*o):void 0,m=e.bitangent?new Float32Array(6*o):void 0,y=ut,f=mt,c=yt,p=ft,h=L,g=ct,C=s,b=0;b<o;b+=3){var A=C+s,y=rt.Cartesian3.fromArray(a,b,y),f=rt.Cartesian3.fromArray(a,b+o,f),c=rt.Cartesian3.fromArray(a,(b+3)%o,c);f=rt.Cartesian3.subtract(f,y,f),c=rt.Cartesian3.subtract(c,y,c),p=rt.Cartesian3.normalize(rt.Cartesian3.cross(f,c,p),p),e.normal&&(it.CorridorGeometryLibrary.addAttribute(d,p,A),it.CorridorGeometryLibrary.addAttribute(d,p,A+3),it.CorridorGeometryLibrary.addAttribute(d,p,C),it.CorridorGeometryLibrary.addAttribute(d,p,C+3)),(e.tangent||e.bitangent)&&(g=rt.Cartesian3.fromArray(r,b,g),e.bitangent&&(it.CorridorGeometryLibrary.addAttribute(m,g,A),it.CorridorGeometryLibrary.addAttribute(m,g,A+3),it.CorridorGeometryLibrary.addAttribute(m,g,C),it.CorridorGeometryLibrary.addAttribute(m,g,C+3)),e.tangent&&(h=rt.Cartesian3.normalize(rt.Cartesian3.cross(g,p,h),h),it.CorridorGeometryLibrary.addAttribute(u,h,A),it.CorridorGeometryLibrary.addAttribute(u,h,A+3),it.CorridorGeometryLibrary.addAttribute(u,h,C),it.CorridorGeometryLibrary.addAttribute(u,h,C+3))),C+=6}if(e.normal){for(d.set(r),b=0;b<o;b+=3)d[b+o]=-r[b],d[b+o+1]=-r[b+1],d[b+o+2]=-r[b+2];t.normal.values=d}else t.normal=void 0;e.bitangent?(m.set(l),m.set(l,o),t.bitangent.values=m):t.bitangent=void 0,e.tangent&&(l=t.tangent.values,u.set(l),u.set(l,o),t.tangent.values=u)}if(e.st){var v=t.st.values,_=new Float32Array(6*n);_.set(v),_.set(v,n);for(var w=2*n,T=0;T<2;T++){for(_[w++]=v[0],_[w++]=v[1],b=2;b<n;b+=2){var G=v[b],E=v[b+1];_[w++]=G,_[w++]=E,_[w++]=G,_[w++]=E}_[w++]=v[0],_[w++]=v[1]}t.st.values=_}return t}(s,e),y=u/3;if(t.shadowVolume){for(var f=s.normal.values,u=f.length,i=new Float32Array(6*u),c=0;c<u;c++)f[c]=-f[c];i.set(f,u),i=P(f,4*u,i),s.extrudeDirection=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:i}),e.normal||(s.normal=void 0)}ot.defined(t.offsetAttribute)&&(e=new Uint8Array(6*y),e=t.offsetAttribute===E.GeometryOffsetAttribute.TOP?(e=E.arrayFill(e,1,0,y),E.arrayFill(e,1,2*y,4*y)):(t=t.offsetAttribute===E.GeometryOffsetAttribute.NONE?0:1,E.arrayFill(e,t)),s.applyOffset=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e}));var p=l.length,h=y+y,g=lt.IndexDatatype.createTypedArray(m.length/3,2*p+3*h);g.set(l);var C,b,A,v,_=p;for(c=0;c<p;c+=3){var w=l[c],T=l[c+1],G=l[c+2];g[_++]=G+y,g[_++]=T+y,g[_++]=w+y}for(c=0;c<h;c+=2)A=(C=c+h)+1,v=(b=C+h)+1,g[_++]=C,g[_++]=b,g[_++]=A,g[_++]=A,g[_++]=b,g[_++]=v;return{attributes:s,indices:g}}var h=new rt.Cartesian3,g=new rt.Cartesian3,C=new rt.Cartographic;function b(t,e,r,a,i,o){var n=rt.Cartesian3.subtract(e,t,h);rt.Cartesian3.normalize(n,n);var s=r.geodeticSurfaceNormal(t,g),l=rt.Cartesian3.cross(n,s,h);rt.Cartesian3.multiplyByScalar(l,a,l);var d=i.latitude,u=i.longitude,e=o.latitude,n=o.longitude;rt.Cartesian3.add(t,l,g),r.cartesianToCartographic(g,C);s=C.latitude,a=C.longitude,d=Math.min(d,s),u=Math.min(u,a),e=Math.max(e,s),n=Math.max(n,a);rt.Cartesian3.subtract(t,l,g),r.cartesianToCartographic(g,C),s=C.latitude,a=C.longitude,d=Math.min(d,s),u=Math.min(u,a),e=Math.max(e,s),n=Math.max(n,a),i.latitude=d,i.longitude=u,o.latitude=e,o.longitude=n}var A=new rt.Cartesian3,v=new rt.Cartesian3,_=new rt.Cartographic,w=new rt.Cartographic;function T(t,e,r,a,i){t=c(t,e);var o=y.arrayRemoveDuplicates(t,rt.Cartesian3.equalsEpsilon),n=o.length;if(n<2||r<=0)return new rt.Rectangle;var s,l,d=.5*r;_.latitude=Number.POSITIVE_INFINITY,_.longitude=Number.POSITIVE_INFINITY,w.latitude=Number.NEGATIVE_INFINITY,w.longitude=Number.NEGATIVE_INFINITY,a===f.CornerType.ROUNDED&&(m=o[0],rt.Cartesian3.subtract(m,o[1],A),rt.Cartesian3.normalize(A,A),rt.Cartesian3.multiplyByScalar(A,d,A),rt.Cartesian3.add(m,A,v),e.cartesianToCartographic(v,C),s=C.latitude,l=C.longitude,_.latitude=Math.min(_.latitude,s),_.longitude=Math.min(_.longitude,l),w.latitude=Math.max(w.latitude,s),w.longitude=Math.max(w.longitude,l));for(var u=0;u<n-1;++u)b(o[u],o[u+1],e,d,_,w);var m=o[n-1];rt.Cartesian3.subtract(m,o[n-2],A),rt.Cartesian3.normalize(A,A),rt.Cartesian3.multiplyByScalar(A,d,A),rt.Cartesian3.add(m,A,v),b(m,v,e,d,_,w),a===f.CornerType.ROUNDED&&(e.cartesianToCartographic(v,C),s=C.latitude,l=C.longitude,_.latitude=Math.min(_.latitude,s),_.longitude=Math.min(_.longitude,l),w.latitude=Math.max(w.latitude,s),w.longitude=Math.max(w.longitude,l));i=ot.defined(i)?i:new rt.Rectangle;return i.north=w.latitude,i.south=_.latitude,i.east=w.longitude,i.west=_.longitude,i}function G(t){var e=(t=ot.defaultValue(t,ot.defaultValue.EMPTY_OBJECT)).positions,r=t.width,a=ot.defaultValue(t.height,0),i=ot.defaultValue(t.extrudedHeight,a);this._positions=e,this._ellipsoid=rt.Ellipsoid.clone(ot.defaultValue(t.ellipsoid,rt.Ellipsoid.WGS84)),this._vertexFormat=F.VertexFormat.clone(ot.defaultValue(t.vertexFormat,F.VertexFormat.DEFAULT)),this._width=r,this._height=Math.max(a,i),this._extrudedHeight=Math.min(a,i),this._cornerType=ot.defaultValue(t.cornerType,f.CornerType.ROUNDED),this._granularity=ot.defaultValue(t.granularity,dt.CesiumMath.RADIANS_PER_DEGREE),this._shadowVolume=ot.defaultValue(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*rt.Cartesian3.packedLength+rt.Ellipsoid.packedLength+F.VertexFormat.packedLength+7}G.pack=function(t,e,r){r=ot.defaultValue(r,0);var a=t._positions,i=a.length;e[r++]=i;for(var o=0;o<i;++o,r+=rt.Cartesian3.packedLength)rt.Cartesian3.pack(a[o],e,r);return rt.Ellipsoid.pack(t._ellipsoid,e,r),r+=rt.Ellipsoid.packedLength,F.VertexFormat.pack(t._vertexFormat,e,r),r+=F.VertexFormat.packedLength,e[r++]=t._width,e[r++]=t._height,e[r++]=t._extrudedHeight,e[r++]=t._cornerType,e[r++]=t._granularity,e[r++]=t._shadowVolume?1:0,e[r]=ot.defaultValue(t._offsetAttribute,-1),e};var N=rt.Ellipsoid.clone(rt.Ellipsoid.UNIT_SPHERE),D=new F.VertexFormat,M={positions:void 0,ellipsoid:N,vertexFormat:D,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};return G.unpack=function(t,e,r){e=ot.defaultValue(e,0);for(var a=t[e++],i=new Array(a),o=0;o<a;++o,e+=rt.Cartesian3.packedLength)i[o]=rt.Cartesian3.unpack(t,e);var n=rt.Ellipsoid.unpack(t,e,N);e+=rt.Ellipsoid.packedLength;var s=F.VertexFormat.unpack(t,e,D);e+=F.VertexFormat.packedLength;var l=t[e++],d=t[e++],u=t[e++],m=t[e++],y=t[e++],f=1===t[e++],c=t[e];return ot.defined(r)?(r._positions=i,r._ellipsoid=rt.Ellipsoid.clone(n,r._ellipsoid),r._vertexFormat=F.VertexFormat.clone(s,r._vertexFormat),r._width=l,r._height=d,r._extrudedHeight=u,r._cornerType=m,r._granularity=y,r._shadowVolume=f,r._offsetAttribute=-1===c?void 0:c,r):(M.positions=i,M.width=l,M.height=d,M.extrudedHeight=u,M.cornerType=m,M.granularity=y,M.shadowVolume=f,M.offsetAttribute=-1===c?void 0:c,new G(M))},G.computeRectangle=function(t,e){var r=(t=ot.defaultValue(t,ot.defaultValue.EMPTY_OBJECT)).positions,a=t.width;return T(r,ot.defaultValue(t.ellipsoid,rt.Ellipsoid.WGS84),a,ot.defaultValue(t.cornerType,f.CornerType.ROUNDED),e)},G.createGeometry=function(t){var e=t._positions,r=t._width,a=t._ellipsoid,e=c(e,a),i=y.arrayRemoveDuplicates(e,rt.Cartesian3.equalsEpsilon);if(!(i.length<2||r<=0)){var o,n=t._height,s=t._extrudedHeight,l=!dt.CesiumMath.equalsEpsilon(n,s,0,dt.CesiumMath.EPSILON2),e=t._vertexFormat,r={ellipsoid:a,positions:i,width:r,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!0};l?(r.height=n,r.extrudedHeight=s,r.shadowVolume=t._shadowVolume,r.offsetAttribute=t._offsetAttribute,o=p(r,e)):((o=x(it.CorridorGeometryLibrary.computePositions(r),e,a)).attributes.position.values=V.PolygonPipeline.scaleToGeodeticHeight(o.attributes.position.values,n,a),ot.defined(t._offsetAttribute)&&(d=t._offsetAttribute===E.GeometryOffsetAttribute.NONE?0:1,u=o.attributes.position.values.length,u=new Uint8Array(u/3),E.arrayFill(u,d),o.attributes.applyOffset=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})));var d=o.attributes,u=m.BoundingSphere.fromVertices(d.position.values,void 0,3);return e.position||(o.attributes.position.values=void 0),new nt.Geometry({attributes:d,indices:o.indices,primitiveType:nt.PrimitiveType.TRIANGLES,boundingSphere:u,offsetAttribute:t._offsetAttribute})}},G.createShadowVolume=function(t,e,r){var a=t._granularity,i=t._ellipsoid,e=e(a,i),r=r(a,i);return new G({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:i,granularity:a,extrudedHeight:e,height:r,vertexFormat:F.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(G.prototype,{rectangle:{get:function(){return ot.defined(this._rectangle)||(this._rectangle=T(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}}),function(t,e){return(t=ot.defined(e)?G.unpack(t,e):t)._ellipsoid=rt.Ellipsoid.clone(t._ellipsoid),G.createGeometry(t)}}); | ||
define(["./GeometryOffsetAttribute-ff1e192c","./arrayRemoveDuplicates-bb548aa3","./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./PolylineVolumeGeometryLibrary-4af6d4dc","./CorridorGeometryLibrary-df5b99e3","./when-229515d6","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b","./PolygonPipeline-5582b1ec","./VertexFormat-565d6a6c","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-b27cd2f7","./AxisAlignedBoundingBox-1feb0c48","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./PolylinePipeline-a3ba6f24","./EllipsoidGeodesic-43ba18de","./EllipsoidRhumbLine-afd6cd20"],(function(t,e,r,a,i,o,n,s,l,d,u,m,f,y,p,c,g,h,b,C,v,A,_){"use strict";var w=new a.Cartesian3,T=new a.Cartesian3,G=new a.Cartesian3,E=new a.Cartesian3,V=new a.Cartesian3,x=new a.Cartesian3,F=new a.Cartesian3,L=new a.Cartesian3;function P(t,e){for(var r=0;r<t.length;r++)t[r]=e.scaleToGeodeticSurface(t[r],t[r]);return t}function N(t,e,r,i,o,n){var l=t.normals,d=t.tangents,u=t.bitangents,m=a.Cartesian3.normalize(a.Cartesian3.cross(r,e,F),F);n.normal&&s.CorridorGeometryLibrary.addAttribute(l,e,i,o),n.tangent&&s.CorridorGeometryLibrary.addAttribute(d,m,i,o),n.bitangent&&s.CorridorGeometryLibrary.addAttribute(u,r,i,o)}function D(t,e,r){var i,n,f,y=t.positions,p=t.corners,c=t.endPositions,g=t.lefts,h=t.normals,b=new u.GeometryAttributes,C=0,v=0,A=0;for(n=0;n<y.length;n+=2)C+=f=y[n].length-3,A+=2*f,v+=y[n+1].length-3;for(C+=3,v+=3,n=0;n<p.length;n++){i=p[n];var _=p[n].leftPositions;l.defined(_)?(C+=f=_.length,A+=f):(v+=f=p[n].rightPositions.length,A+=f)}var V,P=l.defined(c);P&&(C+=V=c[0].length-3,v+=V,A+=6*(V/=3));var D,M,O,I,S,R,k=C+v,H=new Float64Array(k),z={normals:e.normal?new Float32Array(k):void 0,tangents:e.tangent?new Float32Array(k):void 0,bitangents:e.bitangent?new Float32Array(k):void 0},B=0,U=k-1,Y=w,W=T,q=V/2,J=m.IndexDatatype.createTypedArray(k/3,A),j=0;if(P){R=G,S=E;var K=c[0];for(Y=a.Cartesian3.fromArray(h,0,Y),W=a.Cartesian3.fromArray(g,0,W),n=0;n<q;n++)R=a.Cartesian3.fromArray(K,3*(q-1-n),R),S=a.Cartesian3.fromArray(K,3*(q+n),S),s.CorridorGeometryLibrary.addAttribute(H,S,B),s.CorridorGeometryLibrary.addAttribute(H,R,void 0,U),N(z,Y,W,B,U,e),I=(M=B/3)+1,O=(D=(U-2)/3)-1,J[j++]=D,J[j++]=M,J[j++]=O,J[j++]=O,J[j++]=M,J[j++]=I,B+=3,U-=3}var Q,X,Z=0,$=0,tt=y[Z++],et=y[Z++];for(H.set(tt,B),H.set(et,U-et.length+1),W=a.Cartesian3.fromArray(g,$,W),f=et.length-3,n=0;n<f;n+=3)Q=r.geodeticSurfaceNormal(a.Cartesian3.fromArray(tt,n,F),F),X=r.geodeticSurfaceNormal(a.Cartesian3.fromArray(et,f-n,L),L),N(z,Y=a.Cartesian3.normalize(a.Cartesian3.add(Q,X,Y),Y),W,B,U,e),I=(M=B/3)+1,O=(D=(U-2)/3)-1,J[j++]=D,J[j++]=M,J[j++]=O,J[j++]=O,J[j++]=M,J[j++]=I,B+=3,U-=3;for(Q=r.geodeticSurfaceNormal(a.Cartesian3.fromArray(tt,f,F),F),X=r.geodeticSurfaceNormal(a.Cartesian3.fromArray(et,f,L),L),Y=a.Cartesian3.normalize(a.Cartesian3.add(Q,X,Y),Y),$+=3,n=0;n<p.length;n++){var rt,at,it,ot=(i=p[n]).leftPositions,nt=i.rightPositions,st=x,lt=G,dt=E;if(Y=a.Cartesian3.fromArray(h,$,Y),l.defined(ot)){for(N(z,Y,W,void 0,U,e),U-=3,at=I,it=O,rt=0;rt<ot.length/3;rt++)st=a.Cartesian3.fromArray(ot,3*rt,st),J[j++]=at,J[j++]=it-rt-1,J[j++]=it-rt,s.CorridorGeometryLibrary.addAttribute(H,st,void 0,U),lt=a.Cartesian3.fromArray(H,3*(it-rt-1),lt),dt=a.Cartesian3.fromArray(H,3*at,dt),N(z,Y,W=a.Cartesian3.normalize(a.Cartesian3.subtract(lt,dt,W),W),void 0,U,e),U-=3;st=a.Cartesian3.fromArray(H,3*at,st),lt=a.Cartesian3.subtract(a.Cartesian3.fromArray(H,3*it,lt),st,lt),dt=a.Cartesian3.subtract(a.Cartesian3.fromArray(H,3*(it-rt),dt),st,dt),N(z,Y,W=a.Cartesian3.normalize(a.Cartesian3.add(lt,dt,W),W),B,void 0,e),B+=3}else{for(N(z,Y,W,B,void 0,e),B+=3,at=O,it=I,rt=0;rt<nt.length/3;rt++)st=a.Cartesian3.fromArray(nt,3*rt,st),J[j++]=at,J[j++]=it+rt,J[j++]=it+rt+1,s.CorridorGeometryLibrary.addAttribute(H,st,B),lt=a.Cartesian3.fromArray(H,3*at,lt),dt=a.Cartesian3.fromArray(H,3*(it+rt),dt),N(z,Y,W=a.Cartesian3.normalize(a.Cartesian3.subtract(lt,dt,W),W),B,void 0,e),B+=3;st=a.Cartesian3.fromArray(H,3*at,st),lt=a.Cartesian3.subtract(a.Cartesian3.fromArray(H,3*(it+rt),lt),st,lt),dt=a.Cartesian3.subtract(a.Cartesian3.fromArray(H,3*it,dt),st,dt),N(z,Y,W=a.Cartesian3.normalize(a.Cartesian3.negate(a.Cartesian3.add(dt,lt,W),W),W),void 0,U,e),U-=3}for(tt=y[Z++],et=y[Z++],tt.splice(0,3),et.splice(et.length-3,3),H.set(tt,B),H.set(et,U-et.length+1),f=et.length-3,$+=3,W=a.Cartesian3.fromArray(g,$,W),rt=0;rt<et.length;rt+=3)Q=r.geodeticSurfaceNormal(a.Cartesian3.fromArray(tt,rt,F),F),X=r.geodeticSurfaceNormal(a.Cartesian3.fromArray(et,f-rt,L),L),N(z,Y=a.Cartesian3.normalize(a.Cartesian3.add(Q,X,Y),Y),W,B,U,e),M=(I=B/3)-1,D=(O=(U-2)/3)+1,J[j++]=D,J[j++]=M,J[j++]=O,J[j++]=O,J[j++]=M,J[j++]=I,B+=3,U-=3;B-=3,U+=3}if(N(z,Y=a.Cartesian3.fromArray(h,h.length-3,Y),W,B,U,e),P){B+=3,U-=3,R=G,S=E;var ut=c[1];for(n=0;n<q;n++)R=a.Cartesian3.fromArray(ut,3*(V-n-1),R),S=a.Cartesian3.fromArray(ut,3*n,S),s.CorridorGeometryLibrary.addAttribute(H,R,void 0,U),s.CorridorGeometryLibrary.addAttribute(H,S,B),N(z,Y,W,B,U,e),M=(I=B/3)-1,D=(O=(U-2)/3)+1,J[j++]=D,J[j++]=M,J[j++]=O,J[j++]=O,J[j++]=M,J[j++]=I,B+=3,U-=3}if(b.position=new d.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H}),e.st){var mt,ft,yt=new Float32Array(k/3*2),pt=0;if(P){C/=3,v/=3;var ct,gt=Math.PI/(V+1);ft=1/(C-V+1),mt=1/(v-V+1);var ht=V/2;for(n=ht+1;n<V+1;n++)ct=o.CesiumMath.PI_OVER_TWO+gt*n,yt[pt++]=mt*(1+Math.cos(ct)),yt[pt++]=.5*(1+Math.sin(ct));for(n=1;n<v-V+1;n++)yt[pt++]=n*mt,yt[pt++]=0;for(n=V;n>ht;n--)ct=o.CesiumMath.PI_OVER_TWO-n*gt,yt[pt++]=1-mt*(1+Math.cos(ct)),yt[pt++]=.5*(1+Math.sin(ct));for(n=ht;n>0;n--)ct=o.CesiumMath.PI_OVER_TWO-gt*n,yt[pt++]=1-ft*(1+Math.cos(ct)),yt[pt++]=.5*(1+Math.sin(ct));for(n=C-V;n>0;n--)yt[pt++]=n*ft,yt[pt++]=1;for(n=1;n<ht+1;n++)ct=o.CesiumMath.PI_OVER_TWO+gt*n,yt[pt++]=ft*(1+Math.cos(ct)),yt[pt++]=.5*(1+Math.sin(ct))}else{for(ft=1/((C/=3)-1),mt=1/((v/=3)-1),n=0;n<v;n++)yt[pt++]=n*mt,yt[pt++]=0;for(n=C;n>0;n--)yt[pt++]=(n-1)*ft,yt[pt++]=1}b.st=new d.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:yt})}return e.normal&&(b.normal=new d.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z.normals})),e.tangent&&(b.tangent=new d.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z.tangents})),e.bitangent&&(b.bitangent=new d.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z.bitangents})),{attributes:b,indices:J}}function M(t,e,r){r[e++]=t[0],r[e++]=t[1],r[e++]=t[2];for(var a=3;a<t.length;a+=3){var i=t[a],o=t[a+1],n=t[a+2];r[e++]=i,r[e++]=o,r[e++]=n,r[e++]=i,r[e++]=o,r[e++]=n}return r[e++]=t[0],r[e++]=t[1],r[e++]=t[2],r}function O(e,r){var i=new y.VertexFormat({position:r.position,normal:r.normal||r.bitangent||e.shadowVolume,tangent:r.tangent,bitangent:r.normal||r.bitangent,st:r.st}),n=e.ellipsoid,u=D(s.CorridorGeometryLibrary.computePositions(e),i,n),p=e.height,c=e.extrudedHeight,g=u.attributes,h=u.indices,b=g.position.values,C=b.length,v=new Float64Array(6*C),A=new Float64Array(C);A.set(b);var _,F=new Float64Array(4*C);F=M(b=f.PolygonPipeline.scaleToGeodeticHeight(b,p,n),0,F),F=M(A=f.PolygonPipeline.scaleToGeodeticHeight(A,c,n),2*C,F),v.set(b),v.set(A,C),v.set(F,2*C),g.position.values=v,g=function(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;var r,i,o=t.position.values;(e.normal||e.bitangent)&&(r=t.normal.values,i=t.bitangent.values);var n,l=t.position.values.length/18,d=3*l,u=2*l,m=2*d;if(e.normal||e.bitangent||e.tangent){var f=e.normal?new Float32Array(6*d):void 0,y=e.tangent?new Float32Array(6*d):void 0,p=e.bitangent?new Float32Array(6*d):void 0,c=w,g=T,h=G,b=E,C=V,v=x,A=m;for(n=0;n<d;n+=3){var _=A+m;c=a.Cartesian3.fromArray(o,n,c),g=a.Cartesian3.fromArray(o,n+d,g),h=a.Cartesian3.fromArray(o,(n+3)%d,h),g=a.Cartesian3.subtract(g,c,g),h=a.Cartesian3.subtract(h,c,h),b=a.Cartesian3.normalize(a.Cartesian3.cross(g,h,b),b),e.normal&&(s.CorridorGeometryLibrary.addAttribute(f,b,_),s.CorridorGeometryLibrary.addAttribute(f,b,_+3),s.CorridorGeometryLibrary.addAttribute(f,b,A),s.CorridorGeometryLibrary.addAttribute(f,b,A+3)),(e.tangent||e.bitangent)&&(v=a.Cartesian3.fromArray(r,n,v),e.bitangent&&(s.CorridorGeometryLibrary.addAttribute(p,v,_),s.CorridorGeometryLibrary.addAttribute(p,v,_+3),s.CorridorGeometryLibrary.addAttribute(p,v,A),s.CorridorGeometryLibrary.addAttribute(p,v,A+3)),e.tangent&&(C=a.Cartesian3.normalize(a.Cartesian3.cross(v,b,C),C),s.CorridorGeometryLibrary.addAttribute(y,C,_),s.CorridorGeometryLibrary.addAttribute(y,C,_+3),s.CorridorGeometryLibrary.addAttribute(y,C,A),s.CorridorGeometryLibrary.addAttribute(y,C,A+3))),A+=6}if(e.normal){for(f.set(r),n=0;n<d;n+=3)f[n+d]=-r[n],f[n+d+1]=-r[n+1],f[n+d+2]=-r[n+2];t.normal.values=f}else t.normal=void 0;if(e.bitangent?(p.set(i),p.set(i,d),t.bitangent.values=p):t.bitangent=void 0,e.tangent){var F=t.tangent.values;y.set(F),y.set(F,d),t.tangent.values=y}}if(e.st){var L=t.st.values,P=new Float32Array(6*u);P.set(L),P.set(L,u);for(var N=2*u,D=0;D<2;D++){for(P[N++]=L[0],P[N++]=L[1],n=2;n<u;n+=2){var M=L[n],O=L[n+1];P[N++]=M,P[N++]=O,P[N++]=M,P[N++]=O}P[N++]=L[0],P[N++]=L[1]}t.st.values=P}return t}(g,r);var L=C/3;if(e.shadowVolume){var P=g.normal.values;C=P.length;var N=new Float32Array(6*C);for(_=0;_<C;_++)P[_]=-P[_];N.set(P,C),N=M(P,4*C,N),g.extrudeDirection=new d.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:N}),r.normal||(g.normal=void 0)}if(l.defined(e.offsetAttribute)){var O=new Uint8Array(6*L);if(e.offsetAttribute===t.GeometryOffsetAttribute.TOP)O=t.arrayFill(O,1,0,L),O=t.arrayFill(O,1,2*L,4*L);else{var I=e.offsetAttribute===t.GeometryOffsetAttribute.NONE?0:1;O=t.arrayFill(O,I)}g.applyOffset=new d.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})}var S=h.length,R=L+L,k=m.IndexDatatype.createTypedArray(v.length/3,2*S+3*R);k.set(h);var H,z,B,U,Y=S;for(_=0;_<S;_+=3){var W=h[_],q=h[_+1],J=h[_+2];k[Y++]=J+L,k[Y++]=q+L,k[Y++]=W+L}for(_=0;_<R;_+=2)B=(H=_+R)+1,U=(z=H+R)+1,k[Y++]=H,k[Y++]=z,k[Y++]=B,k[Y++]=B,k[Y++]=z,k[Y++]=U;return{attributes:g,indices:k}}var I=new a.Cartesian3,S=new a.Cartesian3,R=new a.Cartographic;function k(t,e,r,i,o,n){var s=a.Cartesian3.subtract(e,t,I);a.Cartesian3.normalize(s,s);var l=r.geodeticSurfaceNormal(t,S),d=a.Cartesian3.cross(s,l,I);a.Cartesian3.multiplyByScalar(d,i,d);var u=o.latitude,m=o.longitude,f=n.latitude,y=n.longitude;a.Cartesian3.add(t,d,S),r.cartesianToCartographic(S,R);var p=R.latitude,c=R.longitude;u=Math.min(u,p),m=Math.min(m,c),f=Math.max(f,p),y=Math.max(y,c),a.Cartesian3.subtract(t,d,S),r.cartesianToCartographic(S,R),p=R.latitude,c=R.longitude,u=Math.min(u,p),m=Math.min(m,c),f=Math.max(f,p),y=Math.max(y,c),o.latitude=u,o.longitude=m,n.latitude=f,n.longitude=y}var H=new a.Cartesian3,z=new a.Cartesian3,B=new a.Cartographic,U=new a.Cartographic;function Y(t,r,i,o,s){t=P(t,r);var d=e.arrayRemoveDuplicates(t,a.Cartesian3.equalsEpsilon),u=d.length;if(u<2||i<=0)return new a.Rectangle;var m,f,y=.5*i;if(B.latitude=Number.POSITIVE_INFINITY,B.longitude=Number.POSITIVE_INFINITY,U.latitude=Number.NEGATIVE_INFINITY,U.longitude=Number.NEGATIVE_INFINITY,o===n.CornerType.ROUNDED){var p=d[0];a.Cartesian3.subtract(p,d[1],H),a.Cartesian3.normalize(H,H),a.Cartesian3.multiplyByScalar(H,y,H),a.Cartesian3.add(p,H,z),r.cartesianToCartographic(z,R),m=R.latitude,f=R.longitude,B.latitude=Math.min(B.latitude,m),B.longitude=Math.min(B.longitude,f),U.latitude=Math.max(U.latitude,m),U.longitude=Math.max(U.longitude,f)}for(var c=0;c<u-1;++c)k(d[c],d[c+1],r,y,B,U);var g=d[u-1];a.Cartesian3.subtract(g,d[u-2],H),a.Cartesian3.normalize(H,H),a.Cartesian3.multiplyByScalar(H,y,H),a.Cartesian3.add(g,H,z),k(g,z,r,y,B,U),o===n.CornerType.ROUNDED&&(r.cartesianToCartographic(z,R),m=R.latitude,f=R.longitude,B.latitude=Math.min(B.latitude,m),B.longitude=Math.min(B.longitude,f),U.latitude=Math.max(U.latitude,m),U.longitude=Math.max(U.longitude,f));var h=l.defined(s)?s:new a.Rectangle;return h.north=U.latitude,h.south=B.latitude,h.east=U.longitude,h.west=B.longitude,h}function W(t){var e=(t=l.defaultValue(t,l.defaultValue.EMPTY_OBJECT)).positions,r=t.width,i=l.defaultValue(t.height,0),s=l.defaultValue(t.extrudedHeight,i);this._positions=e,this._ellipsoid=a.Ellipsoid.clone(l.defaultValue(t.ellipsoid,a.Ellipsoid.WGS84)),this._vertexFormat=y.VertexFormat.clone(l.defaultValue(t.vertexFormat,y.VertexFormat.DEFAULT)),this._width=r,this._height=Math.max(i,s),this._extrudedHeight=Math.min(i,s),this._cornerType=l.defaultValue(t.cornerType,n.CornerType.ROUNDED),this._granularity=l.defaultValue(t.granularity,o.CesiumMath.RADIANS_PER_DEGREE),this._shadowVolume=l.defaultValue(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*a.Cartesian3.packedLength+a.Ellipsoid.packedLength+y.VertexFormat.packedLength+7}W.pack=function(t,e,r){r=l.defaultValue(r,0);var i=t._positions,o=i.length;e[r++]=o;for(var n=0;n<o;++n,r+=a.Cartesian3.packedLength)a.Cartesian3.pack(i[n],e,r);return a.Ellipsoid.pack(t._ellipsoid,e,r),r+=a.Ellipsoid.packedLength,y.VertexFormat.pack(t._vertexFormat,e,r),r+=y.VertexFormat.packedLength,e[r++]=t._width,e[r++]=t._height,e[r++]=t._extrudedHeight,e[r++]=t._cornerType,e[r++]=t._granularity,e[r++]=t._shadowVolume?1:0,e[r]=l.defaultValue(t._offsetAttribute,-1),e};var q=a.Ellipsoid.clone(a.Ellipsoid.UNIT_SPHERE),J=new y.VertexFormat,j={positions:void 0,ellipsoid:q,vertexFormat:J,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};return W.unpack=function(t,e,r){e=l.defaultValue(e,0);for(var i=t[e++],o=new Array(i),n=0;n<i;++n,e+=a.Cartesian3.packedLength)o[n]=a.Cartesian3.unpack(t,e);var s=a.Ellipsoid.unpack(t,e,q);e+=a.Ellipsoid.packedLength;var d=y.VertexFormat.unpack(t,e,J);e+=y.VertexFormat.packedLength;var u=t[e++],m=t[e++],f=t[e++],p=t[e++],c=t[e++],g=1===t[e++],h=t[e];return l.defined(r)?(r._positions=o,r._ellipsoid=a.Ellipsoid.clone(s,r._ellipsoid),r._vertexFormat=y.VertexFormat.clone(d,r._vertexFormat),r._width=u,r._height=m,r._extrudedHeight=f,r._cornerType=p,r._granularity=c,r._shadowVolume=g,r._offsetAttribute=-1===h?void 0:h,r):(j.positions=o,j.width=u,j.height=m,j.extrudedHeight=f,j.cornerType=p,j.granularity=c,j.shadowVolume=g,j.offsetAttribute=-1===h?void 0:h,new W(j))},W.computeRectangle=function(t,e){var r=(t=l.defaultValue(t,l.defaultValue.EMPTY_OBJECT)).positions,i=t.width;return Y(r,l.defaultValue(t.ellipsoid,a.Ellipsoid.WGS84),i,l.defaultValue(t.cornerType,n.CornerType.ROUNDED),e)},W.createGeometry=function(i){var n=i._positions,u=i._width,m=i._ellipsoid;n=P(n,m);var y=e.arrayRemoveDuplicates(n,a.Cartesian3.equalsEpsilon);if(!(y.length<2||u<=0)){var p,c=i._height,g=i._extrudedHeight,h=!o.CesiumMath.equalsEpsilon(c,g,0,o.CesiumMath.EPSILON2),b=i._vertexFormat,C={ellipsoid:m,positions:y,width:u,cornerType:i._cornerType,granularity:i._granularity,saveAttributes:!0};if(h)C.height=c,C.extrudedHeight=g,C.shadowVolume=i._shadowVolume,C.offsetAttribute=i._offsetAttribute,p=O(C,b);else if((p=D(s.CorridorGeometryLibrary.computePositions(C),b,m)).attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(p.attributes.position.values,c,m),l.defined(i._offsetAttribute)){var v=i._offsetAttribute===t.GeometryOffsetAttribute.NONE?0:1,A=p.attributes.position.values.length,_=new Uint8Array(A/3);t.arrayFill(_,v),p.attributes.applyOffset=new d.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}var w=p.attributes,T=r.BoundingSphere.fromVertices(w.position.values,void 0,3);return b.position||(p.attributes.position.values=void 0),new d.Geometry({attributes:w,indices:p.indices,primitiveType:d.PrimitiveType.TRIANGLES,boundingSphere:T,offsetAttribute:i._offsetAttribute})}},W.createShadowVolume=function(t,e,r){var a=t._granularity,i=t._ellipsoid,o=e(a,i),n=r(a,i);return new W({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:i,granularity:a,extrudedHeight:o,height:n,vertexFormat:y.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(W.prototype,{rectangle:{get:function(){return l.defined(this._rectangle)||(this._rectangle=Y(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}}),function(t,e){return l.defined(e)&&(t=W.unpack(t,e)),t._ellipsoid=a.Ellipsoid.clone(t._ellipsoid),W.createGeometry(t)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./GeometryOffsetAttribute-964ec9ef","./arrayRemoveDuplicates-47b233f1","./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./ComponentDatatype-6c2e43c1","./PolylineVolumeGeometryLibrary-247a98de","./CorridorGeometryLibrary-9730e150","./when-7b580518","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce","./Math-87254c13","./PolygonPipeline-5dc6dac0","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-66f520e3","./AxisAlignedBoundingBox-445c3009","./IntersectionTests-587a744a","./Plane-9d4e3328","./PolylinePipeline-ff2b6881","./EllipsoidGeodesic-bdbae7c8","./EllipsoidRhumbLine-6baec512"],function(A,u,p,B,e,M,R,U,F,Y,q,W,f,v,t,i,r,o,a,n,s,l,d,h){"use strict";var J=new B.Cartesian3,j=new B.Cartesian3,z=new B.Cartesian3;function _(e,t){var i,r=[],o=e.positions,a=e.corners,n=e.endPositions,s=new q.GeometryAttributes,l=0,d=0,u=0;for(L=0;L<o.length;L+=2)l+=i=o[L].length-3,u+=i/3*4,d+=o[L+1].length-3;for(l+=3,d+=3,L=0;L<a.length;L++){var p=a[L],f=a[L].leftPositions;F.defined(f)?l+=i=f.length:d+=i=a[L].rightPositions.length,u+=i/3*2}var h,y=F.defined(n);y&&(l+=h=n[0].length-3,d+=h,u+=4*(h/=3));var c,g,b,m,e=l+d,A=new Float64Array(e),v=0,_=e-1,E=h/2,C=W.IndexDatatype.createTypedArray(e/3,u+4),G=0;if(C[G++]=v/3,C[G++]=(_-2)/3,y){r.push(v/3);for(var T=J,P=j,w=n[0],L=0;L<E;L++)T=B.Cartesian3.fromArray(w,3*(E-1-L),T),P=B.Cartesian3.fromArray(w,3*(E+L),P),U.CorridorGeometryLibrary.addAttribute(A,P,v),U.CorridorGeometryLibrary.addAttribute(A,T,void 0,_),m=(g=v/3)+1,b=(c=(_-2)/3)-1,C[G++]=c,C[G++]=b,C[G++]=g,C[G++]=m,v+=3,_-=3}var D=0,k=o[D++],x=o[D++];for(A.set(k,v),A.set(x,_-x.length+1),i=x.length-3,r.push(v/3,(_-2)/3),L=0;L<i;L+=3)m=(g=v/3)+1,b=(c=(_-2)/3)-1,C[G++]=c,C[G++]=b,C[G++]=g,C[G++]=m,v+=3,_-=3;for(L=0;L<a.length;L++){var N,O,V=(p=a[L]).leftPositions,H=p.rightPositions,I=z;if(F.defined(V)){for(_-=3,O=b,r.push(m),N=0;N<V.length/3;N++)I=B.Cartesian3.fromArray(V,3*N,I),C[G++]=O-N-1,C[G++]=O-N,U.CorridorGeometryLibrary.addAttribute(A,I,void 0,_),_-=3;r.push(O-Math.floor(V.length/6)),t===R.CornerType.BEVELED&&r.push((_-2)/3+1),v+=3}else{for(v+=3,O=m,r.push(b),N=0;N<H.length/3;N++)I=B.Cartesian3.fromArray(H,3*N,I),C[G++]=O+N,C[G++]=O+N+1,U.CorridorGeometryLibrary.addAttribute(A,I,v),v+=3;r.push(O+Math.floor(H.length/6)),t===R.CornerType.BEVELED&&r.push(v/3-1),_-=3}for(k=o[D++],x=o[D++],k.splice(0,3),x.splice(x.length-3,3),A.set(k,v),A.set(x,_-x.length+1),i=x.length-3,N=0;N<x.length;N+=3)g=(m=v/3)-1,C[G++]=c=(b=(_-2)/3)+1,C[G++]=b,C[G++]=g,C[G++]=m,v+=3,_-=3;v-=3,_+=3,r.push(v/3,(_-2)/3)}if(y){v+=3,_-=3,T=J,P=j;var S=n[1];for(L=0;L<E;L++)T=B.Cartesian3.fromArray(S,3*(h-L-1),T),P=B.Cartesian3.fromArray(S,3*L,P),U.CorridorGeometryLibrary.addAttribute(A,T,void 0,_),U.CorridorGeometryLibrary.addAttribute(A,P,v),g=(m=v/3)-1,C[G++]=c=(b=(_-2)/3)+1,C[G++]=b,C[G++]=g,C[G++]=m,v+=3,_-=3;r.push(v/3)}else r.push(v/3,(_-2)/3);return C[G++]=v/3,C[G++]=(_-2)/3,s.position=new Y.GeometryAttribute({componentDatatype:M.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:A}),{attributes:s,indices:C,wallIndices:r}}function y(e){var t=(e=F.defaultValue(e,F.defaultValue.EMPTY_OBJECT)).positions,i=e.width,r=F.defaultValue(e.height,0),o=F.defaultValue(e.extrudedHeight,r);this._positions=t,this._ellipsoid=B.Ellipsoid.clone(F.defaultValue(e.ellipsoid,B.Ellipsoid.WGS84)),this._width=i,this._height=Math.max(r,o),this._extrudedHeight=Math.min(r,o),this._cornerType=F.defaultValue(e.cornerType,R.CornerType.ROUNDED),this._granularity=F.defaultValue(e.granularity,f.CesiumMath.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*B.Cartesian3.packedLength+B.Ellipsoid.packedLength+6}y.pack=function(e,t,i){i=F.defaultValue(i,0);var r=e._positions,o=r.length;t[i++]=o;for(var a=0;a<o;++a,i+=B.Cartesian3.packedLength)B.Cartesian3.pack(r[a],t,i);return B.Ellipsoid.pack(e._ellipsoid,t,i),i+=B.Ellipsoid.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i]=F.defaultValue(e._offsetAttribute,-1),t};var c=B.Ellipsoid.clone(B.Ellipsoid.UNIT_SPHERE),g={positions:void 0,ellipsoid:c,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};return y.unpack=function(e,t,i){t=F.defaultValue(t,0);for(var r=e[t++],o=new Array(r),a=0;a<r;++a,t+=B.Cartesian3.packedLength)o[a]=B.Cartesian3.unpack(e,t);var n=B.Ellipsoid.unpack(e,t,c);t+=B.Ellipsoid.packedLength;var s=e[t++],l=e[t++],d=e[t++],u=e[t++],p=e[t++],f=e[t];return F.defined(i)?(i._positions=o,i._ellipsoid=B.Ellipsoid.clone(n,i._ellipsoid),i._width=s,i._height=l,i._extrudedHeight=d,i._cornerType=u,i._granularity=p,i._offsetAttribute=-1===f?void 0:f,i):(g.positions=o,g.width=s,g.height=l,g.extrudedHeight=d,g.cornerType=u,g.granularity=p,g.offsetAttribute=-1===f?void 0:f,new y(g))},y.createGeometry=function(e){var t=e._positions,i=e._width,r=e._ellipsoid,t=function(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}(t,r),o=u.arrayRemoveDuplicates(t,B.Cartesian3.equalsEpsilon);if(!(o.length<2||i<=0)){var a,n=e._height,s=e._extrudedHeight,t=!f.CesiumMath.equalsEpsilon(n,s,0,f.CesiumMath.EPSILON2),i={ellipsoid:r,positions:o,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1};t?(i.height=n,i.extrudedHeight=s,i.offsetAttribute=e._offsetAttribute,a=function(e){var t=e.ellipsoid,i=(l=_(U.CorridorGeometryLibrary.computePositions(e),e.cornerType)).wallIndices,r=e.height,o=e.extrudedHeight,a=l.attributes,n=l.indices,s=(d=a.position.values).length;(u=new Float64Array(s)).set(d);var l=new Float64Array(2*s),d=v.PolygonPipeline.scaleToGeodeticHeight(d,r,t),u=v.PolygonPipeline.scaleToGeodeticHeight(u,o,t);l.set(d),l.set(u,s),a.position.values=l,s/=3,F.defined(e.offsetAttribute)&&(u=new Uint8Array(2*s),u=e.offsetAttribute===A.GeometryOffsetAttribute.TOP?A.arrayFill(u,1,0,s):(e=e.offsetAttribute===A.GeometryOffsetAttribute.NONE?0:1,A.arrayFill(u,e)),a.applyOffset=new Y.GeometryAttribute({componentDatatype:M.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:u}));var p=n.length,f=W.IndexDatatype.createTypedArray(l.length/3,2*(p+i.length));f.set(n);for(var h,y,c=p,g=0;g<p;g+=2){var b=n[g],m=n[g+1];f[c++]=b+s,f[c++]=m+s}for(g=0;g<i.length;g++)y=(h=i[g])+s,f[c++]=h,f[c++]=y;return{attributes:a,indices:f}}(i)):((a=_(U.CorridorGeometryLibrary.computePositions(i),i.cornerType)).attributes.position.values=v.PolygonPipeline.scaleToGeodeticHeight(a.attributes.position.values,n,r),F.defined(e._offsetAttribute)&&(l=a.attributes.position.values.length,d=new Uint8Array(l/3),l=e._offsetAttribute===A.GeometryOffsetAttribute.NONE?0:1,A.arrayFill(d,l),a.attributes.applyOffset=new Y.GeometryAttribute({componentDatatype:M.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})));var l=a.attributes,d=p.BoundingSphere.fromVertices(l.position.values,void 0,3);return new Y.Geometry({attributes:l,indices:a.indices,primitiveType:Y.PrimitiveType.LINES,boundingSphere:d,offsetAttribute:e._offsetAttribute})}},function(e,t){return(e=F.defined(t)?y.unpack(e,t):e)._ellipsoid=B.Ellipsoid.clone(e._ellipsoid),y.createGeometry(e)}}); | ||
define(["./GeometryOffsetAttribute-ff1e192c","./arrayRemoveDuplicates-bb548aa3","./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./PolylineVolumeGeometryLibrary-4af6d4dc","./CorridorGeometryLibrary-df5b99e3","./when-229515d6","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b","./PolygonPipeline-5582b1ec","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-b27cd2f7","./AxisAlignedBoundingBox-1feb0c48","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./PolylinePipeline-a3ba6f24","./EllipsoidGeodesic-43ba18de","./EllipsoidRhumbLine-afd6cd20"],(function(e,t,i,r,o,a,n,s,l,d,u,p,f,h,y,c,b,g,m,v,A,_){"use strict";var E=new r.Cartesian3,C=new r.Cartesian3,G=new r.Cartesian3;function T(e,t){var i,o,f,h=[],y=e.positions,c=e.corners,b=e.endPositions,g=new u.GeometryAttributes,m=0,v=0,A=0;for(o=0;o<y.length;o+=2)m+=f=y[o].length-3,A+=f/3*4,v+=y[o+1].length-3;for(m+=3,v+=3,o=0;o<c.length;o++){i=c[o];var _=c[o].leftPositions;l.defined(_)?(m+=f=_.length,A+=f/3*2):(v+=f=c[o].rightPositions.length,A+=f/3*2)}var T,P=l.defined(b);P&&(m+=T=b[0].length-3,v+=T,A+=4*(T/=3));var w,L,D,x,k,N,O=m+v,V=new Float64Array(O),H=0,I=O-1,S=T/2,B=p.IndexDatatype.createTypedArray(O/3,A+4),M=0;if(B[M++]=H/3,B[M++]=(I-2)/3,P){h.push(H/3),N=E,k=C;var R=b[0];for(o=0;o<S;o++)N=r.Cartesian3.fromArray(R,3*(S-1-o),N),k=r.Cartesian3.fromArray(R,3*(S+o),k),s.CorridorGeometryLibrary.addAttribute(V,k,H),s.CorridorGeometryLibrary.addAttribute(V,N,void 0,I),x=(L=H/3)+1,D=(w=(I-2)/3)-1,B[M++]=w,B[M++]=D,B[M++]=L,B[M++]=x,H+=3,I-=3}var U=0,F=y[U++],Y=y[U++];for(V.set(F,H),V.set(Y,I-Y.length+1),f=Y.length-3,h.push(H/3,(I-2)/3),o=0;o<f;o+=3)x=(L=H/3)+1,D=(w=(I-2)/3)-1,B[M++]=w,B[M++]=D,B[M++]=L,B[M++]=x,H+=3,I-=3;for(o=0;o<c.length;o++){var q,W,J=(i=c[o]).leftPositions,j=i.rightPositions,z=G;if(l.defined(J)){for(I-=3,W=D,h.push(x),q=0;q<J.length/3;q++)z=r.Cartesian3.fromArray(J,3*q,z),B[M++]=W-q-1,B[M++]=W-q,s.CorridorGeometryLibrary.addAttribute(V,z,void 0,I),I-=3;h.push(W-Math.floor(J.length/6)),t===n.CornerType.BEVELED&&h.push((I-2)/3+1),H+=3}else{for(H+=3,W=x,h.push(D),q=0;q<j.length/3;q++)z=r.Cartesian3.fromArray(j,3*q,z),B[M++]=W+q,B[M++]=W+q+1,s.CorridorGeometryLibrary.addAttribute(V,z,H),H+=3;h.push(W+Math.floor(j.length/6)),t===n.CornerType.BEVELED&&h.push(H/3-1),I-=3}for(F=y[U++],Y=y[U++],F.splice(0,3),Y.splice(Y.length-3,3),V.set(F,H),V.set(Y,I-Y.length+1),f=Y.length-3,q=0;q<Y.length;q+=3)L=(x=H/3)-1,w=(D=(I-2)/3)+1,B[M++]=w,B[M++]=D,B[M++]=L,B[M++]=x,H+=3,I-=3;H-=3,I+=3,h.push(H/3,(I-2)/3)}if(P){H+=3,I-=3,N=E,k=C;var K=b[1];for(o=0;o<S;o++)N=r.Cartesian3.fromArray(K,3*(T-o-1),N),k=r.Cartesian3.fromArray(K,3*o,k),s.CorridorGeometryLibrary.addAttribute(V,N,void 0,I),s.CorridorGeometryLibrary.addAttribute(V,k,H),L=(x=H/3)-1,w=(D=(I-2)/3)+1,B[M++]=w,B[M++]=D,B[M++]=L,B[M++]=x,H+=3,I-=3;h.push(H/3)}else h.push(H/3,(I-2)/3);return B[M++]=H/3,B[M++]=(I-2)/3,g.position=new d.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:V}),{attributes:g,indices:B,wallIndices:h}}function P(e){var t=(e=l.defaultValue(e,l.defaultValue.EMPTY_OBJECT)).positions,i=e.width,o=l.defaultValue(e.height,0),s=l.defaultValue(e.extrudedHeight,o);this._positions=t,this._ellipsoid=r.Ellipsoid.clone(l.defaultValue(e.ellipsoid,r.Ellipsoid.WGS84)),this._width=i,this._height=Math.max(o,s),this._extrudedHeight=Math.min(o,s),this._cornerType=l.defaultValue(e.cornerType,n.CornerType.ROUNDED),this._granularity=l.defaultValue(e.granularity,a.CesiumMath.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*r.Cartesian3.packedLength+r.Ellipsoid.packedLength+6}P.pack=function(e,t,i){i=l.defaultValue(i,0);var o=e._positions,a=o.length;t[i++]=a;for(var n=0;n<a;++n,i+=r.Cartesian3.packedLength)r.Cartesian3.pack(o[n],t,i);return r.Ellipsoid.pack(e._ellipsoid,t,i),i+=r.Ellipsoid.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i]=l.defaultValue(e._offsetAttribute,-1),t};var w=r.Ellipsoid.clone(r.Ellipsoid.UNIT_SPHERE),L={positions:void 0,ellipsoid:w,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};return P.unpack=function(e,t,i){t=l.defaultValue(t,0);for(var o=e[t++],a=new Array(o),n=0;n<o;++n,t+=r.Cartesian3.packedLength)a[n]=r.Cartesian3.unpack(e,t);var s=r.Ellipsoid.unpack(e,t,w);t+=r.Ellipsoid.packedLength;var d=e[t++],u=e[t++],p=e[t++],f=e[t++],h=e[t++],y=e[t];return l.defined(i)?(i._positions=a,i._ellipsoid=r.Ellipsoid.clone(s,i._ellipsoid),i._width=d,i._height=u,i._extrudedHeight=p,i._cornerType=f,i._granularity=h,i._offsetAttribute=-1===y?void 0:y,i):(L.positions=a,L.width=d,L.height=u,L.extrudedHeight=p,L.cornerType=f,L.granularity=h,L.offsetAttribute=-1===y?void 0:y,new P(L))},P.createGeometry=function(o){var n=o._positions,u=o._width,h=o._ellipsoid;n=function(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}(n,h);var y=t.arrayRemoveDuplicates(n,r.Cartesian3.equalsEpsilon);if(!(y.length<2||u<=0)){var c,b=o._height,g=o._extrudedHeight,m=!a.CesiumMath.equalsEpsilon(b,g,0,a.CesiumMath.EPSILON2),v={ellipsoid:h,positions:y,width:u,cornerType:o._cornerType,granularity:o._granularity,saveAttributes:!1};if(m)v.height=b,v.extrudedHeight=g,v.offsetAttribute=o._offsetAttribute,c=function(t){var i=t.ellipsoid,r=T(s.CorridorGeometryLibrary.computePositions(t),t.cornerType),o=r.wallIndices,n=t.height,u=t.extrudedHeight,h=r.attributes,y=r.indices,c=h.position.values,b=c.length,g=new Float64Array(b);g.set(c);var m,v=new Float64Array(2*b);if(c=f.PolygonPipeline.scaleToGeodeticHeight(c,n,i),g=f.PolygonPipeline.scaleToGeodeticHeight(g,u,i),v.set(c),v.set(g,b),h.position.values=v,b/=3,l.defined(t.offsetAttribute)){var A=new Uint8Array(2*b);if(t.offsetAttribute===e.GeometryOffsetAttribute.TOP)A=e.arrayFill(A,1,0,b);else{var _=t.offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;A=e.arrayFill(A,_)}h.applyOffset=new d.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}var E=y.length,C=p.IndexDatatype.createTypedArray(v.length/3,2*(E+o.length));C.set(y);var G,P,w=E;for(m=0;m<E;m+=2){var L=y[m],D=y[m+1];C[w++]=L+b,C[w++]=D+b}for(m=0;m<o.length;m++)P=(G=o[m])+b,C[w++]=G,C[w++]=P;return{attributes:h,indices:C}}(v);else if((c=T(s.CorridorGeometryLibrary.computePositions(v),v.cornerType)).attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(c.attributes.position.values,b,h),l.defined(o._offsetAttribute)){var A=c.attributes.position.values.length,_=new Uint8Array(A/3),E=o._offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;e.arrayFill(_,E),c.attributes.applyOffset=new d.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}var C=c.attributes,G=i.BoundingSphere.fromVertices(C.position.values,void 0,3);return new d.Geometry({attributes:C,indices:c.indices,primitiveType:d.PrimitiveType.LINES,boundingSphere:G,offsetAttribute:o._offsetAttribute})}},function(e,t){return l.defined(t)&&(e=P.unpack(e,t)),e._ellipsoid=r.Ellipsoid.clone(e._ellipsoid),P.createGeometry(e)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./CylinderGeometry-71f983f3","./when-7b580518","./GeometryOffsetAttribute-964ec9ef","./Check-3917d765","./Transforms-70f396e0","./Cartesian2-40b13f31","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./CylinderGeometryLibrary-069ad349","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce","./VertexFormat-8d463a4f"],function(r,n,e,t,a,o,f,i,y,c,d,m,b,u,s,G){"use strict";return function(e,t){return n.defined(t)&&(e=r.CylinderGeometry.unpack(e,t)),r.CylinderGeometry.createGeometry(e)}}); | ||
define(["./CylinderGeometry-4a23db6d","./when-229515d6","./GeometryOffsetAttribute-ff1e192c","./RuntimeError-ffe03243","./Transforms-7cd3197b","./Matrix2-f2da41d4","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./combine-8ce3f24b","./CylinderGeometryLibrary-7b000e1b","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b","./VertexFormat-565d6a6c"],(function(e,t,r,n,a,o,b,i,d,y,f,m,c,u){"use strict";return function(r,n){return t.defined(n)&&(r=e.CylinderGeometry.unpack(r,n)),e.CylinderGeometry.createGeometry(r)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./GeometryOffsetAttribute-964ec9ef","./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./ComponentDatatype-6c2e43c1","./CylinderGeometryLibrary-069ad349","./when-7b580518","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a"],function(c,p,y,e,_,h,A,v,R,G,t,i,r,a){"use strict";var O=new y.Cartesian2;function s(e){var t=(e=A.defaultValue(e,A.defaultValue.EMPTY_OBJECT)).length,i=e.topRadius,r=e.bottomRadius,a=A.defaultValue(e.slices,128),n=Math.max(A.defaultValue(e.numberOfVerticalLines,16),0);this._length=t,this._topRadius=i,this._bottomRadius=r,this._slices=a,this._numberOfVerticalLines=n,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}s.packedLength=6,s.pack=function(e,t,i){return i=A.defaultValue(i,0),t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i++]=e._numberOfVerticalLines,t[i]=A.defaultValue(e._offsetAttribute,-1),t};var f={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};return s.unpack=function(e,t,i){t=A.defaultValue(t,0);var r=e[t++],a=e[t++],n=e[t++],o=e[t++],u=e[t++],t=e[t];return A.defined(i)?(i._length=r,i._topRadius=a,i._bottomRadius=n,i._slices=o,i._numberOfVerticalLines=u,i._offsetAttribute=-1===t?void 0:t,i):(f.length=r,f.topRadius=a,f.bottomRadius=n,f.slices=o,f.numberOfVerticalLines=u,f.offsetAttribute=-1===t?void 0:t,new s(f))},s.createGeometry=function(e){var t=e._length,i=e._topRadius,r=e._bottomRadius,a=e._slices,n=e._numberOfVerticalLines;if(!(t<=0||i<0||r<0||0===i&&0===r)){var o,u,s=2*a,f=h.CylinderGeometryLibrary.computePositions(t,i,r,a,!1),d=2*a;0<n&&(o=Math.min(n,a),u=Math.round(a/o),d+=o);for(var b=G.IndexDatatype.createTypedArray(s,2*d),l=0,m=0;m<a-1;m++)b[l++]=m,b[l++]=m+1,b[l++]=m+a,b[l++]=m+1+a;if(b[l++]=a-1,b[l++]=0,b[l++]=a+a-1,b[l++]=a,0<n)for(m=0;m<a;m+=u)b[l++]=m,b[l++]=m+a;n=new R.GeometryAttributes;n.position=new v.GeometryAttribute({componentDatatype:_.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:f}),O.x=.5*t,O.y=Math.max(r,i);i=new p.BoundingSphere(y.Cartesian3.ZERO,y.Cartesian2.magnitude(O));return A.defined(e._offsetAttribute)&&(t=f.length,f=new Uint8Array(t/3),t=e._offsetAttribute===c.GeometryOffsetAttribute.NONE?0:1,c.arrayFill(f,t),n.applyOffset=new v.GeometryAttribute({componentDatatype:_.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})),new v.Geometry({attributes:n,indices:b,primitiveType:v.PrimitiveType.LINES,boundingSphere:i,offsetAttribute:e._offsetAttribute})}},function(e,t){return A.defined(t)&&(e=s.unpack(e,t)),s.createGeometry(e)}}); | ||
define(["./GeometryOffsetAttribute-ff1e192c","./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./CylinderGeometryLibrary-7b000e1b","./when-229515d6","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b","./combine-8ce3f24b","./WebGLConstants-4e26b85a"],(function(t,e,i,r,a,n,o,u,s,f,d,b){"use strict";var l=new i.Cartesian2;function m(t){var e=(t=o.defaultValue(t,o.defaultValue.EMPTY_OBJECT)).length,i=t.topRadius,r=t.bottomRadius,a=o.defaultValue(t.slices,128),n=Math.max(o.defaultValue(t.numberOfVerticalLines,16),0);this._length=e,this._topRadius=i,this._bottomRadius=r,this._slices=a,this._numberOfVerticalLines=n,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}m.packedLength=6,m.pack=function(t,e,i){return i=o.defaultValue(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=o.defaultValue(t._offsetAttribute,-1),e};var c={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};return m.unpack=function(t,e,i){e=o.defaultValue(e,0);var r=t[e++],a=t[e++],n=t[e++],u=t[e++],s=t[e++],f=t[e];return o.defined(i)?(i._length=r,i._topRadius=a,i._bottomRadius=n,i._slices=u,i._numberOfVerticalLines=s,i._offsetAttribute=-1===f?void 0:f,i):(c.length=r,c.topRadius=a,c.bottomRadius=n,c.slices=u,c.numberOfVerticalLines=s,c.offsetAttribute=-1===f?void 0:f,new m(c))},m.createGeometry=function(r){var d=r._length,b=r._topRadius,m=r._bottomRadius,c=r._slices,p=r._numberOfVerticalLines;if(!(d<=0||b<0||m<0||0===b&&0===m)){var y,_=2*c,h=n.CylinderGeometryLibrary.computePositions(d,b,m,c,!1),v=2*c;if(p>0){var A=Math.min(p,c);y=Math.round(c/A),v+=A}var R,G=f.IndexDatatype.createTypedArray(_,2*v),O=0;for(R=0;R<c-1;R++)G[O++]=R,G[O++]=R+1,G[O++]=R+c,G[O++]=R+1+c;if(G[O++]=c-1,G[O++]=0,G[O++]=c+c-1,G[O++]=c,p>0)for(R=0;R<c;R+=y)G[O++]=R,G[O++]=R+c;var V=new s.GeometryAttributes;V.position=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:h}),l.x=.5*d,l.y=Math.max(m,b);var L=new e.BoundingSphere(i.Cartesian3.ZERO,i.Cartesian2.magnitude(l));if(o.defined(r._offsetAttribute)){d=h.length;var g=new Uint8Array(d/3),C=r._offsetAttribute===t.GeometryOffsetAttribute.NONE?0:1;t.arrayFill(g,C),V.applyOffset=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}return new u.Geometry({attributes:V,indices:G,primitiveType:u.PrimitiveType.LINES,boundingSphere:L,offsetAttribute:r._offsetAttribute})}},function(t,e){return o.defined(e)&&(t=m.unpack(t,e)),m.createGeometry(t)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./Cartesian2-40b13f31","./when-7b580518","./EllipseGeometry-953964d7","./Check-3917d765","./Math-87254c13","./GeometryOffsetAttribute-964ec9ef","./Transforms-70f396e0","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./EllipseGeometryLibrary-e73d797b","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./GeometryInstance-5c9d46a4","./GeometryPipeline-d4d3acd7","./AttributeCompression-56959beb","./EncodedCartesian3-942c4568","./IndexDatatype-b42089ce","./IntersectionTests-587a744a","./Plane-9d4e3328","./VertexFormat-8d463a4f"],function(r,n,a,e,t,i,o,c,s,d,l,b,m,f,p,y,u,G,C,E,A,_){"use strict";return function(e,t){return(e=n.defined(t)?a.EllipseGeometry.unpack(e,t):e)._center=r.Cartesian3.clone(e._center),e._ellipsoid=r.Ellipsoid.clone(e._ellipsoid),a.EllipseGeometry.createGeometry(e)}}); | ||
define(["./Matrix2-f2da41d4","./when-229515d6","./EllipseGeometry-0fca35c1","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./GeometryOffsetAttribute-ff1e192c","./Transforms-7cd3197b","./combine-8ce3f24b","./EllipseGeometryLibrary-69f5ff56","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./GeometryInstance-16601d2a","./GeometryPipeline-5b3fba53","./AttributeCompression-0af3c035","./EncodedCartesian3-d4f305ce","./IndexDatatype-b10faa0b","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./VertexFormat-565d6a6c"],(function(e,t,r,n,a,i,o,s,c,f,b,l,d,m,p,y,u,G,E,C){"use strict";return function(n,a){return t.defined(a)&&(n=r.EllipseGeometry.unpack(n,a)),n._center=e.Cartesian3.clone(n._center),n._ellipsoid=e.Ellipsoid.clone(n._ellipsoid),r.EllipseGeometry.createGeometry(n)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./Cartesian2-40b13f31","./when-7b580518","./EllipseOutlineGeometry-c0f37151","./Check-3917d765","./Math-87254c13","./GeometryOffsetAttribute-964ec9ef","./Transforms-70f396e0","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./EllipseGeometryLibrary-e73d797b","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce"],function(r,n,i,e,t,o,a,c,l,s,f,b,u,d,m){"use strict";return function(e,t){return(e=n.defined(t)?i.EllipseOutlineGeometry.unpack(e,t):e)._center=r.Cartesian3.clone(e._center),e._ellipsoid=r.Ellipsoid.clone(e._ellipsoid),i.EllipseOutlineGeometry.createGeometry(e)}}); | ||
define(["./Matrix2-f2da41d4","./when-229515d6","./EllipseOutlineGeometry-c29842bd","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./GeometryOffsetAttribute-ff1e192c","./Transforms-7cd3197b","./combine-8ce3f24b","./EllipseGeometryLibrary-69f5ff56","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b"],(function(e,t,r,i,n,o,l,a,f,s,b,c,u){"use strict";return function(i,n){return t.defined(n)&&(i=r.EllipseOutlineGeometry.unpack(i,n)),i._center=e.Cartesian3.clone(i._center),i._ellipsoid=e.Ellipsoid.clone(i._ellipsoid),r.EllipseOutlineGeometry.createGeometry(i)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./EllipsoidGeometry-1593408b","./GeometryOffsetAttribute-964ec9ef","./Check-3917d765","./Transforms-70f396e0","./Cartesian2-40b13f31","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce","./VertexFormat-8d463a4f"],function(r,n,e,t,o,a,i,c,f,b,d,m,s,u,y){"use strict";return function(e,t){return r.defined(t)&&(e=n.EllipsoidGeometry.unpack(e,t)),n.EllipsoidGeometry.createGeometry(e)}}); | ||
define(["./when-229515d6","./EllipsoidGeometry-6edeb2a4","./GeometryOffsetAttribute-ff1e192c","./RuntimeError-ffe03243","./Transforms-7cd3197b","./Matrix2-f2da41d4","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./combine-8ce3f24b","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b","./VertexFormat-565d6a6c"],(function(e,t,r,o,n,a,i,f,b,d,m,s,c){"use strict";return function(r,o){return e.defined(o)&&(r=t.EllipsoidGeometry.unpack(r,o)),t.EllipsoidGeometry.createGeometry(r)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./EllipsoidOutlineGeometry-2ecadff9","./GeometryOffsetAttribute-964ec9ef","./Check-3917d765","./Transforms-70f396e0","./Cartesian2-40b13f31","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce"],function(r,n,e,t,i,o,a,f,c,u,b,d,s,m){"use strict";return function(e,t){return r.defined(e.buffer)&&(e=n.EllipsoidOutlineGeometry.unpack(e,t)),n.EllipsoidOutlineGeometry.createGeometry(e)}}); | ||
define(["./when-229515d6","./EllipsoidOutlineGeometry-207e73be","./GeometryOffsetAttribute-ff1e192c","./RuntimeError-ffe03243","./Transforms-7cd3197b","./Matrix2-f2da41d4","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./combine-8ce3f24b","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b"],(function(e,t,r,n,i,o,f,a,b,u,d,m){"use strict";return function(r,n){return e.defined(r.buffer)&&(r=t.EllipsoidOutlineGeometry.unpack(r,n)),t.EllipsoidOutlineGeometry.createGeometry(r)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./FrustumGeometry-b2632be7","./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./Plane-9d4e3328","./VertexFormat-8d463a4f"],function(r,n,e,t,a,o,u,m,c,b,f,s,i,d){"use strict";return function(e,t){return r.defined(t)&&(e=n.FrustumGeometry.unpack(e,t)),n.FrustumGeometry.createGeometry(e)}}); | ||
define(["./when-229515d6","./FrustumGeometry-3d147886","./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./combine-8ce3f24b","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./Plane-0421a8be","./VertexFormat-565d6a6c"],(function(e,t,r,n,o,u,a,m,b,i,s,c){"use strict";return function(r,n){return e.defined(n)&&(r=t.FrustumGeometry.unpack(r,n)),t.FrustumGeometry.createGeometry(r)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./ComponentDatatype-6c2e43c1","./FrustumGeometry-b2632be7","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./Plane-9d4e3328","./VertexFormat-8d463a4f"],function(o,m,s,e,h,d,f,g,t,r,n,a,i,u){"use strict";function c(e){var t,r,n=e.frustum,a=e.orientation,i=e.origin,e=o.defaultValue(e._drawNearPlane,!0);n instanceof d.PerspectiveFrustum?(t=0,r=d.PerspectiveFrustum.packedLength):n instanceof d.OrthographicFrustum&&(t=1,r=d.OrthographicFrustum.packedLength),this._frustumType=t,this._frustum=n.clone(),this._origin=s.Cartesian3.clone(i),this._orientation=m.Quaternion.clone(a),this._drawNearPlane=e,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+r+s.Cartesian3.packedLength+m.Quaternion.packedLength}c.pack=function(e,t,r){r=o.defaultValue(r,0);var n=e._frustumType,a=e._frustum;return 0===(t[r++]=n)?(d.PerspectiveFrustum.pack(a,t,r),r+=d.PerspectiveFrustum.packedLength):(d.OrthographicFrustum.pack(a,t,r),r+=d.OrthographicFrustum.packedLength),s.Cartesian3.pack(e._origin,t,r),r+=s.Cartesian3.packedLength,m.Quaternion.pack(e._orientation,t,r),t[r+=m.Quaternion.packedLength]=e._drawNearPlane?1:0,t};var p=new d.PerspectiveFrustum,_=new d.OrthographicFrustum,k=new m.Quaternion,l=new s.Cartesian3;return c.unpack=function(e,t,r){t=o.defaultValue(t,0);var n,a=e[t++];0===a?(n=d.PerspectiveFrustum.unpack(e,t,p),t+=d.PerspectiveFrustum.packedLength):(n=d.OrthographicFrustum.unpack(e,t,_),t+=d.OrthographicFrustum.packedLength);var i=s.Cartesian3.unpack(e,t,l);t+=s.Cartesian3.packedLength;var u=m.Quaternion.unpack(e,t,k),e=1===e[t+=m.Quaternion.packedLength];if(!o.defined(r))return new c({frustum:n,origin:i,orientation:u,_drawNearPlane:e});t=a===r._frustumType?r._frustum:void 0;return r._frustum=n.clone(t),r._frustumType=a,r._origin=s.Cartesian3.clone(i,r._origin),r._orientation=m.Quaternion.clone(u,r._orientation),r._drawNearPlane=e,r},c.createGeometry=function(e){var t=e._frustumType,r=e._frustum,n=e._origin,a=e._orientation,i=e._drawNearPlane,e=new Float64Array(24);d.FrustumGeometry._computeNearFarPlanes(n,a,t,r,e);for(var u,o,r=new g.GeometryAttributes({position:new f.GeometryAttribute({componentDatatype:h.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e})}),s=i?2:1,c=new Uint16Array(8*(1+s)),p=i?0:1;p<2;++p)c[u=i?8*p:0]=o=4*p,c[u+1]=o+1,c[u+2]=o+1,c[u+3]=o+2,c[u+4]=o+2,c[u+5]=o+3,c[u+6]=o+3,c[u+7]=o;for(p=0;p<2;++p)c[u=8*(s+p)]=o=4*p,c[u+1]=o+4,c[u+2]=o+1,c[u+3]=o+5,c[u+4]=o+2,c[u+5]=o+6,c[u+6]=o+3,c[u+7]=o+7;return new f.Geometry({attributes:r,indices:c,primitiveType:f.PrimitiveType.LINES,boundingSphere:m.BoundingSphere.fromVertices(e)})},function(e,t){return o.defined(t)&&(e=c.unpack(e,t)),c.createGeometry(e)}}); | ||
define(["./when-229515d6","./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./FrustumGeometry-3d147886","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./Plane-0421a8be","./VertexFormat-565d6a6c"],(function(e,t,r,n,a,i,u,o,s,c,p,m){"use strict";function d(n){var a,u,o=n.frustum,s=n.orientation,c=n.origin,p=e.defaultValue(n._drawNearPlane,!0);o instanceof i.PerspectiveFrustum?(a=0,u=i.PerspectiveFrustum.packedLength):o instanceof i.OrthographicFrustum&&(a=1,u=i.OrthographicFrustum.packedLength),this._frustumType=a,this._frustum=o.clone(),this._origin=r.Cartesian3.clone(c),this._orientation=t.Quaternion.clone(s),this._drawNearPlane=p,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+u+r.Cartesian3.packedLength+t.Quaternion.packedLength}d.pack=function(n,a,u){u=e.defaultValue(u,0);var o=n._frustumType,s=n._frustum;return a[u++]=o,0===o?(i.PerspectiveFrustum.pack(s,a,u),u+=i.PerspectiveFrustum.packedLength):(i.OrthographicFrustum.pack(s,a,u),u+=i.OrthographicFrustum.packedLength),r.Cartesian3.pack(n._origin,a,u),u+=r.Cartesian3.packedLength,t.Quaternion.pack(n._orientation,a,u),a[u+=t.Quaternion.packedLength]=n._drawNearPlane?1:0,a};var h=new i.PerspectiveFrustum,f=new i.OrthographicFrustum,g=new t.Quaternion,_=new r.Cartesian3;return d.unpack=function(n,a,u){a=e.defaultValue(a,0);var o,s=n[a++];0===s?(o=i.PerspectiveFrustum.unpack(n,a,h),a+=i.PerspectiveFrustum.packedLength):(o=i.OrthographicFrustum.unpack(n,a,f),a+=i.OrthographicFrustum.packedLength);var c=r.Cartesian3.unpack(n,a,_);a+=r.Cartesian3.packedLength;var p=t.Quaternion.unpack(n,a,g),m=1===n[a+=t.Quaternion.packedLength];if(!e.defined(u))return new d({frustum:o,origin:c,orientation:p,_drawNearPlane:m});var k=s===u._frustumType?u._frustum:void 0;return u._frustum=o.clone(k),u._frustumType=s,u._origin=r.Cartesian3.clone(c,u._origin),u._orientation=t.Quaternion.clone(p,u._orientation),u._drawNearPlane=m,u},d.createGeometry=function(e){var r=e._frustumType,n=e._frustum,s=e._origin,c=e._orientation,p=e._drawNearPlane,m=new Float64Array(24);i.FrustumGeometry._computeNearFarPlanes(s,c,r,n,m);for(var d,h,f=new o.GeometryAttributes({position:new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m})}),g=p?2:1,_=new Uint16Array(8*(g+1)),k=p?0:1;k<2;++k)h=4*k,_[d=p?8*k:0]=h,_[d+1]=h+1,_[d+2]=h+1,_[d+3]=h+2,_[d+4]=h+2,_[d+5]=h+3,_[d+6]=h+3,_[d+7]=h;for(k=0;k<2;++k)h=4*k,_[d=8*(g+k)]=h,_[d+1]=h+4,_[d+2]=h+1,_[d+3]=h+5,_[d+4]=h+2,_[d+5]=h+6,_[d+6]=h+3,_[d+7]=h+7;return new u.Geometry({attributes:f,indices:_,primitiveType:u.PrimitiveType.LINES,boundingSphere:t.BoundingSphere.fromVertices(m)})},function(t,r){return e.defined(r)&&(t=d.unpack(t,r)),d.createGeometry(t)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./PrimitivePipeline-a6e712f7","./createTaskProcessorWorker","./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./GeometryPipeline-d4d3acd7","./AttributeCompression-56959beb","./EncodedCartesian3-942c4568","./IndexDatatype-b42089ce","./IntersectionTests-587a744a","./Plane-9d4e3328","./WebMercatorProjection-bdaffcea"],function(f,u,e,r,t,n,a,o,i,s,c,d,b,m,p,l,y,P,k,C){"use strict";var v={};return e(function(e,r){for(var t=e.subTasks,n=t.length,a=new Array(n),o=0;o<n;o++){var i=t[o],s=i.geometry,c=i.moduleName;f.defined(c)?(c=function(e){var r=v[e];return f.defined(r)||("object"==typeof exports?v[r]=r=require("Workers/"+e):require(["Workers/"+e],function(e){v[r=e]=e})),r}(c),a[o]=c(s,i.offset)):a[o]=s}return f.when.all(a,function(e){return u.PrimitivePipeline.packCreateGeometryResults(e,r)})})}); | ||
define(["./when-229515d6","./PrimitivePipeline-82a942e9","./createTaskProcessorWorker","./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./combine-8ce3f24b","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./GeometryPipeline-5b3fba53","./AttributeCompression-0af3c035","./EncodedCartesian3-d4f305ce","./IndexDatatype-b10faa0b","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./WebMercatorProjection-d69cec15"],(function(e,r,t,n,a,i,o,s,c,f,b,u,d,m,l,p,y,P){"use strict";var v={};function k(r){var t=v[r];return e.defined(t)||("object"==typeof exports?v[t]=t=require("Workers/"+r):require(["Workers/"+r],(function(e){v[t=e]=e}))),t}return t((function(t,n){for(var a=t.subTasks,i=a.length,o=new Array(i),s=0;s<i;s++){var c=a[s],f=c.geometry,b=c.moduleName;if(e.defined(b)){var u=k(b);o[s]=u(f,c.offset)}else o[s]=f}return e.when.all(o,(function(e){return r.PrimitivePipeline.packCreateGeometryResults(e,n)}))}))})); |
@@ -1,1 +0,1 @@ | ||
define(["./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./when-7b580518","./Math-87254c13","./ArcType-1da7fdca","./arrayRemoveDuplicates-47b233f1","./ComponentDatatype-6c2e43c1","./EllipsoidGeodesic-bdbae7c8","./EllipsoidRhumbLine-6baec512","./EncodedCartesian3-942c4568","./GeometryAttribute-6e7c7644","./IntersectionTests-587a744a","./Plane-9d4e3328","./WebMercatorProjection-bdaffcea","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a"],function(Oe,be,e,B,Pe,j,G,ke,M,V,Ae,Le,Y,r,a,t,n,i){"use strict";function s(e){e=B.defaultValue(e,B.defaultValue.EMPTY_OBJECT),this._ellipsoid=B.defaultValue(e.ellipsoid,be.Ellipsoid.WGS84),this._rectangle=B.defaultValue(e.rectangle,be.Rectangle.MAX_VALUE),this._projection=new Oe.GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=B.defaultValue(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=B.defaultValue(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(s.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),s.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},s.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},s.prototype.rectangleToNativeRectangle=function(e,a){var t=Pe.CesiumMath.toDegrees(e.west),n=Pe.CesiumMath.toDegrees(e.south),i=Pe.CesiumMath.toDegrees(e.east),e=Pe.CesiumMath.toDegrees(e.north);return B.defined(a)?(a.west=t,a.south=n,a.east=i,a.north=e,a):new be.Rectangle(t,n,i,e)},s.prototype.tileXYToNativeRectangle=function(e,a,t,n){n=this.tileXYToRectangle(e,a,t,n);return n.west=Pe.CesiumMath.toDegrees(n.west),n.south=Pe.CesiumMath.toDegrees(n.south),n.east=Pe.CesiumMath.toDegrees(n.east),n.north=Pe.CesiumMath.toDegrees(n.north),n},s.prototype.tileXYToRectangle=function(e,a,t,n){var i=this._rectangle,r=this.getNumberOfXTilesAtLevel(t),s=this.getNumberOfYTilesAtLevel(t),t=i.width/r,r=e*t+i.west,e=(e+1)*t+i.west,t=i.height/s,s=i.north-a*t,t=i.north-(a+1)*t;return(n=!B.defined(n)?new be.Rectangle(r,t,e,s):n).west=r,n.south=t,n.east=e,n.north=s,n},s.prototype.positionToTileXY=function(e,a,t){var n=this._rectangle;if(be.Rectangle.contains(n,e)){var i=this.getNumberOfXTilesAtLevel(a),r=this.getNumberOfYTilesAtLevel(a),s=n.width/i,o=n.height/r,a=e.longitude;n.east<n.west&&(a+=Pe.CesiumMath.TWO_PI);s=(a-n.west)/s|0;i<=s&&(s=i-1);o=(n.north-e.latitude)/o|0;return(r<=o&&(o=r-1),B.defined(t))?(t.x=s,t.y=o,t):new be.Cartesian2(s,o)}};var o=new be.Cartesian3,l=new be.Cartesian3,u=new be.Cartographic,c=new be.Cartesian3,C=new be.Cartesian3,p=new Oe.BoundingSphere,d=new s,h=[new be.Cartographic,new be.Cartographic,new be.Cartographic,new be.Cartographic],g=new be.Cartesian2,Se={};function f(e){be.Cartographic.fromRadians(e.east,e.north,0,h[0]),be.Cartographic.fromRadians(e.west,e.north,0,h[1]),be.Cartographic.fromRadians(e.east,e.south,0,h[2]),be.Cartographic.fromRadians(e.west,e.south,0,h[3]);for(var a=0,t=0,n=0,i=0,r=Se._terrainHeightsMaxLevel,s=0;s<=r;++s){for(var o=!1,l=0;l<4;++l)if(d.positionToTileXY(h[l],s,g),0===l)n=g.x,i=g.y;else if(n!==g.x||i!==g.y){o=!0;break}if(o)break;a=n,t=i}if(0!==s)return{x:a,y:t,level:r<s?r:s-1}}Se.initialize=function(){var e=Se._initPromise;return B.defined(e)?e:(e=Oe.Resource.fetchJson(Oe.buildModuleUrl("Assets/approximateTerrainHeights.json")).then(function(e){Se._terrainHeights=e}),Se._initPromise=e)},Se.getMinimumMaximumHeights=function(e,a){a=B.defaultValue(a,be.Ellipsoid.WGS84);var t=f(e),n=Se._defaultMinTerrainHeight,i=Se._defaultMaxTerrainHeight;return B.defined(t)&&(t=t.level+"-"+t.x+"-"+t.y,t=Se._terrainHeights[t],B.defined(t)&&(n=t[0],i=t[1]),a.cartographicToCartesian(be.Rectangle.northeast(e,u),o),a.cartographicToCartesian(be.Rectangle.southwest(e,u),l),be.Cartesian3.midpoint(l,o,c),a=a.scaleToGeodeticSurface(c,C),n=B.defined(a)?(a=be.Cartesian3.distance(c,a),Math.min(n,-a)):Se._defaultMinTerrainHeight),{minimumTerrainHeight:n=Math.max(Se._defaultMinTerrainHeight,n),maximumTerrainHeight:i}},Se.getBoundingSphere=function(e,a){a=B.defaultValue(a,be.Ellipsoid.WGS84);var t=f(e),n=Se._defaultMaxTerrainHeight;B.defined(t)&&(i=t.level+"-"+t.x+"-"+t.y,i=Se._terrainHeights[i],B.defined(i)&&(n=i[1]));var i=Oe.BoundingSphere.fromRectangle3D(e,a,0);return Oe.BoundingSphere.fromRectangle3D(e,a,n,p),Oe.BoundingSphere.union(i,p,i)},Se._terrainHeightsMaxLevel=6,Se._defaultMaxTerrainHeight=9e3,Se._defaultMinTerrainHeight=-1e5,Se._terrainHeights=void 0,Se._initPromise=void 0,Object.defineProperties(Se,{initialized:{get:function(){return B.defined(Se._terrainHeights)}}});var F=[Oe.GeographicProjection,a.WebMercatorProjection],m=F.length,Ie=Math.cos(Pe.CesiumMath.toRadians(30)),w=Math.cos(Pe.CesiumMath.toRadians(150)),q=0,X=1e3;function y(e){var a=(e=B.defaultValue(e,B.defaultValue.EMPTY_OBJECT)).positions;this.width=B.defaultValue(e.width,1),this._positions=a,this.granularity=B.defaultValue(e.granularity,9999),this.loop=B.defaultValue(e.loop,!1),this.arcType=B.defaultValue(e.arcType,j.ArcType.GEODESIC),this._ellipsoid=be.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(y.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+be.Ellipsoid.packedLength+1+1}}}),y.setProjectionAndEllipsoid=function(e,a){for(var t=0,n=0;n<m;n++)if(a instanceof F[n]){t=n;break}e._projectionIndex=t,e._ellipsoid=a.ellipsoid};var v=new be.Cartesian3,T=new be.Cartesian3,E=new be.Cartesian3;function W(e,a,t,n,i){var r=Z(n,e,0,v),t=Z(n,e,t,T),a=Z(n,a,0,E),t=xe(t,r,T),r=xe(a,r,E);return be.Cartesian3.cross(r,t,i),be.Cartesian3.normalize(i,i)}var _=new be.Cartographic,O=new be.Cartesian3,b=new be.Cartesian3,P=new be.Cartesian3;function U(e,a,t,n,i,r,s,o,l,u,c){if(0!==i){var C;r===j.ArcType.GEODESIC?C=new M.EllipsoidGeodesic(e,a,s):r===j.ArcType.RHUMB&&(C=new V.EllipsoidRhumbLine(e,a,s));r=C.surfaceDistance;if(!(r<i))for(var p=W(e,a,n,s,P),i=Math.ceil(r/i),d=r/i,h=d,g=i-1,f=o.length,m=0;m<g;m++){var w=C.interpolateUsingSurfaceDistance(h,_),y=Z(s,w,t,O),v=Z(s,w,n,b);be.Cartesian3.pack(p,o,f),be.Cartesian3.pack(y,l,f),be.Cartesian3.pack(v,u,f),c.push(w.latitude),c.push(w.longitude),f+=3,h+=d}}}var k=new be.Cartographic;function Z(e,a,t,n){return be.Cartographic.clone(a,k),k.height=t,be.Cartographic.toCartesian(k,e,n)}function xe(e,a,t){return be.Cartesian3.subtract(e,a,t),be.Cartesian3.normalize(t,t),t}function A(e,a,t,n){return n=xe(e,a,n),n=be.Cartesian3.cross(n,t,n),n=be.Cartesian3.normalize(n,n),n=be.Cartesian3.cross(t,n,n)}y.pack=function(e,a,t){var n=B.defaultValue(t,0),i=e._positions,r=i.length;a[n++]=r;for(var s=0;s<r;++s){var o=i[s];be.Cartesian3.pack(o,a,n),n+=3}return a[n++]=e.granularity,a[n++]=e.loop?1:0,a[n++]=e.arcType,be.Ellipsoid.pack(e._ellipsoid,a,n),n+=be.Ellipsoid.packedLength,a[n++]=e._projectionIndex,a[n++]=e._scene3DOnly?1:0,a},y.unpack=function(e,a,t){for(var n=B.defaultValue(a,0),i=e[n++],r=new Array(i),s=0;s<i;s++)r[s]=be.Cartesian3.unpack(e,n),n+=3;var o=e[n++],l=1===e[n++],u=e[n++],c=be.Ellipsoid.unpack(e,n);n+=be.Ellipsoid.packedLength;var C=e[n++],a=1===e[n++];return(t=!B.defined(t)?new y({positions:r}):t)._positions=r,t.granularity=o,t.loop=l,t.arcType=u,t._ellipsoid=c,t._projectionIndex=C,t._scene3DOnly=a,t};var L=new be.Cartesian3,S=new be.Cartesian3,I=new be.Cartesian3,x=new be.Cartesian3;function J(e,a,t,n,i){t=xe(t,a,x),e=A(e,a,t,L),a=A(n,a,t,S);if(Pe.CesiumMath.equalsEpsilon(be.Cartesian3.dot(e,a),-1,Pe.CesiumMath.EPSILON5))return i=be.Cartesian3.cross(t,e,i),i=be.Cartesian3.normalize(i,i);i=be.Cartesian3.add(a,e,i),i=be.Cartesian3.normalize(i,i);t=be.Cartesian3.cross(t,i,I);return i=be.Cartesian3.dot(a,t)<0?be.Cartesian3.negate(i,i):i}var Q=r.Plane.fromPointNormal(be.Cartesian3.ZERO,be.Cartesian3.UNIT_Y),K=new be.Cartesian3,$=new be.Cartesian3,ee=new be.Cartesian3,ae=new be.Cartesian3,te=new be.Cartesian3,ne=new be.Cartesian3,ie=new be.Cartographic,re=new be.Cartographic,se=new be.Cartographic;y.createGeometry=function(e){var a,t,n,i,r,s=!e._scene3DOnly,o=e.loop,l=e._ellipsoid,u=e.granularity,c=e.arcType,C=new F[e._projectionIndex](l),p=q,d=X,h=e._positions,g=h.length;2===g&&(o=!1);for(var f,m,w,y=new V.EllipsoidRhumbLine(void 0,void 0,l),v=[h[0]],M=0;M<g-1;M++)t=h[M],n=h[M+1],f=Y.IntersectionTests.lineSegmentPlane(t,n,Q,ne),!B.defined(f)||be.Cartesian3.equalsEpsilon(f,t,Pe.CesiumMath.EPSILON7)||be.Cartesian3.equalsEpsilon(f,n,Pe.CesiumMath.EPSILON7)||(e.arcType===j.ArcType.GEODESIC?v.push(be.Cartesian3.clone(f)):e.arcType===j.ArcType.RHUMB&&(w=l.cartesianToCartographic(f,ie).longitude,i=l.cartesianToCartographic(t,ie),r=l.cartesianToCartographic(n,re),y.setEndPoints(i,r),m=y.findIntersectionWithLongitude(w,se),f=l.cartographicToCartesian(m,ne),!B.defined(f)||be.Cartesian3.equalsEpsilon(f,t,Pe.CesiumMath.EPSILON7)||be.Cartesian3.equalsEpsilon(f,n,Pe.CesiumMath.EPSILON7)||v.push(be.Cartesian3.clone(f)))),v.push(n);o&&(t=h[g-1],n=h[0],f=Y.IntersectionTests.lineSegmentPlane(t,n,Q,ne),!B.defined(f)||be.Cartesian3.equalsEpsilon(f,t,Pe.CesiumMath.EPSILON7)||be.Cartesian3.equalsEpsilon(f,n,Pe.CesiumMath.EPSILON7)||(e.arcType===j.ArcType.GEODESIC?v.push(be.Cartesian3.clone(f)):e.arcType===j.ArcType.RHUMB&&(w=l.cartesianToCartographic(f,ie).longitude,i=l.cartesianToCartographic(t,ie),r=l.cartesianToCartographic(n,re),y.setEndPoints(i,r),m=y.findIntersectionWithLongitude(w,se),f=l.cartographicToCartesian(m,ne),!B.defined(f)||be.Cartesian3.equalsEpsilon(f,t,Pe.CesiumMath.EPSILON7)||be.Cartesian3.equalsEpsilon(f,n,Pe.CesiumMath.EPSILON7)||v.push(be.Cartesian3.clone(f)))));var T=v.length,E=new Array(T);for(M=0;M<T;M++){var _=be.Cartographic.fromCartesian(v[M],l);_.height=0,E[M]=_}if(!((T=(E=G.arrayRemoveDuplicates(E,be.Cartographic.equalsEpsilon)).length)<2)){var O=[],b=[],P=[],k=[],A=K,L=$,S=ee,I=ae,x=te,N=E[0],R=E[1];for(A=Z(l,E[T-1],p,A),I=Z(l,R,p,I),L=Z(l,N,p,L),S=Z(l,N,d,S),x=o?J(A,L,S,I,x):W(N,R,d,l,x),be.Cartesian3.pack(x,b,0),be.Cartesian3.pack(L,P,0),be.Cartesian3.pack(S,k,0),O.push(N.latitude),O.push(N.longitude),U(N,R,p,d,u,c,l,b,P,k,O),M=1;M<T-1;++M){var A=be.Cartesian3.clone(L,A),L=be.Cartesian3.clone(I,L),D=E[M];Z(l,D,d,S),Z(l,E[M+1],p,I),J(A,L,S,I,x),a=b.length,be.Cartesian3.pack(x,b,a),be.Cartesian3.pack(L,P,a),be.Cartesian3.pack(S,k,a),O.push(D.latitude),O.push(D.longitude),U(E[M],E[M+1],p,d,u,c,l,b,P,k,O)}var z=E[T-1],H=E[T-2];if(L=Z(l,z,p,L),S=Z(l,z,d,S),x=o?(R=E[0],J(A=Z(l,H,p,A),L,S,I=Z(l,R,p,I),x)):W(H,z,d,l,x),a=b.length,be.Cartesian3.pack(x,b,a),be.Cartesian3.pack(L,P,a),be.Cartesian3.pack(S,k,a),O.push(z.latitude),O.push(z.longitude),o){for(U(z,N,p,d,u,c,l,b,P,k,O),a=b.length,M=0;M<3;++M)b[a+M]=b[M],P[a+M]=P[M],k[a+M]=k[M];O.push(N.latitude),O.push(N.longitude)}return function(e,a,t,n,i,r,s){var o,l,u,c,C,p,d=a._ellipsoid,h=t.length/3-1,g=8*h,f=4*g,m=36*h,w=new(65535<g?Uint32Array:Uint16Array)(m),y=new Float64Array(3*g),v=new Float32Array(f),M=new Float32Array(f),T=new Float32Array(f),E=new Float32Array(f),_=new Float32Array(f);s&&(u=new Float32Array(f),c=new Float32Array(f),C=new Float32Array(f),p=new Float32Array(2*g));var O=r.length/2,b=0,P=He;P.height=0;var k=Be;k.height=0;var A=je,L=Ge;if(s)for(l=0,o=1;o<O;o++)P.latitude=r[l],P.longitude=r[l+1],k.latitude=r[l+2],k.longitude=r[l+3],A=a.project(P,A),L=a.project(k,L),b+=be.Cartesian3.distance(A,L),l+=2;var S=n.length/3;L=be.Cartesian3.unpack(n,0,L);var I,x=0;for(l=3,o=1;o<S;o++)A=be.Cartesian3.clone(L,A),L=be.Cartesian3.unpack(n,l,L),x+=be.Cartesian3.distance(A,L),l+=3;l=3;var N=0,R=0,D=0,z=0,H=!1,B=be.Cartesian3.unpack(t,0,Ye),j=be.Cartesian3.unpack(n,0,Ge),G=be.Cartesian3.unpack(i,0,qe);e&&(_e=be.Cartesian3.unpack(t,t.length-6,Ve),Ne(G,_e,B,j)&&(G=be.Cartesian3.negate(G,G)));var V,Y,F,q,X,W,U,Z=0,J=0,Q=0;for(o=0;o<h;o++){var K=be.Cartesian3.clone(B,Ve),$=be.Cartesian3.clone(j,je),ee=be.Cartesian3.clone(G,Fe);H&&(ee=be.Cartesian3.negate(ee,ee)),B=be.Cartesian3.unpack(t,l,Ye),j=be.Cartesian3.unpack(n,l,Ge),G=be.Cartesian3.unpack(i,l,qe),H=Ne(G,K,B,j),P.latitude=r[N],P.longitude=r[N+1],k.latitude=r[N+2],k.longitude=r[N+3],s&&(Me=function(e,a){var t=Math.abs(e.longitude),n=Math.abs(a.longitude);{if(Pe.CesiumMath.equalsEpsilon(t,Pe.CesiumMath.PI,Pe.CesiumMath.EPSILON11)){var i=Pe.CesiumMath.sign(a.longitude);return e.longitude=i*(t-Pe.CesiumMath.EPSILON11),1}if(Pe.CesiumMath.equalsEpsilon(n,Pe.CesiumMath.PI,Pe.CesiumMath.EPSILON11)){e=Pe.CesiumMath.sign(e.longitude);return a.longitude=e*(n-Pe.CesiumMath.EPSILON11),2}}return 0}(P,k),V=a.project(P,Ke),(pe=xe(Y=a.project(k,$e),V,ca)).y=Math.abs(pe.y),F=ea,q=aa,0===Me||be.Cartesian3.dot(pe,be.Cartesian3.UNIT_Y)>Ie?(F=Re(a,P,ee,V,ea),q=Re(a,k,G,Y,aa)):1===Me?(q=Re(a,k,G,Y,aa),F.x=0,F.y=Pe.CesiumMath.sign(P.longitude-Math.abs(k.longitude)),F.z=0):(F=Re(a,P,ee,V,ea),q.x=0,q.y=Pe.CesiumMath.sign(P.longitude-k.longitude),q.z=0));var ae=be.Cartesian3.distance($,j),te=Ae.EncodedCartesian3.fromCartesian(K,la),ne=be.Cartesian3.subtract(B,K,ta),ie=be.Cartesian3.normalize(ne,ra),re=be.Cartesian3.subtract($,K,na);re=be.Cartesian3.normalize(re,re);var se=be.Cartesian3.cross(ie,re,ra);se=be.Cartesian3.normalize(se,se);var oe=be.Cartesian3.cross(re,ee,sa);oe=be.Cartesian3.normalize(oe,oe);var le=be.Cartesian3.subtract(j,B,ia);le=be.Cartesian3.normalize(le,le);var ue=be.Cartesian3.cross(G,le,oa);ue=be.Cartesian3.normalize(ue,ue);var ce=ae/x,Ce=Z/x,pe=0,de=0,he=0;for(s&&(pe=be.Cartesian3.distance(V,Y),X=Ae.EncodedCartesian3.fromCartesian(V,ua),W=be.Cartesian3.subtract(Y,V,ca),Te=(U=be.Cartesian3.normalize(W,Ca)).x,U.x=U.y,U.y=-Te,de=pe/b,he=J/b),I=0;I<8;I++){var ge=z+4*I,fe=R+2*I,me=ge+3,we=I<4?1:-1,ye=2===I||3===I||6===I||7===I?1:-1;be.Cartesian3.pack(te.high,v,ge),v[me]=ne.x,be.Cartesian3.pack(te.low,M,ge),M[me]=ne.y,be.Cartesian3.pack(oe,T,ge),T[me]=ne.z,be.Cartesian3.pack(ue,E,ge),E[me]=ce*we,be.Cartesian3.pack(se,_,ge);var ve=Ce*ye;0===ve&&ye<0&&(ve=9),_[me]=ve,s&&(u[ge]=X.high.x,u[ge+1]=X.high.y,u[ge+2]=X.low.x,u[ge+3]=X.low.y,C[ge]=-F.y,C[ge+1]=F.x,C[ge+2]=q.y,C[ge+3]=-q.x,c[ge]=W.x,c[ge+1]=W.y,c[ge+2]=U.x,c[ge+3]=U.y,p[fe]=de*we,0===(ve=he*ye)&&ye<0&&(ve=9),p[fe+1]=ve)}var Me=Je,ie=Qe,re=Ue,ee=Ze,le=be.Rectangle.fromCartographicArray(Xe,We),Te=Se.getMinimumMaximumHeights(le,d),le=Te.minimumTerrainHeight,Te=Te.maximumTerrainHeight;Q+=le,Q+=Te,De(K,$,le,Te,Me,re),De(B,j,le,Te,ie,ee);Te=be.Cartesian3.multiplyByScalar(se,Pe.CesiumMath.EPSILON5,pa);be.Cartesian3.add(Me,Te,Me),be.Cartesian3.add(ie,Te,ie),be.Cartesian3.add(re,Te,re),be.Cartesian3.add(ee,Te,ee),ze(Me,ie),ze(re,ee),be.Cartesian3.pack(Me,y,D),be.Cartesian3.pack(ie,y,D+3),be.Cartesian3.pack(ee,y,D+6),be.Cartesian3.pack(re,y,D+9),Te=be.Cartesian3.multiplyByScalar(se,-2*Pe.CesiumMath.EPSILON5,pa),be.Cartesian3.add(Me,Te,Me),be.Cartesian3.add(ie,Te,ie),be.Cartesian3.add(re,Te,re),be.Cartesian3.add(ee,Te,ee),ze(Me,ie),ze(re,ee),be.Cartesian3.pack(Me,y,D+12),be.Cartesian3.pack(ie,y,D+15),be.Cartesian3.pack(ee,y,D+18),be.Cartesian3.pack(re,y,D+21),N+=2,l+=3,R+=16,D+=24,z+=32,Z+=ae,J+=pe}var Ee=l=0;for(o=0;o<h;o++){for(I=0;I<ga;I++)w[l+I]=ha[I]+Ee;Ee+=8,l+=ga}e=da;Oe.BoundingSphere.fromVertices(t,be.Cartesian3.ZERO,3,e[0]),Oe.BoundingSphere.fromVertices(n,be.Cartesian3.ZERO,3,e[1]);var _e=Oe.BoundingSphere.fromBoundingSpheres(e);_e.radius+=Q/(2*h);e={position:new Le.GeometryAttribute({componentDatatype:ke.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:y}),startHiAndForwardOffsetX:fa(v),startLoAndForwardOffsetY:fa(M),startNormalAndForwardOffsetZ:fa(T),endNormalAndTextureCoordinateNormalizationX:fa(E),rightNormalAndTextureCoordinateNormalizationY:fa(_)};s&&(e.startHiLo2D=fa(u),e.offsetAndRight2D=fa(c),e.startEndNormals2D=fa(C),e.texcoordNormalization2D=new Le.GeometryAttribute({componentDatatype:ke.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:p}));return new Le.Geometry({attributes:e,indices:w,boundingSphere:_e})}(o,C,P,k,b,O,s)}};var N=new be.Cartesian3,R=new Oe.Matrix3,D=new Oe.Quaternion;function Ne(e,a,t,n){a=xe(t,a,N),a=be.Cartesian3.dot(a,e);if(Ie<a||a<w){t=xe(n,t,x),a=a<w?Pe.CesiumMath.PI_OVER_TWO:-Pe.CesiumMath.PI_OVER_TWO,a=Oe.Quaternion.fromAxisAngle(t,a,D),a=Oe.Matrix3.fromQuaternion(a,R);return Oe.Matrix3.multiplyByVector(a,e,e),!0}return!1}var z=new be.Cartographic,H=new be.Cartesian3,oe=new be.Cartesian3;function Re(e,a,t,n,i){var r=be.Cartographic.toCartesian(a,e._ellipsoid,H),s=be.Cartesian3.add(r,t,oe),o=!1,l=e._ellipsoid,u=l.cartesianToCartographic(s,z);Math.abs(a.longitude-u.longitude)>Pe.CesiumMath.PI_OVER_TWO&&(o=!0,s=be.Cartesian3.subtract(r,t,oe),u=l.cartesianToCartographic(s,z)),u.height=0;u=e.project(u,i);return(i=be.Cartesian3.subtract(u,n,i)).z=0,i=be.Cartesian3.normalize(i,i),o&&be.Cartesian3.negate(i,i),i}var le=new be.Cartesian3,ue=new be.Cartesian3;function De(e,a,t,n,i,r){var s=be.Cartesian3.subtract(a,e,le);be.Cartesian3.normalize(s,s);t=be.Cartesian3.multiplyByScalar(s,t-q,ue);be.Cartesian3.add(e,t,i);t=be.Cartesian3.multiplyByScalar(s,n-X,ue);be.Cartesian3.add(a,t,r)}var ce=new be.Cartesian3;function ze(e,a){var t=r.Plane.getPointDistance(Q,e),n=r.Plane.getPointDistance(Q,a),i=ce;Pe.CesiumMath.equalsEpsilon(t,0,Pe.CesiumMath.EPSILON2)?(i=xe(a,e,i),be.Cartesian3.multiplyByScalar(i,Pe.CesiumMath.EPSILON2,i),be.Cartesian3.add(e,i,e)):Pe.CesiumMath.equalsEpsilon(n,0,Pe.CesiumMath.EPSILON2)&&(i=xe(e,a,i),be.Cartesian3.multiplyByScalar(i,Pe.CesiumMath.EPSILON2,i),be.Cartesian3.add(a,i,a))}var He=new be.Cartographic,Be=new be.Cartographic,je=new be.Cartesian3,Ge=new be.Cartesian3,Ve=new be.Cartesian3,Ye=new be.Cartesian3,Fe=new be.Cartesian3,qe=new be.Cartesian3,Xe=[He,Be],We=new be.Rectangle,Ue=new be.Cartesian3,Ze=new be.Cartesian3,Je=new be.Cartesian3,Qe=new be.Cartesian3,Ke=new be.Cartesian3,$e=new be.Cartesian3,ea=new be.Cartesian3,aa=new be.Cartesian3,ta=new be.Cartesian3,na=new be.Cartesian3,ia=new be.Cartesian3,ra=new be.Cartesian3,sa=new be.Cartesian3,oa=new be.Cartesian3,la=new Ae.EncodedCartesian3,ua=new Ae.EncodedCartesian3,ca=new be.Cartesian3,Ca=new be.Cartesian3,pa=new be.Cartesian3,da=[new Oe.BoundingSphere,new Oe.BoundingSphere],ha=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],ga=ha.length;function fa(e){return new Le.GeometryAttribute({componentDatatype:ke.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return y._projectNormal=Re,function(e,a){return Se.initialize().then(function(){return B.defined(a)&&(e=y.unpack(e,a)),y.createGeometry(e)})}}); | ||
define(["./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./when-229515d6","./ComponentDatatype-17b06483","./ArcType-1da7fdca","./arrayRemoveDuplicates-bb548aa3","./EllipsoidGeodesic-43ba18de","./EllipsoidRhumbLine-afd6cd20","./EncodedCartesian3-d4f305ce","./GeometryAttribute-80036e07","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./WebMercatorProjection-d69cec15","./combine-8ce3f24b","./WebGLConstants-4e26b85a"],(function(e,a,t,n,i,r,s,o,l,u,c,C,p,d,h,g){"use strict";function f(t){t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT),this._ellipsoid=n.defaultValue(t.ellipsoid,a.Ellipsoid.WGS84),this._rectangle=n.defaultValue(t.rectangle,a.Rectangle.MAX_VALUE),this._projection=new e.GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=n.defaultValue(t.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=n.defaultValue(t.numberOfLevelZeroTilesY,1)}Object.defineProperties(f.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),f.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},f.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},f.prototype.rectangleToNativeRectangle=function(e,t){var r=i.CesiumMath.toDegrees(e.west),s=i.CesiumMath.toDegrees(e.south),o=i.CesiumMath.toDegrees(e.east),l=i.CesiumMath.toDegrees(e.north);return n.defined(t)?(t.west=r,t.south=s,t.east=o,t.north=l,t):new a.Rectangle(r,s,o,l)},f.prototype.tileXYToNativeRectangle=function(e,a,t,n){var r=this.tileXYToRectangle(e,a,t,n);return r.west=i.CesiumMath.toDegrees(r.west),r.south=i.CesiumMath.toDegrees(r.south),r.east=i.CesiumMath.toDegrees(r.east),r.north=i.CesiumMath.toDegrees(r.north),r},f.prototype.tileXYToRectangle=function(e,t,i,r){var s=this._rectangle,o=this.getNumberOfXTilesAtLevel(i),l=this.getNumberOfYTilesAtLevel(i),u=s.width/o,c=e*u+s.west,C=(e+1)*u+s.west,p=s.height/l,d=s.north-t*p,h=s.north-(t+1)*p;return n.defined(r)||(r=new a.Rectangle(c,h,C,d)),r.west=c,r.south=h,r.east=C,r.north=d,r},f.prototype.positionToTileXY=function(e,t,r){var s=this._rectangle;if(a.Rectangle.contains(s,e)){var o=this.getNumberOfXTilesAtLevel(t),l=this.getNumberOfYTilesAtLevel(t),u=s.width/o,c=s.height/l,C=e.longitude;s.east<s.west&&(C+=i.CesiumMath.TWO_PI);var p=(C-s.west)/u|0;p>=o&&(p=o-1);var d=(s.north-e.latitude)/c|0;return d>=l&&(d=l-1),n.defined(r)?(r.x=p,r.y=d,r):new a.Cartesian2(p,d)}};var m=new a.Cartesian3,w=new a.Cartesian3,v=new a.Cartographic,y=new a.Cartesian3,M=new a.Cartesian3,T=new e.BoundingSphere,E=new f,_=[new a.Cartographic,new a.Cartographic,new a.Cartographic,new a.Cartographic],O=new a.Cartesian2,b={};function P(e){a.Cartographic.fromRadians(e.east,e.north,0,_[0]),a.Cartographic.fromRadians(e.west,e.north,0,_[1]),a.Cartographic.fromRadians(e.east,e.south,0,_[2]),a.Cartographic.fromRadians(e.west,e.south,0,_[3]);var t,n=0,i=0,r=0,s=0,o=b._terrainHeightsMaxLevel;for(t=0;t<=o;++t){for(var l=!1,u=0;u<4;++u){var c=_[u];if(E.positionToTileXY(c,t,O),0===u)r=O.x,s=O.y;else if(r!==O.x||s!==O.y){l=!0;break}}if(l)break;n=r,i=s}if(0!==t)return{x:n,y:i,level:t>o?o:t-1}}b.initialize=function(){var a=b._initPromise;return n.defined(a)||(a=e.Resource.fetchJson(e.buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){b._terrainHeights=e})),b._initPromise=a),a},b.getMinimumMaximumHeights=function(e,t){t=n.defaultValue(t,a.Ellipsoid.WGS84);var i=P(e),r=b._defaultMinTerrainHeight,s=b._defaultMaxTerrainHeight;if(n.defined(i)){var o=i.level+"-"+i.x+"-"+i.y,l=b._terrainHeights[o];n.defined(l)&&(r=l[0],s=l[1]),t.cartographicToCartesian(a.Rectangle.northeast(e,v),m),t.cartographicToCartesian(a.Rectangle.southwest(e,v),w),a.Cartesian3.midpoint(w,m,y);var u=t.scaleToGeodeticSurface(y,M);if(n.defined(u)){var c=a.Cartesian3.distance(y,u);r=Math.min(r,-c)}else r=b._defaultMinTerrainHeight}return{minimumTerrainHeight:r=Math.max(b._defaultMinTerrainHeight,r),maximumTerrainHeight:s}},b.getBoundingSphere=function(t,i){i=n.defaultValue(i,a.Ellipsoid.WGS84);var r=P(t),s=b._defaultMaxTerrainHeight;if(n.defined(r)){var o=r.level+"-"+r.x+"-"+r.y,l=b._terrainHeights[o];n.defined(l)&&(s=l[1])}var u=e.BoundingSphere.fromRectangle3D(t,i,0);return e.BoundingSphere.fromRectangle3D(t,i,s,T),e.BoundingSphere.union(u,T,u)},b._terrainHeightsMaxLevel=6,b._defaultMaxTerrainHeight=9e3,b._defaultMinTerrainHeight=-1e5,b._terrainHeights=void 0,b._initPromise=void 0,Object.defineProperties(b,{initialized:{get:function(){return n.defined(b._terrainHeights)}}});var A=[e.GeographicProjection,d.WebMercatorProjection],k=A.length,L=Math.cos(i.CesiumMath.toRadians(30)),S=Math.cos(i.CesiumMath.toRadians(150));function x(e){var t=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).positions;this.width=n.defaultValue(e.width,1),this._positions=t,this.granularity=n.defaultValue(e.granularity,9999),this.loop=n.defaultValue(e.loop,!1),this.arcType=n.defaultValue(e.arcType,r.ArcType.GEODESIC),this._ellipsoid=a.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(x.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+a.Ellipsoid.packedLength+1+1}}}),x.setProjectionAndEllipsoid=function(e,a){for(var t=0,n=0;n<k;n++)if(a instanceof A[n]){t=n;break}e._projectionIndex=t,e._ellipsoid=a.ellipsoid};var I=new a.Cartesian3,N=new a.Cartesian3,R=new a.Cartesian3;function D(e,t,n,i,r){var s=Y(i,e,0,I),o=Y(i,e,n,N),l=Y(i,t,0,R),u=F(o,s,N),c=F(l,s,R);return a.Cartesian3.cross(c,u,r),a.Cartesian3.normalize(r,r)}var z=new a.Cartographic,H=new a.Cartesian3,B=new a.Cartesian3,j=new a.Cartesian3;function G(e,t,n,i,s,u,c,C,p,d,h){if(0!==s){var g;u===r.ArcType.GEODESIC?g=new o.EllipsoidGeodesic(e,t,c):u===r.ArcType.RHUMB&&(g=new l.EllipsoidRhumbLine(e,t,c));var f=g.surfaceDistance;if(!(f<s))for(var m=D(e,t,i,c,j),w=Math.ceil(f/s),v=f/w,y=v,M=w-1,T=C.length,E=0;E<M;E++){var _=g.interpolateUsingSurfaceDistance(y,z),O=Y(c,_,n,H),b=Y(c,_,i,B);a.Cartesian3.pack(m,C,T),a.Cartesian3.pack(O,p,T),a.Cartesian3.pack(b,d,T),h.push(_.latitude),h.push(_.longitude),T+=3,y+=v}}}var V=new a.Cartographic;function Y(e,t,n,i){return a.Cartographic.clone(t,V),V.height=n,a.Cartographic.toCartesian(V,e,i)}function F(e,t,n){return a.Cartesian3.subtract(e,t,n),a.Cartesian3.normalize(n,n),n}function q(e,t,n,i){return i=F(e,t,i),i=a.Cartesian3.cross(i,n,i),i=a.Cartesian3.normalize(i,i),i=a.Cartesian3.cross(n,i,i)}x.pack=function(e,t,i){var r=n.defaultValue(i,0),s=e._positions,o=s.length;t[r++]=o;for(var l=0;l<o;++l){var u=s[l];a.Cartesian3.pack(u,t,r),r+=3}return t[r++]=e.granularity,t[r++]=e.loop?1:0,t[r++]=e.arcType,a.Ellipsoid.pack(e._ellipsoid,t,r),r+=a.Ellipsoid.packedLength,t[r++]=e._projectionIndex,t[r++]=e._scene3DOnly?1:0,t},x.unpack=function(e,t,i){for(var r=n.defaultValue(t,0),s=e[r++],o=new Array(s),l=0;l<s;l++)o[l]=a.Cartesian3.unpack(e,r),r+=3;var u=e[r++],c=1===e[r++],C=e[r++],p=a.Ellipsoid.unpack(e,r);r+=a.Ellipsoid.packedLength;var d=e[r++],h=1===e[r++];return n.defined(i)||(i=new x({positions:o})),i._positions=o,i.granularity=u,i.loop=c,i.arcType=C,i._ellipsoid=p,i._projectionIndex=d,i._scene3DOnly=h,i};var X=new a.Cartesian3,W=new a.Cartesian3,U=new a.Cartesian3,Z=new a.Cartesian3;function J(e,t,n,r,s){var o=F(n,t,Z),l=q(e,t,o,X),u=q(r,t,o,W);if(i.CesiumMath.equalsEpsilon(a.Cartesian3.dot(l,u),-1,i.CesiumMath.EPSILON5))return s=a.Cartesian3.cross(o,l,s),s=a.Cartesian3.normalize(s,s);s=a.Cartesian3.add(u,l,s),s=a.Cartesian3.normalize(s,s);var c=a.Cartesian3.cross(o,s,U);return a.Cartesian3.dot(u,c)<0&&(s=a.Cartesian3.negate(s,s)),s}var Q=p.Plane.fromPointNormal(a.Cartesian3.ZERO,a.Cartesian3.UNIT_Y),K=new a.Cartesian3,$=new a.Cartesian3,ee=new a.Cartesian3,ae=new a.Cartesian3,te=new a.Cartesian3,ne=new a.Cartesian3,ie=new a.Cartographic,re=new a.Cartographic,se=new a.Cartographic;x.createGeometry=function(t){var o,p,d,h,g,f,m=!t._scene3DOnly,w=t.loop,v=t._ellipsoid,y=t.granularity,M=t.arcType,T=new A[t._projectionIndex](v),E=1e3,_=t._positions,O=_.length;2===O&&(w=!1);var P,k,S,x=new l.EllipsoidRhumbLine(void 0,void 0,v),I=[_[0]];for(p=0;p<O-1;p++)d=_[p],h=_[p+1],P=C.IntersectionTests.lineSegmentPlane(d,h,Q,ne),!n.defined(P)||a.Cartesian3.equalsEpsilon(P,d,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(P,h,i.CesiumMath.EPSILON7)||(t.arcType===r.ArcType.GEODESIC?I.push(a.Cartesian3.clone(P)):t.arcType===r.ArcType.RHUMB&&(S=v.cartesianToCartographic(P,ie).longitude,g=v.cartesianToCartographic(d,ie),f=v.cartesianToCartographic(h,re),x.setEndPoints(g,f),k=x.findIntersectionWithLongitude(S,se),P=v.cartographicToCartesian(k,ne),!n.defined(P)||a.Cartesian3.equalsEpsilon(P,d,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(P,h,i.CesiumMath.EPSILON7)||I.push(a.Cartesian3.clone(P)))),I.push(h);w&&(d=_[O-1],h=_[0],P=C.IntersectionTests.lineSegmentPlane(d,h,Q,ne),!n.defined(P)||a.Cartesian3.equalsEpsilon(P,d,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(P,h,i.CesiumMath.EPSILON7)||(t.arcType===r.ArcType.GEODESIC?I.push(a.Cartesian3.clone(P)):t.arcType===r.ArcType.RHUMB&&(S=v.cartesianToCartographic(P,ie).longitude,g=v.cartesianToCartographic(d,ie),f=v.cartesianToCartographic(h,re),x.setEndPoints(g,f),k=x.findIntersectionWithLongitude(S,se),P=v.cartographicToCartesian(k,ne),!n.defined(P)||a.Cartesian3.equalsEpsilon(P,d,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(P,h,i.CesiumMath.EPSILON7)||I.push(a.Cartesian3.clone(P)))));var N=I.length,R=new Array(N);for(p=0;p<N;p++){var z=a.Cartographic.fromCartesian(I[p],v);z.height=0,R[p]=z}if(!((N=(R=s.arrayRemoveDuplicates(R,a.Cartographic.equalsEpsilon)).length)<2)){var H=[],B=[],j=[],V=[],q=K,X=$,W=ee,U=ae,Z=te,oe=R[0],le=R[1];for(q=Y(v,R[N-1],0,q),U=Y(v,le,0,U),X=Y(v,oe,0,X),W=Y(v,oe,E,W),Z=w?J(q,X,W,U,Z):D(oe,le,E,v,Z),a.Cartesian3.pack(Z,B,0),a.Cartesian3.pack(X,j,0),a.Cartesian3.pack(W,V,0),H.push(oe.latitude),H.push(oe.longitude),G(oe,le,0,E,y,M,v,B,j,V,H),p=1;p<N-1;++p){q=a.Cartesian3.clone(X,q),X=a.Cartesian3.clone(U,X);var ue=R[p];Y(v,ue,E,W),Y(v,R[p+1],0,U),J(q,X,W,U,Z),o=B.length,a.Cartesian3.pack(Z,B,o),a.Cartesian3.pack(X,j,o),a.Cartesian3.pack(W,V,o),H.push(ue.latitude),H.push(ue.longitude),G(R[p],R[p+1],0,E,y,M,v,B,j,V,H)}var Ce=R[N-1],pe=R[N-2];if(X=Y(v,Ce,0,X),W=Y(v,Ce,E,W),w){var de=R[0];Z=J(q=Y(v,pe,0,q),X,W,U=Y(v,de,0,U),Z)}else Z=D(pe,Ce,E,v,Z);if(o=B.length,a.Cartesian3.pack(Z,B,o),a.Cartesian3.pack(X,j,o),a.Cartesian3.pack(W,V,o),H.push(Ce.latitude),H.push(Ce.longitude),w){for(G(Ce,oe,0,E,y,M,v,B,j,V,H),o=B.length,p=0;p<3;++p)B[o+p]=B[p],j[o+p]=j[p],V[o+p]=V[p];H.push(oe.latitude),H.push(oe.longitude)}return function(t,n,r,s,o,l,C){var p,d,h,g,f,m,w=n._ellipsoid,v=r.length/3-1,y=8*v,M=4*y,T=36*v,E=y>65535?new Uint32Array(T):new Uint16Array(T),_=new Float64Array(3*y),O=new Float32Array(M),P=new Float32Array(M),A=new Float32Array(M),k=new Float32Array(M),S=new Float32Array(M);C&&(h=new Float32Array(M),g=new Float32Array(M),f=new Float32Array(M),m=new Float32Array(2*y));var x=l.length/2,I=0,N=Me;N.height=0;var R=Te;R.height=0;var D=Ee,z=_e;if(C)for(d=0,p=1;p<x;p++)N.latitude=l[d],N.longitude=l[d+1],R.latitude=l[d+2],R.longitude=l[d+3],D=n.project(N,D),z=n.project(R,z),I+=a.Cartesian3.distance(D,z),d+=2;var H=s.length/3;z=a.Cartesian3.unpack(s,0,z);var B,j=0;for(d=3,p=1;p<H;p++)D=a.Cartesian3.clone(z,D),z=a.Cartesian3.unpack(s,d,z),j+=a.Cartesian3.distance(D,z),d+=3;d=3;var G=0,V=0,Y=0,q=0,X=!1,W=a.Cartesian3.unpack(r,0,be),U=a.Cartesian3.unpack(s,0,_e),Z=a.Cartesian3.unpack(o,0,Ae);if(t){ce(Z,a.Cartesian3.unpack(r,r.length-6,Oe),W,U)&&(Z=a.Cartesian3.negate(Z,Z))}var J=0,Q=0,K=0;for(p=0;p<v;p++){var $,ee,ae,te,ne=a.Cartesian3.clone(W,Oe),ie=a.Cartesian3.clone(U,Ee),re=a.Cartesian3.clone(Z,Pe);if(X&&(re=a.Cartesian3.negate(re,re)),W=a.Cartesian3.unpack(r,d,be),U=a.Cartesian3.unpack(s,d,_e),X=ce(Z=a.Cartesian3.unpack(o,d,Ae),ne,W,U),N.latitude=l[G],N.longitude=l[G+1],R.latitude=l[G+2],R.longitude=l[G+3],C){var se=ye(N,R);$=n.project(N,Re);var oe=F(ee=n.project(R,De),$,We);oe.y=Math.abs(oe.y),ae=ze,te=He,0===se||a.Cartesian3.dot(oe,a.Cartesian3.UNIT_Y)>L?(ae=he(n,N,re,$,ze),te=he(n,R,Z,ee,He)):1===se?(te=he(n,R,Z,ee,He),ae.x=0,ae.y=i.CesiumMath.sign(N.longitude-Math.abs(R.longitude)),ae.z=0):(ae=he(n,N,re,$,ze),te.x=0,te.y=i.CesiumMath.sign(N.longitude-R.longitude),te.z=0)}var le=a.Cartesian3.distance(ie,U),ue=u.EncodedCartesian3.fromCartesian(ne,qe),Ce=a.Cartesian3.subtract(W,ne,Be),pe=a.Cartesian3.normalize(Ce,Ve),de=a.Cartesian3.subtract(ie,ne,je);de=a.Cartesian3.normalize(de,de);var ge=a.Cartesian3.cross(pe,de,Ve);ge=a.Cartesian3.normalize(ge,ge);var fe=a.Cartesian3.cross(de,re,Ye);fe=a.Cartesian3.normalize(fe,fe);var we=a.Cartesian3.subtract(U,W,Ge);we=a.Cartesian3.normalize(we,we);var ea=a.Cartesian3.cross(Z,we,Fe);ea=a.Cartesian3.normalize(ea,ea);var aa,ta,na,ia=le/j,ra=J/j,sa=0,oa=0,la=0;if(C){sa=a.Cartesian3.distance($,ee),aa=u.EncodedCartesian3.fromCartesian($,Xe),ta=a.Cartesian3.subtract(ee,$,We);var ua=(na=a.Cartesian3.normalize(ta,Ue)).x;na.x=na.y,na.y=-ua,oa=sa/I,la=Q/I}for(B=0;B<8;B++){var ca=q+4*B,Ca=V+2*B,pa=ca+3,da=B<4?1:-1,ha=2===B||3===B||6===B||7===B?1:-1;a.Cartesian3.pack(ue.high,O,ca),O[pa]=Ce.x,a.Cartesian3.pack(ue.low,P,ca),P[pa]=Ce.y,a.Cartesian3.pack(fe,A,ca),A[pa]=Ce.z,a.Cartesian3.pack(ea,k,ca),k[pa]=ia*da,a.Cartesian3.pack(ge,S,ca);var ga=ra*ha;0===ga&&ha<0&&(ga=9),S[pa]=ga,C&&(h[ca]=aa.high.x,h[ca+1]=aa.high.y,h[ca+2]=aa.low.x,h[ca+3]=aa.low.y,f[ca]=-ae.y,f[ca+1]=ae.x,f[ca+2]=te.y,f[ca+3]=-te.x,g[ca]=ta.x,g[ca+1]=ta.y,g[ca+2]=na.x,g[ca+3]=na.y,m[Ca]=oa*da,0===(ga=la*ha)&&ha<0&&(ga=9),m[Ca+1]=ga)}var fa=Ie,ma=Ne,wa=Se,va=xe,ya=a.Rectangle.fromCartographicArray(ke,Le),Ma=b.getMinimumMaximumHeights(ya,w),Ta=Ma.minimumTerrainHeight,Ea=Ma.maximumTerrainHeight;K+=Ta,K+=Ea,me(ne,ie,Ta,Ea,fa,wa),me(W,U,Ta,Ea,ma,va);var _a=a.Cartesian3.multiplyByScalar(ge,i.CesiumMath.EPSILON5,Ze);a.Cartesian3.add(fa,_a,fa),a.Cartesian3.add(ma,_a,ma),a.Cartesian3.add(wa,_a,wa),a.Cartesian3.add(va,_a,va),ve(fa,ma),ve(wa,va),a.Cartesian3.pack(fa,_,Y),a.Cartesian3.pack(ma,_,Y+3),a.Cartesian3.pack(va,_,Y+6),a.Cartesian3.pack(wa,_,Y+9),_a=a.Cartesian3.multiplyByScalar(ge,-2*i.CesiumMath.EPSILON5,Ze),a.Cartesian3.add(fa,_a,fa),a.Cartesian3.add(ma,_a,ma),a.Cartesian3.add(wa,_a,wa),a.Cartesian3.add(va,_a,va),ve(fa,ma),ve(wa,va),a.Cartesian3.pack(fa,_,Y+12),a.Cartesian3.pack(ma,_,Y+15),a.Cartesian3.pack(va,_,Y+18),a.Cartesian3.pack(wa,_,Y+21),G+=2,d+=3,V+=16,Y+=24,q+=32,J+=le,Q+=sa}d=0;var Oa=0;for(p=0;p<v;p++){for(B=0;B<Ke;B++)E[d+B]=Qe[B]+Oa;Oa+=8,d+=Ke}var ba=Je;e.BoundingSphere.fromVertices(r,a.Cartesian3.ZERO,3,ba[0]),e.BoundingSphere.fromVertices(s,a.Cartesian3.ZERO,3,ba[1]);var Pa=e.BoundingSphere.fromBoundingSpheres(ba);Pa.radius+=K/(2*v);var Aa={position:new c.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:_}),startHiAndForwardOffsetX:$e(O),startLoAndForwardOffsetY:$e(P),startNormalAndForwardOffsetZ:$e(A),endNormalAndTextureCoordinateNormalizationX:$e(k),rightNormalAndTextureCoordinateNormalizationY:$e(S)};C&&(Aa.startHiLo2D=$e(h),Aa.offsetAndRight2D=$e(g),Aa.startEndNormals2D=$e(f),Aa.texcoordNormalization2D=new c.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:m}));return new c.Geometry({attributes:Aa,indices:E,boundingSphere:Pa})}(w,T,j,V,B,H,m)}};var oe=new a.Cartesian3,le=new a.Matrix3,ue=new e.Quaternion;function ce(t,n,r,s){var o=F(r,n,oe),l=a.Cartesian3.dot(o,t);if(l>L||l<S){var u=F(s,r,Z),c=l<S?i.CesiumMath.PI_OVER_TWO:-i.CesiumMath.PI_OVER_TWO,C=e.Quaternion.fromAxisAngle(u,c,ue),p=a.Matrix3.fromQuaternion(C,le);return a.Matrix3.multiplyByVector(p,t,t),!0}return!1}var Ce=new a.Cartographic,pe=new a.Cartesian3,de=new a.Cartesian3;function he(e,t,n,r,s){var o=a.Cartographic.toCartesian(t,e._ellipsoid,pe),l=a.Cartesian3.add(o,n,de),u=!1,c=e._ellipsoid,C=c.cartesianToCartographic(l,Ce);Math.abs(t.longitude-C.longitude)>i.CesiumMath.PI_OVER_TWO&&(u=!0,l=a.Cartesian3.subtract(o,n,de),C=c.cartesianToCartographic(l,Ce)),C.height=0;var p=e.project(C,s);return(s=a.Cartesian3.subtract(p,r,s)).z=0,s=a.Cartesian3.normalize(s,s),u&&a.Cartesian3.negate(s,s),s}var ge=new a.Cartesian3,fe=new a.Cartesian3;function me(e,t,n,i,r,s){var o=a.Cartesian3.subtract(t,e,ge);a.Cartesian3.normalize(o,o);var l=n-0,u=a.Cartesian3.multiplyByScalar(o,l,fe);a.Cartesian3.add(e,u,r);var c=i-1e3;u=a.Cartesian3.multiplyByScalar(o,c,fe),a.Cartesian3.add(t,u,s)}var we=new a.Cartesian3;function ve(e,t){var n=p.Plane.getPointDistance(Q,e),r=p.Plane.getPointDistance(Q,t),s=we;i.CesiumMath.equalsEpsilon(n,0,i.CesiumMath.EPSILON2)?(s=F(t,e,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(e,s,e)):i.CesiumMath.equalsEpsilon(r,0,i.CesiumMath.EPSILON2)&&(s=F(e,t,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(t,s,t))}function ye(e,a){var t=Math.abs(e.longitude),n=Math.abs(a.longitude);if(i.CesiumMath.equalsEpsilon(t,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){var r=i.CesiumMath.sign(a.longitude);return e.longitude=r*(t-i.CesiumMath.EPSILON11),1}if(i.CesiumMath.equalsEpsilon(n,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){var s=i.CesiumMath.sign(e.longitude);return a.longitude=s*(n-i.CesiumMath.EPSILON11),2}return 0}var Me=new a.Cartographic,Te=new a.Cartographic,Ee=new a.Cartesian3,_e=new a.Cartesian3,Oe=new a.Cartesian3,be=new a.Cartesian3,Pe=new a.Cartesian3,Ae=new a.Cartesian3,ke=[Me,Te],Le=new a.Rectangle,Se=new a.Cartesian3,xe=new a.Cartesian3,Ie=new a.Cartesian3,Ne=new a.Cartesian3,Re=new a.Cartesian3,De=new a.Cartesian3,ze=new a.Cartesian3,He=new a.Cartesian3,Be=new a.Cartesian3,je=new a.Cartesian3,Ge=new a.Cartesian3,Ve=new a.Cartesian3,Ye=new a.Cartesian3,Fe=new a.Cartesian3,qe=new u.EncodedCartesian3,Xe=new u.EncodedCartesian3,We=new a.Cartesian3,Ue=new a.Cartesian3,Ze=new a.Cartesian3,Je=[new e.BoundingSphere,new e.BoundingSphere],Qe=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Ke=Qe.length;function $e(e){return new c.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return x._projectNormal=he,function(e,a){return b.initialize().then((function(){return n.defined(a)&&(e=x.unpack(e,a)),x.createGeometry(e)}))}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./ComponentDatatype-6c2e43c1","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./VertexFormat-8d463a4f","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a"],function(n,o,m,e,i,u,p,a,t,r,c,y){"use strict";function s(e){e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT);e=n.defaultValue(e.vertexFormat,a.VertexFormat.DEFAULT);this._vertexFormat=e,this._workerName="createPlaneGeometry"}s.packedLength=a.VertexFormat.packedLength,s.pack=function(e,t,r){return r=n.defaultValue(r,0),a.VertexFormat.pack(e._vertexFormat,t,r),t};var A=new a.VertexFormat,b={vertexFormat:A};s.unpack=function(e,t,r){t=n.defaultValue(t,0);t=a.VertexFormat.unpack(e,t,A);return n.defined(r)?(r._vertexFormat=a.VertexFormat.clone(t,r._vertexFormat),r):new s(b)};var l=new m.Cartesian3(-.5,-.5,0),F=new m.Cartesian3(.5,.5,0);return s.createGeometry=function(e){var t,r,n=e._vertexFormat,a=new p.GeometryAttributes;return n.position&&((e=new Float64Array(12))[0]=l.x,e[1]=l.y,e[2]=0,e[3]=F.x,e[4]=l.y,e[5]=0,e[6]=F.x,e[7]=F.y,e[8]=0,e[9]=l.x,e[10]=F.y,e[11]=0,a.position=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}),n.normal&&((e=new Float32Array(12))[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=1,e[9]=0,e[10]=0,e[11]=1,a.normal=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})),n.st&&((t=new Float32Array(8))[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,a.st=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})),n.tangent&&((t=new Float32Array(12))[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,a.tangent=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})),n.bitangent&&((r=new Float32Array(12))[0]=0,r[1]=1,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=1,r[8]=0,r[9]=0,r[10]=1,r[11]=0,a.bitangent=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:r})),(r=new Uint16Array(6))[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3),new u.Geometry({attributes:a,indices:r,primitiveType:u.PrimitiveType.TRIANGLES,boundingSphere:new o.BoundingSphere(m.Cartesian3.ZERO,Math.sqrt(2))})},function(e,t){return n.defined(t)&&(e=s.unpack(e,t)),s.createGeometry(e)}}); | ||
define(["./when-229515d6","./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./VertexFormat-565d6a6c","./combine-8ce3f24b","./WebGLConstants-4e26b85a"],(function(e,t,r,a,n,o,i,m,u,p){"use strict";function y(t){t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT);var r=e.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT);this._vertexFormat=r,this._workerName="createPlaneGeometry"}y.packedLength=m.VertexFormat.packedLength,y.pack=function(t,r,a){return a=e.defaultValue(a,0),m.VertexFormat.pack(t._vertexFormat,r,a),r};var c=new m.VertexFormat,s={vertexFormat:c};y.unpack=function(t,r,a){r=e.defaultValue(r,0);var n=m.VertexFormat.unpack(t,r,c);return e.defined(a)?(a._vertexFormat=m.VertexFormat.clone(n,a._vertexFormat),a):new y(s)};var A=new r.Cartesian3(-.5,-.5,0),b=new r.Cartesian3(.5,.5,0);return y.createGeometry=function(e){var a,m,u=e._vertexFormat,p=new i.GeometryAttributes;if(u.position){if((m=new Float64Array(12))[0]=A.x,m[1]=A.y,m[2]=0,m[3]=b.x,m[4]=A.y,m[5]=0,m[6]=b.x,m[7]=b.y,m[8]=0,m[9]=A.x,m[10]=b.y,m[11]=0,p.position=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m}),u.normal){var y=new Float32Array(12);y[0]=0,y[1]=0,y[2]=1,y[3]=0,y[4]=0,y[5]=1,y[6]=0,y[7]=0,y[8]=1,y[9]=0,y[10]=0,y[11]=1,p.normal=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})}if(u.st){var c=new Float32Array(8);c[0]=0,c[1]=0,c[2]=1,c[3]=0,c[4]=1,c[5]=1,c[6]=0,c[7]=1,p.st=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:c})}if(u.tangent){var s=new Float32Array(12);s[0]=1,s[1]=0,s[2]=0,s[3]=1,s[4]=0,s[5]=0,s[6]=1,s[7]=0,s[8]=0,s[9]=1,s[10]=0,s[11]=0,p.tangent=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:s})}if(u.bitangent){var f=new Float32Array(12);f[0]=0,f[1]=1,f[2]=0,f[3]=0,f[4]=1,f[5]=0,f[6]=0,f[7]=1,f[8]=0,f[9]=0,f[10]=1,f[11]=0,p.bitangent=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:f})}(a=new Uint16Array(6))[0]=0,a[1]=1,a[2]=2,a[3]=0,a[4]=2,a[5]=3}return new o.Geometry({attributes:p,indices:a,primitiveType:o.PrimitiveType.TRIANGLES,boundingSphere:new t.BoundingSphere(r.Cartesian3.ZERO,Math.sqrt(2))})},function(t,r){return e.defined(r)&&(t=y.unpack(t,r)),y.createGeometry(t)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Transforms-70f396e0","./Cartesian2-40b13f31","./Check-3917d765","./ComponentDatatype-6c2e43c1","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a"],function(r,a,i,e,o,u,c,t,n,s,y){"use strict";function m(){this._workerName="createPlaneOutlineGeometry"}m.packedLength=0,m.pack=function(e,t){return t},m.unpack=function(e,t,n){return r.defined(n)?n:new m};var p=new i.Cartesian3(-.5,-.5,0),f=new i.Cartesian3(.5,.5,0);return m.createGeometry=function(){var e=new c.GeometryAttributes,t=new Uint16Array(8),n=new Float64Array(12);return n[0]=p.x,n[1]=p.y,n[2]=p.z,n[3]=f.x,n[4]=p.y,n[5]=p.z,n[6]=f.x,n[7]=f.y,n[8]=p.z,n[9]=p.x,n[10]=f.y,n[11]=p.z,e.position=new u.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new u.Geometry({attributes:e,indices:t,primitiveType:u.PrimitiveType.LINES,boundingSphere:new a.BoundingSphere(i.Cartesian3.ZERO,Math.sqrt(2))})},function(e,t){return r.defined(t)&&(e=m.unpack(e,t)),m.createGeometry(e)}}); | ||
define(["./when-229515d6","./Transforms-7cd3197b","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./combine-8ce3f24b","./WebGLConstants-4e26b85a"],(function(e,t,n,r,i,a,o,u,c){"use strict";function y(){this._workerName="createPlaneOutlineGeometry"}y.packedLength=0,y.pack=function(e,t){return t},y.unpack=function(t,n,r){return e.defined(r)?r:new y};var m=new n.Cartesian3(-.5,-.5,0),s=new n.Cartesian3(.5,.5,0);return y.createGeometry=function(){var e=new o.GeometryAttributes,r=new Uint16Array(8),u=new Float64Array(12);return u[0]=m.x,u[1]=m.y,u[2]=m.z,u[3]=s.x,u[4]=m.y,u[5]=m.z,u[6]=s.x,u[7]=s.y,u[8]=m.z,u[9]=m.x,u[10]=s.y,u[11]=m.z,e.position=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),r[0]=0,r[1]=1,r[2]=1,r[3]=2,r[4]=2,r[5]=3,r[6]=3,r[7]=0,new a.Geometry({attributes:e,indices:r,primitiveType:a.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(t,n){return e.defined(n)&&(t=y.unpack(t,n)),y.createGeometry(t)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Cartesian2-40b13f31","./ArcType-1da7fdca","./GeometryOffsetAttribute-964ec9ef","./BoundingRectangle-0c269568","./Transforms-70f396e0","./Check-3917d765","./ComponentDatatype-6c2e43c1","./EllipsoidGeodesic-bdbae7c8","./EllipsoidTangentPlane-66f520e3","./GeometryAttribute-6e7c7644","./GeometryInstance-5c9d46a4","./GeometryPipeline-d4d3acd7","./IndexDatatype-b42089ce","./Math-87254c13","./PolygonGeometryLibrary-c09bef45","./PolygonPipeline-5dc6dac0","./VertexFormat-8d463a4f","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./AxisAlignedBoundingBox-445c3009","./IntersectionTests-587a744a","./Plane-9d4e3328","./AttributeCompression-56959beb","./EncodedCartesian3-942c4568","./arrayRemoveDuplicates-47b233f1","./EllipsoidRhumbLine-6baec512","./GeometryAttributes-fbd9a3fb"],function(z,W,p,Y,e,U,t,j,m,A,Q,E,G,O,q,V,F,f,r,o,a,i,n,s,l,u,c,y,g){"use strict";var K=new W.Cartographic,Z=new W.Cartographic;var D=new e.BoundingRectangle,J=new W.Cartesian3,X=new W.Cartesian3,$=new W.Cartesian3,ee=new W.Cartesian3,te=new W.Cartesian3,re=new W.Cartesian3,oe=new W.Cartesian3,ae=new W.Cartesian3,ie=new W.Cartesian3,ne=new W.Cartesian2,se=new W.Cartesian2,le=new W.Cartesian3,ue=new U.Quaternion,ce=new U.Matrix3,pe=new U.Matrix3;function L(e){var t,r=e.vertexFormat,o=e.geometry,a=e.shadowVolume,i=o.attributes.position.values,n=i.length,s=e.wall,l=e.top||s,u=e.bottom||s;if(r.st||r.normal||r.tangent||r.bitangent||a){var c=e.boundingRectangle,p=e.tangentPlane,m=e.ellipsoid,y=e.stRotation,g=e.perPositionHeight,d=ne;d.x=c.x,d.y=c.y;var h,f=r.st?new Float32Array(n/3*2):void 0;r.normal&&(h=g&&l&&!s?o.attributes.normal.values:new Float32Array(n));var b,_=r.tangent?new Float32Array(n):void 0,v=r.bitangent?new Float32Array(n):void 0,P=a?new Float32Array(n):void 0,C=0,x=0,w=X,T=$,I=ee,A=!0,E=ce,G=pe;G=0!==y?(b=U.Quaternion.fromAxisAngle(p._plane.normal,y,ue),E=U.Matrix3.fromQuaternion(b,E),b=U.Quaternion.fromAxisAngle(p._plane.normal,-y,ue),U.Matrix3.fromQuaternion(b,G)):(E=U.Matrix3.clone(U.Matrix3.IDENTITY,E),U.Matrix3.clone(U.Matrix3.IDENTITY,G));var O=0,V=0;l&&u&&(O=n/2,V=n/3,n/=2);for(var F=0;F<n;F+=3){var D,L,N,H,R,M,S,B,k=W.Cartesian3.fromArray(i,F,le);r.st&&(D=U.Matrix3.multiplyByVector(E,k,J),D=m.scaleToGeodeticSurface(D,D),L=p.projectPointOntoPlane(D,se),W.Cartesian2.subtract(L,d,L),N=q.CesiumMath.clamp(L.x/c.width,0,1),H=q.CesiumMath.clamp(L.y/c.height,0,1),u&&(f[C+V]=N,f[C+1+V]=H),l&&(f[C]=N,f[C+1]=H),C+=2),(r.normal||r.tangent||r.bitangent||a)&&(R=x+1,M=x+2,s?(F+3<n&&(S=W.Cartesian3.fromArray(i,F+3,te),A&&(B=W.Cartesian3.fromArray(i,F+n,re),g&&(t=k,D=S,L=B,N=void 0,N=(H=m).cartesianToCartographic(t,K).height,(t=H.cartesianToCartographic(D,Z)).height=N,H.cartographicToCartesian(t,D),(D=H.cartesianToCartographic(L,Z)).height=N-100,H.cartographicToCartesian(D,L)),W.Cartesian3.subtract(S,k,S),W.Cartesian3.subtract(B,k,B),w=W.Cartesian3.normalize(W.Cartesian3.cross(B,S,w),w),A=!1),W.Cartesian3.equalsEpsilon(S,k,q.CesiumMath.EPSILON10)&&(A=!0)),(r.tangent||r.bitangent)&&(I=m.geodeticSurfaceNormal(k,I),r.tangent&&(T=W.Cartesian3.normalize(W.Cartesian3.cross(I,w,T),T)))):(w=m.geodeticSurfaceNormal(k,w),(r.tangent||r.bitangent)&&(g&&(oe=W.Cartesian3.fromArray(h,x,oe),ae=W.Cartesian3.cross(W.Cartesian3.UNIT_Z,oe,ae),ae=W.Cartesian3.normalize(U.Matrix3.multiplyByVector(G,ae,ae),ae),r.bitangent&&(ie=W.Cartesian3.normalize(W.Cartesian3.cross(oe,ae,ie),ie))),T=W.Cartesian3.cross(W.Cartesian3.UNIT_Z,w,T),T=W.Cartesian3.normalize(U.Matrix3.multiplyByVector(G,T,T),T),r.bitangent&&(I=W.Cartesian3.normalize(W.Cartesian3.cross(w,T,I),I)))),r.normal&&(e.wall?(h[x+O]=w.x,h[R+O]=w.y,h[M+O]=w.z):u&&(h[x+O]=-w.x,h[R+O]=-w.y,h[M+O]=-w.z),(l&&!g||s)&&(h[x]=w.x,h[R]=w.y,h[M]=w.z)),a&&(s&&(w=m.geodeticSurfaceNormal(k,w)),P[x+O]=-w.x,P[R+O]=-w.y,P[M+O]=-w.z),r.tangent&&(e.wall?(_[x+O]=T.x,_[R+O]=T.y,_[M+O]=T.z):u&&(_[x+O]=-T.x,_[R+O]=-T.y,_[M+O]=-T.z),l&&(g?(_[x]=ae.x,_[R]=ae.y,_[M]=ae.z):(_[x]=T.x,_[R]=T.y,_[M]=T.z))),r.bitangent&&(u&&(v[x+O]=I.x,v[R+O]=I.y,v[M+O]=I.z),l&&(g?(v[x]=ie.x,v[R]=ie.y,v[M]=ie.z):(v[x]=I.x,v[R]=I.y,v[M]=I.z))),x+=3)}r.st&&(o.attributes.st=new Q.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:f})),r.normal&&(o.attributes.normal=new Q.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:h})),r.tangent&&(o.attributes.tangent=new Q.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:_})),r.bitangent&&(o.attributes.bitangent=new Q.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})),a&&(o.attributes.extrudeDirection=new Q.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:P}))}return e.extrude&&z.defined(e.offsetAttribute)&&(y=i.length/3,b=new Uint8Array(y),e.offsetAttribute===Y.GeometryOffsetAttribute.TOP?l&&u||s?b=Y.arrayFill(b,1,0,y/2):l&&(b=Y.arrayFill(b,1)):(y=e.offsetAttribute===Y.GeometryOffsetAttribute.NONE?0:1,b=Y.arrayFill(b,y)),o.attributes.applyOffset=new Q.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})),o}var d=new W.Cartographic,h=new W.Cartographic,b={westOverIDL:0,eastOverIDL:0},_=new m.EllipsoidGeodesic;function v(e,t,r,o,a){if(a=z.defaultValue(a,new W.Rectangle),!z.defined(e)||e.length<3)return a.west=0,a.north=0,a.south=0,a.east=0,a;if(r===p.ArcType.RHUMB)return W.Rectangle.fromCartesianArray(e,t,a);_.ellipsoid.equals(t)||(_=new m.EllipsoidGeodesic(void 0,void 0,t)),a.west=Number.POSITIVE_INFINITY,a.east=Number.NEGATIVE_INFINITY,a.south=Number.POSITIVE_INFINITY,a.north=Number.NEGATIVE_INFINITY,b.westOverIDL=Number.POSITIVE_INFINITY,b.eastOverIDL=Number.NEGATIVE_INFINITY;for(var i,n=1/q.CesiumMath.chordLength(o,t.maximumRadius),s=e.length,l=t.cartesianToCartographic(e[0],h),u=d,c=1;c<s;c++)i=u,u=l,l=t.cartesianToCartographic(e[c],i),_.setEndPoints(u,l),C(_,n,a,b);return i=u,u=l,l=t.cartesianToCartographic(e[0],i),_.setEndPoints(u,l),C(_,n,a,b),a.east-a.west>b.eastOverIDL-b.westOverIDL&&(a.west=b.westOverIDL,a.east=b.eastOverIDL,a.east>q.CesiumMath.PI&&(a.east=a.east-q.CesiumMath.TWO_PI),a.west>q.CesiumMath.PI&&(a.west=a.west-q.CesiumMath.TWO_PI)),a}var P=new W.Cartographic;function C(e,t,r,o){for(var a=e.surfaceDistance,i=Math.ceil(a*t),n=0<i?a/(i-1):Number.POSITIVE_INFINITY,s=0,l=0;l<i;l++){var u=e.interpolateUsingSurfaceDistance(s,P);s+=n;var c=u.longitude,u=u.latitude;r.west=Math.min(r.west,c),r.east=Math.max(r.east,c),r.south=Math.min(r.south,u),r.north=Math.max(r.north,u);c=0<=c?c:c+q.CesiumMath.TWO_PI;o.westOverIDL=Math.min(o.westOverIDL,c),o.eastOverIDL=Math.max(o.eastOverIDL,c)}}var N=[];function x(e){var t,r=e.polygonHierarchy,o=z.defaultValue(e.vertexFormat,f.VertexFormat.DEFAULT),a=z.defaultValue(e.ellipsoid,W.Ellipsoid.WGS84),i=z.defaultValue(e.granularity,q.CesiumMath.RADIANS_PER_DEGREE),n=z.defaultValue(e.stRotation,0),s=z.defaultValue(e.perPositionHeight,!1),l=s&&z.defined(e.extrudedHeight),u=z.defaultValue(e.height,0),c=z.defaultValue(e.extrudedHeight,u);l||(t=Math.max(u,c),c=Math.min(u,c),u=t),this._vertexFormat=f.VertexFormat.clone(o),this._ellipsoid=W.Ellipsoid.clone(a),this._granularity=i,this._stRotation=n,this._height=u,this._extrudedHeight=c,this._closeTop=z.defaultValue(e.closeTop,!0),this._closeBottom=z.defaultValue(e.closeBottom,!0),this._polygonHierarchy=r,this._perPositionHeight=s,this._perPositionHeightExtrude=l,this._shadowVolume=z.defaultValue(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=z.defaultValue(e.arcType,p.ArcType.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this.packedLength=V.PolygonGeometryLibrary.computeHierarchyPackedLength(r)+W.Ellipsoid.packedLength+f.VertexFormat.packedLength+12}x.fromPositions=function(e){return new x({polygonHierarchy:{positions:(e=z.defaultValue(e,z.defaultValue.EMPTY_OBJECT)).positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType})},x.pack=function(e,t,r){return r=z.defaultValue(r,0),r=V.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,r),W.Ellipsoid.pack(e._ellipsoid,t,r),r+=W.Ellipsoid.packedLength,f.VertexFormat.pack(e._vertexFormat,t,r),r+=f.VertexFormat.packedLength,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._granularity,t[r++]=e._stRotation,t[r++]=e._perPositionHeightExtrude?1:0,t[r++]=e._perPositionHeight?1:0,t[r++]=e._closeTop?1:0,t[r++]=e._closeBottom?1:0,t[r++]=e._shadowVolume?1:0,t[r++]=z.defaultValue(e._offsetAttribute,-1),t[r++]=e._arcType,t[r]=e.packedLength,t};var w=W.Ellipsoid.clone(W.Ellipsoid.UNIT_SPHERE),T=new f.VertexFormat,I={polygonHierarchy:{}};return x.unpack=function(e,t,r){t=z.defaultValue(t,0);var o=V.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=o.startingIndex,delete o.startingIndex;var a=W.Ellipsoid.unpack(e,t,w);t+=W.Ellipsoid.packedLength;var i=f.VertexFormat.unpack(e,t,T);t+=f.VertexFormat.packedLength;var n=e[t++],s=e[t++],l=e[t++],u=e[t++],c=1===e[t++],p=1===e[t++],m=1===e[t++],y=1===e[t++],g=1===e[t++],d=e[t++],h=e[t++],t=e[t];return(r=!z.defined(r)?new x(I):r)._polygonHierarchy=o,r._ellipsoid=W.Ellipsoid.clone(a,r._ellipsoid),r._vertexFormat=f.VertexFormat.clone(i,r._vertexFormat),r._height=n,r._extrudedHeight=s,r._granularity=l,r._stRotation=u,r._perPositionHeightExtrude=c,r._perPositionHeight=p,r._closeTop=m,r._closeBottom=y,r._shadowVolume=g,r._offsetAttribute=-1===d?void 0:d,r._arcType=h,r.packedLength=t,r},x.computeRectangle=function(e,t){var r=z.defaultValue(e.granularity,q.CesiumMath.RADIANS_PER_DEGREE),o=z.defaultValue(e.arcType,p.ArcType.GEODESIC),a=e.polygonHierarchy,e=z.defaultValue(e.ellipsoid,W.Ellipsoid.WGS84);return v(a.positions,e,o,r,t)},x.createGeometry=function(e){var t=e._vertexFormat,r=e._ellipsoid,o=e._granularity,a=e._stRotation,i=e._polygonHierarchy,n=e._perPositionHeight,s=e._closeTop,l=e._closeBottom,u=e._arcType;if(!((g=i.positions).length<3)){var c=A.EllipsoidTangentPlane.fromPoints(g,r),i=V.PolygonGeometryLibrary.polygonsFromHierarchy(i,c.projectPointsOntoPlane.bind(c),!n,r),p=i.hierarchy,m=i.polygons;if(0!==p.length){var y,g=p[0].outerRing,g=V.PolygonGeometryLibrary.computeBoundingRectangle(c.plane.normal,c.projectPointOntoPlane.bind(c),g,a,D),d=[],h=e._height,f=e._extrudedHeight,b={perPositionHeight:n,vertexFormat:t,geometry:void 0,tangentPlane:c,boundingRectangle:g,ellipsoid:r,stRotation:a,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u};if(e._perPositionHeightExtrude||!q.CesiumMath.equalsEpsilon(h,f,0,q.CesiumMath.EPSILON2))for(b.extrude=!0,b.top=s,b.bottom=l,b.shadowVolume=e._shadowVolume,b.offsetAttribute=e._offsetAttribute,y=0;y<m.length;y++){var _,v=function(e,t,r,o,a,i,n,s,l){var u={walls:[]};if(i||n){var c=V.PolygonGeometryLibrary.createGeometryFromPositions(e,t,r,a,s,l),t=c.attributes.position.values,p=c.indices;if(i&&n){var m,i=t.concat(t),y=i.length/3;(m=O.IndexDatatype.createTypedArray(y,2*p.length)).set(p);for(var g=p.length,d=y/2,h=0;h<g;h+=3){var f=m[h]+d,b=m[h+1]+d,_=m[h+2]+d;m[h+g]=_,m[h+1+g]=b,m[h+2+g]=f}c.attributes.position.values=i,a&&s.normal&&(s=c.attributes.normal.values,c.attributes.normal.values=new Float32Array(i.length),c.attributes.normal.values.set(s)),c.indices=m}else if(n){for(y=t.length/3,m=O.IndexDatatype.createTypedArray(y,p.length),h=0;h<p.length;h+=3)m[h]=p[h+2],m[h+1]=p[h+1],m[h+2]=p[h];c.indices=m}u.topAndBottom=new E.GeometryInstance({geometry:c})}var c=o.outerRing,v=A.EllipsoidTangentPlane.fromPoints(c,e).projectPointsOntoPlane(c,N);F.PolygonPipeline.computeWindingOrder2D(v)===F.WindingOrder.CLOCKWISE&&(c=c.slice().reverse());var P=V.PolygonGeometryLibrary.computeWallGeometry(c,e,r,a,l);u.walls.push(new E.GeometryInstance({geometry:P}));var C=o.holes;for(h=0;h<C.length;h++){var x=C[h],v=A.EllipsoidTangentPlane.fromPoints(x,e).projectPointsOntoPlane(x,N);F.PolygonPipeline.computeWindingOrder2D(v)===F.WindingOrder.COUNTER_CLOCKWISE&&(x=x.slice().reverse()),P=V.PolygonGeometryLibrary.computeWallGeometry(x,e,r,a,l),u.walls.push(new E.GeometryInstance({geometry:P}))}return u}(r,m[y],o,p[y],n,s,l,t,u);s&&l?(_=v.topAndBottom,b.geometry=V.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(_.geometry,h,f,r,n)):s?((_=v.topAndBottom).geometry.attributes.position.values=F.PolygonPipeline.scaleToGeodeticHeight(_.geometry.attributes.position.values,h,r,!n),b.geometry=_.geometry):l&&((_=v.topAndBottom).geometry.attributes.position.values=F.PolygonPipeline.scaleToGeodeticHeight(_.geometry.attributes.position.values,f,r,!0),b.geometry=_.geometry),(s||l)&&(b.wall=!1,_.geometry=L(b),d.push(_));var P=v.walls;b.wall=!0;for(var C=0;C<P.length;C++){var x=P[C];b.geometry=V.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(x.geometry,h,f,r,n),x.geometry=L(b),d.push(x)}}else for(y=0;y<m.length;y++){var w,T,I=new E.GeometryInstance({geometry:V.PolygonGeometryLibrary.createGeometryFromPositions(r,m[y],o,n,t,u)});I.geometry.attributes.position.values=F.PolygonPipeline.scaleToGeodeticHeight(I.geometry.attributes.position.values,h,r,!n),b.geometry=I.geometry,I.geometry=L(b),z.defined(e._offsetAttribute)&&(T=I.geometry.attributes.position.values.length,w=new Uint8Array(T/3),T=e._offsetAttribute===Y.GeometryOffsetAttribute.NONE?0:1,Y.arrayFill(w,T),I.geometry.attributes.applyOffset=new Q.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:w})),d.push(I)}c=G.GeometryPipeline.combineInstances(d)[0];c.attributes.position.values=new Float64Array(c.attributes.position.values),c.indices=O.IndexDatatype.createTypedArray(c.attributes.position.values.length/3,c.indices);g=c.attributes,a=U.BoundingSphere.fromVertices(g.position.values);return t.position||delete g.position,new Q.Geometry({attributes:g,indices:c.indices,primitiveType:c.primitiveType,boundingSphere:a,offsetAttribute:e._offsetAttribute})}}},x.createShadowVolume=function(e,t,r){var o=e._granularity,a=e._ellipsoid,t=t(o,a),r=r(o,a);return new x({polygonHierarchy:e._polygonHierarchy,ellipsoid:a,stRotation:e._stRotation,granularity:o,perPositionHeight:!1,extrudedHeight:t,height:r,vertexFormat:f.VertexFormat.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(x.prototype,{rectangle:{get:function(){var e;return z.defined(this._rectangle)||(e=this._polygonHierarchy.positions,this._rectangle=v(e,this._ellipsoid,this._arcType,this._granularity)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return z.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){var t=-e._stRotation;if(0==t)return[0,0,0,1,1,0];var r=e._ellipsoid,o=e._polygonHierarchy.positions,e=e.rectangle;return Q.Geometry._textureCoordinateRotationPoints(o,t,r,e)}(this)),this._textureCoordinateRotationPoints}}}),function(e,t){return(e=z.defined(t)?x.unpack(e,t):e)._ellipsoid=W.Ellipsoid.clone(e._ellipsoid),x.createGeometry(e)}}); | ||
define(["./when-229515d6","./Matrix2-f2da41d4","./ArcType-1da7fdca","./GeometryOffsetAttribute-ff1e192c","./BoundingRectangle-18e42324","./Transforms-7cd3197b","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./EllipsoidGeodesic-43ba18de","./EllipsoidTangentPlane-b27cd2f7","./GeometryAttribute-80036e07","./GeometryInstance-16601d2a","./GeometryPipeline-5b3fba53","./IndexDatatype-b10faa0b","./PolygonGeometryLibrary-f129e954","./PolygonPipeline-5582b1ec","./VertexFormat-565d6a6c","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./AxisAlignedBoundingBox-1feb0c48","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./AttributeCompression-0af3c035","./EncodedCartesian3-d4f305ce","./arrayRemoveDuplicates-bb548aa3","./EllipsoidRhumbLine-afd6cd20","./GeometryAttributes-b253752a"],(function(e,t,r,a,o,i,n,s,l,u,p,c,m,y,g,d,h,f,b,v,_,P,x,w,C,T,I){"use strict";var A=new t.Cartographic,E=new t.Cartographic;function G(e,t,r,a){var o=a.cartesianToCartographic(e,A).height,i=a.cartesianToCartographic(t,E);i.height=o,a.cartographicToCartesian(i,t);var n=a.cartesianToCartographic(r,E);n.height=o-100,a.cartographicToCartesian(n,r)}var O=new o.BoundingRectangle,V=new t.Cartesian3,F=new t.Cartesian3,D=new t.Cartesian3,L=new t.Cartesian3,N=new t.Cartesian3,H=new t.Cartesian3,R=new t.Cartesian3,M=new t.Cartesian3,S=new t.Cartesian3,B=new t.Cartesian2,k=new t.Cartesian2,z=new t.Cartesian3,W=new i.Quaternion,Y=new t.Matrix3,U=new t.Matrix3;function j(r){var o=r.vertexFormat,n=r.geometry,l=r.shadowVolume,u=n.attributes.position.values,c=u.length,m=r.wall,y=r.top||m,g=r.bottom||m;if(o.st||o.normal||o.tangent||o.bitangent||l){var d=r.boundingRectangle,h=r.tangentPlane,f=r.ellipsoid,b=r.stRotation,v=r.perPositionHeight,_=B;_.x=d.x,_.y=d.y;var P,x=o.st?new Float32Array(c/3*2):void 0;o.normal&&(P=v&&y&&!m?n.attributes.normal.values:new Float32Array(c));var w=o.tangent?new Float32Array(c):void 0,C=o.bitangent?new Float32Array(c):void 0,T=l?new Float32Array(c):void 0,I=0,A=0,E=F,O=D,j=L,Q=!0,q=Y,K=U;if(0!==b){var Z=i.Quaternion.fromAxisAngle(h._plane.normal,b,W);q=t.Matrix3.fromQuaternion(Z,q),Z=i.Quaternion.fromAxisAngle(h._plane.normal,-b,W),K=t.Matrix3.fromQuaternion(Z,K)}else q=t.Matrix3.clone(t.Matrix3.IDENTITY,q),K=t.Matrix3.clone(t.Matrix3.IDENTITY,K);var J=0,X=0;y&&g&&(J=c/2,X=c/3,c/=2);for(var $=0;$<c;$+=3){var ee=t.Cartesian3.fromArray(u,$,z);if(o.st){var te=t.Matrix3.multiplyByVector(q,ee,V);te=f.scaleToGeodeticSurface(te,te);var re=h.projectPointOntoPlane(te,k);t.Cartesian2.subtract(re,_,re);var ae=s.CesiumMath.clamp(re.x/d.width,0,1),oe=s.CesiumMath.clamp(re.y/d.height,0,1);g&&(x[I+X]=ae,x[I+1+X]=oe),y&&(x[I]=ae,x[I+1]=oe),I+=2}if(o.normal||o.tangent||o.bitangent||l){var ie=A+1,ne=A+2;if(m){if($+3<c){var se=t.Cartesian3.fromArray(u,$+3,N);if(Q){var le=t.Cartesian3.fromArray(u,$+c,H);v&&G(ee,se,le,f),t.Cartesian3.subtract(se,ee,se),t.Cartesian3.subtract(le,ee,le),E=t.Cartesian3.normalize(t.Cartesian3.cross(le,se,E),E),Q=!1}t.Cartesian3.equalsEpsilon(se,ee,s.CesiumMath.EPSILON10)&&(Q=!0)}(o.tangent||o.bitangent)&&(j=f.geodeticSurfaceNormal(ee,j),o.tangent&&(O=t.Cartesian3.normalize(t.Cartesian3.cross(j,E,O),O)))}else E=f.geodeticSurfaceNormal(ee,E),(o.tangent||o.bitangent)&&(v&&(R=t.Cartesian3.fromArray(P,A,R),M=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,R,M),M=t.Cartesian3.normalize(t.Matrix3.multiplyByVector(K,M,M),M),o.bitangent&&(S=t.Cartesian3.normalize(t.Cartesian3.cross(R,M,S),S))),O=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,E,O),O=t.Cartesian3.normalize(t.Matrix3.multiplyByVector(K,O,O),O),o.bitangent&&(j=t.Cartesian3.normalize(t.Cartesian3.cross(E,O,j),j)));o.normal&&(r.wall?(P[A+J]=E.x,P[ie+J]=E.y,P[ne+J]=E.z):g&&(P[A+J]=-E.x,P[ie+J]=-E.y,P[ne+J]=-E.z),(y&&!v||m)&&(P[A]=E.x,P[ie]=E.y,P[ne]=E.z)),l&&(m&&(E=f.geodeticSurfaceNormal(ee,E)),T[A+J]=-E.x,T[ie+J]=-E.y,T[ne+J]=-E.z),o.tangent&&(r.wall?(w[A+J]=O.x,w[ie+J]=O.y,w[ne+J]=O.z):g&&(w[A+J]=-O.x,w[ie+J]=-O.y,w[ne+J]=-O.z),y&&(v?(w[A]=M.x,w[ie]=M.y,w[ne]=M.z):(w[A]=O.x,w[ie]=O.y,w[ne]=O.z))),o.bitangent&&(g&&(C[A+J]=j.x,C[ie+J]=j.y,C[ne+J]=j.z),y&&(v?(C[A]=S.x,C[ie]=S.y,C[ne]=S.z):(C[A]=j.x,C[ie]=j.y,C[ne]=j.z))),A+=3}}o.st&&(n.attributes.st=new p.GeometryAttribute({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:x})),o.normal&&(n.attributes.normal=new p.GeometryAttribute({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:P})),o.tangent&&(n.attributes.tangent=new p.GeometryAttribute({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:w})),o.bitangent&&(n.attributes.bitangent=new p.GeometryAttribute({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:C})),l&&(n.attributes.extrudeDirection=new p.GeometryAttribute({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:T}))}if(r.extrude&&e.defined(r.offsetAttribute)){var ue=u.length/3,pe=new Uint8Array(ue);if(r.offsetAttribute===a.GeometryOffsetAttribute.TOP)y&&g||m?pe=a.arrayFill(pe,1,0,ue/2):y&&(pe=a.arrayFill(pe,1));else{var ce=r.offsetAttribute===a.GeometryOffsetAttribute.NONE?0:1;pe=a.arrayFill(pe,ce)}n.attributes.applyOffset=new p.GeometryAttribute({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:pe})}return n}var Q=new t.Cartographic,q=new t.Cartographic,K={westOverIDL:0,eastOverIDL:0},Z=new l.EllipsoidGeodesic;function J(a,o,i,n,u){if(u=e.defaultValue(u,new t.Rectangle),!e.defined(a)||a.length<3)return u.west=0,u.north=0,u.south=0,u.east=0,u;if(i===r.ArcType.RHUMB)return t.Rectangle.fromCartesianArray(a,o,u);Z.ellipsoid.equals(o)||(Z=new l.EllipsoidGeodesic(void 0,void 0,o)),u.west=Number.POSITIVE_INFINITY,u.east=Number.NEGATIVE_INFINITY,u.south=Number.POSITIVE_INFINITY,u.north=Number.NEGATIVE_INFINITY,K.westOverIDL=Number.POSITIVE_INFINITY,K.eastOverIDL=Number.NEGATIVE_INFINITY;for(var p,c=1/s.CesiumMath.chordLength(n,o.maximumRadius),m=a.length,y=o.cartesianToCartographic(a[0],q),g=Q,d=1;d<m;d++)p=g,g=y,y=o.cartesianToCartographic(a[d],p),Z.setEndPoints(g,y),$(Z,c,u,K);return p=g,g=y,y=o.cartesianToCartographic(a[0],p),Z.setEndPoints(g,y),$(Z,c,u,K),u.east-u.west>K.eastOverIDL-K.westOverIDL&&(u.west=K.westOverIDL,u.east=K.eastOverIDL,u.east>s.CesiumMath.PI&&(u.east=u.east-s.CesiumMath.TWO_PI),u.west>s.CesiumMath.PI&&(u.west=u.west-s.CesiumMath.TWO_PI)),u}var X=new t.Cartographic;function $(e,t,r,a){for(var o=e.surfaceDistance,i=Math.ceil(o*t),n=i>0?o/(i-1):Number.POSITIVE_INFINITY,l=0,u=0;u<i;u++){var p=e.interpolateUsingSurfaceDistance(l,X);l+=n;var c=p.longitude,m=p.latitude;r.west=Math.min(r.west,c),r.east=Math.max(r.east,c),r.south=Math.min(r.south,m),r.north=Math.max(r.north,m);var y=c>=0?c:c+s.CesiumMath.TWO_PI;a.westOverIDL=Math.min(a.westOverIDL,y),a.eastOverIDL=Math.max(a.eastOverIDL,y)}}var ee=[];function te(e,t,r,a,o,i,n,s,l){var p,m={walls:[]};if(i||n){var h,f,b=g.PolygonGeometryLibrary.createGeometryFromPositions(e,t,r,o,s,l),v=b.attributes.position.values,_=b.indices;if(i&&n){var P=v.concat(v);h=P.length/3,(f=y.IndexDatatype.createTypedArray(h,2*_.length)).set(_);var x=_.length,w=h/2;for(p=0;p<x;p+=3){var C=f[p]+w,T=f[p+1]+w,I=f[p+2]+w;f[p+x]=I,f[p+1+x]=T,f[p+2+x]=C}if(b.attributes.position.values=P,o&&s.normal){var A=b.attributes.normal.values;b.attributes.normal.values=new Float32Array(P.length),b.attributes.normal.values.set(A)}b.indices=f}else if(n){for(h=v.length/3,f=y.IndexDatatype.createTypedArray(h,_.length),p=0;p<_.length;p+=3)f[p]=_[p+2],f[p+1]=_[p+1],f[p+2]=_[p];b.indices=f}m.topAndBottom=new c.GeometryInstance({geometry:b})}var E=a.outerRing,G=u.EllipsoidTangentPlane.fromPoints(E,e),O=G.projectPointsOntoPlane(E,ee),V=d.PolygonPipeline.computeWindingOrder2D(O);V===d.WindingOrder.CLOCKWISE&&(E=E.slice().reverse());var F=g.PolygonGeometryLibrary.computeWallGeometry(E,e,r,o,l);m.walls.push(new c.GeometryInstance({geometry:F}));var D=a.holes;for(p=0;p<D.length;p++){var L=D[p];O=(G=u.EllipsoidTangentPlane.fromPoints(L,e)).projectPointsOntoPlane(L,ee),(V=d.PolygonPipeline.computeWindingOrder2D(O))===d.WindingOrder.COUNTER_CLOCKWISE&&(L=L.slice().reverse()),F=g.PolygonGeometryLibrary.computeWallGeometry(L,e,r,o,l),m.walls.push(new c.GeometryInstance({geometry:F}))}return m}function re(a){var o=a.polygonHierarchy,i=e.defaultValue(a.vertexFormat,h.VertexFormat.DEFAULT),n=e.defaultValue(a.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(a.granularity,s.CesiumMath.RADIANS_PER_DEGREE),u=e.defaultValue(a.stRotation,0),p=e.defaultValue(a.perPositionHeight,!1),c=p&&e.defined(a.extrudedHeight),m=e.defaultValue(a.height,0),y=e.defaultValue(a.extrudedHeight,m);if(!c){var d=Math.max(m,y);y=Math.min(m,y),m=d}this._vertexFormat=h.VertexFormat.clone(i),this._ellipsoid=t.Ellipsoid.clone(n),this._granularity=l,this._stRotation=u,this._height=m,this._extrudedHeight=y,this._closeTop=e.defaultValue(a.closeTop,!0),this._closeBottom=e.defaultValue(a.closeBottom,!0),this._polygonHierarchy=o,this._perPositionHeight=p,this._perPositionHeightExtrude=c,this._shadowVolume=e.defaultValue(a.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=a.offsetAttribute,this._arcType=e.defaultValue(a.arcType,r.ArcType.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this.packedLength=g.PolygonGeometryLibrary.computeHierarchyPackedLength(o)+t.Ellipsoid.packedLength+h.VertexFormat.packedLength+12}re.fromPositions=function(t){return new re({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType})},re.pack=function(r,a,o){return o=e.defaultValue(o,0),o=g.PolygonGeometryLibrary.packPolygonHierarchy(r._polygonHierarchy,a,o),t.Ellipsoid.pack(r._ellipsoid,a,o),o+=t.Ellipsoid.packedLength,h.VertexFormat.pack(r._vertexFormat,a,o),o+=h.VertexFormat.packedLength,a[o++]=r._height,a[o++]=r._extrudedHeight,a[o++]=r._granularity,a[o++]=r._stRotation,a[o++]=r._perPositionHeightExtrude?1:0,a[o++]=r._perPositionHeight?1:0,a[o++]=r._closeTop?1:0,a[o++]=r._closeBottom?1:0,a[o++]=r._shadowVolume?1:0,a[o++]=e.defaultValue(r._offsetAttribute,-1),a[o++]=r._arcType,a[o]=r.packedLength,a};var ae=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),oe=new h.VertexFormat,ie={polygonHierarchy:{}};return re.unpack=function(r,a,o){a=e.defaultValue(a,0);var i=g.PolygonGeometryLibrary.unpackPolygonHierarchy(r,a);a=i.startingIndex,delete i.startingIndex;var n=t.Ellipsoid.unpack(r,a,ae);a+=t.Ellipsoid.packedLength;var s=h.VertexFormat.unpack(r,a,oe);a+=h.VertexFormat.packedLength;var l=r[a++],u=r[a++],p=r[a++],c=r[a++],m=1===r[a++],y=1===r[a++],d=1===r[a++],f=1===r[a++],b=1===r[a++],v=r[a++],_=r[a++],P=r[a];return e.defined(o)||(o=new re(ie)),o._polygonHierarchy=i,o._ellipsoid=t.Ellipsoid.clone(n,o._ellipsoid),o._vertexFormat=h.VertexFormat.clone(s,o._vertexFormat),o._height=l,o._extrudedHeight=u,o._granularity=p,o._stRotation=c,o._perPositionHeightExtrude=m,o._perPositionHeight=y,o._closeTop=d,o._closeBottom=f,o._shadowVolume=b,o._offsetAttribute=-1===v?void 0:v,o._arcType=_,o.packedLength=P,o},re.computeRectangle=function(a,o){var i=e.defaultValue(a.granularity,s.CesiumMath.RADIANS_PER_DEGREE),n=e.defaultValue(a.arcType,r.ArcType.GEODESIC),l=a.polygonHierarchy,u=e.defaultValue(a.ellipsoid,t.Ellipsoid.WGS84);return J(l.positions,u,n,i,o)},re.createGeometry=function(t){var r=t._vertexFormat,o=t._ellipsoid,n=t._granularity,l=t._stRotation,h=t._polygonHierarchy,f=t._perPositionHeight,b=t._closeTop,v=t._closeBottom,_=t._arcType,P=h.positions;if(!(P.length<3)){var x=u.EllipsoidTangentPlane.fromPoints(P,o),w=g.PolygonGeometryLibrary.polygonsFromHierarchy(h,x.projectPointsOntoPlane.bind(x),!f,o),C=w.hierarchy,T=w.polygons;if(0!==C.length){P=C[0].outerRing;var I,A=g.PolygonGeometryLibrary.computeBoundingRectangle(x.plane.normal,x.projectPointOntoPlane.bind(x),P,l,O),E=[],G=t._height,V=t._extrudedHeight,F={perPositionHeight:f,vertexFormat:r,geometry:void 0,tangentPlane:x,boundingRectangle:A,ellipsoid:o,stRotation:l,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:_};if(t._perPositionHeightExtrude||!s.CesiumMath.equalsEpsilon(G,V,0,s.CesiumMath.EPSILON2))for(F.extrude=!0,F.top=b,F.bottom=v,F.shadowVolume=t._shadowVolume,F.offsetAttribute=t._offsetAttribute,I=0;I<T.length;I++){var D,L=te(o,T[I],n,C[I],f,b,v,r,_);b&&v?(D=L.topAndBottom,F.geometry=g.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(D.geometry,G,V,o,f)):b?((D=L.topAndBottom).geometry.attributes.position.values=d.PolygonPipeline.scaleToGeodeticHeight(D.geometry.attributes.position.values,G,o,!f),F.geometry=D.geometry):v&&((D=L.topAndBottom).geometry.attributes.position.values=d.PolygonPipeline.scaleToGeodeticHeight(D.geometry.attributes.position.values,V,o,!0),F.geometry=D.geometry),(b||v)&&(F.wall=!1,D.geometry=j(F),E.push(D));var N=L.walls;F.wall=!0;for(var H=0;H<N.length;H++){var R=N[H];F.geometry=g.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(R.geometry,G,V,o,f),R.geometry=j(F),E.push(R)}}else for(I=0;I<T.length;I++){var M=new c.GeometryInstance({geometry:g.PolygonGeometryLibrary.createGeometryFromPositions(o,T[I],n,f,r,_)});if(M.geometry.attributes.position.values=d.PolygonPipeline.scaleToGeodeticHeight(M.geometry.attributes.position.values,G,o,!f),F.geometry=M.geometry,M.geometry=j(F),e.defined(t._offsetAttribute)){var S=M.geometry.attributes.position.values.length,B=new Uint8Array(S/3),k=t._offsetAttribute===a.GeometryOffsetAttribute.NONE?0:1;a.arrayFill(B,k),M.geometry.attributes.applyOffset=new p.GeometryAttribute({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}E.push(M)}var z=m.GeometryPipeline.combineInstances(E)[0];z.attributes.position.values=new Float64Array(z.attributes.position.values),z.indices=y.IndexDatatype.createTypedArray(z.attributes.position.values.length/3,z.indices);var W=z.attributes,Y=i.BoundingSphere.fromVertices(W.position.values);return r.position||delete W.position,new p.Geometry({attributes:W,indices:z.indices,primitiveType:z.primitiveType,boundingSphere:Y,offsetAttribute:t._offsetAttribute})}}},re.createShadowVolume=function(e,t,r){var a=e._granularity,o=e._ellipsoid,i=t(a,o),n=r(a,o);return new re({polygonHierarchy:e._polygonHierarchy,ellipsoid:o,stRotation:e._stRotation,granularity:a,perPositionHeight:!1,extrudedHeight:i,height:n,vertexFormat:h.VertexFormat.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(re.prototype,{rectangle:{get:function(){if(!e.defined(this._rectangle)){var t=this._polygonHierarchy.positions;this._rectangle=J(t,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){var t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];var r=e._ellipsoid,a=e._polygonHierarchy.positions,o=e.rectangle;return p.Geometry._textureCoordinateRotationPoints(a,t,r,o)}(this)),this._textureCoordinateRotationPoints}}}),function(r,a){return e.defined(a)&&(r=re.unpack(r,a)),r._ellipsoid=t.Ellipsoid.clone(r._ellipsoid),re.createGeometry(r)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Cartesian2-40b13f31","./ArcType-1da7fdca","./GeometryOffsetAttribute-964ec9ef","./Transforms-70f396e0","./Check-3917d765","./ComponentDatatype-6c2e43c1","./EllipsoidTangentPlane-66f520e3","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./GeometryInstance-5c9d46a4","./GeometryPipeline-d4d3acd7","./IndexDatatype-b42089ce","./Math-87254c13","./PolygonGeometryLibrary-c09bef45","./PolygonPipeline-5dc6dac0","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./AxisAlignedBoundingBox-445c3009","./IntersectionTests-587a744a","./Plane-9d4e3328","./AttributeCompression-56959beb","./EncodedCartesian3-942c4568","./arrayRemoveDuplicates-47b233f1","./EllipsoidRhumbLine-6baec512"],function(m,d,E,b,P,e,A,_,v,G,L,T,H,C,O,x,t,i,r,o,n,a,l,s,y,u){"use strict";var D=[],I=[];function c(e){var t,i=e.polygonHierarchy,r=m.defaultValue(e.ellipsoid,d.Ellipsoid.WGS84),o=m.defaultValue(e.granularity,C.CesiumMath.RADIANS_PER_DEGREE),n=m.defaultValue(e.perPositionHeight,!1),a=n&&m.defined(e.extrudedHeight),l=m.defaultValue(e.arcType,E.ArcType.GEODESIC),s=m.defaultValue(e.height,0),y=m.defaultValue(e.extrudedHeight,s);a||(t=Math.max(s,y),y=Math.min(s,y),s=t),this._ellipsoid=d.Ellipsoid.clone(r),this._granularity=o,this._height=s,this._extrudedHeight=y,this._arcType=l,this._polygonHierarchy=i,this._perPositionHeight=n,this._perPositionHeightExtrude=a,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=O.PolygonGeometryLibrary.computeHierarchyPackedLength(i)+d.Ellipsoid.packedLength+8}c.pack=function(e,t,i){return i=m.defaultValue(i,0),i=O.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,i),d.Ellipsoid.pack(e._ellipsoid,t,i),i+=d.Ellipsoid.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._arcType,t[i++]=m.defaultValue(e._offsetAttribute,-1),t[i]=e.packedLength,t};var g=d.Ellipsoid.clone(d.Ellipsoid.UNIT_SPHERE),f={polygonHierarchy:{}};return c.unpack=function(e,t,i){t=m.defaultValue(t,0);var r=O.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=r.startingIndex,delete r.startingIndex;var o=d.Ellipsoid.unpack(e,t,g);t+=d.Ellipsoid.packedLength;var n=e[t++],a=e[t++],l=e[t++],s=1===e[t++],y=1===e[t++],u=e[t++],p=e[t++],t=e[t];return(i=!m.defined(i)?new c(f):i)._polygonHierarchy=r,i._ellipsoid=d.Ellipsoid.clone(o,i._ellipsoid),i._height=n,i._extrudedHeight=a,i._granularity=l,i._perPositionHeight=y,i._perPositionHeightExtrude=s,i._arcType=u,i._offsetAttribute=-1===p?void 0:p,i.packedLength=t,i},c.fromPositions=function(e){return new c({polygonHierarchy:{positions:(e=m.defaultValue(e,m.defaultValue.EMPTY_OBJECT)).positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute})},c.createGeometry=function(e){var t=e._ellipsoid,i=e._granularity,r=e._polygonHierarchy,o=e._perPositionHeight,n=e._arcType,a=O.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(r,!o,t);if(0!==a.length){var l,s,y,u,p,d,c=[],g=C.CesiumMath.chordLength(i,t.maximumRadius),f=e._height,h=e._extrudedHeight;if(e._perPositionHeightExtrude||!C.CesiumMath.equalsEpsilon(f,h,0,C.CesiumMath.EPSILON2))for(l=0;l<a.length;l++)(u=function(e,t,i,r,o){var n,a=_.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,D);x.PolygonPipeline.computeWindingOrder2D(a)===x.WindingOrder.CLOCKWISE&&(a.reverse(),t=t.slice().reverse());var l=t.length,s=new Array(l),y=0;if(r)for(n=new Float64Array(2*l*3*2),b=0;b<l;++b){s[b]=y/3;var u=t[b],p=t[(b+1)%l];n[y++]=u.x,n[y++]=u.y,n[y++]=u.z,n[y++]=p.x,n[y++]=p.y,n[y++]=p.z}else{var d,c=0;if(o===E.ArcType.GEODESIC)for(b=0;b<l;b++)c+=O.PolygonGeometryLibrary.subdivideLineCount(t[b],t[(b+1)%l],i);else if(o===E.ArcType.RHUMB)for(b=0;b<l;b++)c+=O.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[b],t[(b+1)%l],i);for(n=new Float64Array(3*c*2),b=0;b<l;++b){s[b]=y/3,o===E.ArcType.GEODESIC?d=O.PolygonGeometryLibrary.subdivideLine(t[b],t[(b+1)%l],i,I):o===E.ArcType.RHUMB&&(d=O.PolygonGeometryLibrary.subdivideRhumbLine(e,t[b],t[(b+1)%l],i,I));for(var g=d.length,f=0;f<g;++f)n[y++]=d[f]}}for(var l=n.length/6,h=s.length,m=H.IndexDatatype.createTypedArray(l+h,2*(2*l+h)),y=0,b=0;b<l;++b)m[y++]=b,m[y++]=(b+1)%l,m[y++]=b+l,m[y++]=(b+1)%l+l;for(b=0;b<h;b++){var P=s[b];m[y++]=P,m[y++]=P+l}return new L.GeometryInstance({geometry:new v.Geometry({attributes:new G.GeometryAttributes({position:new v.GeometryAttribute({componentDatatype:A.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})}),indices:m,primitiveType:v.PrimitiveType.LINES})})}(t,a[l],g,o,n)).geometry=O.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(u.geometry,f,h,t,o),m.defined(e._offsetAttribute)&&(s=u.geometry.attributes.position.values.length/3,y=new Uint8Array(s),y=e._offsetAttribute===b.GeometryOffsetAttribute.TOP?b.arrayFill(y,1,0,s/2):(d=e._offsetAttribute===b.GeometryOffsetAttribute.NONE?0:1,b.arrayFill(y,d)),u.geometry.attributes.applyOffset=new v.GeometryAttribute({componentDatatype:A.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})),c.push(u);else for(l=0;l<a.length;l++)(u=function(e,t,i,r,o){var n,a=_.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,D);x.PolygonPipeline.computeWindingOrder2D(a)===x.WindingOrder.CLOCKWISE&&(a.reverse(),t=t.slice().reverse());var l=t.length,s=0;if(r)for(n=new Float64Array(2*l*3),h=0;h<l;h++){var y=t[h],u=t[(h+1)%l];n[s++]=y.x,n[s++]=y.y,n[s++]=y.z,n[s++]=u.x,n[s++]=u.y,n[s++]=u.z}else{var p,d=0;if(o===E.ArcType.GEODESIC)for(h=0;h<l;h++)d+=O.PolygonGeometryLibrary.subdivideLineCount(t[h],t[(h+1)%l],i);else if(o===E.ArcType.RHUMB)for(h=0;h<l;h++)d+=O.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[h],t[(h+1)%l],i);for(n=new Float64Array(3*d),h=0;h<l;h++){o===E.ArcType.GEODESIC?p=O.PolygonGeometryLibrary.subdivideLine(t[h],t[(h+1)%l],i,I):o===E.ArcType.RHUMB&&(p=O.PolygonGeometryLibrary.subdivideRhumbLine(e,t[h],t[(h+1)%l],i,I));for(var c=p.length,g=0;g<c;++g)n[s++]=p[g]}}for(var l=n.length/3,f=H.IndexDatatype.createTypedArray(l,2*l),s=0,h=0;h<l-1;h++)f[s++]=h,f[s++]=h+1;return f[s++]=l-1,f[s++]=0,new L.GeometryInstance({geometry:new v.Geometry({attributes:new G.GeometryAttributes({position:new v.GeometryAttribute({componentDatatype:A.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})}),indices:f,primitiveType:v.PrimitiveType.LINES})})}(t,a[l],g,o,n)).geometry.attributes.position.values=x.PolygonPipeline.scaleToGeodeticHeight(u.geometry.attributes.position.values,f,t,!o),m.defined(e._offsetAttribute)&&(p=u.geometry.attributes.position.values.length,p=new Uint8Array(p/3),d=e._offsetAttribute===b.GeometryOffsetAttribute.NONE?0:1,b.arrayFill(p,d),u.geometry.attributes.applyOffset=new v.GeometryAttribute({componentDatatype:A.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})),c.push(u);r=T.GeometryPipeline.combineInstances(c)[0],i=P.BoundingSphere.fromVertices(r.attributes.position.values);return new v.Geometry({attributes:r.attributes,indices:r.indices,primitiveType:r.primitiveType,boundingSphere:i,offsetAttribute:e._offsetAttribute})}},function(e,t){return(e=m.defined(t)?c.unpack(e,t):e)._ellipsoid=d.Ellipsoid.clone(e._ellipsoid),c.createGeometry(e)}}); | ||
define(["./when-229515d6","./Matrix2-f2da41d4","./ArcType-1da7fdca","./GeometryOffsetAttribute-ff1e192c","./Transforms-7cd3197b","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./EllipsoidTangentPlane-b27cd2f7","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./GeometryInstance-16601d2a","./GeometryPipeline-5b3fba53","./IndexDatatype-b10faa0b","./PolygonGeometryLibrary-f129e954","./PolygonPipeline-5582b1ec","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./AxisAlignedBoundingBox-1feb0c48","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./AttributeCompression-0af3c035","./EncodedCartesian3-d4f305ce","./arrayRemoveDuplicates-bb548aa3","./EllipsoidRhumbLine-afd6cd20"],(function(e,t,i,r,o,n,a,l,s,y,u,p,d,f,g,c,m,h,b,P,v,E,A,_){"use strict";var G=[],L=[];function T(e,t,r,o,n){var p,c,m=l.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,G);g.PolygonPipeline.computeWindingOrder2D(m)===g.WindingOrder.CLOCKWISE&&(m.reverse(),t=t.slice().reverse());var h=t.length,b=0;if(o)for(p=new Float64Array(2*h*3),c=0;c<h;c++){var P=t[c],v=t[(c+1)%h];p[b++]=P.x,p[b++]=P.y,p[b++]=P.z,p[b++]=v.x,p[b++]=v.y,p[b++]=v.z}else{var E=0;if(n===i.ArcType.GEODESIC)for(c=0;c<h;c++)E+=f.PolygonGeometryLibrary.subdivideLineCount(t[c],t[(c+1)%h],r);else if(n===i.ArcType.RHUMB)for(c=0;c<h;c++)E+=f.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[c],t[(c+1)%h],r);for(p=new Float64Array(3*E),c=0;c<h;c++){var A;n===i.ArcType.GEODESIC?A=f.PolygonGeometryLibrary.subdivideLine(t[c],t[(c+1)%h],r,L):n===i.ArcType.RHUMB&&(A=f.PolygonGeometryLibrary.subdivideRhumbLine(e,t[c],t[(c+1)%h],r,L));for(var _=A.length,T=0;T<_;++T)p[b++]=A[T]}}var H=2*(h=p.length/3),O=d.IndexDatatype.createTypedArray(h,H);for(b=0,c=0;c<h-1;c++)O[b++]=c,O[b++]=c+1;return O[b++]=h-1,O[b++]=0,new u.GeometryInstance({geometry:new s.Geometry({attributes:new y.GeometryAttributes({position:new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})}),indices:O,primitiveType:s.PrimitiveType.LINES})})}function H(e,t,r,o,n){var p,c,m=l.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,G);g.PolygonPipeline.computeWindingOrder2D(m)===g.WindingOrder.CLOCKWISE&&(m.reverse(),t=t.slice().reverse());var h=t.length,b=new Array(h),P=0;if(o)for(p=new Float64Array(2*h*3*2),c=0;c<h;++c){b[c]=P/3;var v=t[c],E=t[(c+1)%h];p[P++]=v.x,p[P++]=v.y,p[P++]=v.z,p[P++]=E.x,p[P++]=E.y,p[P++]=E.z}else{var A=0;if(n===i.ArcType.GEODESIC)for(c=0;c<h;c++)A+=f.PolygonGeometryLibrary.subdivideLineCount(t[c],t[(c+1)%h],r);else if(n===i.ArcType.RHUMB)for(c=0;c<h;c++)A+=f.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[c],t[(c+1)%h],r);for(p=new Float64Array(3*A*2),c=0;c<h;++c){var _;b[c]=P/3,n===i.ArcType.GEODESIC?_=f.PolygonGeometryLibrary.subdivideLine(t[c],t[(c+1)%h],r,L):n===i.ArcType.RHUMB&&(_=f.PolygonGeometryLibrary.subdivideRhumbLine(e,t[c],t[(c+1)%h],r,L));for(var T=_.length,H=0;H<T;++H)p[P++]=_[H]}}h=p.length/6;var O=b.length,x=2*(2*h+O),C=d.IndexDatatype.createTypedArray(h+O,x);for(P=0,c=0;c<h;++c)C[P++]=c,C[P++]=(c+1)%h,C[P++]=c+h,C[P++]=(c+1)%h+h;for(c=0;c<O;c++){var D=b[c];C[P++]=D,C[P++]=D+h}return new u.GeometryInstance({geometry:new s.Geometry({attributes:new y.GeometryAttributes({position:new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})}),indices:C,primitiveType:s.PrimitiveType.LINES})})}function O(r){var o=r.polygonHierarchy,n=e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(r.granularity,a.CesiumMath.RADIANS_PER_DEGREE),s=e.defaultValue(r.perPositionHeight,!1),y=s&&e.defined(r.extrudedHeight),u=e.defaultValue(r.arcType,i.ArcType.GEODESIC),p=e.defaultValue(r.height,0),d=e.defaultValue(r.extrudedHeight,p);if(!y){var g=Math.max(p,d);d=Math.min(p,d),p=g}this._ellipsoid=t.Ellipsoid.clone(n),this._granularity=l,this._height=p,this._extrudedHeight=d,this._arcType=u,this._polygonHierarchy=o,this._perPositionHeight=s,this._perPositionHeightExtrude=y,this._offsetAttribute=r.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=f.PolygonGeometryLibrary.computeHierarchyPackedLength(o)+t.Ellipsoid.packedLength+8}O.pack=function(i,r,o){return o=e.defaultValue(o,0),o=f.PolygonGeometryLibrary.packPolygonHierarchy(i._polygonHierarchy,r,o),t.Ellipsoid.pack(i._ellipsoid,r,o),o+=t.Ellipsoid.packedLength,r[o++]=i._height,r[o++]=i._extrudedHeight,r[o++]=i._granularity,r[o++]=i._perPositionHeightExtrude?1:0,r[o++]=i._perPositionHeight?1:0,r[o++]=i._arcType,r[o++]=e.defaultValue(i._offsetAttribute,-1),r[o]=i.packedLength,r};var x=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),C={polygonHierarchy:{}};return O.unpack=function(i,r,o){r=e.defaultValue(r,0);var n=f.PolygonGeometryLibrary.unpackPolygonHierarchy(i,r);r=n.startingIndex,delete n.startingIndex;var a=t.Ellipsoid.unpack(i,r,x);r+=t.Ellipsoid.packedLength;var l=i[r++],s=i[r++],y=i[r++],u=1===i[r++],p=1===i[r++],d=i[r++],g=i[r++],c=i[r];return e.defined(o)||(o=new O(C)),o._polygonHierarchy=n,o._ellipsoid=t.Ellipsoid.clone(a,o._ellipsoid),o._height=l,o._extrudedHeight=s,o._granularity=y,o._perPositionHeight=p,o._perPositionHeightExtrude=u,o._arcType=d,o._offsetAttribute=-1===g?void 0:g,o.packedLength=c,o},O.fromPositions=function(t){return new O({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,arcType:t.arcType,offsetAttribute:t.offsetAttribute})},O.createGeometry=function(t){var i=t._ellipsoid,n=t._granularity,l=t._polygonHierarchy,y=t._perPositionHeight,u=t._arcType,d=f.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(l,!y,i);if(0!==d.length){var c,m,h,b=[],P=a.CesiumMath.chordLength(n,i.maximumRadius),v=t._height,E=t._extrudedHeight;if(t._perPositionHeightExtrude||!a.CesiumMath.equalsEpsilon(v,E,0,a.CesiumMath.EPSILON2))for(h=0;h<d.length;h++){if((c=H(i,d[h],P,y,u)).geometry=f.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(c.geometry,v,E,i,y),e.defined(t._offsetAttribute)){var A=c.geometry.attributes.position.values.length/3,_=new Uint8Array(A);t._offsetAttribute===r.GeometryOffsetAttribute.TOP?_=r.arrayFill(_,1,0,A/2):(m=t._offsetAttribute===r.GeometryOffsetAttribute.NONE?0:1,_=r.arrayFill(_,m)),c.geometry.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}b.push(c)}else for(h=0;h<d.length;h++){if((c=T(i,d[h],P,y,u)).geometry.attributes.position.values=g.PolygonPipeline.scaleToGeodeticHeight(c.geometry.attributes.position.values,v,i,!y),e.defined(t._offsetAttribute)){var G=c.geometry.attributes.position.values.length,L=new Uint8Array(G/3);m=t._offsetAttribute===r.GeometryOffsetAttribute.NONE?0:1,r.arrayFill(L,m),c.geometry.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}b.push(c)}var O=p.GeometryPipeline.combineInstances(b)[0],x=o.BoundingSphere.fromVertices(O.attributes.position.values);return new s.Geometry({attributes:O.attributes,indices:O.indices,primitiveType:O.primitiveType,boundingSphere:x,offsetAttribute:t._offsetAttribute})}},function(i,r){return e.defined(r)&&(i=O.unpack(i,r)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),O.createGeometry(i)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Cartesian2-40b13f31","./ArcType-1da7fdca","./arrayRemoveDuplicates-47b233f1","./Transforms-70f396e0","./Color-16798d78","./ComponentDatatype-6c2e43c1","./Check-3917d765","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce","./Math-87254c13","./PolylinePipeline-ff2b6881","./VertexFormat-8d463a4f","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./EllipsoidGeodesic-bdbae7c8","./EllipsoidRhumbLine-6baec512","./IntersectionTests-587a744a","./Plane-9d4e3328"],function(J,j,K,Q,X,Z,$,e,ee,te,re,ae,oe,y,t,r,a,o,n,i,l){"use strict";var ne=[];function m(e){var t=(e=J.defaultValue(e,J.defaultValue.EMPTY_OBJECT)).positions,r=e.colors,a=J.defaultValue(e.width,1),o=J.defaultValue(e.colorsPerVertex,!1);this._positions=t,this._colors=r,this._width=a,this._colorsPerVertex=o,this._vertexFormat=y.VertexFormat.clone(J.defaultValue(e.vertexFormat,y.VertexFormat.DEFAULT)),this._arcType=J.defaultValue(e.arcType,K.ArcType.GEODESIC),this._granularity=J.defaultValue(e.granularity,ae.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=j.Ellipsoid.clone(J.defaultValue(e.ellipsoid,j.Ellipsoid.WGS84)),this._workerName="createPolylineGeometry";t=1+t.length*j.Cartesian3.packedLength;t+=J.defined(r)?1+r.length*Z.Color.packedLength:1,this.packedLength=t+j.Ellipsoid.packedLength+y.VertexFormat.packedLength+4}m.pack=function(e,t,r){var a;r=J.defaultValue(r,0);var o=e._positions,n=o.length;for(t[r++]=n,a=0;a<n;++a,r+=j.Cartesian3.packedLength)j.Cartesian3.pack(o[a],t,r);var i=e._colors,n=J.defined(i)?i.length:0;for(t[r++]=n,a=0;a<n;++a,r+=Z.Color.packedLength)Z.Color.pack(i[a],t,r);return j.Ellipsoid.pack(e._ellipsoid,t,r),r+=j.Ellipsoid.packedLength,y.VertexFormat.pack(e._vertexFormat,t,r),r+=y.VertexFormat.packedLength,t[r++]=e._width,t[r++]=e._colorsPerVertex?1:0,t[r++]=e._arcType,t[r]=e._granularity,t};var f=j.Ellipsoid.clone(j.Ellipsoid.UNIT_SPHERE),h=new y.VertexFormat,C={positions:void 0,colors:void 0,ellipsoid:f,vertexFormat:h,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};m.unpack=function(e,t,r){t=J.defaultValue(t,0);for(var a=e[t++],o=new Array(a),n=0;n<a;++n,t+=j.Cartesian3.packedLength)o[n]=j.Cartesian3.unpack(e,t);var i=0<(a=e[t++])?new Array(a):void 0;for(n=0;n<a;++n,t+=Z.Color.packedLength)i[n]=Z.Color.unpack(e,t);var l=j.Ellipsoid.unpack(e,t,f);t+=j.Ellipsoid.packedLength;var s=y.VertexFormat.unpack(e,t,h);t+=y.VertexFormat.packedLength;var p=e[t++],c=1===e[t++],d=e[t++],u=e[t];return J.defined(r)?(r._positions=o,r._colors=i,r._ellipsoid=j.Ellipsoid.clone(l,r._ellipsoid),r._vertexFormat=y.VertexFormat.clone(s,r._vertexFormat),r._width=p,r._colorsPerVertex=c,r._arcType=d,r._granularity=u,r):(C.positions=o,C.colors=i,C.width=p,C.colorsPerVertex=c,C.arcType=d,C.granularity=u,new m(C))};var ie=new j.Cartesian3,le=new j.Cartesian3,se=new j.Cartesian3,pe=new j.Cartesian3;return m.createGeometry=function(e){var r,a,t=e._width,o=e._vertexFormat,n=e._colors,i=e._colorsPerVertex,l=e._arcType,s=e._granularity,p=e._ellipsoid,c=[],d=Q.arrayRemoveDuplicates(e._positions,j.Cartesian3.equalsEpsilon,!1,c);if(J.defined(n)&&0<c.length&&(a=c[r=0],n=n.filter(function(e,t){return(i?t!==a&&(0!==t||1!==a):t+1!==a)||(a=c[++r],!1)})),!((T=d.length)<2||t<=0)){if(l===K.ArcType.GEODESIC||l===K.ArcType.RHUMB){var u,y=l===K.ArcType.GEODESIC?(u=ae.CesiumMath.chordLength(s,p.maximumRadius),oe.PolylinePipeline.numberOfPoints):(u=s,oe.PolylinePipeline.numberOfPointsRhumbLine),m=oe.PolylinePipeline.extractHeights(d,p);if(J.defined(n)){for(var f=1,h=0;h<T-1;++h)f+=y(d[h],d[h+1],u);var C=new Array(f),v=0;for(h=0;h<T-1;++h){var g=d[h],_=d[h+1],b=n[h],A=y(g,_,u);if(i&&h<f)for(var E=function(e,t,r){var a=ne;a.length=r;var o=e.red,n=e.green,i=e.blue,l=e.alpha,s=t.red,p=t.green,c=t.blue,d=t.alpha;if(Z.Color.equals(e,t)){for(h=0;h<r;h++)a[h]=Z.Color.clone(e);return a}for(var u=(s-o)/r,y=(p-n)/r,m=(c-i)/r,f=(d-l)/r,h=0;h<r;h++)a[h]=new Z.Color(o+h*u,n+h*y,i+h*m,l+h*f);return a}(b,n[h+1],A),P=E.length,w=0;w<P;++w)C[v++]=E[w];else for(w=0;w<A;++w)C[v++]=Z.Color.clone(b)}C[v]=Z.Color.clone(n[n.length-1]),n=C,ne.length=0}d=l===K.ArcType.GEODESIC?oe.PolylinePipeline.generateCartesianArc({positions:d,minDistance:u,ellipsoid:p,height:m}):oe.PolylinePipeline.generateCartesianRhumbArc({positions:d,granularity:u,ellipsoid:p,height:m})}var T,x,k,D,p=4*(T=d.length)-4,V=new Float64Array(3*p),L=new Float64Array(3*p),F=new Float64Array(3*p),G=new Float32Array(2*p),O=o.st?new Float32Array(2*p):void 0,R=J.defined(n)?new Uint8Array(4*p):void 0,I=0,S=0,B=0,U=0;for(w=0;w<T;++w){0===w?(j.Cartesian3.subtract(d[0],d[1],x=ie),j.Cartesian3.add(d[0],x,x)):x=d[w-1],j.Cartesian3.clone(x,se),j.Cartesian3.clone(d[w],le),w===T-1?(j.Cartesian3.subtract(d[T-1],d[T-2],x=ie),j.Cartesian3.add(d[T-1],x,x)):x=d[w+1],j.Cartesian3.clone(x,pe),J.defined(R)&&(k=0===w||i?n[w]:n[w-1],w!==T-1&&(D=n[w]));for(var N=w===T-1?2:4,M=0===w?2:0;M<N;++M){j.Cartesian3.pack(le,V,I),j.Cartesian3.pack(se,L,I),j.Cartesian3.pack(pe,F,I),I+=3;var H=M-2<0?-1:1;G[S++]=M%2*2-1,G[S++]=H*t,o.st&&(O[B++]=w/(T-1),O[B++]=Math.max(G[S-2],0)),J.defined(R)&&(R[U++]=Z.Color.floatToByte((H=M<2?k:D).red),R[U++]=Z.Color.floatToByte(H.green),R[U++]=Z.Color.floatToByte(H.blue),R[U++]=Z.Color.floatToByte(H.alpha))}}m=new te.GeometryAttributes;m.position=new ee.GeometryAttribute({componentDatatype:$.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:V}),m.prevPosition=new ee.GeometryAttribute({componentDatatype:$.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:L}),m.nextPosition=new ee.GeometryAttribute({componentDatatype:$.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:F}),m.expandAndWidth=new ee.GeometryAttribute({componentDatatype:$.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:G}),o.st&&(m.st=new ee.GeometryAttribute({componentDatatype:$.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:O})),J.defined(R)&&(m.color=new ee.GeometryAttribute({componentDatatype:$.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:R,normalize:!0}));var W=re.IndexDatatype.createTypedArray(p,6*T-6),Y=0,q=0,z=T-1;for(w=0;w<z;++w)W[q++]=Y,W[q++]=Y+2,W[q++]=Y+1,W[q++]=Y+1,W[q++]=Y+2,W[q++]=Y+3,Y+=4;return new ee.Geometry({attributes:m,indices:W,primitiveType:ee.PrimitiveType.TRIANGLES,boundingSphere:X.BoundingSphere.fromPoints(d),geometryType:ee.GeometryType.POLYLINES})}},function(e,t){return(e=J.defined(t)?m.unpack(e,t):e)._ellipsoid=j.Ellipsoid.clone(e._ellipsoid),m.createGeometry(e)}}); | ||
define(["./when-229515d6","./Matrix2-f2da41d4","./ArcType-1da7fdca","./arrayRemoveDuplicates-bb548aa3","./Transforms-7cd3197b","./Color-d2414093","./ComponentDatatype-17b06483","./RuntimeError-ffe03243","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b","./PolylinePipeline-a3ba6f24","./VertexFormat-565d6a6c","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./EllipsoidGeodesic-43ba18de","./EllipsoidRhumbLine-afd6cd20","./IntersectionTests-1b8a3cb9","./Plane-0421a8be"],(function(e,t,r,a,o,n,i,l,s,p,d,c,u,y,m,f,h,v,C){"use strict";var g=[];function b(e,t,r,a,o){var i,l=g;l.length=o;var s=r.red,p=r.green,d=r.blue,c=r.alpha,u=a.red,y=a.green,m=a.blue,f=a.alpha;if(n.Color.equals(r,a)){for(i=0;i<o;i++)l[i]=n.Color.clone(r);return l}var h=(u-s)/o,v=(y-p)/o,C=(m-d)/o,b=(f-c)/o;for(i=0;i<o;i++)l[i]=new n.Color(s+i*h,p+i*v,d+i*C,c+i*b);return l}function _(a){var o=(a=e.defaultValue(a,e.defaultValue.EMPTY_OBJECT)).positions,l=a.colors,s=e.defaultValue(a.width,1),p=e.defaultValue(a.colorsPerVertex,!1);this._positions=o,this._colors=l,this._width=s,this._colorsPerVertex=p,this._vertexFormat=u.VertexFormat.clone(e.defaultValue(a.vertexFormat,u.VertexFormat.DEFAULT)),this._arcType=e.defaultValue(a.arcType,r.ArcType.GEODESIC),this._granularity=e.defaultValue(a.granularity,i.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(a.ellipsoid,t.Ellipsoid.WGS84)),this._workerName="createPolylineGeometry";var d=1+o.length*t.Cartesian3.packedLength;d+=e.defined(l)?1+l.length*n.Color.packedLength:1,this.packedLength=d+t.Ellipsoid.packedLength+u.VertexFormat.packedLength+4}_.pack=function(r,a,o){var i;o=e.defaultValue(o,0);var l=r._positions,s=l.length;for(a[o++]=s,i=0;i<s;++i,o+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[i],a,o);var p=r._colors;for(s=e.defined(p)?p.length:0,a[o++]=s,i=0;i<s;++i,o+=n.Color.packedLength)n.Color.pack(p[i],a,o);return t.Ellipsoid.pack(r._ellipsoid,a,o),o+=t.Ellipsoid.packedLength,u.VertexFormat.pack(r._vertexFormat,a,o),o+=u.VertexFormat.packedLength,a[o++]=r._width,a[o++]=r._colorsPerVertex?1:0,a[o++]=r._arcType,a[o]=r._granularity,a};var A=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),E=new u.VertexFormat,P={positions:void 0,colors:void 0,ellipsoid:A,vertexFormat:E,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};_.unpack=function(r,a,o){var i;a=e.defaultValue(a,0);var l=r[a++],s=new Array(l);for(i=0;i<l;++i,a+=t.Cartesian3.packedLength)s[i]=t.Cartesian3.unpack(r,a);var p=(l=r[a++])>0?new Array(l):void 0;for(i=0;i<l;++i,a+=n.Color.packedLength)p[i]=n.Color.unpack(r,a);var d=t.Ellipsoid.unpack(r,a,A);a+=t.Ellipsoid.packedLength;var c=u.VertexFormat.unpack(r,a,E);a+=u.VertexFormat.packedLength;var y=r[a++],m=1===r[a++],f=r[a++],h=r[a];return e.defined(o)?(o._positions=s,o._colors=p,o._ellipsoid=t.Ellipsoid.clone(d,o._ellipsoid),o._vertexFormat=u.VertexFormat.clone(c,o._vertexFormat),o._width=y,o._colorsPerVertex=m,o._arcType=f,o._granularity=h,o):(P.positions=s,P.colors=p,P.width=y,P.colorsPerVertex=m,P.arcType=f,P.granularity=h,new _(P))};var w=new t.Cartesian3,x=new t.Cartesian3,T=new t.Cartesian3,D=new t.Cartesian3;return _.createGeometry=function(l){var u,y,m,f=l._width,h=l._vertexFormat,v=l._colors,C=l._colorsPerVertex,_=l._arcType,A=l._granularity,E=l._ellipsoid,P=[],k=a.arrayRemoveDuplicates(l._positions,t.Cartesian3.equalsEpsilon,!1,P);if(e.defined(v)&&P.length>0){var V=0,L=P[0];v=v.filter((function(e,t){return!(C?t===L||0===t&&1===L:t+1===L)||(V++,L=P[V],!1)}))}var F=k.length;if(!(F<2||f<=0)){if(_===r.ArcType.GEODESIC||_===r.ArcType.RHUMB){var G,O;_===r.ArcType.GEODESIC?(G=i.CesiumMath.chordLength(A,E.maximumRadius),O=c.PolylinePipeline.numberOfPoints):(G=A,O=c.PolylinePipeline.numberOfPointsRhumbLine);var R=c.PolylinePipeline.extractHeights(k,E);if(e.defined(v)){var I=1;for(u=0;u<F-1;++u)I+=O(k[u],k[u+1],G);var S=new Array(I),B=0;for(u=0;u<F-1;++u){var U=k[u],N=k[u+1],M=v[u],H=O(U,N,G);if(C&&u<I){var W=b(0,0,M,v[u+1],H),Y=W.length;for(y=0;y<Y;++y)S[B++]=W[y]}else for(y=0;y<H;++y)S[B++]=n.Color.clone(M)}S[B]=n.Color.clone(v[v.length-1]),v=S,g.length=0}k=_===r.ArcType.GEODESIC?c.PolylinePipeline.generateCartesianArc({positions:k,minDistance:G,ellipsoid:E,height:R}):c.PolylinePipeline.generateCartesianRhumbArc({positions:k,granularity:G,ellipsoid:E,height:R})}var q,z=4*(F=k.length)-4,J=new Float64Array(3*z),j=new Float64Array(3*z),K=new Float64Array(3*z),Q=new Float32Array(2*z),X=h.st?new Float32Array(2*z):void 0,Z=e.defined(v)?new Uint8Array(4*z):void 0,$=0,ee=0,te=0,re=0;for(y=0;y<F;++y){var ae,oe;0===y?(q=w,t.Cartesian3.subtract(k[0],k[1],q),t.Cartesian3.add(k[0],q,q)):q=k[y-1],t.Cartesian3.clone(q,T),t.Cartesian3.clone(k[y],x),y===F-1?(q=w,t.Cartesian3.subtract(k[F-1],k[F-2],q),t.Cartesian3.add(k[F-1],q,q)):q=k[y+1],t.Cartesian3.clone(q,D),e.defined(Z)&&(ae=0===y||C?v[y]:v[y-1],y!==F-1&&(oe=v[y]));var ne=y===F-1?2:4;for(m=0===y?2:0;m<ne;++m){t.Cartesian3.pack(x,J,$),t.Cartesian3.pack(T,j,$),t.Cartesian3.pack(D,K,$),$+=3;var ie=m-2<0?-1:1;if(Q[ee++]=m%2*2-1,Q[ee++]=ie*f,h.st&&(X[te++]=y/(F-1),X[te++]=Math.max(Q[ee-2],0)),e.defined(Z)){var le=m<2?ae:oe;Z[re++]=n.Color.floatToByte(le.red),Z[re++]=n.Color.floatToByte(le.green),Z[re++]=n.Color.floatToByte(le.blue),Z[re++]=n.Color.floatToByte(le.alpha)}}}var se=new p.GeometryAttributes;se.position=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:J}),se.prevPosition=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:j}),se.nextPosition=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:K}),se.expandAndWidth=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:Q}),h.st&&(se.st=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:X})),e.defined(Z)&&(se.color=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:Z,normalize:!0}));var pe=d.IndexDatatype.createTypedArray(z,6*F-6),de=0,ce=0,ue=F-1;for(y=0;y<ue;++y)pe[ce++]=de,pe[ce++]=de+2,pe[ce++]=de+1,pe[ce++]=de+1,pe[ce++]=de+2,pe[ce++]=de+3,de+=4;return new s.Geometry({attributes:se,indices:pe,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:o.BoundingSphere.fromPoints(k),geometryType:s.GeometryType.POLYLINES})}},function(r,a){return e.defined(a)&&(r=_.unpack(r,a)),r._ellipsoid=t.Ellipsoid.clone(r._ellipsoid),_.createGeometry(r)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Cartesian2-40b13f31","./arrayRemoveDuplicates-47b233f1","./BoundingRectangle-0c269568","./Transforms-70f396e0","./ComponentDatatype-6c2e43c1","./PolylineVolumeGeometryLibrary-247a98de","./Check-3917d765","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./GeometryPipeline-d4d3acd7","./IndexDatatype-b42089ce","./Math-87254c13","./PolygonPipeline-5dc6dac0","./VertexFormat-8d463a4f","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-66f520e3","./AxisAlignedBoundingBox-445c3009","./IntersectionTests-587a744a","./Plane-9d4e3328","./PolylinePipeline-ff2b6881","./EllipsoidGeodesic-bdbae7c8","./EllipsoidRhumbLine-6baec512","./AttributeCompression-56959beb","./EncodedCartesian3-942c4568"],function(c,u,i,r,T,G,D,e,w,R,B,S,a,I,m,t,n,o,l,s,p,d,y,g,h,f,v){"use strict";function b(e){var t=(e=c.defaultValue(e,c.defaultValue.EMPTY_OBJECT)).polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=u.Ellipsoid.clone(c.defaultValue(e.ellipsoid,u.Ellipsoid.WGS84)),this._cornerType=c.defaultValue(e.cornerType,D.CornerType.ROUNDED),this._vertexFormat=m.VertexFormat.clone(c.defaultValue(e.vertexFormat,m.VertexFormat.DEFAULT)),this._granularity=c.defaultValue(e.granularity,a.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";t=1+t.length*u.Cartesian3.packedLength;t+=1+n.length*u.Cartesian2.packedLength,this.packedLength=t+u.Ellipsoid.packedLength+m.VertexFormat.packedLength+2}b.pack=function(e,t,n){var a;n=c.defaultValue(n,0);var i=e._positions,r=i.length;for(t[n++]=r,a=0;a<r;++a,n+=u.Cartesian3.packedLength)u.Cartesian3.pack(i[a],t,n);var o=e._shape,r=o.length;for(t[n++]=r,a=0;a<r;++a,n+=u.Cartesian2.packedLength)u.Cartesian2.pack(o[a],t,n);return u.Ellipsoid.pack(e._ellipsoid,t,n),n+=u.Ellipsoid.packedLength,m.VertexFormat.pack(e._vertexFormat,t,n),n+=m.VertexFormat.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var P=u.Ellipsoid.clone(u.Ellipsoid.UNIT_SPHERE),E=new m.VertexFormat,_={polylinePositions:void 0,shapePositions:void 0,ellipsoid:P,vertexFormat:E,cornerType:void 0,granularity:void 0};b.unpack=function(e,t,n){t=c.defaultValue(t,0);for(var a=e[t++],i=new Array(a),r=0;r<a;++r,t+=u.Cartesian3.packedLength)i[r]=u.Cartesian3.unpack(e,t);var a=e[t++],o=new Array(a);for(r=0;r<a;++r,t+=u.Cartesian2.packedLength)o[r]=u.Cartesian2.unpack(e,t);var l=u.Ellipsoid.unpack(e,t,P);t+=u.Ellipsoid.packedLength;var s=m.VertexFormat.unpack(e,t,E);t+=m.VertexFormat.packedLength;var p=e[t++],d=e[t];return c.defined(n)?(n._positions=i,n._shape=o,n._ellipsoid=u.Ellipsoid.clone(l,n._ellipsoid),n._vertexFormat=m.VertexFormat.clone(s,n._vertexFormat),n._cornerType=p,n._granularity=d,n):(_.polylinePositions=i,_.shapePositions=o,_.cornerType=p,_.granularity=d,new b(_))};var k=new r.BoundingRectangle;return b.createGeometry=function(e){var t=e._positions,n=i.arrayRemoveDuplicates(t,u.Cartesian3.equalsEpsilon),a=e._shape,a=D.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(a);if(!(n.length<2||a.length<3)){I.PolygonPipeline.computeWindingOrder2D(a)===I.WindingOrder.CLOCKWISE&&a.reverse();t=r.BoundingRectangle.fromPoints(a,k);return function(e,t,n,a){var i=new R.GeometryAttributes;a.position&&(i.position=new w.GeometryAttribute({componentDatatype:G.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}));var r,o,l,s,p,d=t.length,c=e.length/3,u=(c-2*d)/(2*d),m=I.PolygonPipeline.triangulate(t),y=(u-1)*d*6+2*m.length,g=S.IndexDatatype.createTypedArray(c,y),h=2*d,f=0;for(L=0;L<u-1;L++){for(r=0;r<d-1;r++)p=(o=2*r+L*d*2)+h,s=(l=o+1)+h,g[f++]=l,g[f++]=o,g[f++]=s,g[f++]=s,g[f++]=o,g[f++]=p;s=(l=(o=2*d-2+L*d*2)+1)+h,p=o+h,g[f++]=l,g[f++]=o,g[f++]=s,g[f++]=s,g[f++]=o,g[f++]=p}if(a.st||a.tangent||a.bitangent){for(var v,b,P=new Float32Array(2*c),E=1/(u-1),_=1/n.height,k=n.height/2,C=0,L=0;L<u;L++){for(b=_*(t[0].y+k),P[C++]=v=L*E,P[C++]=b,r=1;r<d;r++)b=_*(t[r].y+k),P[C++]=v,P[C++]=b,P[C++]=v,P[C++]=b;b=_*(t[0].y+k),P[C++]=v,P[C++]=b}for(r=0;r<d;r++)b=_*(t[r].y+k),P[C++]=v=0,P[C++]=b;for(r=0;r<d;r++)b=_*(t[r].y+k),P[C++]=v=(u-1)*E,P[C++]=b;i.st=new w.GeometryAttribute({componentDatatype:G.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(P)})}var V=c-2*d;for(L=0;L<m.length;L+=3){var F=m[L]+V,x=m[L+1]+V,A=m[L+2]+V;g[f++]=F,g[f++]=x,g[f++]=A,g[f++]=A+d,g[f++]=x+d,g[f++]=F+d}if(e=new w.Geometry({attributes:i,indices:g,boundingSphere:T.BoundingSphere.fromVertices(e),primitiveType:w.PrimitiveType.TRIANGLES}),a.normal&&(e=B.GeometryPipeline.computeNormal(e)),a.tangent||a.bitangent){try{e=B.GeometryPipeline.computeTangentAndBitangent(e)}catch(e){D.oneTimeWarning("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}a.tangent||(e.attributes.tangent=void 0),a.bitangent||(e.attributes.bitangent=void 0),a.st||(e.attributes.st=void 0)}return e}(D.PolylineVolumeGeometryLibrary.computePositions(n,a,t,e,!0),a,t,e._vertexFormat)}},function(e,t){return(e=c.defined(t)?b.unpack(e,t):e)._ellipsoid=u.Ellipsoid.clone(e._ellipsoid),b.createGeometry(e)}}); | ||
define(["./when-229515d6","./Matrix2-f2da41d4","./arrayRemoveDuplicates-bb548aa3","./BoundingRectangle-18e42324","./Transforms-7cd3197b","./ComponentDatatype-17b06483","./PolylineVolumeGeometryLibrary-4af6d4dc","./RuntimeError-ffe03243","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./GeometryPipeline-5b3fba53","./IndexDatatype-b10faa0b","./PolygonPipeline-5582b1ec","./VertexFormat-565d6a6c","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-b27cd2f7","./AxisAlignedBoundingBox-1feb0c48","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./PolylinePipeline-a3ba6f24","./EllipsoidGeodesic-43ba18de","./EllipsoidRhumbLine-afd6cd20","./AttributeCompression-0af3c035","./EncodedCartesian3-d4f305ce"],(function(e,t,n,a,i,r,o,l,s,p,d,c,u,m,y,g,f,h,b,v,P,E,_,k,L){"use strict";function V(n){var a=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).polylinePositions,i=n.shapePositions;this._positions=a,this._shape=i,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(n.cornerType,o.CornerType.ROUNDED),this._vertexFormat=m.VertexFormat.clone(e.defaultValue(n.vertexFormat,m.VertexFormat.DEFAULT)),this._granularity=e.defaultValue(n.granularity,r.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";var l=1+a.length*t.Cartesian3.packedLength;l+=1+i.length*t.Cartesian2.packedLength,this.packedLength=l+t.Ellipsoid.packedLength+m.VertexFormat.packedLength+2}V.pack=function(n,a,i){var r;i=e.defaultValue(i,0);var o=n._positions,l=o.length;for(a[i++]=l,r=0;r<l;++r,i+=t.Cartesian3.packedLength)t.Cartesian3.pack(o[r],a,i);var s=n._shape;for(l=s.length,a[i++]=l,r=0;r<l;++r,i+=t.Cartesian2.packedLength)t.Cartesian2.pack(s[r],a,i);return t.Ellipsoid.pack(n._ellipsoid,a,i),i+=t.Ellipsoid.packedLength,m.VertexFormat.pack(n._vertexFormat,a,i),i+=m.VertexFormat.packedLength,a[i++]=n._cornerType,a[i]=n._granularity,a};var x=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),C=new m.VertexFormat,F={polylinePositions:void 0,shapePositions:void 0,ellipsoid:x,vertexFormat:C,cornerType:void 0,granularity:void 0};V.unpack=function(n,a,i){var r;a=e.defaultValue(a,0);var o=n[a++],l=new Array(o);for(r=0;r<o;++r,a+=t.Cartesian3.packedLength)l[r]=t.Cartesian3.unpack(n,a);o=n[a++];var s=new Array(o);for(r=0;r<o;++r,a+=t.Cartesian2.packedLength)s[r]=t.Cartesian2.unpack(n,a);var p=t.Ellipsoid.unpack(n,a,x);a+=t.Ellipsoid.packedLength;var d=m.VertexFormat.unpack(n,a,C);a+=m.VertexFormat.packedLength;var c=n[a++],u=n[a];return e.defined(i)?(i._positions=l,i._shape=s,i._ellipsoid=t.Ellipsoid.clone(p,i._ellipsoid),i._vertexFormat=m.VertexFormat.clone(d,i._vertexFormat),i._cornerType=c,i._granularity=u,i):(F.polylinePositions=l,F.shapePositions=s,F.cornerType=c,F.granularity=u,new V(F))};var A=new a.BoundingRectangle;return V.createGeometry=function(e){var l=e._positions,m=n.arrayRemoveDuplicates(l,t.Cartesian3.equalsEpsilon),y=e._shape;if(y=o.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),!(m.length<2||y.length<3)){u.PolygonPipeline.computeWindingOrder2D(y)===u.WindingOrder.CLOCKWISE&&y.reverse();var g=a.BoundingRectangle.fromPoints(y,A);return function(e,t,n,a){var l=new p.GeometryAttributes;a.position&&(l.position=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}));var m,y,g,f,h,b,v=t.length,P=e.length/3,E=(P-2*v)/(2*v),_=u.PolygonPipeline.triangulate(t),k=(E-1)*v*6+2*_.length,L=c.IndexDatatype.createTypedArray(P,k),V=2*v,x=0;for(m=0;m<E-1;m++){for(y=0;y<v-1;y++)b=(g=2*y+m*v*2)+V,h=(f=g+1)+V,L[x++]=f,L[x++]=g,L[x++]=h,L[x++]=h,L[x++]=g,L[x++]=b;h=(f=1+(g=2*v-2+m*v*2))+V,b=g+V,L[x++]=f,L[x++]=g,L[x++]=h,L[x++]=h,L[x++]=g,L[x++]=b}if(a.st||a.tangent||a.bitangent){var C,F,A=new Float32Array(2*P),T=1/(E-1),G=1/n.height,D=n.height/2,w=0;for(m=0;m<E;m++){for(C=m*T,F=G*(t[0].y+D),A[w++]=C,A[w++]=F,y=1;y<v;y++)F=G*(t[y].y+D),A[w++]=C,A[w++]=F,A[w++]=C,A[w++]=F;F=G*(t[0].y+D),A[w++]=C,A[w++]=F}for(y=0;y<v;y++)C=0,F=G*(t[y].y+D),A[w++]=C,A[w++]=F;for(y=0;y<v;y++)C=(E-1)*T,F=G*(t[y].y+D),A[w++]=C,A[w++]=F;l.st=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(A)})}var R=P-2*v;for(m=0;m<_.length;m+=3){var B=_[m]+R,S=_[m+1]+R,I=_[m+2]+R;L[x++]=B,L[x++]=S,L[x++]=I,L[x++]=I+v,L[x++]=S+v,L[x++]=B+v}var O=new s.Geometry({attributes:l,indices:L,boundingSphere:i.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.TRIANGLES});if(a.normal&&(O=d.GeometryPipeline.computeNormal(O)),a.tangent||a.bitangent){try{O=d.GeometryPipeline.computeTangentAndBitangent(O)}catch(e){o.oneTimeWarning("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}a.tangent||(O.attributes.tangent=void 0),a.bitangent||(O.attributes.bitangent=void 0),a.st||(O.attributes.st=void 0)}return O}(o.PolylineVolumeGeometryLibrary.computePositions(m,y,g,e,!0),y,g,e._vertexFormat)}},function(n,a){return e.defined(a)&&(n=V.unpack(n,a)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),V.createGeometry(n)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Cartesian2-40b13f31","./arrayRemoveDuplicates-47b233f1","./BoundingRectangle-0c269568","./Transforms-70f396e0","./ComponentDatatype-6c2e43c1","./PolylineVolumeGeometryLibrary-247a98de","./Check-3917d765","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce","./Math-87254c13","./PolygonPipeline-5dc6dac0","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-66f520e3","./AxisAlignedBoundingBox-445c3009","./IntersectionTests-587a744a","./Plane-9d4e3328","./PolylinePipeline-ff2b6881","./EllipsoidGeodesic-bdbae7c8","./EllipsoidRhumbLine-6baec512"],function(d,c,a,o,u,y,r,e,h,g,f,t,l,i,n,s,p,m,E,v,P,_,b){"use strict";function k(e){var i=(e=d.defaultValue(e,d.defaultValue.EMPTY_OBJECT)).polylinePositions,n=e.shapePositions;this._positions=i,this._shape=n,this._ellipsoid=c.Ellipsoid.clone(d.defaultValue(e.ellipsoid,c.Ellipsoid.WGS84)),this._cornerType=d.defaultValue(e.cornerType,r.CornerType.ROUNDED),this._granularity=d.defaultValue(e.granularity,t.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";i=1+i.length*c.Cartesian3.packedLength;i+=1+n.length*c.Cartesian2.packedLength,this.packedLength=i+c.Ellipsoid.packedLength+2}k.pack=function(e,i,n){var t;n=d.defaultValue(n,0);var a=e._positions,o=a.length;for(i[n++]=o,t=0;t<o;++t,n+=c.Cartesian3.packedLength)c.Cartesian3.pack(a[t],i,n);var r=e._shape,o=r.length;for(i[n++]=o,t=0;t<o;++t,n+=c.Cartesian2.packedLength)c.Cartesian2.pack(r[t],i,n);return c.Ellipsoid.pack(e._ellipsoid,i,n),n+=c.Ellipsoid.packedLength,i[n++]=e._cornerType,i[n]=e._granularity,i};var C=c.Ellipsoid.clone(c.Ellipsoid.UNIT_SPHERE),L={polylinePositions:void 0,shapePositions:void 0,ellipsoid:C,height:void 0,cornerType:void 0,granularity:void 0};k.unpack=function(e,i,n){i=d.defaultValue(i,0);for(var t=e[i++],a=new Array(t),o=0;o<t;++o,i+=c.Cartesian3.packedLength)a[o]=c.Cartesian3.unpack(e,i);var t=e[i++],r=new Array(t);for(o=0;o<t;++o,i+=c.Cartesian2.packedLength)r[o]=c.Cartesian2.unpack(e,i);var l=c.Ellipsoid.unpack(e,i,C);i+=c.Ellipsoid.packedLength;var s=e[i++],p=e[i];return d.defined(n)?(n._positions=a,n._shape=r,n._ellipsoid=c.Ellipsoid.clone(l,n._ellipsoid),n._cornerType=s,n._granularity=p,n):(L.polylinePositions=a,L.shapePositions=r,L.cornerType=s,L.granularity=p,new k(L))};var T=new o.BoundingRectangle;return k.createGeometry=function(e){var i=e._positions,n=a.arrayRemoveDuplicates(i,c.Cartesian3.equalsEpsilon),t=e._shape,t=r.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(t);if(!(n.length<2||t.length<3)){l.PolygonPipeline.computeWindingOrder2D(t)===l.WindingOrder.CLOCKWISE&&t.reverse();i=o.BoundingRectangle.fromPoints(t,T);return function(e,i){var n=new g.GeometryAttributes;n.position=new h.GeometryAttribute({componentDatatype:y.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e});var t=i.length,i=n.position.values.length/3,a=e.length/3/t,o=f.IndexDatatype.createTypedArray(i,2*t*(1+a)),r=0,l=0,s=l*t;for(c=0;c<t-1;c++)o[r++]=c+s,o[r++]=c+s+1;for(o[r++]=t-1+s,o[r++]=s,s=(l=a-1)*t,c=0;c<t-1;c++)o[r++]=c+s,o[r++]=c+s+1;for(o[r++]=t-1+s,o[r++]=s,l=0;l<a-1;l++)for(var p=t*l,d=p+t,c=0;c<t;c++)o[r++]=c+p,o[r++]=c+d;return new h.Geometry({attributes:n,indices:f.IndexDatatype.createTypedArray(i,o),boundingSphere:u.BoundingSphere.fromVertices(e),primitiveType:h.PrimitiveType.LINES})}(r.PolylineVolumeGeometryLibrary.computePositions(n,t,i,e,!1),t)}},function(e,i){return(e=d.defined(i)?k.unpack(e,i):e)._ellipsoid=c.Ellipsoid.clone(e._ellipsoid),k.createGeometry(e)}}); | ||
define(["./when-229515d6","./Matrix2-f2da41d4","./arrayRemoveDuplicates-bb548aa3","./BoundingRectangle-18e42324","./Transforms-7cd3197b","./ComponentDatatype-17b06483","./PolylineVolumeGeometryLibrary-4af6d4dc","./RuntimeError-ffe03243","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b","./PolygonPipeline-5582b1ec","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-b27cd2f7","./AxisAlignedBoundingBox-1feb0c48","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./PolylinePipeline-a3ba6f24","./EllipsoidGeodesic-43ba18de","./EllipsoidRhumbLine-afd6cd20"],(function(e,i,n,a,t,r,o,l,s,p,d,u,c,y,g,h,f,m,b,v,E){"use strict";function P(n){var a=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).polylinePositions,t=n.shapePositions;this._positions=a,this._shape=t,this._ellipsoid=i.Ellipsoid.clone(e.defaultValue(n.ellipsoid,i.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(n.cornerType,o.CornerType.ROUNDED),this._granularity=e.defaultValue(n.granularity,r.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";var l=1+a.length*i.Cartesian3.packedLength;l+=1+t.length*i.Cartesian2.packedLength,this.packedLength=l+i.Ellipsoid.packedLength+2}P.pack=function(n,a,t){var r;t=e.defaultValue(t,0);var o=n._positions,l=o.length;for(a[t++]=l,r=0;r<l;++r,t+=i.Cartesian3.packedLength)i.Cartesian3.pack(o[r],a,t);var s=n._shape;for(l=s.length,a[t++]=l,r=0;r<l;++r,t+=i.Cartesian2.packedLength)i.Cartesian2.pack(s[r],a,t);return i.Ellipsoid.pack(n._ellipsoid,a,t),t+=i.Ellipsoid.packedLength,a[t++]=n._cornerType,a[t]=n._granularity,a};var _=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),k={polylinePositions:void 0,shapePositions:void 0,ellipsoid:_,height:void 0,cornerType:void 0,granularity:void 0};P.unpack=function(n,a,t){var r;a=e.defaultValue(a,0);var o=n[a++],l=new Array(o);for(r=0;r<o;++r,a+=i.Cartesian3.packedLength)l[r]=i.Cartesian3.unpack(n,a);o=n[a++];var s=new Array(o);for(r=0;r<o;++r,a+=i.Cartesian2.packedLength)s[r]=i.Cartesian2.unpack(n,a);var p=i.Ellipsoid.unpack(n,a,_);a+=i.Ellipsoid.packedLength;var d=n[a++],u=n[a];return e.defined(t)?(t._positions=l,t._shape=s,t._ellipsoid=i.Ellipsoid.clone(p,t._ellipsoid),t._cornerType=d,t._granularity=u,t):(k.polylinePositions=l,k.shapePositions=s,k.cornerType=d,k.granularity=u,new P(k))};var C=new a.BoundingRectangle;return P.createGeometry=function(e){var l=e._positions,c=n.arrayRemoveDuplicates(l,i.Cartesian3.equalsEpsilon),y=e._shape;if(y=o.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),!(c.length<2||y.length<3)){u.PolygonPipeline.computeWindingOrder2D(y)===u.WindingOrder.CLOCKWISE&&y.reverse();var g=a.BoundingRectangle.fromPoints(y,C);return function(e,i){var n=new p.GeometryAttributes;n.position=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e});var a,o,l=i.length,u=n.position.values.length/3,c=e.length/3/l,y=d.IndexDatatype.createTypedArray(u,2*l*(c+1)),g=0,h=(a=0)*l;for(o=0;o<l-1;o++)y[g++]=o+h,y[g++]=o+h+1;for(y[g++]=l-1+h,y[g++]=h,h=(a=c-1)*l,o=0;o<l-1;o++)y[g++]=o+h,y[g++]=o+h+1;for(y[g++]=l-1+h,y[g++]=h,a=0;a<c-1;a++){var f=l*a,m=f+l;for(o=0;o<l;o++)y[g++]=o+f,y[g++]=o+m}return new s.Geometry({attributes:n,indices:d.IndexDatatype.createTypedArray(u,y),boundingSphere:t.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.LINES})}(o.PolylineVolumeGeometryLibrary.computePositions(c,y,g,e,!1),y)}},function(n,a){return e.defined(a)&&(n=P.unpack(n,a)),n._ellipsoid=i.Ellipsoid.clone(n._ellipsoid),P.createGeometry(n)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Cartesian2-40b13f31","./GeometryOffsetAttribute-964ec9ef","./Transforms-70f396e0","./Check-3917d765","./ComponentDatatype-6c2e43c1","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./GeometryInstance-5c9d46a4","./GeometryPipeline-d4d3acd7","./IndexDatatype-b42089ce","./Math-87254c13","./PolygonPipeline-5dc6dac0","./RectangleGeometryLibrary-415ccb50","./VertexFormat-8d463a4f","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./AttributeCompression-56959beb","./EncodedCartesian3-942c4568","./IntersectionTests-587a744a","./Plane-9d4e3328","./EllipsoidRhumbLine-6baec512"],function(Q,W,J,S,t,j,Z,r,K,$,tt,et,at,I,rt,e,a,n,i,o,s,l,u){"use strict";var nt=new W.Cartesian3,it=new W.Cartesian3,ot=new W.Cartesian3,st=new W.Cartesian3,d=new W.Rectangle,k=new W.Cartesian2,p=new S.BoundingSphere,g=new S.BoundingSphere;function lt(t,e){var a=new Z.Geometry({attributes:new r.GeometryAttributes,primitiveType:Z.PrimitiveType.TRIANGLES});return a.attributes.position=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(a.attributes.normal=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(a.attributes.tangent=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(a.attributes.bitangent=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),a}var ut=new W.Cartesian3,ct=new W.Cartesian3;function mt(t,e){var a=t._vertexFormat,r=t._ellipsoid,n=e.height,i=e.width,o=e.northCap,s=e.southCap,l=0,u=n,c=n,t=0;o&&(--c,t+=l=1),s&&(--u,--c,t+=1),t+=i*c;for(var m=a.position?new Float64Array(3*t):void 0,d=a.st?new Float32Array(2*t):void 0,p=0,g=0,y=nt,f=k,h=Number.MAX_VALUE,b=Number.MAX_VALUE,v=-Number.MAX_VALUE,_=-Number.MAX_VALUE,A=l;A<u;++A)for(var x=0;x<i;++x)I.RectangleGeometryLibrary.computePosition(e,r,a.st,A,x,y,f),m[p++]=y.x,m[p++]=y.y,m[p++]=y.z,a.st&&(d[g++]=f.x,d[g++]=f.y,h=Math.min(h,f.x),b=Math.min(b,f.y),v=Math.max(v,f.x),_=Math.max(_,f.y));if(o&&(I.RectangleGeometryLibrary.computePosition(e,r,a.st,0,0,y,f),m[p++]=y.x,m[p++]=y.y,m[p++]=y.z,a.st&&(d[g++]=f.x,d[g++]=f.y,h=f.x,b=f.y,v=f.x,_=f.y)),s&&(I.RectangleGeometryLibrary.computePosition(e,r,a.st,n-1,0,y,f),m[p++]=y.x,m[p++]=y.y,m[p]=y.z,a.st&&(d[g++]=f.x,d[g]=f.y,h=Math.min(h,f.x),b=Math.min(b,f.y),v=Math.max(v,f.x),_=Math.max(_,f.y))),a.st&&(h<0||b<0||1<v||1<_))for(var w=0;w<d.length;w+=2)d[w]=(d[w]-h)/(v-h),d[w+1]=(d[w+1]-b)/(_-b);l=function(t,e,a,r){var n=t.length,i=e.normal?new Float32Array(n):void 0,o=e.tangent?new Float32Array(n):void 0,s=e.bitangent?new Float32Array(n):void 0,l=0,u=st,c=ot,m=it;if(e.normal||e.tangent||e.bitangent)for(var d=0;d<n;d+=3){var p=W.Cartesian3.fromArray(t,d,nt),g=l+1,y=l+2,m=a.geodeticSurfaceNormal(p,m);(e.tangent||e.bitangent)&&(W.Cartesian3.cross(W.Cartesian3.UNIT_Z,m,c),S.Matrix3.multiplyByVector(r,c,c),W.Cartesian3.normalize(c,c),e.bitangent&&W.Cartesian3.normalize(W.Cartesian3.cross(m,c,u),u)),e.normal&&(i[l]=m.x,i[g]=m.y,i[y]=m.z),e.tangent&&(o[l]=c.x,o[g]=c.y,o[y]=c.z),e.bitangent&&(s[l]=u.x,s[g]=u.y,s[y]=u.z),l+=3}return lt(e,{positions:t,normals:i,tangents:o,bitangents:s})}(m,a,r,e.tangentRotationMatrix),n=6*(i-1)*(c-1);o&&(n+=3*(i-1)),s&&(n+=3*(i-1));for(var C=tt.IndexDatatype.createTypedArray(t,n),R=0,E=0,F=0;F<c-1;++F){for(var G=0;G<i-1;++G){var P=R,V=P+i,L=V+1,D=P+1;C[E++]=P,C[E++]=V,C[E++]=D,C[E++]=D,C[E++]=V,C[E++]=L,++R}++R}if(o||s){var M,T,O=t-1,N=t-1;if(o&&s&&(O=t-2),R=0,o)for(F=0;F<i-1;F++)T=(M=R)+1,C[E++]=O,C[E++]=M,C[E++]=T,++R;if(s)for(R=(c-1)*i,F=0;F<i-1;F++)T=(M=R)+1,C[E++]=M,C[E++]=N,C[E++]=T,++R}return l.indices=C,a.st&&(l.attributes.st=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),l}function dt(t,e,a,r,n){return t[e++]=r[a],t[e++]=r[a+1],t[e++]=r[a+2],t[e++]=n[a],t[e++]=n[a+1],t[e]=n[a+2],t}function pt(t,e,a,r){return t[e++]=r[a],t[e++]=r[a+1],t[e++]=r[a],t[e]=r[a+1],t}var gt=new rt.VertexFormat;function y(t,e){var a=t._shadowVolume,r=t._offsetAttribute,n=t._vertexFormat,i=t._extrudedHeight,o=t._surfaceHeight,s=t._ellipsoid,l=e.height,u=e.width;a&&((b=rt.VertexFormat.clone(n,gt)).normal=!0,t._vertexFormat=b);var c=mt(t,e);a&&(t._vertexFormat=n);var m=at.PolygonPipeline.scaleToGeodeticHeight(c.attributes.position.values,o,s,!1),d=2*(z=(m=new Float64Array(m)).length),p=new Float64Array(d);p.set(m);var g=at.PolygonPipeline.scaleToGeodeticHeight(c.attributes.position.values,i,s);p.set(g,z),c.attributes.position.values=p;var y,f,h,b=n.normal?new Float32Array(d):void 0,t=n.tangent?new Float32Array(d):void 0,o=n.bitangent?new Float32Array(d):void 0,i=n.st?new Float32Array(d/3*2):void 0;if(n.normal){for(f=c.attributes.normal.values,b.set(f),_=0;_<z;_++)f[_]=-f[_];b.set(f,z),c.attributes.normal.values=b}if(a){f=c.attributes.normal.values,n.normal||(c.attributes.normal=void 0);for(var v=new Float32Array(d),_=0;_<z;_++)f[_]=-f[_];v.set(f,z),c.attributes.extrudeDirection=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})}p=Q.defined(r);if(p&&(b=z/3*2,v=new Uint8Array(b),v=r===J.GeometryOffsetAttribute.TOP?J.arrayFill(v,1,0,b/2):(h=r===J.GeometryOffsetAttribute.NONE?0:1,J.arrayFill(v,h)),c.attributes.applyOffset=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:v})),n.tangent){var A=c.attributes.tangent.values;for(t.set(A),_=0;_<z;_++)A[_]=-A[_];t.set(A,z),c.attributes.tangent.values=t}n.bitangent&&(E=c.attributes.bitangent.values,o.set(E),o.set(E,z),c.attributes.bitangent.values=o),n.st&&(y=c.attributes.st.values,i.set(y),i.set(y,z/3*2),c.attributes.st.values=i);var x=c.indices,w=x.length,C=z/3,R=tt.IndexDatatype.createTypedArray(d/3,2*w);for(R.set(x),_=0;_<w;_+=3)R[_+w]=x[_+2]+C,R[_+1+w]=x[_+1]+C,R[_+2+w]=x[_]+C;c.indices=R;var t=e.northCap,E=e.southCap,o=l,i=2,d=0,e=4,l=4;t&&(--i,--o,d+=1,e-=2,--l),E&&(--i,--o,d+=1,e-=2,--l);var l=2*((d+=i*u+2*o-e)+l),F=new Float64Array(3*l),G=a?new Float32Array(3*l):void 0,P=p?new Uint8Array(l):void 0,V=n.st?new Float32Array(2*l):void 0,L=r===J.GeometryOffsetAttribute.TOP;p&&!L&&(h=r===J.GeometryOffsetAttribute.ALL?1:0,P=J.arrayFill(P,h));var D=0,M=0,T=0,O=0,N=u*o;for(_=0;_<N;_+=u)F=dt(F,D,I=3*_,m,g),D+=6,n.st&&(V=pt(V,M,2*_,y),M+=4),a&&(T+=3,G[T++]=f[I],G[T++]=f[I+1],G[T++]=f[I+2]),L&&(P[O++]=1,O+=1);if(E){var S=t?1+N:N,I=3*S;for(_=0;_<2;_++)F=dt(F,D,I,m,g),D+=6,n.st&&(V=pt(V,M,2*S,y),M+=4),a&&(T+=3,G[T++]=f[I],G[T++]=f[I+1],G[T++]=f[I+2]),L&&(P[O++]=1,O+=1)}else for(_=N-u;_<N;_++)F=dt(F,D,I=3*_,m,g),D+=6,n.st&&(V=pt(V,M,2*_,y),M+=4),a&&(T+=3,G[T++]=f[I],G[T++]=f[I+1],G[T++]=f[I+2]),L&&(P[O++]=1,O+=1);for(_=N-1;0<_;_-=u)F=dt(F,D,I=3*_,m,g),D+=6,n.st&&(V=pt(V,M,2*_,y),M+=4),a&&(T+=3,G[T++]=f[I],G[T++]=f[I+1],G[T++]=f[I+2]),L&&(P[O++]=1,O+=1);if(t){var k=N;for(I=3*k,_=0;_<2;_++)F=dt(F,D,I,m,g),D+=6,n.st&&(V=pt(V,M,2*k,y),M+=4),a&&(T+=3,G[T++]=f[I],G[T++]=f[I+1],G[T++]=f[I+2]),L&&(P[O++]=1,O+=1)}else for(_=u-1;0<=_;_--)F=dt(F,D,I=3*_,m,g),D+=6,n.st&&(V=pt(V,M,2*_,y),M+=4),a&&(T+=3,G[T++]=f[I],G[T++]=f[I+1],G[T++]=f[I+2]),L&&(P[O++]=1,O+=1);s=function(t,e,a){var r=t.length,n=e.normal?new Float32Array(r):void 0,i=e.tangent?new Float32Array(r):void 0,o=e.bitangent?new Float32Array(r):void 0,s=0,l=0,u=0,c=!0,m=st,d=ot,p=it;if(e.normal||e.tangent||e.bitangent)for(var g=0;g<r;g+=6){var y,f=W.Cartesian3.fromArray(t,g,nt),h=W.Cartesian3.fromArray(t,(g+6)%r,ut);c&&(y=W.Cartesian3.fromArray(t,(g+3)%r,ct),W.Cartesian3.subtract(h,f,h),W.Cartesian3.subtract(y,f,y),p=W.Cartesian3.normalize(W.Cartesian3.cross(y,h,p),p),c=!1),W.Cartesian3.equalsEpsilon(h,f,et.CesiumMath.EPSILON10)&&(c=!0),(e.tangent||e.bitangent)&&(m=a.geodeticSurfaceNormal(f,m),e.tangent&&(d=W.Cartesian3.normalize(W.Cartesian3.cross(m,p,d),d))),e.normal&&(n[s++]=p.x,n[s++]=p.y,n[s++]=p.z,n[s++]=p.x,n[s++]=p.y,n[s++]=p.z),e.tangent&&(i[l++]=d.x,i[l++]=d.y,i[l++]=d.z,i[l++]=d.x,i[l++]=d.y,i[l++]=d.z),e.bitangent&&(o[u++]=m.x,o[u++]=m.y,o[u++]=m.z,o[u++]=m.x,o[u++]=m.y,o[u++]=m.z)}return lt(e,{positions:t,normals:n,tangents:i,bitangents:o})}(F,n,s);n.st&&(s.attributes.st=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:V})),a&&(s.attributes.extrudeDirection=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),p&&(s.attributes.applyOffset=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:P}));var H=tt.IndexDatatype.createTypedArray(l,6*d),z=F.length/3,B=0;for(_=0;_<z-1;_+=2){var U,Y=((U=_)+2)%z,q=W.Cartesian3.fromArray(F,3*U,ut),X=W.Cartesian3.fromArray(F,3*Y,ct);W.Cartesian3.equalsEpsilon(q,X,et.CesiumMath.EPSILON10)||(X=(2+(q=(U+1)%z))%z,H[B++]=U,H[B++]=q,H[B++]=Y,H[B++]=Y,H[B++]=q,H[B++]=X)}return s.indices=H,(s=$.GeometryPipeline.combineInstances([new K.GeometryInstance({geometry:c}),new K.GeometryInstance({geometry:s})]))[0]}var c=[new W.Cartesian3,new W.Cartesian3,new W.Cartesian3,new W.Cartesian3],f=new W.Cartographic,h=new W.Cartographic;function m(t,e,a,r,n){if(0===a)return W.Rectangle.clone(t,n);var i=I.RectangleGeometryLibrary.computeOptions(t,e,a,0,d,f),t=i.height,e=i.width,a=c;return I.RectangleGeometryLibrary.computePosition(i,r,!1,0,0,a[0]),I.RectangleGeometryLibrary.computePosition(i,r,!1,0,e-1,a[1]),I.RectangleGeometryLibrary.computePosition(i,r,!1,t-1,0,a[2]),I.RectangleGeometryLibrary.computePosition(i,r,!1,t-1,e-1,a[3]),W.Rectangle.fromCartesianArray(a,r,n)}function b(t){var e=(t=Q.defaultValue(t,Q.defaultValue.EMPTY_OBJECT)).rectangle,a=Q.defaultValue(t.height,0),r=Q.defaultValue(t.extrudedHeight,a);this._rectangle=W.Rectangle.clone(e),this._granularity=Q.defaultValue(t.granularity,et.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=W.Ellipsoid.clone(Q.defaultValue(t.ellipsoid,W.Ellipsoid.WGS84)),this._surfaceHeight=Math.max(a,r),this._rotation=Q.defaultValue(t.rotation,0),this._stRotation=Q.defaultValue(t.stRotation,0),this._vertexFormat=rt.VertexFormat.clone(Q.defaultValue(t.vertexFormat,rt.VertexFormat.DEFAULT)),this._extrudedHeight=Math.min(a,r),this._shadowVolume=Q.defaultValue(t.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=t.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}b.packedLength=W.Rectangle.packedLength+W.Ellipsoid.packedLength+rt.VertexFormat.packedLength+7,b.pack=function(t,e,a){return a=Q.defaultValue(a,0),W.Rectangle.pack(t._rectangle,e,a),a+=W.Rectangle.packedLength,W.Ellipsoid.pack(t._ellipsoid,e,a),a+=W.Ellipsoid.packedLength,rt.VertexFormat.pack(t._vertexFormat,e,a),a+=rt.VertexFormat.packedLength,e[a++]=t._granularity,e[a++]=t._surfaceHeight,e[a++]=t._rotation,e[a++]=t._stRotation,e[a++]=t._extrudedHeight,e[a++]=t._shadowVolume?1:0,e[a]=Q.defaultValue(t._offsetAttribute,-1),e};var v=new W.Rectangle,_=W.Ellipsoid.clone(W.Ellipsoid.UNIT_SPHERE),A={rectangle:v,ellipsoid:_,vertexFormat:gt,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};b.unpack=function(t,e,a){e=Q.defaultValue(e,0);var r=W.Rectangle.unpack(t,e,v);e+=W.Rectangle.packedLength;var n=W.Ellipsoid.unpack(t,e,_);e+=W.Ellipsoid.packedLength;var i=rt.VertexFormat.unpack(t,e,gt);e+=rt.VertexFormat.packedLength;var o=t[e++],s=t[e++],l=t[e++],u=t[e++],c=t[e++],m=1===t[e++],e=t[e];return Q.defined(a)?(a._rectangle=W.Rectangle.clone(r,a._rectangle),a._ellipsoid=W.Ellipsoid.clone(n,a._ellipsoid),a._vertexFormat=rt.VertexFormat.clone(i,a._vertexFormat),a._granularity=o,a._surfaceHeight=s,a._rotation=l,a._stRotation=u,a._extrudedHeight=c,a._shadowVolume=m,a._offsetAttribute=-1===e?void 0:e,a):(A.granularity=o,A.height=s,A.rotation=l,A.stRotation=u,A.extrudedHeight=c,A.shadowVolume=m,A.offsetAttribute=-1===e?void 0:e,new b(A))},b.computeRectangle=function(t,e){var a=(t=Q.defaultValue(t,Q.defaultValue.EMPTY_OBJECT)).rectangle,r=Q.defaultValue(t.granularity,et.CesiumMath.RADIANS_PER_DEGREE),n=Q.defaultValue(t.ellipsoid,W.Ellipsoid.WGS84);return m(a,r,Q.defaultValue(t.rotation,0),n,e)};var x=new S.Matrix3,w=new S.Quaternion,C=new W.Cartographic;b.createGeometry=function(t){if(!et.CesiumMath.equalsEpsilon(t._rectangle.north,t._rectangle.south,et.CesiumMath.EPSILON10)&&!et.CesiumMath.equalsEpsilon(t._rectangle.east,t._rectangle.west,et.CesiumMath.EPSILON10)){var e=t._rectangle,a=t._ellipsoid,r=t._rotation,n=t._stRotation,i=t._vertexFormat,o=I.RectangleGeometryLibrary.computeOptions(e,t._granularity,r,n,d,f,h),s=x;0!==n||0!==r?(c=W.Rectangle.center(e,C),m=a.geodeticSurfaceNormalCartographic(c,ut),S.Quaternion.fromAxisAngle(m,-n,w),S.Matrix3.fromQuaternion(w,s)):S.Matrix3.clone(S.Matrix3.IDENTITY,s);var l,u,c=t._surfaceHeight,m=t._extrudedHeight,n=!et.CesiumMath.equalsEpsilon(c,m,0,et.CesiumMath.EPSILON2);return o.lonScalar=1/t._rectangle.width,o.latScalar=1/t._rectangle.height,o.tangentRotationMatrix=s,e=t._rectangle,c=n?(l=y(t,o),n=S.BoundingSphere.fromRectangle3D(e,a,c,g),u=S.BoundingSphere.fromRectangle3D(e,a,m,p),S.BoundingSphere.union(n,u)):((l=mt(t,o)).attributes.position.values=at.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,c,a,!1),Q.defined(t._offsetAttribute)&&(u=l.attributes.position.values.length,o=new Uint8Array(u/3),u=t._offsetAttribute===J.GeometryOffsetAttribute.NONE?0:1,J.arrayFill(o,u),l.attributes.applyOffset=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:o})),S.BoundingSphere.fromRectangle3D(e,a,c)),i.position||delete l.attributes.position,new Z.Geometry({attributes:l.attributes,indices:l.indices,primitiveType:l.primitiveType,boundingSphere:c,offsetAttribute:t._offsetAttribute})}},b.createShadowVolume=function(t,e,a){var r=t._granularity,n=t._ellipsoid,e=e(r,n),a=a(r,n);return new b({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:n,stRotation:t._stRotation,granularity:r,extrudedHeight:a,height:e,vertexFormat:rt.VertexFormat.POSITION_ONLY,shadowVolume:!0})};var R=new W.Rectangle,E=[new W.Cartesian2,new W.Cartesian2,new W.Cartesian2],F=new Z.Matrix2,G=new W.Cartographic;return Object.defineProperties(b.prototype,{rectangle:{get:function(){return Q.defined(this._rotatedRectangle)||(this._rotatedRectangle=m(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return Q.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){if(0===t._stRotation)return[0,0,0,1,1,0];var e=W.Rectangle.clone(t._rectangle,R),a=t._granularity,r=t._ellipsoid,e=m(e,a,t._rotation-t._stRotation,r,R),n=E;n[0].x=e.west,n[0].y=e.south,n[1].x=e.west,n[1].y=e.north,n[2].x=e.east,n[2].y=e.south;for(var i=t.rectangle,o=Z.Matrix2.fromRotation(t._stRotation,F),s=W.Rectangle.center(i,G),l=0;l<3;++l){var u=n[l];u.x-=s.longitude,u.y-=s.latitude,Z.Matrix2.multiplyByVector(o,u,u),u.x+=s.longitude,u.y+=s.latitude,u.x=(u.x-i.west)/i.width,u.y=(u.y-i.south)/i.height}return a=n[0],r=n[1],e=n[2],t=new Array(6),W.Cartesian2.pack(a,t),W.Cartesian2.pack(r,t,2),W.Cartesian2.pack(e,t,4),t}(this)),this._textureCoordinateRotationPoints}}}),function(t,e){return(t=Q.defined(e)?b.unpack(t,e):t)._ellipsoid=W.Ellipsoid.clone(t._ellipsoid),t._rectangle=W.Rectangle.clone(t._rectangle),b.createGeometry(t)}}); | ||
define(["./when-229515d6","./Matrix2-f2da41d4","./GeometryOffsetAttribute-ff1e192c","./Transforms-7cd3197b","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./GeometryInstance-16601d2a","./GeometryPipeline-5b3fba53","./IndexDatatype-b10faa0b","./PolygonPipeline-5582b1ec","./RectangleGeometryLibrary-fbe816b1","./VertexFormat-565d6a6c","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./AttributeCompression-0af3c035","./EncodedCartesian3-d4f305ce","./IntersectionTests-1b8a3cb9","./Plane-0421a8be","./EllipsoidRhumbLine-afd6cd20"],(function(t,e,a,r,n,i,o,s,l,u,c,m,p,d,g,y,f,h,v,b,_){"use strict";var A=new e.Cartesian3,x=new e.Cartesian3,w=new e.Cartesian3,C=new e.Cartesian3,R=new e.Rectangle,E=new e.Cartesian2,F=new r.BoundingSphere,G=new r.BoundingSphere;function P(t,e){var a=new o.Geometry({attributes:new s.GeometryAttributes,primitiveType:o.PrimitiveType.TRIANGLES});return a.attributes.position=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(a.attributes.normal=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(a.attributes.tangent=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(a.attributes.bitangent=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),a}var V=new e.Cartesian3,L=new e.Cartesian3;function D(t,a){var r=t._vertexFormat,n=t._ellipsoid,s=a.height,l=a.width,u=a.northCap,m=a.southCap,d=0,g=s,y=s,f=0;u&&(d=1,y-=1,f+=1),m&&(g-=1,y-=1,f+=1),f+=l*y;for(var h=r.position?new Float64Array(3*f):void 0,v=r.st?new Float32Array(2*f):void 0,b=0,_=0,R=A,F=E,G=Number.MAX_VALUE,V=Number.MAX_VALUE,L=-Number.MAX_VALUE,D=-Number.MAX_VALUE,M=d;M<g;++M)for(var T=0;T<l;++T)p.RectangleGeometryLibrary.computePosition(a,n,r.st,M,T,R,F),h[b++]=R.x,h[b++]=R.y,h[b++]=R.z,r.st&&(v[_++]=F.x,v[_++]=F.y,G=Math.min(G,F.x),V=Math.min(V,F.y),L=Math.max(L,F.x),D=Math.max(D,F.y));if(u&&(p.RectangleGeometryLibrary.computePosition(a,n,r.st,0,0,R,F),h[b++]=R.x,h[b++]=R.y,h[b++]=R.z,r.st&&(v[_++]=F.x,v[_++]=F.y,G=F.x,V=F.y,L=F.x,D=F.y)),m&&(p.RectangleGeometryLibrary.computePosition(a,n,r.st,s-1,0,R,F),h[b++]=R.x,h[b++]=R.y,h[b]=R.z,r.st&&(v[_++]=F.x,v[_]=F.y,G=Math.min(G,F.x),V=Math.min(V,F.y),L=Math.max(L,F.x),D=Math.max(D,F.y))),r.st&&(G<0||V<0||L>1||D>1))for(var O=0;O<v.length;O+=2)v[O]=(v[O]-G)/(L-G),v[O+1]=(v[O+1]-V)/(D-V);var N=function(t,a,r,n){var i=t.length,o=a.normal?new Float32Array(i):void 0,s=a.tangent?new Float32Array(i):void 0,l=a.bitangent?new Float32Array(i):void 0,u=0,c=C,m=w,p=x;if(a.normal||a.tangent||a.bitangent)for(var d=0;d<i;d+=3){var g=e.Cartesian3.fromArray(t,d,A),y=u+1,f=u+2;p=r.geodeticSurfaceNormal(g,p),(a.tangent||a.bitangent)&&(e.Cartesian3.cross(e.Cartesian3.UNIT_Z,p,m),e.Matrix3.multiplyByVector(n,m,m),e.Cartesian3.normalize(m,m),a.bitangent&&e.Cartesian3.normalize(e.Cartesian3.cross(p,m,c),c)),a.normal&&(o[u]=p.x,o[y]=p.y,o[f]=p.z),a.tangent&&(s[u]=m.x,s[y]=m.y,s[f]=m.z),a.bitangent&&(l[u]=c.x,l[y]=c.y,l[f]=c.z),u+=3}return P(a,{positions:t,normals:o,tangents:s,bitangents:l})}(h,r,n,a.tangentRotationMatrix),S=6*(l-1)*(y-1);u&&(S+=3*(l-1)),m&&(S+=3*(l-1));var I,k=c.IndexDatatype.createTypedArray(f,S),H=0,z=0;for(I=0;I<y-1;++I){for(var B=0;B<l-1;++B){var U=H,Y=U+l,q=Y+1,X=U+1;k[z++]=U,k[z++]=Y,k[z++]=X,k[z++]=X,k[z++]=Y,k[z++]=q,++H}++H}if(u||m){var Q,W,J=f-1,j=f-1;if(u&&m&&(J=f-2),H=0,u)for(I=0;I<l-1;I++)W=(Q=H)+1,k[z++]=J,k[z++]=Q,k[z++]=W,++H;if(m)for(H=(y-1)*l,I=0;I<l-1;I++)W=(Q=H)+1,k[z++]=Q,k[z++]=j,k[z++]=W,++H}return N.indices=k,r.st&&(N.attributes.st=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:v})),N}function M(t,e,a,r,n){return t[e++]=r[a],t[e++]=r[a+1],t[e++]=r[a+2],t[e++]=n[a],t[e++]=n[a+1],t[e]=n[a+2],t}function T(t,e,a,r){return t[e++]=r[a],t[e++]=r[a+1],t[e++]=r[a],t[e]=r[a+1],t}var O=new d.VertexFormat;function N(r,n){var s,p=r._shadowVolume,g=r._offsetAttribute,y=r._vertexFormat,f=r._extrudedHeight,h=r._surfaceHeight,v=r._ellipsoid,b=n.height,_=n.width;if(p){var R=d.VertexFormat.clone(y,O);R.normal=!0,r._vertexFormat=R}var E=D(r,n);p&&(r._vertexFormat=y);var F=m.PolygonPipeline.scaleToGeodeticHeight(E.attributes.position.values,h,v,!1),G=(F=new Float64Array(F)).length,N=2*G,S=new Float64Array(N);S.set(F);var I=m.PolygonPipeline.scaleToGeodeticHeight(E.attributes.position.values,f,v);S.set(I,G),E.attributes.position.values=S;var k,H,z,B=y.normal?new Float32Array(N):void 0,U=y.tangent?new Float32Array(N):void 0,Y=y.bitangent?new Float32Array(N):void 0,q=y.st?new Float32Array(N/3*2):void 0;if(y.normal){for(H=E.attributes.normal.values,B.set(H),s=0;s<G;s++)H[s]=-H[s];B.set(H,G),E.attributes.normal.values=B}if(p){H=E.attributes.normal.values,y.normal||(E.attributes.normal=void 0);var X=new Float32Array(N);for(s=0;s<G;s++)H[s]=-H[s];X.set(H,G),E.attributes.extrudeDirection=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:X})}var Q=t.defined(g);if(Q){var W=G/3*2,J=new Uint8Array(W);g===a.GeometryOffsetAttribute.TOP?J=a.arrayFill(J,1,0,W/2):(z=g===a.GeometryOffsetAttribute.NONE?0:1,J=a.arrayFill(J,z)),E.attributes.applyOffset=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:J})}if(y.tangent){var j=E.attributes.tangent.values;for(U.set(j),s=0;s<G;s++)j[s]=-j[s];U.set(j,G),E.attributes.tangent.values=U}if(y.bitangent){var Z=E.attributes.bitangent.values;Y.set(Z),Y.set(Z,G),E.attributes.bitangent.values=Y}y.st&&(k=E.attributes.st.values,q.set(k),q.set(k,G/3*2),E.attributes.st.values=q);var K=E.indices,$=K.length,tt=G/3,et=c.IndexDatatype.createTypedArray(N/3,2*$);for(et.set(K),s=0;s<$;s+=3)et[s+$]=K[s+2]+tt,et[s+1+$]=K[s+1]+tt,et[s+2+$]=K[s]+tt;E.indices=et;var at=n.northCap,rt=n.southCap,nt=b,it=2,ot=0,st=4,lt=4;at&&(it-=1,nt-=1,ot+=1,st-=2,lt-=1),rt&&(it-=1,nt-=1,ot+=1,st-=2,lt-=1);var ut=2*((ot+=it*_+2*nt-st)+lt),ct=new Float64Array(3*ut),mt=p?new Float32Array(3*ut):void 0,pt=Q?new Uint8Array(ut):void 0,dt=y.st?new Float32Array(2*ut):void 0,gt=g===a.GeometryOffsetAttribute.TOP;Q&&!gt&&(z=g===a.GeometryOffsetAttribute.ALL?1:0,pt=a.arrayFill(pt,z));var yt,ft=0,ht=0,vt=0,bt=0,_t=_*nt;for(s=0;s<_t;s+=_)ct=M(ct,ft,yt=3*s,F,I),ft+=6,y.st&&(dt=T(dt,ht,2*s,k),ht+=4),p&&(vt+=3,mt[vt++]=H[yt],mt[vt++]=H[yt+1],mt[vt++]=H[yt+2]),gt&&(pt[bt++]=1,bt+=1);if(rt){var At=at?_t+1:_t;for(yt=3*At,s=0;s<2;s++)ct=M(ct,ft,yt,F,I),ft+=6,y.st&&(dt=T(dt,ht,2*At,k),ht+=4),p&&(vt+=3,mt[vt++]=H[yt],mt[vt++]=H[yt+1],mt[vt++]=H[yt+2]),gt&&(pt[bt++]=1,bt+=1)}else for(s=_t-_;s<_t;s++)ct=M(ct,ft,yt=3*s,F,I),ft+=6,y.st&&(dt=T(dt,ht,2*s,k),ht+=4),p&&(vt+=3,mt[vt++]=H[yt],mt[vt++]=H[yt+1],mt[vt++]=H[yt+2]),gt&&(pt[bt++]=1,bt+=1);for(s=_t-1;s>0;s-=_)ct=M(ct,ft,yt=3*s,F,I),ft+=6,y.st&&(dt=T(dt,ht,2*s,k),ht+=4),p&&(vt+=3,mt[vt++]=H[yt],mt[vt++]=H[yt+1],mt[vt++]=H[yt+2]),gt&&(pt[bt++]=1,bt+=1);if(at){var xt=_t;for(yt=3*xt,s=0;s<2;s++)ct=M(ct,ft,yt,F,I),ft+=6,y.st&&(dt=T(dt,ht,2*xt,k),ht+=4),p&&(vt+=3,mt[vt++]=H[yt],mt[vt++]=H[yt+1],mt[vt++]=H[yt+2]),gt&&(pt[bt++]=1,bt+=1)}else for(s=_-1;s>=0;s--)ct=M(ct,ft,yt=3*s,F,I),ft+=6,y.st&&(dt=T(dt,ht,2*s,k),ht+=4),p&&(vt+=3,mt[vt++]=H[yt],mt[vt++]=H[yt+1],mt[vt++]=H[yt+2]),gt&&(pt[bt++]=1,bt+=1);var wt=function(t,a,r){var n=t.length,o=a.normal?new Float32Array(n):void 0,s=a.tangent?new Float32Array(n):void 0,l=a.bitangent?new Float32Array(n):void 0,u=0,c=0,m=0,p=!0,d=C,g=w,y=x;if(a.normal||a.tangent||a.bitangent)for(var f=0;f<n;f+=6){var h=e.Cartesian3.fromArray(t,f,A),v=e.Cartesian3.fromArray(t,(f+6)%n,V);if(p){var b=e.Cartesian3.fromArray(t,(f+3)%n,L);e.Cartesian3.subtract(v,h,v),e.Cartesian3.subtract(b,h,b),y=e.Cartesian3.normalize(e.Cartesian3.cross(b,v,y),y),p=!1}e.Cartesian3.equalsEpsilon(v,h,i.CesiumMath.EPSILON10)&&(p=!0),(a.tangent||a.bitangent)&&(d=r.geodeticSurfaceNormal(h,d),a.tangent&&(g=e.Cartesian3.normalize(e.Cartesian3.cross(d,y,g),g))),a.normal&&(o[u++]=y.x,o[u++]=y.y,o[u++]=y.z,o[u++]=y.x,o[u++]=y.y,o[u++]=y.z),a.tangent&&(s[c++]=g.x,s[c++]=g.y,s[c++]=g.z,s[c++]=g.x,s[c++]=g.y,s[c++]=g.z),a.bitangent&&(l[m++]=d.x,l[m++]=d.y,l[m++]=d.z,l[m++]=d.x,l[m++]=d.y,l[m++]=d.z)}return P(a,{positions:t,normals:o,tangents:s,bitangents:l})}(ct,y,v);y.st&&(wt.attributes.st=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:dt})),p&&(wt.attributes.extrudeDirection=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:mt})),Q&&(wt.attributes.applyOffset=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:pt}));var Ct,Rt,Et,Ft,Gt=c.IndexDatatype.createTypedArray(ut,6*ot);G=ct.length/3;var Pt=0;for(s=0;s<G-1;s+=2){Ft=((Ct=s)+2)%G;var Vt=e.Cartesian3.fromArray(ct,3*Ct,V),Lt=e.Cartesian3.fromArray(ct,3*Ft,L);e.Cartesian3.equalsEpsilon(Vt,Lt,i.CesiumMath.EPSILON10)||(Et=((Rt=(Ct+1)%G)+2)%G,Gt[Pt++]=Ct,Gt[Pt++]=Rt,Gt[Pt++]=Ft,Gt[Pt++]=Ft,Gt[Pt++]=Rt,Gt[Pt++]=Et)}return wt.indices=Gt,(wt=u.GeometryPipeline.combineInstances([new l.GeometryInstance({geometry:E}),new l.GeometryInstance({geometry:wt})]))[0]}var S=[new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3],I=new e.Cartographic,k=new e.Cartographic;function H(t,a,r,n,i){if(0===r)return e.Rectangle.clone(t,i);var o=p.RectangleGeometryLibrary.computeOptions(t,a,r,0,R,I),s=o.height,l=o.width,u=S;return p.RectangleGeometryLibrary.computePosition(o,n,!1,0,0,u[0]),p.RectangleGeometryLibrary.computePosition(o,n,!1,0,l-1,u[1]),p.RectangleGeometryLibrary.computePosition(o,n,!1,s-1,0,u[2]),p.RectangleGeometryLibrary.computePosition(o,n,!1,s-1,l-1,u[3]),e.Rectangle.fromCartesianArray(u,n,i)}function z(a){var r=(a=t.defaultValue(a,t.defaultValue.EMPTY_OBJECT)).rectangle,n=t.defaultValue(a.height,0),o=t.defaultValue(a.extrudedHeight,n);this._rectangle=e.Rectangle.clone(r),this._granularity=t.defaultValue(a.granularity,i.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.Ellipsoid.clone(t.defaultValue(a.ellipsoid,e.Ellipsoid.WGS84)),this._surfaceHeight=Math.max(n,o),this._rotation=t.defaultValue(a.rotation,0),this._stRotation=t.defaultValue(a.stRotation,0),this._vertexFormat=d.VertexFormat.clone(t.defaultValue(a.vertexFormat,d.VertexFormat.DEFAULT)),this._extrudedHeight=Math.min(n,o),this._shadowVolume=t.defaultValue(a.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=a.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}z.packedLength=e.Rectangle.packedLength+e.Ellipsoid.packedLength+d.VertexFormat.packedLength+7,z.pack=function(a,r,n){return n=t.defaultValue(n,0),e.Rectangle.pack(a._rectangle,r,n),n+=e.Rectangle.packedLength,e.Ellipsoid.pack(a._ellipsoid,r,n),n+=e.Ellipsoid.packedLength,d.VertexFormat.pack(a._vertexFormat,r,n),n+=d.VertexFormat.packedLength,r[n++]=a._granularity,r[n++]=a._surfaceHeight,r[n++]=a._rotation,r[n++]=a._stRotation,r[n++]=a._extrudedHeight,r[n++]=a._shadowVolume?1:0,r[n]=t.defaultValue(a._offsetAttribute,-1),r};var B=new e.Rectangle,U=e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),Y={rectangle:B,ellipsoid:U,vertexFormat:O,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};z.unpack=function(a,r,n){r=t.defaultValue(r,0);var i=e.Rectangle.unpack(a,r,B);r+=e.Rectangle.packedLength;var o=e.Ellipsoid.unpack(a,r,U);r+=e.Ellipsoid.packedLength;var s=d.VertexFormat.unpack(a,r,O);r+=d.VertexFormat.packedLength;var l=a[r++],u=a[r++],c=a[r++],m=a[r++],p=a[r++],g=1===a[r++],y=a[r];return t.defined(n)?(n._rectangle=e.Rectangle.clone(i,n._rectangle),n._ellipsoid=e.Ellipsoid.clone(o,n._ellipsoid),n._vertexFormat=d.VertexFormat.clone(s,n._vertexFormat),n._granularity=l,n._surfaceHeight=u,n._rotation=c,n._stRotation=m,n._extrudedHeight=p,n._shadowVolume=g,n._offsetAttribute=-1===y?void 0:y,n):(Y.granularity=l,Y.height=u,Y.rotation=c,Y.stRotation=m,Y.extrudedHeight=p,Y.shadowVolume=g,Y.offsetAttribute=-1===y?void 0:y,new z(Y))},z.computeRectangle=function(a,r){var n=(a=t.defaultValue(a,t.defaultValue.EMPTY_OBJECT)).rectangle,o=t.defaultValue(a.granularity,i.CesiumMath.RADIANS_PER_DEGREE),s=t.defaultValue(a.ellipsoid,e.Ellipsoid.WGS84);return H(n,o,t.defaultValue(a.rotation,0),s,r)};var q=new e.Matrix3,X=new r.Quaternion,Q=new e.Cartographic;z.createGeometry=function(n){if(!i.CesiumMath.equalsEpsilon(n._rectangle.north,n._rectangle.south,i.CesiumMath.EPSILON10)&&!i.CesiumMath.equalsEpsilon(n._rectangle.east,n._rectangle.west,i.CesiumMath.EPSILON10)){var s=n._rectangle,l=n._ellipsoid,u=n._rotation,c=n._stRotation,d=n._vertexFormat,g=p.RectangleGeometryLibrary.computeOptions(s,n._granularity,u,c,R,I,k),y=q;if(0!==c||0!==u){var f=e.Rectangle.center(s,Q),h=l.geodeticSurfaceNormalCartographic(f,V);r.Quaternion.fromAxisAngle(h,-c,X),e.Matrix3.fromQuaternion(X,y)}else e.Matrix3.clone(e.Matrix3.IDENTITY,y);var v,b,_=n._surfaceHeight,A=n._extrudedHeight,x=!i.CesiumMath.equalsEpsilon(_,A,0,i.CesiumMath.EPSILON2);if(g.lonScalar=1/n._rectangle.width,g.latScalar=1/n._rectangle.height,g.tangentRotationMatrix=y,s=n._rectangle,x){v=N(n,g);var w=r.BoundingSphere.fromRectangle3D(s,l,_,G),C=r.BoundingSphere.fromRectangle3D(s,l,A,F);b=r.BoundingSphere.union(w,C)}else{if((v=D(n,g)).attributes.position.values=m.PolygonPipeline.scaleToGeodeticHeight(v.attributes.position.values,_,l,!1),t.defined(n._offsetAttribute)){var E=v.attributes.position.values.length,P=new Uint8Array(E/3),L=n._offsetAttribute===a.GeometryOffsetAttribute.NONE?0:1;a.arrayFill(P,L),v.attributes.applyOffset=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:P})}b=r.BoundingSphere.fromRectangle3D(s,l,_)}return d.position||delete v.attributes.position,new o.Geometry({attributes:v.attributes,indices:v.indices,primitiveType:v.primitiveType,boundingSphere:b,offsetAttribute:n._offsetAttribute})}},z.createShadowVolume=function(t,e,a){var r=t._granularity,n=t._ellipsoid,i=e(r,n),o=a(r,n);return new z({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:n,stRotation:t._stRotation,granularity:r,extrudedHeight:o,height:i,vertexFormat:d.VertexFormat.POSITION_ONLY,shadowVolume:!0})};var W=new e.Rectangle,J=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],j=new e.Matrix2,Z=new e.Cartographic;return Object.defineProperties(z.prototype,{rectangle:{get:function(){return t.defined(this._rotatedRectangle)||(this._rotatedRectangle=H(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return t.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){if(0===t._stRotation)return[0,0,0,1,1,0];var a=e.Rectangle.clone(t._rectangle,W),r=t._granularity,n=t._ellipsoid,i=H(a,r,t._rotation-t._stRotation,n,W),o=J;o[0].x=i.west,o[0].y=i.south,o[1].x=i.west,o[1].y=i.north,o[2].x=i.east,o[2].y=i.south;for(var s=t.rectangle,l=e.Matrix2.fromRotation(t._stRotation,j),u=e.Rectangle.center(s,Z),c=0;c<3;++c){var m=o[c];m.x-=u.longitude,m.y-=u.latitude,e.Matrix2.multiplyByVector(l,m,m),m.x+=u.longitude,m.y+=u.latitude,m.x=(m.x-s.west)/s.width,m.y=(m.y-s.south)/s.height}var p=o[0],d=o[1],g=o[2],y=new Array(6);return e.Cartesian2.pack(p,y),e.Cartesian2.pack(d,y,2),e.Cartesian2.pack(g,y,4),y}(this)),this._textureCoordinateRotationPoints}}}),function(a,r){return t.defined(r)&&(a=z.unpack(a,r)),a._ellipsoid=e.Ellipsoid.clone(a._ellipsoid),a._rectangle=e.Rectangle.clone(a._rectangle),z.createGeometry(a)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Cartesian2-40b13f31","./GeometryOffsetAttribute-964ec9ef","./Transforms-70f396e0","./ComponentDatatype-6c2e43c1","./Check-3917d765","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce","./Math-87254c13","./PolygonPipeline-5dc6dac0","./RectangleGeometryLibrary-415ccb50","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./EllipsoidRhumbLine-6baec512"],function(c,s,p,d,b,e,_,v,E,g,f,A,t,i,a,r){"use strict";var h=new d.BoundingSphere,y=new d.BoundingSphere,G=new s.Cartesian3,m=new s.Rectangle;function R(e,t){var i=e._ellipsoid,a=t.height,r=t.width,n=t.northCap,o=t.southCap,l=a,u=2,s=0,e=4;n&&(--u,--l,s+=1,e-=2),o&&(--u,--l,s+=1,e-=2),s+=u*r+2*l-e;var c,p=new Float64Array(3*s),d=0,g=0,f=G;if(n)A.RectangleGeometryLibrary.computePosition(t,i,!1,g,0,f),p[d++]=f.x,p[d++]=f.y,p[d++]=f.z;else for(c=0;c<r;c++)A.RectangleGeometryLibrary.computePosition(t,i,!1,g,c,f),p[d++]=f.x,p[d++]=f.y,p[d++]=f.z;for(c=r-1,g=1;g<a;g++)A.RectangleGeometryLibrary.computePosition(t,i,!1,g,c,f),p[d++]=f.x,p[d++]=f.y,p[d++]=f.z;if(g=a-1,!o)for(c=r-2;0<=c;c--)A.RectangleGeometryLibrary.computePosition(t,i,!1,g,c,f),p[d++]=f.x,p[d++]=f.y,p[d++]=f.z;for(c=0,g=a-2;0<g;g--)A.RectangleGeometryLibrary.computePosition(t,i,!1,g,c,f),p[d++]=f.x,p[d++]=f.y,p[d++]=f.z;for(var o=p.length/3*2,h=E.IndexDatatype.createTypedArray(p.length/3,o),y=0,m=0;m<p.length/3-1;m++)h[y++]=m,h[y++]=m+1;h[y++]=p.length/3-1,h[y++]=0;o=new _.Geometry({attributes:new v.GeometryAttributes,primitiveType:_.PrimitiveType.LINES});return o.attributes.position=new _.GeometryAttribute({componentDatatype:b.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p}),o.indices=h,o}function P(e){var t=(e=c.defaultValue(e,c.defaultValue.EMPTY_OBJECT)).rectangle,i=c.defaultValue(e.granularity,g.CesiumMath.RADIANS_PER_DEGREE),a=c.defaultValue(e.ellipsoid,s.Ellipsoid.WGS84),r=c.defaultValue(e.rotation,0),n=c.defaultValue(e.height,0),o=c.defaultValue(e.extrudedHeight,n);this._rectangle=s.Rectangle.clone(t),this._granularity=i,this._ellipsoid=a,this._surfaceHeight=Math.max(n,o),this._rotation=r,this._extrudedHeight=Math.min(n,o),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}P.packedLength=s.Rectangle.packedLength+s.Ellipsoid.packedLength+5,P.pack=function(e,t,i){return i=c.defaultValue(i,0),s.Rectangle.pack(e._rectangle,t,i),i+=s.Rectangle.packedLength,s.Ellipsoid.pack(e._ellipsoid,t,i),i+=s.Ellipsoid.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._extrudedHeight,t[i]=c.defaultValue(e._offsetAttribute,-1),t};var w=new s.Rectangle,L=s.Ellipsoid.clone(s.Ellipsoid.UNIT_SPHERE),C={rectangle:w,ellipsoid:L,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};P.unpack=function(e,t,i){t=c.defaultValue(t,0);var a=s.Rectangle.unpack(e,t,w);t+=s.Rectangle.packedLength;var r=s.Ellipsoid.unpack(e,t,L);t+=s.Ellipsoid.packedLength;var n=e[t++],o=e[t++],l=e[t++],u=e[t++],t=e[t];return c.defined(i)?(i._rectangle=s.Rectangle.clone(a,i._rectangle),i._ellipsoid=s.Ellipsoid.clone(r,i._ellipsoid),i._surfaceHeight=o,i._rotation=l,i._extrudedHeight=u,i._offsetAttribute=-1===t?void 0:t,i):(C.granularity=n,C.height=o,C.rotation=l,C.extrudedHeight=u,C.offsetAttribute=-1===t?void 0:t,new P(C))};var D=new s.Cartographic;return P.createGeometry=function(e){var t=e._rectangle,i=e._ellipsoid,a=A.RectangleGeometryLibrary.computeOptions(t,e._granularity,e._rotation,0,m,D);if(!g.CesiumMath.equalsEpsilon(t.north,t.south,g.CesiumMath.EPSILON10)&&!g.CesiumMath.equalsEpsilon(t.east,t.west,g.CesiumMath.EPSILON10)){var r,n,o,l,u=e._surfaceHeight,s=e._extrudedHeight;return u=!g.CesiumMath.equalsEpsilon(u,s,0,g.CesiumMath.EPSILON2)?(n=function(e,t){var i=e._surfaceHeight,a=e._extrudedHeight,r=e._ellipsoid,n=a,o=i,l=R(e,t),a=t.height,i=t.width,u=(e=f.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,o,r,!1)).length;(o=new Float64Array(2*u)).set(e),n=f.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,n,r),o.set(n,u),l.attributes.position.values=o,r=t.northCap,n=t.southCap,t=4,r&&--t,n&&--t;for(var t=2*(o.length/3+t),s=E.IndexDatatype.createTypedArray(o.length/3,t),u=o.length/6,c=0,p=0;p<u-1;p++)s[c++]=p,s[c++]=p+1,s[c++]=p+u,s[c++]=p+u+1;return s[c++]=u-1,s[c++]=0,s[c++]=u+u-1,s[c++]=u,s[c++]=0,s[c++]=u,a=r?a-1:(s[c++]=r=i-1,s[c++]=r+u,i+a-2),s[c++]=a,s[c++]=a+u,n||(s[c++]=a=i+a-1,s[c]=a+u),l.indices=s,l}(e,a),c.defined(e._offsetAttribute)&&(r=n.attributes.position.values.length/3,o=new Uint8Array(r),o=e._offsetAttribute===p.GeometryOffsetAttribute.TOP?p.arrayFill(o,1,0,r/2):(l=e._offsetAttribute===p.GeometryOffsetAttribute.NONE?0:1,p.arrayFill(o,l)),n.attributes.applyOffset=new _.GeometryAttribute({componentDatatype:b.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:o})),o=d.BoundingSphere.fromRectangle3D(t,i,u,y),s=d.BoundingSphere.fromRectangle3D(t,i,s,h),d.BoundingSphere.union(o,s)):((n=R(e,a)).attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(n.attributes.position.values,u,i,!1),c.defined(e._offsetAttribute)&&(a=n.attributes.position.values.length,a=new Uint8Array(a/3),l=e._offsetAttribute===p.GeometryOffsetAttribute.NONE?0:1,p.arrayFill(a,l),n.attributes.applyOffset=new _.GeometryAttribute({componentDatatype:b.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),d.BoundingSphere.fromRectangle3D(t,i,u)),new _.Geometry({attributes:n.attributes,indices:n.indices,primitiveType:_.PrimitiveType.LINES,boundingSphere:u,offsetAttribute:e._offsetAttribute})}},function(e,t){return(e=c.defined(t)?P.unpack(e,t):e)._ellipsoid=s.Ellipsoid.clone(e._ellipsoid),e._rectangle=s.Rectangle.clone(e._rectangle),P.createGeometry(e)}}); | ||
define(["./when-229515d6","./Matrix2-f2da41d4","./GeometryOffsetAttribute-ff1e192c","./Transforms-7cd3197b","./ComponentDatatype-17b06483","./RuntimeError-ffe03243","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b","./PolygonPipeline-5582b1ec","./RectangleGeometryLibrary-fbe816b1","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./EllipsoidRhumbLine-afd6cd20"],(function(e,t,i,a,r,n,o,l,u,s,p,c,d,f){"use strict";var g=new a.BoundingSphere,h=new a.BoundingSphere,y=new t.Cartesian3,b=new t.Rectangle;function m(e,t){var i=e._ellipsoid,a=t.height,n=t.width,s=t.northCap,c=t.southCap,d=a,f=2,g=0,h=4;s&&(f-=1,d-=1,g+=1,h-=2),c&&(f-=1,d-=1,g+=1,h-=2),g+=f*n+2*d-h;var b,m=new Float64Array(3*g),_=0,v=0,E=y;if(s)p.RectangleGeometryLibrary.computePosition(t,i,!1,v,0,E),m[_++]=E.x,m[_++]=E.y,m[_++]=E.z;else for(b=0;b<n;b++)p.RectangleGeometryLibrary.computePosition(t,i,!1,v,b,E),m[_++]=E.x,m[_++]=E.y,m[_++]=E.z;for(b=n-1,v=1;v<a;v++)p.RectangleGeometryLibrary.computePosition(t,i,!1,v,b,E),m[_++]=E.x,m[_++]=E.y,m[_++]=E.z;if(v=a-1,!c)for(b=n-2;b>=0;b--)p.RectangleGeometryLibrary.computePosition(t,i,!1,v,b,E),m[_++]=E.x,m[_++]=E.y,m[_++]=E.z;for(b=0,v=a-2;v>0;v--)p.RectangleGeometryLibrary.computePosition(t,i,!1,v,b,E),m[_++]=E.x,m[_++]=E.y,m[_++]=E.z;for(var A=m.length/3*2,G=u.IndexDatatype.createTypedArray(m.length/3,A),R=0,P=0;P<m.length/3-1;P++)G[R++]=P,G[R++]=P+1;G[R++]=m.length/3-1,G[R++]=0;var w=new o.Geometry({attributes:new l.GeometryAttributes,primitiveType:o.PrimitiveType.LINES});return w.attributes.position=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m}),w.indices=G,w}function _(i){var a=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).rectangle,n=e.defaultValue(i.granularity,r.CesiumMath.RADIANS_PER_DEGREE),o=e.defaultValue(i.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(i.rotation,0),u=e.defaultValue(i.height,0),s=e.defaultValue(i.extrudedHeight,u);this._rectangle=t.Rectangle.clone(a),this._granularity=n,this._ellipsoid=o,this._surfaceHeight=Math.max(u,s),this._rotation=l,this._extrudedHeight=Math.min(u,s),this._offsetAttribute=i.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}_.packedLength=t.Rectangle.packedLength+t.Ellipsoid.packedLength+5,_.pack=function(i,a,r){return r=e.defaultValue(r,0),t.Rectangle.pack(i._rectangle,a,r),r+=t.Rectangle.packedLength,t.Ellipsoid.pack(i._ellipsoid,a,r),r+=t.Ellipsoid.packedLength,a[r++]=i._granularity,a[r++]=i._surfaceHeight,a[r++]=i._rotation,a[r++]=i._extrudedHeight,a[r]=e.defaultValue(i._offsetAttribute,-1),a};var v=new t.Rectangle,E=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),A={rectangle:v,ellipsoid:E,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};_.unpack=function(i,a,r){a=e.defaultValue(a,0);var n=t.Rectangle.unpack(i,a,v);a+=t.Rectangle.packedLength;var o=t.Ellipsoid.unpack(i,a,E);a+=t.Ellipsoid.packedLength;var l=i[a++],u=i[a++],s=i[a++],p=i[a++],c=i[a];return e.defined(r)?(r._rectangle=t.Rectangle.clone(n,r._rectangle),r._ellipsoid=t.Ellipsoid.clone(o,r._ellipsoid),r._surfaceHeight=u,r._rotation=s,r._extrudedHeight=p,r._offsetAttribute=-1===c?void 0:c,r):(A.granularity=l,A.height=u,A.rotation=s,A.extrudedHeight=p,A.offsetAttribute=-1===c?void 0:c,new _(A))};var G=new t.Cartographic;return _.createGeometry=function(t){var n,l,c=t._rectangle,d=t._ellipsoid,f=p.RectangleGeometryLibrary.computeOptions(c,t._granularity,t._rotation,0,b,G);if(!r.CesiumMath.equalsEpsilon(c.north,c.south,r.CesiumMath.EPSILON10)&&!r.CesiumMath.equalsEpsilon(c.east,c.west,r.CesiumMath.EPSILON10)){var y,_=t._surfaceHeight,v=t._extrudedHeight;if(!r.CesiumMath.equalsEpsilon(_,v,0,r.CesiumMath.EPSILON2)){if(n=function(e,t){var i=e._surfaceHeight,a=e._extrudedHeight,r=e._ellipsoid,n=a,o=i,l=m(e,t),p=t.height,c=t.width,d=s.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,o,r,!1),f=d.length,g=new Float64Array(2*f);g.set(d);var h=s.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,n,r);g.set(h,f),l.attributes.position.values=g;var y=t.northCap,b=t.southCap,_=4;y&&(_-=1),b&&(_-=1);var v=2*(g.length/3+_),E=u.IndexDatatype.createTypedArray(g.length/3,v);f=g.length/6;for(var A,G=0,R=0;R<f-1;R++)E[G++]=R,E[G++]=R+1,E[G++]=R+f,E[G++]=R+f+1;if(E[G++]=f-1,E[G++]=0,E[G++]=f+f-1,E[G++]=f,E[G++]=0,E[G++]=f,y)A=p-1;else{var P=c-1;E[G++]=P,E[G++]=P+f,A=c+p-2}if(E[G++]=A,E[G++]=A+f,!b){var w=c+A-1;E[G++]=w,E[G]=w+f}return l.indices=E,l}(t,f),e.defined(t._offsetAttribute)){var E=n.attributes.position.values.length/3,A=new Uint8Array(E);t._offsetAttribute===i.GeometryOffsetAttribute.TOP?A=i.arrayFill(A,1,0,E/2):(y=t._offsetAttribute===i.GeometryOffsetAttribute.NONE?0:1,A=i.arrayFill(A,y)),n.attributes.applyOffset=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}var R=a.BoundingSphere.fromRectangle3D(c,d,_,h),P=a.BoundingSphere.fromRectangle3D(c,d,v,g);l=a.BoundingSphere.union(R,P)}else{if((n=m(t,f)).attributes.position.values=s.PolygonPipeline.scaleToGeodeticHeight(n.attributes.position.values,_,d,!1),e.defined(t._offsetAttribute)){var w=n.attributes.position.values.length,L=new Uint8Array(w/3);y=t._offsetAttribute===i.GeometryOffsetAttribute.NONE?0:1,i.arrayFill(L,y),n.attributes.applyOffset=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}l=a.BoundingSphere.fromRectangle3D(c,d,_)}return new o.Geometry({attributes:n.attributes,indices:n.indices,primitiveType:o.PrimitiveType.LINES,boundingSphere:l,offsetAttribute:t._offsetAttribute})}},function(i,a){return e.defined(a)&&(i=_.unpack(i,a)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),i._rectangle=t.Rectangle.clone(i._rectangle),_.createGeometry(i)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Cartesian2-40b13f31","./ArcType-1da7fdca","./Transforms-70f396e0","./Color-16798d78","./ComponentDatatype-6c2e43c1","./Check-3917d765","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce","./Math-87254c13","./PolylinePipeline-ff2b6881","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./EllipsoidGeodesic-bdbae7c8","./EllipsoidRhumbLine-6baec512","./IntersectionTests-587a744a","./Plane-9d4e3328"],function(L,V,x,S,I,R,e,O,M,U,N,F,o,t,r,a,l,i,n){"use strict";function c(e){var o=(e=L.defaultValue(e,L.defaultValue.EMPTY_OBJECT)).positions,t=e.colors,r=L.defaultValue(e.colorsPerVertex,!1);this._positions=o,this._colors=t,this._colorsPerVertex=r,this._arcType=L.defaultValue(e.arcType,x.ArcType.GEODESIC),this._granularity=L.defaultValue(e.granularity,N.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=L.defaultValue(e.ellipsoid,V.Ellipsoid.WGS84),this._workerName="createSimplePolylineGeometry";o=1+o.length*V.Cartesian3.packedLength;o+=L.defined(t)?1+t.length*I.Color.packedLength:1,this.packedLength=o+V.Ellipsoid.packedLength+3}c.pack=function(e,o,t){var r;t=L.defaultValue(t,0);var a=e._positions,l=a.length;for(o[t++]=l,r=0;r<l;++r,t+=V.Cartesian3.packedLength)V.Cartesian3.pack(a[r],o,t);var i=e._colors,l=L.defined(i)?i.length:0;for(o[t++]=l,r=0;r<l;++r,t+=I.Color.packedLength)I.Color.pack(i[r],o,t);return V.Ellipsoid.pack(e._ellipsoid,o,t),t+=V.Ellipsoid.packedLength,o[t++]=e._colorsPerVertex?1:0,o[t++]=e._arcType,o[t]=e._granularity,o},c.unpack=function(e,o,t){o=L.defaultValue(o,0);for(var r=e[o++],a=new Array(r),l=0;l<r;++l,o+=V.Cartesian3.packedLength)a[l]=V.Cartesian3.unpack(e,o);var i=0<(r=e[o++])?new Array(r):void 0;for(l=0;l<r;++l,o+=I.Color.packedLength)i[l]=I.Color.unpack(e,o);var n=V.Ellipsoid.unpack(e,o);o+=V.Ellipsoid.packedLength;var s=1===e[o++],p=e[o++],d=e[o];return L.defined(t)?(t._positions=a,t._colors=i,t._ellipsoid=n,t._colorsPerVertex=s,t._arcType=p,t._granularity=d,t):new c({positions:a,colors:i,ellipsoid:n,colorsPerVertex:s,arcType:p,granularity:d})};var H=new Array(2),W=new Array(2),Y={positions:H,height:W,ellipsoid:void 0,minDistance:void 0,granularity:void 0};return c.createGeometry=function(e){var o=e._positions,t=e._colors,r=e._colorsPerVertex,a=e._arcType,l=e._granularity,e=e._ellipsoid,i=N.CesiumMath.chordLength(l,e.maximumRadius),n=L.defined(t)&&!r,s=o.length,p=0;if(a===x.ArcType.GEODESIC||a===x.ArcType.RHUMB){var d,c,y=a===x.ArcType.GEODESIC?(d=N.CesiumMath.chordLength(l,e.maximumRadius),c=F.PolylinePipeline.numberOfPoints,F.PolylinePipeline.generateArc):(d=l,c=F.PolylinePipeline.numberOfPointsRhumbLine,F.PolylinePipeline.generateRhumbArc),f=F.PolylinePipeline.extractHeights(o,e),u=Y;if(a===x.ArcType.GEODESIC?u.minDistance=i:u.granularity=l,u.ellipsoid=e,n){for(var h=0,C=0;C<s-1;C++)h+=c(o[C],o[C+1],d)+1;B=new Float64Array(3*h),A=new Uint8Array(4*h),u.positions=H,u.height=W;var T=0;for(C=0;C<s-1;++C){H[0]=o[C],H[1]=o[C+1],W[0]=f[C],W[1]=f[C+1];var g=y(u);if(L.defined(t))for(var m=g.length/3,b=t[C],P=0;P<m;++P)A[T++]=I.Color.floatToByte(b.red),A[T++]=I.Color.floatToByte(b.green),A[T++]=I.Color.floatToByte(b.blue),A[T++]=I.Color.floatToByte(b.alpha);B.set(g,p),p+=g.length}}else if(u.positions=o,u.height=f,B=new Float64Array(y(u)),L.defined(t)){for(A=new Uint8Array(B.length/3*4),C=0;C<s-1;++C)p=function(e,o,t,r,a,l,i){var n=F.PolylinePipeline.numberOfPoints(e,o,a),s=t.red,p=t.green,d=t.blue,c=t.alpha,y=r.red,e=r.green,o=r.blue,a=r.alpha;if(I.Color.equals(t,r)){for(g=0;g<n;g++)l[i++]=I.Color.floatToByte(s),l[i++]=I.Color.floatToByte(p),l[i++]=I.Color.floatToByte(d),l[i++]=I.Color.floatToByte(c);return i}for(var f=(y-s)/n,u=(e-p)/n,h=(o-d)/n,C=(a-c)/n,T=i,g=0;g<n;g++)l[T++]=I.Color.floatToByte(s+g*f),l[T++]=I.Color.floatToByte(p+g*u),l[T++]=I.Color.floatToByte(d+g*h),l[T++]=I.Color.floatToByte(c+g*C);return T}(o[C],o[C+1],t[C],t[C+1],i,A,p);var _=t[s-1];A[p++]=I.Color.floatToByte(_.red),A[p++]=I.Color.floatToByte(_.green),A[p++]=I.Color.floatToByte(_.blue),A[p++]=I.Color.floatToByte(_.alpha)}}else{var v=n?2*s-2:s,B=new Float64Array(3*v),A=L.defined(t)?new Uint8Array(4*v):void 0,E=0,k=0;for(C=0;C<s;++C){var G=o[C];if(n&&0<C&&(V.Cartesian3.pack(G,B,E),E+=3,b=t[C-1],A[k++]=I.Color.floatToByte(b.red),A[k++]=I.Color.floatToByte(b.green),A[k++]=I.Color.floatToByte(b.blue),A[k++]=I.Color.floatToByte(b.alpha)),n&&C===s-1)break;V.Cartesian3.pack(G,B,E),E+=3,L.defined(t)&&(b=t[C],A[k++]=I.Color.floatToByte(b.red),A[k++]=I.Color.floatToByte(b.green),A[k++]=I.Color.floatToByte(b.blue),A[k++]=I.Color.floatToByte(b.alpha))}}_=new M.GeometryAttributes;_.position=new O.GeometryAttribute({componentDatatype:R.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:B}),L.defined(t)&&(_.color=new O.GeometryAttribute({componentDatatype:R.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:A,normalize:!0})),v=B.length/3;var w=U.IndexDatatype.createTypedArray(v,2*(v-1)),D=0;for(C=0;C<v-1;++C)w[D++]=C,w[D++]=C+1;return new O.Geometry({attributes:_,indices:w,primitiveType:O.PrimitiveType.LINES,boundingSphere:S.BoundingSphere.fromPoints(o)})},function(e,o){return(e=L.defined(o)?c.unpack(e,o):e)._ellipsoid=V.Ellipsoid.clone(e._ellipsoid),c.createGeometry(e)}}); | ||
define(["./when-229515d6","./Matrix2-f2da41d4","./ArcType-1da7fdca","./Transforms-7cd3197b","./Color-d2414093","./ComponentDatatype-17b06483","./RuntimeError-ffe03243","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b","./PolylinePipeline-a3ba6f24","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./EllipsoidGeodesic-43ba18de","./EllipsoidRhumbLine-afd6cd20","./IntersectionTests-1b8a3cb9","./Plane-0421a8be"],(function(e,o,r,t,a,l,i,n,s,p,d,y,f,c,u,h,C){"use strict";function T(e,o,r,t,l,i,n){var s,p=d.PolylinePipeline.numberOfPoints(e,o,l),y=r.red,f=r.green,c=r.blue,u=r.alpha,h=t.red,C=t.green,T=t.blue,g=t.alpha;if(a.Color.equals(r,t)){for(s=0;s<p;s++)i[n++]=a.Color.floatToByte(y),i[n++]=a.Color.floatToByte(f),i[n++]=a.Color.floatToByte(c),i[n++]=a.Color.floatToByte(u);return n}var m=(h-y)/p,b=(C-f)/p,v=(T-c)/p,P=(g-u)/p,_=n;for(s=0;s<p;s++)i[_++]=a.Color.floatToByte(y+s*m),i[_++]=a.Color.floatToByte(f+s*b),i[_++]=a.Color.floatToByte(c+s*v),i[_++]=a.Color.floatToByte(u+s*P);return _}function g(t){var i=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions,n=t.colors,s=e.defaultValue(t.colorsPerVertex,!1);this._positions=i,this._colors=n,this._colorsPerVertex=s,this._arcType=e.defaultValue(t.arcType,r.ArcType.GEODESIC),this._granularity=e.defaultValue(t.granularity,l.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.defaultValue(t.ellipsoid,o.Ellipsoid.WGS84),this._workerName="createSimplePolylineGeometry";var p=1+i.length*o.Cartesian3.packedLength;p+=e.defined(n)?1+n.length*a.Color.packedLength:1,this.packedLength=p+o.Ellipsoid.packedLength+3}g.pack=function(r,t,l){var i;l=e.defaultValue(l,0);var n=r._positions,s=n.length;for(t[l++]=s,i=0;i<s;++i,l+=o.Cartesian3.packedLength)o.Cartesian3.pack(n[i],t,l);var p=r._colors;for(s=e.defined(p)?p.length:0,t[l++]=s,i=0;i<s;++i,l+=a.Color.packedLength)a.Color.pack(p[i],t,l);return o.Ellipsoid.pack(r._ellipsoid,t,l),l+=o.Ellipsoid.packedLength,t[l++]=r._colorsPerVertex?1:0,t[l++]=r._arcType,t[l]=r._granularity,t},g.unpack=function(r,t,l){var i;t=e.defaultValue(t,0);var n=r[t++],s=new Array(n);for(i=0;i<n;++i,t+=o.Cartesian3.packedLength)s[i]=o.Cartesian3.unpack(r,t);var p=(n=r[t++])>0?new Array(n):void 0;for(i=0;i<n;++i,t+=a.Color.packedLength)p[i]=a.Color.unpack(r,t);var d=o.Ellipsoid.unpack(r,t);t+=o.Ellipsoid.packedLength;var y=1===r[t++],f=r[t++],c=r[t];return e.defined(l)?(l._positions=s,l._colors=p,l._ellipsoid=d,l._colorsPerVertex=y,l._arcType=f,l._granularity=c,l):new g({positions:s,colors:p,ellipsoid:d,colorsPerVertex:y,arcType:f,granularity:c})};var m=new Array(2),b=new Array(2),v={positions:m,height:b,ellipsoid:void 0,minDistance:void 0,granularity:void 0};return g.createGeometry=function(i){var y,f,c,u,h,C=i._positions,g=i._colors,P=i._colorsPerVertex,_=i._arcType,B=i._granularity,A=i._ellipsoid,E=l.CesiumMath.chordLength(B,A.maximumRadius),k=e.defined(g)&&!P,G=C.length,w=0;if(_===r.ArcType.GEODESIC||_===r.ArcType.RHUMB){var D,L,V;_===r.ArcType.GEODESIC?(D=l.CesiumMath.chordLength(B,A.maximumRadius),L=d.PolylinePipeline.numberOfPoints,V=d.PolylinePipeline.generateArc):(D=B,L=d.PolylinePipeline.numberOfPointsRhumbLine,V=d.PolylinePipeline.generateRhumbArc);var x=d.PolylinePipeline.extractHeights(C,A),S=v;if(_===r.ArcType.GEODESIC?S.minDistance=E:S.granularity=B,S.ellipsoid=A,k){var I=0;for(y=0;y<G-1;y++)I+=L(C[y],C[y+1],D)+1;f=new Float64Array(3*I),u=new Uint8Array(4*I),S.positions=m,S.height=b;var R=0;for(y=0;y<G-1;++y){m[0]=C[y],m[1]=C[y+1],b[0]=x[y],b[1]=x[y+1];var O=V(S);if(e.defined(g)){var M=O.length/3;h=g[y];for(var U=0;U<M;++U)u[R++]=a.Color.floatToByte(h.red),u[R++]=a.Color.floatToByte(h.green),u[R++]=a.Color.floatToByte(h.blue),u[R++]=a.Color.floatToByte(h.alpha)}f.set(O,w),w+=O.length}}else if(S.positions=C,S.height=x,f=new Float64Array(V(S)),e.defined(g)){for(u=new Uint8Array(f.length/3*4),y=0;y<G-1;++y){w=T(C[y],C[y+1],g[y],g[y+1],E,u,w)}var N=g[G-1];u[w++]=a.Color.floatToByte(N.red),u[w++]=a.Color.floatToByte(N.green),u[w++]=a.Color.floatToByte(N.blue),u[w++]=a.Color.floatToByte(N.alpha)}}else{c=k?2*G-2:G,f=new Float64Array(3*c),u=e.defined(g)?new Uint8Array(4*c):void 0;var F=0,H=0;for(y=0;y<G;++y){var W=C[y];if(k&&y>0&&(o.Cartesian3.pack(W,f,F),F+=3,h=g[y-1],u[H++]=a.Color.floatToByte(h.red),u[H++]=a.Color.floatToByte(h.green),u[H++]=a.Color.floatToByte(h.blue),u[H++]=a.Color.floatToByte(h.alpha)),k&&y===G-1)break;o.Cartesian3.pack(W,f,F),F+=3,e.defined(g)&&(h=g[y],u[H++]=a.Color.floatToByte(h.red),u[H++]=a.Color.floatToByte(h.green),u[H++]=a.Color.floatToByte(h.blue),u[H++]=a.Color.floatToByte(h.alpha))}}var Y=new s.GeometryAttributes;Y.position=new n.GeometryAttribute({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:f}),e.defined(g)&&(Y.color=new n.GeometryAttribute({componentDatatype:l.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:u,normalize:!0}));var q=2*((c=f.length/3)-1),z=p.IndexDatatype.createTypedArray(c,q),J=0;for(y=0;y<c-1;++y)z[J++]=y,z[J++]=y+1;return new n.Geometry({attributes:Y,indices:z,primitiveType:n.PrimitiveType.LINES,boundingSphere:t.BoundingSphere.fromPoints(C)})},function(r,t){return e.defined(t)&&(r=g.unpack(r,t)),r._ellipsoid=o.Ellipsoid.clone(r._ellipsoid),g.createGeometry(r)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Cartesian2-40b13f31","./Check-3917d765","./EllipsoidGeometry-1593408b","./VertexFormat-8d463a4f","./Math-87254c13","./GeometryOffsetAttribute-964ec9ef","./Transforms-70f396e0","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce"],function(i,a,e,o,n,t,r,s,c,d,l,m,u,p,y){"use strict";function f(e){var t=i.defaultValue(e.radius,1),e={radii:new a.Cartesian3(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new o.EllipsoidGeometry(e),this._workerName="createSphereGeometry"}f.packedLength=o.EllipsoidGeometry.packedLength,f.pack=function(e,t,r){return o.EllipsoidGeometry.pack(e._ellipsoidGeometry,t,r)};var G=new o.EllipsoidGeometry,k={radius:void 0,radii:new a.Cartesian3,vertexFormat:new n.VertexFormat,stackPartitions:void 0,slicePartitions:void 0};return f.unpack=function(e,t,r){t=o.EllipsoidGeometry.unpack(e,t,G);return k.vertexFormat=n.VertexFormat.clone(t._vertexFormat,k.vertexFormat),k.stackPartitions=t._stackPartitions,k.slicePartitions=t._slicePartitions,i.defined(r)?(a.Cartesian3.clone(t._radii,k.radii),r._ellipsoidGeometry=new o.EllipsoidGeometry(k),r):(k.radius=t._radii.x,new f(k))},f.createGeometry=function(e){return o.EllipsoidGeometry.createGeometry(e._ellipsoidGeometry)},function(e,t){return i.defined(t)&&(e=f.unpack(e,t)),f.createGeometry(e)}}); | ||
define(["./when-229515d6","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./EllipsoidGeometry-6edeb2a4","./VertexFormat-565d6a6c","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./GeometryOffsetAttribute-ff1e192c","./Transforms-7cd3197b","./combine-8ce3f24b","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b"],(function(e,t,r,i,a,o,n,s,d,c,l,m,u){"use strict";function p(r){var a=e.defaultValue(r.radius,1),o={radii:new t.Cartesian3(a,a,a),stackPartitions:r.stackPartitions,slicePartitions:r.slicePartitions,vertexFormat:r.vertexFormat};this._ellipsoidGeometry=new i.EllipsoidGeometry(o),this._workerName="createSphereGeometry"}p.packedLength=i.EllipsoidGeometry.packedLength,p.pack=function(e,t,r){return i.EllipsoidGeometry.pack(e._ellipsoidGeometry,t,r)};var y=new i.EllipsoidGeometry,f={radius:void 0,radii:new t.Cartesian3,vertexFormat:new a.VertexFormat,stackPartitions:void 0,slicePartitions:void 0};return p.unpack=function(r,o,n){var s=i.EllipsoidGeometry.unpack(r,o,y);return f.vertexFormat=a.VertexFormat.clone(s._vertexFormat,f.vertexFormat),f.stackPartitions=s._stackPartitions,f.slicePartitions=s._slicePartitions,e.defined(n)?(t.Cartesian3.clone(s._radii,f.radii),n._ellipsoidGeometry=new i.EllipsoidGeometry(f),n):(f.radius=s._radii.x,new p(f))},p.createGeometry=function(e){return i.EllipsoidGeometry.createGeometry(e._ellipsoidGeometry)},function(t,r){return e.defined(r)&&(t=p.unpack(t,r)),p.createGeometry(t)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Cartesian2-40b13f31","./Check-3917d765","./EllipsoidOutlineGeometry-2ecadff9","./Math-87254c13","./GeometryOffsetAttribute-964ec9ef","./Transforms-70f396e0","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce"],function(n,r,e,o,i,t,s,a,d,l,c,u,m,p){"use strict";function f(e){var i=n.defaultValue(e.radius,1),e={radii:new r.Cartesian3(i,i,i),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new o.EllipsoidOutlineGeometry(e),this._workerName="createSphereOutlineGeometry"}f.packedLength=o.EllipsoidOutlineGeometry.packedLength,f.pack=function(e,i,t){return o.EllipsoidOutlineGeometry.pack(e._ellipsoidGeometry,i,t)};var y=new o.EllipsoidOutlineGeometry,G={radius:void 0,radii:new r.Cartesian3,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};return f.unpack=function(e,i,t){i=o.EllipsoidOutlineGeometry.unpack(e,i,y);return G.stackPartitions=i._stackPartitions,G.slicePartitions=i._slicePartitions,G.subdivisions=i._subdivisions,n.defined(t)?(r.Cartesian3.clone(i._radii,G.radii),t._ellipsoidGeometry=new o.EllipsoidOutlineGeometry(G),t):(G.radius=i._radii.x,new f(G))},f.createGeometry=function(e){return o.EllipsoidOutlineGeometry.createGeometry(e._ellipsoidGeometry)},function(e,i){return n.defined(i)&&(e=f.unpack(e,i)),f.createGeometry(e)}}); | ||
define(["./when-229515d6","./Matrix2-f2da41d4","./RuntimeError-ffe03243","./EllipsoidOutlineGeometry-207e73be","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./GeometryOffsetAttribute-ff1e192c","./Transforms-7cd3197b","./combine-8ce3f24b","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b"],(function(e,i,t,r,n,o,s,a,d,l,u,c){"use strict";function m(t){var n=e.defaultValue(t.radius,1),o={radii:new i.Cartesian3(n,n,n),stackPartitions:t.stackPartitions,slicePartitions:t.slicePartitions,subdivisions:t.subdivisions};this._ellipsoidGeometry=new r.EllipsoidOutlineGeometry(o),this._workerName="createSphereOutlineGeometry"}m.packedLength=r.EllipsoidOutlineGeometry.packedLength,m.pack=function(e,i,t){return r.EllipsoidOutlineGeometry.pack(e._ellipsoidGeometry,i,t)};var p=new r.EllipsoidOutlineGeometry,y={radius:void 0,radii:new i.Cartesian3,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};return m.unpack=function(t,n,o){var s=r.EllipsoidOutlineGeometry.unpack(t,n,p);return y.stackPartitions=s._stackPartitions,y.slicePartitions=s._slicePartitions,y.subdivisions=s._subdivisions,e.defined(o)?(i.Cartesian3.clone(s._radii,y.radii),o._ellipsoidGeometry=new r.EllipsoidOutlineGeometry(y),o):(y.radius=s._radii.x,new m(y))},m.createGeometry=function(e){return r.EllipsoidOutlineGeometry.createGeometry(e._ellipsoidGeometry)},function(i,t){return e.defined(t)&&(i=m.unpack(i,t)),m.createGeometry(i)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518"],function(f){"use strict";return function(r){var o;return function(e){var s=e.data,a=[],i={id:s.id,result:void 0,error:void 0};return f.when(function(e,r,n){try{return e(r,n)}catch(e){return f.when.reject(e)}}(r,s.parameters,a)).then(function(e){i.result=e}).otherwise(function(e){e instanceof Error?i.error={name:e.name,message:e.message,stack:e.stack}:i.error=e}).always(function(){f.defined(o)||(o=f.defaultValue(self.webkitPostMessage,self.postMessage)),s.canTransferArrayBuffer||(a.length=0);try{o(i,a)}catch(e){i.result=void 0,i.error="postMessage failed with error: "+(n=(r=e).name,t=r.message,t=f.defined(n)&&f.defined(t)?n+": "+t:r.toString(),r=r.stack,f.defined(r)&&(t+="\n"+r),t)+"\n with responseMessage: "+JSON.stringify(i),o(i)}var r,n,t})}}}); | ||
define(["./when-229515d6"],(function(e){"use strict";return function(r){var n;return function(t){var s=t.data,a=[],i={id:s.id,result:void 0,error:void 0};return e.when(function(r,n,t){try{return r(n,t)}catch(r){return e.when.reject(r)}}(r,s.parameters,a)).then((function(e){i.result=e})).otherwise((function(e){e instanceof Error?i.error={name:e.name,message:e.message,stack:e.stack}:i.error=e})).always((function(){e.defined(n)||(n=e.defaultValue(self.webkitPostMessage,self.postMessage)),s.canTransferArrayBuffer||(a.length=0);try{n(i,a)}catch(r){i.result=void 0,i.error="postMessage failed with error: "+function(r){var n,t=r.name,s=r.message;n=e.defined(t)&&e.defined(s)?t+": "+s:r.toString();var a=r.stack;return e.defined(a)&&(n+="\n"+a),n}(r)+"\n with responseMessage: "+JSON.stringify(i),n(i)}}))}}})); |
@@ -1,1 +0,1 @@ | ||
define(["./AttributeCompression-56959beb","./Cartesian2-40b13f31","./combine-83aa7971","./IndexDatatype-b42089ce","./Math-87254c13","./createTaskProcessorWorker","./Check-3917d765","./when-7b580518","./WebGLConstants-4e26b85a"],function(R,T,V,W,z,a,e,t,r){"use strict";var q=32767,i=Math.cos(z.CesiumMath.toRadians(150)),L=new T.Cartographic,_=new T.Cartesian3;var G=new T.Cartographic,Z=new T.Cartographic;function Y(a){var e=8*a,t=3*e,r=4*e;this.startEllipsoidNormals=new Float32Array(t),this.endEllipsoidNormals=new Float32Array(t),this.startPositionAndHeights=new Float32Array(r),this.startFaceNormalAndVertexCornerIds=new Float32Array(r),this.endPositionAndHeights=new Float32Array(r),this.endFaceNormalAndHalfWidths=new Float32Array(r),this.vertexBatchIds=new Uint16Array(e),this.indices=W.IndexDatatype.createTypedArray(e,36*a),this.vec3Offset=0,this.vec4Offset=0,this.batchIdOffset=0,this.indexOffset=0,this.volumeStartIndex=0}var o=new T.Cartesian3,d=new T.Cartesian3;function H(a,e,t,r,s){var n=T.Cartesian3.subtract(t,e,d),t=T.Cartesian3.subtract(e,a,o);return T.Cartesian3.normalize(n,n),T.Cartesian3.normalize(t,t),T.Cartesian3.dot(n,t)<i&&(t=T.Cartesian3.multiplyByScalar(t,-1,o)),T.Cartesian3.add(n,t,s),T.Cartesian3.equals(s,T.Cartesian3.ZERO)&&(s=T.Cartesian3.subtract(a,e)),T.Cartesian3.cross(s,r,s),T.Cartesian3.cross(r,s,s),T.Cartesian3.normalize(s,s),s}var O=[0,2,6,0,6,4,0,1,3,0,3,2,0,4,5,0,5,1,5,3,1,5,7,3,7,5,4,7,4,6,7,6,2,7,2,3],P=O.length,D=new T.Cartesian3,S=new T.Cartesian3,M=new T.Cartesian3,U=new T.Cartesian3,B=new T.Cartesian3;Y.prototype.addVolume=function(a,e,t,r,s,n,i,o,d,l){for(var f=T.Cartesian3.add(e,d,D),c=l.geodeticSurfaceNormal(f,S),f=T.Cartesian3.add(t,d,D),h=l.geodeticSurfaceNormal(f,U),u=H(a,e,t,c,M),C=H(r,t,e,h,B),p=this.startEllipsoidNormals,b=this.endEllipsoidNormals,m=this.startPositionAndHeights,A=this.startFaceNormalAndVertexCornerIds,v=this.endPositionAndHeights,w=this.endFaceNormalAndHalfWidths,g=this.vertexBatchIds,y=this.batchIdOffset,N=this.vec3Offset,k=this.vec4Offset,I=0;I<8;I++)T.Cartesian3.pack(c,p,N),T.Cartesian3.pack(h,b,N),T.Cartesian3.pack(e,m,k),m[k+3]=s,T.Cartesian3.pack(t,v,k),v[k+3]=n,T.Cartesian3.pack(u,A,k),A[k+3]=I,T.Cartesian3.pack(C,w,k),w[k+3]=i,g[y++]=o,N+=3,k+=4;this.batchIdOffset=y,this.vec3Offset=N,this.vec4Offset=k;var x=this.indices,E=this.volumeStartIndex,F=this.indexOffset;for(I=0;I<P;I++)x[F+I]=O[I]+E;this.volumeStartIndex+=8,this.indexOffset+=P};var j=new T.Rectangle,J=new T.Ellipsoid,K=new T.Cartesian3,Q=new T.Cartesian3,X=new T.Cartesian3,$=new T.Cartesian3,aa=new T.Cartesian3;return a(function(a,e){var t=new Uint16Array(a.positions),r=new Uint16Array(a.widths),s=new Uint32Array(a.counts),n=new Uint16Array(a.batchIds),i=j,o=J,d=K,l=new Float64Array(a.packedBuffer),f=0,c=l[f++],h=l[f++];T.Rectangle.unpack(l,2,i),f+=T.Rectangle.packedLength,T.Ellipsoid.unpack(l,f,o),f+=T.Ellipsoid.packedLength,T.Cartesian3.unpack(l,f,d);var u=t.length/3,l=t.subarray(0,u),f=t.subarray(u,2*u),C=t.subarray(2*u,3*u);R.AttributeCompression.zigZagDeltaDecode(l,f,C),function(a,e,t,r){for(var s=r.length,n=a.length,i=new Uint8Array(n),o=G,d=Z,l=0,f=0;f<s;f++){for(var c=r[f],h=c,u=1;u<c;u++){var C=l+u,p=C-1;d.longitude=a[C],d.latitude=e[C],o.longitude=a[p],o.latitude=e[p],T.Cartographic.equals(d,o)&&(h--,i[p]=1)}r[f]=h,l+=c}for(var b=0,m=0;m<n;m++)1!==i[m]&&(a[b]=a[m],e[b]=e[m],t[b]=t[m],b++)}(l,f,C,s);for(var p=s.length,b=0,m=0;m<p;m++)b+=s[m]-1;var A=new Y(b),v=function(a,e,t,r,s,n,i){for(var o=a.length,d=new Float64Array(3*o),l=0;l<o;++l){var f=a[l],c=e[l],h=t[l],f=z.CesiumMath.lerp(r.west,r.east,f/q),c=z.CesiumMath.lerp(r.south,r.north,c/q),h=z.CesiumMath.lerp(s,n,h/q),h=T.Cartographic.fromRadians(f,c,h,L),h=i.cartographicToCartesian(h,_);T.Cartesian3.pack(h,d,3*l)}return d}(l,f,C,i,c,h,o),u=l.length,w=new Float32Array(3*u);for(m=0;m<u;++m)w[3*m]=v[3*m]-d.x,w[3*m+1]=v[3*m+1]-d.y,w[3*m+2]=v[3*m+2]-d.z;var g=0,y=0;for(m=0;m<p;m++){for(var N=s[m]-1,k=.5*r[m],I=n[m],x=g,E=0;E<N;E++){var F=T.Cartesian3.unpack(w,g,X),H=T.Cartesian3.unpack(w,g+3,$),O=C[y],P=C[y+1],O=z.CesiumMath.lerp(c,h,O/q),P=z.CesiumMath.lerp(c,h,P/q);y++;var D,S,M,U=Q,B=aa;0===E?(S=T.Cartesian3.unpack(w,D=x+3*N,Q),T.Cartesian3.equals(S,F)?T.Cartesian3.unpack(w,D-3,U):(M=T.Cartesian3.subtract(F,H,Q),U=T.Cartesian3.add(M,F,Q))):T.Cartesian3.unpack(w,g-3,U),E===N-1?(M=T.Cartesian3.unpack(w,x,aa),T.Cartesian3.equals(M,H)?T.Cartesian3.unpack(w,x+3,B):(M=T.Cartesian3.subtract(H,F,aa),B=T.Cartesian3.add(M,H,aa))):T.Cartesian3.unpack(w,g+6,B),A.addVolume(U,F,H,B,O,P,k,I,d,o),g+=3}g+=3,y++}return l=A.indices,e.push(A.startEllipsoidNormals.buffer),e.push(A.endEllipsoidNormals.buffer),e.push(A.startPositionAndHeights.buffer),e.push(A.startFaceNormalAndVertexCornerIds.buffer),e.push(A.endPositionAndHeights.buffer),e.push(A.endFaceNormalAndHalfWidths.buffer),e.push(A.vertexBatchIds.buffer),e.push(l.buffer),l={indexDatatype:2===l.BYTES_PER_ELEMENT?W.IndexDatatype.UNSIGNED_SHORT:W.IndexDatatype.UNSIGNED_INT,startEllipsoidNormals:A.startEllipsoidNormals.buffer,endEllipsoidNormals:A.endEllipsoidNormals.buffer,startPositionAndHeights:A.startPositionAndHeights.buffer,startFaceNormalAndVertexCornerIds:A.startFaceNormalAndVertexCornerIds.buffer,endPositionAndHeights:A.endPositionAndHeights.buffer,endFaceNormalAndHalfWidths:A.endFaceNormalAndHalfWidths.buffer,vertexBatchIds:A.vertexBatchIds.buffer,indices:l.buffer},a.keepDecodedPositions&&(a=function(a){for(var e=a.length,t=new Uint32Array(e+1),r=0,s=0;s<e;++s)t[s]=r,r+=a[s];return t[e]=r,t}(s),e.push(v.buffer,a.buffer),l=V.combine(l,{decodedPositions:v.buffer,decodedPositionOffsets:a.buffer})),l})}); | ||
define(["./AttributeCompression-0af3c035","./Matrix2-f2da41d4","./combine-8ce3f24b","./IndexDatatype-b10faa0b","./ComponentDatatype-17b06483","./createTaskProcessorWorker","./RuntimeError-ffe03243","./when-229515d6","./WebGLConstants-4e26b85a"],(function(a,e,t,r,s,n,i,o,d){"use strict";var f=32767,l=Math.cos(s.CesiumMath.toRadians(150)),c=new e.Cartographic,h=new e.Cartesian3;var u=new e.Cartographic,C=new e.Cartographic;function p(a){var e=8*a,t=3*e,s=4*e;this.startEllipsoidNormals=new Float32Array(t),this.endEllipsoidNormals=new Float32Array(t),this.startPositionAndHeights=new Float32Array(s),this.startFaceNormalAndVertexCornerIds=new Float32Array(s),this.endPositionAndHeights=new Float32Array(s),this.endFaceNormalAndHalfWidths=new Float32Array(s),this.vertexBatchIds=new Uint16Array(e),this.indices=r.IndexDatatype.createTypedArray(e,36*a),this.vec3Offset=0,this.vec4Offset=0,this.batchIdOffset=0,this.indexOffset=0,this.volumeStartIndex=0}var v=new e.Cartesian3,m=new e.Cartesian3;function b(a,t,r,s,n){var i=e.Cartesian3.subtract(r,t,m),o=e.Cartesian3.subtract(t,a,v);return e.Cartesian3.normalize(i,i),e.Cartesian3.normalize(o,o),e.Cartesian3.dot(i,o)<l&&(o=e.Cartesian3.multiplyByScalar(o,-1,v)),e.Cartesian3.add(i,o,n),e.Cartesian3.equals(n,e.Cartesian3.ZERO)&&(n=e.Cartesian3.subtract(a,t)),e.Cartesian3.cross(n,s,n),e.Cartesian3.cross(s,n,n),e.Cartesian3.normalize(n,n),n}var A=[0,2,6,0,6,4,0,1,3,0,3,2,0,4,5,0,5,1,5,3,1,5,7,3,7,5,4,7,4,6,7,6,2,7,2,3],w=A.length,g=new e.Cartesian3,y=new e.Cartesian3,N=new e.Cartesian3,k=new e.Cartesian3,I=new e.Cartesian3;p.prototype.addVolume=function(a,t,r,s,n,i,o,d,f,l){var c=e.Cartesian3.add(t,f,g),h=l.geodeticSurfaceNormal(c,y);c=e.Cartesian3.add(r,f,g);var u,C=l.geodeticSurfaceNormal(c,k),p=b(a,t,r,h,N),v=b(s,r,t,C,I),m=this.startEllipsoidNormals,x=this.endEllipsoidNormals,E=this.startPositionAndHeights,F=this.startFaceNormalAndVertexCornerIds,H=this.endPositionAndHeights,O=this.endFaceNormalAndHalfWidths,P=this.vertexBatchIds,D=this.batchIdOffset,S=this.vec3Offset,M=this.vec4Offset;for(u=0;u<8;u++)e.Cartesian3.pack(h,m,S),e.Cartesian3.pack(C,x,S),e.Cartesian3.pack(t,E,M),E[M+3]=n,e.Cartesian3.pack(r,H,M),H[M+3]=i,e.Cartesian3.pack(p,F,M),F[M+3]=u,e.Cartesian3.pack(v,O,M),O[M+3]=o,P[D++]=d,S+=3,M+=4;this.batchIdOffset=D,this.vec3Offset=S,this.vec4Offset=M;var R=this.indices,U=this.volumeStartIndex,B=this.indexOffset;for(u=0;u<w;u++)R[B+u]=A[u]+U;this.volumeStartIndex+=8,this.indexOffset+=w};var x=new e.Rectangle,E=new e.Ellipsoid,F=new e.Cartesian3,H=new e.Cartesian3,O=new e.Cartesian3,P=new e.Cartesian3,D=new e.Cartesian3;return n((function(n,i){var o,d=new Uint16Array(n.positions),l=new Uint16Array(n.widths),v=new Uint32Array(n.counts),m=new Uint16Array(n.batchIds),b=x,A=E,w=F,g=new Float64Array(n.packedBuffer),y=0,N=g[y++],k=g[y++];e.Rectangle.unpack(g,y,b),y+=e.Rectangle.packedLength,e.Ellipsoid.unpack(g,y,A),y+=e.Ellipsoid.packedLength,e.Cartesian3.unpack(g,y,w);var I=d.length/3,S=d.subarray(0,I),M=d.subarray(I,2*I),R=d.subarray(2*I,3*I);a.AttributeCompression.zigZagDeltaDecode(S,M,R),function(a,t,r,s){for(var n=s.length,i=a.length,o=new Uint8Array(i),d=u,f=C,l=0,c=0;c<n;c++){for(var h=s[c],p=h,v=1;v<h;v++){var m=l+v,b=m-1;f.longitude=a[m],f.latitude=t[m],d.longitude=a[b],d.latitude=t[b],e.Cartographic.equals(f,d)&&(p--,o[b]=1)}s[c]=p,l+=h}for(var A=0,w=0;w<i;w++)1!==o[w]&&(a[A]=a[w],t[A]=t[w],r[A]=r[w],A++)}(S,M,R,v);var U=v.length,B=0;for(o=0;o<U;o++){B+=v[o]-1}var T=new p(B),V=function(a,t,r,n,i,o,d){for(var l=a.length,u=new Float64Array(3*l),C=0;C<l;++C){var p=a[C],v=t[C],m=r[C],b=s.CesiumMath.lerp(n.west,n.east,p/f),A=s.CesiumMath.lerp(n.south,n.north,v/f),w=s.CesiumMath.lerp(i,o,m/f),g=e.Cartographic.fromRadians(b,A,w,c),y=d.cartographicToCartesian(g,h);e.Cartesian3.pack(y,u,3*C)}return u}(S,M,R,b,N,k,A);I=S.length;var W=new Float32Array(3*I);for(o=0;o<I;++o)W[3*o]=V[3*o]-w.x,W[3*o+1]=V[3*o+1]-w.y,W[3*o+2]=V[3*o+2]-w.z;var z=0,q=0;for(o=0;o<U;o++){for(var L=v[o]-1,_=.5*l[o],G=m[o],Z=z,Y=0;Y<L;Y++){var j=e.Cartesian3.unpack(W,z,O),J=e.Cartesian3.unpack(W,z+3,P),K=R[q],Q=R[q+1];K=s.CesiumMath.lerp(N,k,K/f),Q=s.CesiumMath.lerp(N,k,Q/f),q++;var X=H,$=D;if(0===Y){var aa=Z+3*L,ea=e.Cartesian3.unpack(W,aa,H);if(e.Cartesian3.equals(ea,j))e.Cartesian3.unpack(W,aa-3,X);else{var ta=e.Cartesian3.subtract(j,J,H);X=e.Cartesian3.add(ta,j,H)}}else e.Cartesian3.unpack(W,z-3,X);if(Y===L-1){var ra=e.Cartesian3.unpack(W,Z,D);if(e.Cartesian3.equals(ra,J))e.Cartesian3.unpack(W,Z+3,$);else{var sa=e.Cartesian3.subtract(J,j,D);$=e.Cartesian3.add(sa,J,D)}}else e.Cartesian3.unpack(W,z+6,$);T.addVolume(X,j,J,$,K,Q,_,G,w,A),z+=3}z+=3,q++}var na=T.indices;i.push(T.startEllipsoidNormals.buffer),i.push(T.endEllipsoidNormals.buffer),i.push(T.startPositionAndHeights.buffer),i.push(T.startFaceNormalAndVertexCornerIds.buffer),i.push(T.endPositionAndHeights.buffer),i.push(T.endFaceNormalAndHalfWidths.buffer),i.push(T.vertexBatchIds.buffer),i.push(na.buffer);var ia={indexDatatype:2===na.BYTES_PER_ELEMENT?r.IndexDatatype.UNSIGNED_SHORT:r.IndexDatatype.UNSIGNED_INT,startEllipsoidNormals:T.startEllipsoidNormals.buffer,endEllipsoidNormals:T.endEllipsoidNormals.buffer,startPositionAndHeights:T.startPositionAndHeights.buffer,startFaceNormalAndVertexCornerIds:T.startFaceNormalAndVertexCornerIds.buffer,endPositionAndHeights:T.endPositionAndHeights.buffer,endFaceNormalAndHalfWidths:T.endFaceNormalAndHalfWidths.buffer,vertexBatchIds:T.vertexBatchIds.buffer,indices:na.buffer};if(n.keepDecodedPositions){var oa=function(a){for(var e=a.length,t=new Uint32Array(e+1),r=0,s=0;s<e;++s)t[s]=r,r+=a[s];return t[e]=r,t}(v);i.push(V.buffer,oa.buffer),ia=t.combine(ia,{decodedPositions:V.buffer,decodedPositionOffsets:oa.buffer})}return ia}))})); |
@@ -1,1 +0,1 @@ | ||
define(["./Transforms-70f396e0","./BoxGeometry-16d67add","./Cartesian2-40b13f31","./Color-16798d78","./CylinderGeometry-71f983f3","./when-7b580518","./EllipsoidGeometry-1593408b","./IndexDatatype-b42089ce","./createTaskProcessorWorker","./Check-3917d765","./Math-87254c13","./combine-83aa7971","./RuntimeError-fad4d3c6","./GeometryOffsetAttribute-964ec9ef","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./VertexFormat-8d463a4f","./CylinderGeometryLibrary-069ad349"],function(S,k,T,V,M,F,B,w,e,t,n,r,a,i,o,d,s,c,f,l){"use strict";function R(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var u=new T.Cartesian3,h=S.Matrix4.packedLength+T.Cartesian3.packedLength,b=S.Matrix4.packedLength+2,p=S.Matrix4.packedLength+T.Cartesian3.packedLength,y=T.Cartesian3.packedLength+1,x={modelMatrix:new S.Matrix4,boundingVolume:new S.BoundingSphere};function A(e,t){var n=t*h,t=T.Cartesian3.unpack(e,n,u);n+=T.Cartesian3.packedLength;n=S.Matrix4.unpack(e,n,x.modelMatrix);S.Matrix4.multiplyByScale(n,t,n);n=x.boundingVolume;return T.Cartesian3.clone(T.Cartesian3.ZERO,n.center),n.radius=Math.sqrt(3),x}function O(e,t){var n=t*b,r=e[n++],t=e[n++],t=T.Cartesian3.fromElements(r,r,t,u),n=S.Matrix4.unpack(e,n,x.modelMatrix);S.Matrix4.multiplyByScale(n,t,n);n=x.boundingVolume;return T.Cartesian3.clone(T.Cartesian3.ZERO,n.center),n.radius=Math.sqrt(2),x}function L(e,t){var n=t*p,t=T.Cartesian3.unpack(e,n,u);n+=T.Cartesian3.packedLength;n=S.Matrix4.unpack(e,n,x.modelMatrix);S.Matrix4.multiplyByScale(n,t,n);n=x.boundingVolume;return T.Cartesian3.clone(T.Cartesian3.ZERO,n.center),n.radius=1,x}function E(e,t){var n=t*y,t=e[n++],n=T.Cartesian3.unpack(e,n,u),n=S.Matrix4.fromTranslation(n,x.modelMatrix);S.Matrix4.multiplyByUniformScale(n,t,n);n=x.boundingVolume;return T.Cartesian3.clone(T.Cartesian3.ZERO,n.center),n.radius=1,x}var Z=new T.Cartesian3;function U(e,t,n,r,a){if(F.defined(t)){for(var i=n.length,o=r.attributes.position.values,d=r.indices,s=e.positions,c=e.vertexBatchIds,f=e.indices,l=e.batchIds,u=e.batchTableColors,h=e.batchedIndices,b=e.indexOffsets,p=e.indexCounts,y=e.boundingVolumes,x=e.modelMatrix,g=e.center,C=e.positionOffset,m=e.batchIdIndex,v=e.indexOffset,I=e.batchedIndicesOffset,k=0;k<i;++k){var M=a(t,k),B=M.modelMatrix;S.Matrix4.multiply(x,B,B);for(var w=n[k],A=o.length,O=0;O<A;O+=3){var L=T.Cartesian3.unpack(o,O,Z);S.Matrix4.multiplyByPoint(B,L,L),T.Cartesian3.subtract(L,g,L),T.Cartesian3.pack(L,s,3*C+O),c[m++]=w}for(var E=d.length,U=0;U<E;++U)f[v+U]=d[U]+C;var G=k+I;h[G]=new R({offset:v,count:E,color:V.Color.fromRgba(u[w]),batchIds:[w]}),l[G]=w,b[G]=v,p[G]=E,y[G]=S.BoundingSphere.transform(M.boundingVolume,B),C+=A/3,v+=E}e.positionOffset=C,e.batchIdIndex=m,e.indexOffset=v,e.batchedIndicesOffset+=i}}var G=new T.Cartesian3,D=new S.Matrix4;function P(e,t,n){var r=n.length,a=2+r*S.BoundingSphere.packedLength+1+function(e){for(var t=e.length,n=0,r=0;r<t;++r)n+=V.Color.packedLength+3+e[r].batchIds.length;return n}(t),i=new Float64Array(a),o=0;i[o++]=e,i[o++]=r;for(var d=0;d<r;++d)S.BoundingSphere.pack(n[d],i,o),o+=S.BoundingSphere.packedLength;var s=t.length;i[o++]=s;for(var c=0;c<s;++c){var f=t[c];V.Color.pack(f.color,i,o),o+=V.Color.packedLength,i[o++]=f.offset,i[o++]=f.count;var l=f.batchIds,u=l.length;i[o++]=u;for(var h=0;h<u;++h)i[o++]=l[h]}return i}return e(function(e,t){var n=F.defined(e.boxes)?new Float32Array(e.boxes):void 0,r=F.defined(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,a=F.defined(e.cylinders)?new Float32Array(e.cylinders):void 0,i=F.defined(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,o=F.defined(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,d=F.defined(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,s=F.defined(e.spheres)?new Float32Array(e.spheres):void 0,c=F.defined(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,f=F.defined(n)?r.length:0,l=F.defined(a)?i.length:0,u=F.defined(o)?d.length:0,h=F.defined(s)?c.length:0,b=k.BoxGeometry.getUnitBox(),p=M.CylinderGeometry.getUnitCylinder(),y=B.EllipsoidGeometry.getUnitEllipsoid(),x=b.attributes.position.values,g=p.attributes.position.values,C=y.attributes.position.values,m=x.length*f;m+=g.length*l,m+=C.length*(u+h);var v=b.indices,I=p.indices,x=y.indices,g=v.length*f;return g+=I.length*l,g+=x.length*(u+h),C=new Float32Array(m),v=new Uint16Array(m/3),I=w.IndexDatatype.createTypedArray(m/3,g),x=f+l+u+h,m=new Uint16Array(x),g=new Array(x),f=new Uint32Array(x),l=new Uint32Array(x),u=new Array(x),h=e.packedBuffer,x=new Float64Array(h),h=0,T.Cartesian3.unpack(x,0,G),h+=T.Cartesian3.packedLength,S.Matrix4.unpack(x,h,D),U(e={batchTableColors:new Uint32Array(e.batchTableColors),positions:C,vertexBatchIds:v,indices:I,batchIds:m,batchedIndices:g,indexOffsets:f,indexCounts:l,boundingVolumes:u,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:D,center:G},n,r,b,A),U(e,a,i,p,O),U(e,o,d,y,L),U(e,s,c,y,E),u=P(I.BYTES_PER_ELEMENT,g,u),t.push(C.buffer,v.buffer,I.buffer),t.push(m.buffer,f.buffer,l.buffer),t.push(u.buffer),{positions:C.buffer,vertexBatchIds:v.buffer,indices:I.buffer,indexOffsets:f.buffer,indexCounts:l.buffer,batchIds:m.buffer,packedBuffer:u.buffer}})}); | ||
define(["./Transforms-7cd3197b","./BoxGeometry-a530ddad","./Matrix2-f2da41d4","./Color-d2414093","./CylinderGeometry-4a23db6d","./when-229515d6","./EllipsoidGeometry-6edeb2a4","./IndexDatatype-b10faa0b","./createTaskProcessorWorker","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./WebGLConstants-4e26b85a","./combine-8ce3f24b","./GeometryOffsetAttribute-ff1e192c","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./VertexFormat-565d6a6c","./CylinderGeometryLibrary-7b000e1b"],(function(e,t,n,r,a,i,o,d,s,c,f,l,u,h,b,p,y,x){"use strict";function g(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var v=new n.Cartesian3,m=n.Matrix4.packedLength+n.Cartesian3.packedLength,C=n.Matrix4.packedLength+2,I=n.Matrix4.packedLength+n.Cartesian3.packedLength,k=n.Cartesian3.packedLength+1,M={modelMatrix:new n.Matrix4,boundingVolume:new e.BoundingSphere};function B(e,t){var r=t*m,a=n.Cartesian3.unpack(e,r,v);r+=n.Cartesian3.packedLength;var i=n.Matrix4.unpack(e,r,M.modelMatrix);n.Matrix4.multiplyByScale(i,a,i);var o=M.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=Math.sqrt(3),M}function w(e,t){var r=t*C,a=e[r++],i=e[r++],o=n.Cartesian3.fromElements(a,a,i,v),d=n.Matrix4.unpack(e,r,M.modelMatrix);n.Matrix4.multiplyByScale(d,o,d);var s=M.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,s.center),s.radius=Math.sqrt(2),M}function A(e,t){var r=t*I,a=n.Cartesian3.unpack(e,r,v);r+=n.Cartesian3.packedLength;var i=n.Matrix4.unpack(e,r,M.modelMatrix);n.Matrix4.multiplyByScale(i,a,i);var o=M.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=1,M}function O(e,t){var r=t*k,a=e[r++],i=n.Cartesian3.unpack(e,r,v),o=n.Matrix4.fromTranslation(i,M.modelMatrix);n.Matrix4.multiplyByUniformScale(o,a,o);var d=M.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,d.center),d.radius=1,M}var L=new n.Cartesian3;function E(t,a,o,d,s){if(i.defined(a)){for(var c=o.length,f=d.attributes.position.values,l=d.indices,u=t.positions,h=t.vertexBatchIds,b=t.indices,p=t.batchIds,y=t.batchTableColors,x=t.batchedIndices,v=t.indexOffsets,m=t.indexCounts,C=t.boundingVolumes,I=t.modelMatrix,k=t.center,M=t.positionOffset,B=t.batchIdIndex,w=t.indexOffset,A=t.batchedIndicesOffset,O=0;O<c;++O){var E=s(a,O),U=E.modelMatrix;n.Matrix4.multiply(I,U,U);for(var G=o[O],S=f.length,T=0;T<S;T+=3){var V=n.Cartesian3.unpack(f,T,L);n.Matrix4.multiplyByPoint(U,V,V),n.Cartesian3.subtract(V,k,V),n.Cartesian3.pack(V,u,3*M+T),h[B++]=G}for(var F=l.length,R=0;R<F;++R)b[w+R]=l[R]+M;var Z=O+A;x[Z]=new g({offset:w,count:F,color:r.Color.fromRgba(y[G]),batchIds:[G]}),p[Z]=G,v[Z]=w,m[Z]=F,C[Z]=e.BoundingSphere.transform(E.boundingVolume,U),M+=S/3,w+=F}t.positionOffset=M,t.batchIdIndex=B,t.indexOffset=w,t.batchedIndicesOffset+=c}}var U=new n.Cartesian3,G=new n.Matrix4;function S(t,n,a){var i=a.length,o=2+i*e.BoundingSphere.packedLength+1+function(e){for(var t=e.length,n=0,a=0;a<t;++a)n+=r.Color.packedLength+3+e[a].batchIds.length;return n}(n),d=new Float64Array(o),s=0;d[s++]=t,d[s++]=i;for(var c=0;c<i;++c)e.BoundingSphere.pack(a[c],d,s),s+=e.BoundingSphere.packedLength;var f=n.length;d[s++]=f;for(var l=0;l<f;++l){var u=n[l];r.Color.pack(u.color,d,s),s+=r.Color.packedLength,d[s++]=u.offset,d[s++]=u.count;var h=u.batchIds,b=h.length;d[s++]=b;for(var p=0;p<b;++p)d[s++]=h[p]}return d}return s((function(e,r){var s=i.defined(e.boxes)?new Float32Array(e.boxes):void 0,c=i.defined(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,f=i.defined(e.cylinders)?new Float32Array(e.cylinders):void 0,l=i.defined(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,u=i.defined(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,h=i.defined(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,b=i.defined(e.spheres)?new Float32Array(e.spheres):void 0,p=i.defined(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,y=i.defined(s)?c.length:0,x=i.defined(f)?l.length:0,g=i.defined(u)?h.length:0,v=i.defined(b)?p.length:0,m=t.BoxGeometry.getUnitBox(),C=a.CylinderGeometry.getUnitCylinder(),I=o.EllipsoidGeometry.getUnitEllipsoid(),k=m.attributes.position.values,M=C.attributes.position.values,L=I.attributes.position.values,T=k.length*y;T+=M.length*x,T+=L.length*(g+v);var V=m.indices,F=C.indices,R=I.indices,Z=V.length*y;Z+=F.length*x,Z+=R.length*(g+v);var D=new Float32Array(T),P=new Uint16Array(T/3),q=d.IndexDatatype.createTypedArray(T/3,Z),W=y+x+g+v,_=new Uint16Array(W),N=new Array(W),Y=new Uint32Array(W),j=new Uint32Array(W),z=new Array(W);!function(e){var t=new Float64Array(e),r=0;n.Cartesian3.unpack(t,r,U),r+=n.Cartesian3.packedLength,n.Matrix4.unpack(t,r,G)}(e.packedBuffer);var H={batchTableColors:new Uint32Array(e.batchTableColors),positions:D,vertexBatchIds:P,indices:q,batchIds:_,batchedIndices:N,indexOffsets:Y,indexCounts:j,boundingVolumes:z,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:G,center:U};E(H,s,c,m,B),E(H,f,l,C,w),E(H,u,h,I,A),E(H,b,p,I,O);var J=S(q.BYTES_PER_ELEMENT,N,z);return r.push(D.buffer,P.buffer,q.buffer),r.push(_.buffer,Y.buffer,j.buffer),r.push(J.buffer),{positions:D.buffer,vertexBatchIds:P.buffer,indices:q.buffer,indexOffsets:Y.buffer,indexCounts:j.buffer,batchIds:_.buffer,packedBuffer:J.buffer}}))})); |
@@ -1,1 +0,1 @@ | ||
define(["./AttributeCompression-56959beb","./Cartesian2-40b13f31","./Math-87254c13","./createTaskProcessorWorker","./Check-3917d765","./when-7b580518"],function(b,g,d,a,e,r){"use strict";var w=32767,k=new g.Cartographic,v=new g.Cartesian3,y=new g.Rectangle,A=new g.Ellipsoid,M={min:void 0,max:void 0};return a(function(a,e){var r=new Uint16Array(a.positions);!function(a){a=new Float64Array(a);var e=0;M.min=a[e++],M.max=a[e++],g.Rectangle.unpack(a,2,y),e+=g.Rectangle.packedLength,g.Ellipsoid.unpack(a,e,A)}(a.packedBuffer);var t=y,n=A,i=M.min,s=M.max,o=r.length/3,c=r.subarray(0,o),u=r.subarray(o,2*o),p=r.subarray(2*o,3*o);b.AttributeCompression.zigZagDeltaDecode(c,u,p);for(var h=new Float64Array(r.length),l=0;l<o;++l){var f=c[l],m=u[l],C=p[l],f=d.CesiumMath.lerp(t.west,t.east,f/w),m=d.CesiumMath.lerp(t.south,t.north,m/w),C=d.CesiumMath.lerp(i,s,C/w),C=g.Cartographic.fromRadians(f,m,C,k),C=n.cartographicToCartesian(C,v);g.Cartesian3.pack(C,h,3*l)}return e.push(h.buffer),{positions:h.buffer}})}); | ||
define(["./AttributeCompression-0af3c035","./Matrix2-f2da41d4","./ComponentDatatype-17b06483","./createTaskProcessorWorker","./RuntimeError-ffe03243","./when-229515d6","./WebGLConstants-4e26b85a"],(function(a,e,r,t,n,i,o){"use strict";var s=32767,u=new e.Cartographic,c=new e.Cartesian3,p=new e.Rectangle,f=new e.Ellipsoid,l={min:void 0,max:void 0};return t((function(t,n){var i=new Uint16Array(t.positions);!function(a){a=new Float64Array(a);var r=0;l.min=a[r++],l.max=a[r++],e.Rectangle.unpack(a,r,p),r+=e.Rectangle.packedLength,e.Ellipsoid.unpack(a,r,f)}(t.packedBuffer);var o=p,m=f,h=l.min,d=l.max,C=i.length/3,g=i.subarray(0,C),b=i.subarray(C,2*C),w=i.subarray(2*C,3*C);a.AttributeCompression.zigZagDeltaDecode(g,b,w);for(var v=new Float64Array(i.length),k=0;k<C;++k){var y=g[k],A=b[k],R=w[k],x=r.CesiumMath.lerp(o.west,o.east,y/s),M=r.CesiumMath.lerp(o.south,o.north,A/s),D=r.CesiumMath.lerp(h,d,R/s),E=e.Cartographic.fromRadians(x,M,D,u),F=m.cartographicToCartesian(E,c);e.Cartesian3.pack(F,v,3*k)}return n.push(v.buffer),{positions:v.buffer}}))})); |
@@ -1,1 +0,1 @@ | ||
define(["./AttributeCompression-56959beb","./Cartesian2-40b13f31","./Color-16798d78","./when-7b580518","./IndexDatatype-b42089ce","./Math-87254c13","./OrientedBoundingBox-f7557a9b","./createTaskProcessorWorker","./Check-3917d765","./Transforms-70f396e0","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-66f520e3","./AxisAlignedBoundingBox-445c3009","./IntersectionTests-587a744a","./Plane-9d4e3328"],function(me,ye,Ie,we,xe,ve,Ae,e,a,n,r,t,i,o,s,f,d){"use strict";var Ee=new ye.Cartesian3,Ne=new ye.Ellipsoid,Te=new ye.Rectangle,ke={min:void 0,max:void 0,indexBytesPerElement:void 0};function Be(e,a,n){var r=a.length,t=2+r*Ae.OrientedBoundingBox.packedLength+1+function(e){for(var a=e.length,n=0,r=0;r<a;++r)n+=Ie.Color.packedLength+3+e[r].batchIds.length;return n}(n),i=new Float64Array(t),o=0;i[o++]=e,i[o++]=r;for(var s=0;s<r;++s)Ae.OrientedBoundingBox.pack(a[s],i,o),o+=Ae.OrientedBoundingBox.packedLength;var f=n.length;i[o++]=f;for(var d=0;d<f;++d){var c=n[d];Ie.Color.pack(c.color,i,o),o+=Ie.Color.packedLength,i[o++]=c.offset,i[o++]=c.count;var u=c.batchIds,h=u.length;i[o++]=h;for(var l=0;l<h;++l)i[o++]=u[l]}return i}var Le=new ye.Cartesian3,Oe=new ye.Cartesian3,Ue=new ye.Cartesian3,Pe=new ye.Cartesian3,Fe=new ye.Cartesian3,Se=new ye.Cartographic,Re=new ye.Rectangle;return e(function(e,a){var n;t=e.packedBuffer,n=new Float64Array(t),t=0,ke.indexBytesPerElement=n[t++],ke.min=n[t++],ke.max=n[t++],ye.Cartesian3.unpack(n,3,Ee),t+=ye.Cartesian3.packedLength,ye.Ellipsoid.unpack(n,t,Ne),t+=ye.Ellipsoid.packedLength,ye.Rectangle.unpack(n,t,Te);var r=new(2===ke.indexBytesPerElement?Uint16Array:Uint32Array)(e.indices),t=new Uint16Array(e.positions),i=new Uint32Array(e.counts),o=new Uint32Array(e.indexCounts),s=new Uint32Array(e.batchIds),f=new Uint32Array(e.batchTableColors),d=new Array(i.length),c=Ee,u=Ne,h=Te,l=ke.min,g=ke.max,p=e.minimumHeights,b=e.maximumHeights;we.defined(p)&&we.defined(b)&&(p=new Float32Array(p),b=new Float32Array(b));var C=t.length/2,m=t.subarray(0,C),y=t.subarray(C,2*C);me.AttributeCompression.zigZagDeltaDecode(m,y);for(var I=new Float64Array(3*C),w=0;w<C;++w){var x=m[w],v=y[w],x=ve.CesiumMath.lerp(h.west,h.east,x/32767),v=ve.CesiumMath.lerp(h.south,h.north,v/32767),v=ye.Cartographic.fromRadians(x,v,0,Se),v=u.cartographicToCartesian(v,Le);ye.Cartesian3.pack(v,I,3*w)}var A=i.length,E=new Array(A),N=new Array(A),T=0,k=0;for(w=0;w<A;++w)E[w]=T,N[w]=k,T+=i[w],k+=o[w];var B=new Float32Array(3*C*2),L=new Uint16Array(2*C),O=new Uint32Array(N.length),U=new Uint32Array(o.length),P=[],F={};for(w=0;w<A;++w)_=f[w],we.defined(F[_])?(F[_].positionLength+=i[w],F[_].indexLength+=o[w],F[_].batchIds.push(w)):F[_]={positionLength:i[w],indexLength:o[w],offset:0,indexOffset:0,batchIds:[w]};var S,R=0,D=0;for(_ in F)F.hasOwnProperty(_)&&((G=F[_]).offset=R,G.indexOffset=D,R+=2*G.positionLength,D+=S=2*G.indexLength+6*G.positionLength,G.indexLength=S);var M=[];for(_ in F)F.hasOwnProperty(_)&&(G=F[_],M.push({color:Ie.Color.fromRgba(parseInt(_)),offset:G.indexOffset,count:G.indexLength,batchIds:G.batchIds}));for(w=0;w<A;++w){var _,G,Y=(G=F[_=f[w]]).offset,V=3*Y,H=Y,W=E[w],z=i[w],Z=s[w],j=l,q=g;we.defined(p)&&we.defined(b)&&(j=p[w],q=b[w]);for(var J=Number.POSITIVE_INFINITY,K=Number.NEGATIVE_INFINITY,Q=Number.POSITIVE_INFINITY,X=Number.NEGATIVE_INFINITY,$=0;$<z;++$){var ee=ye.Cartesian3.unpack(I,3*W+3*$,Le);u.scaleToGeodeticSurface(ee,ee);var ae=u.cartesianToCartographic(ee,Se),ne=ae.latitude,re=ae.longitude,J=Math.min(ne,J),K=Math.max(ne,K),Q=Math.min(re,Q),X=Math.max(re,X),ae=u.geodeticSurfaceNormal(ee,Oe),ne=ye.Cartesian3.multiplyByScalar(ae,j,Ue),re=ye.Cartesian3.add(ee,ne,Pe),ne=ye.Cartesian3.multiplyByScalar(ae,q,ne),ne=ye.Cartesian3.add(ee,ne,Fe);ye.Cartesian3.subtract(ne,c,ne),ye.Cartesian3.subtract(re,c,re),ye.Cartesian3.pack(ne,B,V),ye.Cartesian3.pack(re,B,V+3),L[H]=Z,L[H+1]=Z,V+=6,H+=2}(h=Re).west=Q,h.east=X,h.south=J,h.north=K,d[w]=Ae.OrientedBoundingBox.fromRectangle(h,l,g,u);var te=G.indexOffset,ie=N[w],oe=o[w];for(O[w]=te,$=0;$<oe;$+=3){var se=r[ie+$]-W,fe=r[ie+$+1]-W,de=r[ie+$+2]-W;P[te++]=2*se+Y,P[te++]=2*fe+Y,P[te++]=2*de+Y,P[te++]=2*de+1+Y,P[te++]=2*fe+1+Y,P[te++]=2*se+1+Y}for($=0;$<z;++$){var ce=$,ue=($+1)%z;P[te++]=2*ce+1+Y,P[te++]=2*ue+Y,P[te++]=2*ce+Y,P[te++]=2*ce+1+Y,P[te++]=2*ue+1+Y,P[te++]=2*ue+Y}G.offset+=2*z,G.indexOffset=te,U[w]=te-O[w]}for(var P=xe.IndexDatatype.createTypedArray(B.length/3,P),he=M.length,le=0;le<he;++le){for(var ge=M[le].batchIds,pe=0,be=ge.length,Ce=0;Ce<be;++Ce)pe+=U[ge[Ce]];M[le].count=pe}return t=Be(2===P.BYTES_PER_ELEMENT?xe.IndexDatatype.UNSIGNED_SHORT:xe.IndexDatatype.UNSIGNED_INT,d,M),a.push(B.buffer,P.buffer,O.buffer,U.buffer,L.buffer,t.buffer),{positions:B.buffer,indices:P.buffer,indexOffsets:O.buffer,indexCounts:U.buffer,batchIds:L.buffer,packedBuffer:t.buffer}})}); | ||
define(["./AttributeCompression-0af3c035","./Matrix2-f2da41d4","./Color-d2414093","./when-229515d6","./IndexDatatype-b10faa0b","./ComponentDatatype-17b06483","./OrientedBoundingBox-86debc5a","./createTaskProcessorWorker","./RuntimeError-ffe03243","./Transforms-7cd3197b","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-b27cd2f7","./AxisAlignedBoundingBox-1feb0c48","./IntersectionTests-1b8a3cb9","./Plane-0421a8be"],(function(e,a,n,r,t,i,o,s,f,d,c,u,h,l,g,p){"use strict";var b=new a.Cartesian3,m=new a.Ellipsoid,y=new a.Rectangle,v={min:void 0,max:void 0,indexBytesPerElement:void 0};function C(e,a,r){var t=a.length,i=2+t*o.OrientedBoundingBox.packedLength+1+function(e){for(var a=e.length,r=0,t=0;t<a;++t)r+=n.Color.packedLength+3+e[t].batchIds.length;return r}(r),s=new Float64Array(i),f=0;s[f++]=e,s[f++]=t;for(var d=0;d<t;++d)o.OrientedBoundingBox.pack(a[d],s,f),f+=o.OrientedBoundingBox.packedLength;var c=r.length;s[f++]=c;for(var u=0;u<c;++u){var h=r[u];n.Color.pack(h.color,s,f),f+=n.Color.packedLength,s[f++]=h.offset,s[f++]=h.count;var l=h.batchIds,g=l.length;s[f++]=g;for(var p=0;p<g;++p)s[f++]=l[p]}return s}var I=new a.Cartesian3,w=new a.Cartesian3,x=new a.Cartesian3,A=new a.Cartesian3,E=new a.Cartesian3,N=new a.Cartographic,T=new a.Rectangle;return s((function(s,f){var d;!function(e){var n=new Float64Array(e),r=0;v.indexBytesPerElement=n[r++],v.min=n[r++],v.max=n[r++],a.Cartesian3.unpack(n,r,b),r+=a.Cartesian3.packedLength,a.Ellipsoid.unpack(n,r,m),r+=a.Ellipsoid.packedLength,a.Rectangle.unpack(n,r,y)}(s.packedBuffer),d=2===v.indexBytesPerElement?new Uint16Array(s.indices):new Uint32Array(s.indices);var c,u,h,l=new Uint16Array(s.positions),g=new Uint32Array(s.counts),p=new Uint32Array(s.indexCounts),B=new Uint32Array(s.batchIds),k=new Uint32Array(s.batchTableColors),L=new Array(g.length),O=b,U=m,P=y,F=v.min,S=v.max,D=s.minimumHeights,R=s.maximumHeights;r.defined(D)&&r.defined(R)&&(D=new Float32Array(D),R=new Float32Array(R));var M=l.length/2,_=l.subarray(0,M),G=l.subarray(M,2*M);e.AttributeCompression.zigZagDeltaDecode(_,G);var Y=new Float64Array(3*M);for(c=0;c<M;++c){var V=_[c],H=G[c],W=i.CesiumMath.lerp(P.west,P.east,V/32767),z=i.CesiumMath.lerp(P.south,P.north,H/32767),Z=a.Cartographic.fromRadians(W,z,0,N),j=U.cartographicToCartesian(Z,I);a.Cartesian3.pack(j,Y,3*c)}var q=g.length,J=new Array(q),K=new Array(q),Q=0,X=0;for(c=0;c<q;++c)J[c]=Q,K[c]=X,Q+=g[c],X+=p[c];var $,ee=new Float32Array(3*M*2),ae=new Uint16Array(2*M),ne=new Uint32Array(K.length),re=new Uint32Array(p.length),te=[],ie={};for(c=0;c<q;++c)h=k[c],r.defined(ie[h])?(ie[h].positionLength+=g[c],ie[h].indexLength+=p[c],ie[h].batchIds.push(c)):ie[h]={positionLength:g[c],indexLength:p[c],offset:0,indexOffset:0,batchIds:[c]};var oe=0,se=0;for(h in ie)if(ie.hasOwnProperty(h)){($=ie[h]).offset=oe,$.indexOffset=se;var fe=2*$.positionLength,de=2*$.indexLength+6*$.positionLength;oe+=fe,se+=de,$.indexLength=de}var ce=[];for(h in ie)ie.hasOwnProperty(h)&&($=ie[h],ce.push({color:n.Color.fromRgba(parseInt(h)),offset:$.indexOffset,count:$.indexLength,batchIds:$.batchIds}));for(c=0;c<q;++c){var ue=($=ie[h=k[c]]).offset,he=3*ue,le=ue,ge=J[c],pe=g[c],be=B[c],me=F,ye=S;r.defined(D)&&r.defined(R)&&(me=D[c],ye=R[c]);var ve=Number.POSITIVE_INFINITY,Ce=Number.NEGATIVE_INFINITY,Ie=Number.POSITIVE_INFINITY,we=Number.NEGATIVE_INFINITY;for(u=0;u<pe;++u){var xe=a.Cartesian3.unpack(Y,3*ge+3*u,I);U.scaleToGeodeticSurface(xe,xe);var Ae=U.cartesianToCartographic(xe,N),Ee=Ae.latitude,Ne=Ae.longitude;ve=Math.min(Ee,ve),Ce=Math.max(Ee,Ce),Ie=Math.min(Ne,Ie),we=Math.max(Ne,we);var Te=U.geodeticSurfaceNormal(xe,w),Be=a.Cartesian3.multiplyByScalar(Te,me,x),ke=a.Cartesian3.add(xe,Be,A);Be=a.Cartesian3.multiplyByScalar(Te,ye,Be);var Le=a.Cartesian3.add(xe,Be,E);a.Cartesian3.subtract(Le,O,Le),a.Cartesian3.subtract(ke,O,ke),a.Cartesian3.pack(Le,ee,he),a.Cartesian3.pack(ke,ee,he+3),ae[le]=be,ae[le+1]=be,he+=6,le+=2}(P=T).west=Ie,P.east=we,P.south=ve,P.north=Ce,L[c]=o.OrientedBoundingBox.fromRectangle(P,F,S,U);var Oe=$.indexOffset,Ue=K[c],Pe=p[c];for(ne[c]=Oe,u=0;u<Pe;u+=3){var Fe=d[Ue+u]-ge,Se=d[Ue+u+1]-ge,De=d[Ue+u+2]-ge;te[Oe++]=2*Fe+ue,te[Oe++]=2*Se+ue,te[Oe++]=2*De+ue,te[Oe++]=2*De+1+ue,te[Oe++]=2*Se+1+ue,te[Oe++]=2*Fe+1+ue}for(u=0;u<pe;++u){var Re=u,Me=(u+1)%pe;te[Oe++]=2*Re+1+ue,te[Oe++]=2*Me+ue,te[Oe++]=2*Re+ue,te[Oe++]=2*Re+1+ue,te[Oe++]=2*Me+1+ue,te[Oe++]=2*Me+ue}$.offset+=2*pe,$.indexOffset=Oe,re[c]=Oe-ne[c]}te=t.IndexDatatype.createTypedArray(ee.length/3,te);for(var _e=ce.length,Ge=0;Ge<_e;++Ge){for(var Ye=ce[Ge].batchIds,Ve=0,He=Ye.length,We=0;We<He;++We)Ve+=re[Ye[We]];ce[Ge].count=Ve}var ze=C(2===te.BYTES_PER_ELEMENT?t.IndexDatatype.UNSIGNED_SHORT:t.IndexDatatype.UNSIGNED_INT,L,ce);return f.push(ee.buffer,te.buffer,ne.buffer,re.buffer,ae.buffer,ze.buffer),{positions:ee.buffer,indices:te.buffer,indexOffsets:ne.buffer,indexCounts:re.buffer,batchIds:ae.buffer,packedBuffer:ze.buffer}}))})); |
@@ -1,1 +0,1 @@ | ||
define(["./Cartesian2-40b13f31","./combine-83aa7971","./AttributeCompression-56959beb","./Math-87254c13","./IndexDatatype-b42089ce","./createTaskProcessorWorker","./Check-3917d765","./when-7b580518","./WebGLConstants-4e26b85a"],function(L,S,_,G,W,a,e,r,n){"use strict";var B=32767,O=new L.Cartographic,z=new L.Cartesian3;var H=new L.Rectangle,Y=new L.Ellipsoid,Z=new L.Cartesian3,j={min:void 0,max:void 0};var q=new L.Cartesian3,J=new L.Cartesian3,K=new L.Cartesian3,Q=new L.Cartesian3,V=new L.Cartesian3;return a(function(a,e){var r=new Uint16Array(a.positions),n=new Uint16Array(a.widths),t=new Uint32Array(a.counts),i=new Uint16Array(a.batchIds);!function(a){a=new Float64Array(a);var e=0;j.min=a[e++],j.max=a[e++],L.Rectangle.unpack(a,2,H),e+=L.Rectangle.packedLength,L.Ellipsoid.unpack(a,e,Y),e+=L.Ellipsoid.packedLength,L.Cartesian3.unpack(a,e,Z)}(a.packedBuffer);for(var s=Y,o=Z,u=function(a,e,r,n,t){var i=a.length/3,s=a.subarray(0,i),o=a.subarray(i,2*i),u=a.subarray(2*i,3*i);_.AttributeCompression.zigZagDeltaDecode(s,o,u);for(var c=new Float64Array(a.length),f=0;f<i;++f){var p=s[f],b=o[f],d=u[f],p=G.CesiumMath.lerp(e.west,e.east,p/B),b=G.CesiumMath.lerp(e.south,e.north,b/B),d=G.CesiumMath.lerp(r,n,d/B),d=L.Cartographic.fromRadians(p,b,d,O),d=t.cartographicToCartesian(d,z);L.Cartesian3.pack(d,c,3*f)}return c}(r,H,j.min,j.max,s),s=4*(r=u.length/3)-4,c=new Float32Array(3*s),f=new Float32Array(3*s),p=new Float32Array(3*s),b=new Float32Array(2*s),d=new Uint16Array(s),C=0,h=0,w=0,l=0,y=t.length,k=0;k<y;++k){for(var v,A=t[k],g=n[k],m=i[k],x=0;x<A;++x){0===x?(E=L.Cartesian3.unpack(u,3*l,q),D=L.Cartesian3.unpack(u,3*(l+1),J),v=L.Cartesian3.subtract(E,D,K),L.Cartesian3.add(E,v,v)):v=L.Cartesian3.unpack(u,3*(l+x-1),K);var D,E,I,P=L.Cartesian3.unpack(u,3*(l+x),Q);x===A-1?(D=L.Cartesian3.unpack(u,3*(l+A-1),q),E=L.Cartesian3.unpack(u,3*(l+A-2),J),I=L.Cartesian3.subtract(D,E,V),L.Cartesian3.add(D,I,I)):I=L.Cartesian3.unpack(u,3*(l+x+1),V),L.Cartesian3.subtract(v,o,v),L.Cartesian3.subtract(P,o,P),L.Cartesian3.subtract(I,o,I);for(var U=x===A-1?2:4,T=0===x?2:0;T<U;++T){L.Cartesian3.pack(P,c,C),L.Cartesian3.pack(v,f,C),L.Cartesian3.pack(I,p,C),C+=3;var F=T-2<0?-1:1;b[h++]=T%2*2-1,b[h++]=F*g,d[w++]=m}}l+=A}var N=W.IndexDatatype.createTypedArray(s,6*r-6),R=0,M=0,y=r-1;for(k=0;k<y;++k)N[M++]=R,N[M++]=R+2,N[M++]=R+1,N[M++]=R+1,N[M++]=R+2,N[M++]=R+3,R+=4;return e.push(c.buffer,f.buffer,p.buffer),e.push(b.buffer,d.buffer,N.buffer),r={indexDatatype:2===N.BYTES_PER_ELEMENT?W.IndexDatatype.UNSIGNED_SHORT:W.IndexDatatype.UNSIGNED_INT,currentPositions:c.buffer,previousPositions:f.buffer,nextPositions:p.buffer,expandAndWidth:b.buffer,batchIds:d.buffer,indices:N.buffer},a.keepDecodedPositions&&(a=function(a){for(var e=a.length,r=new Uint32Array(e+1),n=0,t=0;t<e;++t)r[t]=n,n+=a[t];return r[e]=n,r}(t),e.push(u.buffer,a.buffer),r=S.combine(r,{decodedPositions:u.buffer,decodedPositionOffsets:a.buffer})),r})}); | ||
define(["./Matrix2-f2da41d4","./combine-8ce3f24b","./AttributeCompression-0af3c035","./ComponentDatatype-17b06483","./IndexDatatype-b10faa0b","./createTaskProcessorWorker","./RuntimeError-ffe03243","./when-229515d6","./WebGLConstants-4e26b85a"],(function(a,e,r,n,t,i,s,o,f){"use strict";var u=32767,c=new a.Cartographic,p=new a.Cartesian3;var d=new a.Rectangle,b=new a.Ellipsoid,C=new a.Cartesian3,l={min:void 0,max:void 0};var w=new a.Cartesian3,h=new a.Cartesian3,v=new a.Cartesian3,y=new a.Cartesian3,k=new a.Cartesian3;return i((function(i,s){var o=new Uint16Array(i.positions),f=new Uint16Array(i.widths),m=new Uint32Array(i.counts),A=new Uint16Array(i.batchIds);!function(e){e=new Float64Array(e);var r=0;l.min=e[r++],l.max=e[r++],a.Rectangle.unpack(e,r,d),r+=a.Rectangle.packedLength,a.Ellipsoid.unpack(e,r,b),r+=a.Ellipsoid.packedLength,a.Cartesian3.unpack(e,r,C)}(i.packedBuffer);var g,x=b,D=C,E=function(e,t,i,s,o){var f=e.length/3,d=e.subarray(0,f),b=e.subarray(f,2*f),C=e.subarray(2*f,3*f);r.AttributeCompression.zigZagDeltaDecode(d,b,C);for(var l=new Float64Array(e.length),w=0;w<f;++w){var h=d[w],v=b[w],y=C[w],k=n.CesiumMath.lerp(t.west,t.east,h/u),m=n.CesiumMath.lerp(t.south,t.north,v/u),A=n.CesiumMath.lerp(i,s,y/u),g=a.Cartographic.fromRadians(k,m,A,c),x=o.cartographicToCartesian(g,p);a.Cartesian3.pack(x,l,3*w)}return l}(o,d,l.min,l.max,x),I=E.length/3,P=4*I-4,U=new Float32Array(3*P),R=new Float32Array(3*P),T=new Float32Array(3*P),F=new Float32Array(2*P),N=new Uint16Array(P),M=0,L=0,S=0,_=0,G=m.length;for(g=0;g<G;++g){for(var W=m[g],B=f[g],O=A[g],z=0;z<W;++z){var H;if(0===z){var Y=a.Cartesian3.unpack(E,3*_,w),Z=a.Cartesian3.unpack(E,3*(_+1),h);H=a.Cartesian3.subtract(Y,Z,v),a.Cartesian3.add(Y,H,H)}else H=a.Cartesian3.unpack(E,3*(_+z-1),v);var j,q=a.Cartesian3.unpack(E,3*(_+z),y);if(z===W-1){var J=a.Cartesian3.unpack(E,3*(_+W-1),w),K=a.Cartesian3.unpack(E,3*(_+W-2),h);j=a.Cartesian3.subtract(J,K,k),a.Cartesian3.add(J,j,j)}else j=a.Cartesian3.unpack(E,3*(_+z+1),k);a.Cartesian3.subtract(H,D,H),a.Cartesian3.subtract(q,D,q),a.Cartesian3.subtract(j,D,j);for(var Q=z===W-1?2:4,V=0===z?2:0;V<Q;++V){a.Cartesian3.pack(q,U,M),a.Cartesian3.pack(H,R,M),a.Cartesian3.pack(j,T,M),M+=3;var X=V-2<0?-1:1;F[L++]=V%2*2-1,F[L++]=X*B,N[S++]=O}}_+=W}var $=t.IndexDatatype.createTypedArray(P,6*I-6),aa=0,ea=0;for(G=I-1,g=0;g<G;++g)$[ea++]=aa,$[ea++]=aa+2,$[ea++]=aa+1,$[ea++]=aa+1,$[ea++]=aa+2,$[ea++]=aa+3,aa+=4;s.push(U.buffer,R.buffer,T.buffer),s.push(F.buffer,N.buffer,$.buffer);var ra={indexDatatype:2===$.BYTES_PER_ELEMENT?t.IndexDatatype.UNSIGNED_SHORT:t.IndexDatatype.UNSIGNED_INT,currentPositions:U.buffer,previousPositions:R.buffer,nextPositions:T.buffer,expandAndWidth:F.buffer,batchIds:N.buffer,indices:$.buffer};if(i.keepDecodedPositions){var na=function(a){for(var e=a.length,r=new Uint32Array(e+1),n=0,t=0;t<e;++t)r[t]=n,n+=a[t];return r[e]=n,r}(m);s.push(E.buffer,na.buffer),ra=e.combine(ra,{decodedPositions:E.buffer,decodedPositionOffsets:na.buffer})}return ra}))})); |
@@ -1,1 +0,1 @@ | ||
define(["./AxisAlignedBoundingBox-445c3009","./Transforms-70f396e0","./Cartesian2-40b13f31","./when-7b580518","./TerrainEncoding-75f35f91","./Math-87254c13","./OrientedBoundingBox-f7557a9b","./RuntimeError-fad4d3c6","./WebMercatorProjection-bdaffcea","./createTaskProcessorWorker","./Check-3917d765","./combine-83aa7971","./AttributeCompression-56959beb","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-66f520e3","./IntersectionTests-587a744a","./Plane-9d4e3328"],function(ve,Me,xe,Ne,be,Se,we,Be,Pe,e,t,i,n,a,r,o,s,u){"use strict";var Ae=Uint16Array.BYTES_PER_ELEMENT,ye=Int32Array.BYTES_PER_ELEMENT,Re=Uint32Array.BYTES_PER_ELEMENT,_e=Float32Array.BYTES_PER_ELEMENT,We=Float64Array.BYTES_PER_ELEMENT;function Fe(e,t,i){i=Ne.defaultValue(i,Se.CesiumMath);for(var n=e.length,a=0;a<n;++a)if(i.equalsEpsilon(e[a],t,Se.CesiumMath.EPSILON12))return a;return-1}var Oe=new xe.Cartographic,Ye=new xe.Cartesian3,ke=new xe.Cartesian3,Ue=new xe.Cartesian3,Ve=new Me.Matrix4;function He(e,t,i,n,a,r,o,s,u,h,c){for(var d=s.length,g=0;g<d;++g){var l=s[g],m=l.cartographic,p=l.index,I=e.length,E=m.longitude,f=m.latitude,f=Se.CesiumMath.clamp(f,-Se.CesiumMath.PI_OVER_TWO,Se.CesiumMath.PI_OVER_TWO),m=m.height-o.skirtHeight;o.hMin=Math.min(o.hMin,m),xe.Cartographic.fromRadians(E,f,m,Oe),h&&(Oe.longitude+=u),h?g===d-1?Oe.latitude+=c:0===g&&(Oe.latitude-=c):Oe.latitude+=u;f=o.ellipsoid.cartographicToCartesian(Oe);e.push(f),t.push(m),i.push(xe.Cartesian2.clone(i[p])),0<n.length&&n.push(n[p]),0<a.length&&a.push(a[p]),Me.Matrix4.multiplyByPoint(o.toENU,f,Ye);m=o.minimum,f=o.maximum;xe.Cartesian3.minimumByComponent(Ye,m,m),xe.Cartesian3.maximumByComponent(Ye,f,f);f=o.lastBorderPoint;Ne.defined(f)&&(f=f.index,r.push(f,I-1,I,I,p,f)),o.lastBorderPoint=l}}return e(function(e,t){e.ellipsoid=xe.Ellipsoid.clone(e.ellipsoid),e.rectangle=xe.Rectangle.clone(e.rectangle);var i=function(e,t,i,n,a,r,o,s,u,h,c){var d,g,l,m,p;le=Ne.defined(n)?(d=n.west,g=n.south,l=n.east,m=n.north,p=n.width,n.height):(d=Se.CesiumMath.toRadians(a.west),g=Se.CesiumMath.toRadians(a.south),l=Se.CesiumMath.toRadians(a.east),m=Se.CesiumMath.toRadians(a.north),p=Se.CesiumMath.toRadians(n.width),Se.CesiumMath.toRadians(n.height));var I,E,f=[g,m],T=[d,l],C=Me.Transforms.eastNorthUpToFixedFrame(t,i),v=Me.Matrix4.inverseTransformation(C,Ve);u&&(I=Pe.WebMercatorProjection.geodeticLatitudeToMercatorAngle(g),E=1/(Pe.WebMercatorProjection.geodeticLatitudeToMercatorAngle(m)-I));var M=1!==r,x=new DataView(e),N=Number.POSITIVE_INFINITY,b=Number.NEGATIVE_INFINITY,S=ke;S.x=Number.POSITIVE_INFINITY,S.y=Number.POSITIVE_INFINITY,S.z=Number.POSITIVE_INFINITY;var w=Ue;w.x=Number.NEGATIVE_INFINITY,w.y=Number.NEGATIVE_INFINITY,w.z=Number.NEGATIVE_INFINITY;var B,P,A=0,y=0,R=0;for(P=0;P<4;++P){var _=A;B=x.getUint32(_,!0),_+=Re;var W=Se.CesiumMath.toRadians(180*x.getFloat64(_,!0));_+=We,-1===Fe(T,W)&&T.push(W);W=Se.CesiumMath.toRadians(180*x.getFloat64(_,!0));_+=We,-1===Fe(f,W)&&f.push(W),_+=2*We;W=x.getInt32(_,!0);_+=ye,y+=W,W=x.getInt32(_,!0),R+=3*W,A+=B+Re}var F=[],O=[],Y=new Array(y),k=new Array(y),U=new Array(y),V=u?new Array(y):[],H=M?new Array(y):[],L=new Array(R),D=[],G=[],j=[],z=[],q=0,J=0;for(P=A=0;P<4;++P){B=x.getUint32(A,!0);var K=A+=Re,Q=Se.CesiumMath.toRadians(180*x.getFloat64(A,!0));A+=We;var X=Se.CesiumMath.toRadians(180*x.getFloat64(A,!0));A+=We;var Z=Se.CesiumMath.toRadians(180*x.getFloat64(A,!0)),$=.5*Z;A+=We;var ee=Se.CesiumMath.toRadians(180*x.getFloat64(A,!0)),te=.5*ee;A+=We;var ie=x.getInt32(A,!0);A+=ye;var ne=x.getInt32(A,!0);A+=ye,A+=ye;for(var ae=new Array(ie),re=0;re<ie;++re){var oe=Q+x.getUint8(A++)*Z;Oe.longitude=oe;var se=X+x.getUint8(A++)*ee;Oe.latitude=se;var ue=x.getFloat32(A,!0);if(A+=_e,0!==ue&&ue<c&&(ue*=-Math.pow(2,h)),ue*=6371010,Oe.height=ue,-1!==Fe(T,oe)||-1!==Fe(f,se)){var he=Fe(F,Oe,xe.Cartographic);if(-1!==he){ae[re]=O[he];continue}F.push(xe.Cartographic.clone(Oe)),O.push(q)}ae[re]=q,Math.abs(oe-d)<$?D.push({index:q,cartographic:xe.Cartographic.clone(Oe)}):Math.abs(oe-l)<$?j.push({index:q,cartographic:xe.Cartographic.clone(Oe)}):Math.abs(se-g)<te?G.push({index:q,cartographic:xe.Cartographic.clone(Oe)}):Math.abs(se-m)<te&&z.push({index:q,cartographic:xe.Cartographic.clone(Oe)}),N=Math.min(ue,N),b=Math.max(ue,b),U[q]=ue;he=i.cartographicToCartesian(Oe);Y[q]=he,u&&(V[q]=(Pe.WebMercatorProjection.geodeticLatitudeToMercatorAngle(se)-I)*E),M&&(ue=i.geodeticSurfaceNormal(he),H[q]=ue),Me.Matrix4.multiplyByPoint(v,he,Ye),xe.Cartesian3.minimumByComponent(Ye,S,S),xe.Cartesian3.maximumByComponent(Ye,w,w);oe=(oe-d)/(l-d);oe=Se.CesiumMath.clamp(oe,0,1);se=(se-g)/(m-g);se=Se.CesiumMath.clamp(se,0,1),k[q]=new xe.Cartesian2(oe,se),++q}for(var ce=3*ne,de=0;de<ce;++de,++J)L[J]=ae[x.getUint16(A,!0)],A+=Ae;if(B!==A-K)throw new Be.RuntimeError("Invalid terrain tile.")}Y.length=q,k.length=q,U.length=q,u&&(V.length=q);M&&(H.length=q);var ge=q,a=J,e={hMin:N,lastBorderPoint:void 0,skirtHeight:s,toENU:v,ellipsoid:i,minimum:S,maximum:w};D.sort(function(e,t){return t.cartographic.latitude-e.cartographic.latitude}),G.sort(function(e,t){return e.cartographic.longitude-t.cartographic.longitude}),j.sort(function(e,t){return e.cartographic.latitude-t.cartographic.latitude}),z.sort(function(e,t){return t.cartographic.longitude-e.cartographic.longitude});s=1e-5;{var le;He(Y,U,k,V,H,L,e,D,-s*p,!0,-s*le),He(Y,U,k,V,H,L,e,G,-s*le,!1),He(Y,U,k,V,H,L,e,j,s*p,!0,s*le),He(Y,U,k,V,H,L,e,z,s*le,!1),0<D.length&&0<z.length&&(pe=D[0].index,Ie=z[z.length-1].index,le=Y.length-1,L.push(Ie,le,ge,ge,pe,Ie))}y=Y.length;var me,pe=Me.BoundingSphere.fromPoints(Y);Ne.defined(n)&&(me=we.OrientedBoundingBox.fromRectangle(n,N,b,i));for(var Ie=new be.EllipsoidalOccluder(i).computeHorizonCullingPointPossiblyUnderEllipsoid(t,Y,N),n=new ve.AxisAlignedBoundingBox(S,w,t),Ee=new be.TerrainEncoding(t,n,e.hMin,b,C,!1,u,M,r,o),fe=new Float32Array(y*Ee.stride),Te=0,Ce=0;Ce<y;++Ce)Te=Ee.encode(fe,Te,Y[Ce],k[Ce],U[Ce],void 0,V[Ce],H[Ce]);e=D.map(function(e){return e.index}).reverse(),C=G.map(function(e){return e.index}).reverse(),r=j.map(function(e){return e.index}).reverse(),o=z.map(function(e){return e.index}).reverse();return C.unshift(r[r.length-1]),C.push(e[0]),o.unshift(e[e.length-1]),o.push(r[0]),{vertices:fe,indices:new Uint16Array(L),maximumHeight:b,minimumHeight:N,encoding:Ee,boundingSphere3D:pe,orientedBoundingBox:me,occludeePointInScaledSpace:Ie,vertexCountWithoutSkirts:ge,indexCountWithoutSkirts:a,westIndicesSouthToNorth:e,southIndicesEastToWest:C,eastIndicesNorthToSouth:r,northIndicesWestToEast:o}}(e.buffer,e.relativeToCenter,e.ellipsoid,e.rectangle,e.nativeRectangle,e.exaggeration,e.exaggerationRelativeHeight,e.skirtHeight,e.includeWebMercatorT,e.negativeAltitudeExponentBias,e.negativeElevationThreshold),n=i.vertices;return t.push(n.buffer),e=i.indices,t.push(e.buffer),{vertices:n.buffer,indices:e.buffer,numberOfAttributes:i.encoding.stride,minimumHeight:i.minimumHeight,maximumHeight:i.maximumHeight,boundingSphere3D:i.boundingSphere3D,orientedBoundingBox:i.orientedBoundingBox,occludeePointInScaledSpace:i.occludeePointInScaledSpace,encoding:i.encoding,vertexCountWithoutSkirts:i.vertexCountWithoutSkirts,indexCountWithoutSkirts:i.indexCountWithoutSkirts,westIndicesSouthToNorth:i.westIndicesSouthToNorth,southIndicesEastToWest:i.southIndicesEastToWest,eastIndicesNorthToSouth:i.eastIndicesNorthToSouth,northIndicesWestToEast:i.northIndicesWestToEast}})}); | ||
define(["./AxisAlignedBoundingBox-1feb0c48","./Transforms-7cd3197b","./Matrix2-f2da41d4","./when-229515d6","./TerrainEncoding-6355a4fe","./ComponentDatatype-17b06483","./OrientedBoundingBox-86debc5a","./RuntimeError-ffe03243","./WebMercatorProjection-d69cec15","./createTaskProcessorWorker","./combine-8ce3f24b","./AttributeCompression-0af3c035","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-b27cd2f7","./IntersectionTests-1b8a3cb9","./Plane-0421a8be"],(function(e,t,i,n,r,a,o,s,u,h,c,d,g,l,m,p){"use strict";var v=Uint16Array.BYTES_PER_ELEMENT,I=Int32Array.BYTES_PER_ELEMENT,f=Uint32Array.BYTES_PER_ELEMENT,E=Float32Array.BYTES_PER_ELEMENT,T=Float64Array.BYTES_PER_ELEMENT;function C(e,t,i){i=n.defaultValue(i,a.CesiumMath);for(var r=e.length,o=0;o<r;++o)if(i.equalsEpsilon(e[o],t,a.CesiumMath.EPSILON12))return o;return-1}var M=new i.Cartographic,x=new i.Cartesian3,N=new i.Cartesian3,b=new i.Cartesian3,S=new i.Matrix4;function w(e,t,r,o,s,u,h,c,d,g,l){for(var m=c.length,p=0;p<m;++p){var v=c[p],I=v.cartographic,f=v.index,E=e.length,T=I.longitude,C=I.latitude;C=a.CesiumMath.clamp(C,-a.CesiumMath.PI_OVER_TWO,a.CesiumMath.PI_OVER_TWO);var N=I.height-h.skirtHeight;h.hMin=Math.min(h.hMin,N),i.Cartographic.fromRadians(T,C,N,M),g&&(M.longitude+=d),g?p===m-1?M.latitude+=l:0===p&&(M.latitude-=l):M.latitude+=d;var b=h.ellipsoid.cartographicToCartesian(M);e.push(b),t.push(N),r.push(i.Cartesian2.clone(r[f])),o.length>0&&o.push(o[f]),s.length>0&&s.push(s[f]),i.Matrix4.multiplyByPoint(h.toENU,b,x);var S=h.minimum,w=h.maximum;i.Cartesian3.minimumByComponent(x,S,S),i.Cartesian3.maximumByComponent(x,w,w);var B=h.lastBorderPoint;if(n.defined(B)){var P=B.index;u.push(P,E-1,E,E,f,P)}h.lastBorderPoint=v}}return h((function(h,c){h.ellipsoid=i.Ellipsoid.clone(h.ellipsoid),h.rectangle=i.Rectangle.clone(h.rectangle);var d=function(h,c,d,g,l,m,p,B,P,A,y){var R,_,W,F,O,Y;n.defined(g)?(R=g.west,_=g.south,W=g.east,F=g.north,O=g.width,Y=g.height):(R=a.CesiumMath.toRadians(l.west),_=a.CesiumMath.toRadians(l.south),W=a.CesiumMath.toRadians(l.east),F=a.CesiumMath.toRadians(l.north),O=a.CesiumMath.toRadians(g.width),Y=a.CesiumMath.toRadians(g.height));var U,V,k=[_,F],H=[R,W],L=t.Transforms.eastNorthUpToFixedFrame(c,d),D=i.Matrix4.inverseTransformation(L,S);P&&(U=u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(_),V=1/(u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(F)-U));var G=1!==m,j=new DataView(h),z=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY,J=N;J.x=Number.POSITIVE_INFINITY,J.y=Number.POSITIVE_INFINITY,J.z=Number.POSITIVE_INFINITY;var K=b;K.x=Number.NEGATIVE_INFINITY,K.y=Number.NEGATIVE_INFINITY,K.z=Number.NEGATIVE_INFINITY;var Q,X,Z=0,$=0,ee=0;for(X=0;X<4;++X){var te=Z;Q=j.getUint32(te,!0),te+=f;var ie=a.CesiumMath.toRadians(180*j.getFloat64(te,!0));te+=T,-1===C(H,ie)&&H.push(ie);var ne=a.CesiumMath.toRadians(180*j.getFloat64(te,!0));te+=T,-1===C(k,ne)&&k.push(ne),te+=2*T;var re=j.getInt32(te,!0);te+=I,$+=re,ee+=3*(re=j.getInt32(te,!0)),Z+=Q+f}var ae=[],oe=[],se=new Array($),ue=new Array($),he=new Array($),ce=P?new Array($):[],de=G?new Array($):[],ge=new Array(ee),le=[],me=[],pe=[],ve=[],Ie=0,fe=0;for(Z=0,X=0;X<4;++X){Q=j.getUint32(Z,!0);var Ee=Z+=f,Te=a.CesiumMath.toRadians(180*j.getFloat64(Z,!0));Z+=T;var Ce=a.CesiumMath.toRadians(180*j.getFloat64(Z,!0));Z+=T;var Me=a.CesiumMath.toRadians(180*j.getFloat64(Z,!0)),xe=.5*Me;Z+=T;var Ne=a.CesiumMath.toRadians(180*j.getFloat64(Z,!0)),be=.5*Ne;Z+=T;var Se=j.getInt32(Z,!0);Z+=I;var we=j.getInt32(Z,!0);Z+=I,Z+=I;for(var Be=new Array(Se),Pe=0;Pe<Se;++Pe){var Ae=Te+j.getUint8(Z++)*Me;M.longitude=Ae;var ye=Ce+j.getUint8(Z++)*Ne;M.latitude=ye;var Re=j.getFloat32(Z,!0);if(Z+=E,0!==Re&&Re<y&&(Re*=-Math.pow(2,A)),Re*=6371010,M.height=Re,-1!==C(H,Ae)||-1!==C(k,ye)){var _e=C(ae,M,i.Cartographic);if(-1!==_e){Be[Pe]=oe[_e];continue}ae.push(i.Cartographic.clone(M)),oe.push(Ie)}Be[Pe]=Ie,Math.abs(Ae-R)<xe?le.push({index:Ie,cartographic:i.Cartographic.clone(M)}):Math.abs(Ae-W)<xe?pe.push({index:Ie,cartographic:i.Cartographic.clone(M)}):Math.abs(ye-_)<be?me.push({index:Ie,cartographic:i.Cartographic.clone(M)}):Math.abs(ye-F)<be&&ve.push({index:Ie,cartographic:i.Cartographic.clone(M)}),z=Math.min(Re,z),q=Math.max(Re,q),he[Ie]=Re;var We=d.cartographicToCartesian(M);if(se[Ie]=We,P&&(ce[Ie]=(u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(ye)-U)*V),G){var Fe=d.geodeticSurfaceNormal(We);de[Ie]=Fe}i.Matrix4.multiplyByPoint(D,We,x),i.Cartesian3.minimumByComponent(x,J,J),i.Cartesian3.maximumByComponent(x,K,K);var Oe=(Ae-R)/(W-R);Oe=a.CesiumMath.clamp(Oe,0,1);var Ye=(ye-_)/(F-_);Ye=a.CesiumMath.clamp(Ye,0,1),ue[Ie]=new i.Cartesian2(Oe,Ye),++Ie}for(var Ue=3*we,Ve=0;Ve<Ue;++Ve,++fe)ge[fe]=Be[j.getUint16(Z,!0)],Z+=v;if(Q!==Z-Ee)throw new s.RuntimeError("Invalid terrain tile.")}se.length=Ie,ue.length=Ie,he.length=Ie,P&&(ce.length=Ie);G&&(de.length=Ie);var ke=Ie,He=fe,Le={hMin:z,lastBorderPoint:void 0,skirtHeight:B,toENU:D,ellipsoid:d,minimum:J,maximum:K};le.sort((function(e,t){return t.cartographic.latitude-e.cartographic.latitude})),me.sort((function(e,t){return e.cartographic.longitude-t.cartographic.longitude})),pe.sort((function(e,t){return e.cartographic.latitude-t.cartographic.latitude})),ve.sort((function(e,t){return t.cartographic.longitude-e.cartographic.longitude}));var De=1e-5;if(w(se,he,ue,ce,de,ge,Le,le,-De*O,!0,-De*Y),w(se,he,ue,ce,de,ge,Le,me,-De*Y,!1),w(se,he,ue,ce,de,ge,Le,pe,De*O,!0,De*Y),w(se,he,ue,ce,de,ge,Le,ve,De*Y,!1),le.length>0&&ve.length>0){var Ge=le[0].index,je=ke,ze=ve[ve.length-1].index,qe=se.length-1;ge.push(ze,qe,je,je,Ge,ze)}$=se.length;var Je,Ke=t.BoundingSphere.fromPoints(se);n.defined(g)&&(Je=o.OrientedBoundingBox.fromRectangle(g,z,q,d));for(var Qe=new r.EllipsoidalOccluder(d).computeHorizonCullingPointPossiblyUnderEllipsoid(c,se,z),Xe=new e.AxisAlignedBoundingBox(J,K,c),Ze=new r.TerrainEncoding(c,Xe,Le.hMin,q,L,!1,P,G,m,p),$e=new Float32Array($*Ze.stride),et=0,tt=0;tt<$;++tt)et=Ze.encode($e,et,se[tt],ue[tt],he[tt],void 0,ce[tt],de[tt]);var it=le.map((function(e){return e.index})).reverse(),nt=me.map((function(e){return e.index})).reverse(),rt=pe.map((function(e){return e.index})).reverse(),at=ve.map((function(e){return e.index})).reverse();return nt.unshift(rt[rt.length-1]),nt.push(it[0]),at.unshift(it[it.length-1]),at.push(rt[0]),{vertices:$e,indices:new Uint16Array(ge),maximumHeight:q,minimumHeight:z,encoding:Ze,boundingSphere3D:Ke,orientedBoundingBox:Je,occludeePointInScaledSpace:Qe,vertexCountWithoutSkirts:ke,indexCountWithoutSkirts:He,westIndicesSouthToNorth:it,southIndicesEastToWest:nt,eastIndicesNorthToSouth:rt,northIndicesWestToEast:at}}(h.buffer,h.relativeToCenter,h.ellipsoid,h.rectangle,h.nativeRectangle,h.exaggeration,h.exaggerationRelativeHeight,h.skirtHeight,h.includeWebMercatorT,h.negativeAltitudeExponentBias,h.negativeElevationThreshold),g=d.vertices;c.push(g.buffer);var l=d.indices;return c.push(l.buffer),{vertices:g.buffer,indices:l.buffer,numberOfAttributes:d.encoding.stride,minimumHeight:d.minimumHeight,maximumHeight:d.maximumHeight,boundingSphere3D:d.boundingSphere3D,orientedBoundingBox:d.orientedBoundingBox,occludeePointInScaledSpace:d.occludeePointInScaledSpace,encoding:d.encoding,vertexCountWithoutSkirts:d.vertexCountWithoutSkirts,indexCountWithoutSkirts:d.indexCountWithoutSkirts,westIndicesSouthToNorth:d.westIndicesSouthToNorth,southIndicesEastToWest:d.southIndicesEastToWest,eastIndicesNorthToSouth:d.eastIndicesNorthToSouth,northIndicesWestToEast:d.northIndicesWestToEast}}))})); |
@@ -1,1 +0,3 @@ | ||
define(["./Cartesian2-40b13f31","./AxisAlignedBoundingBox-445c3009","./Transforms-70f396e0","./when-7b580518","./Check-3917d765","./TerrainEncoding-75f35f91","./Math-87254c13","./OrientedBoundingBox-f7557a9b","./WebMercatorProjection-bdaffcea","./RuntimeError-fad4d3c6","./createTaskProcessorWorker","./combine-83aa7971","./AttributeCompression-56959beb","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-66f520e3","./IntersectionTests-587a744a","./Plane-9d4e3328"],function(Ce,Fe,Le,Ne,e,Oe,Re,ze,He,r,t,a,i,n,s,l,o,f){"use strict";var u=Object.freeze({NONE:0,LERC:1}),_e={};_e.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var Ye=new Ce.Cartesian3,We=new Le.Matrix4,Xe=new Ce.Cartesian3,Ze=new Ce.Cartesian3;_e.computeVertices=function(e){var t,a,i,r=Math.cos,n=Math.sin,s=Math.sqrt,l=Math.atan,o=Math.exp,f=Re.CesiumMath.PI_OVER_TWO,u=Re.CesiumMath.toRadians,c=e.heightmap,d=e.width,h=e.height,m=e.skirtHeight,g=0<m,p=Ne.defaultValue(e.isGeographic,!0),x=Ne.defaultValue(e.ellipsoid,Ce.Ellipsoid.WGS84),w=1/x.maximumRadius,k=Ce.Rectangle.clone(e.nativeRectangle),y=Ce.Rectangle.clone(e.rectangle),I=Ne.defined(y)?(t=y.west,a=y.south,i=y.east,y.north):p?(t=u(k.west),a=u(k.south),i=u(k.east),u(k.north)):(t=k.west*w,a=f-2*l(o(-k.south*w)),i=k.east*w,f-2*l(o(-k.north*w))),b=e.relativeToCenter,U=Ne.defined(b),b=U?b:Ce.Cartesian3.ZERO,v=Ne.defaultValue(e.includeWebMercatorT,!1),T=Ne.defaultValue(e.exaggeration,1),M=Ne.defaultValue(e.exaggerationRelativeHeight,0),V=1!==T,e=Ne.defaultValue(e.structure,_e.DEFAULT_STRUCTURE),A=Ne.defaultValue(e.heightScale,_e.DEFAULT_STRUCTURE.heightScale),B=Ne.defaultValue(e.heightOffset,_e.DEFAULT_STRUCTURE.heightOffset),D=Ne.defaultValue(e.elementsPerHeight,_e.DEFAULT_STRUCTURE.elementsPerHeight),S=Ne.defaultValue(e.stride,_e.DEFAULT_STRUCTURE.stride),P=Ne.defaultValue(e.elementMultiplier,_e.DEFAULT_STRUCTURE.elementMultiplier),E=Ne.defaultValue(e.isBigEndian,_e.DEFAULT_STRUCTURE.isBigEndian),C=Ce.Rectangle.computeWidth(k),F=Ce.Rectangle.computeHeight(k),L=C/(d-1),N=F/(h-1);p||(C*=w,F*=w);var O,R,e=x.radiiSquared,z=e.x,H=e.y,_=e.z,Y=65536,W=-65536,e=Le.Transforms.eastNorthUpToFixedFrame(b,x),X=Le.Matrix4.inverseTransformation(e,We);v&&(O=He.WebMercatorProjection.geodeticLatitudeToMercatorAngle(a),R=1/(He.WebMercatorProjection.geodeticLatitudeToMercatorAngle(I)-O));var Z=Xe;Z.x=Number.POSITIVE_INFINITY,Z.y=Number.POSITIVE_INFINITY,Z.z=Number.POSITIVE_INFINITY;var j=Ze;j.x=Number.NEGATIVE_INFINITY,j.y=Number.NEGATIVE_INFINITY,j.z=Number.NEGATIVE_INFINITY;var G=Number.POSITIVE_INFINITY,q=d*h,Q=q+(0<m?2*d+2*h:0),J=new Array(Q),K=new Array(Q),$=new Array(Q),ee=v?new Array(Q):[],te=V?new Array(Q):[],ae=0,ie=h,re=0,ne=d;g&&(--ae,++ie,--re,++ne);for(var se=ae;se<ie;++se){var le=se;h<=(le=le<0?0:le)&&(le=h-1);var oe=k.north-N*le,oe=p?u(oe):f-2*l(o(-oe*w)),fe=Re.CesiumMath.clamp(fe=(oe-a)/(I-a),0,1),ue=se===ae,ce=se===ie-1;0<m&&(ue?oe+=1e-5*F:ce&&(oe-=1e-5*F));var de,he=r(oe),me=n(oe),ge=_*me;v&&(de=(He.WebMercatorProjection.geodeticLatitudeToMercatorAngle(oe)-O)*R);for(var pe=re;pe<ne;++pe){var xe=pe,we=le*(d*S)+(xe=d<=(xe=xe<0?0:xe)?d-1:xe)*S;if(1===D)ye=c[we];else{var ke,ye=0;if(E)for(ke=0;ke<D;++ke)ye=ye*P+c[we+ke];else for(ke=D-1;0<=ke;--ke)ye=ye*P+c[we+ke]}ye=ye*A+B;var W=Math.max(W,ye),Y=Math.min(Y,ye),Ie=k.west+L*xe;p?Ie=u(Ie):Ie*=w;var be=Re.CesiumMath.clamp(be=(Ie-t)/(i-t),0,1),Ue=le*d+xe;if(0<m){var ve=pe===re,Te=pe===ne-1,Me=ue||ce||ve||Te;if((ue||ce)&&(ve||Te))continue;Me&&(ye-=m,ve?(Ue=h-le-1+q,Ie-=1e-5*C):ce?Ue=q+h+(d-xe-1):Te?(Ue=q+h+d+le,Ie+=1e-5*C):ue&&(Ue=q+h+d+h+xe))}var Ve=he*r(Ie),Me=he*n(Ie),ve=z*Ve,Te=H*Me,xe=1/s(ve*Ve+Te*Me+ge*me),Ie=ve*xe,ve=Te*xe,Te=ge*xe,xe=new Ce.Cartesian3;xe.x=Ie+Ve*ye,xe.y=ve+Me*ye,xe.z=Te+me*ye,Le.Matrix4.multiplyByPoint(X,xe,Ye),Ce.Cartesian3.minimumByComponent(Ye,Z,Z),Ce.Cartesian3.maximumByComponent(Ye,j,j),G=Math.min(G,ye),J[Ue]=xe,$[Ue]=new Ce.Cartesian2(be,fe),K[Ue]=ye,v&&(ee[Ue]=de),V&&(te[Ue]=x.geodeticSurfaceNormal(xe))}}var Ae,Be,g=Le.BoundingSphere.fromPoints(J);Ne.defined(y)&&(Ae=ze.OrientedBoundingBox.fromRectangle(y,Y,W,x)),U&&(Be=new Oe.EllipsoidalOccluder(x).computeHorizonCullingPointPossiblyUnderEllipsoid(b,J,Y));for(var U=new Fe.AxisAlignedBoundingBox(Z,j,b),De=new Oe.TerrainEncoding(b,U,G,W,e,!1,v,V,T,M),Se=new Float32Array(Q*De.stride),Pe=0,Ee=0;Ee<Q;++Ee)Pe=De.encode(Se,Pe,J[Ee],$[Ee],K[Ee],void 0,ee[Ee],te[Ee]);return{vertices:Se,maximumHeight:W,minimumHeight:Y,encoding:De,boundingSphere3D:g,orientedBoundingBox:Ae,occludeePointInScaledSpace:Be}};var c,d,h,m,g,B,p,x,w,k,y,I={};c={defaultNoDataValue:-34027999387901484e22,decode:function(e,t){var a=(t=t||{}).encodedMaskData||null===t.encodedMaskData,i=g(e,t.inputOffset||0,a),e=null!==t.noDataValue?t.noDataValue:c.defaultNoDataValue,a=d(i,t.pixelType||Float32Array,t.encodedMaskData,e,t.returnMask),e={width:i.width,height:i.height,pixelData:a.resultPixels,minValue:a.minValue,maxValue:i.pixels.maxValue,noDataValue:e};return a.resultMask&&(e.maskData=a.resultMask),t.returnEncodedMask&&i.mask&&(e.encodedMaskData=i.mask.bitset||null),t.returnFileInfo&&(e.fileInfo=h(i),t.computeUsedBitDepths&&(e.fileInfo.bitDepths=m(i))),e}},d=function(e,t,a,i,r){var n,s,l,o=0,f=e.pixels.numBlocksX,u=e.pixels.numBlocksY,c=Math.floor(e.width/f),d=Math.floor(e.height/u),h=2*e.maxZError,m=Number.MAX_VALUE;a=a||(e.mask?e.mask.bitset:null),s=new t(e.width*e.height),r&&a&&(l=new Uint8Array(e.width*e.height));for(var g,p,x=new Float32Array(c*d),w=0;w<=u;w++){var k=w!==u?d:e.height%u;if(0!==k)for(var y=0;y<=f;y++){var I=y!==f?c:e.width%f;if(0!==I){var b,U,v,T,M=w*e.width*d+y*c,V=e.width-I,A=e.pixels.blocks[o];if(A.encoding<2?(b=0===A.encoding?A.rawData:(B(A.stuffedData,A.bitsPerPixel,A.numValidPixels,A.offset,h,x,e.pixels.maxValue),x),U=0):v=2===A.encoding?0:A.offset,a)for(p=0;p<k;p++){for(7&M&&(T=a[M>>3],T<<=7&M),g=0;g<I;g++)128&(T=!(7&M)?a[M>>3]:T)?(l&&(l[M]=1),m=(n=A.encoding<2?b[U++]:v)<m?n:m,s[M++]=n):(l&&(l[M]=0),s[M++]=i),T<<=1;M+=V}else if(A.encoding<2)for(p=0;p<k;p++){for(g=0;g<I;g++)m=(n=b[U++])<m?n:m,s[M++]=n;M+=V}else for(m=v<m?v:m,p=0;p<k;p++){for(g=0;g<I;g++)s[M++]=v;M+=V}if(1===A.encoding&&U!==A.numValidPixels)throw"Block and Mask do not match";o++}}}return{resultPixels:s,resultMask:l,minValue:m}},h=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},m=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,a={},i=0;i<t;i++){var r=e.pixels.blocks[i];0===r.encoding?a.float32=!0:1===r.encoding?a[r.bitsPerPixel]=!0:a[0]=!0}return Object.keys(a)},g=function(e,t,a){var i={},r=new Uint8Array(e,t,10);if(i.fileIdentifierString=String.fromCharCode.apply(null,r),"CntZImage"!==i.fileIdentifierString.trim())throw"Unexpected file identifier string: "+i.fileIdentifierString;t+=10;var n=new DataView(e,t,24);if(i.fileVersion=n.getInt32(0,!0),i.imageType=n.getInt32(4,!0),i.height=n.getUint32(8,!0),i.width=n.getUint32(12,!0),i.maxZError=n.getFloat64(16,!0),t+=24,!a)if(n=new DataView(e,t,16),i.mask={},i.mask.numBlocksY=n.getUint32(0,!0),i.mask.numBlocksX=n.getUint32(4,!0),i.mask.numBytes=n.getUint32(8,!0),i.mask.maxValue=n.getFloat32(12,!0),t+=16,0<i.mask.numBytes){var s=new Uint8Array(Math.ceil(i.width*i.height/8)),l=(n=new DataView(e,t,i.mask.numBytes)).getInt16(0,!0),o=2,f=0;do{if(0<l)for(;l--;)s[f++]=n.getUint8(o++);else for(var u=n.getUint8(o++),l=-l;l--;)s[f++]=u}while(l=n.getInt16(o,!0),(o+=2)<i.mask.numBytes);if(-32768!==l||f<s.length)throw"Unexpected end of mask RLE encoding";i.mask.bitset=s,t+=i.mask.numBytes}else 0==(i.mask.numBytes|i.mask.numBlocksY|i.mask.maxValue)&&(i.mask.bitset=new Uint8Array(Math.ceil(i.width*i.height/8)));n=new DataView(e,t,16),i.pixels={},i.pixels.numBlocksY=n.getUint32(0,!0),i.pixels.numBlocksX=n.getUint32(4,!0),i.pixels.numBytes=n.getUint32(8,!0),i.pixels.maxValue=n.getFloat32(12,!0),t+=16;var r=i.pixels.numBlocksX,a=i.pixels.numBlocksY,c=r+(0<i.width%r?1:0),d=a+(0<i.height%a?1:0);i.pixels.blocks=new Array(c*d);for(var h=0,m=0;m<d;m++)for(var g=0;g<c;g++){var p=0,x=e.byteLength-t;n=new DataView(e,t,Math.min(10,x));var w={};i.pixels.blocks[h++]=w;var k,x=n.getUint8(0);if(p++,w.encoding=63&x,3<w.encoding)throw"Invalid block encoding ("+w.encoding+")";if(2!==w.encoding){if(0!==x&&2!==x){if(x>>=6,2===(w.offsetType=x))w.offset=n.getInt8(1),p++;else if(1===x)w.offset=n.getInt16(1,!0),p+=2;else{if(0!==x)throw"Invalid block offset type";w.offset=n.getFloat32(1,!0),p+=4}if(1===w.encoding)if(x=n.getUint8(p),p++,w.bitsPerPixel=63&x,x>>=6,2===(w.numValidPixelsType=x))w.numValidPixels=n.getUint8(p),p++;else if(1===x)w.numValidPixels=n.getUint16(p,!0),p+=2;else{if(0!==x)throw"Invalid valid pixel count type";w.numValidPixels=n.getUint32(p,!0),p+=4}}if(t+=p,3!==w.encoding)if(0===w.encoding){var y=(i.pixels.numBytes-1)/4;if(y!==Math.floor(y))throw"uncompressed block has invalid length";k=new ArrayBuffer(4*y),new Uint8Array(k).set(new Uint8Array(e,t,4*y));var I=new Float32Array(k);w.rawData=I,t+=4*y}else 1===w.encoding&&(I=Math.ceil(w.numValidPixels*w.bitsPerPixel/8),y=Math.ceil(I/4),k=new ArrayBuffer(4*y),new Uint8Array(k).set(new Uint8Array(e,t,I)),w.stuffedData=new Uint32Array(k),t+=I)}else t++}return i.eofOffset=t,i},B=function(e,t,a,i,r,n,s){var l,o,f,u,c=(1<<t)-1,d=0,h=0,m=Math.ceil((s-i)/r),g=4*e.length-Math.ceil(t*a/8);for(e[e.length-1]<<=8*g,l=0;l<a;l++)0===h&&(u=e[d++],h=32),t<=h?(f=u>>>h-t&c,h-=t):(f=(u&c)<<(o=t-h)&c,f+=(u=e[d++])>>>(h=32-o)),n[l]=f<m?i+f*r:s;return n},x=c,w=function(){var y=function(e,t,a,i,r,n,s,l){var o,f,u,c,d,h=(1<<a)-1,m=0,g=0,p=4*e.length-Math.ceil(a*i/8);if(e[e.length-1]<<=8*p,r)for(o=0;o<i;o++)0===g&&(u=e[m++],g=32),a<=g?(f=u>>>g-a&h,g-=a):(f=(u&h)<<(c=a-g)&h,f+=(u=e[m++])>>>(g=32-c)),t[o]=r[f];else for(d=Math.ceil((l-n)/s),o=0;o<i;o++)0===g&&(u=e[m++],g=32),a<=g?(f=u>>>g-a&h,g-=a):(f=(u&h)<<(c=a-g)&h,f+=(u=e[m++])>>>(g=32-c)),t[o]=f<d?n+f*s:l},I=function(e,t,a,i,r,n){var s,l,o=(1<<t)-1,f=0,u=0,c=0,d=0,h=[],m=4*e.length-Math.ceil(t*a/8);e[e.length-1]<<=8*m;for(var g=Math.ceil((n-i)/r),u=0;u<a;u++)0===c&&(l=e[f++],c=32),t<=c?(d=l>>>c-t&o,c-=t):(d=(l&o)<<(s=t-c)&o,d+=(l=e[f++])>>>(c=32-s)),h[u]=d<g?i+d*r:n;return h.unshift(i),h},b=function(e,t,a,i,r,n,s,l){var o,f,u,c=(1<<a)-1,d=0,h=0,m=0;if(r)for(p=0;p<i;p++)0===h&&(f=e[d++],h=32,m=0),a<=h?(o=f>>>m&c,h-=a,m+=a):(o=f>>>m&c,h=32-(u=a-h),o|=((f=e[d++])&(1<<u)-1)<<a-u,m=u),t[p]=r[o];else for(var g=Math.ceil((l-n)/s),p=0;p<i;p++)0===h&&(f=e[d++],h=32,m=0),a<=h?(o=f>>>m&c,h-=a,m+=a):(o=f>>>m&c,h=32-(u=a-h),o|=((f=e[d++])&(1<<u)-1)<<a-u,m=u),t[p]=o<g?n+o*s:l;return t},U=function(e,t,a,i,r,n){for(var s,l,o=(1<<t)-1,f=0,u=0,c=0,d=0,h=0,m=[],g=Math.ceil((n-i)/r),u=0;u<a;u++)0===c&&(l=e[f++],c=32,h=0),t<=c?(d=l>>>h&o,c-=t,h+=t):(d=l>>>h&o,c=32-(s=t-c),d|=((l=e[f++])&(1<<s)-1)<<t-s,h=s),m[u]=d<g?i+d*r:n;return m.unshift(i),m},v=function(e,t,a,i){var r,n,s,l,o=(1<<a)-1,f=0,u=0,c=4*e.length-Math.ceil(a*i/8);for(e[e.length-1]<<=8*c,r=0;r<i;r++)0===u&&(s=e[f++],u=32),a<=u?(n=s>>>u-a&o,u-=a):(n=(s&o)<<(l=a-u)&o,n+=(s=e[f++])>>>(u=32-l)),t[r]=n;return t},T=function(e,t,a,i){for(var r,n,s,l=(1<<a)-1,o=0,f=0,u=0,c=0;c<i;c++)0===f&&(n=e[o++],f=32,u=0),a<=f?(r=n>>>u&l,f-=a,u+=a):(r=n>>>u&l,f=32-(s=a-f),r|=((n=e[o++])&(1<<s)-1)<<a-s,u=s),t[c]=r;return t},R={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,a=65535,i=e.length,r=Math.floor(i/2),n=0;r;){var s=359<=r?359:r;for(r-=s;t+=e[n++]<<8,a+=t+=e[n++],--s;);t=(65535&t)+(t>>>16),a=(65535&a)+(a>>>16)}return 1&i&&(a+=t+=e[n]<<8),((a=(65535&a)+(a>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var a=t.ptr,i=new Uint8Array(e,a,6),r={};if(r.fileIdentifierString=String.fromCharCode.apply(null,i),0!==r.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+r.fileIdentifierString;a+=6;var n=new DataView(e,a,8),i=n.getInt32(0,!0);if(a+=4,3<=(r.fileVersion=i)&&(r.checksum=n.getUint32(4,!0),a+=4),n=new DataView(e,a,12),r.height=n.getUint32(0,!0),r.width=n.getUint32(4,!0),a+=8,4<=i?(r.numDims=n.getUint32(8,!0),a+=4):r.numDims=1,n=new DataView(e,a,40),r.numValidPixel=n.getUint32(0,!0),r.microBlockSize=n.getInt32(4,!0),r.blobSize=n.getInt32(8,!0),r.imageType=n.getInt32(12,!0),r.maxZError=n.getFloat64(16,!0),r.zMin=n.getFloat64(24,!0),r.zMax=n.getFloat64(32,!0),a+=40,t.headerInfo=r,t.ptr=a,3<=i&&this.computeChecksumFletcher32(new Uint8Array(e,a-(4<=i?52:48),r.blobSize-14))!==r.checksum)throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var a=t.headerInfo,i=this.getDataTypeArray(a.imageType),r=a.numDims*this.getDataTypeSize(a.imageType),n=this.readSubArray(e,t.ptr,i,r),s=this.readSubArray(e,t.ptr+r,i,r);t.ptr+=2*r;for(var l=!0,o=0;o<a.numDims;o++)if(n[o]!==s[o]){l=!1;break}return a.minValues=n,a.maxValues=s,l},readSubArray:function(e,t,a,i){var r=a===Uint8Array?new Uint8Array(e,t,i):(r=new ArrayBuffer(i),new Uint8Array(r).set(new Uint8Array(e,t,i)),new a(r));return r},readMask:function(e,t){var a=t.ptr,i=t.headerInfo,r=i.width*i.height,i=i.numValidPixel,n=new DataView(e,a,4),s={};if(s.numBytes=n.getUint32(0,!0),a+=4,(0===i||r===i)&&0!==s.numBytes)throw"invalid mask";if(0===i)o=new Uint8Array(Math.ceil(r/8)),s.bitset=o,d=new Uint8Array(r),t.pixels.resultMask=d,a+=s.numBytes;else if(0<s.numBytes){var l,o=new Uint8Array(Math.ceil(r/8)),f=(n=new DataView(e,a,s.numBytes)).getInt16(0,!0),u=2,c=0;do{if(0<f)for(;f--;)o[c++]=n.getUint8(u++);else for(l=n.getUint8(u++),f=-f;f--;)o[c++]=l}while(f=n.getInt16(u,!0),(u+=2)<s.numBytes);if(-32768!==f||c<o.length)throw"Unexpected end of mask RLE encoding";for(var d=new Uint8Array(r),h=0,m=0,m=0;m<r;m++)7&m?(h=o[m>>3],h<<=7&m):h=o[m>>3],128&h&&(d[m]=1);t.pixels.resultMask=d,s.bitset=o,a+=s.numBytes}return t.ptr=a,t.mask=s,!0},readDataOneSweep:function(e,t,a){var i=t.ptr,r=t.headerInfo,n=r.numDims,s=r.width*r.height,l=r.imageType,r=r.numValidPixel*R.getDataTypeSize(l)*n,o=t.pixels.resultMask,f=a===Uint8Array?new Uint8Array(e,i,r):(l=new ArrayBuffer(r),new Uint8Array(l).set(new Uint8Array(e,i,r)),new a(l));if(f.length===s*n)t.pixels.resultPixels=f;else{t.pixels.resultPixels=new a(s*n);var u,c=0,d=0,h=0;if(1<n)for(h=0;h<n;h++)for(u=h*s,d=0;d<s;d++)o[d]&&(t.pixels.resultPixels[u+d]=f[c++]);else for(d=0;d<s;d++)o[d]&&(t.pixels.resultPixels[d]=f[c++])}return t.ptr=i+=r,!0},readHuffmanTree:function(e,t){var a=this.HUFFMAN_LUT_BITS_MAX,i=new DataView(e,t.ptr,16);if(t.ptr+=16,i.getInt32(0,!0)<2)throw"unsupported Huffman version";var r=i.getInt32(4,!0),n=i.getInt32(8,!0),s=i.getInt32(12,!0);if(s<=n)return!1;var l=new Uint32Array(s-n);R.decodeBits(e,t,l);for(var o,f,u,c=[],d=n;d<s;d++)c[o=d-(d<r?0:r)]={first:l[d-n],second:null};var h=e.byteLength-t.ptr,i=Math.ceil(h/4),i=new ArrayBuffer(4*i);new Uint8Array(i).set(new Uint8Array(e,t.ptr,h));var m=new Uint32Array(i),g=0,p=0,x=m[0];for(d=n;d<s;d++)0<(u=c[o=d-(d<r?0:r)].first)&&(c[o].second=x<<g>>>32-u,u<=32-g?32===(g+=u)&&(g=0,x=m[++p]):(x=m[++p],c[o].second|=x>>>32-(g+=u-32)));var w=0,k=0,y=new V;for(d=0;d<c.length;d++)void 0!==c[d]&&(w=Math.max(w,c[d].first));k=a<=w?a:w,30<=w&&console.log("WARning, large NUM LUT BITS IS "+w);var I,b,U,v,T,M=[];for(d=n;d<s;d++)if(0<(u=c[o=d-(d<r?0:r)].first))if(I=[u,o],u<=k)for(b=c[o].second<<k-u,U=1<<k-u,f=0;f<U;f++)M[b|f]=I;else for(b=c[o].second,T=y,v=u-1;0<=v;v--)T=b>>>v&1?(T.right||(T.right=new V),T.right):(T.left||(T.left=new V),T.left),0!==v||T.val||(T.val=I[1]);return{decodeLut:M,numBitsLUTQick:k,numBitsLUT:w,tree:y,stuffedData:m,srcPtr:p,bitPos:g}},readHuffman:function(e,t,a){var i,r,n,s,l,o,f,u,c,d=t.headerInfo,h=d.numDims,m=t.headerInfo.height,g=t.headerInfo.width,p=g*m,e=this.readHuffmanTree(e,t),x=e.decodeLut,w=e.tree,k=e.stuffedData,y=e.srcPtr,I=e.bitPos,b=e.numBitsLUTQick,U=e.numBitsLUT,v=0===t.headerInfo.imageType?128:0,T=t.pixels.resultMask,M=0;0<I&&(y++,I=0);for(var V=k[y],A=1===t.encodeMode,B=new a(p*h),D=B,S=0;S<d.numDims;S++){if(1<h&&(D=new a(B.buffer,p*S,p),M=0),t.headerInfo.numValidPixel===g*m)for(o=u=0;o<m;o++)for(f=0;f<g;f++,u++){if(r=0,l=s=V<<I>>>32-b,x[l=32-I<b?s|=k[y+1]>>>64-I-b:l])r=x[l][1],I+=x[l][0];else for(l=s=V<<I>>>32-U,32-I<U&&(l=s|=k[y+1]>>>64-I-U),i=w,c=0;c<U;c++)if(!(i=s>>>U-c-1&1?i.right:i.left).left&&!i.right){r=i.val,I=I+c+1;break}32<=I&&(I-=32,V=k[++y]),n=r-v,A?(n+=!(0<f)&&0<o?D[u-g]:M,n&=255,M=D[u]=n):D[u]=n}else for(o=u=0;o<m;o++)for(f=0;f<g;f++,u++)if(T[u]){if(r=0,l=s=V<<I>>>32-b,x[l=32-I<b?s|=k[y+1]>>>64-I-b:l])r=x[l][1],I+=x[l][0];else for(l=s=V<<I>>>32-U,32-I<U&&(l=s|=k[y+1]>>>64-I-U),i=w,c=0;c<U;c++)if(!(i=s>>>U-c-1&1?i.right:i.left).left&&!i.right){r=i.val,I=I+c+1;break}32<=I&&(I-=32,V=k[++y]),n=r-v,A?(!(0<f&&T[u-1])&&0<o&&T[u-g]?n+=D[u-g]:n+=M,n&=255,M=D[u]=n):D[u]=n}t.ptr=t.ptr+4*(y+1)+(0<I?4:0)}t.pixels.resultPixels=B},decodeBits:function(e,t,a,i,r){var n=t.headerInfo,s=n.fileVersion,l=0,o=5<=e.byteLength-t.ptr?5:e.byteLength-t.ptr,f=new DataView(e,t.ptr,o),u=f.getUint8(0);l++;var c=u>>6,d=0==c?4:3-c,o=0<(32&u),c=31&u,u=0;if(1==d)u=f.getUint8(l),l++;else if(2==d)u=f.getUint16(l,!0),l+=2;else{if(4!=d)throw"Invalid valid pixel count type";u=f.getUint32(l,!0),l+=4}var h,m,g,p,x,w,k,d=2*n.maxZError,n=1<n.numDims?n.maxValues[r]:n.zMax;if(o){for(t.counter.lut++,w=f.getUint8(l),l++,p=Math.ceil((w-1)*c/8),x=Math.ceil(p/4),m=new ArrayBuffer(4*x),g=new Uint8Array(m),t.ptr+=l,g.set(new Uint8Array(e,t.ptr,p)),f=new Uint32Array(m),t.ptr+=p,k=0;w-1>>>k;)k++;p=Math.ceil(u*k/8),x=Math.ceil(p/4),m=new ArrayBuffer(4*x),(g=new Uint8Array(m)).set(new Uint8Array(e,t.ptr,p)),h=new Uint32Array(m),t.ptr+=p,f=(3<=s?U:I)(f,c,w-1,i,d,n),(3<=s?b:y)(h,a,k,u,f)}else t.counter.bitstuffer++,k=c,t.ptr+=l,0<k&&(p=Math.ceil(u*k/8),x=Math.ceil(p/4),m=new ArrayBuffer(4*x),(g=new Uint8Array(m)).set(new Uint8Array(e,t.ptr,p)),h=new Uint32Array(m),t.ptr+=p,3<=s?null===i?T(h,a,k,u):b(h,a,k,u,!1,i,d,n):null===i?v(h,a,k,u):y(h,a,k,u,!1,i,d,n))},readTiles:function(e,t,a){var i=t.headerInfo,r=i.width,n=i.height,s=i.microBlockSize,l=i.imageType,o=R.getDataTypeSize(l),f=Math.ceil(r/s),u=Math.ceil(n/s);t.pixels.numBlocksY=u,t.pixels.numBlocksX=f;for(var c,d,h,m,g,p,x,w,k,y,I,b,U,v,T=t.pixels.ptr=0,M=0,V=0,A=0,B=0,D=0,S=0,P=0,E=new a(s*s),C=n%s||s,F=r%s||s,L=i.numDims,N=t.pixels.resultMask,O=t.pixels.resultPixels,V=0;V<u;V++)for(c=V!==u-1?s:C,A=0;A<f;A++)for(B=V*r*s+A*s,p=r-(d=A!==f-1?s:F),v=0;v<L;v++){if(1<L&&(O=new a(t.pixels.resultPixels.buffer,r*n*v*o,r*n)),h=e.byteLength-t.ptr,k={},P=0,P++,g=(m=(w=new DataView(e,t.ptr,Math.min(10,h))).getUint8(0))>>6&255,(m>>2&15)!=(A*s>>3&15))throw"integrity issue";if(3<(I=3&m))throw t.ptr+=P,"Invalid block encoding ("+I+")";if(2!=I)if(0==I){if(t.counter.uncompressed++,t.ptr+=P,D=(D=c*d*o)<(x=e.byteLength-t.ptr)?D:x,b=new ArrayBuffer(D%o==0?D:D+o-D%o),new Uint8Array(b).set(new Uint8Array(e,t.ptr,D)),y=new a(b),S=0,N)for(T=0;T<c;T++){for(M=0;M<d;M++)N[B]&&(O[B]=y[S++]),B++;B+=p}else for(T=0;T<c;T++){for(M=0;M<d;M++)O[B++]=y[S++];B+=p}t.ptr+=S*o}else if(b=R.getDataTypeUsed(l,g),U=R.getOnePixel(k,P,b,w),P+=R.getDataTypeSize(b),3==I)if(t.ptr+=P,t.counter.constantoffset++,N)for(T=0;T<c;T++){for(M=0;M<d;M++)N[B]&&(O[B]=U),B++;B+=p}else for(T=0;T<c;T++){for(M=0;M<d;M++)O[B++]=U;B+=p}else if(t.ptr+=P,R.decodeBits(e,t,E,U,v),P=0,N)for(T=0;T<c;T++){for(M=0;M<d;M++)N[B]&&(O[B]=E[P++]),B++;B+=p}else for(T=0;T<c;T++){for(M=0;M<d;M++)O[B++]=E[P++];B+=p}else t.counter.constant++,t.ptr+=P}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:R.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t,a=e.headerInfo.zMax,i=e.headerInfo.numDims,r=e.headerInfo.height*e.headerInfo.width,n=r*i,s=0,l=0,o=e.pixels.resultMask;if(o)if(1<i)for(s=0;s<i;s++)for(t=s*r,l=0;l<r;l++)o[l]&&(e.pixels.resultPixels[t+l]=a);else for(l=0;l<r;l++)o[l]&&(e.pixels.resultPixels[l]=a);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(a);else for(l=0;l<n;l++)e.pixels.resultPixels[l]=a},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:t=Float32Array;break;case 7:t=Float64Array;break;default:t=Float32Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:t="F32";break;case 7:t="F64";break;default:t="F32"}return t},isValidPixelValue:function(e,t){if(null===t)return!1;var a;switch(e){case 0:a=-128<=t&&t<=127;break;case 1:a=0<=t&&t<=255;break;case 2:a=-32768<=t&&t<=32767;break;case 3:a=0<=t&&t<=65536;break;case 4:a=-2147483648<=t&&t<=2147483647;break;case 5:a=0<=t&&t<=4294967296;break;case 6:a=-34027999387901484e22<=t&&t<=34027999387901484e22;break;case 7:a=5e-324<=t&&t<=17976931348623157e292;break;default:a=!1}return a},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var a=e;switch(e){case 2:case 4:a=e-t;break;case 3:case 5:a=e-2*t;break;case 6:a=0===t?e:1===t?2:1;break;case 7:a=0===t?e:e-2*t+1;break;default:a=e}return a},getOnePixel:function(e,t,a,i){var r=0;switch(a){case 0:r=i.getInt8(t);break;case 1:r=i.getUint8(t);break;case 2:r=i.getInt16(t,!0);break;case 3:r=i.getUint16(t,!0);break;case 4:r=i.getInt32(t,!0);break;case 5:r=i.getUInt32(t,!0);break;case 6:r=i.getFloat32(t,!0);break;case 7:r=i.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return r}},V=function(e,t,a){this.val=e,this.left=t,this.right=a};return{decode:function(e,t){var a=(t=t||{}).noDataValue,i=0,r={};r.ptr=t.inputOffset||0,r.pixels={},R.readHeaderInfo(e,r);var n=r.headerInfo,s=n.fileVersion,l=R.getDataTypeArray(n.imageType);R.readMask(e,r),n.numValidPixel===n.width*n.height||r.pixels.resultMask||(r.pixels.resultMask=t.maskData);var o,f=n.width*n.height;if(r.pixels.resultPixels=new l(f*n.numDims),r.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==n.numValidPixel)if(n.zMax===n.zMin)R.constructConstantSurface(r);else if(4<=s&&R.checkMinMaxRanges(e,r))R.constructConstantSurface(r);else{var u=new DataView(e,r.ptr,2),c=u.getUint8(0);if(r.ptr++,c)R.readDataOneSweep(e,r,l);else if(1<s&&n.imageType<=1&&Math.abs(n.maxZError-.5)<1e-5){u=u.getUint8(1);if(r.ptr++,2<(r.encodeMode=u)||s<4&&1<u)throw"Invalid Huffman flag "+u;u?R.readHuffman(e,r,l):R.readTiles(e,r,l)}else R.readTiles(e,r,l)}r.eofOffset=r.ptr,t.inputOffset?(o=r.headerInfo.blobSize+t.inputOffset-r.ptr,1<=Math.abs(o)&&(r.eofOffset=t.inputOffset+r.headerInfo.blobSize)):(o=r.headerInfo.blobSize-r.ptr,1<=Math.abs(o)&&(r.eofOffset=r.headerInfo.blobSize));var d={width:n.width,height:n.height,pixelData:r.pixels.resultPixels,minValue:n.zMin,maxValue:n.zMax,validPixelCount:n.numValidPixel,dimCount:n.numDims,dimStats:{minValues:n.minValues,maxValues:n.maxValues},maskData:r.pixels.resultMask};if(r.pixels.resultMask&&R.isValidPixelValue(n.imageType,a)){for(var h=r.pixels.resultMask,i=0;i<f;i++)h[i]||(d.pixelData[i]=a);d.noDataValue=a}return r.noDataValue=a,t.returnFileInfo&&(d.fileInfo=R.formatFileInfo(r)),d},getBandCount:function(e){for(var t=0,a=0,i={ptr:0,pixels:{}};a<e.byteLength-58;)R.readHeaderInfo(e,i),a+=i.headerInfo.blobSize,t++,i.ptr=a;return t}}}(),p=new ArrayBuffer(4),y=new Uint8Array(p),k=(new Uint32Array(p)[0]=1)===y[0],y={decode:function(e,t){if(!k)throw"Big endian system is not supported.";var a,i,r=(t=t||{}).inputOffset||0,n=new Uint8Array(e,r,10),n=String.fromCharCode.apply(null,n);if("CntZImage"===n.trim())a=x,i=1;else{if("Lerc2"!==n.substring(0,5))throw"Unexpected file identifier string: "+n;a=w,i=2}for(var s,l,o,f,u,c,d=0,h=e.byteLength-10,m=[],g={width:0,height:0,pixels:[],pixelType:t.pixelType,mask:null,statistics:[]};r<h;){var p=a.decode(e,{inputOffset:r,encodedMaskData:s,maskData:o,returnMask:0===d,returnEncodedMask:0===d,returnFileInfo:!0,pixelType:t.pixelType||null,noDataValue:t.noDataValue||null}),r=p.fileInfo.eofOffset;0===d&&(s=p.encodedMaskData,o=p.maskData,g.width=p.width,g.height=p.height,g.dimCount=p.dimCount||1,g.pixelType=p.pixelType||p.fileInfo.pixelType,g.mask=p.maskData),1<i&&p.fileInfo.mask&&0<p.fileInfo.mask.numBytes&&m.push(p.maskData),d++,g.pixels.push(p.pixelData),g.statistics.push({minValue:p.minValue,maxValue:p.maxValue,noDataValue:p.noDataValue,dimStats:p.dimStats})}if(1<i&&1<m.length){for(c=g.width*g.height,g.bandMasks=m,(o=new Uint8Array(c)).set(m[0]),f=1;f<m.length;f++)for(l=m[f],u=0;u<c;u++)o[u]=o[u]&l[u];g.maskData=o}return g}},I.Lerc=y;var b=I.Lerc;return t(function(e,t){if(e.encoding===u.LERC){try{i=b.decode(e.heightmap)}catch(e){throw new r.RuntimeError(e)}if(i.statistics[0].minValue===Number.MAX_VALUE)throw new r.RuntimeError("Invalid tile data");e.heightmap=i.pixels[0],e.width=i.width,e.height=i.height}e.ellipsoid=Ce.Ellipsoid.clone(e.ellipsoid),e.rectangle=Ce.Rectangle.clone(e.rectangle);var a=_e.computeVertices(e),i=a.vertices;return t.push(i.buffer),{vertices:i.buffer,numberOfAttributes:a.encoding.stride,minimumHeight:a.minimumHeight,maximumHeight:a.maximumHeight,gridWidth:e.width,gridHeight:e.height,boundingSphere3D:a.boundingSphere3D,orientedBoundingBox:a.orientedBoundingBox,occludeePointInScaledSpace:a.occludeePointInScaledSpace,encoding:a.encoding,westIndicesSouthToNorth:a.westIndicesSouthToNorth,southIndicesEastToWest:a.southIndicesEastToWest,eastIndicesNorthToSouth:a.eastIndicesNorthToSouth,northIndicesWestToEast:a.northIndicesWestToEast}})}); | ||
define(["./Matrix2-f2da41d4","./AxisAlignedBoundingBox-1feb0c48","./Transforms-7cd3197b","./when-229515d6","./RuntimeError-ffe03243","./TerrainEncoding-6355a4fe","./ComponentDatatype-17b06483","./OrientedBoundingBox-86debc5a","./WebMercatorProjection-d69cec15","./createTaskProcessorWorker","./combine-8ce3f24b","./AttributeCompression-0af3c035","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-b27cd2f7","./IntersectionTests-1b8a3cb9","./Plane-0421a8be"],(function(e,t,a,i,r,n,s,l,o,f,u,c,d,h,m,g){"use strict";var p=Object.freeze({NONE:0,LERC:1}),x={};x.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var w=new e.Cartesian3,k=new e.Matrix4,y=new e.Cartesian3,I=new e.Cartesian3;x.computeVertices=function(r){var f,u,c,d,h=Math.cos,m=Math.sin,g=Math.sqrt,p=Math.atan,b=Math.exp,v=s.CesiumMath.PI_OVER_TWO,U=s.CesiumMath.toRadians,T=r.heightmap,M=r.width,V=r.height,A=r.skirtHeight,B=A>0,D=i.defaultValue(r.isGeographic,!0),S=i.defaultValue(r.ellipsoid,e.Ellipsoid.WGS84),P=1/S.maximumRadius,E=e.Rectangle.clone(r.nativeRectangle),C=e.Rectangle.clone(r.rectangle);i.defined(C)?(f=C.west,u=C.south,c=C.east,d=C.north):D?(f=U(E.west),u=U(E.south),c=U(E.east),d=U(E.north)):(f=E.west*P,u=v-2*p(b(-E.south*P)),c=E.east*P,d=v-2*p(b(-E.north*P)));var F=r.relativeToCenter,N=i.defined(F);F=N?F:e.Cartesian3.ZERO;var O=i.defaultValue(r.includeWebMercatorT,!1),R=i.defaultValue(r.exaggeration,1),L=i.defaultValue(r.exaggerationRelativeHeight,0),z=1!==R,H=i.defaultValue(r.structure,x.DEFAULT_STRUCTURE),_=i.defaultValue(H.heightScale,x.DEFAULT_STRUCTURE.heightScale),Y=i.defaultValue(H.heightOffset,x.DEFAULT_STRUCTURE.heightOffset),W=i.defaultValue(H.elementsPerHeight,x.DEFAULT_STRUCTURE.elementsPerHeight),X=i.defaultValue(H.stride,x.DEFAULT_STRUCTURE.stride),Z=i.defaultValue(H.elementMultiplier,x.DEFAULT_STRUCTURE.elementMultiplier),j=i.defaultValue(H.isBigEndian,x.DEFAULT_STRUCTURE.isBigEndian),G=e.Rectangle.computeWidth(E),q=e.Rectangle.computeHeight(E),Q=G/(M-1),J=q/(V-1);D||(G*=P,q*=P);var K,$,ee=S.radiiSquared,te=ee.x,ae=ee.y,ie=ee.z,re=65536,ne=-65536,se=a.Transforms.eastNorthUpToFixedFrame(F,S),le=e.Matrix4.inverseTransformation(se,k);O&&(K=o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(u),$=1/(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(d)-K));var oe=y;oe.x=Number.POSITIVE_INFINITY,oe.y=Number.POSITIVE_INFINITY,oe.z=Number.POSITIVE_INFINITY;var fe=I;fe.x=Number.NEGATIVE_INFINITY,fe.y=Number.NEGATIVE_INFINITY,fe.z=Number.NEGATIVE_INFINITY;var ue=Number.POSITIVE_INFINITY,ce=M*V,de=ce+(A>0?2*M+2*V:0),he=new Array(de),me=new Array(de),ge=new Array(de),pe=O?new Array(de):[],xe=z?new Array(de):[],we=0,ke=V,ye=0,Ie=M;B&&(--we,++ke,--ye,++Ie);for(var be=1e-5,ve=we;ve<ke;++ve){var Ue=ve;Ue<0&&(Ue=0),Ue>=V&&(Ue=V-1);var Te=E.north-J*Ue,Me=((Te=D?U(Te):v-2*p(b(-Te*P)))-u)/(d-u);Me=s.CesiumMath.clamp(Me,0,1);var Ve=ve===we,Ae=ve===ke-1;A>0&&(Ve?Te+=be*q:Ae&&(Te-=be*q));var Be,De=h(Te),Se=m(Te),Pe=ie*Se;O&&(Be=(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(Te)-K)*$);for(var Ee=ye;Ee<Ie;++Ee){var Ce=Ee;Ce<0&&(Ce=0),Ce>=M&&(Ce=M-1);var Fe,Ne,Oe=Ue*(M*X)+Ce*X;if(1===W)Fe=T[Oe];else if(Fe=0,j)for(Ne=0;Ne<W;++Ne)Fe=Fe*Z+T[Oe+Ne];else for(Ne=W-1;Ne>=0;--Ne)Fe=Fe*Z+T[Oe+Ne];Fe=Fe*_+Y,ne=Math.max(ne,Fe),re=Math.min(re,Fe);var Re=E.west+Q*Ce;D?Re=U(Re):Re*=P;var Le=(Re-f)/(c-f);Le=s.CesiumMath.clamp(Le,0,1);var ze=Ue*M+Ce;if(A>0){var He=Ee===ye,_e=Ee===Ie-1,Ye=Ve||Ae||He||_e;if((Ve||Ae)&&(He||_e))continue;Ye&&(Fe-=A,He?(ze=ce+(V-Ue-1),Re-=be*G):Ae?ze=ce+V+(M-Ce-1):_e?(ze=ce+V+M+Ue,Re+=be*G):Ve&&(ze=ce+V+M+V+Ce))}var We=De*h(Re),Xe=De*m(Re),Ze=te*We,je=ae*Xe,Ge=1/g(Ze*We+je*Xe+Pe*Se),qe=Ze*Ge,Qe=je*Ge,Je=Pe*Ge,Ke=new e.Cartesian3;Ke.x=qe+We*Fe,Ke.y=Qe+Xe*Fe,Ke.z=Je+Se*Fe,e.Matrix4.multiplyByPoint(le,Ke,w),e.Cartesian3.minimumByComponent(w,oe,oe),e.Cartesian3.maximumByComponent(w,fe,fe),ue=Math.min(ue,Fe),he[ze]=Ke,ge[ze]=new e.Cartesian2(Le,Me),me[ze]=Fe,O&&(pe[ze]=Be),z&&(xe[ze]=S.geodeticSurfaceNormal(Ke))}}var $e,et,tt=a.BoundingSphere.fromPoints(he);(i.defined(C)&&($e=l.OrientedBoundingBox.fromRectangle(C,re,ne,S)),N)&&(et=new n.EllipsoidalOccluder(S).computeHorizonCullingPointPossiblyUnderEllipsoid(F,he,re));for(var at=new t.AxisAlignedBoundingBox(oe,fe,F),it=new n.TerrainEncoding(F,at,ue,ne,se,!1,O,z,R,L),rt=new Float32Array(de*it.stride),nt=0,st=0;st<de;++st)nt=it.encode(rt,nt,he[st],ge[st],me[st],void 0,pe[st],xe[st]);return{vertices:rt,maximumHeight:ne,minimumHeight:re,encoding:it,boundingSphere3D:tt,orientedBoundingBox:$e,occludeePointInScaledSpace:et}};var b=i.createCommonjsModule((function(e){ | ||
/* Copyright 2015-2018 Esri. 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 @preserve */ | ||
!function(){var t,a,i,r,n,s,l,o,f,u,c,d,h,m,g,p,x=(t={defaultNoDataValue:-34027999387901484e22,decode:function(e,s){var l=(s=s||{}).encodedMaskData||null===s.encodedMaskData,o=n(e,s.inputOffset||0,l),f=null!==s.noDataValue?s.noDataValue:t.defaultNoDataValue,u=a(o,s.pixelType||Float32Array,s.encodedMaskData,f,s.returnMask),c={width:o.width,height:o.height,pixelData:u.resultPixels,minValue:u.minValue,maxValue:o.pixels.maxValue,noDataValue:f};return u.resultMask&&(c.maskData=u.resultMask),s.returnEncodedMask&&o.mask&&(c.encodedMaskData=o.mask.bitset?o.mask.bitset:null),s.returnFileInfo&&(c.fileInfo=i(o),s.computeUsedBitDepths&&(c.fileInfo.bitDepths=r(o))),c}},a=function(e,t,a,i,r){var n,l,o,f=0,u=e.pixels.numBlocksX,c=e.pixels.numBlocksY,d=Math.floor(e.width/u),h=Math.floor(e.height/c),m=2*e.maxZError,g=Number.MAX_VALUE;a=a||(e.mask?e.mask.bitset:null),l=new t(e.width*e.height),r&&a&&(o=new Uint8Array(e.width*e.height));for(var p,x,w=new Float32Array(d*h),k=0;k<=c;k++){var y=k!==c?h:e.height%c;if(0!==y)for(var I=0;I<=u;I++){var b=I!==u?d:e.width%u;if(0!==b){var v,U,T,M,V=k*e.width*h+I*d,A=e.width-b,B=e.pixels.blocks[f];if(B.encoding<2?(0===B.encoding?v=B.rawData:(s(B.stuffedData,B.bitsPerPixel,B.numValidPixels,B.offset,m,w,e.pixels.maxValue),v=w),U=0):T=2===B.encoding?0:B.offset,a)for(x=0;x<y;x++){for(7&V&&(M=a[V>>3],M<<=7&V),p=0;p<b;p++)7&V||(M=a[V>>3]),128&M?(o&&(o[V]=1),g=g>(n=B.encoding<2?v[U++]:T)?n:g,l[V++]=n):(o&&(o[V]=0),l[V++]=i),M<<=1;V+=A}else if(B.encoding<2)for(x=0;x<y;x++){for(p=0;p<b;p++)g=g>(n=v[U++])?n:g,l[V++]=n;V+=A}else for(g=g>T?T:g,x=0;x<y;x++){for(p=0;p<b;p++)l[V++]=T;V+=A}if(1===B.encoding&&U!==B.numValidPixels)throw"Block and Mask do not match";f++}}}return{resultPixels:l,resultMask:o,minValue:g}},i=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},r=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,a={},i=0;i<t;i++){var r=e.pixels.blocks[i];0===r.encoding?a.float32=!0:1===r.encoding?a[r.bitsPerPixel]=!0:a[0]=!0}return Object.keys(a)},n=function(e,t,a){var i={},r=new Uint8Array(e,t,10);if(i.fileIdentifierString=String.fromCharCode.apply(null,r),"CntZImage"!==i.fileIdentifierString.trim())throw"Unexpected file identifier string: "+i.fileIdentifierString;t+=10;var n=new DataView(e,t,24);if(i.fileVersion=n.getInt32(0,!0),i.imageType=n.getInt32(4,!0),i.height=n.getUint32(8,!0),i.width=n.getUint32(12,!0),i.maxZError=n.getFloat64(16,!0),t+=24,!a)if(n=new DataView(e,t,16),i.mask={},i.mask.numBlocksY=n.getUint32(0,!0),i.mask.numBlocksX=n.getUint32(4,!0),i.mask.numBytes=n.getUint32(8,!0),i.mask.maxValue=n.getFloat32(12,!0),t+=16,i.mask.numBytes>0){var s=new Uint8Array(Math.ceil(i.width*i.height/8)),l=(n=new DataView(e,t,i.mask.numBytes)).getInt16(0,!0),o=2,f=0;do{if(l>0)for(;l--;)s[f++]=n.getUint8(o++);else{var u=n.getUint8(o++);for(l=-l;l--;)s[f++]=u}l=n.getInt16(o,!0),o+=2}while(o<i.mask.numBytes);if(-32768!==l||f<s.length)throw"Unexpected end of mask RLE encoding";i.mask.bitset=s,t+=i.mask.numBytes}else 0==(i.mask.numBytes|i.mask.numBlocksY|i.mask.maxValue)&&(i.mask.bitset=new Uint8Array(Math.ceil(i.width*i.height/8)));n=new DataView(e,t,16),i.pixels={},i.pixels.numBlocksY=n.getUint32(0,!0),i.pixels.numBlocksX=n.getUint32(4,!0),i.pixels.numBytes=n.getUint32(8,!0),i.pixels.maxValue=n.getFloat32(12,!0),t+=16;var c=i.pixels.numBlocksX,d=i.pixels.numBlocksY,h=c+(i.width%c>0?1:0),m=d+(i.height%d>0?1:0);i.pixels.blocks=new Array(h*m);for(var g=0,p=0;p<m;p++)for(var x=0;x<h;x++){var w=0,k=e.byteLength-t;n=new DataView(e,t,Math.min(10,k));var y={};i.pixels.blocks[g++]=y;var I=n.getUint8(0);if(w++,y.encoding=63&I,y.encoding>3)throw"Invalid block encoding ("+y.encoding+")";if(2!==y.encoding){if(0!==I&&2!==I){if(I>>=6,y.offsetType=I,2===I)y.offset=n.getInt8(1),w++;else if(1===I)y.offset=n.getInt16(1,!0),w+=2;else{if(0!==I)throw"Invalid block offset type";y.offset=n.getFloat32(1,!0),w+=4}if(1===y.encoding)if(I=n.getUint8(w),w++,y.bitsPerPixel=63&I,I>>=6,y.numValidPixelsType=I,2===I)y.numValidPixels=n.getUint8(w),w++;else if(1===I)y.numValidPixels=n.getUint16(w,!0),w+=2;else{if(0!==I)throw"Invalid valid pixel count type";y.numValidPixels=n.getUint32(w,!0),w+=4}}var b;if(t+=w,3!==y.encoding)if(0===y.encoding){var v=(i.pixels.numBytes-1)/4;if(v!==Math.floor(v))throw"uncompressed block has invalid length";b=new ArrayBuffer(4*v),new Uint8Array(b).set(new Uint8Array(e,t,4*v));var U=new Float32Array(b);y.rawData=U,t+=4*v}else if(1===y.encoding){var T=Math.ceil(y.numValidPixels*y.bitsPerPixel/8),M=Math.ceil(T/4);b=new ArrayBuffer(4*M),new Uint8Array(b).set(new Uint8Array(e,t,T)),y.stuffedData=new Uint32Array(b),t+=T}}else t++}return i.eofOffset=t,i},s=function(e,t,a,i,r,n,s){var l,o,f,u=(1<<t)-1,c=0,d=0,h=Math.ceil((s-i)/r),m=4*e.length-Math.ceil(t*a/8);for(e[e.length-1]<<=8*m,l=0;l<a;l++){if(0===d&&(f=e[c++],d=32),d>=t)o=f>>>d-t&u,d-=t;else{var g=t-d;o=(f&u)<<g&u,o+=(f=e[c++])>>>(d=32-g)}n[l]=o<h?i+o*r:s}return n},t),w=(l=function(e,t,a,i,r,n,s,l){var o,f,u,c,d,h=(1<<a)-1,m=0,g=0,p=4*e.length-Math.ceil(a*i/8);if(e[e.length-1]<<=8*p,r)for(o=0;o<i;o++)0===g&&(u=e[m++],g=32),g>=a?(f=u>>>g-a&h,g-=a):(f=(u&h)<<(c=a-g)&h,f+=(u=e[m++])>>>(g=32-c)),t[o]=r[f];else for(d=Math.ceil((l-n)/s),o=0;o<i;o++)0===g&&(u=e[m++],g=32),g>=a?(f=u>>>g-a&h,g-=a):(f=(u&h)<<(c=a-g)&h,f+=(u=e[m++])>>>(g=32-c)),t[o]=f<d?n+f*s:l},o=function(e,t,a,i,r,n){var s,l=(1<<t)-1,o=0,f=0,u=0,c=0,d=0,h=[],m=4*e.length-Math.ceil(t*a/8);e[e.length-1]<<=8*m;var g=Math.ceil((n-i)/r);for(f=0;f<a;f++)0===c&&(s=e[o++],c=32),c>=t?(d=s>>>c-t&l,c-=t):(d=(s&l)<<(u=t-c)&l,d+=(s=e[o++])>>>(c=32-u)),h[f]=d<g?i+d*r:n;return h.unshift(i),h},f=function(e,t,a,i,r,n,s,l){var o,f,u,c,d=(1<<a)-1,h=0,m=0,g=0;if(r)for(o=0;o<i;o++)0===m&&(u=e[h++],m=32,g=0),m>=a?(f=u>>>g&d,m-=a,g+=a):(f=u>>>g&d,m=32-(c=a-m),f|=((u=e[h++])&(1<<c)-1)<<a-c,g=c),t[o]=r[f];else{var p=Math.ceil((l-n)/s);for(o=0;o<i;o++)0===m&&(u=e[h++],m=32,g=0),m>=a?(f=u>>>g&d,m-=a,g+=a):(f=u>>>g&d,m=32-(c=a-m),f|=((u=e[h++])&(1<<c)-1)<<a-c,g=c),t[o]=f<p?n+f*s:l}return t},u=function(e,t,a,i,r,n){var s,l=(1<<t)-1,o=0,f=0,u=0,c=0,d=0,h=0,m=[],g=Math.ceil((n-i)/r);for(f=0;f<a;f++)0===c&&(s=e[o++],c=32,h=0),c>=t?(d=s>>>h&l,c-=t,h+=t):(d=s>>>h&l,c=32-(u=t-c),d|=((s=e[o++])&(1<<u)-1)<<t-u,h=u),m[f]=d<g?i+d*r:n;return m.unshift(i),m},c=function(e,t,a,i){var r,n,s,l,o=(1<<a)-1,f=0,u=0,c=4*e.length-Math.ceil(a*i/8);for(e[e.length-1]<<=8*c,r=0;r<i;r++)0===u&&(s=e[f++],u=32),u>=a?(n=s>>>u-a&o,u-=a):(n=(s&o)<<(l=a-u)&o,n+=(s=e[f++])>>>(u=32-l)),t[r]=n;return t},d=function(e,t,a,i){var r,n,s,l,o=(1<<a)-1,f=0,u=0,c=0;for(r=0;r<i;r++)0===u&&(s=e[f++],u=32,c=0),u>=a?(n=s>>>c&o,u-=a,c+=a):(n=s>>>c&o,u=32-(l=a-u),n|=((s=e[f++])&(1<<l)-1)<<a-l,c=l),t[r]=n;return t},h={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,a=65535,i=e.length,r=Math.floor(i/2),n=0;r;){var s=r>=359?359:r;r-=s;do{t+=e[n++]<<8,a+=t+=e[n++]}while(--s);t=(65535&t)+(t>>>16),a=(65535&a)+(a>>>16)}return 1&i&&(a+=t+=e[n]<<8),((a=(65535&a)+(a>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var a=t.ptr,i=new Uint8Array(e,a,6),r={};if(r.fileIdentifierString=String.fromCharCode.apply(null,i),0!==r.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+r.fileIdentifierString;a+=6;var n,s=new DataView(e,a,8),l=s.getInt32(0,!0);if(r.fileVersion=l,a+=4,l>=3&&(r.checksum=s.getUint32(4,!0),a+=4),s=new DataView(e,a,12),r.height=s.getUint32(0,!0),r.width=s.getUint32(4,!0),a+=8,l>=4?(r.numDims=s.getUint32(8,!0),a+=4):r.numDims=1,s=new DataView(e,a,40),r.numValidPixel=s.getUint32(0,!0),r.microBlockSize=s.getInt32(4,!0),r.blobSize=s.getInt32(8,!0),r.imageType=s.getInt32(12,!0),r.maxZError=s.getFloat64(16,!0),r.zMin=s.getFloat64(24,!0),r.zMax=s.getFloat64(32,!0),a+=40,t.headerInfo=r,t.ptr=a,l>=3&&(n=l>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,a-n,r.blobSize-14))!==r.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var a=t.headerInfo,i=this.getDataTypeArray(a.imageType),r=a.numDims*this.getDataTypeSize(a.imageType),n=this.readSubArray(e,t.ptr,i,r),s=this.readSubArray(e,t.ptr+r,i,r);t.ptr+=2*r;var l,o=!0;for(l=0;l<a.numDims;l++)if(n[l]!==s[l]){o=!1;break}return a.minValues=n,a.maxValues=s,o},readSubArray:function(e,t,a,i){var r;if(a===Uint8Array)r=new Uint8Array(e,t,i);else{var n=new ArrayBuffer(i);new Uint8Array(n).set(new Uint8Array(e,t,i)),r=new a(n)}return r},readMask:function(e,t){var a,i,r=t.ptr,n=t.headerInfo,s=n.width*n.height,l=n.numValidPixel,o=new DataView(e,r,4),f={};if(f.numBytes=o.getUint32(0,!0),r+=4,(0===l||s===l)&&0!==f.numBytes)throw"invalid mask";if(0===l)a=new Uint8Array(Math.ceil(s/8)),f.bitset=a,i=new Uint8Array(s),t.pixels.resultMask=i,r+=f.numBytes;else if(f.numBytes>0){a=new Uint8Array(Math.ceil(s/8));var u=(o=new DataView(e,r,f.numBytes)).getInt16(0,!0),c=2,d=0,h=0;do{if(u>0)for(;u--;)a[d++]=o.getUint8(c++);else for(h=o.getUint8(c++),u=-u;u--;)a[d++]=h;u=o.getInt16(c,!0),c+=2}while(c<f.numBytes);if(-32768!==u||d<a.length)throw"Unexpected end of mask RLE encoding";i=new Uint8Array(s);var m=0,g=0;for(g=0;g<s;g++)7&g?(m=a[g>>3],m<<=7&g):m=a[g>>3],128&m&&(i[g]=1);t.pixels.resultMask=i,f.bitset=a,r+=f.numBytes}return t.ptr=r,t.mask=f,!0},readDataOneSweep:function(e,t,a){var i,r=t.ptr,n=t.headerInfo,s=n.numDims,l=n.width*n.height,o=n.imageType,f=n.numValidPixel*h.getDataTypeSize(o)*s,u=t.pixels.resultMask;if(a===Uint8Array)i=new Uint8Array(e,r,f);else{var c=new ArrayBuffer(f);new Uint8Array(c).set(new Uint8Array(e,r,f)),i=new a(c)}if(i.length===l*s)t.pixels.resultPixels=i;else{t.pixels.resultPixels=new a(l*s);var d=0,m=0,g=0,p=0;if(s>1)for(g=0;g<s;g++)for(p=g*l,m=0;m<l;m++)u[m]&&(t.pixels.resultPixels[p+m]=i[d++]);else for(m=0;m<l;m++)u[m]&&(t.pixels.resultPixels[m]=i[d++])}return r+=f,t.ptr=r,!0},readHuffmanTree:function(e,t){var a=this.HUFFMAN_LUT_BITS_MAX,i=new DataView(e,t.ptr,16);if(t.ptr+=16,i.getInt32(0,!0)<2)throw"unsupported Huffman version";var r=i.getInt32(4,!0),n=i.getInt32(8,!0),s=i.getInt32(12,!0);if(n>=s)return!1;var l=new Uint32Array(s-n);h.decodeBits(e,t,l);var o,f,u,c,d=[];for(o=n;o<s;o++)d[f=o-(o<r?0:r)]={first:l[o-n],second:null};var g=e.byteLength-t.ptr,p=Math.ceil(g/4),x=new ArrayBuffer(4*p);new Uint8Array(x).set(new Uint8Array(e,t.ptr,g));var w,k=new Uint32Array(x),y=0,I=0;for(w=k[0],o=n;o<s;o++)(c=d[f=o-(o<r?0:r)].first)>0&&(d[f].second=w<<y>>>32-c,32-y>=c?32===(y+=c)&&(y=0,w=k[++I]):(y+=c-32,w=k[++I],d[f].second|=w>>>32-y));var b=0,v=0,U=new m;for(o=0;o<d.length;o++)void 0!==d[o]&&(b=Math.max(b,d[o].first));v=b>=a?a:b,b>=30&&console.log("WARning, large NUM LUT BITS IS "+b);var T,M,V,A,B,D=[];for(o=n;o<s;o++)if((c=d[f=o-(o<r?0:r)].first)>0)if(T=[c,f],c<=v)for(M=d[f].second<<v-c,V=1<<v-c,u=0;u<V;u++)D[M|u]=T;else for(M=d[f].second,B=U,A=c-1;A>=0;A--)M>>>A&1?(B.right||(B.right=new m),B=B.right):(B.left||(B.left=new m),B=B.left),0!==A||B.val||(B.val=T[1]);return{decodeLut:D,numBitsLUTQick:v,numBitsLUT:b,tree:U,stuffedData:k,srcPtr:I,bitPos:y}},readHuffman:function(e,t,a){var i,r,n,s,l,o,f,u,c,d=t.headerInfo,h=d.numDims,m=t.headerInfo.height,g=t.headerInfo.width,p=g*m,x=this.readHuffmanTree(e,t),w=x.decodeLut,k=x.tree,y=x.stuffedData,I=x.srcPtr,b=x.bitPos,v=x.numBitsLUTQick,U=x.numBitsLUT,T=0===t.headerInfo.imageType?128:0,M=t.pixels.resultMask,V=0;b>0&&(I++,b=0);var A,B=y[I],D=1===t.encodeMode,S=new a(p*h),P=S;for(A=0;A<d.numDims;A++){if(h>1&&(P=new a(S.buffer,p*A,p),V=0),t.headerInfo.numValidPixel===g*m)for(u=0,o=0;o<m;o++)for(f=0;f<g;f++,u++){if(r=0,l=s=B<<b>>>32-v,32-b<v&&(l=s|=y[I+1]>>>64-b-v),w[l])r=w[l][1],b+=w[l][0];else for(l=s=B<<b>>>32-U,32-b<U&&(l=s|=y[I+1]>>>64-b-U),i=k,c=0;c<U;c++)if(!(i=s>>>U-c-1&1?i.right:i.left).left&&!i.right){r=i.val,b=b+c+1;break}b>=32&&(b-=32,B=y[++I]),n=r-T,D?(n+=f>0?V:o>0?P[u-g]:V,n&=255,P[u]=n,V=n):P[u]=n}else for(u=0,o=0;o<m;o++)for(f=0;f<g;f++,u++)if(M[u]){if(r=0,l=s=B<<b>>>32-v,32-b<v&&(l=s|=y[I+1]>>>64-b-v),w[l])r=w[l][1],b+=w[l][0];else for(l=s=B<<b>>>32-U,32-b<U&&(l=s|=y[I+1]>>>64-b-U),i=k,c=0;c<U;c++)if(!(i=s>>>U-c-1&1?i.right:i.left).left&&!i.right){r=i.val,b=b+c+1;break}b>=32&&(b-=32,B=y[++I]),n=r-T,D?(f>0&&M[u-1]?n+=V:o>0&&M[u-g]?n+=P[u-g]:n+=V,n&=255,P[u]=n,V=n):P[u]=n}t.ptr=t.ptr+4*(I+1)+(b>0?4:0)}t.pixels.resultPixels=S},decodeBits:function(e,t,a,i,r){var n=t.headerInfo,s=n.fileVersion,h=0,m=new DataView(e,t.ptr,5),g=m.getUint8(0);h++;var p=g>>6,x=0===p?4:3-p,w=(32&g)>0,k=31&g,y=0;if(1===x)y=m.getUint8(h),h++;else if(2===x)y=m.getUint16(h,!0),h+=2;else{if(4!==x)throw"Invalid valid pixel count type";y=m.getUint32(h,!0),h+=4}var I,b,v,U,T,M,V,A,B,D=2*n.maxZError,S=n.numDims>1?n.maxValues[r]:n.zMax;if(w){for(t.counter.lut++,A=m.getUint8(h),h++,U=Math.ceil((A-1)*k/8),T=Math.ceil(U/4),b=new ArrayBuffer(4*T),v=new Uint8Array(b),t.ptr+=h,v.set(new Uint8Array(e,t.ptr,U)),V=new Uint32Array(b),t.ptr+=U,B=0;A-1>>>B;)B++;U=Math.ceil(y*B/8),T=Math.ceil(U/4),b=new ArrayBuffer(4*T),(v=new Uint8Array(b)).set(new Uint8Array(e,t.ptr,U)),I=new Uint32Array(b),t.ptr+=U,M=s>=3?u(V,k,A-1,i,D,S):o(V,k,A-1,i,D,S),s>=3?f(I,a,B,y,M):l(I,a,B,y,M)}else t.counter.bitstuffer++,B=k,t.ptr+=h,B>0&&(U=Math.ceil(y*B/8),T=Math.ceil(U/4),b=new ArrayBuffer(4*T),(v=new Uint8Array(b)).set(new Uint8Array(e,t.ptr,U)),I=new Uint32Array(b),t.ptr+=U,s>=3?null==i?d(I,a,B,y):f(I,a,B,y,!1,i,D,S):null==i?c(I,a,B,y):l(I,a,B,y,!1,i,D,S))},readTiles:function(e,t,a){var i=t.headerInfo,r=i.width,n=i.height,s=i.microBlockSize,l=i.imageType,o=h.getDataTypeSize(l),f=Math.ceil(r/s),u=Math.ceil(n/s);t.pixels.numBlocksY=u,t.pixels.numBlocksX=f,t.pixels.ptr=0;var c,d,m,g,p,x,w,k,y=0,I=0,b=0,v=0,U=0,T=0,M=0,V=0,A=0,B=0,D=0,S=0,P=0,E=0,C=0,F=new a(s*s),N=n%s||s,O=r%s||s,R=i.numDims,L=t.pixels.resultMask,z=t.pixels.resultPixels;for(b=0;b<u;b++)for(U=b!==u-1?s:N,v=0;v<f;v++)for(B=b*r*s+v*s,D=r-(T=v!==f-1?s:O),k=0;k<R;k++){if(R>1&&(z=new a(t.pixels.resultPixels.buffer,r*n*k*o,r*n)),M=e.byteLength-t.ptr,d={},C=0,C++,A=(V=(c=new DataView(e,t.ptr,Math.min(10,M))).getUint8(0))>>6&255,(V>>2&15)!=(v*s>>3&15))throw"integrity issue";if((p=3&V)>3)throw t.ptr+=C,"Invalid block encoding ("+p+")";if(2!==p)if(0===p){if(t.counter.uncompressed++,t.ptr+=C,S=(S=U*T*o)<(P=e.byteLength-t.ptr)?S:P,m=new ArrayBuffer(S%o==0?S:S+o-S%o),new Uint8Array(m).set(new Uint8Array(e,t.ptr,S)),g=new a(m),E=0,L)for(y=0;y<U;y++){for(I=0;I<T;I++)L[B]&&(z[B]=g[E++]),B++;B+=D}else for(y=0;y<U;y++){for(I=0;I<T;I++)z[B++]=g[E++];B+=D}t.ptr+=E*o}else if(x=h.getDataTypeUsed(l,A),w=h.getOnePixel(d,C,x,c),C+=h.getDataTypeSize(x),3===p)if(t.ptr+=C,t.counter.constantoffset++,L)for(y=0;y<U;y++){for(I=0;I<T;I++)L[B]&&(z[B]=w),B++;B+=D}else for(y=0;y<U;y++){for(I=0;I<T;I++)z[B++]=w;B+=D}else if(t.ptr+=C,h.decodeBits(e,t,F,w,k),C=0,L)for(y=0;y<U;y++){for(I=0;I<T;I++)L[B]&&(z[B]=F[C++]),B++;B+=D}else for(y=0;y<U;y++){for(I=0;I<T;I++)z[B++]=F[C++];B+=D}else t.counter.constant++,t.ptr+=C}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:h.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t=e.headerInfo.zMax,a=e.headerInfo.numDims,i=e.headerInfo.height*e.headerInfo.width,r=i*a,n=0,s=0,l=0,o=e.pixels.resultMask;if(o)if(a>1)for(n=0;n<a;n++)for(l=n*i,s=0;s<i;s++)o[s]&&(e.pixels.resultPixels[l+s]=t);else for(s=0;s<i;s++)o[s]&&(e.pixels.resultPixels[s]=t);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(t);else for(s=0;s<r;s++)e.pixels.resultPixels[s]=t},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;default:t=Float32Array;break;case 7:t=Float64Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;default:t="F32";break;case 7:t="F64"}return t},isValidPixelValue:function(e,t){if(null==t)return!1;var a;switch(e){case 0:a=t>=-128&&t<=127;break;case 1:a=t>=0&&t<=255;break;case 2:a=t>=-32768&&t<=32767;break;case 3:a=t>=0&&t<=65536;break;case 4:a=t>=-2147483648&&t<=2147483647;break;case 5:a=t>=0&&t<=4294967296;break;case 6:a=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:a=t>=5e-324&&t<=17976931348623157e292;break;default:a=!1}return a},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var a=e;switch(e){case 2:case 4:a=e-t;break;case 3:case 5:a=e-2*t;break;case 6:a=0===t?e:1===t?2:1;break;case 7:a=0===t?e:e-2*t+1;break;default:a=e}return a},getOnePixel:function(e,t,a,i){var r=0;switch(a){case 0:r=i.getInt8(t);break;case 1:r=i.getUint8(t);break;case 2:r=i.getInt16(t,!0);break;case 3:r=i.getUint16(t,!0);break;case 4:r=i.getInt32(t,!0);break;case 5:r=i.getUInt32(t,!0);break;case 6:r=i.getFloat32(t,!0);break;case 7:r=i.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return r}},m=function(e,t,a){this.val=e,this.left=t,this.right=a},{decode:function(e,t){var a=(t=t||{}).noDataValue,i=0,r={};r.ptr=t.inputOffset||0,r.pixels={},h.readHeaderInfo(e,r);var n=r.headerInfo,s=n.fileVersion,l=h.getDataTypeArray(n.imageType);h.readMask(e,r),n.numValidPixel===n.width*n.height||r.pixels.resultMask||(r.pixels.resultMask=t.maskData);var o,f=n.width*n.height;if(r.pixels.resultPixels=new l(f*n.numDims),r.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==n.numValidPixel)if(n.zMax===n.zMin)h.constructConstantSurface(r);else if(s>=4&&h.checkMinMaxRanges(e,r))h.constructConstantSurface(r);else{var u=new DataView(e,r.ptr,2),c=u.getUint8(0);if(r.ptr++,c)h.readDataOneSweep(e,r,l);else if(s>1&&n.imageType<=1&&Math.abs(n.maxZError-.5)<1e-5){var d=u.getUint8(1);if(r.ptr++,r.encodeMode=d,d>2||s<4&&d>1)throw"Invalid Huffman flag "+d;d?h.readHuffman(e,r,l):h.readTiles(e,r,l)}else h.readTiles(e,r,l)}r.eofOffset=r.ptr,t.inputOffset?(o=r.headerInfo.blobSize+t.inputOffset-r.ptr,Math.abs(o)>=1&&(r.eofOffset=t.inputOffset+r.headerInfo.blobSize)):(o=r.headerInfo.blobSize-r.ptr,Math.abs(o)>=1&&(r.eofOffset=r.headerInfo.blobSize));var m={width:n.width,height:n.height,pixelData:r.pixels.resultPixels,minValue:n.zMin,maxValue:n.zMax,validPixelCount:n.numValidPixel,dimCount:n.numDims,dimStats:{minValues:n.minValues,maxValues:n.maxValues},maskData:r.pixels.resultMask};if(r.pixels.resultMask&&h.isValidPixelValue(n.imageType,a)){var g=r.pixels.resultMask;for(i=0;i<f;i++)g[i]||(m.pixelData[i]=a);m.noDataValue=a}return r.noDataValue=a,t.returnFileInfo&&(m.fileInfo=h.formatFileInfo(r)),m},getBandCount:function(e){for(var t=0,a=0,i={ptr:0,pixels:{}};a<e.byteLength-58;)h.readHeaderInfo(e,i),a+=i.headerInfo.blobSize,t++,i.ptr=a;return t}}),k=(g=new ArrayBuffer(4),p=new Uint8Array(g),new Uint32Array(g)[0]=1,1===p[0]),y={decode:function(e,t){if(!k)throw"Big endian system is not supported.";var a,i,r=(t=t||{}).inputOffset||0,n=new Uint8Array(e,r,10),s=String.fromCharCode.apply(null,n);if("CntZImage"===s.trim())a=x,i=1;else{if("Lerc2"!==s.substring(0,5))throw"Unexpected file identifier string: "+s;a=w,i=2}for(var l,o,f,u,c,d,h=0,m=e.byteLength-10,g=[],p={width:0,height:0,pixels:[],pixelType:t.pixelType,mask:null,statistics:[]};r<m;){var y=a.decode(e,{inputOffset:r,encodedMaskData:l,maskData:f,returnMask:0===h,returnEncodedMask:0===h,returnFileInfo:!0,pixelType:t.pixelType||null,noDataValue:t.noDataValue||null});r=y.fileInfo.eofOffset,0===h&&(l=y.encodedMaskData,f=y.maskData,p.width=y.width,p.height=y.height,p.dimCount=y.dimCount||1,p.pixelType=y.pixelType||y.fileInfo.pixelType,p.mask=y.maskData),i>1&&y.fileInfo.mask&&y.fileInfo.mask.numBytes>0&&g.push(y.maskData),h++,p.pixels.push(y.pixelData),p.statistics.push({minValue:y.minValue,maxValue:y.maxValue,noDataValue:y.noDataValue,dimStats:y.dimStats})}if(i>1&&g.length>1){for(d=p.width*p.height,p.bandMasks=g,(f=new Uint8Array(d)).set(g[0]),u=1;u<g.length;u++)for(o=g[u],c=0;c<d;c++)f[c]=f[c]&o[c];p.maskData=f}return p}};e.exports?e.exports=y:this.Lerc=y}()}));return f((function(t,a){if(t.encoding===p.LERC){var i;try{i=b.decode(t.heightmap)}catch(e){throw new r.RuntimeError(e)}if(i.statistics[0].minValue===Number.MAX_VALUE)throw new r.RuntimeError("Invalid tile data");t.heightmap=i.pixels[0],t.width=i.width,t.height=i.height}t.ellipsoid=e.Ellipsoid.clone(t.ellipsoid),t.rectangle=e.Rectangle.clone(t.rectangle);var n=x.computeVertices(t),s=n.vertices;return a.push(s.buffer),{vertices:s.buffer,numberOfAttributes:n.encoding.stride,minimumHeight:n.minimumHeight,maximumHeight:n.maximumHeight,gridWidth:t.width,gridHeight:t.height,boundingSphere3D:n.boundingSphere3D,orientedBoundingBox:n.orientedBoundingBox,occludeePointInScaledSpace:n.occludeePointInScaledSpace,encoding:n.encoding,westIndicesSouthToNorth:n.westIndicesSouthToNorth,southIndicesEastToWest:n.southIndicesEastToWest,eastIndicesNorthToSouth:n.eastIndicesNorthToSouth,northIndicesWestToEast:n.northIndicesWestToEast}}))})); |
@@ -1,1 +0,1 @@ | ||
define(["./AxisAlignedBoundingBox-445c3009","./Cartesian2-40b13f31","./when-7b580518","./TerrainEncoding-75f35f91","./IndexDatatype-b42089ce","./Math-87254c13","./Transforms-70f396e0","./Check-3917d765","./WebMercatorProjection-bdaffcea","./createTaskProcessorWorker","./AttributeCompression-56959beb","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./combine-83aa7971","./RuntimeError-fad4d3c6"],function(te,re,ne,ie,oe,ae,se,e,de,t,r,n,i,o,a){"use strict";function ce(){e.DeveloperError.throwInstantiationError()}Object.defineProperties(ce.prototype,{errorEvent:{get:e.DeveloperError.throwInstantiationError},credit:{get:e.DeveloperError.throwInstantiationError},tilingScheme:{get:e.DeveloperError.throwInstantiationError},ready:{get:e.DeveloperError.throwInstantiationError},readyPromise:{get:e.DeveloperError.throwInstantiationError},hasWaterMask:{get:e.DeveloperError.throwInstantiationError},hasVertexNormals:{get:e.DeveloperError.throwInstantiationError},availability:{get:e.DeveloperError.throwInstantiationError}});var s=[];ce.getRegularGridIndices=function(e,t){var r=s[e];ne.defined(r)||(s[e]=r=[]);var n=r[t];return ne.defined(n)||g(e,t,n=e*t<ae.CesiumMath.SIXTY_FOUR_KILOBYTES?r[t]=new Uint16Array((e-1)*(t-1)*6):r[t]=new Uint32Array((e-1)*(t-1)*6),0),n};var d=[];ce.getRegularGridIndicesAndEdgeIndices=function(e,t){var r=d[e];ne.defined(r)||(d[e]=r=[]);var n,i,o,a,s=r[t];return ne.defined(s)||(n=ce.getRegularGridIndices(e,t),i=(a=l(e,t)).westIndicesSouthToNorth,o=a.southIndicesEastToWest,e=a.eastIndicesNorthToSouth,a=a.northIndicesWestToEast,s=r[t]={indices:n,westIndicesSouthToNorth:i,southIndicesEastToWest:o,eastIndicesNorthToSouth:e,northIndicesWestToEast:a}),s};var I=[];function l(e,t){for(var r=new Array(t),n=new Array(e),i=new Array(t),o=new Array(e),a=0;a<e;++a)n[o[a]=a]=e*t-1-a;for(a=0;a<t;++a)i[a]=(a+1)*e-1,r[a]=(t-a-1)*e;return{westIndicesSouthToNorth:r,southIndicesEastToWest:n,eastIndicesNorthToSouth:i,northIndicesWestToEast:o}}function g(e,t,r,n){for(var i=0,o=0;o<t-1;++o){for(var a=0;a<e-1;++a){var s=i,d=s+e,c=d+1,h=s+1;r[n++]=s,r[n++]=d,r[n++]=h,r[n++]=h,r[n++]=d,r[n++]=c,++i}++i}}function c(e,t,r,n){for(var i=e[0],o=e.length,a=1;a<o;++a){var s=e[a];r[n++]=i,r[n++]=s,r[n++]=t,r[n++]=t,r[n++]=s,r[n++]=t+1,i=s,++t}return n}ce.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){var r=I[e];ne.defined(r)||(I[e]=r=[]);var n,i,o,a,s,d,c,h,u=r[t];return ne.defined(u)||(o=(n=e*t)+(d=2*e+2*t),h=(i=(e-1)*(t-1)*6)+6*Math.max(0,d-4),a=(c=l(e,t)).westIndicesSouthToNorth,s=c.southIndicesEastToWest,d=c.eastIndicesNorthToSouth,c=c.northIndicesWestToEast,g(e,t,h=oe.IndexDatatype.createTypedArray(o,h),0),ce.addSkirtIndices(a,s,d,c,n,h,i),u=r[t]={indices:h,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:d,northIndicesWestToEast:c,indexCountWithoutSkirts:i}),u},ce.addSkirtIndices=function(e,t,r,n,i,o,a){a=c(e,i,o,a),a=c(t,i+=e.length,o,a),a=c(r,i+=t.length,o,a),c(n,i+=r.length,o,a)},ce.heightmapTerrainQuality=.25,ce.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*ce.heightmapTerrainQuality/(t*r)},ce.prototype.requestTileGeometry=e.DeveloperError.throwInstantiationError,ce.prototype.getLevelMaximumGeometricError=e.DeveloperError.throwInstantiationError,ce.prototype.getTileDataAvailable=e.DeveloperError.throwInstantiationError,ce.prototype.loadTileDataAvailability=e.DeveloperError.throwInstantiationError;var he=32767,ue=new re.Cartesian3,Ie=new re.Cartesian3,le=new re.Cartesian3,ge=new re.Cartographic,me=new re.Cartesian2;function Te(e,t,r,n,i,o,a,s,d){var c=Number.POSITIVE_INFINITY,h=i.north,u=i.south,I=i.east,l=i.west;I<l&&(I+=ae.CesiumMath.TWO_PI);for(var g=e.length,m=0;m<g;++m){var T=e[m],E=r[T],T=n[T];ge.longitude=ae.CesiumMath.lerp(l,I,T.x),ge.latitude=ae.CesiumMath.lerp(u,h,T.y),ge.height=E-t;E=o.cartographicToCartesian(ge,ue);se.Matrix4.multiplyByPoint(a,E,E),re.Cartesian3.minimumByComponent(E,s,s),re.Cartesian3.maximumByComponent(E,d,d),c=Math.min(c,ge.height)}return c}function Ee(e,t,r,n,i,o,a,s,d,c,h,u,I,l){var g=ne.defined(a),m=d.north,T=d.south,E=d.east,p=d.west;E<p&&(E+=ae.CesiumMath.TWO_PI);for(var f=r.length,y=0;y<f;++y){var v=r[y],N=i[v],w=o[v];ge.longitude=ae.CesiumMath.lerp(p,E,w.x)+I,ge.latitude=ae.CesiumMath.lerp(T,m,w.y)+l,ge.height=N-c;var S,b,N=s.cartographicToCartesian(ge,ue);g&&(me.x=a[v=2*v],me.y=a[1+v]),n.hasWebMercatorT&&(S=(de.WebMercatorProjection.geodeticLatitudeToMercatorAngle(ge.latitude)-h)*u),n.hasGeodeticSurfaceNormals&&(b=s.geodeticSurfaceNormal(N)),t=n.encode(e,t,N,w,ge.height,me,S,b)}}function pe(e,t){var r;return"function"==typeof e.slice&&"function"!=typeof(r=e.slice()).sort&&(r=void 0),(r=!ne.defined(r)?Array.prototype.slice.call(e):r).sort(t),r}return t(function(e,t){var r,n,i=(Z=e.quantizedVertices).length/3,o=e.octEncodedNormals,a=e.westIndices.length+e.eastIndices.length+e.southIndices.length+e.northIndices.length,s=e.includeWebMercatorT,d=e.exaggeration,c=e.exaggerationRelativeHeight,h=1!==d,u=re.Rectangle.clone(e.rectangle),I=u.west,l=u.south,g=u.east,m=u.north,T=re.Ellipsoid.clone(e.ellipsoid),E=e.minimumHeight,p=e.maximumHeight,f=e.relativeToCenter,y=se.Transforms.eastNorthUpToFixedFrame(f,T),v=se.Matrix4.inverseTransformation(y,new se.Matrix4);s&&(r=de.WebMercatorProjection.geodeticLatitudeToMercatorAngle(l),n=1/(de.WebMercatorProjection.geodeticLatitudeToMercatorAngle(m)-r));var N=Z.subarray(0,i),w=Z.subarray(i,2*i),S=Z.subarray(2*i,3*i),b=ne.defined(o),M=new Array(i),x=new Array(i),C=new Array(i),A=s?new Array(i):[],W=h?new Array(i):[],P=Ie;P.x=Number.POSITIVE_INFINITY,P.y=Number.POSITIVE_INFINITY,P.z=Number.POSITIVE_INFINITY;var D=le;D.x=Number.NEGATIVE_INFINITY,D.y=Number.NEGATIVE_INFINITY,D.z=Number.NEGATIVE_INFINITY;for(var k=Number.POSITIVE_INFINITY,F=Number.NEGATIVE_INFINITY,H=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY,G=0;G<i;++G){var V=N[G],Y=w[G],O=V/he,B=Y/he,V=ae.CesiumMath.lerp(E,p,S[G]/he);ge.longitude=ae.CesiumMath.lerp(I,g,O),ge.latitude=ae.CesiumMath.lerp(l,m,B),ge.height=V;k=Math.min(ge.longitude,k),F=Math.max(ge.longitude,F),H=Math.min(ge.latitude,H),_=Math.max(ge.latitude,_),Y=T.cartographicToCartesian(ge);M[G]=new re.Cartesian2(O,B),x[G]=V,C[G]=Y,s&&(A[G]=(de.WebMercatorProjection.geodeticLatitudeToMercatorAngle(ge.latitude)-r)*n),h&&(W[G]=T.geodeticSurfaceNormal(Y)),se.Matrix4.multiplyByPoint(v,Y,ue),re.Cartesian3.minimumByComponent(ue,P,P),re.Cartesian3.maximumByComponent(ue,D,D)}var R,L=pe(e.westIndices,function(e,t){return M[e].y-M[t].y}),j=pe(e.eastIndices,function(e,t){return M[t].y-M[e].y}),U=pe(e.southIndices,function(e,t){return M[t].x-M[e].x}),z=pe(e.northIndices,function(e,t){return M[e].x-M[t].x});E<0&&(R=new ie.EllipsoidalOccluder(T).computeHorizonCullingPointPossiblyUnderEllipsoid(f,C,E));var q=Math.min(E,Te(e.westIndices,e.westSkirtHeight,x,M,u,T,v,P,D));q=Math.min(q,Te(e.southIndices,e.southSkirtHeight,x,M,u,T,v,P,D)),q=Math.min(q,Te(e.eastIndices,e.eastSkirtHeight,x,M,u,T,v,P,D)),q=Math.min(q,Te(e.northIndices,e.northSkirtHeight,x,M,u,T,v,P,D));for(var Q,K=new te.AxisAlignedBoundingBox(P,D,f),X=new ie.TerrainEncoding(f,K,q,p,y,b,s,h,d,c),Z=X.stride,J=new Float32Array(i*Z+a*Z),$=0,ee=0;ee<i;++ee)b&&(me.x=o[Q=2*ee],me.y=o[1+Q]),$=X.encode(J,$,C[ee],M[ee],x[ee],me,A[ee],W[ee]);return K=Math.max(0,2*(a-4)),q=e.indices.length+3*K,(y=oe.IndexDatatype.createTypedArray(i+a,q)).set(e.indices,0),K=d=1e-4*(F-k),q=-(a=c=1e-4*(_-H)),Ee(J,c=i*Z,L,X,x,M,o,T,u,e.westSkirtHeight,r,n,-d,0),Ee(J,c+=e.westIndices.length*Z,U,X,x,M,o,T,u,e.southSkirtHeight,r,n,0,q),Ee(J,c+=e.southIndices.length*Z,j,X,x,M,o,T,u,e.eastSkirtHeight,r,n,K,0),Ee(J,c+=e.eastIndices.length*Z,z,X,x,M,o,T,u,e.northSkirtHeight,r,n,0,a),ce.addSkirtIndices(L,U,j,z,i,y,e.indices.length),t.push(J.buffer,y.buffer),{vertices:J.buffer,indices:y.buffer,westIndicesSouthToNorth:L,southIndicesEastToWest:U,eastIndicesNorthToSouth:j,northIndicesWestToEast:z,vertexStride:Z,center:f,minimumHeight:E,maximumHeight:p,occludeePointInScaledSpace:R,encoding:X,indexCountWithoutSkirts:e.indices.length}})}); | ||
define(["./AxisAlignedBoundingBox-1feb0c48","./Matrix2-f2da41d4","./when-229515d6","./TerrainEncoding-6355a4fe","./IndexDatatype-b10faa0b","./ComponentDatatype-17b06483","./RuntimeError-ffe03243","./Transforms-7cd3197b","./WebMercatorProjection-d69cec15","./createTaskProcessorWorker","./AttributeCompression-0af3c035","./WebGLConstants-4e26b85a","./combine-8ce3f24b"],(function(e,t,r,i,n,o,a,s,d,c,h,u,I){"use strict";function l(){a.DeveloperError.throwInstantiationError()}Object.defineProperties(l.prototype,{errorEvent:{get:a.DeveloperError.throwInstantiationError},credit:{get:a.DeveloperError.throwInstantiationError},tilingScheme:{get:a.DeveloperError.throwInstantiationError},ready:{get:a.DeveloperError.throwInstantiationError},readyPromise:{get:a.DeveloperError.throwInstantiationError},hasWaterMask:{get:a.DeveloperError.throwInstantiationError},hasVertexNormals:{get:a.DeveloperError.throwInstantiationError},availability:{get:a.DeveloperError.throwInstantiationError}});var g=[];l.getRegularGridIndices=function(e,t){var i=g[e];r.defined(i)||(g[e]=i=[]);var n=i[t];return r.defined(n)||E(e,t,n=e*t<o.CesiumMath.SIXTY_FOUR_KILOBYTES?i[t]=new Uint16Array((e-1)*(t-1)*6):i[t]=new Uint32Array((e-1)*(t-1)*6),0),n};var m=[];l.getRegularGridIndicesAndEdgeIndices=function(e,t){var i=m[e];r.defined(i)||(m[e]=i=[]);var n=i[t];if(!r.defined(n)){var o=l.getRegularGridIndices(e,t),a=f(e,t),s=a.westIndicesSouthToNorth,d=a.southIndicesEastToWest,c=a.eastIndicesNorthToSouth,h=a.northIndicesWestToEast;n=i[t]={indices:o,westIndicesSouthToNorth:s,southIndicesEastToWest:d,eastIndicesNorthToSouth:c,northIndicesWestToEast:h}}return n};var T=[];function f(e,t){var r,i=new Array(t),n=new Array(e),o=new Array(t),a=new Array(e);for(r=0;r<e;++r)a[r]=r,n[r]=e*t-1-r;for(r=0;r<t;++r)o[r]=(r+1)*e-1,i[r]=(t-r-1)*e;return{westIndicesSouthToNorth:i,southIndicesEastToWest:n,eastIndicesNorthToSouth:o,northIndicesWestToEast:a}}function E(e,t,r,i){for(var n=0,o=0;o<t-1;++o){for(var a=0;a<e-1;++a){var s=n,d=s+e,c=d+1,h=s+1;r[i++]=s,r[i++]=d,r[i++]=h,r[i++]=h,r[i++]=d,r[i++]=c,++n}++n}}function v(e,t,r,i){for(var n=e[0],o=e.length,a=1;a<o;++a){var s=e[a];r[i++]=n,r[i++]=s,r[i++]=t,r[i++]=t,r[i++]=s,r[i++]=t+1,n=s,++t}return i}l.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){var i=T[e];r.defined(i)||(T[e]=i=[]);var o=i[t];if(!r.defined(o)){var a=e*t,s=(e-1)*(t-1)*6,d=2*e+2*t,c=a+d,h=s+6*Math.max(0,d-4),u=f(e,t),I=u.westIndicesSouthToNorth,g=u.southIndicesEastToWest,m=u.eastIndicesNorthToSouth,v=u.northIndicesWestToEast,p=n.IndexDatatype.createTypedArray(c,h);E(e,t,p,0),l.addSkirtIndices(I,g,m,v,a,p,s),o=i[t]={indices:p,westIndicesSouthToNorth:I,southIndicesEastToWest:g,eastIndicesNorthToSouth:m,northIndicesWestToEast:v,indexCountWithoutSkirts:s}}return o},l.addSkirtIndices=function(e,t,r,i,n,o,a){var s=n;a=v(e,s,o,a),a=v(t,s+=e.length,o,a),a=v(r,s+=t.length,o,a),v(i,s+=r.length,o,a)},l.heightmapTerrainQuality=.25,l.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*l.heightmapTerrainQuality/(t*r)},l.prototype.requestTileGeometry=a.DeveloperError.throwInstantiationError,l.prototype.getLevelMaximumGeometricError=a.DeveloperError.throwInstantiationError,l.prototype.getTileDataAvailable=a.DeveloperError.throwInstantiationError,l.prototype.loadTileDataAvailability=a.DeveloperError.throwInstantiationError;var p=32767,y=new t.Cartesian3,N=new t.Cartesian3,w=new t.Cartesian3,S=new t.Cartographic,b=new t.Cartesian2;function M(e,r,i,n,a,s,d,c,h){var u=Number.POSITIVE_INFINITY,I=a.north,l=a.south,g=a.east,m=a.west;g<m&&(g+=o.CesiumMath.TWO_PI);for(var T=e.length,f=0;f<T;++f){var E=e[f],v=i[E],p=n[E];S.longitude=o.CesiumMath.lerp(m,g,p.x),S.latitude=o.CesiumMath.lerp(l,I,p.y),S.height=v-r;var N=s.cartographicToCartesian(S,y);t.Matrix4.multiplyByPoint(d,N,N),t.Cartesian3.minimumByComponent(N,c,c),t.Cartesian3.maximumByComponent(N,h,h),u=Math.min(u,S.height)}return u}function x(e,t,i,n,a,s,c,h,u,I,l,g,m,T){var f=r.defined(c),E=u.north,v=u.south,p=u.east,N=u.west;p<N&&(p+=o.CesiumMath.TWO_PI);for(var w=i.length,M=0;M<w;++M){var x=i[M],A=a[x],C=s[x];S.longitude=o.CesiumMath.lerp(N,p,C.x)+m,S.latitude=o.CesiumMath.lerp(v,E,C.y)+T,S.height=A-I;var W,P,D=h.cartographicToCartesian(S,y);if(f){var k=2*x;b.x=c[k],b.y=c[k+1]}n.hasWebMercatorT&&(W=(d.WebMercatorProjection.geodeticLatitudeToMercatorAngle(S.latitude)-l)*g),n.hasGeodeticSurfaceNormals&&(P=h.geodeticSurfaceNormal(D)),t=n.encode(e,t,D,C,S.height,b,W,P)}}function A(e,t){var i;return"function"==typeof e.slice&&"function"!=typeof(i=e.slice()).sort&&(i=void 0),r.defined(i)||(i=Array.prototype.slice.call(e)),i.sort(t),i}return c((function(a,c){var h,u,I=a.quantizedVertices,g=I.length/3,m=a.octEncodedNormals,T=a.westIndices.length+a.eastIndices.length+a.southIndices.length+a.northIndices.length,f=a.includeWebMercatorT,E=a.exaggeration,v=a.exaggerationRelativeHeight,C=1!==E,W=t.Rectangle.clone(a.rectangle),P=W.west,D=W.south,k=W.east,F=W.north,H=t.Ellipsoid.clone(a.ellipsoid),_=a.minimumHeight,G=a.maximumHeight,V=a.relativeToCenter,Y=s.Transforms.eastNorthUpToFixedFrame(V,H),O=t.Matrix4.inverseTransformation(Y,new t.Matrix4);f&&(h=d.WebMercatorProjection.geodeticLatitudeToMercatorAngle(D),u=1/(d.WebMercatorProjection.geodeticLatitudeToMercatorAngle(F)-h));var B=I.subarray(0,g),R=I.subarray(g,2*g),L=I.subarray(2*g,3*g),j=r.defined(m),U=new Array(g),z=new Array(g),q=new Array(g),Q=f?new Array(g):[],K=C?new Array(g):[],X=N;X.x=Number.POSITIVE_INFINITY,X.y=Number.POSITIVE_INFINITY,X.z=Number.POSITIVE_INFINITY;var Z=w;Z.x=Number.NEGATIVE_INFINITY,Z.y=Number.NEGATIVE_INFINITY,Z.z=Number.NEGATIVE_INFINITY;for(var J=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY,ee=Number.POSITIVE_INFINITY,te=Number.NEGATIVE_INFINITY,re=0;re<g;++re){var ie=B[re],ne=R[re],oe=ie/p,ae=ne/p,se=o.CesiumMath.lerp(_,G,L[re]/p);S.longitude=o.CesiumMath.lerp(P,k,oe),S.latitude=o.CesiumMath.lerp(D,F,ae),S.height=se,J=Math.min(S.longitude,J),$=Math.max(S.longitude,$),ee=Math.min(S.latitude,ee),te=Math.max(S.latitude,te);var de=H.cartographicToCartesian(S);U[re]=new t.Cartesian2(oe,ae),z[re]=se,q[re]=de,f&&(Q[re]=(d.WebMercatorProjection.geodeticLatitudeToMercatorAngle(S.latitude)-h)*u),C&&(K[re]=H.geodeticSurfaceNormal(de)),t.Matrix4.multiplyByPoint(O,de,y),t.Cartesian3.minimumByComponent(y,X,X),t.Cartesian3.maximumByComponent(y,Z,Z)}var ce,he=A(a.westIndices,(function(e,t){return U[e].y-U[t].y})),ue=A(a.eastIndices,(function(e,t){return U[t].y-U[e].y})),Ie=A(a.southIndices,(function(e,t){return U[t].x-U[e].x})),le=A(a.northIndices,(function(e,t){return U[e].x-U[t].x}));_<0&&(ce=new i.EllipsoidalOccluder(H).computeHorizonCullingPointPossiblyUnderEllipsoid(V,q,_));var ge=_;ge=Math.min(ge,M(a.westIndices,a.westSkirtHeight,z,U,W,H,O,X,Z)),ge=Math.min(ge,M(a.southIndices,a.southSkirtHeight,z,U,W,H,O,X,Z)),ge=Math.min(ge,M(a.eastIndices,a.eastSkirtHeight,z,U,W,H,O,X,Z)),ge=Math.min(ge,M(a.northIndices,a.northSkirtHeight,z,U,W,H,O,X,Z));for(var me=new e.AxisAlignedBoundingBox(X,Z,V),Te=new i.TerrainEncoding(V,me,ge,G,Y,j,f,C,E,v),fe=Te.stride,Ee=new Float32Array(g*fe+T*fe),ve=0,pe=0;pe<g;++pe){if(j){var ye=2*pe;b.x=m[ye],b.y=m[ye+1]}ve=Te.encode(Ee,ve,q[pe],U[pe],z[pe],b,Q[pe],K[pe])}var Ne=Math.max(0,2*(T-4)),we=a.indices.length+3*Ne,Se=n.IndexDatatype.createTypedArray(g+T,we);Se.set(a.indices,0);var be=1e-4,Me=($-J)*be,xe=(te-ee)*be,Ae=-Me,Ce=Me,We=xe,Pe=-xe,De=g*fe;return x(Ee,De,he,Te,z,U,m,H,W,a.westSkirtHeight,h,u,Ae,0),x(Ee,De+=a.westIndices.length*fe,Ie,Te,z,U,m,H,W,a.southSkirtHeight,h,u,0,Pe),x(Ee,De+=a.southIndices.length*fe,ue,Te,z,U,m,H,W,a.eastSkirtHeight,h,u,Ce,0),x(Ee,De+=a.eastIndices.length*fe,le,Te,z,U,m,H,W,a.northSkirtHeight,h,u,0,We),l.addSkirtIndices(he,Ie,ue,le,g,Se,a.indices.length),c.push(Ee.buffer,Se.buffer),{vertices:Ee.buffer,indices:Se.buffer,westIndicesSouthToNorth:he,southIndicesEastToWest:Ie,eastIndicesNorthToSouth:ue,northIndicesWestToEast:le,vertexStride:fe,center:V,minimumHeight:_,maximumHeight:G,occludeePointInScaledSpace:ce,encoding:Te,indexCountWithoutSkirts:a.indices.length}}))})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Cartesian2-40b13f31","./Transforms-70f396e0","./ComponentDatatype-6c2e43c1","./Check-3917d765","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce","./Math-87254c13","./VertexFormat-8d463a4f","./WallGeometryLibrary-a503e1f0","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./arrayRemoveDuplicates-47b233f1","./PolylinePipeline-ff2b6881","./EllipsoidGeodesic-bdbae7c8","./EllipsoidRhumbLine-6baec512","./IntersectionTests-587a744a","./Plane-9d4e3328"],function(S,I,N,M,e,W,B,U,q,p,J,t,a,i,n,r,o,s,m,l){"use strict";var Y=new I.Cartesian3,Z=new I.Cartesian3,j=new I.Cartesian3,K=new I.Cartesian3,Q=new I.Cartesian3,X=new I.Cartesian3,$=new I.Cartesian3;function d(e){var t=(e=S.defaultValue(e,S.defaultValue.EMPTY_OBJECT)).positions,a=e.maximumHeights,i=e.minimumHeights,n=S.defaultValue(e.vertexFormat,p.VertexFormat.DEFAULT),r=S.defaultValue(e.granularity,q.CesiumMath.RADIANS_PER_DEGREE),e=S.defaultValue(e.ellipsoid,I.Ellipsoid.WGS84);this._positions=t,this._minimumHeights=i,this._maximumHeights=a,this._vertexFormat=p.VertexFormat.clone(n),this._granularity=r,this._ellipsoid=I.Ellipsoid.clone(e),this._workerName="createWallGeometry";t=1+t.length*I.Cartesian3.packedLength+2;S.defined(i)&&(t+=i.length),S.defined(a)&&(t+=a.length),this.packedLength=t+I.Ellipsoid.packedLength+p.VertexFormat.packedLength+1}d.pack=function(e,t,a){var i;a=S.defaultValue(a,0);var n=e._positions,r=n.length;for(t[a++]=r,i=0;i<r;++i,a+=I.Cartesian3.packedLength)I.Cartesian3.pack(n[i],t,a);var o=e._minimumHeights,r=S.defined(o)?o.length:0;if(t[a++]=r,S.defined(o))for(i=0;i<r;++i)t[a++]=o[i];var s=e._maximumHeights;if(r=S.defined(s)?s.length:0,t[a++]=r,S.defined(s))for(i=0;i<r;++i)t[a++]=s[i];return I.Ellipsoid.pack(e._ellipsoid,t,a),a+=I.Ellipsoid.packedLength,p.VertexFormat.pack(e._vertexFormat,t,a),t[a+=p.VertexFormat.packedLength]=e._granularity,t};var c=I.Ellipsoid.clone(I.Ellipsoid.UNIT_SPHERE),y=new p.VertexFormat,f={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:c,vertexFormat:y,granularity:void 0};return d.unpack=function(e,t,a){t=S.defaultValue(t,0);for(var i,n,r=e[t++],o=new Array(r),s=0;s<r;++s,t+=I.Cartesian3.packedLength)o[s]=I.Cartesian3.unpack(e,t);if(0<(r=e[t++]))for(i=new Array(r),s=0;s<r;++s)i[s]=e[t++];if(0<(r=e[t++]))for(n=new Array(r),s=0;s<r;++s)n[s]=e[t++];var m=I.Ellipsoid.unpack(e,t,c);t+=I.Ellipsoid.packedLength;var l=p.VertexFormat.unpack(e,t,y),u=e[t+=p.VertexFormat.packedLength];return S.defined(a)?(a._positions=o,a._minimumHeights=i,a._maximumHeights=n,a._ellipsoid=I.Ellipsoid.clone(m,a._ellipsoid),a._vertexFormat=p.VertexFormat.clone(l,a._vertexFormat),a._granularity=u,a):(f.positions=o,f.minimumHeights=i,f.maximumHeights=n,f.granularity=u,new d(f))},d.fromConstantHeights=function(e){var t=(e=S.defaultValue(e,S.defaultValue.EMPTY_OBJECT)).positions,a=e.minimumHeight,i=e.maximumHeight,n=S.defined(a),r=S.defined(i);if(n||r)for(var o=t.length,s=n?new Array(o):void 0,m=r?new Array(o):void 0,l=0;l<o;++l)n&&(s[l]=a),r&&(m[l]=i);return new d({positions:t,maximumHeights:m,minimumHeights:s,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat})},d.createGeometry=function(e){var t=e._positions,a=e._minimumHeights,i=e._maximumHeights,n=e._vertexFormat,r=e._granularity,o=e._ellipsoid,i=J.WallGeometryLibrary.computePositions(o,t,i,a,r,!0);if(S.defined(i)){for(var s=i.bottomPositions,m=i.topPositions,a=i.numCorners,l=m.length,r=2*l,u=n.position?new Float64Array(r):void 0,p=n.normal?new Float32Array(r):void 0,d=n.tangent?new Float32Array(r):void 0,c=n.bitangent?new Float32Array(r):void 0,y=n.st?new Float32Array(r/3*2):void 0,f=0,g=0,h=0,C=0,v=0,b=$,x=X,A=Q,_=!0,E=0,w=1/((l/=3)-a-1),F=0;F<l;++F){var L,k=3*F,H=I.Cartesian3.fromArray(m,k,Y),V=I.Cartesian3.fromArray(s,k,Z);n.position&&(u[f++]=V.x,u[f++]=V.y,u[f++]=V.z,u[f++]=H.x,u[f++]=H.y,u[f++]=H.z),n.st&&(y[v++]=E,y[v++]=0,y[v++]=E,y[v++]=1),(n.normal||n.tangent||n.bitangent)&&(L=I.Cartesian3.clone(I.Cartesian3.ZERO,K),V=I.Cartesian3.subtract(H,o.geodeticSurfaceNormal(H,Z),Z),F+1<l&&(L=I.Cartesian3.fromArray(m,3+k,K)),_&&(k=I.Cartesian3.subtract(L,H,j),V=I.Cartesian3.subtract(V,H,Y),b=I.Cartesian3.normalize(I.Cartesian3.cross(V,k,b),b),_=!1),I.Cartesian3.equalsEpsilon(H,L,q.CesiumMath.EPSILON10)?_=!0:(E+=w,n.tangent&&(x=I.Cartesian3.normalize(I.Cartesian3.subtract(L,H,x),x)),n.bitangent&&(A=I.Cartesian3.normalize(I.Cartesian3.cross(b,x,A),A))),n.normal&&(p[g++]=b.x,p[g++]=b.y,p[g++]=b.z,p[g++]=b.x,p[g++]=b.y,p[g++]=b.z),n.tangent&&(d[C++]=x.x,d[C++]=x.y,d[C++]=x.z,d[C++]=x.x,d[C++]=x.y,d[C++]=x.z),n.bitangent&&(c[h++]=A.x,c[h++]=A.y,c[h++]=A.z,c[h++]=A.x,c[h++]=A.y,c[h++]=A.z))}i=new B.GeometryAttributes;n.position&&(i.position=new W.GeometryAttribute({componentDatatype:M.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u})),n.normal&&(i.normal=new W.GeometryAttribute({componentDatatype:M.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),n.tangent&&(i.tangent=new W.GeometryAttribute({componentDatatype:M.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),n.bitangent&&(i.bitangent=new W.GeometryAttribute({componentDatatype:M.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),n.st&&(i.st=new W.GeometryAttribute({componentDatatype:M.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:y}));var G=r/3,D=U.IndexDatatype.createTypedArray(G,r-=6*(a+1)),P=0;for(F=0;F<G-2;F+=2){var T=F,z=F+2,O=I.Cartesian3.fromArray(u,3*T,Y),R=I.Cartesian3.fromArray(u,3*z,Z);I.Cartesian3.equalsEpsilon(O,R,q.CesiumMath.EPSILON10)||(R=F+3,D[P++]=F+1,D[P++]=T,D[P++]=R,D[P++]=R,D[P++]=T,D[P++]=z)}return new W.Geometry({attributes:i,indices:D,primitiveType:W.PrimitiveType.TRIANGLES,boundingSphere:new N.BoundingSphere.fromVertices(u)})}},function(e,t){return(e=S.defined(t)?d.unpack(e,t):e)._ellipsoid=I.Ellipsoid.clone(e._ellipsoid),d.createGeometry(e)}}); | ||
define(["./when-229515d6","./Matrix2-f2da41d4","./Transforms-7cd3197b","./ComponentDatatype-17b06483","./RuntimeError-ffe03243","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b","./VertexFormat-565d6a6c","./WallGeometryLibrary-fb5b94e4","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./arrayRemoveDuplicates-bb548aa3","./PolylinePipeline-a3ba6f24","./EllipsoidGeodesic-43ba18de","./EllipsoidRhumbLine-afd6cd20","./IntersectionTests-1b8a3cb9","./Plane-0421a8be"],(function(e,t,a,i,r,n,o,s,m,l,u,p,d,c,y,f,g,v){"use strict";var h=new t.Cartesian3,b=new t.Cartesian3,C=new t.Cartesian3,x=new t.Cartesian3,A=new t.Cartesian3,_=new t.Cartesian3,E=new t.Cartesian3;function w(a){var r=(a=e.defaultValue(a,e.defaultValue.EMPTY_OBJECT)).positions,n=a.maximumHeights,o=a.minimumHeights,s=e.defaultValue(a.vertexFormat,m.VertexFormat.DEFAULT),l=e.defaultValue(a.granularity,i.CesiumMath.RADIANS_PER_DEGREE),u=e.defaultValue(a.ellipsoid,t.Ellipsoid.WGS84);this._positions=r,this._minimumHeights=o,this._maximumHeights=n,this._vertexFormat=m.VertexFormat.clone(s),this._granularity=l,this._ellipsoid=t.Ellipsoid.clone(u),this._workerName="createWallGeometry";var p=1+r.length*t.Cartesian3.packedLength+2;e.defined(o)&&(p+=o.length),e.defined(n)&&(p+=n.length),this.packedLength=p+t.Ellipsoid.packedLength+m.VertexFormat.packedLength+1}w.pack=function(a,i,r){var n;r=e.defaultValue(r,0);var o=a._positions,s=o.length;for(i[r++]=s,n=0;n<s;++n,r+=t.Cartesian3.packedLength)t.Cartesian3.pack(o[n],i,r);var l=a._minimumHeights;if(s=e.defined(l)?l.length:0,i[r++]=s,e.defined(l))for(n=0;n<s;++n)i[r++]=l[n];var u=a._maximumHeights;if(s=e.defined(u)?u.length:0,i[r++]=s,e.defined(u))for(n=0;n<s;++n)i[r++]=u[n];return t.Ellipsoid.pack(a._ellipsoid,i,r),r+=t.Ellipsoid.packedLength,m.VertexFormat.pack(a._vertexFormat,i,r),i[r+=m.VertexFormat.packedLength]=a._granularity,i};var F=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),L=new m.VertexFormat,k={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:F,vertexFormat:L,granularity:void 0};return w.unpack=function(a,i,r){var n;i=e.defaultValue(i,0);var o,s,l=a[i++],u=new Array(l);for(n=0;n<l;++n,i+=t.Cartesian3.packedLength)u[n]=t.Cartesian3.unpack(a,i);if((l=a[i++])>0)for(o=new Array(l),n=0;n<l;++n)o[n]=a[i++];if((l=a[i++])>0)for(s=new Array(l),n=0;n<l;++n)s[n]=a[i++];var p=t.Ellipsoid.unpack(a,i,F);i+=t.Ellipsoid.packedLength;var d=m.VertexFormat.unpack(a,i,L),c=a[i+=m.VertexFormat.packedLength];return e.defined(r)?(r._positions=u,r._minimumHeights=o,r._maximumHeights=s,r._ellipsoid=t.Ellipsoid.clone(p,r._ellipsoid),r._vertexFormat=m.VertexFormat.clone(d,r._vertexFormat),r._granularity=c,r):(k.positions=u,k.minimumHeights=o,k.maximumHeights=s,k.granularity=c,new w(k))},w.fromConstantHeights=function(t){var a,i,r=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions,n=t.minimumHeight,o=t.maximumHeight,s=e.defined(n),m=e.defined(o);if(s||m){var l=r.length;a=s?new Array(l):void 0,i=m?new Array(l):void 0;for(var u=0;u<l;++u)s&&(a[u]=n),m&&(i[u]=o)}return new w({positions:r,maximumHeights:i,minimumHeights:a,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat})},w.createGeometry=function(r){var m=r._positions,u=r._minimumHeights,p=r._maximumHeights,d=r._vertexFormat,c=r._granularity,y=r._ellipsoid,f=l.WallGeometryLibrary.computePositions(y,m,p,u,c,!0);if(e.defined(f)){var g,v=f.bottomPositions,w=f.topPositions,F=f.numCorners,L=w.length,k=2*L,H=d.position?new Float64Array(k):void 0,V=d.normal?new Float32Array(k):void 0,G=d.tangent?new Float32Array(k):void 0,D=d.bitangent?new Float32Array(k):void 0,P=d.st?new Float32Array(k/3*2):void 0,T=0,z=0,O=0,R=0,S=0,I=E,N=_,M=A,W=!0,B=0,U=1/((L/=3)-F-1);for(g=0;g<L;++g){var q=3*g,J=t.Cartesian3.fromArray(w,q,h),Y=t.Cartesian3.fromArray(v,q,b);if(d.position&&(H[T++]=Y.x,H[T++]=Y.y,H[T++]=Y.z,H[T++]=J.x,H[T++]=J.y,H[T++]=J.z),d.st&&(P[S++]=B,P[S++]=0,P[S++]=B,P[S++]=1),d.normal||d.tangent||d.bitangent){var Z=t.Cartesian3.clone(t.Cartesian3.ZERO,x),j=t.Cartesian3.subtract(J,y.geodeticSurfaceNormal(J,b),b);if(g+1<L&&(Z=t.Cartesian3.fromArray(w,q+3,x)),W){var K=t.Cartesian3.subtract(Z,J,C),Q=t.Cartesian3.subtract(j,J,h);I=t.Cartesian3.normalize(t.Cartesian3.cross(Q,K,I),I),W=!1}t.Cartesian3.equalsEpsilon(J,Z,i.CesiumMath.EPSILON10)?W=!0:(B+=U,d.tangent&&(N=t.Cartesian3.normalize(t.Cartesian3.subtract(Z,J,N),N)),d.bitangent&&(M=t.Cartesian3.normalize(t.Cartesian3.cross(I,N,M),M))),d.normal&&(V[z++]=I.x,V[z++]=I.y,V[z++]=I.z,V[z++]=I.x,V[z++]=I.y,V[z++]=I.z),d.tangent&&(G[R++]=N.x,G[R++]=N.y,G[R++]=N.z,G[R++]=N.x,G[R++]=N.y,G[R++]=N.z),d.bitangent&&(D[O++]=M.x,D[O++]=M.y,D[O++]=M.z,D[O++]=M.x,D[O++]=M.y,D[O++]=M.z)}}var X=new o.GeometryAttributes;d.position&&(X.position=new n.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H})),d.normal&&(X.normal=new n.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:V})),d.tangent&&(X.tangent=new n.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),d.bitangent&&(X.bitangent=new n.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:D})),d.st&&(X.st=new n.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:P}));var $=k/3;k-=6*(F+1);var ee=s.IndexDatatype.createTypedArray($,k),te=0;for(g=0;g<$-2;g+=2){var ae=g,ie=g+2,re=t.Cartesian3.fromArray(H,3*ae,h),ne=t.Cartesian3.fromArray(H,3*ie,b);if(!t.Cartesian3.equalsEpsilon(re,ne,i.CesiumMath.EPSILON10)){var oe=g+1,se=g+3;ee[te++]=oe,ee[te++]=ae,ee[te++]=se,ee[te++]=se,ee[te++]=ae,ee[te++]=ie}}return new n.Geometry({attributes:X,indices:ee,primitiveType:n.PrimitiveType.TRIANGLES,boundingSphere:new a.BoundingSphere.fromVertices(H)})}},function(a,i){return e.defined(i)&&(a=w.unpack(a,i)),a._ellipsoid=t.Ellipsoid.clone(a._ellipsoid),w.createGeometry(a)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Cartesian2-40b13f31","./Transforms-70f396e0","./ComponentDatatype-6c2e43c1","./Check-3917d765","./GeometryAttribute-6e7c7644","./GeometryAttributes-fbd9a3fb","./IndexDatatype-b42089ce","./Math-87254c13","./WallGeometryLibrary-a503e1f0","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./arrayRemoveDuplicates-47b233f1","./PolylinePipeline-ff2b6881","./EllipsoidGeodesic-bdbae7c8","./EllipsoidRhumbLine-6baec512","./IntersectionTests-587a744a","./Plane-9d4e3328"],function(v,b,C,H,e,A,k,w,G,L,i,t,a,n,r,o,s,l,m){"use strict";var x=new b.Cartesian3,P=new b.Cartesian3;function d(e){var i=(e=v.defaultValue(e,v.defaultValue.EMPTY_OBJECT)).positions,t=e.maximumHeights,a=e.minimumHeights,n=v.defaultValue(e.granularity,G.CesiumMath.RADIANS_PER_DEGREE),e=v.defaultValue(e.ellipsoid,b.Ellipsoid.WGS84);this._positions=i,this._minimumHeights=a,this._maximumHeights=t,this._granularity=n,this._ellipsoid=b.Ellipsoid.clone(e),this._workerName="createWallOutlineGeometry";i=1+i.length*b.Cartesian3.packedLength+2;v.defined(a)&&(i+=a.length),v.defined(t)&&(i+=t.length),this.packedLength=i+b.Ellipsoid.packedLength+1}d.pack=function(e,i,t){var a;t=v.defaultValue(t,0);var n=e._positions,r=n.length;for(i[t++]=r,a=0;a<r;++a,t+=b.Cartesian3.packedLength)b.Cartesian3.pack(n[a],i,t);var o=e._minimumHeights,r=v.defined(o)?o.length:0;if(i[t++]=r,v.defined(o))for(a=0;a<r;++a)i[t++]=o[a];var s=e._maximumHeights;if(r=v.defined(s)?s.length:0,i[t++]=r,v.defined(s))for(a=0;a<r;++a)i[t++]=s[a];return b.Ellipsoid.pack(e._ellipsoid,i,t),i[t+=b.Ellipsoid.packedLength]=e._granularity,i};var u=b.Ellipsoid.clone(b.Ellipsoid.UNIT_SPHERE),p={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:u,granularity:void 0};return d.unpack=function(e,i,t){i=v.defaultValue(i,0);for(var a,n,r=e[i++],o=new Array(r),s=0;s<r;++s,i+=b.Cartesian3.packedLength)o[s]=b.Cartesian3.unpack(e,i);if(0<(r=e[i++]))for(a=new Array(r),s=0;s<r;++s)a[s]=e[i++];if(0<(r=e[i++]))for(n=new Array(r),s=0;s<r;++s)n[s]=e[i++];var l=b.Ellipsoid.unpack(e,i,u),m=e[i+=b.Ellipsoid.packedLength];return v.defined(t)?(t._positions=o,t._minimumHeights=a,t._maximumHeights=n,t._ellipsoid=b.Ellipsoid.clone(l,t._ellipsoid),t._granularity=m,t):(p.positions=o,p.minimumHeights=a,p.maximumHeights=n,p.granularity=m,new d(p))},d.fromConstantHeights=function(e){var i=(e=v.defaultValue(e,v.defaultValue.EMPTY_OBJECT)).positions,t=e.minimumHeight,a=e.maximumHeight,n=v.defined(t),r=v.defined(a);if(n||r)for(var o=i.length,s=n?new Array(o):void 0,l=r?new Array(o):void 0,m=0;m<o;++m)n&&(s[m]=t),r&&(l[m]=a);return new d({positions:i,maximumHeights:l,minimumHeights:s,ellipsoid:e.ellipsoid})},d.createGeometry=function(e){var i=e._positions,t=e._minimumHeights,a=e._maximumHeights,n=e._granularity,e=e._ellipsoid,t=L.WallGeometryLibrary.computePositions(e,i,a,t,n,!1);if(v.defined(t)){var r=t.bottomPositions,o=t.topPositions,s=o.length,n=2*s,l=new Float64Array(n),m=0;for(s/=3,c=0;c<s;++c){var d=3*c,u=b.Cartesian3.fromArray(o,d,x),d=b.Cartesian3.fromArray(r,d,P);l[m++]=d.x,l[m++]=d.y,l[m++]=d.z,l[m++]=u.x,l[m++]=u.y,l[m++]=u.z}for(var t=new k.GeometryAttributes({position:new A.GeometryAttribute({componentDatatype:H.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:l})}),p=n/3,f=w.IndexDatatype.createTypedArray(p,n=2*p-4+p),h=0,c=0;c<p-2;c+=2){var g=c,y=c+2,_=b.Cartesian3.fromArray(l,3*g,x),E=b.Cartesian3.fromArray(l,3*y,P);b.Cartesian3.equalsEpsilon(_,E,G.CesiumMath.EPSILON10)||(_=c+3,f[h++]=E=c+1,f[h++]=g,f[h++]=E,f[h++]=_,f[h++]=g,f[h++]=y)}return f[h++]=p-2,f[h++]=p-1,new A.Geometry({attributes:t,indices:f,primitiveType:A.PrimitiveType.LINES,boundingSphere:new C.BoundingSphere.fromVertices(l)})}},function(e,i){return(e=v.defined(i)?d.unpack(e,i):e)._ellipsoid=b.Ellipsoid.clone(e._ellipsoid),d.createGeometry(e)}}); | ||
define(["./when-229515d6","./Matrix2-f2da41d4","./Transforms-7cd3197b","./ComponentDatatype-17b06483","./RuntimeError-ffe03243","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b","./WallGeometryLibrary-fb5b94e4","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./arrayRemoveDuplicates-bb548aa3","./PolylinePipeline-a3ba6f24","./EllipsoidGeodesic-43ba18de","./EllipsoidRhumbLine-afd6cd20","./IntersectionTests-1b8a3cb9","./Plane-0421a8be"],(function(e,i,t,a,n,r,o,s,l,m,d,u,p,f,h,c,g){"use strict";var y=new i.Cartesian3,v=new i.Cartesian3;function b(t){var n=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions,r=t.maximumHeights,o=t.minimumHeights,s=e.defaultValue(t.granularity,a.CesiumMath.RADIANS_PER_DEGREE),l=e.defaultValue(t.ellipsoid,i.Ellipsoid.WGS84);this._positions=n,this._minimumHeights=o,this._maximumHeights=r,this._granularity=s,this._ellipsoid=i.Ellipsoid.clone(l),this._workerName="createWallOutlineGeometry";var m=1+n.length*i.Cartesian3.packedLength+2;e.defined(o)&&(m+=o.length),e.defined(r)&&(m+=r.length),this.packedLength=m+i.Ellipsoid.packedLength+1}b.pack=function(t,a,n){var r;n=e.defaultValue(n,0);var o=t._positions,s=o.length;for(a[n++]=s,r=0;r<s;++r,n+=i.Cartesian3.packedLength)i.Cartesian3.pack(o[r],a,n);var l=t._minimumHeights;if(s=e.defined(l)?l.length:0,a[n++]=s,e.defined(l))for(r=0;r<s;++r)a[n++]=l[r];var m=t._maximumHeights;if(s=e.defined(m)?m.length:0,a[n++]=s,e.defined(m))for(r=0;r<s;++r)a[n++]=m[r];return i.Ellipsoid.pack(t._ellipsoid,a,n),a[n+=i.Ellipsoid.packedLength]=t._granularity,a};var _=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),E={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:_,granularity:void 0};return b.unpack=function(t,a,n){var r;a=e.defaultValue(a,0);var o,s,l=t[a++],m=new Array(l);for(r=0;r<l;++r,a+=i.Cartesian3.packedLength)m[r]=i.Cartesian3.unpack(t,a);if((l=t[a++])>0)for(o=new Array(l),r=0;r<l;++r)o[r]=t[a++];if((l=t[a++])>0)for(s=new Array(l),r=0;r<l;++r)s[r]=t[a++];var d=i.Ellipsoid.unpack(t,a,_),u=t[a+=i.Ellipsoid.packedLength];return e.defined(n)?(n._positions=m,n._minimumHeights=o,n._maximumHeights=s,n._ellipsoid=i.Ellipsoid.clone(d,n._ellipsoid),n._granularity=u,n):(E.positions=m,E.minimumHeights=o,E.maximumHeights=s,E.granularity=u,new b(E))},b.fromConstantHeights=function(i){var t,a,n=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).positions,r=i.minimumHeight,o=i.maximumHeight,s=e.defined(r),l=e.defined(o);if(s||l){var m=n.length;t=s?new Array(m):void 0,a=l?new Array(m):void 0;for(var d=0;d<m;++d)s&&(t[d]=r),l&&(a[d]=o)}return new b({positions:n,maximumHeights:a,minimumHeights:t,ellipsoid:i.ellipsoid})},b.createGeometry=function(n){var m=n._positions,d=n._minimumHeights,u=n._maximumHeights,p=n._granularity,f=n._ellipsoid,h=l.WallGeometryLibrary.computePositions(f,m,u,d,p,!1);if(e.defined(h)){var c,g=h.bottomPositions,b=h.topPositions,_=b.length,E=2*_,C=new Float64Array(E),H=0;for(_/=3,c=0;c<_;++c){var A=3*c,w=i.Cartesian3.fromArray(b,A,y),k=i.Cartesian3.fromArray(g,A,v);C[H++]=k.x,C[H++]=k.y,C[H++]=k.z,C[H++]=w.x,C[H++]=w.y,C[H++]=w.z}var x=new o.GeometryAttributes({position:new r.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:C})}),G=E/3;E=2*G-4+G;var L=s.IndexDatatype.createTypedArray(G,E),P=0;for(c=0;c<G-2;c+=2){var T=c,D=c+2,V=i.Cartesian3.fromArray(C,3*T,y),I=i.Cartesian3.fromArray(C,3*D,v);if(!i.Cartesian3.equalsEpsilon(V,I,a.CesiumMath.EPSILON10)){var R=c+1,S=c+3;L[P++]=R,L[P++]=T,L[P++]=R,L[P++]=S,L[P++]=T,L[P++]=D}}return L[P++]=G-2,L[P++]=G-1,new r.Geometry({attributes:x,indices:L,primitiveType:r.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere.fromVertices(C)})}},function(t,a){return e.defined(a)&&(t=b.unpack(t,a)),t._ellipsoid=i.Ellipsoid.clone(t._ellipsoid),b.createGeometry(t)}})); |
@@ -1,1 +0,1 @@ | ||
define(["./ComponentDatatype-6c2e43c1","./when-7b580518","./IndexDatatype-b42089ce","./RuntimeError-fad4d3c6","./createTaskProcessorWorker","./Check-3917d765","./WebGLConstants-4e26b85a","./Math-87254c13"],function(d,c,y,f,t,e,r,n){"use strict";var A;function b(e,t,r){var n,o=e.num_points(),a=r.num_components(),i=new A.AttributeQuantizationTransform;if(i.InitFromAttribute(r)){for(var u=new Array(a),s=0;s<a;++s)u[s]=i.min_value(s);n={quantizationBits:i.quantization_bits(),minValues:u,range:i.range(),octEncoded:!1}}A.destroy(i),(i=new A.AttributeOctahedronTransform).InitFromAttribute(r)&&(n={quantizationBits:i.quantization_bits(),octEncoded:!0}),A.destroy(i);o*=a,t=c.defined(n)?function(e,t,r,n,o){var a,i;n.quantizationBits<=8?(i=new A.DracoUInt8Array,a=new Uint8Array(o),t.GetAttributeUInt8ForAllPoints(e,r,i)):(i=new A.DracoUInt16Array,a=new Uint16Array(o),t.GetAttributeUInt16ForAllPoints(e,r,i));for(var u=0;u<o;++u)a[u]=i.GetValue(u);return A.destroy(i),a}(e,t,r,n,o):function(e,t,r,n){var o,a;switch(r.data_type()){case 1:case 11:a=new A.DracoInt8Array,o=new Int8Array(n),t.GetAttributeInt8ForAllPoints(e,r,a);break;case 2:a=new A.DracoUInt8Array,o=new Uint8Array(n),t.GetAttributeUInt8ForAllPoints(e,r,a);break;case 3:a=new A.DracoInt16Array,o=new Int16Array(n),t.GetAttributeInt16ForAllPoints(e,r,a);break;case 4:a=new A.DracoUInt16Array,o=new Uint16Array(n),t.GetAttributeUInt16ForAllPoints(e,r,a);break;case 5:case 7:a=new A.DracoInt32Array,o=new Int32Array(n),t.GetAttributeInt32ForAllPoints(e,r,a);break;case 6:case 8:a=new A.DracoUInt32Array,o=new Uint32Array(n),t.GetAttributeUInt32ForAllPoints(e,r,a);break;case 9:case 10:a=new A.DracoFloat32Array,o=new Float32Array(n),t.GetAttributeFloatForAllPoints(e,r,a)}for(var i=0;i<n;++i)o[i]=a.GetValue(i);return A.destroy(a),o}(e,t,r,o),o=d.ComponentDatatype.fromTypedArray(t);return{array:t,data:{componentsPerAttribute:a,componentDatatype:o,byteOffset:r.byte_offset(),byteStride:d.ComponentDatatype.getSizeInBytes(o)*a,normalized:r.normalized(),quantization:n}}}function o(e){var t=new A.Decoder,r=["POSITION","NORMAL","COLOR","TEX_COORD"];if(e.dequantizeInShader)for(var n=0;n<r.length;++n)t.SkipAttributeTransform(A[r[n]]);var o=e.bufferView,a=new A.DecoderBuffer;if(a.Init(e.array,o.byteLength),t.GetEncodedGeometryType(a)!==A.TRIANGULAR_MESH)throw new f.RuntimeError("Unsupported draco mesh geometry type.");var i=new A.Mesh,o=t.DecodeBufferToMesh(a,i);if(!o.ok()||0===i.ptr)throw new f.RuntimeError("Error decoding draco mesh geometry: "+o.error_msg());A.destroy(a);var u,s,d={},c=e.compressedAttributes;for(u in c)c.hasOwnProperty(u)&&(s=c[u],s=t.GetAttributeByUniqueId(i,s),d[u]=b(i,t,s));e={indexArray:function(e,t){for(var r=e.num_points(),n=e.num_faces(),o=new A.DracoInt32Array,a=3*n,i=y.IndexDatatype.createTypedArray(r,a),u=0,s=0;s<n;++s)t.GetFaceFromMesh(e,s,o),i[u+0]=o.GetValue(0),i[u+1]=o.GetValue(1),i[u+2]=o.GetValue(2),u+=3;return A.destroy(o),{typedArray:i,numberOfIndices:a}}(i,t),attributeData:d};return A.destroy(i),A.destroy(t),e}function a(e){return(c.defined(e.bufferView)?o:function(e){var t=new A.Decoder;e.dequantizeInShader&&(t.SkipAttributeTransform(A.POSITION),t.SkipAttributeTransform(A.NORMAL));var r=new A.DecoderBuffer;if(r.Init(e.buffer,e.buffer.length),t.GetEncodedGeometryType(r)!==A.POINT_CLOUD)throw new f.RuntimeError("Draco geometry type must be POINT_CLOUD.");var n=new A.PointCloud,o=t.DecodeBufferToPointCloud(r,n);if(!o.ok()||0===n.ptr)throw new f.RuntimeError("Error decoding draco point cloud: "+o.error_msg());A.destroy(r);var a,i,u={},s=e.properties;for(a in s)s.hasOwnProperty(a)&&(i=s[a],i=t.GetAttributeByUniqueId(n,i),u[a]=b(n,t,i));return A.destroy(n),A.destroy(t),u})(e)}function i(e){A=e,self.onmessage=t(a),self.postMessage(!0)}return function(e){var t=e.data.webAssemblyConfig;if(c.defined(t))return require([t.modulePath],function(e){c.defined(t.wasmBinaryFile)?(e=!c.defined(e)?self.DracoDecoderModule:e)(t).then(function(e){i(e)}):i(e())})}}); | ||
define(["./ComponentDatatype-17b06483","./when-229515d6","./IndexDatatype-b10faa0b","./RuntimeError-ffe03243","./createTaskProcessorWorker","./WebGLConstants-4e26b85a"],(function(e,t,r,n,a,o){"use strict";var i;function u(e,t){for(var n=e.num_points(),a=e.num_faces(),o=new i.DracoInt32Array,u=3*a,s=r.IndexDatatype.createTypedArray(n,u),d=0,f=0;f<a;++f)t.GetFaceFromMesh(e,f,o),s[d+0]=o.GetValue(0),s[d+1]=o.GetValue(1),s[d+2]=o.GetValue(2),d+=3;return i.destroy(o),{typedArray:s,numberOfIndices:u}}function s(r,n,a){var o,u=r.num_points(),s=a.num_components(),d=new i.AttributeQuantizationTransform;if(d.InitFromAttribute(a)){for(var f=new Array(s),c=0;c<s;++c)f[c]=d.min_value(c);o={quantizationBits:d.quantization_bits(),minValues:f,range:d.range(),octEncoded:!1}}i.destroy(d),(d=new i.AttributeOctahedronTransform).InitFromAttribute(a)&&(o={quantizationBits:d.quantization_bits(),octEncoded:!0}),i.destroy(d);var y,A=u*s;y=t.defined(o)?function(e,t,r,n,a){var o,u;n.quantizationBits<=8?(u=new i.DracoUInt8Array,o=new Uint8Array(a),t.GetAttributeUInt8ForAllPoints(e,r,u)):(u=new i.DracoUInt16Array,o=new Uint16Array(a),t.GetAttributeUInt16ForAllPoints(e,r,u));for(var s=0;s<a;++s)o[s]=u.GetValue(s);return i.destroy(u),o}(r,n,a,o,A):function(e,t,r,n){var a,o;switch(r.data_type()){case 1:case 11:o=new i.DracoInt8Array,a=new Int8Array(n),t.GetAttributeInt8ForAllPoints(e,r,o);break;case 2:o=new i.DracoUInt8Array,a=new Uint8Array(n),t.GetAttributeUInt8ForAllPoints(e,r,o);break;case 3:o=new i.DracoInt16Array,a=new Int16Array(n),t.GetAttributeInt16ForAllPoints(e,r,o);break;case 4:o=new i.DracoUInt16Array,a=new Uint16Array(n),t.GetAttributeUInt16ForAllPoints(e,r,o);break;case 5:case 7:o=new i.DracoInt32Array,a=new Int32Array(n),t.GetAttributeInt32ForAllPoints(e,r,o);break;case 6:case 8:o=new i.DracoUInt32Array,a=new Uint32Array(n),t.GetAttributeUInt32ForAllPoints(e,r,o);break;case 9:case 10:o=new i.DracoFloat32Array,a=new Float32Array(n),t.GetAttributeFloatForAllPoints(e,r,o)}for(var u=0;u<n;++u)a[u]=o.GetValue(u);return i.destroy(o),a}(r,n,a,A);var b=e.ComponentDatatype.fromTypedArray(y);return{array:y,data:{componentsPerAttribute:s,componentDatatype:b,byteOffset:a.byte_offset(),byteStride:e.ComponentDatatype.getSizeInBytes(b)*s,normalized:a.normalized(),quantization:o}}}function d(e){return t.defined(e.bufferView)?function(e){var r=new i.Decoder,a=["POSITION","NORMAL"],o=e.compressedAttributes;if(t.defined(o.COLOR_1)||a.push("COLOR"),t.defined(o.TEXCOORD_1)||a.push("TEX_COORD"),e.dequantizeInShader)for(var d=0;d<a.length;++d)r.SkipAttributeTransform(i[a[d]]);var f=e.bufferView,c=new i.DecoderBuffer;if(c.Init(e.array,f.byteLength),r.GetEncodedGeometryType(c)!==i.TRIANGULAR_MESH)throw new n.RuntimeError("Unsupported draco mesh geometry type.");var y=new i.Mesh,A=r.DecodeBufferToMesh(c,y);if(!A.ok()||0===y.ptr)throw new n.RuntimeError("Error decoding draco mesh geometry: "+A.error_msg());i.destroy(c);var b={};for(var l in o)if(o.hasOwnProperty(l)){var m,w=l;if("TEXCOORD_0"===l&&(w="TEX_COORD"),"COLOR_0"===l&&(w="COLOR"),a.includes(w)){var I=r.GetAttributeId(y,i[w]);m=r.GetAttribute(y,I)}else{var p=o[l];m=r.GetAttributeByUniqueId(y,p)}b[l]=s(y,r,m)}var O={indexArray:u(y,r),attributeData:b};return i.destroy(y),i.destroy(r),O}(e):function(e){var t=new i.Decoder;e.dequantizeInShader&&(t.SkipAttributeTransform(i.POSITION),t.SkipAttributeTransform(i.NORMAL));var r=new i.DecoderBuffer;if(r.Init(e.buffer,e.buffer.length),t.GetEncodedGeometryType(r)!==i.POINT_CLOUD)throw new n.RuntimeError("Draco geometry type must be POINT_CLOUD.");var a=new i.PointCloud,o=t.DecodeBufferToPointCloud(r,a);if(!o.ok()||0===a.ptr)throw new n.RuntimeError("Error decoding draco point cloud: "+o.error_msg());i.destroy(r);var u={},d=e.properties;for(var f in d)if(d.hasOwnProperty(f)){var c;if("POSITION"===f||"NORMAL"===f){var y=t.GetAttributeId(a,i[f]);c=t.GetAttribute(a,y)}else{var A=d[f];c=t.GetAttributeByUniqueId(a,A)}u[f]=s(a,t,c)}return i.destroy(a),i.destroy(t),u}(e)}function f(e){i=e,self.onmessage=a(d),self.postMessage(!0)}return function(e){var r=e.data.webAssemblyConfig;if(t.defined(r))return require([r.modulePath],(function(e){t.defined(r.wasmBinaryFile)?(t.defined(e)||(e=self.DracoDecoderModule),e(r).then((function(e){f(e)}))):f(e())}))}})); |
@@ -1,1 +0,1 @@ | ||
define(["./Check-3917d765","./RuntimeError-fad4d3c6","./when-7b580518","./createTaskProcessorWorker"],function(e,k,i,t){"use strict";function h(e,t){if(h.passThroughDataForTesting)return t;var i=e.byteLength;if(0===i||i%4!=0)throw new k.RuntimeError("The length of key must be greater than 0 and a multiple of 4.");var n=new DataView(t),r=n.getUint32(0,!0);if(1953029805===r||2917034100===r)return t;for(var a,o=new DataView(e),s=0,f=t.byteLength,l=f-f%8,u=i,d=8;s<l;)for(a=d=(d+8)%24;s<l&&a<u;)n.setUint32(s,n.getUint32(s,!0)^o.getUint32(a,!0),!0),n.setUint32(s+4,n.getUint32(s+4,!0)^o.getUint32(a+4,!0),!0),s+=8,a+=24;if(s<f)for(u<=a&&(a=d=(d+8)%24);s<f;)n.setUint8(s,n.getUint8(s)^o.getUint8(a)),s++,a++}function n(e,t){return 0!=(e&t)}h.passThroughDataForTesting=!1;var r=[1,2,4,8];function _(e,t,i,n,r,a){this._bits=e,this.cnodeVersion=t,this.imageryVersion=i,this.terrainVersion=n,this.imageryProvider=r,this.terrainProvider=a,this.ancestorHasTerrain=!1,this.terrainState=void 0}_.clone=function(e,t){return i.defined(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new _(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t},_.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},_.prototype.hasSubtree=function(){return n(this._bits,16)},_.prototype.hasImagery=function(){return n(this._bits,64)},_.prototype.hasTerrain=function(){return n(this._bits,128)},_.prototype.hasChildren=function(){return n(this._bits,15)},_.prototype.hasChild=function(e){return n(this._bits,r[e])},_.prototype.getChildBitmask=function(){return 15&this._bits};var o=function n(r,a,o){function s(i,e){if(!a[i]){if(!r[i]){var t="function"==typeof require&&require;if(!e&&t)return t(i,!0);if(f)return f(i,!0);t=new Error("Cannot find module '"+i+"'");throw t.code="MODULE_NOT_FOUND",t}t=a[i]={exports:{}};r[i][0].call(t.exports,function(e){var t=r[i][1][e];return s(t||e)},t,t.exports,n,r,a,o)}return a[i].exports}for(var f="function"==typeof require&&require,e=0;e<o.length;e++)s(o[e]);return s}({1:[function(e,t,i){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])}}return e},i.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,i,n,r){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+n),r);else for(var a=0;a<n;a++)e[r+a]=t[i+a]},flattenChunks:function(e){for(var t,i,n,r=0,a=0,o=e.length;a<o;a++)r+=e[a].length;for(n=new Uint8Array(r),a=t=0,o=e.length;a<o;a++)i=e[a],n.set(i,t),t+=i.length;return n}},a={arraySet:function(e,t,i,n,r){for(var a=0;a<n;a++)e[r+a]=t[i+a]},flattenChunks:function(e){return[].concat.apply([],e)}};i.setTyped=function(e){e?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,r)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,a))},i.setTyped(n)},{}],2:[function(e,t,i){var f=e("./common"),r=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){a=!1}for(var l=new f.Buf8(256),n=0;n<256;n++)l[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;function u(e,t){if(t<65537&&(e.subarray&&a||!e.subarray&&r))return String.fromCharCode.apply(null,f.shrinkBuf(e,t));for(var i="",n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i}l[254]=l[254]=1,i.string2buf=function(e){for(var t,i,n,r,a=e.length,o=0,s=0;s<a;s++)55296==(64512&(i=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=e.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(n-56320),s++),o+=i<128?1:i<2048?2:i<65536?3:4;for(t=new f.Buf8(o),s=r=0;r<o;s++)55296==(64512&(i=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=e.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(n-56320),s++),i<128?t[r++]=i:(i<2048?t[r++]=192|i>>>6:(i<65536?t[r++]=224|i>>>12:(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63),t[r++]=128|i>>>6&63),t[r++]=128|63&i);return t},i.buf2binstring=function(e){return u(e,e.length)},i.binstring2buf=function(e){for(var t=new f.Buf8(e.length),i=0,n=t.length;i<n;i++)t[i]=e.charCodeAt(i);return t},i.buf2string=function(e,t){for(var i,n,r=t||e.length,a=new Array(2*r),o=0,s=0;s<r;)if((i=e[s++])<128)a[o++]=i;else if(4<(n=l[i]))a[o++]=65533,s+=n-1;else{for(i&=2===n?31:3===n?15:7;1<n&&s<r;)i=i<<6|63&e[s++],n--;1<n?a[o++]=65533:i<65536?a[o++]=i:(i-=65536,a[o++]=55296|i>>10&1023,a[o++]=56320|1023&i)}return u(a,o)},i.utf8border=function(e,t){for(var i=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=i&&128==(192&e[i]);)i--;return!(i<0)&&0!==i&&i+l[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){t.exports=function(e,t,i,n){for(var r=65535&e|0,a=e>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3<i?2e3:i;a=a+(r=r+t[n++]|0)|0,--o;);r%=65521,a%=65521}return r|a<<16|0}},{}],4:[function(e,t,i){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,i){var s=function(){for(var e=[],t=0;t<256;t++){for(var i=t,n=0;n<8;n++)i=1&i?3988292384^i>>>1:i>>>1;e[t]=i}return e}();t.exports=function(e,t,i,n){var r=s,a=n+i;e^=-1;for(var o=n;o<a;o++)e=e>>>8^r[255&(e^t[o])];return-1^e}},{}],6:[function(e,t,i){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,i){t.exports=function(e,t){var i,n,r,a,o,s,f=e.state,l=e.next_in,u=e.input,d=l+(e.avail_in-5),h=e.next_out,c=e.output,b=h-(t-e.avail_out),m=h+(e.avail_out-257),w=f.dmax,g=f.wsize,v=f.whave,k=f.wnext,_=f.window,p=f.hold,y=f.bits,x=f.lencode,E=f.distcode,S=(1<<f.lenbits)-1,T=(1<<f.distbits)-1;e:do{y<15&&(p+=u[l++]<<y,y+=8,p+=u[l++]<<y,y+=8),i=x[p&S];t:for(;;){if(p>>>=n=i>>>24,y-=n,0===(n=i>>>16&255))c[h++]=65535&i;else{if(!(16&n)){if(0==(64&n)){i=x[(65535&i)+(p&(1<<n)-1)];continue t}if(32&n){f.mode=12;break e}e.msg="invalid literal/length code",f.mode=30;break e}r=65535&i,(n&=15)&&(y<n&&(p+=u[l++]<<y,y+=8),r+=p&(1<<n)-1,p>>>=n,y-=n),y<15&&(p+=u[l++]<<y,y+=8,p+=u[l++]<<y,y+=8),i=E[p&T];i:for(;;){if(p>>>=n=i>>>24,y-=n,!(16&(n=i>>>16&255))){if(0==(64&n)){i=E[(65535&i)+(p&(1<<n)-1)];continue i}e.msg="invalid distance code",f.mode=30;break e}if(a=65535&i,y<(n&=15)&&(p+=u[l++]<<y,(y+=8)<n&&(p+=u[l++]<<y,y+=8)),w<(a+=p&(1<<n)-1)){e.msg="invalid distance too far back",f.mode=30;break e}if(p>>>=n,y-=n,(n=h-b)<a){if(v<(n=a-n)&&f.sane){e.msg="invalid distance too far back",f.mode=30;break e}if(s=_,(o=0)===k){if(o+=g-n,n<r){for(r-=n;c[h++]=_[o++],--n;);o=h-a,s=c}}else if(k<n){if(o+=g+k-n,(n-=k)<r){for(r-=n;c[h++]=_[o++],--n;);if(o=0,k<r){for(r-=n=k;c[h++]=_[o++],--n;);o=h-a,s=c}}}else if(o+=k-n,n<r){for(r-=n;c[h++]=_[o++],--n;);o=h-a,s=c}for(;2<r;)c[h++]=s[o++],c[h++]=s[o++],c[h++]=s[o++],r-=3;r&&(c[h++]=s[o++],1<r&&(c[h++]=s[o++]))}else{for(o=h-a;c[h++]=c[o++],c[h++]=c[o++],c[h++]=c[o++],2<(r-=3););r&&(c[h++]=c[o++],1<r&&(c[h++]=c[o++]))}break}}break}}while(l<d&&h<m);p&=(1<<(y-=(r=y>>3)<<3))-1,e.next_in=l-=r,e.next_out=h,e.avail_in=l<d?d-l+5:5-(l-d),e.avail_out=h<m?m-h+257:257-(h-m),f.hold=p,f.bits=y}},{}],8:[function(e,t,i){var B=e("../utils/common"),U=e("./adler32"),Z=e("./crc32"),I=e("./inffast"),D=e("./inftrees"),N=1,O=2,z=0,C=-2,F=1,n=852,r=592;function L(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function a(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new B.Buf16(320),this.work=new B.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=F,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new B.Buf32(n),t.distcode=t.distdyn=new B.Buf32(r),t.sane=1,t.back=-1,z):C}function s(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,o(e)):C}function f(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?C:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,s(e))):C}function l(e,t){var i;return e?(i=new a,(e.state=i).window=null,(t=f(e,t))!==z&&(e.state=null),t):C}var H,P,M=!0;function V(e,t,i,n){var r=e.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new B.Buf8(r.wsize)),n>=r.wsize?(B.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(n<(e=r.wsize-r.wnext)&&(e=n),B.arraySet(r.window,t,i-n,e,r.wnext),(n-=e)?(B.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=e,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=e))),0}i.inflateReset=s,i.inflateReset2=f,i.inflateResetKeep=o,i.inflateInit=function(e){return l(e,15)},i.inflateInit2=l,i.inflate=function(e,t){var i,n,r,a,o,s,f,l,u,d,h,c,b,m,w,g,v,k,_,p,y,x,E,S,T=0,R=new B.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return C;12===(i=e.state).mode&&(i.mode=13),o=e.next_out,r=e.output,f=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,l=i.hold,u=i.bits,d=s,h=f,x=z;e:for(;;)switch(i.mode){case F:if(0===i.wrap){i.mode=13;break}for(;u<16;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(2&i.wrap&&35615===l){R[i.check=0]=255&l,R[1]=l>>>8&255,i.check=Z(i.check,R,2,0),u=l=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=30;break}if(8!=(15&l)){e.msg="unknown compression method",i.mode=30;break}if(u-=4,y=8+(15&(l>>>=4)),0===i.wbits)i.wbits=y;else if(y>i.wbits){e.msg="invalid window size",i.mode=30;break}i.dmax=1<<y,e.adler=i.check=1,i.mode=512&l?10:12,u=l=0;break;case 2:for(;u<16;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(i.flags=l,8!=(255&i.flags)){e.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=l>>8&1),512&i.flags&&(R[0]=255&l,R[1]=l>>>8&255,i.check=Z(i.check,R,2,0)),u=l=0,i.mode=3;case 3:for(;u<32;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}i.head&&(i.head.time=l),512&i.flags&&(R[0]=255&l,R[1]=l>>>8&255,R[2]=l>>>16&255,R[3]=l>>>24&255,i.check=Z(i.check,R,4,0)),u=l=0,i.mode=4;case 4:for(;u<16;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}i.head&&(i.head.xflags=255&l,i.head.os=l>>8),512&i.flags&&(R[0]=255&l,R[1]=l>>>8&255,i.check=Z(i.check,R,2,0)),u=l=0,i.mode=5;case 5:if(1024&i.flags){for(;u<16;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}i.length=l,i.head&&(i.head.extra_len=l),512&i.flags&&(R[0]=255&l,R[1]=l>>>8&255,i.check=Z(i.check,R,2,0)),u=l=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&((c=s<(c=i.length)?s:c)&&(i.head&&(y=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),B.arraySet(i.head.extra,n,a,c,y)),512&i.flags&&(i.check=Z(i.check,n,c,a)),s-=c,a+=c,i.length-=c),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===s)break e;for(c=0;y=n[a+c++],i.head&&y&&i.length<65536&&(i.head.name+=String.fromCharCode(y)),y&&c<s;);if(512&i.flags&&(i.check=Z(i.check,n,c,a)),s-=c,a+=c,y)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===s)break e;for(c=0;y=n[a+c++],i.head&&y&&i.length<65536&&(i.head.comment+=String.fromCharCode(y)),y&&c<s;);if(512&i.flags&&(i.check=Z(i.check,n,c,a)),s-=c,a+=c,y)break e}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;u<16;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(l!==(65535&i.check)){e.msg="header crc mismatch",i.mode=30;break}u=l=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;u<32;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}e.adler=i.check=L(l),u=l=0,i.mode=11;case 11:if(0===i.havedict)return e.next_out=o,e.avail_out=f,e.next_in=a,e.avail_in=s,i.hold=l,i.bits=u,2;e.adler=i.check=1,i.mode=12;case 12:if(5===t||6===t)break e;case 13:if(i.last){l>>>=7&u,u-=7&u,i.mode=27;break}for(;u<3;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}switch(i.last=1&l,--u,3&(l>>>=1)){case 0:i.mode=14;break;case 1:if(!function(e){if(M){var t;for(H=new B.Buf32(512),P=new B.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(D(N,e.lens,0,288,H,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;D(O,e.lens,0,32,P,0,e.work,{bits:5}),M=!1}e.lencode=H,e.lenbits=9,e.distcode=P,e.distbits=5}(i),i.mode=20,6!==t)break;l>>>=2,u-=2;break e;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=30}l>>>=2,u-=2;break;case 14:for(l>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&l,u=l=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(c=i.length){if(0===(c=f<(c=s<c?s:c)?f:c))break e;B.arraySet(r,n,a,c,o),s-=c,a+=c,f-=c,o+=c,i.length-=c;break}i.mode=12;break;case 17:for(;u<14;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(i.nlen=257+(31&l),l>>>=5,u-=5,i.ndist=1+(31&l),l>>>=5,u-=5,i.ncode=4+(15&l),l>>>=4,u-=4,286<i.nlen||30<i.ndist){e.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;u<3;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}i.lens[A[i.have++]]=7&l,l>>>=3,u-=3}for(;i.have<19;)i.lens[A[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,E={bits:i.lenbits},x=D(0,i.lens,0,19,i.lencode,0,i.work,E),i.lenbits=E.bits,x){e.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;g=(T=i.lencode[l&(1<<i.lenbits)-1])>>>16&255,v=65535&T,!((w=T>>>24)<=u);){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(v<16)l>>>=w,u-=w,i.lens[i.have++]=v;else{if(16===v){for(S=w+2;u<S;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(l>>>=w,u-=w,0===i.have){e.msg="invalid bit length repeat",i.mode=30;break}y=i.lens[i.have-1],c=3+(3&l),l>>>=2,u-=2}else if(17===v){for(S=w+3;u<S;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}u-=w,y=0,c=3+(7&(l>>>=w)),l>>>=3,u-=3}else{for(S=w+7;u<S;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}u-=w,y=0,c=11+(127&(l>>>=w)),l>>>=7,u-=7}if(i.have+c>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=30;break}for(;c--;)i.lens[i.have++]=y}}if(30===i.mode)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,E={bits:i.lenbits},x=D(N,i.lens,0,i.nlen,i.lencode,0,i.work,E),i.lenbits=E.bits,x){e.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,E={bits:i.distbits},x=D(O,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,E),i.distbits=E.bits,x){e.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(6<=s&&258<=f){e.next_out=o,e.avail_out=f,e.next_in=a,e.avail_in=s,i.hold=l,i.bits=u,I(e,h),o=e.next_out,r=e.output,f=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,l=i.hold,u=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;g=(T=i.lencode[l&(1<<i.lenbits)-1])>>>16&255,v=65535&T,!((w=T>>>24)<=u);){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(g&&0==(240&g)){for(k=w,_=g,p=v;g=(T=i.lencode[p+((l&(1<<k+_)-1)>>k)])>>>16&255,v=65535&T,!(k+(w=T>>>24)<=u);){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}l>>>=k,u-=k,i.back+=k}if(l>>>=w,u-=w,i.back+=w,i.length=v,0===g){i.mode=26;break}if(32&g){i.back=-1,i.mode=12;break}if(64&g){e.msg="invalid literal/length code",i.mode=30;break}i.extra=15&g,i.mode=22;case 22:if(i.extra){for(S=i.extra;u<S;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}i.length+=l&(1<<i.extra)-1,l>>>=i.extra,u-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;g=(T=i.distcode[l&(1<<i.distbits)-1])>>>16&255,v=65535&T,!((w=T>>>24)<=u);){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(0==(240&g)){for(k=w,_=g,p=v;g=(T=i.distcode[p+((l&(1<<k+_)-1)>>k)])>>>16&255,v=65535&T,!(k+(w=T>>>24)<=u);){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}l>>>=k,u-=k,i.back+=k}if(l>>>=w,u-=w,i.back+=w,64&g){e.msg="invalid distance code",i.mode=30;break}i.offset=v,i.extra=15&g,i.mode=24;case 24:if(i.extra){for(S=i.extra;u<S;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}i.offset+=l&(1<<i.extra)-1,l>>>=i.extra,u-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===f)break e;if(i.offset>(c=h-f)){if((c=i.offset-c)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=30;break}b=c>i.wnext?(c-=i.wnext,i.wsize-c):i.wnext-c,c>i.length&&(c=i.length),m=i.window}else m=r,b=o-i.offset,c=i.length;for(f-=c=f<c?f:c,i.length-=c;r[o++]=m[b++],--c;);0===i.length&&(i.mode=21);break;case 26:if(0===f)break e;r[o++]=i.length,f--,i.mode=21;break;case 27:if(i.wrap){for(;u<32;){if(0===s)break e;s--,l|=n[a++]<<u,u+=8}if(h-=f,e.total_out+=h,i.total+=h,h&&(e.adler=i.check=(i.flags?Z:U)(i.check,r,h,o-h)),h=f,(i.flags?l:L(l))!==i.check){e.msg="incorrect data check",i.mode=30;break}u=l=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;u<32;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(l!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=30;break}u=l=0}i.mode=29;case 29:x=1;break e;case 30:x=-3;break e;case 31:return-4;default:return C}return e.next_out=o,e.avail_out=f,e.next_in=a,e.avail_in=s,i.hold=l,i.bits=u,(i.wsize||h!==e.avail_out&&i.mode<30&&(i.mode<27||4!==t))&&V(e,e.output,e.next_out,h-e.avail_out),d-=e.avail_in,h-=e.avail_out,e.total_in+=d,e.total_out+=h,i.total+=h,i.wrap&&h&&(e.adler=i.check=(i.flags?Z:U)(i.check,r,h,e.next_out-h)),e.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),x=(0==d&&0===h||4===t)&&x===z?-5:x},i.inflateEnd=function(e){if(!e||!e.state)return C;var t=e.state;return t.window&&(t.window=null),e.state=null,z},i.inflateGetHeader=function(e,t){return!e||!e.state||0==(2&(e=e.state).wrap)?C:((e.head=t).done=!1,z)},i.inflateSetDictionary=function(e,t){var i,n=t.length;return!e||!e.state||0!==(i=e.state).wrap&&11!==i.mode?C:11===i.mode&&U(1,t,n,0)!==i.check?-3:V(e,t,n,n)?(i.mode=31,-4):(i.havedict=1,z)},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,i){var N=e("../utils/common"),O=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],z=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],C=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],F=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,i,n,r,a,o,s){for(var f,l,u,d,h,c,b,m,w,g=s.bits,v=0,k=0,_=0,p=0,y=0,x=0,E=0,S=0,T=0,R=0,A=null,B=0,U=new N.Buf16(16),Z=new N.Buf16(16),I=null,D=0,v=0;v<=15;v++)U[v]=0;for(k=0;k<n;k++)U[t[i+k]]++;for(y=g,p=15;1<=p&&0===U[p];p--);if(p<y&&(y=p),0===p)return r[a++]=20971520,r[a++]=20971520,s.bits=1,0;for(_=1;_<p&&0===U[_];_++);for(y<_&&(y=_),v=S=1;v<=15;v++)if(S<<=1,(S-=U[v])<0)return-1;if(0<S&&(0===e||1!==p))return-1;for(Z[1]=0,v=1;v<15;v++)Z[v+1]=Z[v]+U[v];for(k=0;k<n;k++)0!==t[i+k]&&(o[Z[t[i+k]]++]=k);if(c=0===e?(A=I=o,19):1===e?(A=O,B-=257,I=z,D-=257,256):(A=C,I=F,-1),v=_,h=a,E=k=R=0,u=-1,d=(T=1<<(x=y))-1,1===e&&852<T||2===e&&592<T)return 1;for(;;){for(w=o[k]<c?(m=0,o[k]):o[k]>c?(m=I[D+o[k]],A[B+o[k]]):(m=96,0),f=1<<(b=v-E),_=l=1<<x;r[h+(R>>E)+(l-=f)]=b<<24|m<<16|w|0,0!==l;);for(f=1<<v-1;R&f;)f>>=1;if(0!==f?(R&=f-1,R+=f):R=0,k++,0==--U[v]){if(v===p)break;v=t[i+o[k]]}if(y<v&&(R&d)!==u){for(h+=_,S=1<<(x=v-(E=0===E?y:E));x+E<p&&!((S-=U[x+E])<=0);)x++,S<<=1;if(T+=1<<x,1===e&&852<T||2===e&&592<T)return 1;r[u=R&d]=y<<24|x<<16|h-a|0}}return 0!==R&&(r[h+R]=v-E<<24|64<<16|0),s.bits=y,0}},{"../utils/common":1}],10:[function(e,t,i){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,i){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/inflate.js":[function(e,t,i){var d=e("./zlib/inflate"),h=e("./utils/common"),c=e("./utils/strings"),b=e("./zlib/constants"),n=e("./zlib/messages"),r=e("./zlib/zstream"),a=e("./zlib/gzheader"),m=Object.prototype.toString;function o(e){if(!(this instanceof o))return new o(e);this.options=h.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new r,this.strm.avail_out=0;t=d.inflateInit2(this.strm,t.windowBits);if(t!==b.Z_OK)throw new Error(n[t]);this.header=new a,d.inflateGetHeader(this.strm,this.header)}function s(e,t){t=new o(t);if(t.push(e,!0),t.err)throw t.msg||n[t.err];return t.result}o.prototype.push=function(e,t){var i,n,r,a,o,s=this.strm,f=this.options.chunkSize,l=this.options.dictionary,u=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?b.Z_FINISH:b.Z_NO_FLUSH,"string"==typeof e?s.input=c.binstring2buf(e):"[object ArrayBuffer]"===m.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new h.Buf8(f),s.next_out=0,s.avail_out=f),(i=d.inflate(s,b.Z_NO_FLUSH))===b.Z_NEED_DICT&&l&&(o="string"==typeof l?c.string2buf(l):"[object ArrayBuffer]"===m.call(l)?new Uint8Array(l):l,i=d.inflateSetDictionary(this.strm,o)),i===b.Z_BUF_ERROR&&!0===u&&(i=b.Z_OK,u=!1),i!==b.Z_STREAM_END&&i!==b.Z_OK)return this.onEnd(i),!(this.ended=!0)}while(s.next_out&&(0!==s.avail_out&&i!==b.Z_STREAM_END&&(0!==s.avail_in||n!==b.Z_FINISH&&n!==b.Z_SYNC_FLUSH)||("string"===this.options.to?(r=c.utf8border(s.output,s.next_out),a=s.next_out-r,o=c.buf2string(s.output,r),s.next_out=a,s.avail_out=f-a,a&&h.arraySet(s.output,s.output,r,a,0),this.onData(o)):this.onData(h.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(u=!0),(0<s.avail_in||0===s.avail_out)&&i!==b.Z_STREAM_END);return(n=i===b.Z_STREAM_END?b.Z_FINISH:n)===b.Z_FINISH?(i=d.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===b.Z_OK):n!==b.Z_SYNC_FLUSH||(this.onEnd(b.Z_OK),!(s.avail_out=0))},o.prototype.onData=function(e){this.chunks.push(e)},o.prototype.onEnd=function(e){e===b.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=o,i.inflate=s,i.inflateRaw=function(e,t){return(t=t||{}).raw=!0,s(e,t)},i.ungzip=s},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js"),p=Uint16Array.BYTES_PER_ELEMENT,y=Int32Array.BYTES_PER_ELEMENT,x=Uint32Array.BYTES_PER_ELEMENT,s={METADATA:0,TERRAIN:1,DBROOT:2};s.fromString=function(e){return"Metadata"===e?s.METADATA:"Terrain"===e?s.TERRAIN:"DbRoot"===e?s.DBROOT:void 0};var E=32301;var f=5,l=4;var u=1953029805,d=2917034100;return t(function(e,t){var i=s.fromString(e.type),n=e.buffer;h(e.key,n);var r=function(e){var t=new DataView(e),i=0,n=t.getUint32(0,!0);if(i+=x,n!==u&&n!==d)throw new k.RuntimeError("Invalid magic");n=t.getUint32(i,n===u);i+=x;i=new Uint8Array(e,i),i=o.inflate(i);if(i.length===n)return i;throw new k.RuntimeError("Size of packet doesn't match header")}(n),n=r.buffer,a=r.length;switch(i){case s.METADATA:return function(e,t,i){var n=new DataView(e),r=0,a=n.getUint32(r,!0);if(r+=x,a!==E)throw new k.RuntimeError("Invalid magic");var o=n.getUint32(r,!0);if(r+=x,1!==o)throw new k.RuntimeError("Invalid data type. Must be 1 for QuadTreePacket");var s=n.getUint32(r,!0);if(r+=x,2!==s)throw new k.RuntimeError("Invalid QuadTreePacket version. Only version 2 is supported.");var f=n.getInt32(r,!0);r+=y;e=n.getInt32(r,!0);if(r+=y,32!==e)throw new k.RuntimeError("Invalid instance size.");a=n.getInt32(r,!0);r+=y;o=n.getInt32(r,!0);r+=y;s=n.getInt32(r,!0);if(a!==f*e+(r+=y))throw new k.RuntimeError("Invalid dataBufferOffset");if(a+o+s!==t)throw new k.RuntimeError("Invalid packet offsets");for(var l=[],u=0;u<f;++u){var d=n.getUint8(r);++r,++r;var h=n.getUint16(r,!0);r+=p;var c=n.getUint16(r,!0);r+=p;var b=n.getUint16(r,!0);r+=p,r+=p,r+=p,r+=y,r+=y,r+=8;var m=n.getUint8(r++),w=n.getUint8(r++);r+=p,l.push(new _(d,h,c,b,m,w))}var g=[],v=0;s=0,t=l[v++];""===i?++s:g[i]=t;return function e(t,i,n){var r=!1;if(4===n){if(i.hasSubtree())return;r=!0}for(var a=0;a<4;++a){var o=t+a.toString();if(r)g[o]=null;else if(n<4)if(i.hasChild(a)){if(v===f)return void console.log("Incorrect number of instances");var s=l[v++];e(o,g[o]=s,n+1)}else g[o]=null}}(i,t,s),g}(n,a,e.quadKey);case s.TERRAIN:return function(e,n,t){var r=new DataView(e),i=0,a=[];for(;a.length<f;){var o=i;i=function(e){for(var t=0;t<l;++t){var i=r.getUint32(e,!0);if(e+=x,n<(e+=i))throw new k.RuntimeError("Malformed terrain packet found.")}return e}(i);o=e.slice(o,i);t.push(o),a.push(o)}return a}(n,a,t);case s.DBROOT:return t.push(n),{buffer:n}}})}); | ||
define(["./RuntimeError-ffe03243","./when-229515d6","./createTaskProcessorWorker"],(function(e,t,i){"use strict";function r(t,i){if(r.passThroughDataForTesting)return i;var n=t.byteLength;if(0===n||n%4!=0)throw new e.RuntimeError("The length of key must be greater than 0 and a multiple of 4.");var a=new DataView(i),o=a.getUint32(0,!0);if(1953029805===o||2917034100===o)return i;for(var s,f=new DataView(t),l=0,d=i.byteLength,h=d-d%8,c=n,u=8;l<h;)for(s=u=(u+8)%24;l<h&&s<c;)a.setUint32(l,a.getUint32(l,!0)^f.getUint32(s,!0),!0),a.setUint32(l+4,a.getUint32(l+4,!0)^f.getUint32(s+4,!0),!0),l+=8,s+=24;if(l<d)for(s>=c&&(s=u=(u+8)%24);l<d;)a.setUint8(l,a.getUint8(l)^f.getUint8(s)),l++,s++}function n(e,t){return 0!=(e&t)}r.passThroughDataForTesting=!1;var a=[1,2,4,8];function o(e,t,i,r,n,a){this._bits=e,this.cnodeVersion=t,this.imageryVersion=i,this.terrainVersion=r,this.imageryProvider=n,this.terrainProvider=a,this.ancestorHasTerrain=!1,this.terrainState=void 0}o.clone=function(e,i){return t.defined(i)?(i._bits=e._bits,i.cnodeVersion=e.cnodeVersion,i.imageryVersion=e.imageryVersion,i.terrainVersion=e.terrainVersion,i.imageryProvider=e.imageryProvider,i.terrainProvider=e.terrainProvider):i=new o(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),i.ancestorHasTerrain=e.ancestorHasTerrain,i.terrainState=e.terrainState,i},o.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},o.prototype.hasSubtree=function(){return n(this._bits,16)},o.prototype.hasImagery=function(){return n(this._bits,64)},o.prototype.hasTerrain=function(){return n(this._bits,128)},o.prototype.hasChildren=function(){return n(this._bits,15)},o.prototype.hasChild=function(e){return n(this._bits,a[e])},o.prototype.getChildBitmask=function(){return 15&this._bits};var s=t.createCommonjsModule((function(e,t){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)r(i,n)&&(e[n]=i[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,i,r,n){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+r),n);else for(var a=0;a<r;a++)e[n+a]=t[i+a]},flattenChunks:function(e){var t,i,r,n,a,o;for(r=0,t=0,i=e.length;t<i;t++)r+=e[t].length;for(o=new Uint8Array(r),n=0,t=0,i=e.length;t<i;t++)a=e[t],o.set(a,n),n+=a.length;return o}},a={arraySet:function(e,t,i,r,n){for(var a=0;a<r;a++)e[n+a]=t[i+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,n)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(i)}));var f=function(e,t,i,r){for(var n=65535&e|0,a=e>>>16&65535|0,o=0;0!==i;){i-=o=i>2e3?2e3:i;do{a=a+(n=n+t[r++]|0)|0}while(--o);n%=65521,a%=65521}return n|a<<16|0};var l=function(){for(var e,t=[],i=0;i<256;i++){e=i;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}();var d=function(e,t,i,r){var n=l,a=r+i;e^=-1;for(var o=r;o<a;o++)e=e>>>8^n[255&(e^t[o])];return-1^e},h=function(e,t){var i,r,n,a,o,s,f,l,d,h,c,u,w,b,m,v,g,k,p,y,_,x,B,E,A;i=e.state,r=e.next_in,E=e.input,n=r+(e.avail_in-5),a=e.next_out,A=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),f=i.dmax,l=i.wsize,d=i.whave,h=i.wnext,c=i.window,u=i.hold,w=i.bits,b=i.lencode,m=i.distcode,v=(1<<i.lenbits)-1,g=(1<<i.distbits)-1;e:do{w<15&&(u+=E[r++]<<w,w+=8,u+=E[r++]<<w,w+=8),k=b[u&v];t:for(;;){if(u>>>=p=k>>>24,w-=p,0===(p=k>>>16&255))A[a++]=65535&k;else{if(!(16&p)){if(0==(64&p)){k=b[(65535&k)+(u&(1<<p)-1)];continue t}if(32&p){i.mode=12;break e}e.msg="invalid literal/length code",i.mode=30;break e}y=65535&k,(p&=15)&&(w<p&&(u+=E[r++]<<w,w+=8),y+=u&(1<<p)-1,u>>>=p,w-=p),w<15&&(u+=E[r++]<<w,w+=8,u+=E[r++]<<w,w+=8),k=m[u&g];i:for(;;){if(u>>>=p=k>>>24,w-=p,!(16&(p=k>>>16&255))){if(0==(64&p)){k=m[(65535&k)+(u&(1<<p)-1)];continue i}e.msg="invalid distance code",i.mode=30;break e}if(_=65535&k,w<(p&=15)&&(u+=E[r++]<<w,(w+=8)<p&&(u+=E[r++]<<w,w+=8)),(_+=u&(1<<p)-1)>f){e.msg="invalid distance too far back",i.mode=30;break e}if(u>>>=p,w-=p,_>(p=a-o)){if((p=_-p)>d&&i.sane){e.msg="invalid distance too far back",i.mode=30;break e}if(x=0,B=c,0===h){if(x+=l-p,p<y){y-=p;do{A[a++]=c[x++]}while(--p);x=a-_,B=A}}else if(h<p){if(x+=l+h-p,(p-=h)<y){y-=p;do{A[a++]=c[x++]}while(--p);if(x=0,h<y){y-=p=h;do{A[a++]=c[x++]}while(--p);x=a-_,B=A}}}else if(x+=h-p,p<y){y-=p;do{A[a++]=c[x++]}while(--p);x=a-_,B=A}for(;y>2;)A[a++]=B[x++],A[a++]=B[x++],A[a++]=B[x++],y-=3;y&&(A[a++]=B[x++],y>1&&(A[a++]=B[x++]))}else{x=a-_;do{A[a++]=A[x++],A[a++]=A[x++],A[a++]=A[x++],y-=3}while(y>2);y&&(A[a++]=A[x++],y>1&&(A[a++]=A[x++]))}break}}break}}while(r<n&&a<s);r-=y=w>>3,u&=(1<<(w-=y<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<n?n-r+5:5-(r-n),e.avail_out=a<s?s-a+257:257-(a-s),i.hold=u,i.bits=w},c=15,u=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],w=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],b=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],m=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],v=function(e,t,i,r,n,a,o,f){var l,d,h,v,g,k,p,y,_,x=f.bits,B=0,E=0,A=0,T=0,U=0,S=0,R=0,C=0,I=0,z=0,D=null,V=0,P=new s.Buf16(16),O=new s.Buf16(16),M=null,j=0;for(B=0;B<=c;B++)P[B]=0;for(E=0;E<r;E++)P[t[i+E]]++;for(U=x,T=c;T>=1&&0===P[T];T--);if(U>T&&(U=T),0===T)return n[a++]=20971520,n[a++]=20971520,f.bits=1,0;for(A=1;A<T&&0===P[A];A++);for(U<A&&(U=A),C=1,B=1;B<=c;B++)if(C<<=1,(C-=P[B])<0)return-1;if(C>0&&(0===e||1!==T))return-1;for(O[1]=0,B=1;B<c;B++)O[B+1]=O[B]+P[B];for(E=0;E<r;E++)0!==t[i+E]&&(o[O[t[i+E]]++]=E);if(0===e?(D=M=o,k=19):1===e?(D=u,V-=257,M=w,j-=257,k=256):(D=b,M=m,k=-1),z=0,E=0,B=A,g=a,S=U,R=0,h=-1,v=(I=1<<U)-1,1===e&&I>852||2===e&&I>592)return 1;for(;;){p=B-R,o[E]<k?(y=0,_=o[E]):o[E]>k?(y=M[j+o[E]],_=D[V+o[E]]):(y=96,_=0),l=1<<B-R,A=d=1<<S;do{n[g+(z>>R)+(d-=l)]=p<<24|y<<16|_|0}while(0!==d);for(l=1<<B-1;z&l;)l>>=1;if(0!==l?(z&=l-1,z+=l):z=0,E++,0==--P[B]){if(B===T)break;B=t[i+o[E]]}if(B>U&&(z&v)!==h){for(0===R&&(R=U),g+=A,C=1<<(S=B-R);S+R<T&&!((C-=P[S+R])<=0);)S++,C<<=1;if(I+=1<<S,1===e&&I>852||2===e&&I>592)return 1;n[h=z&v]=U<<24|S<<16|g-a|0}}return 0!==z&&(n[g+z]=B-R<<24|64<<16|0),f.bits=U,0},g=-2,k=12,p=30;function y(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function _(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function x(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new s.Buf32(852),t.distcode=t.distdyn=new s.Buf32(592),t.sane=1,t.back=-1,0):g}function B(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,x(e)):g}function E(e,t){var i,r;return e&&e.state?(r=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?g:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=i,r.wbits=t,B(e))):g}function A(e,t){var i,r;return e?(r=new _,e.state=r,r.window=null,0!==(i=E(e,t))&&(e.state=null),i):g}var T,U,S=!0;function R(e){if(S){var t;for(T=new s.Buf32(512),U=new s.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(v(1,e.lens,0,288,T,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;v(2,e.lens,0,32,U,0,e.work,{bits:5}),S=!1}e.lencode=T,e.lenbits=9,e.distcode=U,e.distbits=5}function C(e,t,i,r){var n,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new s.Buf8(a.wsize)),r>=a.wsize?(s.arraySet(a.window,t,i-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((n=a.wsize-a.wnext)>r&&(n=r),s.arraySet(a.window,t,i-r,n,a.wnext),(r-=n)?(s.arraySet(a.window,t,i-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}var I={inflateReset:B,inflateReset2:E,inflateResetKeep:x,inflateInit:function(e){return A(e,15)},inflateInit2:A,inflate:function(e,t){var i,r,n,a,o,l,c,u,w,b,m,_,x,B,E,A,T,U,S,I,z,D,V,P,O=0,M=new s.Buf8(4),j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return g;(i=e.state).mode===k&&(i.mode=13),o=e.next_out,n=e.output,c=e.avail_out,a=e.next_in,r=e.input,l=e.avail_in,u=i.hold,w=i.bits,b=l,m=c,D=0;e:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;w<16;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}if(2&i.wrap&&35615===u){i.check=0,M[0]=255&u,M[1]=u>>>8&255,i.check=d(i.check,M,2,0),u=0,w=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",i.mode=p;break}if(8!=(15&u)){e.msg="unknown compression method",i.mode=p;break}if(w-=4,z=8+(15&(u>>>=4)),0===i.wbits)i.wbits=z;else if(z>i.wbits){e.msg="invalid window size",i.mode=p;break}i.dmax=1<<z,e.adler=i.check=1,i.mode=512&u?10:k,u=0,w=0;break;case 2:for(;w<16;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}if(i.flags=u,8!=(255&i.flags)){e.msg="unknown compression method",i.mode=p;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=p;break}i.head&&(i.head.text=u>>8&1),512&i.flags&&(M[0]=255&u,M[1]=u>>>8&255,i.check=d(i.check,M,2,0)),u=0,w=0,i.mode=3;case 3:for(;w<32;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}i.head&&(i.head.time=u),512&i.flags&&(M[0]=255&u,M[1]=u>>>8&255,M[2]=u>>>16&255,M[3]=u>>>24&255,i.check=d(i.check,M,4,0)),u=0,w=0,i.mode=4;case 4:for(;w<16;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}i.head&&(i.head.xflags=255&u,i.head.os=u>>8),512&i.flags&&(M[0]=255&u,M[1]=u>>>8&255,i.check=d(i.check,M,2,0)),u=0,w=0,i.mode=5;case 5:if(1024&i.flags){for(;w<16;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}i.length=u,i.head&&(i.head.extra_len=u),512&i.flags&&(M[0]=255&u,M[1]=u>>>8&255,i.check=d(i.check,M,2,0)),u=0,w=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&((_=i.length)>l&&(_=l),_&&(i.head&&(z=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),s.arraySet(i.head.extra,r,a,_,z)),512&i.flags&&(i.check=d(i.check,r,_,a)),l-=_,a+=_,i.length-=_),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===l)break e;_=0;do{z=r[a+_++],i.head&&z&&i.length<65536&&(i.head.name+=String.fromCharCode(z))}while(z&&_<l);if(512&i.flags&&(i.check=d(i.check,r,_,a)),l-=_,a+=_,z)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===l)break e;_=0;do{z=r[a+_++],i.head&&z&&i.length<65536&&(i.head.comment+=String.fromCharCode(z))}while(z&&_<l);if(512&i.flags&&(i.check=d(i.check,r,_,a)),l-=_,a+=_,z)break e}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;w<16;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}if(u!==(65535&i.check)){e.msg="header crc mismatch",i.mode=p;break}u=0,w=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=k;break;case 10:for(;w<32;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}e.adler=i.check=y(u),u=0,w=0,i.mode=11;case 11:if(0===i.havedict)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=l,i.hold=u,i.bits=w,2;e.adler=i.check=1,i.mode=k;case k:if(5===t||6===t)break e;case 13:if(i.last){u>>>=7&w,w-=7&w,i.mode=27;break}for(;w<3;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}switch(i.last=1&u,w-=1,3&(u>>>=1)){case 0:i.mode=14;break;case 1:if(R(i),i.mode=20,6===t){u>>>=2,w-=2;break e}break;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=p}u>>>=2,w-=2;break;case 14:for(u>>>=7&w,w-=7&w;w<32;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",i.mode=p;break}if(i.length=65535&u,u=0,w=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(_=i.length){if(_>l&&(_=l),_>c&&(_=c),0===_)break e;s.arraySet(n,r,a,_,o),l-=_,a+=_,c-=_,o+=_,i.length-=_;break}i.mode=k;break;case 17:for(;w<14;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}if(i.nlen=257+(31&u),u>>>=5,w-=5,i.ndist=1+(31&u),u>>>=5,w-=5,i.ncode=4+(15&u),u>>>=4,w-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=p;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;w<3;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}i.lens[j[i.have++]]=7&u,u>>>=3,w-=3}for(;i.have<19;)i.lens[j[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,V={bits:i.lenbits},D=v(0,i.lens,0,19,i.lencode,0,i.work,V),i.lenbits=V.bits,D){e.msg="invalid code lengths set",i.mode=p;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;A=(O=i.lencode[u&(1<<i.lenbits)-1])>>>16&255,T=65535&O,!((E=O>>>24)<=w);){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}if(T<16)u>>>=E,w-=E,i.lens[i.have++]=T;else{if(16===T){for(P=E+2;w<P;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}if(u>>>=E,w-=E,0===i.have){e.msg="invalid bit length repeat",i.mode=p;break}z=i.lens[i.have-1],_=3+(3&u),u>>>=2,w-=2}else if(17===T){for(P=E+3;w<P;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}w-=E,z=0,_=3+(7&(u>>>=E)),u>>>=3,w-=3}else{for(P=E+7;w<P;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}w-=E,z=0,_=11+(127&(u>>>=E)),u>>>=7,w-=7}if(i.have+_>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=p;break}for(;_--;)i.lens[i.have++]=z}}if(i.mode===p)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=p;break}if(i.lenbits=9,V={bits:i.lenbits},D=v(1,i.lens,0,i.nlen,i.lencode,0,i.work,V),i.lenbits=V.bits,D){e.msg="invalid literal/lengths set",i.mode=p;break}if(i.distbits=6,i.distcode=i.distdyn,V={bits:i.distbits},D=v(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,V),i.distbits=V.bits,D){e.msg="invalid distances set",i.mode=p;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(l>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=l,i.hold=u,i.bits=w,h(e,m),o=e.next_out,n=e.output,c=e.avail_out,a=e.next_in,r=e.input,l=e.avail_in,u=i.hold,w=i.bits,i.mode===k&&(i.back=-1);break}for(i.back=0;A=(O=i.lencode[u&(1<<i.lenbits)-1])>>>16&255,T=65535&O,!((E=O>>>24)<=w);){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}if(A&&0==(240&A)){for(U=E,S=A,I=T;A=(O=i.lencode[I+((u&(1<<U+S)-1)>>U)])>>>16&255,T=65535&O,!(U+(E=O>>>24)<=w);){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}u>>>=U,w-=U,i.back+=U}if(u>>>=E,w-=E,i.back+=E,i.length=T,0===A){i.mode=26;break}if(32&A){i.back=-1,i.mode=k;break}if(64&A){e.msg="invalid literal/length code",i.mode=p;break}i.extra=15&A,i.mode=22;case 22:if(i.extra){for(P=i.extra;w<P;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}i.length+=u&(1<<i.extra)-1,u>>>=i.extra,w-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;A=(O=i.distcode[u&(1<<i.distbits)-1])>>>16&255,T=65535&O,!((E=O>>>24)<=w);){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}if(0==(240&A)){for(U=E,S=A,I=T;A=(O=i.distcode[I+((u&(1<<U+S)-1)>>U)])>>>16&255,T=65535&O,!(U+(E=O>>>24)<=w);){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}u>>>=U,w-=U,i.back+=U}if(u>>>=E,w-=E,i.back+=E,64&A){e.msg="invalid distance code",i.mode=p;break}i.offset=T,i.extra=15&A,i.mode=24;case 24:if(i.extra){for(P=i.extra;w<P;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}i.offset+=u&(1<<i.extra)-1,u>>>=i.extra,w-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=p;break}i.mode=25;case 25:if(0===c)break e;if(_=m-c,i.offset>_){if((_=i.offset-_)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=p;break}_>i.wnext?(_-=i.wnext,x=i.wsize-_):x=i.wnext-_,_>i.length&&(_=i.length),B=i.window}else B=n,x=o-i.offset,_=i.length;_>c&&(_=c),c-=_,i.length-=_;do{n[o++]=B[x++]}while(--_);0===i.length&&(i.mode=21);break;case 26:if(0===c)break e;n[o++]=i.length,c--,i.mode=21;break;case 27:if(i.wrap){for(;w<32;){if(0===l)break e;l--,u|=r[a++]<<w,w+=8}if(m-=c,e.total_out+=m,i.total+=m,m&&(e.adler=i.check=i.flags?d(i.check,n,m,o-m):f(i.check,n,m,o-m)),m=c,(i.flags?u:y(u))!==i.check){e.msg="incorrect data check",i.mode=p;break}u=0,w=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;w<32;){if(0===l)break e;l--,u+=r[a++]<<w,w+=8}if(u!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=p;break}u=0,w=0}i.mode=29;case 29:D=1;break e;case p:D=-3;break e;case 31:return-4;default:return g}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=l,i.hold=u,i.bits=w,(i.wsize||m!==e.avail_out&&i.mode<p&&(i.mode<27||4!==t))&&C(e,e.output,e.next_out,m-e.avail_out),b-=e.avail_in,m-=e.avail_out,e.total_in+=b,e.total_out+=m,i.total+=m,i.wrap&&m&&(e.adler=i.check=i.flags?d(i.check,n,m,e.next_out-m):f(i.check,n,m,e.next_out-m)),e.data_type=i.bits+(i.last?64:0)+(i.mode===k?128:0)+(20===i.mode||15===i.mode?256:0),(0===b&&0===m||4===t)&&0===D&&(D=-5),D},inflateEnd:function(e){if(!e||!e.state)return g;var t=e.state;return t.window&&(t.window=null),e.state=null,0},inflateGetHeader:function(e,t){var i;return e&&e.state?0==(2&(i=e.state).wrap)?g:(i.head=t,t.done=!1,0):g},inflateSetDictionary:function(e,t){var i,r=t.length;return e&&e.state?0!==(i=e.state).wrap&&11!==i.mode?g:11===i.mode&&f(1,t,r,0)!==i.check?-3:C(e,t,r,r)?(i.mode=31,-4):(i.havedict=1,0):g},inflateInfo:"pako inflate (from Nodeca project)"},z=!0,D=!0;try{String.fromCharCode.apply(null,[0])}catch(e){z=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){D=!1}for(var V=new s.Buf8(256),P=0;P<256;P++)V[P]=P>=252?6:P>=248?5:P>=240?4:P>=224?3:P>=192?2:1;V[254]=V[254]=1;function O(e,t){if(t<65534&&(e.subarray&&D||!e.subarray&&z))return String.fromCharCode.apply(null,s.shrinkBuf(e,t));for(var i="",r=0;r<t;r++)i+=String.fromCharCode(e[r]);return i}var M=function(e){var t,i,r,n,a,o=e.length,f=0;for(n=0;n<o;n++)55296==(64512&(i=e.charCodeAt(n)))&&n+1<o&&56320==(64512&(r=e.charCodeAt(n+1)))&&(i=65536+(i-55296<<10)+(r-56320),n++),f+=i<128?1:i<2048?2:i<65536?3:4;for(t=new s.Buf8(f),a=0,n=0;a<f;n++)55296==(64512&(i=e.charCodeAt(n)))&&n+1<o&&56320==(64512&(r=e.charCodeAt(n+1)))&&(i=65536+(i-55296<<10)+(r-56320),n++),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t},j=function(e){for(var t=new s.Buf8(e.length),i=0,r=t.length;i<r;i++)t[i]=e.charCodeAt(i);return t},H=function(e,t){var i,r,n,a,o=t||e.length,s=new Array(2*o);for(r=0,i=0;i<o;)if((n=e[i++])<128)s[r++]=n;else if((a=V[n])>4)s[r++]=65533,i+=a-1;else{for(n&=2===a?31:3===a?15:7;a>1&&i<o;)n=n<<6|63&e[i++],a--;a>1?s[r++]=65533:n<65536?s[r++]=n:(n-=65536,s[r++]=55296|n>>10&1023,s[r++]=56320|1023&n)}return O(s,r)},N=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+V[e[i]]>t?i:t},L=0,Y=2,F=4,G=0,K=1,Q=2,q=-5,W={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};var J=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};var X=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},Z=Object.prototype.toString;function $(e){if(!(this instanceof $))return new $(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new J,this.strm.avail_out=0;var i=I.inflateInit2(this.strm,t.windowBits);if(i!==G)throw new Error(W[i]);if(this.header=new X,I.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=M(t.dictionary):"[object ArrayBuffer]"===Z.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=I.inflateSetDictionary(this.strm,t.dictionary))!==G))throw new Error(W[i])}function ee(e,t){var i=new $(t);if(i.push(e,!0),i.err)throw i.msg||W[i.err];return i.result}$.prototype.push=function(e,t){var i,r,n,a,o,f=this.strm,l=this.options.chunkSize,d=this.options.dictionary,h=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?F:L,"string"==typeof e?f.input=j(e):"[object ArrayBuffer]"===Z.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new s.Buf8(l),f.next_out=0,f.avail_out=l),(i=I.inflate(f,L))===Q&&d&&(i=I.inflateSetDictionary(this.strm,d)),i===q&&!0===h&&(i=G,h=!1),i!==K&&i!==G)return this.onEnd(i),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&i!==K&&(0!==f.avail_in||r!==F&&r!==Y)||("string"===this.options.to?(n=N(f.output,f.next_out),a=f.next_out-n,o=H(f.output,n),f.next_out=a,f.avail_out=l-a,a&&s.arraySet(f.output,f.output,n,a,0),this.onData(o)):this.onData(s.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(h=!0)}while((f.avail_in>0||0===f.avail_out)&&i!==K);return i===K&&(r=F),r===F?(i=I.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===G):r!==Y||(this.onEnd(G),f.avail_out=0,!0)},$.prototype.onData=function(e){this.chunks.push(e)},$.prototype.onEnd=function(e){e===G&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var te={Inflate:$,inflate:ee,inflateRaw:function(e,t){return(t=t||{}).raw=!0,ee(e,t)},ungzip:ee},ie=Uint16Array.BYTES_PER_ELEMENT,re=Int32Array.BYTES_PER_ELEMENT,ne=Uint32Array.BYTES_PER_ELEMENT,ae={METADATA:0,TERRAIN:1,DBROOT:2};ae.fromString=function(e){return"Metadata"===e?ae.METADATA:"Terrain"===e?ae.TERRAIN:"DbRoot"===e?ae.DBROOT:void 0};var oe=1953029805,se=2917034100;return i((function(t,i){var n=ae.fromString(t.type),a=t.buffer;r(t.key,a);var s=function(t){var i=new DataView(t),r=0,n=i.getUint32(r,!0);if(r+=ne,n!==oe&&n!==se)throw new e.RuntimeError("Invalid magic");var a=i.getUint32(r,n===oe);r+=ne;var o=new Uint8Array(t,r),s=te.inflate(o);if(s.length!==a)throw new e.RuntimeError("Size of packet doesn't match header");return s}(a);a=s.buffer;var f=s.length;switch(n){case ae.METADATA:return function(t,i,r){var n=new DataView(t),a=0,s=n.getUint32(a,!0);if(a+=ne,32301!==s)throw new e.RuntimeError("Invalid magic");var f=n.getUint32(a,!0);if(a+=ne,1!==f)throw new e.RuntimeError("Invalid data type. Must be 1 for QuadTreePacket");var l=n.getUint32(a,!0);if(a+=ne,2!==l)throw new e.RuntimeError("Invalid QuadTreePacket version. Only version 2 is supported.");var d=n.getInt32(a,!0);a+=re;var h=n.getInt32(a,!0);if(a+=re,32!==h)throw new e.RuntimeError("Invalid instance size.");var c=n.getInt32(a,!0);a+=re;var u=n.getInt32(a,!0);a+=re;var w=n.getInt32(a,!0);if(c!==d*h+(a+=re))throw new e.RuntimeError("Invalid dataBufferOffset");if(c+u+w!==i)throw new e.RuntimeError("Invalid packet offsets");for(var b=[],m=0;m<d;++m){var v=n.getUint8(a);++a,++a;var g=n.getUint16(a,!0);a+=ie;var k=n.getUint16(a,!0);a+=ie;var p=n.getUint16(a,!0);a+=ie,a+=ie,a+=ie,a+=re,a+=re,a+=8;var y=n.getUint8(a++),_=n.getUint8(a++);a+=ie,b.push(new o(v,g,k,p,y,_))}var x=[],B=0;function E(e,t,i){var r=!1;if(4===i){if(t.hasSubtree())return;r=!0}for(var n=0;n<4;++n){var a=e+n.toString();if(r)x[a]=null;else if(i<4)if(t.hasChild(n)){if(B===d)return void console.log("Incorrect number of instances");var o=b[B++];x[a]=o,E(a,o,i+1)}else x[a]=null}}var A=0,T=b[B++];""===r?++A:x[r]=T;return E(r,T,A),x}(a,f,t.quadKey);case ae.TERRAIN:return function(t,i,r){var n=new DataView(t),a=function(t){for(var r=0;r<4;++r){var a=n.getUint32(t,!0);if(t+=ne,(t+=a)>i)throw new e.RuntimeError("Malformed terrain packet found.")}return t},o=0,s=[];for(;s.length<5;){var f=o;o=a(o);var l=t.slice(f,o);r.push(l),s.push(l)}return s}(a,f,i);case ae.DBROOT:return i.push(a),{buffer:a}}}))})); |
@@ -1,1 +0,1 @@ | ||
define(["./when-7b580518","./Check-3917d765","./WebGLConstants-4e26b85a","./RuntimeError-fad4d3c6","./createTaskProcessorWorker"],function(s,_,t,S,R){"use strict";var A,e,T,O,n,B,G,M,C,K={UNSIGNED_BYTE:t.WebGLConstants.UNSIGNED_BYTE,UNSIGNED_SHORT:t.WebGLConstants.UNSIGNED_SHORT,UNSIGNED_INT:t.WebGLConstants.UNSIGNED_INT,FLOAT:t.WebGLConstants.FLOAT,HALF_FLOAT:t.WebGLConstants.HALF_FLOAT_OES,UNSIGNED_INT_24_8:t.WebGLConstants.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:t.WebGLConstants.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:t.WebGLConstants.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:t.WebGLConstants.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(_,R){switch(_){case K.UNSIGNED_BYTE:return t.WebGLConstants.UNSIGNED_BYTE;case K.UNSIGNED_SHORT:return t.WebGLConstants.UNSIGNED_SHORT;case K.UNSIGNED_INT:return t.WebGLConstants.UNSIGNED_INT;case K.FLOAT:return t.WebGLConstants.FLOAT;case K.HALF_FLOAT:return R.webgl2?t.WebGLConstants.HALF_FLOAT:t.WebGLConstants.HALF_FLOAT_OES;case K.UNSIGNED_INT_24_8:return t.WebGLConstants.UNSIGNED_INT_24_8;case K.UNSIGNED_SHORT_4_4_4_4:return t.WebGLConstants.UNSIGNED_SHORT_4_4_4_4;case K.UNSIGNED_SHORT_5_5_5_1:return t.WebGLConstants.UNSIGNED_SHORT_5_5_5_1;case K.UNSIGNED_SHORT_5_6_5:return K.UNSIGNED_SHORT_5_6_5}},isPacked:function(_){return _===K.UNSIGNED_INT_24_8||_===K.UNSIGNED_SHORT_4_4_4_4||_===K.UNSIGNED_SHORT_5_5_5_1||_===K.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(_){switch(_){case K.UNSIGNED_BYTE:return 1;case K.UNSIGNED_SHORT:case K.UNSIGNED_SHORT_4_4_4_4:case K.UNSIGNED_SHORT_5_5_5_1:case K.UNSIGNED_SHORT_5_6_5:case K.HALF_FLOAT:return 2;case K.UNSIGNED_INT:case K.FLOAT:case K.UNSIGNED_INT_24_8:return 4}},validate:function(_){return _===K.UNSIGNED_BYTE||_===K.UNSIGNED_SHORT||_===K.UNSIGNED_INT||_===K.FLOAT||_===K.HALF_FLOAT||_===K.UNSIGNED_INT_24_8||_===K.UNSIGNED_SHORT_4_4_4_4||_===K.UNSIGNED_SHORT_5_5_5_1||_===K.UNSIGNED_SHORT_5_6_5}},r=Object.freeze(K),F={DEPTH_COMPONENT:t.WebGLConstants.DEPTH_COMPONENT,DEPTH_STENCIL:t.WebGLConstants.DEPTH_STENCIL,ALPHA:t.WebGLConstants.ALPHA,RGB:t.WebGLConstants.RGB,RGBA:t.WebGLConstants.RGBA,LUMINANCE:t.WebGLConstants.LUMINANCE,LUMINANCE_ALPHA:t.WebGLConstants.LUMINANCE_ALPHA,RGB_DXT1:t.WebGLConstants.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:t.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:t.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:t.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:t.WebGLConstants.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:t.WebGLConstants.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:t.WebGLConstants.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:t.WebGLConstants.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:t.WebGLConstants.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:t.WebGLConstants.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:t.WebGLConstants.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:t.WebGLConstants.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:t.WebGLConstants.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(_){switch(_){case F.RGB:return 3;case F.RGBA:return 4;case F.LUMINANCE_ALPHA:return 2;case F.ALPHA:case F.LUMINANCE:default:return 1}},validate:function(_){return _===F.DEPTH_COMPONENT||_===F.DEPTH_STENCIL||_===F.ALPHA||_===F.RGB||_===F.RGBA||_===F.LUMINANCE||_===F.LUMINANCE_ALPHA||_===F.RGB_DXT1||_===F.RGBA_DXT1||_===F.RGBA_DXT3||_===F.RGBA_DXT5||_===F.RGB_PVRTC_4BPPV1||_===F.RGB_PVRTC_2BPPV1||_===F.RGBA_PVRTC_4BPPV1||_===F.RGBA_PVRTC_2BPPV1||_===F.RGBA_ASTC||_===F.RGB_ETC1||_===F.RGB8_ETC2||_===F.RGBA8_ETC2_EAC||_===F.RGBA_BC7},isColorFormat:function(_){return _===F.ALPHA||_===F.RGB||_===F.RGBA||_===F.LUMINANCE||_===F.LUMINANCE_ALPHA},isDepthFormat:function(_){return _===F.DEPTH_COMPONENT||_===F.DEPTH_STENCIL},isCompressedFormat:function(_){return _===F.RGB_DXT1||_===F.RGBA_DXT1||_===F.RGBA_DXT3||_===F.RGBA_DXT5||_===F.RGB_PVRTC_4BPPV1||_===F.RGB_PVRTC_2BPPV1||_===F.RGBA_PVRTC_4BPPV1||_===F.RGBA_PVRTC_2BPPV1||_===F.RGBA_ASTC||_===F.RGB_ETC1||_===F.RGB8_ETC2||_===F.RGBA8_ETC2_EAC||_===F.RGBA_BC7},isDXTFormat:function(_){return _===F.RGB_DXT1||_===F.RGBA_DXT1||_===F.RGBA_DXT3||_===F.RGBA_DXT5},isPVRTCFormat:function(_){return _===F.RGB_PVRTC_4BPPV1||_===F.RGB_PVRTC_2BPPV1||_===F.RGBA_PVRTC_4BPPV1||_===F.RGBA_PVRTC_2BPPV1},isASTCFormat:function(_){return _===F.RGBA_ASTC},isETC1Format:function(_){return _===F.RGB_ETC1},isETC2Format:function(_){return _===F.RGB8_ETC2||_===F.RGBA8_ETC2_EAC},isBC7Format:function(_){return _===F.RGBA_BC7},compressedTextureSizeInBytes:function(_,R,A){switch(_){case F.RGB_DXT1:case F.RGBA_DXT1:case F.RGB_ETC1:case F.RGB8_ETC2:return Math.floor((R+3)/4)*Math.floor((A+3)/4)*8;case F.RGBA_DXT3:case F.RGBA_DXT5:case F.RGBA_ASTC:case F.RGBA8_ETC2_EAC:return Math.floor((R+3)/4)*Math.floor((A+3)/4)*16;case F.RGB_PVRTC_4BPPV1:case F.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(R,8)*Math.max(A,8)*4+7)/8);case F.RGB_PVRTC_2BPPV1:case F.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(R,16)*Math.max(A,8)*2+7)/8);case F.RGBA_BC7:return Math.ceil(R/4)*Math.ceil(A/4)*16;default:return 0}},textureSizeInBytes:function(_,R,A,t){_=F.componentsLength(_);return(_=r.isPacked(R)?1:_)*r.sizeInBytes(R)*A*t},alignmentInBytes:function(_,R,A){A=F.textureSizeInBytes(_,R,A,1)%4;return 0==A?4:2==A?2:1},createTypedArray:function(_,R,A,t){var e=r.sizeInBytes(R),R=e===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:e===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:e===Float32Array.BYTES_PER_ELEMENT&&R===r.FLOAT?Float32Array:Uint32Array;return new R(F.componentsLength(_)*A*t)},flipY:function(_,R,A,t,e){if(1===e)return _;for(var T=F.createTypedArray(R,A,t,e),O=F.componentsLength(R),n=t*O,B=0;B<e;++B)for(var G=B*t*O,M=(e-B-1)*t*O,C=0;C<n;++C)T[M+C]=_[G+C];return T},toInternalFormat:function(_,R,A){if(!A.webgl2)return _;if(_===F.DEPTH_STENCIL)return t.WebGLConstants.DEPTH24_STENCIL8;if(_===F.DEPTH_COMPONENT){if(R===r.UNSIGNED_SHORT)return t.WebGLConstants.DEPTH_COMPONENT16;if(R===r.UNSIGNED_INT)return t.WebGLConstants.DEPTH_COMPONENT24}if(R===r.FLOAT)switch(_){case F.RGBA:return t.WebGLConstants.RGBA32F;case F.RGB:return t.WebGLConstants.RGB32F;case F.RG:return t.WebGLConstants.RG32F;case F.R:return t.WebGLConstants.R32F}if(R===r.HALF_FLOAT)switch(_){case F.RGBA:return t.WebGLConstants.RGBA16F;case F.RGB:return t.WebGLConstants.RGB16F;case F.RG:return t.WebGLConstants.RG16F;case F.R:return t.WebGLConstants.R16F}return _}},i=Object.freeze(F),N=Object.freeze({VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033});const X=[171,75,84,88,32,50,48,187,13,10,26,10];(C=A=A||{})[C.NONE=0]="NONE",C[C.BASISLZ=1]="BASISLZ",C[C.ZSTD=2]="ZSTD",C[C.ZLIB=3]="ZLIB",e=e||{},e[e.BASICFORMAT=0]="BASICFORMAT",(C=T=T||{})[C.UNSPECIFIED=0]="UNSPECIFIED",C[C.ETC1S=163]="ETC1S",C[C.UASTC=166]="UASTC",(C=O=O||{})[C.UNSPECIFIED=0]="UNSPECIFIED",C[C.SRGB=1]="SRGB",(M=M=M||{})[M.UNSPECIFIED=0]="UNSPECIFIED",M[M.LINEAR=1]="LINEAR",M[M.SRGB=2]="SRGB",M[M.ITU=3]="ITU",M[M.NTSC=4]="NTSC",M[M.SLOG=5]="SLOG",M[M.SLOG2=6]="SLOG2",(M=n=n||{})[M.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",M[M.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED",(G=G=G||{})[G.RGB=0]="RGB",G[G.RRR=3]="RRR",G[G.GGG=4]="GGG",G[G.AAA=15]="AAA",(B=B=B||{})[B.RGB=0]="RGB",B[B.RGBA=3]="RGBA",B[B.RRR=4]="RRR",B[B.RRRG=5]="RRRG";class D{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=A.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:e.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:T.UNSPECIFIED,colorPrimaries:O.SRGB,transferFunction:O.SRGB,flags:n.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class l{constructor(_,R,A,t){this._dataView=new DataView(_.buffer,_.byteOffset+R,A),this._littleEndian=t,this._offset=0}_nextUint8(){var _=this._dataView.getUint8(this._offset);return this._offset+=1,_}_nextUint16(){var _=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,_}_nextUint32(){var _=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,_}_nextUint64(){var _=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,_}_skip(_){return this._offset+=_,this}_scan(_,R=0){var A=this._offset;let t=0;for(;this._dataView.getUint8(this._offset)!==R&&t<_;)t++,this._offset++;return t<_&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+A,t)}}function u(_){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(_):Buffer.from(_).toString("utf8")}var V,a=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"],U=163,E=166;function L(_,R){var A,t=_.ktx2Buffer,e=_.supportedTargetFormats;try{A=function(R){const _=new Uint8Array(R.buffer,R.byteOffset,X.length);if(_[0]!==X[0]||_[1]!==X[1]||_[2]!==X[2]||_[3]!==X[3]||_[4]!==X[4]||_[5]!==X[5]||_[6]!==X[6]||_[7]!==X[7]||_[8]!==X[8]||_[9]!==X[9]||_[10]!==X[10]||_[11]!==X[11])throw new Error("Missing KTX 2.0 identifier.");const A=new D,t=17*Uint32Array.BYTES_PER_ELEMENT,e=new l(R,X.length,t,!0);A.vkFormat=e._nextUint32(),A.typeSize=e._nextUint32(),A.pixelWidth=e._nextUint32(),A.pixelHeight=e._nextUint32(),A.pixelDepth=e._nextUint32(),A.layerCount=e._nextUint32(),A.faceCount=e._nextUint32();var T=e._nextUint32();A.supercompressionScheme=e._nextUint32();const O=e._nextUint32(),n=e._nextUint32(),B=e._nextUint32(),G=e._nextUint32(),M=e._nextUint64(),C=e._nextUint64(),K=new l(R,X.length+t,3*T*8,!0);for(let _=0;_<T;_++)A.levels.push({levelData:new Uint8Array(R.buffer,R.byteOffset+K._nextUint64(),K._nextUint64()),uncompressedByteLength:K._nextUint64()});const r=new l(R,O,n,!0),F={vendorId:r._skip(4)._nextUint16(),descriptorType:r._nextUint16(),versionNumber:r._nextUint16(),descriptorBlockSize:r._nextUint16(),colorModel:r._nextUint8(),colorPrimaries:r._nextUint8(),transferFunction:r._nextUint8(),flags:r._nextUint8(),texelBlockDimension:{x:r._nextUint8()+1,y:r._nextUint8()+1,z:r._nextUint8()+1,w:r._nextUint8()+1},bytesPlane:[r._nextUint8(),r._nextUint8(),r._nextUint8(),r._nextUint8(),r._nextUint8(),r._nextUint8(),r._nextUint8(),r._nextUint8()],samples:[]},N=(F.descriptorBlockSize/4-6)/4;for(let _=0;_<N;_++)F.samples[_]={bitOffset:r._nextUint16(),bitLength:r._nextUint8(),channelID:r._nextUint8(),samplePosition:[r._nextUint8(),r._nextUint8(),r._nextUint8(),r._nextUint8()],sampleLower:r._nextUint32(),sampleUpper:r._nextUint32()};A.dataFormatDescriptor.length=0,A.dataFormatDescriptor.push(F);const s=new l(R,B,G,!0);for(;s._offset<G;){const R=s._nextUint32(),X=s._scan(R),_=u(X),t=s._scan(R-X.byteLength);A.keyValue[_]=_.match(/^ktx/i)?u(t):t,s._offset%4&&s._skip(4-s._offset%4)}if(C<=0)return A;const S=new l(R,M,C,!0),i=S._nextUint16(),V=S._nextUint16(),a=S._nextUint32(),U=S._nextUint32(),E=S._nextUint32(),L=S._nextUint32(),o=[];for(let _=0;_<T;_++)o.push({imageFlags:S._nextUint32(),rgbSliceByteOffset:S._nextUint32(),rgbSliceByteLength:S._nextUint32(),alphaSliceByteOffset:S._nextUint32(),alphaSliceByteLength:S._nextUint32()});var P=M+S._offset,c=(I=(f=P+a)+U)+E,P=new Uint8Array(R.buffer,R.byteOffset+P,a),f=new Uint8Array(R.buffer,R.byteOffset+f,U),I=new Uint8Array(R.buffer,R.byteOffset+I,E),c=new Uint8Array(R.buffer,R.byteOffset+c,L);return A.globalData={endpointCount:i,selectorCount:V,imageDescs:o,endpointsData:P,selectorsData:f,tablesData:I,extendedData:c},A}(t)}catch(_){throw new S.RuntimeError("Invalid KTX2 file.")}if(0!==A.layerCount)throw new S.RuntimeError("KTX2 texture arrays are not supported.");if(0!==A.pixelDepth)throw new S.RuntimeError("KTX2 3D textures are unsupported.");var T=A.dataFormatDescriptor[0],_=new Array(A.levelCount);return 0!==A.vkFormat||T.colorModel!==U&&T.colorModel!==E?(R.push(t.buffer),function(_,R){var A,t=_.vkFormat===N.VK_FORMAT_R8G8B8_SRGB?i.RGB:i.RGBA;_.vkFormat===N.VK_FORMAT_R8G8B8A8_UNORM?A=r.UNSIGNED_BYTE:_.vkFormat===N.VK_FORMAT_R16G16B16A16_SFLOAT?A=r.HALF_FLOAT:_.vkFormat===N.VK_FORMAT_R32G32B32A32_SFLOAT&&(A=r.FLOAT);for(var e=0;e<_.levels.length;++e){var T={};R[e]=T;for(var O=_.levels[e].levelData,n=_.pixelWidth>>e,B=_.pixelHeight>>e,G=n*B*i.componentsLength(t),M=0;M<_.faceCount;++M){var C=O.byteOffset+G*_.typeSize*M;C=new(s.defined(A)&&1!==r.sizeInBytes(A)?2===r.sizeInBytes(A)?Uint16Array:Float32Array:Uint8Array)(O.buffer,C,G),T[a[M]]={internalFormat:t,datatype:A,width:n,height:B,levelBuffer:C}}}}(A,_)):function(_,R,A,t,e,T){var O,n,B=new t.KTX2File(_),G=B.getWidth(),M=B.getHeight(),C=B.getLevels(),_=B.getHasAlpha();if(!(0<G&&0<M&&0<C))throw B.close(),B.delete(),new S.RuntimeError("Invalid KTX2 file");C=R.dataFormatDescriptor[0],t=t.transcoder_texture_format;if(C.colorModel===U)if(A.etc)O=_?i.RGBA8_ETC2_EAC:i.RGB8_ETC2,n=_?t.cTFETC2_RGBA:t.cTFETC1_RGB;else if(A.etc1&&!_)O=i.RGB_ETC1,n=t.cTFETC1_RGB;else if(A.s3tc)O=_?i.RGBA_DXT5:i.RGB_DXT1,n=_?t.cTFBC3_RGBA:t.cTFBC1_RGB;else if(A.pvrtc)O=_?i.RGBA_PVRTC_4BPPV1:i.RGB_PVRTC_4BPPV1,n=_?t.cTFPVRTC1_4_RGBA:t.cTFPVRTC1_4_RGB;else if(A.astc)O=i.RGBA_ASTC,n=t.cTFASTC_4x4_RGBA;else{if(!A.bc7)throw new S.RuntimeError("No transcoding format target available for ETC1S compressed ktx2.");O=i.RGBA_BC7,n=t.cTFBC7_RGBA}else if(C.colorModel===E)if(A.astc)O=i.RGBA_ASTC,n=t.cTFASTC_4x4_RGBA;else if(A.bc7)O=i.RGBA_BC7,n=t.cTFBC7_RGBA;else if(A.s3tc)O=_?i.RGBA_DXT5:i.RGB_DXT1,n=_?t.cTFBC3_RGBA:t.cTFBC1_RGB;else if(A.etc)O=_?i.RGBA8_ETC2_EAC:i.RGB8_ETC2,n=_?t.cTFETC2_RGBA:t.cTFETC1_RGB;else if(A.etc1&&!_)O=i.RGB_ETC1,n=t.cTFETC1_RGB;else{if(!A.pvrtc)throw new S.RuntimeError("No transcoding format target available for UASTC compressed ktx2.");O=_?i.RGBA_PVRTC_4BPPV1:i.RGB_PVRTC_4BPPV1,n=_?t.cTFPVRTC1_4_RGBA:t.cTFPVRTC1_4_RGB}if(!B.startTranscoding())throw B.close(),B.delete(),new S.RuntimeError("startTranscoding() failed");for(var K=0;K<R.levels.length;++K){var r={};T[K]=r,G=R.pixelWidth>>K,M=R.pixelHeight>>K;var F=B.getImageTranscodedSizeInBytes(K,0,0,n.value),N=new Uint8Array(F),F=B.transcodeImage(N,K,0,0,n.value,0,-1,-1);if(!s.defined(F))throw new S.RuntimeError("transcodeImage() failed.");e.push(N.buffer),r[a[0]]={internalFormat:O,width:G,height:M,levelBuffer:N}}B.close(),B.delete()}(t,A,e,V,R,_),_}function o(_){(V=_).initializeBasis(),self.onmessage=R(L),self.postMessage(!0)}return function(_){var R=_.data.webAssemblyConfig;if(s.defined(R))return require([R.modulePath],function(_){return s.defined(R.wasmBinaryFile)?void(_=!s.defined(_)?self.MSC_TRANSCODER:_)(R).then(function(_){o(_)}):_().then(function(_){o(_)})})}}); | ||
define(["./when-229515d6","./RuntimeError-ffe03243","./WebGLConstants-4e26b85a","./createTaskProcessorWorker"],(function(_,R,A,t){"use strict";var e={UNSIGNED_BYTE:A.WebGLConstants.UNSIGNED_BYTE,UNSIGNED_SHORT:A.WebGLConstants.UNSIGNED_SHORT,UNSIGNED_INT:A.WebGLConstants.UNSIGNED_INT,FLOAT:A.WebGLConstants.FLOAT,HALF_FLOAT:A.WebGLConstants.HALF_FLOAT_OES,UNSIGNED_INT_24_8:A.WebGLConstants.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:A.WebGLConstants.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:A.WebGLConstants.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:A.WebGLConstants.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(_,R){switch(_){case e.UNSIGNED_BYTE:return A.WebGLConstants.UNSIGNED_BYTE;case e.UNSIGNED_SHORT:return A.WebGLConstants.UNSIGNED_SHORT;case e.UNSIGNED_INT:return A.WebGLConstants.UNSIGNED_INT;case e.FLOAT:return A.WebGLConstants.FLOAT;case e.HALF_FLOAT:return R.webgl2?A.WebGLConstants.HALF_FLOAT:A.WebGLConstants.HALF_FLOAT_OES;case e.UNSIGNED_INT_24_8:return A.WebGLConstants.UNSIGNED_INT_24_8;case e.UNSIGNED_SHORT_4_4_4_4:return A.WebGLConstants.UNSIGNED_SHORT_4_4_4_4;case e.UNSIGNED_SHORT_5_5_5_1:return A.WebGLConstants.UNSIGNED_SHORT_5_5_5_1;case e.UNSIGNED_SHORT_5_6_5:return e.UNSIGNED_SHORT_5_6_5}},isPacked:function(_){return _===e.UNSIGNED_INT_24_8||_===e.UNSIGNED_SHORT_4_4_4_4||_===e.UNSIGNED_SHORT_5_5_5_1||_===e.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(_){switch(_){case e.UNSIGNED_BYTE:return 1;case e.UNSIGNED_SHORT:case e.UNSIGNED_SHORT_4_4_4_4:case e.UNSIGNED_SHORT_5_5_5_1:case e.UNSIGNED_SHORT_5_6_5:case e.HALF_FLOAT:return 2;case e.UNSIGNED_INT:case e.FLOAT:case e.UNSIGNED_INT_24_8:return 4}},validate:function(_){return _===e.UNSIGNED_BYTE||_===e.UNSIGNED_SHORT||_===e.UNSIGNED_INT||_===e.FLOAT||_===e.HALF_FLOAT||_===e.UNSIGNED_INT_24_8||_===e.UNSIGNED_SHORT_4_4_4_4||_===e.UNSIGNED_SHORT_5_5_5_1||_===e.UNSIGNED_SHORT_5_6_5}},T=Object.freeze(e),O={DEPTH_COMPONENT:A.WebGLConstants.DEPTH_COMPONENT,DEPTH_STENCIL:A.WebGLConstants.DEPTH_STENCIL,ALPHA:A.WebGLConstants.ALPHA,RGB:A.WebGLConstants.RGB,RGBA:A.WebGLConstants.RGBA,LUMINANCE:A.WebGLConstants.LUMINANCE,LUMINANCE_ALPHA:A.WebGLConstants.LUMINANCE_ALPHA,RGB_DXT1:A.WebGLConstants.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:A.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:A.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:A.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:A.WebGLConstants.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:A.WebGLConstants.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:A.WebGLConstants.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:A.WebGLConstants.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:A.WebGLConstants.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:A.WebGLConstants.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:A.WebGLConstants.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:A.WebGLConstants.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:A.WebGLConstants.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(_){switch(_){case O.RGB:return 3;case O.RGBA:return 4;case O.LUMINANCE_ALPHA:return 2;case O.ALPHA:case O.LUMINANCE:default:return 1}},validate:function(_){return _===O.DEPTH_COMPONENT||_===O.DEPTH_STENCIL||_===O.ALPHA||_===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(_){return _===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5},isPVRTCFormat:function(_){return _===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1},isASTCFormat:function(_){return _===O.RGBA_ASTC},isETC1Format:function(_){return _===O.RGB_ETC1},isETC2Format:function(_){return _===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC},isBC7Format:function(_){return _===O.RGBA_BC7},compressedTextureSizeInBytes:function(_,R,A){switch(_){case O.RGB_DXT1:case O.RGBA_DXT1:case O.RGB_ETC1:case O.RGB8_ETC2:return Math.floor((R+3)/4)*Math.floor((A+3)/4)*8;case O.RGBA_DXT3:case O.RGBA_DXT5:case O.RGBA_ASTC:case O.RGBA8_ETC2_EAC:return Math.floor((R+3)/4)*Math.floor((A+3)/4)*16;case O.RGB_PVRTC_4BPPV1:case O.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(R,8)*Math.max(A,8)*4+7)/8);case O.RGB_PVRTC_2BPPV1:case O.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(R,16)*Math.max(A,8)*2+7)/8);case O.RGBA_BC7:return Math.ceil(R/4)*Math.ceil(A/4)*16;default:return 0}},textureSizeInBytes:function(_,R,A,t){var e=O.componentsLength(_);return T.isPacked(R)&&(e=1),e*T.sizeInBytes(R)*A*t},alignmentInBytes:function(_,R,A){var t=O.textureSizeInBytes(_,R,A,1)%4;return 0===t?4:2===t?2:1},createTypedArray:function(_,R,A,t){var e=T.sizeInBytes(R);return new(e===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:e===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:e===Float32Array.BYTES_PER_ELEMENT&&R===T.FLOAT?Float32Array:Uint32Array)(O.componentsLength(_)*A*t)},flipY:function(_,R,A,t,e){if(1===e)return _;for(var T=O.createTypedArray(R,A,t,e),n=O.componentsLength(R),B=t*n,G=0;G<e;++G)for(var M=G*t*n,C=(e-G-1)*t*n,K=0;K<B;++K)T[C+K]=_[M+K];return T},toInternalFormat:function(_,R,t){if(!t.webgl2)return _;if(_===O.DEPTH_STENCIL)return A.WebGLConstants.DEPTH24_STENCIL8;if(_===O.DEPTH_COMPONENT){if(R===T.UNSIGNED_SHORT)return A.WebGLConstants.DEPTH_COMPONENT16;if(R===T.UNSIGNED_INT)return A.WebGLConstants.DEPTH_COMPONENT24}if(R===T.FLOAT)switch(_){case O.RGBA:return A.WebGLConstants.RGBA32F;case O.RGB:return A.WebGLConstants.RGB32F;case O.RG:return A.WebGLConstants.RG32F;case O.R:return A.WebGLConstants.R32F}if(R===T.HALF_FLOAT)switch(_){case O.RGBA:return A.WebGLConstants.RGBA16F;case O.RGB:return A.WebGLConstants.RGB16F;case O.RG:return A.WebGLConstants.RG16F;case O.R:return A.WebGLConstants.R16F}return _}},n=Object.freeze(O),B=Object.freeze({VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033});const G=[171,75,84,88,32,50,48,187,13,10,26,10];var M,C,K,r,F,N,s,i,S;(S=M||(M={}))[S.NONE=0]="NONE",S[S.BASISLZ=1]="BASISLZ",S[S.ZSTD=2]="ZSTD",S[S.ZLIB=3]="ZLIB",function(_){_[_.BASICFORMAT=0]="BASICFORMAT"}(C||(C={})),function(_){_[_.UNSPECIFIED=0]="UNSPECIFIED",_[_.ETC1S=163]="ETC1S",_[_.UASTC=166]="UASTC"}(K||(K={})),function(_){_[_.UNSPECIFIED=0]="UNSPECIFIED",_[_.SRGB=1]="SRGB"}(r||(r={})),function(_){_[_.UNSPECIFIED=0]="UNSPECIFIED",_[_.LINEAR=1]="LINEAR",_[_.SRGB=2]="SRGB",_[_.ITU=3]="ITU",_[_.NTSC=4]="NTSC",_[_.SLOG=5]="SLOG",_[_.SLOG2=6]="SLOG2"}(F||(F={})),function(_){_[_.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",_[_.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(N||(N={})),function(_){_[_.RGB=0]="RGB",_[_.RRR=3]="RRR",_[_.GGG=4]="GGG",_[_.AAA=15]="AAA"}(s||(s={})),function(_){_[_.RGB=0]="RGB",_[_.RGBA=3]="RGBA",_[_.RRR=4]="RRR",_[_.RRRG=5]="RRRG"}(i||(i={}));class V{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=M.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:C.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:K.UNSPECIFIED,colorPrimaries:r.SRGB,transferFunction:r.SRGB,flags:N.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class a{constructor(_,R,A,t){this._dataView=new DataView(_.buffer,_.byteOffset+R,A),this._littleEndian=t,this._offset=0}_nextUint8(){const _=this._dataView.getUint8(this._offset);return this._offset+=1,_}_nextUint16(){const _=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,_}_nextUint32(){const _=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,_}_nextUint64(){const _=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,_}_skip(_){return this._offset+=_,this}_scan(_,R=0){const A=this._offset;let t=0;for(;this._dataView.getUint8(this._offset)!==R&&t<_;)t++,this._offset++;return t<_&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+A,t)}}function U(_){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(_):Buffer.from(_).toString("utf8")}var o,E=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"];function L(A,t){var e,O=A.ktx2Buffer,M=A.supportedTargetFormats;try{e=function(_){const R=new Uint8Array(_.buffer,_.byteOffset,G.length);if(R[0]!==G[0]||R[1]!==G[1]||R[2]!==G[2]||R[3]!==G[3]||R[4]!==G[4]||R[5]!==G[5]||R[6]!==G[6]||R[7]!==G[7]||R[8]!==G[8]||R[9]!==G[9]||R[10]!==G[10]||R[11]!==G[11])throw new Error("Missing KTX 2.0 identifier.");const A=new V,t=17*Uint32Array.BYTES_PER_ELEMENT,e=new a(_,G.length,t,!0);A.vkFormat=e._nextUint32(),A.typeSize=e._nextUint32(),A.pixelWidth=e._nextUint32(),A.pixelHeight=e._nextUint32(),A.pixelDepth=e._nextUint32(),A.layerCount=e._nextUint32(),A.faceCount=e._nextUint32();const T=e._nextUint32();A.supercompressionScheme=e._nextUint32();const O=e._nextUint32(),n=e._nextUint32(),B=e._nextUint32(),M=e._nextUint32(),C=e._nextUint64(),K=e._nextUint64(),r=new a(_,G.length+t,3*T*8,!0);for(let R=0;R<T;R++)A.levels.push({levelData:new Uint8Array(_.buffer,_.byteOffset+r._nextUint64(),r._nextUint64()),uncompressedByteLength:r._nextUint64()});const F=new a(_,O,n,!0),N={vendorId:F._skip(4)._nextUint16(),descriptorType:F._nextUint16(),versionNumber:F._nextUint16(),descriptorBlockSize:F._nextUint16(),colorModel:F._nextUint8(),colorPrimaries:F._nextUint8(),transferFunction:F._nextUint8(),flags:F._nextUint8(),texelBlockDimension:{x:F._nextUint8()+1,y:F._nextUint8()+1,z:F._nextUint8()+1,w:F._nextUint8()+1},bytesPlane:[F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8()],samples:[]},s=(N.descriptorBlockSize/4-6)/4;for(let _=0;_<s;_++)N.samples[_]={bitOffset:F._nextUint16(),bitLength:F._nextUint8(),channelID:F._nextUint8(),samplePosition:[F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8()],sampleLower:F._nextUint32(),sampleUpper:F._nextUint32()};A.dataFormatDescriptor.length=0,A.dataFormatDescriptor.push(N);const i=new a(_,B,M,!0);for(;i._offset<M;){const _=i._nextUint32(),R=i._scan(_),t=U(R),e=i._scan(_-R.byteLength);A.keyValue[t]=t.match(/^ktx/i)?U(e):e,i._offset%4&&i._skip(4-i._offset%4)}if(K<=0)return A;const S=new a(_,C,K,!0),o=S._nextUint16(),E=S._nextUint16(),L=S._nextUint32(),P=S._nextUint32(),c=S._nextUint32(),f=S._nextUint32(),I=[];for(let _=0;_<T;_++)I.push({imageFlags:S._nextUint32(),rgbSliceByteOffset:S._nextUint32(),rgbSliceByteLength:S._nextUint32(),alphaSliceByteOffset:S._nextUint32(),alphaSliceByteLength:S._nextUint32()});const X=C+S._offset,u=X+L,D=u+P,l=D+c,x=new Uint8Array(_.buffer,_.byteOffset+X,L),h=new Uint8Array(_.buffer,_.byteOffset+u,P),H=new Uint8Array(_.buffer,_.byteOffset+D,c),d=new Uint8Array(_.buffer,_.byteOffset+l,f);return A.globalData={endpointCount:o,selectorCount:E,imageDescs:I,endpointsData:x,selectorsData:h,tablesData:H,extendedData:d},A}(O)}catch(_){throw new R.RuntimeError("Invalid KTX2 file.")}if(0!==e.layerCount)throw new R.RuntimeError("KTX2 texture arrays are not supported.");if(0!==e.pixelDepth)throw new R.RuntimeError("KTX2 3D textures are unsupported.");var C=e.dataFormatDescriptor[0],K=new Array(e.levelCount);return 0!==e.vkFormat||163!==C.colorModel&&166!==C.colorModel?(t.push(O.buffer),function(R,A){var t,e=R.vkFormat===B.VK_FORMAT_R8G8B8_SRGB?n.RGB:n.RGBA;R.vkFormat===B.VK_FORMAT_R8G8B8A8_UNORM?t=T.UNSIGNED_BYTE:R.vkFormat===B.VK_FORMAT_R16G16B16A16_SFLOAT?t=T.HALF_FLOAT:R.vkFormat===B.VK_FORMAT_R32G32B32A32_SFLOAT&&(t=T.FLOAT);for(var O=0;O<R.levels.length;++O){var G={};A[O]=G;for(var M=R.levels[O].levelData,C=R.pixelWidth>>O,K=R.pixelHeight>>O,r=C*K*n.componentsLength(e),F=0;F<R.faceCount;++F){var N,s=M.byteOffset+r*R.typeSize*F;N=_.defined(t)&&1!==T.sizeInBytes(t)?2===T.sizeInBytes(t)?new Uint16Array(M.buffer,s,r):new Float32Array(M.buffer,s,r):new Uint8Array(M.buffer,s,r),G[E[F]]={internalFormat:e,datatype:t,width:C,height:K,levelBuffer:N}}}}(e,K)):function(A,t,e,T,O,B){var G,M,C=new T.KTX2File(A),K=C.getWidth(),r=C.getHeight(),F=C.getLevels(),N=C.getHasAlpha();if(!(K>0&&r>0&&F>0))throw C.close(),C.delete(),new R.RuntimeError("Invalid KTX2 file");var s=t.dataFormatDescriptor[0],i=T.transcoder_texture_format;if(163===s.colorModel)if(e.etc)G=N?n.RGBA8_ETC2_EAC:n.RGB8_ETC2,M=N?i.cTFETC2_RGBA:i.cTFETC1_RGB;else if(e.etc1&&!N)G=n.RGB_ETC1,M=i.cTFETC1_RGB;else if(e.s3tc)G=N?n.RGBA_DXT5:n.RGB_DXT1,M=N?i.cTFBC3_RGBA:i.cTFBC1_RGB;else if(e.pvrtc)G=N?n.RGBA_PVRTC_4BPPV1:n.RGB_PVRTC_4BPPV1,M=N?i.cTFPVRTC1_4_RGBA:i.cTFPVRTC1_4_RGB;else if(e.astc)G=n.RGBA_ASTC,M=i.cTFASTC_4x4_RGBA;else{if(!e.bc7)throw new R.RuntimeError("No transcoding format target available for ETC1S compressed ktx2.");G=n.RGBA_BC7,M=i.cTFBC7_RGBA}else if(166===s.colorModel)if(e.astc)G=n.RGBA_ASTC,M=i.cTFASTC_4x4_RGBA;else if(e.bc7)G=n.RGBA_BC7,M=i.cTFBC7_RGBA;else if(e.s3tc)G=N?n.RGBA_DXT5:n.RGB_DXT1,M=N?i.cTFBC3_RGBA:i.cTFBC1_RGB;else if(e.etc)G=N?n.RGBA8_ETC2_EAC:n.RGB8_ETC2,M=N?i.cTFETC2_RGBA:i.cTFETC1_RGB;else if(e.etc1&&!N)G=n.RGB_ETC1,M=i.cTFETC1_RGB;else{if(!e.pvrtc)throw new R.RuntimeError("No transcoding format target available for UASTC compressed ktx2.");G=N?n.RGBA_PVRTC_4BPPV1:n.RGB_PVRTC_4BPPV1,M=N?i.cTFPVRTC1_4_RGBA:i.cTFPVRTC1_4_RGB}if(!C.startTranscoding())throw C.close(),C.delete(),new R.RuntimeError("startTranscoding() failed");for(var S=0;S<t.levels.length;++S){var V={};B[S]=V,K=t.pixelWidth>>S,r=t.pixelHeight>>S;var a=C.getImageTranscodedSizeInBytes(S,0,0,M.value),U=new Uint8Array(a),o=C.transcodeImage(U,S,0,0,M.value,0,-1,-1);if(!_.defined(o))throw new R.RuntimeError("transcodeImage() failed.");O.push(U.buffer),V[E[0]]={internalFormat:G,width:K,height:r,levelBuffer:U}}C.close(),C.delete()}(O,e,M,o,t,K),K}function P(_){(o=_).initializeBasis(),self.onmessage=t(L),self.postMessage(!0)}return function(R){var A=R.data.webAssemblyConfig;if(_.defined(A))return require([A.modulePath],(function(R){if(!_.defined(A.wasmBinaryFile))return R().then((function(_){P(_)}));_.defined(R)||(R=self.MSC_TRANSCODER),R(A).then((function(_){P(_)}))}))}})); |
@@ -1,1 +0,1 @@ | ||
"undefined"==typeof self&&(self={}),self.onmessage=function(s){var e=s.data.array,s=self.webkitPostMessage||self.postMessage;try{s({array:e},[e.buffer])}catch(e){s({})}}; | ||
"undefined"==typeof self&&(self={}),self.onmessage=function(e){var s=e.data.array,a=self.webkitPostMessage||self.postMessage;try{a({array:s},[s.buffer])}catch(e){a({})}}; |
@@ -1,1 +0,1 @@ | ||
define(["./AttributeCompression-56959beb","./Transforms-70f396e0","./Cartesian2-40b13f31","./when-7b580518","./TerrainEncoding-75f35f91","./IndexDatatype-b42089ce","./Check-3917d765","./Math-87254c13","./OrientedBoundingBox-f7557a9b","./createTaskProcessorWorker","./combine-83aa7971","./RuntimeError-fad4d3c6","./ComponentDatatype-6c2e43c1","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-66f520e3","./AxisAlignedBoundingBox-445c3009","./IntersectionTests-587a744a","./Plane-9d4e3328"],function(s,ue,oe,g,ae,pe,e,de,fe,t,i,n,r,h,u,o,a,p){"use strict";var le={clipTriangleAtAxisAlignedThreshold:function(e,t,i,n,s,r){var h,u;g.defined(r)?r.length=0:r=[];var o,a,p,d,f,l,c=t?(h=i<e,u=n<e,s<e):(h=e<i,u=e<n,e<s),t=h+u+c;return 1===t?h?(o=(e-i)/(n-i),a=(e-i)/(s-i),r.push(1),r.push(2),1!==a&&(r.push(-1),r.push(0),r.push(2),r.push(a)),1!==o&&(r.push(-1),r.push(0),r.push(1),r.push(o))):u?(p=(e-n)/(s-n),d=(e-n)/(i-n),r.push(2),r.push(0),1!==d&&(r.push(-1),r.push(1),r.push(0),r.push(d)),1!==p&&(r.push(-1),r.push(1),r.push(2),r.push(p))):c&&(f=(e-s)/(i-s),l=(e-s)/(n-s),r.push(0),r.push(1),1!==l&&(r.push(-1),r.push(2),r.push(1),r.push(l)),1!==f&&(r.push(-1),r.push(2),r.push(0),r.push(f))):2===t?h||i===e?u||n===e?c||s===e||(a=(e-i)/(s-i),p=(e-n)/(s-n),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(a),r.push(-1),r.push(1),r.push(2),r.push(p)):(l=(e-s)/(n-s),o=(e-i)/(n-i),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(l),r.push(-1),r.push(0),r.push(1),r.push(o)):(d=(e-n)/(i-n),f=(e-s)/(i-s),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(d),r.push(-1),r.push(2),r.push(0),r.push(f)):3!==t&&(r.push(0),r.push(1),r.push(2)),r},computeBarycentricCoordinates:function(e,t,i,n,s,r,h,u,o){var a=i-h,i=h-s,s=r-u,r=n-u,n=1/(s*a+i*r),u=t-u,h=e-h,i=(s*h+i*u)*n,u=(-r*h+a*u)*n,n=1-i-u;return g.defined(o)?(o.x=i,o.y=u,o.z=n,o):new oe.Cartesian3(i,u,n)},computeLineSegmentLineSegmentIntersection:function(e,t,i,n,s,r,h,u,o){var a=(h-s)*(t-r)-(u-r)*(e-s),p=(i-e)*(t-r)-(n-t)*(e-s),s=(u-r)*(i-e)-(h-s)*(n-t);if(0!=s){a=a/s,s=p/s;return 0<=a&&a<=1&&0<=s&&s<=1?((o=!g.defined(o)?new oe.Cartesian2:o).x=e+a*(i-e),o.y=t+a*(n-t),o):void 0}}},ce=32767,ge=16383,me=[],xe=[],we=[],Ce=new oe.Cartographic,ve=new oe.Cartesian3,Be=[],ye=[],Ie=[],Ae=[],be=[],Te=new oe.Cartesian3,ze=new ue.BoundingSphere,Me=new fe.OrientedBoundingBox,Ne=new oe.Cartesian2,Ve=new oe.Cartesian3;function Ee(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}Ee.prototype.clone=function(e){return(e=!g.defined(e)?new Ee:e).uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.normalBuffer=this.normalBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},Ee.prototype.initializeIndexed=function(e,t,i,n,s){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=i,this.normalBuffer=n,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0},Ee.prototype.initializeFromClipResult=function(e,t,i){var n=t+1;return-1!==e[t]?i[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=i[e[n]],this.second=i[e[++n]],this.ratio=e[++n],++n),n},Ee.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},Ee.prototype.isIndexed=function(){return g.defined(this.index)},Ee.prototype.getH=function(){return g.defined(this.index)?this.heightBuffer[this.index]:de.CesiumMath.lerp(this.first.getH(),this.second.getH(),this.ratio)},Ee.prototype.getU=function(){return g.defined(this.index)?this.uBuffer[this.index]:de.CesiumMath.lerp(this.first.getU(),this.second.getU(),this.ratio)},Ee.prototype.getV=function(){return g.defined(this.index)?this.vBuffer[this.index]:de.CesiumMath.lerp(this.first.getV(),this.second.getV(),this.ratio)};var d=new oe.Cartesian2,f=-1,l=[new oe.Cartesian3,new oe.Cartesian3],c=[new oe.Cartesian3,new oe.Cartesian3];function m(e,t){var i=l[++f],n=c[f],i=s.AttributeCompression.octDecode(e.first.getNormalX(),e.first.getNormalY(),i),n=s.AttributeCompression.octDecode(e.second.getNormalX(),e.second.getNormalY(),n);return ve=oe.Cartesian3.lerp(i,n,e.ratio,ve),oe.Cartesian3.normalize(ve,ve),s.AttributeCompression.octEncode(ve,t),--f,t}Ee.prototype.getNormalX=function(){return g.defined(this.index)?this.normalBuffer[2*this.index]:(d=m(this,d)).x},Ee.prototype.getNormalY=function(){return g.defined(this.index)?this.normalBuffer[2*this.index+1]:(d=m(this,d)).y};var x=[];function Re(e,t,i,n,s,r,h,u,o){if(0!==h.length){for(var a=0,p=0;p<h.length;)p=x[a++].initializeFromClipResult(h,p,u);for(var d=0;d<a;++d){var f,l,c=x[d];c.isIndexed()?(c.newIndex=r[c.index],c.uBuffer=e,c.vBuffer=t,c.heightBuffer=i,o&&(c.normalBuffer=n)):(f=c.getKey(),g.defined(r[f])?c.newIndex=r[f]:(l=e.length,e.push(c.getU()),t.push(c.getV()),i.push(c.getH()),o&&(n.push(c.getNormalX()),n.push(c.getNormalY())),c.newIndex=l,r[f]=l))}3===a?(s.push(x[0].newIndex),s.push(x[1].newIndex),s.push(x[2].newIndex)):4===a&&(s.push(x[0].newIndex),s.push(x[1].newIndex),s.push(x[2].newIndex),s.push(x[0].newIndex),s.push(x[2].newIndex),s.push(x[3].newIndex))}}return x.push(new Ee),x.push(new Ee),x.push(new Ee),x.push(new Ee),t(function(e,t){var i=e.isEastChild,n=e.isNorthChild,s=i?ge:0,r=i?ce:ge,h=n?ge:0,u=n?ce:ge,o=Be,a=ye,p=Ie,d=be;o.length=0,a.length=0,p.length=0,d.length=0;var f=Ae;f.length=0;for(var l={},c=e.vertices,g=(g=e.indices).subarray(0,e.indexCountWithoutSkirts),m=ae.TerrainEncoding.clone(e.encoding),x=m.hasVertexNormals,w=0,C=e.vertexCountWithoutSkirts,v=e.minimumHeight,B=e.maximumHeight,y=new Array(C),I=new Array(C),A=new Array(C),b=x?new Array(2*C):void 0,T=0,z=0;T<C;++T,z+=2){var M=m.decodeTextureCoordinates(c,T,Ne),N=m.decodeHeight(c,T),V=de.CesiumMath.clamp(M.x*ce|0,0,ce),E=de.CesiumMath.clamp(M.y*ce|0,0,ce);A[T]=de.CesiumMath.clamp((N-v)/(B-v)*ce|0,0,ce),ce-(V=V<20?0:V)<20&&(V=ce),ce-(E=E<20?0:E)<20&&(E=ce),y[T]=V,I[T]=E,x&&(M=m.getOctEncodedNormal(c,T,Ve),b[z]=M.x,b[z+1]=M.y),(i&&ge<=V||!i&&V<=ge)&&(n&&ge<=E||!n&&E<=ge)&&(l[T]=w,o.push(V),a.push(E),p.push(A[T]),x&&(d.push(b[z]),d.push(b[z+1])),++w)}var R=[];R.push(new Ee),R.push(new Ee),R.push(new Ee);var H=[];for(H.push(new Ee),H.push(new Ee),H.push(new Ee),T=0;T<g.length;T+=3){var O=g[T],S=g[T+1],U=g[T+2],F=y[O],P=y[S],k=y[U];R[0].initializeIndexed(y,I,A,b,O),R[1].initializeIndexed(y,I,A,b,S),R[2].initializeIndexed(y,I,A,b,U);P=le.clipTriangleAtAxisAlignedThreshold(ge,i,F,P,k,me);P.length<=0||(k=H[0].initializeFromClipResult(P,0,R))>=P.length||(k=H[1].initializeFromClipResult(P,k,R))>=P.length||(k=H[2].initializeFromClipResult(P,k,R),Re(o,a,p,d,f,l,le.clipTriangleAtAxisAlignedThreshold(ge,n,H[0].getV(),H[1].getV(),H[2].getV(),xe),H,x),k<P.length&&(H[2].clone(H[1]),H[2].initializeFromClipResult(P,k,R),Re(o,a,p,d,f,l,le.clipTriangleAtAxisAlignedThreshold(ge,n,H[0].getV(),H[1].getV(),H[2].getV(),xe),H,x)))}var D=i?-ce:0,W=n?-ce:0,X=[],K=[],L=[],Y=[],_=Number.MAX_VALUE,G=-_,J=we;J.length=0;var Z=oe.Ellipsoid.clone(e.ellipsoid),j=(he=oe.Rectangle.clone(e.childRectangle)).north,q=he.south,Q=he.east,$=he.west;for(Q<$&&(Q+=de.CesiumMath.TWO_PI),T=0;T<o.length;++T)V=(V=Math.round(o[T]))<=s?(X.push(T),0):r<=V?(L.push(T),ce):2*V+D,o[T]=V,E=(E=Math.round(a[T]))<=h?(K.push(T),0):u<=E?(Y.push(T),ce):2*E+W,a[T]=E,(N=de.CesiumMath.lerp(v,B,p[T]/ce))<_&&(_=N),G<N&&(G=N),p[T]=N,Ce.longitude=de.CesiumMath.lerp($,Q,V/ce),Ce.latitude=de.CesiumMath.lerp(q,j,E/ce),Ce.height=N,Z.cartographicToCartesian(Ce,ve),J.push(ve.x),J.push(ve.y),J.push(ve.z);var ee=ue.BoundingSphere.fromVertices(J,oe.Cartesian3.ZERO,3,ze),te=fe.OrientedBoundingBox.fromRectangle(he,_,G,Z,Me),e=new ae.EllipsoidalOccluder(Z).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(ee.center,J,3,ee.center,_,Te),ie=G-_,ne=new Uint16Array(o.length+a.length+p.length);for(T=0;T<o.length;++T)ne[T]=o[T];var se=o.length;for(T=0;T<a.length;++T)ne[se+T]=a[T];for(se+=a.length,T=0;T<p.length;++T)ne[se+T]=ce*(p[T]-_)/ie;var re,he=pe.IndexDatatype.createTypedArray(o.length,f);return x?(re=new Uint8Array(d),t.push(ne.buffer,he.buffer,re.buffer),re=re.buffer):t.push(ne.buffer,he.buffer),{vertices:ne.buffer,encodedNormals:re,indices:he.buffer,minimumHeight:_,maximumHeight:G,westIndices:X,southIndices:K,eastIndices:L,northIndices:Y,boundingSphere:ee,orientedBoundingBox:te,horizonOcclusionPoint:e}})}); | ||
define(["./AttributeCompression-0af3c035","./Transforms-7cd3197b","./Matrix2-f2da41d4","./when-229515d6","./TerrainEncoding-6355a4fe","./IndexDatatype-b10faa0b","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./OrientedBoundingBox-86debc5a","./createTaskProcessorWorker","./combine-8ce3f24b","./WebGLConstants-4e26b85a","./EllipsoidTangentPlane-b27cd2f7","./AxisAlignedBoundingBox-1feb0c48","./IntersectionTests-1b8a3cb9","./Plane-0421a8be"],(function(e,i,t,n,s,r,h,u,o,a,p,d,f,l,c,g){"use strict";var m={clipTriangleAtAxisAlignedThreshold:function(e,i,t,s,r,h){var u,o,a;n.defined(h)?h.length=0:h=[],i?(u=t<e,o=s<e,a=r<e):(u=t>e,o=s>e,a=r>e);var p,d,f,l,c,g,m=u+o+a;return 1===m?u?(p=(e-t)/(s-t),d=(e-t)/(r-t),h.push(1),h.push(2),1!==d&&(h.push(-1),h.push(0),h.push(2),h.push(d)),1!==p&&(h.push(-1),h.push(0),h.push(1),h.push(p))):o?(f=(e-s)/(r-s),l=(e-s)/(t-s),h.push(2),h.push(0),1!==l&&(h.push(-1),h.push(1),h.push(0),h.push(l)),1!==f&&(h.push(-1),h.push(1),h.push(2),h.push(f))):a&&(c=(e-r)/(t-r),g=(e-r)/(s-r),h.push(0),h.push(1),1!==g&&(h.push(-1),h.push(2),h.push(1),h.push(g)),1!==c&&(h.push(-1),h.push(2),h.push(0),h.push(c))):2===m?u||t===e?o||s===e?a||r===e||(d=(e-t)/(r-t),f=(e-s)/(r-s),h.push(2),h.push(-1),h.push(0),h.push(2),h.push(d),h.push(-1),h.push(1),h.push(2),h.push(f)):(g=(e-r)/(s-r),p=(e-t)/(s-t),h.push(1),h.push(-1),h.push(2),h.push(1),h.push(g),h.push(-1),h.push(0),h.push(1),h.push(p)):(l=(e-s)/(t-s),c=(e-r)/(t-r),h.push(0),h.push(-1),h.push(1),h.push(0),h.push(l),h.push(-1),h.push(2),h.push(0),h.push(c)):3!==m&&(h.push(0),h.push(1),h.push(2)),h},computeBarycentricCoordinates:function(e,i,s,r,h,u,o,a,p){var d=s-o,f=o-h,l=u-a,c=r-a,g=1/(l*d+f*c),m=i-a,x=e-o,v=(l*x+f*m)*g,w=(-c*x+d*m)*g,C=1-v-w;return n.defined(p)?(p.x=v,p.y=w,p.z=C,p):new t.Cartesian3(v,w,C)},computeLineSegmentLineSegmentIntersection:function(e,i,s,r,h,u,o,a,p){var d=(a-u)*(s-e)-(o-h)*(r-i);if(0!==d){var f=((o-h)*(i-u)-(a-u)*(e-h))/d,l=((s-e)*(i-u)-(r-i)*(e-h))/d;return f>=0&&f<=1&&l>=0&&l<=1?(n.defined(p)||(p=new t.Cartesian2),p.x=e+f*(s-e),p.y=i+f*(r-i),p):void 0}}},x=32767,v=16383,w=[],C=[],B=[],y=new t.Cartographic,b=new t.Cartesian3,I=[],A=[],T=[],z=[],M=[],N=new t.Cartesian3,V=new i.BoundingSphere,E=new o.OrientedBoundingBox,R=new t.Cartesian2,H=new t.Cartesian3;function O(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}O.prototype.clone=function(e){return n.defined(e)||(e=new O),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.normalBuffer=this.normalBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},O.prototype.initializeIndexed=function(e,i,t,n,s){this.uBuffer=e,this.vBuffer=i,this.heightBuffer=t,this.normalBuffer=n,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0},O.prototype.initializeFromClipResult=function(e,i,t){var n=i+1;return-1!==e[i]?t[e[i]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=t[e[n]],++n,this.second=t[e[n]],++n,this.ratio=e[n],++n),n},O.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},O.prototype.isIndexed=function(){return n.defined(this.index)},O.prototype.getH=function(){return n.defined(this.index)?this.heightBuffer[this.index]:u.CesiumMath.lerp(this.first.getH(),this.second.getH(),this.ratio)},O.prototype.getU=function(){return n.defined(this.index)?this.uBuffer[this.index]:u.CesiumMath.lerp(this.first.getU(),this.second.getU(),this.ratio)},O.prototype.getV=function(){return n.defined(this.index)?this.vBuffer[this.index]:u.CesiumMath.lerp(this.first.getV(),this.second.getV(),this.ratio)};var S=new t.Cartesian2,U=-1,F=[new t.Cartesian3,new t.Cartesian3],P=[new t.Cartesian3,new t.Cartesian3];function D(i,n){++U;var s=F[U],r=P[U];return s=e.AttributeCompression.octDecode(i.first.getNormalX(),i.first.getNormalY(),s),r=e.AttributeCompression.octDecode(i.second.getNormalX(),i.second.getNormalY(),r),b=t.Cartesian3.lerp(s,r,i.ratio,b),t.Cartesian3.normalize(b,b),e.AttributeCompression.octEncode(b,n),--U,n}O.prototype.getNormalX=function(){return n.defined(this.index)?this.normalBuffer[2*this.index]:(S=D(this,S)).x},O.prototype.getNormalY=function(){return n.defined(this.index)?this.normalBuffer[2*this.index+1]:(S=D(this,S)).y};var W=[];function X(e,i,t,s,r,h,u,o,a){if(0!==u.length){for(var p=0,d=0;d<u.length;)d=W[p++].initializeFromClipResult(u,d,o);for(var f=0;f<p;++f){var l=W[f];if(l.isIndexed())l.newIndex=h[l.index],l.uBuffer=e,l.vBuffer=i,l.heightBuffer=t,a&&(l.normalBuffer=s);else{var c=l.getKey();if(n.defined(h[c]))l.newIndex=h[c];else{var g=e.length;e.push(l.getU()),i.push(l.getV()),t.push(l.getH()),a&&(s.push(l.getNormalX()),s.push(l.getNormalY())),l.newIndex=g,h[c]=g}}}3===p?(r.push(W[0].newIndex),r.push(W[1].newIndex),r.push(W[2].newIndex)):4===p&&(r.push(W[0].newIndex),r.push(W[1].newIndex),r.push(W[2].newIndex),r.push(W[0].newIndex),r.push(W[2].newIndex),r.push(W[3].newIndex))}}return W.push(new O),W.push(new O),W.push(new O),W.push(new O),a((function(e,n){var h=e.isEastChild,a=e.isNorthChild,p=h?v:0,d=h?x:v,f=a?v:0,l=a?x:v,c=I,g=A,S=T,U=M;c.length=0,g.length=0,S.length=0,U.length=0;var F=z;F.length=0;var P={},D=e.vertices,W=e.indices;W=W.subarray(0,e.indexCountWithoutSkirts);var k,K,L,Y,_,G=s.TerrainEncoding.clone(e.encoding),J=G.hasVertexNormals,Z=0,j=e.vertexCountWithoutSkirts,q=e.minimumHeight,Q=e.maximumHeight,$=new Array(j),ee=new Array(j),ie=new Array(j),te=J?new Array(2*j):void 0;for(K=0,L=0;K<j;++K,L+=2){var ne=G.decodeTextureCoordinates(D,K,R);if(k=G.decodeHeight(D,K),Y=u.CesiumMath.clamp(ne.x*x|0,0,x),_=u.CesiumMath.clamp(ne.y*x|0,0,x),ie[K]=u.CesiumMath.clamp((k-q)/(Q-q)*x|0,0,x),Y<20&&(Y=0),_<20&&(_=0),x-Y<20&&(Y=x),x-_<20&&(_=x),$[K]=Y,ee[K]=_,J){var se=G.getOctEncodedNormal(D,K,H);te[L]=se.x,te[L+1]=se.y}(h&&Y>=v||!h&&Y<=v)&&(a&&_>=v||!a&&_<=v)&&(P[K]=Z,c.push(Y),g.push(_),S.push(ie[K]),J&&(U.push(te[L]),U.push(te[L+1])),++Z)}var re=[];re.push(new O),re.push(new O),re.push(new O);var he,ue=[];for(ue.push(new O),ue.push(new O),ue.push(new O),K=0;K<W.length;K+=3){var oe=W[K],ae=W[K+1],pe=W[K+2],de=$[oe],fe=$[ae],le=$[pe];re[0].initializeIndexed($,ee,ie,te,oe),re[1].initializeIndexed($,ee,ie,te,ae),re[2].initializeIndexed($,ee,ie,te,pe);var ce=m.clipTriangleAtAxisAlignedThreshold(v,h,de,fe,le,w);(he=0)>=ce.length||((he=ue[0].initializeFromClipResult(ce,he,re))>=ce.length||(he=ue[1].initializeFromClipResult(ce,he,re))>=ce.length||(he=ue[2].initializeFromClipResult(ce,he,re),X(c,g,S,U,F,P,m.clipTriangleAtAxisAlignedThreshold(v,a,ue[0].getV(),ue[1].getV(),ue[2].getV(),C),ue,J),he<ce.length&&(ue[2].clone(ue[1]),ue[2].initializeFromClipResult(ce,he,re),X(c,g,S,U,F,P,m.clipTriangleAtAxisAlignedThreshold(v,a,ue[0].getV(),ue[1].getV(),ue[2].getV(),C),ue,J))))}var ge=h?-32767:0,me=a?-32767:0,xe=[],ve=[],we=[],Ce=[],Be=Number.MAX_VALUE,ye=-Be,be=B;be.length=0;var Ie=t.Ellipsoid.clone(e.ellipsoid),Ae=t.Rectangle.clone(e.childRectangle),Te=Ae.north,ze=Ae.south,Me=Ae.east,Ne=Ae.west;for(Me<Ne&&(Me+=u.CesiumMath.TWO_PI),K=0;K<c.length;++K)(Y=Math.round(c[K]))<=p?(xe.push(K),Y=0):Y>=d?(we.push(K),Y=x):Y=2*Y+ge,c[K]=Y,(_=Math.round(g[K]))<=f?(ve.push(K),_=0):_>=l?(Ce.push(K),_=x):_=2*_+me,g[K]=_,(k=u.CesiumMath.lerp(q,Q,S[K]/x))<Be&&(Be=k),k>ye&&(ye=k),S[K]=k,y.longitude=u.CesiumMath.lerp(Ne,Me,Y/x),y.latitude=u.CesiumMath.lerp(ze,Te,_/x),y.height=k,Ie.cartographicToCartesian(y,b),be.push(b.x),be.push(b.y),be.push(b.z);var Ve=i.BoundingSphere.fromVertices(be,t.Cartesian3.ZERO,3,V),Ee=o.OrientedBoundingBox.fromRectangle(Ae,Be,ye,Ie,E),Re=new s.EllipsoidalOccluder(Ie).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(Ve.center,be,3,Ve.center,Be,N),He=ye-Be,Oe=new Uint16Array(c.length+g.length+S.length);for(K=0;K<c.length;++K)Oe[K]=c[K];var Se=c.length;for(K=0;K<g.length;++K)Oe[Se+K]=g[K];for(Se+=g.length,K=0;K<S.length;++K)Oe[Se+K]=x*(S[K]-Be)/He;var Ue,Fe=r.IndexDatatype.createTypedArray(c.length,F);if(J){var Pe=new Uint8Array(U);n.push(Oe.buffer,Fe.buffer,Pe.buffer),Ue=Pe.buffer}else n.push(Oe.buffer,Fe.buffer);return{vertices:Oe.buffer,encodedNormals:Ue,indices:Fe.buffer,minimumHeight:Be,maximumHeight:ye,westIndices:xe,southIndices:ve,eastIndices:we,northIndices:Ce,boundingSphere:Ve,orientedBoundingBox:Ee,horizonOcclusionPoint:Re}}))})); |
@@ -1,1 +0,1 @@ | ||
define(["exports"],function(E){"use strict";var _=Object.freeze({DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047});E.WebGLConstants=_}); | ||
define(["exports"],(function(E){"use strict";var _=Object.freeze({DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047});E.WebGLConstants=_})); |
{ | ||
"name": "mars3d-cesium", | ||
"version": "1.84.3", | ||
"version": "1.87.0", | ||
"description": "CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://mars3d.cn/", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
9
16
15
12636145
370
61429