diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java index 8228e867a..7bce9ca04 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java @@ -46,7 +46,10 @@ import com.esotericsoftware.spine.attachments.Sequence; import com.esotericsoftware.spine.attachments.Sequence.SequenceMode; import com.esotericsoftware.spine.attachments.VertexAttachment; -/** Stores a list of timelines to animate a skeleton's pose over time. */ +/** Stores a list of timelines to animate a skeleton's pose over time. + *
+ * See Applying Animations in the Spine Runtimes + * Guide. */ public class Animation { final String name; float duration; @@ -116,7 +119,9 @@ public class Animation { /** Applies the animation's timelines to the specified skeleton. *
- * See {@link Timeline#apply(Skeleton, float, float, Array, float, boolean, boolean, boolean, boolean)}.
+ * See {@link Timeline#apply(Skeleton, float, float, Array, float, boolean, boolean, boolean, boolean)} and
+ * Applying Animations in the Spine Runtimes
+ * Guide.
* @param skeleton The skeleton the animation is applied to. This provides access to the bones, slots, and other skeleton
* components the timelines may change.
* @param lastTime The last time in seconds this animation was applied. Some timelines trigger only at discrete times, in which
@@ -136,7 +141,7 @@ public class Animation {
* @param add If true, for timelines that support it, their values are added to the setup or current values (depending on
*
+ * See Applying Animations in the Spine
+ * Runtimes Guide. */
static abstract public class Timeline {
final String[] propertyIds;
final float[] frames;
@@ -224,6 +232,9 @@ public class Animation {
}
/** Applies this timeline to the skeleton.
+ *
+ * See Applying Animations in the Spine
+ * Runtimes Guide.
* @param skeleton The skeleton the timeline is applied to. This provides access to the bones, slots, and other skeleton
* components the timelines may change.
* @param lastTime The last time in seconds this timeline was applied. Some timelines trigger only at discrete times, in
@@ -243,7 +254,7 @@ public class Animation {
*
* See {@link VertexAttachment#getTimelineAttachment()}. */
public Attachment getAttachment () {
diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java
index 23ac61b89..2151bbef6 100644
--- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java
+++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java
@@ -47,7 +47,8 @@ import com.esotericsoftware.spine.Animation.Timeline;
/** Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies
* multiple animations on top of each other (layering).
*
- * See Applying Animations in the Spine Runtimes Guide. */
+ * See Applying Animations in the Spine
+ * Runtimes Guide. */
public class AnimationState {
static final Animation emptyAnimation = new Animation("
* Mixing in is done by first setting an empty animation, then adding an animation using
* {@link #addAnimation(int, Animation, boolean, float)} with the desired delay (an empty animation has a duration of 0) and on
- * the returned track entry, set the {@link TrackEntry#setMixDuration(float)}. Mixing from an empty animation causes the new
+ * the returned track entry set {@link TrackEntry#setMixDuration(float)}. 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.
*
- * See Empty animations in the Spine
+ * See Empty animations in the Spine
* Runtimes Guide. */
public TrackEntry setEmptyAnimation (int trackIndex, float mixDuration) {
TrackEntry entry = setAnimation(trackIndex, emptyAnimation, false);
@@ -593,8 +594,8 @@ public class AnimationState {
* {@link #setEmptyAnimation(int, float)}.
*
* See {@link #setEmptyAnimation(int, float)} and
- * Empty animations in the Spine
- * Runtimes Guide.
+ * Empty animations in the Spine Runtimes
+ * Guide.
* @param delay If > 0, sets {@link TrackEntry#getDelay()}. If <= 0, the delay set is the duration of the previous track entry
* minus any mix duration plus the specified
- * See Empty animations in the Spine
+ * See Empty animations in the Spine
* Runtimes Guide. */
public void setEmptyAnimations (float mixDuration) {
boolean oldDrainDisabled = queue.drainDisabled;
@@ -667,7 +668,7 @@ public class AnimationState {
return entry;
}
- /** Removes the {@link TrackEntry#getNext() next entry} and all entries after it for the specified entry. */
+ /** Removes {@link TrackEntry#getNext()} and all entries after it for the specified entry. */
public void clearNext (TrackEntry entry) {
TrackEntry next = entry.next;
while (next != null) {
diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Bone.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Bone.java
index 2b8f4e055..0bb7a86cd 100644
--- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Bone.java
+++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Bone.java
@@ -32,13 +32,14 @@ package com.esotericsoftware.spine;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.Null;
-/** A bone has a number of poses:
+/** A node in a skeleton's hierarchy with a transform that affects its children and their attachments. A bone has a number of
+ * poses:
* {
+ /** Sets this pose to the specified pose. */
public void set (P pose);
}
diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Posed.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Posed.java
index f4778ee5c..7c8fc0e7c 100644
--- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Posed.java
+++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Posed.java
@@ -1,6 +1,13 @@
package com.esotericsoftware.spine;
+/** The base class for an object with a number of poses:
+ * , //
P extends Pose, //
@@ -19,31 +26,38 @@ abstract public class Posed< //
applied = pose;
}
+ /** Sets the unconstrained pose to the setup pose. */
public void setupPose () {
pose.set(data.setup);
}
- /** The constraint's setup pose data. */
+ /** The setup pose data. May be shared with multiple instances. */
public D getData () {
return data;
}
+ /** The unconstrained pose for this object, set by animations and application code. */
public P getPose () {
return pose;
}
+ /** If no constraints modify this object, the applied pose is the same as the {@link #pose}. Otherwise it is a copy of the
+ * {@link #pose} modified by constraints. */
public A getAppliedPose () {
return applied;
}
+ /** Sets the applied pose to the unconstrained pose, for when no constraints will modify the pose. */
void pose () { // Port: usePose
applied = pose;
}
+ /** Sets the applied pose to the constrained pose, in anticipation of the applied pose being modified by constraints. */
void constrained () { // Port: useConstrained
applied = constrained;
}
+ /** Sets the constrained pose to the unconstrained pose, as a starting point for constraints to be applied. */
void reset () { // Port: resetConstrained
constrained.set(pose);
}
diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PosedActive.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PosedActive.java
index a57ef7a8f..1097bea4e 100644
--- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PosedActive.java
+++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PosedActive.java
@@ -1,6 +1,7 @@
package com.esotericsoftware.spine;
+/** A posed object that may be active or inactive. */
abstract public class PosedActive< //
D extends PosedData , //
P extends Pose, //
diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PosedData.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PosedData.java
index 14b52d3b3..392ae8eae 100644
--- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PosedData.java
+++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PosedData.java
@@ -29,7 +29,7 @@
package com.esotericsoftware.spine;
-/** The base class for all constrained datas. */
+/** The base class for storing setup data for a posed object. May be shared with multiple instances. */
abstract public class PosedData {
final String name;
final P setup;
diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java
index a66060efe..00f5cd756 100644
--- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java
+++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java
@@ -374,8 +374,8 @@ public class Skeleton {
setSkin(skin);
}
- /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}. If the
- * skin is changed, {@link #updateCache()} is called.
+ /** Sets the skin used to look up attachments before looking in {@link SkeletonData#getDefaultSkin()}. If the skin is changed,
+ * {@link #updateCache()} is called.
*
* Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no
* old skin, each slot's setup mode attachment is attached from the new skin.
diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java
index 8f845977a..64c28f8fe 100644
--- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java
+++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java
@@ -73,7 +73,7 @@ abstract public class VertexAttachment extends Attachment {
worldVerticesLength = other.worldVerticesLength;
}
- /** Transforms the attachment's local {@link #getVertices()} to world coordinates. If the {@link SlotPose#getDeform()} is not
+ /** Transforms the attachment's local {@link #getVertices()} to world coordinates. If {@link SlotPose#getDeform()} is not
* empty, it is used to deform the vertices.
*
* See World transforms in the Spine
@@ -143,7 +143,7 @@ abstract public class VertexAttachment extends Attachment {
}
/** The bones that affect the {@link #getVertices()}. The entries are, for each vertex, the number of bones affecting the
- * vertex followed by that many bone indices, which is the {@link Skeleton#getBones()} index. Null if this attachment has no
+ * vertex followed by that many bone indices, which is {@link Skeleton#getBones()} index. Null if this attachment has no
* weights. */
public @Null int[] getBones () {
return bones;
fromSetup).
* @param out True when the animation is mixing out, else it is mixing in. Used by timelines that perform instant transitions.
- * @param appliedPose True to modify the {@link Posed#getAppliedPose()}, else the {@link Posed#getPose()} is modified. */
+ * @param appliedPose True to modify {@link Posed#getAppliedPose()}, else {@link Posed#getPose()} is modified. */
public void apply (Skeleton skeleton, float lastTime, float time, boolean loop, @Null ArrayfromSetup).
* @param out True when the animation is mixing out, else it is mixing in. Used by timelines that perform instant
* transitions.
- * @param appliedPose True to modify the {@link Posed#getAppliedPose()}, else the {@link Posed#getPose()} is modified. */
+ * @param appliedPose True to modify {@link Posed#getAppliedPose()}, else {@link Posed#getPose()} is modified. */
abstract public void apply (Skeleton skeleton, float lastTime, float time, @Null Arraydelay (ie the mix ends at (when delay = 0) or
* before (when delay < 0) the previous track entry duration). If the previous entry is looping, its
@@ -611,7 +612,7 @@ public class AnimationState {
/** Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix duration.
*
- *
*/
public class Bone extends PosedActive[a b][c d] x-axis x component. */
public float getA () {
return a;
}
@@ -262,7 +262,7 @@ public class BonePose extends BoneLocal implements Update {
this.a = a;
}
- /** Part of the world transform matrix for the Y axis. */
+ /** The world transform [a b][c d] y-axis x component. */
public float getB () {
return b;
}
@@ -271,7 +271,7 @@ public class BonePose extends BoneLocal implements Update {
this.b = b;
}
- /** Part of the world transform matrix for the X axis. */
+ /** The world transform [a b][c d] x-axis y component. */
public float getC () {
return c;
}
@@ -280,7 +280,7 @@ public class BonePose extends BoneLocal implements Update {
this.c = c;
}
- /** Part of the world transform matrix for the Y axis. */
+ /** The world transform [a b][c d] y-axis y component. */
public float getD () {
return d;
}
@@ -307,7 +307,8 @@ public class BonePose extends BoneLocal implements Update {
this.worldY = worldY;
}
- /** The world rotation for the X axis, calculated using {@link #a} and {@link #c}. */
+ /** The world rotation for the X axis, calculated using {@link #a} and {@link #c}. This is the direction the bone is
+ * pointing. */
public float getWorldRotationX () {
return atan2Deg(c, a);
}
diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Pose.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Pose.java
index 3f3c3ea3c..699ebcab5 100644
--- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Pose.java
+++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Pose.java
@@ -1,6 +1,8 @@
package com.esotericsoftware.spine;
+/** An interface for an object representing a pose. */
public interface Pose
+ *
+ */
abstract public class Posed< //
D extends PosedData