chore: 基线 — 已发布壁纸现状原样入库(未做任何改动)
dist/ 为 Wallpaper Engine 网页壁纸「【崩坏:星穹铁道】昔涟」(workshopid 3604974793, version 2), 含两套预设 xilian / kv37,总计 105.1MB。本次提交不做任何修改,仅作为后续优化的对拍基线。
This commit is contained in:
commit
d8c7e492f7
35 files changed
+193916
No files matched your search
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
export default class PresetController {
|
||||
constructor(presetStore) {
|
||||
this.presetStore = presetStore;
|
||||
this.previousPreset = "";
|
||||
this.currentPreset = "";
|
||||
}
|
||||
getName() {
|
||||
return Object.keys(this.presetStore);
|
||||
}
|
||||
set(newPreset, currentAudioSource, currentAudioVolume) {
|
||||
let newPresetData = JSON.parse(JSON.stringify(this.presetStore[newPreset]));
|
||||
if (this.previousPreset) {
|
||||
if (
|
||||
currentAudioSource &&
|
||||
this.presetStore[this.previousPreset].audioOptions.source !==
|
||||
currentAudioSource
|
||||
) {
|
||||
newPresetData.audioOptions.source = currentAudioSource;
|
||||
}
|
||||
if (
|
||||
currentAudioVolume ||
|
||||
(currentAudioVolume === 0 &&
|
||||
this.presetStore[this.previousPreset].audioOptions.volume !==
|
||||
currentAudioVolume)
|
||||
) {
|
||||
newPresetData.audioOptions.volume = currentAudioVolume;
|
||||
}
|
||||
}
|
||||
if (this.currentPreset) {
|
||||
this.previousPreset = this.currentPreset;
|
||||
}
|
||||
this.currentPreset = newPreset;
|
||||
return newPresetData;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user