13 lines
1.3 MiB
JavaScript
13 lines
1.3 MiB
JavaScript
|
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("mars3d")):"function"==typeof define&&define.amd?define(["exports","mars3d"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["mars3d-tdt"]={},e.mars3d)}(this,(function(exports,mars3d){"use strict";function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,t}var mars3d__namespace=_interopNamespace(mars3d);function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(i),!0).forEach((function(t){_defineProperty(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,i){return t&&_defineProperties(e.prototype,t),i&&_defineProperties(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var i,r=_getPrototypeOf(e);if(t){var n=_getPrototypeOf(this).constructor;i=Reflect.construct(r,arguments,n)}else i=r.apply(this,arguments);return _possibleConstructorReturn(this,i)}}var Cesium$2=mars3d__namespace.Cesium;Cesium$2.when||(Cesium$2.when=Cesium$2.when||{},Cesium$2.when.defer=Cesium$2.defer),function(e){var t={};function i(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=t,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStrin
|
||
|
|
/**
|
||
|
|
* @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
|
||
|
|
* Backing buffer: ArrayBuffer, Accessor: Uint8Array
|
||
|
|
* Released under the Apache License, Version 2.0
|
||
|
|
* see: https://github.com/dcodeIO/bytebuffer.js for details
|
||
|
|
*/;n=[i(191)],void 0===(o="function"==typeof(r=function(e){var t=function e(t,i,n){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===i&&(i=e.DEFAULT_ENDIAN),void 0===n&&(n=e.DEFAULT_NOASSERT),!n){if((t|=0)<0)throw RangeError("Illegal capacity");i=!!i,n=!!n}this.buffer=0===t?r:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=i,this.noAssert=n};t.VERSION="5.0.1",t.LITTLE_ENDIAN=!0,t.BIG_ENDIAN=!1,t.DEFAULT_CAPACITY=16,t.DEFAULT_ENDIAN=t.BIG_ENDIAN,t.DEFAULT_NOASSERT=!1,t.Long=e||null;var i=t.prototype;i.__isByteBuffer__,Object.defineProperty(i,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var r=new ArrayBuffer(0),n=String.fromCharCode;function o(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function a(){var e=[],t=[];return function(){if(0===arguments.length)return t.join("")+n.apply(String,e);e.length+arguments.length>1024&&(t.push(n.apply(String,e)),e.length=0),Array.prototype.push.apply(e,arguments)}}function s(e,t,i,r,n){var o,a,s=8*n-r-1,x=(1<<s)-1,l=x>>1,c=-7,u=i?n-1:0,h=i?-1:1,f=e[t+u];for(u+=h,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+u],u+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+u],u+=h,c-=8);if(0===o)o=1-l;else{if(o===x)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=l}return(f?-1:1)*a*Math.pow(2,o-r)}function x(e,t,i,r,n,o){var a,s,x,l=8*o-n-1,c=(1<<l)-1,u=c>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(x=Math.pow(2,-a))<1&&(a--,x*=2),(t+=a+u>=1?h/x:h*Math.pow(2,1-u))*x>=2&&(a++,x/=2),a+u>=c?(s=0,a=c):a+u>=1?(s=(t*x-1)*Math.pow(2,n),a+=u):(s=t*Math.pow(2,u-1)*Math.pow(2,n),a=0));n>=8;e[i+f]=255&s,f+=d,s/=256,n-=8);for(a=a<<n|s,l+=n;l>0;e[i+f]=255&a,f+=d,a/=256,l-=8);e[i+f-d]|=128*g}t.accessor=function(){return Uint8Array},t.allocate=function(e,i,r){return new t(e,i,r)},t.concat=function(e,i,r,n){"boolean"!=typeof i&&"string"==typeof i||(n=r,r=i,i=void 0);for(var o,a=0,s=0,x=e.length;s<x;++s)t.isByteBuffer(e[s])||(e[s]=t.wrap(e[s],i)),(o=e[s].limit-e[s].offset)>0&&(a+=o);if(0===a)return new t(0,r,n);var l,c=new t(a,r,n);for(s=0;s<x;)(o=(l=e[s++]).limit-l.offset)<=0||(c.view.set(l.view.subarray(l.offset,l.limit),c.offset),c.offset+=o);return c.limit=c.offset,c.offset=0,c},t.isByteBuffer=function(e){return!0===(e&&e.__isByteBuffer__)},t.type=function(){return ArrayBuffer},t.wrap=function(e,r,n,o){if("string"!=typeof r&&(o=n,n=r,r=void 0),"string"==typeof e)switch(void 0===r&&(r="utf8"),r){case"base64":return t.fromBase64(e,n);case"hex":return t.fromHex(e,n);case"binary":return t.fromBinary(e,n);case"utf8":return t.fromUTF8(e,n);case"debug":return t.fromDebug(e,n);default:throw Error("Unsupported encoding: "+r)}if(null===e||"object"!==_typeof(e))throw TypeError("Illegal buffer");var a;if(t.isByteBuffer(e))return(a=i.clone.call(e)).markedOffset=-1,a;if(e instanceof Uint8Array)a=new t(0,n,o),e.length>0&&(a.buffer=e.buffer,a.offset=e.byteOffset,a.limit=e.byteOffset+e.byteLength,a.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)a=new t(0,n,o),e.byteLength>0&&(a.buffer=e,a.offset=0,a.limit=e.byteLength,a.view=e.byteLength>0?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");(a=new t(e.length,n,o)).limit=e.length;for(var s=0;s<e.length;++s)a.view[s]=e[s]}return a},i.writeBitSet=function(e,t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r,n=t,o=e.length,a=o>>3,s=0;for(t+=this.writeVarint32(o,t);a--;)r=1&!!e[s++]|(1&!!e[s++])<<1|(1&!!e[s++])<<2|(1&!!e[s++])<<3|(1&!!e[s++])<<4|(1&!!e[s++])<<5|(1&!!e[s++])<<6|(1&!!e[s++])<<7,this.writeByte(r,t++);if(s<o){var x=0;for(r=0;s<o;)
|
||
|
|
/**
|
||
|
|
* @license long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
|
||
|
|
* Released under the Apache License, Version 2.0
|
||
|
|
* see: https://github.com/dcodeIO/long.js for details
|
||
|
|
*/;void 0===(n="function"==typeof(r=function(){function e(e,t,i){this.low=0|e,this.high=0|t,this.unsigned=!!i}function t(e){return!0===(e&&e.__isLong__)}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=t;var i={},r={};function n(e,t){var n,o,s;return t?(s=0<=(e>>>=0)&&e<256)&&(o=r[e])?o:(n=a(e,(0|e)<0?-1:0,!0),s&&(r[e]=n),n):(s=-128<=(e|=0)&&e<128)&&(o=i[e])?o:(n=a(e,e<0?-1:0,!1),s&&(i[e]=n),n)}function o(e,t){if(isNaN(e)||!isFinite(e))return t?g:d;if(t){if(e<0)return g;if(e>=u)return C}else{if(e<=-h)return y;if(e+1>=h)return v}return e<0?o(-e,t).neg():a(e%c|0,e/c|0,t)}function a(t,i,r){return new e(t,i,r)}e.fromInt=n,e.fromNumber=o,e.fromBits=a;var s=Math.pow;function x(e,t,i){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return d;if("number"==typeof t?(i=t,t=!1):t=!!t,(i=i||10)<2||36<i)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return x(e.substring(1),t,i).neg();for(var n=o(s(i,8)),a=d,l=0;l<e.length;l+=8){var c=Math.min(8,e.length-l),u=parseInt(e.substring(l,l+c),i);if(c<8){var h=o(s(i,c));a=a.mul(h).add(o(u))}else a=(a=a.mul(n)).add(o(u))}return a.unsigned=t,a}function l(t){return t instanceof e?t:"number"==typeof t?o(t):"string"==typeof t?x(t):a(t.low,t.high,t.unsigned)}e.fromString=x,e.fromValue=l;var c=4294967296,u=c*c,h=u/2,f=n(1<<24),d=n(0);e.ZERO=d;var g=n(0,!0);e.UZERO=g;var p=n(1);e.ONE=p;var m=n(1,!0);e.UONE=m;var b=n(-1);e.NEG_ONE=b;var v=a(-1,2147483647,!1);e.MAX_VALUE=v;var C=a(-1,-1,!0);e.MAX_UNSIGNED_VALUE=C;var y=a(0,-2147483648,!1);e.MIN_VALUE=y;var _=e.prototype;return _.toInt=function(){return this.unsigned?this.low>>>0:this.low},_.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},_.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(y)){var t=o(e),i=this.div(t),r=i.mul(t).sub(this);return i.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var n=o(s(e,6),this.unsigned),a=this,x="";;){var l=a.div(n),c=(a.sub(l.mul(n)).toInt()>>>0).toString(e);if((a=l).isZero())return c+x;for(;c.length<6;)c="0"+c;x=""+c+x}},_.getHighBits=function(){return this.high},_.getHighBitsUnsigned=function(){return this.high>>>0},_.getLowBits=function(){return this.low},_.getLowBitsUnsigned=function(){return this.low>>>0},_.getNumBitsAbs=function(){if(this.isNegative())return this.eq(y)?64:this.neg().getNumBitsAbs();for(var e=0!==this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!==this.high?t+33:t+1},_.isZero=function(){return 0===this.high&&0===this.low},_.isNegative=function(){return!this.unsigned&&this.high<0},_.isPositive=function(){return this.unsigned||this.high>=0},_.isOdd=function(){return 1==(1&this.low)},_.isEven=function(){return 0==(1&this.low)},_.equals=function(e){return t(e)||(e=l(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},_.eq=_.equals,_.notEquals=function(e){return!this.eq(e)},_.neq=_.notEquals,_.lessThan=function(e){return this.comp(e)<0},_.lt=_.lessThan,_.lessThanOrEqual=function(e){return this.comp(e)<=0},_.lte=_.lessThanOrEqual,_.greaterThan=function(e){return this.comp(e)>0},_.gt=_.greaterThan,_.greaterThanOrEqual=function(e){return this.comp(e)>=0},_.gte=_.greaterThanOrEqual,_.compare=function(e){if(t(e)||(e=l(e)),this.eq(e))return 0;var i=this.isNegative(),r=e.isNegative();return i&&!r?-1:!i&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},_.comp=_.compare,_.negate=function(){return!this.unsigned&&this.eq(y)?y:this.not().add(p)},_.neg=_.negate,_.add=function(e){t(e)||(e=l(e));var i=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,s=e.high>>>16,x=65535&e.high,c=e.low>>>16,u=0,h=0,f=0,d=0;return f+=(d+=o+(65535&e.low))>>>16,h+=(f+=n+c)>>>16,u+=(h+=r+x)>>>16,u+=i+s,a((f&=65535)<<16|(d&=65535),(u&=655
|