Rotating balls JavaFX in ease style
Here is again a small code of JavaFX. Rotating some colorful circle in ease style. It mean, it will stop in flash way, I mean slow at the end and the begining.
Check out the code:
package newfx;
import javafx.application.Frame;
import javafx.application.Stage;
import javafx.scene.geometry.Circle;
import javafx.scene.paint.Color;
import javafx.animation.Timeline;
import javafx.animation.KeyFrame;
import javafx.application.*;
import javafx.scene.*;
import javafx.scene.geometry.*;
import javafx.animation.*;
import javafx.scene.transform.*;
var angle = 0.0;
var anim = Timeline { keyFrames: [
KeyFrame { time: 5s values: angle => 360 tween Interpolator.EASEBOTH },
]
autoReverse: true
repeatCount: Timeline.INDEFINITE
};
anim.start();
Frame {
title: “MyApplication”
width: 900
height: 900
closeAction: function() { java.lang.System.exit( 0 );
}
visible: true
stage: Stage {
fill: Color.BLACK;
content: Group {
translateX: 400 translateY: 400
content: for(i in [0..5]) {
Circle {
centerX: bind(i*60), centerY: 50
radius: 40
fill: Color.rgb(255 - i*40,i*40,0)
strokeWidth:2
stroke:Color.BLACK
transform:bind[
Transform.rotate(angle,50,50),
]
}
}
}
}
}
Here is one snap shot:












Java,JavaScript,Threading,
Optimization and more with Vaibhav 


