mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
Fixed scale of constrained bones with transform constraint relative + local.
This commit is contained in:
parent
68413182fb
commit
efac69ee7a
@ -263,8 +263,8 @@ package spine {
|
||||
var rotation : Number = bone.arotation + (target.arotation + _data.offsetRotation) * mixRotate;
|
||||
var x : Number = bone.ax + (target.ax + _data.offsetX) * mixX;
|
||||
var y : Number = bone.ay + (target.ay + _data.offsetY) * mixY;
|
||||
var scaleX : Number = (bone.ascaleX * ((target.ascaleX - 1 + _data.offsetScaleX) * mixScaleX) + 1);
|
||||
var scaleY : Number = (bone.ascaleY * ((target.ascaleY - 1 + _data.offsetScaleY) * mixScaleY) + 1);
|
||||
var scaleX : Number = bone.ascaleX * (((target.ascaleX - 1 + _data.offsetScaleX) * mixScaleX) + 1);
|
||||
var scaleY : Number = bone.ascaleY * (((target.ascaleY - 1 + _data.offsetScaleY) * mixScaleY) + 1);
|
||||
var shearY : Number = bone.ashearY + (target.ashearY + _data.offsetShearY) * mixShearY;
|
||||
|
||||
bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);
|
||||
|
||||
@ -231,8 +231,8 @@ void _spTransformConstraint_applyRelativeLocal(spTransformConstraint *self) {
|
||||
rotation = bone->arotation + (target->arotation + self->data->offsetRotation) * mixRotate;
|
||||
x = bone->ax + (target->ax + self->data->offsetX) * mixX;
|
||||
y = bone->ay + (target->ay + self->data->offsetY) * mixY;
|
||||
scaleX = (bone->ascaleX * ((target->ascaleX - 1 + self->data->offsetScaleX) * mixScaleX) + 1);
|
||||
scaleY = (bone->ascaleY * ((target->ascaleY - 1 + self->data->offsetScaleY) * mixScaleY) + 1);
|
||||
scaleX = bone->ascaleX * (((target->ascaleX - 1 + self->data->offsetScaleX) * mixScaleX) + 1);
|
||||
scaleY = bone->ascaleY * (((target->ascaleY - 1 + self->data->offsetScaleY) * mixScaleY) + 1);
|
||||
shearY = bone->ashearY + (target->ashearY + self->data->offsetShearY) * mixShearY;
|
||||
|
||||
spBone_updateWorldTransformWith(bone, x, y, rotation, scaleX, scaleY, bone->ashearX, shearY);
|
||||
|
||||
@ -327,8 +327,8 @@ void TransformConstraint::applyRelativeLocal() {
|
||||
float rotation = bone._arotation + (target._arotation + _data._offsetRotation) * mixRotate;
|
||||
float x = bone._ax + (target._ax + _data._offsetX) * mixX;
|
||||
float y = bone._ay + (target._ay + _data._offsetY) * mixY;
|
||||
float scaleX = (bone._ascaleX * ((target._ascaleX - 1 + _data._offsetScaleX) * mixScaleX) + 1);
|
||||
float scaleY = (bone._ascaleY * ((target._ascaleY - 1 + _data._offsetScaleY) * mixScaleY) + 1);
|
||||
float scaleX = bone._ascaleX * (((target._ascaleX - 1 + _data._offsetScaleX) * mixScaleX) + 1);
|
||||
float scaleY = bone._ascaleY * (((target._ascaleY - 1 + _data._offsetScaleY) * mixScaleY) + 1);
|
||||
float shearY = bone._ashearY + (target._ashearY + _data._offsetShearY) * mixShearY;
|
||||
|
||||
bone.updateWorldTransform(x, y, rotation, scaleX, scaleY, bone._ashearX, shearY);
|
||||
|
||||
@ -276,8 +276,8 @@ namespace Spine {
|
||||
float rotation = bone.arotation + (target.arotation + data.offsetRotation) * mixRotate;
|
||||
float x = bone.ax + (target.ax + data.offsetX) * mixX;
|
||||
float y = bone.ay + (target.ay + data.offsetY) * mixY;
|
||||
float scaleX = (bone.ascaleX * ((target.ascaleX - 1 + data.offsetScaleX) * mixScaleX) + 1);
|
||||
float scaleY = (bone.ascaleY * ((target.ascaleY - 1 + data.offsetScaleY) * mixScaleY) + 1);
|
||||
float scaleX = bone.ascaleX * (((target.ascaleX - 1 + data.offsetScaleX) * mixScaleX) + 1);
|
||||
float scaleY = bone.ascaleY * (((target.ascaleY - 1 + data.offsetScaleY) * mixScaleY) + 1);
|
||||
float shearY = bone.ashearY + (target.ashearY + data.offsetShearY) * mixShearY;
|
||||
|
||||
bone.UpdateWorldTransform(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);
|
||||
|
||||
@ -278,8 +278,8 @@ public class TransformConstraint implements Updatable {
|
||||
float rotation = bone.arotation + (target.arotation + data.offsetRotation) * mixRotate;
|
||||
float x = bone.ax + (target.ax + data.offsetX) * mixX;
|
||||
float y = bone.ay + (target.ay + data.offsetY) * mixY;
|
||||
float scaleX = (bone.ascaleX * ((target.ascaleX - 1 + data.offsetScaleX) * mixScaleX) + 1);
|
||||
float scaleY = (bone.ascaleY * ((target.ascaleY - 1 + data.offsetScaleY) * mixScaleY) + 1);
|
||||
float scaleX = bone.ascaleX * (((target.ascaleX - 1 + data.offsetScaleX) * mixScaleX) + 1);
|
||||
float scaleY = bone.ascaleY * (((target.ascaleY - 1 + data.offsetScaleY) * mixScaleY) + 1);
|
||||
float shearY = bone.ashearY + (target.ashearY + data.offsetShearY) * mixShearY;
|
||||
|
||||
bone.updateWorldTransform(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);
|
||||
|
||||
@ -309,8 +309,8 @@ function TransformConstraint:applyRelativeLocal ()
|
||||
local rotation = bone.arotation + (target.arotation + self.data.offsetRotation) * mixRotate
|
||||
local x = bone.ax + (target.ax + self.data.offsetX) * mixX
|
||||
local y = bone.ay + (target.ay + self.data.offsetY) * mixY
|
||||
local scaleX = (bone.ascaleX * ((target.ascaleX - 1 + self.data.offsetScaleX) * mixScaleX) + 1)
|
||||
local scaleY = (bone.ascaleY * ((target.ascaleY - 1 + self.data.offsetScaleY) * mixScaleY) + 1)
|
||||
local scaleX = bone.ascaleX * (((target.ascaleX - 1 + self.data.offsetScaleX) * mixScaleX) + 1)
|
||||
local scaleY = bone.ascaleY * (((target.ascaleY - 1 + self.data.offsetScaleY) * mixScaleY) + 1)
|
||||
local shearY = bone.ashearY + (target.ashearY + self.data.offsetShearY) * mixShearY
|
||||
bone:updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user