Skip to content

Commit

Permalink
replace addLinearAnimation function with new automation component
Browse files Browse the repository at this point in the history
  • Loading branch information
Algorush committed Feb 8, 2024
1 parent d16b602 commit 7e1dbd6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/aframe-streetmix-parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)];
Expand Down

0 comments on commit 7e1dbd6

Please sign in to comment.