Open Natim opened 6 years ago
In this case the solution I had in mind was to go to 0% and then switch to pixels.
But then you need a way to guess how many pixels might your 15% be.
Animation.style [ Animation.top (percent 100) ]
|> Animation.interrupt
[ Animation.loop
[ Animation.toWith (Animation.speed { perSecond = 15 })
[ Animation.top (percent 0) ]
, Animation.set [ Animation.top (px 0) ]
, Animation.toWith (Animation.speed { perSecond = 150 })
[ Animation.top (px -250) ]
, Animation.set [ Animation.top (percent 100) ]
]
]
If you try to do the following:
Note the
(px -200)
It actually goes to
(percent -200)