feat(nds): don't display help button and hints on smaller screens (they can't click on the buttons anyway)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useWindowSize } from "@vueuse/core";
|
||||
import gsap from "gsap";
|
||||
|
||||
const { isReady } = useAssets();
|
||||
@@ -25,6 +26,16 @@ const toggleFullscreen = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const windowSize = useWindowSize();
|
||||
|
||||
watch([windowSize.width, windowSize.height], ([width, height]) => {
|
||||
if (width / height > 614 / 667) {
|
||||
app.allowHints();
|
||||
} else {
|
||||
app.disallowHints();
|
||||
}
|
||||
});
|
||||
|
||||
const helpButton = useTemplateRef("helpButton");
|
||||
let helpAnimation: gsap.core.Timeline | null = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user