Animate a GSAP timeline between two labels in “shortest” manner possible









up vote
1
down vote

favorite
1












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.










share|improve this question























  • 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














up vote
1
down vote

favorite
1












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.










share|improve this question























  • 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












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





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.










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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
















  • 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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















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



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














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














































































Popular posts from this blog

Ruanda

Makov (Slowakei)

Kleinkühnau