rive-react icon indicating copy to clipboard operation
rive-react copied to clipboard

animations change don't work correctly

Open Kassan424kh opened this issue 3 years ago • 5 comments

Hello Rive,

after i change the state in the animations attribute, the animation can no longer be displayed.

rive-react is use 1.0.4

import "./styles.sass";
import Rive from "rive-react";

const LoadingAnimation = ({ dark }) => {
    return (
        <Rive
            className="loading-animation"
            src={`/rive/loadinganimation.riv`}
            autoPlay
            useOffscreenRenderer={false}
            animations={dark ? "dark" : "light"}
        />
    );
};

export default LoadingAnimation;

image

closest to https://github.com/rive-app/rive-react/issues/65

Kassan424kh avatar Apr 07 '22 13:04 Kassan424kh

Hey @Kassan424kh, I'm not able to reproduce your issue. When I try with my own example it's working fine. Would you be able to share the .riv file where you are seeing this happen?

avivian avatar Apr 11 '22 10:04 avivian

Hey @avivian,

hmm weird 🤔. here's the file export.zip

Kassan424kh avatar Apr 15 '22 08:04 Kassan424kh

I has created Codesandbox example https://codesandbox.io/s/loadinganimation-tskp6f

Kassan424kh avatar May 17 '22 07:05 Kassan424kh

@Kassan424kh We've had some updates since - I'm looking at the codesandbox which seems to be using an updated version, and am not able to see the animation disappearing. Do you still see the issue on your end?

zplata avatar Jun 08 '22 14:06 zplata

Hi @zplata, Sorry i fixed the showing animation problem, but i still has the same problem with changing animation after state change it still not working.

Kassan424kh avatar Jun 12 '22 02:06 Kassan424kh