Jump to content
Search Community

munky

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by munky

  1. This is great, thanks very much!
  2. Thanks very much for the suggestions. Sorry for being vague, I guess what I'm trying to ask is if there any situations where GSAP has some internal optimisation and would not tween an item. For example, if I remember correctly my old days from using Flash, if a movieclip has an alpha of 0 then it is still rendered, but if visibility is set to false then it is NOT rendered. In my project, I'm looping through each of the items and animating them like this: TweenLite.to($(this), scrollspeed/1000, {top:np + "px", force3D:true}); So, for any items not visible within the viewport, I don't really want to waste time tweening them. Would it be best to simply set the visibility to hidden, turn off pointer-events and set scrollspeed to 0 for off-screen items or is there a better way to do this?
  3. Hello, I have a sort of scrolling list that I'm working on, as you use the mousewheel the items scroll up/down the screen. Potentially, there could be 100 or more items in the list but only 10 items are visible on-screen. What is the best way to optimise the off-screen items so that the scrolling is as smooth as possible? Do I add a time of 0 to the animation, do I turn off visibility for the item or is it best to write some code to only tween if it's visible on the viewport? When not visible, the items still need to move even if I don't tween them into position. Thanks.
  4. munky

    Beginner question

    Thanks Carl, exactly what I needed. Are there any advantages/disadvantages of the 2 methods that I need to be aware of? I'm assuming that the "tick" event runs even when a tween is not in progress and the "onupdate" event only runs during a tween, is that correct?
  5. munky

    Beginner question

    Hello, I'm completely new to GSAP and I'm about to start a new project with an animated menu. In response to either clicking on a menu item or using the mousewheel, the menu will scroll up/down - I imagine a simple tween, changing the y position will achieve this. However, I want the items to move in a sort of quadratic curve (y = ax2 + bx + c) but in the x-direction so my question, is there some kind of "enterframe" event or something similar, where I can modify the X position of the menu items as they are moving, based upon their current Y position or is there a better way to do that? Sample image attached. Thanks for any advice.
×
×
  • Create New...