Skip to content

Commit

Permalink
dont need to clean default-street in a street component anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Algorush committed Apr 24, 2024
1 parent 8fe3b70 commit 14f5b26
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -109,6 +97,7 @@ AFRAME.registerComponent('streetmix-loader', {

const streetmixName = streetmixResponseObject.name;
console.log('streetmixName', streetmixName);

el.setAttribute('streetmix-loader', 'name', streetmixName);

let currentSceneTitle;
Expand Down

0 comments on commit 14f5b26

Please sign in to comment.