📅  最后修改于: 2020-10-14 01:56:59             🧑  作者: Mango
通常,动画可以定义为创建对象运动神话的过渡。它是在指定持续时间内按顺序应用于对象的一组变换,以便可以在运动时显示该对象。
这可以通过快速显示帧来完成。在JavaFX中,包javafx.animation包含将动画应用到节点上的所有类。该程序包的所有类都扩展了javafx.animation.Animation类。
JavaFX为过渡提供了类,例如RotateTransition,ScaleTransition,TranslateTransition,FadeTransition,FillTransition,StrokeTransition等。
包javafx.animation提供了用于执行以下转换的类。
SN | Transition | Description |
---|---|---|
1 | Rotate Transition | Rotate the Node along one of the axes over the specified duration. |
2 | Scale Transition | Animate the scaling of the node over the specified duration. |
3 | Translate Transition | Translate the node from one position to another over the specified duration. |
4 | Fade Transition | Animate the opacity of the node. It keeps updating the opacity of the node over a specified duration in order to reach a target opacity value |
5 | Fill Transition | Animate the node’s fill color so that the fill color of the node fluctuates between the two color values over the specified duration. |
6 | Stroke Transition | Animate the node’s stroke color so that the stroke color of the node fluctuates between the two color values over the specified duration. |
7 | Perform the list of transitions on a node in the sequential order. | |
8 | Parallel Transition | Perform the list of transitions on a node in parallel. |
9 | Path Transition | Move the node along the specified path over the specified duration. |