【发布时间】:2013-05-20 07:33:22
【问题描述】:
谁能告诉我,它是如何工作的 例如
function animate(t) {
sun.rotation.y = t/1000;
renderer.clear();
camera.lookAt(sun.position);
renderer.render(scene, camera);
window.requestAnimationFrame(animate, renderer.domElement);
};
animate(new Date().getTime());
如您所见,animate() 函数具有参数“t”。我们用它来调用这个函数。但是在 animate() func requestAnimationFrame 内部调用它没有“t”并且程序运行完美..我很困惑
【问题讨论】:
标签: javascript animation three.js