@soonspacejs/plugin-cps-soonmanager 2.6.18
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/README.md +5 -0
- package/dist/License/encryptInfo.d.ts +16 -0
- package/dist/License/index.d.ts +9 -0
- package/dist/License/types.d.ts +5 -0
- package/dist/WaterMark/index.d.ts +26 -0
- package/dist/constant.d.ts +32 -0
- package/dist/index.d.ts +87 -0
- package/dist/index.esm.js +3 -0
- package/dist/types.d.ts +157 -0
- package/package.json +20 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { Tween } from '@tweenjs/tween.js';
|
|
2
|
+
import { AnimationModeType, IVector3 } from 'soonspacejs/types/Interface';
|
|
3
|
+
/**
|
|
4
|
+
* 场景元数据
|
|
5
|
+
*/
|
|
6
|
+
export interface IMetadata {
|
|
7
|
+
platformVersion: number;
|
|
8
|
+
version: number;
|
|
9
|
+
name: string;
|
|
10
|
+
projectId: string;
|
|
11
|
+
sceneId: string;
|
|
12
|
+
cover: string | null;
|
|
13
|
+
flatModel: string;
|
|
14
|
+
treeModel: string;
|
|
15
|
+
resource: string;
|
|
16
|
+
exportTime: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 场景树
|
|
20
|
+
*/
|
|
21
|
+
export interface ITreeData {
|
|
22
|
+
id: string;
|
|
23
|
+
pid: string | null;
|
|
24
|
+
name: string;
|
|
25
|
+
renderType: 'GROUP' | '3D' | 'ROOM' | 'STUB';
|
|
26
|
+
matrix: number[];
|
|
27
|
+
path: string | null;
|
|
28
|
+
children: ITreeData[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* origin path
|
|
32
|
+
*/
|
|
33
|
+
export interface ITopologyPath {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
position: IVector3;
|
|
37
|
+
rotation: IVector3;
|
|
38
|
+
scale: IVector3;
|
|
39
|
+
nodes: ITopologyNode[];
|
|
40
|
+
type: 'network';
|
|
41
|
+
}
|
|
42
|
+
export interface ITopologyNode {
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
position: IVector3;
|
|
46
|
+
graphs: ITopologyNodeGraph[];
|
|
47
|
+
}
|
|
48
|
+
export interface ITopologyNodeGraph {
|
|
49
|
+
linkInfo: ITopologyEdge;
|
|
50
|
+
targetNodeId: string;
|
|
51
|
+
passable: PassableType;
|
|
52
|
+
length: number;
|
|
53
|
+
}
|
|
54
|
+
export interface ITopologyEdge {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
}
|
|
58
|
+
declare enum PassableType {
|
|
59
|
+
BIDIRECTION = 0,
|
|
60
|
+
POSITIVE = 1,
|
|
61
|
+
OPPOSITE = 2,
|
|
62
|
+
FORBID = 3
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 自定义属性
|
|
66
|
+
*/
|
|
67
|
+
export interface IProperties {
|
|
68
|
+
modelId: string;
|
|
69
|
+
group: string;
|
|
70
|
+
key: string;
|
|
71
|
+
value: string | null;
|
|
72
|
+
label: string | null;
|
|
73
|
+
}
|
|
74
|
+
export interface IKeyframe {
|
|
75
|
+
id: string;
|
|
76
|
+
uuid: string;
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
z: number;
|
|
80
|
+
scaleX: number;
|
|
81
|
+
scaleY: number;
|
|
82
|
+
scaleZ: number;
|
|
83
|
+
rotationX: number;
|
|
84
|
+
rotationY: number;
|
|
85
|
+
rotationZ: number;
|
|
86
|
+
easing: AnimationModeType;
|
|
87
|
+
mode: string;
|
|
88
|
+
delay: number;
|
|
89
|
+
duration: number;
|
|
90
|
+
repeat: number;
|
|
91
|
+
yoyo: boolean;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* 动画
|
|
95
|
+
*/
|
|
96
|
+
export interface IAnimations {
|
|
97
|
+
id: string;
|
|
98
|
+
uuid: string;
|
|
99
|
+
modelId: string;
|
|
100
|
+
name: string;
|
|
101
|
+
keyframes: IKeyframe[];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* 模型视角
|
|
105
|
+
*/
|
|
106
|
+
export interface IModelVisions {
|
|
107
|
+
id: string;
|
|
108
|
+
uuid: string;
|
|
109
|
+
nodeId: string;
|
|
110
|
+
name: string;
|
|
111
|
+
code?: any;
|
|
112
|
+
position: IVector3;
|
|
113
|
+
rotation: IVector3;
|
|
114
|
+
target: IVector3 | null;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* loadScene options
|
|
118
|
+
*/
|
|
119
|
+
export interface ILoadSceneOptions {
|
|
120
|
+
/**
|
|
121
|
+
* 同步自定义属性
|
|
122
|
+
*/
|
|
123
|
+
syncProperties?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* 同步模型视角数据
|
|
126
|
+
*/
|
|
127
|
+
syncModelVisions?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* 计算 bounds tree
|
|
130
|
+
*/
|
|
131
|
+
needsModelsBoundsTree?: boolean;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* properties map
|
|
135
|
+
*/
|
|
136
|
+
export type TPropertiesMap = Map<IProperties['modelId'], IProperties[]>;
|
|
137
|
+
export type TAnimationsTweenProps = Pick<IKeyframe, 'x' | 'y' | 'z' | 'rotationX' | 'rotationY' | 'rotationZ' | 'scaleX' | 'scaleY' | 'scaleZ'>;
|
|
138
|
+
/**
|
|
139
|
+
* playAnimationById options
|
|
140
|
+
*/
|
|
141
|
+
export interface IPlayAnimationByIdOptions {
|
|
142
|
+
onUpdate?: (source: TAnimationsTweenProps, tween: Tween<TAnimationsTweenProps>) => void;
|
|
143
|
+
onStart?: (tween: Tween<TAnimationsTweenProps>) => void;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* animation map
|
|
147
|
+
*/
|
|
148
|
+
export type TAnimationsMap = Map<IAnimations['modelId'], IAnimations[]>;
|
|
149
|
+
/**
|
|
150
|
+
* model visions map
|
|
151
|
+
*/
|
|
152
|
+
export type TModelVisionsMap = Map<IModelVisions['nodeId'], IModelVisions>;
|
|
153
|
+
export interface TLicense {
|
|
154
|
+
sign: string;
|
|
155
|
+
content: string;
|
|
156
|
+
}
|
|
157
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@soonspacejs/plugin-cps-soonmanager",
|
|
3
|
+
"pluginName": "CpsSoonmanagerPlugin",
|
|
4
|
+
"version": "2.6.18",
|
|
5
|
+
"description": "Sync cps soonmanager data plugin for SoonSpace.js",
|
|
6
|
+
"main": "dist/index.esm.js",
|
|
7
|
+
"module": "dist/index.esm.js",
|
|
8
|
+
"unpkg": "dist/index.esm.js",
|
|
9
|
+
"typings": "dist/index.d.ts",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"soonspacejs",
|
|
12
|
+
"cps-soonmanager"
|
|
13
|
+
],
|
|
14
|
+
"author": "xuek",
|
|
15
|
+
"license": "UNLICENSED",
|
|
16
|
+
"gitHead": "25d8a131ff317843ec7d3a855a675544a2f29d65",
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"soonspacejs": "2.6.18"
|
|
19
|
+
}
|
|
20
|
+
}
|