@aibee/crc-bmap 0.0.124 → 0.0.125

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.
package/lib/bmap.esm.js CHANGED
@@ -3838,7 +3838,7 @@ var Lane = class extends Object3D12 {
3838
3838
  this.initLineGeometry();
3839
3839
  this.createBorder();
3840
3840
  this.initDoubleLine();
3841
- this.position.z += 1e-3 + (this.options[0].deltaHeight || 0);
3841
+ this.position.z += 2e-3 + (this.options[0].deltaHeight || 0);
3842
3842
  }
3843
3843
  dispose() {
3844
3844
  this.geometry?.dispose();
@@ -3891,7 +3891,7 @@ var MergeGraphic = class extends Object3D13 {
3891
3891
  const geometry2 = new ExtrudeGeometry5(shape, {
3892
3892
  steps: 1,
3893
3893
  bevelEnabled: false,
3894
- depth: option.height + option.deltaHeight,
3894
+ depth: option.height,
3895
3895
  curveSegments: 4
3896
3896
  });
3897
3897
  return geometry2;
@@ -3918,7 +3918,7 @@ var MergeGraphic = class extends Object3D13 {
3918
3918
  uniform float maxZ;
3919
3919
  uniform vec3 uColor;
3920
3920
  uniform vec3 uColor2;
3921
- uniform float uOpacity;
3921
+ uniform float uOpacity;
3922
3922
 
3923
3923
  void main() {
3924
3924
  // \u5224\u65AD\u5F53\u524D\u9876\u70B9\u662F\u5426\u4E3A\u9876\u9762
@@ -3943,9 +3943,9 @@ var MergeGraphic = class extends Object3D13 {
3943
3943
  uniforms: {
3944
3944
  maxZ: { value: maxZ },
3945
3945
  // 初始化maxZ的值
3946
- uColor: { value: new Color4(this.options[0].fillColor) },
3946
+ uColor: { value: new Color4(this.options[0].fillColor).convertLinearToSRGB() },
3947
3947
  // 顶面颜色
3948
- uColor2: { value: new Color4(darkenColor(this.options[0].fillColor)) },
3948
+ uColor2: { value: new Color4(darkenColor(this.options[0].fillColor)).convertLinearToSRGB() },
3949
3949
  // 侧面颜色
3950
3950
  uOpacity: { value: this.options[0].fillOpacity }
3951
3951
  // 透明度
@@ -6900,7 +6900,7 @@ var Navigation = class extends Plugin {
6900
6900
  } else {
6901
6901
  this.path = new Path2(this, this.options.path);
6902
6902
  this.path.create(cPath);
6903
- this.path.position.z = this.bmap.context.currentFloor.groundMaxHeight + 1;
6903
+ this.path.position.z = this.bmap.context.currentFloor.groundMaxHeight + 0.5;
6904
6904
  this.bmap.context.scene.add(this.path);
6905
6905
  }
6906
6906
  if (this.startPoi) {
@@ -7435,7 +7435,6 @@ var AibeeLoader = class {
7435
7435
  }
7436
7436
  return obj;
7437
7437
  }, {});
7438
- console.log(group);
7439
7438
  Object.values(group).forEach((options) => {
7440
7439
  const mergeGeometries4 = new MergeGraphic(this.bmap.context, options);
7441
7440
  floor.mergeGraphicLayer.add(mergeGeometries4);
@@ -7501,9 +7500,14 @@ var AibeeLoader = class {
7501
7500
  });
7502
7501
  break;
7503
7502
  case "store":
7503
+ transformGraphicData(layer.elements, center2);
7504
7504
  layer.elements.map((options) => {
7505
7505
  const pos = translatePosToCenter([options.center_x, options.center_y], center2);
7506
+ const graphic = floor.addGraphic(options);
7507
+ floor.userData.graphics.push(graphic);
7508
+ floor.userData.graphicMap.set(options.id, graphic);
7506
7509
  floor.poiLayer.createPoi({
7510
+ id: options.id,
7507
7511
  icon: options.poi_info.icon,
7508
7512
  texts: [{ text: options.store_name || options.poi_info.name }],
7509
7513
  position: { x: pos[0], y: pos[1], z: options.airHeight },
@@ -7512,14 +7516,21 @@ var AibeeLoader = class {
7512
7516
  });
7513
7517
  break;
7514
7518
  case "facility":
7519
+ transformGraphicData(layer.elements, center2);
7515
7520
  layer.elements.map((options) => {
7516
7521
  const pos = translatePosToCenter(options.geometry.cds, center2);
7517
- floor.poiLayer.createPoi({
7518
- icon: options.poi_info.icon,
7519
- texts: [{ text: options.store_name || options.poi_info.name }],
7520
- position: { x: pos[0], y: pos[1], z: options.airHeight },
7521
- icon_size: [18, 18]
7522
- });
7522
+ const graphic = floor.addGraphic(options);
7523
+ floor.userData.graphics.push(graphic);
7524
+ floor.userData.graphicMap.set(options.id, graphic);
7525
+ if (options.poi_info) {
7526
+ floor.poiLayer.createPoi({
7527
+ id: options.id,
7528
+ icon: options.poi_info.icon,
7529
+ texts: [{ text: options.store_name || options.poi_info.name }],
7530
+ position: { x: pos[0], y: pos[1], z: options.airHeight },
7531
+ icon_size: [18, 18]
7532
+ });
7533
+ }
7523
7534
  });
7524
7535
  break;
7525
7536
  case "parkingSpace":
@@ -7533,6 +7544,7 @@ var AibeeLoader = class {
7533
7544
  const pos = translatePosToCenter([options.center_x, options.center_y], center2);
7534
7545
  if (options.texts[0]) {
7535
7546
  floor.poiLayer.createPoi({
7547
+ id: options.id,
7536
7548
  texts: [{ text: options.texts[0] }],
7537
7549
  position: { x: pos[0], y: pos[1], z: options.airHeight }
7538
7550
  });
@@ -7545,6 +7557,7 @@ var AibeeLoader = class {
7545
7557
  });
7546
7558
  floor.userData.center = center2;
7547
7559
  floor.userData.height = data.floorHeight;
7560
+ floor.name = data.floor;
7548
7561
  return floor;
7549
7562
  }
7550
7563
  clear() {