diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Animation.xml | 2 | ||||
-rw-r--r-- | doc/classes/AnimationMixer.xml | 12 | ||||
-rw-r--r-- | doc/classes/AnimationPlayer.xml | 22 |
3 files changed, 34 insertions, 2 deletions
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 2a88e70818..e04320c30d 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -651,7 +651,7 @@ Update at the keyframes. </constant> <constant name="UPDATE_CAPTURE" value="2" enum="UpdateMode"> - Same as linear interpolation, but also interpolates from the current value (i.e. dynamically at runtime) if the first key isn't at 0 seconds. + Same as [constant UPDATE_CONTINUOUS] but works as a flag to capture the value of the current object and perform interpolation in some methods. See also [method AnimationMixer.capture] and [method AnimationPlayer.play_with_capture]. </constant> <constant name="LOOP_NONE" value="0" enum="LoopMode"> At both ends of the animation, the animation will stop playing. diff --git a/doc/classes/AnimationMixer.xml b/doc/classes/AnimationMixer.xml index 31308c4e20..d17e9377da 100644 --- a/doc/classes/AnimationMixer.xml +++ b/doc/classes/AnimationMixer.xml @@ -36,6 +36,18 @@ Manually advance the animations by the specified time (in seconds). </description> </method> + <method name="capture"> + <return type="void" /> + <param index="0" name="name" type="StringName" /> + <param index="1" name="duration" type="float" /> + <param index="2" name="trans_type" type="int" enum="Tween.TransitionType" default="0" /> + <param index="3" name="ease_type" type="int" enum="Tween.EaseType" default="0" /> + <description> + If the animation track specified by [param name] has an option [constant Animation.UPDATE_CAPTURE], stores current values of the objects indicated by the track path as a cache. If there is already a captured cache, the old cache is discarded. + After this it will interpolate with current animation blending result during the playback process for the time specified by [param duration], working like a crossfade. + You can specify [param trans_type] as the curve for the interpolation. For better results, it may be appropriate to specify [constant Tween.TRANS_LINEAR] for cases where the first key of the track begins with a non-zero value or where the key value does not change, and [constant Tween.TRANS_QUAD] for cases where the key value changes linearly. + </description> + </method> <method name="clear_caches"> <return type="void" /> <description> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index dda0187e8b..233d31a101 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -110,6 +110,26 @@ This method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information. </description> </method> + <method name="play_with_capture"> + <return type="void" /> + <param index="0" name="name" type="StringName" /> + <param index="1" name="duration" type="float" default="-1.0" /> + <param index="2" name="custom_blend" type="float" default="-1" /> + <param index="3" name="custom_speed" type="float" default="1.0" /> + <param index="4" name="from_end" type="bool" default="false" /> + <param index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0" /> + <param index="6" name="ease_type" type="int" enum="Tween.EaseType" default="0" /> + <description> + See [method AnimationMixer.capture]. It is almost the same as the following: + [codeblock] + capture(name, duration, trans_type, ease_type) + play(name, custom_blend, custom_speed, from_end) + [/codeblock] + If name is blank, it specifies [member assigned_animation]. + If [param duration] is a negative value, the duration is set to the interval between the current position and the first key, when [param from_end] is [code]true[/code], uses the interval between the current position and the last key instead. + [b]Note:[/b] The [param duration] takes [member speed_scale] into account, but [param custom_speed] does not, because the capture cache is interpolated with the blend result and the result may contain multiple animations. + </description> + </method> <method name="queue"> <return type="void" /> <param index="0" name="name" type="StringName" /> @@ -125,7 +145,7 @@ <param index="2" name="update_only" type="bool" default="false" /> <description> Seeks the animation to the [param seconds] point in time (in seconds). If [param update] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [param seconds] are skipped. - If [param update_only] is true, the method / audio / animation playback tracks will not be processed. + If [param update_only] is [code]true[/code], the method / audio / animation playback tracks will not be processed. [b]Note:[/b] Seeking to the end of the animation doesn't emit [signal AnimationMixer.animation_finished]. If you want to skip animation and emit the signal, use [method AnimationMixer.advance]. </description> </method> |