All setInterval
This commit is contained in:
4
js/prototype/replay.js
vendored
4
js/prototype/replay.js
vendored
@@ -77,6 +77,8 @@ function init() {
|
||||
|
||||
// Add listeners
|
||||
initListeners();
|
||||
|
||||
setInterval(animate, 20);
|
||||
}
|
||||
|
||||
function initListeners() {
|
||||
@@ -203,7 +205,7 @@ function render() {
|
||||
|
||||
function animate() {
|
||||
// Render each frame
|
||||
requestAnimationFrame(animate);
|
||||
// requestAnimationFrame(animate);
|
||||
|
||||
// stats count the number of frames per second
|
||||
stats.begin();
|
||||
|
||||
4
js/prototype/tutorial.js
vendored
4
js/prototype/tutorial.js
vendored
@@ -97,6 +97,8 @@ function init() {
|
||||
initListeners();
|
||||
|
||||
tutorial.nextStep();
|
||||
|
||||
setInterval(animate, 20);
|
||||
}
|
||||
|
||||
function initListeners() {
|
||||
@@ -174,7 +176,7 @@ function render() {
|
||||
|
||||
function animate() {
|
||||
// Render each frame
|
||||
requestAnimationFrame(animate);
|
||||
// requestAnimationFrame(animate);
|
||||
|
||||
// stats count the number of frames per second
|
||||
stats.begin();
|
||||
|
||||
Reference in New Issue
Block a user