feat(intro): play home intro once in the intro screen instead of having weird boolean in app store
This commit is contained in:
@@ -28,8 +28,6 @@ export const useAppStore = defineStore("app", {
|
||||
|
||||
return {
|
||||
booted: false,
|
||||
// shitty but who cares
|
||||
homeIntroPlayed: false,
|
||||
settings,
|
||||
screen: "home" as AppScreen,
|
||||
camera: null as THREE.Camera | null,
|
||||
|
||||
@@ -25,9 +25,6 @@ export const useHomeStore = defineStore("home", {
|
||||
const timeline = gsap.timeline({
|
||||
onComplete: () => {
|
||||
this.isIntro = false;
|
||||
|
||||
const app = useAppStore();
|
||||
app.homeIntroPlayed = true;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -40,7 +37,7 @@ export const useHomeStore = defineStore("home", {
|
||||
duration: 0.5,
|
||||
ease: "none",
|
||||
},
|
||||
0.5,
|
||||
0,
|
||||
)
|
||||
.fromTo(
|
||||
this.intro,
|
||||
@@ -50,7 +47,7 @@ export const useHomeStore = defineStore("home", {
|
||||
duration: 0.15,
|
||||
ease: "none",
|
||||
},
|
||||
0.85,
|
||||
0.35,
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ export const useIntroStore = defineStore("intro", {
|
||||
|
||||
outro: {
|
||||
textOpacity: 1,
|
||||
backgroundOpacity: 0,
|
||||
},
|
||||
|
||||
isIntro: true,
|
||||
@@ -59,6 +60,12 @@ export const useIntroStore = defineStore("intro", {
|
||||
duration: 0.25,
|
||||
ease: "none",
|
||||
})
|
||||
.to(this.outro, {
|
||||
backgroundOpacity: 1,
|
||||
duration: 0.5,
|
||||
delay: 0.5,
|
||||
ease: "none",
|
||||
})
|
||||
.call(() => {
|
||||
const app = useAppStore();
|
||||
app.booted = true;
|
||||
|
||||
Reference in New Issue
Block a user