We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › New animation library w/ timeline/keyframes tweens
Pages: 1 2 3 
New animation library w/ timeline/keyframes tweens (Read 22028 times)
New animation library w/ timeline/keyframes tweens
Dec 27th, 2009, 10:59am
 
Tween is a library for tweening objects and paramters (such as x,y,z,width,height,scaleX,scaleY,color...) as single, grouped or sequenced tweens. It supports easing (from Robert Penner), time/frame based tweens, events (start, end, delayEnd, delayStart, groupStart...), and the grouping and sequencing of both Tweens and TweenGroups together.

I'm still making some changes here and there so please share whatever thoughts you may have via here or my email.

You can see the library page at http://ekeneijeoma.com/processing/tween/ and http://code.google.com/p/ekeneijeoma/
Re: New animation library: Tween
Reply #1 - Dec 30th, 2009, 2:49pm
 
In the last week I've made about 5 revisions which have alot of changes to the library itself including:

  • Added more constructors for making Tweens, TweenGroups and TweenSequences
  • Added "convenience" methods for adding and getting "items" ( which can be either Tweens or TweenGroups) from both TweenGroup and TweenSequence.
  • Added "convenience" methods for making nesting TweenGroups within TweenGroups easier.
  • Added more Javadocs.


I also made changes to the examples and added more documentation on the library page.

In the next few revision I'll be extending Tween into a VectorTween and ObjectTween (Note: You can tween objects with with the current Tween class) class and also making a Basic Timeline class (not like the Timeline tool) for making event based animations and method calls.

To download go to http://www.ekeneijeoma.com/processing/tween/ and to see the changes browse the source at http://code.google.com/p/ekeneijeoma/source/browse/.

Please let me know if you have any thoughts and if you use the library for anything please send me a link so I can add it to the examples. Thanks!
Re: New animation library: Tween
Reply #2 - Jan 1st, 2010, 12:25pm
 
Very Cool! You may want to explain what tweening is... some may be unfamiliar with the term.  I recalled it from my Flash days..

Look forward to using this library! Thanks Smiley
Re: New animation library: Tween
Reply #3 - Jan 8th, 2010, 9:57pm
 
By the way, check this out: http://processing.org/discourse/yabb2/num_1263016446.html
and thanks for the lib Smiley good work
Re: New animation library: Tween
Reply #4 - Jan 11th, 2010, 2:12pm
 
I get an error when I run some of the examples.  TweenGroup for example says: "The field Tween.position is not visible"

Mac OSX 10.6.2
Processing 1.09
Re: New animation library: Tween
Reply #5 - Jan 11th, 2010, 8:41pm
 
Sorry position changed to getPosition() but I didnt change the examples. I uploaded the new changes and also added two 3d path tweening  examples from bloom!
Re: New animation library: Tween
Reply #6 - Jan 28th, 2010, 7:57am
 
In the last few days I've been using the Tween lib, and everything is fine so far. Now i came across the problem that I can't figure out how to turn off that easingMode. I just want a plain tween, without any easing. Can anyone help me please.
Re: New animation library: Tween
Reply #7 - Jan 28th, 2010, 9:03am
 
ive been meaning to add a noEasing method but i havent had time lately... maybe i can do it this weekend.
Re: New animation library: Tween
Reply #8 - Feb 8th, 2010, 11:14pm
 
i added path tweening... which is going to be in the next release once i get the timeline and some other features working...

http://processing.org/discourse/yabb2/?num=1265049539
Re: New animation library: Tween
Reply #9 - Mar 6th, 2010, 1:09pm
 
Tween has been renamed Motionlib and has been refactor to do more advance animations using timeline with keyframes, and 2d and 3d paths!

Quote:
Motionlib is a library for doing time/frame based animations using tweens. Tweens can be put into timelines (using keyframes), groups and sequences. Tweens can be used to animate   objects and paramters (x , y, z, width, height, scale, color and etc). Motionlib has start, end, pause, resume events for all its motion objects (Tween/TweenGroup/TweenSequence/Timeline). So you can use them as you would keyPressed or mousePressed in Processing. Or you can use their event listeners for more advanced use.


It can be used the same as http://www.greensock.com/tweenmax/ and http://code.google.com/p/tweener/ for Flash.  You can download the library here http://ekeneijeoma.com/processing/motionlib/ Let me know what your thoughts are! Thanks!
Re: New animation library w/ timeline/keyframes tweens
Reply #10 - Mar 11th, 2010, 1:29pm
 
I don't think this was included in your examples, but I think that this might help some people.

http://jonobr1.com/code/Tween_inClass/

Is an example to use the Tween object within a class.
Re: New animation library w/ timeline/keyframes tweens
Reply #11 - Mar 11th, 2010, 3:15pm
 
hey jon thanks for posting that example. i didnt make an example of using tween within a class because its the same as using it outside of a class. but what i did do was make an example which shows how to tween an object (an instance of a class) and some parameters (variables in a class) of that object. you can see it at http://ekeneijeoma.com/processing/motionlib/examples/Tween_TweenObject/applet/in....
Re: New animation library w/ timeline/keyframes tweens
Reply #12 - Mar 17th, 2010, 2:55pm
 
Hi,

I got a little problem with the EventSystem in this Library. If I use this inside Processing, the Events get fired. But if I use this inside Eclipse with a Class which extends PApplet the Events didn't get fired. Am I missing something here?
Re: New animation library w/ timeline/keyframes tweens
Reply #13 - Mar 17th, 2010, 4:59pm
 
did you make the event methods public? as in
public void tweenStarted() and etc? they must be made public same as mousePressed, keyPressed and etc.
Re: New animation library w/ timeline/keyframes tweens
Reply #14 - Mar 18th, 2010, 4:22am
 
yes, I did that.

my class looks like that:
Code:

public class RadialDiagramTest extends PApplet {
public static RadialDiagramTest run;
private RadialDiagram klasse;
private RadialDiagram klasse2;
private HashMap<String, Float> testMap = new HashMap<String, Float>();
private Vector<ILoop> loopElements = new Vector<ILoop>();
public void setup(){
run = this;
createTestMap();

klasse = new RadialDiagram(this);
klasse2 = new RadialDiagram(this);
klasse.setData(testMap);
klasse2.setData(testMap);
klasse.setValueByCountry("AAA", 0.1f);
}
public void draw(){
 background(54,58,66);
 klasse.loop();
 loopElements();
 image(klasse.getDrawable(),mouseX-klasse.getCenter()[0],mouseY-klasse.getCenter()[1]);
 image(klasse2.getDrawable(),100,100);
 
}
private void loopElements(){
for(int i = 0; i<loopElements.size(); i++){
loopElements.get(i).loop();
}
}
// loops anmelden ueber interface ILoop
public void addLoopElement(ILoop theElement){
   loopElements.add(theElement);
}

// loops entfernen ueber interface ILoop
public void removeLoopElement(ILoop theElement){
   loopElements.remove(theElement);
}
public void tweenEndedEvent(Tween _t) {
 System.out.println(_t+" ended");
}
public void tweenStartedEvent(Tween _t) {
System.out.println(_t+" started");
}


The Tween happens inside the RadialDiagram class:
Code:
tweenElements.add(new BalkenTween(new Tween(app, "tween_"+country, balkenMap.get(country).getSize(), Value, tweenDuration,Tween.SECONDS, 0f,Tween.LINEAR_EASE_IN),balkenMap.get(country))); 


Pages: 1 2 3