feat(3d-nds): lag detection
This commit is contained in:
@@ -1,11 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
import { useWindowSize } from "@vueuse/core";
|
||||
import gsap from "gsap";
|
||||
import { LazyLagModal } from "#components";
|
||||
|
||||
const { isReady } = useAssets();
|
||||
|
||||
const app = useAppStore();
|
||||
|
||||
const overlay = useOverlay();
|
||||
const lagModal = overlay.create(LazyLagModal);
|
||||
|
||||
watch(
|
||||
() => app.lagDetected,
|
||||
(detected) => {
|
||||
if (detected) lagModal.open();
|
||||
},
|
||||
);
|
||||
|
||||
const topScreen = useTemplateRef("topScreen");
|
||||
const bottomScreen = useTemplateRef("bottomScreen");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user