Merge pull request #1866 from 2youyou2/master

improve WrappedInfo.prototype.set performance
This commit is contained in:
Jare Guo
2017-08-01 16:52:44 +08:00
committed by GitHub
+7 -3
View File
@@ -84,12 +84,16 @@ function WrappedInfo (info) {
this.direction = 1;
this.stopped = true;
this.iterations = 0;
this.frameIndex = undefined;
}
WrappedInfo.prototype.set = function (info) {
for (var k in info) {
this[k] = info[k];
}
this.ratio = info.ratio;
this.time = info.time;
this.direction = info.direction;
this.stopped = info.stopped;
this.iterations = info.iterations;
this.frameIndex = info.frameIndex;
};
/**