@cesium/engine 8.0.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/ThirdParty/Workers/z-worker-pako.js +1 -5
- package/Build/Workers/{chunk-UEXTBDBE.js → chunk-24YTYWNB.js} +10 -10
- package/Build/Workers/{chunk-2A75IWRS.js → chunk-2632RVPI.js} +7 -7
- package/Build/Workers/{chunk-TTUZP4BO.js → chunk-2KACWKS4.js} +4 -4
- package/Build/Workers/{chunk-YJEBABKH.js → chunk-2XPLH3JY.js} +7 -7
- package/Build/Workers/{chunk-7TC63SJW.js → chunk-2ZBL3MVO.js} +8 -8
- package/Build/Workers/{chunk-GRC2ZTAF.js → chunk-3NCVAGDA.js} +14 -14
- package/Build/Workers/{chunk-PGSJK77E.js → chunk-5R6VWLMH.js} +6 -6
- package/Build/Workers/{chunk-BROJAZRZ.js → chunk-5TIV3L26.js} +13 -13
- package/Build/Workers/{chunk-MDWEGWPA.js → chunk-6WF3KIF5.js} +10 -10
- package/Build/Workers/{chunk-BIKA3NRA.js → chunk-73FKKY52.js} +5 -5
- package/Build/Workers/{chunk-FJKNFAKQ.js → chunk-7COR472O.js} +10 -10
- package/Build/Workers/{chunk-OGXZVPPM.js → chunk-ADOVHYWO.js} +5 -5
- package/Build/Workers/{chunk-HU6N6EXB.js → chunk-BCU2LH5T.js} +12 -11
- package/Build/Workers/{chunk-I46ZRR5W.js → chunk-C3XBUYBO.js} +17 -17
- package/Build/Workers/{chunk-EHWHNOEX.js → chunk-C6OI26DR.js} +1 -1
- package/Build/Workers/{chunk-EERJKOAF.js → chunk-CO35JNNE.js} +4 -4
- package/Build/Workers/{chunk-SH5USDPI.js → chunk-DGDUKCJJ.js} +6 -6
- package/Build/Workers/{chunk-2UPKWTMJ.js → chunk-DPUSFA7S.js} +6 -6
- package/Build/Workers/{chunk-Z3TIFFGF.js → chunk-E6WXPSJS.js} +7 -7
- package/Build/Workers/{chunk-4H7PY4U5.js → chunk-EOXYZ34O.js} +2 -2
- package/Build/Workers/{chunk-FZRIVR7Y.js → chunk-EPKE7GE3.js} +5 -5
- package/Build/Workers/{chunk-VOXYEYJT.js → chunk-GFA4SMXV.js} +11 -11
- package/Build/Workers/{chunk-F3YA3Y2Z.js → chunk-GXUXEOE2.js} +1 -1
- package/Build/Workers/{chunk-X4356LRH.js → chunk-HBQPB6IH.js} +12 -12
- package/Build/Workers/{chunk-SOWMRMWA.js → chunk-I37B3MZ2.js} +1 -1
- package/Build/Workers/{chunk-2FRVPMCS.js → chunk-L4BW3RUA.js} +7 -7
- package/Build/Workers/{chunk-34FXV7D7.js → chunk-LAQP3SCC.js} +2 -2
- package/Build/Workers/{chunk-FNIRWHJB.js → chunk-LQJ5FFFR.js} +10 -10
- package/Build/Workers/{chunk-Y2ME2IJV.js → chunk-M2AYBTNH.js} +13 -13
- package/Build/Workers/{chunk-DDUQAJ4P.js → chunk-MWV7IZK4.js} +7 -7
- package/Build/Workers/{chunk-STW2DGFI.js → chunk-N4KXMWQU.js} +2 -2
- package/Build/Workers/{chunk-Y5UQJLYE.js → chunk-NP2GYYE5.js} +6 -6
- package/Build/Workers/{chunk-PPH7OFP3.js → chunk-NZWNZA6S.js} +5 -5
- package/Build/Workers/{chunk-EG6PTBY2.js → chunk-P2YAAMT2.js} +15 -15
- package/Build/Workers/{chunk-LPR3YNP2.js → chunk-P4XKB3QZ.js} +5 -5
- package/Build/Workers/{chunk-4DO5W5XZ.js → chunk-PXB7T27O.js} +6 -6
- package/Build/Workers/{chunk-5QULIR53.js → chunk-QCQUZGXI.js} +4 -4
- package/Build/Workers/{chunk-7ZFGPDJA.js → chunk-QKBGRKKG.js} +4 -4
- package/Build/Workers/{chunk-3VAZEH7M.js → chunk-RMOEYCZW.js} +2 -2
- package/Build/Workers/{chunk-GATZHF3K.js → chunk-RSJXEO2A.js} +2 -2
- package/Build/Workers/{chunk-M7ERACJJ.js → chunk-RV7ZOSS6.js} +13 -13
- package/Build/Workers/{chunk-JURN7NPV.js → chunk-SE4PXOEA.js} +17 -17
- package/Build/Workers/{chunk-XGI5BXZY.js → chunk-SS4ESNE3.js} +2 -2
- package/Build/Workers/{chunk-G43QFN4Q.js → chunk-TJBU6GML.js} +6 -6
- package/Build/Workers/{chunk-BBWDMCVU.js → chunk-TZORKRNK.js} +1 -1
- package/Build/Workers/{chunk-23UFSGND.js → chunk-VR5RBW52.js} +7 -7
- package/Build/Workers/{chunk-A5DWLWCY.js → chunk-WHUSTDIB.js} +10 -10
- package/Build/Workers/{chunk-T3XIFPYR.js → chunk-X2F6BEPY.js} +13 -13
- package/Build/Workers/{chunk-BG4UCVXN.js → chunk-X6XOMPWL.js} +3 -3
- package/Build/Workers/{chunk-YWTJ2B4B.js → chunk-YDVSBWEO.js} +1 -1
- package/Build/Workers/{chunk-2FWRMUTY.js → chunk-YV4H2Y7M.js} +4 -4
- package/Build/Workers/{chunk-ZT7KWISZ.js → chunk-Z7FQLK6N.js} +4 -4
- package/Build/Workers/{chunk-F4HFJMGM.js → chunk-ZNVSKMQ2.js} +6 -6
- package/Build/Workers/{chunk-KKCR2YOP.js → chunk-ZYPTP7GS.js} +11 -11
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +16 -16
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipseGeometry.js +26 -26
- package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
- package/Build/Workers/createEllipsoidGeometry.js +19 -19
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
- package/Build/Workers/createFrustumGeometry.js +18 -18
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
- package/Build/Workers/createGeometry.js +25 -25
- package/Build/Workers/createGroundPolylineGeometry.js +22 -22
- package/Build/Workers/createPlaneGeometry.js +16 -16
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +33 -33
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createPolylineGeometry.js +25 -25
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
- package/Build/Workers/createSimplePolylineGeometry.js +23 -23
- package/Build/Workers/createSphereGeometry.js +19 -19
- package/Build/Workers/createSphereOutlineGeometry.js +18 -18
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -24
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +22 -22
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +22 -22
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -19
- package/Build/Workers/createWallGeometry.js +24 -24
- package/Build/Workers/createWallOutlineGeometry.js +23 -23
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +11 -11
- package/Build/Workers/transcodeKTX2.js +7 -7
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Source/Core/Check.d.ts +127 -0
- package/Source/Core/Check.js +0 -1
- package/Source/Core/Geometry.js +1 -1
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/PolygonGeometry.js +1 -1
- package/Source/Core/VerticalExaggeration.js +2 -1
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +32 -0
- package/Source/Scene/BillboardCollection.js +1 -1
- package/Source/Scene/BingMapsImageryProvider.js +4 -0
- package/Source/Scene/Cesium3DTilesVoxelProvider.js +2 -9
- package/Source/Scene/Cesium3DTileset.js +4 -39
- package/Source/Scene/Globe.js +0 -67
- package/Source/Scene/Label.js +33 -0
- package/Source/Scene/LabelCollection.js +2 -1
- package/Source/Scene/Primitive.js +0 -3
- package/Source/Scene/SensorVolumePortionToDisplay.js +1 -1
- package/Source/Scene/VoxelBoxShape.js +0 -15
- package/Source/Scene/VoxelCylinderShape.js +14 -131
- package/Source/Scene/VoxelEllipsoidShape.js +136 -227
- package/Source/Scene/VoxelPrimitive.js +106 -14
- package/Source/Scene/VoxelRenderResources.js +9 -3
- package/Source/Scene/VoxelShape.js +0 -10
- package/Source/Scene/processVoxelProperties.js +1 -0
- package/Source/Shaders/Voxels/IntersectBox.glsl +21 -47
- package/Source/Shaders/Voxels/IntersectBox.js +21 -47
- package/Source/Shaders/Voxels/IntersectClippingPlanes.glsl +1 -1
- package/Source/Shaders/Voxels/IntersectClippingPlanes.js +1 -1
- package/Source/Shaders/Voxels/IntersectCylinder.glsl +66 -96
- package/Source/Shaders/Voxels/IntersectCylinder.js +66 -96
- package/Source/Shaders/Voxels/IntersectEllipsoid.glsl +226 -154
- package/Source/Shaders/Voxels/IntersectEllipsoid.js +226 -154
- package/Source/Shaders/Voxels/IntersectionUtils.glsl +33 -11
- package/Source/Shaders/Voxels/IntersectionUtils.js +33 -11
- package/Source/Shaders/Voxels/Megatexture.glsl +1 -2
- package/Source/Shaders/Voxels/Megatexture.js +1 -2
- package/Source/Shaders/Voxels/Octree.glsl +14 -9
- package/Source/Shaders/Voxels/Octree.js +14 -9
- package/Source/Shaders/Voxels/VoxelFS.glsl +93 -43
- package/Source/Shaders/Voxels/VoxelFS.js +93 -43
- package/Source/Shaders/Voxels/VoxelUtils.glsl +31 -0
- package/Source/Shaders/Voxels/VoxelUtils.js +33 -0
- package/Source/Shaders/Voxels/convertUvToBox.glsl +24 -3
- package/Source/Shaders/Voxels/convertUvToBox.js +24 -4
- package/Source/Shaders/Voxels/convertUvToCylinder.glsl +50 -8
- package/Source/Shaders/Voxels/convertUvToCylinder.js +50 -8
- package/Source/Shaders/Voxels/convertUvToEllipsoid.glsl +82 -53
- package/Source/Shaders/Voxels/convertUvToEllipsoid.js +82 -53
- package/Source/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/Source/Workers/createGeometry.js +1 -1
- package/index.d.ts +251 -34
- package/index.js +77 -76
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";const{Array:e,Object:t,Number:n,Math:s,Error:r,Uint8Array:a,Uint16Array:o,Uint32Array:i,Int32Array:c,Map:l,DataView:u,Promise:h,TextEncoder:f,crypto:p,postMessage:d,TransformStream:g,ReadableStream:w,WritableStream:y,CompressionStream:m,DecompressionStream:_}=self,b=void 0,S="undefined",v="function";class k{constructor(e){return class extends g{constructor(t,n){const s=new e(n);super({transform(e,t){t.enqueue(s.append(e))},flush(e){const t=s.flush();t&&e.enqueue(t)}})}}}}const z=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;z[e]=t}class D{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^z[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class C extends g{constructor(){let e;const t=new D;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new a(4);new u(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const I={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=I.getPartial(n);return 32===s?e.concat(t):I._shiftRight(t,s,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+I.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,s.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=I.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r<e.length;r++)s.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=I.getPartial(r);return s.push(I.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},A={bytes:{fromBits(e){const t=I.bitLength(e)/8,n=new a(t);let s;for(let r=0;t>r;r++)0==(3&r)&&(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n<e.length;n++)s=s<<8|e[n],3==(3&n)&&(t.push(s),s=0);return 3&n&&t.push(I.partial(8*(3&n),s)),t}}},q=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=A.utf8String.toBits(e));const n=t._buffer=I.concat(t._buffer,e),s=t._length,a=t._length=s+I.bitLength(e);if(a>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+s-(t.blockSize+s&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=I.concat(t,[I.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,s){return e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s}_S(e,t){return t<<e|t>>>32-e}_block(t){const n=this,r=n._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let o=r[0],i=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,o)+n._f(e,i,c,l)+u+a[e]+n._key[s.floor(e/20)]|0;u=l,l=c,c=n._S(30,i),i=o,o=t}r[0]=r[0]+o|0,r[1]=r[1]+i|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},R={getRandomValues(e){const t=new i(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let r,a=0;a<e.length;a+=4){const e=n(4294967296*(r||s.random()));r=987654071*e(),t[a/4]=4294967296*e()|0}return e}},H={importKey:e=>new H.hmacSha1(A.bytes.toBits(e)),pbkdf2(e,t,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const a=1+(s>>5)<<2;let o,i,c,l,h;const f=new ArrayBuffer(a),p=new u(f);let d=0;const g=I;for(t=A.bytes.toBits(t),h=1;(a||1)>d;h++){for(o=i=e.encrypt(g.concat(t,[h])),c=1;n>c;c++)for(i=e.encrypt(i),l=0;l<i.length;l++)o[l]^=i[l];for(c=0;(a||1)>d&&c<o.length;c++)p.setInt32(d,o[c]),d+=4}return f.slice(0,s/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=q,s=[[],[]];t._baseHash=[new n,new n];const r=t._baseHash[0].blockSize/32;e.length>r&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new r("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},P=typeof p!=S&&typeof p.getRandomValues==v,B="Invalid password",K="Invalid signature",T="zipjs-abort-check-password";function V(e){return P?p.getRandomValues(e):R.getRandomValues(e)}const x=16,E={name:"PBKDF2"},U=t.assign({hash:{name:"HMAC"}},E),W=t.assign({iterations:1e3,hash:{name:"SHA-1"}},E),M=["deriveBits"],N=[8,12,16],O=[16,24,32],L=10,F=[0,0,0,0],j=typeof p!=S,G=j&&p.subtle,X=j&&typeof G!=S,J=A.bytes,Q=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],s=t._tables[1],a=e.length;let o,i,c,l=1;if(4!==a&&6!==a&&8!==a)throw new r("invalid aes key size");for(t._key=[i=e.slice(0),c=[]],o=a;4*a+28>o;o++){let e=i[o-1];(o%a==0||8===a&&o%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[o]=i[o-a]^e}for(let e=0;o;e++,o--){const t=i[3&e?o:o-4];c[e]=4>=o||4>e?t:s[0][n[t>>>24]]^s[1][n[t>>16&255]]^s[2][n[t>>8&255]]^s[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],s=t[4],r=[],a=[];let o,i,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let u=o=0;!n[u];u^=i||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^255&a^99,n[u]=a,s[a]=u,l=r[c=r[i=r[u]]];let h=16843009*l^65537*c^257*i^16843008*u,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=h=h<<24^h>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new r("invalid aes block size");const n=this._key[t],s=n.length/4-2,a=[0,0,0,0],o=this._tables[t],i=o[0],c=o[1],l=o[2],u=o[3],h=o[4];let f,p,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;s>e;e++)f=i[g>>>24]^c[w>>16&255]^l[y>>8&255]^u[255&m]^n[_],p=i[w>>>24]^c[y>>16&255]^l[m>>8&255]^u[255&g]^n[_+1],d=i[y>>>24]^c[m>>16&255]^l[g>>8&255]^u[255&w]^n[_+2],m=i[m>>>24]^c[g>>16&255]^l[w>>8&255]^u[255&y]^n[_+3],_+=4,g=f,w=p,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=h[g>>>24]<<24^h[w>>16&255]<<16^h[y>>8&255]<<8^h[255&m]^n[_++],f=g,g=w,w=y,y=m,m=f;return a}},Y=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let s;if(!(s=t.length))return[];const r=I.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return I.clamp(t,r)}},Z=H.hmacSha1;let $=j&&X&&typeof G.importKey==v,ee=j&&X&&typeof G.deriveBits==v;class te extends g{constructor({password:e,rawPassword:n,signed:s,encryptionStrength:o,checkPasswordOnly:i}){super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:ae(e,n),signed:s,strength:o-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:o,resolveReady:c,ready:l}=n;s?(await(async(e,t,n,s)=>{const a=await re(e,t,n,ie(s,0,N[t])),o=ie(s,N[t]);if(a[0]!=o[0]||a[1]!=o[1])throw new r(B)})(n,o,s,ie(e,0,N[o]+2)),e=ie(e,N[o]+2),i?t.error(new r(T)):c()):await l;const u=new a(e.length-L-(e.length-L)%x);t.enqueue(se(n,e,u,0,L,!0))},async flush(e){const{signed:t,ctr:n,hmac:s,pending:o,ready:i}=this;if(s&&n){await i;const c=ie(o,0,o.length-L),l=ie(o,o.length-L);let u=new a;if(c.length){const e=le(J,c);s.update(e);const t=n.update(e);u=ce(J,t)}if(t){const e=ie(ce(J,s.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=l[t])throw new r(K)}e.enqueue(u)}}})}}class ne extends g{constructor({password:e,rawPassword:n,encryptionStrength:s}){let r;super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:ae(e,n),strength:s-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:r,resolveReady:o,ready:i}=n;let c=new a;s?(c=await(async(e,t,n)=>{const s=V(new a(N[t]));return oe(s,await re(e,t,n,s))})(n,r,s),o()):await i;const l=new a(c.length+e.length-e.length%x);l.set(c,0),t.enqueue(se(n,e,l,c.length,0))},async flush(e){const{ctr:t,hmac:n,pending:s,ready:o}=this;if(n&&t){await o;let i=new a;if(s.length){const e=t.update(le(J,s));n.update(e),i=ce(J,e)}r.signature=ce(J,n.digest()).slice(0,L),e.enqueue(oe(i,r.signature))}}}),r=this}}function se(e,t,n,s,r,o){const{ctr:i,hmac:c,pending:l}=e,u=t.length-r;let h;for(l.length&&(t=oe(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,u-u%x)),h=0;u-x>=h;h+=x){const e=le(J,ie(t,h,h+x));o&&c.update(e);const r=i.update(e);o||c.update(r),n.set(ce(J,r),h+s)}return e.pending=ie(t,h),n}async function re(n,s,r,o){n.password=null;const i=await(async(e,t,n,s,r)=>{if(!$)return H.importKey(t);try{return await G.importKey("raw",t,n,!1,r)}catch(e){return $=!1,H.importKey(t)}})(0,r,U,0,M),c=await(async(e,t,n)=>{if(!ee)return H.pbkdf2(t,e.salt,W.iterations,n);try{return await G.deriveBits(e,t,n)}catch(s){return ee=!1,H.pbkdf2(t,e.salt,W.iterations,n)}})(t.assign({salt:o},W),i,8*(2*O[s]+2)),l=new a(c),u=le(J,ie(l,0,O[s])),h=le(J,ie(l,O[s],2*O[s])),f=ie(l,2*O[s]);return t.assign(n,{keys:{key:u,authentication:h,passwordVerification:f},ctr:new Y(new Q(u),e.from(F)),hmac:new Z(h)}),f}function ae(e,t){return t===b?(e=>{if(typeof f==S){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new f).encode(e)})(e):t}function oe(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function ce(e,t){return e.fromBits(t)}function le(e,t){return e.toBits(t)}class ue extends g{constructor({password:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;if(n.password){const t=fe(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new r(B);e=e.subarray(12)}s?t.error(new r(T)):t.enqueue(fe(n,e))}})}}class he extends g{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;let s,r;if(n.password){n.password=null;const t=V(new a(12));t[11]=n.passwordVerification,s=new a(e.length+t.length),s.set(pe(n,t),0),r=12}else s=new a(e.length),r=0;s.set(pe(n,e),r),t.enqueue(s)}})}}function fe(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=we(e)^t[s],ge(e,n[s]);return n}function pe(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=we(e)^t[s],ge(e,t[s]);return n}function de(e,n){const s=[305419896,591751049,878082192];t.assign(e,{keys:s,crcKey0:new D(s[0]),crcKey2:new D(s[2])});for(let t=0;t<n.length;t++)ge(e,n.charCodeAt(t))}function ge(e,t){let[n,r,a]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=me(s.imul(me(r+ye(n)),134775813)+1),e.crcKey2.append([r>>>24]),a=~e.crcKey2.get(),e.keys=[n,r,a]}function we(e){const t=2|e.keys[2];return ye(s.imul(t,1^t)>>>8)}function ye(e){return 255&e}function me(e){return 4294967295&e}const _e="deflate-raw";class be extends g{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:s}){super({});const{compressed:r,encrypted:a,useCompressionStream:o,zipCrypto:i,signed:c,level:l}=e,h=this;let f,p,d=ve(super.readable);a&&!i||!c||(f=new C,d=De(d,f)),r&&(d=ze(d,o,{level:l,chunkSize:t},s,n)),a&&(i?d=De(d,new he(e)):(p=new ne(e),d=De(d,p))),ke(h,d,(()=>{let e;a&&!i&&(e=p.signature),a&&!i||!c||(e=new u(f.value.buffer).getUint32(0)),h.signature=e}))}}class Se extends g{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:s}){super({});const{zipCrypto:a,encrypted:o,signed:i,signature:c,compressed:l,useCompressionStream:h}=e;let f,p,d=ve(super.readable);o&&(a?d=De(d,new ue(e)):(p=new te(e),d=De(d,p))),l&&(d=ze(d,h,{chunkSize:t},s,n)),o&&!a||!i||(f=new C,d=De(d,f)),ke(this,d,(()=>{if((!o||a)&&i){const e=new u(f.value.buffer);if(c!=e.getUint32(0,!1))throw new r(K)}}))}}function ve(e){return De(e,new g({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ke(e,n,s){n=De(n,new g({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}function ze(e,t,n,s,r){try{e=De(e,new(t&&s?s:r)(_e,n))}catch(s){if(!t)return e;try{e=De(e,new r(_e,n))}catch(t){return e}}return e}function De(e,t){return e.pipeThrough(t)}const Ce="data",Ie="close";class Ae extends g{constructor(e,n){super({});const s=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=be:r.startsWith("inflate")&&(a=Se);let o=0,i=0;const c=new a(e,n),l=super.readable,u=new g({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){t.assign(s,{inputSize:i})}}),h=new g({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(s,{signature:e,outputSize:o,inputSize:i})}});t.defineProperty(s,"readable",{get:()=>l.pipeThrough(u).pipeThrough(c).pipeThrough(h)})}}class qe extends g{constructor(e){let t;super({transform:function n(s,r){if(t){const e=new a(t.length+s.length);e.set(t),e.set(s,t.length),s=e,t=null}s.length>e?(r.enqueue(s.slice(0,e)),n(s.slice(e),r)):t=s},flush(e){t&&t.length&&e.enqueue(t)}})}}const Re=new l,He=new l;let Pe,Be=0,Ke=!0;async function Te(e){try{const{options:t,scripts:s,config:r}=e;if(s&&s.length)try{Ke?importScripts.apply(b,s):await Ve(s)}catch(e){Ke=!1,await Ve(s)}self.initCodec&&self.initCodec(),r.CompressionStreamNative=self.CompressionStream,r.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(r.CompressionStream=new k(self.Deflate)),self.Inflate&&(r.DecompressionStream=new k(self.Inflate));const a={highWaterMark:1},o=e.readable||new w({async pull(e){const t=new h((e=>Re.set(Be,e)));xe({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await t;e.enqueue(s),r&&e.close()}},a),i=e.writable||new y({async write(e){let t;const s=new h((e=>t=e));He.set(Be,t),xe({type:Ce,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await s}},a),c=new Ae(t,r);Pe=new AbortController;const{signal:l}=Pe;await o.pipeThrough(c).pipeThrough(new qe(r.chunkSize)).pipeTo(i,{signal:l,preventClose:!0,preventAbort:!0});try{await i.getWriter().close()}catch(e){}const{signature:u,inputSize:f,outputSize:p}=c;xe({type:Ie,result:{signature:u,inputSize:f,outputSize:p}})}catch(e){Ee(e)}}async function Ve(e){for(const t of e)await import(t)}function xe(e){let{value:t}=e;if(t)if(t.length)try{t=new a(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ee(e=new r("Unknown error")){const{message:t,stack:n,code:s,name:a}=e;d({error:{message:t,stack:n,code:s,name:a}})}function Ue(e,n,s){return class{constructor(r){const o=this;var i,c;i=r,c="level",(typeof t.hasOwn===v?t.hasOwn(i,c):i.hasOwnProperty(c))&&r.level===b&&delete r.level,o.codec=new e(t.assign({},n,r)),s(o.codec,(e=>{if(o.pendingData){const t=o.pendingData;o.pendingData=new a(t.length+e.length);const{pendingData:n}=o;n.set(t,0),n.set(e,t.length)}else o.pendingData=new a(e)}))}append(e){return this.codec.push(e),r(this)}flush(){return this.codec.push(new a,!0),r(this)}};function r(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new a}}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:s,done:r}=e;try{if("start"==t&&Te(e),t==Ce){const e=Re.get(n);Re.delete(n),e({value:new a(s),done:r})}if("ack"==t){const e=He.get(n);He.delete(n),e()}t==Ie&&Pe.abort()}catch(e){Ee(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Ue(e.Deflate,t.deflate,n),Inflate:Ue(e.Inflate,t.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((e,t)=>e.onData=t));self.Deflate=e,self.Inflate=t}}();
|
|
1
|
+
!function(){"use strict";const{Array:e,Object:t,Number:n,Math:s,Error:r,Uint8Array:a,Uint16Array:o,Uint32Array:i,Int32Array:c,Map:l,DataView:u,Promise:h,TextEncoder:f,crypto:p,postMessage:d,TransformStream:g,ReadableStream:w,WritableStream:y,CompressionStream:m,DecompressionStream:_}=self,b=void 0,S="undefined",v="function";class k{constructor(e){return class extends g{constructor(t,n){const s=new e(n);super({transform(e,t){t.enqueue(s.append(e))},flush(e){const t=s.flush();t&&e.enqueue(t)}})}}}}const z=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;z[e]=t}class D{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^z[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class C extends g{constructor(){let e;const t=new D;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new a(4);new u(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const I={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=I.getPartial(n);return 32===s?e.concat(t):I._shiftRight(t,s,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+I.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,s.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=I.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r<e.length;r++)s.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=I.getPartial(r);return s.push(I.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},A={bytes:{fromBits(e){const t=I.bitLength(e)/8,n=new a(t);let s;for(let r=0;t>r;r++)0==(3&r)&&(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n<e.length;n++)s=s<<8|e[n],3==(3&n)&&(t.push(s),s=0);return 3&n&&t.push(I.partial(8*(3&n),s)),t}}},q=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=A.utf8String.toBits(e));const n=t._buffer=I.concat(t._buffer,e),s=t._length,a=t._length=s+I.bitLength(e);if(a>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+s-(t.blockSize+s&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=I.concat(t,[I.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,s){return e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s}_S(e,t){return t<<e|t>>>32-e}_block(t){const n=this,r=n._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let o=r[0],i=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,o)+n._f(e,i,c,l)+u+a[e]+n._key[s.floor(e/20)]|0;u=l,l=c,c=n._S(30,i),i=o,o=t}r[0]=r[0]+o|0,r[1]=r[1]+i|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},R={getRandomValues(e){const t=new i(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let r,a=0;a<e.length;a+=4){const e=n(4294967296*(r||s.random()));r=987654071*e(),t[a/4]=4294967296*e()|0}return e}},H={importKey:e=>new H.hmacSha1(A.bytes.toBits(e)),pbkdf2(e,t,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const a=1+(s>>5)<<2;let o,i,c,l,h;const f=new ArrayBuffer(a),p=new u(f);let d=0;const g=I;for(t=A.bytes.toBits(t),h=1;(a||1)>d;h++){for(o=i=e.encrypt(g.concat(t,[h])),c=1;n>c;c++)for(i=e.encrypt(i),l=0;l<i.length;l++)o[l]^=i[l];for(c=0;(a||1)>d&&c<o.length;c++)p.setInt32(d,o[c]),d+=4}return f.slice(0,s/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=q,s=[[],[]];t._baseHash=[new n,new n];const r=t._baseHash[0].blockSize/32;e.length>r&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new r("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},P=typeof p!=S&&typeof p.getRandomValues==v,B="Invalid password",K="Invalid signature",T="zipjs-abort-check-password";function V(e){return P?p.getRandomValues(e):R.getRandomValues(e)}const x=16,E={name:"PBKDF2"},U=t.assign({hash:{name:"HMAC"}},E),W=t.assign({iterations:1e3,hash:{name:"SHA-1"}},E),M=["deriveBits"],N=[8,12,16],O=[16,24,32],L=10,F=[0,0,0,0],j=typeof p!=S,G=j&&p.subtle,X=j&&typeof G!=S,J=A.bytes,Q=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],s=t._tables[1],a=e.length;let o,i,c,l=1;if(4!==a&&6!==a&&8!==a)throw new r("invalid aes key size");for(t._key=[i=e.slice(0),c=[]],o=a;4*a+28>o;o++){let e=i[o-1];(o%a==0||8===a&&o%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[o]=i[o-a]^e}for(let e=0;o;e++,o--){const t=i[3&e?o:o-4];c[e]=4>=o||4>e?t:s[0][n[t>>>24]]^s[1][n[t>>16&255]]^s[2][n[t>>8&255]]^s[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],s=t[4],r=[],a=[];let o,i,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let u=o=0;!n[u];u^=i||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^255&a^99,n[u]=a,s[a]=u,l=r[c=r[i=r[u]]];let h=16843009*l^65537*c^257*i^16843008*u,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=h=h<<24^h>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new r("invalid aes block size");const n=this._key[t],s=n.length/4-2,a=[0,0,0,0],o=this._tables[t],i=o[0],c=o[1],l=o[2],u=o[3],h=o[4];let f,p,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;s>e;e++)f=i[g>>>24]^c[w>>16&255]^l[y>>8&255]^u[255&m]^n[_],p=i[w>>>24]^c[y>>16&255]^l[m>>8&255]^u[255&g]^n[_+1],d=i[y>>>24]^c[m>>16&255]^l[g>>8&255]^u[255&w]^n[_+2],m=i[m>>>24]^c[g>>16&255]^l[w>>8&255]^u[255&y]^n[_+3],_+=4,g=f,w=p,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=h[g>>>24]<<24^h[w>>16&255]<<16^h[y>>8&255]<<8^h[255&m]^n[_++],f=g,g=w,w=y,y=m,m=f;return a}},Y=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let s;if(!(s=t.length))return[];const r=I.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return I.clamp(t,r)}},Z=H.hmacSha1;let $=j&&X&&typeof G.importKey==v,ee=j&&X&&typeof G.deriveBits==v;class te extends g{constructor({password:e,rawPassword:n,signed:s,encryptionStrength:o,checkPasswordOnly:i}){super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:ae(e,n),signed:s,strength:o-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:o,resolveReady:c,ready:l}=n;s?(await(async(e,t,n,s)=>{const a=await re(e,t,n,ie(s,0,N[t])),o=ie(s,N[t]);if(a[0]!=o[0]||a[1]!=o[1])throw new r(B)})(n,o,s,ie(e,0,N[o]+2)),e=ie(e,N[o]+2),i?t.error(new r(T)):c()):await l;const u=new a(e.length-L-(e.length-L)%x);t.enqueue(se(n,e,u,0,L,!0))},async flush(e){const{signed:t,ctr:n,hmac:s,pending:o,ready:i}=this;if(s&&n){await i;const c=ie(o,0,o.length-L),l=ie(o,o.length-L);let u=new a;if(c.length){const e=le(J,c);s.update(e);const t=n.update(e);u=ce(J,t)}if(t){const e=ie(ce(J,s.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=l[t])throw new r(K)}e.enqueue(u)}}})}}class ne extends g{constructor({password:e,rawPassword:n,encryptionStrength:s}){let r;super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:ae(e,n),strength:s-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:r,resolveReady:o,ready:i}=n;let c=new a;s?(c=await(async(e,t,n)=>{const s=V(new a(N[t]));return oe(s,await re(e,t,n,s))})(n,r,s),o()):await i;const l=new a(c.length+e.length-e.length%x);l.set(c,0),t.enqueue(se(n,e,l,c.length,0))},async flush(e){const{ctr:t,hmac:n,pending:s,ready:o}=this;if(n&&t){await o;let i=new a;if(s.length){const e=t.update(le(J,s));n.update(e),i=ce(J,e)}r.signature=ce(J,n.digest()).slice(0,L),e.enqueue(oe(i,r.signature))}}}),r=this}}function se(e,t,n,s,r,o){const{ctr:i,hmac:c,pending:l}=e,u=t.length-r;let h;for(l.length&&(t=oe(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,u-u%x)),h=0;u-x>=h;h+=x){const e=le(J,ie(t,h,h+x));o&&c.update(e);const r=i.update(e);o||c.update(r),n.set(ce(J,r),h+s)}return e.pending=ie(t,h),n}async function re(n,s,r,o){n.password=null;const i=await(async(e,t,n,s,r)=>{if(!$)return H.importKey(t);try{return await G.importKey("raw",t,n,!1,r)}catch(e){return $=!1,H.importKey(t)}})(0,r,U,0,M),c=await(async(e,t,n)=>{if(!ee)return H.pbkdf2(t,e.salt,W.iterations,n);try{return await G.deriveBits(e,t,n)}catch(s){return ee=!1,H.pbkdf2(t,e.salt,W.iterations,n)}})(t.assign({salt:o},W),i,8*(2*O[s]+2)),l=new a(c),u=le(J,ie(l,0,O[s])),h=le(J,ie(l,O[s],2*O[s])),f=ie(l,2*O[s]);return t.assign(n,{keys:{key:u,authentication:h,passwordVerification:f},ctr:new Y(new Q(u),e.from(F)),hmac:new Z(h)}),f}function ae(e,t){return t===b?(e=>{if(typeof f==S){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new f).encode(e)})(e):t}function oe(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function ce(e,t){return e.fromBits(t)}function le(e,t){return e.toBits(t)}class ue extends g{constructor({password:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;if(n.password){const t=fe(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new r(B);e=e.subarray(12)}s?t.error(new r(T)):t.enqueue(fe(n,e))}})}}class he extends g{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;let s,r;if(n.password){n.password=null;const t=V(new a(12));t[11]=n.passwordVerification,s=new a(e.length+t.length),s.set(pe(n,t),0),r=12}else s=new a(e.length),r=0;s.set(pe(n,e),r),t.enqueue(s)}})}}function fe(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=we(e)^t[s],ge(e,n[s]);return n}function pe(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=we(e)^t[s],ge(e,t[s]);return n}function de(e,n){const s=[305419896,591751049,878082192];t.assign(e,{keys:s,crcKey0:new D(s[0]),crcKey2:new D(s[2])});for(let t=0;t<n.length;t++)ge(e,n.charCodeAt(t))}function ge(e,t){let[n,r,a]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=me(s.imul(me(r+ye(n)),134775813)+1),e.crcKey2.append([r>>>24]),a=~e.crcKey2.get(),e.keys=[n,r,a]}function we(e){const t=2|e.keys[2];return ye(s.imul(t,1^t)>>>8)}function ye(e){return 255&e}function me(e){return 4294967295&e}const _e="deflate-raw";class be extends g{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:s}){super({});const{compressed:r,encrypted:a,useCompressionStream:o,zipCrypto:i,signed:c,level:l}=e,h=this;let f,p,d=ve(super.readable);a&&!i||!c||(f=new C,d=De(d,f)),r&&(d=ze(d,o,{level:l,chunkSize:t},s,n)),a&&(i?d=De(d,new he(e)):(p=new ne(e),d=De(d,p))),ke(h,d,(()=>{let e;a&&!i&&(e=p.signature),a&&!i||!c||(e=new u(f.value.buffer).getUint32(0)),h.signature=e}))}}class Se extends g{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:s}){super({});const{zipCrypto:a,encrypted:o,signed:i,signature:c,compressed:l,useCompressionStream:h}=e;let f,p,d=ve(super.readable);o&&(a?d=De(d,new ue(e)):(p=new te(e),d=De(d,p))),l&&(d=ze(d,h,{chunkSize:t},s,n)),o&&!a||!i||(f=new C,d=De(d,f)),ke(this,d,(()=>{if((!o||a)&&i){const e=new u(f.value.buffer);if(c!=e.getUint32(0,!1))throw new r(K)}}))}}function ve(e){return De(e,new g({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ke(e,n,s){n=De(n,new g({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}function ze(e,t,n,s,r){try{e=De(e,new(t&&s?s:r)(_e,n))}catch(s){if(!t)return e;try{e=De(e,new r(_e,n))}catch(t){return e}}return e}function De(e,t){return e.pipeThrough(t)}const Ce="data",Ie="close";class Ae extends g{constructor(e,n){super({});const s=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=be:r.startsWith("inflate")&&(a=Se);let o=0,i=0;const c=new a(e,n),l=super.readable,u=new g({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){t.assign(s,{inputSize:i})}}),h=new g({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(s,{signature:e,outputSize:o,inputSize:i})}});t.defineProperty(s,"readable",{get:()=>l.pipeThrough(u).pipeThrough(c).pipeThrough(h)})}}class qe extends g{constructor(e){let t;super({transform:function n(s,r){if(t){const e=new a(t.length+s.length);e.set(t),e.set(s,t.length),s=e,t=null}s.length>e?(r.enqueue(s.slice(0,e)),n(s.slice(e),r)):t=s},flush(e){t&&t.length&&e.enqueue(t)}})}}const Re=new l,He=new l;let Pe,Be=0,Ke=!0;async function Te(e){try{const{options:t,scripts:s,config:r}=e;if(s&&s.length)try{Ke?importScripts.apply(b,s):await Ve(s)}catch(e){Ke=!1,await Ve(s)}self.initCodec&&self.initCodec(),r.CompressionStreamNative=self.CompressionStream,r.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(r.CompressionStream=new k(self.Deflate)),self.Inflate&&(r.DecompressionStream=new k(self.Inflate));const a={highWaterMark:1},o=e.readable||new w({async pull(e){const t=new h((e=>Re.set(Be,e)));xe({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await t;e.enqueue(s),r&&e.close()}},a),i=e.writable||new y({async write(e){let t;const s=new h((e=>t=e));He.set(Be,t),xe({type:Ce,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await s}},a),c=new Ae(t,r);Pe=new AbortController;const{signal:l}=Pe;await o.pipeThrough(c).pipeThrough(new qe(r.chunkSize)).pipeTo(i,{signal:l,preventClose:!0,preventAbort:!0}),await i.getWriter().close();const{signature:u,inputSize:f,outputSize:p}=c;xe({type:Ie,result:{signature:u,inputSize:f,outputSize:p}})}catch(e){Ee(e)}}async function Ve(e){for(const t of e)await import(t)}function xe(e){let{value:t}=e;if(t)if(t.length)try{t=new a(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ee(e=new r("Unknown error")){const{message:t,stack:n,code:s,name:a}=e;d({error:{message:t,stack:n,code:s,name:a}})}function Ue(e,n,s){return class{constructor(r){const o=this;var i,c;i=r,c="level",(typeof t.hasOwn===v?t.hasOwn(i,c):i.hasOwnProperty(c))&&r.level===b&&delete r.level,o.codec=new e(t.assign({},n,r)),s(o.codec,(e=>{if(o.pendingData){const t=o.pendingData;o.pendingData=new a(t.length+e.length);const{pendingData:n}=o;n.set(t,0),n.set(e,t.length)}else o.pendingData=new a(e)}))}append(e){return this.codec.push(e),r(this)}flush(){return this.codec.push(new a,!0),r(this)}};function r(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new a}}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:s,done:r}=e;try{if("start"==t&&Te(e),t==Ce){const e=Re.get(n);Re.delete(n),e({value:new a(s),done:r})}if("ack"==t){const e=He.get(n);He.delete(n),e()}t==Ie&&Pe.abort()}catch(e){Ee(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Ue(e.Deflate,t.deflate,n),Inflate:Ue(e.Inflate,t.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((e,t)=>e.onData=t));self.Deflate=e,self.Inflate=t}}();
|
|
@@ -8,7 +8,7 @@ import createTaskProcessorWorker from "./createTaskProcessorWorker.js";
|
|
|
8
8
|
const moduleCache = {};
|
|
9
9
|
|
|
10
10
|
async function getModule(moduleName, modulePath) {
|
|
11
|
-
let module = defaultValue(moduleCache[modulePath]
|
|
11
|
+
let module = defaultValue(moduleCache[modulePath], moduleCache[moduleName]);
|
|
12
12
|
|
|
13
13
|
if (defined(module)) {
|
|
14
14
|
return module;
|
package/index.d.ts
CHANGED
|
@@ -2982,6 +2982,136 @@ export class CesiumTerrainProvider {
|
|
|
2982
2982
|
loadTileDataAvailability(x: number, y: number, level: number): undefined | Promise<void>;
|
|
2983
2983
|
}
|
|
2984
2984
|
|
|
2985
|
+
|
|
2986
|
+
/**
|
|
2987
|
+
* Contains functions for checking that supplied arguments are of a specified type
|
|
2988
|
+
* or meet specified conditions
|
|
2989
|
+
*/
|
|
2990
|
+
export const Check: {
|
|
2991
|
+
/**
|
|
2992
|
+
* Throws if test is not defined
|
|
2993
|
+
*
|
|
2994
|
+
* @param {string} name The name of the variable being tested
|
|
2995
|
+
* @param {*} test The value that is to be checked
|
|
2996
|
+
* @exception {DeveloperError} test must be defined
|
|
2997
|
+
*/
|
|
2998
|
+
defined<T>(name: string, test: T): asserts test is NonNullable<T>;
|
|
2999
|
+
/**
|
|
3000
|
+
* Contains type checking functions, all using the typeof operator
|
|
3001
|
+
*/
|
|
3002
|
+
typeOf: {
|
|
3003
|
+
/**
|
|
3004
|
+
* Throws if test is not typeof 'string'
|
|
3005
|
+
*
|
|
3006
|
+
* @param {string} name The name of the variable being tested
|
|
3007
|
+
* @param {*} test The value to test
|
|
3008
|
+
* @exception {DeveloperError} test must be typeof 'string'
|
|
3009
|
+
*/
|
|
3010
|
+
string(name: string, test: any): asserts test is string;
|
|
3011
|
+
/**
|
|
3012
|
+
* Throws if test is not typeof 'function'
|
|
3013
|
+
*
|
|
3014
|
+
* @param {string} name The name of the variable being tested
|
|
3015
|
+
* @param {*} test The value to test
|
|
3016
|
+
* @exception {DeveloperError} test must be typeof 'function'
|
|
3017
|
+
*/
|
|
3018
|
+
func(name: string, test: any): asserts test is Function;
|
|
3019
|
+
/**
|
|
3020
|
+
* Throws if test is not typeof 'object'
|
|
3021
|
+
*
|
|
3022
|
+
* @param {string} name The name of the variable being tested
|
|
3023
|
+
* @param {*} test The value to test
|
|
3024
|
+
* @exception {DeveloperError} test must be typeof 'object'
|
|
3025
|
+
*/
|
|
3026
|
+
object(name: string, test: any): asserts test is object;
|
|
3027
|
+
/**
|
|
3028
|
+
* Throws if test is not typeof 'boolean'
|
|
3029
|
+
*
|
|
3030
|
+
* @param {string} name The name of the variable being tested
|
|
3031
|
+
* @param {*} test The value to test
|
|
3032
|
+
* @exception {DeveloperError} test must be typeof 'boolean'
|
|
3033
|
+
*/
|
|
3034
|
+
bool(name: string, test: any): asserts test is boolean;
|
|
3035
|
+
/**
|
|
3036
|
+
* Throws if test is not typeof 'bigint'
|
|
3037
|
+
*
|
|
3038
|
+
* @param {string} name The name of the variable being tested
|
|
3039
|
+
* @param {*} test The value to test
|
|
3040
|
+
* @exception {DeveloperError} test must be typeof 'bigint'
|
|
3041
|
+
*/
|
|
3042
|
+
bigint(name: string, test: any): asserts test is bigint;
|
|
3043
|
+
/**
|
|
3044
|
+
* Throws if test is not typeof 'number'
|
|
3045
|
+
*
|
|
3046
|
+
* @param {string} name The name of the variable being tested
|
|
3047
|
+
* @param {*} test The value to test
|
|
3048
|
+
* @exception {DeveloperError} test must be typeof 'number'
|
|
3049
|
+
*/
|
|
3050
|
+
number: {
|
|
3051
|
+
(name: string, test: any): void;
|
|
3052
|
+
/**
|
|
3053
|
+
* Throws if test is not typeof 'number' and less than limit
|
|
3054
|
+
*
|
|
3055
|
+
* @param {string} name The name of the variable being tested
|
|
3056
|
+
* @param {*} test The value to test
|
|
3057
|
+
* @param {number} limit The limit value to compare against
|
|
3058
|
+
* @exception {DeveloperError} test must be typeof 'number' and less than limit
|
|
3059
|
+
*/
|
|
3060
|
+
lessThan(name: string, test: any, limit: number): asserts test is number;
|
|
3061
|
+
/**
|
|
3062
|
+
* Throws if test is not typeof 'number' and less than or equal to limit
|
|
3063
|
+
*
|
|
3064
|
+
* @param {string} name The name of the variable being tested
|
|
3065
|
+
* @param {*} test The value to test
|
|
3066
|
+
* @param {number} limit The limit value to compare against
|
|
3067
|
+
* @exception {DeveloperError} test must be typeof 'number' and less than or equal to limit
|
|
3068
|
+
*/
|
|
3069
|
+
lessThanOrEquals(
|
|
3070
|
+
name: string,
|
|
3071
|
+
test: any,
|
|
3072
|
+
limit: number
|
|
3073
|
+
): asserts test is number;
|
|
3074
|
+
/**
|
|
3075
|
+
* Throws if test is not typeof 'number' and greater than limit
|
|
3076
|
+
*
|
|
3077
|
+
* @param {string} name The name of the variable being tested
|
|
3078
|
+
* @param {*} test The value to test
|
|
3079
|
+
* @param {number} limit The limit value to compare against
|
|
3080
|
+
* @exception {DeveloperError} test must be typeof 'number' and greater than limit
|
|
3081
|
+
*/
|
|
3082
|
+
greaterThan(
|
|
3083
|
+
name: string,
|
|
3084
|
+
test: any,
|
|
3085
|
+
limit: number
|
|
3086
|
+
): asserts test is number;
|
|
3087
|
+
/**
|
|
3088
|
+
* Throws if test is not typeof 'number' and greater than or equal to limit
|
|
3089
|
+
*
|
|
3090
|
+
* @param {string} name The name of the variable being tested
|
|
3091
|
+
* @param {*} test The value to test
|
|
3092
|
+
* @param {number} limit The limit value to compare against
|
|
3093
|
+
* @exception {DeveloperError} test must be typeof 'number' and greater than or equal to limit
|
|
3094
|
+
*/
|
|
3095
|
+
greaterThanOrEquals(
|
|
3096
|
+
name: string,
|
|
3097
|
+
test: any,
|
|
3098
|
+
limit: number
|
|
3099
|
+
): asserts test is number;
|
|
3100
|
+
/**
|
|
3101
|
+
* Throws if test1 and test2 is not typeof 'number' and not equal in value
|
|
3102
|
+
*
|
|
3103
|
+
* @param {string} name1 The name of the first variable being tested
|
|
3104
|
+
* @param {string} name2 The name of the second variable being tested against
|
|
3105
|
+
* @param {*} test1 The value to test
|
|
3106
|
+
* @param {*} test2 The value to test against
|
|
3107
|
+
* @exception {DeveloperError} test1 and test2 should be type of 'number' and be equal in value
|
|
3108
|
+
*/
|
|
3109
|
+
equals(name1: string, name2: string, test1: any, test2: any): void;
|
|
3110
|
+
};
|
|
3111
|
+
};
|
|
3112
|
+
};
|
|
3113
|
+
|
|
3114
|
+
|
|
2985
3115
|
/**
|
|
2986
3116
|
* A description of a circle on the ellipsoid. Circle geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
|
|
2987
3117
|
* @example
|
|
@@ -6803,7 +6933,7 @@ export class Geometry {
|
|
|
6803
6933
|
* <ul>
|
|
6804
6934
|
* <li><code>position3DHigh</code> - High 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.</li>
|
|
6805
6935
|
* <li><code>position3DLow</code> - Low 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.</li>
|
|
6806
|
-
* <li><code>
|
|
6936
|
+
* <li><code>position2DHigh</code> - High 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.</li>
|
|
6807
6937
|
* <li><code>position2DLow</code> - Low 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.</li>
|
|
6808
6938
|
* <li><code>color</code> - RGBA color (normalized) usually from {@link GeometryInstance#color}. 32-bit floating-point. 4 components per attribute.</li>
|
|
6809
6939
|
* <li><code>pickColor</code> - RGBA color used for picking. 32-bit floating-point. 4 components per attribute.</li>
|
|
@@ -18180,7 +18310,7 @@ export function defaultValue(a: any, b: any): any;
|
|
|
18180
18310
|
* @param value - The object.
|
|
18181
18311
|
* @returns Returns true if the object is defined, returns false otherwise.
|
|
18182
18312
|
*/
|
|
18183
|
-
export function defined(value:
|
|
18313
|
+
export function defined<Type>(value: Type): value is NonNullable<Type>;
|
|
18184
18314
|
|
|
18185
18315
|
/**
|
|
18186
18316
|
* Destroys an object. Each of the object's functions, including functions in its prototype,
|
|
@@ -25684,6 +25814,63 @@ export enum Axis {
|
|
|
25684
25814
|
Z = 2
|
|
25685
25815
|
}
|
|
25686
25816
|
|
|
25817
|
+
export namespace Billboard {
|
|
25818
|
+
/**
|
|
25819
|
+
* Initialization options for the first param of Billboard constructor
|
|
25820
|
+
* @property position - The cartesian position of the billboard.
|
|
25821
|
+
* @property [id] - A user-defined object to return when the billboard is picked with {@link Scene#pick}.
|
|
25822
|
+
* @property [show = true] - Determines if this billboard will be shown.
|
|
25823
|
+
* @property [image] - A loaded HTMLImageElement, ImageData, or a url to an image to use for the billboard.
|
|
25824
|
+
* @property [scale = 1.0] - A number specifying the uniform scale that is multiplied with the billboard's image size in pixels.
|
|
25825
|
+
* @property [pixelOffset = Cartesian2.ZERO] - A {@link Cartesian2} Specifying the pixel offset in screen space from the origin of this billboard.
|
|
25826
|
+
* @property [eyeOffset = Cartesian3.ZERO] - A {@link Cartesian3} Specifying the 3D Cartesian offset applied to this billboard in eye coordinates.
|
|
25827
|
+
* @property [horizontalOrigin = HorizontalOrigin.CENTER] - A {@link HorizontalOrigin} Specifying the horizontal origin of this billboard.
|
|
25828
|
+
* @property [verticalOrigin = VerticalOrigin.CENTER] - A {@link VerticalOrigin} Specifying the vertical origin of this billboard.
|
|
25829
|
+
* @property [heightReference = HeightReference.NONE] - A {@link HeightReference} Specifying the height reference of this billboard.
|
|
25830
|
+
* @property [color = Color.WHITE] - A {@link Color} Specifying the color that is multiplied with the billboard's texture.
|
|
25831
|
+
* @property [rotation = 0] - A number specifying the rotation angle in radians.
|
|
25832
|
+
* @property [alignedAxis = Cartesian3.ZERO] - A {@link Cartesian3} Specifying the aligned axis in world space.
|
|
25833
|
+
* @property [sizeInMeters] - A boolean specifying if the billboard size is in meters or pixels.
|
|
25834
|
+
* @property [width] - A number specifying the width of the billboard. If undefined, the image width will be used.
|
|
25835
|
+
* @property [height] - A number specifying the height of the billboard. If undefined, the image height will be used.
|
|
25836
|
+
* @property [scaleByDistance] - A {@link NearFarScalar} Specifying near and far scaling properties of a Billboard based on the billboard's distance from the camera.
|
|
25837
|
+
* @property [translucencyByDistance] - A {@link NearFarScalar} Specifying near and far translucency properties of a Billboard based on the billboard's distance from the camera.
|
|
25838
|
+
* @property [pixelOffsetScaleByDistance] - A {@link NearFarScalar} Specifying near and far pixel offset scaling properties of a Billboard based on the billboard's distance from the camera.
|
|
25839
|
+
* @property [imageSubRegion] - A {@link BoundingRectangle} Specifying the sub-region of the image to use for the billboard, rather than the entire image.
|
|
25840
|
+
* @property [distanceDisplayCondition] - A {@link DistanceDisplayCondition} Specifying the distance from the camera at which this billboard will be displayed.
|
|
25841
|
+
* @property [disableDepthTestDistance] - A number specifying the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
|
|
25842
|
+
*/
|
|
25843
|
+
type ConstructorOptions = {
|
|
25844
|
+
position: Cartesian3;
|
|
25845
|
+
id?: string;
|
|
25846
|
+
show?: boolean;
|
|
25847
|
+
image?: string | HTMLCanvasElement;
|
|
25848
|
+
scale?: number;
|
|
25849
|
+
pixelOffset?: Cartesian2;
|
|
25850
|
+
eyeOffset?: Cartesian3;
|
|
25851
|
+
horizontalOrigin?: HorizontalOrigin;
|
|
25852
|
+
verticalOrigin?: VerticalOrigin;
|
|
25853
|
+
heightReference?: HeightReference;
|
|
25854
|
+
color?: Color;
|
|
25855
|
+
rotation?: number;
|
|
25856
|
+
alignedAxis?: Cartesian3;
|
|
25857
|
+
sizeInMeters?: boolean;
|
|
25858
|
+
width?: number;
|
|
25859
|
+
height?: number;
|
|
25860
|
+
scaleByDistance?: NearFarScalar;
|
|
25861
|
+
translucencyByDistance?: NearFarScalar;
|
|
25862
|
+
pixelOffsetScaleByDistance?: NearFarScalar;
|
|
25863
|
+
imageSubRegion?: BoundingRectangle;
|
|
25864
|
+
distanceDisplayCondition?: DistanceDisplayCondition;
|
|
25865
|
+
disableDepthTestDistance?: number;
|
|
25866
|
+
};
|
|
25867
|
+
/**
|
|
25868
|
+
* A function that creates an image.
|
|
25869
|
+
* @param id - The identifier of the image to load.
|
|
25870
|
+
*/
|
|
25871
|
+
type CreateImageCallback = (id: string) => HTMLImageElement | HTMLCanvasElement | Promise<HTMLImageElement | HTMLCanvasElement>;
|
|
25872
|
+
}
|
|
25873
|
+
|
|
25687
25874
|
/**
|
|
25688
25875
|
* <div class="notice">
|
|
25689
25876
|
* A billboard is created and its initial
|
|
@@ -25696,9 +25883,11 @@ export enum Axis {
|
|
|
25696
25883
|
* <img src='Images/Billboard.png' width='400' height='300' /><br />
|
|
25697
25884
|
* Example billboards
|
|
25698
25885
|
* </div>
|
|
25886
|
+
* @param options - Object describing initialization options
|
|
25887
|
+
* @param billboardCollection - Instance of BillboardCollection
|
|
25699
25888
|
*/
|
|
25700
25889
|
export class Billboard {
|
|
25701
|
-
constructor();
|
|
25890
|
+
constructor(options: Billboard.ConstructorOptions, billboardCollection: BillboardCollection);
|
|
25702
25891
|
/**
|
|
25703
25892
|
* Determines if this billboard will be shown. Use this to hide or show a billboard, instead
|
|
25704
25893
|
* of removing it and re-adding it to the collection.
|
|
@@ -26001,14 +26190,6 @@ export class Billboard {
|
|
|
26001
26190
|
equals(other: Billboard): boolean;
|
|
26002
26191
|
}
|
|
26003
26192
|
|
|
26004
|
-
export namespace Billboard {
|
|
26005
|
-
/**
|
|
26006
|
-
* A function that creates an image.
|
|
26007
|
-
* @param id - The identifier of the image to load.
|
|
26008
|
-
*/
|
|
26009
|
-
type CreateImageCallback = (id: string) => HTMLImageElement | HTMLCanvasElement | Promise<HTMLImageElement | HTMLCanvasElement>;
|
|
26010
|
-
}
|
|
26011
|
-
|
|
26012
26193
|
/**
|
|
26013
26194
|
* A renderable collection of billboards. Billboards are viewport-aligned
|
|
26014
26195
|
* images positioned in the 3D scene.
|
|
@@ -26142,7 +26323,7 @@ export class BillboardCollection {
|
|
|
26142
26323
|
* @param [options] - A template describing the billboard's properties as shown in Example 1.
|
|
26143
26324
|
* @returns The billboard that was added to the collection.
|
|
26144
26325
|
*/
|
|
26145
|
-
add(options?:
|
|
26326
|
+
add(options?: Billboard.ConstructorOptions): Billboard;
|
|
26146
26327
|
/**
|
|
26147
26328
|
* Removes a billboard from the collection.
|
|
26148
26329
|
* @example
|
|
@@ -28784,7 +28965,6 @@ export namespace Cesium3DTileset {
|
|
|
28784
28965
|
* @property [showCreditsOnScreen = false] - Whether to display the credits of this tileset on screen.
|
|
28785
28966
|
* @property [splitDirection = SplitDirection.NONE] - The {@link SplitDirection} split to apply to this tileset.
|
|
28786
28967
|
* @property [enableCollision = false] - When <code>true</code>, enables collisions for camera or CPU picking. While this is <code>true</code> the camera will be prevented from going below the tileset surface if {@link ScreenSpaceCameraController#enableCollisionDetection} is true.
|
|
28787
|
-
* @property [disableCollision = true] - Whether to turn off collisions for camera collisions or picking. While this is <code>true</code> the camera will be allowed to go in or below the tileset surface if {@link ScreenSpaceCameraController#enableCollisionDetection} is true. Deprecated.
|
|
28788
28968
|
* @property [projectTo2D = false] - Whether to accurately project the tileset to 2D. If this is true, the tileset will be projected accurately to 2D, but it will use more memory to do so. If this is false, the tileset will use less memory and will still render in 2D / CV mode, but its projected positions may be inaccurate. This cannot be set after the tileset has been created.
|
|
28789
28969
|
* @property [enablePick = false] - Whether to allow collision and CPU picking with <code>pick</code> when using WebGL 1. If using WebGL 2 or above, this option will be ignored. If using WebGL 1 and this is true, the <code>pick</code> operation will work correctly, but it will use more memory to do so. If running with WebGL 1 and this is false, the model will use less memory, but <code>pick</code> will always return <code>undefined</code>. This cannot be set after the tileset has loaded.
|
|
28790
28970
|
* @property [debugHeatmapTilePropertyName] - The tile variable to colorize as a heatmap. All rendered tiles will be colorized relative to each other's specified variable value.
|
|
@@ -28848,7 +29028,6 @@ export namespace Cesium3DTileset {
|
|
|
28848
29028
|
showCreditsOnScreen?: boolean;
|
|
28849
29029
|
splitDirection?: SplitDirection;
|
|
28850
29030
|
enableCollision?: boolean;
|
|
28851
|
-
disableCollision?: boolean;
|
|
28852
29031
|
projectTo2D?: boolean;
|
|
28853
29032
|
enablePick?: boolean;
|
|
28854
29033
|
debugHeatmapTilePropertyName?: string;
|
|
@@ -29336,10 +29515,6 @@ export class Cesium3DTileset {
|
|
|
29336
29515
|
* Function for examining vector lines as they are being streamed.
|
|
29337
29516
|
*/
|
|
29338
29517
|
examineVectorLinesFunction: (...params: any[]) => any;
|
|
29339
|
-
/**
|
|
29340
|
-
* Whether to turn off collisions for camera collisions or picking. While this is <code>true</code> the camera will be allowed to go in or below the tileset surface if {@link ScreenSpaceCameraController#enableCollisionDetection} is true.
|
|
29341
|
-
*/
|
|
29342
|
-
disableCollision: boolean;
|
|
29343
29518
|
/**
|
|
29344
29519
|
* Gets the tileset's asset object property, which contains metadata about the tileset.
|
|
29345
29520
|
* <p>
|
|
@@ -31538,20 +31713,6 @@ export class Globe {
|
|
|
31538
31713
|
* Gets an event that's raised when the terrain provider is changed
|
|
31539
31714
|
*/
|
|
31540
31715
|
readonly terrainProviderChanged: Event;
|
|
31541
|
-
/**
|
|
31542
|
-
* A scalar used to exaggerate the terrain. Defaults to <code>1.0</code> (no exaggeration).
|
|
31543
|
-
* A value of <code>2.0</code> scales the terrain by 2x.
|
|
31544
|
-
* A value of <code>0.0</code> makes the terrain completely flat.
|
|
31545
|
-
* Note that terrain exaggeration will not modify any other primitive as they are positioned relative to the ellipsoid.
|
|
31546
|
-
*/
|
|
31547
|
-
terrainExaggeration: number;
|
|
31548
|
-
/**
|
|
31549
|
-
* The height from which terrain is exaggerated. Defaults to <code>0.0</code> (scaled relative to ellipsoid surface).
|
|
31550
|
-
* Terrain that is above this height will scale upwards and terrain that is below this height will scale downwards.
|
|
31551
|
-
* Note that terrain exaggeration will not modify any other primitive as they are positioned relative to the ellipsoid.
|
|
31552
|
-
* If {@link Globe#terrainExaggeration} is <code>1.0</code> this value will have no effect.
|
|
31553
|
-
*/
|
|
31554
|
-
terrainExaggerationRelativeHeight: number;
|
|
31555
31716
|
/**
|
|
31556
31717
|
* Gets an event that's raised when the length of the tile load queue has changed since the last render frame. When the load queue is empty,
|
|
31557
31718
|
* all terrain and imagery for the current view have been loaded. The event passes the new length of the tile load queue.
|
|
@@ -34020,13 +34181,69 @@ export enum IonWorldImageryStyle {
|
|
|
34020
34181
|
ROAD = 4
|
|
34021
34182
|
}
|
|
34022
34183
|
|
|
34184
|
+
export namespace Label {
|
|
34185
|
+
/**
|
|
34186
|
+
* Initialization options for the Label constructor
|
|
34187
|
+
* @property position - The cartesian position of the label.
|
|
34188
|
+
* @property [id] - A user-defined object to return when the label is picked with {@link Scene#pick}.
|
|
34189
|
+
* @property [show = true] - Determines if this label will be shown.
|
|
34190
|
+
* @property [text] - A string specifying the text of the label.
|
|
34191
|
+
* @property [font = '30px sans-serif'] - A string specifying the font used to draw this label. Fonts are specified using the same syntax as the CSS 'font' property.
|
|
34192
|
+
* @property [style = LabelStyle.FILL] - A {@link LabelStyle} specifying the style of the label.
|
|
34193
|
+
* @property [scale = 1.0] - A number specifying the uniform scale that is multiplied with the label size.
|
|
34194
|
+
* @property [showBackground = false] - Determines if a background behind this label will be shown.
|
|
34195
|
+
* @property [backgroundColor = new Color(0.165, 0.165, 0.165, 0.8)] - A {@link Color} specifying the background color of the label.
|
|
34196
|
+
* @property [backgroundPadding = new Cartesian2(7, 5)] - A {@link Cartesian2} Specifying the horizontal and vertical background padding in pixels.
|
|
34197
|
+
* @property [pixelOffset = Cartesian2.ZERO] - A {@link Cartesian2} specifying the pixel offset in screen space from the origin of this label.
|
|
34198
|
+
* @property [eyeOffset = Cartesian3.ZERO] - A {@link Cartesian3} specifying the 3D Cartesian offset applied to this label in eye coordinates.
|
|
34199
|
+
* @property [horizontalOrigin = HorizontalOrigin.CENTER] - A {@link HorizontalOrigin} specifying the horizontal origin of this label.
|
|
34200
|
+
* @property [verticalOrigin = VerticalOrigin.CENTER] - A {@link VerticalOrigin} specifying the vertical origin of this label.
|
|
34201
|
+
* @property [heightReference = HeightReference.NONE] - A {@link HeightReference} specifying the height reference of this label.
|
|
34202
|
+
* @property [fillColor = Color.WHITE] - A {@link Color} specifying the fill color of the label.
|
|
34203
|
+
* @property [outlineColor = Color.BLACK] - A {@link Color} specifying the outline color of the label.
|
|
34204
|
+
* @property [outlineWidth = 1.0] - A number specifying the outline width of the label.
|
|
34205
|
+
* @property [translucencyByDistance] - A {@link NearFarScalar} specifying near and far translucency properties of the label based on the label's distance from the camera.
|
|
34206
|
+
* @property [pixelOffsetScaleByDistance] - A {@link NearFarScalar} specifying near and far pixel offset scaling properties of the label based on the label's distance from the camera.
|
|
34207
|
+
* @property [scaleByDistance] - A {@link NearFarScalar} specifying near and far scaling properties of the label based on the label's distance from the camera.
|
|
34208
|
+
* @property [distanceDisplayCondition] - A {@link DistanceDisplayCondition} specifying at what distance from the camera that this label will be displayed.
|
|
34209
|
+
* @property [disableDepthTestDistance] - A number specifying the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
|
|
34210
|
+
*/
|
|
34211
|
+
type ConstructorOptions = {
|
|
34212
|
+
position: Cartesian3;
|
|
34213
|
+
id?: string;
|
|
34214
|
+
show?: boolean;
|
|
34215
|
+
text?: string;
|
|
34216
|
+
font?: string;
|
|
34217
|
+
style?: LabelStyle;
|
|
34218
|
+
scale?: number;
|
|
34219
|
+
showBackground?: boolean;
|
|
34220
|
+
backgroundColor?: Color;
|
|
34221
|
+
backgroundPadding?: Cartesian2;
|
|
34222
|
+
pixelOffset?: Cartesian2;
|
|
34223
|
+
eyeOffset?: Cartesian3;
|
|
34224
|
+
horizontalOrigin?: HorizontalOrigin;
|
|
34225
|
+
verticalOrigin?: VerticalOrigin;
|
|
34226
|
+
heightReference?: HeightReference;
|
|
34227
|
+
fillColor?: Color;
|
|
34228
|
+
outlineColor?: Color;
|
|
34229
|
+
outlineWidth?: number;
|
|
34230
|
+
translucencyByDistance?: NearFarScalar;
|
|
34231
|
+
pixelOffsetScaleByDistance?: NearFarScalar;
|
|
34232
|
+
scaleByDistance?: NearFarScalar;
|
|
34233
|
+
distanceDisplayCondition?: DistanceDisplayCondition;
|
|
34234
|
+
disableDepthTestDistance?: number;
|
|
34235
|
+
};
|
|
34236
|
+
}
|
|
34237
|
+
|
|
34023
34238
|
/**
|
|
34024
34239
|
* <div class="notice">
|
|
34025
34240
|
* Create labels by calling {@link LabelCollection#add}. Do not call the constructor directly.
|
|
34026
34241
|
* </div>
|
|
34242
|
+
* @param options - Object describing initialization options
|
|
34243
|
+
* @param labelCollection - Instance of LabelCollection
|
|
34027
34244
|
*/
|
|
34028
34245
|
export class Label {
|
|
34029
|
-
constructor();
|
|
34246
|
+
constructor(options: Label.ConstructorOptions, labelCollection: LabelCollection);
|
|
34030
34247
|
/**
|
|
34031
34248
|
* Determines if this label will be shown. Use this to hide or show a label, instead
|
|
34032
34249
|
* of removing it and re-adding it to the collection.
|
|
@@ -34411,7 +34628,7 @@ export class LabelCollection {
|
|
|
34411
34628
|
* @param [options] - A template describing the label's properties as shown in Example 1.
|
|
34412
34629
|
* @returns The label that was added to the collection.
|
|
34413
34630
|
*/
|
|
34414
|
-
add(options?:
|
|
34631
|
+
add(options?: Label.ConstructorOptions): Label;
|
|
34415
34632
|
/**
|
|
34416
34633
|
* Removes a label from the collection. Once removed, a label is no longer usable.
|
|
34417
34634
|
* @example
|