Fax Posted August 1, 2024 Posted August 1, 2024 Hi, this is my first post and I start with a stupid question: can I create an array of labels set in my timeline? Thank you.
mvaneijgen Posted August 1, 2024 Posted August 1, 2024 Hi @Fax welcome to the forum! There are no stupid questions, but if I'm wondering something like this I start opening a Codepen setting up the basics I need and then console.log() the things I have, to see if I can find what I Need. With your future questions please always include a demo with your questions, even if it is an easy one. It is so nice to just jump directly into your code to test a theory we have and indeed timeline.labels gives you an object of all the labels in your timeline with their timestamp. If you must have an array you could easily convert it to a array with some JS logic Hope it helps and happy tweening! https://gsap.com/docs/v3/GSAP/Timeline/labels/ See the Pen JjQWyBL?editors=1111 by mvaneijgen (@mvaneijgen) on CodePen. 2
Fax Posted August 1, 2024 Author Posted August 1, 2024 Thank you @mvaneijgen for suggestions. For the next posts I will try to be more precise, maybe even with a Codepen 1
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