Formatter.

This commit is contained in:
Davide Tantillo 2025-05-05 16:18:49 +02:00
parent 2bf85467dc
commit 228d49ff05
2 changed files with 5 additions and 5 deletions

View File

@ -368,7 +368,7 @@ export class AssetManagerBase implements Disposable {
} }
// dispose asset only if it's not used by others // dispose asset only if it's not used by others
disposeAsset(path: string) { disposeAsset (path: string) {
if (--this.assetsRefCount[path] === 0) { if (--this.assetsRefCount[path] === 0) {
this.remove(path) this.remove(path)
} }

View File

@ -560,7 +560,7 @@ export class SpineWebComponentWidget extends HTMLElement implements Disposable,
* Remove callbacks added through {@link addCursorSlotEventCallback}. * Remove callbacks added through {@link addCursorSlotEventCallback}.
* @param slot: the slot reference to which remove the associated callback * @param slot: the slot reference to which remove the associated callback
*/ */
public removeCursorSlotEventCallbacks(slot: number | string | Slot) { public removeCursorSlotEventCallbacks (slot: number | string | Slot) {
this.cursorSlotEventCallbacks.delete(this.getSlotFromRef(slot)); this.cursorSlotEventCallbacks.delete(this.getSlotFromRef(slot));
} }
@ -700,7 +700,7 @@ export class SpineWebComponentWidget extends HTMLElement implements Disposable,
* A Promise that resolve to the widget itself once assets loading is terminated. * A Promise that resolve to the widget itself once assets loading is terminated.
* Useful to safely access {@link skeleton} and {@link state} after a new widget has been just created. * Useful to safely access {@link skeleton} and {@link state} after a new widget has been just created.
*/ */
public get whenReady(): Promise<this> { public get whenReady (): Promise<this> {
return this._whenReady; return this._whenReady;
}; };
private _whenReady: Promise<this>; private _whenReady: Promise<this>;
@ -1082,7 +1082,7 @@ export class SpineWebComponentWidget extends HTMLElement implements Disposable,
: this.overlay.assetManager.loadTextureAtlasButNoTexturesAsync(atlasPath).then(() => { : this.overlay.assetManager.loadTextureAtlasButNoTexturesAsync(atlasPath).then(() => {
this.lastAtlasPath = atlasPath; this.lastAtlasPath = atlasPath;
return this.loadTexturesInPagesAttribute(); return this.loadTexturesInPagesAttribute();
}), }),
]); ]);
const atlas = this.overlay.assetManager.require(atlasPath) as TextureAtlas; const atlas = this.overlay.assetManager.require(atlasPath) as TextureAtlas;
@ -1414,7 +1414,7 @@ export class SpineWebComponentWidget extends HTMLElement implements Disposable,
} }
} }
private disposeGLResources() { private disposeGLResources () {
const { assetManager } = this.overlay; const { assetManager } = this.overlay;
if (this.lastAtlasPath) assetManager.disposeAsset(this.lastAtlasPath); if (this.lastAtlasPath) assetManager.disposeAsset(this.lastAtlasPath);
if (this.lastSkelPath) assetManager.disposeAsset(this.lastSkelPath); if (this.lastSkelPath) assetManager.disposeAsset(this.lastSkelPath);