anime icon indicating copy to clipboard operation
anime copied to clipboard

anime.seek(0) not working

Open cyhnkckali opened this issue 1 year ago • 3 comments

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

cyhnkckali avatar Jan 23 '24 10:01 cyhnkckali

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?

juliangarnier avatar Jan 23 '24 11:01 juliangarnier

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

cyhnkckali avatar Jan 23 '24 12:01 cyhnkckali

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

Yes :)

juliangarnier avatar Jan 23 '24 12:01 juliangarnier