gs-bim-air 3.0.5 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35659,6 +35659,7 @@ var RenderObjectManager = /** @class */function (_super) {
35659
35659
  _this.targetRenderObjects = new Map();
35660
35660
  // 包围盒的lineMesh映射表
35661
35661
  _this.bbLineMeshMap = new Map();
35662
+ _this.bbVisible = false;
35662
35663
  // 当次切换相机,需要更新的HLOD块数量.
35663
35664
  _this.currentLoadingKey = new gs_longan__WEBPACK_IMPORTED_MODULE_10__.List();
35664
35665
  _this.currentLoaded = -1;
@@ -35748,13 +35749,17 @@ var RenderObjectManager = /** @class */function (_super) {
35748
35749
  console.log("firstMehsLoaded");
35749
35750
  // viewer.options.isShowLoading = false;
35750
35751
  });
35752
+ _this.viewer.onWindowKeyDown.add(function (sender, e) {
35753
+ if (e.uiEvent.key === "o") {
35754
+ _this.bbVisible = !_this.bbVisible;
35755
+ // this.updateDisable = !this.updateDisable;
35756
+ // console.log("disable:", this.updateDisable);
35757
+ _this.bbLineMeshMap.forEach(function (value, key) {
35758
+ value.isVisible = _this.bbVisible;
35759
+ });
35760
+ }
35761
+ });
35751
35762
  return _this;
35752
- // this.viewer.onWindowKeyDown.add((sender, e) => {
35753
- // if ((e.uiEvent as any).key === "o") {
35754
- // this.updateDisable = !this.updateDisable;
35755
- // console.log("disable:", this.updateDisable);
35756
- // }
35757
- // });
35758
35763
  }
35759
35764
  RenderObjectManager.prototype.dispose = function () {
35760
35765
  this.viewer.camera.onProjectionMatrixChangedObservable.remove(this.projectionChangedObserver);
@@ -36677,6 +36682,7 @@ var RenderObjectManager = /** @class */function (_super) {
36677
36682
  lines: lines,
36678
36683
  colors: lineColors
36679
36684
  }, this.viewer.scene);
36685
+ line.isVisible = this.bbVisible;
36680
36686
  this.bbLineMeshMap.set(node.id, line);
36681
36687
  }
36682
36688
  }
@@ -38105,7 +38111,7 @@ var StyleManager = /** @class */function (_super) {
38105
38111
  }
38106
38112
  }
38107
38113
  if (!material) {
38108
- console.log("找不到预设的material,需实时生成:", styleKey);
38114
+ // console.log("找不到预设的material,需实时生成:", styleKey);
38109
38115
  // material = materialOrigin;
38110
38116
  if (!materialOrigin) {
38111
38117
  console.log("没有原始材质,跳过:", styleKey);
@@ -38131,24 +38137,46 @@ var StyleManager = /** @class */function (_super) {
38131
38137
  }
38132
38138
  // 有改颜色则重用material,否则克隆material
38133
38139
  if (color.length > 0) {
38134
- if (material instanceof gs_longan__WEBPACK_IMPORTED_MODULE_14__.PBRMaterial) {
38135
- material = this_2.viewer.process.assetManager.materials.get(styleKey);
38136
- if (!material) {
38137
- material = materialOrigin.clone(styleKey);
38138
- this_2.viewer.process.assetManager.materials.add(material);
38140
+ if (material) {
38141
+ if (material instanceof gs_longan__WEBPACK_IMPORTED_MODULE_14__.PBRMaterial) {
38142
+ material = this_2.viewer.process.assetManager.materials.get(styleKey);
38143
+ // if (!material) {
38144
+ // material = materialOrigin.clone(styleKey) as Longan.PBRMaterial;
38145
+ // this.viewer.process.assetManager.materials.add(material);
38146
+ // }
38147
+ material.albedoColor = new gs_longan__WEBPACK_IMPORTED_MODULE_14__.Color3(color[0] / 255, color[1] / 255, color[2] / 255);
38148
+ material.customAlbedoFlag = true;
38149
+ material.metallic = 0.5;
38150
+ material.roughness = 0.5;
38151
+ } else {
38152
+ material = this_2.viewer.process.assetManager.materials.get(styleKey);
38153
+ // if (!material) {
38154
+ // material = materialOrigin.clone(styleKey) as Longan.StandardMaterial;
38155
+ // this.viewer.process.assetManager.materials.add(material);
38156
+ // }
38157
+ material.diffuseColor = new gs_longan__WEBPACK_IMPORTED_MODULE_14__.Color3(color[0] / 255, color[1] / 255, color[2] / 255);
38158
+ material.customDiffuseFlag = true;
38139
38159
  }
38160
+ } else {
38161
+ // if (material instanceof Longan.PBRMaterial) {
38162
+ // material = this.viewer.process.assetManager.materials.get(styleKey) as Longan.PBRMaterial;
38163
+ // if (!material) {
38164
+ material = materialOrigin.clone(styleKey);
38165
+ this_2.viewer.process.assetManager.materials.add(material);
38166
+ // }
38140
38167
  material.albedoColor = new gs_longan__WEBPACK_IMPORTED_MODULE_14__.Color3(color[0] / 255, color[1] / 255, color[2] / 255);
38141
38168
  material.customAlbedoFlag = true;
38142
38169
  material.metallic = 0.5;
38143
38170
  material.roughness = 0.5;
38144
- } else {
38145
- material = this_2.viewer.process.assetManager.materials.get(styleKey);
38146
- if (!material) {
38147
- material = materialOrigin.clone(styleKey);
38148
- this_2.viewer.process.assetManager.materials.add(material);
38149
- }
38150
- material.diffuseColor = new gs_longan__WEBPACK_IMPORTED_MODULE_14__.Color3(color[0] / 255, color[1] / 255, color[2] / 255);
38151
- material.customDiffuseFlag = true;
38171
+ // } else {
38172
+ // material = this.viewer.process.assetManager.materials.get(styleKey) as Longan.StandardMaterial;
38173
+ // if (!material) {
38174
+ // material = materialOrigin.clone(styleKey) as Longan.StandardMaterial;
38175
+ // this.viewer.process.assetManager.materials.add(material);
38176
+ // }
38177
+ // material.diffuseColor = new Longan.Color3(color[0] / 255, color[1] / 255, color[2] / 255);
38178
+ // material.customDiffuseFlag = true;
38179
+ // }
38152
38180
  }
38153
38181
  } else {
38154
38182
  if (styleConfig.isKeepSeparate) {
@@ -440606,7 +440634,7 @@ var Utility = /** @class */function () {
440606
440634
  // 输出时间戳
440607
440635
  Utility.DebugConsole = false;
440608
440636
  // 绘制Mesh包围盒
440609
- Utility.DebugBB = false;
440637
+ Utility.DebugBB = true;
440610
440638
  return Utility;
440611
440639
  }();
440612
440640
 
@@ -532455,7 +532483,7 @@ var Water = /** @class */function (_super) {
532455
532483
  }(longan_src.RenderLivingObject);
532456
532484
 
532457
532485
  ;// CONCATENATED MODULE: ./packages/bimAir/package.json
532458
- var package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"gs-bim-air","rE":"3.0.5"}');
532486
+ var package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"gs-bim-air","rE":"3.0.6"}');
532459
532487
  // EXTERNAL MODULE: ./packages/bimAirCore/src/gsDevFx/registerType.ts + 12 modules
532460
532488
  var registerType = __webpack_require__(13089);
532461
532489
  ;// CONCATENATED MODULE: ./packages/bimAirCore/src/gsDevFx/operators/cameraTouch.ts