@maptalks/3dtiles 0.12.2 → 0.12.3

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @maptalks/3dtiles v0.12.2
2
+ * @maptalks/3dtiles v0.12.3
3
3
  * LICENSE : UNLICENSED
4
4
  * (c) 2016-2022 maptalks.com
5
5
  */
@@ -124,7 +124,7 @@
124
124
  s(), o(1, 0, 0), o(0, 1, 0), g(), g(), A = new e(9), e != Float32Array && (A[1] = 0,
125
125
  A[2] = 0, A[3] = 0, A[5] = 0, A[6] = 0, A[7] = 0), A[0] = 1, A[4] = 1, A[8] = 1;
126
126
  /*!
127
- * @maptalks/gltf-loader v0.25.2
127
+ * @maptalks/gltf-loader v0.25.3
128
128
  * LICENSE : UNLICENSED
129
129
  * (c) 2016-2022 maptalks.org
130
130
  */
@@ -1105,13 +1105,16 @@
1105
1105
  let ot, at;
1106
1106
  function ct(t, e) {
1107
1107
  ot || (ot = new OffscreenCanvas(2, 2), at = ot.getContext("2d")), fetch(t).then(t => t.blob()).then(t => createImageBitmap(t)).then(t => {
1108
- ot.width = t.width, ot.height = t.height, at.drawImage(t, 0, 0);
1109
- const n = at.getImageData(0, 0, ot.width, ot.height);
1108
+ const {width: n, height: r} = t;
1109
+ ot.width = n, ot.height = r, at.drawImage(t, 0, 0), t.close();
1110
+ const s = at.getImageData(0, 0, n, r);
1110
1111
  e(null, {
1111
- width: t.width,
1112
- height: t.height,
1113
- data: new Uint8Array(n.data)
1112
+ width: n,
1113
+ height: r,
1114
+ data: new Uint8Array(s.data)
1114
1115
  });
1116
+ }).catch(t => {
1117
+ console.warn(t), e(t);
1115
1118
  });
1116
1119
  }
1117
1120
  function ht(t) {
@@ -2513,7 +2516,7 @@
2513
2516
  E(), L(1, 0, 0), L(0, 1, 0), q(), q(), J = new I(9), I != Float32Array && (J[1] = 0,
2514
2517
  J[2] = 0, J[3] = 0, J[5] = 0, J[6] = 0, J[7] = 0), J[0] = 1, J[4] = 1, J[8] = 1;
2515
2518
  /*!
2516
- * @maptalks/gltf-loader v0.25.2
2519
+ * @maptalks/gltf-loader v0.25.3
2517
2520
  * LICENSE : UNLICENSED
2518
2521
  * (c) 2016-2022 maptalks.org
2519
2522
  */
@@ -3498,13 +3501,16 @@
3498
3501
  let Pt, Lt;
3499
3502
  function Bt(t, e) {
3500
3503
  Pt || (Pt = new OffscreenCanvas(2, 2), Lt = Pt.getContext("2d")), fetch(t).then(t => t.blob()).then(t => createImageBitmap(t)).then(t => {
3501
- Pt.width = t.width, Pt.height = t.height, Lt.drawImage(t, 0, 0);
3502
- const n = Lt.getImageData(0, 0, Pt.width, Pt.height);
3504
+ const {width: n, height: r} = t;
3505
+ Pt.width = n, Pt.height = r, Lt.drawImage(t, 0, 0), t.close();
3506
+ const s = Lt.getImageData(0, 0, n, r);
3503
3507
  e(null, {
3504
- width: t.width,
3505
- height: t.height,
3506
- data: new Uint8Array(n.data)
3508
+ width: n,
3509
+ height: r,
3510
+ data: new Uint8Array(s.data)
3507
3511
  });
3512
+ }).catch(t => {
3513
+ console.warn(t), e(t);
3508
3514
  });
3509
3515
  }
3510
3516
  const Ut = "undefined" == typeof document ? null : document.createElement("canvas");
@@ -5948,5 +5954,5 @@
5948
5954
  t.Geo3DTransform = se, Object.defineProperty(t, "t", {
5949
5955
  value: !0
5950
5956
  });
5951
- })), i.Map.VERSION, o.GroupGLLayer.VERSION, "undefined" != typeof console && console.log("@maptalks/3dtiles v0.12.2");
5957
+ })), i.Map.VERSION, o.GroupGLLayer.VERSION, "undefined" != typeof console && console.log("@maptalks/3dtiles v0.12.3");
5952
5958
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptalks/3dtiles",
3
- "version": "0.12.2",
3
+ "version": "0.12.3",
4
4
  "description": "3d tiles layer for maptalks",
5
5
  "main": "dist/maptalks.3dtiles.js",
6
6
  "module": "dist/maptalks.3dtiles.es.js",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "homepage": "https://github.com/fuzhenn/3dtiles-issues/",
37
37
  "dependencies": {
38
- "@maptalks/gltf-loader": "^0.25.2",
38
+ "@maptalks/gltf-loader": "^0.25.3",
39
39
  "frustum-intersects": "^0.2.0",
40
40
  "gl-matrix": "^2.6.1"
41
41
  },