Skip to content

Instantly share code, notes, and snippets.

@CongAn
Created April 27, 2022 09:58
Show Gist options
  • Save CongAn/91b23b53ace23e83d4f4487ab2e2d6ed to your computer and use it in GitHub Desktop.
Save CongAn/91b23b53ace23e83d4f4487ab2e2d6ed to your computer and use it in GitHub Desktop.
function animate () {
if (TWEEN.update()) {
requestAnimationFrame(animate)
}
}
new TWEEN.Tween(this.tweenedColor)
.to(this.color, 750)
.start()
animate()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment