Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
NicolasRaymond

Move img to a specific point

Recommended Posts

Hi ! 

 

I'm very new at using GSAP and I not succeed to make what I need. 

 

I have a list of img ( 3 ) centered in the web page, when I click on one of them, I want to scale and move so I have done that

 

this.gsapTest = gsap.to('idOfImg',{
            x:-300,
            y:40,
            scale:1.5,
            duration:0.6,
            ease:"power2.inOut"
          })

 

I would like to "force" the position a the end of the animation to a specific position in the web page for every img. not according to its starting point

 

is it possible to define a "drop zone" for my img ? 

i don't know if I'm clear enough 

 

Thanks !

 

PS : sorry if my English is not perfect it's not my language.

 

Capture d’écran 2020-01-03 à 20.58.42.png

Capture d’écran 2020-01-03 à 20.58.46.png

Share this post


Link to post
Share on other sites

Hey @NicolasRaymond,

 

Welcome to the GreenSock Forum.

 

Maybe this is an option for your intention:

 

See the Pen povdBdY by mikeK (@mikeK) on CodePen

 

Happy tweening ...

Mikel

 

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×