kopia lustrzana https://github.com/robhawkes/vizicities
Merge pull request #205 from UDST/bug/ImageTileLayer-destroy
Remove remaining image tile mesh referencesfeature/threejs-update
commit
8bbaf26182
|
@ -107,9 +107,8 @@ class ImageTileLayer extends TileLayer {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this._calculateLOD();
|
this._calculateLOD();
|
||||||
this._initEvents();
|
this._initEvents();
|
||||||
|
resolve(this);
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
resolve(this);
|
|
||||||
}).catch(reject);
|
}).catch(reject);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -130,7 +129,7 @@ class ImageTileLayer extends TileLayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
_onWorldMove(latlon, point) {
|
_onWorldMove(latlon, point) {
|
||||||
this._moveBaseLayer(point);
|
// this._moveBaseLayer(point);
|
||||||
}
|
}
|
||||||
|
|
||||||
_moveBaseLayer(point) {
|
_moveBaseLayer(point) {
|
||||||
|
@ -150,18 +149,18 @@ class ImageTileLayer extends TileLayer {
|
||||||
this._throttledWorldUpdate = null;
|
this._throttledWorldUpdate = null;
|
||||||
|
|
||||||
// Dispose of mesh and materials
|
// Dispose of mesh and materials
|
||||||
this._baseLayer.geometry.dispose();
|
// this._baseLayer.geometry.dispose();
|
||||||
this._baseLayer.geometry = null;
|
// this._baseLayer.geometry = null;
|
||||||
|
|
||||||
if (this._baseLayer.material.map) {
|
// if (this._baseLayer.material.map) {
|
||||||
this._baseLayer.material.map.dispose();
|
// this._baseLayer.material.map.dispose();
|
||||||
this._baseLayer.material.map = null;
|
// this._baseLayer.material.map = null;
|
||||||
}
|
// }
|
||||||
|
|
||||||
this._baseLayer.material.dispose();
|
// this._baseLayer.material.dispose();
|
||||||
this._baseLayer.material = null;
|
// this._baseLayer.material = null;
|
||||||
|
|
||||||
this._baseLayer = null;
|
// this._baseLayer = null;
|
||||||
|
|
||||||
// Run common destruction logic from parent
|
// Run common destruction logic from parent
|
||||||
super.destroy();
|
super.destroy();
|
||||||
|
|
Ładowanie…
Reference in New Issue