[ts] Fixed bug in IkConstraint

This commit is contained in:
badlogic 2016-10-17 15:23:59 +02:00
parent 71702a451a
commit 9197f6f0f7
13 changed files with 19 additions and 6 deletions

View File

@ -2164,6 +2164,8 @@ var spine;
}
};
IkConstraint.prototype.apply1 = function (bone, targetX, targetY, alpha) {
if (!bone.appliedValid)
bone.updateAppliedTransform();
var p = bone.parent;
var id = 1 / (p.a * p.d - p.b * p.c);
var x = targetX - p.worldX, y = targetY - p.worldY;

File diff suppressed because one or more lines are too long

View File

@ -2164,6 +2164,8 @@ var spine;
}
};
IkConstraint.prototype.apply1 = function (bone, targetX, targetY, alpha) {
if (!bone.appliedValid)
bone.updateAppliedTransform();
var p = bone.parent;
var id = 1 / (p.a * p.d - p.b * p.c);
var x = targetX - p.worldX, y = targetY - p.worldY;

File diff suppressed because one or more lines are too long

View File

@ -1921,6 +1921,8 @@ var spine;
}
};
IkConstraint.prototype.apply1 = function (bone, targetX, targetY, alpha) {
if (!bone.appliedValid)
bone.updateAppliedTransform();
var p = bone.parent;
var id = 1 / (p.a * p.d - p.b * p.c);
var x = targetX - p.worldX, y = targetY - p.worldY;

File diff suppressed because one or more lines are too long

View File

@ -1921,6 +1921,8 @@ var spine;
}
};
IkConstraint.prototype.apply1 = function (bone, targetX, targetY, alpha) {
if (!bone.appliedValid)
bone.updateAppliedTransform();
var p = bone.parent;
var id = 1 / (p.a * p.d - p.b * p.c);
var x = targetX - p.worldX, y = targetY - p.worldY;

File diff suppressed because one or more lines are too long

View File

@ -1921,6 +1921,8 @@ var spine;
}
};
IkConstraint.prototype.apply1 = function (bone, targetX, targetY, alpha) {
if (!bone.appliedValid)
bone.updateAppliedTransform();
var p = bone.parent;
var id = 1 / (p.a * p.d - p.b * p.c);
var x = targetX - p.worldX, y = targetY - p.worldY;

File diff suppressed because one or more lines are too long

View File

@ -1921,6 +1921,8 @@ var spine;
}
};
IkConstraint.prototype.apply1 = function (bone, targetX, targetY, alpha) {
if (!bone.appliedValid)
bone.updateAppliedTransform();
var p = bone.parent;
var id = 1 / (p.a * p.d - p.b * p.c);
var x = targetX - p.worldX, y = targetY - p.worldY;

File diff suppressed because one or more lines are too long

View File

@ -73,6 +73,7 @@ module spine {
/** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world
* coordinate system. */
apply1 (bone: Bone, targetX: number, targetY: number, alpha: number) {
if (!bone.appliedValid) bone.updateAppliedTransform();
let p = bone.parent;
let id = 1 / (p.a * p.d - p.b * p.c);
let x = targetX - p.worldX, y = targetY - p.worldY;