Jump to content
Search Community

Hava a variable as the dynamic Position Parameter using ES6 backticks

studioalloy test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

.staggerFrom(
  "#DienstWebsite #phone #phone-header-text *",
  baseTiming,
  { drawSVG: "0%" },
  0.1,
  `-=${baseTiming * 4}`, // ? culprit
)

I have the follow code which seems fine to me, but I get the following error in my console Uncaught TypeError: callback.call is not a function at TimelineLite.push... While inspecting the code and removing all these types of timing functions, the error goes away. I've also tried the non ES6 version to get a variable in the Position Parameter, but with no luck.  "'-=" + baseTiming * 4 + "'" .

 

Is this just not possible? I like my timings always to be a multiple of my base timing and having this calculated by Javascript seems like a smart plan. 

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...