[ts][pixi-v8] Fix skipRender regression introduced in 4.2.90. See #2919.

This commit is contained in:
Davide Tantillo 2025-09-15 17:41:16 +02:00
parent 6e281d6de7
commit 12e6e1fa34

View File

@ -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) {