Closed MATTiVOLTARii closed 2 years ago
@MATTiVOLTARii Can you please link your LottieInteractivity code setup?
@MATTiVOLTARii Can you please link your LottieInteractivity code setup?
i tried something like this:
LottieInteractivity.create({
mode:"scroll",
player:"#lottie_demo_prototyp",
container:"#section",
actions: [
{
visibility: [0.1, 0.3],
type: "play",
},{
visibility: [0.1, 0.3],
type: "seek",
frames: [0, 79]
}
]
});
@MATTiVOLTARii I think your setup needs changing, can you try something like this:
LottieInteractivity.create({
mode:"scroll",
player:player,
actions: [
{
visibility: [0.1, 0.3],
type: "seek",
frames: [0, X]
},
{
visibility: [0.4, 1],
type: "loop",
frames: [X, X]
}
]
});
Here is the animation: https://di-gi.de/ You can see it in the smartphone animation about halfway down the site.
It should be like this: If the Lottie is in the viewport it should play - it does. when scrolling up, it should play back in type "seek". Once the lottie is back in the viewport it should start playing again.
The rewind with the "seek" is not absolutely necessary. But it would be great if the animation played back as soon as you scrolled in from above. With loop, the animation plays repeatedly. I just want the "play" to be triggered only once when entering the viewport from above. But every time I come down from above and not just once for visiting the website.
I hope this is understandable.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.
there doesn't seem to be a way to restart a lottie in the "play" type.
In my use case, I try to make a lottie play when it is visible, to make it invisible again when I scroll up (is there a way to connect playing backwards with the "seek" type?) and when I scroll down the lottie should play again
Type
Labels
Type: Feature Request
label to this issue.