Skip to content

Commit

Permalink
no curve in IK constraint keyframes
Browse files Browse the repository at this point in the history
  • Loading branch information
flyover committed Apr 27, 2016
1 parent e46a82f commit ffe28d9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions spine.js
Original file line number Diff line number Diff line change
Expand Up @@ -2384,14 +2384,10 @@ spine.OrderKeyframe.prototype.load = function(json) {
*/
spine.IkcKeyframe = function() {
goog.base(this);

this.curve = new spine.Curve();
}

goog.inherits(spine.IkcKeyframe, spine.Keyframe);

/** @type {spine.Curve} */
spine.IkcKeyframe.prototype.curve;
/** @type {number} */
spine.IkcKeyframe.prototype.mix = 1;
/** @type {boolean} */
Expand All @@ -2403,7 +2399,6 @@ spine.IkcKeyframe.prototype.bend_positive = true;
*/
spine.IkcKeyframe.prototype.load = function(json) {
goog.base(this, 'load', json);
this.curve.load(json);
this.mix = spine.loadFloat(json, 'mix', 1);
this.bend_positive = spine.loadBool(json, 'bendPositive', true);
return this;
Expand Down Expand Up @@ -3323,7 +3318,7 @@ spine.Pose.prototype.strike = function() {
var ikc_keyframe0 = anim_ikc.ikc_keyframes[keyframe_index];
var ikc_keyframe1 = anim_ikc.ikc_keyframes[keyframe_index + 1];
if (ikc_keyframe1) {
pct = ikc_keyframe0.curve.evaluate((time - ikc_keyframe0.time) / (ikc_keyframe1.time - ikc_keyframe0.time));
pct = (time - ikc_keyframe0.time) / (ikc_keyframe1.time - ikc_keyframe0.time);
ikc_mix = spine.tween(ikc_keyframe0.mix, ikc_keyframe1.mix, pct);
} else {
ikc_mix = ikc_keyframe0.mix;
Expand Down

0 comments on commit ffe28d9

Please sign in to comment.