Skip to content
Snippets Groups Projects
Commit f0cac244 authored by Marshall Quander's avatar Marshall Quander
Browse files

renderer.animate -> renderer.setAnimationLoop

This was renamed in three.js r93.
parent 64b6ac2f
No related branches found
No related tags found
No related merge requests found
...@@ -222,7 +222,7 @@ const onReady = async () => { ...@@ -222,7 +222,7 @@ const onReady = async () => {
const scene = document.querySelector("a-scene"); const scene = document.querySelector("a-scene");
if (scene) { if (scene) {
if (scene.renderer) { if (scene.renderer) {
scene.renderer.animate(null); // Stop animation loop, TODO A-Frame should do this scene.renderer.setAnimationLoop(null); // Stop animation loop, TODO A-Frame should do this
} }
document.body.removeChild(scene); document.body.removeChild(scene);
} }
...@@ -403,11 +403,11 @@ const onReady = async () => { ...@@ -403,11 +403,11 @@ const onReady = async () => {
if (!isBotMode) { if (!isBotMode) {
// Stop rendering while the UI is up. We restart the render loop in enterScene. // Stop rendering while the UI is up. We restart the render loop in enterScene.
// Wait a tick plus some margin so that the environments actually render. // Wait a tick plus some margin so that the environments actually render.
setTimeout(() => scene.renderer.animate(null), 100); setTimeout(() => scene.renderer.setAnimationLoop(null), 100);
} else { } else {
const noop = () => {}; const noop = () => {};
// Replace renderer with a noop renderer to reduce bot resource usage. // Replace renderer with a noop renderer to reduce bot resource usage.
scene.renderer = { animate: noop, render: noop }; scene.renderer = { setAnimationLoop: noop, render: noop };
document.body.style.display = "none"; document.body.style.display = "none";
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment