The following animation test will fail. If you change the time of the first keyframe from 0ms to 1ms then it works.
import javafx.animation.*;
var done: Boolean = false;
var t = Timeline {
keyFrames: [
KeyFrame {
time: 0ms
action: function() { done = true; }
}
]
};
t.playFromStart();
var tCheck = Timeline {
keyFrames: [
KeyFrame {
time: 1s
action: function() {
if (done) {
println("PASSED");
} else {
println("FAILED: Timeline with 0ms KeyFrame not run");
}
}
}
]
};
tCheck.playFromStart();
import javafx.animation.*;
var done: Boolean = false;
var t = Timeline {
keyFrames: [
KeyFrame {
time: 0ms
action: function() { done = true; }
}
]
};
t.playFromStart();
var tCheck = Timeline {
keyFrames: [
KeyFrame {
time: 1s
action: function() {
if (done) {
println("PASSED");
} else {
println("FAILED: Timeline with 0ms KeyFrame not run");
}
}
}
]
};
tCheck.playFromStart();
- duplicates
-
JDK-8106321 0-frame action() evaluated one too few times on 0-duration Timeline
-
- Closed
-
- relates to
-
JDK-8107970 Animation drops frames but repeats keyframes
-
- Closed
-