Layout is refreshed when spine logo is loaded.

This commit is contained in:
Davide Tantillo 2025-12-18 09:33:47 +01:00
parent 9fb8da80db
commit adfb71b5d3
2 changed files with 3 additions and 2 deletions

View File

@ -218,7 +218,7 @@ class SpineC3PluginInstance extends SDK.IWorldInstanceBase {
} else { } else {
iRenderer.SetAlphaBlend(); iRenderer.SetAlphaBlend();
const logo = (this._sdkType as SpineC3PluginType).getSpineLogo(iRenderer); const logo = (this._sdkType as SpineC3PluginType).getSpineLogo(iRenderer, this.layoutView);
if (logo) { if (logo) {
iRenderer.SetColorRgba(1, 1, 1, errorsString ? 0.25 : 1); iRenderer.SetColorRgba(1, 1, 1, errorsString ? 0.25 : 1);
iRenderer.SetTexture(logo); iRenderer.SetTexture(logo);

View File

@ -8,7 +8,7 @@ export class SpineC3PluginType extends SDK.ITypeBase {
spineLogo?: SDK.Gfx.IWebGLTexture; spineLogo?: SDK.Gfx.IWebGLTexture;
private spineLogoRequested = false; private spineLogoRequested = false;
getSpineLogo (iRenderer: SDK.Gfx.IWebGLRenderer) { getSpineLogo (iRenderer: SDK.Gfx.IWebGLRenderer, iLayoutView: SDK.UI.ILayoutView) {
if (this.spineLogo) return this.spineLogo; if (this.spineLogo) return this.spineLogo;
if (this.spineLogoRequested) return undefined; if (this.spineLogoRequested) return undefined;
@ -20,6 +20,7 @@ export class SpineC3PluginType extends SDK.ITypeBase {
this.spineLogo = iRenderer.CreateDynamicTexture(image.width, image.height); this.spineLogo = iRenderer.CreateDynamicTexture(image.width, image.height);
iRenderer.UpdateTexture(image, this.spineLogo); iRenderer.UpdateTexture(image, this.spineLogo);
iLayoutView.Refresh();
}) })
} }