Skip to content

Instantly share code, notes, and snippets.

@Mamboleoo
Last active February 6, 2019 10:57
Show Gist options
  • Save Mamboleoo/95539c5d1920f318392ef09b0200bce5 to your computer and use it in GitHub Desktop.
Save Mamboleoo/95539c5d1920f318392ef09b0200bce5 to your computer and use it in GitHub Desktop.
Animate dots [3D-2D]
class Dot {
constructor() {
...
TweenMax.to(this, (Math.random() * 10 + 15), {
z: width,
repeat: -1,
yoyo: true,
ease: Power2.easeOut,
yoyoEase: true,
delay: Math.random() * -25
});
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment