Jump to content
GreenSock

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

Get position values during Throw (using throwProps)

Go to solution Solved by Carl,

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 can get position values during a drag (using Draggable). But can I get position values during a Throw (using throwProps)?

Link to comment
Share on other sites

  • Solution

Hi and welcome to the GreenSock forums.
 

Yup, just use onThrowUpdate like

onThrowUpdate: function() {
    //look here
    console.log(this.x, this.y)
  },

Check out this demo with console open.

 

http://codepen.io/GreenSock/pen/KJbIy

 

Let us know if you have any more questions.

  • Like 2
Link to comment
Share on other sites

Killer. Once again, you guys make me look good. It's what I've come to expect from your excellent company. I've been a heavy user since the Flash days.

 

Here's a NatGeo feature I did using GSAP with ThrowProps on a spinnable, 3D ancient Roman column.  Draggable and TweenMax too:

http://www.nationalgeographic.com/trajan-column/

Link to comment
Share on other sites

Thanks for the kind words. I think you're the one making us look good. That 3D ancient Roman column is awesome!

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.
×