mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[libgdx] Fixed slot color, clipping.
This commit is contained in:
parent
46705b5470
commit
2c6b43a9c2
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user