Skip to content

Commit

Permalink
Merge pull request #836 from 3DStreet/use-bollards-instead-of-safehit
Browse files Browse the repository at this point in the history
Use bollards instead of safehit
  • Loading branch information
kfarr authored Sep 5, 2024
2 parents acbd23d + 74d4fe3 commit 54a2fa1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 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
3 changes: 2 additions & 1 deletion src/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ function buildAssetHTML(assetUrl, categories) {
<a-mixin shadow id="dividers-planter-box" scale="1 1 1" rotation="0 0 0" gltf-part="src: #dividers; part: planter-box"></a-mixin>
<a-mixin shadow id="dividers-bush" scale="1 1 1" rotation="0 0 0" gltf-part="src: #dividers; part: bush"></a-mixin>
<a-mixin shadow id="dividers-dome" scale="1 1 1" rotation="0 0 0" gltf-part="src: #dividers; part: dome"></a-mixin>
<a-mixin shadow id="safehit" scale="1 1 1" rotation="0 0 0" gltf-part="src: #dividers; part: bollard"></a-mixin>
<a-mixin shadow id="safehit" scale="1 1 1" rotation="0 0 0" gltf-part="src: #dividers; part: safehit"></a-mixin>
<a-mixin shadow id="bollard" scale="1 1 1" rotation="0 0 0" gltf-part="src: #dividers; part: bollard"></a-mixin>
<a-mixin shadow id="temporary-barricade" scale="1 1 1" rotation="0 0 0" gltf-part="src: #dividers; part: barricade"></a-mixin>
<a-mixin shadow id="temporary-traffic-cone" scale="1 1 1" rotation="0 0 0" gltf-part="src: #dividers; part: traffic-cone"></a-mixin>
<a-mixin shadow id="temporary-jersey-barrier-plastic" scale="1 1 1" rotation="0 0 0" gltf-part="src: #dividers; part: jersey-barrier-plastic"></a-mixin>
Expand Down

0 comments on commit 54a2fa1

Please sign in to comment.