Jump to content
Search Community

Scrolltrigger function-based value for scrub

MohsenKBZ test
Moderator Tag

Recommended Posts

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

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 :)

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...