From e31ae75c793e6bef412626b3bf5bf0687d26ab01 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 21 Jun 2022 10:52:47 +0200 Subject: [PATCH] [godot] In-editor docs. --- .../spine_godot/docs/SpineAnimation.xml | 9 +++ .../spine_godot/docs/SpineAnimationState.xml | 66 +++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/spine-godot/spine_godot/docs/SpineAnimation.xml b/spine-godot/spine_godot/docs/SpineAnimation.xml index fb378f0f6..eebcea4a2 100644 --- a/spine-godot/spine_godot/docs/SpineAnimation.xml +++ b/spine-godot/spine_godot/docs/SpineAnimation.xml @@ -1,8 +1,10 @@ + Stores a list of timelines to animate a skeleton's pose over time. The timelines can not be modified through GDScript. + Stores a list of timelines to animate a skeleton's pose over time. The timelines can not be modified through GDScript. @@ -18,33 +20,40 @@ + Applies the animation's timelines to the specified skeleton. + The duration of the animation in seconds, which is usually the highest time of all frames in the timeline. The duration is + used to know when it has completed and when it should loop back to the start. + The animation's name, which is unique across all animations in the skeleton. + Returns the timlines making up this animation. Modifying the returned array has no effect on the animation. + Returns whether the animation has the timeline with the given [code]ids[/code]. + Sets the [code]duration[/code] of the timeline in seconds. diff --git a/spine-godot/spine_godot/docs/SpineAnimationState.xml b/spine-godot/spine_godot/docs/SpineAnimationState.xml index c221e3807..426d1d585 100644 --- a/spine-godot/spine_godot/docs/SpineAnimationState.xml +++ b/spine-godot/spine_godot/docs/SpineAnimationState.xml @@ -1,8 +1,12 @@ + Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies + multiple animations on top of each other (layering). + Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies + multiple animations on top of each other (layering). See [link]http://esotericsoftware.com/spine-applying-animations[/link] in the Spine Runtimes Guide. @@ -14,6 +18,13 @@ + Adds an animation to be played after the current or last queued animation for a track. If the track is empty, it is + equivalent to calling [code]set_animation[/code]. + + If [code]delay[/code] > 0, sets [code]TrackEntry.delay[/code]. If [code]delay[/code] <= 0, the delay set is the duration of the previous track entry + minus any mix duration (from the [code]AnimationStateData[/code]) plus the specified [code]delay[/code] (ie the mix + ends at ([code]delay[/code] >= 0) or before ([code]delay[/code] < 0) the previous track entry duration). If the + previous entry is looping, its next loop completion is used instead of its duration. @@ -22,49 +33,77 @@ + Adds an empty animation to be played after the current or last queued animation for a track, and sets the track entry's + mix duration. If the track is empty, it is equivalent to calling + [code]set_empty_animation()[/code]. See [code]set_empty_animation()[/code]. + + If [code]delay[/code]> 0, sets the track entry's delay. If <= 0, the delay set is the duration of the previous track entry + minus any mix duration plus the specified [code]delay[/code] (ie the mix ends at ([code]delay[/code] = 0) or + before ([code]delay[/code] < 0) the previous track entry duration). If the previous entry is looping, its next + loop completion is used instead of its duration. + Returns a track entry to allow further customization of animation playback. References to the track entry must not be kept + after the dispose event occurs. + Poses the skeleton using the track entry animations. The animation state is not changed, so can be applied to multiple + skeletons to pose them identically. + + Returns true if any animations were applied. + Removes all animations from the track, leaving skeletons in their current pose. + + It may be desired to use [code]set_empty_animation()[/code] to mix the skeletons back to the setup pose, + rather than leaving them in their current pose. + Removes all animations from all tracks, leaving skeletons in their current pose. + + It may be desired to use [code]set_empty_animations()[/code] to mix the skeletons back to the setup pose, + rather than leaving them in their current pose. + Halts the emission of any animation state events. + Resumes the emission of any animation state events. + Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. + Returns the number of tracks (or the highest track index) on which an animation has been set previously. + Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower + or faster. Defaults to 1. @@ -73,6 +112,14 @@ + Sets the current animation for a track, discarding any queued animations. If the formerly current track entry was never + applied to a skeleton, it is replaced (not mixed from). + + If [loop] is true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its + duration. In either case [code]TrackEntry.trackEnd[/code] determines when the track is cleared. + + Returns track entry to allow further customization of animation playback. References to the track entry must not be kept + after the dispose event occurs. @@ -80,24 +127,43 @@ + Sets an empty animation for a track, discarding any queued animations, and sets the track entry's + mix duration. An empty animation has no timelines and serves as a placeholder for mixing in or out. + + Mixing out is done by setting an empty animation with a mix duration using either [code]set_empty_animation()[/code], + [code]set_empty_animations()[/code], or [code]add_empty_animation()[/code]. Mixing to an empty animation causes + the previous animation to be applied less and less over the mix duration. Properties keyed in the previous animation + transition to the value from lower tracks or to the setup pose value if no lower tracks key the property. A mix duration of + 0 still mixes out over one frame. + + Mixing in is done by first setting an empty animation, then adding an animation using + [code]add_animation()[/code]with the desired delay (an empty animation has a duration of 0) and on + the returned track entry, set the mix duration. Mixing from an empty animation causes the new + animation to be applied more and more over the mix duration. Properties keyed in the new animation transition from the value + from lower tracks or from the setup pose value if no lower tracks key the property to the value keyed in the new + animation. + Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix duration. + Sets the multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower + or faster. Defaults to 1. + Increments each track entry track time, setting queued animations as current if needed.