刘向辉 3 years ago
parent
commit
bf8315c914
  1. 8
      src/app/babylon/controller/mode-manager.ts
  2. 2
      src/app/babylon/controller/scene-manager.ts
  3. 9
      src/app/babylon/model/info/model/model-info-building.ts
  4. 2
      src/app/babylon/tool/gizmo-tool.ts
  5. 3
      src/app/babylon/view/building-window/building-window.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;

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);
}
}
}

Loading…
Cancel
Save