|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
|
|
|
|
|
import { AbstractMesh, Mesh, MeshBuilder, ParticleHelper, ThinEngine, Tools, Vector3 } from "@babylonjs/core"; |
|
|
|
|
import { AbstractMesh, Vector3 } from "@babylonjs/core"; |
|
|
|
|
import { PointerEventTypes, PointerInfo } from "@babylonjs/core/Events/pointerEvents"; |
|
|
|
|
import { EventState, Observer } from "@babylonjs/core/Misc/observable"; |
|
|
|
|
import { classToClass } from "class-transformer"; |
|
|
|
@ -24,10 +24,12 @@ import { MarkNodeInfo } from "../../model/info/mark/mark-plan-info";
|
|
|
|
|
import { ModelInfo_mark } from "../../model/info/mark/model-info-mark"; |
|
|
|
|
import { ModelInfo_building } from "../../model/info/model/model-info-building"; |
|
|
|
|
import { ModelInfo_facility } from "../../model/info/model/model-info-facility"; |
|
|
|
|
import { BabylonTool } from "../../tool/babylon-tool"; |
|
|
|
|
import { LoadTool } from "../../tool/load-tool"; |
|
|
|
|
import { MeshPool, MeshPoolInfo } from "../../tool/mesh-pool"; |
|
|
|
|
import { ParticleSystemTool } from "../../tool/particle-system-tool"; |
|
|
|
|
import { BuildingUIItem } from "../building-window/building-ui-item"; |
|
|
|
|
import { BuildingWindow } from "../building-window/building-window"; |
|
|
|
|
import { IndoorFloorUIItem } from "../indoor-window/indoor-floorui-item"; |
|
|
|
|
import { UIBase } from "../window-base/ui-base"; |
|
|
|
|
import { WeatherTool } from "./weather-tool"; |
|
|
|
@ -322,10 +324,15 @@ export class MarkWindow extends UIBase {
|
|
|
|
|
nodeCopy = classToClass(this.currentMarkNodeInfo.nodeData); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.clearNodeInfo(); |
|
|
|
|
|
|
|
|
|
let markPlanData: MarkPlanData = null; |
|
|
|
|
if (DataManager.allMarkPlanData == null) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
//更新新节点
|
|
|
|
|
let markPlanData = DataManager.allMarkPlanData.getMarkPlanById(planId); |
|
|
|
|
this.clearNodeInfo(); |
|
|
|
|
markPlanData = DataManager.allMarkPlanData.getMarkPlanById(planId); |
|
|
|
|
|
|
|
|
|
if (markPlanData != null) { //表示不是取消选中
|
|
|
|
|
if (nodeCopy == null) { |
|
|
|
|
nodeCopy = classToClass(markPlanData.getNodeById(nodeId)); |
|
|
|
@ -1020,7 +1027,8 @@ export class MarkWindow extends UIBase {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
markNodeData.cameraData.getDataFromCamera(SceneManager.Instance.defaultCamera); |
|
|
|
|
console.log("保存", markNodeData); |
|
|
|
|
markNodeData.showZP = BuildingWindow.instance.currentZPShow; |
|
|
|
|
console.log("记录节点", markNodeData); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -1145,6 +1153,7 @@ export class MarkWindow extends UIBase {
|
|
|
|
|
updateNodeInfo() { |
|
|
|
|
let environmentData = this.currentMarkNodeInfo.nodeData.getCurrentEnvironmentData(); |
|
|
|
|
let cameraData = this.currentMarkNodeInfo.nodeData.cameraData; |
|
|
|
|
let showZP = this.currentMarkNodeInfo.nodeData.showZP; |
|
|
|
|
let instance = this; |
|
|
|
|
if (environmentData.isOutdoor) //要在室外
|
|
|
|
|
{ |
|
|
|
@ -1164,7 +1173,15 @@ export class MarkWindow extends UIBase {
|
|
|
|
|
StatusManager.s_currentStatus.indoorWindow.onBtnToOutDoor(false); |
|
|
|
|
} |
|
|
|
|
else if (StatusManager.s_currentStatus instanceof BuildingStatus) { |
|
|
|
|
this.currentMarkNodeInfo.nodeData.cameraData.setDataToCamera(SceneManager.Instance.defaultCamera); |
|
|
|
|
//this.currentMarkNodeInfo.nodeData.cameraData.setDataToCamera(SceneManager.Instance.defaultCamera);
|
|
|
|
|
// let camera = SceneManager.Instance.defaultCamera;
|
|
|
|
|
// if (cameraData != null) {
|
|
|
|
|
// BabylonTool.AnimMoveCameraTargetAB(camera, 60, cameraData.target, cameraData.radius, cameraData.alpha, cameraData.beta);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//仅此分支生效
|
|
|
|
|
BuildingWindow.instance.revoverCamera(cameraData, showZP); |
|
|
|
|
|
|
|
|
|
instance.clearEnterObserver(true); |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < StatusManager.s_currentStatus.buildingWindow.buildingUIItems.length; i++) { |
|
|
|
|