Przeglądaj źródła

[c][lua][as3][ts] Don't use DIP_MIX across tracks. Closes #931

badlogic 8 lat temu
rodzic
commit
c6fefe8fa0

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


+ 2 - 6
spine-as3/spine-as3/src/spine/animation/AnimationState.as

@@ -551,14 +551,10 @@ package spine.animation {
 			animationsChanged = false;
 
 			var propertyIDs : Dictionary = this.propertyIDs = new Dictionary();					
-			var mixingTo : Vector.<TrackEntry> = this.mixingTo;
-			var lastEntry : TrackEntry = null;
+			var mixingTo : Vector.<TrackEntry> = this.mixingTo;			
 			for (var i : int = 0, n : int = tracks.length; i < n; i++) {
 				var entry : TrackEntry = tracks[i];
-				if (entry != null) {
-					entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
-					lastEntry = entry;
-				}
+				if (entry != null) entry.setTimelineData(null, mixingTo, propertyIDs);				
 			}
 		}
 

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

@@ -801,7 +801,6 @@ void _spAnimationState_animationsChanged (spAnimationState* self) {
 	_spAnimationState* internal = SUB_CAST(_spAnimationState, self);
 	int i, n;
 	spTrackEntry* entry;
-	spTrackEntry* lastEntry = 0;
 	spTrackEntryArray* mixingTo;
 	internal->animationsChanged = 0;
 
@@ -812,10 +811,7 @@ void _spAnimationState_animationsChanged (spAnimationState* self) {
 
 	for (;i < n; i++) {
 		entry = self->tracks[i];
-		if (entry != 0) {
-			_spTrackEntry_setTimelineData(entry, lastEntry, mixingTo, self);
-			lastEntry = entry;
-		}
+		if (entry != 0) _spTrackEntry_setTimelineData(entry, 0, mixingTo, self);
 	}
 }
 

+ 5 - 7
spine-lua/AnimationState.lua

@@ -804,17 +804,15 @@ function AnimationState:disposeNext (entry)
 end
 
 function AnimationState:_animationsChanged ()
-  self.animationsChanged = false
+	self.animationsChanged = false
 
-  self.propertyIDs = {}
-  local propertyIDs = self.propertyIDs
+	self.propertyIDs = {}
+	local propertyIDs = self.propertyIDs
 	local mixingTo = self.mixingTo
-	
-  local lastEntry = nil
+	  
 	for i, entry in pairs(self.tracks) do
 		if entry then
-			entry:setTimelineData(lastEntry, mixingTo, propertyIDs)
-			lastEntry = entry
+			entry:setTimelineData(nil, mixingTo, propertyIDs)			
 		end
 	end
 end

+ 1 - 1
spine-sfml/example/main.cpp

@@ -396,7 +396,7 @@ int main () {
 	testcase(test, "data/tank-pro.json", "data/tank-pro.skel", "data/tank.atlas", 1.0f);
 	testcase(coin, "data/coin-pro.json", "data/coin-pro.skel", "data/coin.atlas", 0.5f);
 	testcase(vine, "data/vine-pro.json", "data/vine-pro.skel", "data/vine.atlas", 0.5f);
-	testcase(tank, "data/tank-pro.json", "data/tank-pro.skel", "data/tank.atlas", 0.2f);*/
+	testcase(tank, "data/tank-pro.json", "data/tank-pro.skel", "data/tank.atlas", 0.2f);
 	testcase(raptor, "data/raptor-pro.json", "data/raptor-pro.skel", "data/raptor.atlas", 0.5f);
 	testcase(spineboy, "data/spineboy-ess.json", "data/spineboy-ess.skel", "data/spineboy.atlas", 0.6f);
 	testcase(goblins, "data/goblins-pro.json", "data/goblins-pro.skel", "data/goblins.atlas", 1.4f);

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


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


+ 2 - 5
spine-ts/build/spine-all.js

@@ -1581,13 +1581,10 @@ var spine;
 			var propertyIDs = this.propertyIDs;
 			propertyIDs.clear();
 			var mixingTo = this.mixingTo;
-			var lastEntry = null;
 			for (var i = 0, n = this.tracks.length; i < n; i++) {
 				var entry = this.tracks[i];
-				if (entry != null) {
-					entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
-					lastEntry = entry;
-				}
+				if (entry != null)
+					entry.setTimelineData(null, mixingTo, propertyIDs);
 			}
 		};
 		AnimationState.prototype.getCurrent = function (trackIndex) {

Plik diff jest za duży
+ 0 - 0
spine-ts/build/spine-all.js.map


+ 2 - 5
spine-ts/build/spine-canvas.js

@@ -1581,13 +1581,10 @@ var spine;
 			var propertyIDs = this.propertyIDs;
 			propertyIDs.clear();
 			var mixingTo = this.mixingTo;
-			var lastEntry = null;
 			for (var i = 0, n = this.tracks.length; i < n; i++) {
 				var entry = this.tracks[i];
-				if (entry != null) {
-					entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
-					lastEntry = entry;
-				}
+				if (entry != null)
+					entry.setTimelineData(null, mixingTo, propertyIDs);
 			}
 		};
 		AnimationState.prototype.getCurrent = function (trackIndex) {

Plik diff jest za duży
+ 0 - 0
spine-ts/build/spine-canvas.js.map


+ 2 - 5
spine-ts/build/spine-core.js

@@ -1581,13 +1581,10 @@ var spine;
 			var propertyIDs = this.propertyIDs;
 			propertyIDs.clear();
 			var mixingTo = this.mixingTo;
-			var lastEntry = null;
 			for (var i = 0, n = this.tracks.length; i < n; i++) {
 				var entry = this.tracks[i];
-				if (entry != null) {
-					entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
-					lastEntry = entry;
-				}
+				if (entry != null)
+					entry.setTimelineData(null, mixingTo, propertyIDs);
 			}
 		};
 		AnimationState.prototype.getCurrent = function (trackIndex) {

Plik diff jest za duży
+ 0 - 0
spine-ts/build/spine-core.js.map


+ 2 - 5
spine-ts/build/spine-threejs.js

@@ -1581,13 +1581,10 @@ var spine;
 			var propertyIDs = this.propertyIDs;
 			propertyIDs.clear();
 			var mixingTo = this.mixingTo;
-			var lastEntry = null;
 			for (var i = 0, n = this.tracks.length; i < n; i++) {
 				var entry = this.tracks[i];
-				if (entry != null) {
-					entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
-					lastEntry = entry;
-				}
+				if (entry != null)
+					entry.setTimelineData(null, mixingTo, propertyIDs);
 			}
 		};
 		AnimationState.prototype.getCurrent = function (trackIndex) {

Plik diff jest za duży
+ 0 - 0
spine-ts/build/spine-threejs.js.map


+ 2 - 5
spine-ts/build/spine-webgl.js

@@ -1581,13 +1581,10 @@ var spine;
 			var propertyIDs = this.propertyIDs;
 			propertyIDs.clear();
 			var mixingTo = this.mixingTo;
-			var lastEntry = null;
 			for (var i = 0, n = this.tracks.length; i < n; i++) {
 				var entry = this.tracks[i];
-				if (entry != null) {
-					entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
-					lastEntry = entry;
-				}
+				if (entry != null)
+					entry.setTimelineData(null, mixingTo, propertyIDs);
 			}
 		};
 		AnimationState.prototype.getCurrent = function (trackIndex) {

Plik diff jest za duży
+ 0 - 0
spine-ts/build/spine-webgl.js.map


+ 2 - 5
spine-ts/build/spine-widget.js

@@ -1581,13 +1581,10 @@ var spine;
 			var propertyIDs = this.propertyIDs;
 			propertyIDs.clear();
 			var mixingTo = this.mixingTo;
-			var lastEntry = null;
 			for (var i = 0, n = this.tracks.length; i < n; i++) {
 				var entry = this.tracks[i];
-				if (entry != null) {
-					entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
-					lastEntry = entry;
-				}
+				if (entry != null)
+					entry.setTimelineData(null, mixingTo, propertyIDs);
 			}
 		};
 		AnimationState.prototype.getCurrent = function (trackIndex) {

Plik diff jest za duży
+ 0 - 0
spine-ts/build/spine-widget.js.map


+ 3 - 7
spine-ts/core/src/AnimationState.ts

@@ -208,7 +208,7 @@ module spine {
 			let firstFrame = from.timelinesRotation.length == 0;
 			if (firstFrame) Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);
 			let timelinesRotation = from.timelinesRotation;
-			
+
 			let pose: MixPose;
 			let alphaDip = from.alpha * to.interruptAlpha, alphaMix = alphaDip * (1 - mix), alpha = 0;
 			from.totalAlpha = 0;
@@ -239,7 +239,7 @@ module spine {
 				from.totalAlpha += alpha;
 				if (timeline instanceof RotateTimeline)
 					this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, pose, timelinesRotation, i << 1, firstFrame);
-				else {					
+				else {
 					timeline.apply(skeleton, animationLast, animationTime, events, alpha, pose, MixDirection.out);
 				}
 			}
@@ -540,13 +540,9 @@ module spine {
 			propertyIDs.clear();
 			let mixingTo = this.mixingTo;
 
-			let lastEntry: TrackEntry = null;
 			for (var i = 0, n = this.tracks.length; i < n; i++) {
 				let entry = this.tracks[i];
-				if (entry != null) {
-					entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
-					lastEntry = entry;
-				}
+				if (entry != null) entry.setTimelineData(null, mixingTo, propertyIDs);
 			}
 		}
 

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików