mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
Merge branch '3.7-beta' into 3.7-beta-cpp
This commit is contained in:
commit
2962d038ea
Binary file not shown.
@ -293,10 +293,11 @@ package spine {
|
||||
|
||||
public function worldToLocalRotation(worldRotation : Number) : Number {
|
||||
var sin : Number = MathUtils.sinDeg(worldRotation), cos : Number = MathUtils.cosDeg(worldRotation);
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg;
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + rotation - shearX;
|
||||
}
|
||||
|
||||
public function localToWorldRotation(localRotation : Number) : Number {
|
||||
localRotation -= rotation - shearX;
|
||||
var sin : Number = MathUtils.sinDeg(localRotation), cos : Number = MathUtils.cosDeg(localRotation);
|
||||
return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;
|
||||
}
|
||||
|
||||
@ -264,11 +264,12 @@ float spBone_worldToLocalRotation (spBone* self, float worldRotation) {
|
||||
float sine, cosine;
|
||||
sine = SIN_DEG(worldRotation);
|
||||
cosine = COS_DEG(worldRotation);
|
||||
return ATAN2(self->a * sine - self->c * cosine, self->d * cosine - self->b * sine) * RAD_DEG;
|
||||
return ATAN2(self->a * sine - self->c * cosine, self->d * cosine - self->b * sine) * RAD_DEG + self->rotation - self->shearX;
|
||||
}
|
||||
|
||||
float spBone_localToWorldRotation (spBone* self, float localRotation) {
|
||||
float sine, cosine;
|
||||
localRotation -= self->rotation - self->shearX;
|
||||
sine = SIN_DEG(localRotation);
|
||||
cosine = COS_DEG(localRotation);
|
||||
return ATAN2(cosine * self->c + sine * self->d, cosine * self->a + sine * self->b) * RAD_DEG;
|
||||
|
||||
@ -237,10 +237,11 @@ float Bone::worldToLocalRotation(float worldRotation) {
|
||||
float sin = MathUtil::sinDeg(worldRotation);
|
||||
float cos = MathUtil::cosDeg(worldRotation);
|
||||
|
||||
return MathUtil::atan2(_a * sin - _c * cos, _d * cos - _b * sin) * MathUtil::Rad_Deg;
|
||||
return MathUtil::atan2(_a * sin - _c * cos, _d * cos - _b * sin) * MathUtil::Rad_Deg + this->_rotation - this->_shearX;
|
||||
}
|
||||
|
||||
float Bone::localToWorldRotation(float localRotation) {
|
||||
localRotation -= this->_rotation - this->_shearX;
|
||||
float sin = MathUtil::sinDeg(localRotation);
|
||||
float cos = MathUtil::cosDeg(localRotation);
|
||||
|
||||
|
||||
@ -286,10 +286,11 @@ end
|
||||
function Bone:worldToLocalRotation (worldRotation)
|
||||
local sin = math_sin(math_rad(worldRotation))
|
||||
local cos = math_cos(math_rad(worldRotation))
|
||||
return math_deg(math_atan2(self.a * sin - self.c * cos, self.d * cos - self.b * sin))
|
||||
return math_deg(math_atan2(self.a * sin - self.c * cos, self.d * cos - self.b * sin)) + self.rotation - self.shearX
|
||||
end
|
||||
|
||||
function Bone:localToWorldRotation (localRotation)
|
||||
localRotation = localRotation - (self.rotation - self.shearX)
|
||||
local sin = math_sin(math_rad(localRotation))
|
||||
local cos = math_cos(math_rad(localRotation))
|
||||
return math_deg(math_atan2(cos * self.c + sin * self.d, cos * self.a + sin * self.b))
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -2576,9 +2576,10 @@ var spine;
|
||||
};
|
||||
Bone.prototype.worldToLocalRotation = function (worldRotation) {
|
||||
var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg;
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;
|
||||
};
|
||||
Bone.prototype.localToWorldRotation = function (localRotation) {
|
||||
localRotation -= this.rotation - this.shearX;
|
||||
var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);
|
||||
return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2576,9 +2576,10 @@ var spine;
|
||||
};
|
||||
Bone.prototype.worldToLocalRotation = function (worldRotation) {
|
||||
var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg;
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;
|
||||
};
|
||||
Bone.prototype.localToWorldRotation = function (localRotation) {
|
||||
localRotation -= this.rotation - this.shearX;
|
||||
var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);
|
||||
return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2576,9 +2576,10 @@ var spine;
|
||||
};
|
||||
Bone.prototype.worldToLocalRotation = function (worldRotation) {
|
||||
var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg;
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;
|
||||
};
|
||||
Bone.prototype.localToWorldRotation = function (localRotation) {
|
||||
localRotation -= this.rotation - this.shearX;
|
||||
var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);
|
||||
return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2576,9 +2576,10 @@ var spine;
|
||||
};
|
||||
Bone.prototype.worldToLocalRotation = function (worldRotation) {
|
||||
var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg;
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;
|
||||
};
|
||||
Bone.prototype.localToWorldRotation = function (localRotation) {
|
||||
localRotation -= this.rotation - this.shearX;
|
||||
var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);
|
||||
return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2576,9 +2576,10 @@ var spine;
|
||||
};
|
||||
Bone.prototype.worldToLocalRotation = function (worldRotation) {
|
||||
var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg;
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;
|
||||
};
|
||||
Bone.prototype.localToWorldRotation = function (localRotation) {
|
||||
localRotation -= this.rotation - this.shearX;
|
||||
var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);
|
||||
return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2576,9 +2576,10 @@ var spine;
|
||||
};
|
||||
Bone.prototype.worldToLocalRotation = function (worldRotation) {
|
||||
var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg;
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;
|
||||
};
|
||||
Bone.prototype.localToWorldRotation = function (localRotation) {
|
||||
localRotation -= this.rotation - this.shearX;
|
||||
var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);
|
||||
return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -260,10 +260,11 @@ module spine {
|
||||
|
||||
worldToLocalRotation (worldRotation: number) {
|
||||
let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg;
|
||||
return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;
|
||||
}
|
||||
|
||||
localToWorldRotation (localRotation: number) {
|
||||
localRotation -= this.rotation - this.shearX;
|
||||
let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);
|
||||
return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user