@soonspacejs/plugin-cps-soonmanager 2.8.10 → 2.8.12

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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import SoonSpace from 'soonspacejs';
1
+ import SoonSpace, { TopologyNodeInfo } from 'soonspacejs';
2
2
  import type { TopologyInfo } from 'soonspacejs/types/Library';
3
3
  import { IMetadata, ITreeData, ITopologyPath, ILoadSceneOptions, TPropertiesMap, TAnimationsMap, IPlayAnimationByIdOptions, TModelVisionsMap, IPresetEffectsOptions, Options } from './types';
4
4
  declare class CpsSoonmanagerPlugin {
@@ -68,10 +68,15 @@ declare class CpsSoonmanagerPlugin {
68
68
  * @returns
69
69
  */
70
70
  fetchModelVisionsData(): Promise<TModelVisionsMap>;
71
+ private loadNode;
71
72
  /**
72
- * 加载场景树中的对象
73
+ * 加载场景树中的对象 (深度优先遍历)
73
74
  */
74
75
  private loadObjects;
76
+ /**
77
+ * 加载场景树中的对象 (广度优先遍历)
78
+ */
79
+ private loadObjectsBFS;
75
80
  /**
76
81
  * 设置 path
77
82
  * @param path
@@ -88,12 +93,16 @@ declare class CpsSoonmanagerPlugin {
88
93
  /**
89
94
  * 获取拓扑路径列表
90
95
  */
91
- getTopologies(): Promise<ITopologyPath[]>;
96
+ getTopologies(): Promise<TopologyInfo[]>;
97
+ /**
98
+ * 对 nodes 排序(只适用于线路结构的拓扑路径)
99
+ */
100
+ sortTopologyNodes(topologyInfo: TopologyInfo, startNodeId?: TopologyNodeInfo['id']): TopologyInfo | undefined;
92
101
  /**
93
102
  * 播放动画
94
103
  */
95
104
  playAnimationById(id: string, animationIndex?: number, options?: IPlayAnimationByIdOptions): Promise<void>;
96
105
  }
97
106
  export * from './types';
98
- export * from './constant';
107
+ export * from './constants';
99
108
  export default CpsSoonmanagerPlugin;