From 256f83af657b262ac98627d5040552a354265732 Mon Sep 17 00:00:00 2001 From: Alexander Goryushkin Date: Sat, 27 Apr 2024 19:16:43 -0400 Subject: [PATCH] add data-elevation-posY attribute --- src/aframe-streetmix-parsers.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/aframe-streetmix-parsers.js b/src/aframe-streetmix-parsers.js index f8f061115..b875913a3 100644 --- a/src/aframe-streetmix-parsers.js +++ b/src/aframe-streetmix-parsers.js @@ -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;