AndresSp Posted January 11, 2021 Share Posted January 11, 2021 It's posible to wrap multiple tweens as an effect, no just one? For example: gsap.registerEffect({ name: 'decodeWord', effect: (targets, config) => { gsap.set(targets, { color: 'white', textShadow: `0 0 0` }); gsap.to(targets, { duration: 1, opacity: 1, scrambleText: { text: config.newText, chars:'lowerCase', revealDelay: 1, tweenLength:false }, }) return gsap }, defaults: {}, //defaults get applied to any "config" object passed to the effect extendTimeline: true, //now you can call the effect directly on any GSAP timeline to have the result immediately inserted in the position you define (default is sequenced at the end) }) Link to comment Share on other sites More sharing options...
Solution ZachSaucier Posted January 11, 2021 Solution Share Posted January 11, 2021 Hey Andres and welcome to the GreenSock forums. Sure, it's possible. You just need to create a timeline inside of the effect and return the timeline. Demo. 3 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