mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[ts] Fixed bug in IkConstraint
This commit is contained in:
parent
71702a451a
commit
9197f6f0f7
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user