From 7f956acda75e9a08136970d3f659d8b5cc63e6b0 Mon Sep 17 00:00:00 2001 From: SmallMain Date: Wed, 4 Sep 2024 17:11:00 +0800 Subject: [PATCH] =?UTF-8?q?[engine]=20=E4=BF=AE=E5=A4=8D=20v1.2.0=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81=E5=BC=95?= =?UTF-8?q?=E5=85=A5=20spine=20cache=20=E6=A8=A1=E5=BC=8F=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E9=94=99=E8=AF=AF=EF=BC=88#8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/extensions/spine/Skeleton.js | 4 ++-- engine/extensions/spine/spine-assembler.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/extensions/spine/Skeleton.js b/engine/extensions/spine/Skeleton.js index abf0595e..dc8c84bd 100644 --- a/engine/extensions/spine/Skeleton.js +++ b/engine/extensions/spine/Skeleton.js @@ -480,7 +480,7 @@ sp.Skeleton = cc.Class({ // override base class _updateMaterial to set define value and clear material cache _updateMaterial () { - let useTint = this.useTint || (this.isAnimationCached() && !CC_NATIVERENDERER); + let useTint = this.useTint; let baseMaterial = this.getMaterial(0); if (baseMaterial) { const isMultiSupport = baseMaterial.material.isMultiSupport(); @@ -535,7 +535,7 @@ sp.Skeleton = cc.Class({ _updateUseTint () { let baseMaterial = this.getMaterial(0); if (baseMaterial) { - let useTint = this.useTint || (this.isAnimationCached() && !CC_NATIVERENDERER); + let useTint = this.useTint; if (baseMaterial.material.isMultiSupport()) { this._defineMaterialTint(baseMaterial, useTint); } else { diff --git a/engine/extensions/spine/spine-assembler.js b/engine/extensions/spine/spine-assembler.js index 9615f8da..661a930a 100644 --- a/engine/extensions/spine/spine-assembler.js +++ b/engine/extensions/spine/spine-assembler.js @@ -925,7 +925,7 @@ export default class SpineAssembler extends Assembler { if (!baseMaterial) return; _useMulti = baseMaterial.material.isMultiSupport(); - _useTint = comp.useTint || comp.isAnimationCached(); + _useTint = comp.useTint; _vertexFormat = _useTint ? (_useMulti ? VFTwoColorTexId : VFTwoColor) : (_useMulti ? VFOneColorTexId : (comp.isAnimationCached() ? VFTwoColor : VFOneColor)); // x y u v color1 color2 or x y u v color _perVertexSize = _useTint ? (_useMulti ? 7 : 6) : (_useMulti ? 6 : (comp.isAnimationCached() ? 6 : 5));