i'm trying to design a simple animation with TweenJs.. Lets consider two people playing throwing ball. I've managed to move the ball in a linear path. But it has to seem realistic. Ball should follow a curvy path like there is gravity.. How can i define "checkpoints" in the path? Or should i change my tactic to achive that goal? Thanks in advance..
Asked
Active
Viewed 4,222 times
1 Answers
5
The recently released TweenJS (Version 0.4.0, Feb 12, 2013) contains a MotionGuidePlugin. The usage is pretty simple:
// Using a Motion Guide
createjs.Tween.get(target).to({guide:{ path:[0,0, 0,200,200,200, 200,0,0,0] }},7000);
// Visualizing the line
graphics.moveTo(0,0).curveTo(0,200,200,200).curveTo(200,0,0,0);
Here is a quick fiddle: http://jsfiddle.net/lannymcnie/qEYD4/1/
More info in the docs. http://www.createjs.com/Docs/TweenJS/classes/MotionGuidePlugin.html

Lanny
- 11,244
- 1
- 22
- 30