Skip to content

Commit

Permalink
add spine.Space.tween
Browse files Browse the repository at this point in the history
  • Loading branch information
flyover committed Dec 24, 2015
1 parent dc45737 commit 715e78b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spine.js
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,22 @@ spine.Space.untransform = function (space, v, out)
return out;
}

/**
* @return {spine.Space}
* @param {spine.Space} a
* @param {spine.Space} b
* @param {number} tween
* @param {spine.Space=} out
*/
spine.Space.tween = function (a, b, tween, out)
{
out.position.x = spine.tween(a.position.x, b.position.x, tween);
out.position.y = spine.tween(a.position.y, b.position.y, tween);
out.rotation.rad = spine.tweenAngle(a.rotation.rad, b.rotation.rad, tween);
out.scale.x = spine.tween(a.scale.x, b.scale.x, tween);
out.scale.y = spine.tween(a.scale.y, b.scale.y, tween);
return out;
}
/**
* @constructor
*/
Expand Down

0 comments on commit 715e78b

Please sign in to comment.