From 5cdedfa8458254ea1f9f959fc719577e90bbc1b3 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 19 Mar 2024 22:06:11 +0100 Subject: [PATCH 1/3] [godot] Update setup.sh doc string with latest stable version. --- spine-godot/build/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-godot/build/setup.sh b/spine-godot/build/setup.sh index f5e5542c0..7a847f5dd 100755 --- a/spine-godot/build/setup.sh +++ b/spine-godot/build/setup.sh @@ -8,7 +8,7 @@ if [ $# -lt 2 ] || [ $# -gt 4 ]; then echo "Usage: ./setup.sh ? ?" echo echo "e.g.:" - echo " ./setup.sh 4.1.3-stable true" + echo " ./setup.sh 4.2.1-stable true" echo " ./setup.sh master false true" echo " ./setup.sh master false false https://github.com/my-github-username/godot.git" echo From 6adfde3c0fb7ab681ac92ca3924a314dd008108b Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Tue, 26 Mar 2024 12:15:51 +0100 Subject: [PATCH 2/3] [ts][pixi] Added PMA support. --- .../spine-pixi/example/mouse-following.html | 1 + spine-ts/spine-pixi/src/assets/atlasLoader.ts | 28 +++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/spine-ts/spine-pixi/example/mouse-following.html b/spine-ts/spine-pixi/example/mouse-following.html index fed53efa1..a11044ed2 100644 --- a/spine-ts/spine-pixi/example/mouse-following.html +++ b/spine-ts/spine-pixi/example/mouse-following.html @@ -49,6 +49,7 @@ // Make the stage interactive and register pointer events app.stage.eventMode = "dynamic"; + app.stage.hitArea = app.screen; let isDragging = false; app.stage.on("pointerdown", (e) => { diff --git a/spine-ts/spine-pixi/src/assets/atlasLoader.ts b/spine-ts/spine-pixi/src/assets/atlasLoader.ts index 94658d9cd..22c1ecb96 100644 --- a/spine-ts/spine-pixi/src/assets/atlasLoader.ts +++ b/spine-ts/spine-pixi/src/assets/atlasLoader.ts @@ -26,13 +26,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ - import { TextureAtlas } from "@esotericsoftware/spine-core"; import { SpineTexture } from "../SpineTexture.js"; import type { AssetExtension, Loader } from "@pixi/assets"; +import { Assets } from "@pixi/assets"; import { LoaderParserPriority, checkExtension } from "@pixi/assets"; import type { Texture } from "@pixi/core"; -import { ExtensionType, settings, utils, BaseTexture, extensions } from "@pixi/core"; +import { ALPHA_MODES, ExtensionType, settings, utils, BaseTexture, extensions } from "@pixi/core"; type RawAtlas = string; @@ -77,7 +77,7 @@ const spineTextureAtlasLoader: AssetExtension({ src: url, data: metadata.imageMetadata }).then((texture) => { - page.setTexture(SpineTexture.from(texture.baseTexture)); - }); + const assetsToLoadIn = { src: url, data: { ...metadata.imageMetadata, ...{ alphaMode: page.pma ? ALPHA_MODES.PMA : ALPHA_MODES.UNPACK } } }; + const pixiPromise = loader.load(assetsToLoadIn) + .then((texture) => { + page.setTexture(SpineTexture.from(texture.baseTexture)); + }); textureLoadingPromises.push(pixiPromise); } } await Promise.all(textureLoadingPromises); + // restoring preferCreateImageBitmap old value for loadTextures loader + Assets.setPreferences({ preferCreateImageBitmap: oldPreferCreateImageBitmap }); + return retval; }, }, From 1274c9ca8440b602f9dbfebb12c9b756fcaa4dda Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Thu, 11 Apr 2024 18:43:18 +0200 Subject: [PATCH 3/3] [unity] Fixed exception when SkeletonRenderSeparator causes null material with mask materials. Closes #2499. --- .../Runtime/spine-unity/Components/SkeletonRenderer.cs | 7 ++++++- spine-unity/Assets/Spine/package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs index ebdcb7e58..7912a6d5f 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs @@ -701,7 +701,12 @@ namespace Spine.Unity { Material[] originalMaterials = maskMaterials.materialsMaskDisabled; materialsToFill = new Material[originalMaterials.Length]; for (int i = 0; i < originalMaterials.Length; i++) { - Material newMaterial = new Material(originalMaterials[i]); + Material originalMaterial = originalMaterials[i]; + if (originalMaterial == null) { + materialsToFill[i] = null; + continue; + } + Material newMaterial = new Material(originalMaterial); newMaterial.SetFloat(STENCIL_COMP_PARAM_ID, (int)maskFunction); materialsToFill[i] = newMaterial; } diff --git a/spine-unity/Assets/Spine/package.json b/spine-unity/Assets/Spine/package.json index ca90e9ff5..b4d7cfaf4 100644 --- a/spine-unity/Assets/Spine/package.json +++ b/spine-unity/Assets/Spine/package.json @@ -2,7 +2,7 @@ "name": "com.esotericsoftware.spine.spine-unity", "displayName": "spine-unity Runtime", "description": "This plugin provides the spine-unity runtime core.", - "version": "4.1.40", + "version": "4.1.41", "unity": "2018.3", "author": { "name": "Esoteric Software",