diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-01 22:38:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-01 22:38:42 +0100 |
commit | 5945f43cc8d18976129e7f59003caf3873c90e22 (patch) | |
tree | 354f0cd837524e6d2eec0ef9d0b936604ee85611 /doc | |
parent | 529968df30f7d2dd697f0217114dc95bc976a127 (diff) | |
parent | b9c7c52a29d40d21afceed57e735242abe7ffbca (diff) |
Merge pull request #54391 from DavidSichma/doc_interpolate_value
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/Tween.xml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 488a5aa340..05c83f0423 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -74,17 +74,17 @@ </method> <method name="interpolate_value"> <return type="Variant" /> - <argument index="0" name="trans_type" type="Variant" /> - <argument index="1" name="ease_type" type="Variant" /> + <argument index="0" name="initial_value" type="Variant" /> + <argument index="1" name="delta_value" type="Variant" /> <argument index="2" name="elapsed_time" type="float" /> - <argument index="3" name="initial_value" type="float" /> - <argument index="4" name="delta_value" type="int" enum="Tween.TransitionType" /> - <argument index="5" name="duration" type="int" enum="Tween.EaseType" /> + <argument index="3" name="duration" type="float" /> + <argument index="4" name="trans_type" type="int" enum="Tween.TransitionType" /> + <argument index="5" name="ease_type" type="int" enum="Tween.EaseType" /> <description> This method can be used for manual interpolation of a value, when you don't want [Tween] to do animating for you. It's similar to [method @GlobalScope.lerp], but with support for custom transition and easing. - [code]elapsed_time[/code] is the time in seconds that passed after the interping started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [code]duration[/code], the interpolated value will be halfway between initial and final values. This value can also be greater than [code]duration[/code] or lower than 0, which will extrapolate the value. [code]initial_value[/code] is the starting value of the interpolation. [code]delta_value[/code] is the change of the value in the interpolation, i.e. it's equal to [code]final_value - initial_value[/code]. + [code]elapsed_time[/code] is the time in seconds that passed after the interpolation started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [code]duration[/code], the interpolated value will be halfway between initial and final values. This value can also be greater than [code]duration[/code] or lower than 0, which will extrapolate the value. [code]duration[/code] is the total time of the interpolation. [b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method will always return the final value, regardless of [code]elapsed_time[/code] provided. </description> |