I'm trying to use Ijeomamotion to change position and opacity in parallel. This used to work for me with Processing 1.5, and a much older version of Ijeomamotion, but I recently upgraded...
The new Ijeomamotion API is quite nice, but I can't get this one thing to work. I tried various different things (one Tween, two Tweens in a Parallel, private class, etc) but it seems like the tweens never line up. The position tween always finishes a lot faster than the opacity, as you can see in the example below.
I'm starting to think this is some kind of bug in the library. PVectorProperty updates itself with vector
.lerp(end
, position
), which seems like it would apply the "position" scalar to a shorter vector every time it updates, creating a sort of feedback loop. But I could be missing something.
Anyway, I was wondering if anyone else has run into this, or found a workaround.
Thanks!
import ijeoma.motion.*;
import ijeoma.motion.tween.*;
Tween t;
PFont f;
Box b;
public void setup() {
size(400, 400);
rectMode(CENTER);
f = createFont("Arial", 12);
Motion.setup(this);
b = new Box();
t = new Tween(1000).addPVector(b.pos, new PVector(width, height)).addProperty(new NumberProperty(b, "opacity", 0)).play();