wuhb 1 year ago
parent
commit
9f74a61e78
3 changed files with 28312 additions and 1 deletions
  1. 1 0
      gltf/gltf.json
  2. 28302 0
      gltf/真空过滤机.gltf
  3. 9 1
      src/layout/index.vue

+ 1 - 0
gltf/gltf.json

@@ -16,4 +16,5 @@
 ,{"name":"热交换器", "value":"热交换器.gltf", "scaleX":0.01, "scaleY":0.01, "scaleZ":0.01, "posY":0}
 ,{"name":"柱子", "value":"柱子.gltf", "scaleX":0.1, "scaleY":0.1, "scaleZ":0.1, "posY":0}
 ,{"name":"结晶器", "value":"结晶器.gltf", "scaleX":0.01, "scaleY":0.01, "scaleZ":0.01, "posY":0}
+,{"name":"真空过滤机", "value":"真空过滤机.gltf", "scaleX":0.01, "scaleY":0.01, "scaleZ":0.01, "posY":0}
 ]

File diff suppressed because it is too large
+ 28302 - 0
gltf/真空过滤机.gltf


+ 9 - 1
src/layout/index.vue

@@ -42,7 +42,7 @@
   </template>
   
   <script setup lang="ts">
-  import { ref, onMounted, onBeforeUnmount } from 'vue'
+  import { ref, onMounted, onBeforeUnmount, getCurrentInstance} from 'vue'
   import * as THREE from 'three'
   import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
   import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'
@@ -58,6 +58,7 @@
   import { OutlinePass } from 'three/examples/jsm/postprocessing/OutlinePass.js';
   import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';
   import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
+  import { ElLoading } from 'element-plus'
   
   const dom = ref<HTMLDivElement>()
   let maxLength = 3600;
@@ -512,6 +513,12 @@
   
 
   const loadScene = () => {
+    const loading = ElLoading.service({
+      lock: true,
+      text: 'Loading',
+      spinner: 'el-icon-loading',
+      background: 'rgba(0, 0, 0, 0.7)'
+    });
     var sceneJson = localStorage.getItem('scene');
     if (sceneJson) {
       //  // 将 sceneJson 字符串转换为 json 对象
@@ -531,6 +538,7 @@
         }
         const axes = initAxesHelper(1000)
         scene.add(axes)
+        loading.close();
         return;
     }
   };

Some files were not shown because too many files changed in this diff