model-action 1.0.4 → 1.0.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.
- package/dist/index.d.ts +4 -67
- package/dist/modules/Action.d.ts +54 -0
- package/dist/modules/Poi.d.ts +1 -1
- package/dist/modules/Track.d.ts +1 -1
- package/dist/modules/VideoFusion.d.ts +1 -1
- package/package.json +2 -2
- package/src/modules/Action.ts +68 -0
- package/src/modules/Poi.ts +1 -1
- package/src/modules/Track.ts +1 -1
- package/src/modules/VideoFusion.ts +1 -1
package/dist/index.d.ts
CHANGED
@@ -1,67 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
action: string,
|
6
|
-
}
|
7
|
-
|
8
|
-
interface IdItem {
|
9
|
-
id: string;
|
10
|
-
}
|
11
|
-
|
12
|
-
type IdList = IdItem[];
|
13
|
-
|
14
|
-
|
15
|
-
type PathList = Array<{
|
16
|
-
location: string
|
17
|
-
}>
|
18
|
-
|
19
|
-
|
20
|
-
type PoiAction = 'show' | 'hide' | 'add' | 'delete' | 'update' | 'getInfo'
|
21
|
-
type LocationItem = `X=${number},Y=${number},Z=${number}`
|
22
|
-
type PoiType = {
|
23
|
-
action: PoiAction, //方法
|
24
|
-
id?: string, //POI点UE中的ID
|
25
|
-
type?: string, //POI类型
|
26
|
-
typeChild?: string, //POI子类型
|
27
|
-
text?: string, //POI标题
|
28
|
-
location?: LocationItem, //POI在场景中的坐标格式
|
29
|
-
place?: string, //POI所在位置
|
30
|
-
description?: string, //POI描述
|
31
|
-
linkId?: string, //POI关联设备ID
|
32
|
-
floorNum?: string, //总楼层
|
33
|
-
lowestFloor?: string //最低楼层
|
34
|
-
} & SendParam
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
type LocationList = Array<{
|
39
|
-
location: LocationItem
|
40
|
-
}>
|
41
|
-
type TrackAction = 'getRoadNet' | 'remove' | 'add'
|
42
|
-
type TrackType = {
|
43
|
-
action: TrackAction,
|
44
|
-
pathId?: string, //自定义轨迹ID
|
45
|
-
rnId?: string, //路网ID
|
46
|
-
roadNet?: string, //路网信息
|
47
|
-
type?: string,
|
48
|
-
data?: LocationList | IdList
|
49
|
-
} & SendParam
|
50
|
-
|
51
|
-
|
52
|
-
type VideoFusionAction = 'init' | 'flyTo' | 'start' | 'stop' | 'pause' | 'resume' | 'refresh'
|
53
|
-
type VideoFusionType = {
|
54
|
-
action: VideoFusionAction,
|
55
|
-
token?: string,
|
56
|
-
ip?: string,
|
57
|
-
port?: string,
|
58
|
-
isHttps?: boolean,
|
59
|
-
id?: string,
|
60
|
-
fov?: number, //视场角
|
61
|
-
backPlay?:boolean,
|
62
|
-
ids?: IdList,
|
63
|
-
isLocation?: boolean, //是否定位到第一个点,true=定位到第一个,false=不定位
|
64
|
-
videoType?: 'Video' | 'Record', //Video:实时流,Record:录像,默认实时流 Video
|
65
|
-
recordType?: 'Cloud' | 'Device',// Cloud:中心录像,Device:设备录像,默认中心录像 Cloud,videoType为 Record 时有效
|
66
|
-
|
67
|
-
} & SendParam
|
1
|
+
export { Action } from './modules/Action';
|
2
|
+
export { VideoFusionAction } from "./modules/VideoFusion";
|
3
|
+
export { PoiAction } from './modules/Poi';
|
4
|
+
export { TrackAction } from './modules/Track';
|
package/dist/modules/Action.d.ts
CHANGED
@@ -1,3 +1,57 @@
|
|
1
|
+
export type RequiredSome<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;
|
2
|
+
export interface SendParam {
|
3
|
+
cmd: string;
|
4
|
+
action: string;
|
5
|
+
}
|
6
|
+
export interface IdItem {
|
7
|
+
id: string;
|
8
|
+
}
|
9
|
+
export type IdList = IdItem[];
|
10
|
+
export type PathList = Array<{
|
11
|
+
location: string;
|
12
|
+
}>;
|
13
|
+
export type PoiAction = 'show' | 'hide' | 'add' | 'delete' | 'update' | 'getInfo';
|
14
|
+
export type LocationItem = `X=${number},Y=${number},Z=${number}`;
|
15
|
+
export type PoiType = {
|
16
|
+
action: PoiAction;
|
17
|
+
id?: string;
|
18
|
+
type?: string;
|
19
|
+
typeChild?: string;
|
20
|
+
text?: string;
|
21
|
+
location?: LocationItem;
|
22
|
+
place?: string;
|
23
|
+
description?: string;
|
24
|
+
linkId?: string;
|
25
|
+
floorNum?: string;
|
26
|
+
lowestFloor?: string;
|
27
|
+
} & SendParam;
|
28
|
+
export type LocationList = Array<{
|
29
|
+
location: LocationItem;
|
30
|
+
}>;
|
31
|
+
export type TrackAction = 'getRoadNet' | 'remove' | 'add';
|
32
|
+
export type TrackType = {
|
33
|
+
action: TrackAction;
|
34
|
+
pathId?: string;
|
35
|
+
rnId?: string;
|
36
|
+
roadNet?: string;
|
37
|
+
type?: string;
|
38
|
+
data?: LocationList | IdList;
|
39
|
+
} & SendParam;
|
40
|
+
export type VideoFusionAction = 'init' | 'flyTo' | 'start' | 'stop' | 'pause' | 'resume' | 'refresh';
|
41
|
+
export type VideoFusionType = {
|
42
|
+
action: VideoFusionAction;
|
43
|
+
token?: string;
|
44
|
+
ip?: string;
|
45
|
+
port?: string;
|
46
|
+
isHttps?: boolean;
|
47
|
+
id?: string;
|
48
|
+
fov?: number;
|
49
|
+
backPlay?: boolean;
|
50
|
+
ids?: IdList;
|
51
|
+
isLocation?: boolean;
|
52
|
+
videoType?: 'Video' | 'Record';
|
53
|
+
recordType?: 'Cloud' | 'Device';
|
54
|
+
} & SendParam;
|
1
55
|
export declare class Action {
|
2
56
|
/**
|
3
57
|
* 视角初始化
|
package/dist/modules/Poi.d.ts
CHANGED
package/dist/modules/Track.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "model-action",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.6",
|
4
4
|
"description": "与三维交互api",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
7
7
|
"scripts": {
|
8
|
-
"build":"tsc
|
8
|
+
"build":"tsc",
|
9
9
|
"test": "echo \"Error: no test specified\" && exit 1"
|
10
10
|
},
|
11
11
|
"files": ["dist","src"],
|
package/src/modules/Action.ts
CHANGED
@@ -1,3 +1,71 @@
|
|
1
|
+
export type RequiredSome<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;
|
2
|
+
|
3
|
+
export interface SendParam {
|
4
|
+
cmd: string,
|
5
|
+
action: string,
|
6
|
+
}
|
7
|
+
|
8
|
+
export interface IdItem {
|
9
|
+
id: string;
|
10
|
+
}
|
11
|
+
|
12
|
+
export type IdList = IdItem[];
|
13
|
+
|
14
|
+
|
15
|
+
export type PathList = Array<{
|
16
|
+
location: string
|
17
|
+
}>
|
18
|
+
|
19
|
+
|
20
|
+
export type PoiAction = 'show' | 'hide' | 'add' | 'delete' | 'update' | 'getInfo'
|
21
|
+
export type LocationItem = `X=${number},Y=${number},Z=${number}`
|
22
|
+
export type PoiType = {
|
23
|
+
action: PoiAction, //方法
|
24
|
+
id?: string, //POI点UE中的ID
|
25
|
+
type?: string, //POI类型
|
26
|
+
typeChild?: string, //POI子类型
|
27
|
+
text?: string, //POI标题
|
28
|
+
location?: LocationItem, //POI在场景中的坐标格式
|
29
|
+
place?: string, //POI所在位置
|
30
|
+
description?: string, //POI描述
|
31
|
+
linkId?: string, //POI关联设备ID
|
32
|
+
floorNum?: string, //总楼层
|
33
|
+
lowestFloor?: string //最低楼层
|
34
|
+
} & SendParam
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
export type LocationList = Array<{
|
39
|
+
location: LocationItem
|
40
|
+
}>
|
41
|
+
export type TrackAction = 'getRoadNet' | 'remove' | 'add'
|
42
|
+
export type TrackType = {
|
43
|
+
action: TrackAction,
|
44
|
+
pathId?: string, //自定义轨迹ID
|
45
|
+
rnId?: string, //路网ID
|
46
|
+
roadNet?: string, //路网信息
|
47
|
+
type?: string,
|
48
|
+
data?: LocationList | IdList
|
49
|
+
} & SendParam
|
50
|
+
|
51
|
+
|
52
|
+
export type VideoFusionAction = 'init' | 'flyTo' | 'start' | 'stop' | 'pause' | 'resume' | 'refresh'
|
53
|
+
export type VideoFusionType = {
|
54
|
+
action: VideoFusionAction,
|
55
|
+
token?: string,
|
56
|
+
ip?: string,
|
57
|
+
port?: string,
|
58
|
+
isHttps?: boolean,
|
59
|
+
id?: string,
|
60
|
+
fov?: number, //视场角
|
61
|
+
backPlay?:boolean,
|
62
|
+
ids?: IdList,
|
63
|
+
isLocation?: boolean, //是否定位到第一个点,true=定位到第一个,false=不定位
|
64
|
+
videoType?: 'Video' | 'Record', //Video:实时流,Record:录像,默认实时流 Video
|
65
|
+
recordType?: 'Cloud' | 'Device',// Cloud:中心录像,Device:设备录像,默认中心录像 Cloud,videoType为 Record 时有效
|
66
|
+
|
67
|
+
} & SendParam
|
68
|
+
|
1
69
|
export class Action {
|
2
70
|
/**
|
3
71
|
* 视角初始化
|
package/src/modules/Poi.ts
CHANGED
package/src/modules/Track.ts
CHANGED