+
diff --git a/packages/stage-ui/src/components/Scenarios/Settings/ModelSettings/Live2D.vue b/packages/stage-ui/src/components/Scenarios/Settings/ModelSettings/Live2D.vue
index 075702683..f63ab2416 100644
--- a/packages/stage-ui/src/components/Scenarios/Settings/ModelSettings/Live2D.vue
+++ b/packages/stage-ui/src/components/Scenarios/Settings/ModelSettings/Live2D.vue
@@ -5,10 +5,10 @@ import localforage from 'localforage'
import { Checkbox, FieldRange, Input } from '@proj-airi/ui'
import { useFileDialog, useObjectUrl } from '@vueuse/core'
import { storeToRefs } from 'pinia'
-import { ref, watch } from 'vue'
+import { ref } from 'vue'
import { useI18n } from 'vue-i18n'
-import { Emotion, EmotionNeutralMotionName } from '../../../../constants'
+import { Emotion } from '../../../../constants'
import { useLive2d, useSettings } from '../../../../stores'
import { Section } from '../../../Layouts'
import { Button } from '../../../Misc'
@@ -36,7 +36,6 @@ const live2d = useLive2d()
const {
modelFile,
motionMap,
- loadingModel,
availableMotions,
modelUrl,
currentMotion,
@@ -49,30 +48,10 @@ modelFileDialog.onChange((files) => {
if (files && files.length > 0) {
motionMap.value = {}
modelFile.value = files[0]
- loadingModel.value = true
live2d.shouldUpdateView()
}
})
-watch(loadingModel, (value) => {
- if (value) {
- return
- }
-
- if (!modelFile.value) {
- return
- }
-
- availableMotions.value.forEach((motion) => {
- if (motion.motionName in Emotion) {
- motionMap.value[motion.fileName] = motion.motionName
- }
- else {
- motionMap.value[motion.fileName] = EmotionNeutralMotionName
- }
- })
-})
-
async function patchMotionMap(source: File, motionMap: Record
): Promise {
if (!Object.keys(motionMap).length)
return source
@@ -115,7 +94,6 @@ async function saveMotionMap() {
const patchedFile = await patchMotionMap(fileFromIndexedDB, motionMap.value)
modelFile.value = patchedFile
- loadingModel.value = true
}
const exportObjectUrl = useObjectUrl(modelFile)
@@ -130,6 +108,8 @@ const exportObjectUrl = useObjectUrl(modelFile)
'bg-white/80 dark:bg-black/75',
'backdrop-blur-lg',
]"
+ size="sm"
+ :expand="false"
>