Jump to content
GreenSock

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

shortRotation not working for <canvas> element

Recommended Posts

Hi everyone, I'm new here so thanks in advance for any communal help I receive.  :-P

 

I have a canvas element I'm rotating onMouseMove. Here's the example:

 

http://mikewatt.info/dev/html5_tests/wheel/wheel.html

 

My problem is that 'shortRotation' is not working. Right now I'm using simply 'rotation' because it's working and illustrates the problem area I'm having. If you click the mouse down and drag over the horizontal middle of the circle on the right hemisphere, you'll see the wheel jump 360 degrees to come back to where your mouse is. That's where I need 'shortRotation' but it's not working.

 

Anybody know why?

 

Thanks in advance,

 

mikebikeboy

Link to post
Share on other sites

The problem was that there was no ShortRotationPlugin available - the shortRotation functionality that was in GSAP was only inside CSSPlugin (thus only worked for DOM elements). You were tweening a generic object that's not a DOM element, so it wasn't kicking in. However, I've attached a new ShortRotationPlugin that you can load and then it should work just fine. Let us know if it works okay for you. 

ShortRotationPlugin.js.zip

Link to post
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.

×