Allow us to give our timeline a global variable id and store it unter a global object like:
MotionPage.tweens[‘our id’]
MotionPage.timelines[‘our id’]
This way we can manipulate it with custom code and access its API.
MotionPage.timelines[‘our id’].pause();
MotionPage.timelines[‘our id’].resume();
MotionPage.timelines[‘our id’].seek(1.5);
Or give us the option to ID a timeline with the built in gsap method
https://greensock.com/docs/v3/GSAP/gsap.getById()
gsap.to(obj, {id: “myTween”, duration: 1, x: 100});
And fetch it as documented
gsap.getById(“myTween”);
@Max Ziebell This is already ther. You can copy UID from library and use it like _mp_897623.pause(); If it is for a multiple same components, then you can access whole array by _mp_897623 and inner timelines by _mp_897623_1 (the last one is array index).
UID is generated on the first creaton of timeline (as timestamp) and it will stay the same until timeline complete removal.
Great, so the are all individually entries in the window namespace.
Followup: Okay I just inspected the code that is outputed by Motion Page. I see how you are doing it now… mmaybe consider to set the gsap id as well and in that case you can even use the user defined name if a user renames an animation.