Tweaked random parameters a bit
This commit is contained in:
parent
b847608c6b
commit
0c6b2f6f3b
@ -360,7 +360,7 @@ public final class ChatScene implements Restorable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rotates every element in our application by 360° in at most 2.75s.
|
* Rotates every element in our application by 360° in at most 2.75s.
|
||||||
*
|
*
|
||||||
* @since Envoy Client v0.1-beta
|
* @since Envoy Client v0.1-beta
|
||||||
*/
|
*/
|
||||||
@FXML
|
@FXML
|
||||||
@ -370,9 +370,9 @@ public final class ChatScene implements Restorable {
|
|||||||
postButton, remainingChars, rotateButton, scene, settingsButton, userList, voiceButton };
|
postButton, remainingChars, rotateButton, scene, settingsButton, userList, voiceButton };
|
||||||
final var random = new Random();
|
final var random = new Random();
|
||||||
for (final var node : rotatableNodes) {
|
for (final var node : rotatableNodes) {
|
||||||
// Defines one whole rotation in at most 2.75s
|
// Defines at most four whole rotation in at most 4s
|
||||||
final var rotateTransition = new RotateTransition(Duration.seconds(random.nextDouble() * 2.25 + 0.5), node);
|
final var rotateTransition = new RotateTransition(Duration.seconds(random.nextDouble() * 3 + 1), node);
|
||||||
rotateTransition.setByAngle(360);
|
rotateTransition.setByAngle((random.nextInt(3) + 1) * 360);
|
||||||
rotateTransition.play();
|
rotateTransition.play();
|
||||||
// This is needed as for some strange reason objects could stop before being
|
// This is needed as for some strange reason objects could stop before being
|
||||||
// rotated back to 0°
|
// rotated back to 0°
|
||||||
|
Reference in New Issue
Block a user