feat(showcase): use manual track

This commit is contained in:
Haoyu Xu
2023-02-09 23:53:14 -05:00
parent 658e25cd31
commit 36afd6d786
5 changed files with 16 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ export default function spinePlayer(el) {
entry.mixDuration = 0.3;
widget.animationState.addAnimation(0, "Idle", true, 0);
}
window.settings.loadViewport()
window.settings.success()
},
})
}

View File

@@ -37,6 +37,7 @@ export default class Settings {
#padBottom = this.#defaultPadBottom
#logoX = this.#defaultLogoX
#logoY = this.#defaultLogoY
#isInsightsInited = false
constructor(el, logoEl) {
this.#el = el
@@ -62,6 +63,17 @@ export default class Settings {
this.#insertHTML()
}
success() {
this.loadViewport()
this.insights(false)
}
insights(flag) {
if (this.#isInsightsInited) return
window.umami.trackView(`/${import.meta.env.VITE_LINK}${flag ? "?steam" : ""}`);
this.#isInsightsInited = true
}
setFPS(value) {
this.#fps = value
this.spinePlayer.setFps(value)

View File

@@ -5,6 +5,7 @@ window.wallpaperPropertyListener = {
}
},
applyUserProperties: function (properties) {
window.settings.insights(true)
if (properties.logo) {
window.settings.setLogoDisplay(!properties.logo.value)
}