@aibee/crc-bmap 0.0.133 → 0.0.134
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 +29 -29
- package/lib/bmap.cjs.min.js.map +3 -3
- package/lib/bmap.esm.js +119 -37
- package/lib/bmap.esm.js.map +2 -2
- package/lib/bmap.esm.min.js +29 -29
- package/lib/bmap.esm.min.js.map +3 -3
- package/lib/bmap.min.js +29 -29
- package/lib/bmap.min.js.map +3 -3
- package/lib/src/elements/graphic.d.ts +1 -19
- package/lib/src/elements/poi2.d.ts +1 -0
- package/lib/src/layer/poi-layer2.d.ts +1 -0
- package/lib/src/loader/AibeeLoader/utils.d.ts +2 -1
- package/lib/src/plugins/navigation/navigation.d.ts +2 -2
- package/lib/src/types/index.d.ts +22 -1
- package/lib/src/utils/coordinate.d.ts +10 -2
- package/package.json +1 -1
|
@@ -1,24 +1,6 @@
|
|
|
1
1
|
import { Object3D, ExtrudeGeometry, Mesh, MeshBasicMaterial, Raycaster, Object3DEventMap, Vector3, BufferGeometry, LineBasicMaterial, LineSegments, ShaderMaterial } from "three";
|
|
2
2
|
import { GraphicOptions } from "src/types";
|
|
3
3
|
import { Context } from "../context";
|
|
4
|
-
declare const DoorType: {
|
|
5
|
-
single: string;
|
|
6
|
-
double: string;
|
|
7
|
-
move: string;
|
|
8
|
-
};
|
|
9
|
-
declare const DoorMaterial: {
|
|
10
|
-
wood: string;
|
|
11
|
-
glass: string;
|
|
12
|
-
aluminum: string;
|
|
13
|
-
};
|
|
14
|
-
export interface Door {
|
|
15
|
-
name: string;
|
|
16
|
-
id: string;
|
|
17
|
-
width: number;
|
|
18
|
-
open: boolean;
|
|
19
|
-
type: keyof typeof DoorType;
|
|
20
|
-
material: keyof typeof DoorMaterial;
|
|
21
|
-
}
|
|
22
4
|
export type GraphicOptionsParam = Partial<GraphicOptions>;
|
|
23
5
|
export type GraphicEventMap = {
|
|
24
6
|
[K in keyof GraphicOptions as `change-${K}`]: {
|
|
@@ -40,6 +22,7 @@ export declare class Graphic extends Object3D<GraphicEventMap> {
|
|
|
40
22
|
getSize(): Vector3;
|
|
41
23
|
getPosition(): Vector3;
|
|
42
24
|
init(): void;
|
|
25
|
+
initDoor(): void;
|
|
43
26
|
initGeometry(): ExtrudeGeometry;
|
|
44
27
|
initSingleMaterial(): MeshBasicMaterial | MeshBasicMaterial[];
|
|
45
28
|
getMaxAndMin(pos: Vector3, dir: Vector3): {
|
|
@@ -59,4 +42,3 @@ export declare class Graphic extends Object3D<GraphicEventMap> {
|
|
|
59
42
|
};
|
|
60
43
|
dispose(): void;
|
|
61
44
|
}
|
|
62
|
-
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { PointGeometry, PolygonGeometry } from "../../types";
|
|
1
|
+
import { PointGeometry, PolygonGeometry, Door } from "../../types";
|
|
2
2
|
export declare function transformGraphicData(data: {
|
|
3
3
|
geometry: PolygonGeometry | PointGeometry;
|
|
4
4
|
deltaHeight?: number;
|
|
5
|
+
doors?: Door[];
|
|
5
6
|
}[], center: [number, number], baseIndex?: number): void;
|
|
6
7
|
export declare function translatePosToCenter(cds: [number, number], center: [number, number]): [number, number];
|
|
@@ -2,7 +2,7 @@ import { BMap } from "../../bmap";
|
|
|
2
2
|
import { Plugin } from "../base";
|
|
3
3
|
import { Path, PathConfig } from "./path";
|
|
4
4
|
import { End, PathData, RoadData, RouteType, Start, UniqueKey } from "../../utils";
|
|
5
|
-
import { Floor, Poi2,
|
|
5
|
+
import { Floor, Poi2, PoiOptions2 } from "../../elements";
|
|
6
6
|
import { Group as TweenGroup } from "@tweenjs/tween.js";
|
|
7
7
|
export type Point = [number, number];
|
|
8
8
|
interface EventMap {
|
|
@@ -21,7 +21,7 @@ export interface NavigationConfig {
|
|
|
21
21
|
path?: Partial<PathConfig>;
|
|
22
22
|
speed: number;
|
|
23
23
|
cheapMaximumDistance: number;
|
|
24
|
-
startPoi: Partial<
|
|
24
|
+
startPoi: Partial<PoiOptions2>;
|
|
25
25
|
needStartPoi: boolean;
|
|
26
26
|
loadRoad: boolean;
|
|
27
27
|
roadNetwork: "RoadNetwork" | "RoadNetwork2";
|
package/lib/src/types/index.d.ts
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
export type Coordinate = [number, number];
|
|
2
|
+
declare const DoorType: {
|
|
3
|
+
single: string;
|
|
4
|
+
double: string;
|
|
5
|
+
move: string;
|
|
6
|
+
};
|
|
7
|
+
declare const DoorMaterial: {
|
|
8
|
+
wood: string;
|
|
9
|
+
glass: string;
|
|
10
|
+
aluminum: string;
|
|
11
|
+
};
|
|
12
|
+
export interface Door {
|
|
13
|
+
name: string;
|
|
14
|
+
id: string;
|
|
15
|
+
width: number;
|
|
16
|
+
open: boolean;
|
|
17
|
+
type: keyof typeof DoorType;
|
|
18
|
+
material: keyof typeof DoorMaterial;
|
|
19
|
+
coordinate: Coordinate;
|
|
20
|
+
coord: Coordinate;
|
|
21
|
+
}
|
|
2
22
|
export interface PointGeometry {
|
|
3
23
|
type: "point";
|
|
4
24
|
cds: Coordinate;
|
|
@@ -28,7 +48,7 @@ export interface GraphicOptions {
|
|
|
28
48
|
strokeWidth: number;
|
|
29
49
|
locked: boolean;
|
|
30
50
|
visible: boolean;
|
|
31
|
-
doors:
|
|
51
|
+
doors: Door[];
|
|
32
52
|
geometry: PolygonGeometry | PointGeometry;
|
|
33
53
|
layerType: string;
|
|
34
54
|
zIndex: number;
|
|
@@ -68,3 +88,4 @@ export interface LoadQuery {
|
|
|
68
88
|
ts: string;
|
|
69
89
|
resource_type_list: string;
|
|
70
90
|
}
|
|
91
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Coordinate } from
|
|
2
|
-
import { Vector3, Camera } from
|
|
1
|
+
import { Coordinate } from "../types";
|
|
2
|
+
import { Vector3, Camera } from "three";
|
|
3
3
|
/**
|
|
4
4
|
* 3D坐标转屏幕坐标
|
|
5
5
|
* @param vector
|
|
@@ -31,4 +31,12 @@ export declare function getLength(start: [number, number], end: [number, number]
|
|
|
31
31
|
export declare function getPathLength(path: [number, number][]): number;
|
|
32
32
|
export declare function calc_angle(p0: [number, number], p1: [number, number], p2: [number, number]): number;
|
|
33
33
|
export declare function getMinEdgeSquare(cds: [number, number][][], center?: [number, number]): [number, number][][];
|
|
34
|
+
/**
|
|
35
|
+
* 判断一个点是不是在一个线上
|
|
36
|
+
* @param A
|
|
37
|
+
* @param B
|
|
38
|
+
* @param P
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
export declare function isPointOnLineSegment(A: Coordinate, B: Coordinate, P: Coordinate): boolean;
|
|
34
42
|
export {};
|