@glowjs/core 2022.9.5 → 2023.4.4
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/glow.core.js +1 -1
- package/dist/typings/camera/AutoRotate.d.ts +36 -0
- package/dist/typings/camera/CameraMgr.d.ts +14 -4
- package/dist/typings/core/App.d.ts +5 -0
- package/dist/typings/core/AppOptions.d.ts +8 -2
- package/dist/typings/effect/EffectMgr.d.ts +1 -2
- package/dist/typings/effect/HighLight.d.ts +2 -1
- package/dist/typings/effect/SkyBox.d.ts +5 -0
- package/dist/typings/effect/SkyBoxSource.d.ts +4 -0
- package/dist/typings/entity/Entity.d.ts +1 -6
- package/dist/typings/entity/Floor.d.ts +1 -1
- package/dist/typings/entity/Path.d.ts +1 -45
- package/dist/typings/entity/Thing.d.ts +2 -2
- package/dist/typings/entity/component/Animator.d.ts +1 -1
- package/dist/typings/entity/component/Style.d.ts +1 -24
- package/dist/typings/entity/component/archive/ArchiveCabinet.d.ts +7 -0
- package/dist/typings/entity/component/archive/ArchiveCabinetGroup.d.ts +13 -4
- package/dist/typings/entity/component/cabinet/Cabinet.d.ts +64 -14
- package/dist/typings/entity/component/cabinet/CabinetCapacityData.d.ts +17 -0
- package/dist/typings/entity/component/cabinet/CabinetMgr.d.ts +13 -1
- package/dist/typings/entity/component/cabinet/RackMounted.d.ts +14 -0
- package/dist/typings/entity/component/cabinet/events/onCabinetLeftDoubleClick.d.ts +1 -2
- package/dist/typings/entity/component/roaming/Roaming.d.ts +6 -2
- package/dist/typings/entity/path/Path.d.ts +48 -0
- package/dist/typings/entity/path/attachDrag.d.ts +2 -0
- package/dist/typings/entity/path/createLineMeshData.d.ts +3 -0
- package/dist/typings/entity/path/createPointInstance.d.ts +5 -0
- package/dist/typings/entity/path/detachDrag.d.ts +2 -0
- package/dist/typings/entity/path/dragData.d.ts +9 -0
- package/dist/typings/entity/path/getLineMaterial.d.ts +2 -0
- package/dist/typings/entity/util/getPathIconMesh.d.ts +7 -0
- package/dist/typings/entity/util/getPathLineMesh.d.ts +2 -0
- package/dist/typings/event/EventMgr.d.ts +1 -1
- package/dist/typings/event/KeyCode.d.ts +2 -1
- package/dist/typings/gui/Billboard.d.ts +2 -1
- package/dist/typings/gui/GradientRectangle.d.ts +1 -1
- package/dist/typings/gui/LinkTip.d.ts +30 -0
- package/dist/typings/gui/getTextWidth.d.ts +6 -0
- package/dist/typings/index.d.ts +8 -2
- package/dist/typings/misc/SystemResId.d.ts +2 -2
- package/dist/typings/misc/math/vec/isClockwise.d.ts +6 -0
- package/dist/typings/res/ResOptions.d.ts +5 -0
- package/dist/typings/res/ResPool.d.ts +2 -2
- package/dist/typings/res/registerBuffer.d.ts +6 -0
- package/dist/typings/runtime/RunTime.d.ts +45 -0
- package/dist/typings/runtime/index.d.ts +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CameraMgr } from './CameraMgr';
|
|
2
|
+
/**
|
|
3
|
+
* 自动旋转
|
|
4
|
+
*/
|
|
5
|
+
export declare class AutoRotate {
|
|
6
|
+
/**
|
|
7
|
+
* 管理器
|
|
8
|
+
*/
|
|
9
|
+
readonly mgr: CameraMgr;
|
|
10
|
+
/**
|
|
11
|
+
* 获取或设置是否启用
|
|
12
|
+
*/
|
|
13
|
+
enable: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 间隔时间
|
|
16
|
+
*/
|
|
17
|
+
timeout: number;
|
|
18
|
+
/**
|
|
19
|
+
* 旋转速度
|
|
20
|
+
*/
|
|
21
|
+
speed: number;
|
|
22
|
+
private _timeoutId;
|
|
23
|
+
private _mouseIndex;
|
|
24
|
+
private _cacheMouseIndex;
|
|
25
|
+
/**
|
|
26
|
+
* 实例化一个自动旋转对象
|
|
27
|
+
* @param mgr 管理器
|
|
28
|
+
*/
|
|
29
|
+
constructor(mgr: CameraMgr);
|
|
30
|
+
private _update;
|
|
31
|
+
private _onMouseEvent;
|
|
32
|
+
/**
|
|
33
|
+
* 检查,true=无操作,false=有操作
|
|
34
|
+
*/
|
|
35
|
+
private _check;
|
|
36
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ArcRotateCamera } from '../runtime';
|
|
1
|
+
import { ArcRotateCamera, BoundingInfo } from '../runtime';
|
|
2
2
|
import { Base } from '../base/Base';
|
|
3
3
|
import { App } from '../core/App';
|
|
4
4
|
import { Entity } from '../entity/Entity';
|
|
5
5
|
import { CameraMode } from './CameraMode';
|
|
6
6
|
import { CameraPerson } from './CameraPerson';
|
|
7
7
|
import { OrthographicView } from './OrthographicView';
|
|
8
|
+
import { AutoRotate } from './AutoRotate';
|
|
8
9
|
/**
|
|
9
10
|
* 相机管理器
|
|
10
11
|
*/
|
|
@@ -25,6 +26,10 @@ export declare class CameraMgr extends Base {
|
|
|
25
26
|
* 获取或设置跟随对象
|
|
26
27
|
*/
|
|
27
28
|
followObj: Entity;
|
|
29
|
+
/**
|
|
30
|
+
* 自动旋转
|
|
31
|
+
*/
|
|
32
|
+
readonly autoRotate: AutoRotate;
|
|
28
33
|
/**
|
|
29
34
|
* 实例化一个相机管理器对象
|
|
30
35
|
* @param app 应用
|
|
@@ -224,8 +229,6 @@ export declare class CameraMgr extends Base {
|
|
|
224
229
|
*/
|
|
225
230
|
get allowUpsideDown(): boolean;
|
|
226
231
|
set allowUpsideDown(value: boolean);
|
|
227
|
-
get autoRotate(): boolean;
|
|
228
|
-
set autoRotate(value: boolean);
|
|
229
232
|
/**
|
|
230
233
|
* 获取或设置相机的模式,0=透视,1=正交
|
|
231
234
|
*/
|
|
@@ -287,7 +290,14 @@ export declare class CameraMgr extends Base {
|
|
|
287
290
|
* @param time 花费的时间,默认值500毫秒
|
|
288
291
|
* @param callback 完成回调函数
|
|
289
292
|
*/
|
|
290
|
-
fit(obj: Entity, time?: number, callback?: () => void): void;
|
|
293
|
+
fit(obj: Entity | BoundingInfo, time?: number, callback?: () => void): void;
|
|
294
|
+
/**
|
|
295
|
+
* 自适应观察指定物体数组
|
|
296
|
+
* @param arr 物体数组
|
|
297
|
+
* @param time 花费的时间,默认值500毫秒
|
|
298
|
+
* @param callback 完成回调函数
|
|
299
|
+
*/
|
|
300
|
+
fitArray(arr: Entity[], time?: number, callback?: () => void): void;
|
|
291
301
|
/**
|
|
292
302
|
* 飞行
|
|
293
303
|
* @param position 相机位置
|
|
@@ -13,6 +13,7 @@ import { MaterialMgr } from '../material/MaterialMgr';
|
|
|
13
13
|
import { EntityType } from '../entity/EntityType';
|
|
14
14
|
import { Component } from '../entity/component/Component';
|
|
15
15
|
import { Tracker } from '../entity/Tracker';
|
|
16
|
+
import { LinkMgr } from '../link/LinkMgr';
|
|
16
17
|
/**
|
|
17
18
|
* 应用
|
|
18
19
|
*/
|
|
@@ -91,6 +92,10 @@ export declare class App extends EventDispatcher {
|
|
|
91
92
|
* 事件管理器
|
|
92
93
|
*/
|
|
93
94
|
eventMgr: EventMgr;
|
|
95
|
+
/**
|
|
96
|
+
* 链路管理器
|
|
97
|
+
*/
|
|
98
|
+
linkMgr: LinkMgr;
|
|
94
99
|
/**
|
|
95
100
|
* 跟踪器
|
|
96
101
|
*/
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { EnvironmentTextureSource } from '../effect/EnvironmentTextureSource';
|
|
2
|
+
import { SkyBoxSource } from '../effect/SkyBoxSource';
|
|
1
3
|
/**
|
|
2
4
|
* App选项
|
|
3
5
|
*/
|
|
@@ -19,9 +21,13 @@ export declare type AppOptions = {
|
|
|
19
21
|
*/
|
|
20
22
|
basePath?: string;
|
|
21
23
|
/**
|
|
22
|
-
*
|
|
24
|
+
* 是否启用天空盒子,默认不启用
|
|
23
25
|
*/
|
|
24
|
-
skyBox?:
|
|
26
|
+
skyBox?: SkyBoxSource;
|
|
27
|
+
/**
|
|
28
|
+
* 环境贴图
|
|
29
|
+
*/
|
|
30
|
+
environmentTexture?: EnvironmentTextureSource;
|
|
25
31
|
/**
|
|
26
32
|
* 科技风建筑,默认false
|
|
27
33
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HighlightLayer } from '../runtime';
|
|
1
2
|
import { Entity } from '../entity/Entity';
|
|
2
3
|
import { Base } from '../base/Base';
|
|
3
4
|
import { App } from '../core/App';
|
|
@@ -5,7 +6,7 @@ import { App } from '../core/App';
|
|
|
5
6
|
* 高亮层
|
|
6
7
|
*/
|
|
7
8
|
export declare class HighLight extends Base {
|
|
8
|
-
|
|
9
|
+
_layer: HighlightLayer;
|
|
9
10
|
private _entites;
|
|
10
11
|
/**
|
|
11
12
|
* 实例化一个高亮层对象
|
|
@@ -18,6 +18,11 @@ export declare class SkyBox extends Base {
|
|
|
18
18
|
* @param autoRotate 自动旋转
|
|
19
19
|
*/
|
|
20
20
|
constructor(app: App, texture?: SkyBoxSource, autoRotate?: boolean);
|
|
21
|
+
/**
|
|
22
|
+
* 获取或设置可见性
|
|
23
|
+
*/
|
|
24
|
+
get visible(): boolean;
|
|
25
|
+
set visible(value: boolean);
|
|
21
26
|
/**
|
|
22
27
|
* 获取或设置贴图
|
|
23
28
|
*/
|
|
@@ -2,7 +2,6 @@ import { Base } from '../base/Base';
|
|
|
2
2
|
import { App } from '../core/App';
|
|
3
3
|
import { AbstractMesh, TransformNode, BoundingInfo, Ray, Material, Mesh } from '../runtime';
|
|
4
4
|
import { ViewInfo } from './ViewInfo';
|
|
5
|
-
import { EnvironmentTextureSource } from '../effect/EnvironmentTextureSource';
|
|
6
5
|
import { Point3D } from '../misc/Point3D';
|
|
7
6
|
import { Point4D } from '../misc/Point4D';
|
|
8
7
|
import { EntityType } from './EntityType';
|
|
@@ -63,10 +62,6 @@ export declare class Entity extends Base {
|
|
|
63
62
|
* 获取或设置路径动画移动速度
|
|
64
63
|
*/
|
|
65
64
|
moveSpeed: number;
|
|
66
|
-
/**
|
|
67
|
-
* 环境贴图
|
|
68
|
-
*/
|
|
69
|
-
environmentTexture: EnvironmentTextureSource;
|
|
70
65
|
/**
|
|
71
66
|
* 实体注册的应用事件ID列表,当实体销毁时自动移除集合中的事件
|
|
72
67
|
*/
|
|
@@ -239,7 +234,7 @@ export declare class Entity extends Base {
|
|
|
239
234
|
/**
|
|
240
235
|
* 获取所有子网格(递归获取子元素的网格),含实例网格
|
|
241
236
|
*/
|
|
242
|
-
|
|
237
|
+
_getAllSubMeshes2(): Mesh[];
|
|
243
238
|
/**
|
|
244
239
|
* 计算包围盒
|
|
245
240
|
*/
|
|
@@ -1,45 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Point3D } from '../misc/Point3D';
|
|
3
|
-
import { Entity } from './Entity';
|
|
4
|
-
/**
|
|
5
|
-
* 路径
|
|
6
|
-
*/
|
|
7
|
-
export declare class Path extends Entity {
|
|
8
|
-
private static _lineMaterial;
|
|
9
|
-
private static _pointMaterial;
|
|
10
|
-
private static _index;
|
|
11
|
-
/**
|
|
12
|
-
* 路径点集合
|
|
13
|
-
*/
|
|
14
|
-
readonly points: Point3D[];
|
|
15
|
-
/**
|
|
16
|
-
* 是否需要创建
|
|
17
|
-
*/
|
|
18
|
-
needBuild: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* 实例化一个路径对象
|
|
21
|
-
* @param app 应用
|
|
22
|
-
*/
|
|
23
|
-
constructor(app: App);
|
|
24
|
-
/**
|
|
25
|
-
* 序列化成JSON对象
|
|
26
|
-
*/
|
|
27
|
-
toJson(): any;
|
|
28
|
-
/**
|
|
29
|
-
* 从JSON对象反序列化(仅生成层级树)
|
|
30
|
-
* @param json JSON对象
|
|
31
|
-
*/
|
|
32
|
-
fromJson(json: any): void;
|
|
33
|
-
/**
|
|
34
|
-
* 创建(仅当前层级可见对象)
|
|
35
|
-
* @param force 是否强制
|
|
36
|
-
* @param onlyLatest 只创建最后一段,编辑器用
|
|
37
|
-
*/
|
|
38
|
-
build(force?: boolean, onlyLatest?: boolean): Promise<void>;
|
|
39
|
-
private _createPoint;
|
|
40
|
-
private _createLine;
|
|
41
|
-
/**
|
|
42
|
-
* 拆毁(删掉网格,仅保留层级树
|
|
43
|
-
*/
|
|
44
|
-
unbuild(onlyLatest?: boolean): void;
|
|
45
|
-
}
|
|
1
|
+
export { Path } from './path/Path';
|
|
@@ -59,9 +59,9 @@ export declare class Thing extends Entity {
|
|
|
59
59
|
*/
|
|
60
60
|
properties: any;
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* 父物体计算包围盒时是否排除此物体
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
excludeBoundingBox: boolean;
|
|
65
65
|
private _autoAnimationLoopIndex;
|
|
66
66
|
/**
|
|
67
67
|
* 获取或设置自动动画循环索引
|
|
@@ -4,6 +4,7 @@ import { Entity } from '../Entity';
|
|
|
4
4
|
* 样式组件
|
|
5
5
|
*/
|
|
6
6
|
export declare class Style extends Component {
|
|
7
|
+
private _buffer;
|
|
7
8
|
/**
|
|
8
9
|
* 实例化一个样式组件对象
|
|
9
10
|
* @param entity 实体
|
|
@@ -15,30 +16,6 @@ export declare class Style extends Component {
|
|
|
15
16
|
*/
|
|
16
17
|
get color(): string;
|
|
17
18
|
set color(value: string);
|
|
18
|
-
private _emissive;
|
|
19
|
-
/**
|
|
20
|
-
* 获取或设置发光颜色
|
|
21
|
-
*/
|
|
22
|
-
get emissive(): string;
|
|
23
|
-
set emissive(value: string);
|
|
24
|
-
private _emissiveIntensity;
|
|
25
|
-
/**
|
|
26
|
-
* 获取或设置发光强度
|
|
27
|
-
*/
|
|
28
|
-
get emissiveIntensity(): number;
|
|
29
|
-
set emissiveIntensity(value: number);
|
|
30
|
-
private _opacity;
|
|
31
|
-
/**
|
|
32
|
-
* 获取或设置透明度
|
|
33
|
-
*/
|
|
34
|
-
get opacity(): number;
|
|
35
|
-
set opacity(value: number);
|
|
36
|
-
private _wireframe;
|
|
37
|
-
/**
|
|
38
|
-
* 获取或设置线框模式
|
|
39
|
-
*/
|
|
40
|
-
get wireframe(): boolean;
|
|
41
|
-
set wireframe(value: boolean);
|
|
42
19
|
/**
|
|
43
20
|
* 获取是否可以更新
|
|
44
21
|
*/
|
|
@@ -7,6 +7,13 @@ import { ArchiveGrid } from './ArchiveGrid';
|
|
|
7
7
|
* 密集架(列)
|
|
8
8
|
*/
|
|
9
9
|
export declare class ArchiveCabinet extends Component {
|
|
10
|
+
static tagStyleConfig: {
|
|
11
|
+
show: boolean;
|
|
12
|
+
hasBackground: boolean;
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
fontSize: number;
|
|
15
|
+
fontColor: string;
|
|
16
|
+
};
|
|
10
17
|
private _eventIds;
|
|
11
18
|
_door: Mesh;
|
|
12
19
|
/**
|
|
@@ -116,11 +116,20 @@ export declare class ArchiveCabinetGroup extends Component {
|
|
|
116
116
|
*/
|
|
117
117
|
show(): void;
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* 手动触发进入组
|
|
120
120
|
*/
|
|
121
|
-
|
|
121
|
+
triggerEnterGroup(): void;
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
123
|
+
* 手动触发进入列
|
|
124
|
+
* @param cabinet 列
|
|
124
125
|
*/
|
|
125
|
-
|
|
126
|
+
triggerEnterCabinet(cabinet: ArchiveCabinet): void;
|
|
127
|
+
/**
|
|
128
|
+
* 手动离开组
|
|
129
|
+
*/
|
|
130
|
+
triggerExistGroup(): void;
|
|
131
|
+
/**
|
|
132
|
+
* 手动触发离开列
|
|
133
|
+
*/
|
|
134
|
+
triggerExistCabinet(): void;
|
|
126
135
|
}
|
|
@@ -1,45 +1,71 @@
|
|
|
1
|
-
import { Billboard } from '../../../gui/Billboard';
|
|
2
1
|
import { TransformNode } from '../../../runtime';
|
|
3
2
|
import { Entity } from '../../Entity';
|
|
4
|
-
import { Thing } from '../../Thing';
|
|
5
3
|
import { Component } from '../Component';
|
|
4
|
+
import { CabinetCapacityData } from './CabinetCapacityData';
|
|
6
5
|
import { RackMounted } from './RackMounted';
|
|
7
6
|
/**
|
|
8
7
|
* 机柜
|
|
9
8
|
*/
|
|
10
9
|
export declare class Cabinet extends Component {
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
11
|
+
* 机柜标签样式配置
|
|
13
12
|
*/
|
|
14
|
-
static
|
|
15
|
-
|
|
13
|
+
static tagStyleConfig: {
|
|
14
|
+
show: boolean;
|
|
15
|
+
hasBackground: boolean;
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
fontSize: number;
|
|
18
|
+
fontColor: string;
|
|
19
|
+
};
|
|
20
|
+
private _eventIds;
|
|
21
|
+
private _tagMesh;
|
|
22
|
+
_showAssetId: string;
|
|
16
23
|
/**
|
|
17
24
|
* 数据
|
|
18
25
|
*/
|
|
19
|
-
data:
|
|
26
|
+
data: {
|
|
27
|
+
cabinet_id: string;
|
|
28
|
+
cabinet_name: string;
|
|
29
|
+
area_id: string;
|
|
30
|
+
};
|
|
20
31
|
/**
|
|
21
32
|
* 资产设备列表
|
|
22
33
|
*/
|
|
23
34
|
readonly assets: RackMounted[];
|
|
24
35
|
/**
|
|
25
|
-
*
|
|
36
|
+
* 进入机柜事件
|
|
26
37
|
*/
|
|
27
|
-
|
|
38
|
+
onEnterCabinet: (cabinet: Cabinet) => void;
|
|
39
|
+
/**
|
|
40
|
+
* 退出机柜事件
|
|
41
|
+
*/
|
|
42
|
+
onExistCabinet: (cabinet: Cabinet) => void;
|
|
43
|
+
/**
|
|
44
|
+
* 机柜右键菜单事件
|
|
45
|
+
*/
|
|
46
|
+
onCabinetRightMenu: (cabinet: Cabinet, left: number, top: number) => void;
|
|
28
47
|
/**
|
|
29
48
|
* 实例化一个机柜对象
|
|
30
49
|
* @param entity 实体
|
|
31
50
|
*/
|
|
32
51
|
constructor(entity: Entity);
|
|
33
52
|
/**
|
|
34
|
-
*
|
|
53
|
+
* 获取实体ID
|
|
35
54
|
*/
|
|
36
|
-
get
|
|
37
|
-
|
|
55
|
+
get entityId(): string;
|
|
56
|
+
/**
|
|
57
|
+
* 获取机柜ID
|
|
58
|
+
*/
|
|
59
|
+
get cabinetId(): string;
|
|
60
|
+
/**
|
|
61
|
+
* 获取机柜名称
|
|
62
|
+
*/
|
|
63
|
+
get cabinetName(): string;
|
|
38
64
|
/**
|
|
39
65
|
* 显示容量
|
|
40
66
|
* @param data 容量数据
|
|
41
67
|
*/
|
|
42
|
-
showCapacity(data:
|
|
68
|
+
showCapacity(data: CabinetCapacityData): void;
|
|
43
69
|
/**
|
|
44
70
|
* 隐藏容量
|
|
45
71
|
*/
|
|
@@ -63,11 +89,35 @@ export declare class Cabinet extends Component {
|
|
|
63
89
|
*/
|
|
64
90
|
backOn(callback?: () => void): void;
|
|
65
91
|
/**
|
|
66
|
-
*
|
|
92
|
+
* 获取挂接点
|
|
93
|
+
* @param flag 标记,true=前面,false=后面
|
|
67
94
|
*/
|
|
68
|
-
|
|
95
|
+
getPoint(flag?: boolean): TransformNode;
|
|
96
|
+
/**
|
|
97
|
+
* 手动触发退出机柜事件
|
|
98
|
+
*/
|
|
99
|
+
triggerExist(): void;
|
|
69
100
|
/**
|
|
70
101
|
* 添加编号
|
|
71
102
|
*/
|
|
72
103
|
private _afterBuild;
|
|
104
|
+
/**
|
|
105
|
+
* 更新顶部编号标签
|
|
106
|
+
*/
|
|
107
|
+
updateTag(): void;
|
|
108
|
+
/**
|
|
109
|
+
* 添加资产
|
|
110
|
+
* @param item 机架设备
|
|
111
|
+
* @param flag 挂接点标记,true=前面,false=后面
|
|
112
|
+
*/
|
|
113
|
+
add(item: RackMounted, flag?: boolean): void;
|
|
114
|
+
/**
|
|
115
|
+
* 加载资产
|
|
116
|
+
* @param list 资产配置列表
|
|
117
|
+
*/
|
|
118
|
+
loadAssets(list: any[]): Promise<void>;
|
|
119
|
+
/***
|
|
120
|
+
* 清理资产
|
|
121
|
+
*/
|
|
122
|
+
clear(): void;
|
|
73
123
|
}
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import { Entity } from '../../Entity';
|
|
2
2
|
import { Component } from '../Component';
|
|
3
3
|
import { Cabinet } from './Cabinet';
|
|
4
|
+
import { CabinetCapacityData } from './CabinetCapacityData';
|
|
4
5
|
import { RackMounted } from './RackMounted';
|
|
5
6
|
/**
|
|
6
7
|
* 机柜管理器
|
|
7
8
|
*/
|
|
8
9
|
export declare class CabinetMgr extends Component {
|
|
10
|
+
/**
|
|
11
|
+
* 资产模型配置字典
|
|
12
|
+
*/
|
|
13
|
+
static readonly assetModelConfigDic: Map<string, any>;
|
|
14
|
+
/**
|
|
15
|
+
* 获取资产模型配置
|
|
16
|
+
* @param model_id 模型ID
|
|
17
|
+
* @param uheight U高
|
|
18
|
+
*/
|
|
19
|
+
static getAssetModelConfig(model_id: string, uheight: number): any;
|
|
9
20
|
/**
|
|
10
21
|
* 当前场景机柜列表
|
|
11
22
|
*/
|
|
12
23
|
readonly cabinets: Cabinet[];
|
|
24
|
+
_capacity: boolean;
|
|
13
25
|
/**
|
|
14
26
|
* 当前选中的机柜
|
|
15
27
|
*/
|
|
@@ -27,7 +39,7 @@ export declare class CabinetMgr extends Component {
|
|
|
27
39
|
* 显示容量
|
|
28
40
|
* @param data 容量数据
|
|
29
41
|
*/
|
|
30
|
-
showCapacity(data:
|
|
42
|
+
showCapacity(data: CabinetCapacityData[]): void;
|
|
31
43
|
/**
|
|
32
44
|
* 隐藏容量
|
|
33
45
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { App } from '../../../core/App';
|
|
2
2
|
import { Entity } from '../../Entity';
|
|
3
3
|
import { ResImageSource } from './ResImageSource';
|
|
4
|
+
import { Cabinet } from '../../..';
|
|
4
5
|
/**
|
|
5
6
|
* 机架设备
|
|
6
7
|
*/
|
|
@@ -26,6 +27,11 @@ export declare class RackMounted extends Entity {
|
|
|
26
27
|
private _frontImg;
|
|
27
28
|
private _backImg;
|
|
28
29
|
private _backgroundColor;
|
|
30
|
+
data: any;
|
|
31
|
+
/**
|
|
32
|
+
* 机柜
|
|
33
|
+
*/
|
|
34
|
+
cabinet: Cabinet;
|
|
29
35
|
/**
|
|
30
36
|
* 实例化一个机架设备
|
|
31
37
|
* @param app 应用
|
|
@@ -71,6 +77,10 @@ export declare class RackMounted extends Entity {
|
|
|
71
77
|
*/
|
|
72
78
|
get backgroundColor(): string;
|
|
73
79
|
set backgroundColor(value: string);
|
|
80
|
+
/**
|
|
81
|
+
* 居中显示
|
|
82
|
+
*/
|
|
83
|
+
frontOn(): void;
|
|
74
84
|
/**
|
|
75
85
|
* 序列化成JSON对象
|
|
76
86
|
*/
|
|
@@ -89,4 +99,8 @@ export declare class RackMounted extends Entity {
|
|
|
89
99
|
* 拆毁
|
|
90
100
|
*/
|
|
91
101
|
unbuild(): void;
|
|
102
|
+
/**
|
|
103
|
+
* 释放
|
|
104
|
+
*/
|
|
105
|
+
dispose(): void;
|
|
92
106
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { EventArg } from '../../../../event/EventArg';
|
|
2
1
|
import { Cabinet } from '../Cabinet';
|
|
3
2
|
/**
|
|
4
3
|
* 机柜左键双击事件
|
|
5
4
|
* @param this 机柜
|
|
6
5
|
* @param ev 事件参数
|
|
7
6
|
*/
|
|
8
|
-
export declare function onCabinetLeftDoubleClick(this: Cabinet
|
|
7
|
+
export declare function onCabinetLeftDoubleClick(this: Cabinet): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventArg } from '../../../event/EventArg';
|
|
2
2
|
import { Point3D } from '../../../misc';
|
|
3
3
|
import { Entity } from '../../Entity';
|
|
4
|
+
import { Path } from '../../Path';
|
|
4
5
|
import { Component } from '../Component';
|
|
5
6
|
/**
|
|
6
7
|
* 漫游
|
|
@@ -11,7 +12,7 @@ export declare class Roaming extends Component {
|
|
|
11
12
|
/**
|
|
12
13
|
* 路径
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
+
_path: Path;
|
|
15
16
|
/**
|
|
16
17
|
* 角色
|
|
17
18
|
*/
|
|
@@ -79,5 +80,8 @@ export declare class Roaming extends Component {
|
|
|
79
80
|
private _setAppEvents;
|
|
80
81
|
private _onLeftClick;
|
|
81
82
|
private _onAfterFrame;
|
|
82
|
-
|
|
83
|
+
/**
|
|
84
|
+
* 结束路径编辑
|
|
85
|
+
*/
|
|
86
|
+
endPathEdit(): Promise<void>;
|
|
83
87
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { App } from '../../core/App';
|
|
2
|
+
import { Point3D } from '../../misc/Point3D';
|
|
3
|
+
import { Entity } from '../Entity';
|
|
4
|
+
/**
|
|
5
|
+
* 路径
|
|
6
|
+
*/
|
|
7
|
+
export declare class Path extends Entity {
|
|
8
|
+
private static _index;
|
|
9
|
+
/**
|
|
10
|
+
* 路径点集合
|
|
11
|
+
*/
|
|
12
|
+
readonly points: Point3D[];
|
|
13
|
+
/**
|
|
14
|
+
* 是否需要创建
|
|
15
|
+
*/
|
|
16
|
+
needBuild: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 实例化一个路径对象
|
|
19
|
+
* @param app 应用
|
|
20
|
+
*/
|
|
21
|
+
constructor(app: App);
|
|
22
|
+
/**
|
|
23
|
+
* 序列化成JSON对象
|
|
24
|
+
*/
|
|
25
|
+
toJson(): any;
|
|
26
|
+
/**
|
|
27
|
+
* 从JSON对象反序列化(仅生成层级树)
|
|
28
|
+
* @param json JSON对象
|
|
29
|
+
*/
|
|
30
|
+
fromJson(json: any): void;
|
|
31
|
+
/**
|
|
32
|
+
* 创建(仅当前层级可见对象)
|
|
33
|
+
* @param force 是否强制
|
|
34
|
+
*/
|
|
35
|
+
build(force?: boolean): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* 拆毁(删掉网格,仅保留层级树
|
|
38
|
+
*/
|
|
39
|
+
unbuild(): void;
|
|
40
|
+
/**
|
|
41
|
+
* 附加拖动功能
|
|
42
|
+
*/
|
|
43
|
+
attachDrag(): void;
|
|
44
|
+
/**
|
|
45
|
+
* 移除拖动功能
|
|
46
|
+
*/
|
|
47
|
+
detachDrag(): void;
|
|
48
|
+
}
|