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);
bolts = bolts.filter((s) => !s.kill);
requestAnimationFrame(animate);
renderer.render(scene, camera);
try {
requestAnimationFrame(animate);
renderer.render(scene, camera);
} catch(err) {
return;
}
};
animate();
renderer.render(scene, camera);
try {
animate();
renderer.render(scene, camera);
} catch(err) {
renderer.dispose();
return;
}
};