From b697b54525e413d5c66deb2e5f293e3c18475b56 Mon Sep 17 00:00:00 2001 From: Cosma Alex Vergari Date: Fri, 8 May 2026 18:00:26 +0200 Subject: [PATCH] fix: update quad on subtexture node texture setter --- src/core/CoreNode.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/CoreNode.ts b/src/core/CoreNode.ts index 8725d37..8ce393e 100644 --- a/src/core/CoreNode.ts +++ b/src/core/CoreNode.ts @@ -13,7 +13,8 @@ import type { BufferCollection } from './renderers/webgl/internal/BufferCollecti import type { CoreRenderer } from './renderers/CoreRenderer.js'; import type { Stage } from './Stage.js'; import { - type Texture, + Texture, + TextureType, type TextureCoords, type TextureFailedEventHandler, type TextureFreedEventHandler, @@ -2774,6 +2775,11 @@ export class CoreNode extends EventEmitter { this.loadTexture(); } + if (this.texture?.type === TextureType.subTexture && this.textureLoaded) { + // When setting the texture value of a subtexture but the atlas is already loaded, + // requestRenderListUpdate is not triggered, but we still need to update the quad + this.isQuadDirty = true; + } this.setUpdateType(UpdateType.IsRenderable); this.updateIsSimple(); }