tweenjs/tween.js

automatic animation loop

Open

#342 aberto em 21 de jun. de 2017

Ver no GitHub
 (6 comments) (2 reactions) (1 assignee)TypeScript (1.458 forks)batch import
Featuregood first issuehelp wanted

Métricas do repositório

Stars
 (9.450 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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.

Guia do colaborador