Browse Source

添加展开的灭火毯、右键清空测量点

dev
刘向辉 3 years ago
parent
commit
011b96f135
  1. 1
      src/app/babylon/controller/config-manager.ts
  2. 1
      src/app/babylon/model/data/mark/all-mark-data.ts
  3. 5
      src/app/babylon/model/data/mark/mark-data.ts
  4. 5
      src/app/babylon/model/info/mark/model-info-mark.ts
  5. 3
      src/app/babylon/view/mark-window/mark-window.ts
  6. BIN
      src/assets/images/mark/inside/mhtk.png
  7. BIN
      src/assets/mesh/mark/inside/mhtk/MHTK.bin
  8. 158
      src/assets/mesh/mark/inside/mhtk/MHTK.gltf
  9. BIN
      src/assets/mesh/mark/inside/mhtk/MHT_BaseColor.jpg
  10. BIN
      src/assets/mesh/mark/inside/mhtk/MHT_Metallic-MHT_Roughness.png
  11. BIN
      src/assets/mesh/mark/inside/mhtk/MHT_Normal.jpg

1
src/app/babylon/controller/config-manager.ts

@ -179,6 +179,7 @@ export class ConfigManager {
[MarkType.PTMHQ, "二氧化碳灭火器"], [MarkType.PTMHQ, "二氧化碳灭火器"],
[MarkType.GFMHQ, "干粉灭火器"], [MarkType.GFMHQ, "干粉灭火器"],
[MarkType.TCMHQ, "推车灭火器"], [MarkType.TCMHQ, "推车灭火器"],
[MarkType.MHTK, "灭火毯(开)"],
[MarkType.ZYMBRQ, "专用密闭容器"], [MarkType.ZYMBRQ, "专用密闭容器"],
[MarkType.JJX, "警戒线"], [MarkType.JJX, "警戒线"],
[MarkType.JGLX, "进攻路线"], [MarkType.JGLX, "进攻路线"],

1
src/app/babylon/model/data/mark/all-mark-data.ts

@ -77,6 +77,7 @@ export class AllMarkData {
AllMarkData.newMarkData(MarkType.PTMHQ, MarkKindType.Goods, tagPos, result); AllMarkData.newMarkData(MarkType.PTMHQ, MarkKindType.Goods, tagPos, result);
AllMarkData.newMarkData(MarkType.GFMHQ, MarkKindType.Goods, tagPos, result); AllMarkData.newMarkData(MarkType.GFMHQ, MarkKindType.Goods, tagPos, result);
AllMarkData.newMarkData(MarkType.TCMHQ, MarkKindType.Goods, tagPos, result); AllMarkData.newMarkData(MarkType.TCMHQ, MarkKindType.Goods, tagPos, result);
AllMarkData.newMarkData(MarkType.MHTK, MarkKindType.Goods, tagPos, result);
//其他 //其他
tagPos = MarkTagPos.Other; tagPos = MarkTagPos.Other;

5
src/app/babylon/model/data/mark/mark-data.ts

@ -300,6 +300,11 @@ export enum MarkType {
*/ */
TCMHQ = "TCMHQ", TCMHQ = "TCMHQ",
/**
*
*/
MHTK = "MHTK",
//===================其他=================== //===================其他===================

5
src/app/babylon/model/info/mark/model-info-mark.ts

@ -221,7 +221,8 @@ export class ModelInfo_mark extends ModelInfo {
//特效类、灭火器类、文字标注,要出现坐标轴 //特效类、灭火器类、文字标注,要出现坐标轴
if (this.markData.markKindType == MarkKindType.Effect if (this.markData.markKindType == MarkKindType.Effect
|| TsTool.stringContain(this.markData.type, "MHQ") || TsTool.stringContain(this.markData.type, "MHQ")
|| this.markData.type == MarkType.WZ) { || this.markData.type == MarkType.WZ
|| this.markData.type == MarkType.MHTK) {
GizmoTool.onPickMeshInfoObservable.notifyObservers(this); GizmoTool.onPickMeshInfoObservable.notifyObservers(this);
} }
else { else {
@ -235,7 +236,9 @@ export class ModelInfo_mark extends ModelInfo {
else { else {
//GizmoTool.onPickMeshInfoObservable.notifyObservers(null); //GizmoTool.onPickMeshInfoObservable.notifyObservers(null);
SceneManager.Instance.removeFromHighLight(this.modelBox as Mesh) SceneManager.Instance.removeFromHighLight(this.modelBox as Mesh)
if (this.pointerDragBehavior != null) { if (this.pointerDragBehavior != null) {
this.pointerDragBehavior.releaseDrag(); //防止卡主
this.pointerDragBehavior.enabled = false; //停止拖拽 this.pointerDragBehavior.enabled = false; //停止拖拽
} }
} }

3
src/app/babylon/view/mark-window/mark-window.ts

@ -888,7 +888,8 @@ export class MarkWindow extends UIBase {
//是标绘物 //是标绘物
let l_markInfo = instance.getMarkInfoFromMesh(eventData.pickInfo.pickedMesh); let l_markInfo = instance.getMarkInfoFromMesh(eventData.pickInfo.pickedMesh);
if (l_markInfo != null) { if (l_markInfo != null) {
if (instance.currentMarkDataPrefab != null && instance.currentMarkDataPrefab.markKindType != MarkKindType.Effect) //特效可以放在标绘物上 if (instance.currentMarkDataPrefab != null && instance.currentMarkDataPrefab.markKindType != MarkKindType.Effect
&& instance.currentMarkDataPrefab.type != MarkType.MHTK) //特效可以放在标绘物上
{ {
readyCreateMark = false; readyCreateMark = false;
} }

BIN
src/assets/images/mark/inside/mhtk.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
src/assets/mesh/mark/inside/mhtk/MHTK.bin

Binary file not shown.

158
src/assets/mesh/mark/inside/mhtk/MHTK.gltf

@ -0,0 +1,158 @@
{
"asset" : {
"generator" : "Khronos glTF Blender I/O v1.7.33",
"version" : "2.0"
},
"extensionsUsed" : [
"KHR_draco_mesh_compression"
],
"extensionsRequired" : [
"KHR_draco_mesh_compression"
],
"scene" : 0,
"scenes" : [
{
"name" : "Scene",
"nodes" : [
0
]
}
],
"nodes" : [
{
"mesh" : 0,
"name" : "mhtk",
"translation" : [
0.7841799855232239,
0.984013557434082,
1.3926525115966797
]
}
],
"materials" : [
{
"doubleSided" : true,
"name" : "\u6750\u8d28",
"normalTexture" : {
"index" : 0
},
"pbrMetallicRoughness" : {
"baseColorTexture" : {
"index" : 1
},
"metallicRoughnessTexture" : {
"index" : 2
}
}
}
],
"meshes" : [
{
"name" : "mhtk",
"primitives" : [
{
"attributes" : {
"POSITION" : 0,
"NORMAL" : 1,
"TEXCOORD_0" : 2
},
"extensions" : {
"KHR_draco_mesh_compression" : {
"bufferView" : 0,
"attributes" : {
"POSITION" : 0,
"NORMAL" : 1,
"TEXCOORD_0" : 2
}
}
},
"indices" : 3,
"material" : 0,
"mode" : 4
}
]
}
],
"textures" : [
{
"sampler" : 0,
"source" : 0
},
{
"sampler" : 0,
"source" : 1
},
{
"sampler" : 0,
"source" : 2
}
],
"images" : [
{
"mimeType" : "image/jpeg",
"name" : "MHT_Normal",
"uri" : "MHT_Normal.jpg"
},
{
"mimeType" : "image/jpeg",
"name" : "MHT_BaseColor",
"uri" : "MHT_BaseColor.jpg"
},
{
"mimeType" : "image/png",
"name" : "MHT_Metallic-MHT_Roughness",
"uri" : "MHT_Metallic-MHT_Roughness.png"
}
],
"accessors" : [
{
"componentType" : 5126,
"count" : 208,
"max" : [
0.24659651517868042,
0.38860058784484863,
0.4306669235229492
],
"min" : [
-0.35113176703453064,
-0.4865396022796631,
-0.47243988513946533
],
"type" : "VEC3"
},
{
"componentType" : 5126,
"count" : 208,
"type" : "VEC3"
},
{
"componentType" : 5126,
"count" : 208,
"type" : "VEC2"
},
{
"componentType" : 5123,
"count" : 1080,
"type" : "SCALAR"
}
],
"bufferViews" : [
{
"buffer" : 0,
"byteLength" : 1391,
"byteOffset" : 0
}
],
"samplers" : [
{
"magFilter" : 9729,
"minFilter" : 9987
}
],
"buffers" : [
{
"byteLength" : 1392,
"uri" : "MHTK.bin"
}
]
}

BIN
src/assets/mesh/mark/inside/mhtk/MHT_BaseColor.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
src/assets/mesh/mark/inside/mhtk/MHT_Metallic-MHT_Roughness.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
src/assets/mesh/mark/inside/mhtk/MHT_Normal.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Loading…
Cancel
Save