ソースを参照

Merge branch '3.6' into 3.7-beta

badlogic 7 年 前
コミット
eb69071a0a

+ 10 - 0
CHANGELOG.md

@@ -15,6 +15,8 @@
   * Removed `RegionAttachment.vertices` field. The vertices array is provided to `RegionAttachment.computeWorldVertices` by the API user now.
   * 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.
   * 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`.
   * 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**
  * **Additions**
   * Added `Skeleton.getBounds` from reference implementation.
   * Added `Skeleton.getBounds` from reference implementation.
   * Added support for local and relative transform constraint calculation, including additional fields in `TransformConstraintData`
   * 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`.
   * 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.
   * 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`.
   * 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**
  * **Additions**
   * Added support for local and relative transform constraint calculation, including additional fields in `spTransformConstraintData`.
   * Added support for local and relative transform constraint calculation, including additional fields in `spTransformConstraintData`.
   * Added `spPointAttachment`, additional method `spAtlasAttachmentLoadeR_newPointAttachment`.
   * Added `spPointAttachment`, additional method `spAtlasAttachmentLoadeR_newPointAttachment`.
@@ -104,6 +107,8 @@
   * Added `stride` parameter to `VertexAttachment.ComputeWorldVertices`.
   * 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.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.
   * 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**
  * **Additions**
   * Added support for local and relative transform constraint calculation, including additional fields in `TransformConstraintData`
   * 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).
   * 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.
   * 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
   * 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.
   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**
  * **Additions**
   * Added support for local and relative transform constraint calculation, including additional fields in `TransformConstraintData`
   * 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).
   * 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 `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 `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.
   * 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**
  * **Additions**
   * Added `Bone:localToWorldRotation`(rotation given relative to x-axis, counter-clockwise, in degrees).
   * 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`.
   * 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 `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.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.
   * 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**
  * **Additions**
   * Added support for local and relative transform constraint calculation, including additional fields in `TransformConstraintData`
   * 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).
   * Added `Bone.localToWorldRotation`(rotation given relative to x-axis, counter-clockwise, in degrees).

BIN
spine-as3/spine-as3-example/lib/spine-as3.swc


+ 8 - 5
spine-as3/spine-as3/src/spine/animation/AnimationState.as

@@ -355,12 +355,15 @@ package spine.animation {
 				if (event.time < trackLastWrapped) break;
 				if (event.time < trackLastWrapped) break;
 				if (event.time > animationEnd) continue; // Discard events outside animation start/end.
 				if (event.time > animationEnd) continue; // Discard events outside animation start/end.
 				queue.event(entry, event);
 				queue.event(entry, event);
-			}
-
+			}			
+			
 			// Queue complete if completed a loop iteration or the animation.
 			// 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.
 			// Queue events after complete.
 			for (; i < n; i++) {
 			for (; i < n; i++) {

+ 6 - 5
spine-c/spine-c/src/spine/AnimationState.c

@@ -585,7 +585,7 @@ void _spAnimationState_queueEvents (spAnimationState* self, spTrackEntry* entry,
 	spEvent** events;
 	spEvent** events;
 	spEvent* event;
 	spEvent* event;
 	_spAnimationState* internal = SUB_CAST(_spAnimationState, self);
 	_spAnimationState* internal = SUB_CAST(_spAnimationState, self);
-	int i, n;
+	int i, n, complete;
 	float animationStart = entry->animationStart, animationEnd = entry->animationEnd;
 	float animationStart = entry->animationStart, animationEnd = entry->animationEnd;
 	float duration = animationEnd - animationStart;
 	float duration = animationEnd - animationStart;
 	float trackLastWrapped = FMOD(entry->trackLast, duration);
 	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. */
 	/* 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. */
 	/* Queue events after complete. */
 	for (; i < n; i++) {
 	for (; i < n; i++) {

+ 6 - 4
spine-csharp/src/AnimationState.cs

@@ -378,10 +378,12 @@ namespace Spine {
 			}
 			}
 
 
 			// Queue complete if completed a loop iteration or the animation.
 			// 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.
 			// Queue events after complete.
 			for (; i < n; i++) {
 			for (; i < n; i++) {

+ 6 - 4
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java

@@ -399,10 +399,12 @@ public class AnimationState {
 		}
 		}
 
 
 		// Queue complete if completed a loop iteration or the animation.
 		// 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.
 		// Queue events after complete.
 		for (; i < n; i++) {
 		for (; i < n; i++) {

+ 1 - 1
spine-lua/AnimationState.lua

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

BIN
spine-starling/spine-starling-example/lib/spine-as3.swc


BIN
spine-starling/spine-starling/lib/spine-as3.swc


+ 6 - 3
spine-ts/build/spine-all.js

@@ -1548,10 +1548,13 @@ var spine;
 					continue;
 					continue;
 				this.queue.event(entry, event_1);
 				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);
 				this.queue.complete(entry);
-			}
 			for (; i < n; i++) {
 			for (; i < n; i++) {
 				var event_2 = events[i];
 				var event_2 = events[i];
 				if (event_2.time < animationStart)
 				if (event_2.time < animationStart)

ファイルの差分が大きいため隠しています
+ 0 - 0
spine-ts/build/spine-all.js.map


+ 6 - 3
spine-ts/build/spine-canvas.js

@@ -1548,10 +1548,13 @@ var spine;
 					continue;
 					continue;
 				this.queue.event(entry, event_1);
 				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);
 				this.queue.complete(entry);
-			}
 			for (; i < n; i++) {
 			for (; i < n; i++) {
 				var event_2 = events[i];
 				var event_2 = events[i];
 				if (event_2.time < animationStart)
 				if (event_2.time < animationStart)

ファイルの差分が大きいため隠しています
+ 0 - 0
spine-ts/build/spine-canvas.js.map


+ 6 - 3
spine-ts/build/spine-core.js

@@ -1548,10 +1548,13 @@ var spine;
 					continue;
 					continue;
 				this.queue.event(entry, event_1);
 				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);
 				this.queue.complete(entry);
-			}
 			for (; i < n; i++) {
 			for (; i < n; i++) {
 				var event_2 = events[i];
 				var event_2 = events[i];
 				if (event_2.time < animationStart)
 				if (event_2.time < animationStart)

ファイルの差分が大きいため隠しています
+ 0 - 0
spine-ts/build/spine-core.js.map


+ 6 - 3
spine-ts/build/spine-threejs.js

@@ -1548,10 +1548,13 @@ var spine;
 					continue;
 					continue;
 				this.queue.event(entry, event_1);
 				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);
 				this.queue.complete(entry);
-			}
 			for (; i < n; i++) {
 			for (; i < n; i++) {
 				var event_2 = events[i];
 				var event_2 = events[i];
 				if (event_2.time < animationStart)
 				if (event_2.time < animationStart)

ファイルの差分が大きいため隠しています
+ 0 - 0
spine-ts/build/spine-threejs.js.map


+ 6 - 3
spine-ts/build/spine-webgl.js

@@ -1548,10 +1548,13 @@ var spine;
 					continue;
 					continue;
 				this.queue.event(entry, event_1);
 				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);
 				this.queue.complete(entry);
-			}
 			for (; i < n; i++) {
 			for (; i < n; i++) {
 				var event_2 = events[i];
 				var event_2 = events[i];
 				if (event_2.time < animationStart)
 				if (event_2.time < animationStart)

ファイルの差分が大きいため隠しています
+ 0 - 0
spine-ts/build/spine-webgl.js.map


+ 6 - 3
spine-ts/build/spine-widget.js

@@ -1548,10 +1548,13 @@ var spine;
 					continue;
 					continue;
 				this.queue.event(entry, event_1);
 				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);
 				this.queue.complete(entry);
-			}
 			for (; i < n; i++) {
 			for (; i < n; i++) {
 				var event_2 = events[i];
 				var event_2 = events[i];
 				if (event_2.time < animationStart)
 				if (event_2.time < animationStart)

ファイルの差分が大きいため隠しています
+ 0 - 0
spine-ts/build/spine-widget.js.map


+ 6 - 4
spine-ts/core/src/AnimationState.ts

@@ -347,10 +347,12 @@ module spine {
 			}
 			}
 
 
 			// Queue complete if completed a loop iteration or the animation.
 			// 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.
 			// Queue events after complete.
 			for (; i < n; i++) {
 			for (; i < n; i++) {

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません