Following the special path in TweenJs

I am trying to create a simple animation with TweenJs .. Let's take a look at two ball players. I managed to move the ball along a linear path. But that should seem realistic. The ball should follow the curve, as there is gravity. How can I identify “breakpoints” along the way? Or should I change my tactics to achieve this goal? Thanks in advance.

+5
source share
1 answer

The recently released TweenJS (version 0.4.0, 02/12/2013) contains MotionGuidePlugin. Usage is quite 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/

. http://www.createjs.com/Docs/TweenJS/classes/MotionGuidePlugin.html

+4

All Articles