Skip to content

Commit

Permalink
add data-elevation-posY attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Algorush committed Apr 27, 2024
1 parent 7017c3d commit 256f83a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/aframe-streetmix-parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,9 @@ function processSegments (segments, showStriping, length, globalAnimated, showVe
elevationLevels = [0, 0.2, 0.4];
const elevationPosY = elevationLevels[elevation];

// add y elevation position as a data attribute to segment entity
segmentParentEl.setAttribute('data-elevation-posY', elevationPosY);

// Note: segment 3d models are outbound by default
// If segment variant inbound, rotate segment model by 180 degrees
var rotationY = (variantList[0] === 'inbound' || variantList[1] === 'inbound') ? 180 : 0;
Expand Down

0 comments on commit 256f83a

Please sign in to comment.