From 9067feaca65cfb9d9b13bf7e25a96c120a138b66 Mon Sep 17 00:00:00 2001 From: zojgame Date: Wed, 28 Feb 2024 18:40:50 +0500 Subject: [PATCH] animation starting --- .../desktop/Appartment/ImagesModal.tsx | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/components/desktop/Appartment/ImagesModal.tsx b/src/components/desktop/Appartment/ImagesModal.tsx index 7c2932a..70b1dd7 100644 --- a/src/components/desktop/Appartment/ImagesModal.tsx +++ b/src/components/desktop/Appartment/ImagesModal.tsx @@ -11,11 +11,20 @@ const ImagesModal = () => { useEffect(() => { if (!modalRef) return; - console.log("first"); gsap.fromTo( modalRef.current, - { width: 0, height: 0 }, - { width: "100vw", height: "100vh", duration: 0.3 } + { + height: 0, + x: "3000vw", + }, + { + height: "100vh", + x: 0, + duration: 0.3, + } + // { x: "-200vw", y: "-200vh" }, + // { y: "300vh" }, + // { y: "0", duration: 0.5 } ); }, []); @@ -39,19 +48,19 @@ const ImagesModal = () => { } return ( -
+
{currentVilla && currentVilla.perspectiveWorkings.map((image) => ( -
+
{