tweenjs/tween.js

automatic animation loop

Open

#342 geöffnet am 21. Juni 2017

Auf GitHub ansehen
 (6 Kommentare) (2 Reaktionen) (1 zugewiesene Person)TypeScript (1.458 Forks)batch import
Featuregood first issuehelp wanted

Repository-Metriken

Stars
 (9.450 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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