@aibee/crc-bmap 0.0.126 → 0.0.128

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
@@ -4089,16 +4089,18 @@ var GlbModel = class extends Object3D11 {
4089
4089
  options;
4090
4090
  async loadModel() {
4091
4091
  const object = await loadModel(this.options.url);
4092
- object.scene.rotation.set(Math.PI / 2, Math.PI / 2, 0);
4092
+ object.scene.rotation.set(Math.PI / 2, 0, 0);
4093
4093
  const box = new Box37().setFromObject(object.scene);
4094
4094
  const size = box.getSize(new Vector312());
4095
4095
  const max = Math.max(size.x, size.y);
4096
4096
  const scale = this.options.width / max;
4097
4097
  this.scale.set(scale, scale, scale);
4098
4098
  this.add(object.scene);
4099
- this.position.copy(box.getCenter(new Vector312()));
4099
+ const center2 = getCenter(this.options.geometry.coords[0]);
4100
+ this.position.set(center2[0], center2[1], 0);
4100
4101
  this.position.z += this.options.airHeight + this.options.deltaHeight;
4101
4102
  this.model = object;
4103
+ this.rotateZ(this.options.rotate);
4102
4104
  }
4103
4105
  dispose() {
4104
4106
  dispose(this);
@@ -4107,7 +4109,7 @@ var GlbModel = class extends Object3D11 {
4107
4109
  };
4108
4110
 
4109
4111
  // src/elements/lane.ts
4110
- import { BufferGeometry as BufferGeometry3, ExtrudeGeometry as ExtrudeGeometry4, LineSegments as LineSegments3, Mesh as Mesh6, Object3D as Object3D12, Vector3 as Vector313 } from "three";
4112
+ import { BufferGeometry as BufferGeometry3, LineSegments as LineSegments3, Mesh as Mesh6, Object3D as Object3D12, ShapeGeometry, Vector3 as Vector313 } from "three";
4111
4113
  import { mergeGeometries as mergeGeometries2 } from "three/examples/jsm/utils/BufferGeometryUtils";
4112
4114
  import { Line2 } from "three/examples/jsm/lines/Line2";
4113
4115
  import { LineGeometry } from "three/examples/jsm/lines/LineGeometry";
@@ -4130,15 +4132,10 @@ var Lane = class extends Object3D12 {
4130
4132
  initGeometry() {
4131
4133
  const geometries = this.options.map((option) => {
4132
4134
  const shape = initShape(
4133
- option.geometry.coords[0],
4135
+ option.geometry.coords[0].slice(0, -1),
4134
4136
  option.geometry.coords.slice(1)
4135
4137
  );
4136
- const geometry = new ExtrudeGeometry4(shape, {
4137
- steps: 1,
4138
- bevelEnabled: false,
4139
- depth: 0,
4140
- curveSegments: 4
4141
- });
4138
+ const geometry = new ShapeGeometry(shape, 4);
4142
4139
  return geometry;
4143
4140
  });
4144
4141
  this.geometry = mergeGeometries2(geometries);
@@ -7904,13 +7901,17 @@ var AibeeLoader = class {
7904
7901
  const graphic = floor.addGraphic(options);
7905
7902
  floor.userData.graphics.push(graphic);
7906
7903
  floor.userData.graphicMap.set(options.id, graphic);
7907
- floor.poiLayer.createPoi({
7904
+ const poi = floor.poiLayer.createPoi({
7908
7905
  id: options.id,
7909
7906
  icon: options.poi_info.icon,
7910
7907
  texts: [{ text: options.poi_info.showName || options.store_name || options.poi_info.text }],
7911
7908
  position: { x: pos[0], y: pos[1], z: options.airHeight },
7912
7909
  icon_size: [18, 18]
7913
7910
  });
7911
+ if (poi) {
7912
+ poi.userData.type = "store";
7913
+ poi.userData.data = options;
7914
+ }
7914
7915
  });
7915
7916
  break;
7916
7917
  case "facility":
@@ -7921,13 +7922,17 @@ var AibeeLoader = class {
7921
7922
  floor.userData.graphics.push(graphic);
7922
7923
  floor.userData.graphicMap.set(options.id, graphic);
7923
7924
  if (options.poi_info) {
7924
- floor.poiLayer.createPoi({
7925
+ const poi = floor.poiLayer.createPoi({
7925
7926
  id: options.id,
7926
7927
  icon: options.poi_info.icon,
7927
7928
  texts: [{ text: options.poi_info.showName || options.store_name || options.poi_info.text }],
7928
7929
  position: { x: pos[0], y: pos[1], z: options.airHeight },
7929
7930
  icon_size: [18, 18]
7930
7931
  });
7932
+ if (poi) {
7933
+ poi.userData.type = "facility";
7934
+ poi.userData.data = options;
7935
+ }
7931
7936
  }
7932
7937
  });
7933
7938
  break;
@@ -7941,11 +7946,15 @@ var AibeeLoader = class {
7941
7946
  parkingSpacesGraphicMap.set(options.id, graphic);
7942
7947
  const pos = translatePosToCenter([options.center_x, options.center_y], center2);
7943
7948
  if (options.texts[0]) {
7944
- floor.poiLayer.createPoi({
7949
+ const poi = floor.poiLayer.createPoi({
7945
7950
  id: options.id,
7946
7951
  texts: [{ text: options.texts[0] }],
7947
7952
  position: { x: pos[0], y: pos[1], z: options.airHeight }
7948
7953
  });
7954
+ if (poi) {
7955
+ poi.userData.type = "parkingSpace";
7956
+ poi.userData.data = options;
7957
+ }
7949
7958
  }
7950
7959
  });
7951
7960
  floor.userData.parkingSpaces = parkingSpacesGraphics;