Closes #1065, make key pairs for mixing data unique

This commit is contained in:
badlogic 2018-01-12 10:34:03 +01:00
parent 4416582216
commit 4f4a4e8dce
13 changed files with 20 additions and 20 deletions

View File

@ -1862,11 +1862,11 @@ var spine;
throw new Error("from cannot be null."); throw new Error("from cannot be null.");
if (to == null) if (to == null)
throw new Error("to cannot be null."); throw new Error("to cannot be null.");
var key = from.name + to.name; var key = from.name + "." + to.name;
this.animationToMixTime[key] = duration; this.animationToMixTime[key] = duration;
}; };
AnimationStateData.prototype.getMix = function (from, to) { AnimationStateData.prototype.getMix = function (from, to) {
var key = from.name + to.name; var key = from.name + "." + to.name;
var value = this.animationToMixTime[key]; var value = this.animationToMixTime[key];
return value === undefined ? this.defaultMix : value; return value === undefined ? this.defaultMix : value;
}; };

File diff suppressed because one or more lines are too long

View File

@ -1862,11 +1862,11 @@ var spine;
throw new Error("from cannot be null."); throw new Error("from cannot be null.");
if (to == null) if (to == null)
throw new Error("to cannot be null."); throw new Error("to cannot be null.");
var key = from.name + to.name; var key = from.name + "." + to.name;
this.animationToMixTime[key] = duration; this.animationToMixTime[key] = duration;
}; };
AnimationStateData.prototype.getMix = function (from, to) { AnimationStateData.prototype.getMix = function (from, to) {
var key = from.name + to.name; var key = from.name + "." + to.name;
var value = this.animationToMixTime[key]; var value = this.animationToMixTime[key];
return value === undefined ? this.defaultMix : value; return value === undefined ? this.defaultMix : value;
}; };

File diff suppressed because one or more lines are too long

View File

@ -1862,11 +1862,11 @@ var spine;
throw new Error("from cannot be null."); throw new Error("from cannot be null.");
if (to == null) if (to == null)
throw new Error("to cannot be null."); throw new Error("to cannot be null.");
var key = from.name + to.name; var key = from.name + "." + to.name;
this.animationToMixTime[key] = duration; this.animationToMixTime[key] = duration;
}; };
AnimationStateData.prototype.getMix = function (from, to) { AnimationStateData.prototype.getMix = function (from, to) {
var key = from.name + to.name; var key = from.name + "." + to.name;
var value = this.animationToMixTime[key]; var value = this.animationToMixTime[key];
return value === undefined ? this.defaultMix : value; return value === undefined ? this.defaultMix : value;
}; };

File diff suppressed because one or more lines are too long

View File

@ -1862,11 +1862,11 @@ var spine;
throw new Error("from cannot be null."); throw new Error("from cannot be null.");
if (to == null) if (to == null)
throw new Error("to cannot be null."); throw new Error("to cannot be null.");
var key = from.name + to.name; var key = from.name + "." + to.name;
this.animationToMixTime[key] = duration; this.animationToMixTime[key] = duration;
}; };
AnimationStateData.prototype.getMix = function (from, to) { AnimationStateData.prototype.getMix = function (from, to) {
var key = from.name + to.name; var key = from.name + "." + to.name;
var value = this.animationToMixTime[key]; var value = this.animationToMixTime[key];
return value === undefined ? this.defaultMix : value; return value === undefined ? this.defaultMix : value;
}; };

File diff suppressed because one or more lines are too long

View File

@ -1862,11 +1862,11 @@ var spine;
throw new Error("from cannot be null."); throw new Error("from cannot be null.");
if (to == null) if (to == null)
throw new Error("to cannot be null."); throw new Error("to cannot be null.");
var key = from.name + to.name; var key = from.name + "." + to.name;
this.animationToMixTime[key] = duration; this.animationToMixTime[key] = duration;
}; };
AnimationStateData.prototype.getMix = function (from, to) { AnimationStateData.prototype.getMix = function (from, to) {
var key = from.name + to.name; var key = from.name + "." + to.name;
var value = this.animationToMixTime[key]; var value = this.animationToMixTime[key];
return value === undefined ? this.defaultMix : value; return value === undefined ? this.defaultMix : value;
}; };

File diff suppressed because one or more lines are too long

View File

@ -1862,11 +1862,11 @@ var spine;
throw new Error("from cannot be null."); throw new Error("from cannot be null.");
if (to == null) if (to == null)
throw new Error("to cannot be null."); throw new Error("to cannot be null.");
var key = from.name + to.name; var key = from.name + "." + to.name;
this.animationToMixTime[key] = duration; this.animationToMixTime[key] = duration;
}; };
AnimationStateData.prototype.getMix = function (from, to) { AnimationStateData.prototype.getMix = function (from, to) {
var key = from.name + to.name; var key = from.name + "." + to.name;
var value = this.animationToMixTime[key]; var value = this.animationToMixTime[key];
return value === undefined ? this.defaultMix : value; return value === undefined ? this.defaultMix : value;
}; };

File diff suppressed because one or more lines are too long

View File

@ -50,12 +50,12 @@ module spine {
setMixWith (from: Animation, to: Animation, duration: number) { setMixWith (from: Animation, to: Animation, duration: number) {
if (from == null) throw new Error("from cannot be null."); if (from == null) throw new Error("from cannot be null.");
if (to == null) throw new Error("to cannot be null."); if (to == null) throw new Error("to cannot be null.");
let key = from.name + to.name; let key = from.name + "." + to.name;
this.animationToMixTime[key] = duration; this.animationToMixTime[key] = duration;
} }
getMix (from: Animation, to: Animation) { getMix (from: Animation, to: Animation) {
let key = from.name + to.name; let key = from.name + "." + to.name;
let value = this.animationToMixTime[key]; let value = this.animationToMixTime[key];
return value === undefined ? this.defaultMix : value; return value === undefined ? this.defaultMix : value;
} }