@aibee/crc-bmap 0.8.4 → 0.8.6

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.
@@ -20,8 +20,5 @@ export declare const basicOptions: {
20
20
  })[];
21
21
  target: string;
22
22
  external: string[];
23
- alias: {
24
- 'three/examples/jsm/controls/MapControls.js': string;
25
- };
26
23
  };
27
24
  export declare function execTsc(): Promise<unknown>;
@@ -20,8 +20,5 @@ export declare const basicOptions: {
20
20
  })[];
21
21
  target: string;
22
22
  external: string[];
23
- alias: {
24
- 'three/examples/jsm/controls/MapControls.js': string;
25
- };
26
23
  };
27
24
  export declare function execTsc(): Promise<unknown>;
@@ -17,9 +17,6 @@ export declare const basicOptions: {
17
17
  }[];
18
18
  target: string;
19
19
  external: string[];
20
- alias: {
21
- 'three/examples/jsm/controls/MapControls.js': string;
22
- };
23
20
  };
24
21
  export declare function execTsc(): Promise<unknown>;
25
22
  declare const _default: {};
@@ -1,4 +1,4 @@
1
- import { EventDispatcher, MOUSE, Spherical, TOUCH, Vector2, Vector3, OrthographicCamera, PerspectiveCamera } from 'three';
1
+ import { EventDispatcher, MOUSE, Spherical, TOUCH, Vector2, Vector3, type OrthographicCamera, type PerspectiveCamera } from 'three';
2
2
  interface ControlMapEvent {
3
3
  change: {};
4
4
  start: {};
@@ -1,6 +1,27 @@
1
1
  import { BMap } from "../../bmap";
2
- import { Floor } from "../../elements";
2
+ import { Floor, Graphic } from "../../elements";
3
3
  import { AibeeFloorData } from "./type";
4
+ import { EventDispatcher } from "three";
5
+ interface AibeeLoaderEventMap {
6
+ 'switch-floor-before': {
7
+ data: {
8
+ curFloor: Floor;
9
+ graphics: Graphic[];
10
+ };
11
+ };
12
+ 'switch-floor-after': {
13
+ data: {
14
+ curFloor: Floor;
15
+ graphics: Graphic[];
16
+ };
17
+ };
18
+ 'switch-floor-ground': {
19
+ data: {
20
+ curFloor: Floor;
21
+ graphics: Graphic[];
22
+ };
23
+ };
24
+ }
4
25
  export interface AibeeLoaderOption {
5
26
  loadRoadNetwork: boolean;
6
27
  }
@@ -17,8 +38,9 @@ export interface AibeeFloorInfo {
17
38
  floor: string;
18
39
  floor_name: string;
19
40
  entry_infra_url: string;
41
+ map_angle: number;
20
42
  }
21
- export declare class AibeeLoader {
43
+ export declare class AibeeLoader extends EventDispatcher<AibeeLoaderEventMap> {
22
44
  bmap: BMap;
23
45
  floors: AibeeFloorInfo[];
24
46
  initDbPromise: Promise<void>;
@@ -31,12 +53,19 @@ export declare class AibeeLoader {
31
53
  getFloorCacheKey(floorInfo: AibeeFloorInfo): string;
32
54
  getFloorData(floor: string): Promise<Floor | null>;
33
55
  getFloorDataByFloorInfo(floorInfo: AibeeFloorInfo): Promise<Floor>;
56
+ getFloorJsonDataByFloorInfo(floorInfo: AibeeFloorInfo): Promise<AibeeFloorData>;
57
+ getFloorJsonData(floor: string): Promise<AibeeFloorData | null>;
34
58
  getRoadNetworkData(): Promise<any[]>;
35
59
  getFacilitiesData(): Promise<any>;
36
60
  getOtherDataByFreeTime(): Promise<void>;
37
61
  getMulFloorsData(floors: string[]): Promise<Floor[]>;
38
62
  getDataByUrl(url: string): Promise<Floor>;
39
- getDataByJson(data: AibeeFloorData): Floor;
63
+ getDataByJson(data: AibeeFloorData, floor?: Floor): Floor;
64
+ changeFloorBox(data: AibeeFloorData, floor: Floor): void;
65
+ switchFloor(data: string | AibeeFloorData): Promise<Floor | null>;
66
+ getFloorBaseLayer(data: AibeeFloorData, floor?: Floor): Floor;
67
+ getFloorContentLayer(data: AibeeFloorData, floor?: Floor): Promise<Floor>;
40
68
  clear(): Promise<void>;
41
69
  dispose(): void;
42
70
  }
71
+ export {};
@@ -0,0 +1,47 @@
1
+ import { Floor } from "../../elements";
2
+ import { AibeeFacilityLayer, AibeeFloorData, AibeeGlbLayer, AibeeGraphicLayer, AibeeLaneLayer, AibeeParkingSpaceLayer, AibeeStoreLayer, AibeeTextLayer, AibeeTexture2dLayer, AibeeTexture3dLayer, AibeeWallLayer } from "./type";
3
+ export declare function transformLayers(layer: AibeeFloorData["layers"][0], floor: Floor): void;
4
+ /**
5
+ * 转换图元
6
+ */
7
+ export declare function graphLayer(layer: AibeeGraphicLayer, floor: Floor): void;
8
+ /**
9
+ * 转换墙
10
+ * @param layer
11
+ * @param floor
12
+ */
13
+ export declare function wallLayer(layer: AibeeWallLayer, floor: Floor): void;
14
+ /**
15
+ * 车道
16
+ */
17
+ export declare function laneLayer(layer: AibeeLaneLayer, floor: Floor): void;
18
+ /**
19
+ * 贴图
20
+ * @param layer
21
+ * @param floor
22
+ */
23
+ export declare function textureLayer(layer: AibeeTexture2dLayer | AibeeTexture3dLayer, floor: Floor): void;
24
+ /**
25
+ * 模型
26
+ * @param layer
27
+ * @param floor
28
+ */
29
+ export declare function glbLayer(layer: AibeeGlbLayer, floor: Floor): void;
30
+ /**
31
+ * 店铺
32
+ * @param layer
33
+ * @param floor
34
+ */
35
+ export declare function storeLayer(layer: AibeeStoreLayer, floor: Floor): void;
36
+ /**
37
+ * 设施
38
+ */
39
+ export declare function facilityLayer(layer: AibeeFacilityLayer, floor: Floor): void;
40
+ /**
41
+ * 车位
42
+ */
43
+ export declare function parkingSpaceLayer(layer: AibeeParkingSpaceLayer, floor: Floor): void;
44
+ /**
45
+ * 文字
46
+ */
47
+ export declare function textLayer(layer: AibeeTextLayer, floor: Floor): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibee/crc-bmap",
3
- "version": "0.8.4",
3
+ "version": "0.8.6",
4
4
  "description": "",
5
5
  "main": "lib/bmap.min.js",
6
6
  "module": "lib/bmap.esm.js",
@@ -53,7 +53,6 @@
53
53
  "mathjs": "^13.1.1",
54
54
  "meshline": "^3.3.0",
55
55
  "node-dijkstra": "^2.5.0",
56
- "three": "^0.169.0",
57
- "three157": "npm:three@0.157.0"
56
+ "three": "^0.169.0"
58
57
  }
59
58
  }