@soonspacejs/plugin-cps-soonmanager 2.11.38 → 2.11.39

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