Catch footer WebGL errors, ignore
This commit is contained in:
parent
bf418b6a15
commit
a2b0eec09c
|
@ -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);
|
||||||
|
|
||||||
requestAnimationFrame(animate);
|
try {
|
||||||
renderer.render(scene, camera);
|
requestAnimationFrame(animate);
|
||||||
|
renderer.render(scene, camera);
|
||||||
|
} catch(err) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
animate();
|
try {
|
||||||
|
animate();
|
||||||
renderer.render(scene, camera);
|
renderer.render(scene, camera);
|
||||||
|
} catch(err) {
|
||||||
|
renderer.dispose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user