mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Minor updates.
- Hid updateAppliedTransform, since the applied values aren't public API. - Made VertexAttachment#computeWorldVertices public, event though it may not be useful to subclasses like MeshAttachment.
This commit is contained in:
parent
48e686ad95
commit
2287256c72
@ -397,7 +397,7 @@ public class AnimationState {
|
|||||||
|
|
||||||
/** @see #setAnimation(int, Animation, boolean) */
|
/** @see #setAnimation(int, Animation, boolean) */
|
||||||
public TrackEntry setAnimation (int trackIndex, String animationName, boolean loop) {
|
public TrackEntry setAnimation (int trackIndex, String animationName, boolean loop) {
|
||||||
Animation animation = data.getSkeletonData().findAnimation(animationName);
|
Animation animation = data.skeletonData.findAnimation(animationName);
|
||||||
if (animation == null) throw new IllegalArgumentException("Animation not found: " + animationName);
|
if (animation == null) throw new IllegalArgumentException("Animation not found: " + animationName);
|
||||||
return setAnimation(trackIndex, animation, loop);
|
return setAnimation(trackIndex, animation, loop);
|
||||||
}
|
}
|
||||||
@ -427,7 +427,7 @@ public class AnimationState {
|
|||||||
|
|
||||||
/** {@link #addAnimation(int, Animation, boolean, float)} */
|
/** {@link #addAnimation(int, Animation, boolean, float)} */
|
||||||
public TrackEntry addAnimation (int trackIndex, String animationName, boolean loop, float delay) {
|
public TrackEntry addAnimation (int trackIndex, String animationName, boolean loop, float delay) {
|
||||||
Animation animation = data.getSkeletonData().findAnimation(animationName);
|
Animation animation = data.skeletonData.findAnimation(animationName);
|
||||||
if (animation == null) throw new IllegalArgumentException("Animation not found: " + animationName);
|
if (animation == null) throw new IllegalArgumentException("Animation not found: " + animationName);
|
||||||
return addAnimation(trackIndex, animation, loop, delay);
|
return addAnimation(trackIndex, animation, loop, delay);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -379,7 +379,7 @@ public class Bone implements Updatable {
|
|||||||
* the applied transform after the world transform has been modified directly (eg, by a constraint).
|
* the applied transform after the world transform has been modified directly (eg, by a constraint).
|
||||||
* <p>
|
* <p>
|
||||||
* Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. */
|
* Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. */
|
||||||
public void updateAppliedTransform () {
|
void updateAppliedTransform () {
|
||||||
appliedValid = true;
|
appliedValid = true;
|
||||||
Bone parent = this.parent;
|
Bone parent = this.parent;
|
||||||
if (parent == null) {
|
if (parent == null) {
|
||||||
|
|||||||
@ -41,10 +41,8 @@ public class BoundingBoxAttachment extends VertexAttachment {
|
|||||||
super(name);
|
super(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void computeWorldVertices (Slot slot, float[] worldVertices) {
|
/** The color of the bounding box as it was in Spine. Available only when nonessential data was exported. Bounding boxes are
|
||||||
computeWorldVertices(slot, 0, worldVerticesLength, worldVertices, 0);
|
* not usually rendered at runtime. */
|
||||||
}
|
|
||||||
|
|
||||||
public Color getColor () {
|
public Color getColor () {
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,14 +44,7 @@ public class PathAttachment extends VertexAttachment {
|
|||||||
super(name);
|
super(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void computeWorldVertices (Slot slot, float[] worldVertices) {
|
/** If true, the start and end knots are connected. */
|
||||||
super.computeWorldVertices(slot, worldVertices);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void computeWorldVertices (Slot slot, int start, int count, float[] worldVertices, int offset) {
|
|
||||||
super.computeWorldVertices(slot, start, count, worldVertices, offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean getClosed () {
|
public boolean getClosed () {
|
||||||
return closed;
|
return closed;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,11 +50,11 @@ public class VertexAttachment extends Attachment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Transforms local vertices to world coordinates.
|
/** Transforms local vertices to world coordinates.
|
||||||
* @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y.
|
* @param start The index of the first {@link #getVertices()} value to transform. Each vertex has 2 values, x and y.
|
||||||
* @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start.
|
* @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - <code>start</code>.
|
||||||
* @param worldVertices The output world vertices. Must have a length >= offset + count.
|
* @param worldVertices The output world vertices. Must have a length >= <code>offset</code> + <code>count</code>.
|
||||||
* @param offset The worldVertices index to begin writing values. */
|
* @param offset The <code>worldVertices</code> index to begin writing values. */
|
||||||
protected void computeWorldVertices (Slot slot, int start, int count, float[] worldVertices, int offset) {
|
public void computeWorldVertices (Slot slot, int start, int count, float[] worldVertices, int offset) {
|
||||||
count += offset;
|
count += offset;
|
||||||
Skeleton skeleton = slot.getSkeleton();
|
Skeleton skeleton = slot.getSkeleton();
|
||||||
FloatArray deformArray = slot.getAttachmentVertices();
|
FloatArray deformArray = slot.getAttachmentVertices();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user