Skip to content

Commit

Permalink
use bollard for bollard segments
Browse files Browse the repository at this point in the history
  • Loading branch information
kfarr committed Sep 5, 2024
1 parent a74cb33 commit 74d4fe3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/aframe-streetmix-parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ function createTracksParentElement(length, objectMixinId) {
return placedObjectEl;
}

function createSafehitsParentElement() {
function createBollardsParentElement() {
const placedObjectEl = document.createElement('a-entity');
placedObjectEl.setAttribute('class', 'safehit-parent');
placedObjectEl.setAttribute('class', 'bollard-parent');
return placedObjectEl;
}

Expand Down Expand Up @@ -1163,16 +1163,16 @@ function processSegments(
}
} else if (segments[i].type === 'divider' && variantList[0] === 'bollard') {
groundMixinId = 'divider';
// make some safehits
const safehitsParentEl = createSafehitsParentElement();
// make some bollards
const bollardsParentEl = createBollardsParentElement();
cloneMixinAsChildren({
objectMixinId: 'safehit',
parentEl: safehitsParentEl,
objectMixinId: 'bollard',
parentEl: bollardsParentEl,
step: 4,
radius: clonedObjectRadius
});
// add the safehits to the segment parent
segmentParentEl.append(safehitsParentEl);
// add the bollards to the segment parent
segmentParentEl.append(bollardsParentEl);
repeatCount[0] = 1;
repeatCount[1] = parseInt(length) / 4;
} else if (segments[i].type === 'divider' && variantList[0] === 'flowers') {
Expand Down

0 comments on commit 74d4fe3

Please sign in to comment.