You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
float DUR = 600;
fanim.tweenScale(photo).to(0.25F).in(DUR).easeInOut();
fanim.tweenXY(photo).to(-10, 370).in(DUR).easeInOut();
fanim.tweenRotation(photo).to(-FloatMath.PI / 8).in(DUR);
fanim.addBarrier(333); // wait for the current animations to finish and then wait another 333 ms
fanim.tweenXY(photo).to(-300, 270).in(DUR).easeOutBack();
fanim.tweenRotation(photo).to(-3 * FloatMath.PI).in(DUR);
The desired behaviour is to scale, move and rotate the photo (an ImageLayer) all three at the same time, then afterwards wait 333 ms, then again move and rotate it out of the screen.
In Java this works ok, but when I export to HTML, it doesn't wait the 333 ms between the two sets of animations
The code is extracted from the game that originated the problem.
There is a standard animation moving a circle, and if you click anywhere, it will take a snapshot of the screen and animate it.
On the java version it works properly, the snapshot goes to the corner, waits ~3 seconds, then goes away, but on the HTML backend it goes to the corner and immediatly goes away (not waiting the ~3 seconds)
I tried it both in Chromium 37 and Firefox 31, same wrong behaviour in both.
Looking and debugging into the JS generated code (attached) it seems (I'm mostly guessing) that the noActiveAnims flag (line 7878) is being wrongfully set to true when the "main" anim finishes, hence removing the secondary anim (the snapshot one) from the queue, and that's why it never finishes the waiting
The text was updated successfully, but these errors were encountered:
I have this snippet of code:
The desired behaviour is to scale, move and rotate the photo (an ImageLayer) all three at the same time, then afterwards wait 333 ms, then again move and rotate it out of the screen.
In Java this works ok, but when I export to HTML, it doesn't wait the 333 ms between the two sets of animations
I set up a minimal project in github that showcases the problem:
https://github.com/tulsidas/tripleplay-barrier-demo
The code is extracted from the game that originated the problem.
There is a standard animation moving a circle, and if you click anywhere, it will take a snapshot of the screen and animate it.
On the java version it works properly, the snapshot goes to the corner, waits ~3 seconds, then goes away, but on the HTML backend it goes to the corner and immediatly goes away (not waiting the ~3 seconds)
I tried it both in Chromium 37 and Firefox 31, same wrong behaviour in both.
Looking and debugging into the JS generated code (attached) it seems (I'm mostly guessing) that the noActiveAnims flag (line 7878) is being wrongfully set to true when the "main" anim finishes, hence removing the secondary anim (the snapshot one) from the queue, and that's why it never finishes the waiting
The text was updated successfully, but these errors were encountered: