JavaFX : Rotated animation delay between cycles

后端 未结 2 436
南笙
南笙 2021-01-18 10:16

I\'ve created an animation for an ImageView based on a RotatedTranstion using the following code :

ImageView icon = ImageCache.getImage(\"refresh.png\");
Ro         


        
2条回答
  •  情歌与酒
    2021-01-18 10:36

    The timing for acceleration and deceleration at each Transition cycle is controlled by the Interpolator. The default Interpolator used by Transition is Interpolator.EASE_BOTH.

    You want linear interpolation so add this to your code:

    rotateTransition.setInterpolator(Interpolator.LINEAR);
    

提交回复
热议问题