[libgdx] Fixed slot color, clipping.

This commit is contained in:
Nathan Sweet 2025-04-19 12:24:00 -04:00
parent 46705b5470
commit 2c6b43a9c2
3 changed files with 6 additions and 6 deletions

View File

@ -57,7 +57,7 @@ public class Animation {
if (name == null) throw new IllegalArgumentException("name cannot be null.");
this.name = name;
this.duration = duration;
timelineIds = new ObjectSet(timelines.size);
timelineIds = new ObjectSet(timelines.size << 1);
setTimelines(timelines);
}
@ -71,7 +71,7 @@ public class Animation {
this.timelines = timelines;
int n = timelines.size;
timelineIds.clear(n);
timelineIds.clear(n << 1);
Timeline[] items = timelines.items;
for (int i = 0; i < n; i++)
timelineIds.addAll(items[i].getPropertyIds());
@ -649,8 +649,8 @@ public class Animation {
break;
case first:
case replace:
pose.x += (setup.x + x - pose.x) * alpha;
pose.y += (setup.y + y - pose.y) * alpha;
pose.x = x;
pose.y = y;
break;
case add:
pose.x += x * alpha;

View File

@ -42,7 +42,7 @@ import com.esotericsoftware.spine.attachments.VertexAttachment;
* for an attachment. State cannot be stored in an attachment itself because attachments are stateless and may be shared across
* multiple skeletons. */
public class SlotPose implements Pose<SlotPose> {
final Color color = new Color();
final Color color = new Color(1, 1, 1, 1);
@Null Color darkColor;
@Null Attachment attachment; // Not used in setup pose.
int sequenceIndex;

View File

@ -37,7 +37,7 @@ import com.badlogic.gdx.utils.ShortArray;
class Triangulator {
private final Array<FloatArray> convexPolygons = new Array(false, 8, FloatArray[]::new);
private final Array<ShortArray> convexPolygonsIndices = new Array(false, 8, FloatArray[]::new);
private final Array<ShortArray> convexPolygonsIndices = new Array(false, 8, ShortArray[]::new);
private final ShortArray indicesArray = new ShortArray();
private final BooleanArray isConcaveArray = new BooleanArray();