tweenjs/tween.js

automatic animation loop

Open

#342 ouverte le 21 juin 2017

Voir sur GitHub
 (6 commentaires) (2 réactions) (1 assigné)TypeScript (1 458 forks)batch import
Featuregood first issuehelp wanted

Métriques du dépôt

Stars
 (9 450 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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.

Guide contributeur