@soonspacejs/plugin-cps-soonmanager 2.11.66 → 2.11.68

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/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Tween } from 'three/examples/jsm/libs/tween.module.js';
2
1
  import { AnimationModeType, BaseObjectInfo, IVector3, PoiNodeType } from 'soonspacejs';
2
+ import { TTweenSource, TTweenType } from 'umanager-animation-parser';
3
3
  export type BaseTreeNode<T> = T & {
4
4
  id: string;
5
5
  sid: string;
@@ -48,11 +48,21 @@ export interface ITreeData {
48
48
  [key: string]: any;
49
49
  };
50
50
  }
51
+ export type IFlatData = Pick<ITreeData, 'id' | 'pid' | 'sid' | 'name' | 'renderType' | 'deviceCode' | 'familyId'>;
51
52
  export declare enum PoiContentTypeEnum {
52
53
  PANEL = "PANEL",
53
54
  VIDEO = "VIDEO",
54
55
  VIDEO_STREAM = "VIDEO_STREAM"
55
56
  }
57
+ export interface IProgress {
58
+ loaded: number;
59
+ total: number;
60
+ }
61
+ export interface IProgressEventMap {
62
+ progressing: {
63
+ progress: IProgress;
64
+ };
65
+ }
56
66
  export interface PoiMedia {
57
67
  assetId?: string | null;
58
68
  url?: string;
@@ -172,7 +182,7 @@ export interface IKeyframe {
172
182
  */
173
183
  export interface IAnimations {
174
184
  id: string;
175
- uuid: string;
185
+ sid: string;
176
186
  modelId: string;
177
187
  name: string;
178
188
  keyframes: IKeyframe[];
@@ -295,14 +305,13 @@ export interface ILoadSceneOptions extends ConstructorOptions {
295
305
  * properties map
296
306
  */
297
307
  export type TPropertiesMap = Map<IProperties['modelId'], IProperties[]>;
298
- export type TAnimationsTweenProps = Pick<IKeyframe, 'x' | 'y' | 'z' | 'rotationX' | 'rotationY' | 'rotationZ' | 'scaleX' | 'scaleY' | 'scaleZ'>;
299
308
  /**
300
309
  * playAnimationById options
301
310
  */
302
311
  export interface IPlayAnimationByIdOptions {
303
312
  autoStopPrevious?: boolean;
304
- onUpdate?: (source: TAnimationsTweenProps, tween: Tween<TAnimationsTweenProps>) => void;
305
- onStart?: (tween: Tween<TAnimationsTweenProps>) => void;
313
+ onUpdate?: (source: TTweenSource, tween: TTweenType) => void;
314
+ onStart?: (tween: TTweenType) => void;
306
315
  }
307
316
  /**
308
317
  * animation map
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import SoonSpace from 'soonspacejs';
2
- import { BaseTreeNode, ITreeData } from './types';
2
+ import { TAnimationFrame } from 'umanager-animation-parser';
3
+ import { BaseTreeNode, IKeyframe, ITreeData } from './types';
3
4
  import CpsSoonmanagerPlugin from '.';
4
5
  /**
5
6
  * 解码
@@ -7,14 +8,8 @@ import CpsSoonmanagerPlugin from '.';
7
8
  * @returns
8
9
  */
9
10
  export declare function decodeString(encodedStr: string): string;
10
- /**
11
- * 分组
12
- * @param list
13
- * @param key
14
- * @returns Map
15
- */
16
- export declare function groupBy<T extends Record<string, any>, V>(list: T[], key: keyof T): Map<V, T[]>;
17
11
  export declare const mapTreeNodeByKey: <T, K extends keyof T | "id" | "sid" | "children", V>(tree: BaseTreeNode<T>[], key: K, map?: Map<V, BaseTreeNode<T>>) => Map<V, BaseTreeNode<T>>;
12
+ export declare function isSpace(renderType: ITreeData['renderType']): boolean;
18
13
  /**
19
14
  * 创建空间
20
15
  * @param ssp
@@ -24,3 +19,4 @@ export declare const mapTreeNodeByKey: <T, K extends keyof T | "id" | "sid" | "c
24
19
  export declare function createSpace(ssp: SoonSpace, node: ITreeData, objectId: string): import("../../../soonspacejs/src/Library/Canvas3D").Canvas3D;
25
20
  export declare function createWaterSurface(cpsPlugin: CpsSoonmanagerPlugin, node: ITreeData, objectId: string): import("../../../soonspacejs/src/Library/PluginObject").PluginObject | null;
26
21
  export declare function createDecal(ssp: SoonSpace, node: ITreeData, objectId: string): Promise<import("../../../soonspacejs/src/Library/Decal").Decal | null>;
22
+ export declare function transformKeyframes(keyframes: IKeyframe[]): TAnimationFrame[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@soonspacejs/plugin-cps-soonmanager",
3
3
  "pluginName": "CpsSoonmanagerPlugin",
4
- "version": "2.11.66",
4
+ "version": "2.11.68",
5
5
  "description": "Sync cps soonmanager data plugin for SoonSpace.js",
6
6
  "main": "dist/index.esm.js",
7
7
  "module": "dist/index.esm.js",
@@ -13,12 +13,12 @@
13
13
  ],
14
14
  "author": "xunwei",
15
15
  "license": "UNLICENSED",
16
- "gitHead": "a0f9ffa8b324e2d58954445c865e1e6e783378d5",
16
+ "gitHead": "2d0ffb4b53484c1192762c995b8f926615d81372",
17
17
  "dependentPlugins": [
18
18
  "plugin-poi-renderer",
19
19
  "plugin-effect"
20
20
  ],
21
- "dependencies": {
21
+ "devDependencies": {
22
22
  "@soonflow/core": "0.2.13",
23
23
  "@soonflow/plugin-soonmanager2-node": "0.2.13",
24
24
  "@soonflow/plugin-soonmanager2-sync": "0.2.13",
@@ -28,8 +28,9 @@
28
28
  "socket.io-client": "^4.7.2"
29
29
  },
30
30
  "peerDependencies": {
31
- "@soonspacejs/plugin-effect": "2.11.66",
32
- "@soonspacejs/plugin-poi-renderer": "2.11.66",
33
- "soonspacejs": "2.11.66"
31
+ "@soonspacejs/plugin-effect": "2.11.68",
32
+ "@soonspacejs/plugin-poi-renderer": "2.11.68",
33
+ "soonspacejs": "2.11.68",
34
+ "umanager-animation-parser": "^0.0.6"
34
35
  }
35
36
  }