Created
April 27, 2022 09:58
-
-
Save CongAn/91b23b53ace23e83d4f4487ab2e2d6ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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