Jump to content
Search Community

romellem

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by romellem

  1. Thanks, not overwhelming at all! Couple of things: The "rotation" example I used is a bit contrived, my actual use case isn't changing rotation at all so I don't think I'd have a use for DirectionalRotationPlugin. Your `scrubTimeline` function is a good idea, however stringing together those two tweens seems like it only makes sense for Linear tweens. What if I have some more complicated easing going on? Your suggestion of "tween some value that you plug into progress / time" was actually the same idea I recently came up with too! My idea was to tween some arbitrary JS Object, and use the `onUpdate` to set my progress/time. However, I wasn't aware of the ModifiersPlugin, and reading into that seems like it might be a bit more straight forward way to accomplish what I want to do. This has helped a lot, thanks! I'll post an update with my eventual solution shortly.
  2. I have an 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? The codepen I've included shows the issue I'm facing on the left, as well as a "faked" example on the right that shows what I want the animate on the left to do when tweening "around" my two labels.
×
×
  • Create New...