@aibee/crc-bmap 0.0.142 → 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 +3959 -215
- package/lib/bmap.cjs.min.js.map +4 -4
- package/lib/bmap.esm.js +2349 -2302
- package/lib/bmap.esm.js.map +4 -4
- package/lib/bmap.esm.min.js +3959 -215
- package/lib/bmap.esm.min.js.map +4 -4
- package/lib/bmap.min.js +3959 -215
- package/lib/bmap.min.js.map +4 -4
- package/lib/src/bmap.d.ts +5 -18
- package/lib/src/context/camera.d.ts +4 -0
- package/lib/src/{context.d.ts → context/context.d.ts} +18 -25
- package/lib/src/context/control.d.ts +47 -0
- package/lib/src/context/index.d.ts +5 -0
- package/lib/src/context/renderer.d.ts +23 -0
- package/lib/src/context/scene.d.ts +4 -0
- package/lib/src/elements/base-svg.d.ts +1 -1
- package/lib/src/elements/floor.d.ts +1 -1
- package/lib/src/elements/glb-model.d.ts +2 -2
- package/lib/src/elements/graphic.d.ts +1 -1
- package/lib/src/elements/ground-texture.d.ts +1 -1
- package/lib/src/elements/heatmap.d.ts +1 -1
- package/lib/src/elements/lane.d.ts +1 -1
- package/lib/src/elements/merge-graphic.d.ts +1 -1
- package/lib/src/elements/model.d.ts +1 -1
- package/lib/src/elements/overlay.d.ts +1 -1
- package/lib/src/elements/poi.d.ts +1 -1
- package/lib/src/elements/poi2.d.ts +2 -2
- package/lib/src/elements/select-box.d.ts +1 -1
- package/lib/src/elements/svg-line.d.ts +1 -1
- package/lib/src/elements/svg-polygon.d.ts +1 -1
- package/lib/src/elements/text-texture.d.ts +3 -1
- package/lib/src/elements/wall.d.ts +1 -1
- package/lib/src/factory/img-texture.d.ts +7 -0
- package/lib/src/factory/index.d.ts +3 -0
- package/lib/src/factory/material.d.ts +14 -22
- package/lib/src/factory/model.d.ts +7 -0
- package/lib/src/factory/text-texture.d.ts +1 -0
- package/lib/src/factory/unique-key.d.ts +7 -0
- package/lib/src/index.d.ts +2 -2
- package/lib/src/layer/graphic-layer.d.ts +1 -1
- package/lib/src/layer/layer.d.ts +1 -1
- package/lib/src/layer/poi-layer.d.ts +1 -1
- package/lib/src/layer/poi-layer2.d.ts +1 -1
- package/lib/src/loader/AibeeLoader/index.d.ts +2 -0
- package/lib/src/loader/AibeeLoader/type.d.ts +3 -0
- package/lib/src/{api → loader/CrLoader/api}/floor.d.ts +2 -2
- package/lib/src/loader/CrLoader/index.d.ts +21 -0
- package/lib/src/loader/index.d.ts +1 -0
- package/lib/src/operations/hover/hover-helper.d.ts +1 -1
- package/lib/src/operations/selection/box-selection.d.ts +1 -1
- package/lib/src/operations/selection/selection.d.ts +1 -1
- package/lib/src/plugins/index.d.ts +1 -1
- 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 +3 -3
- package/lib/src/utils/camera-bound.d.ts +1 -1
- package/lib/src/utils/index.d.ts +1 -3
- package/lib/src/utils/init-helper.d.ts +2 -7
- package/lib/src/utils/road2.d.ts +90 -4
- package/lib/src/{loader/AibeeLoader/utils.d.ts → utils/translate.d.ts} +1 -1
- package/package.json +1 -1
- package/lib/src/factory/texture.d.ts +0 -10
- package/lib/src/plugins/split-load/index.d.ts +0 -1
- package/lib/src/plugins/split-load/split-load.d.ts +0 -16
- package/lib/src/utils/model.d.ts +0 -8
- package/lib/src/utils/texture.d.ts +0 -10
- package/lib/src/utils/unique-key.d.ts +0 -7
- /package/lib/src/{api → loader/CrLoader/api}/index.d.ts +0 -0
|
@@ -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
|
|
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];
|
|
@@ -25,12 +25,12 @@ export interface NavigationConfig {
|
|
|
25
25
|
needStartPoi: boolean;
|
|
26
26
|
loadRoad: boolean;
|
|
27
27
|
roadNetwork: "RoadNetwork" | "RoadNetwork2";
|
|
28
|
+
offsetY: number;
|
|
28
29
|
}
|
|
29
30
|
export declare class Navigation extends Plugin<EventMap> {
|
|
30
31
|
path: Path | null;
|
|
31
32
|
worker: any;
|
|
32
33
|
fetchRoadStatus: boolean;
|
|
33
|
-
uniqueKey: UniqueKey;
|
|
34
34
|
paths: PathData;
|
|
35
35
|
options: NavigationConfig;
|
|
36
36
|
pathTween: TweenGroup;
|
|
@@ -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/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from './timer';
|
|
2
2
|
export * from './init-helper';
|
|
3
3
|
export * from './dispose';
|
|
4
|
-
export * from './texture';
|
|
5
4
|
export * from './rules';
|
|
6
5
|
export * from './coordinate';
|
|
7
6
|
export * from './proxy';
|
|
@@ -9,17 +8,16 @@ export * from './promise';
|
|
|
9
8
|
export * from './svg';
|
|
10
9
|
export * from './sleep';
|
|
11
10
|
export * from './color';
|
|
12
|
-
export * from './model';
|
|
13
11
|
export * from './keyboard';
|
|
14
12
|
export * from './os';
|
|
15
13
|
export * from './events';
|
|
16
14
|
export * from './event-name';
|
|
17
15
|
export * from './obj-utils';
|
|
18
16
|
export * from './ajax';
|
|
19
|
-
export * from './unique-key';
|
|
20
17
|
export * from './path';
|
|
21
18
|
export * from './road';
|
|
22
19
|
export * from './road2';
|
|
23
20
|
export * from './webworker';
|
|
24
21
|
export * from './string';
|
|
25
22
|
export * from './create';
|
|
23
|
+
export * from './translate';
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { Coordinate } from
|
|
2
|
-
import {
|
|
3
|
-
import { MapControls } from 'three/examples/jsm/controls/MapControls';
|
|
4
|
-
export declare function initScene(): Scene;
|
|
5
|
-
export declare function initRenderer(): WebGLRenderer;
|
|
6
|
-
export declare function initCamera(width: number, height: number): OrthographicCamera;
|
|
1
|
+
import { Coordinate } from "src/types";
|
|
2
|
+
import { Shape, Group, DirectionalLight } from "three";
|
|
7
3
|
export declare function initLight(): Group<import("three").Object3DEventMap>;
|
|
8
|
-
export declare function initControl(camera: OrthographicCamera, domElement: HTMLCanvasElement): MapControls;
|
|
9
4
|
export declare function initShape(path: Coordinate[], holePath?: Coordinate[][]): Shape;
|
|
10
5
|
export declare function initDirectionalLight(color?: number, intensity?: number): DirectionalLight;
|
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
|
* 把设施添加的路网图中
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Texture, TextureLoader } from "three";
|
|
2
|
-
import { Context } from "../context";
|
|
3
|
-
export declare class TextureFactory {
|
|
4
|
-
private context;
|
|
5
|
-
textureMap: Map<string, Texture | Promise<Texture>>;
|
|
6
|
-
loader: TextureLoader;
|
|
7
|
-
constructor(context: Context);
|
|
8
|
-
getTexture(url: string): Promise<Texture>;
|
|
9
|
-
dispose(): void;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './split-load';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { GraphicInfo, LoadQuery } from "../../types";
|
|
2
|
-
import { Plugin } from "../base";
|
|
3
|
-
type LoadGraphicQuery = Omit<LoadQuery, "resource_type_list">;
|
|
4
|
-
export declare class SplitLoad extends Plugin {
|
|
5
|
-
cacheData: Map<string, GraphicInfo[]>;
|
|
6
|
-
floorDataLengthMap: Map<any, any>;
|
|
7
|
-
load(query: LoadQuery): Promise<GraphicInfo[]>;
|
|
8
|
-
isSameFloor(query: LoadGraphicQuery): boolean;
|
|
9
|
-
switchFloorByData(data: GraphicInfo[], query: LoadGraphicQuery): void;
|
|
10
|
-
filterData(data: GraphicInfo[], query: LoadGraphicQuery): GraphicInfo[];
|
|
11
|
-
private switchFloorByStoreData;
|
|
12
|
-
private switchFloorByOtherData;
|
|
13
|
-
loadBuildGround({ brand, project }: LoadGraphicQuery): Promise<GraphicInfo | null>;
|
|
14
|
-
changeFloor(query: LoadGraphicQuery): Promise<unknown[]>;
|
|
15
|
-
}
|
|
16
|
-
export {};
|
package/lib/src/utils/model.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DataTexture, Texture } from 'three';
|
|
2
|
-
export declare function initCanvas(): {
|
|
3
|
-
canvas: HTMLCanvasElement;
|
|
4
|
-
ctx: CanvasRenderingContext2D;
|
|
5
|
-
};
|
|
6
|
-
export declare function createCanvas(): void;
|
|
7
|
-
export declare function getTextureByText(text: string): DataTexture;
|
|
8
|
-
export declare function clearTextTexture(): void;
|
|
9
|
-
export declare function clearCanvas(): void;
|
|
10
|
-
export declare function getTextureByUrl(url: string): Promise<Texture>;
|
|
File without changes
|