@aibee/crc-bmap 0.0.121 → 0.0.124

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
@@ -454,7 +454,7 @@ var require_Graph = __commonJS({
454
454
  });
455
455
 
456
456
  // src/bmap.ts
457
- import { EventDispatcher as EventDispatcher7, Vector3 as Vector318 } from "three";
457
+ import { EventDispatcher as EventDispatcher7, Vector3 as Vector319 } from "three";
458
458
 
459
459
  // src/utils/timer.ts
460
460
  var Timer = class {
@@ -1619,7 +1619,7 @@ function toWebWorker(obj) {
1619
1619
  import {
1620
1620
  EventDispatcher as EventDispatcher6,
1621
1621
  Box2,
1622
- Vector3 as Vector317,
1622
+ Vector3 as Vector318,
1623
1623
  Vector2 as Vector26,
1624
1624
  Raycaster as Raycaster3,
1625
1625
  Box3 as Box39,
@@ -1642,7 +1642,7 @@ import {
1642
1642
  LineSegments,
1643
1643
  Ray
1644
1644
  } from "three";
1645
- var defaultOptions = {
1645
+ var defaultGraphicOptions = {
1646
1646
  id: "",
1647
1647
  // 图形id
1648
1648
  height: 0.1,
@@ -1688,7 +1688,7 @@ var Graphic = class extends Object3D {
1688
1688
  super();
1689
1689
  this.context = context;
1690
1690
  this.options = proxyOptions(
1691
- { ...defaultOptions, ...options },
1691
+ { ...defaultGraphicOptions, ...options },
1692
1692
  this
1693
1693
  );
1694
1694
  if (this.options.geometry.type === "point") {
@@ -1960,7 +1960,7 @@ var Graphic = class extends Object3D {
1960
1960
  return false;
1961
1961
  }
1962
1962
  dispose() {
1963
- this.geometry.dispose();
1963
+ this.geometry?.dispose();
1964
1964
  this.line?.geometry.dispose();
1965
1965
  this.clear();
1966
1966
  }
@@ -1972,8 +1972,8 @@ import {
1972
1972
  PlaneGeometry,
1973
1973
  Mesh as Mesh2,
1974
1974
  ShadowMaterial,
1975
- Color as Color3,
1976
- DoubleSide as DoubleSide2
1975
+ Color as Color2,
1976
+ DoubleSide
1977
1977
  } from "three";
1978
1978
  var Shadow = class extends Object3D2 {
1979
1979
  directionalLight;
@@ -2002,7 +2002,7 @@ var Shadow = class extends Object3D2 {
2002
2002
  this.directionalLight.shadow.camera.far = Math.max(x, y);
2003
2003
  }
2004
2004
  changeLightColor(color) {
2005
- this.directionalLight.color = new Color3(color);
2005
+ this.directionalLight.color = new Color2(color);
2006
2006
  }
2007
2007
  setPosition(position) {
2008
2008
  this.position.copy(position);
@@ -2014,7 +2014,7 @@ var Shadow = class extends Object3D2 {
2014
2014
  const material = new ShadowMaterial({
2015
2015
  transparent: true,
2016
2016
  opacity: 0,
2017
- side: DoubleSide2
2017
+ side: DoubleSide
2018
2018
  });
2019
2019
  const mesh = new Mesh2(geometry, material);
2020
2020
  mesh.receiveShadow = true;
@@ -2043,7 +2043,7 @@ import { EventDispatcher as EventDispatcher2, Vector3 as Vector35 } from "three"
2043
2043
  // src/elements/overlay.ts
2044
2044
  import { Box3 as Box32, EventDispatcher, Vector3 as Vector34 } from "three";
2045
2045
  import { debounce } from "lodash";
2046
- var defaultOptions2 = {
2046
+ var defaultOptions = {
2047
2047
  autoUpdate: true,
2048
2048
  appendToBody: false,
2049
2049
  autoChangePlacement: false
@@ -2052,7 +2052,7 @@ var Overlay = class extends EventDispatcher {
2052
2052
  constructor(context, options = {}) {
2053
2053
  super();
2054
2054
  this.context = context;
2055
- this.options = { ...defaultOptions2, ...options };
2055
+ this.options = { ...defaultOptions, ...options };
2056
2056
  this.registryEvent();
2057
2057
  this.div = this.initDiv();
2058
2058
  if (this.options.appendToBody) {
@@ -2336,7 +2336,7 @@ var Overlay = class extends EventDispatcher {
2336
2336
  };
2337
2337
 
2338
2338
  // src/elements/poi.ts
2339
- var defaultOptions3 = {
2339
+ var defaultOptions2 = {
2340
2340
  texts: [{ text: "" }],
2341
2341
  level: 1,
2342
2342
  icon_position: "bottom",
@@ -2355,7 +2355,7 @@ var Poi = class extends EventDispatcher2 {
2355
2355
  constructor(context, options) {
2356
2356
  super();
2357
2357
  this.context = context;
2358
- this.options = proxyOptions({ ...defaultOptions3, ...options }, this);
2358
+ this.options = proxyOptions({ ...defaultOptions2, ...options }, this);
2359
2359
  this.position.set(options.position?.x || 0, options.position?.y || 0, options.position?.z || 0);
2360
2360
  this.overlay = new Overlay(this.context, { autoUpdate: false });
2361
2361
  this.overlay.addEventListener("update-position", ({ x, y, height }) => {
@@ -2621,7 +2621,7 @@ import {
2621
2621
  Object3D as Object3D5,
2622
2622
  PlaneGeometry as PlaneGeometry2,
2623
2623
  Texture,
2624
- DoubleSide as DoubleSide3,
2624
+ DoubleSide as DoubleSide2,
2625
2625
  Mesh as Mesh3,
2626
2626
  Matrix3,
2627
2627
  Vector2 as Vector24
@@ -2665,7 +2665,7 @@ var HeatmapElement = class extends Object3D5 {
2665
2665
  texture.needsUpdate = true;
2666
2666
  const material = new MeshBasicMaterial2({
2667
2667
  transparent: true,
2668
- side: DoubleSide3,
2668
+ side: DoubleSide2,
2669
2669
  map: texture
2670
2670
  });
2671
2671
  material.needsUpdate = true;
@@ -2956,12 +2956,14 @@ var Floor = class extends Object3D8 {
2956
2956
  this.textureLayer = new Layer(this.context);
2957
2957
  this.glbModelLayer = new Layer(this.context);
2958
2958
  this.laneLayer = new Layer(this.context);
2959
+ this.mergeGraphicLayer = new Layer(this.context);
2959
2960
  this.groundUpper.add(this.graphicLayer);
2960
2961
  this.groundUpper.add(this.poiLayer);
2961
2962
  this.groundUpper.add(this.wallLayer);
2962
2963
  this.groundUpper.add(this.textureLayer);
2963
2964
  this.groundUpper.add(this.glbModelLayer);
2964
2965
  this.groundUpper.add(this.laneLayer);
2966
+ this.groundUpper.add(this.mergeGraphicLayer);
2965
2967
  this.add(this.groundUpper);
2966
2968
  this.add(this.groundLayer);
2967
2969
  this.add(this.models);
@@ -2972,6 +2974,7 @@ var Floor = class extends Object3D8 {
2972
2974
  textureLayer;
2973
2975
  glbModelLayer;
2974
2976
  laneLayer;
2977
+ mergeGraphicLayer;
2975
2978
  grounds = /* @__PURE__ */ new Set();
2976
2979
  groundLayer;
2977
2980
  shadow = new Shadow();
@@ -3062,6 +3065,7 @@ var Floor = class extends Object3D8 {
3062
3065
  this.textureLayer.dispose();
3063
3066
  this.glbModelLayer.dispose();
3064
3067
  this.laneLayer.dispose();
3068
+ this.mergeGraphicLayer.dispose();
3065
3069
  this.grounds.forEach((ground) => ground.dispose());
3066
3070
  this.heatmap?.dispose();
3067
3071
  this.groundUpper.clear();
@@ -3464,7 +3468,7 @@ var SelectBox = class extends BaseSvg {
3464
3468
  // src/elements/wall.ts
3465
3469
  import {
3466
3470
  BufferGeometry as BufferGeometry2,
3467
- Color as Color4,
3471
+ Color as Color3,
3468
3472
  ExtrudeGeometry as ExtrudeGeometry2,
3469
3473
  LineSegments as LineSegments2,
3470
3474
  Mesh as Mesh4,
@@ -3549,9 +3553,9 @@ var Wall = class extends Object3D9 {
3549
3553
  uniforms: {
3550
3554
  maxZ: { value: maxZ },
3551
3555
  // 初始化maxZ的值
3552
- uColor: { value: new Color4(this.options[0].fillColor) },
3556
+ uColor: { value: new Color3(this.options[0].fillColor) },
3553
3557
  // 顶面颜色
3554
- uColor2: { value: new Color4(darkenColor(this.options[0].fillColor)) },
3558
+ uColor2: { value: new Color3(darkenColor(this.options[0].fillColor)) },
3555
3559
  // 侧面颜色
3556
3560
  uOpacity: { value: this.options[0].fillOpacity }
3557
3561
  // 透明度
@@ -3618,7 +3622,7 @@ var Wall = class extends Object3D9 {
3618
3622
 
3619
3623
  // src/elements/ground-texture.ts
3620
3624
  import { ExtrudeGeometry as ExtrudeGeometry3, Mesh as Mesh5, Object3D as Object3D10 } from "three";
3621
- var defaultOptions4 = {
3625
+ var defaultOptions3 = {
3622
3626
  uuid: "",
3623
3627
  iconUrl: "",
3624
3628
  name: "",
@@ -3635,7 +3639,7 @@ var GroundTexture = class extends Object3D10 {
3635
3639
  super();
3636
3640
  this.context = context;
3637
3641
  this.options = proxyOptions(
3638
- { ...defaultOptions4, ...options },
3642
+ { ...defaultOptions3, ...options },
3639
3643
  this
3640
3644
  );
3641
3645
  this.init();
@@ -3843,6 +3847,172 @@ var Lane = class extends Object3D12 {
3843
3847
  }
3844
3848
  };
3845
3849
 
3850
+ // src/elements/merge-graphic.ts
3851
+ import {
3852
+ Object3D as Object3D13,
3853
+ ExtrudeGeometry as ExtrudeGeometry5,
3854
+ Mesh as Mesh7,
3855
+ Vector3 as Vector314,
3856
+ BufferGeometry as BufferGeometry4,
3857
+ LineSegments as LineSegments4,
3858
+ ShaderMaterial as ShaderMaterial3,
3859
+ Color as Color4
3860
+ } from "three";
3861
+ import { mergeGeometries as mergeGeometries3 } from "three/examples/jsm/utils/BufferGeometryUtils";
3862
+ var MergeGraphic = class extends Object3D13 {
3863
+ constructor(context, options) {
3864
+ super();
3865
+ this.context = context;
3866
+ this.options = options.map((option) => ({ ...defaultGraphicOptions, ...option }));
3867
+ this.init();
3868
+ }
3869
+ geometry;
3870
+ material;
3871
+ mesh;
3872
+ line;
3873
+ lineMaterial;
3874
+ lineGeometry;
3875
+ options;
3876
+ init() {
3877
+ this.geometry = this.initGeometry();
3878
+ this.initMaterial();
3879
+ this.initMesh();
3880
+ this.mesh.position.z = this.options[0].deltaHeight;
3881
+ this.initLineMaterial();
3882
+ this.initLineGeometry();
3883
+ this.createBorder();
3884
+ }
3885
+ initGeometry() {
3886
+ const geometries = this.options.map((option) => {
3887
+ const shape = initShape(
3888
+ option.geometry.coords[0],
3889
+ option.geometry.coords.slice(1)
3890
+ );
3891
+ const geometry2 = new ExtrudeGeometry5(shape, {
3892
+ steps: 1,
3893
+ bevelEnabled: false,
3894
+ depth: option.height + option.deltaHeight,
3895
+ curveSegments: 4
3896
+ });
3897
+ return geometry2;
3898
+ });
3899
+ const geometry = mergeGeometries3(geometries);
3900
+ geometries.forEach((geometry2) => geometry2.dispose());
3901
+ return geometry;
3902
+ }
3903
+ initMaterial() {
3904
+ const vertexShader = `
3905
+ varying vec3 vPosition; // \u7528\u4E8E\u4F20\u9012\u9876\u70B9\u7684\u4F4D\u7F6E\u7ED9\u7247\u6BB5\u7740\u8272\u5668
3906
+ uniform float maxZ; // \u58F0\u660E\u4E00\u4E2Auniform\u53D8\u91CF
3907
+ uniform vec3 uColor;
3908
+ uniform vec3 uColor2;
3909
+ uniform float uOpacity;
3910
+
3911
+ void main() {
3912
+ vPosition = position; // \u5411\u7247\u6BB5\u7740\u8272\u5668\u4F20\u9012\u4F4D\u7F6E
3913
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
3914
+ }
3915
+ `;
3916
+ const fragmentShader = `
3917
+ varying vec3 vPosition; // \u63A5\u6536\u9876\u70B9\u4F4D\u7F6E
3918
+ uniform float maxZ;
3919
+ uniform vec3 uColor;
3920
+ uniform vec3 uColor2;
3921
+ uniform float uOpacity;
3922
+
3923
+ void main() {
3924
+ // \u5224\u65AD\u5F53\u524D\u9876\u70B9\u662F\u5426\u4E3A\u9876\u9762
3925
+ if (vPosition.z >= maxZ) {
3926
+ gl_FragColor = vec4(uColor, uOpacity); //\uFF08\u9876\u9762\u989C\u8272\uFF09
3927
+ } else {
3928
+ gl_FragColor = vec4(uColor2, uOpacity); // \u5176\u4ED6\u9762\u989C\u8272\uFF09
3929
+ }
3930
+ }
3931
+ `;
3932
+ let maxZ = -Infinity;
3933
+ const positionAttribute = this.geometry.getAttribute("position");
3934
+ if (positionAttribute) {
3935
+ for (let i = 0; i < positionAttribute.count; i++) {
3936
+ const z = positionAttribute.getZ(i);
3937
+ if (z > maxZ) {
3938
+ maxZ = z;
3939
+ }
3940
+ }
3941
+ }
3942
+ const shaderMaterial = new ShaderMaterial3({
3943
+ uniforms: {
3944
+ maxZ: { value: maxZ },
3945
+ // 初始化maxZ的值
3946
+ uColor: { value: new Color4(this.options[0].fillColor) },
3947
+ // 顶面颜色
3948
+ uColor2: { value: new Color4(darkenColor(this.options[0].fillColor)) },
3949
+ // 侧面颜色
3950
+ uOpacity: { value: this.options[0].fillOpacity }
3951
+ // 透明度
3952
+ },
3953
+ vertexShader,
3954
+ fragmentShader
3955
+ });
3956
+ this.material = shaderMaterial;
3957
+ }
3958
+ initLineMaterial() {
3959
+ const lineMaterial = this.context.materialFactory.createLineMaterial({
3960
+ color: this.options[0].strokeColor,
3961
+ opacity: this.options[0].strokeOpacity
3962
+ });
3963
+ this.lineMaterial = lineMaterial;
3964
+ return lineMaterial;
3965
+ }
3966
+ initMesh() {
3967
+ if (this.mesh) {
3968
+ this.remove(this.mesh);
3969
+ }
3970
+ this.mesh = new Mesh7(this.geometry, this.material);
3971
+ this.add(this.mesh);
3972
+ }
3973
+ getBorderPoints() {
3974
+ const points = [];
3975
+ const height = this.options[0].height + this.options[0].deltaHeight;
3976
+ this.options.map((option) => {
3977
+ const { coords } = option.geometry;
3978
+ for (let j = 0; j < coords.length; j++) {
3979
+ const curCds = coords[j];
3980
+ for (let i = 0; i < curCds.length; i++) {
3981
+ const cur = curCds[i];
3982
+ const next = i + 1 === curCds.length ? curCds[0] : curCds[i + 1];
3983
+ points.push(new Vector314(cur[0], cur[1], height));
3984
+ points.push(new Vector314(next[0], next[1], height));
3985
+ }
3986
+ }
3987
+ });
3988
+ return points;
3989
+ }
3990
+ initLineGeometry() {
3991
+ if (this.lineGeometry) {
3992
+ this.lineGeometry.dispose();
3993
+ }
3994
+ const points = this.getBorderPoints();
3995
+ const lineGeometry = new BufferGeometry4().setFromPoints(points);
3996
+ this.lineGeometry = lineGeometry;
3997
+ }
3998
+ createBorder() {
3999
+ if (this.line) {
4000
+ this.remove(this.line);
4001
+ }
4002
+ const line = new LineSegments4(this.lineGeometry, this.lineMaterial);
4003
+ line.position.z = 0.01;
4004
+ this.line = line;
4005
+ this.add(line);
4006
+ return line;
4007
+ }
4008
+ dispose() {
4009
+ this.geometry.dispose();
4010
+ this.material.dispose();
4011
+ this.line?.geometry.dispose();
4012
+ this.clear();
4013
+ }
4014
+ };
4015
+
3846
4016
  // src/operations/selection/box-selection.ts
3847
4017
  import { Frustum } from "three";
3848
4018
  var BoxSelection = class extends BaseSvg {
@@ -4204,11 +4374,11 @@ var HoverHelper = class extends EventDispatcher5 {
4204
4374
  import { LineMaterial } from "three/examples/jsm/lines/LineMaterial";
4205
4375
  import {
4206
4376
  Color as Color5,
4207
- LineBasicMaterial as LineBasicMaterial4,
4377
+ LineBasicMaterial as LineBasicMaterial5,
4208
4378
  MeshStandardMaterial as MeshStandardMaterial2,
4209
4379
  MeshBasicMaterial as MeshBasicMaterial5,
4210
- ShaderMaterial as ShaderMaterial3,
4211
- DoubleSide as DoubleSide4,
4380
+ ShaderMaterial as ShaderMaterial4,
4381
+ DoubleSide as DoubleSide3,
4212
4382
  Vector2 as Vector25
4213
4383
  } from "three";
4214
4384
  function vectorToString(vector) {
@@ -4232,7 +4402,7 @@ var MaterialFactory = class {
4232
4402
  if (this.lineMaterialMap.has(key)) {
4233
4403
  return this.lineMaterialMap.get(key);
4234
4404
  }
4235
- const lineMaterial = new LineBasicMaterial4({
4405
+ const lineMaterial = new LineBasicMaterial5({
4236
4406
  color: new Color5(color).convertLinearToSRGB(),
4237
4407
  transparent: true,
4238
4408
  opacity
@@ -4323,7 +4493,7 @@ var MaterialFactory = class {
4323
4493
  gl_FragColor = vec4(vColor.x, vColor.y, vColor.z, opacity);
4324
4494
  }
4325
4495
  `;
4326
- const material = new ShaderMaterial3({
4496
+ const material = new ShaderMaterial4({
4327
4497
  uniforms: {
4328
4498
  uColor: {
4329
4499
  value: new Color5(gradualColor[0]).convertLinearToSRGB()
@@ -4352,7 +4522,7 @@ var MaterialFactory = class {
4352
4522
  },
4353
4523
  vertexShader,
4354
4524
  fragmentShader,
4355
- side: DoubleSide4
4525
+ side: DoubleSide3
4356
4526
  });
4357
4527
  this.shaderMaterialMap.set(key, material);
4358
4528
  return material;
@@ -4419,7 +4589,7 @@ var MaterialFactory = class {
4419
4589
  };
4420
4590
 
4421
4591
  // src/utils/camera-bound.ts
4422
- import { Box3 as Box38, Vector3 as Vector316 } from "three";
4592
+ import { Box3 as Box38, Vector3 as Vector317 } from "three";
4423
4593
  var CameraBound = class {
4424
4594
  constructor(context) {
4425
4595
  this.context = context;
@@ -4427,9 +4597,9 @@ var CameraBound = class {
4427
4597
  this.changePrevCamera();
4428
4598
  }
4429
4599
  prevCamera = {
4430
- position: new Vector316(),
4600
+ position: new Vector317(),
4431
4601
  zoom: 1,
4432
- target: new Vector316()
4602
+ target: new Vector317()
4433
4603
  };
4434
4604
  enable = true;
4435
4605
  setEnable(enable) {
@@ -4471,8 +4641,8 @@ var CameraBound = class {
4471
4641
  const { min, max } = box;
4472
4642
  const lb = vector3ToDevice(min, camera, w, h);
4473
4643
  const rt = vector3ToDevice(max, camera, w, h);
4474
- const lt = vector3ToDevice(new Vector316(min.x, max.y, max.z), camera, w, h);
4475
- const rb = vector3ToDevice(new Vector316(max.x, min.y, min.z), camera, w, h);
4644
+ const lt = vector3ToDevice(new Vector317(min.x, max.y, max.z), camera, w, h);
4645
+ const rb = vector3ToDevice(new Vector317(max.x, min.y, min.z), camera, w, h);
4476
4646
  const left = Math.min(lb.x, rt.x, lt.x, rb.x);
4477
4647
  const right = Math.max(lb.x, rt.x, lt.x, rb.x);
4478
4648
  const top = Math.min(lb.y, rt.y, lt.y, rb.y);
@@ -4602,7 +4772,7 @@ var Context = class extends EventDispatcher6 {
4602
4772
  /**
4603
4773
  * 获取两个点之间的像素数
4604
4774
  */
4605
- getRatio(point1 = new Vector317(0, 0, 0), point22 = new Vector317(100, 0, 0)) {
4775
+ getRatio(point1 = new Vector318(0, 0, 0), point22 = new Vector318(100, 0, 0)) {
4606
4776
  const { clientWidth, clientHeight } = this.container;
4607
4777
  const device1 = vector3ToDevice(point1, this.camera, clientWidth, clientHeight);
4608
4778
  const device2 = vector3ToDevice(point22, this.camera, clientWidth, clientHeight);
@@ -4803,7 +4973,7 @@ var Context = class extends EventDispatcher6 {
4803
4973
  );
4804
4974
  }
4805
4975
  getCameraLookAt() {
4806
- return new Vector317().subVectors(this.control.target, this.camera.position);
4976
+ return new Vector318().subVectors(this.control.target, this.camera.position);
4807
4977
  }
4808
4978
  /**
4809
4979
  * 按照一个中心点设置相机的放大缩小
@@ -4858,10 +5028,10 @@ var Context = class extends EventDispatcher6 {
4858
5028
  const boundingBox = new Box39().setFromObject(object);
4859
5029
  this.setPolarAngle(polar, 0);
4860
5030
  const { max, min } = boundingBox;
4861
- const leftTop = new Vector317(min.x, max.y, max.z);
4862
- const rightTop = new Vector317(max.x, max.y, max.z);
4863
- const rightBottom = new Vector317(max.x, min.y, min.z);
4864
- const leftBottom = new Vector317(min.x, min.y, min.z);
5031
+ const leftTop = new Vector318(min.x, max.y, max.z);
5032
+ const rightTop = new Vector318(max.x, max.y, max.z);
5033
+ const rightBottom = new Vector318(max.x, min.y, min.z);
5034
+ const leftBottom = new Vector318(min.x, min.y, min.z);
4865
5035
  const leftTop2d = vector3ToDevice(leftTop, this.camera, width, height);
4866
5036
  const rightTop2d = vector3ToDevice(rightTop, this.camera, width, height);
4867
5037
  const leftBottom2d = vector3ToDevice(leftBottom, this.camera, width, height);
@@ -4876,7 +5046,7 @@ var Context = class extends EventDispatcher6 {
4876
5046
  const xScale = (width - right - left) / size.x;
4877
5047
  const yScale = (height - top - bottom) / size.y;
4878
5048
  const scale = Math.min(xScale, yScale);
4879
- const center2 = new Vector317((max.x + min.x) / 2, (max.y + min.y) / 2, (max.z + min.z) / 2);
5049
+ const center2 = new Vector318((max.x + min.x) / 2, (max.y + min.y) / 2, (max.z + min.z) / 2);
4880
5050
  return { zoom: scale * this.camera.zoom, center: center2 };
4881
5051
  }
4882
5052
  /**
@@ -5427,7 +5597,7 @@ var BMap = class extends EventDispatcher7 {
5427
5597
  } = this.context;
5428
5598
  const device = vector3ToDevice(position, camera, width, height);
5429
5599
  const offsetX = device.x - width / 2;
5430
- const v3 = new Vector318();
5600
+ const v3 = new Vector319();
5431
5601
  v3.setFromMatrixColumn(this.context.camera.matrix, 0);
5432
5602
  v3.normalize();
5433
5603
  v3.multiplyScalar(offsetX / this.context.camera.zoom);
@@ -5800,32 +5970,32 @@ function Worker2() {
5800
5970
 
5801
5971
  // src/plugins/navigation/path.ts
5802
5972
  import {
5803
- Mesh as Mesh7,
5804
- Object3D as Object3D15,
5973
+ Mesh as Mesh8,
5974
+ Object3D as Object3D16,
5805
5975
  TextureLoader as TextureLoader2,
5806
5976
  Color as Color8,
5807
5977
  Vector2 as Vector28,
5808
- Vector3 as Vector320,
5978
+ Vector3 as Vector321,
5809
5979
  NormalBlending,
5810
5980
  RepeatWrapping
5811
5981
  } from "three";
5812
5982
 
5813
5983
  // src/external/meshLine.js
5814
5984
  import {
5815
- BufferGeometry as BufferGeometry4,
5985
+ BufferGeometry as BufferGeometry5,
5816
5986
  Matrix4,
5817
- Vector3 as Vector319,
5987
+ Vector3 as Vector320,
5818
5988
  Ray as Ray2,
5819
5989
  Sphere,
5820
- LineSegments as LineSegments4,
5990
+ LineSegments as LineSegments5,
5821
5991
  BufferAttribute,
5822
5992
  ShaderChunk,
5823
- ShaderMaterial as ShaderMaterial4,
5993
+ ShaderMaterial as ShaderMaterial5,
5824
5994
  UniformsLib,
5825
5995
  Color as Color7,
5826
5996
  Vector2 as Vector27
5827
5997
  } from "three";
5828
- var MeshLine = class extends BufferGeometry4 {
5998
+ var MeshLine = class extends BufferGeometry5 {
5829
5999
  constructor() {
5830
6000
  super();
5831
6001
  this.isMeshLine = true;
@@ -5894,7 +6064,7 @@ MeshLine.prototype.setPoints = function(points, wcb) {
5894
6064
  this.widthCallback = wcb;
5895
6065
  this.positions = [];
5896
6066
  this.counters = [];
5897
- if (points.length && points[0] instanceof Vector319) {
6067
+ if (points.length && points[0] instanceof Vector320) {
5898
6068
  for (var j = 0; j < points.length; j++) {
5899
6069
  var p = points[j];
5900
6070
  var c = j / points.length;
@@ -5918,7 +6088,7 @@ function MeshLineRaycast(raycaster, intersects) {
5918
6088
  var inverseMatrix = new Matrix4();
5919
6089
  var ray = new Ray2();
5920
6090
  var sphere = new Sphere();
5921
- var interRay = new Vector319();
6091
+ var interRay = new Vector320();
5922
6092
  var geometry = this.geometry;
5923
6093
  if (!geometry.boundingSphere) geometry.computeBoundingSphere();
5924
6094
  sphere.copy(geometry.boundingSphere);
@@ -5928,10 +6098,10 @@ function MeshLineRaycast(raycaster, intersects) {
5928
6098
  }
5929
6099
  inverseMatrix.copy(this.matrixWorld).invert();
5930
6100
  ray.copy(raycaster.ray).applyMatrix4(inverseMatrix);
5931
- var vStart = new Vector319();
5932
- var vEnd = new Vector319();
5933
- var interSegment = new Vector319();
5934
- var step = this instanceof LineSegments4 ? 2 : 1;
6101
+ var vStart = new Vector320();
6102
+ var vEnd = new Vector320();
6103
+ var interSegment = new Vector320();
6104
+ var step = this instanceof LineSegments5 ? 2 : 1;
5935
6105
  var index = geometry.index;
5936
6106
  var attributes = geometry.attributes;
5937
6107
  if (index !== null) {
@@ -5984,8 +6154,8 @@ MeshLine.prototype.getDistance = function(i) {
5984
6154
  let maxLength = 0;
5985
6155
  for (let k = 0; k < i; k++) {
5986
6156
  const index = 6 * k;
5987
- const p0 = new Vector319(this.positions[index], this.positions[index + 1], this.positions[index + 2]);
5988
- const p1 = new Vector319(this.positions[index + 6], this.positions[index + 7], this.positions[index + 8]);
6157
+ const p0 = new Vector320(this.positions[index], this.positions[index + 1], this.positions[index + 2]);
6158
+ const p1 = new Vector320(this.positions[index + 6], this.positions[index + 7], this.positions[index + 8]);
5989
6159
  const distance = p0.distanceTo(p1);
5990
6160
  maxLength += distance;
5991
6161
  }
@@ -6242,7 +6412,7 @@ ShaderChunk["meshline_frag"] = [
6242
6412
  ShaderChunk.fog_fragment,
6243
6413
  "}"
6244
6414
  ].join("\n");
6245
- var MeshLineMaterial = class extends ShaderMaterial4 {
6415
+ var MeshLineMaterial = class extends ShaderMaterial5 {
6246
6416
  constructor(parameters) {
6247
6417
  super({
6248
6418
  uniforms: Object.assign({}, UniformsLib.fog, {
@@ -6419,7 +6589,7 @@ var MeshLineMaterial = class extends ShaderMaterial4 {
6419
6589
  }
6420
6590
  };
6421
6591
  MeshLineMaterial.prototype.copy = function(source) {
6422
- ShaderMaterial4.prototype.copy.call(this, source);
6592
+ ShaderMaterial5.prototype.copy.call(this, source);
6423
6593
  this.lineWidth = source.lineWidth;
6424
6594
  this.map = source.map;
6425
6595
  this.useMap = source.useMap;
@@ -6448,7 +6618,7 @@ var defaultConfig2 = {
6448
6618
  lineWidth: 8,
6449
6619
  color: 16777215
6450
6620
  };
6451
- var Path2 = class extends Object3D15 {
6621
+ var Path2 = class extends Object3D16 {
6452
6622
  constructor(navigation, config) {
6453
6623
  super();
6454
6624
  this.navigation = navigation;
@@ -6497,7 +6667,7 @@ var Path2 = class extends Object3D15 {
6497
6667
  }
6498
6668
  } = this;
6499
6669
  const screenPoints = points.map(
6500
- ([x, y]) => vector3ToDevice(new Vector320(x, y, 0), camera, width, height)
6670
+ ([x, y]) => vector3ToDevice(new Vector321(x, y, 0), camera, width, height)
6501
6671
  ).map(({ x, y }) => [x, y]);
6502
6672
  const pointLength = getPathLength(screenPoints);
6503
6673
  return pointLength / 32;
@@ -6553,7 +6723,7 @@ var Path2 = class extends Object3D15 {
6553
6723
  blending: NormalBlending,
6554
6724
  repeat: new Vector28(this.getRepeat(), 1)
6555
6725
  });
6556
- const mesh = this.mesh = new Mesh7(lineGeometry, material);
6726
+ const mesh = this.mesh = new Mesh8(lineGeometry, material);
6557
6727
  this.add(mesh);
6558
6728
  return mesh;
6559
6729
  }
@@ -7241,9 +7411,12 @@ var AibeeLoader = class {
7241
7411
  const graphics = [];
7242
7412
  const graphicMap = /* @__PURE__ */ new Map();
7243
7413
  transformGraphicData(layer.elements, center2);
7414
+ const canMergeGraphics = [];
7244
7415
  layer.elements.forEach((options) => {
7245
7416
  if (options.group === "ground") {
7246
7417
  floor.createGround(options);
7418
+ } else if (options.canMerge) {
7419
+ canMergeGraphics.push(options);
7247
7420
  } else {
7248
7421
  const graphic = floor.addGraphic(options);
7249
7422
  graphics.push(graphic);
@@ -7252,6 +7425,21 @@ var AibeeLoader = class {
7252
7425
  });
7253
7426
  floor.userData.graphics = graphics;
7254
7427
  floor.userData.graphicMap = graphicMap;
7428
+ const group = canMergeGraphics.reduce((obj, options) => {
7429
+ const { fillColor, fillOpacity, strokeColor, strokeOpacity, height } = options;
7430
+ const key = `${fillColor}-${fillOpacity}-${strokeColor}-${strokeOpacity}-${height}`;
7431
+ if (obj[key]) {
7432
+ obj[key].push(options);
7433
+ } else {
7434
+ obj[key] = [options];
7435
+ }
7436
+ return obj;
7437
+ }, {});
7438
+ console.log(group);
7439
+ Object.values(group).forEach((options) => {
7440
+ const mergeGeometries4 = new MergeGraphic(this.bmap.context, options);
7441
+ floor.mergeGraphicLayer.add(mergeGeometries4);
7442
+ });
7255
7443
  break;
7256
7444
  case "ground":
7257
7445
  transformGraphicData(layer.elements, center2);
@@ -7261,8 +7449,8 @@ var AibeeLoader = class {
7261
7449
  case "wall":
7262
7450
  transformGraphicData(layer.elements, center2);
7263
7451
  const wallGroup = layer.elements.reduce((obj, options) => {
7264
- const { fillColor, fillOpacity, strokeColor, strokeOpacity } = options;
7265
- const key = `${fillColor}-${fillOpacity}-${strokeColor}-${strokeOpacity}`;
7452
+ const { fillColor, fillOpacity, strokeColor, strokeOpacity, height } = options;
7453
+ const key = `${fillColor}-${fillOpacity}-${strokeColor}-${strokeOpacity}-${height}`;
7266
7454
  if (obj[key]) {
7267
7455
  obj[key].push(options);
7268
7456
  } else {
@@ -7318,7 +7506,8 @@ var AibeeLoader = class {
7318
7506
  floor.poiLayer.createPoi({
7319
7507
  icon: options.poi_info.icon,
7320
7508
  texts: [{ text: options.store_name || options.poi_info.name }],
7321
- position: { x: pos[0], y: pos[1], z: options.airHeight }
7509
+ position: { x: pos[0], y: pos[1], z: options.airHeight },
7510
+ icon_size: [18, 18]
7322
7511
  });
7323
7512
  });
7324
7513
  break;
@@ -7328,7 +7517,8 @@ var AibeeLoader = class {
7328
7517
  floor.poiLayer.createPoi({
7329
7518
  icon: options.poi_info.icon,
7330
7519
  texts: [{ text: options.store_name || options.poi_info.name }],
7331
- position: { x: pos[0], y: pos[1], z: options.airHeight }
7520
+ position: { x: pos[0], y: pos[1], z: options.airHeight },
7521
+ icon_size: [18, 18]
7332
7522
  });
7333
7523
  });
7334
7524
  break;
@@ -7341,10 +7531,12 @@ var AibeeLoader = class {
7341
7531
  parkingSpacesGraphics.push(graphic);
7342
7532
  parkingSpacesGraphicMap.set(options.id, graphic);
7343
7533
  const pos = translatePosToCenter([options.center_x, options.center_y], center2);
7344
- floor.poiLayer.createPoi({
7345
- texts: [{ text: options.poi_info.name }],
7346
- position: { x: pos[0], y: pos[1], z: options.airHeight }
7347
- });
7534
+ if (options.texts[0]) {
7535
+ floor.poiLayer.createPoi({
7536
+ texts: [{ text: options.texts[0] }],
7537
+ position: { x: pos[0], y: pos[1], z: options.airHeight }
7538
+ });
7539
+ }
7348
7540
  });
7349
7541
  floor.userData.parkingSpaces = parkingSpacesGraphics;
7350
7542
  floor.userData.parkingSpacesGraphicMap = parkingSpacesGraphicMap;
@@ -7380,6 +7572,7 @@ export {
7380
7572
  Lane,
7381
7573
  Layer,
7382
7574
  MapTypePolar,
7575
+ MergeGraphic,
7383
7576
  Model,
7384
7577
  MulFloors,
7385
7578
  Navigation,
@@ -7412,7 +7605,8 @@ export {
7412
7605
  darkenColor,
7413
7606
  defaultAibeeLoaderOption,
7414
7607
  defaultConfig,
7415
- defaultOptions4 as defaultOptions,
7608
+ defaultGraphicOptions,
7609
+ defaultOptions3 as defaultOptions,
7416
7610
  dispose,
7417
7611
  disposeLoader,
7418
7612
  distancePointToSegment,