mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +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) */
|
||||
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);
|
||||
return setAnimation(trackIndex, animation, loop);
|
||||
}
|
||||
@ -427,7 +427,7 @@ public class AnimationState {
|
||||
|
||||
/** {@link #addAnimation(int, Animation, boolean, float)} */
|
||||
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);
|
||||
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).
|
||||
* <p>
|
||||
* Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. */
|
||||
public void updateAppliedTransform () {
|
||||
void updateAppliedTransform () {
|
||||
appliedValid = true;
|
||||
Bone parent = this.parent;
|
||||
if (parent == null) {
|
||||
|
||||
@ -41,10 +41,8 @@ public class BoundingBoxAttachment extends VertexAttachment {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public void computeWorldVertices (Slot slot, float[] worldVertices) {
|
||||
computeWorldVertices(slot, 0, worldVerticesLength, worldVertices, 0);
|
||||
}
|
||||
|
||||
/** The color of the bounding box as it was in Spine. Available only when nonessential data was exported. Bounding boxes are
|
||||
* not usually rendered at runtime. */
|
||||
public Color getColor () {
|
||||
return color;
|
||||
}
|
||||
|
||||
@ -44,14 +44,7 @@ public class PathAttachment extends VertexAttachment {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public void computeWorldVertices (Slot slot, float[] worldVertices) {
|
||||
super.computeWorldVertices(slot, worldVertices);
|
||||
}
|
||||
|
||||
public void computeWorldVertices (Slot slot, int start, int count, float[] worldVertices, int offset) {
|
||||
super.computeWorldVertices(slot, start, count, worldVertices, offset);
|
||||
}
|
||||
|
||||
/** If true, the start and end knots are connected. */
|
||||
public boolean getClosed () {
|
||||
return closed;
|
||||
}
|
||||
|
||||
@ -50,11 +50,11 @@ public class VertexAttachment extends Attachment {
|
||||
}
|
||||
|
||||
/** 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 count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start.
|
||||
* @param worldVertices The output world vertices. Must have a length >= offset + count.
|
||||
* @param offset The worldVertices index to begin writing values. */
|
||||
protected void computeWorldVertices (Slot slot, int start, int count, float[] worldVertices, int offset) {
|
||||
* @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()} - <code>start</code>.
|
||||
* @param worldVertices The output world vertices. Must have a length >= <code>offset</code> + <code>count</code>.
|
||||
* @param offset The <code>worldVertices</code> index to begin writing values. */
|
||||
public void computeWorldVertices (Slot slot, int start, int count, float[] worldVertices, int offset) {
|
||||
count += offset;
|
||||
Skeleton skeleton = slot.getSkeleton();
|
||||
FloatArray deformArray = slot.getAttachmentVertices();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user