This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Daniel Keller
Posted Dec 28 - Read on Facebook

Hello Again :)

https://framer.cloud/BkOYQAyBl/

In this example when you press start the position / value of the slider gets pushed into an array every 1 second.
When you press stop it stops "recording" the slider Movement.

Now my Question:

I want to achieve that when you have an array with values for example: [86, 94, 99, 87, 56, 100, 106, 71, 97] and you press play that the recorded slider behavior gets replicated.

The tricky part here is I want to interpolate between numbers.

So at second 1 the Slider is at 86 at second 2 the slider should be at 94 but in between there should be a linear interpolation of the numbers? So that you can see the slider moving slowly.

Can someone show me what the easiest way would be to do that?
Would there also be a way to "ease" between those numbers.

I hope I did a good job explaining what I want :)

2 Comments

Onne Gorter

Hi Daniel. A slider has a method animateToValue(value, options), you could call that once a second with a new value from that list and use options: {time:1}. Hope this helps.

Daniel Keller

Oh thats actually very handy, I did not know that, I will try out.

Read the entire post on Facebook