@soonspacejs/plugin-cps-soonmanager 2.11.13 → 2.11.14

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.
@@ -0,0 +1,212 @@
1
+ import SoonSpace, { TopologyNodeInfo } from 'soonspacejs';
2
+ import type { BaseObject3D, Group, TopologyInfo } from 'soonspacejs/types/Library';
3
+ import { PoiNodeData } from '@soonspacejs/plugin-poi-renderer';
4
+ import SoonFlow from '@soonflow/core';
5
+ import { Tween } from '@tweenjs/tween.js';
6
+ import { IMetadata, ITreeData, IPoiData, ITopologyPath, ILoadSceneOptions, TPropertiesMap, TAnimationsMap, IPlayAnimationByIdOptions, TModelVisionsMap, IPresetEffectsOptions, ConstructorOptions } from './types';
7
+ declare class CpsSoonmanagerPlugin {
8
+ #private;
9
+ readonly ssp: SoonSpace;
10
+ get path(): string;
11
+ set path(val: string);
12
+ /**
13
+ * 场景 group 包裹
14
+ */
15
+ sceneGroup: Group | null;
16
+ /**
17
+ * 场景元数据
18
+ */
19
+ metaData: IMetadata | null;
20
+ /**
21
+ * 模型树
22
+ */
23
+ treeData: ITreeData[] | null;
24
+ /**
25
+ * poi 数据
26
+ */
27
+ poiData: IPoiData[] | null;
28
+ /**
29
+ * 数据源
30
+ */
31
+ dataSourceData: any | null;
32
+ /**
33
+ * 拓扑路径
34
+ */
35
+ topologyData: TopologyInfo[] | null;
36
+ /**
37
+ * 自定义属性
38
+ */
39
+ propertiesData: TPropertiesMap | null;
40
+ objectsAnimations: Map<string, Set<Tween<any>>>;
41
+ /**
42
+ * 动画
43
+ */
44
+ animationsData: TAnimationsMap | null;
45
+ /**
46
+ * 模型视角
47
+ */
48
+ modelVisionsData: TModelVisionsMap | null;
49
+ /**
50
+ * 流程引擎实咧
51
+ */
52
+ soonflow: SoonFlow;
53
+ /**
54
+ * 流程数据
55
+ */
56
+ flowData: any[] | null;
57
+ constructor(ssp: SoonSpace, option?: ConstructorOptions);
58
+ /**
59
+ * 设置 key
60
+ * @param key
61
+ */
62
+ setKey(key: string): void;
63
+ /**
64
+ * 获取场景元数据
65
+ */
66
+ fetchMetaData(): Promise<IMetadata>;
67
+ /**
68
+ * 获取场景树(旧版资源包使用)
69
+ * @returns
70
+ */
71
+ fetchTreeData(): Promise<ITreeData[]>;
72
+ /**
73
+ * 获取 Poi 数据
74
+ * @returns
75
+ */
76
+ fetchPoiData(): Promise<IPoiData[]>;
77
+ /**
78
+ * 获取数据源数据
79
+ * @returns
80
+ */
81
+ fetchDataSourceData(): Promise<any>;
82
+ /**
83
+ * 获取拓扑路径
84
+ * @returns
85
+ */
86
+ fetchTopologyData(): Promise<ITopologyPath[]>;
87
+ /**
88
+ * 获取自定义属性
89
+ * @returns
90
+ */
91
+ fetchPropertiesData(): Promise<TPropertiesMap>;
92
+ /**
93
+ * 获取动画
94
+ * @returns
95
+ */
96
+ fetchAnimationsData(): Promise<TAnimationsMap>;
97
+ /**
98
+ * 获取模型视角
99
+ * @returns
100
+ */
101
+ fetchModelVisionsData(): Promise<TModelVisionsMap>;
102
+ /**
103
+ * 格式化 Poi 数据完成 Poi Renderer 插件使用
104
+ */
105
+ formatPoiData: (poiData: IPoiData) => PoiNodeData;
106
+ /**
107
+ * 初始化 Poi
108
+ */
109
+ loadPoi(refreshByDataSource?: boolean): Promise<void>;
110
+ /**
111
+ * 通过数据源刷新 poi
112
+ */
113
+ refreshPoiByDataSource(): Promise<void>;
114
+ /**
115
+ * 根据 id 获取树节点
116
+ */
117
+ getTreeNodeById(id: ITreeData['id'], treeData?: ITreeData[] | null): ITreeData | undefined;
118
+ /**
119
+ * 设置 path
120
+ * @param path
121
+ */
122
+ setPath(path: string): void;
123
+ /**
124
+ * 加载整个场景
125
+ */
126
+ loadScene(options?: ILoadSceneOptions): Promise<undefined>;
127
+ /**
128
+ * 预设效果
129
+ */
130
+ presetEffects(options?: IPresetEffectsOptions): Promise<void>;
131
+ /**
132
+ * 获取拓扑路径列表
133
+ */
134
+ getTopologies(): Promise<TopologyInfo[]>;
135
+ /**
136
+ * 对 nodes 排序(只适用于线路结构的拓扑路径)
137
+ */
138
+ sortTopologyNodes(topologyInfo: TopologyInfo, startNodeId?: TopologyNodeInfo['id']): TopologyInfo | undefined;
139
+ /**
140
+ * 播放动画
141
+ * @deprecated
142
+ */
143
+ playAnimationById(id: string, animationIndex?: number, options?: IPlayAnimationByIdOptions): Promise<void>;
144
+ /**
145
+ * 播放动画
146
+ */
147
+ playObjectAnimation(object: BaseObject3D, animationIndex?: number, options?: IPlayAnimationByIdOptions): Promise<void>;
148
+ /**
149
+ * 停止对象动画
150
+ */
151
+ stopObjectAnimation(object: BaseObject3D): Promise<void>;
152
+ /**
153
+ * 飞向场景视角
154
+ * @param index
155
+ */
156
+ flyToSceneFromVisionsData(index?: number): Promise<void>;
157
+ /**
158
+ * 飞向对象视角
159
+ * @param object
160
+ * @param index
161
+ */
162
+ flyToObjectFromVisionsData(object: BaseObject3D, index?: number): Promise<void>;
163
+ /**
164
+ * 加载流程数据
165
+ */
166
+ loadFlowData(): Promise<{
167
+ nodes: {
168
+ inputs: import("@soonflow/plugin-soonmanager2-sync/dist/interface").Handle[];
169
+ outputs: import("@soonflow/plugin-soonmanager2-sync/dist/interface").Handle[];
170
+ isStartNode: boolean;
171
+ id: string;
172
+ name: string;
173
+ flowId: string;
174
+ type: import("@soonflow/plugin-soonmanager2-sync/dist/interface").FlowNodeTypesEnum;
175
+ config: string;
176
+ posX: number;
177
+ posY: number;
178
+ sortNum: number;
179
+ enable: boolean;
180
+ handlerList: import("@soonflow/plugin-soonmanager2-sync/dist/interface").Handle[];
181
+ }[];
182
+ edges: {
183
+ sourceNodeHandleId: string;
184
+ targetNodeHandleId: string;
185
+ id: string;
186
+ name: string;
187
+ type: string;
188
+ sourceHandlerId: string;
189
+ sourceNodeId: string;
190
+ targetHandlerId: string;
191
+ targetNodeId: string;
192
+ enable: boolean;
193
+ }[];
194
+ id: string;
195
+ name: string;
196
+ applyType: "AUTO" | "MANUAL";
197
+ pid: string | null;
198
+ nodeData: {
199
+ nodeList: import("@soonflow/plugin-soonmanager2-sync/dist/interface").Node[];
200
+ lineList: import("@soonflow/plugin-soonmanager2-sync/dist/interface").Edge[];
201
+ };
202
+ subFlows: import("@soonflow/plugin-soonmanager2-sync/dist/interface").FlowSyncData[];
203
+ }[]>;
204
+ /**
205
+ * 执行流程
206
+ * @param id 流程 id
207
+ */
208
+ runFlowById(id: string): Promise<void>;
209
+ }
210
+ export * from './types';
211
+ export * from './constants';
212
+ export default CpsSoonmanagerPlugin;