Lottie-web: Counter expression tied to progress bar error

Created on 30 Nov 2018  路  4Comments  路  Source: airbnb/lottie-web

Hi all, finally trying to incorporate expression into lottie and running into some issues.
Essentially I have a percentage that i want to count up to "35%." however i want to start and stop of the counter tied to the first and second keyframes of the "end" property in a trim paths effect on an ellipse (progress bar)

the expression works perfectly in AE, but not when on web. The counter doesnt work.

Expression on the source text of the 35 layer:

start=0;
end=parseInt(text.sourceText);
startKeyTime = thisComp.layer("Bar").content("Ellipse 1").content("Trim Paths 1").end.key(1).time
endKeyTime = thisComp.layer("Bar").content("Ellipse 1").content("Trim Paths 1").end.key(2).time
val=Math.round(easeOut(time, startKeyTime, endKeyTime,start, end));

If anyone has any ideas! let me know!

Most helpful comment

Expression didn't support targetting key times.
I just pushed a new build that should have this fixed on the player.
https://github.com/airbnb/lottie-web/tree/master/build/player

Keep in mind that if you export text as shapes you need to export all the characters that will be needed to render in your animation. In your case you should create an extra layer with characters from 0 to 9 and have it hidden or outside the workspace.

All 4 comments

Hi, could you share the .aep so I can take a look?

Hi, could you share the .aep so I can take a look?

yess! Thank you!
percentage.aep.zip

Expression didn't support targetting key times.
I just pushed a new build that should have this fixed on the player.
https://github.com/airbnb/lottie-web/tree/master/build/player

Keep in mind that if you export text as shapes you need to export all the characters that will be needed to render in your animation. In your case you should create an extra layer with characters from 0 to 9 and have it hidden or outside the workspace.

You are amazing! thank you so much! we got it working.

Can you please explain the bit about having the character set off the workspace and why that's important?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

processprocess picture processprocess  路  3Comments

RenanSgorlom picture RenanSgorlom  路  3Comments

cpdt picture cpdt  路  4Comments

DannyK123456 picture DannyK123456  路  3Comments

deborabm picture deborabm  路  3Comments