kopia lustrzana https://github.com/robhawkes/vizicities
Fix world.destroy()
rodzic
d0d7a97937
commit
ccfaa64ecb
|
@ -153,7 +153,9 @@ class World extends EventEmitter {
|
||||||
|
|
||||||
_removeAttribution(id) {
|
_removeAttribution(id) {
|
||||||
var elem = document.querySelectorAll('#attribution-container [data-layer="' + id + '"]')[0];
|
var elem = document.querySelectorAll('#attribution-container [data-layer="' + id + '"]')[0];
|
||||||
elem.remove();
|
if (elem) {
|
||||||
|
elem.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set world view
|
// Set world view
|
||||||
|
|
|
@ -129,9 +129,11 @@ class EnvironmentLayer extends Layer {
|
||||||
destroy() {
|
destroy() {
|
||||||
this._skyboxLight = null;
|
this._skyboxLight = null;
|
||||||
|
|
||||||
this.remove(this._skybox._mesh);
|
if (this._skybox) {
|
||||||
this._skybox.destroy();
|
this.remove(this._skybox._mesh);
|
||||||
this._skybox = null;
|
this._skybox.destroy();
|
||||||
|
this._skybox = null;
|
||||||
|
}
|
||||||
|
|
||||||
super.destroy();
|
super.destroy();
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue