Version: 2020.1
Experimental: this API is experimental and might be changed or removed in the future.

ITransitionAnimations.Start

切换到手册
public ValueAnimation<Color> Start (Color from, Color to, int durationMs, Action<VisualElement,Color> onValueChanged);
public ValueAnimation<Color> Start (Func<VisualElement,Color> fromValueGetter, Color to, int durationMs, Action<VisualElement,Color> onValueChanged);

参数

from 起点值。
to 终点值。
durationMs 过渡的持续时间(以毫秒为单位)。
onValueChanged 应用插值的回调。
fromValueGetter 提供初始值的回调。

返回

ValueAnimation<Color> 创建的动画对象。

描述

对此 VisualElement 启动过渡动画。