mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-06 10:46:53 +08:00
noRotation transformMode experimentation.
This commit is contained in:
parent
367cf651cf
commit
2ea42d4cae
@ -155,6 +155,35 @@ public class Bone implements Updatable {
|
|||||||
}
|
}
|
||||||
case noRotation: {
|
case noRotation: {
|
||||||
if (false) {
|
if (false) {
|
||||||
|
// Simple loop.
|
||||||
|
// 1) Inherits scale in the wrong direction.
|
||||||
|
// 2) Doesn't flip.
|
||||||
|
float rotationY = rotation + 90 + shearY;
|
||||||
|
float la = cosDeg(rotation + shearX) * scaleX;
|
||||||
|
float lb = cosDeg(rotationY) * scaleY;
|
||||||
|
float lc = sinDeg(rotation + shearX) * scaleX;
|
||||||
|
float ld = sinDeg(rotationY) * scaleY;
|
||||||
|
Bone current = parent;
|
||||||
|
while (current != null) {
|
||||||
|
float ca = Math.abs(current.ascaleX);
|
||||||
|
float cb = 0;
|
||||||
|
float cc = 0;
|
||||||
|
float cd = Math.abs(current.ascaleY);
|
||||||
|
float za = ca * la + cb * lc;
|
||||||
|
float zb = ca * lb + cb * ld;
|
||||||
|
float zc = cc * la + cd * lc;
|
||||||
|
float zd = cc * lb + cd * ld;
|
||||||
|
la = za;
|
||||||
|
lb = zb;
|
||||||
|
lc = zc;
|
||||||
|
ld = zd;
|
||||||
|
current = current.parent;
|
||||||
|
}
|
||||||
|
a = la;
|
||||||
|
b = lb;
|
||||||
|
c = lc;
|
||||||
|
d = ld;
|
||||||
|
} else if (false) {
|
||||||
// Summing parent rotations.
|
// Summing parent rotations.
|
||||||
// 1) Negative parent scale causes bone to rotate.
|
// 1) Negative parent scale causes bone to rotate.
|
||||||
float sum = 0;
|
float sum = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user