[ts] Move SHOW_FPS to overlay. Add wecomponents to build.sh.

This commit is contained in:
Davide Tantillo 2025-05-09 16:12:34 +02:00
parent c9b040f797
commit e8cf7ba3b6
3 changed files with 8 additions and 6 deletions

View File

@ -24,6 +24,7 @@ then
spine-pixi-v8/dist/iife/* \
spine-phaser-v3/dist/iife/* \
spine-phaser-v4/dist/iife/* \
spine-webcomponents/dist/iife/* \
spine-core/dist/esm/* \
spine-canvas/dist/esm/* \
spine-webgl/dist/esm/* \
@ -33,6 +34,7 @@ then
spine-pixi-v8/dist/esm/* \
spine-phaser-v3/dist/esm/* \
spine-phaser-v4/dist/esm/* \
spine-webcomponents/dist/esm/* \
spine-player/css/spine-player.css
curl -f -F "file=@spine-ts.zip" "$TS_UPDATE_URL$BRANCH"
else

View File

@ -57,6 +57,11 @@ export class SpineWebComponentOverlay extends HTMLElement implements OverlayAttr
return overlay;
}
/**
* If true, enables a top-left span showing FPS (it has black text)
*/
public static SHOW_FPS = false;
/**
* A list holding the widgets added to this overlay.
*/
@ -416,7 +421,7 @@ export class SpineWebComponentOverlay extends HTMLElement implements OverlayAttr
}
// fps top-left span
if (SpineWebComponentSkeleton.SHOW_FPS) {
if (SpineWebComponentOverlay.SHOW_FPS) {
if (!this.fpsAppended) {
this.div.appendChild(this.fps);
this.fpsAppended = true;

View File

@ -137,11 +137,6 @@ interface WidgetInternalProperties {
export class SpineWebComponentSkeleton extends HTMLElement implements Disposable, WidgetAttributes, WidgetOverridableMethods, WidgetInternalProperties, Partial<WidgetPublicProperties> {
/**
* If true, enables a top-left span showing FPS (it has black text)
*/
public static SHOW_FPS = false;
/**
* The URL of the skeleton atlas file (.atlas)
* Connected to `atlas` attribute.