Class CustomTweenFunction
java.lang.Object
top.untold.frostlumen.core.tween.CustomTweenFunction
- All Implemented Interfaces:
TweenFunction
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecomputeEased(double percent) setNestedSegment(double start, double end, Consumer<CustomTweenFunction> function) 在当前对象上增加一段, 并新建一个CustomTweenFunction作为该段的缓动函数 新对象的越界函数由为LINEAR, 新对象随后通过nestedConfigurator配置 返回this, 嵌套对象的配置在回调内完成setNestedSegment(double start, double end, TweenFunction nestedOutOfRangeFunction, Consumer<CustomTweenFunction> nestedConfigurator) 在当前对象上增加一段, 并新建一个CustomTweenFunction作为该段的缓动函数 新对象的越界函数由nestedOutOfRangeFunction指定, 新对象随后通过nestedConfigurator配置 返回this, 嵌套对象的配置在回调内完成setOutOfRangeFunction(TweenFunction outOfRangeFunction) setSegment(double start, double end, TweenFunction function) 在当前对象上增加一段, 直接使用给定的function作为该段的缓动函数 返回this以便继续链式配置
-
Constructor Details
-
CustomTweenFunction
public CustomTweenFunction() -
CustomTweenFunction
-
-
Method Details
-
computeEased
public double computeEased(double percent) - Specified by:
computeEasedin interfaceTweenFunction
-
setSegment
在当前对象上增加一段, 直接使用给定的function作为该段的缓动函数 返回this以便继续链式配置 -
setNestedSegment
public CustomTweenFunction setNestedSegment(double start, double end, Consumer<CustomTweenFunction> function) 在当前对象上增加一段, 并新建一个CustomTweenFunction作为该段的缓动函数 新对象的越界函数由为LINEAR, 新对象随后通过nestedConfigurator配置 返回this, 嵌套对象的配置在回调内完成 -
setNestedSegment
public CustomTweenFunction setNestedSegment(double start, double end, TweenFunction nestedOutOfRangeFunction, Consumer<CustomTweenFunction> nestedConfigurator) 在当前对象上增加一段, 并新建一个CustomTweenFunction作为该段的缓动函数 新对象的越界函数由nestedOutOfRangeFunction指定, 新对象随后通过nestedConfigurator配置 返回this, 嵌套对象的配置在回调内完成 -
setOutOfRangeFunction
-