Animation RotateTransition旋转动画

  • 创建旋转动画RotateTransition rt = new RotateTransition();

  • 设置动画持续时间rt.setDuration(Duration.seconds(3));

  • 设置动画的节点rt.setNode(rectangle);

  • 设置起始角度rt.setFromAngle(0);

  • 设置终止角度rt.setToAngle(360);

  • 设置偏移角度rt.setByAngle(360);

  • 设置旋转轴rt.setAxis(new Point3D(0,0,1));

  • 设置插值器,默认是匀速rt.setInterpolator(Interpolator.LINEAR);

不能设置旋转点,默认以中心点作为旋转点