@soonspacejs/plugin-cps-soonmanager 2.9.4 → 2.9.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/constants.d.ts +8 -0
- package/dist/index.d.ts +26 -23
- package/dist/index.esm.js +2 -2
- package/dist/types.d.ts +62 -6
- package/dist/utils.d.ts +11 -4
- package/package.json +7 -3
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tween } from '@tweenjs/tween.js';
|
|
2
|
-
import { AnimationModeType, IVector3 } from 'soonspacejs/types/Interface';
|
|
2
|
+
import { AnimationModeType, IVector3, PoiNodeType } from 'soonspacejs/types/Interface';
|
|
3
3
|
/**
|
|
4
4
|
* 场景元数据
|
|
5
5
|
*/
|
|
@@ -31,6 +31,55 @@ export interface ITreeData {
|
|
|
31
31
|
familyId: string | null;
|
|
32
32
|
children: ITreeData[];
|
|
33
33
|
}
|
|
34
|
+
export declare enum PoiContentTypeEnum {
|
|
35
|
+
PANEL = "PANEL",
|
|
36
|
+
VIDEO = "VIDEO",
|
|
37
|
+
VIDEO_STREAM = "VIDEO_STREAM"
|
|
38
|
+
}
|
|
39
|
+
export interface PoiMedia {
|
|
40
|
+
url?: string;
|
|
41
|
+
isLoop?: boolean;
|
|
42
|
+
protocol?: string;
|
|
43
|
+
fileId?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface PoiContentData {
|
|
46
|
+
[group: string]: {
|
|
47
|
+
[key: string]: {
|
|
48
|
+
value: string;
|
|
49
|
+
index: number;
|
|
50
|
+
label: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface PoiContent {
|
|
55
|
+
ds_user: PoiContentData;
|
|
56
|
+
ds_system: PoiContentData;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Poi
|
|
60
|
+
*/
|
|
61
|
+
export interface IPoiData {
|
|
62
|
+
projectId: string;
|
|
63
|
+
sceneId: string;
|
|
64
|
+
nodeId: string;
|
|
65
|
+
poiId: string;
|
|
66
|
+
name: string;
|
|
67
|
+
width: number;
|
|
68
|
+
height: number;
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
z: number;
|
|
72
|
+
rotationX: number;
|
|
73
|
+
rotationY: number;
|
|
74
|
+
rotationZ: number;
|
|
75
|
+
scale: number;
|
|
76
|
+
dimensional: PoiNodeType;
|
|
77
|
+
content: string;
|
|
78
|
+
media: PoiMedia | null;
|
|
79
|
+
contentType: PoiContentTypeEnum;
|
|
80
|
+
display: boolean;
|
|
81
|
+
style: string;
|
|
82
|
+
}
|
|
34
83
|
/**
|
|
35
84
|
* origin path
|
|
36
85
|
*/
|
|
@@ -131,9 +180,9 @@ export interface IPresetEffectsOptions {
|
|
|
131
180
|
};
|
|
132
181
|
}
|
|
133
182
|
/**
|
|
134
|
-
*
|
|
183
|
+
* constructor options
|
|
135
184
|
*/
|
|
136
|
-
export interface
|
|
185
|
+
export interface ConstructorOptions {
|
|
137
186
|
/**
|
|
138
187
|
* 平台解密公钥
|
|
139
188
|
*/
|
|
@@ -142,6 +191,11 @@ export interface ILoadSceneOptions {
|
|
|
142
191
|
* 资源包路径
|
|
143
192
|
*/
|
|
144
193
|
path?: string;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* loadScene options
|
|
197
|
+
*/
|
|
198
|
+
export interface ILoadSceneOptions extends ConstructorOptions {
|
|
145
199
|
/**
|
|
146
200
|
* 同步自定义属性
|
|
147
201
|
*/
|
|
@@ -150,6 +204,10 @@ export interface ILoadSceneOptions {
|
|
|
150
204
|
* 同步模型视角数据
|
|
151
205
|
*/
|
|
152
206
|
syncModelVisions?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* 自动加载 poi
|
|
209
|
+
*/
|
|
210
|
+
autoLoadPoi?: boolean;
|
|
153
211
|
/**
|
|
154
212
|
* 计算 bounds tree
|
|
155
213
|
*/
|
|
@@ -180,6 +238,7 @@ export type TAnimationsTweenProps = Pick<IKeyframe, 'x' | 'y' | 'z' | 'rotationX
|
|
|
180
238
|
* playAnimationById options
|
|
181
239
|
*/
|
|
182
240
|
export interface IPlayAnimationByIdOptions {
|
|
241
|
+
autoStopPrevious?: boolean;
|
|
183
242
|
onUpdate?: (source: TAnimationsTweenProps, tween: Tween<TAnimationsTweenProps>) => void;
|
|
184
243
|
onStart?: (tween: Tween<TAnimationsTweenProps>) => void;
|
|
185
244
|
}
|
|
@@ -200,7 +259,4 @@ export declare enum LoadSceneAlgorithm {
|
|
|
200
259
|
BFS = "BFS",
|
|
201
260
|
DFS = "DFS"
|
|
202
261
|
}
|
|
203
|
-
export interface Options {
|
|
204
|
-
key?: string;
|
|
205
|
-
}
|
|
206
262
|
export {};
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 解码
|
|
3
|
-
* @param encodedStr
|
|
4
|
-
* @returns
|
|
5
|
-
*/
|
|
2
|
+
* 解码
|
|
3
|
+
* @param encodedStr
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
6
|
export declare function decodeString(encodedStr: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* 分组
|
|
9
|
+
* @param list
|
|
10
|
+
* @param key
|
|
11
|
+
* @returns Map
|
|
12
|
+
*/
|
|
13
|
+
export declare function groupBy<T extends Record<string, any>, V>(list: T[], key: keyof T): Map<V, T[]>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soonspacejs/plugin-cps-soonmanager",
|
|
3
3
|
"pluginName": "CpsSoonmanagerPlugin",
|
|
4
|
-
"version": "2.9.
|
|
4
|
+
"version": "2.9.6",
|
|
5
5
|
"description": "Sync cps soonmanager data plugin for SoonSpace.js",
|
|
6
6
|
"main": "dist/index.esm.js",
|
|
7
7
|
"module": "dist/index.esm.js",
|
|
@@ -13,8 +13,12 @@
|
|
|
13
13
|
],
|
|
14
14
|
"author": "xunwei",
|
|
15
15
|
"license": "UNLICENSED",
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "3ab8f7a974691b6456ca4adf0430b6950c13e868",
|
|
17
|
+
"dependentPlugins": [
|
|
18
|
+
"plugin-poi-renderer"
|
|
19
|
+
],
|
|
17
20
|
"peerDependencies": {
|
|
18
|
-
"soonspacejs": "2.9.
|
|
21
|
+
"@soonspacejs/plugin-poi-renderer": "2.9.6",
|
|
22
|
+
"soonspacejs": "2.9.6"
|
|
19
23
|
}
|
|
20
24
|
}
|