Catch footer WebGL errors, ignore

This commit is contained in:
Tanner Collin 2022-09-08 23:20:10 +00:00
parent bf418b6a15
commit a2b0eec09c

View File

@ -116,11 +116,19 @@ export const scene = ({ ref }) => {
ships = ships.filter((s) => !s.kill); ships = ships.filter((s) => !s.kill);
bolts = bolts.filter((s) => !s.kill); bolts = bolts.filter((s) => !s.kill);
try {
requestAnimationFrame(animate); requestAnimationFrame(animate);
renderer.render(scene, camera); renderer.render(scene, camera);
} catch(err) {
return;
}
}; };
try {
animate(); animate();
renderer.render(scene, camera); renderer.render(scene, camera);
} catch(err) {
renderer.dispose();
return;
}
}; };