@aibee/crc-bmap 0.8.47 → 0.8.49
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 +11 -11
- package/lib/bmap.esm.js +35 -48
- package/lib/bmap.esm.min.js +11 -11
- package/lib/bmap.min.js +11 -11
- package/lib/src/loader/AibeeLoader/index.d.ts +1 -1
- package/lib/src/loader/AibeeLoader/index.js +5 -15
- package/lib/src/loader/AibeeLoader/layer.js +11 -15
- package/lib/src/loader/AibeeLoader/type.d.ts +10 -0
- package/lib/src/plugins/pdr-position/pdr.js +1 -0
- package/lib/src/utils/translate.d.ts +3 -0
- package/lib/src/utils/translate.js +4 -4
- package/package.json +1 -1
package/lib/bmap.esm.js
CHANGED
|
@@ -8614,12 +8614,12 @@ function transformGraphicData(data, center2, baseIndex) {
|
|
|
8614
8614
|
});
|
|
8615
8615
|
}
|
|
8616
8616
|
if (item.center) {
|
|
8617
|
-
item.
|
|
8617
|
+
item.centerCoords = translatePosToCenter(item.center, center2);
|
|
8618
8618
|
}
|
|
8619
8619
|
} else {
|
|
8620
8620
|
item.geometry.coords = translatePosToCenter(item.geometry.cds, center2);
|
|
8621
8621
|
if (item.center) {
|
|
8622
|
-
item.
|
|
8622
|
+
item.centerCoords = translatePosToCenter(item.center, center2);
|
|
8623
8623
|
}
|
|
8624
8624
|
}
|
|
8625
8625
|
if (item.center_x && item.center_y) {
|
|
@@ -8627,8 +8627,8 @@ function transformGraphicData(data, center2, baseIndex) {
|
|
|
8627
8627
|
item.center_x,
|
|
8628
8628
|
item.center_y
|
|
8629
8629
|
], center2);
|
|
8630
|
-
item.
|
|
8631
|
-
item.
|
|
8630
|
+
item.center_coord_x = x;
|
|
8631
|
+
item.center_coord_y = y;
|
|
8632
8632
|
}
|
|
8633
8633
|
});
|
|
8634
8634
|
for (let i = 0; i < data.length; i++) {
|
|
@@ -18329,6 +18329,7 @@ var PositioningSystem = class {
|
|
|
18329
18329
|
if (!this.particleFilter.getPosInitFlag()) {
|
|
18330
18330
|
this.particleFilter.initParticlesByPos(pos.x, pos.y, () => true);
|
|
18331
18331
|
const sensorData = this.cacheSensorData.filter((item) => item.timestamp > time);
|
|
18332
|
+
console.log("\u521D\u59CBsensorData", sensorData);
|
|
18332
18333
|
sensorData.map((item) => this.pfFusionPDRiBeacon(item));
|
|
18333
18334
|
} else {
|
|
18334
18335
|
this.particleFilter.update(pos, this.sigmaBeacon);
|
|
@@ -19706,8 +19707,8 @@ function glbLayer(layer, floor) {
|
|
|
19706
19707
|
url: options.secondUrl,
|
|
19707
19708
|
rotate: options.secondRotate,
|
|
19708
19709
|
width: options.secondWidth,
|
|
19709
|
-
center_x: options.
|
|
19710
|
-
center_y: options.
|
|
19710
|
+
center_x: options.center_coord_x,
|
|
19711
|
+
center_y: options.center_coord_y
|
|
19711
19712
|
}));
|
|
19712
19713
|
floor.glbModelLayer.add(model);
|
|
19713
19714
|
});
|
|
@@ -19725,8 +19726,8 @@ function storeLayer(layer, floor) {
|
|
|
19725
19726
|
icon: options.poi_info.icon,
|
|
19726
19727
|
text: options.poi_info.showName || options.store_name || options.poi_info.text,
|
|
19727
19728
|
position: {
|
|
19728
|
-
x: options.
|
|
19729
|
-
y: options.
|
|
19729
|
+
x: options.center_coord_x,
|
|
19730
|
+
y: options.center_coord_y,
|
|
19730
19731
|
z: options.airHeight + options.height
|
|
19731
19732
|
},
|
|
19732
19733
|
icon_size: [
|
|
@@ -19759,8 +19760,8 @@ function facilityLayer(layer, floor) {
|
|
|
19759
19760
|
icon: options.poi_info.icon,
|
|
19760
19761
|
text: options.poi_info.showName || options.store_name || options.poi_info.text,
|
|
19761
19762
|
position: {
|
|
19762
|
-
x: options.
|
|
19763
|
-
y: options.
|
|
19763
|
+
x: options.center_coord_x,
|
|
19764
|
+
y: options.center_coord_y,
|
|
19764
19765
|
z: options.airHeight + options.height
|
|
19765
19766
|
},
|
|
19766
19767
|
icon_size: [
|
|
@@ -19788,8 +19789,8 @@ function parkingSpaceLayer(layer, floor, options) {
|
|
|
19788
19789
|
id: options2.id,
|
|
19789
19790
|
text: options2.texts[0],
|
|
19790
19791
|
position: {
|
|
19791
|
-
x: options2.
|
|
19792
|
-
y: options2.
|
|
19792
|
+
x: options2.center_coord_x,
|
|
19793
|
+
y: options2.center_coord_y,
|
|
19793
19794
|
z: options2.airHeight + options2.height
|
|
19794
19795
|
}
|
|
19795
19796
|
});
|
|
@@ -19808,13 +19809,9 @@ function textLayer(layer, floor) {
|
|
|
19808
19809
|
const center2 = floor.userData.center;
|
|
19809
19810
|
transformGraphicData(layer.elements, center2);
|
|
19810
19811
|
const textTexture = new TextTexture(floor.context, layer.elements.map((item) => {
|
|
19811
|
-
const pos = translatePosToCenter([
|
|
19812
|
-
item.center_x,
|
|
19813
|
-
item.center_y
|
|
19814
|
-
], center2);
|
|
19815
19812
|
return _extends({}, item, {
|
|
19816
|
-
center_x:
|
|
19817
|
-
center_y:
|
|
19813
|
+
center_x: item.center_coord_x,
|
|
19814
|
+
center_y: item.center_coord_y
|
|
19818
19815
|
});
|
|
19819
19816
|
}));
|
|
19820
19817
|
floor.textTextureLayer.add(textTexture);
|
|
@@ -19995,7 +19992,7 @@ var AibeeLoader = class extends EventDispatcher20 {
|
|
|
19995
19992
|
getDataByJson(data, floor) {
|
|
19996
19993
|
return __async(this, null, function* () {
|
|
19997
19994
|
floor = this.getFloorBaseLayer(data, floor);
|
|
19998
|
-
|
|
19995
|
+
this.getFloorContentLayer(data, floor);
|
|
19999
19996
|
this.changeFloorBox(data, floor);
|
|
20000
19997
|
return floor;
|
|
20001
19998
|
});
|
|
@@ -20059,12 +20056,12 @@ var AibeeLoader = class extends EventDispatcher20 {
|
|
|
20059
20056
|
});
|
|
20060
20057
|
this.bmap.context.control.setAzimuthalAngle(angle / 180 * Math.PI, true);
|
|
20061
20058
|
this.getFloorBaseLayer(floorData, floor);
|
|
20062
|
-
this.changeFloorBox(floorData, floor);
|
|
20063
20059
|
this.bmap.buildingCenter = floor.userData.center;
|
|
20064
20060
|
this.bmap.currentBuildGround = (_floor_userData_data_layers_find = floor.userData.data.layers.find((item) => item.l_type === "range")) == null ? void 0 : _floor_userData_data_layers_find.elements[0];
|
|
20061
|
+
this.getFloorContentLayer(floorData, floor);
|
|
20062
|
+
this.changeFloorBox(floorData, floor);
|
|
20065
20063
|
this.bmap.context.switchFloor(floor);
|
|
20066
20064
|
this.bmap.initialFloorCamera();
|
|
20067
|
-
yield sleepOneRf();
|
|
20068
20065
|
this.dispatchEvent({
|
|
20069
20066
|
type: "switch-floor-ground",
|
|
20070
20067
|
data: {
|
|
@@ -20072,10 +20069,6 @@ var AibeeLoader = class extends EventDispatcher20 {
|
|
|
20072
20069
|
graphics: []
|
|
20073
20070
|
}
|
|
20074
20071
|
});
|
|
20075
|
-
yield this.getFloorContentLayer(floorData, floor);
|
|
20076
|
-
this.changeFloorBox(floorData, floor);
|
|
20077
|
-
this.bmap.initialFloorCamera();
|
|
20078
|
-
this.bmap.context.cameraBound.updateBox();
|
|
20079
20072
|
this.dispatchEvent({
|
|
20080
20073
|
type: "switch-floor-after",
|
|
20081
20074
|
data: {
|
|
@@ -20125,30 +20118,24 @@ var AibeeLoader = class extends EventDispatcher20 {
|
|
|
20125
20118
|
return floor;
|
|
20126
20119
|
}
|
|
20127
20120
|
getFloorContentLayer(data, floor) {
|
|
20128
|
-
|
|
20129
|
-
|
|
20130
|
-
|
|
20131
|
-
|
|
20132
|
-
|
|
20133
|
-
|
|
20134
|
-
|
|
20135
|
-
|
|
20136
|
-
|
|
20137
|
-
|
|
20138
|
-
|
|
20139
|
-
|
|
20140
|
-
|
|
20141
|
-
continue;
|
|
20142
|
-
}
|
|
20143
|
-
transformLayers(layer, floor, this.options);
|
|
20144
|
-
console.log("time", Date.now() - startTime, layer.l_type);
|
|
20145
|
-
if (Date.now() - startTime > 16) {
|
|
20146
|
-
yield sleepOneRf();
|
|
20147
|
-
startTime = Date.now();
|
|
20148
|
-
}
|
|
20121
|
+
if (!floor) {
|
|
20122
|
+
floor = new Floor(this.bmap.context);
|
|
20123
|
+
}
|
|
20124
|
+
floor.userData.graphics = [];
|
|
20125
|
+
floor.userData.graphicMap = /* @__PURE__ */ new Map();
|
|
20126
|
+
let startTime = Date.now();
|
|
20127
|
+
for (let i = 0; i < data.layers.length; i++) {
|
|
20128
|
+
const layer = data.layers[i];
|
|
20129
|
+
if ([
|
|
20130
|
+
"range",
|
|
20131
|
+
"ground"
|
|
20132
|
+
].includes(layer.l_type)) {
|
|
20133
|
+
continue;
|
|
20149
20134
|
}
|
|
20150
|
-
|
|
20151
|
-
|
|
20135
|
+
transformLayers(layer, floor, this.options);
|
|
20136
|
+
console.log("time", Date.now() - startTime, layer.l_type);
|
|
20137
|
+
}
|
|
20138
|
+
return floor;
|
|
20152
20139
|
}
|
|
20153
20140
|
clear() {
|
|
20154
20141
|
return __async(this, null, function* () {
|