feat(showcase): open settings in browser by default
This commit is contained in:
@@ -2,4 +2,4 @@
|
|||||||
!.git
|
!.git
|
||||||
!CNAME
|
!CNAME
|
||||||
!.nojekyll
|
!.nojekyll
|
||||||
!wallpaper_engine.js
|
!project.json
|
||||||
@@ -12,6 +12,5 @@
|
|||||||
<body style="background-image: url('./assets/background/operator_bg.png');">
|
<body style="background-image: url('./assets/background/operator_bg.png');">
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/index.js"></script>
|
<script type="module" src="/src/index.js"></script>
|
||||||
<script src="/wallpaper_engine.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -27,7 +27,6 @@ export default class Settings {
|
|||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
}
|
}
|
||||||
#hidden = !((new URLSearchParams(window.location.search)).has("settings") || import.meta.env.MODE === 'development')
|
|
||||||
#fps = this.#defaultFps
|
#fps = this.#defaultFps
|
||||||
#ratio = this.#defaultRatio
|
#ratio = this.#defaultRatio
|
||||||
#opacity = this.#defaultOpacity
|
#opacity = this.#defaultOpacity
|
||||||
@@ -71,6 +70,16 @@ export default class Settings {
|
|||||||
this.loadViewport()
|
this.loadViewport()
|
||||||
this.insights(false, false)
|
this.insights(false, false)
|
||||||
this.#updateOptions("animation_selection", this.spinePlayer.skeleton.data.animations.map(e => e.name))
|
this.#updateOptions("animation_selection", this.spinePlayer.skeleton.data.animations.map(e => e.name))
|
||||||
|
if ((new URLSearchParams(window.location.search)).has("settings") || import.meta.env.MODE === 'development') {
|
||||||
|
this.open()
|
||||||
|
}
|
||||||
|
fetch('/project.json').then(response => response.json()).then(data => {
|
||||||
|
if (data.aklive2d) {
|
||||||
|
this.open()
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
insights(isWallpaperEngine, doNotTrack) {
|
insights(isWallpaperEngine, doNotTrack) {
|
||||||
@@ -320,7 +329,7 @@ export default class Settings {
|
|||||||
|
|
||||||
#insertHTML() {
|
#insertHTML() {
|
||||||
this.#el.innerHTML = `
|
this.#el.innerHTML = `
|
||||||
<div ${this.#hidden && "hidden"}>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<label for="fps">FPS</label>
|
<label for="fps">FPS</label>
|
||||||
<input type="range" min="1" max="60" value="${this.#fps}" step="1" id="fps_slider"/>
|
<input type="range" min="1" max="60" value="${this.#fps}" step="1" id="fps_slider"/>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import Music from '@/components/music'
|
|||||||
|
|
||||||
document.querySelector('#app').innerHTML = `
|
document.querySelector('#app').innerHTML = `
|
||||||
<img src="./assets/${import.meta.env.VITE_LOGO_FILENAME}.png" class="logo invert-filter" id="logo" alt="operator logo" />
|
<img src="./assets/${import.meta.env.VITE_LOGO_FILENAME}.png" class="logo invert-filter" id="logo" alt="operator logo" />
|
||||||
<div id="settings"></div>
|
<div id="settings" hidden></div>
|
||||||
<div id="voice_box" hidden></div>
|
<div id="voice_box" hidden></div>
|
||||||
<div id="music_box" hidden></div>
|
<div id="music_box" hidden></div>
|
||||||
<div id="widget-wrapper">
|
<div id="widget-wrapper">
|
||||||
|
|||||||
Reference in New Issue
Block a user