sparkbox / bouncy-ball

:red_circle: Compare web animation techniques by bouncing a ball with each one.
https://sparkbox.github.io/bouncy-ball
MIT License
605 stars 66 forks source link

Minor GreenSock tweaks #47

Closed jackdoyle closed 7 years ago

jackdoyle commented 7 years ago

No need to create a variable to store the ball element - GSAP has a selector (document.querySelectorAll()) built in, so you could simplify it to:

TweenMax.to("ball", 0.575, {
  y: 160,
  repeat: -1,
  yoyo: true,
  ease: Power1.easeIn
});

Also, it's GreenSock, not Greensock (capital "S") :)

Thanks again for putting this whole thing together. Just watched the Fluent video of your presentation (https://www.youtube.com/watch?v=_TmhQI6X4JA) - nice job!

bryanbraun commented 7 years ago

@jackdoyle, thanks for the feedback. Great suggestions. 😄