diff --git a/src/app/babylon/model/info/mark/model-info-mark.ts b/src/app/babylon/model/info/mark/model-info-mark.ts index f7e62c0..1522d22 100644 --- a/src/app/babylon/model/info/mark/model-info-mark.ts +++ b/src/app/babylon/model/info/mark/model-info-mark.ts @@ -12,6 +12,7 @@ import { SceneManager } from "src/app/babylon/controller/scene-manager"; import { UIManager } from "src/app/babylon/controller/ui-manager"; import { BabylonTool } from "src/app/babylon/tool/babylon-tool"; import { BabylonUIStyleTool } from "src/app/babylon/tool/babylon-ui-style-tool"; +import { GizmoTool } from "src/app/babylon/tool/gizmo-tool"; import { ParticleSystemTool } from "src/app/babylon/tool/particle-system-tool"; import { TsTool } from "src/app/babylon/tool/ts-tool"; import { MarkWindow } from "src/app/babylon/view/mark-window/mark-window"; @@ -209,18 +210,21 @@ export class ModelInfo_mark extends ModelInfo { else { //this.pointerDragBehavior.enabled = true; } - + GizmoTool.onPickMeshInfoObservable.notifyObservers(this); // SceneManager.Instance.defaultCamera.target = this.modelBox.absolutePosition.clone() // SceneManager.Instance.defaultCamera.setTarget(this.modelBox.absolutePosition.clone()); } else { + //GizmoTool.onPickMeshInfoObservable.notifyObservers(null); SceneManager.Instance.removeFromHighLight(this.modelBox as Mesh) if (this.pointerDragBehavior != null) { //this.pointerDragBehavior.enabled = false; //停止拖拽 } } + + let eventType: MarkInfoChangeType = select ? MarkInfoChangeType.Select : MarkInfoChangeType.UnSelect; Event_MarkInfoChange.dispatch(eventType, this); diff --git a/src/app/babylon/tool/gizmo-tool.ts b/src/app/babylon/tool/gizmo-tool.ts index a88eb6a..0ebea4d 100644 --- a/src/app/babylon/tool/gizmo-tool.ts +++ b/src/app/babylon/tool/gizmo-tool.ts @@ -177,6 +177,7 @@ export class GizmoTool { //改变gizmo目标mesh static onChangeGizmoAim(modelInfo: ModelInfo) { + // console.trace("改变目标", modelInfo); let mesh = null; GizmoTool.s_nowPickAim = modelInfo; diff --git a/src/app/babylon/view/building-window/building-window.ts b/src/app/babylon/view/building-window/building-window.ts index 9285571..cbb19de 100644 --- a/src/app/babylon/view/building-window/building-window.ts +++ b/src/app/babylon/view/building-window/building-window.ts @@ -951,7 +951,9 @@ export class BuildingWindow extends UIBase { */ private findUVMat(mesh: AbstractMesh) { let result = []; - + if (mesh == null) { + return result; + } let childMesh = mesh.getChildMeshes(); childMesh.push(mesh); diff --git a/src/app/babylon/view/facility-window/facility-window.ts b/src/app/babylon/view/facility-window/facility-window.ts index 8d68f96..619f341 100644 --- a/src/app/babylon/view/facility-window/facility-window.ts +++ b/src/app/babylon/view/facility-window/facility-window.ts @@ -254,14 +254,15 @@ export class FacilityWindow extends UIBase { return; } } - if (!SceneManager.s_isPointerDrag && !ToolbarWindow.instance.isMeshAdsorb) { - GizmoTool.onPickMeshInfoObservable.notifyObservers(null);//取消之前选择 - } + // if (!SceneManager.s_isPointerDrag && !ToolbarWindow.instance.isMeshAdsorb) { + // GizmoTool.onPickMeshInfoObservable.notifyObservers(null);//取消之前选择 + // } } else { //右键取消 if (!SceneManager.s_isPointerDrag)//不是拖拽 { instance.three.unSelectBottomIcon(); + GizmoTool.onPickMeshInfoObservable.notifyObservers(null);//取消之前选择 } } diff --git a/src/app/babylon/view/mark-window/mark-window.ts b/src/app/babylon/view/mark-window/mark-window.ts index 45cada3..aade914 100644 --- a/src/app/babylon/view/mark-window/mark-window.ts +++ b/src/app/babylon/view/mark-window/mark-window.ts @@ -502,11 +502,11 @@ export class MarkWindow extends UIBase { // markInfo.markData //通知前端 最后需要其调用 selectMarkData selectMarkDataFrom3d(markInfo: ModelInfo_mark, select: boolean) { if (select) { - //PlanComponent.instance.selectSandTableMark(markInfo.markData, select) + PlanComponent.instance.selectSandTableMark(markInfo.markData, select) } else { if (markInfo != null) { - //PlanComponent.instance.selectSandTableMark(markInfo.markData, select) + PlanComponent.instance.selectSandTableMark(markInfo.markData, select) } } diff --git a/src/assets/mesh/mark/disaster/lyx/LYX.bin b/src/assets/mesh/mark/disaster/lyx/LYX.bin index 5865caa..5f60484 100644 Binary files a/src/assets/mesh/mark/disaster/lyx/LYX.bin and b/src/assets/mesh/mark/disaster/lyx/LYX.bin differ diff --git a/src/assets/mesh/mark/disaster/lyx/LYX.gltf b/src/assets/mesh/mark/disaster/lyx/LYX.gltf index 4ae107c..019a829 100644 --- a/src/assets/mesh/mark/disaster/lyx/LYX.gltf +++ b/src/assets/mesh/mark/disaster/lyx/LYX.gltf @@ -14,26 +14,19 @@ { "name" : "Scene", "nodes" : [ - 1 + 0 ] } ], "nodes" : [ { "mesh" : 0, - "name" : "Head", + "name" : "XL", "translation" : [ 0, - 0.07907678186893463, + 0.05785634368658066, 0 ] - }, - { - "children" : [ - 0 - ], - "mesh" : 1, - "name" : "XL" } ], "materials" : [ @@ -62,7 +55,7 @@ ], "meshes" : [ { - "name" : "\u7acb\u65b9\u4f53", + "name" : "\u5e73\u9762.001", "primitives" : [ { "attributes" : { @@ -81,30 +74,6 @@ } }, "indices" : 3, - "mode" : 4 - } - ] - }, - { - "name" : "\u5e73\u9762", - "primitives" : [ - { - "attributes" : { - "POSITION" : 4, - "NORMAL" : 5, - "TEXCOORD_0" : 6 - }, - "extensions" : { - "KHR_draco_mesh_compression" : { - "bufferView" : 1, - "attributes" : { - "POSITION" : 0, - "NORMAL" : 1, - "TEXCOORD_0" : 2 - } - } - }, - "indices" : 7, "material" : 0, "mode" : 4 } @@ -143,48 +112,18 @@ } ], "accessors" : [ - { - "componentType" : 5126, - "count" : 14, - "max" : [ - 0.030580827966332436, - -0.010741879232227802, - -0.01707027480006218 - ], - "min" : [ - 0.030580827966332436, - -0.010741879232227802, - -0.01707027480006218 - ], - "type" : "VEC3" - }, - { - "componentType" : 5126, - "count" : 14, - "type" : "VEC3" - }, - { - "componentType" : 5126, - "count" : 14, - "type" : "VEC2" - }, - { - "componentType" : 5123, - "count" : 36, - "type" : "SCALAR" - }, { "componentType" : 5126, "count" : 625, "max" : [ - 0.792946457862854, - 0.056096985936164856, - 0.8005661368370056 + 0.5226746797561646, + 0.03699751943349838, + 0.5276780724525452 ], "min" : [ - -0.7526898384094238, - -0.12031548470258713, - -0.7799251079559326 + -0.49612128734588623, + -0.07930368185043335, + -0.5140728950500488 ], "type" : "VEC3" }, @@ -207,13 +146,8 @@ "bufferViews" : [ { "buffer" : 0, - "byteLength" : 197, + "byteLength" : 4656, "byteOffset" : 0 - }, - { - "buffer" : 0, - "byteLength" : 4608, - "byteOffset" : 200 } ], "samplers" : [ @@ -224,7 +158,7 @@ ], "buffers" : [ { - "byteLength" : 4808, + "byteLength" : 4656, "uri" : "LYX.bin" } ]