mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
Layout is refreshed when spine logo is loaded.
This commit is contained in:
parent
9fb8da80db
commit
adfb71b5d3
@ -218,7 +218,7 @@ class SpineC3PluginInstance extends SDK.IWorldInstanceBase {
|
||||
} else {
|
||||
iRenderer.SetAlphaBlend();
|
||||
|
||||
const logo = (this._sdkType as SpineC3PluginType).getSpineLogo(iRenderer);
|
||||
const logo = (this._sdkType as SpineC3PluginType).getSpineLogo(iRenderer, this.layoutView);
|
||||
if (logo) {
|
||||
iRenderer.SetColorRgba(1, 1, 1, errorsString ? 0.25 : 1);
|
||||
iRenderer.SetTexture(logo);
|
||||
|
||||
@ -8,7 +8,7 @@ export class SpineC3PluginType extends SDK.ITypeBase {
|
||||
spineLogo?: SDK.Gfx.IWebGLTexture;
|
||||
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.spineLogoRequested) return undefined;
|
||||
|
||||
@ -20,6 +20,7 @@ export class SpineC3PluginType extends SDK.ITypeBase {
|
||||
|
||||
this.spineLogo = iRenderer.CreateDynamicTexture(image.width, image.height);
|
||||
iRenderer.UpdateTexture(image, this.spineLogo);
|
||||
iLayoutView.Refresh();
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user