tweenjs/tween.js

automatic animation loop

Open

#342 aperta il 21 giu 2017

Vedi su GitHub
 (6 commenti) (2 reazioni) (1 assegnatario)TypeScript (1458 fork)batch import
Featuregood first issuehelp wanted

Metriche repository

Star
 (9450 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor