MohsenKBZ Posted August 26, 2021 Share Posted August 26, 2021 hey there. is it possible to add function-based values for scrolltrigger scrub? Link to comment Share on other sites More sharing options...
GreenSock Posted August 26, 2021 Share Posted August 26, 2021 Hm, could you explain how that would be useful? I can't think of a scenario where that would help anything. Link to comment Share on other sites More sharing options...
MohsenKBZ Posted August 27, 2021 Author Share Posted August 27, 2021 we're developing a project where user can create a parallax effect in a live editor and be able to change all parameters. from parallax values e.g. x, y, rotation etc. to start and end points. and we wanted to add scrub as well. or if you could suggest any other ways to do to get the same result as using scrub Link to comment Share on other sites More sharing options...
GreenSock Posted August 27, 2021 Share Posted August 27, 2021 Yeah, I just don't see any value (outside of maybe a live editor) in a function-based scrub value and it would bloat ScrollTrigger to try to implement that. If I were you, I'd probably just have a setup() function that basically kills the old ones and recreates things from scratch according to the values selected. The reason we permit some function-based values is for responsive layouts where it's critical to be able to dynamically update sizing values or re-calculate tween values but scrub isn't something that'd need to dynamically change in any real-world application that I can think of. It would hurt performance to implement that too, and I obsess about performance 1 Link to comment Share on other sites More sharing options...
MohsenKBZ Posted August 27, 2021 Author Share Posted August 27, 2021 yeah that's also possible with destroying previous instances and recreating. thanks for explaining and suggestions 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