@aibee/crc-bmap 0.14.7 → 0.14.9

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
@@ -386,7 +386,7 @@
386
386
  "format": "esm"
387
387
  },
388
388
  "../lib/src/utils/road2.js": {
389
- "bytes": 53843,
389
+ "bytes": 55224,
390
390
  "imports": [
391
391
  {
392
392
  "path": "../../../node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_extends.js",
@@ -2160,7 +2160,7 @@
2160
2160
  "format": "esm"
2161
2161
  },
2162
2162
  "../src/utils/road2.ts": {
2163
- "bytes": 52389,
2163
+ "bytes": 53504,
2164
2164
  "imports": [
2165
2165
  {
2166
2166
  "path": "../../../node_modules/.pnpm/node-dijkstra@2.5.0/node_modules/node-dijkstra/libs/Graph.js",
@@ -5452,7 +5452,7 @@
5452
5452
  "format": "esm"
5453
5453
  },
5454
5454
  "../lib/src/plugins/nav-path/nav-path.js": {
5455
- "bytes": 2877,
5455
+ "bytes": 3784,
5456
5456
  "imports": [
5457
5457
  {
5458
5458
  "path": "three",
@@ -5464,6 +5464,16 @@
5464
5464
  "kind": "import-statement",
5465
5465
  "original": "../../utils"
5466
5466
  },
5467
+ {
5468
+ "path": "../lib/src/utils/road2.js",
5469
+ "kind": "import-statement",
5470
+ "original": "../../utils/road2"
5471
+ },
5472
+ {
5473
+ "path": "lodash",
5474
+ "kind": "import-statement",
5475
+ "external": true
5476
+ },
5467
5477
  {
5468
5478
  "path": "../lib/src/plugins/nav-path/path.worker.js",
5469
5479
  "kind": "import-statement",
@@ -8797,6 +8807,11 @@
8797
8807
  "kind": "import-statement",
8798
8808
  "external": true
8799
8809
  },
8810
+ {
8811
+ "path": "lodash",
8812
+ "kind": "import-statement",
8813
+ "external": true
8814
+ },
8800
8815
  {
8801
8816
  "path": "three",
8802
8817
  "kind": "import-statement",
@@ -9347,7 +9362,7 @@
9347
9362
  "bytesInOutput": 5426
9348
9363
  },
9349
9364
  "../lib/src/utils/road2.js": {
9350
- "bytesInOutput": 16550
9365
+ "bytesInOutput": 17042
9351
9366
  },
9352
9367
  "../lib/src/factory/unique-key.js": {
9353
9368
  "bytesInOutput": 733
@@ -9659,7 +9674,7 @@
9659
9674
  "bytesInOutput": 2251
9660
9675
  },
9661
9676
  "../lib/src/plugins/nav-path/nav-path.js": {
9662
- "bytesInOutput": 1238
9677
+ "bytesInOutput": 1752
9663
9678
  },
9664
9679
  "../lib/src/plugins/nav-path/path.worker.js": {
9665
9680
  "bytesInOutput": 93
@@ -9749,7 +9764,7 @@
9749
9764
  "bytesInOutput": 575
9750
9765
  }
9751
9766
  },
9752
- "bytes": 404070
9767
+ "bytes": 405076
9753
9768
  }
9754
9769
  }
9755
9770
  }
@@ -49,7 +49,7 @@ export interface AibeeLoaderOptions {
49
49
  mergeGraphic: boolean;
50
50
  renderVersion: RENDER_VERSION;
51
51
  layers: Exclude<AibeeLayerData["l_type"], "range" | "ground">[];
52
- filterPoi: (layer: AibeeLayerData['elements'][0]) => boolean;
52
+ filterPoi: (element: AibeeLayerData['elements'][0]) => boolean;
53
53
  }
54
54
  export type Locale = "zh-cn" | "en" | "zh-hk";
55
55
  export interface PlaceConfig {
@@ -1,6 +1,6 @@
1
1
  import { EventDispatcher } from "three";
2
2
  import { End2, PathDirection, RouteType2, Start2 } from "../../utils";
3
- import { Facility, GetPathOtherParams, PathData2, RoadData2 } from "../../utils/road2";
3
+ import { Facility, GetPathOtherParams, PathData2, RoadData2, RoadNetwork2 } from "../../utils/road2";
4
4
  interface EventMap {
5
5
  "init-road-status": {
6
6
  status: boolean;
@@ -11,11 +11,16 @@ export interface DirectionPathData {
11
11
  distance: number;
12
12
  points: [number, number][];
13
13
  }
14
+ export interface NavPathOptions {
15
+ useWorker: boolean;
16
+ }
14
17
  export declare class NavPath extends EventDispatcher<EventMap> {
15
- worker: any;
18
+ options: NavPathOptions;
19
+ worker: Worker | null;
16
20
  initRoadStatus: boolean;
17
- constructor();
18
- setLiftPriority(lift_priority: number): Promise<any>;
21
+ roadNetwork: RoadNetwork2 | null;
22
+ constructor(options?: Partial<NavPathOptions>);
23
+ setLiftPriority(lift_priority: number): Promise<void>;
19
24
  loaded(): Promise<unknown>;
20
25
  setRoadData(roadData: RoadData2[], facilities: Facility[]): Promise<void>;
21
26
  getPath(start: Start2, end: End2, type?: RouteType2, permission?: number, travelDirection?: number, options?: GetPathOtherParams): Promise<PathData2>;
@@ -10,7 +10,7 @@ export interface RoadData2 {
10
10
  opacity: number;
11
11
  visible: boolean;
12
12
  userData: Record<string, string>;
13
- direction: "double" | "single" | "noDir" | "back";
13
+ direction: "double" | "single" | "noDir" | "back" | "single-people" | "back-people";
14
14
  }>;
15
15
  points: Array<{
16
16
  id: string;
@@ -257,8 +257,9 @@ export declare class RoadNetwork2 {
257
257
  toKey: string;
258
258
  distance: number;
259
259
  type: Exclude<Facility["entry_infra_type"], "facility"> | "";
260
+ direction?: RoadData2['lines'][0]['direction'];
260
261
  }>;
261
- setPermissionLine(fromKey: string, toKey: string, permission: number, distance: number, type: Exclude<Facility["entry_infra_type"], "facility"> | ""): void;
262
+ setPermissionLine(fromKey: string, toKey: string, permission: number, distance: number, type: Exclude<Facility["entry_infra_type"], "facility"> | "", direction?: RoadData2['lines'][0]['direction']): void;
262
263
  addPermissionFacility(): void;
263
264
  addPermissionLineToMap(permission: number, types: (Exclude<Facility["entry_infra_type"], "facility"> | "")[], lineMap: Map<string, Map<string, number>>, weightMap: Map<(typeof types)[0], number>): void;
264
265
  addLineItem(start: string, end: string, distance: number, lineMap?: Map<string, Map<string, number>>): void;