Animate a GSAP timeline between two labels in “shortest” manner possible
up vote
1
down vote
favorite
I have a GSAP (Greensock) animation that is "seemless," meaning that when it is played on an infinite loop you can't tell which part is the beginning, and which is the end.
Let's say I have two labels, one near the start (about 10% of the way in) and another near the end (around 90% completed):
| start end |
|----|----|----|----|----|----|----|----|----|
If I create a tweenTo from 'start' to 'end', it'll go "the long ways", scrubbing the playhead forward from 10% over to 90%.
Tween from 'start' to 'end' would go
"long ways" from the left to the right
:==================================>
| start end |
|----|----|----|----|----|----|----|----|----|
So far so good, this makes sense to me.
But what if I don't want that to happen? Since my animation is seemless, technically the animation could start at 10% and go backwards until it reaches the beginning, then loops around to the end of the animation and continues in reverse until it reaches the 'end' label at 90%.
But what if I wanted to go "backwards" from
'start' and loop around to 'end'?
/====: <====/
| start end |
|----|----|----|----|----|----|----|----|----|
This would be the "short way" between those two labels.
My question is, how would I go about creating an effect like this?
That is, if I have two labels, is it possible to animate between them where my animation "wraps around" the timeline instead of staying contained within the timeline?
See the following codepen for an example of this - https://codepen.io/romellem/pen/yQOQar?editors=0010
Within that codepen, on the left is the issue I'm facing, and on the right is a faked" example that shows what I want the animation on the left to do when tweening "around" my two labels.
animation gsap tweenmax timelinemax
add a comment |
up vote
1
down vote
favorite
I have a GSAP (Greensock) animation that is "seemless," meaning that when it is played on an infinite loop you can't tell which part is the beginning, and which is the end.
Let's say I have two labels, one near the start (about 10% of the way in) and another near the end (around 90% completed):
| start end |
|----|----|----|----|----|----|----|----|----|
If I create a tweenTo from 'start' to 'end', it'll go "the long ways", scrubbing the playhead forward from 10% over to 90%.
Tween from 'start' to 'end' would go
"long ways" from the left to the right
:==================================>
| start end |
|----|----|----|----|----|----|----|----|----|
So far so good, this makes sense to me.
But what if I don't want that to happen? Since my animation is seemless, technically the animation could start at 10% and go backwards until it reaches the beginning, then loops around to the end of the animation and continues in reverse until it reaches the 'end' label at 90%.
But what if I wanted to go "backwards" from
'start' and loop around to 'end'?
/====: <====/
| start end |
|----|----|----|----|----|----|----|----|----|
This would be the "short way" between those two labels.
My question is, how would I go about creating an effect like this?
That is, if I have two labels, is it possible to animate between them where my animation "wraps around" the timeline instead of staying contained within the timeline?
See the following codepen for an example of this - https://codepen.io/romellem/pen/yQOQar?editors=0010
Within that codepen, on the left is the issue I'm facing, and on the right is a faked" example that shows what I want the animation on the left to do when tweening "around" my two labels.
animation gsap tweenmax timelinemax
You should try the greensock forums. They answer quite quick and they(ll definitly knows if what you're asking is currently possible or not without tricking.
– AlaricB
6 hours ago
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have a GSAP (Greensock) animation that is "seemless," meaning that when it is played on an infinite loop you can't tell which part is the beginning, and which is the end.
Let's say I have two labels, one near the start (about 10% of the way in) and another near the end (around 90% completed):
| start end |
|----|----|----|----|----|----|----|----|----|
If I create a tweenTo from 'start' to 'end', it'll go "the long ways", scrubbing the playhead forward from 10% over to 90%.
Tween from 'start' to 'end' would go
"long ways" from the left to the right
:==================================>
| start end |
|----|----|----|----|----|----|----|----|----|
So far so good, this makes sense to me.
But what if I don't want that to happen? Since my animation is seemless, technically the animation could start at 10% and go backwards until it reaches the beginning, then loops around to the end of the animation and continues in reverse until it reaches the 'end' label at 90%.
But what if I wanted to go "backwards" from
'start' and loop around to 'end'?
/====: <====/
| start end |
|----|----|----|----|----|----|----|----|----|
This would be the "short way" between those two labels.
My question is, how would I go about creating an effect like this?
That is, if I have two labels, is it possible to animate between them where my animation "wraps around" the timeline instead of staying contained within the timeline?
See the following codepen for an example of this - https://codepen.io/romellem/pen/yQOQar?editors=0010
Within that codepen, on the left is the issue I'm facing, and on the right is a faked" example that shows what I want the animation on the left to do when tweening "around" my two labels.
animation gsap tweenmax timelinemax
I have a GSAP (Greensock) animation that is "seemless," meaning that when it is played on an infinite loop you can't tell which part is the beginning, and which is the end.
Let's say I have two labels, one near the start (about 10% of the way in) and another near the end (around 90% completed):
| start end |
|----|----|----|----|----|----|----|----|----|
If I create a tweenTo from 'start' to 'end', it'll go "the long ways", scrubbing the playhead forward from 10% over to 90%.
Tween from 'start' to 'end' would go
"long ways" from the left to the right
:==================================>
| start end |
|----|----|----|----|----|----|----|----|----|
So far so good, this makes sense to me.
But what if I don't want that to happen? Since my animation is seemless, technically the animation could start at 10% and go backwards until it reaches the beginning, then loops around to the end of the animation and continues in reverse until it reaches the 'end' label at 90%.
But what if I wanted to go "backwards" from
'start' and loop around to 'end'?
/====: <====/
| start end |
|----|----|----|----|----|----|----|----|----|
This would be the "short way" between those two labels.
My question is, how would I go about creating an effect like this?
That is, if I have two labels, is it possible to animate between them where my animation "wraps around" the timeline instead of staying contained within the timeline?
See the following codepen for an example of this - https://codepen.io/romellem/pen/yQOQar?editors=0010
Within that codepen, on the left is the issue I'm facing, and on the right is a faked" example that shows what I want the animation on the left to do when tweening "around" my two labels.
animation gsap tweenmax timelinemax
animation gsap tweenmax timelinemax
edited Nov 9 at 15:16
asked Nov 9 at 3:56
romellem
1,5101038
1,5101038
You should try the greensock forums. They answer quite quick and they(ll definitly knows if what you're asking is currently possible or not without tricking.
– AlaricB
6 hours ago
add a comment |
You should try the greensock forums. They answer quite quick and they(ll definitly knows if what you're asking is currently possible or not without tricking.
– AlaricB
6 hours ago
You should try the greensock forums. They answer quite quick and they(ll definitly knows if what you're asking is currently possible or not without tricking.
– AlaricB
6 hours ago
You should try the greensock forums. They answer quite quick and they(ll definitly knows if what you're asking is currently possible or not without tricking.
– AlaricB
6 hours ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53219655%2fanimate-a-gsap-timeline-between-two-labels-in-shortest-manner-possible%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You should try the greensock forums. They answer quite quick and they(ll definitly knows if what you're asking is currently possible or not without tricking.
– AlaricB
6 hours ago