Jump to content
Search Community

GSAP master-timeline not working when shared via Pinia

LutzDev test
Moderator Tag

Go to solution Solved by LutzDev,

Recommended Posts

Hi everyone,

I'm relatively new to GSAP, and I'm running into a problem that I'm not sure is related to Vue or GSAP. I have created a simplified example on StackBlitz to demonstrate the problem: example.

Master timeline -> stores/AnimationStore.ts
Usage & Child timeline -> app.vue


Here is the problem I'm facing: I'm trying to share a GSAP timeline called master via Pinia in my Nuxt 3 project. Components in the project can create their own child timelines and add them to the master timeline. In the example, the child timeline is correctly added to the master timeline, but when I play the master timeline, it just starts (console.log('Master started')), but doesn't update or finish. Also, the child timeline doesn't run.


I would appreciate any guidance or suggestions on how to solve this issue. Thanks in advance for your help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...