Jump to content
Search Community

set progress of tween without calling callbacks/events?

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

So If I have a timeline like this random example:
 

const tl = new TimelineMax()

tl
.from(el, 1, {
  yPercent: 100
})
.addCallback(someFunction, 0.5)
.to(el, 1, {
  xPercent: 100
})


But need to change the progress initially like:
 

tl.progress(1).progress(0)


How would u do this without calling the callback?

I tried removing it from the timeline, and add it like below, but doesn't seem to work as I want?
 

const tl = new TimelineMax({ paused: true )

tl
.from(el, 1, {
  yPercent: 100
})
.to(el, 1, {
  xPercent: 100
})

tl
.progress(1)
.progress(0)
.addCallback(someFunction, 0.5)
.play()

 

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