prendy
Version:
Make games with prerendered backdrops using babylonjs and repond
12 lines (11 loc) • 407 B
JavaScript
import { getRefs } from "repond";
export function updateAppVisibility(event) {
if (document.visibilityState === "visible") {
getRefs().global.main.gameIsInBackground = false;
// handlePausingVideoWhenHidden(false);
}
else if (document.visibilityState === "hidden") {
getRefs().global.main.gameIsInBackground = true;
// handlePausingVideoWhenHidden(true);
}
}