|
@@ -1,7 +1,6 @@
|
|
import { sdk } from './sdk'
|
|
import { sdk } from './sdk'
|
|
-import { fuseModels, taggings, isEdit, sysBus, getFuseModelShowVariable, SceneType } from '@/store'
|
|
|
|
import { toRaw, ref, watch, nextTick } from 'vue'
|
|
import { toRaw, ref, watch, nextTick } from 'vue'
|
|
-import { viewModeStack, custom, getResource } from '@/env'
|
|
|
|
|
|
+import { viewModeStack, showLeftPanoStack, custom, getResource } from '@/env'
|
|
import {
|
|
import {
|
|
mount,
|
|
mount,
|
|
diffArrayChange,
|
|
diffArrayChange,
|
|
@@ -10,8 +9,18 @@ import {
|
|
showLoad,
|
|
showLoad,
|
|
hideLoad,
|
|
hideLoad,
|
|
deepIsRevise,
|
|
deepIsRevise,
|
|
- round
|
|
|
|
|
|
+ round,
|
|
|
|
+ togetherCallback
|
|
} from '@/utils'
|
|
} from '@/utils'
|
|
|
|
+import {
|
|
|
|
+ fuseModels,
|
|
|
|
+ taggings,
|
|
|
|
+ isEdit,
|
|
|
|
+ sysBus,
|
|
|
|
+ getFuseModelShowVariable,
|
|
|
|
+ SceneType,
|
|
|
|
+ backupFuseModels
|
|
|
|
+} from '@/store'
|
|
|
|
|
|
import TaggingComponent from '@/components/tagging/list.vue'
|
|
import TaggingComponent from '@/components/tagging/list.vue'
|
|
|
|
|
|
@@ -92,12 +101,14 @@ const associationModels = (sdk: SDK) => {
|
|
sceneModel.bus.on('loadDone', () => {
|
|
sceneModel.bus.on('loadDone', () => {
|
|
item.loaded = true
|
|
item.loaded = true
|
|
hideLoad()
|
|
hideLoad()
|
|
|
|
+ backupFuseModels()
|
|
})
|
|
})
|
|
sceneModel.bus.on('loadError', () => {
|
|
sceneModel.bus.on('loadError', () => {
|
|
item.error = true
|
|
item.error = true
|
|
item.show = false
|
|
item.show = false
|
|
custom.showModelsMap.delete(item)
|
|
custom.showModelsMap.delete(item)
|
|
hideLoad()
|
|
hideLoad()
|
|
|
|
+ backupFuseModels()
|
|
})
|
|
})
|
|
sceneModel.bus.on('loadProgress', progress => item.progress = progress)
|
|
sceneModel.bus.on('loadProgress', progress => item.progress = progress)
|
|
}
|
|
}
|
|
@@ -115,8 +126,8 @@ const associationModels = (sdk: SDK) => {
|
|
watch(() => item.bottom, () => isUnSet || getSceneModel(item)?.changeBottom(item.bottom), {immediate: true})
|
|
watch(() => item.bottom, () => isUnSet || getSceneModel(item)?.changeBottom(item.bottom), {immediate: true})
|
|
watch(() => item.opacity, () => isUnSet || getSceneModel(item)?.changeOpacity(item.opacity), {immediate: true})
|
|
watch(() => item.opacity, () => isUnSet || getSceneModel(item)?.changeOpacity(item.opacity), {immediate: true})
|
|
watch(() => item.scale, () => isUnSet || getSceneModel(item)?.changeScale(item.scale), {immediate: true})
|
|
watch(() => item.scale, () => isUnSet || getSceneModel(item)?.changeScale(item.scale), {immediate: true})
|
|
- // watch(() => item.position, () => isUnSet || getSceneModel(item)?.changePosition(item.position), {immediate: true})
|
|
|
|
- // watch(() => item.rotation, () => isUnSet || getSceneModel(item)?.changeRotation(item.rotation), {immediate: true})
|
|
|
|
|
|
+ watch(() => item.position, () => isUnSet || getSceneModel(item)?.changePosition(item.position), {immediate: true})
|
|
|
|
+ watch(() => item.rotation, () => isUnSet || getSceneModel(item)?.changeRotation(item.rotation), {immediate: true})
|
|
watch(() => modelShow.value, () => isUnSet || getSceneModel(item)?.changeShow(modelShow.value), {immediate: true})
|
|
watch(() => modelShow.value, () => isUnSet || getSceneModel(item)?.changeShow(modelShow.value), {immediate: true})
|
|
stopLoadedWatch()
|
|
stopLoadedWatch()
|
|
}
|
|
}
|
|
@@ -143,7 +154,10 @@ const associationTaggings = (el: HTMLDivElement) => {
|
|
|
|
|
|
|
|
|
|
const fullView = async (fn: () => void) => {
|
|
const fullView = async (fn: () => void) => {
|
|
- const popViewMode = viewModeStack.push(ref('full'))
|
|
|
|
|
|
+ const popViewMode = togetherCallback([
|
|
|
|
+ viewModeStack.push(ref('full')),
|
|
|
|
+ showLeftPanoStack.push(ref(false))
|
|
|
|
+ ])
|
|
await document.documentElement.requestFullscreen()
|
|
await document.documentElement.requestFullscreen()
|
|
const driving = () => document.fullscreenElement || fn()
|
|
const driving = () => document.fullscreenElement || fn()
|
|
|
|
|