views:

39

answers:

1

Has anyone had any luck in altering the plug-in code so that one might animate an object in "3d" space for only a 1/4 or 1/2 turn?

As it stands, an object must complete a full circle before stopping or looping.

And for those who haven't seen it yet: http://css-tricks.com/examples/Circulate/

A: 

The heart of the plugin starts on line 46 in the code:

base.$el.animate( ... )
 .animate( ... )
 .animate( ... )
 .animate( ... )

Each animate function takes care of 1/4 rotation. So if you just want to hack it, remove the last two animate calls for a 1/2 rotation, and remove three if you just want the first 1/4. Either way, you want to play with those four animate calls.

Doug Neiner