From 93c226fbb86780388fd8f4e15ca50e2bc09fa0c3 Mon Sep 17 00:00:00 2001 From: bofeng Date: Fri, 18 Oct 2024 11:36:18 +0800 Subject: [PATCH 1/3] Fix the issue on the Alipay platform caused by incorrect type usage after my.request failure. --- platforms/minigame/platforms/alipay/wrapper/builtin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/minigame/platforms/alipay/wrapper/builtin.js b/platforms/minigame/platforms/alipay/wrapper/builtin.js index 0255f8e628a..0f6031d3bc3 100644 --- a/platforms/minigame/platforms/alipay/wrapper/builtin.js +++ b/platforms/minigame/platforms/alipay/wrapper/builtin.js @@ -1684,7 +1684,7 @@ var XMLHttpRequest = function (_EventTarget) { errorMessage = _res$errorMessage === undefined ? "" : _res$errorMessage; var data = res.data || ""; - if (data.includes("超时") || errorMessage.includes("超时")) { + if ((typeof data === "string" && data.includes("超时")) || errorMessage.includes("超时")) { _triggerEvent.call(_this2, 'timeout'); } From 7b25db9a0e7976e7284e8f0c0f2f7c88f8a7a209 Mon Sep 17 00:00:00 2001 From: bofeng Date: Mon, 21 Oct 2024 18:01:28 +0800 Subject: [PATCH 2/3] Fix the issue with incorrect use of the Spine blend mode. --- cocos/spine/assembler/simple.ts | 2 +- .../spine-creator-support/SkeletonCacheAnimation.cpp | 2 +- .../editor-support/spine-creator-support/SkeletonRenderer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/spine/assembler/simple.ts b/cocos/spine/assembler/simple.ts index bab9885f9c4..98d1e128d21 100644 --- a/cocos/spine/assembler/simple.ts +++ b/cocos/spine/assembler/simple.ts @@ -72,7 +72,7 @@ function _getSlotMaterial (blendMode: number, comp: Skeleton): MaterialInstance dst = BlendFactor.ONE_MINUS_SRC_ALPHA; break; case 3: - src = BlendFactor.ONE; + src = _premultipliedAlpha ? BlendFactor.ONE : BlendFactor.SRC_ALPHA; dst = BlendFactor.ONE_MINUS_SRC_COLOR; break; case 0: diff --git a/native/cocos/editor-support/spine-creator-support/SkeletonCacheAnimation.cpp b/native/cocos/editor-support/spine-creator-support/SkeletonCacheAnimation.cpp index a423e86bf82..fd5ca483c1d 100644 --- a/native/cocos/editor-support/spine-creator-support/SkeletonCacheAnimation.cpp +++ b/native/cocos/editor-support/spine-creator-support/SkeletonCacheAnimation.cpp @@ -287,7 +287,7 @@ void SkeletonCacheAnimation::render(float /*dt*/) { curBlendDst = static_cast(BlendFactor::ONE_MINUS_SRC_ALPHA); break; case BlendMode_Screen: - curBlendSrc = static_cast(BlendFactor::ONE); + curBlendSrc = static_cast(_premultipliedAlpha ? BlendFactor::ONE : BlendFactor::SRC_ALPHA); curBlendDst = static_cast(BlendFactor::ONE_MINUS_SRC_COLOR); break; default: diff --git a/native/cocos/editor-support/spine-creator-support/SkeletonRenderer.cpp b/native/cocos/editor-support/spine-creator-support/SkeletonRenderer.cpp index 6b7bf607ec3..65d3b8a64c2 100644 --- a/native/cocos/editor-support/spine-creator-support/SkeletonRenderer.cpp +++ b/native/cocos/editor-support/spine-creator-support/SkeletonRenderer.cpp @@ -346,7 +346,7 @@ void SkeletonRenderer::render(float /*deltaTime*/) { curBlendDst = static_cast(BlendFactor::ONE_MINUS_SRC_ALPHA); break; case BlendMode_Screen: - curBlendSrc = static_cast(BlendFactor::ONE); + curBlendSrc = static_cast(_premultipliedAlpha ? BlendFactor::ONE : BlendFactor::SRC_ALPHA); curBlendDst = static_cast(BlendFactor::ONE_MINUS_SRC_COLOR); break; default: From 4b1f903284d2966e07ffc7f81cdd6b6ef4c79548 Mon Sep 17 00:00:00 2001 From: bofeng Date: Mon, 21 Oct 2024 18:03:22 +0800 Subject: [PATCH 3/3] Revert "Fix the issue with incorrect use of the Spine blend mode." This reverts commit 7b25db9a0e7976e7284e8f0c0f2f7c88f8a7a209. --- cocos/spine/assembler/simple.ts | 2 +- .../spine-creator-support/SkeletonCacheAnimation.cpp | 2 +- .../editor-support/spine-creator-support/SkeletonRenderer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/spine/assembler/simple.ts b/cocos/spine/assembler/simple.ts index 98d1e128d21..bab9885f9c4 100644 --- a/cocos/spine/assembler/simple.ts +++ b/cocos/spine/assembler/simple.ts @@ -72,7 +72,7 @@ function _getSlotMaterial (blendMode: number, comp: Skeleton): MaterialInstance dst = BlendFactor.ONE_MINUS_SRC_ALPHA; break; case 3: - src = _premultipliedAlpha ? BlendFactor.ONE : BlendFactor.SRC_ALPHA; + src = BlendFactor.ONE; dst = BlendFactor.ONE_MINUS_SRC_COLOR; break; case 0: diff --git a/native/cocos/editor-support/spine-creator-support/SkeletonCacheAnimation.cpp b/native/cocos/editor-support/spine-creator-support/SkeletonCacheAnimation.cpp index fd5ca483c1d..a423e86bf82 100644 --- a/native/cocos/editor-support/spine-creator-support/SkeletonCacheAnimation.cpp +++ b/native/cocos/editor-support/spine-creator-support/SkeletonCacheAnimation.cpp @@ -287,7 +287,7 @@ void SkeletonCacheAnimation::render(float /*dt*/) { curBlendDst = static_cast(BlendFactor::ONE_MINUS_SRC_ALPHA); break; case BlendMode_Screen: - curBlendSrc = static_cast(_premultipliedAlpha ? BlendFactor::ONE : BlendFactor::SRC_ALPHA); + curBlendSrc = static_cast(BlendFactor::ONE); curBlendDst = static_cast(BlendFactor::ONE_MINUS_SRC_COLOR); break; default: diff --git a/native/cocos/editor-support/spine-creator-support/SkeletonRenderer.cpp b/native/cocos/editor-support/spine-creator-support/SkeletonRenderer.cpp index 65d3b8a64c2..6b7bf607ec3 100644 --- a/native/cocos/editor-support/spine-creator-support/SkeletonRenderer.cpp +++ b/native/cocos/editor-support/spine-creator-support/SkeletonRenderer.cpp @@ -346,7 +346,7 @@ void SkeletonRenderer::render(float /*deltaTime*/) { curBlendDst = static_cast(BlendFactor::ONE_MINUS_SRC_ALPHA); break; case BlendMode_Screen: - curBlendSrc = static_cast(_premultipliedAlpha ? BlendFactor::ONE : BlendFactor::SRC_ALPHA); + curBlendSrc = static_cast(BlendFactor::ONE); curBlendDst = static_cast(BlendFactor::ONE_MINUS_SRC_COLOR); break; default: