Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions with number values only transform one decimal #10

Open
nicklassandell opened this issue Sep 20, 2019 · 2 comments
Open

Functions with number values only transform one decimal #10

nicklassandell opened this issue Sep 20, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request
Projects

Comments

@nicklassandell
Copy link

For example the scale function.

        const anim = new Motus.Animation({
            $el: this.$refs.startBg,
            startPoint: 0,
            endPoint: 500,
            keyframes: {
                100: {
                    scale: [1.3]
                }
            }
        });

        Motus.addAnimation(anim);

It will only increment the decimal by .1 each step, which results in an incredibly stuttery animation. It would be better if it would have 4-5 decimals (it would then animate 1.0001 and not skip the steps between 1.0-1.1).

I'm also encountering issues with other functions. The translateX seems to do nothing at all while the translate function works sometimes. I see a lot of potential in the library but at the moment I am afraid to use it for production because there is a lot of things not working, and there doesn't seem to be much happening in the repo.

I would advice you to go over the transform functions again and hunt down the bugs.

@alexcambose
Copy link
Owner

Thanks a lot for your feedback and suggestions.

@alexcambose alexcambose added the enhancement New feature or request label Sep 27, 2019
@alexcambose alexcambose self-assigned this Sep 27, 2019
@alexcambose alexcambose added this to Todo in V2.1 via automation Sep 27, 2019
@nateplusplus
Copy link

nateplusplus commented Jan 24, 2020

I also ran into this problem with scale animations.

In case it's of any help to others, as a temporary workaround, I've added width and height to my keyframes to dramatically reduce the size of the element, which allows me to scale by larger numbers. (Note, this was easy for me to do since I'm working with a pure HTML/CSS circle).

For example, the desired effect was scaling .6 to 1, but instead I did the following:

keyframes: [
    {
        width: 20,
        height: 20,
        scale: [18]
    },
    {
        width: 20,
        height: 20,
        scale: [27]
    }
]

@alexcambose I would love to pitch in and help you resolve this if you need a hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
V2.1
  
Todo
Development

No branches or pull requests

3 participants