michaelrafailyk / stickymate

Stickymate is a tool that designed to help web developers easily create scroll-based animations without JavaScript knowledge, just setting animation params directly in the HTML markup.
https://michaelrafailyk.github.io/stickymate/
MIT License
63 stars 5 forks source link

Support for snapping #3

Closed hirbod closed 3 years ago

hirbod commented 4 years ago

It would be cool if a started animation (lets say scale from 0.75 to 1) could be snapped once triggered. Currently, it will stop where scroll/momentum ends and sometimes lead to weird positioning. Do you think something like this can be possible, maybe even with css snapping?

hirbod commented 4 years ago

I did a trick on my setup for now. I've setup

(pseudo): 0vh: 0.75, 1vh: 1

and added a class to the my animated div with css transition set to 1 second. It works great without any issues.

luco commented 3 years ago

@Hirbod Can you post an example?

michaelrafailyk commented 3 weeks ago

Since v1.2.5 the library support data-classes so I suppose it do the same work.