// cIn.setRotationAxis(Rotate.X_AXIS);
// cIn.setRotate(70);
// cOut.setRotationAxis(Rotate.X_AXIS);
// cOut.setRotate(70);
PathTransitionBuilder moveOut = PathTransitionBuilder.create()
.duration(new Duration(1000))
.node(curNode)
.path(cOut)
;
PathTransitionBuilder moveIn = PathTransitionBuilder.create()
.duration(new Duration(1000))
.node(newNode)
.path(cIn)
;
ScaleTransitionBuilder zoomOut = ScaleTransitionBuilder.create()
.duration(new Duration(1000))
.toX(0.2)
.toY(0.2)
.interpolator(Interpolator.EASE_BOTH);
ScaleTransitionBuilder zoomIn = ScaleTransitionBuilder.create()
.duration(new Duration(1000))
.fromX(0.2)
.fromY(0.2)
.toX(0.7)
.toY(0.7)
.interpolator(Interpolator.EASE_BOTH);
Animation main = ParallelTransitionBuilder.create()
.children(
zoomOut.node(curNode).build(),
zoomIn.node(newNode).build(),
moveIn.build(),
moveOut.build()
,
FadeTransitionBuilder.create()
.node(curNode)
.duration(new Duration(1000))
.fromValue(1)
.toValue(0)
.build(),
moveOut.build(),
FadeTransitionBuilder.create()
.node(newNode)
.duration(new Duration(1000))
.fromValue(0)
.toValue(1)
.build()
)
.build();
ScaleTransitionBuilder zoomOut1 = ScaleTransitionBuilder.create()
.duration(new Duration(300))
.toX(0.7)
.toY(0.7)
.interpolator(Interpolator.EASE_BOTH);
ScaleTransitionBuilder zoomIn1 = ScaleTransitionBuilder.create()
.duration(new Duration(300))
.toX(1)
.toY(1)
.interpolator(Interpolator.EASE_BOTH);
return SequentialTransitionBuilder.create()