use of javafx.animation.AnimationTimer in project FXyzLib by Birdasaur.
the class Skybox method startTimer.
private void startTimer() {
timer = new AnimationTimer() {
@Override
public void handle(long now) {
Transform ct = (camera != null) ? camera.getLocalToSceneTransform() : null;
if (ct != null) {
affine.setTx(ct.getTx());
affine.setTy(ct.getTy());
affine.setTz(ct.getTz());
}
}
};
timer.start();
}
use of javafx.animation.AnimationTimer in project bitsquare by bitsquare.
the class GUIProfiler method init.
public static void init() {
AnimationTimer fpsTimer = new AnimationTimer() {
@Override
public void handle(long l) {
long elapsed = (System.currentTimeMillis() - lastFPSTime);
if (elapsed > 50)
log.trace("Profiler: last frame used {}ms", elapsed);
lastFPSTime = System.currentTimeMillis();
}
};
fpsTimer.start();
}
Aggregations