I have good news: I just posted the first crack at the BezierPlugin which is also integrated with CSSPlugin, so you should be able to not only do regular Bezier tweening on any generic objects, but also css-related properties as well. Download the latest JavaScript zip and you'll see the plugin (it's also integrated into the TweenMax file, so you don't need to load it separately if you're using TweenMax).
Read the docs at:
http://api.greensock...zierPlugin.htmlIf you've used the BezierPlugin in the Flash version, you should notice that this new one is far more capable in many ways:
- The algorithm it uses for drawing Beziers through points is much better (more natural) and more flexible (you even can define a "curviness" value)
- It has a timeResolution parameter that virtually eliminates the problem that plagues most Bezier animation tools - uneven movement on the Bezier based on the control points and lengths. For example, in the old system if you constructed a Bezier that had multiple segments that were vastly different in length, the object would move much faster on one segment than the other. And on an individual curve, the pace could change too. Not anymore.
- You can define straight-up Cubic Bezier data or Quadratic Bezier data. You can even use the BezierPlugin's bezierThrough() method to parse your point data and have it spit back to you the Bezier data that it drew through those points. You can get it back in either cubic or quadratic format so that you could, for example, use the canvas drawing API to draw the path. Very flexible.
- The autoRotate (previously called "orientToBezier") functionality has been improved so that it is even more precise and more quickly calculated. Yes, you can animate regular dom elements along a Bezier path and have its rotation follow the path's. Even seems to work in older versions of IE!
I'd love to have you guys hammer away at this and let me know what you think. If you have suggestions for improvements to the API, I'm all ears. I'd also love it if you could post some samples of what you're doing with it.
Thanks for your patience. This plugin took an insane number of hours to construct, but I'm pretty happy with how it is turning out.
Happy tweening!