mirror of
https://github.com/mapillary/mapillary-js.git
synced 2026-02-01 14:33:45 +00:00
fix(spatial): loop through correct dictionary
This commit is contained in:
parent
d3371d45db
commit
98139c304e
@ -251,7 +251,7 @@ export class SpatialDataScene {
|
||||
}
|
||||
|
||||
public uncache(keepHashes?: string[]): void {
|
||||
for (const hash of Object.keys(this._reconstructions)) {
|
||||
for (const hash of Object.keys(this._tileClusterReconstructions)) {
|
||||
if (!!keepHashes && keepHashes.indexOf(hash) !== -1) {
|
||||
continue;
|
||||
}
|
||||
@ -677,17 +677,6 @@ export class SpatialDataScene {
|
||||
}
|
||||
|
||||
private _disposePoints(hash: string): void {
|
||||
const tilePoints: THREE.Object3D = this._reconstructions[hash].points;
|
||||
|
||||
for (const points of tilePoints.children.slice()) {
|
||||
(<THREE.Points>points).geometry.dispose();
|
||||
(<THREE.Points>points).material.dispose();
|
||||
|
||||
tilePoints.remove(points);
|
||||
}
|
||||
|
||||
this._scene.remove(tilePoints);
|
||||
|
||||
for (const key of this._tileClusterReconstructions[hash].keys) {
|
||||
if (!(key in this._clusterReconstructions)) {
|
||||
continue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user