trp:隧道场景仿真修改完成,待接口调试
This commit is contained in:
@@ -13,6 +13,7 @@ import { editTunnelInit } from "./editTunnelInit";
|
||||
import { addEquipment, removeEquipment } from "./editEquipment";
|
||||
import previewtunnelModeInit from "./previewTunnelInit";
|
||||
import { StreetSignTag } from "./utils/StreetSignTag/StreetSignTag.js";
|
||||
import { realTimeRenderData } from "./realTimeRerender";
|
||||
// import { fa } from "element-plus/es/locale/index.js";
|
||||
// import { ref } from "vue";
|
||||
export default class Demo {
|
||||
@@ -35,6 +36,7 @@ export default class Demo {
|
||||
this.removeEquipment = removeEquipment;
|
||||
this.previewtunnelModeInit = previewtunnelModeInit;
|
||||
this.editTunnelInit = editTunnelInit;
|
||||
this.realTimeRenderData = realTimeRenderData;
|
||||
|
||||
// 外部可添加函数
|
||||
this.addFunction = addFunction;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Demo from "../demo";
|
||||
|
||||
import { eq } from "lodash";
|
||||
import EquipmentTag from "../utils/EquipmentTag";
|
||||
/**
|
||||
*
|
||||
@@ -47,11 +48,13 @@ function handleOtherEqu(targetPoint, equipmentInfo) {
|
||||
const equMesh = this.equMap.get("equ_sensors").clone();
|
||||
const worldP = targetPoint.getWorldPosition(new this.THREE.Vector3());
|
||||
equMesh.position.copy(worldP);
|
||||
|
||||
|
||||
//设备添加标签
|
||||
const param = `${equipmentInfo.data || "--"} ${equipmentInfo.unit || "-"}`; //渲染设备参数(data)和单位(unit)
|
||||
const tag = EquipmentTag(equipmentInfo.equipmentName,param);
|
||||
equMesh.getObjectByName("tag").material = tag;
|
||||
this.deviceModels.push({'tagSpriteId':equMesh.getObjectByName("tag").id, 'equipmentId':equipmentInfo.equipmentId})
|
||||
this.realTimeRenderData(231321)
|
||||
if (/tr$/.test(targetPoint.name)) {
|
||||
equMesh.rotation.z = -Math.PI / 2;
|
||||
equMesh.rotation.y -= Math.PI / 4;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
export function realTimeRenderData(realTimeData) {
|
||||
console.log(this.deviceModels);
|
||||
this.deviceModels.forEach((deviceModel) => {
|
||||
this.scene.getObjectById(deviceModel.tagSpriteId);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user