From 7e1dbd69383dc67221a05e6c8830e9fe826a95c7 Mon Sep 17 00:00:00 2001 From: Alexander Goryushkin Date: Thu, 8 Feb 2024 16:17:40 -0300 Subject: [PATCH] replace addLinearAnimation function with new automation component --- src/aframe-streetmix-parsers.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/aframe-streetmix-parsers.js b/src/aframe-streetmix-parsers.js index 598c8f27d..877136ade 100644 --- a/src/aframe-streetmix-parsers.js +++ b/src/aframe-streetmix-parsers.js @@ -532,7 +532,14 @@ function createMicroMobilityElement (variantList, segmentType, posY = 0, length, if (animated) { reusableObjectEl.setAttribute('animation-mixer', ''); const speed = 5; - addLinearStreetAnimation(reusableObjectEl, speed, length, 0, posY, randPosZ, variantList[0]); + reusableObjectEl.setAttribute('automation-element', { + zPos: randPosZ, + direction: variantList[0], + speed: speed, + streetLength: length, + mixer: true + }); + } if (segmentType === 'bike-lane') { mixinId = cyclistMixins[getRandomIntInclusive(0, countCyclist)];