@aibee/crc-bmap 0.0.37 → 0.0.38
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.cjs.min.js +2 -2
- package/lib/bmap.cjs.min.js.map +3 -3
- package/lib/bmap.esm.js +11 -10
- package/lib/bmap.esm.js.map +2 -2
- package/lib/bmap.esm.min.js +2 -2
- package/lib/bmap.esm.min.js.map +3 -3
- package/lib/bmap.min.js +2 -2
- package/lib/bmap.min.js.map +3 -3
- package/lib/src/bmap.d.ts +1 -1
- package/package.json +1 -1
package/lib/bmap.esm.js
CHANGED
|
@@ -500,13 +500,15 @@ var Graphic = class extends Object3D {
|
|
|
500
500
|
return size;
|
|
501
501
|
}
|
|
502
502
|
getPosition() {
|
|
503
|
-
|
|
503
|
+
const center2 = this.getCenter();
|
|
504
|
+
center2.setZ(center2.z + this.options.height);
|
|
505
|
+
return center2;
|
|
504
506
|
}
|
|
505
507
|
init() {
|
|
506
508
|
this.geometry = this.initGeometry();
|
|
507
509
|
this.material = this.initMaterial();
|
|
508
510
|
this.mesh = this.initMesh();
|
|
509
|
-
this.mesh.position.z = this.options.airHeight
|
|
511
|
+
this.mesh.position.z = this.options.airHeight;
|
|
510
512
|
this.mesh.castShadow = true;
|
|
511
513
|
this.add(this.mesh);
|
|
512
514
|
this.line = this.createBorder();
|
|
@@ -551,7 +553,7 @@ var Graphic = class extends Object3D {
|
|
|
551
553
|
const material = this.initLineMaterial();
|
|
552
554
|
const geometry = new EdgesGeometry(this.geometry);
|
|
553
555
|
const line = new LineSegments(geometry, material);
|
|
554
|
-
line.position.z = this.options.airHeight
|
|
556
|
+
line.position.z = this.options.airHeight;
|
|
555
557
|
return line;
|
|
556
558
|
}
|
|
557
559
|
raycast(raycaster) {
|
|
@@ -626,7 +628,7 @@ var Shadow = class extends Object3D2 {
|
|
|
626
628
|
});
|
|
627
629
|
const mesh = new Mesh2(geometry, material);
|
|
628
630
|
mesh.receiveShadow = true;
|
|
629
|
-
mesh.position.z = -
|
|
631
|
+
mesh.position.z = -10;
|
|
630
632
|
this.add(mesh);
|
|
631
633
|
this.plane = mesh;
|
|
632
634
|
return mesh;
|
|
@@ -2001,7 +2003,6 @@ var Context = class extends EventDispatcher5 {
|
|
|
2001
2003
|
position
|
|
2002
2004
|
});
|
|
2003
2005
|
}
|
|
2004
|
-
console.log("onClick", e.offsetX, e.offsetY);
|
|
2005
2006
|
const pois = this.getPoisByDeviceXy(e.offsetX, e.offsetY);
|
|
2006
2007
|
if (pois.length) {
|
|
2007
2008
|
this.dispatchEvent({ type: "poi-click", pois });
|
|
@@ -2296,7 +2297,7 @@ var defaultConfig = {
|
|
|
2296
2297
|
},
|
|
2297
2298
|
useFloorCache: true,
|
|
2298
2299
|
control: {
|
|
2299
|
-
maxPolar:
|
|
2300
|
+
maxPolar: 0.9
|
|
2300
2301
|
},
|
|
2301
2302
|
svg: {
|
|
2302
2303
|
circle: {
|
|
@@ -2462,9 +2463,9 @@ var BMap = class extends EventDispatcher6 {
|
|
|
2462
2463
|
const groundGraphics = grounds.map((ground) => new Graphic(this.context, ground.info));
|
|
2463
2464
|
curFloor.addGrounds(groundGraphics);
|
|
2464
2465
|
const graphicData = data.filter((item) => item.info.group !== "ground");
|
|
2465
|
-
graphicData.forEach((item) => {
|
|
2466
|
+
graphicData.forEach((item, index) => {
|
|
2466
2467
|
item.info.airHeight = 5;
|
|
2467
|
-
item.info.height = 5;
|
|
2468
|
+
item.info.height = 5 + index * 1e-4;
|
|
2468
2469
|
});
|
|
2469
2470
|
const legacyToGraphicMap = /* @__PURE__ */ new Map();
|
|
2470
2471
|
const graphics = graphicData.map((item) => {
|
|
@@ -2566,9 +2567,9 @@ var BMap = class extends EventDispatcher6 {
|
|
|
2566
2567
|
*/
|
|
2567
2568
|
changeMapType(type, duration = 500) {
|
|
2568
2569
|
if (type === "2d") {
|
|
2569
|
-
this.context.setPolarAngle(0);
|
|
2570
|
+
return this.context.setPolarAngle(0, duration);
|
|
2570
2571
|
} else {
|
|
2571
|
-
this.context.setPolarAngle(
|
|
2572
|
+
return this.context.setPolarAngle(0.9, duration);
|
|
2572
2573
|
}
|
|
2573
2574
|
}
|
|
2574
2575
|
/**
|