Jump to content
GreenSock

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

.

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I read your post a few times and I must admit I'm fuzzy on exactly what you're after, so a demo would indeed help. 

 

Are you saying that the user's computer would be sending scroll events (two-finger swiping?) and you want to somehow cancel the default behavior those trigger and instead leverage them to tell the Draggable to move/translate instead, complete with momentum and snapping? That certainly doesn't sound like an easy feat to me, sorry. It's tricky because Mouse/Touch/Pointer events are pretty critical in the whole Draggable interaction, and those can't be effectively "faked" because of security issues in many browsers. They don't allow trusted events like that to be fabricated as far as I know. You could certainly build something that does all the work of moving the element while the user is swiping/dragging and have ThrowPropsPlugin track the velocity, and then you could fire off a throwProps tween easily when they release their mouse/pointer/finger, complete with snapping.

  • Like 3
Link to comment
Share on other sites

11 hours ago, SerpentEagle said:

My current plan is to just read the scroll event and use those values for translateY( ), and then finally fire a throwprops tween at the end.

 

Yeah, that sounds about right to me. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×