@aibee/crc-bmap 0.0.143 → 0.1.1
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 +3924 -180
- package/lib/bmap.cjs.min.js.map +4 -4
- package/lib/bmap.esm.js +302 -72
- package/lib/bmap.esm.js.map +4 -4
- package/lib/bmap.esm.min.js +3924 -180
- package/lib/bmap.esm.min.js.map +4 -4
- package/lib/bmap.min.js +3924 -180
- package/lib/bmap.min.js.map +4 -4
- package/lib/src/context/control.d.ts +3 -3
- package/lib/src/factory/text-texture.d.ts +1 -0
- package/lib/src/loader/AibeeLoader/index.d.ts +2 -0
- package/lib/src/plugins/index.d.ts +1 -0
- package/lib/src/plugins/nav-path/index.d.ts +1 -0
- package/lib/src/plugins/nav-path/nav-path.d.ts +23 -0
- package/lib/src/plugins/nav-path/path.worker.d.ts +1 -0
- package/lib/src/plugins/navigation/navigation.d.ts +2 -2
- package/lib/src/utils/road2.d.ts +90 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OrthographicCamera, Vector3 } from "three";
|
|
2
2
|
import { MapControls } from "three/examples/jsm/controls/MapControls";
|
|
3
3
|
import { Group as TweenGroup } from '@tweenjs/tween.js';
|
|
4
|
-
import {
|
|
4
|
+
import { Context } from "./context";
|
|
5
5
|
declare module 'three/examples/jsm/controls/OrbitControls' {
|
|
6
6
|
interface OrbitControlsEventMap {
|
|
7
7
|
"change-zoom": {
|
|
@@ -10,13 +10,13 @@ declare module 'three/examples/jsm/controls/OrbitControls' {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
export declare class Control extends MapControls {
|
|
13
|
+
context: Context;
|
|
13
14
|
camera: OrthographicCamera;
|
|
14
15
|
domElement: HTMLElement;
|
|
15
16
|
prevCameraZoom: number;
|
|
16
17
|
tweenGroup: TweenGroup;
|
|
17
|
-
timer: Timer;
|
|
18
18
|
offsetY: number;
|
|
19
|
-
constructor(camera: OrthographicCamera, domElement: HTMLElement);
|
|
19
|
+
constructor(context: Context, camera: OrthographicCamera, domElement: HTMLElement);
|
|
20
20
|
registryEvent(): void;
|
|
21
21
|
tweenUpdate: () => void;
|
|
22
22
|
/**
|
|
@@ -16,6 +16,7 @@ export interface AibeeFloorInfo {
|
|
|
16
16
|
version_id: string;
|
|
17
17
|
floor: string;
|
|
18
18
|
floor_name: string;
|
|
19
|
+
entry_infra_url: string;
|
|
19
20
|
}
|
|
20
21
|
export declare class AibeeLoader {
|
|
21
22
|
bmap: BMap;
|
|
@@ -29,6 +30,7 @@ export declare class AibeeLoader {
|
|
|
29
30
|
getFloorData(floor: string): Promise<Floor | null>;
|
|
30
31
|
getFloorDataByFloorInfo(floorInfo: AibeeFloorInfo): Promise<Floor>;
|
|
31
32
|
getRoadNetworkData(): Promise<any[]>;
|
|
33
|
+
getFacilitiesData(): Promise<any>;
|
|
32
34
|
getOtherDataByFreeTime(): Promise<void>;
|
|
33
35
|
getMulFloorsData(floors: string[]): Promise<Floor[]>;
|
|
34
36
|
getDataByUrl(url: string): Promise<Floor>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './nav-path';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EventDispatcher } from "three";
|
|
2
|
+
import { End, PathData, PathDirection, RouteType, Start } from "../../utils";
|
|
3
|
+
import { Facility, RoadData2 } from "../../utils/road2";
|
|
4
|
+
interface EventMap {
|
|
5
|
+
"init-road-status": {
|
|
6
|
+
status: boolean;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export interface DirectionPathData {
|
|
10
|
+
direction: PathDirection;
|
|
11
|
+
distance: number;
|
|
12
|
+
points: [number, number][];
|
|
13
|
+
}
|
|
14
|
+
export declare class NavPath extends EventDispatcher<EventMap> {
|
|
15
|
+
worker: any;
|
|
16
|
+
initRoadStatus: boolean;
|
|
17
|
+
constructor();
|
|
18
|
+
setRoadData(roadData: RoadData2[], facilities: Facility[]): Promise<void>;
|
|
19
|
+
getPath(start: Start, end: End, type?: RouteType): Promise<PathData>;
|
|
20
|
+
getDirectionPath(points: [number, number][]): Promise<DirectionPathData[]>;
|
|
21
|
+
dispose(): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BMap } from "../../bmap";
|
|
2
2
|
import { Plugin } from "../base";
|
|
3
3
|
import { Path, PathConfig } from "./path";
|
|
4
|
-
import { End, PathData, RoadData, RouteType, Start } from "../../utils";
|
|
4
|
+
import { End, Facility, PathData, RoadData, RouteType, Start } from "../../utils";
|
|
5
5
|
import { Floor, Poi2, PoiOptions2 } from "../../elements";
|
|
6
6
|
import { Group as TweenGroup } from "@tweenjs/tween.js";
|
|
7
7
|
export type Point = [number, number];
|
|
@@ -45,7 +45,7 @@ export declare class Navigation extends Plugin<EventMap> {
|
|
|
45
45
|
registryEvent(): void;
|
|
46
46
|
unRegistryEvent(): void;
|
|
47
47
|
onUpdate: () => void;
|
|
48
|
-
setRoadData(roadData: RoadData[]): Promise<void>;
|
|
48
|
+
setRoadData(roadData: RoadData[], facilities: Facility[]): Promise<void>;
|
|
49
49
|
clearPath(): void;
|
|
50
50
|
onSwitchFloor: ({ data: { curFloor } }: {
|
|
51
51
|
data: {
|
package/lib/src/utils/road2.d.ts
CHANGED
|
@@ -27,6 +27,33 @@ export interface RoadData2 {
|
|
|
27
27
|
escalatorDirection: "" | "up" | "down" | "exit";
|
|
28
28
|
}>;
|
|
29
29
|
}
|
|
30
|
+
export interface Facility {
|
|
31
|
+
id: number;
|
|
32
|
+
infrastructure_name: string;
|
|
33
|
+
type_id: number;
|
|
34
|
+
status: number;
|
|
35
|
+
floors: number[];
|
|
36
|
+
floor_names: string[];
|
|
37
|
+
type_name: string;
|
|
38
|
+
infra_type_icon: string;
|
|
39
|
+
entry_infra_type: "facility" | "escalator" | "straightLadder" | "staircase" | "ramp";
|
|
40
|
+
entry_start_floor: string;
|
|
41
|
+
entry_end_floor: string;
|
|
42
|
+
type_alias_name: string;
|
|
43
|
+
count: number;
|
|
44
|
+
}
|
|
45
|
+
export type TransformFacility = Facility & {
|
|
46
|
+
entry_start_floor: {
|
|
47
|
+
floorId: number;
|
|
48
|
+
floor: string;
|
|
49
|
+
name: string;
|
|
50
|
+
}[];
|
|
51
|
+
entry_end_floor: {
|
|
52
|
+
floorId: number;
|
|
53
|
+
floor: string;
|
|
54
|
+
name: string;
|
|
55
|
+
}[];
|
|
56
|
+
};
|
|
30
57
|
export interface Start2 {
|
|
31
58
|
floor: string;
|
|
32
59
|
nodeId?: string;
|
|
@@ -49,6 +76,7 @@ export type PathData2 = {
|
|
|
49
76
|
export declare class RoadNetwork2 {
|
|
50
77
|
private lift_priority;
|
|
51
78
|
roadInfo: RoadData2[];
|
|
79
|
+
facilities: TransformFacility[];
|
|
52
80
|
pointMap: Map<string, {
|
|
53
81
|
id: string;
|
|
54
82
|
cds: [number, number];
|
|
@@ -93,9 +121,65 @@ export declare class RoadNetwork2 {
|
|
|
93
121
|
escalatorDirection: "" | "up" | "down" | "exit";
|
|
94
122
|
}[]>;
|
|
95
123
|
escalatorMap: Map<string, {
|
|
96
|
-
start
|
|
97
|
-
|
|
98
|
-
|
|
124
|
+
start?: {
|
|
125
|
+
id: string;
|
|
126
|
+
cds: [number, number];
|
|
127
|
+
name: string;
|
|
128
|
+
type: "normal" | "graph" | "straightLadder" | "staircase" | "escalator" | "facility" | "wall" | "lane" | "parkingSpace" | "texture2d" | "glb" | "store";
|
|
129
|
+
floor: string;
|
|
130
|
+
locked: boolean;
|
|
131
|
+
nodeId: string;
|
|
132
|
+
visible: boolean;
|
|
133
|
+
targetId: string;
|
|
134
|
+
userData: Record<string, string>;
|
|
135
|
+
escalatorType: "" | "single" | "double" | "jd";
|
|
136
|
+
escalatorDirection: "" | "up" | "down" | "exit";
|
|
137
|
+
} | undefined;
|
|
138
|
+
end?: {
|
|
139
|
+
id: string;
|
|
140
|
+
cds: [number, number];
|
|
141
|
+
name: string;
|
|
142
|
+
type: "normal" | "graph" | "straightLadder" | "staircase" | "escalator" | "facility" | "wall" | "lane" | "parkingSpace" | "texture2d" | "glb" | "store";
|
|
143
|
+
floor: string;
|
|
144
|
+
locked: boolean;
|
|
145
|
+
nodeId: string;
|
|
146
|
+
visible: boolean;
|
|
147
|
+
targetId: string;
|
|
148
|
+
userData: Record<string, string>;
|
|
149
|
+
escalatorType: "" | "single" | "double" | "jd";
|
|
150
|
+
escalatorDirection: "" | "up" | "down" | "exit";
|
|
151
|
+
} | undefined;
|
|
152
|
+
}[]>;
|
|
153
|
+
rampMap: Map<string, {
|
|
154
|
+
start?: {
|
|
155
|
+
id: string;
|
|
156
|
+
cds: [number, number];
|
|
157
|
+
name: string;
|
|
158
|
+
type: "normal" | "graph" | "straightLadder" | "staircase" | "escalator" | "facility" | "wall" | "lane" | "parkingSpace" | "texture2d" | "glb" | "store";
|
|
159
|
+
floor: string;
|
|
160
|
+
locked: boolean;
|
|
161
|
+
nodeId: string;
|
|
162
|
+
visible: boolean;
|
|
163
|
+
targetId: string;
|
|
164
|
+
userData: Record<string, string>;
|
|
165
|
+
escalatorType: "" | "single" | "double" | "jd";
|
|
166
|
+
escalatorDirection: "" | "up" | "down" | "exit";
|
|
167
|
+
} | undefined;
|
|
168
|
+
end?: {
|
|
169
|
+
id: string;
|
|
170
|
+
cds: [number, number];
|
|
171
|
+
name: string;
|
|
172
|
+
type: "normal" | "graph" | "straightLadder" | "staircase" | "escalator" | "facility" | "wall" | "lane" | "parkingSpace" | "texture2d" | "glb" | "store";
|
|
173
|
+
floor: string;
|
|
174
|
+
locked: boolean;
|
|
175
|
+
nodeId: string;
|
|
176
|
+
visible: boolean;
|
|
177
|
+
targetId: string;
|
|
178
|
+
userData: Record<string, string>;
|
|
179
|
+
escalatorType: "" | "single" | "double" | "jd";
|
|
180
|
+
escalatorDirection: "" | "up" | "down" | "exit";
|
|
181
|
+
} | undefined;
|
|
182
|
+
}[]>;
|
|
99
183
|
staircaseMap: Map<string, {
|
|
100
184
|
id: string;
|
|
101
185
|
cds: [number, number];
|
|
@@ -131,7 +215,9 @@ export declare class RoadNetwork2 {
|
|
|
131
215
|
forwardLineMap: Map<string, Map<string, number>>;
|
|
132
216
|
forwardRoute: Graph;
|
|
133
217
|
constructor(lift_priority?: number);
|
|
134
|
-
|
|
218
|
+
isFacilityByType(type: string): boolean;
|
|
219
|
+
private initFacilities;
|
|
220
|
+
initRoute(roadInfo: RoadData2[], facilities: Facility[]): void;
|
|
135
221
|
addLineItem(start: string, end: string, distance: number, lineMap?: Map<string, Map<string, number>>): void;
|
|
136
222
|
/**
|
|
137
223
|
* 把设施添加的路网图中
|