@soonspacejs/plugin-cps-soonmanager 2.11.67 → 2.11.69
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 +3 -3
- package/dist/index.esm.js +4 -4
- package/dist/types.d.ts +4 -5
- package/dist/utils.d.ts +3 -8
- package/package.json +7 -6
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;
|
|
@@ -182,7 +182,7 @@ export interface IKeyframe {
|
|
|
182
182
|
*/
|
|
183
183
|
export interface IAnimations {
|
|
184
184
|
id: string;
|
|
185
|
-
|
|
185
|
+
sid: string;
|
|
186
186
|
modelId: string;
|
|
187
187
|
name: string;
|
|
188
188
|
keyframes: IKeyframe[];
|
|
@@ -305,14 +305,13 @@ export interface ILoadSceneOptions extends ConstructorOptions {
|
|
|
305
305
|
* properties map
|
|
306
306
|
*/
|
|
307
307
|
export type TPropertiesMap = Map<IProperties['modelId'], IProperties[]>;
|
|
308
|
-
export type TAnimationsTweenProps = Pick<IKeyframe, 'x' | 'y' | 'z' | 'rotationX' | 'rotationY' | 'rotationZ' | 'scaleX' | 'scaleY' | 'scaleZ'>;
|
|
309
308
|
/**
|
|
310
309
|
* playAnimationById options
|
|
311
310
|
*/
|
|
312
311
|
export interface IPlayAnimationByIdOptions {
|
|
313
312
|
autoStopPrevious?: boolean;
|
|
314
|
-
onUpdate?: (source:
|
|
315
|
-
onStart?: (tween:
|
|
313
|
+
onUpdate?: (source: TTweenSource, tween: TTweenType) => void;
|
|
314
|
+
onStart?: (tween: TTweenType) => void;
|
|
316
315
|
}
|
|
317
316
|
/**
|
|
318
317
|
* animation map
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import SoonSpace from 'soonspacejs';
|
|
2
|
-
import {
|
|
2
|
+
import { TAnimationFrame } from 'umanager-animation-parser';
|
|
3
|
+
import { BaseTreeNode, IKeyframe, ITreeData } from './types';
|
|
3
4
|
import CpsSoonmanagerPlugin from '.';
|
|
4
5
|
/**
|
|
5
6
|
* 解码
|
|
@@ -7,13 +8,6 @@ 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>>;
|
|
18
12
|
export declare function isSpace(renderType: ITreeData['renderType']): boolean;
|
|
19
13
|
/**
|
|
@@ -25,3 +19,4 @@ export declare function isSpace(renderType: ITreeData['renderType']): boolean;
|
|
|
25
19
|
export declare function createSpace(ssp: SoonSpace, node: ITreeData, objectId: string): import("../../../soonspacejs/src/Library/Canvas3D").Canvas3D;
|
|
26
20
|
export declare function createWaterSurface(cpsPlugin: CpsSoonmanagerPlugin, node: ITreeData, objectId: string): import("../../../soonspacejs/src/Library/PluginObject").PluginObject | null;
|
|
27
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.
|
|
4
|
+
"version": "2.11.69",
|
|
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": "
|
|
16
|
+
"gitHead": "b7e6e7d5ff9694689741a2c42db1f800da5cca3a",
|
|
17
17
|
"dependentPlugins": [
|
|
18
18
|
"plugin-poi-renderer",
|
|
19
19
|
"plugin-effect"
|
|
20
20
|
],
|
|
21
|
-
"
|
|
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.
|
|
32
|
-
"@soonspacejs/plugin-poi-renderer": "2.11.
|
|
33
|
-
"soonspacejs": "2.11.
|
|
31
|
+
"@soonspacejs/plugin-effect": "2.11.69",
|
|
32
|
+
"@soonspacejs/plugin-poi-renderer": "2.11.69",
|
|
33
|
+
"soonspacejs": "2.11.69",
|
|
34
|
+
"umanager-animation-parser": "^0.0.6"
|
|
34
35
|
}
|
|
35
36
|
}
|