dazzafact Posted March 7, 2022 Share Posted March 7, 2022 Hello There!, Is it possible to get the current Time in Seconds of all timelines already set? $tl.fromTo($slide,{alpha:0},{alpha:1,duration:1},0) .to($slide,{duration:3},'>') .to($slide,{alpha:0,duration:1},'>'); $time=$tl.currentTime()//1+3+1=4 alert($time)//4 Link to comment Share on other sites More sharing options...
dazzafact Posted March 7, 2022 Author Share Posted March 7, 2022 Ok, i found out totalDuration() gives me a current values of any position. THis makes it much easier. Because before i collected all timesstamps manuel in an array😅 Link to comment Share on other sites More sharing options...
Solution GreenSock Posted March 7, 2022 Solution Share Posted March 7, 2022 Sure. $time = $tl.duration(); // without the timeline's repeats $time = $tl.totalDuration(); // with the timeline's repeats (if any) 2 Link to comment Share on other sites More sharing options...
dazzafact Posted March 7, 2022 Author Share Posted March 7, 2022 1 minute ago, GreenSock said: Sure. $time = $tl.duration(); // without the timeline's repeats $time = $tl.totalDuration(); // with the timeline's repeats (if any) Loving your GSAP Plugin! one of my top 10 Javascript Libraries 💛💛💛 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now