@soonspacejs/plugin-cps-soonmanager 2.6.32 → 2.6.34

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.
@@ -20,7 +20,12 @@ declare class WaterMark extends Object3D {
20
20
  _generateMark(str?: number[] | string): void;
21
21
  _generateMarkForString(str?: number[] | string): void;
22
22
  _generateMarkForImage(url?: string, width?: number, height?: number): void;
23
+ _calculateImageSize(canvasWidth: number, canvasHeight: number, imgWidth: number, imgHeight: number): {
24
+ renderWidth: number;
25
+ renderHeight: number;
26
+ };
23
27
  render(): void;
24
- renderToViewport(): void;
28
+ addToViewport(): void;
29
+ removeFromViewport(): void;
25
30
  }
26
31
  export { WaterMark, };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import SoonSpace from 'soonspacejs';
2
2
  import type { TopologyInfo } from 'soonspacejs/types/Library';
3
- import { IMetadata, ITreeData, ITopologyPath, ILoadSceneOptions, TPropertiesMap, TAnimationsMap, IPlayAnimationByIdOptions, TModelVisionsMap } from './types';
4
- import { License } from './License';
3
+ import { IMetadata, ITreeData, ITopologyPath, ILoadSceneOptions, TPropertiesMap, TAnimationsMap, IPlayAnimationByIdOptions, TModelVisionsMap, IPresetEffectsOptions, Options } from './types';
5
4
  declare class CpsSoonmanagerPlugin {
6
5
  #private;
7
6
  readonly ssp: SoonSpace;
@@ -32,8 +31,11 @@ declare class CpsSoonmanagerPlugin {
32
31
  * 模型视角
33
32
  */
34
33
  modelVisionsData: TModelVisionsMap | null;
35
- license: License;
36
- constructor(ssp: SoonSpace, key?: string);
34
+ constructor(ssp: SoonSpace, option?: Options);
35
+ /**
36
+ * 设置 key
37
+ * @param key
38
+ */
37
39
  setKey(key: string): void;
38
40
  private _resolvePath;
39
41
  private _fetchData;
@@ -41,6 +43,11 @@ declare class CpsSoonmanagerPlugin {
41
43
  * 获取场景元数据
42
44
  */
43
45
  fetchMetaData(): Promise<IMetadata>;
46
+ /**
47
+ * 获取场景树
48
+ * @returns
49
+ */
50
+ fetchTreeData(): Promise<ITreeData[]>;
44
51
  /**
45
52
  * 获取拓扑路径
46
53
  * @returns
@@ -74,10 +81,14 @@ declare class CpsSoonmanagerPlugin {
74
81
  * 同步场景树
75
82
  */
76
83
  loadScene(options?: ILoadSceneOptions): Promise<void>;
84
+ /**
85
+ * 预设效果
86
+ */
87
+ presetEffects(options?: IPresetEffectsOptions): Promise<void>;
77
88
  /**
78
89
  * 获取拓扑路径列表
79
90
  */
80
- getTopologies(): Promise<TopologyInfo[]>;
91
+ getTopologies(): Promise<ITopologyPath[]>;
81
92
  /**
82
93
  * 播放动画
83
94
  */