@cesium/engine 0.1.0 → 1.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.
Files changed (31) hide show
  1. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +95 -76
  2. package/README.md +9 -9
  3. package/Source/Core/Ion.js +1 -1
  4. package/Source/Renderer/Context.js +213 -178
  5. package/Source/Scene/I3SDataProvider.js +2 -1
  6. package/Source/Scene/I3SFeature.js +1 -1
  7. package/Source/Scene/I3SLayer.js +64 -2
  8. package/Source/Scene/I3SNode.js +50 -6
  9. package/Source/Scene/Model/Model.js +36 -3
  10. package/Source/Scene/Scene.js +3 -50
  11. package/Source/Shaders/Builtin/CzmBuiltins.js +15 -15
  12. package/Source/ThirdParty/Workers/draco_decoder_nodejs.js +100 -101
  13. package/Source/ThirdParty/Workers/pako_deflate.min.js +2 -2
  14. package/Source/ThirdParty/Workers/pako_inflate.min.js +2 -2
  15. package/Source/ThirdParty/Workers/z-worker-pako.js +0 -0
  16. package/Source/ThirdParty/draco_decoder.wasm +0 -0
  17. package/Source/Widget/CesiumWidget.js +1 -1
  18. package/index.d.ts +2402 -2334
  19. package/index.js +1085 -1085
  20. package/package.json +4 -1
  21. package/Build/ThirdParty/Workers/basis_transcoder.js +0 -2233
  22. package/Build/ThirdParty/Workers/draco_decoder_nodejs.js +0 -1872
  23. package/Build/ThirdParty/Workers/package.json +0 -1
  24. package/Build/ThirdParty/Workers/pako_deflate.min.js +0 -589
  25. package/Build/ThirdParty/Workers/pako_inflate.min.js +0 -798
  26. package/Build/ThirdParty/Workers/z-worker-pako.js +0 -503
  27. package/Build/ThirdParty/basis_transcoder.wasm +0 -0
  28. package/Build/ThirdParty/draco_decoder.wasm +0 -0
  29. package/Build/ThirdParty/google-earth-dbroot-parser.js +0 -8019
  30. package/Build/Widget/CesiumWidget.css +0 -120
  31. package/Build/Widget/lighter.css +0 -13
@@ -362,8 +362,8 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
362
362
  // 3. This notice may not be removed or altered from any source distribution.
363
363
 
364
364
  // See state defs from inflate.js
365
- const BAD$1 = 30; /* got a data error -- remain here until reset */
366
- const TYPE$1 = 12; /* i: waiting for type bits, including last-flag bit */
365
+ const BAD$1 = 16209; /* got a data error -- remain here until reset */
366
+ const TYPE$1 = 16191; /* i: waiting for type bits, including last-flag bit */
367
367
 
368
368
  /*
369
369
  Decode literal, length, and distance codes and write out the resulting
@@ -755,13 +755,11 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
755
755
  let mask; /* mask for low root bits */
756
756
  let next; /* next available space in table */
757
757
  let base = null; /* base value table to use */
758
- let base_index = 0;
759
758
  // let shoextra; /* extra bits table to use */
760
- let end; /* use base and extra for symbol > end */
759
+ let match; /* use base and extra for symbol >= match */
761
760
  const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */
762
761
  const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */
763
762
  let extra = null;
764
- let extra_index = 0;
765
763
 
766
764
  let here_bits, here_op, here_val;
767
765
 
@@ -896,19 +894,17 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
896
894
  // to avoid deopts in old v8
897
895
  if (type === CODES$1) {
898
896
  base = extra = work; /* dummy value--not used */
899
- end = 19;
897
+ match = 20;
900
898
 
901
899
  } else if (type === LENS$1) {
902
900
  base = lbase;
903
- base_index -= 257;
904
901
  extra = lext;
905
- extra_index -= 257;
906
- end = 256;
902
+ match = 257;
907
903
 
908
904
  } else { /* DISTS */
909
905
  base = dbase;
910
906
  extra = dext;
911
- end = -1;
907
+ match = 0;
912
908
  }
913
909
 
914
910
  /* initialize opts for loop */
@@ -932,13 +928,13 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
932
928
  for (;;) {
933
929
  /* create table entry */
934
930
  here_bits = len - drop;
935
- if (work[sym] < end) {
931
+ if (work[sym] + 1 < match) {
936
932
  here_op = 0;
937
933
  here_val = work[sym];
938
934
  }
939
- else if (work[sym] > end) {
940
- here_op = extra[extra_index + work[sym]];
941
- here_val = base[base_index + work[sym]];
935
+ else if (work[sym] >= match) {
936
+ here_op = extra[work[sym] - match];
937
+ here_val = base[work[sym] - match];
942
938
  }
943
939
  else {
944
940
  here_op = 32 + 64; /* end of block */
@@ -1137,38 +1133,38 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1137
1133
  /* ===========================================================================*/
1138
1134
 
1139
1135
 
1140
- const HEAD = 1; /* i: waiting for magic header */
1141
- const FLAGS = 2; /* i: waiting for method and flags (gzip) */
1142
- const TIME = 3; /* i: waiting for modification time (gzip) */
1143
- const OS = 4; /* i: waiting for extra flags and operating system (gzip) */
1144
- const EXLEN = 5; /* i: waiting for extra length (gzip) */
1145
- const EXTRA = 6; /* i: waiting for extra bytes (gzip) */
1146
- const NAME = 7; /* i: waiting for end of file name (gzip) */
1147
- const COMMENT = 8; /* i: waiting for end of comment (gzip) */
1148
- const HCRC = 9; /* i: waiting for header crc (gzip) */
1149
- const DICTID = 10; /* i: waiting for dictionary check value */
1150
- const DICT = 11; /* waiting for inflateSetDictionary() call */
1151
- const TYPE = 12; /* i: waiting for type bits, including last-flag bit */
1152
- const TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */
1153
- const STORED = 14; /* i: waiting for stored size (length and complement) */
1154
- const COPY_ = 15; /* i/o: same as COPY below, but only first time in */
1155
- const COPY = 16; /* i/o: waiting for input or output to copy stored block */
1156
- const TABLE = 17; /* i: waiting for dynamic block table lengths */
1157
- const LENLENS = 18; /* i: waiting for code length code lengths */
1158
- const CODELENS = 19; /* i: waiting for length/lit and distance code lengths */
1159
- const LEN_ = 20; /* i: same as LEN below, but only first time in */
1160
- const LEN = 21; /* i: waiting for length/lit/eob code */
1161
- const LENEXT = 22; /* i: waiting for length extra bits */
1162
- const DIST = 23; /* i: waiting for distance code */
1163
- const DISTEXT = 24; /* i: waiting for distance extra bits */
1164
- const MATCH = 25; /* o: waiting for output space to copy string */
1165
- const LIT = 26; /* o: waiting for output space to write literal */
1166
- const CHECK = 27; /* i: waiting for 32-bit check value */
1167
- const LENGTH = 28; /* i: waiting for 32-bit length (gzip) */
1168
- const DONE = 29; /* finished check, done -- remain here until reset */
1169
- const BAD = 30; /* got a data error -- remain here until reset */
1170
- const MEM = 31; /* got an inflate() memory error -- remain here until reset */
1171
- const SYNC = 32; /* looking for synchronization bytes to restart inflate() */
1136
+ const HEAD = 16180; /* i: waiting for magic header */
1137
+ const FLAGS = 16181; /* i: waiting for method and flags (gzip) */
1138
+ const TIME = 16182; /* i: waiting for modification time (gzip) */
1139
+ const OS = 16183; /* i: waiting for extra flags and operating system (gzip) */
1140
+ const EXLEN = 16184; /* i: waiting for extra length (gzip) */
1141
+ const EXTRA = 16185; /* i: waiting for extra bytes (gzip) */
1142
+ const NAME = 16186; /* i: waiting for end of file name (gzip) */
1143
+ const COMMENT = 16187; /* i: waiting for end of comment (gzip) */
1144
+ const HCRC = 16188; /* i: waiting for header crc (gzip) */
1145
+ const DICTID = 16189; /* i: waiting for dictionary check value */
1146
+ const DICT = 16190; /* waiting for inflateSetDictionary() call */
1147
+ const TYPE = 16191; /* i: waiting for type bits, including last-flag bit */
1148
+ const TYPEDO = 16192; /* i: same, but skip check to exit inflate on new block */
1149
+ const STORED = 16193; /* i: waiting for stored size (length and complement) */
1150
+ const COPY_ = 16194; /* i/o: same as COPY below, but only first time in */
1151
+ const COPY = 16195; /* i/o: waiting for input or output to copy stored block */
1152
+ const TABLE = 16196; /* i: waiting for dynamic block table lengths */
1153
+ const LENLENS = 16197; /* i: waiting for code length code lengths */
1154
+ const CODELENS = 16198; /* i: waiting for length/lit and distance code lengths */
1155
+ const LEN_ = 16199; /* i: same as LEN below, but only first time in */
1156
+ const LEN = 16200; /* i: waiting for length/lit/eob code */
1157
+ const LENEXT = 16201; /* i: waiting for length extra bits */
1158
+ const DIST = 16202; /* i: waiting for distance code */
1159
+ const DISTEXT = 16203; /* i: waiting for distance extra bits */
1160
+ const MATCH = 16204; /* o: waiting for output space to copy string */
1161
+ const LIT = 16205; /* o: waiting for output space to write literal */
1162
+ const CHECK = 16206; /* i: waiting for 32-bit check value */
1163
+ const LENGTH = 16207; /* i: waiting for 32-bit length (gzip) */
1164
+ const DONE = 16208; /* finished check, done -- remain here until reset */
1165
+ const BAD = 16209; /* got a data error -- remain here until reset */
1166
+ const MEM = 16210; /* got an inflate() memory error -- remain here until reset */
1167
+ const SYNC = 16211; /* looking for synchronization bytes to restart inflate() */
1172
1168
 
1173
1169
  /* ===========================================================================*/
1174
1170
 
@@ -1193,11 +1189,14 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1193
1189
 
1194
1190
 
1195
1191
  function InflateState() {
1196
- this.mode = 0; /* current inflate mode */
1192
+ this.strm = null; /* pointer back to this zlib stream */
1193
+ this.mode = 0; /* current inflate mode */
1197
1194
  this.last = false; /* true if processing last block */
1198
- this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */
1195
+ this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip,
1196
+ bit 2 true to validate check value */
1199
1197
  this.havedict = false; /* true if dictionary provided */
1200
- this.flags = 0; /* gzip header method and flags (0 if zlib) */
1198
+ this.flags = 0; /* gzip header method and flags (0 if zlib), or
1199
+ -1 if raw or no header yet */
1201
1200
  this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */
1202
1201
  this.check = 0; /* protected copy of check value */
1203
1202
  this.total = 0; /* protected copy of output count */
@@ -1251,9 +1250,23 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1251
1250
  }
1252
1251
 
1253
1252
 
1253
+ const inflateStateCheck = (strm) => {
1254
+
1255
+ if (!strm) {
1256
+ return 1;
1257
+ }
1258
+ const state = strm.state;
1259
+ if (!state || state.strm !== strm ||
1260
+ state.mode < HEAD || state.mode > SYNC) {
1261
+ return 1;
1262
+ }
1263
+ return 0;
1264
+ };
1265
+
1266
+
1254
1267
  const inflateResetKeep = (strm) => {
1255
1268
 
1256
- if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }
1269
+ if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }
1257
1270
  const state = strm.state;
1258
1271
  strm.total_in = strm.total_out = state.total = 0;
1259
1272
  strm.msg = ''; /*Z_NULL*/
@@ -1263,6 +1276,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1263
1276
  state.mode = HEAD;
1264
1277
  state.last = 0;
1265
1278
  state.havedict = 0;
1279
+ state.flags = -1;
1266
1280
  state.dmax = 32768;
1267
1281
  state.head = null/*Z_NULL*/;
1268
1282
  state.hold = 0;
@@ -1280,7 +1294,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1280
1294
 
1281
1295
  const inflateReset = (strm) => {
1282
1296
 
1283
- if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }
1297
+ if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }
1284
1298
  const state = strm.state;
1285
1299
  state.wsize = 0;
1286
1300
  state.whave = 0;
@@ -1294,7 +1308,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1294
1308
  let wrap;
1295
1309
 
1296
1310
  /* get the state */
1297
- if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }
1311
+ if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }
1298
1312
  const state = strm.state;
1299
1313
 
1300
1314
  /* extract wrap request from windowBits parameter */
@@ -1303,7 +1317,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1303
1317
  windowBits = -windowBits;
1304
1318
  }
1305
1319
  else {
1306
- wrap = (windowBits >> 4) + 1;
1320
+ wrap = (windowBits >> 4) + 5;
1307
1321
  if (windowBits < 48) {
1308
1322
  windowBits &= 15;
1309
1323
  }
@@ -1334,7 +1348,9 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1334
1348
  //if (state === Z_NULL) return Z_MEM_ERROR;
1335
1349
  //Tracev((stderr, "inflate: allocated\n"));
1336
1350
  strm.state = state;
1351
+ state.strm = strm;
1337
1352
  state.window = null/*Z_NULL*/;
1353
+ state.mode = HEAD; /* to pass state test in inflateReset2() */
1338
1354
  const ret = inflateReset2(strm, windowBits);
1339
1355
  if (ret !== Z_OK$1) {
1340
1356
  strm.state = null/*Z_NULL*/;
@@ -1483,7 +1499,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1483
1499
  new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);
1484
1500
 
1485
1501
 
1486
- if (!strm || !strm.state || !strm.output ||
1502
+ if (inflateStateCheck(strm) || !strm.output ||
1487
1503
  (!strm.input && strm.avail_in !== 0)) {
1488
1504
  return Z_STREAM_ERROR$1;
1489
1505
  }
@@ -1524,6 +1540,9 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1524
1540
  }
1525
1541
  //===//
1526
1542
  if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */
1543
+ if (state.wbits === 0) {
1544
+ state.wbits = 15;
1545
+ }
1527
1546
  state.check = 0/*crc32(0L, Z_NULL, 0)*/;
1528
1547
  //=== CRC2(state.check, hold);
1529
1548
  hbuf[0] = hold & 0xff;
@@ -1538,7 +1557,6 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1538
1557
  state.mode = FLAGS;
1539
1558
  break;
1540
1559
  }
1541
- state.flags = 0; /* expect zlib header */
1542
1560
  if (state.head) {
1543
1561
  state.head.done = false;
1544
1562
  }
@@ -1561,7 +1579,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1561
1579
  if (state.wbits === 0) {
1562
1580
  state.wbits = len;
1563
1581
  }
1564
- else if (len > state.wbits) {
1582
+ if (len > 15 || len > state.wbits) {
1565
1583
  strm.msg = 'invalid window size';
1566
1584
  state.mode = BAD;
1567
1585
  break;
@@ -1572,6 +1590,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1572
1590
  state.dmax = 1 << state.wbits;
1573
1591
  //state.dmax = 1 << len;
1574
1592
 
1593
+ state.flags = 0; /* indicate zlib header */
1575
1594
  //Tracev((stderr, "inflate: zlib header ok\n"));
1576
1595
  strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
1577
1596
  state.mode = hold & 0x200 ? DICTID : TYPE;
@@ -1603,7 +1622,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1603
1622
  if (state.head) {
1604
1623
  state.head.text = ((hold >> 8) & 1);
1605
1624
  }
1606
- if (state.flags & 0x0200) {
1625
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
1607
1626
  //=== CRC2(state.check, hold);
1608
1627
  hbuf[0] = hold & 0xff;
1609
1628
  hbuf[1] = (hold >>> 8) & 0xff;
@@ -1628,7 +1647,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1628
1647
  if (state.head) {
1629
1648
  state.head.time = hold;
1630
1649
  }
1631
- if (state.flags & 0x0200) {
1650
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
1632
1651
  //=== CRC4(state.check, hold)
1633
1652
  hbuf[0] = hold & 0xff;
1634
1653
  hbuf[1] = (hold >>> 8) & 0xff;
@@ -1656,7 +1675,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1656
1675
  state.head.xflags = (hold & 0xff);
1657
1676
  state.head.os = (hold >> 8);
1658
1677
  }
1659
- if (state.flags & 0x0200) {
1678
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
1660
1679
  //=== CRC2(state.check, hold);
1661
1680
  hbuf[0] = hold & 0xff;
1662
1681
  hbuf[1] = (hold >>> 8) & 0xff;
@@ -1683,7 +1702,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1683
1702
  if (state.head) {
1684
1703
  state.head.extra_len = hold;
1685
1704
  }
1686
- if (state.flags & 0x0200) {
1705
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
1687
1706
  //=== CRC2(state.check, hold);
1688
1707
  hbuf[0] = hold & 0xff;
1689
1708
  hbuf[1] = (hold >>> 8) & 0xff;
@@ -1725,7 +1744,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1725
1744
  // len + copy > state.head.extra_max ?
1726
1745
  // state.head.extra_max - len : copy);
1727
1746
  }
1728
- if (state.flags & 0x0200) {
1747
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
1729
1748
  state.check = crc32(state.check, input, copy, next);
1730
1749
  }
1731
1750
  have -= copy;
@@ -1751,7 +1770,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1751
1770
  }
1752
1771
  } while (len && copy < have);
1753
1772
 
1754
- if (state.flags & 0x0200) {
1773
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
1755
1774
  state.check = crc32(state.check, input, copy, next);
1756
1775
  }
1757
1776
  have -= copy;
@@ -1776,7 +1795,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1776
1795
  state.head.comment += String.fromCharCode(len);
1777
1796
  }
1778
1797
  } while (len && copy < have);
1779
- if (state.flags & 0x0200) {
1798
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
1780
1799
  state.check = crc32(state.check, input, copy, next);
1781
1800
  }
1782
1801
  have -= copy;
@@ -1798,7 +1817,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
1798
1817
  bits += 8;
1799
1818
  }
1800
1819
  //===//
1801
- if (hold !== (state.check & 0xffff)) {
1820
+ if ((state.wrap & 4) && hold !== (state.check & 0xffff)) {
1802
1821
  strm.msg = 'header crc mismatch';
1803
1822
  state.mode = BAD;
1804
1823
  break;
@@ -2451,15 +2470,15 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
2451
2470
  _out -= left;
2452
2471
  strm.total_out += _out;
2453
2472
  state.total += _out;
2454
- if (_out) {
2473
+ if ((state.wrap & 4) && _out) {
2455
2474
  strm.adler = state.check =
2456
- /*UPDATE(state.check, put - _out, _out);*/
2475
+ /*UPDATE_CHECK(state.check, put - _out, _out);*/
2457
2476
  (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));
2458
2477
 
2459
2478
  }
2460
2479
  _out = left;
2461
2480
  // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
2462
- if ((state.flags ? hold : zswap32(hold)) !== state.check) {
2481
+ if ((state.wrap & 4) && (state.flags ? hold : zswap32(hold)) !== state.check) {
2463
2482
  strm.msg = 'incorrect data check';
2464
2483
  state.mode = BAD;
2465
2484
  break;
@@ -2482,7 +2501,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
2482
2501
  bits += 8;
2483
2502
  }
2484
2503
  //===//
2485
- if (hold !== (state.total & 0xffffffff)) {
2504
+ if ((state.wrap & 4) && hold !== (state.total & 0xffffffff)) {
2486
2505
  strm.msg = 'incorrect length check';
2487
2506
  state.mode = BAD;
2488
2507
  break;
@@ -2537,8 +2556,8 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
2537
2556
  strm.total_in += _in;
2538
2557
  strm.total_out += _out;
2539
2558
  state.total += _out;
2540
- if (state.wrap && _out) {
2541
- strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
2559
+ if ((state.wrap & 4) && _out) {
2560
+ strm.adler = state.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
2542
2561
  (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));
2543
2562
  }
2544
2563
  strm.data_type = state.bits + (state.last ? 64 : 0) +
@@ -2553,7 +2572,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
2553
2572
 
2554
2573
  const inflateEnd = (strm) => {
2555
2574
 
2556
- if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
2575
+ if (inflateStateCheck(strm)) {
2557
2576
  return Z_STREAM_ERROR$1;
2558
2577
  }
2559
2578
 
@@ -2569,7 +2588,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
2569
2588
  const inflateGetHeader = (strm, head) => {
2570
2589
 
2571
2590
  /* check state */
2572
- if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }
2591
+ if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }
2573
2592
  const state = strm.state;
2574
2593
  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }
2575
2594
 
@@ -2588,7 +2607,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
2588
2607
  let ret;
2589
2608
 
2590
2609
  /* check state */
2591
- if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR$1; }
2610
+ if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }
2592
2611
  state = strm.state;
2593
2612
 
2594
2613
  if (state.wrap !== 0 && state.mode !== DICT) {
@@ -3320,7 +3339,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
3320
3339
 
3321
3340
  /**
3322
3341
  * inflate(data[, options]) -> Uint8Array|String
3323
- * - data (Uint8Array): input data to decompress.
3342
+ * - data (Uint8Array|ArrayBuffer): input data to decompress.
3324
3343
  * - options (Object): zlib inflate options.
3325
3344
  *
3326
3345
  * Decompress `data` with inflate/ungzip and `options`. Autodetect
@@ -3371,7 +3390,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
3371
3390
 
3372
3391
  /**
3373
3392
  * inflateRaw(data[, options]) -> Uint8Array|String
3374
- * - data (Uint8Array): input data to decompress.
3393
+ * - data (Uint8Array|ArrayBuffer): input data to decompress.
3375
3394
  * - options (Object): zlib inflate options.
3376
3395
  *
3377
3396
  * The same as [[inflate]], but creates raw data, without wrapper
@@ -3386,7 +3405,7 @@ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67'
3386
3405
 
3387
3406
  /**
3388
3407
  * ungzip(data[, options]) -> Uint8Array|String
3389
- * - data (Uint8Array): input data to decompress.
3408
+ * - data (Uint8Array|ArrayBuffer): input data to decompress.
3390
3409
  * - options (Object): zlib inflate options.
3391
3410
  *
3392
3411
  * Just shortcut to [[inflate]], because it autodetects format
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ![Cesium](https://github.com/CesiumGS/cesium/wiki/logos/Cesium_Logo_Color.jpg)
4
4
 
5
5
  [![Build Status](https://travis-ci.com/CesiumGS/cesium.svg?branch=main)](https://travis-ci.com/CesiumGS/cesium)
6
- [![npm](https://img.shields.io/npm/v/cesium/engine)](https://www.npmjs.com/package/cesium/engine)
6
+ [![npm](https://img.shields.io/npm/v/cesium/engine)](https://www.npmjs.com/package/@cesium/engine)
7
7
  [![Docs](https://img.shields.io/badge/docs-online-orange.svg)](https://cesium.com/learn/)
8
8
 
9
9
  CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics, and is cross-platform, cross-browser, and tuned for dynamic-data visualization.
@@ -17,33 +17,33 @@ CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web bro
17
17
 
18
18
  Install with npm:
19
19
 
20
- ````sh
20
+ ```sh
21
21
  npm install @cesium/engine --save
22
- ````
22
+ ```
23
23
 
24
24
  Or, install with yarn:
25
25
 
26
- ````sh
26
+ ```sh
27
27
  yarn add @cesium/engine
28
- ````
28
+ ```
29
29
 
30
30
  ## Usage
31
31
 
32
- ````js
32
+ ```js
33
33
  import * as Cesium from "@cesium/engine";
34
34
  import "@cesium/engine/Source/Widget/CesiumWidget.css";
35
35
 
36
36
  const cesiumWidget = new Cesium.CesiumWidget("cesiumContainer");
37
- ````
37
+ ```
38
38
 
39
39
  Or, import individual modules to benefit from tree shaking optmtimizations through most build tools:
40
40
 
41
- ````js
41
+ ```js
42
42
  import { CesiumWidget } from "@cesium/engine";
43
43
  import "@cesium/engine/Source/Widget/CesiumWidget.css";
44
44
 
45
45
  const cesiumWidget = new CesiumWidget("cesiumContainer");
46
- ````
46
+ ```
47
47
 
48
48
  See our [Quickstart Guide](https://cesium.com/learn/cesiumjs-learn/cesiumjs-quickstart/) for more information on getting a Cesium app up and running.
49
49
 
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
4
4
 
5
5
  let defaultTokenCredit;
6
6
  const defaultAccessToken =
7
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI0NTkyNGVkMi04YTg1LTQ4YzktYTI3MS05NTNiZWM3MTg2ZGEiLCJpZCI6MjU5LCJpYXQiOjE2NjQ4MTQyODl9.mGZTN2DeKa-mQnQr6BInj8GzOK6wq3dZMwcyU0iwInA";
7
+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmMmM4Yzc0YS02ZTM4LTQwODItOGI4ZC04OTI3Yzk5MjJlMGEiLCJpZCI6MjU5LCJpYXQiOjE2Njk5MDUxNDh9.tcSYhz3-NLfuOdb1w9wHOw-Ps85-AyR_mBYRHDifEi8";
8
8
 
9
9
  /**
10
10
  * Default settings for accessing the Cesium ion API.