Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Klas

Members
  • Posts

    4
  • Joined

  • Last visited

Klas's Achievements

2

Reputation

  1. Klas

    Tweening timeline

    Thanks guys, really appreciate it. Did what you suggested and just tested it on a low-end Lumia phone and performance is amazing, especially considering how much stuff I'm moving around and the size of the elements involved.
  2. Klas

    Tweening timeline

    Hello again, I was using the tweenTo function of TimelineMax to scrub the playhead, but realised it's the only TimelineMax-exclusive function I'm using, so to save some load overhead I thought I could just use TimelineLite and manually tween the progress using a TweenLite instance like this: var progress = { value: master_tl.time() / master_tl.duration() }; TweenLite.to(progress, 1.5, {value: labels[slideIndex].time/master_tl.duration(), ease: Strong.ease, onUpdate: function() { master_tl.progress(progress.value); } }); From my performance tests using Chrome dev tools there's no real difference in performance, but I'm running the latest Macbook Pro so pretty much everything runs smoothly. Are there any performance optimisations going on in the TimelineMax.tweenTo function or other things I should be aware of? I tried peeking at the source code and TimelineMax.tweenTo seems to be using TweenLite under the hood but going about it in a different way which I couldn't quite figure out despite the comments .
  3. Klas

    TweenMax updateTo

    Thanks for the very thorough reply, very useful information. I ended up just killing and re-creating all the tweens whenever the window is resized and then just resuming the timeline progress.
  4. Klas

    TweenMax updateTo

    Hi, First off, thanks for a great library. I've been trying to change a tween on the fly, specifically the x value for a DOM element. For some reason the updateTo method doesn't seem to work. Maybe because x is converted to a css value it is considered a plugin-value when used on dom elements? I've created this pen to illustrate the issue: http://codepen.io/klas/pen/eduhJ If you click the {x: 10} button before you play the animation the tween updates as expected. Any subsequent calls to updateTo after the animation has been played or scrubbed does nothing. The js docs suggests using the DynamicPropsPlugin but as far as I understand it is only available for AS. Not sure it's on the roadmap for js but I can definitely see a use case for it in responsive design. Cheers Klas
×