Jump to content
Search Community

gavanw

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

2,339 profile views

gavanw's Achievements

0

Reputation

  1. I seem to be having an issue adding a class with className when I already have 3 classes on an element. This is the line I'm using: TweenLite.to(this.element, 0.1, {className:'+=maximized'}); Thoughts?
  2. Your example is pretty close to what I was asking. There are some specific complexities in my project which makes incrementing by 180 easier than doing your click tracking method, but it is a valid solution. In essence, 'forcing the tween to completion', is indeed what I am trying to do. I was just seeing if there was an automated way of doing that when the tween was to be overwritten, rather than keeping track of the affected tweens and doing it manually.
  3. Hi, I'm trying to figure out how to make a tween autocomplete when it is overwritten. I have something rotating by '+=180', so if it is interrupted, it ends up at an odd angle. Is there an easy way to do this in GSAP JS? Thanks, Gavan
  4. Hi, I've been working on building a loading 'spinner', had the basic animation working, but I've ran into an issue once I tried to add my tweens to a timeline. The code that works is: TweenMax.staggerFromTo(bars, duration, { opacity: 0.6, repeat: -1 }, { opacity: 0.2, repeat: -1 }, duration / numberOfBars); However, when I add a timeline: var tl = new TimelineMax({align:'sequence'}); tl.fromTo($spinner, 0.5, { opacity: 0 }, { opacity: 1 }); tl.addLabel('loop') tl.staggerFromTo(bars, duration, { opacity: 0.6, repeat: -1 }, { opacity: 0.2, repeat: -1 }, duration / numberOfBars); tl.play(0); the staggerFromTo does not seem to repeat and plays only once. (I was not sure whether the 'from' or the 'to' needed the repeat paramater, but seems like it needs to be in the 'to'.) Am I doing something wrong there? Thanks, Gavan
×
×
  • Create New...