Merge branch '3.6' into 3.7-beta

This commit is contained in:
badlogic 2018-05-16 11:46:01 +02:00
commit eb69071a0a
22 changed files with 85 additions and 47 deletions

View File

@ -15,6 +15,8 @@
* Removed `RegionAttachment.vertices` field. The vertices array is provided to `RegionAttachment.computeWorldVertices` by the API user now.
* Removed `RegionAttachment.updateWorldVertices`, added `RegionAttachment.computeWorldVertices`. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the provided `worldVertices` array, starting at `offset`, then moving by `stride` array elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer.
* Replaced `r`, `g`, `b`, `a` fields with instances of new `Color` class in `RegionAttachment`, `MeshAttachment`, `Skeleton`, `SkeletonData`, `Slot` and `SlotData`.
* The completion event will fire for looped 0 duration animations every frame.
* **Additions**
* Added `Skeleton.getBounds` from reference implementation.
* Added support for local and relative transform constraint calculation, including additional fields in `TransformConstraintData`
@ -45,6 +47,7 @@
* Replaced `r`, `g`, `b`, `a` fields with instances of new `spColor` struct in `spRegionAttachment`, `spMeshAttachment`, `spSkeleton`, `spSkeletonData`, `spSlot` and `spSlotData`.
* Removed `spVertexIndex`from public API.
* Listeners on `spAnimationState` or `spTrackEntry` will now be also called in case a track entry is disposed as part of dispoing the `spAnimationState`.
* The completion event will fire for looped 0 duration animations every frame.
* **Additions**
* Added support for local and relative transform constraint calculation, including additional fields in `spTransformConstraintData`.
* Added `spPointAttachment`, additional method `spAtlasAttachmentLoadeR_newPointAttachment`.
@ -104,6 +107,8 @@
* Added `stride` parameter to `VertexAttachment.ComputeWorldVertices`.
* Removed `RegionAttachment.Vertices` field. The vertices array is provided to `RegionAttachment.ComputeWorldVertices` by the API user now.
* Removed `RegionAttachment.UpdateWorldVertices`, added `RegionAttachment.ComputeWorldVertices`. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the provided `worldVertices` array, starting at `offset`, then moving by `stride` array elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer.
* The completion event will fire for looped 0 duration animations every frame.
* **Additions**
* Added support for local and relative transform constraint calculation, including additional fields in `TransformConstraintData`
* Added `Bone.localToWorldRotation`(rotation given relative to x-axis, counter-clockwise, in degrees).
@ -170,6 +175,8 @@
* Removed `RegionAttachment.updateWorldVertices`, added `RegionAttachment.computeWorldVertices`. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the provided `worldVertices` array, starting at `offset`, then moving by `stride` array elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer.
* Skeleton attachments: Moved update of attached skeleton out of libGDX `SkeletonRenderer`, added overloaded method `Skeleton#updateWorldTransform(Bone), used for `SkeletonAttachment`. You now MUST call this new method
with the bone of the parent skeleton to which the child skeleton is attached. See `SkeletonAttachmentTest` for and example.
* The completion event will fire for looped 0 duration animations every frame.
* **Additions**
* Added support for local and relative transform constraint calculation, including additional fields in `TransformConstraintData`
* Added `Bone.localToWorldRotation`(rotation given relative to x-axis, counter-clockwise, in degrees).
@ -193,6 +200,7 @@
* Removed `RegionAttachment:updateWorldVertices`, added `RegionAttachment:computeWorldVertices`, which takes offsets and stride to allow compositing vertices directly in a vertex buffer to be send to the GPU. The compositing is now performed in the backends' respective renderers.
* Removed `MeshAttachment.worldVertices` field. Computation is now performed in each backends' respective renderer. The `uv` coordinates are now stored in `MeshAttachment.uvs`.
* Removed `RegionAttachment.vertices` field. Computation is now performed in each backends respective renderer. The `uv` coordinates for each vertex are now stored in the `RegionAttachment.uvs` field.
* The completion event will fire for looped 0 duration animations every frame.
* **Additions**
* Added `Bone:localToWorldRotation`(rotation given relative to x-axis, counter-clockwise, in degrees).
* Added two color tinting support, including `TwoColorTimeline` and additional fields on `Slot` and `SlotData`.
@ -222,6 +230,8 @@
* Removed `VertexAttachment.computeWorldVertices` overload, changed `VertexAttachment.computeWorldVerticesWith` to `VertexAttachment.computeWorldVertices`, added `stride` parameter.
* Removed `RegionAttachment.vertices` field. The vertices array is provided to `RegionAttachment.computeWorldVertices` by the API user now.
* Removed `RegionAttachment.updateWorldVertices`, added `RegionAttachment.computeWorldVertices`. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the provided `worldVertices` array, starting at `offset`, then moving by `stride` array elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer.
* The completion event will fire for looped 0 duration animations every frame.
* **Additions**
* Added support for local and relative transform constraint calculation, including additional fields in `TransformConstraintData`
* Added `Bone.localToWorldRotation`(rotation given relative to x-axis, counter-clockwise, in degrees).

View File

@ -355,12 +355,15 @@ package spine.animation {
if (event.time < trackLastWrapped) break;
if (event.time > animationEnd) continue; // Discard events outside animation start/end.
queue.event(entry, event);
}
}
// Queue complete if completed a loop iteration or the animation.
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration) : (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
queue.complete(entry);
}
var complete:Boolean;
if (entry.loop)
complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
else
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
if (complete) queue.complete(entry);
// Queue events after complete.
for (; i < n; i++) {

View File

@ -585,7 +585,7 @@ void _spAnimationState_queueEvents (spAnimationState* self, spTrackEntry* entry,
spEvent** events;
spEvent* event;
_spAnimationState* internal = SUB_CAST(_spAnimationState, self);
int i, n;
int i, n, complete;
float animationStart = entry->animationStart, animationEnd = entry->animationEnd;
float duration = animationEnd - animationStart;
float trackLastWrapped = FMOD(entry->trackLast, duration);
@ -600,10 +600,11 @@ void _spAnimationState_queueEvents (spAnimationState* self, spTrackEntry* entry,
}
/* Queue complete if completed a loop iteration or the animation. */
if (entry->loop ? (trackLastWrapped > FMOD(entry->trackTime, duration))
: (animationTime >= animationEnd && entry->animationLast < animationEnd)) {
_spEventQueue_complete(internal->queue, entry);
}
if (entry->loop)
complete = duration == 0 || (trackLastWrapped > FMOD(entry->trackTime, duration));
else
complete = (animationTime >= animationEnd && entry->animationLast < animationEnd);
if (complete) _spEventQueue_complete(internal->queue, entry);
/* Queue events after complete. */
for (; i < n; i++) {

View File

@ -378,10 +378,12 @@ namespace Spine {
}
// Queue complete if completed a loop iteration or the animation.
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
queue.Complete(entry);
}
var complete = false;
if (entry.loop)
complete = duration == 0 || (trackLastWrapped > entry.trackTime % duration);
else
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
if (complete) queue.Complete(entry);
// Queue events after complete.
for (; i < n; i++) {

View File

@ -399,10 +399,12 @@ public class AnimationState {
}
// Queue complete if completed a loop iteration or the animation.
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
queue.complete(entry);
}
boolean complete;
if (entry.loop)
complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
else
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
if (complete) queue.complete(entry);
// Queue events after complete.
for (; i < n; i++) {

View File

@ -593,7 +593,7 @@ function AnimationState:queueEvents (entry, animationTime)
-- Queue complete if completed a loop iteration or the animation.
local queueComplete = false
if entry.loop then
queueComplete = (trackLastWrapped > entry.trackTime % duration)
queueComplete = duration == 0 or (trackLastWrapped > entry.trackTime % duration)
else
queueComplete = (animationTime >= animationEnd and entry.animationLast < animationEnd)
end

View File

@ -1548,10 +1548,13 @@ var spine;
continue;
this.queue.event(entry, event_1);
}
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
var complete = false;
if (entry.loop)
complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
else
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
if (complete)
this.queue.complete(entry);
}
for (; i < n; i++) {
var event_2 = events[i];
if (event_2.time < animationStart)

File diff suppressed because one or more lines are too long

View File

@ -1548,10 +1548,13 @@ var spine;
continue;
this.queue.event(entry, event_1);
}
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
var complete = false;
if (entry.loop)
complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
else
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
if (complete)
this.queue.complete(entry);
}
for (; i < n; i++) {
var event_2 = events[i];
if (event_2.time < animationStart)

File diff suppressed because one or more lines are too long

View File

@ -1548,10 +1548,13 @@ var spine;
continue;
this.queue.event(entry, event_1);
}
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
var complete = false;
if (entry.loop)
complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
else
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
if (complete)
this.queue.complete(entry);
}
for (; i < n; i++) {
var event_2 = events[i];
if (event_2.time < animationStart)

File diff suppressed because one or more lines are too long

View File

@ -1548,10 +1548,13 @@ var spine;
continue;
this.queue.event(entry, event_1);
}
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
var complete = false;
if (entry.loop)
complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
else
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
if (complete)
this.queue.complete(entry);
}
for (; i < n; i++) {
var event_2 = events[i];
if (event_2.time < animationStart)

File diff suppressed because one or more lines are too long

View File

@ -1548,10 +1548,13 @@ var spine;
continue;
this.queue.event(entry, event_1);
}
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
var complete = false;
if (entry.loop)
complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
else
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
if (complete)
this.queue.complete(entry);
}
for (; i < n; i++) {
var event_2 = events[i];
if (event_2.time < animationStart)

File diff suppressed because one or more lines are too long

View File

@ -1548,10 +1548,13 @@ var spine;
continue;
this.queue.event(entry, event_1);
}
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
var complete = false;
if (entry.loop)
complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
else
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
if (complete)
this.queue.complete(entry);
}
for (; i < n; i++) {
var event_2 = events[i];
if (event_2.time < animationStart)

File diff suppressed because one or more lines are too long

View File

@ -347,10 +347,12 @@ module spine {
}
// Queue complete if completed a loop iteration or the animation.
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
this.queue.complete(entry);
}
var complete = false;
if (entry.loop)
complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
else
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
if (complete) this.queue.complete(entry);
// Queue events after complete.
for (; i < n; i++) {