@aibee/crc-bmap 0.0.121 → 0.0.123

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
@@ -1623,7 +1623,7 @@ import {
1623
1623
  Vector2 as Vector26,
1624
1624
  Raycaster as Raycaster3,
1625
1625
  Box3 as Box39,
1626
- Color as Color6,
1626
+ Color as Color5,
1627
1627
  AmbientLight as AmbientLight2
1628
1628
  } from "three";
1629
1629
  import { Group as TweenGroup, Tween } from "@tweenjs/tween.js";
@@ -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;
@@ -3464,7 +3464,7 @@ var SelectBox = class extends BaseSvg {
3464
3464
  // src/elements/wall.ts
3465
3465
  import {
3466
3466
  BufferGeometry as BufferGeometry2,
3467
- Color as Color4,
3467
+ Color as Color3,
3468
3468
  ExtrudeGeometry as ExtrudeGeometry2,
3469
3469
  LineSegments as LineSegments2,
3470
3470
  Mesh as Mesh4,
@@ -3549,9 +3549,9 @@ var Wall = class extends Object3D9 {
3549
3549
  uniforms: {
3550
3550
  maxZ: { value: maxZ },
3551
3551
  // 初始化maxZ的值
3552
- uColor: { value: new Color4(this.options[0].fillColor) },
3552
+ uColor: { value: new Color3(this.options[0].fillColor) },
3553
3553
  // 顶面颜色
3554
- uColor2: { value: new Color4(darkenColor(this.options[0].fillColor)) },
3554
+ uColor2: { value: new Color3(darkenColor(this.options[0].fillColor)) },
3555
3555
  // 侧面颜色
3556
3556
  uOpacity: { value: this.options[0].fillOpacity }
3557
3557
  // 透明度
@@ -3618,7 +3618,7 @@ var Wall = class extends Object3D9 {
3618
3618
 
3619
3619
  // src/elements/ground-texture.ts
3620
3620
  import { ExtrudeGeometry as ExtrudeGeometry3, Mesh as Mesh5, Object3D as Object3D10 } from "three";
3621
- var defaultOptions4 = {
3621
+ var defaultOptions3 = {
3622
3622
  uuid: "",
3623
3623
  iconUrl: "",
3624
3624
  name: "",
@@ -3635,7 +3635,7 @@ var GroundTexture = class extends Object3D10 {
3635
3635
  super();
3636
3636
  this.context = context;
3637
3637
  this.options = proxyOptions(
3638
- { ...defaultOptions4, ...options },
3638
+ { ...defaultOptions3, ...options },
3639
3639
  this
3640
3640
  );
3641
3641
  this.init();
@@ -4203,12 +4203,12 @@ var HoverHelper = class extends EventDispatcher5 {
4203
4203
  // src/factory/material.ts
4204
4204
  import { LineMaterial } from "three/examples/jsm/lines/LineMaterial";
4205
4205
  import {
4206
- Color as Color5,
4206
+ Color as Color4,
4207
4207
  LineBasicMaterial as LineBasicMaterial4,
4208
4208
  MeshStandardMaterial as MeshStandardMaterial2,
4209
4209
  MeshBasicMaterial as MeshBasicMaterial5,
4210
4210
  ShaderMaterial as ShaderMaterial3,
4211
- DoubleSide as DoubleSide4,
4211
+ DoubleSide as DoubleSide3,
4212
4212
  Vector2 as Vector25
4213
4213
  } from "three";
4214
4214
  function vectorToString(vector) {
@@ -4233,7 +4233,7 @@ var MaterialFactory = class {
4233
4233
  return this.lineMaterialMap.get(key);
4234
4234
  }
4235
4235
  const lineMaterial = new LineBasicMaterial4({
4236
- color: new Color5(color).convertLinearToSRGB(),
4236
+ color: new Color4(color).convertLinearToSRGB(),
4237
4237
  transparent: true,
4238
4238
  opacity
4239
4239
  });
@@ -4246,7 +4246,7 @@ var MaterialFactory = class {
4246
4246
  return this.meshStandardMaterialMap.get(key);
4247
4247
  }
4248
4248
  const material = new MeshStandardMaterial2({
4249
- color: new Color5(color).convertLinearToSRGB(),
4249
+ color: new Color4(color).convertLinearToSRGB(),
4250
4250
  roughness: 1,
4251
4251
  transparent: true,
4252
4252
  opacity,
@@ -4326,10 +4326,10 @@ var MaterialFactory = class {
4326
4326
  const material = new ShaderMaterial3({
4327
4327
  uniforms: {
4328
4328
  uColor: {
4329
- value: new Color5(gradualColor[0]).convertLinearToSRGB()
4329
+ value: new Color4(gradualColor[0]).convertLinearToSRGB()
4330
4330
  },
4331
4331
  uGradualColor: {
4332
- value: new Color5(gradualColor[1]).convertLinearToSRGB()
4332
+ value: new Color4(gradualColor[1]).convertLinearToSRGB()
4333
4333
  },
4334
4334
  center: {
4335
4335
  value: center2
@@ -4352,7 +4352,7 @@ var MaterialFactory = class {
4352
4352
  },
4353
4353
  vertexShader,
4354
4354
  fragmentShader,
4355
- side: DoubleSide4
4355
+ side: DoubleSide3
4356
4356
  });
4357
4357
  this.shaderMaterialMap.set(key, material);
4358
4358
  return material;
@@ -4611,7 +4611,7 @@ var Context = class extends EventDispatcher6 {
4611
4611
  changeAmbientLightColor(color) {
4612
4612
  this.lights.children.forEach((item) => {
4613
4613
  if (item instanceof AmbientLight2) {
4614
- item.color = new Color6(color);
4614
+ item.color = new Color5(color);
4615
4615
  }
4616
4616
  });
4617
4617
  }
@@ -5803,7 +5803,7 @@ import {
5803
5803
  Mesh as Mesh7,
5804
5804
  Object3D as Object3D15,
5805
5805
  TextureLoader as TextureLoader2,
5806
- Color as Color8,
5806
+ Color as Color7,
5807
5807
  Vector2 as Vector28,
5808
5808
  Vector3 as Vector320,
5809
5809
  NormalBlending,
@@ -5822,7 +5822,7 @@ import {
5822
5822
  ShaderChunk,
5823
5823
  ShaderMaterial as ShaderMaterial4,
5824
5824
  UniformsLib,
5825
- Color as Color7,
5825
+ Color as Color6,
5826
5826
  Vector2 as Vector27
5827
5827
  } from "three";
5828
5828
  var MeshLine = class extends BufferGeometry4 {
@@ -6251,7 +6251,7 @@ var MeshLineMaterial = class extends ShaderMaterial4 {
6251
6251
  useMap: { value: 0 },
6252
6252
  alphaMap: { value: null },
6253
6253
  useAlphaMap: { value: 0 },
6254
- color: { value: new Color7(16777215) },
6254
+ color: { value: new Color6(16777215) },
6255
6255
  opacity: { value: 1 },
6256
6256
  resolution: { value: new Vector27(1, 1) },
6257
6257
  sizeAttenuation: { value: 1 },
@@ -6540,7 +6540,7 @@ var Path2 = class extends Object3D15 {
6540
6540
  }
6541
6541
  const material = this.material = new MeshLineMaterial({
6542
6542
  useMap: true,
6543
- color: new Color8(this.config.color),
6543
+ color: new Color7(this.config.color),
6544
6544
  transparent: true,
6545
6545
  resolution: new Vector28(
6546
6546
  this.navigation.bmap.context.clientSize.width,
@@ -7261,8 +7261,8 @@ var AibeeLoader = class {
7261
7261
  case "wall":
7262
7262
  transformGraphicData(layer.elements, center2);
7263
7263
  const wallGroup = layer.elements.reduce((obj, options) => {
7264
- const { fillColor, fillOpacity, strokeColor, strokeOpacity } = options;
7265
- const key = `${fillColor}-${fillOpacity}-${strokeColor}-${strokeOpacity}`;
7264
+ const { fillColor, fillOpacity, strokeColor, strokeOpacity, height } = options;
7265
+ const key = `${fillColor}-${fillOpacity}-${strokeColor}-${strokeOpacity}-${height}`;
7266
7266
  if (obj[key]) {
7267
7267
  obj[key].push(options);
7268
7268
  } else {
@@ -7342,7 +7342,7 @@ var AibeeLoader = class {
7342
7342
  parkingSpacesGraphicMap.set(options.id, graphic);
7343
7343
  const pos = translatePosToCenter([options.center_x, options.center_y], center2);
7344
7344
  floor.poiLayer.createPoi({
7345
- texts: [{ text: options.poi_info.name }],
7345
+ texts: [{ text: options.text[0] }],
7346
7346
  position: { x: pos[0], y: pos[1], z: options.airHeight }
7347
7347
  });
7348
7348
  });
@@ -7412,7 +7412,8 @@ export {
7412
7412
  darkenColor,
7413
7413
  defaultAibeeLoaderOption,
7414
7414
  defaultConfig,
7415
- defaultOptions4 as defaultOptions,
7415
+ defaultGraphicOptions,
7416
+ defaultOptions3 as defaultOptions,
7416
7417
  dispose,
7417
7418
  disposeLoader,
7418
7419
  distancePointToSegment,