Search the Community
Showing results for tags 'repeat:'.
-
GSDevTools total time = infinity, not actual time while using {repeat: -1}?
meltmedia-bannerland posted a topic in GSAP
codepen.io/benheise/pen/WNmZWpO https://codepen.io/benheise/pen/WNmZWpO Current version: https://unpkg.co/gsap@3/dist/gsap.min.js = GSAP 3.12.5 Does a GSAP3 method/property exist to convert GSDevTools total time to the actual total time? In my workflow GSDevTools helps out in a big way when determining time between frames. The culprit is coming from repeat: -1 in the .fromTo()where total time is 1000 want this time to represent the actual time(screenshot provided) Removing repeat: -1 or creating repeat: # without the negative yes creates actual total time- 14 replies
-
- gsdevtools
- repeat:
-
(and 2 more)
Tagged with:
-
Hi all, I am relatively new to Greensock and thought I was going well but have hit a small challenge. I am trying animate the effect of a volume equalizer going up and down. To keep it looking as natural as possible i wanted to vary the heights that the levels rise to. However, when I run the below code it picks the last number that the function generates and then doesn't 'refresh' a new value when the loop repeats. Is there a way to call randomRange everytime the tween repeats? function randomRange(min:Number, max:Number):Number { var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min; return randomNum; } for (var i = 0; i < 1; i++) { var n:Number = randomRange(-27, -72) // Audio levels between these 2 numbers. trace(n); } TweenMax.to(Object(this).main.window1.shade, .2, {_y:n, yoyo:true, repeat:-1, delay:.2}); TweenMax.to(Object(this).main.window2.shade, .2, {_y:n, yoyo:true, repeat:-1, delay:.3}); TweenMax.to(Object(this).main.window3.shade, .2, {_y:n, yoyo:true, repeat:-1, delay:.4}); Thanks for any help that is given, Phil