陈鹏飞 3 years ago
parent
commit
8d55b39052
  1. 8
      src/app/babylon/controller/mode-manager.ts
  2. 2
      src/app/babylon/controller/scene-manager.ts
  3. 10
      src/app/babylon/model/data/mark/mark-plan-data.ts
  4. 9
      src/app/babylon/model/info/model/model-info-building.ts
  5. 2
      src/app/babylon/tool/gizmo-tool.ts
  6. 3
      src/app/babylon/view/building-window/building-window.ts
  7. 4
      src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item.ts
  8. 17
      src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
  9. 8
      src/app/pages/pages.module.ts

8
src/app/babylon/controller/mode-manager.ts

@ -15,15 +15,15 @@ export enum ModeType {
export class ModeManager {
/**
*
*
* 使 currentMode 访
*/
private static s_currentMode: ModeType = ModeType.Edit;
/**
*
*
*/
public static highPower = true;
public static s_isMakeMode = true;
/**
*
@ -52,7 +52,7 @@ export class ModeManager {
//#endregion
/**
*
*
*/
static get currentMode(): ModeType {
return ModeManager.s_currentMode;

2
src/app/babylon/controller/scene-manager.ts

@ -476,7 +476,7 @@ export class SceneManager {
) {
// console.log("准备加载");
let defaultMesh = MeshBuilder.CreateBox(modelData.key, { size: 0.01 });
let defaultMesh = MeshBuilder.CreateBox(modelData.key + "Box", { size: 0.01 });
defaultMesh.scaling.y = 0.01;
defaultMesh.visibility = 0;

10
src/app/babylon/model/data/mark/mark-plan-data.ts

@ -225,6 +225,16 @@ export class MarkNodeData {
@Type(() => NatureData)
natureData: NatureData;
/**
*
*/
describe: string;
/**
*
*/
texture: string;
constructor(id: number, name: string) {
this.id = id;

9
src/app/babylon/model/info/model/model-info-building.ts

@ -50,7 +50,7 @@ export class ModelInfo_building extends ModelInfo {
for (let i = 0; i < allTransformNode.length; i++) {
if (TsTool.stringContain(allTransformNode[i].name, "WAI")) {
this.neiRoot = allTransformNode[i];
console.log("找到关键节点wai");
break;
}
}
@ -58,6 +58,10 @@ export class ModelInfo_building extends ModelInfo {
if (this.neiRoot == null) {
if (!TsTool.stringContain(this.modelBox.name, "Box")) {
console.error("没有关键节点", this.modelBox.name);
}
this.neiRoot = this.modelBox;
}
@ -156,6 +160,9 @@ export class ModelInfo_building extends ModelInfo {
//更新跟随UI的名称
updateName(name: string) {
this.uiIconBtn.textBlock.text = name;
if (!ModeManager.s_isMakeMode) {
this.showFollowUI(false);
}
}

2
src/app/babylon/tool/gizmo-tool.ts

@ -425,7 +425,7 @@ export class GizmoTool {
: UIBase.color_null;
GizmoTool.s_gizmoManager.scaleGizmoEnabled = isScaling;
if (uiType == TransformUIType.Hide) { //隐藏选中框
if (uiType == TransformUIType.Hide || !ModeManager.s_isMakeMode) { //隐藏选中框
GizmoTool.s_boundingBoxGizmo.attachedMesh = null;
}

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

@ -218,8 +218,6 @@ export class BuildingWindow extends UIBase {
* @param show true表示显示
*/
showJYZInfoModel(type: JYZInfoMoudleType, show: boolean) {
console.log("showJYZInfoModel", type, show);
if (this.currentJYZInfoMoudleType == type) {
if (show) {
return; //与上次显示的模块相同
@ -875,7 +873,6 @@ export class BuildingWindow extends UIBase {
if (!isRepeat)//不重复,就添加进去
{
this.mat_UV.get(moudleType).push(l_mat);
console.log("找到uv", l_mat);
}
}
}

4
src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item.ts

@ -100,9 +100,9 @@ export class FacilityInfoUIItem {
this.facilityInfoInSceneWindow.selectFacilityItemToThree([this], false);
if (!this.facilityInfoInSceneWindow.getFacilityUIShowType(this.getType())) {
this.modelInfo.setIconEnable(select);
this.facilityInfoInSceneWindow.playJYJSelectEffect(select, this.modelInfo)
}
}
this.facilityInfoInSceneWindow.playJYJSelectEffect(select, this.modelInfo)
}
}

17
src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts

@ -165,10 +165,13 @@ export class FacilityInfoInSceneWindow extends UIBase {
if (isChecked) { //选中
this.three.beforeOnefacilityInfo = facilityInfoUIItem[0].getID();
this.three.getPropertyData(facilityInfoUIItem[0])
console.log("通知前端选中设备", facilityInfoUIItem[0]);
} else { //取消选中
// this.three.isShowRightNature = false
this.three.beforeOnefacilityInfo = null
}
}
}
@ -543,14 +546,14 @@ export class FacilityInfoInSceneWindow extends UIBase {
*/
playJYJSelectEffect(play: boolean, facilityInfo: ModelInfo_facility) {
if (play) {
let facilityData = facilityInfo.modelData as ModelData_facility;
if (facilityData.facilityType != FacilityType.JY_JYJ &&
facilityData.facilityType != FacilityType.JY_YG) {
//只有加油机和油罐有高亮显示
return;
}
//if (play) {
let facilityData = facilityInfo.modelData as ModelData_facility;
if (facilityData.facilityType != FacilityType.JY_JYJ &&
facilityData.facilityType != FacilityType.JY_YG) {
//只有加油机和油罐有高亮显示和取消
return;
}
//}
if (play) {

8
src/app/pages/pages.module.ts

@ -1,4 +1,4 @@
import { NgModule } from '@angular/core';
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { CommonModule } from '@angular/common';
import { A11yModule } from '@angular/cdk/a11y';
import { DragDropModule } from '@angular/cdk/drag-drop';
@ -37,6 +37,8 @@ import { OilStationInfoComponent } from './oil-station-info/oil-station-info.com
import { LeftDomainComponent } from './left-domain/left-domain.component';
import { AddequipmentComponent } from './equipment-info/addequipment/addequipment.component';
import { EditequipmentComponent } from './equipment-info/editequipment/editequipment.component';
@NgModule({
declarations: [LoginComponent, RegisterComponent, HomeComponent, PlanComponent, TodayWarningComponent, CriminalRecordsComponent, TodayWarningAdminComponent, CriminalRecordsAdminComponent, LeftDomainComponent, EquipmentInfoComponent, OilStationInfoComponent, AddequipmentComponent, EditequipmentComponent],
imports: [
@ -67,6 +69,8 @@ import { EditequipmentComponent } from './equipment-info/editequipment/editequip
NzSpinModule,
NzTreeModule
],
entryComponents :[AddequipmentComponent,EditequipmentComponent]
entryComponents: [AddequipmentComponent, EditequipmentComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class PagesModule { }

Loading…
Cancel
Save