@soonspacejs/plugin-cps-soonmanager 2.9.5 → 2.9.7

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.
@@ -10,6 +10,10 @@ export declare const SIGN_PATH = "/db/sign";
10
10
  * 模型树
11
11
  */
12
12
  export declare const TREE_DATA_FILE_PATH = "/db/tree_models.json";
13
+ /**
14
+ * poi
15
+ */
16
+ export declare const POI_DATA_FILE_PATH = "/db/pois.json";
13
17
  /**
14
18
  * 拓扑路径
15
19
  */
@@ -30,3 +34,7 @@ export declare const MODEL_VISIONS_DATA_FILE_PATH = "/db/model_visions.json";
30
34
  * 自定义属性 key
31
35
  */
32
36
  export declare const PROPERTIES_KEY = "properties";
37
+ /**
38
+ * 自定义属性 key
39
+ */
40
+ export declare const POI_PLUGIN_NAME = "poiRenderer";
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import SoonSpace, { AnimationOptions, TopologyNodeInfo } from 'soonspacejs';
2
2
  import type { BaseObject3D, TopologyInfo } from 'soonspacejs/types/Library';
3
+ import SoonFlow from '@soonflow/core';
3
4
  import { Tween } from '@tweenjs/tween.js';
4
- import { IMetadata, ITreeData, ITopologyPath, ILoadSceneOptions, TPropertiesMap, TAnimationsMap, IPlayAnimationByIdOptions, TModelVisionsMap, IPresetEffectsOptions, Options } from './types';
5
+ import { IMetadata, ITreeData, IPoiData, ITopologyPath, ILoadSceneOptions, TPropertiesMap, TAnimationsMap, IPlayAnimationByIdOptions, TModelVisionsMap, IPresetEffectsOptions, ConstructorOptions } from './types';
5
6
  declare class CpsSoonmanagerPlugin {
6
7
  #private;
7
8
  readonly ssp: SoonSpace;
8
- _path: string;
9
9
  get path(): string;
10
10
  set path(val: string);
11
11
  /**
@@ -16,6 +16,10 @@ declare class CpsSoonmanagerPlugin {
16
16
  * 模型树
17
17
  */
18
18
  treeData: ITreeData[] | null;
19
+ /**
20
+ * poi 数据
21
+ */
22
+ poiData: IPoiData[] | null;
19
23
  /**
20
24
  * 拓扑路径
21
25
  */
@@ -24,6 +28,7 @@ declare class CpsSoonmanagerPlugin {
24
28
  * 自定义属性
25
29
  */
26
30
  propertiesData: TPropertiesMap | null;
31
+ objectsAnimations: Map<string, Set<Tween<any>>>;
27
32
  /**
28
33
  * 动画
29
34
  */
@@ -32,15 +37,20 @@ declare class CpsSoonmanagerPlugin {
32
37
  * 模型视角
33
38
  */
34
39
  modelVisionsData: TModelVisionsMap | null;
35
- _objectsAnimations: Map<string, Set<Tween<any>>>;
36
- constructor(ssp: SoonSpace, option?: Options);
40
+ /**
41
+ * 流程引擎实咧
42
+ */
43
+ soonflow: SoonFlow;
44
+ /**
45
+ * 流程数据
46
+ */
47
+ flowData: any[];
48
+ constructor(ssp: SoonSpace, option?: ConstructorOptions);
37
49
  /**
38
50
  * 设置 key
39
51
  * @param key
40
52
  */
41
53
  setKey(key: string): void;
42
- private _resolvePath;
43
- private _fetchData;
44
54
  /**
45
55
  * 获取场景元数据
46
56
  */
@@ -50,6 +60,11 @@ declare class CpsSoonmanagerPlugin {
50
60
  * @returns
51
61
  */
52
62
  fetchTreeData(): Promise<ITreeData[]>;
63
+ /**
64
+ * 获取 Poi 数据
65
+ * @returns
66
+ */
67
+ fetchPoiData(): Promise<IPoiData[]>;
53
68
  /**
54
69
  * 获取拓扑路径
55
70
  * @returns
@@ -70,25 +85,10 @@ declare class CpsSoonmanagerPlugin {
70
85
  * @returns
71
86
  */
72
87
  fetchModelVisionsData(): Promise<TModelVisionsMap>;
73
- /**
74
- * 加载单个树节点
75
- * @param node
76
- * @param options
77
- * @returns
78
- */
79
- private loadNode;
80
88
  /**
81
89
  * 根据 id 获取树节点
82
90
  */
83
- private getTreeNodeById;
84
- /**
85
- * 加载场景树中的对象 (深度优先遍历)
86
- */
87
- private loadObjects;
88
- /**
89
- * 加载场景树中的对象 (广度优先遍历)
90
- */
91
- private loadObjectsBFS;
91
+ getTreeNodeById(id: ITreeData['id'], treeData?: ITreeData[] | null): ITreeData | undefined;
92
92
  /**
93
93
  * 设置 path
94
94
  * @param path
@@ -134,6 +134,11 @@ declare class CpsSoonmanagerPlugin {
134
134
  * @param index
135
135
  */
136
136
  flyToObjectFromVisionsData(object: BaseObject3D, index?: number, options?: AnimationOptions): Promise<void>;
137
+ /**
138
+ * 执行流程
139
+ * @param id 流程 id
140
+ */
141
+ runFlowById(id: string): import("@soonflow/core").SoonFlowParse | undefined;
137
142
  }
138
143
  export * from './types';
139
144
  export * from './constants';