Jump to content
Search Community

Throw Props plugin

Michael71 test
Moderator Tag

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

Hello there,

 

I was wondering if the Throw Props plugin is something that is coming soon, I believe its one of the most useful plugins as it allows quite many applications.

 

Would really love to see something like this on Javascript for our "mobile content creating urges"...

 

Keep up the good work, the lib is amazing so far.

Link to comment
Share on other sites

Yes indeed, ThrowPropsPlugin will be making its way into the JS version soon. In fact, there's an early version ready, but it is NOT integrated with CSSPlugin yet so it would only be usable for non-DOM stuff like canvas or EaselJS, etc. If you want to kick the tires a bit, send me a PM or e-mail. But again, it's going to take some time to get it integrated with CSSPlugin elegantly. I don't have an ETA on that yet (sorry).

Link to comment
Share on other sites

  • 2 weeks later...

Basically I'm trying to create a drag and release kind of effect, something like the throw props used to do in AS3. I'm thinking it might be possible with easing but not sure it would be as smooth or tweening properly when someone is scolling/clicking and dragging.

 

Do you think something like this could be done in such a way? Or if someone has some idea I would be happy to hear it.

 

Thanks again.

Link to comment
Share on other sites

Yeah, it's VERY difficult to accomplish accurately with regular easing. You almost always get a weird shift in velocity when the tween starts because it doesn't match perfectly the drag/throw velocity. I can't tell you how many hours it took to figure out a good algorithm to empower ThrowPropsPlugin's functionality - it was a LOT. You could, of course, not do a tween and instead to a frame-by-frame loop that iteratively degrades a velocity variable but that has several problems: if frames are dropped (performance bogs down), your object's true velocity isn't maintained and it is more difficult to ensure that things end at a certain amount of time or set caps on the coordinates and have things smoothly snap back like an iPhone flick-scroll.

 

Are you trying to tween CSS properties of DOM elements or something else, like custom elements on a canvas? I have an early version of ThrowPropsPlugin for the latter, but it isn't yet integrated into CSSPlugin for tweening CSS properties. If you're a Club GreenSock member, I don't mind sharing the early version of the JS plugin as long as you don't need the CSSPlugin integration (because it's not there yet).

Link to comment
Share on other sites

  • 2 weeks later...

Well I'm trying to animate a DOM element that will also contain text, the text should be "readable" when throwing/tweening it along with its background.

 

I wouldn't mind giving the plugin version a try, I was a former Club Greensock member until 2-3 months ago, but I'll probably signup again with all these stuff happening here.

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.
×
×
  • Create New...