Эх сурвалжийг харах

Back to constant speed.

It's better.
NathanSweet 9 жил өмнө
parent
commit
534ffc8d1d

+ 1 - 1
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PathConstraint.java

@@ -148,7 +148,7 @@ public class PathConstraint implements Updatable {
 		boolean closed = path.getClosed();
 		int verticesLength = path.getWorldVerticesLength(), curveCount = verticesLength / 6, prevCurve = NONE;
 
-		if (!path.getAccurate()) {
+		if (!path.getConstantSpeed()) {
 			float[] lengths = path.getLengths();
 			curveCount -= closed ? 1 : 2;
 			float pathLength = lengths[curveCount];

+ 2 - 2
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java

@@ -431,7 +431,7 @@ public class SkeletonBinary {
 		}
 		case path: {
 			boolean closed = input.readBoolean();
-			boolean accurate = input.readBoolean();
+			boolean constantSpeed = input.readBoolean();
 			int vertexCount = input.readInt(true);
 			Vertices vertices = readVertices(input, vertexCount);
 			float[] lengths = new float[vertexCount / 3];
@@ -442,7 +442,7 @@ public class SkeletonBinary {
 			PathAttachment path = attachmentLoader.newPathAttachment(skin, name);
 			if (path == null) return null;
 			path.setClosed(closed);
-			path.setAccurate(accurate);
+			path.setConstantSpeed(constantSpeed);
 			path.setWorldVerticesLength(vertexCount << 1);
 			path.setVertices(vertices.vertices);
 			path.setBones(vertices.bones);

+ 1 - 1
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java

@@ -357,7 +357,7 @@ public class SkeletonJson {
 			PathAttachment path = attachmentLoader.newPathAttachment(skin, name);
 			if (path == null) return null;
 			path.setClosed(map.getBoolean("closed", false));
-			path.setAccurate(map.getBoolean("accurate", true));
+			path.setConstantSpeed(map.getBoolean("constantSpeed", true));
 
 			int vertexCount = map.getInt("vertexCount");
 			readVertices(map, path, vertexCount << 1);

+ 5 - 5
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/PathAttachment.java

@@ -36,7 +36,7 @@ import com.esotericsoftware.spine.Slot;
 
 public class PathAttachment extends VertexAttachment {
 	float[] lengths;
-	boolean closed, accurate;
+	boolean closed, constantSpeed;
 
 	// Nonessential.
 	final Color color = new Color(1, 0.5f, 0, 1);
@@ -61,12 +61,12 @@ public class PathAttachment extends VertexAttachment {
 		this.closed = closed;
 	}
 
-	public boolean getAccurate () {
-		return accurate;
+	public boolean getConstantSpeed () {
+		return constantSpeed;
 	}
 
-	public void setAccurate (boolean accurate) {
-		this.accurate = accurate;
+	public void setConstantSpeed (boolean constantSpeed) {
+		this.constantSpeed = constantSpeed;
 	}
 
 	/** Returns the length in the setup pose from the start of the path to the end of each curve. */