mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
Merge pull request #357 from pharan/patch-2
Unnoticeably faster frontFacing SkeletonRenderer
This commit is contained in:
commit
577a8e301a
@ -417,7 +417,8 @@ public class SkeletonRenderer : MonoBehaviour {
|
||||
for (int i = startSlot, triangleIndex = 0; i < endSlot; i++) {
|
||||
Slot slot = drawOrder[i];
|
||||
Attachment attachment = slot.attachment;
|
||||
bool flip = frontFacing && ((slot.Bone.WorldFlipX != slot.Bone.WorldFlipY) != (Mathf.Sign(slot.Bone.WorldScaleX) != Mathf.Sign(slot.bone.WorldScaleY)));
|
||||
Bone bone = slot.bone;
|
||||
bool flip = frontFacing && ((bone.WorldFlipX != bone.WorldFlipY) != (Mathf.Sign(bone.WorldScaleX) != Mathf.Sign(bone.WorldScaleY)));
|
||||
|
||||
if (attachment is RegionAttachment) {
|
||||
if (!flip) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user