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

anime.seek(0) not working #879

Open
cyhnkckali opened this issue Jan 23, 2024 · 3 comments
Open

anime.seek(0) not working #879

cyhnkckali opened this issue Jan 23, 2024 · 3 comments
Assignees
Labels
Milestone

Comments

@cyhnkckali
Copy link

If the target is an object and the target has a value at zero point, the update parameter will not work when the animation search method is set to 0.

Example code:

let animeObje={
    "targets": {
        "Button1_Left": 200
    },
    "loop": false,
    "direction": "normal",
    "easing": "linear",
    "duration": 2000,
    "autoplay": false,
    "Button1_Left": [
        {
            "value": 200,
            "duration": 0,
            "delay": 0,
            "endDelay": 0
        }
    ]
}

const animetion=anime({...animeObje})

anime.seek(0)

However, when the update method is run again with the following code, the target is updated

animetion.update(targets)

Windows 11
Chrome
V 3.2.2

@juliangarnier
Copy link
Owner

I think the problem comes from the duration: 0, V3 doesn't handle this very well.
What happens if you use duration: 0.001 instead?

@cyhnkckali
Copy link
Author

Hi @juliangarnier , thank you for the feedback.

When duration:0.001 and anime.seek(0.0001) are used, the problem disappears

By the way, I understand from your answer that this problem is not in v4 :)

And I can't wait to use it

@juliangarnier juliangarnier added this to the 4.0.0 milestone Jan 23, 2024
@juliangarnier juliangarnier self-assigned this Jan 23, 2024
@juliangarnier
Copy link
Owner

By the way, I understand from your answer that this problem is not in v4 :)

Yes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants