模型文件
BIN
public/山海防灾模型展示.zip
Normal file
BIN
public/山海防灾模型展示/三相隔离开关5.png
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
public/山海防灾模型展示/三相隔离开关7.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
public/山海防灾模型展示/三相隔离开关_1.png
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
public/山海防灾模型展示/三相隔离开关_2.png
Normal file
|
After Width: | Height: | Size: 132 KiB |
BIN
public/山海防灾模型展示/三相隔离开关_3.png
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
public/山海防灾模型展示/三相隔离开关_4.png
Normal file
|
After Width: | Height: | Size: 167 KiB |
BIN
public/山海防灾模型展示/三相隔离开关_6.png
Normal file
|
After Width: | Height: | Size: 135 KiB |
BIN
public/山海防灾模型展示/三相隔离开关_move_2.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
public/山海防灾模型展示/三相隔离开关move_2.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
public/山海防灾模型展示/交流棒形悬式复合绝缘子_1.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
public/山海防灾模型展示/交流棒形悬式复合绝缘子_2.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
public/山海防灾模型展示/交流棒形悬式复合绝缘子_3.png
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
public/山海防灾模型展示/交流棒形悬式复合绝缘子_4.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
public/山海防灾模型展示/交流棒形悬式复合绝缘子_move_1.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/山海防灾模型展示/交流棒形悬式复合绝缘子_move_2.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
public/山海防灾模型展示/交流避雷器_1.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
public/山海防灾模型展示/交流避雷器_2.png
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
public/山海防灾模型展示/交流避雷器_3.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
public/山海防灾模型展示/交流避雷器_4.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
public/山海防灾模型展示/交流避雷器_5.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
public/山海防灾模型展示/交流避雷器_move_1.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
public/山海防灾模型展示/交流避雷器_move_2.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
public/山海防灾模型展示/交流避雷器_move_3.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
@@ -55,6 +55,9 @@
|
||||
</el-collapse>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<!-- 关键元器件检查 -->
|
||||
<el-tab-pane label="附件" name="file">
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<button @click="copyPosition">复制坐标</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mesh-list">
|
||||
<div class="mesh-list" @click="save">
|
||||
<h4>模型部件列表:</h4>
|
||||
<ul>
|
||||
<li v-for="(mesh, index) in meshList" :key="index">
|
||||
@@ -39,6 +39,7 @@ import { UnrealBloomPass } from "three/examples/jsm/postprocessing/UnrealBloomPa
|
||||
import TextureName from '../../public/models/textureName.json'
|
||||
import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js'
|
||||
import { CSS2DRenderer, CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer'
|
||||
import { cloneDeep } from 'lodash';
|
||||
|
||||
export default {
|
||||
name: 'ThreeViewerDebug',
|
||||
@@ -54,6 +55,10 @@ export default {
|
||||
debugMode: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
viewStr: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -348,6 +353,7 @@ export default {
|
||||
// this.controls.maxPolarAngle = Math.PI / 2; // 限制向上旋转的角度
|
||||
|
||||
this.controls.update();
|
||||
this.loadCameraState()
|
||||
|
||||
// 调整地面位置到模型底部
|
||||
if (this.ground) {
|
||||
@@ -647,6 +653,37 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
save() {
|
||||
let str = {
|
||||
position: this.camera.position.toArray(), // 保存位置
|
||||
quaternion: this.camera.quaternion.toArray(), // 保存朝向
|
||||
fov: this.camera.fov, // 如果是透视摄像机,保存焦距
|
||||
target: this.controls.target.toArray(), // 控制器目标点
|
||||
};
|
||||
console.log(9999, JSON.stringify(str))
|
||||
},
|
||||
|
||||
loadCameraState() {
|
||||
const cameraData = this.viewStr ? this.viewStr : {};
|
||||
console.log('cameraData', cameraData)
|
||||
if(cameraData && cameraData.position && cameraData.quaternion) {
|
||||
console.log(888, cameraData, cloneDeep(this.camera.position))
|
||||
this.camera.position.fromArray(cameraData.position); // 恢复位置
|
||||
this.camera.quaternion.fromArray(cameraData.quaternion); // 恢复朝向
|
||||
if (this.camera instanceof THREE.PerspectiveCamera) { // 如果是透视摄像机,恢复焦距
|
||||
this.camera.fov = cameraData.fov;
|
||||
this.camera.updateProjectionMatrix(); // 更新投影矩阵
|
||||
}
|
||||
this.controls.target.fromArray(cameraData.target); // 恢复目标点
|
||||
this.controls.update(); // 更新控制器状态以应用新的目标点(如果有的话)
|
||||
|
||||
} else {
|
||||
this.camera.position.z = this.maxDim * 1;
|
||||
this.camera.position.x = 0;
|
||||
this.camera.position.y = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -140,7 +140,8 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"viewStr": {"position":[-0.028319151734416986,0.44690071186209945,-1.060153541579475],"quaternion":[0.010099016171466932,0.9892156310872932,0.12015805821630032,-0.08314136233322726],"fov":55,"target":[0.14773152364529415,0.18683321728723215,-0.02022672204783433]}
|
||||
},
|
||||
{
|
||||
"modelName": "交流棒形悬式复合绝缘子,FXBW-10/70",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<three-viewer-debug
|
||||
:model-path="modelPath"
|
||||
:annotations="modelData.componentCheck"
|
||||
:viewStr="modelData.viewStr"
|
||||
:debug-mode="pageTyep == 'show' ? false : true"
|
||||
@annotation-click="handleAnnotationClick"
|
||||
@model-loaded="handleModelLoaded"
|
||||
@@ -64,6 +65,7 @@
|
||||
<three-viewer-debug
|
||||
:model-path="modelPath"
|
||||
:annotations="modelData.componentCheck"
|
||||
:viewStr="modelData.viewStr"
|
||||
:debug-mode="pageTyep == 'show' ? false : true"
|
||||
@annotation-click="handleAnnotationClick"
|
||||
@model-loaded="handleModelLoaded"
|
||||
|
||||