bill 2 anni fa
parent
commit
5295775edf
2 ha cambiato i file con 11 aggiunte e 11 eliminazioni
  1. 9 9
      src/sdk/association.ts
  2. 2 2
      src/views/merge/index.vue

+ 9 - 9
src/sdk/association.ts

@@ -55,7 +55,7 @@ const associationModels = (sdk: SDK) => {
           selfUpdate = true
           Object.assign(item, transform)
           nextTick(() => selfUpdate = false)
-        }, 100)
+        })
       })
       sceneModel.bus.on('changeSelect', select => {
         if (custom.currentModel === item && !select) {
@@ -93,22 +93,22 @@ const associationModels = (sdk: SDK) => {
         if (loaded) {
           const modelShow = getModelShowVariable(item)
           watchEffect(() => {
-            item.position
-            selfUpdate || getSceneModel(item)?.changePosition(item.position)
-          }, {flush: 'sync'})
-          watchEffect(() => {
             item.bottom
             selfUpdate || getSceneModel(item)?.changeBottom(item.bottom)
           }, {flush: 'sync'})
           watchEffect(() => {
-            item.opacity
-            selfUpdate || getSceneModel(item)?.changeOpacity(item.opacity)
-          }, {flush: 'sync'})
-          watchEffect(() => {
             item.rotation
             selfUpdate || getSceneModel(item)?.changeRotation(item.rotation)
           }, {flush: 'sync'})
           watchEffect(() => {
+            item.position
+            selfUpdate || getSceneModel(item)?.changePosition(item.position)
+          }, {flush: 'sync'})
+          watchEffect(() => {
+            item.opacity
+            selfUpdate || getSceneModel(item)?.changeOpacity(item.opacity)
+          }, {flush: 'sync'})
+          watchEffect(() => {
             item.scale
             selfUpdate || getSceneModel(item)?.changeScale(item.scale)
           }, {flush: 'sync'})

+ 2 - 2
src/views/merge/index.vue

@@ -54,9 +54,9 @@ const defaultAttrs: ModelAttrs = {
   show: true,
   scale: 100,
   opacity: 100,
-  bottom: 0,
+  rotation: {x: 0, y: 0, z: 0},
   position: {x: 0, y: 0, z: 0},
-  rotation: {x: 0, y: 0, z: 0}
+  bottom: 0,
 }
 
 const actionItems: ActionsProps['items'] = [