tweenjs/tween.js

automatic animation loop

Open

#342 opened on Jun 21, 2017

View on GitHub
 (6 comments) (2 reactions) (1 assignee)TypeScript (9,450 stars) (1,458 forks)batch import
Featuregood first issuehelp wanted

Description

I suggest that we add a 'TWEEN.animate' convenience method. It would set up a simple requestAnimationFrame animation loop.

function animate(time) {
	requestAnimationFrame(animate);
	TWEEN.update(time);
}
requestAnimationFrame(animate);

In the documentation, we just need to tell users to use this method once before starting any tweens.

We might need a shim for Node.js.

Contributor guide