pqina / flip

⏳ The online version of the classic flip clock
https://pqina.nl/flip/
MIT License
892 stars 87 forks source link

Start with letters, but then count up with numbers #39

Closed mhoelter closed 2 years ago

mhoelter commented 2 years ago

I'm attempting to create an initial flipper value of "???". Then on a specific event, I'd like to flip the counter over to zeros, and count upwards to a specific 3-digit (or less) number.

I'm using the following for the numeric counting: data-transform="arrive(9, .001) -> round -> pad('???') -> split -> delay(rtl, 100, 150)" (adapted from the "Animated Values" example).

I've tried playing around with the documentation here and messed with variations on data-transform="transform(split() -> map(replace('?', '0'))) -> arrive(9, .001) -> round -> pad('000') -> split -> delay(rtl, 100, 150)", but it either didn't achieve what I wanted or threw errors.

Happy to provide more context if needed. Ideally, the flipper would function like this:

  1. Initialize with "[?] [?] [?]" (each bracket being it's own flipper)
  2. On specific trigger, each "[?]" flips over to "[0]".
  3. Then counts up to whatever the specific number is.

Thanks!

rikschennink commented 2 years ago

I want to kindly ask to post this to Stack Overflow or a job board as it's basically a question to build a custom solution for you.

The issue tracker main purpose is catching feature requests and bug reports.