mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2024-12-25 11:18:30 +00:00
[engine] 修复 v1.2.0 版本合并代码引入 spine cache 模式下的错误(#8)
This commit is contained in:
parent
2a97bc3a57
commit
7f956acda7
@ -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 {
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user