@aibee/crc-bmap 0.1.8 → 0.1.10

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
@@ -5413,7 +5413,7 @@ var Poi2 = class extends Object3D14 {
5413
5413
  }
5414
5414
  async initIcon() {
5415
5415
  if (this.options.icon) {
5416
- this._initIconPromise = new Promise(async (resolve) => {
5416
+ return this._initIconPromise = new Promise(async (resolve) => {
5417
5417
  const texture = await ImgTextureFactory.getTextureByUrl(this.options.icon);
5418
5418
  const spriteIcon = new Sprite(
5419
5419
  new SpriteMaterial({
@@ -9709,6 +9709,9 @@ var ImuPosition = class {
9709
9709
  delta_px;
9710
9710
  delta_py;
9711
9711
  constructor() {
9712
+ this.init();
9713
+ }
9714
+ init() {
9712
9715
  this.fre = 100;
9713
9716
  this.accH_fifo = [];
9714
9717
  this.accH_time_fifo = [];
@@ -9749,7 +9752,7 @@ var ImuPosition = class {
9749
9752
  this.delta_py = 0;
9750
9753
  }
9751
9754
  reset() {
9752
- this.constructor();
9755
+ this.init();
9753
9756
  }
9754
9757
  set_init_pose(pose = [0, 0]) {
9755
9758
  this.last_px = pose[0];
@@ -10171,6 +10174,7 @@ var PdrPosition = class extends EventDispatcher14 {
10171
10174
  this.sensor.start();
10172
10175
  this.sensor.addEventListener("add-data-item", ({ item }) => {
10173
10176
  const [success, x, y] = this.pdr.pfFusionPDRiBeacon(item);
10177
+ console.log(item, success, x, y);
10174
10178
  if (success) {
10175
10179
  this.dispatchEvent({ type: "position", x, y });
10176
10180
  }