diff --git a/spine-ts/spine-pixi-v8/src/Spine.ts b/spine-ts/spine-pixi-v8/src/Spine.ts index 421fc4178..0d00137e4 100644 --- a/spine-ts/spine-pixi-v8/src/Spine.ts +++ b/spine-ts/spine-pixi-v8/src/Spine.ts @@ -27,21 +27,6 @@ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -import { - Assets, - Bounds, - Cache, - Container, - ContainerOptions, - DestroyOptions, - fastCopy, - Graphics, - PointData, - Texture, - Ticker, - ViewContainer, -} from 'pixi.js'; -import { ISpineDebugRenderer } from './SpineDebugRenderer.js'; import { AnimationState, AnimationStateData, @@ -66,6 +51,21 @@ import { TrackEntry, Vector2, } from '@esotericsoftware/spine-core'; +import { + Assets, + Bounds, + Cache, + Container, + ContainerOptions, + DestroyOptions, + fastCopy, + Graphics, + PointData, + Texture, + Ticker, + ViewContainer, +} from 'pixi.js'; +import { ISpineDebugRenderer } from './SpineDebugRenderer.js'; /** * Options to create a {@link Spine} using {@link Spine.from}. @@ -669,14 +669,16 @@ export class Spine extends ViewContainer { ); if (this.alpha === 0 || alpha === 0) { + if (!cacheData.skipRender) this.spineAttachmentsDirty = true; cacheData.skipRender = true; } else { + if (cacheData.skipRender) this.spineAttachmentsDirty = true; + cacheData.skipRender = cacheData.clipped = false; + if (slot.darkColor) { cacheData.darkColor.setFromColor(slot.darkColor); } - cacheData.skipRender = cacheData.clipped = false; - const texture = attachment.region?.texture.texture || Texture.EMPTY; if (cacheData.texture !== texture) {