Jump to content


A more .."Is it possible" question

Recommended Posts

I have been working on some ipad demos lately and have been using some of the throwProps to achieve some of these effects. Something I was wondering, could you control a tween with a mouseEvent or TouchEvent, and when I say control, let's say we were rotating an object and I wanted that object to rotate with the advancement of the mouse/touch Event. I hope that makes sense, basically tween something that is in relation to the event, being either mouse or touch.


Thanks for the help

Link to comment
Share on other sites

Sure, you can tween pretty much any numeric property. But the tweening engine doesn't automatically handle setting up touch event listeners and knowing that you want it to rotate to the touches, etc. - you set up the logic and just feed the values to the tweening engine for it to tween. Make sense? You can see an example of that in the interactive example on the ThrowPropsPlugin page where there's some code in place to listen for clicks, drags, measuring the velocity, and then feeding the appropriate value to the throwProps tween.

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.