Skip to content

Commit

Permalink
bike arrow stencil
Browse files Browse the repository at this point in the history
  • Loading branch information
kfarr committed Nov 26, 2024
1 parent a9f5180 commit 2270bf0
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/aframe-streetmix-parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -758,22 +758,12 @@ function processSegments(
segments[i].type === 'scooter'
) {
segmentPreset = 'bike-lane'; // use bike lane road material
// make a parent entity for the stencils
const stencilsParentEl = createStencilsParentElement({
y: 0.015
});
// get the mixin id for a bike lane
segmentColor = getSegmentColor(variantList[1]);
// clone a bunch of stencil entities (note: this is not draw call efficient)
cloneMixinAsChildren({
objectMixinId: 'stencils bike-arrow',
parentEl: stencilsParentEl,
rotation: '-90 ' + rotationY + ' 0',
step: 20,
radius: clonedObjectRadius
});
// add this stencil stuff to the segment parent
segmentParentEl.append(stencilsParentEl);
segmentParentEl.setAttribute(
'street-generated-stencil',
`model: bike-arrow; length: ${length}; cycleOffset: 0.3; spacing: 20;`
);
const rotationCloneY = variantList[0] === 'inbound' ? 0 : 180;
segmentParentEl.setAttribute(
'street-generated-random',
Expand Down

0 comments on commit 2270bf0

Please sign in to comment.