|
|
|
@ -1,4 +1,3 @@
|
|
|
|
|
|
|
|
|
|
import { AbstractMesh, Vector3 } from "@babylonjs/core"; |
|
|
|
|
import { PointerEventTypes, PointerInfo } from "@babylonjs/core/Events/pointerEvents"; |
|
|
|
|
import { EventState, Observer } from "@babylonjs/core/Misc/observable"; |
|
|
|
@ -11,13 +10,12 @@ import { Event_KeyboardInput } from "../../controller/event-manager/events/event
|
|
|
|
|
import { Event_MarkInfoChange, MarkInfoChangeType } from "../../controller/event-manager/events/event-mark-info-change"; |
|
|
|
|
import { InputController } from "../../controller/inputController"; |
|
|
|
|
import { SceneManager } from "../../controller/scene-manager"; |
|
|
|
|
import { ServeManager } from "../../controller/serve-manager"; |
|
|
|
|
import { BuildingStatus } from "../../controller/status/building-status"; |
|
|
|
|
import { IndoorStatus } from "../../controller/status/indoor-status"; |
|
|
|
|
import { StatusManager } from "../../controller/status/status-manager"; |
|
|
|
|
import { UIManager } from "../../controller/ui-manager"; |
|
|
|
|
import { ArcRotateCameraData } from "../../model/data/camera-data"; |
|
|
|
|
import { MarkData, MarkTagPos, MarkType } from "../../model/data/mark/mark-data"; |
|
|
|
|
import { MarkData, MarkKindType, MarkTagPos, MarkType } from "../../model/data/mark/mark-data"; |
|
|
|
|
import { AllMarkPlanData, MarkNodeData, MarkPlanData, WeatherType, WindDirectionType, EnvironmentData, NatureData } from "../../model/data/mark/mark-plan-data"; |
|
|
|
|
import { ModelType } from "../../model/data/model-data/model-data"; |
|
|
|
|
import { FacilityType } from "../../model/data/model-data/model-data-facility"; |
|
|
|
@ -26,7 +24,6 @@ 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"; |
|
|
|
@ -842,18 +839,21 @@ export class MarkWindow extends UIBase {
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//创建标绘物
|
|
|
|
|
if (readyCreateMark) { |
|
|
|
|
instance.createNewMark(pickPos, instance.currentMarkDataPrefab, true); |
|
|
|
|
} |
|
|
|
|
else if (pickMesh != null) { |
|
|
|
|
|
|
|
|
|
if (pickMesh != null) { |
|
|
|
|
//是标绘物
|
|
|
|
|
let l_markInfo = instance.getMarkInfoFromMesh(eventData.pickInfo.pickedMesh); |
|
|
|
|
if (l_markInfo != null) { |
|
|
|
|
if (instance.currentMarkDataPrefab != null && instance.currentMarkDataPrefab.markKindType != MarkKindType.Effect) //特效可以放在标绘物上
|
|
|
|
|
{ |
|
|
|
|
readyCreateMark = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (eventData.type == PointerEventTypes.POINTERDOUBLETAP) { |
|
|
|
|
//双击标绘物,打开任务界面
|
|
|
|
|
console.log("打开属性面板"); |
|
|
|
|
instance.openProperty(l_markInfo); |
|
|
|
|
readyCreateMark = false; //双击,必然不创建标绘物
|
|
|
|
|
} |
|
|
|
|
else if (eventData.type == PointerEventTypes.POINTERDOWN) { |
|
|
|
|
if (eventData.event.button == 0)//左键
|
|
|
|
@ -887,6 +887,10 @@ export class MarkWindow extends UIBase {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//创建标绘物
|
|
|
|
|
if (readyCreateMark) { |
|
|
|
|
instance.createNewMark(pickPos, instance.currentMarkDataPrefab, true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|