Skip to content

Commit

Permalink
remove old data-layer-name in a blank scene
Browse files Browse the repository at this point in the history
  • Loading branch information
Algorush committed Apr 25, 2024
1 parent a40d705 commit 6f78e84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/street-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ function newScene(clearMetaData=true, clearUrlHash=true, addDefaultStreet=true)
for (defaultStreetChild of defaultStreetArray) {
defaultStreet.removeChild(defaultStreetChild);
}
// clear data from previous scene
defaultStreet.removeAttribute('data-layer-name');
defaultStreet.removeAttribute('street');
defaultStreet.removeAttribute('streetmix-loader');
}
Expand All @@ -59,8 +61,10 @@ function newScene(clearMetaData=true, clearUrlHash=true, addDefaultStreet=true)
checkOrCreateEntity("environment", environmentHTML);
checkOrCreateEntity("reference-layers", referenceLayersHTML);

// update sceneGraph
streetContainerEl.emit('entitycreated', streetContainerEl.sceneEl);
if (AFRAME.INSPECTOR && AFRAME.INSPECTOR.opened) {
// update sceneGraph

}

// clear metadata
if (clearMetaData) {
Expand Down

0 comments on commit 6f78e84

Please sign in to comment.