@soonspacejs/plugin-cps-soonmanager 2.8.16 → 2.9.1

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,5 +1,5 @@
1
- import SoonSpace, { TopologyNodeInfo } from 'soonspacejs';
2
- import type { TopologyInfo } from 'soonspacejs/types/Library';
1
+ import SoonSpace, { AnimationOptions, TopologyNodeInfo } from 'soonspacejs';
2
+ import type { BaseObject3D, 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 {
5
5
  #private;
@@ -69,6 +69,9 @@ declare class CpsSoonmanagerPlugin {
69
69
  */
70
70
  fetchModelVisionsData(): Promise<TModelVisionsMap>;
71
71
  private loadNode;
72
+ /**
73
+ * @todo 待优化
74
+ */
72
75
  getTargetIdTreeData(id: ITreeData['id'], treeData?: ITreeData[]): ITreeData | undefined;
73
76
  /**
74
77
  * 加载场景树中的对象 (深度优先遍历)
@@ -103,8 +106,24 @@ declare class CpsSoonmanagerPlugin {
103
106
  sortTopologyNodes(topologyInfo: TopologyInfo, startNodeId?: TopologyNodeInfo['id']): TopologyInfo | undefined;
104
107
  /**
105
108
  * 播放动画
109
+ * @deprecated
106
110
  */
107
111
  playAnimationById(id: string, animationIndex?: number, options?: IPlayAnimationByIdOptions): Promise<void>;
112
+ /**
113
+ * 播放动画
114
+ */
115
+ playObjectAnimation(object: BaseObject3D, animationIndex?: number, options?: IPlayAnimationByIdOptions): Promise<void>;
116
+ /**
117
+ * 飞向场景视角
118
+ * @param index
119
+ */
120
+ flyToSceneFromVisionsData(index?: number, options?: AnimationOptions): Promise<void>;
121
+ /**
122
+ * 飞向对象视角
123
+ * @param object
124
+ * @param index
125
+ */
126
+ flyToObjectFromVisionsData(object: BaseObject3D, index?: number, options?: AnimationOptions): Promise<void>;
108
127
  }
109
128
  export * from './types';
110
129
  export * from './constants';