@soonspacejs/plugin-cps-soonmanager 2.9.5 → 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/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
- * loadScene options
183
+ * constructor options
135
184
  */
136
- export interface ILoadSceneOptions {
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
  */
@@ -201,7 +259,4 @@ export declare enum LoadSceneAlgorithm {
201
259
  BFS = "BFS",
202
260
  DFS = "DFS"
203
261
  }
204
- export interface Options {
205
- key?: string;
206
- }
207
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.5",
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": "29ad56babad46dfae6b0aba61e3a113706eaf672",
16
+ "gitHead": "3ab8f7a974691b6456ca4adf0430b6950c13e868",
17
+ "dependentPlugins": [
18
+ "plugin-poi-renderer"
19
+ ],
17
20
  "peerDependencies": {
18
- "soonspacejs": "2.9.5"
21
+ "@soonspacejs/plugin-poi-renderer": "2.9.6",
22
+ "soonspacejs": "2.9.6"
19
23
  }
20
24
  }