refactor: relocate constants in screen stores

This commit is contained in:
2026-01-31 00:52:56 +01:00
parent 742e6363a4
commit 630b399088
13 changed files with 74 additions and 90 deletions

View File

@@ -2,6 +2,7 @@
import Background from "./Background.vue";
import Buttons from "./Buttons.vue";
import ButtonSelector from "~/components/Common/ButtonSelector.vue";
import { promiseTimeout } from "@vueuse/core";
const store = useContactStore();
const achievements = useAchievementsStore();
@@ -71,10 +72,10 @@ const actionateButton = async (button: (typeof selected)["value"]) => {
text: $t("contact.openUrl", { url }),
onConfirm: async () => {
store.pushNotification($t("contact.opened", { item: verb }));
await sleep(100);
await promiseTimeout(100);
await navigateTo(content, { open: { target: "_blank " } });
await sleep(500);
await promiseTimeout(500);
if (button === "github") {
achievements.unlock("contact_git_visit");

View File

@@ -2,7 +2,6 @@
import { useLoop, useTresContext } from "@tresjs/core";
import * as THREE from "three";
import gsap from "gsap";
import { LOGICAL_WIDTH, LOGICAL_HEIGHT } from "~/utils/screen";
const INTRO_ANIMATION = {
MODEL_SPIN_DURATION: 3,

View File

@@ -1,6 +1,4 @@
<script lang="ts" setup>
import { LOGICAL_WIDTH, LOGICAL_HEIGHT, SCREEN_SCALE } from "~/utils/screen";
const canvas = useTemplateRef("canvas");
const renderCallbacks = new Map<RenderCallback, number>();