@aibee/crc-bmap 0.13.18 → 0.13.20

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/meta.json CHANGED
@@ -523,7 +523,7 @@
523
523
  "format": "esm"
524
524
  },
525
525
  "../lib/src/utils/string.js": {
526
- "bytes": 285,
526
+ "bytes": 1179,
527
527
  "imports": [
528
528
  {
529
529
  "path": "core-js/modules/es.string.replace.js",
@@ -534,6 +534,11 @@
534
534
  "path": "core-js/modules/es.regexp.exec.js",
535
535
  "kind": "import-statement",
536
536
  "external": true
537
+ },
538
+ {
539
+ "path": "core-js/modules/es.array.push.js",
540
+ "kind": "import-statement",
541
+ "external": true
537
542
  }
538
543
  ],
539
544
  "format": "esm"
@@ -727,7 +732,7 @@
727
732
  "format": "esm"
728
733
  },
729
734
  "../lib/src/utils/geometry.js": {
730
- "bytes": 8126,
735
+ "bytes": 8298,
731
736
  "imports": [
732
737
  {
733
738
  "path": "core-js/modules/es.typed-array.float32-array.js",
@@ -1030,7 +1035,7 @@
1030
1035
  "format": "esm"
1031
1036
  },
1032
1037
  "../lib/src/utils/index-db.js": {
1033
- "bytes": 5588,
1038
+ "bytes": 5592,
1034
1039
  "imports": [
1035
1040
  {
1036
1041
  "path": "<runtime>",
@@ -1041,13 +1046,28 @@
1041
1046
  "format": "esm"
1042
1047
  },
1043
1048
  "../lib/src/factory/text-texture.js": {
1044
- "bytes": 29902,
1049
+ "bytes": 28006,
1045
1050
  "imports": [
1046
1051
  {
1047
1052
  "path": "../../../node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_extends.js",
1048
1053
  "kind": "import-statement",
1049
1054
  "original": "@swc/helpers/_/_extends"
1050
1055
  },
1056
+ {
1057
+ "path": "core-js/modules/es.regexp.exec.js",
1058
+ "kind": "import-statement",
1059
+ "external": true
1060
+ },
1061
+ {
1062
+ "path": "core-js/modules/web.dom-collections.iterator.js",
1063
+ "kind": "import-statement",
1064
+ "external": true
1065
+ },
1066
+ {
1067
+ "path": "core-js/modules/es.array.push.js",
1068
+ "kind": "import-statement",
1069
+ "external": true
1070
+ },
1051
1071
  {
1052
1072
  "path": "core-js/modules/es.typed-array.uint8-array.js",
1053
1073
  "kind": "import-statement",
@@ -1123,21 +1143,6 @@
1123
1143
  "kind": "import-statement",
1124
1144
  "external": true
1125
1145
  },
1126
- {
1127
- "path": "core-js/modules/es.array.push.js",
1128
- "kind": "import-statement",
1129
- "external": true
1130
- },
1131
- {
1132
- "path": "core-js/modules/web.dom-collections.iterator.js",
1133
- "kind": "import-statement",
1134
- "external": true
1135
- },
1136
- {
1137
- "path": "core-js/modules/es.regexp.exec.js",
1138
- "kind": "import-statement",
1139
- "external": true
1140
- },
1141
1146
  {
1142
1147
  "path": "core-js/modules/es.set.difference.v2.js",
1143
1148
  "kind": "import-statement",
@@ -1883,7 +1888,7 @@
1883
1888
  "format": "esm"
1884
1889
  },
1885
1890
  "../lib/src/layer/poi-layer2.js": {
1886
- "bytes": 3152,
1891
+ "bytes": 3157,
1887
1892
  "imports": [
1888
1893
  {
1889
1894
  "path": "core-js/modules/es.array.push.js",
@@ -2233,7 +2238,7 @@
2233
2238
  "format": "esm"
2234
2239
  },
2235
2240
  "../src/utils/string.ts": {
2236
- "bytes": 204,
2241
+ "bytes": 1051,
2237
2242
  "imports": [],
2238
2243
  "format": "esm"
2239
2244
  },
@@ -2574,7 +2579,7 @@
2574
2579
  "format": "esm"
2575
2580
  },
2576
2581
  "../src/utils/index-db.ts": {
2577
- "bytes": 4840,
2582
+ "bytes": 4842,
2578
2583
  "imports": [
2579
2584
  {
2580
2585
  "path": "<runtime>",
@@ -2585,7 +2590,7 @@
2585
2590
  "format": "esm"
2586
2591
  },
2587
2592
  "../src/factory/text-texture.ts": {
2588
- "bytes": 26323,
2593
+ "bytes": 25159,
2589
2594
  "imports": [
2590
2595
  {
2591
2596
  "path": "three",
@@ -2998,7 +3003,7 @@
2998
3003
  "format": "esm"
2999
3004
  },
3000
3005
  "../lib/src/elements/poi2.js": {
3001
- "bytes": 15638,
3006
+ "bytes": 16745,
3002
3007
  "imports": [
3003
3008
  {
3004
3009
  "path": "../../../node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_extends.js",
@@ -3716,7 +3721,7 @@
3716
3721
  "format": "esm"
3717
3722
  },
3718
3723
  "../lib/src/elements/instanced-parking-space.js": {
3719
- "bytes": 7131,
3724
+ "bytes": 7311,
3720
3725
  "imports": [
3721
3726
  {
3722
3727
  "path": "../../../node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_extends.js",
@@ -4724,7 +4729,7 @@
4724
4729
  "format": "esm"
4725
4730
  },
4726
4731
  "../lib/src/loader/AibeeLoader/index.js": {
4727
- "bytes": 17988,
4732
+ "bytes": 18045,
4728
4733
  "imports": [
4729
4734
  {
4730
4735
  "path": "../../../node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_extends.js",
@@ -6890,6 +6895,11 @@
6890
6895
  "kind": "import-statement",
6891
6896
  "external": true
6892
6897
  },
6898
+ {
6899
+ "path": "core-js/modules/es.array.push.js",
6900
+ "kind": "import-statement",
6901
+ "external": true
6902
+ },
6893
6903
  {
6894
6904
  "path": "three",
6895
6905
  "kind": "import-statement",
@@ -7185,6 +7195,21 @@
7185
7195
  "kind": "import-statement",
7186
7196
  "external": true
7187
7197
  },
7198
+ {
7199
+ "path": "core-js/modules/es.regexp.exec.js",
7200
+ "kind": "import-statement",
7201
+ "external": true
7202
+ },
7203
+ {
7204
+ "path": "core-js/modules/web.dom-collections.iterator.js",
7205
+ "kind": "import-statement",
7206
+ "external": true
7207
+ },
7208
+ {
7209
+ "path": "core-js/modules/es.array.push.js",
7210
+ "kind": "import-statement",
7211
+ "external": true
7212
+ },
7188
7213
  {
7189
7214
  "path": "core-js/modules/es.typed-array.uint8-array.js",
7190
7215
  "kind": "import-statement",
@@ -7260,21 +7285,6 @@
7260
7285
  "kind": "import-statement",
7261
7286
  "external": true
7262
7287
  },
7263
- {
7264
- "path": "core-js/modules/es.array.push.js",
7265
- "kind": "import-statement",
7266
- "external": true
7267
- },
7268
- {
7269
- "path": "core-js/modules/web.dom-collections.iterator.js",
7270
- "kind": "import-statement",
7271
- "external": true
7272
- },
7273
- {
7274
- "path": "core-js/modules/es.regexp.exec.js",
7275
- "kind": "import-statement",
7276
- "external": true
7277
- },
7278
7288
  {
7279
7289
  "path": "core-js/modules/es.set.difference.v2.js",
7280
7290
  "kind": "import-statement",
@@ -9201,6 +9211,7 @@
9201
9211
  "sleepOnePromise",
9202
9212
  "sleepOneRf",
9203
9213
  "smoothPath",
9214
+ "splitStrByBracket",
9204
9215
  "strToNumber",
9205
9216
  "timeoutPromise",
9206
9217
  "toWebWorker",
@@ -9238,10 +9249,10 @@
9238
9249
  "bytesInOutput": 208
9239
9250
  },
9240
9251
  "../lib/src/bmap.js": {
9241
- "bytesInOutput": 10978
9252
+ "bytesInOutput": 10976
9242
9253
  },
9243
9254
  "../lib/src/context/context.js": {
9244
- "bytesInOutput": 8697
9255
+ "bytesInOutput": 8715
9245
9256
  },
9246
9257
  "../lib/src/utils/timer.js": {
9247
9258
  "bytesInOutput": 1783
@@ -9304,7 +9315,7 @@
9304
9315
  "bytesInOutput": 733
9305
9316
  },
9306
9317
  "../lib/src/utils/string.js": {
9307
- "bytesInOutput": 169
9318
+ "bytesInOutput": 423
9308
9319
  },
9309
9320
  "../lib/src/utils/webworker.js": {
9310
9321
  "bytesInOutput": 928
@@ -9328,25 +9339,25 @@
9328
9339
  "bytesInOutput": 829
9329
9340
  },
9330
9341
  "../lib/src/utils/event-dispatcher.js": {
9331
- "bytesInOutput": 96
9342
+ "bytesInOutput": 95
9332
9343
  },
9333
9344
  "../lib/src/utils/kalman-filter.js": {
9334
9345
  "bytesInOutput": 405
9335
9346
  },
9336
9347
  "../lib/src/utils/geometry.js": {
9337
- "bytesInOutput": 3923
9348
+ "bytesInOutput": 3957
9338
9349
  },
9339
9350
  "../lib/src/operations/selection/selection.js": {
9340
9351
  "bytesInOutput": 3434
9341
9352
  },
9342
9353
  "../lib/src/elements/graphic.js": {
9343
- "bytesInOutput": 7607
9354
+ "bytesInOutput": 7605
9344
9355
  },
9345
9356
  "../lib/src/factory/material.js": {
9346
9357
  "bytesInOutput": 14209
9347
9358
  },
9348
9359
  "../lib/src/factory/text-texture.js": {
9349
- "bytesInOutput": 10493
9360
+ "bytesInOutput": 10700
9350
9361
  },
9351
9362
  "../lib/src/factory/worker/text-texture.worker.js": {
9352
9363
  "bytesInOutput": 101
@@ -9355,10 +9366,10 @@
9355
9366
  "bytesInOutput": 114
9356
9367
  },
9357
9368
  "../lib/src/utils/index-db.js": {
9358
- "bytesInOutput": 1613
9369
+ "bytesInOutput": 1617
9359
9370
  },
9360
9371
  "../lib/src/factory/img-texture.js": {
9361
- "bytesInOutput": 1581
9372
+ "bytesInOutput": 1574
9362
9373
  },
9363
9374
  "../lib/src/factory/model.js": {
9364
9375
  "bytesInOutput": 826
@@ -9409,10 +9420,10 @@
9409
9420
  "bytesInOutput": 5457
9410
9421
  },
9411
9422
  "../lib/src/elements/overlay.js": {
9412
- "bytesInOutput": 4422
9423
+ "bytesInOutput": 4399
9413
9424
  },
9414
9425
  "../lib/src/elements/floor.js": {
9415
- "bytesInOutput": 4867
9426
+ "bytesInOutput": 4865
9416
9427
  },
9417
9428
  "../lib/src/elements/heatmap.js": {
9418
9429
  "bytesInOutput": 2123
@@ -9421,7 +9432,7 @@
9421
9432
  "bytesInOutput": 410
9422
9433
  },
9423
9434
  "../lib/src/layer/graphic-layer.js": {
9424
- "bytesInOutput": 1281
9435
+ "bytesInOutput": 1279
9425
9436
  },
9426
9437
  "../lib/src/layer/layer.js": {
9427
9438
  "bytesInOutput": 424
@@ -9430,10 +9441,10 @@
9430
9441
  "bytesInOutput": 2240
9431
9442
  },
9432
9443
  "../lib/src/layer/poi-layer2.js": {
9433
- "bytesInOutput": 1749
9444
+ "bytesInOutput": 1754
9434
9445
  },
9435
9446
  "../lib/src/layer/parking-layer.js": {
9436
- "bytesInOutput": 3585
9447
+ "bytesInOutput": 3584
9437
9448
  },
9438
9449
  "../lib/src/layer/merged-model-layer.js": {
9439
9450
  "bytesInOutput": 252
@@ -9466,7 +9477,7 @@
9466
9477
  "bytesInOutput": 1595
9467
9478
  },
9468
9479
  "../lib/src/elements/poi2.js": {
9469
- "bytesInOutput": 8159
9480
+ "bytesInOutput": 8782
9470
9481
  },
9471
9482
  "../lib/src/elements/svg-line.js": {
9472
9483
  "bytesInOutput": 2240
@@ -9484,7 +9495,7 @@
9484
9495
  "bytesInOutput": 3779
9485
9496
  },
9486
9497
  "../lib/src/elements/ground-texture.js": {
9487
- "bytesInOutput": 1603
9498
+ "bytesInOutput": 1602
9488
9499
  },
9489
9500
  "../lib/src/elements/glb-model.js": {
9490
9501
  "bytesInOutput": 1176
@@ -9496,7 +9507,7 @@
9496
9507
  "bytesInOutput": 3905
9497
9508
  },
9498
9509
  "../lib/src/elements/text-texture.js": {
9499
- "bytesInOutput": 1702
9510
+ "bytesInOutput": 1701
9500
9511
  },
9501
9512
  "../lib/src/elements/line.js": {
9502
9513
  "bytesInOutput": 1125
@@ -9511,13 +9522,13 @@
9511
9522
  "bytesInOutput": 905
9512
9523
  },
9513
9524
  "../lib/src/elements/merge-attribute-ground-texture.js": {
9514
- "bytesInOutput": 1795
9525
+ "bytesInOutput": 1794
9515
9526
  },
9516
9527
  "../lib/src/elements/merge-attribute-lane.js": {
9517
9528
  "bytesInOutput": 2027
9518
9529
  },
9519
9530
  "../lib/src/elements/instanced-parking-space.js": {
9520
- "bytesInOutput": 3821
9531
+ "bytesInOutput": 3855
9521
9532
  },
9522
9533
  "../lib/src/elements/instanced-graphic.js": {
9523
9534
  "bytesInOutput": 3970
@@ -9529,7 +9540,7 @@
9529
9540
  "bytesInOutput": 806
9530
9541
  },
9531
9542
  "../lib/src/operations/selection/box-selection.js": {
9532
- "bytesInOutput": 2649
9543
+ "bytesInOutput": 2648
9533
9544
  },
9534
9545
  "../lib/src/operations/hover/hover-helper.js": {
9535
9546
  "bytesInOutput": 2929
@@ -9541,7 +9552,7 @@
9541
9552
  "bytesInOutput": 3684
9542
9553
  },
9543
9554
  "../lib/src/context/OrbitControls.js": {
9544
- "bytesInOutput": 13546
9555
+ "bytesInOutput": 13564
9545
9556
  },
9546
9557
  "../lib/src/context/renderer.js": {
9547
9558
  "bytesInOutput": 1126
@@ -9562,10 +9573,10 @@
9562
9573
  "bytesInOutput": 1220
9563
9574
  },
9564
9575
  "../lib/src/loader/AibeeLoader/index.js": {
9565
- "bytesInOutput": 8825
9576
+ "bytesInOutput": 8843
9566
9577
  },
9567
9578
  "../lib/src/loader/AibeeLoader/layer.js": {
9568
- "bytesInOutput": 4269
9579
+ "bytesInOutput": 4268
9569
9580
  },
9570
9581
  "../lib/src/loader/AibeeLoader/utils.js": {
9571
9582
  "bytesInOutput": 1143
@@ -9589,7 +9600,7 @@
9589
9600
  "bytesInOutput": 1524
9590
9601
  },
9591
9602
  "../lib/src/plugins/base.js": {
9592
- "bytesInOutput": 206
9603
+ "bytesInOutput": 205
9593
9604
  },
9594
9605
  "../lib/src/plugins/navigation/navigation.js": {
9595
9606
  "bytesInOutput": 15193
@@ -9601,7 +9612,7 @@
9601
9612
  "bytesInOutput": 13835
9602
9613
  },
9603
9614
  "../lib/src/plugins/navigation/position-navigation.js": {
9604
- "bytesInOutput": 6646
9615
+ "bytesInOutput": 6655
9605
9616
  },
9606
9617
  "../lib/src/plugins/navigation/start-rotate-helper-poi.js": {
9607
9618
  "bytesInOutput": 3438
@@ -9625,16 +9636,16 @@
9625
9636
  "bytesInOutput": 3905
9626
9637
  },
9627
9638
  "../lib/src/plugins/select/box-selection.js": {
9628
- "bytesInOutput": 2649
9639
+ "bytesInOutput": 2648
9629
9640
  },
9630
9641
  "../lib/src/plugins/pdr-position/sensor.js": {
9631
- "bytesInOutput": 2926
9642
+ "bytesInOutput": 2925
9632
9643
  },
9633
9644
  "../lib/src/plugins/pdr-position/enum.js": {
9634
9645
  "bytesInOutput": 125
9635
9646
  },
9636
9647
  "../lib/src/plugins/pdr-position/position.js": {
9637
- "bytesInOutput": 931
9648
+ "bytesInOutput": 930
9638
9649
  },
9639
9650
  "../lib/src/plugins/pdr-position/pdr.js": {
9640
9651
  "bytesInOutput": 3682
@@ -9664,7 +9675,7 @@
9664
9675
  "bytesInOutput": 1040
9665
9676
  },
9666
9677
  "../lib/src/plugins/car-inertial-position/car-inertial-position.js": {
9667
- "bytesInOutput": 5240
9678
+ "bytesInOutput": 5239
9668
9679
  },
9669
9680
  "../lib/src/plugins/car-inertial-position/utils.js": {
9670
9681
  "bytesInOutput": 1638
@@ -9676,10 +9687,10 @@
9676
9687
  "bytesInOutput": 98
9677
9688
  },
9678
9689
  "../lib/src/plugins/position/position.js": {
9679
- "bytesInOutput": 11346
9690
+ "bytesInOutput": 11360
9680
9691
  },
9681
9692
  "../lib/src/plugins/position/socket.js": {
9682
- "bytesInOutput": 2593
9693
+ "bytesInOutput": 2592
9683
9694
  },
9684
9695
  "../lib/src/plugins/position/utils.js": {
9685
9696
  "bytesInOutput": 140
@@ -9697,7 +9708,7 @@
9697
9708
  "bytesInOutput": 433
9698
9709
  }
9699
9710
  },
9700
- "bytes": 401996
9711
+ "bytes": 403205
9701
9712
  }
9702
9713
  }
9703
9714
  }
@@ -1,4 +1,4 @@
1
- import { HeatmapConfiguration } from '@mars3d/heatmap.js';
1
+ import { type HeatmapConfiguration } from '@mars3d/heatmap.js';
2
2
  export interface Config {
3
3
  placeId: string | number;
4
4
  fps: number;
@@ -36,6 +36,7 @@ type PoiEventMap2 = {
36
36
  value: PoiOptions2[K];
37
37
  };
38
38
  } & Object3DEventMap & {
39
+ 'text-texture-rect-inited': {};
39
40
  'text-texture-inited': {};
40
41
  };
41
42
  export type PoiOptionsParam2 = Partial<PoiOptions2>;
@@ -52,8 +53,19 @@ export declare class Poi2 extends Object3D<PoiEventMap2> {
52
53
  lines: number;
53
54
  textAspect: number;
54
55
  }>;
56
+ textTextureRectMap: Record<string, {
57
+ width: number;
58
+ height: number;
59
+ lines: number;
60
+ aspect: number;
61
+ }>;
55
62
  constructor(context: Context, options: PoiOptionsParam2);
56
63
  get textTexture(): DataTexture | null;
64
+ get textTextureRect(): {
65
+ width: number;
66
+ height: number;
67
+ lines: number;
68
+ } | null;
57
69
  get textureLines(): number;
58
70
  get textAspect(): number;
59
71
  get hasText(): string | false;
@@ -64,7 +76,11 @@ export declare class Poi2 extends Object3D<PoiEventMap2> {
64
76
  get textWidth(): number;
65
77
  get textHeight(): number;
66
78
  get hasOriginTexture(): boolean;
67
- get inited(): true | "" | DataTexture | null;
79
+ get initedTextRect(): true | "" | {
80
+ width: number;
81
+ height: number;
82
+ lines: number;
83
+ } | null;
68
84
  get deltaZ(): number;
69
85
  get canSelect(): boolean;
70
86
  show(): Promise<void>;
@@ -75,6 +91,8 @@ export declare class Poi2 extends Object3D<PoiEventMap2> {
75
91
  initIcon(): Promise<Sprite<Object3DEventMap> | undefined>;
76
92
  _initTextTexture: () => Promise<void>;
77
93
  initTextTexture: () => Promise<void>;
94
+ _initTextTextureRect: () => Promise<void>;
95
+ initTextTextureRect: () => Promise<void>;
78
96
  initText(): Promise<void>;
79
97
  initSize(): void;
80
98
  init(): Promise<void>;
@@ -10,6 +10,7 @@ export declare class TextTextureFactory {
10
10
  private static canvas;
11
11
  private static ctx;
12
12
  private static cacheMap;
13
+ private static rectCacheMap;
13
14
  private static lazyTextureCacheMap;
14
15
  private static lazyPoiMap;
15
16
  private static textTextureWorker;
@@ -34,6 +35,15 @@ export declare class TextTextureFactory {
34
35
  };
35
36
  static setCtxStyle(options: typeof this.options, canvas?: HTMLCanvasElement, ctx?: CanvasRenderingContext2D): void;
36
37
  static getLazyIndexDbTextTextureWorker(): any;
38
+ static getTextureRectByTexts(text: string, options?: Partial<typeof this.options> & {
39
+ maxWidth?: number;
40
+ }): Promise<{
41
+ width: number;
42
+ height: number;
43
+ lines: number;
44
+ lineString: string[];
45
+ }>;
46
+ static splitText(text: string, ctx: CanvasRenderingContext2D, maxWidth: number): string[];
37
47
  static getTextureByText(text: string, options?: Partial<typeof this.options> & {
38
48
  maxWidth?: number;
39
49
  }): Promise<{
@@ -5,7 +5,7 @@ export declare enum MAP_DB_TABLES {
5
5
  MAP_DATA = "map_data",// 地图数据
6
6
  ROAD_NETWORK_DATA = "road_network_data",// 路网
7
7
  FACILITY_DATA = "facility_data",// 设施
8
- POI_TEXT = "poi_text",// poi文本
8
+ POI_TEXT = "poi_text_1",// poi文本
9
9
  LAZY_TEXTURE = "lazy_texture",// poi纹理
10
10
  LAZY_POI = "lazy_poi"
11
11
  }
@@ -4,3 +4,9 @@
4
4
  * @returns
5
5
  */
6
6
  export declare function convertToSnakeCase(str: string): string;
7
+ /**
8
+ * 根据括号切割字符串
9
+ * @param text
10
+ * @returns
11
+ */
12
+ export declare function splitStrByBracket(text: string): string[];