GoogleCodeArchive / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
0 stars 0 forks source link

Improve interpolating activities with other easing functions #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
PInterpolatingActivity has only one easing mode, setSlowInSlowOut.  Several
other easing interpolation functions exist, such as those made familiar by
Robert Penner:

http://www.robertpenner.com/easing

E.g.

linear
ease-in-quadratic
ease-out-quadratic
ease-in-out-quadratic
ease-in-cubic
ease-out-cubic
ease-in-out-cubic
ease-in-quartic
ease-out-quartic
ease-in-out-quartic
ease-in-quintic
ease-out-quintic
ease-in-out-quintic
ease-in-sine
ease-out-sine
ease-in-out-sine
ease-in-exponential
ease-out-exponential
ease-in-out-exponential
ease-in-circular
ease-out-circular
ease-in-out-circular
ease-in-elastic
ease-out-elastic
ease-in-out-elastic
ease-in-back
ease-out-back
ease-in-out-back
ease-in-bounce
ease-out-bounce
ease-in-out-bounce

It should be possible to plug any of these easing interpolation functions
into PInterpolatingActivity, a subclass of PInterpolatingActivity, or a new
interpolating subclass of PActivity.

Original issue reported on code.google.com by heue...@gmail.com on 26 Jul 2009 at 7:21

GoogleCodeExporter commented 9 years ago
YES! I'd 
- add an Interface PInterpolation with the interpolating function
- inject it right into PInterpolatingActivity
- factor the current (linear) interpolation into an implementation of the 
interface
and make it the default
- add several other interpolations to extras

If we want to change the namespaces from edu.umd.cs... to org.piccolo2d (we do, 
don't
we?) we should think about the future package structure and already add the new
classes there.

Latest for 2.0, but maybe already in 1.3?

P.S.:
http://jcurl.berlios.de/m2/site/jc-core/0.7-SNAPSHOT/apidocs/org/jcurl/math/Inte
rpolator.html

Original comment by mr0...@mro.name on 26 Jul 2009 at 12:49

GoogleCodeExporter commented 9 years ago
BTW: there's a nice demo here: https://scenegraph-demos.dev.java.net/demos.html

Original comment by mr0...@mro.name on 26 Jul 2009 at 1:09

GoogleCodeExporter commented 9 years ago
I am glad there is interest.

My implementation, currently licensed as LGPL version 3 or later, is at

http://dishevelled.svn.sourceforge.net/viewvc/dishevelled/trunk/piccolo-ease/

with dependencies

http://dishevelled.svn.sourceforge.net/viewvc/dishevelled/trunk/interpolate/
http://dishevelled.svn.sourceforge.net/viewvc/dishevelled/trunk/functor/

and example

http://dishevelled.svn.sourceforge.net/viewvc/dishevelled/trunk/piccolo-ease-exa
mples/

See attached runnable jar.

Original comment by heue...@gmail.com on 26 Jul 2009 at 3:33

Attachments:

GoogleCodeExporter commented 9 years ago
At this point I'm happy with the code as-is in my own repository.  I move to 
mark
this issue as WontFix.

Original comment by heue...@gmail.com on 9 Apr 2010 at 9:27

GoogleCodeExporter commented 9 years ago

Original comment by heue...@gmail.com on 19 Jul 2010 at 10:02