Jump to content
Search Community

allanbreyes

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by allanbreyes

  1. Ah, I didn't search hard enough... looks like there is some prior art on this:

     

     

    Quote

    For performance reasons, every tween in a timeline has its starting and ending values recorded internally after the first time they render.

     

    Quote
    If you allow the user to monkey with the end value of tween1 by dragging the red thing to end at an x value of 400 in the GUI then tween2 is not going to automatically update its start value to be 400 the next time the animation plays. You would have to manage that tween as well or invalidate() the timeline. See the dilemma?

     

    I think you may ultimately find the easiest route to manage is what you already tried: destroy and create the main timeline every time you need to run an animation showing a recent change. Keep in mind that tween creation is relatively cheap. You can create 1000 tweens in just a few milliseconds.

     

    Similar question:

     

  2. Problem

    I'm noticing some very strange behavior when I'm updating a timeline's children tween durations. This is problematic for instances where I need to set the duration of the tween after initialization. e.g. an audio clip needs to download before knowing what the desired duration is.

     

    Observations

    The codepen demonstrates this. I construct 10 tweens at 0.2 duration each to a timeline (2s total). When I update each of the tweens' durations to 0.4, several unexpected things are observed:

    1. Parent timeline only goes to 2.2

    2. The tweens become "choppy" with overlap.

     

    It appears that only the last tween expands the timeline, but an interval of 0.2 is still placed between each tween. How can I correct this after updating the duration?

     

    Thanks!

    See the Pen mxzVrj by allanbreyes (@allanbreyes) on CodePen

×
×
  • Create New...