diff --git a/src/index.js b/src/index.js index 52c69bfee..e4f7bb16f 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,6 @@ if (typeof VERSION !== 'undefined') { console.log(`3DStreet Version: ${VERSION}` var streetmixParsers = require('./aframe-streetmix-parsers'); var streetmixUtils = require('./tested/streetmix-utils'); require('./json-utils_1.1.js'); -require('./street-utils.js'); require('./components/gltf-part'); require('./components/ocean'); require('./components/svg-extruder.js'); @@ -40,17 +39,6 @@ AFRAME.registerComponent('street', { const streetmixSegments = JSON.parse(data.JSON); - // remove .street-parent and .buildings-parent elements, if they exists, with old scene elements. - // Because they will be created next in the processSegments and processBuildings functions - const streetParent = this.el.querySelector('.street-parent'); - if (streetParent) { - streetParent.remove(); - } - const buildingParent = this.el.querySelector('.buildings-parent'); - if (buildingParent) { - buildingParent.remove(); - } - const streetEl = streetmixParsers.processSegments(streetmixSegments.streetmixSegmentsMetric, data.showStriping, data.length, data.globalAnimated, data.showVehicles); this.el.append(streetEl); @@ -109,6 +97,7 @@ AFRAME.registerComponent('streetmix-loader', { const streetmixName = streetmixResponseObject.name; console.log('streetmixName', streetmixName); + el.setAttribute('streetmix-loader', 'name', streetmixName); let currentSceneTitle;