Jump to content
Search Community

Incrementing Numbers with Leading Zeros

MarcusG test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

  • Solution

Hi @Marcus Griffen welcome to the forum and thanks for being a Club Greensock member 🎉

 

A minimal demo would have been nice here, so that we don't spend the first 5 minutes creating a demo our selfs and can jump in the code directly, keep that in min for next time 🙃

 

I've used the modifier property to update the value based on your requirements, the snap logic doesn't work with it, so you have to round the number in the function your self. And the zeroPad function comes from stackoverflow. Hope it helps and happy tweening! 

 

See the Pen bGOKjRj?editors=0011 by mvaneijgen (@mvaneijgen) on CodePen

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...