mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 19:11:36 +08:00
[ts] yDown on FromRotate.
This commit is contained in:
parent
d2f0ace521
commit
503941ac92
@ -178,7 +178,7 @@ export class FromRotate extends FromProperty {
|
||||
value (skeleton: Skeleton, source: BonePose, local: boolean, offsets: Array<number>): number {
|
||||
if (local) return source.rotation + offsets[TransformConstraintData.ROTATION];
|
||||
let value = Math.atan2(source.c / skeleton.scaleY, source.a / skeleton.scaleX) * MathUtils.radDeg
|
||||
+ (source.a * source.d - source.b * source.c > 0 ? offsets[TransformConstraintData.ROTATION] : -offsets[TransformConstraintData.ROTATION]);
|
||||
+ (source.a * source.d - source.b * source.c > 0 ? offsets[TransformConstraintData.ROTATION] : -offsets[TransformConstraintData.ROTATION]) * Skeleton.yDir;
|
||||
if (value < 0) value += 360;
|
||||
return value;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user