@deck.gl/geo-layers 8.6.6 → 8.6.7
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/dist/dist.dev.js +29 -17
- package/dist/es5/tile-layer/tileset-2d.js +19 -2
- package/dist/es5/tile-layer/tileset-2d.js.map +1 -1
- package/dist/esm/tile-layer/tileset-2d.js +14 -2
- package/dist/esm/tile-layer/tileset-2d.js.map +1 -1
- package/dist.min.js +1 -1
- package/package.json +2 -2
- package/src/tile-layer/tileset-2d.js +14 -2
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@deck.gl/geo-layers",
|
|
3
3
|
"description": "deck.gl layers supporting geospatial use cases and GIS formats",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "8.6.
|
|
5
|
+
"version": "8.6.7",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"@deck.gl/mesh-layers": "^8.0.0",
|
|
50
50
|
"@loaders.gl/core": "^3.0.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "44586e28548c91ea0cebc2a23d316fff3bb1f389"
|
|
53
53
|
}
|
|
@@ -71,6 +71,9 @@ export default class Tileset2D {
|
|
|
71
71
|
this._selectedTiles = null;
|
|
72
72
|
this._frameNumber = 0;
|
|
73
73
|
|
|
74
|
+
this._modelMatrix = new Matrix4();
|
|
75
|
+
this._modelMatrixInverse = new Matrix4();
|
|
76
|
+
|
|
74
77
|
this.setOptions(opts);
|
|
75
78
|
}
|
|
76
79
|
|
|
@@ -87,6 +90,10 @@ export default class Tileset2D {
|
|
|
87
90
|
return this._selectedTiles.every(tile => tile.isLoaded);
|
|
88
91
|
}
|
|
89
92
|
|
|
93
|
+
get needsReload() {
|
|
94
|
+
return this._selectedTiles.some(tile => tile.needsReload);
|
|
95
|
+
}
|
|
96
|
+
|
|
90
97
|
setOptions(opts) {
|
|
91
98
|
Object.assign(this.opts, opts);
|
|
92
99
|
if (Number.isFinite(opts.maxZoom)) {
|
|
@@ -131,8 +138,8 @@ export default class Tileset2D {
|
|
|
131
138
|
const isModelMatrixNew = !modelMatrixAsMatrix4.equals(this._modelMatrix);
|
|
132
139
|
if (!viewport.equals(this._viewport) || isModelMatrixNew) {
|
|
133
140
|
if (isModelMatrixNew) {
|
|
134
|
-
this._modelMatrixInverse =
|
|
135
|
-
this._modelMatrix =
|
|
141
|
+
this._modelMatrixInverse = modelMatrixAsMatrix4.clone().invert();
|
|
142
|
+
this._modelMatrix = modelMatrixAsMatrix4;
|
|
136
143
|
}
|
|
137
144
|
this._viewport = viewport;
|
|
138
145
|
const tileIndices = this.getTileIndices({
|
|
@@ -149,6 +156,11 @@ export default class Tileset2D {
|
|
|
149
156
|
// Some new tiles are added
|
|
150
157
|
this._rebuildTree();
|
|
151
158
|
}
|
|
159
|
+
// Check for needed reloads explicitly even if the view/matrix has not changed.
|
|
160
|
+
} else if (this.needsReload) {
|
|
161
|
+
this._selectedTiles = this._selectedTiles.map(tile =>
|
|
162
|
+
this._getTile({x: tile.x, y: tile.y, z: tile.z})
|
|
163
|
+
);
|
|
152
164
|
}
|
|
153
165
|
|
|
154
166
|
// Update tile states
|