super(
node,
TimelineBuilder.create()
.keyFrames(
new KeyFrame(Duration.millis(0),
new KeyValue(node.translateXProperty(), 0, WEB_EASE),
new KeyValue(node.rotateProperty(), 0, WEB_EASE)
),
new KeyFrame(Duration.millis(150),
new KeyValue(node.translateXProperty(), -0.25*node.getBoundsInParent().getWidth(), WEB_EASE),
new KeyValue(node.rotateProperty(), -5, WEB_EASE)
),
new KeyFrame(Duration.millis(300),
new KeyValue(node.translateXProperty(), 0.2*node.getBoundsInParent().getWidth(), WEB_EASE),
new KeyValue(node.rotateProperty(), 3, WEB_EASE)
),
new KeyFrame(Duration.millis(450),
new KeyValue(node.translateXProperty(), -0.15*node.getBoundsInParent().getWidth(), WEB_EASE),
new KeyValue(node.rotateProperty(), -3, WEB_EASE)
),
new KeyFrame(Duration.millis(600),
new KeyValue(node.translateXProperty(), 0.1*node.getBoundsInParent().getWidth(), WEB_EASE),
new KeyValue(node.rotateProperty(), 2, WEB_EASE)
),
new KeyFrame(Duration.millis(750),
new KeyValue(node.translateXProperty(), -0.05*node.getBoundsInParent().getWidth(), WEB_EASE),
new KeyValue(node.rotateProperty(), -1, WEB_EASE)
),
new KeyFrame(Duration.millis(1000),
new KeyValue(node.translateXProperty(), 0, WEB_EASE),
new KeyValue(node.rotateProperty(), 0, WEB_EASE)
)
)
.build()
);
setCycleDuration(Duration.seconds(1));