@aibee/crc-bmap 0.0.39 → 0.0.41

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
@@ -176,7 +176,7 @@ function initDirectionalLight(color = 16777215, intensity = 1) {
176
176
  directionalLight.castShadow = true;
177
177
  directionalLight.shadow.radius = 8;
178
178
  directionalLight.shadow.bias = -1e-3;
179
- directionalLight.shadow.mapSize.set(64, 64);
179
+ directionalLight.shadow.mapSize.set(128, 128);
180
180
  directionalLight.shadow.camera.left = -200;
181
181
  directionalLight.shadow.camera.right = 200;
182
182
  directionalLight.shadow.camera.top = 200;
@@ -603,7 +603,7 @@ var Shadow = class extends Object3D2 {
603
603
  super();
604
604
  __publicField(this, "directionalLight");
605
605
  __publicField(this, "plane");
606
- __publicField(this, "basicOpacity", 0.39);
606
+ __publicField(this, "basicOpacity", 0.15);
607
607
  this.directionalLight = this.initLight();
608
608
  this.initPlane();
609
609
  }
@@ -1221,6 +1221,7 @@ var Floor = class extends Object3D7 {
1221
1221
  __publicField(this, "shadow", new Shadow());
1222
1222
  __publicField(this, "heatmap");
1223
1223
  __publicField(this, "groundUpper", new Object3D7());
1224
+ __publicField(this, "groundMaxHeight", 0);
1224
1225
  this.graphicLayer = new GraphicLayer(this.context);
1225
1226
  this.poiLayer = new PoiLayer(this.context);
1226
1227
  this.groundUpper.add(this.graphicLayer);
@@ -1234,6 +1235,11 @@ var Floor = class extends Object3D7 {
1234
1235
  this.groundUpper.add(ground);
1235
1236
  }
1236
1237
  });
1238
+ this.changeGroundMaxHeight();
1239
+ }
1240
+ changeGroundMaxHeight() {
1241
+ const grounds = Array.from(this.grounds);
1242
+ this.groundMaxHeight = this.grounds.size > 0 ? Math.max(...grounds.map((ground) => ground.options.height + ground.options.airHeight)) : 0;
1237
1243
  }
1238
1244
  get hasElement() {
1239
1245
  return !!(this.grounds.size || this.graphicLayer.children.length);
@@ -1250,6 +1256,7 @@ var Floor = class extends Object3D7 {
1250
1256
  this.add(this.shadow);
1251
1257
  }
1252
1258
  addGraphic(graphicOptions) {
1259
+ graphicOptions.airHeight = Math.max(this.groundMaxHeight, graphicOptions.airHeight || 0);
1253
1260
  return this.graphicLayer.createGraphic(graphicOptions);
1254
1261
  }
1255
1262
  addPoi(poiOptions) {