fix(gallery): sometimes, in 2d mode, scale wasn't animated in the transition
This commit is contained in:
@@ -4,6 +4,7 @@ const store = useGalleryStore();
|
||||
const { assets } = useAssets();
|
||||
|
||||
onMounted(() => {
|
||||
store.cleanup();
|
||||
if (store.shouldAnimateOutro) {
|
||||
store.shouldAnimateOutro = false;
|
||||
store.animateOutro();
|
||||
|
||||
@@ -40,6 +40,12 @@ export const useGalleryStore = defineStore("gallery", {
|
||||
}),
|
||||
|
||||
actions: {
|
||||
cleanup() {
|
||||
gsap.killTweensOf(this.zoom);
|
||||
gsap.killTweensOf(this.intro);
|
||||
gsap.killTweensOf(this.outro);
|
||||
},
|
||||
|
||||
animateIntro() {
|
||||
this.isIntro = true;
|
||||
this.isOutro = false;
|
||||
|
||||
Reference in New Issue
Block a user