I've created this android app that sends onTouchEvents points to a web server, and I have a page which gets the motion points JSON data via Ajax like so:
{"data":[
{"x":224.28035,"y":235.4906},
{"x":263.32916,"y":219.45718},
{"x":293.3667,"y":215.44885},.....]}
Now I want to use this data and animate a div on the screen with smooth path animation, similar to flash path animation, is there a plugin that solves this issue?
PS: http://weepy.github.com/jquery.path/ does not seem to have a custom path animation, or I may be missing something.
Thanks :)
Hopefully this is the one you're searching for: jQuery plugin crSpline
You can see its demo in here.
pathAnimator
Ultra-lightweight, high performance with a nice range of settings.
var path = "M150 0 L75 200 L225 200 Z"; // an SVG path
pathAnimator = new PathAnimator( path ), // initiate a new pathAnimator object
speed = 6, // seconds that will take going through the whole path
reverse = false, // go back or forward along the path
startOffset = 0, // between 0% to 100%
easing = function(t){ t*(2-t) }; // optional easing function
pathAnimator.start(speed, step, reverse, startOffset, finish, easing);
function step( point, angle ){
// do something every "frame" with: point.x, point.y & angle
}
function finish(){
// do something when animation is done
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With