@aibee/crc-bmap 0.0.36 → 0.0.37

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
@@ -158,8 +158,6 @@ function initLight() {
158
158
  function initControl(camera, domElement) {
159
159
  const control = new MapControls(camera, domElement);
160
160
  control.enableDamping = false;
161
- control.maxPolarAngle = 0;
162
- control.minPolarAngle = 0;
163
161
  control.zoomSpeed = 2;
164
162
  return control;
165
163
  }
@@ -374,6 +372,11 @@ function sleepOnePromise() {
374
372
  return Promise.resolve();
375
373
  }
376
374
 
375
+ // src/utils/color.ts
376
+ function strToNumber(str) {
377
+ return parseInt(str.replace("#", "0x"), 16);
378
+ }
379
+
377
380
  // src/context.ts
378
381
  import {
379
382
  EventDispatcher as EventDispatcher5,
@@ -623,7 +626,7 @@ var Shadow = class extends Object3D2 {
623
626
  });
624
627
  const mesh = new Mesh2(geometry, material);
625
628
  mesh.receiveShadow = true;
626
- mesh.position.z = -5;
629
+ mesh.position.z = -7;
627
630
  this.add(mesh);
628
631
  this.plane = mesh;
629
632
  return mesh;
@@ -2042,6 +2045,7 @@ var Context = class extends EventDispatcher5 {
2042
2045
  this.camera = initCamera(w, h);
2043
2046
  this.renderer.setSize(w, h);
2044
2047
  this.control = initControl(this.camera, this.renderer.domElement);
2048
+ this.control.maxPolarAngle = this.config.control.maxPolar;
2045
2049
  this.container.appendChild(this.renderer.domElement);
2046
2050
  this.scene.add(this.lights);
2047
2051
  this.basicRatio = this.getRatio();
@@ -2142,6 +2146,8 @@ var Context = class extends EventDispatcher5 {
2142
2146
  this.control.update();
2143
2147
  }).onComplete(() => {
2144
2148
  this.control.enabled = true;
2149
+ this.control.maxPolarAngle = this.config.control.maxPolar;
2150
+ this.control.minPolarAngle = 0;
2145
2151
  this.tweenGroup.remove(tween);
2146
2152
  resolve(true);
2147
2153
  }).onStart(() => {
@@ -2290,7 +2296,7 @@ var defaultConfig = {
2290
2296
  },
2291
2297
  useFloorCache: true,
2292
2298
  control: {
2293
- maxPolar: 1.2
2299
+ maxPolar: 1
2294
2300
  },
2295
2301
  svg: {
2296
2302
  circle: {
@@ -2449,11 +2455,17 @@ var BMap = class extends EventDispatcher6 {
2449
2455
  const grounds = data.filter((item) => item.info.group === "ground");
2450
2456
  grounds.forEach((item) => {
2451
2457
  item.info.fillColor = "#F5F7F9";
2458
+ item.info.fillOpacity = 1;
2452
2459
  item.info.strokeOpacity = 0;
2460
+ item.info.height = 5;
2453
2461
  });
2454
2462
  const groundGraphics = grounds.map((ground) => new Graphic(this.context, ground.info));
2455
2463
  curFloor.addGrounds(groundGraphics);
2456
2464
  const graphicData = data.filter((item) => item.info.group !== "ground");
2465
+ graphicData.forEach((item) => {
2466
+ item.info.airHeight = 5;
2467
+ item.info.height = 5;
2468
+ });
2457
2469
  const legacyToGraphicMap = /* @__PURE__ */ new Map();
2458
2470
  const graphics = graphicData.map((item) => {
2459
2471
  const graphic = curFloor.addGraphic(item.info);
@@ -2556,7 +2568,7 @@ var BMap = class extends EventDispatcher6 {
2556
2568
  if (type === "2d") {
2557
2569
  this.context.setPolarAngle(0);
2558
2570
  } else {
2559
- this.context.setPolarAngle(1.2);
2571
+ this.context.setPolarAngle(1);
2560
2572
  }
2561
2573
  }
2562
2574
  /**
@@ -2780,6 +2792,7 @@ export {
2780
2792
  setLineStartEnd,
2781
2793
  setRectPosition,
2782
2794
  sleepOnePromise,
2795
+ strToNumber,
2783
2796
  timeoutPromise,
2784
2797
  vector3ToDevice
2785
2798
  };