creator 3.0 spine 开启贴图预乘后报错

  • Creator 版本: 3.0.0

  • 目标平台:chrome for mac

  • 重现方式:开启Skeleton的贴图预乘

  • 首个报错: Uncaught TypeError: Cannot read property ‘fa’ of undefined
    at _handleColor (simple.ts:113)
    at cacheTraverse (simple.ts:787)
    at updateComponentRenderData (simple.ts:270)
    at Object.updateRenderData (simple.ts:165)
    at Skeleton._checkAndUpdateRenderData (renderable-2d.ts:450)
    at Skeleton.updateAssembler (renderable-2d.ts:425)
    at Batcher2D._preProcess (batcher-2d.ts:610)
    at Batcher2D.walk (batcher-2d.ts:588)
    at Batcher2D.walk (batcher-2d.ts:593)
    at Batcher2D._recursiveScreenNode (batcher-2d.ts:622)
    _handleColor @ simple.ts:113
    cacheTraverse @ simple.ts:787
    updateComponentRenderData @ simple.ts:270
    updateRenderData @ simple.ts:165
    _checkAndUpdateRenderData @ renderable-2d.ts:450
    updateAssembler @ renderable-2d.ts:425
    _preProcess @ batcher-2d.ts:610
    walk @ batcher-2d.ts:588
    walk @ batcher-2d.ts:593
    _recursiveScreenNode @ batcher-2d.ts:622
    update @ batcher-2d.ts:249
    frameMove @ root.ts:393
    mainLoop @ director.ts:904
    _callback @ game.ts:706
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705
    requestAnimationFrame (async)
    _callback @ game.ts:705

spine版本:3.7.94

我这边测试开启预乘没有该问题

开启预乘spine设置透明度半透后浑身散发金光,设置透明度为0后也有金色的轮廓残留。


在engine 下spine/assembler/simple.js 下

861行增加了一行判断
177行:function _handleColor(color) {}
内增加了一行判断:if (!color) return;

2赞

我也会这样, 不知道什么原因, 没加对Prefab回收不会出这个问题, 加入了
assetManager.releaseAsset(this.creatPrefab)
this.creatPrefab.destroy()
出现了, 是龙骨么?

Uncaught TypeError: Cannot read properties of null (reading ‘0’)
at Object.updateUvs (simple.ts:252)
at Object.updateRenderData (simple.ts:80)
at Sprite._checkAndUpdateRenderData (renderable-2d.ts:440)
at Sprite.updateAssembler (renderable-2d.ts:415)
at Batcher2D._preProcess (batcher-2d.ts:636)
at Batcher2D.walk (batcher-2d.ts:613)
at Batcher2D.walk (batcher-2d.ts:619)
at Batcher2D.walk (batcher-2d.ts:619)
at Batcher2D.walk (batcher-2d.ts:619)
at Batcher2D._recursiveScreenNode (batcher-2d.ts:648)

1赞