mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
Fixed root translation with yDown coordinates.
http://www.esotericsoftware.com/forum/viewtopic.php?f=9&t=1657
This commit is contained in:
parent
3977ce93e2
commit
719e09d443
@ -78,7 +78,7 @@ public class Bone {
|
||||
_worldRotation = _data.inheritRotation ? _parent._worldRotation + rotation : rotation;
|
||||
} else {
|
||||
_worldX = flipX ? -x : x;
|
||||
_worldY = flipY ? -y : y;
|
||||
_worldY = (flipY != yDown) ? -y : y;
|
||||
_worldScaleX = scaleX;
|
||||
_worldScaleY = scaleY;
|
||||
_worldRotation = rotation;
|
||||
|
||||
@ -76,7 +76,7 @@ void spBone_updateWorldTransform (spBone* self, int flipX, int flipY) {
|
||||
self->data->inheritRotation ? self->parent->worldRotation + self->rotation : self->rotation;
|
||||
} else {
|
||||
CONST_CAST(float, self->worldX) = flipX ? -self->x : self->x;
|
||||
CONST_CAST(float, self->worldY) = flipX ? -self->y : self->y;
|
||||
CONST_CAST(float, self->worldY) = (flipY != yDown) ? -self->y : self->y;
|
||||
CONST_CAST(float, self->worldScaleX) = self->scaleX;
|
||||
CONST_CAST(float, self->worldScaleY) = self->scaleY;
|
||||
CONST_CAST(float, self->worldRotation) = self->rotation;
|
||||
|
||||
@ -85,7 +85,7 @@ namespace Spine {
|
||||
worldRotation = data.inheritRotation ? parent.worldRotation + rotation : rotation;
|
||||
} else {
|
||||
worldX = flipX ? -x : x;
|
||||
worldY = flipY ? -y : y;
|
||||
worldY = (flipY != yDown) ? -y : y;
|
||||
worldScaleX = scaleX;
|
||||
worldScaleY = scaleY;
|
||||
worldRotation = rotation;
|
||||
|
||||
@ -84,8 +84,8 @@ spine.Bone.prototype = {
|
||||
}
|
||||
this.worldRotation = this.data.inheritRotation ? parent.worldRotation + this.rotation : this.rotation;
|
||||
} else {
|
||||
this.worldX = this.x;
|
||||
this.worldY = this.y;
|
||||
this.worldX = flipX ? -this.x : this.x;
|
||||
this.worldY = (flipY != spine.Bone.yDown) ? -this.y : this.y;
|
||||
this.worldScaleX = this.scaleX;
|
||||
this.worldScaleY = this.scaleY;
|
||||
this.worldRotation = this.rotation;
|
||||
|
||||
@ -41,12 +41,12 @@ import com.badlogic.gdx.math.Matrix3;
|
||||
public class Bone {
|
||||
final BoneData data;
|
||||
final Bone parent;
|
||||
float x, y;
|
||||
public float x, y;
|
||||
float rotation;
|
||||
float scaleX, scaleY;
|
||||
|
||||
float m00, m01, worldX; // a b x
|
||||
float m10, m11, worldY; // c d y
|
||||
public float m00, m01, worldX; // a b x
|
||||
public float m10, m11, worldY; // c d y
|
||||
float worldRotation;
|
||||
float worldScaleX, worldScaleY;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user