Jump to content

erikb last won the day on January 10 2016

erikb had the most liked content!


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by erikb

  1. How do I determine if a tweenlite instance is active? If it hasn't started, I know the tween is paused. When it has completed is it also paused?
  2. How do I 'fast forward' a tweenlite instance to the end, ensuring that all of its 'onComplete' events fire right away (not on the next RAF)? Much thanks for suggestions.
  3. This project fell by the wayside. Sorry.
  4. I am thinking to do this by tweening a proxy vanilla javascript object, and onUpdate to tween the values of the jQuery object. Any ideas if this is a better approach than stopping and restarting tweens on 'new' jQuery objects?
  5. If I am tweening css attributes on the elements of a jQuery selector over ten seconds, and in that time, remove and add elements to that selector, will tweenLite know to update the values on the newly added elements and cease to update on the removed elements? Am about to tool up a test, but thought to ask here too. Thanks!
  6. erikb

    animating steps

    Bassta -- not to worry, that is the solution I've already implemented. I was hoping there was something like the SteppedEase where you could pass another ease in as a parameter.
  7. erikb

    animating steps

    Thanks Bassta This is what I was looking for, but seems to be missing a feature -- it is only linear. How would I use one of the other eases?
  8. erikb

    animating steps

    How would I use greensock js to animate an effect like the one described herein: http://stackoverflow.com/questions/1736922/how-to-show-animated-image-from-png-image-using-javascript-like-gmail My best guess is to tween the value between 0 to 1 of a vanilla javascript object, and onUpdate to do the math to change the css background position to the closest "step". This way I could use any of the easing functions too. But I am wondering if there is a better way?
  9. erikb

    processing js

    Of interest: https://groups.google.com/forum/#!msg/processingjs/xpZHzCc2iAI/HTjJ9UfvMvMJ
  10. Sorry for not finding that earlier post before my inquiry. Question: are the tick events before or after tweens are updated?
  11. In this simple example <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en"> <head> <script src="TweenLite.min.js"></script> </head> <body> sup? </body> </html> the chrome debugger timeline shows that RequestAnimationFrames are firing all the time, and, as you can see, there is nothing much going on. I would like to only enable the RaF calls when an animation is actually running. How would I do that? It is okay for me to do this manually. Thank you. And, somewhat related, for not-tween-related work in my site, I am using my own RaF shim. I am wondering if there is a nice way to plug into the RaF shim in the tweening engine (so as to reduce code redundancy)?
  12. Making some progress on them, hope to share soon.
  13. Are there google closure compiler externs available?
  14. Yes, that looks like it would work. Very helpful to see the implementation. Thank you!
  15. NandiTo: Attached is an example of using a proxy object animate the scroll position (using jQuery). :Erik proxy.html
  16. Yes, if I bundled all of my tweens together, then they would all be killed. Good point. However, if I don't design my tweens this way, and only used one tween to move my scrollbar, then I am left with a running tween in the background. For situations like this, I think I will use the aforementioned proxy object. Thank you, this has been an informative exchange.
  17. Good idea putting the logic into the setRatio function. However, this does not kill the tween, right? ( myTween._active returns true until the full duration of the tween is completed ). Would it be good practice to kill the tween if skipX or skipY is true in the setRatio function?
  18. I have, for now, opted to update a proxy javascript object, check its tweened value against the scrollable div's current value, and decide to either apply the new tweened value via css or to cancel the animation.
  19. Got it, thanks. A related question about my aforementioned example: If the window scrollbar is tweening and the user grabs the scrollbar, I want to stop the tween. I was planning to accomplish this by noting the scrollTop position of the scrollable div before the animation, and during the animation update this value in the onUpdate callback. Also in the onUpdate callback, I was planning on checking if scrollTop was a different value than it was last step of the tween, indicating something else had moved the scrollbar. However, since onUpdate is called after the new value is set, I am not sure where to make this check to stop the tween. Is there a way to get a callback before the new value is updated, or to get the previous value in onUpdate? Or maybe there is a different way to solve this problem. Thank you.
  20. What is the recommended way to interrupt the ScrollToPlugin? http://api.greensock.com/js/com/greensock/plugins/ScrollToPlugin.html Example: If the window scrollbar is tweening and the user grabs the scrollbar, I want to stop the tween. It seems it should be as easy as stopping the tween, but I see in the source there is an underscore / private method in there called _kill ... should I call that directly? Thanks
  21. I am wondering if you can provide an architectural overview of your animation engine's inner workings. The performance is outstanding, and the code is easy to read, but could you provide an overview of what the library is doing to achieve such gains? A comparison with jQuery's animate function would be super. (but as that is not your project, someone on that team might better field that request).
  22. erikb

    processing js

    is the best practice for incorporating this library with processing js to check tween values in the processing-js draw function?