@soonspacejs/plugin-cps-soonmanager 2.13.6 → 2.13.7
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 -5
- package/dist/index.esm.js +85812 -6
- package/dist/index.esm.js.map +1 -0
- package/env.d.ts +3 -0
- package/package.json +7 -6
- package/dist/License/decrypt-v1.d.ts +0 -2
- package/dist/License/decrypt-v2.d.ts +0 -3
- package/dist/License/encryptInfo.d.ts +0 -16
- package/dist/License/types.d.ts +0 -8
- package/dist/WaterMark/index.d.ts +0 -31
- package/dist/batch-update-poi/index.d.ts +0 -15
- package/dist/batch-update-poi/types.d.ts +0 -16
- package/dist/batch-update-poi/utils.d.ts +0 -18
- package/dist/constants.d.ts +0 -48
- package/dist/data-source/index.d.ts +0 -15
- package/dist/data-source/request-types.d.ts +0 -193
- package/dist/data-source/types.d.ts +0 -37
- package/dist/data-source/utils/http-request.d.ts +0 -72
- package/dist/data-source/utils/http.d.ts +0 -4
- package/dist/data-source/utils/index.d.ts +0 -4
- package/dist/data-source/utils/mqtt.d.ts +0 -4
- package/dist/data-source/utils/socket.d.ts +0 -4
- package/dist/data-source/utils/utils.d.ts +0 -18
- package/dist/index.d.ts +0 -255
- package/dist/types.d.ts +0 -338
- package/dist/update-poi/index.d.ts +0 -11
- package/dist/update-poi/type.d.ts +0 -7
- package/dist/utils.d.ts +0 -22
package/dist/index.d.ts
DELETED
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import SoonSpace, { TopologyNodeInfo } from 'soonspacejs';
|
|
2
|
-
import type { BaseObject3D, Group, TopologyInfo } from 'soonspacejs';
|
|
3
|
-
import { PoiNodeData } from '@soonspacejs/plugin-poi-renderer';
|
|
4
|
-
import EffectPlugin from '@soonspacejs/plugin-effect';
|
|
5
|
-
import AtmospherePlugin from '@soonspacejs/plugin-atmosphere';
|
|
6
|
-
import SoonFlow from '@soonflow/core';
|
|
7
|
-
import { AnimationPlayer } from 'umanager-animation-parser';
|
|
8
|
-
import { EventDispatcher } from 'three';
|
|
9
|
-
import { IMetadata, ITreeData, IInnerTreeData, IPoiData, ITopologyPath, ILoadSceneOptions, TPropertiesMap, TAnimationsMap, IPlayAnimationByIdOptions, TModelVisionsMap, IPresetEffectsOptions, TSpacesMap, ConstructorOptions, ISpaces, IFlatData, IProgress, IProgressEventMap } from './types';
|
|
10
|
-
declare class CpsSoonmanagerPlugin extends EventDispatcher<IProgressEventMap> {
|
|
11
|
-
#private;
|
|
12
|
-
readonly ssp: SoonSpace;
|
|
13
|
-
get path(): string;
|
|
14
|
-
set path(val: string);
|
|
15
|
-
progress: IProgress;
|
|
16
|
-
/**
|
|
17
|
-
* 场景 group 包裹
|
|
18
|
-
*/
|
|
19
|
-
sceneGroup: Group | null;
|
|
20
|
-
/**
|
|
21
|
-
* 场景元数据
|
|
22
|
-
*/
|
|
23
|
-
metaData: IMetadata | null;
|
|
24
|
-
/**
|
|
25
|
-
* 模型树
|
|
26
|
-
*/
|
|
27
|
-
treeData: ITreeData[] | null;
|
|
28
|
-
/**
|
|
29
|
-
* 扁平化模型树
|
|
30
|
-
*/
|
|
31
|
-
flatData: IFlatData[] | null;
|
|
32
|
-
faltDataMap: Map<string, IFlatData[]> | null;
|
|
33
|
-
/**
|
|
34
|
-
* poi 数据
|
|
35
|
-
*/
|
|
36
|
-
poiData: IPoiData[] | null;
|
|
37
|
-
/**
|
|
38
|
-
* 数据源
|
|
39
|
-
*/
|
|
40
|
-
dataSourceData: any | null;
|
|
41
|
-
/**
|
|
42
|
-
* 拓扑路径
|
|
43
|
-
*/
|
|
44
|
-
topologyData: TopologyInfo[] | null;
|
|
45
|
-
/**
|
|
46
|
-
* 自定义属性
|
|
47
|
-
*/
|
|
48
|
-
propertiesData: TPropertiesMap | null;
|
|
49
|
-
objectsAnimations: Map<string, Set<AnimationPlayer>>;
|
|
50
|
-
/**
|
|
51
|
-
* 动画
|
|
52
|
-
*/
|
|
53
|
-
animationsData: TAnimationsMap | null;
|
|
54
|
-
/**
|
|
55
|
-
* 模型视角
|
|
56
|
-
*/
|
|
57
|
-
modelVisionsData: TModelVisionsMap | null;
|
|
58
|
-
/**
|
|
59
|
-
* 空间数据
|
|
60
|
-
*/
|
|
61
|
-
spacesData: TSpacesMap | null;
|
|
62
|
-
/**
|
|
63
|
-
* effect 插件
|
|
64
|
-
*/
|
|
65
|
-
effectPlugin: EffectPlugin;
|
|
66
|
-
/**
|
|
67
|
-
* atomsphere 插件
|
|
68
|
-
*/
|
|
69
|
-
atmospherePlugin: AtmospherePlugin;
|
|
70
|
-
/**
|
|
71
|
-
* 流程引擎实咧
|
|
72
|
-
*/
|
|
73
|
-
soonflow: SoonFlow;
|
|
74
|
-
/**
|
|
75
|
-
* 流程数据
|
|
76
|
-
*/
|
|
77
|
-
flowData: any[] | null;
|
|
78
|
-
constructor(ssp: SoonSpace, option?: ConstructorOptions);
|
|
79
|
-
/**
|
|
80
|
-
* 设置 key
|
|
81
|
-
* @param key
|
|
82
|
-
*/
|
|
83
|
-
setKey(key: string): void;
|
|
84
|
-
/**
|
|
85
|
-
* 获取场景元数据
|
|
86
|
-
*/
|
|
87
|
-
fetchMetaData(): Promise<IMetadata>;
|
|
88
|
-
/**
|
|
89
|
-
* 获取场景树(旧版资源包使用)
|
|
90
|
-
* @returns
|
|
91
|
-
*/
|
|
92
|
-
fetchTreeData(): Promise<IInnerTreeData[]>;
|
|
93
|
-
fetchFlatData(): Promise<IFlatData[]>;
|
|
94
|
-
/**
|
|
95
|
-
* 获取 Poi 数据
|
|
96
|
-
* @returns
|
|
97
|
-
*/
|
|
98
|
-
fetchPoiData(): Promise<IPoiData[]>;
|
|
99
|
-
/**
|
|
100
|
-
* 获取数据源数据
|
|
101
|
-
* @returns
|
|
102
|
-
*/
|
|
103
|
-
fetchDataSourceData(): Promise<any>;
|
|
104
|
-
/**
|
|
105
|
-
* 获取拓扑路径
|
|
106
|
-
* @returns
|
|
107
|
-
*/
|
|
108
|
-
fetchTopologyData(): Promise<ITopologyPath[]>;
|
|
109
|
-
/**
|
|
110
|
-
* 获取自定义属性
|
|
111
|
-
* @returns
|
|
112
|
-
*/
|
|
113
|
-
fetchPropertiesData(): Promise<TPropertiesMap>;
|
|
114
|
-
/**
|
|
115
|
-
* 获取动画
|
|
116
|
-
* @returns
|
|
117
|
-
*/
|
|
118
|
-
fetchAnimationsData(): Promise<TAnimationsMap>;
|
|
119
|
-
/**
|
|
120
|
-
* 获取模型视角
|
|
121
|
-
* @returns
|
|
122
|
-
*/
|
|
123
|
-
fetchModelVisionsData(): Promise<TModelVisionsMap>;
|
|
124
|
-
/**
|
|
125
|
-
* 获取空间数据
|
|
126
|
-
* @returns
|
|
127
|
-
*/
|
|
128
|
-
fetchSpacesData(): Promise<Map<string, import("./types").BaseTreeNode<ISpaces>>>;
|
|
129
|
-
/**
|
|
130
|
-
* 格式化 Poi 数据完成 Poi Renderer 插件使用
|
|
131
|
-
*/
|
|
132
|
-
formatPoiData: (poiData: IPoiData) => PoiNodeData;
|
|
133
|
-
/**
|
|
134
|
-
* 初始化 Poi
|
|
135
|
-
*/
|
|
136
|
-
loadPoi(refreshByDataSource?: boolean, refreshByUserData?: boolean): Promise<void>;
|
|
137
|
-
/**
|
|
138
|
-
* 通过数据源刷新 poi
|
|
139
|
-
*/
|
|
140
|
-
refreshPoiByDataSource(): Promise<void>;
|
|
141
|
-
refreshByUserData(): Promise<void>;
|
|
142
|
-
runWithCode<T>(fn: (args: any) => T): Promise<T>;
|
|
143
|
-
/**
|
|
144
|
-
* 根据 id 获取树节点
|
|
145
|
-
*/
|
|
146
|
-
getTreeNodeById(id: ITreeData['id'], treeData: ITreeData[] | null, options: ILoadSceneOptions): ITreeData | undefined;
|
|
147
|
-
/**
|
|
148
|
-
* 设置 path
|
|
149
|
-
* @param path
|
|
150
|
-
*/
|
|
151
|
-
setPath(path: string): void;
|
|
152
|
-
/**
|
|
153
|
-
* 加载整个场景
|
|
154
|
-
*/
|
|
155
|
-
loadScene(options?: ILoadSceneOptions): Promise<undefined>;
|
|
156
|
-
/**
|
|
157
|
-
* 预设效果
|
|
158
|
-
*/
|
|
159
|
-
presetEffects(options?: IPresetEffectsOptions): Promise<void>;
|
|
160
|
-
/**
|
|
161
|
-
* 获取拓扑路径列表
|
|
162
|
-
*/
|
|
163
|
-
getTopologies(): Promise<TopologyInfo[]>;
|
|
164
|
-
/**
|
|
165
|
-
* 对 nodes 排序(只适用于线路结构的拓扑路径)
|
|
166
|
-
*/
|
|
167
|
-
sortTopologyNodes(topologyInfo: TopologyInfo, startNodeId?: TopologyNodeInfo['id']): TopologyInfo | undefined;
|
|
168
|
-
/**
|
|
169
|
-
* 播放动画
|
|
170
|
-
* @deprecated
|
|
171
|
-
*/
|
|
172
|
-
playAnimationById(id: string, animationIndex?: number, options?: IPlayAnimationByIdOptions): Promise<boolean>;
|
|
173
|
-
/**
|
|
174
|
-
* 播放动画
|
|
175
|
-
*/
|
|
176
|
-
playObjectAnimation(object: BaseObject3D, animationIndex?: number, { autoStopPrevious, onStart, onUpdate, }?: IPlayAnimationByIdOptions): Promise<boolean>;
|
|
177
|
-
/**
|
|
178
|
-
* 停止对象动画
|
|
179
|
-
*/
|
|
180
|
-
stopObjectAnimation(object: BaseObject3D): Promise<boolean>;
|
|
181
|
-
/**
|
|
182
|
-
* 飞向场景视角
|
|
183
|
-
* @param index
|
|
184
|
-
*/
|
|
185
|
-
flyToSceneFromVisionsData(index?: number): Promise<boolean>;
|
|
186
|
-
/**
|
|
187
|
-
* 飞向场景主视角
|
|
188
|
-
* @param fallback 是否使用默认视角
|
|
189
|
-
*/
|
|
190
|
-
flyToMainSceneFromVisionsData(fallback?: boolean): Promise<boolean>;
|
|
191
|
-
/**
|
|
192
|
-
* 飞向对象视角
|
|
193
|
-
* @param object
|
|
194
|
-
* @param index
|
|
195
|
-
*/
|
|
196
|
-
flyToObjectFromVisionsData(object: BaseObject3D, index?: number): Promise<boolean>;
|
|
197
|
-
/**
|
|
198
|
-
* 飞向对象默认视角
|
|
199
|
-
* @param fallback 是否使用默认视角
|
|
200
|
-
*/
|
|
201
|
-
flyToMainObjectFromVisionsData(object: BaseObject3D, fallback?: boolean): Promise<boolean>;
|
|
202
|
-
/**
|
|
203
|
-
* 加载流程数据
|
|
204
|
-
*/
|
|
205
|
-
loadFlowData(): Promise<{
|
|
206
|
-
nodes: {
|
|
207
|
-
inputs: import("@soonflow/plugin-soonmanager2-sync/dist/interface").Handle[];
|
|
208
|
-
outputs: import("@soonflow/plugin-soonmanager2-sync/dist/interface").Handle[];
|
|
209
|
-
isStartNode: boolean;
|
|
210
|
-
id: string;
|
|
211
|
-
name: string;
|
|
212
|
-
flowId: string;
|
|
213
|
-
type: import("@soonflow/plugin-soonmanager2-sync/dist/interface").FlowNodeTypesEnum;
|
|
214
|
-
config: string;
|
|
215
|
-
posX: number;
|
|
216
|
-
posY: number;
|
|
217
|
-
sortNum: number;
|
|
218
|
-
enable: boolean;
|
|
219
|
-
handlerList: import("@soonflow/plugin-soonmanager2-sync/dist/interface").Handle[];
|
|
220
|
-
}[];
|
|
221
|
-
edges: {
|
|
222
|
-
sourceNodeHandleId: string;
|
|
223
|
-
targetNodeHandleId: string;
|
|
224
|
-
id: string;
|
|
225
|
-
name: string;
|
|
226
|
-
type: string;
|
|
227
|
-
sourceHandlerId: string;
|
|
228
|
-
sourceNodeId: string;
|
|
229
|
-
targetHandlerId: string;
|
|
230
|
-
targetNodeId: string;
|
|
231
|
-
enable: boolean;
|
|
232
|
-
}[];
|
|
233
|
-
id: string;
|
|
234
|
-
name: string;
|
|
235
|
-
applyType: "AUTO" | "MANUAL";
|
|
236
|
-
pid: string | null;
|
|
237
|
-
nodeData: {
|
|
238
|
-
nodeList: import("@soonflow/plugin-soonmanager2-sync/dist/interface").Node[];
|
|
239
|
-
lineList: import("@soonflow/plugin-soonmanager2-sync/dist/interface").Edge[];
|
|
240
|
-
};
|
|
241
|
-
subFlows: import("@soonflow/plugin-soonmanager2-sync/dist/interface").FlowSyncData[];
|
|
242
|
-
}[]>;
|
|
243
|
-
/**
|
|
244
|
-
* 执行流程
|
|
245
|
-
* @param id 流程 id
|
|
246
|
-
*/
|
|
247
|
-
runFlowById(id: string): Promise<void>;
|
|
248
|
-
/**
|
|
249
|
-
* 获取空间下辖设备
|
|
250
|
-
*/
|
|
251
|
-
getSpaceAssets<T extends BaseObject3D = BaseObject3D>(space: BaseObject3D): Promise<T[]>;
|
|
252
|
-
}
|
|
253
|
-
export * from './types';
|
|
254
|
-
export * from './constants';
|
|
255
|
-
export default CpsSoonmanagerPlugin;
|
package/dist/types.d.ts
DELETED
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
import { AnimationModeType, BaseObjectInfo, IVector3, PoiNodeType } from 'soonspacejs';
|
|
2
|
-
import { TTweenSource, TTweenType } from 'umanager-animation-parser';
|
|
3
|
-
export type BaseTreeNode<T> = T & {
|
|
4
|
-
id: string;
|
|
5
|
-
sid: string;
|
|
6
|
-
children: BaseTreeNode<T>[] | null;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* 场景元数据
|
|
10
|
-
*/
|
|
11
|
-
export interface IMetadata {
|
|
12
|
-
platformVersion: number;
|
|
13
|
-
version: number;
|
|
14
|
-
name: string;
|
|
15
|
-
projectId: string;
|
|
16
|
-
sceneId: string;
|
|
17
|
-
cover: string | null;
|
|
18
|
-
flatModel: string;
|
|
19
|
-
treeModel: string;
|
|
20
|
-
resource: string;
|
|
21
|
-
exportTime: number;
|
|
22
|
-
environment?: string;
|
|
23
|
-
previewSettings?: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* 场景树
|
|
27
|
-
*/
|
|
28
|
-
export interface ITreeData {
|
|
29
|
-
id: string;
|
|
30
|
-
pid: string | null;
|
|
31
|
-
sid: string;
|
|
32
|
-
name: string;
|
|
33
|
-
renderType: 'GROUP' | '3D' | 'STUB' | 'POLYGON' | 'CIRCLE' | 'WATER_SURFACE' | 'DECAL' | 'AREA' | 'FLOOR' | 'ROOM';
|
|
34
|
-
deviceCode: string | null;
|
|
35
|
-
matrix: number[];
|
|
36
|
-
familyId: string | null;
|
|
37
|
-
children: ITreeData[];
|
|
38
|
-
visible: boolean;
|
|
39
|
-
shape?: {
|
|
40
|
-
height?: number;
|
|
41
|
-
radius?: number;
|
|
42
|
-
depth?: number;
|
|
43
|
-
points?: IVector3[];
|
|
44
|
-
};
|
|
45
|
-
boundingBox?: number[];
|
|
46
|
-
extra?: {
|
|
47
|
-
[key: string]: any;
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
export interface IInnerTreeData extends ITreeData {
|
|
51
|
-
path: string | null;
|
|
52
|
-
children: IInnerTreeData[];
|
|
53
|
-
}
|
|
54
|
-
export type IFlatData = Pick<ITreeData, 'id' | 'pid' | 'sid' | 'name' | 'renderType' | 'deviceCode' | 'familyId'>;
|
|
55
|
-
export declare enum PoiContentTypeEnum {
|
|
56
|
-
PANEL = "PANEL",
|
|
57
|
-
VIDEO = "VIDEO",
|
|
58
|
-
VIDEO_STREAM = "VIDEO_STREAM"
|
|
59
|
-
}
|
|
60
|
-
export interface IProgress {
|
|
61
|
-
loaded: number;
|
|
62
|
-
total: number;
|
|
63
|
-
}
|
|
64
|
-
export interface IProgressEventMap {
|
|
65
|
-
progressing: {
|
|
66
|
-
progress: IProgress;
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
export interface PoiMedia {
|
|
70
|
-
assetId?: string | null;
|
|
71
|
-
url?: string;
|
|
72
|
-
isLoop?: boolean;
|
|
73
|
-
location?: string | null;
|
|
74
|
-
protocol?: string;
|
|
75
|
-
fileId?: string | null;
|
|
76
|
-
fileSourceType?: string;
|
|
77
|
-
}
|
|
78
|
-
export interface PoiContentData {
|
|
79
|
-
[group: string]: {
|
|
80
|
-
[key: string]: {
|
|
81
|
-
value: string;
|
|
82
|
-
index: number;
|
|
83
|
-
label: string;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
export interface PoiContent {
|
|
88
|
-
ds_user: PoiContentData;
|
|
89
|
-
ds_system: PoiContentData;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Poi
|
|
93
|
-
*/
|
|
94
|
-
export interface IPoiData {
|
|
95
|
-
projectId: string;
|
|
96
|
-
sceneId: string;
|
|
97
|
-
nodeId: string;
|
|
98
|
-
poiId: string;
|
|
99
|
-
name: string;
|
|
100
|
-
width: number;
|
|
101
|
-
height: number;
|
|
102
|
-
x: number;
|
|
103
|
-
y: number;
|
|
104
|
-
z: number;
|
|
105
|
-
rotationX: number;
|
|
106
|
-
rotationY: number;
|
|
107
|
-
rotationZ: number;
|
|
108
|
-
scale: number;
|
|
109
|
-
dimensional: PoiNodeType;
|
|
110
|
-
content: string;
|
|
111
|
-
contentData?: PoiContent;
|
|
112
|
-
media: PoiMedia | null;
|
|
113
|
-
contentType: PoiContentTypeEnum;
|
|
114
|
-
display: boolean;
|
|
115
|
-
style: string;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* origin path
|
|
119
|
-
*/
|
|
120
|
-
export interface ITopologyPath {
|
|
121
|
-
id: string;
|
|
122
|
-
name: string;
|
|
123
|
-
position: IVector3;
|
|
124
|
-
rotation: IVector3;
|
|
125
|
-
scale: IVector3;
|
|
126
|
-
nodes: ITopologyNode[];
|
|
127
|
-
type: 'network';
|
|
128
|
-
imgUrl?: string;
|
|
129
|
-
animation?: {
|
|
130
|
-
duration: 0;
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
export interface ITopologyNode {
|
|
134
|
-
id: string;
|
|
135
|
-
name: string;
|
|
136
|
-
position: IVector3;
|
|
137
|
-
graphs: ITopologyNodeGraph[];
|
|
138
|
-
}
|
|
139
|
-
export interface ITopologyNodeGraph {
|
|
140
|
-
linkInfo: ITopologyEdge;
|
|
141
|
-
targetNodeId: string;
|
|
142
|
-
passable: PassableType;
|
|
143
|
-
}
|
|
144
|
-
export interface ITopologyEdge {
|
|
145
|
-
id: string;
|
|
146
|
-
name: string;
|
|
147
|
-
}
|
|
148
|
-
declare enum PassableType {
|
|
149
|
-
BIDIRECTION = 0,
|
|
150
|
-
POSITIVE = 1,
|
|
151
|
-
OPPOSITE = 2,
|
|
152
|
-
FORBID = 3
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* 自定义属性
|
|
156
|
-
*/
|
|
157
|
-
export interface IProperties {
|
|
158
|
-
modelId: string;
|
|
159
|
-
group: string;
|
|
160
|
-
key: string;
|
|
161
|
-
value: string | null;
|
|
162
|
-
label: string | null;
|
|
163
|
-
}
|
|
164
|
-
export interface IKeyframe {
|
|
165
|
-
id: string;
|
|
166
|
-
uuid: string;
|
|
167
|
-
x: number;
|
|
168
|
-
y: number;
|
|
169
|
-
z: number;
|
|
170
|
-
scaleX: number;
|
|
171
|
-
scaleY: number;
|
|
172
|
-
scaleZ: number;
|
|
173
|
-
rotationX: number;
|
|
174
|
-
rotationY: number;
|
|
175
|
-
rotationZ: number;
|
|
176
|
-
easing: AnimationModeType;
|
|
177
|
-
mode: string;
|
|
178
|
-
delay: number;
|
|
179
|
-
duration: number;
|
|
180
|
-
repeat: number;
|
|
181
|
-
yoyo: boolean;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* 动画
|
|
185
|
-
*/
|
|
186
|
-
export interface IAnimations {
|
|
187
|
-
id: string;
|
|
188
|
-
sid: string;
|
|
189
|
-
modelId: string;
|
|
190
|
-
name: string;
|
|
191
|
-
keyframes: IKeyframe[];
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* 模型视角
|
|
195
|
-
*/
|
|
196
|
-
export interface IModelVisions {
|
|
197
|
-
id: string;
|
|
198
|
-
uuid: string;
|
|
199
|
-
nodeId: string;
|
|
200
|
-
name: string;
|
|
201
|
-
code?: any;
|
|
202
|
-
camera: 'O' | 'P';
|
|
203
|
-
position: IVector3;
|
|
204
|
-
rotation: IVector3;
|
|
205
|
-
target: IVector3;
|
|
206
|
-
zoom: number;
|
|
207
|
-
primary: boolean;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* 空间
|
|
211
|
-
*/
|
|
212
|
-
export interface ISpaces {
|
|
213
|
-
id: string;
|
|
214
|
-
sid: string;
|
|
215
|
-
name: string;
|
|
216
|
-
type: string;
|
|
217
|
-
matrix: number[];
|
|
218
|
-
visible: boolean;
|
|
219
|
-
assets: string[] | null;
|
|
220
|
-
children: ISpaces[] | null;
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* 预设效果 options
|
|
224
|
-
*/
|
|
225
|
-
export interface IPresetEffectsOptions {
|
|
226
|
-
atmosphere?: boolean;
|
|
227
|
-
hdr?: boolean;
|
|
228
|
-
ssao?: boolean;
|
|
229
|
-
directionalLightShadow?: boolean | {
|
|
230
|
-
angle?: number;
|
|
231
|
-
};
|
|
232
|
-
toneMappping?: boolean;
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* constructor options
|
|
236
|
-
*/
|
|
237
|
-
export interface ConstructorOptions {
|
|
238
|
-
/**
|
|
239
|
-
* 平台解密公钥
|
|
240
|
-
*/
|
|
241
|
-
key?: string;
|
|
242
|
-
/**
|
|
243
|
-
* 资源包路径
|
|
244
|
-
*/
|
|
245
|
-
path?: string;
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* loadScene options
|
|
249
|
-
*/
|
|
250
|
-
export interface ILoadSceneOptions extends ConstructorOptions {
|
|
251
|
-
/**
|
|
252
|
-
* 同步自定义属性
|
|
253
|
-
*/
|
|
254
|
-
syncProperties?: boolean;
|
|
255
|
-
/**
|
|
256
|
-
* 同步模型视角数据
|
|
257
|
-
*/
|
|
258
|
-
syncModelVisions?: boolean;
|
|
259
|
-
/**
|
|
260
|
-
* 计算 bounds tree
|
|
261
|
-
*/
|
|
262
|
-
needsModelsBoundsTree?: boolean;
|
|
263
|
-
/**
|
|
264
|
-
* 应用预设效果
|
|
265
|
-
*/
|
|
266
|
-
applyPresetEffects?: boolean;
|
|
267
|
-
/**
|
|
268
|
-
* 同步场景算法 BFS | DFS
|
|
269
|
-
*/
|
|
270
|
-
loadSceneAlgorithm?: LoadSceneAlgorithm;
|
|
271
|
-
/**
|
|
272
|
-
* 目标节点 id(DFS时有效)
|
|
273
|
-
*/
|
|
274
|
-
loadTargetId?: ITreeData['id'];
|
|
275
|
-
/**
|
|
276
|
-
* 需要加载的层级(DFS时有效)
|
|
277
|
-
*/
|
|
278
|
-
loadLevel?: number;
|
|
279
|
-
/**
|
|
280
|
-
* 需要隐藏的对象 id
|
|
281
|
-
*/
|
|
282
|
-
hiddenObjects?: Set<string>;
|
|
283
|
-
/**
|
|
284
|
-
* 加载 poi
|
|
285
|
-
*/
|
|
286
|
-
loadPoi?: boolean;
|
|
287
|
-
/**
|
|
288
|
-
* 通过数据源刷新 poi
|
|
289
|
-
*/
|
|
290
|
-
refreshPoiByDataSource?: boolean;
|
|
291
|
-
/**
|
|
292
|
-
* 加载流程数据
|
|
293
|
-
*/
|
|
294
|
-
loadFlowData?: boolean;
|
|
295
|
-
/**
|
|
296
|
-
* 场景 group 信息
|
|
297
|
-
*/
|
|
298
|
-
sceneGroupInfo?: Partial<BaseObjectInfo>;
|
|
299
|
-
/**
|
|
300
|
-
* 对象 id 前缀
|
|
301
|
-
*/
|
|
302
|
-
objectPrefixId?: string;
|
|
303
|
-
/**
|
|
304
|
-
* 作为对象的 id
|
|
305
|
-
*/
|
|
306
|
-
asId?: 'id' | 'sid';
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* properties map
|
|
310
|
-
*/
|
|
311
|
-
export type TPropertiesMap = Map<IProperties['modelId'], IProperties[]>;
|
|
312
|
-
/**
|
|
313
|
-
* playAnimationById options
|
|
314
|
-
*/
|
|
315
|
-
export interface IPlayAnimationByIdOptions {
|
|
316
|
-
autoStopPrevious?: boolean;
|
|
317
|
-
onUpdate?: (source: TTweenSource, tween: TTweenType) => void;
|
|
318
|
-
onStart?: (tween: TTweenType) => void;
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* animation map
|
|
322
|
-
*/
|
|
323
|
-
export type TAnimationsMap = Map<IAnimations['modelId'], IAnimations[]>;
|
|
324
|
-
/**
|
|
325
|
-
* model visions map
|
|
326
|
-
*/
|
|
327
|
-
export type TModelVisionsMap = Map<IModelVisions['nodeId'], IModelVisions[]>;
|
|
328
|
-
export type TSpacesMap = Map<ISpaces['sid'], ISpaces>;
|
|
329
|
-
export interface TLicense {
|
|
330
|
-
sign: string;
|
|
331
|
-
content: string;
|
|
332
|
-
version?: number;
|
|
333
|
-
}
|
|
334
|
-
export declare enum LoadSceneAlgorithm {
|
|
335
|
-
BFS = "BFS",
|
|
336
|
-
DFS = "DFS"
|
|
337
|
-
}
|
|
338
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import PoiRendererPlugin from '@soonspacejs/plugin-poi-renderer';
|
|
2
|
-
import CpsManagerPlugin from '../';
|
|
3
|
-
import { IUpdatePoi } from './type';
|
|
4
|
-
declare class UpdatePoi {
|
|
5
|
-
#private;
|
|
6
|
-
plugin: PoiRendererPlugin;
|
|
7
|
-
cpsPlugin: CpsManagerPlugin;
|
|
8
|
-
constructor(plugin: PoiRendererPlugin, cpsPlugin: CpsManagerPlugin);
|
|
9
|
-
listen(newValue: IUpdatePoi): void;
|
|
10
|
-
}
|
|
11
|
-
export default UpdatePoi;
|
package/dist/utils.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import SoonSpace from 'soonspacejs';
|
|
2
|
-
import { TAnimationFrame } from 'umanager-animation-parser';
|
|
3
|
-
import { BaseTreeNode, IKeyframe, ITreeData } from './types';
|
|
4
|
-
import CpsSoonmanagerPlugin from '.';
|
|
5
|
-
/**
|
|
6
|
-
* 解码
|
|
7
|
-
* @param encodedStr
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export declare function decodeString(encodedStr: string): string;
|
|
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;
|
|
13
|
-
/**
|
|
14
|
-
* 创建空间
|
|
15
|
-
* @param ssp
|
|
16
|
-
* @param node
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
export declare function createSpace(ssp: SoonSpace, node: ITreeData, objectId: string): import("../../../soonspacejs/src/Library/Canvas3D").Canvas3D;
|
|
20
|
-
export declare function createWaterSurface(cpsPlugin: CpsSoonmanagerPlugin, node: ITreeData, objectId: string): import("../../../soonspacejs/src/Library/PluginObject").PluginObject | null;
|
|
21
|
-
export declare function createDecal(ssp: SoonSpace, node: ITreeData, objectId: string, path: string | null): Promise<import("../../../soonspacejs/src/Library/Decal").Decal | null>;
|
|
22
|
-
export declare function transformKeyframes(keyframes: IKeyframe[]): TAnimationFrame[];
|