mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
Merge branch '4.2-beta' of https://github.com/esotericsoftware/spine-runtimes into 4.2-beta
This commit is contained in:
commit
371bfcff28
@ -3,6 +3,8 @@
|
||||
#
|
||||
set(DEPS_DIR "${CMAKE_CURRENT_LIST_DIR}/dependencies/")
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_OSX_ARCHITECTURES x86_64)
|
||||
set(ONLY_ACTIVE_ARCH NO)
|
||||
set(SFML_URL "https://www.sfml-dev.org/files/SFML-2.5.1-macOS-clang.tar.gz")
|
||||
set(SFML_DIR ${DEPS_DIR}/SFML-2.5.1-macos-clang)
|
||||
if (NOT EXISTS "${SFML_DIR}")
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
#
|
||||
set(DEPS_DIR "${CMAKE_CURRENT_LIST_DIR}/dependencies/")
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_OSX_ARCHITECTURES x86_64)
|
||||
set(ONLY_ACTIVE_ARCH NO)
|
||||
set(SFML_URL "https://www.sfml-dev.org/files/SFML-2.5.1-macOS-clang.tar.gz")
|
||||
set(SFML_DIR ${DEPS_DIR}/SFML-2.5.1-macos-clang)
|
||||
if (NOT EXISTS "${SFML_DIR}")
|
||||
|
||||
@ -193,6 +193,10 @@ namespace Spine.Unity.AttachmentTools {
|
||||
region.index = -1;
|
||||
region.degrees = s.packed && s.packingRotation != SpritePackingRotation.None ? 90 : 0;
|
||||
|
||||
// World space units
|
||||
Bounds bounds = s.bounds;
|
||||
Vector2 boundsMin = bounds.min, boundsMax = bounds.max;
|
||||
|
||||
// Texture space/pixel units
|
||||
Rect spineRect = s.textureRect.SpineUnityFlipRect(s.texture.height);
|
||||
Rect originalRect = s.rect;
|
||||
@ -200,8 +204,8 @@ namespace Spine.Unity.AttachmentTools {
|
||||
region.originalWidth = (int)originalRect.width;
|
||||
region.height = (int)spineRect.height;
|
||||
region.originalHeight = (int)originalRect.height;
|
||||
region.offsetX = s.textureRectOffset.x;
|
||||
region.offsetY = s.textureRectOffset.y;
|
||||
region.offsetX = s.textureRectOffset.x + spineRect.width * (0.5f - InverseLerp(boundsMin.x, boundsMax.x, 0));
|
||||
region.offsetY = s.textureRectOffset.y + spineRect.height * (0.5f - InverseLerp(boundsMin.y, boundsMax.y, 0));
|
||||
|
||||
if (isolatedTexture) {
|
||||
region.u = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user