mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[ts] Fix missing BonePose shearX
This commit is contained in:
parent
4200024fbb
commit
236989ffec
@ -164,7 +164,7 @@ export class BonePose extends BoneLocal implements Update {
|
|||||||
r = Math.PI / 2 + Math.atan2(zc, za);
|
r = Math.PI / 2 + Math.atan2(zc, za);
|
||||||
const zb = Math.cos(r) * s;
|
const zb = Math.cos(r) * s;
|
||||||
const zd = Math.sin(r) * s;
|
const zd = Math.sin(r) * s;
|
||||||
const rx = MathUtils.degRad;
|
const rx = shearX * MathUtils.degRad;
|
||||||
const ry = (90 + shearY) * MathUtils.degRad;
|
const ry = (90 + shearY) * MathUtils.degRad;
|
||||||
const la = Math.cos(rx) * scaleX;
|
const la = Math.cos(rx) * scaleX;
|
||||||
const lb = Math.cos(ry) * scaleY;
|
const lb = Math.cos(ry) * scaleY;
|
||||||
|
|||||||
@ -134,7 +134,7 @@ export class IkConstraint extends Constraint<IkConstraint, IkConstraintData, IkC
|
|||||||
const sc = pc / skeleton.scaleY;
|
const sc = pc / skeleton.scaleY;
|
||||||
pb = -sc * s * skeleton.scaleX;
|
pb = -sc * s * skeleton.scaleX;
|
||||||
pd = sa * s * skeleton.scaleY;
|
pd = sa * s * skeleton.scaleY;
|
||||||
rotationIK += Math.atan2(sc, sa) * MathUtils.radDeg;
|
rotationIK += MathUtils.atan2Deg(sc, sa);
|
||||||
}
|
}
|
||||||
// Fall through
|
// Fall through
|
||||||
default: {
|
default: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user