From 847cda6eaf3c122cf5fca7f61fa2dc7ae726ca58 Mon Sep 17 00:00:00 2001 From: Bob Voorneveld Date: Sun, 6 Feb 2022 13:10:53 +0100 Subject: [PATCH] Save when iOS app moves to background and show menu --- js/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/main.js b/js/main.js index 5731a49..8153ddb 100644 --- a/js/main.js +++ b/js/main.js @@ -320,6 +320,11 @@ if (gl && loaded = false; }; + window.addEventListener('appMovedToBackground', () => { + save(); + menu.show(); + }); + loader.setFinishCallback(() => { requestAnimationFrame(loop);