mx3d 0.0.43 → 0.0.46

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.
Files changed (4) hide show
  1. package/index.d.ts +61 -2933
  2. package/mx3d.js +10 -0
  3. package/mx3d.min.js +3 -3
  4. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,2884 +1,9 @@
1
- /*
2
- @author gzmaijing
3
- @email mj@gzmaijing.com
4
- */
5
-
6
-
7
-
8
-
9
-
10
- module MX3D {
11
-
12
- export class App {
13
- canvas: HTMLCanvasElement;
14
- engine: BABYLON.Engine;
15
- scene: BABYLON.Scene;
16
- Camera: Camera;
17
- HighlightLayer: BABYLON.HighlightLayer;
18
- container: BABYLON.GUI.AdvancedDynamicTexture;
19
- fps: HTMLDivElement;
20
- Resources: Resources;
21
- Environment: Environment;
22
- Project: Project;
23
- ToolTips: ToolTips;
24
- constructor(_config: {
25
- container: HTMLElement;
26
- pk: string;
27
- sl?: string;
28
- rl?: string;
29
- });
30
- load(_config: {
31
- progress?: Function;
32
- complete?: Function;
33
- }): Promise<void>;
34
- }
35
-
36
- export class Camera {
37
- app: App;
38
- camera: BABYLON.ArcRotateCamera;
39
- frustrum: number;
40
- isOverLook: boolean;
41
- constructor(_app: App);
42
- orthographic(): void;
43
- perspective(): void;
44
- focusingFromProperty(_visualAngle: VisualAngle): void;
45
- flyTo(_visualAngle: VisualAngle, _sheep?: number): void;
46
- translation(_visualAngle: VisualAngle, _sheep?: number): void;
47
- computeCameraView(): void;
48
- _wheel(_p: any): void;
49
- }
50
-
51
- export class Capacity {
52
- anchor: IObject;
53
- mesh: BABYLON.Mesh;
54
- ratio: number;
55
- color: string;
56
- textMesh: BABYLON.Mesh;
57
- constructor(_object: IObject, _RATIO: number);
58
- dispose(): void;
59
- }
60
-
61
- export class CapacityBuilder {
62
- static createCapacity(_obj: IObject, _RATIO: number, _text: string, _fontSize?: string): void;
63
- static createTextMesh(_obj: IObject, _text: string, _RATIO: number, _fontSize?: string, _color?: string): void;
64
- }
65
-
66
- export class Dictionary<T> {
67
- map: {
68
- [key: string]: T;
69
- };
70
- constructor();
71
- add(_key: string, _value: T): void;
72
- find(_key: string): void;
73
- remove(_key: string): void;
74
- termRemove(_callback: Function): void;
75
- showAll(): void;
76
- count(): void;
77
- clear(): void;
78
- }
79
-
80
- export class EffectMgr {
81
- static colors: {};
82
- static init(): void;
83
- }
84
-
85
- export enum EffectType {
86
- Opaque = 0,
87
- Flash = 1,
88
- Transparent = 2
89
- }
90
-
91
- export class Environment {
92
- app: App;
93
- lights: any;
94
- _color: BABYLON.Color4;
95
- background: BABYLON.Layer;
96
- reflexEnabled: boolean;
97
- reflexIntensity: number;
98
- constructor(_app: App);
99
- set fogDistance(_value: number);
100
- set color(_value: BABYLON.Color4);
101
- reflex(_url: string, _intensity: number): void;
102
- setBackground(_url: string): void;
103
- setReflexEnabled(_reflexEnabled: boolean): void;
104
- setFlexIntensity(_intensity: number): void;
105
- Lights(): void;
106
- offAllLight(): void;
107
- openAllLight(): void;
108
- loadLight(_Lights: Array<any>): void;
109
- }
110
-
111
- export enum EventType {
112
- leftClick = "leftClick",
113
- rightClick = "rightClick",
114
- doubleClick = "doubleClick",
115
- eover = "eover",
116
- longPress = "longPress",
117
- out = "out"
118
- }
119
-
120
- export class HeatMap implements BaseNode {
121
- id: string;
122
- scene: BABYLON.Scene;
123
- anchor: string;
124
- mesh: BABYLON.Mesh;
125
- texts: Array<BABYLON.GUI.TextBlock>;
126
- constructor(_anchor: string);
127
- isEnabled(_bool: boolean): void;
128
- set displayValues(_value: boolean);
129
- dispose(): void;
130
- }
131
-
132
- export class HeatMapBuilder {
133
- static createMatrixHeatMap(_data: {
134
- anchor: BABYLON.Mesh | BABYLON.InstancedMesh;
135
- rootUrl: string;
136
- FogTex: BABYLON.Texture;
137
- container: BABYLON.GUI.AdvancedDynamicTexture;
138
- config: {
139
- maxX: number;
140
- maxY: number;
141
- data: Array<{
142
- x: number;
143
- y: number;
144
- value: number;
145
- }>;
146
- };
147
- displayValues: boolean;
148
- height: number;
149
- isLevelRender: boolean;
150
- isAlpha: boolean;
151
- isParticle: boolean;
152
- radius: number;
153
- range: {
154
- max: number;
155
- min: number;
156
- };
157
- }): void;
158
- static createColumnarHeatMap(_data: {
159
- anchor: BABYLON.Mesh | BABYLON.InstancedMesh;
160
- FogTex: BABYLON.Texture;
161
- container: BABYLON.GUI.AdvancedDynamicTexture;
162
- config: Array<{
163
- index: number;
164
- value: number;
165
- }>;
166
- isLevelRender: boolean;
167
- displayValues: boolean;
168
- isAlpha: boolean;
169
- isParticle: boolean;
170
- radius: number;
171
- range: {
172
- max: number;
173
- min: number;
174
- };
175
- }): void;
176
- }
177
-
178
- export class Icon implements BaseNode {
179
- id: string;
180
- scene: BABYLON.Scene;
181
- pint: BABYLON.Mesh;
182
- rect: BABYLON.GUI.Rectangle;
183
- onPointerClick: Function;
184
- size: {
185
- width: number;
186
- height: number;
187
- };
188
- height: number;
189
- container: BABYLON.GUI.AdvancedDynamicTexture;
190
- constructor(_id: string, _scene: BABYLON.Scene);
191
- set background(_url: string);
192
- setTexts(_textArr: [{
193
- text: string;
194
- fontSize: string;
195
- color: string;
196
- top: number;
197
- left: number;
198
- }]): void;
199
- line(_line: {
200
- width: number;
201
- color: string;
202
- }): void;
203
- dispose(): void;
204
- isEnabled(_isEnabled: boolean): void;
205
- }
206
-
207
- export class IconFromMesh implements BaseNode {
208
- id: string;
209
- scene: BABYLON.Scene;
210
- instance: BABYLON.Mesh;
211
- url: string;
212
- scaling: number;
213
- constructor(_id: string, _anchor: BABYLON.Vector3, _url: string, _scaling: number, _height: number, _scene: BABYLON.Scene);
214
- setBackground(): void;
215
- addEventListener(_action: Function): void;
216
- setColor(_color: string): void;
217
- setContents(_textArr: [{
218
- text: string;
219
- fontSize: string;
220
- top: number;
221
- left: number;
222
- color?: string;
223
- }]): void;
224
- dispose(): void;
225
- isEnabled(_bool: boolean): void;
226
- }
227
-
228
- export class Project {
229
- app: App;
230
- id: string;
231
- root: IObject;
232
- current: IObject;
233
- visualAngle: VisualAngle;
234
- objectDatas: Dictionary<IObject>;
235
- constructor(_app: App);
236
- delete(): void;
237
- optimization(): void;
238
- computeView(): void;
239
- getChildNodes(_id: string): void;
240
- getTrees(): void;
241
- find(_id: string): void;
242
- findFormObjectType(_type: ObjectType, _isCurent?: boolean): void;
243
- show(): void;
244
- getBounding(): void;
245
- flyTo(): void;
246
- }
247
-
248
- export class UI {
249
- static createIconFromMesh(_id: string, _anchor: IObject, _url: string, _scaling: number, _height: number): void;
250
- static createIcon(_id: string, _anchor: IObject, _size: {
251
- width: number;
252
- height: number;
253
- }, _height: number): void;
254
- }
255
-
256
- export class Directional extends LightObject {
257
- direction: BABYLON.Vector3;
258
- position: BABYLON.Vector3;
259
- light: BABYLON.DirectionalLight;
260
- load(): void;
261
- }
262
-
263
- export class Hemispheric extends LightObject {
264
- direction: BABYLON.Vector3;
265
- light: BABYLON.HemisphericLight;
266
- load(): void;
267
- }
268
-
269
- export interface ILightObject {
270
- id: string;
271
- sceneId: string;
272
- name: string;
273
- light: BABYLON.Light;
274
- color: string;
275
- lightType: string;
276
- intensity: number;
277
- load: Function;
278
- }
279
-
280
- export class LightObject implements ILightObject {
281
- id: string;
282
- sceneId: string;
283
- name: string;
284
- light: BABYLON.Light;
285
- color: string;
286
- objectType: string;
287
- lightType: string;
288
- intensity: number;
289
- app: App;
290
- constructor(_app: App);
291
- load(): void;
292
- }
293
-
294
- export enum LightType {
295
- Point = "Point",
296
- Spot = "Spot",
297
- Directional = "Directional",
298
- Hemispheric = "Hemispheric"
299
- }
300
-
301
- export class Point extends LightObject {
302
- position: BABYLON.Vector3;
303
- light: BABYLON.PointLight;
304
- range: number;
305
- load(): void;
306
- }
307
-
308
- export class Spot extends LightObject {
309
- direction: BABYLON.Vector3;
310
- position: BABYLON.Vector3;
311
- angle: number;
312
- exponent: number;
313
- range: number;
314
- light: BABYLON.SpotLight;
315
- load(): void;
316
- }
317
-
318
- export class CabinetObject extends Object {
319
- }
320
-
321
- export class ConduitObject extends Object {
322
- alpha: number;
323
- color: string;
324
- bind(_m: any): void;
325
- setColor(_r: number, _b: number, _g: number): void;
326
- reColor(): void;
327
- computeView(): void;
328
- setFlash(_level?: number): void;
329
- setOpaque(): void;
330
- setTransparent(_alpha?: number): void;
331
- }
332
-
333
- export class CornerObject extends Object {
334
- height: number;
335
- bind(_m: any): void;
336
- }
337
-
338
- export class Object implements IObject {
339
- app: App;
340
- id: string;
341
- name: string;
342
- parentId: string;
343
- modelId: string;
344
- instance: BABYLON.Mesh | BABYLON.InstancedMesh;
345
- objectType: string;
346
- modelType: string;
347
- action: BABYLON.ActionManager;
348
- executes: Dictionary<BABYLON.ExecuteCodeAction>;
349
- clickEvents: Dictionary<Function>;
350
- touchtime: number;
351
- effectType: EffectType;
352
- visualAngle: VisualAngle;
353
- animation: boolean;
354
- isloop: boolean;
355
- isAutoPlay: boolean;
356
- constructor(_app: App);
357
- showBoundingBox: boolean;
358
- setEnabled(_value: boolean): void;
359
- bind(_m: any): void;
360
- computeView(): void;
361
- optimization(_isOptimization: boolean): void;
362
- alwaysActive(): void;
363
- addEventListener(_type: string, _callback: Function): void;
364
- removeEventListener(_type: string): void;
365
- setFlash(_level: number): void;
366
- setOpaque(): void;
367
- setTransparent(_alpha?: number): void;
368
- play(): void;
369
- stop(): void;
370
- flyTo(): void;
371
- focus(): void;
372
- }
373
-
374
- export class DoorObject extends Object {
375
- height: number;
376
- bind(_m: any): void;
377
- }
378
-
379
- export class FloorObject extends Object {
380
- height: number;
381
- bind(_m: any): void;
382
- }
383
-
384
- export interface IBase {
385
- app: App;
386
- id: string;
387
- name: string;
388
- parentId: string;
389
- objectType: string;
390
- }
391
-
392
- export interface IObject extends IBase {
393
- modelId: string;
394
- instance: BABYLON.Mesh | BABYLON.InstancedMesh;
395
- modelType: string;
396
- visualAngle: VisualAngle;
397
- effectType: EffectType;
398
- bind(_m?: any): any;
399
- optimization(isOptimization: boolean): any;
400
- showBoundingBox: boolean;
401
- setFlash(level: number): any;
402
- setTransparent(): any;
403
- setOpaque(): any;
404
- setEnabled(isEnabled: any): any;
405
- addEventListener(type: string, callback: Function): any;
406
- removeEventListener(type: string): any;
407
- play(isloop: boolean): any;
408
- stop(): any;
409
- flyTo(): any;
410
- focus(): any;
411
- computeView(): any;
412
- }
413
-
414
- export class LeakWaterObject extends Object {
415
- bind(_l: any): void;
416
- computeView(): void;
417
- addEventListener(_type: string, _callback: Function): void;
418
- removeEventListener(_type: string): void;
419
- }
420
-
421
- export enum ObjectType {
422
- Campus = "Campus",
423
- Building = "Building",
424
- Scene = "Scene",
425
- Humiture = "Humiture",
426
- Battery = "Battery",
427
- PowerCabinet = "PowerCabinet",
428
- Cabinet = "Cabinet",
429
- AirCondition = "AirCondition",
430
- UPS = "UPS",
431
- Camera = "Camera",
432
- NewWindMachine = "NewWindMachine",
433
- SmokeDetector = "SmokeDetector",
434
- AudibleVisualAlarm = "AudibleVisualAlarm",
435
- LeakWater = "LeakWater",
436
- Wall = "Wall",
437
- Floor = "Floor",
438
- Window = "Window",
439
- Door = "Door",
440
- AirFlow = "AirFlow",
441
- Corner = "Corner",
442
- FireFighting = "FireFighting",
443
- Lighting = "Lighting",
444
- Enclosure = "Enclosure",
445
- ParkingLot = "ParkingLot",
446
- Elevator = "Elevator",
447
- Other = "Other",
448
- InrackAsset = "InrackAsset",
449
- GasDetection = "GasDetection",
450
- Security = "Security",
451
- OutDoorScene = "OutDoorScene",
452
- Infrared = "Infrared",
453
- SkyBox = "SkyBox",
454
- UI3D = "UI3D",
455
- ColdTongDoor = "ColdTongDoor",
456
- VirtualBox = "VirtualBox",
457
- PathPint = "PathPint",
458
- Port = "Port",
459
- Positioner = "Positioner",
460
- AutoAnimation = "AutoAnimation",
461
- MapModel = "MapModel",
462
- radiator = "radiator",
463
- Conduit = "Conduit",
464
- Region = "Region",
465
- optimizedWall = "optimizedWall"
466
- }
467
-
468
- export class RegionObject extends Object {
469
- index: number;
470
- height: number;
471
- constructor(app: App, _storey: any);
472
- bind(_storey: any, _isOptimized?: boolean): void;
473
- computeView(): void;
474
- flyTo(): void;
475
- focus(): void;
476
- setEnabled(_value: boolean): void;
477
- getBounding(): void;
478
- dispose(): void;
479
- }
480
-
481
- export class UI3DTextObject extends Object {
482
- bind(_u: any): void;
483
- }
484
-
485
- export class VirtualBoxObject extends Object {
486
- bind(_m: any): Promise<void>;
487
- }
488
-
489
- export class WallObject extends Object {
490
- nativeMaterial: BABYLON.StandardMaterial;
491
- baseModel: any;
492
- height: number;
493
- bind(_w: any): void;
494
- }
495
-
496
- export class WindowObject extends Object {
497
- height: number;
498
- bind(_m: any): void;
499
- }
500
-
501
- export class ArrayEx<T> extends Array<T> {
502
- remove(_val: any): void;
503
- }
504
-
505
- export interface BaseNode {
506
- id: string;
507
- scene: BABYLON.Scene;
508
- dispose(): any;
509
- isEnabled(bool: boolean): any;
510
- }
511
-
512
- export class GUID {
513
- static getGUID(_length: number): void;
514
- }
515
-
516
- export class Resources {
517
- app: App;
518
- walls: Dictionary<BABYLON.AbstractMesh>;
519
- resources: Dictionary<BABYLON.AssetContainer>;
520
- ndoeMats: Dictionary<BABYLON.NodeMaterial>;
521
- transparentBox: BABYLON.Mesh;
522
- BOX: BABYLON.Mesh;
523
- FogTex: BABYLON.Texture;
524
- constructor(_app: App);
525
- loadModelMesh(_baseModel: any): Promise<void>;
526
- loadModelMeshAsync(_baseModel: any, _callback: Function): void;
527
- Materials: Dictionary<BABYLON.StandardMaterial>;
528
- Textures: Dictionary<BABYLON.Texture>;
529
- GetMaterial(_textureData: any, _scene: BABYLON.Scene): void;
530
- GetTexture(_textureData: any, _scene: BABYLON.Scene): void;
531
- MergeMaterials: Dictionary<BABYLON.CustomMaterial>;
532
- GetMergeMaterial(_textureData: any, _scene: BABYLON.Scene): void;
533
- delete(_isAll?: boolean): void;
534
- GetWalls(_url: string, _projectId: string): Promise<void>;
535
- }
536
-
537
- export class Tools {
538
- static vector3ToJson(_old: BABYLON.Vector3): any;
539
- static vector3ARRToJson(_olds: BABYLON.Vector3[]): void;
540
- static ToVector3(_old: any): void;
541
- static ToARRVector3(_olds: any[]): void;
542
- static computeBounds(_mscene: BABYLON.Mesh): void;
543
- static computeBoundsToARR(_meshs: Array<BABYLON.Mesh>): void;
544
- static Expand(_polygon: Array<BABYLON.Vector3>, _expand: number): void;
545
- static norm(_x: number, _y: number): void;
546
- static MergeMeshes(_meshes: Array<BABYLON.Mesh>, _app: App): void;
547
- static DeconsTructMesh(_mesh: any, _height: any, _app: App): void;
548
- static getVisualAngle(_bound: BABYLON.BoundingInfo, _app: App): void;
549
- static pathTransformation(_oldPath: Array<BABYLON.Vector3>, _radius: number): void;
550
- static createTube(_id: string, _paths: Array<BABYLON.Vector3>, _radius: number, _app: App): void;
551
- static getAngleFromVector2(_startV: BABYLON.Vector2, _coreV: BABYLON.Vector2, _endV: BABYLON.Vector2): void;
552
- static getAngleFromVector3(_startV: BABYLON.Vector3, _coreV: BABYLON.Vector3, _endV: BABYLON.Vector3): void;
553
- static RandomNumBoth(_Min: any, _Max: any): void;
554
- }
555
-
556
- export class ToolTips {
557
- app: App;
558
- url: string;
559
- ele: HTMLDivElement;
560
- time: number;
561
- id: string;
562
- isOK: boolean;
563
- _text: string;
564
- constructor(_parent: HTMLElement, _app: App);
565
- update(_e: BABYLON.PointerInfo): void;
566
- close(): void;
567
- setBackground(_url: string): void;
568
- }
569
-
570
- export class VisualAngle {
571
- alpha: number;
572
- focus: BABYLON.Vector3;
573
- radius: number;
574
- beta: number;
575
- minimumLimit: number;
576
- maximumLimit: number;
577
- minBeta: number;
578
- maxBeta: number;
579
- setVisual(_visual: any): void;
580
- setLimit(_miniLimit: number, _maxiLimit: number): void;
581
- setBeta(_minBeta: number, _maxBeta: number): void;
582
- }
583
- }
584
-
585
- export default class App {
586
- canvas: HTMLCanvasElement;
587
- engine: BABYLON.Engine;
588
- scene: BABYLON.Scene;
589
- Camera: Camera;
590
- HighlightLayer: BABYLON.HighlightLayer;
591
- container: BABYLON.GUI.AdvancedDynamicTexture;
592
- fps: HTMLDivElement;
593
- Resources: Resources;
594
- Environment: Environment;
595
- Project: Project;
596
- ToolTips: ToolTips;
597
- constructor(_config: {
598
- container: HTMLElement;
599
- sl?: string;
600
- rl?: string;
601
- });
602
- load(_config: {
603
- pk: string;
604
- progress?: Function;
605
- complete?: Function;
606
- }): Promise<void>;
607
- }
608
-
609
- export default class Capacity {
610
- anchor: IObject;
611
- mesh: BABYLON.Mesh;
612
- ratio: number;
613
- color: string;
614
- textMesh: BABYLON.Mesh;
615
- constructor(_object: IObject, _RATIO: number);
616
- dispose(): void;
617
- }
618
-
619
- export default class CapacityBuilder {
620
- static createCapacity(_obj: IObject, _RATIO: number, _text: string, _fontSize?: string): void;
621
- static createTextMesh(_obj: IObject, _text: string, _RATIO: number, _fontSize?: string, _color?: string): void;
622
- }
623
-
624
- export default class EffectMgr {
625
- static colors: {};
626
- static init(): void;
627
- }
628
-
629
- export enum EffectType {
630
- Opaque = 0,
631
- Flash = 1,
632
- Transparent = 2
633
- }
634
-
635
- export default class Environment {
636
- app: App;
637
- lights: any;
638
- _color: BABYLON.Color4;
639
- background: BABYLON.Layer;
640
- reflexEnabled: boolean;
641
- reflexIntensity: number;
642
- constructor(_app: App);
643
- set fogDistance(_value: number);
644
- set color(_value: BABYLON.Color4);
645
- reflex(_url: string, _intensity: number): void;
646
- setBackground(_url: string): void;
647
- setReflexEnabled(_reflexEnabled: boolean): void;
648
- setFlexIntensity(_intensity: number): void;
649
- defaultLights(): void;
650
- offAllLight(): void;
651
- openAllLight(): void;
652
- loadLight(_Lights: Array<any>): void;
653
- }
654
-
655
- export enum EventType {
656
- leftClick = "leftClick",
657
- rightClick = "rightClick",
658
- doubleClick = "doubleClick",
659
- eover = "eover",
660
- longPress = "longPress",
661
- out = "out"
662
- }
663
-
664
- export default class HeatMap implements BaseNode {
665
- id: string;
666
- scene: BABYLON.Scene;
667
- anchor: string;
668
- mesh: BABYLON.Mesh;
669
- texts: Array<BABYLON.GUI.TextBlock>;
670
- constructor(_anchor: string);
671
- isEnabled(_bool: boolean): void;
672
- set displayValues(_value: boolean);
673
- dispose(): void;
674
- }
675
-
676
- export default class HeatMapBuilder {
677
- static createMatrixHeatMap(_data: {
678
- anchor: BABYLON.Mesh | BABYLON.InstancedMesh;
679
- rootUrl: string;
680
- FogTex: BABYLON.Texture;
681
- container: BABYLON.GUI.AdvancedDynamicTexture;
682
- config: {
683
- maxX: number;
684
- maxY: number;
685
- data: Array<{
686
- x: number;
687
- y: number;
688
- value: number;
689
- }>;
690
- };
691
- displayValues: boolean;
692
- height: number;
693
- isLevelRender: boolean;
694
- isAlpha: boolean;
695
- isParticle: boolean;
696
- radius: number;
697
- range: {
698
- max: number;
699
- min: number;
700
- };
701
- }): void;
702
- static createColumnarHeatMap(_data: {
703
- anchor: BABYLON.Mesh | BABYLON.InstancedMesh;
704
- FogTex: BABYLON.Texture;
705
- container: BABYLON.GUI.AdvancedDynamicTexture;
706
- config: Array<{
707
- index: number;
708
- value: number;
709
- }>;
710
- isLevelRender: boolean;
711
- displayValues: boolean;
712
- isAlpha: boolean;
713
- isParticle: boolean;
714
- radius: number;
715
- range: {
716
- max: number;
717
- min: number;
718
- };
719
- }): void;
720
- }
721
-
722
- export default class Icon implements BaseNode {
723
- id: string;
724
- scene: BABYLON.Scene;
725
- pint: BABYLON.Mesh;
726
- rect: BABYLON.GUI.Rectangle;
727
- onPointerClick: Function;
728
- size: {
729
- width: number;
730
- height: number;
731
- };
732
- height: number;
733
- container: BABYLON.GUI.AdvancedDynamicTexture;
734
- constructor(_id: string, _scene: BABYLON.Scene);
735
- set background(_url: string);
736
- setTexts(_textArr: [{
737
- text: string;
738
- fontSize: string;
739
- color: string;
740
- top: number;
741
- left: number;
742
- }]): void;
743
- line(_line: {
744
- width: number;
745
- color: string;
746
- }): void;
747
- dispose(): void;
748
- isEnabled(_isEnabled: boolean): void;
749
- }
750
-
751
- export default class IconFromMesh implements BaseNode {
752
- id: string;
753
- scene: BABYLON.Scene;
754
- instance: BABYLON.Mesh;
755
- url: string;
756
- scaling: number;
757
- constructor(_id: string, _anchor: BABYLON.Vector3, _url: string, _scaling: number, _height: number, _scene: BABYLON.Scene);
758
- setBackground(): void;
759
- addEventListener(_action: Function): void;
760
- setColor(_color: string): void;
761
- setContents(_textArr: [{
762
- text: string;
763
- fontSize: string;
764
- top: number;
765
- left: number;
766
- color?: string;
767
- }]): void;
768
- dispose(): void;
769
- isEnabled(_bool: boolean): void;
770
- }
771
-
772
- export default class Project {
773
- app: App;
774
- id: string;
775
- root: IObject;
776
- current: IObject;
777
- Sight: Sight;
778
- objectDatas: Dictionary<IObject>;
779
- constructor(_app: App);
780
- delete(): void;
781
- optimization(): void;
782
- computeView(): void;
783
- getChildNodes(_id: string): void;
784
- getTrees(): void;
785
- find(_id: string): void;
786
- findFormObjectType(_type: ObjectType, _isCurent?: boolean): void;
787
- show(): void;
788
- getBounding(): void;
789
- flyTo(): void;
790
- }
791
-
792
- export default class UI {
793
- static createIconFromMesh(_id: string, _anchor: IObject, _url: string, _scaling: number, _height: number): void;
794
- static createIcon(_id: string, _anchor: IObject, _size: {
795
- width: number;
796
- height: number;
797
- }, _height: number): void;
798
- }
799
-
800
- export default class Directional extends LightObject {
801
- direction: BABYLON.Vector3;
802
- position: BABYLON.Vector3;
803
- light: BABYLON.DirectionalLight;
804
- load(): void;
805
- }
806
-
807
- export default class Hemispheric extends LightObject {
808
- direction: BABYLON.Vector3;
809
- light: BABYLON.HemisphericLight;
810
- load(): void;
811
- }
812
-
813
- export default interface ILightObject {
814
- id: string;
815
- sceneId: string;
816
- name: string;
817
- light: BABYLON.Light;
818
- color: string;
819
- lightType: string;
820
- intensity: number;
821
- load: Function;
822
- }
823
-
824
- export default class LightObject implements ILightObject {
825
- id: string;
826
- sceneId: string;
827
- name: string;
828
- light: BABYLON.Light;
829
- color: string;
830
- objectType: string;
831
- lightType: string;
832
- intensity: number;
833
- app: App;
834
- constructor(_app: App);
835
- load(): void;
836
- }
837
-
838
- export enum LightType {
839
- Point = "Point",
840
- Spot = "Spot",
841
- Directional = "Directional",
842
- Hemispheric = "Hemispheric"
843
- }
844
- let typeFromat: Function;
845
- export default typeFromat;
846
-
847
- export default class Point extends LightObject {
848
- position: BABYLON.Vector3;
849
- light: BABYLON.PointLight;
850
- range: number;
851
- load(): void;
852
- }
853
-
854
- export default class Spot extends LightObject {
855
- direction: BABYLON.Vector3;
856
- position: BABYLON.Vector3;
857
- angle: number;
858
- exponent: number;
859
- range: number;
860
- light: BABYLON.SpotLight;
861
- load(): void;
862
- }
863
-
864
- export default class CabinetObject extends DefaultObject {
865
- }
866
-
867
- export default class ConduitObject extends DefaultObject {
868
- alpha: number;
869
- color: string;
870
- bind(_m: any): void;
871
- setColor(_r: number, _b: number, _g: number): void;
872
- reColor(): void;
873
- computeView(): void;
874
- setFlash(_level?: number): void;
875
- setOpaque(): void;
876
- setTransparent(_alpha?: number): void;
877
- }
878
-
879
- export default class CornerObject extends DefaultObject {
880
- height: number;
881
- bind(_m: any): void;
882
- }
883
-
884
- export default class DefaultObject implements IObject {
885
- app: App;
886
- id: string;
887
- name: string;
888
- parentId: string;
889
- modelId: string;
890
- instance: BABYLON.Mesh | BABYLON.InstancedMesh;
891
- objectType: string;
892
- modelType: string;
893
- action: BABYLON.ActionManager;
894
- executes: Dictionary<BABYLON.ExecuteCodeAction>;
895
- clickEvents: Dictionary<Function>;
896
- touchtime: number;
897
- effectType: EffectType;
898
- Sight: Sight;
899
- animation: boolean;
900
- isloop: boolean;
901
- isAutoPlay: boolean;
902
- constructor(_app: App);
903
- showBoundingBox: boolean;
904
- setEnabled(_value: boolean): void;
905
- bind(_m: any): void;
906
- computeView(): void;
907
- optimization(_isOptimization: boolean): void;
908
- alwaysActive(): void;
909
- addEventListener(_type: string, _callback: Function): void;
910
- removeEventListener(_type: string): void;
911
- setFlash(_level: number): void;
912
- setOpaque(): void;
913
- setTransparent(_alpha?: number): void;
914
- play(): void;
915
- stop(): void;
916
- flyTo(): void;
917
- focus(): void;
918
- }
919
-
920
- export default class DoorObject extends DefaultObject {
921
- height: number;
922
- bind(_m: any): void;
923
- }
924
-
925
- export default class FloorObject extends DefaultObject {
926
- height: number;
927
- bind(_m: any): void;
928
- }
929
-
930
- export default interface IBase {
931
- app: App;
932
- id: string;
933
- name: string;
934
- parentId: string;
935
- objectType: string;
936
- }
937
-
938
- export default interface IObject extends IBase {
939
- modelId: string;
940
- instance: BABYLON.Mesh | BABYLON.InstancedMesh;
941
- modelType: string;
942
- Sight: Sight;
943
- effectType: EffectType;
944
- bind(_m?: any): any;
945
- optimization(isOptimization: boolean): any;
946
- showBoundingBox: boolean;
947
- setFlash(level: number): any;
948
- setTransparent(): any;
949
- setOpaque(): any;
950
- setEnabled(isEnabled: any): any;
951
- addEventListener(type: string, callback: Function): any;
952
- removeEventListener(type: string): any;
953
- play(isloop: boolean): any;
954
- stop(): any;
955
- flyTo(): any;
956
- focus(): any;
957
- computeView(): any;
958
- }
959
-
960
- export default class LeakWaterObject extends DefaultObject {
961
- bind(_l: any): void;
962
- computeView(): void;
963
- addEventListener(_type: string, _callback: Function): void;
964
- removeEventListener(_type: string): void;
965
- }
966
-
967
- export enum ObjectType {
968
- Campus = "Campus",
969
- Building = "Building",
970
- Scene = "Scene",
971
- Humiture = "Humiture",
972
- Battery = "Battery",
973
- PowerCabinet = "PowerCabinet",
974
- Cabinet = "Cabinet",
975
- AirCondition = "AirCondition",
976
- UPS = "UPS",
977
- Camera = "Camera",
978
- NewWindMachine = "NewWindMachine",
979
- SmokeDetector = "SmokeDetector",
980
- AudibleVisualAlarm = "AudibleVisualAlarm",
981
- LeakWater = "LeakWater",
982
- Wall = "Wall",
983
- Floor = "Floor",
984
- Window = "Window",
985
- Door = "Door",
986
- AirFlow = "AirFlow",
987
- Corner = "Corner",
988
- FireFighting = "FireFighting",
989
- Lighting = "Lighting",
990
- Enclosure = "Enclosure",
991
- ParkingLot = "ParkingLot",
992
- Elevator = "Elevator",
993
- Other = "Other",
994
- InrackAsset = "InrackAsset",
995
- GasDetection = "GasDetection",
996
- Security = "Security",
997
- OutDoorScene = "OutDoorScene",
998
- Infrared = "Infrared",
999
- SkyBox = "SkyBox",
1000
- UI3D = "UI3D",
1001
- ColdTongDoor = "ColdTongDoor",
1002
- VirtualBox = "VirtualBox",
1003
- PathPint = "PathPint",
1004
- Port = "Port",
1005
- Positioner = "Positioner",
1006
- AutoAnimation = "AutoAnimation",
1007
- MapModel = "MapModel",
1008
- radiator = "radiator",
1009
- Conduit = "Conduit",
1010
- Region = "Region",
1011
- optimizedWall = "optimizedWall"
1012
- }
1013
-
1014
- export default class RegionObject extends DefaultObject {
1015
- index: number;
1016
- height: number;
1017
- constructor(app: App, _storey: any);
1018
- bind(_storey: any, _isOptimized?: boolean): void;
1019
- computeView(): void;
1020
- flyTo(): void;
1021
- focus(): void;
1022
- setEnabled(_value: boolean): void;
1023
- getBounding(): void;
1024
- dispose(): void;
1025
- }
1026
-
1027
- export default class UI3DTextObject extends DefaultObject {
1028
- bind(_u: any): void;
1029
- }
1030
-
1031
- export default class VirtualBoxObject extends DefaultObject {
1032
- bind(_m: any): Promise<void>;
1033
- }
1034
-
1035
- export default class WallObject extends DefaultObject {
1036
- nativeMaterial: BABYLON.StandardMaterial;
1037
- baseModel: any;
1038
- height: number;
1039
- bind(_w: any): void;
1040
- }
1041
-
1042
- export default class WindowObject extends DefaultObject {
1043
- height: number;
1044
- bind(_m: any): void;
1045
- }
1046
-
1047
- export default class ArrayEx<T> extends Array<T> {
1048
- remove(_val: any): void;
1049
- }
1050
-
1051
- export default interface BaseNode {
1052
- id: string;
1053
- scene: BABYLON.Scene;
1054
- dispose(): any;
1055
- isEnabled(bool: boolean): any;
1056
- }
1057
-
1058
- export default class Camera {
1059
- app: App;
1060
- camera: BABYLON.ArcRotateCamera;
1061
- frustrum: number;
1062
- isOverLook: boolean;
1063
- constructor(_app: App);
1064
- orthographic(): void;
1065
- perspective(): void;
1066
- focusingFromProperty(_visualAngle: Sight): void;
1067
- flyTo(_visualAngle: Sight, _sheep?: number): void;
1068
- translation(_visualAngle: Sight, _sheep?: number): void;
1069
- computeCameraView(): void;
1070
- _wheel(_p: any): void;
1071
- }
1072
-
1073
- export default class Dictionary<T> {
1074
- map: {
1075
- [key: string]: T;
1076
- };
1077
- constructor();
1078
- add(_key: string, _value: T): void;
1079
- find(_key: string): void;
1080
- remove(_key: string): void;
1081
- termRemove(_callback: Function): void;
1082
- showAll(): void;
1083
- count(): void;
1084
- clear(): void;
1085
- }
1086
-
1087
- export default class GUID {
1088
- static getGUID(_length: number): void;
1089
- }
1090
-
1091
- export default class Resources {
1092
- app: App;
1093
- walls: Dictionary<BABYLON.AbstractMesh>;
1094
- resources: Dictionary<BABYLON.AssetContainer>;
1095
- ndoeMats: Dictionary<BABYLON.NodeMaterial>;
1096
- transparentBox: BABYLON.Mesh;
1097
- BOX: BABYLON.Mesh;
1098
- FogTex: BABYLON.Texture;
1099
- constructor(_app: App);
1100
- loadModelMesh(_baseModel: any): Promise<void>;
1101
- loadModelMeshAsync(_baseModel: any, _callback: Function): void;
1102
- Materials: Dictionary<BABYLON.StandardMaterial>;
1103
- Textures: Dictionary<BABYLON.Texture>;
1104
- GetMaterial(_textureData: any, _scene: BABYLON.Scene): void;
1105
- GetTexture(_textureData: any, _scene: BABYLON.Scene): void;
1106
- MergeMaterials: Dictionary<BABYLON.CustomMaterial>;
1107
- GetMergeMaterial(_textureData: any, _scene: BABYLON.Scene): void;
1108
- delete(_isAll?: boolean): void;
1109
- GetWalls(_url: string, _projectId: string): Promise<void>;
1110
- }
1111
-
1112
- export default class Sight {
1113
- alpha: number;
1114
- focus: BABYLON.Vector3;
1115
- radius: number;
1116
- beta: number;
1117
- minimumLimit: number;
1118
- maximumLimit: number;
1119
- minBeta: number;
1120
- maxBeta: number;
1121
- setVisual(_visual: any): void;
1122
- setLimit(_miniLimit: number, _maxiLimit: number): void;
1123
- setBeta(_minBeta: number, _maxBeta: number): void;
1124
- }
1125
-
1126
- export default class Tools {
1127
- static vector3ToJson(_old: BABYLON.Vector3): any;
1128
- static vector3ARRToJson(_olds: BABYLON.Vector3[]): void;
1129
- static ToVector3(_old: any): void;
1130
- static ToARRVector3(_olds: any[]): void;
1131
- static computeBounds(_mscene: BABYLON.Mesh): void;
1132
- static computeBoundsToARR(_meshs: Array<BABYLON.Mesh>): void;
1133
- static Expand(_polygon: Array<BABYLON.Vector3>, _expand: number): void;
1134
- static norm(_x: number, _y: number): void;
1135
- static MergeMeshes(_meshes: Array<BABYLON.Mesh>, _app: App): void;
1136
- static DeconsTructMesh(_mesh: any, _height: any, _app: App): void;
1137
- static getVisualAngle(_bound: BABYLON.BoundingInfo, _app: App): void;
1138
- static pathTransformation(_oldPath: Array<BABYLON.Vector3>, _radius: number): void;
1139
- static createTube(_id: string, _paths: Array<BABYLON.Vector3>, _radius: number, _app: App): void;
1140
- static getAngleFromVector2(_startV: BABYLON.Vector2, _coreV: BABYLON.Vector2, _endV: BABYLON.Vector2): void;
1141
- static getAngleFromVector3(_startV: BABYLON.Vector3, _coreV: BABYLON.Vector3, _endV: BABYLON.Vector3): void;
1142
- static RandomNumBoth(_Min: any, _Max: any): void;
1143
- }
1144
-
1145
- export default class ToolTips {
1146
- app: App;
1147
- url: string;
1148
- ele: HTMLDivElement;
1149
- time: number;
1150
- id: string;
1151
- isOK: boolean;
1152
- _text: string;
1153
- constructor(_parent: HTMLElement, _app: App);
1154
- update(_e: BABYLON.PointerInfo): void;
1155
- close(): void;
1156
- setBackground(_url: string): void;
1157
- }
1158
-
1159
- export default class App {
1160
- canvas: HTMLCanvasElement;
1161
- engine: BABYLON.Engine;
1162
- scene: BABYLON.Scene;
1163
- Camera: Camera;
1164
- HighlightLayer: BABYLON.HighlightLayer;
1165
- container: BABYLON.GUI.AdvancedDynamicTexture;
1166
- fps: HTMLDivElement;
1167
- Resources: Resources;
1168
- Environment: Environment;
1169
- Project: Project;
1170
- ToolTips: ToolTips;
1171
- constructor(_config: {
1172
- container: HTMLElement;
1173
- sl?: string;
1174
- rl?: string;
1175
- });
1176
- load(_config: {
1177
- pk: string;
1178
- progress?: Function;
1179
- complete?: Function;
1180
- }): Promise<void>;
1181
- }
1182
-
1183
- export default class Capacity {
1184
- anchor: IObject;
1185
- mesh: BABYLON.Mesh;
1186
- ratio: number;
1187
- color: string;
1188
- textMesh: BABYLON.Mesh;
1189
- constructor(_object: IObject, _RATIO: number);
1190
- dispose(): void;
1191
- }
1192
-
1193
- export default class CapacityBuilder {
1194
- static createCapacity(_obj: IObject, _RATIO: number, _text: string, _fontSize?: string): void;
1195
- static createTextMesh(_obj: IObject, _text: string, _RATIO: number, _fontSize?: string, _color?: string): void;
1196
- }
1197
-
1198
- export default class EffectMgr {
1199
- static colors: {};
1200
- static init(): void;
1201
- }
1202
-
1203
- export enum EffectType {
1204
- Opaque = 0,
1205
- Flash = 1,
1206
- Transparent = 2
1207
- }
1208
-
1209
- export default class Environment {
1210
- app: App;
1211
- lights: any;
1212
- _color: BABYLON.Color4;
1213
- background: BABYLON.Layer;
1214
- reflexEnabled: boolean;
1215
- reflexIntensity: number;
1216
- constructor(_app: App);
1217
- set fogDistance(_value: number);
1218
- set color(_value: BABYLON.Color4);
1219
- reflex(_url: string, _intensity: number): void;
1220
- setBackground(_url: string): void;
1221
- setReflexEnabled(_reflexEnabled: boolean): void;
1222
- setFlexIntensity(_intensity: number): void;
1223
- defaultLights(): void;
1224
- offAllLight(): void;
1225
- openAllLight(): void;
1226
- loadLight(_Lights: Array<any>): void;
1227
- }
1228
-
1229
- export enum EventType {
1230
- leftClick = "leftClick",
1231
- rightClick = "rightClick",
1232
- doubleClick = "doubleClick",
1233
- eover = "eover",
1234
- longPress = "longPress",
1235
- out = "out"
1236
- }
1237
-
1238
- export default class HeatMap implements BaseNode {
1239
- id: string;
1240
- scene: BABYLON.Scene;
1241
- anchor: string;
1242
- mesh: BABYLON.Mesh;
1243
- texts: Array<BABYLON.GUI.TextBlock>;
1244
- constructor(_anchor: string);
1245
- isEnabled(_bool: boolean): void;
1246
- set displayValues(_value: boolean);
1247
- dispose(): void;
1248
- }
1249
-
1250
- export default class HeatMapBuilder {
1251
- static createMatrixHeatMap(_data: {
1252
- anchor: BABYLON.Mesh | BABYLON.InstancedMesh;
1253
- rootUrl: string;
1254
- FogTex: BABYLON.Texture;
1255
- container: BABYLON.GUI.AdvancedDynamicTexture;
1256
- config: {
1257
- maxX: number;
1258
- maxY: number;
1259
- data: Array<{
1260
- x: number;
1261
- y: number;
1262
- value: number;
1263
- }>;
1264
- };
1265
- displayValues: boolean;
1266
- height: number;
1267
- isLevelRender: boolean;
1268
- isAlpha: boolean;
1269
- isParticle: boolean;
1270
- radius: number;
1271
- range: {
1272
- max: number;
1273
- min: number;
1274
- };
1275
- }): void;
1276
- static createColumnarHeatMap(_data: {
1277
- anchor: BABYLON.Mesh | BABYLON.InstancedMesh;
1278
- FogTex: BABYLON.Texture;
1279
- container: BABYLON.GUI.AdvancedDynamicTexture;
1280
- config: Array<{
1281
- index: number;
1282
- value: number;
1283
- }>;
1284
- isLevelRender: boolean;
1285
- displayValues: boolean;
1286
- isAlpha: boolean;
1287
- isParticle: boolean;
1288
- radius: number;
1289
- range: {
1290
- max: number;
1291
- min: number;
1292
- };
1293
- }): void;
1294
- }
1295
-
1296
- export default class Icon implements BaseNode {
1297
- id: string;
1298
- scene: BABYLON.Scene;
1299
- pint: BABYLON.Mesh;
1300
- rect: BABYLON.GUI.Rectangle;
1301
- onPointerClick: Function;
1302
- size: {
1303
- width: number;
1304
- height: number;
1305
- };
1306
- height: number;
1307
- container: BABYLON.GUI.AdvancedDynamicTexture;
1308
- constructor(_id: string, _scene: BABYLON.Scene);
1309
- set background(_url: string);
1310
- setTexts(_textArr: [{
1311
- text: string;
1312
- fontSize: string;
1313
- color: string;
1314
- top: number;
1315
- left: number;
1316
- }]): void;
1317
- line(_line: {
1318
- width: number;
1319
- color: string;
1320
- }): void;
1321
- dispose(): void;
1322
- isEnabled(_isEnabled: boolean): void;
1323
- }
1324
-
1325
- export default class IconFromMesh implements BaseNode {
1326
- id: string;
1327
- scene: BABYLON.Scene;
1328
- instance: BABYLON.Mesh;
1329
- url: string;
1330
- scaling: number;
1331
- constructor(_id: string, _anchor: BABYLON.Vector3, _url: string, _scaling: number, _height: number, _scene: BABYLON.Scene);
1332
- setBackground(): void;
1333
- addEventListener(_action: Function): void;
1334
- setColor(_color: string): void;
1335
- setContents(_textArr: [{
1336
- text: string;
1337
- fontSize: string;
1338
- top: number;
1339
- left: number;
1340
- color?: string;
1341
- }]): void;
1342
- dispose(): void;
1343
- isEnabled(_bool: boolean): void;
1344
- }
1345
-
1346
- export default class Project {
1347
- app: App;
1348
- id: string;
1349
- root: IObject;
1350
- current: IObject;
1351
- Sight: Sight;
1352
- objectDatas: Dictionary<IObject>;
1353
- constructor(_app: App);
1354
- delete(): void;
1355
- optimization(): void;
1356
- computeView(): void;
1357
- getChildNodes(_id: string): void;
1358
- getTrees(): void;
1359
- find(_id: string): void;
1360
- findFormObjectType(_type: ObjectType, _isCurent?: boolean): void;
1361
- show(): void;
1362
- getBounding(): void;
1363
- flyTo(): void;
1364
- }
1365
-
1366
- export default class UI {
1367
- static createIconFromMesh(_id: string, _anchor: IObject, _url: string, _scaling: number, _height: number): void;
1368
- static createIcon(_id: string, _anchor: IObject, _size: {
1369
- width: number;
1370
- height: number;
1371
- }, _height: number): void;
1372
- }
1373
-
1374
- export default class Directional extends LightObject {
1375
- direction: BABYLON.Vector3;
1376
- position: BABYLON.Vector3;
1377
- light: BABYLON.DirectionalLight;
1378
- load(): void;
1379
- }
1380
-
1381
- export default class Hemispheric extends LightObject {
1382
- direction: BABYLON.Vector3;
1383
- light: BABYLON.HemisphericLight;
1384
- load(): void;
1385
- }
1386
-
1387
- export default interface ILightObject {
1388
- id: string;
1389
- sceneId: string;
1390
- name: string;
1391
- light: BABYLON.Light;
1392
- color: string;
1393
- lightType: string;
1394
- intensity: number;
1395
- load: Function;
1396
- }
1397
-
1398
- export default class LightObject implements ILightObject {
1399
- id: string;
1400
- sceneId: string;
1401
- name: string;
1402
- light: BABYLON.Light;
1403
- color: string;
1404
- objectType: string;
1405
- lightType: string;
1406
- intensity: number;
1407
- app: App;
1408
- constructor(_app: App);
1409
- load(): void;
1410
- }
1411
-
1412
- export enum LightType {
1413
- Point = "Point",
1414
- Spot = "Spot",
1415
- Directional = "Directional",
1416
- Hemispheric = "Hemispheric"
1417
- }
1418
- let typeFromat: Function;
1419
- export default typeFromat;
1420
-
1421
- export default class Point extends LightObject {
1422
- position: BABYLON.Vector3;
1423
- light: BABYLON.PointLight;
1424
- range: number;
1425
- load(): void;
1426
- }
1427
-
1428
- export default class Spot extends LightObject {
1429
- direction: BABYLON.Vector3;
1430
- position: BABYLON.Vector3;
1431
- angle: number;
1432
- exponent: number;
1433
- range: number;
1434
- light: BABYLON.SpotLight;
1435
- load(): void;
1436
- }
1437
-
1438
- export default class CabinetObject extends DefaultObject {
1439
- }
1440
-
1441
- export default class ConduitObject extends DefaultObject {
1442
- alpha: number;
1443
- color: string;
1444
- bind(_m: any): void;
1445
- setColor(_r: number, _b: number, _g: number): void;
1446
- reColor(): void;
1447
- computeView(): void;
1448
- setFlash(_level?: number): void;
1449
- setOpaque(): void;
1450
- setTransparent(_alpha?: number): void;
1451
- }
1452
-
1453
- export default class CornerObject extends DefaultObject {
1454
- height: number;
1455
- bind(_m: any): void;
1456
- }
1457
-
1458
- export default class DefaultObject implements IObject {
1459
- app: App;
1460
- id: string;
1461
- name: string;
1462
- parentId: string;
1463
- modelId: string;
1464
- instance: BABYLON.Mesh | BABYLON.InstancedMesh;
1465
- objectType: string;
1466
- modelType: string;
1467
- action: BABYLON.ActionManager;
1468
- executes: Dictionary<BABYLON.ExecuteCodeAction>;
1469
- clickEvents: Dictionary<Function>;
1470
- touchtime: number;
1471
- effectType: EffectType;
1472
- Sight: Sight;
1473
- animation: boolean;
1474
- isloop: boolean;
1475
- isAutoPlay: boolean;
1476
- constructor(_app: App);
1477
- showBoundingBox: boolean;
1478
- setEnabled(_value: boolean): void;
1479
- bind(_m: any): void;
1480
- computeView(): void;
1481
- optimization(_isOptimization: boolean): void;
1482
- alwaysActive(): void;
1483
- addEventListener(_type: string, _callback: Function): void;
1484
- removeEventListener(_type: string): void;
1485
- setFlash(_level: number): void;
1486
- setOpaque(): void;
1487
- setTransparent(_alpha?: number): void;
1488
- play(): void;
1489
- stop(): void;
1490
- flyTo(): void;
1491
- focus(): void;
1492
- }
1493
-
1494
- export default class DoorObject extends DefaultObject {
1495
- height: number;
1496
- bind(_m: any): void;
1497
- }
1498
-
1499
- export default class FloorObject extends DefaultObject {
1500
- height: number;
1501
- bind(_m: any): void;
1502
- }
1503
-
1504
- export default interface IBase {
1505
- app: App;
1506
- id: string;
1507
- name: string;
1508
- parentId: string;
1509
- objectType: string;
1510
- }
1511
-
1512
- export default interface IObject extends IBase {
1513
- modelId: string;
1514
- instance: BABYLON.Mesh | BABYLON.InstancedMesh;
1515
- modelType: string;
1516
- Sight: Sight;
1517
- effectType: EffectType;
1518
- bind(_m?: any): any;
1519
- optimization(isOptimization: boolean): any;
1520
- showBoundingBox: boolean;
1521
- setFlash(level: number): any;
1522
- setTransparent(): any;
1523
- setOpaque(): any;
1524
- setEnabled(isEnabled: any): any;
1525
- addEventListener(type: string, callback: Function): any;
1526
- removeEventListener(type: string): any;
1527
- play(isloop: boolean): any;
1528
- stop(): any;
1529
- flyTo(): any;
1530
- focus(): any;
1531
- computeView(): any;
1532
- }
1533
-
1534
- export default class LeakWaterObject extends DefaultObject {
1535
- bind(_l: any): void;
1536
- computeView(): void;
1537
- addEventListener(_type: string, _callback: Function): void;
1538
- removeEventListener(_type: string): void;
1539
- }
1540
-
1541
- export enum ObjectType {
1542
- Campus = "Campus",
1543
- Building = "Building",
1544
- Scene = "Scene",
1545
- Humiture = "Humiture",
1546
- Battery = "Battery",
1547
- PowerCabinet = "PowerCabinet",
1548
- Cabinet = "Cabinet",
1549
- AirCondition = "AirCondition",
1550
- UPS = "UPS",
1551
- Camera = "Camera",
1552
- NewWindMachine = "NewWindMachine",
1553
- SmokeDetector = "SmokeDetector",
1554
- AudibleVisualAlarm = "AudibleVisualAlarm",
1555
- LeakWater = "LeakWater",
1556
- Wall = "Wall",
1557
- Floor = "Floor",
1558
- Window = "Window",
1559
- Door = "Door",
1560
- AirFlow = "AirFlow",
1561
- Corner = "Corner",
1562
- FireFighting = "FireFighting",
1563
- Lighting = "Lighting",
1564
- Enclosure = "Enclosure",
1565
- ParkingLot = "ParkingLot",
1566
- Elevator = "Elevator",
1567
- Other = "Other",
1568
- InrackAsset = "InrackAsset",
1569
- GasDetection = "GasDetection",
1570
- Security = "Security",
1571
- OutDoorScene = "OutDoorScene",
1572
- Infrared = "Infrared",
1573
- SkyBox = "SkyBox",
1574
- UI3D = "UI3D",
1575
- ColdTongDoor = "ColdTongDoor",
1576
- VirtualBox = "VirtualBox",
1577
- PathPint = "PathPint",
1578
- Port = "Port",
1579
- Positioner = "Positioner",
1580
- AutoAnimation = "AutoAnimation",
1581
- MapModel = "MapModel",
1582
- radiator = "radiator",
1583
- Conduit = "Conduit",
1584
- Region = "Region",
1585
- optimizedWall = "optimizedWall"
1586
- }
1587
-
1588
- export default class RegionObject extends DefaultObject {
1589
- index: number;
1590
- height: number;
1591
- constructor(app: App, _storey: any);
1592
- bind(_storey: any, _isOptimized?: boolean): void;
1593
- computeView(): void;
1594
- flyTo(): void;
1595
- focus(): void;
1596
- setEnabled(_value: boolean): void;
1597
- getBounding(): void;
1598
- dispose(): void;
1599
- }
1600
-
1601
- export default class UI3DTextObject extends DefaultObject {
1602
- bind(_u: any): void;
1603
- }
1604
-
1605
- export default class VirtualBoxObject extends DefaultObject {
1606
- bind(_m: any): Promise<void>;
1607
- }
1608
-
1609
- export default class WallObject extends DefaultObject {
1610
- nativeMaterial: BABYLON.StandardMaterial;
1611
- baseModel: any;
1612
- height: number;
1613
- bind(_w: any): void;
1614
- }
1615
-
1616
- export default class WindowObject extends DefaultObject {
1617
- height: number;
1618
- bind(_m: any): void;
1619
- }
1620
-
1621
- export default class ArrayEx<T> extends Array<T> {
1622
- remove(_val: any): void;
1623
- }
1624
-
1625
- export default interface BaseNode {
1626
- id: string;
1627
- scene: BABYLON.Scene;
1628
- dispose(): any;
1629
- isEnabled(bool: boolean): any;
1630
- }
1631
-
1632
- export default class Camera {
1633
- app: App;
1634
- camera: BABYLON.ArcRotateCamera;
1635
- frustrum: number;
1636
- isOverLook: boolean;
1637
- constructor(_app: App);
1638
- orthographic(): void;
1639
- perspective(): void;
1640
- focusingFromProperty(_visualAngle: Sight): void;
1641
- flyTo(_visualAngle: Sight, _sheep?: number): void;
1642
- translation(_visualAngle: Sight, _sheep?: number): void;
1643
- computeCameraView(): void;
1644
- _wheel(_p: any): void;
1645
- }
1646
-
1647
- export default class Dictionary<T> {
1648
- map: {
1649
- [key: string]: T;
1650
- };
1651
- constructor();
1652
- add(_key: string, _value: T): void;
1653
- find(_key: string): void;
1654
- remove(_key: string): void;
1655
- termRemove(_callback: Function): void;
1656
- showAll(): void;
1657
- count(): void;
1658
- clear(): void;
1659
- }
1660
-
1661
- export default class GUID {
1662
- static getGUID(_length: number): void;
1663
- }
1664
-
1665
- export default class Resources {
1666
- app: App;
1667
- walls: Dictionary<BABYLON.AbstractMesh>;
1668
- resources: Dictionary<BABYLON.AssetContainer>;
1669
- ndoeMats: Dictionary<BABYLON.NodeMaterial>;
1670
- transparentBox: BABYLON.Mesh;
1671
- BOX: BABYLON.Mesh;
1672
- FogTex: BABYLON.Texture;
1673
- constructor(_app: App);
1674
- loadModelMesh(_baseModel: any): Promise<void>;
1675
- loadModelMeshAsync(_baseModel: any, _callback: Function): void;
1676
- Materials: Dictionary<BABYLON.StandardMaterial>;
1677
- Textures: Dictionary<BABYLON.Texture>;
1678
- GetMaterial(_textureData: any, _scene: BABYLON.Scene): void;
1679
- GetTexture(_textureData: any, _scene: BABYLON.Scene): void;
1680
- MergeMaterials: Dictionary<BABYLON.CustomMaterial>;
1681
- GetMergeMaterial(_textureData: any, _scene: BABYLON.Scene): void;
1682
- delete(_isAll?: boolean): void;
1683
- GetWalls(_url: string, _projectId: string): Promise<void>;
1684
- }
1685
-
1686
- export default class Sight {
1687
- alpha: number;
1688
- focus: BABYLON.Vector3;
1689
- radius: number;
1690
- beta: number;
1691
- minimumLimit: number;
1692
- maximumLimit: number;
1693
- minBeta: number;
1694
- maxBeta: number;
1695
- setVisual(_visual: any): void;
1696
- setLimit(_miniLimit: number, _maxiLimit: number): void;
1697
- setBeta(_minBeta: number, _maxBeta: number): void;
1698
- }
1699
-
1700
- export default class Tools {
1701
- static vector3ToJson(_old: BABYLON.Vector3): any;
1702
- static vector3ARRToJson(_olds: BABYLON.Vector3[]): void;
1703
- static ToVector3(_old: any): void;
1704
- static ToARRVector3(_olds: any[]): void;
1705
- static computeBounds(_mscene: BABYLON.Mesh): void;
1706
- static computeBoundsToARR(_meshs: Array<BABYLON.Mesh>): void;
1707
- static Expand(_polygon: Array<BABYLON.Vector3>, _expand: number): void;
1708
- static norm(_x: number, _y: number): void;
1709
- static MergeMeshes(_meshes: Array<BABYLON.Mesh>, _app: App): void;
1710
- static DeconsTructMesh(_mesh: any, _height: any, _app: App): void;
1711
- static getVisualAngle(_bound: BABYLON.BoundingInfo, _app: App): void;
1712
- static pathTransformation(_oldPath: Array<BABYLON.Vector3>, _radius: number): void;
1713
- static createTube(_id: string, _paths: Array<BABYLON.Vector3>, _radius: number, _app: App): void;
1714
- static getAngleFromVector2(_startV: BABYLON.Vector2, _coreV: BABYLON.Vector2, _endV: BABYLON.Vector2): void;
1715
- static getAngleFromVector3(_startV: BABYLON.Vector3, _coreV: BABYLON.Vector3, _endV: BABYLON.Vector3): void;
1716
- static RandomNumBoth(_Min: any, _Max: any): void;
1717
- }
1718
-
1719
- export default class ToolTips {
1720
- app: App;
1721
- url: string;
1722
- ele: HTMLDivElement;
1723
- time: number;
1724
- id: string;
1725
- isOK: boolean;
1726
- _text: string;
1727
- constructor(_parent: HTMLElement, _app: App);
1728
- update(_e: BABYLON.PointerInfo): void;
1729
- close(): void;
1730
- setBackground(_url: string): void;
1731
- }
1732
-
1733
- export default class App {
1734
- canvas: HTMLCanvasElement;
1735
- engine: BABYLON.Engine;
1736
- scene: BABYLON.Scene;
1737
- Camera: Camera;
1738
- HighlightLayer: BABYLON.HighlightLayer;
1739
- container: BABYLON.GUI.AdvancedDynamicTexture;
1740
- fps: HTMLDivElement;
1741
- Resources: Resources;
1742
- Environment: Environment;
1743
- Project: Project;
1744
- ToolTips: ToolTips;
1745
- constructor(_config: {
1746
- container: HTMLElement;
1747
- sl?: string;
1748
- rl?: string;
1749
- });
1750
- load(_config: {
1751
- pk: string;
1752
- progress?: Function;
1753
- complete?: Function;
1754
- }): Promise<void>;
1755
- }
1756
-
1757
- export default class Capacity {
1758
- anchor: IObject;
1759
- mesh: BABYLON.Mesh;
1760
- ratio: number;
1761
- color: string;
1762
- textMesh: BABYLON.Mesh;
1763
- constructor(_object: IObject, _RATIO: number);
1764
- dispose(): void;
1765
- }
1766
-
1767
- export default class CapacityBuilder {
1768
- static createCapacity(_obj: IObject, _RATIO: number, _text: string, _fontSize?: string): void;
1769
- static createTextMesh(_obj: IObject, _text: string, _RATIO: number, _fontSize?: string, _color?: string): void;
1770
- }
1771
-
1772
- export default class EffectMgr {
1773
- static colors: {};
1774
- static init(): void;
1775
- }
1776
-
1777
- export enum EffectType {
1778
- Opaque = 0,
1779
- Flash = 1,
1780
- Transparent = 2
1781
- }
1782
-
1783
- export default class Environment {
1784
- app: App;
1785
- lights: any;
1786
- _color: BABYLON.Color4;
1787
- background: BABYLON.Layer;
1788
- reflexEnabled: boolean;
1789
- reflexIntensity: number;
1790
- constructor(_app: App);
1791
- set fogDistance(_value: number);
1792
- set color(_value: BABYLON.Color4);
1793
- reflex(_url: string, _intensity: number): void;
1794
- setBackground(_url: string): void;
1795
- setReflexEnabled(_reflexEnabled: boolean): void;
1796
- setFlexIntensity(_intensity: number): void;
1797
- defaultLights(): void;
1798
- offAllLight(): void;
1799
- openAllLight(): void;
1800
- loadLight(_Lights: Array<any>): void;
1801
- }
1802
-
1803
- export enum EventType {
1804
- leftClick = "leftClick",
1805
- rightClick = "rightClick",
1806
- doubleClick = "doubleClick",
1807
- eover = "eover",
1808
- longPress = "longPress",
1809
- out = "out"
1810
- }
1811
-
1812
- export default class HeatMap implements BaseNode {
1813
- id: string;
1814
- scene: BABYLON.Scene;
1815
- anchor: string;
1816
- mesh: BABYLON.Mesh;
1817
- texts: Array<BABYLON.GUI.TextBlock>;
1818
- constructor(_anchor: string);
1819
- isEnabled(_bool: boolean): void;
1820
- set displayValues(_value: boolean);
1821
- dispose(): void;
1822
- }
1823
-
1824
- export default class HeatMapBuilder {
1825
- static createMatrixHeatMap(_data: {
1826
- anchor: BABYLON.Mesh | BABYLON.InstancedMesh;
1827
- rootUrl: string;
1828
- FogTex: BABYLON.Texture;
1829
- container: BABYLON.GUI.AdvancedDynamicTexture;
1830
- config: {
1831
- maxX: number;
1832
- maxY: number;
1833
- data: Array<{
1834
- x: number;
1835
- y: number;
1836
- value: number;
1837
- }>;
1838
- };
1839
- displayValues: boolean;
1840
- height: number;
1841
- isLevelRender: boolean;
1842
- isAlpha: boolean;
1843
- isParticle: boolean;
1844
- radius: number;
1845
- range: {
1846
- max: number;
1847
- min: number;
1848
- };
1849
- }): void;
1850
- static createColumnarHeatMap(_data: {
1851
- anchor: BABYLON.Mesh | BABYLON.InstancedMesh;
1852
- FogTex: BABYLON.Texture;
1853
- container: BABYLON.GUI.AdvancedDynamicTexture;
1854
- config: Array<{
1855
- index: number;
1856
- value: number;
1857
- }>;
1858
- isLevelRender: boolean;
1859
- displayValues: boolean;
1860
- isAlpha: boolean;
1861
- isParticle: boolean;
1862
- radius: number;
1863
- range: {
1864
- max: number;
1865
- min: number;
1866
- };
1867
- }): void;
1868
- }
1869
-
1870
- export default class Icon implements BaseNode {
1871
- id: string;
1872
- scene: BABYLON.Scene;
1873
- pint: BABYLON.Mesh;
1874
- rect: BABYLON.GUI.Rectangle;
1875
- onPointerClick: Function;
1876
- size: {
1877
- width: number;
1878
- height: number;
1879
- };
1880
- height: number;
1881
- container: BABYLON.GUI.AdvancedDynamicTexture;
1882
- constructor(_id: string, _scene: BABYLON.Scene);
1883
- set background(_url: string);
1884
- setTexts(_textArr: [{
1885
- text: string;
1886
- fontSize: string;
1887
- color: string;
1888
- top: number;
1889
- left: number;
1890
- }]): void;
1891
- line(_line: {
1892
- width: number;
1893
- color: string;
1894
- }): void;
1895
- dispose(): void;
1896
- isEnabled(_isEnabled: boolean): void;
1897
- }
1898
-
1899
- export default class IconFromMesh implements BaseNode {
1900
- id: string;
1901
- scene: BABYLON.Scene;
1902
- instance: BABYLON.Mesh;
1903
- url: string;
1904
- scaling: number;
1905
- constructor(_id: string, _anchor: BABYLON.Vector3, _url: string, _scaling: number, _height: number, _scene: BABYLON.Scene);
1906
- setBackground(): void;
1907
- addEventListener(_action: Function): void;
1908
- setColor(_color: string): void;
1909
- setContents(_textArr: [{
1910
- text: string;
1911
- fontSize: string;
1912
- top: number;
1913
- left: number;
1914
- color?: string;
1915
- }]): void;
1916
- dispose(): void;
1917
- isEnabled(_bool: boolean): void;
1918
- }
1919
-
1920
- export default class Project {
1921
- app: App;
1922
- id: string;
1923
- root: IObject;
1924
- current: IObject;
1925
- Sight: Sight;
1926
- objectDatas: Dictionary<IObject>;
1927
- constructor(_app: App);
1928
- delete(): void;
1929
- optimization(): void;
1930
- computeView(): void;
1931
- getChildNodes(_id: string): void;
1932
- getTrees(): void;
1933
- find(_id: string): void;
1934
- findFormObjectType(_type: ObjectType, _isCurent?: boolean): void;
1935
- show(): void;
1936
- getBounding(): void;
1937
- flyTo(): void;
1938
- }
1939
-
1940
- export default class UI {
1941
- static createIconFromMesh(_id: string, _anchor: IObject, _url: string, _scaling: number, _height: number): void;
1942
- static createIcon(_id: string, _anchor: IObject, _size: {
1943
- width: number;
1944
- height: number;
1945
- }, _height: number): void;
1946
- }
1947
-
1948
- export default class Directional extends LightObject {
1949
- direction: BABYLON.Vector3;
1950
- position: BABYLON.Vector3;
1951
- light: BABYLON.DirectionalLight;
1952
- load(): void;
1953
- }
1954
-
1955
- export default class Hemispheric extends LightObject {
1956
- direction: BABYLON.Vector3;
1957
- light: BABYLON.HemisphericLight;
1958
- load(): void;
1959
- }
1960
-
1961
- export default interface ILightObject {
1962
- id: string;
1963
- sceneId: string;
1964
- name: string;
1965
- light: BABYLON.Light;
1966
- color: string;
1967
- lightType: string;
1968
- intensity: number;
1969
- load: Function;
1970
- }
1971
-
1972
- export default class LightObject implements ILightObject {
1973
- id: string;
1974
- sceneId: string;
1975
- name: string;
1976
- light: BABYLON.Light;
1977
- color: string;
1978
- objectType: string;
1979
- lightType: string;
1980
- intensity: number;
1981
- app: App;
1982
- constructor(_app: App);
1983
- load(): void;
1984
- }
1985
-
1986
- export enum LightType {
1987
- Point = "Point",
1988
- Spot = "Spot",
1989
- Directional = "Directional",
1990
- Hemispheric = "Hemispheric"
1991
- }
1992
- let typeFromat: Function;
1993
- export default typeFromat;
1994
-
1995
- export default class Point extends LightObject {
1996
- position: BABYLON.Vector3;
1997
- light: BABYLON.PointLight;
1998
- range: number;
1999
- load(): void;
2000
- }
2001
-
2002
- export default class Spot extends LightObject {
2003
- direction: BABYLON.Vector3;
2004
- position: BABYLON.Vector3;
2005
- angle: number;
2006
- exponent: number;
2007
- range: number;
2008
- light: BABYLON.SpotLight;
2009
- load(): void;
2010
- }
2011
-
2012
- export default class CabinetObject extends DefaultObject {
2013
- }
2014
-
2015
- export default class ConduitObject extends DefaultObject {
2016
- alpha: number;
2017
- color: string;
2018
- bind(_m: any): void;
2019
- setColor(_r: number, _b: number, _g: number): void;
2020
- reColor(): void;
2021
- computeView(): void;
2022
- setFlash(_level?: number): void;
2023
- setOpaque(): void;
2024
- setTransparent(_alpha?: number): void;
2025
- }
2026
-
2027
- export default class CornerObject extends DefaultObject {
2028
- height: number;
2029
- bind(_m: any): void;
2030
- }
2031
-
2032
- export default class DefaultObject implements IObject {
2033
- app: App;
2034
- id: string;
2035
- name: string;
2036
- parentId: string;
2037
- modelId: string;
2038
- instance: BABYLON.Mesh | BABYLON.InstancedMesh;
2039
- objectType: string;
2040
- modelType: string;
2041
- action: BABYLON.ActionManager;
2042
- executes: Dictionary<BABYLON.ExecuteCodeAction>;
2043
- clickEvents: Dictionary<Function>;
2044
- touchtime: number;
2045
- effectType: EffectType;
2046
- Sight: Sight;
2047
- animation: boolean;
2048
- isloop: boolean;
2049
- isAutoPlay: boolean;
2050
- constructor(_app: App);
2051
- showBoundingBox: boolean;
2052
- setEnabled(_value: boolean): void;
2053
- bind(_m: any): void;
2054
- computeView(): void;
2055
- optimization(_isOptimization: boolean): void;
2056
- alwaysActive(): void;
2057
- addEventListener(_type: string, _callback: Function): void;
2058
- removeEventListener(_type: string): void;
2059
- setFlash(_level: number): void;
2060
- setOpaque(): void;
2061
- setTransparent(_alpha?: number): void;
2062
- play(): void;
2063
- stop(): void;
2064
- flyTo(): void;
2065
- focus(): void;
2066
- }
2067
-
2068
- export default class DoorObject extends DefaultObject {
2069
- height: number;
2070
- bind(_m: any): void;
2071
- }
2072
-
2073
- export default class FloorObject extends DefaultObject {
2074
- height: number;
2075
- bind(_m: any): void;
2076
- }
2077
-
2078
- export default interface IBase {
2079
- app: App;
2080
- id: string;
2081
- name: string;
2082
- parentId: string;
2083
- objectType: string;
2084
- }
2085
-
2086
- export default interface IObject extends IBase {
2087
- modelId: string;
2088
- instance: BABYLON.Mesh | BABYLON.InstancedMesh;
2089
- modelType: string;
2090
- Sight: Sight;
2091
- effectType: EffectType;
2092
- bind(_m?: any): any;
2093
- optimization(isOptimization: boolean): any;
2094
- showBoundingBox: boolean;
2095
- setFlash(level: number): any;
2096
- setTransparent(): any;
2097
- setOpaque(): any;
2098
- setEnabled(isEnabled: any): any;
2099
- addEventListener(type: string, callback: Function): any;
2100
- removeEventListener(type: string): any;
2101
- play(isloop: boolean): any;
2102
- stop(): any;
2103
- flyTo(): any;
2104
- focus(): any;
2105
- computeView(): any;
2106
- }
2107
-
2108
- export default class LeakWaterObject extends DefaultObject {
2109
- bind(_l: any): void;
2110
- computeView(): void;
2111
- addEventListener(_type: string, _callback: Function): void;
2112
- removeEventListener(_type: string): void;
2113
- }
2114
-
2115
- export enum ObjectType {
2116
- Campus = "Campus",
2117
- Building = "Building",
2118
- Scene = "Scene",
2119
- Humiture = "Humiture",
2120
- Battery = "Battery",
2121
- PowerCabinet = "PowerCabinet",
2122
- Cabinet = "Cabinet",
2123
- AirCondition = "AirCondition",
2124
- UPS = "UPS",
2125
- Camera = "Camera",
2126
- NewWindMachine = "NewWindMachine",
2127
- SmokeDetector = "SmokeDetector",
2128
- AudibleVisualAlarm = "AudibleVisualAlarm",
2129
- LeakWater = "LeakWater",
2130
- Wall = "Wall",
2131
- Floor = "Floor",
2132
- Window = "Window",
2133
- Door = "Door",
2134
- AirFlow = "AirFlow",
2135
- Corner = "Corner",
2136
- FireFighting = "FireFighting",
2137
- Lighting = "Lighting",
2138
- Enclosure = "Enclosure",
2139
- ParkingLot = "ParkingLot",
2140
- Elevator = "Elevator",
2141
- Other = "Other",
2142
- InrackAsset = "InrackAsset",
2143
- GasDetection = "GasDetection",
2144
- Security = "Security",
2145
- OutDoorScene = "OutDoorScene",
2146
- Infrared = "Infrared",
2147
- SkyBox = "SkyBox",
2148
- UI3D = "UI3D",
2149
- ColdTongDoor = "ColdTongDoor",
2150
- VirtualBox = "VirtualBox",
2151
- PathPint = "PathPint",
2152
- Port = "Port",
2153
- Positioner = "Positioner",
2154
- AutoAnimation = "AutoAnimation",
2155
- MapModel = "MapModel",
2156
- radiator = "radiator",
2157
- Conduit = "Conduit",
2158
- Region = "Region",
2159
- optimizedWall = "optimizedWall"
2160
- }
2161
-
2162
- export default class RegionObject extends DefaultObject {
2163
- index: number;
2164
- height: number;
2165
- constructor(app: App, _storey: any);
2166
- bind(_storey: any, _isOptimized?: boolean): void;
2167
- computeView(): void;
2168
- flyTo(): void;
2169
- focus(): void;
2170
- setEnabled(_value: boolean): void;
2171
- getBounding(): void;
2172
- dispose(): void;
2173
- }
2174
-
2175
- export default class UI3DTextObject extends DefaultObject {
2176
- bind(_u: any): void;
2177
- }
2178
-
2179
- export default class VirtualBoxObject extends DefaultObject {
2180
- bind(_m: any): Promise<void>;
2181
- }
2182
-
2183
- export default class WallObject extends DefaultObject {
2184
- nativeMaterial: BABYLON.StandardMaterial;
2185
- baseModel: any;
2186
- height: number;
2187
- bind(_w: any): void;
2188
- }
2189
-
2190
- export default class WindowObject extends DefaultObject {
2191
- height: number;
2192
- bind(_m: any): void;
2193
- }
2194
-
2195
- export default class ArrayEx<T> extends Array<T> {
2196
- remove(_val: any): void;
2197
- }
2198
-
2199
- export default interface BaseNode {
2200
- id: string;
2201
- scene: BABYLON.Scene;
2202
- dispose(): any;
2203
- isEnabled(bool: boolean): any;
2204
- }
2205
-
2206
- export default class Camera {
2207
- app: App;
2208
- camera: BABYLON.ArcRotateCamera;
2209
- frustrum: number;
2210
- isOverLook: boolean;
2211
- constructor(_app: App);
2212
- orthographic(): void;
2213
- perspective(): void;
2214
- focusingFromProperty(_visualAngle: Sight): void;
2215
- flyTo(_visualAngle: Sight, _sheep?: number): void;
2216
- translation(_visualAngle: Sight, _sheep?: number): void;
2217
- computeCameraView(): void;
2218
- _wheel(_p: any): void;
2219
- }
2220
-
2221
- export default class Dictionary<T> {
2222
- map: {
2223
- [key: string]: T;
2224
- };
2225
- constructor();
2226
- add(_key: string, _value: T): void;
2227
- find(_key: string): void;
2228
- remove(_key: string): void;
2229
- termRemove(_callback: Function): void;
2230
- showAll(): void;
2231
- count(): void;
2232
- clear(): void;
2233
- }
2234
-
2235
- export default class GUID {
2236
- static getGUID(_length: number): void;
2237
- }
2238
-
2239
- export default class Resources {
2240
- app: App;
2241
- walls: Dictionary<BABYLON.AbstractMesh>;
2242
- resources: Dictionary<BABYLON.AssetContainer>;
2243
- ndoeMats: Dictionary<BABYLON.NodeMaterial>;
2244
- transparentBox: BABYLON.Mesh;
2245
- BOX: BABYLON.Mesh;
2246
- FogTex: BABYLON.Texture;
2247
- constructor(_app: App);
2248
- loadModelMesh(_baseModel: any): Promise<void>;
2249
- loadModelMeshAsync(_baseModel: any, _callback: Function): void;
2250
- Materials: Dictionary<BABYLON.StandardMaterial>;
2251
- Textures: Dictionary<BABYLON.Texture>;
2252
- GetMaterial(_textureData: any, _scene: BABYLON.Scene): void;
2253
- GetTexture(_textureData: any, _scene: BABYLON.Scene): void;
2254
- MergeMaterials: Dictionary<BABYLON.CustomMaterial>;
2255
- GetMergeMaterial(_textureData: any, _scene: BABYLON.Scene): void;
2256
- delete(_isAll?: boolean): void;
2257
- GetWalls(_url: string, _projectId: string): Promise<void>;
2258
- }
2259
-
2260
- export default class Sight {
2261
- alpha: number;
2262
- focus: BABYLON.Vector3;
2263
- radius: number;
2264
- beta: number;
2265
- minimumLimit: number;
2266
- maximumLimit: number;
2267
- minBeta: number;
2268
- maxBeta: number;
2269
- setVisual(_visual: any): void;
2270
- setLimit(_miniLimit: number, _maxiLimit: number): void;
2271
- setBeta(_minBeta: number, _maxBeta: number): void;
2272
- }
2273
-
2274
- export default class Tools {
2275
- static vector3ToJson(_old: BABYLON.Vector3): any;
2276
- static vector3ARRToJson(_olds: BABYLON.Vector3[]): void;
2277
- static ToVector3(_old: any): void;
2278
- static ToARRVector3(_olds: any[]): void;
2279
- static computeBounds(_mscene: BABYLON.Mesh): void;
2280
- static computeBoundsToARR(_meshs: Array<BABYLON.Mesh>): void;
2281
- static Expand(_polygon: Array<BABYLON.Vector3>, _expand: number): void;
2282
- static norm(_x: number, _y: number): void;
2283
- static MergeMeshes(_meshes: Array<BABYLON.Mesh>, _app: App): void;
2284
- static DeconsTructMesh(_mesh: any, _height: any, _app: App): void;
2285
- static getVisualAngle(_bound: BABYLON.BoundingInfo, _app: App): void;
2286
- static pathTransformation(_oldPath: Array<BABYLON.Vector3>, _radius: number): void;
2287
- static createTube(_id: string, _paths: Array<BABYLON.Vector3>, _radius: number, _app: App): void;
2288
- static getAngleFromVector2(_startV: BABYLON.Vector2, _coreV: BABYLON.Vector2, _endV: BABYLON.Vector2): void;
2289
- static getAngleFromVector3(_startV: BABYLON.Vector3, _coreV: BABYLON.Vector3, _endV: BABYLON.Vector3): void;
2290
- static RandomNumBoth(_Min: any, _Max: any): void;
2291
- }
2292
-
2293
- export default class ToolTips {
2294
- app: App;
2295
- url: string;
2296
- ele: HTMLDivElement;
2297
- time: number;
2298
- id: string;
2299
- isOK: boolean;
2300
- _text: string;
2301
- constructor(_parent: HTMLElement, _app: App);
2302
- update(_e: BABYLON.PointerInfo): void;
2303
- close(): void;
2304
- setBackground(_url: string): void;
2305
- }
2306
-
2307
- export default class App {
2308
- canvas: HTMLCanvasElement;
2309
- engine: BABYLON.Engine;
2310
- scene: BABYLON.Scene;
2311
- Camera: Camera;
2312
- HighlightLayer: BABYLON.HighlightLayer;
2313
- container: BABYLON.GUI.AdvancedDynamicTexture;
2314
- fps: HTMLDivElement;
2315
- Resources: Resources;
2316
- Environment: Environment;
2317
- Project: Project;
2318
- ToolTips: ToolTips;
2319
- constructor(_config: {
2320
- container: HTMLElement;
2321
- sl?: string;
2322
- rl?: string;
2323
- });
2324
- load(_config: {
2325
- pk: string;
2326
- progress?: Function;
2327
- complete?: Function;
2328
- }): Promise<void>;
2329
- }
2330
-
2331
- export default class Capacity {
2332
- anchor: IObject;
2333
- mesh: BABYLON.Mesh;
2334
- ratio: number;
2335
- color: string;
2336
- textMesh: BABYLON.Mesh;
2337
- constructor(_object: IObject, _RATIO: number);
2338
- dispose(): void;
2339
- }
2340
-
2341
- export default class CapacityBuilder {
2342
- static createCapacity(_obj: IObject, _RATIO: number, _text: string, _fontSize?: string): void;
2343
- static createTextMesh(_obj: IObject, _text: string, _RATIO: number, _fontSize?: string, _color?: string): void;
2344
- }
2345
-
2346
- export default class EffectMgr {
2347
- static colors: {};
2348
- static init(): void;
2349
- }
2350
-
2351
- export enum EffectType {
2352
- Opaque = 0,
2353
- Flash = 1,
2354
- Transparent = 2
2355
- }
2356
-
2357
- export default class Environment {
2358
- app: App;
2359
- lights: any;
2360
- _color: BABYLON.Color4;
2361
- background: BABYLON.Layer;
2362
- reflexEnabled: boolean;
2363
- reflexIntensity: number;
2364
- constructor(_app: App);
2365
- set fogDistance(_value: number);
2366
- set color(_value: BABYLON.Color4);
2367
- reflex(_url: string, _intensity: number): void;
2368
- setBackground(_url: string): void;
2369
- setReflexEnabled(_reflexEnabled: boolean): void;
2370
- setFlexIntensity(_intensity: number): void;
2371
- defaultLights(): void;
2372
- offAllLight(): void;
2373
- openAllLight(): void;
2374
- loadLight(_Lights: Array<any>): void;
2375
- }
2376
-
2377
- export enum EventType {
2378
- leftClick = "leftClick",
2379
- rightClick = "rightClick",
2380
- doubleClick = "doubleClick",
2381
- eover = "eover",
2382
- longPress = "longPress",
2383
- out = "out"
2384
- }
2385
-
2386
- export default class HeatMap implements BaseNode {
2387
- id: string;
2388
- scene: BABYLON.Scene;
2389
- anchor: string;
2390
- mesh: BABYLON.Mesh;
2391
- texts: Array<BABYLON.GUI.TextBlock>;
2392
- constructor(_anchor: string);
2393
- isEnabled(_bool: boolean): void;
2394
- set displayValues(_value: boolean);
2395
- dispose(): void;
2396
- }
2397
-
2398
- export default class HeatMapBuilder {
2399
- static createMatrixHeatMap(_data: {
2400
- anchor: BABYLON.Mesh | BABYLON.InstancedMesh;
2401
- rootUrl: string;
2402
- FogTex: BABYLON.Texture;
2403
- container: BABYLON.GUI.AdvancedDynamicTexture;
2404
- config: {
2405
- maxX: number;
2406
- maxY: number;
2407
- data: Array<{
2408
- x: number;
2409
- y: number;
2410
- value: number;
2411
- }>;
2412
- };
2413
- displayValues: boolean;
2414
- height: number;
2415
- isLevelRender: boolean;
2416
- isAlpha: boolean;
2417
- isParticle: boolean;
2418
- radius: number;
2419
- range: {
2420
- max: number;
2421
- min: number;
2422
- };
2423
- }): void;
2424
- static createColumnarHeatMap(_data: {
2425
- anchor: BABYLON.Mesh | BABYLON.InstancedMesh;
2426
- FogTex: BABYLON.Texture;
2427
- container: BABYLON.GUI.AdvancedDynamicTexture;
2428
- config: Array<{
2429
- index: number;
2430
- value: number;
2431
- }>;
2432
- isLevelRender: boolean;
2433
- displayValues: boolean;
2434
- isAlpha: boolean;
2435
- isParticle: boolean;
2436
- radius: number;
2437
- range: {
2438
- max: number;
2439
- min: number;
2440
- };
2441
- }): void;
2442
- }
2443
-
2444
- export default class Icon implements BaseNode {
2445
- id: string;
2446
- scene: BABYLON.Scene;
2447
- pint: BABYLON.Mesh;
2448
- rect: BABYLON.GUI.Rectangle;
2449
- onPointerClick: Function;
2450
- size: {
2451
- width: number;
2452
- height: number;
2453
- };
2454
- height: number;
2455
- container: BABYLON.GUI.AdvancedDynamicTexture;
2456
- constructor(_id: string, _scene: BABYLON.Scene);
2457
- set background(_url: string);
2458
- setTexts(_textArr: [{
2459
- text: string;
2460
- fontSize: string;
2461
- color: string;
2462
- top: number;
2463
- left: number;
2464
- }]): void;
2465
- line(_line: {
2466
- width: number;
2467
- color: string;
2468
- }): void;
2469
- dispose(): void;
2470
- isEnabled(_isEnabled: boolean): void;
2471
- }
2472
-
2473
- export default class IconFromMesh implements BaseNode {
2474
- id: string;
2475
- scene: BABYLON.Scene;
2476
- instance: BABYLON.Mesh;
2477
- url: string;
2478
- scaling: number;
2479
- constructor(_id: string, _anchor: BABYLON.Vector3, _url: string, _scaling: number, _height: number, _scene: BABYLON.Scene);
2480
- setBackground(): void;
2481
- addEventListener(_action: Function): void;
2482
- setColor(_color: string): void;
2483
- setContents(_textArr: [{
2484
- text: string;
2485
- fontSize: string;
2486
- top: number;
2487
- left: number;
2488
- color?: string;
2489
- }]): void;
2490
- dispose(): void;
2491
- isEnabled(_bool: boolean): void;
2492
- }
2493
-
2494
- export default class Project {
2495
- app: App;
2496
- id: string;
2497
- root: IObject;
2498
- current: IObject;
2499
- Sight: Sight;
2500
- objectDatas: Dictionary<IObject>;
2501
- constructor(_app: App);
2502
- delete(): void;
2503
- optimization(): void;
2504
- computeView(): void;
2505
- getChildNodes(_id: string): void;
2506
- getTrees(): void;
2507
- find(_id: string): void;
2508
- findFormObjectType(_type: ObjectType, _isCurent?: boolean): void;
2509
- show(): void;
2510
- getBounding(): void;
2511
- flyTo(): void;
2512
- }
2513
-
2514
- export default class UI {
2515
- static createIconFromMesh(_id: string, _anchor: IObject, _url: string, _scaling: number, _height: number): void;
2516
- static createIcon(_id: string, _anchor: IObject, _size: {
2517
- width: number;
2518
- height: number;
2519
- }, _height: number): void;
2520
- }
2521
-
2522
- export default class Directional extends LightObject {
2523
- direction: BABYLON.Vector3;
2524
- position: BABYLON.Vector3;
2525
- light: BABYLON.DirectionalLight;
2526
- load(): void;
2527
- }
2528
-
2529
- export default class Hemispheric extends LightObject {
2530
- direction: BABYLON.Vector3;
2531
- light: BABYLON.HemisphericLight;
2532
- load(): void;
2533
- }
2534
-
2535
- export default interface ILightObject {
2536
- id: string;
2537
- sceneId: string;
2538
- name: string;
2539
- light: BABYLON.Light;
2540
- color: string;
2541
- lightType: string;
2542
- intensity: number;
2543
- load: Function;
2544
- }
2545
-
2546
- export default class LightObject implements ILightObject {
2547
- id: string;
2548
- sceneId: string;
2549
- name: string;
2550
- light: BABYLON.Light;
2551
- color: string;
2552
- objectType: string;
2553
- lightType: string;
2554
- intensity: number;
2555
- app: App;
2556
- constructor(_app: App);
2557
- load(): void;
2558
- }
2559
-
2560
- export enum LightType {
2561
- Point = "Point",
2562
- Spot = "Spot",
2563
- Directional = "Directional",
2564
- Hemispheric = "Hemispheric"
2565
- }
2566
- let typeFromat: Function;
2567
- export default typeFromat;
2568
-
2569
- export default class Point extends LightObject {
2570
- position: BABYLON.Vector3;
2571
- light: BABYLON.PointLight;
2572
- range: number;
2573
- load(): void;
2574
- }
2575
-
2576
- export default class Spot extends LightObject {
2577
- direction: BABYLON.Vector3;
2578
- position: BABYLON.Vector3;
2579
- angle: number;
2580
- exponent: number;
2581
- range: number;
2582
- light: BABYLON.SpotLight;
2583
- load(): void;
2584
- }
2585
-
2586
- export default class CabinetObject extends DefaultObject {
2587
- }
2588
-
2589
- export default class ConduitObject extends DefaultObject {
2590
- alpha: number;
2591
- color: string;
2592
- bind(_m: any): void;
2593
- setColor(_r: number, _b: number, _g: number): void;
2594
- reColor(): void;
2595
- computeView(): void;
2596
- setFlash(_level?: number): void;
2597
- setOpaque(): void;
2598
- setTransparent(_alpha?: number): void;
2599
- }
2600
-
2601
- export default class CornerObject extends DefaultObject {
2602
- height: number;
2603
- bind(_m: any): void;
2604
- }
2605
-
2606
- export default class DefaultObject implements IObject {
2607
- app: App;
2608
- id: string;
2609
- name: string;
2610
- parentId: string;
2611
- modelId: string;
2612
- instance: BABYLON.Mesh | BABYLON.InstancedMesh;
2613
- objectType: string;
2614
- modelType: string;
2615
- action: BABYLON.ActionManager;
2616
- executes: Dictionary<BABYLON.ExecuteCodeAction>;
2617
- clickEvents: Dictionary<Function>;
2618
- touchtime: number;
2619
- effectType: EffectType;
2620
- Sight: Sight;
2621
- animation: boolean;
2622
- isloop: boolean;
2623
- isAutoPlay: boolean;
2624
- constructor(_app: App);
2625
- showBoundingBox: boolean;
2626
- setEnabled(_value: boolean): void;
2627
- bind(_m: any): void;
2628
- computeView(): void;
2629
- optimization(_isOptimization: boolean): void;
2630
- alwaysActive(): void;
2631
- addEventListener(_type: string, _callback: Function): void;
2632
- removeEventListener(_type: string): void;
2633
- setFlash(_level: number): void;
2634
- setOpaque(): void;
2635
- setTransparent(_alpha?: number): void;
2636
- play(): void;
2637
- stop(): void;
2638
- flyTo(): void;
2639
- focus(): void;
2640
- }
2641
-
2642
- export default class DoorObject extends DefaultObject {
2643
- height: number;
2644
- bind(_m: any): void;
2645
- }
2646
-
2647
- export default class FloorObject extends DefaultObject {
2648
- height: number;
2649
- bind(_m: any): void;
2650
- }
2651
-
2652
- export default interface IBase {
2653
- app: App;
2654
- id: string;
2655
- name: string;
2656
- parentId: string;
2657
- objectType: string;
2658
- }
2659
-
2660
- export default interface IObject extends IBase {
2661
- modelId: string;
2662
- instance: BABYLON.Mesh | BABYLON.InstancedMesh;
2663
- modelType: string;
2664
- Sight: Sight;
2665
- effectType: EffectType;
2666
- bind(_m?: any): any;
2667
- optimization(isOptimization: boolean): any;
2668
- showBoundingBox: boolean;
2669
- setFlash(level: number): any;
2670
- setTransparent(): any;
2671
- setOpaque(): any;
2672
- setEnabled(isEnabled: any): any;
2673
- addEventListener(type: string, callback: Function): any;
2674
- removeEventListener(type: string): any;
2675
- play(isloop: boolean): any;
2676
- stop(): any;
2677
- flyTo(): any;
2678
- focus(): any;
2679
- computeView(): any;
2680
- }
2681
-
2682
- export default class LeakWaterObject extends DefaultObject {
2683
- bind(_l: any): void;
2684
- computeView(): void;
2685
- addEventListener(_type: string, _callback: Function): void;
2686
- removeEventListener(_type: string): void;
2687
- }
2688
-
2689
- export enum ObjectType {
2690
- Campus = "Campus",
2691
- Building = "Building",
2692
- Scene = "Scene",
2693
- Humiture = "Humiture",
2694
- Battery = "Battery",
2695
- PowerCabinet = "PowerCabinet",
2696
- Cabinet = "Cabinet",
2697
- AirCondition = "AirCondition",
2698
- UPS = "UPS",
2699
- Camera = "Camera",
2700
- NewWindMachine = "NewWindMachine",
2701
- SmokeDetector = "SmokeDetector",
2702
- AudibleVisualAlarm = "AudibleVisualAlarm",
2703
- LeakWater = "LeakWater",
2704
- Wall = "Wall",
2705
- Floor = "Floor",
2706
- Window = "Window",
2707
- Door = "Door",
2708
- AirFlow = "AirFlow",
2709
- Corner = "Corner",
2710
- FireFighting = "FireFighting",
2711
- Lighting = "Lighting",
2712
- Enclosure = "Enclosure",
2713
- ParkingLot = "ParkingLot",
2714
- Elevator = "Elevator",
2715
- Other = "Other",
2716
- InrackAsset = "InrackAsset",
2717
- GasDetection = "GasDetection",
2718
- Security = "Security",
2719
- OutDoorScene = "OutDoorScene",
2720
- Infrared = "Infrared",
2721
- SkyBox = "SkyBox",
2722
- UI3D = "UI3D",
2723
- ColdTongDoor = "ColdTongDoor",
2724
- VirtualBox = "VirtualBox",
2725
- PathPint = "PathPint",
2726
- Port = "Port",
2727
- Positioner = "Positioner",
2728
- AutoAnimation = "AutoAnimation",
2729
- MapModel = "MapModel",
2730
- radiator = "radiator",
2731
- Conduit = "Conduit",
2732
- Region = "Region",
2733
- optimizedWall = "optimizedWall"
2734
- }
2735
-
2736
- export default class RegionObject extends DefaultObject {
2737
- index: number;
2738
- height: number;
2739
- constructor(app: App, _storey: any);
2740
- bind(_storey: any, _isOptimized?: boolean): void;
2741
- computeView(): void;
2742
- flyTo(): void;
2743
- focus(): void;
2744
- setEnabled(_value: boolean): void;
2745
- getBounding(): void;
2746
- dispose(): void;
2747
- }
2748
-
2749
- export default class UI3DTextObject extends DefaultObject {
2750
- bind(_u: any): void;
2751
- }
2752
-
2753
- export default class VirtualBoxObject extends DefaultObject {
2754
- bind(_m: any): Promise<void>;
2755
- }
2756
-
2757
- export default class WallObject extends DefaultObject {
2758
- nativeMaterial: BABYLON.StandardMaterial;
2759
- baseModel: any;
2760
- height: number;
2761
- bind(_w: any): void;
2762
- }
2763
-
2764
- export default class WindowObject extends DefaultObject {
2765
- height: number;
2766
- bind(_m: any): void;
2767
- }
2768
-
2769
- export default class ArrayEx<T> extends Array<T> {
2770
- remove(_val: any): void;
2771
- }
2772
-
2773
- export default interface BaseNode {
2774
- id: string;
2775
- scene: BABYLON.Scene;
2776
- dispose(): any;
2777
- isEnabled(bool: boolean): any;
2778
- }
2779
-
2780
- export default class Camera {
2781
- app: App;
2782
- camera: BABYLON.ArcRotateCamera;
2783
- frustrum: number;
2784
- isOverLook: boolean;
2785
- constructor(_app: App);
2786
- orthographic(): void;
2787
- perspective(): void;
2788
- focusingFromProperty(_visualAngle: Sight): void;
2789
- flyTo(_visualAngle: Sight, _sheep?: number): void;
2790
- translation(_visualAngle: Sight, _sheep?: number): void;
2791
- computeCameraView(): void;
2792
- _wheel(_p: any): void;
2793
- }
2794
-
2795
- export default class Dictionary<T> {
2796
- map: {
2797
- [key: string]: T;
2798
- };
2799
- constructor();
2800
- add(_key: string, _value: T): void;
2801
- find(_key: string): void;
2802
- remove(_key: string): void;
2803
- termRemove(_callback: Function): void;
2804
- showAll(): void;
2805
- count(): void;
2806
- clear(): void;
2807
- }
2808
-
2809
- export default class GUID {
2810
- static getGUID(_length: number): void;
2811
- }
2812
-
2813
- export default class Resources {
2814
- app: App;
2815
- walls: Dictionary<BABYLON.AbstractMesh>;
2816
- resources: Dictionary<BABYLON.AssetContainer>;
2817
- ndoeMats: Dictionary<BABYLON.NodeMaterial>;
2818
- transparentBox: BABYLON.Mesh;
2819
- BOX: BABYLON.Mesh;
2820
- FogTex: BABYLON.Texture;
2821
- constructor(_app: App);
2822
- loadModelMesh(_baseModel: any): Promise<void>;
2823
- loadModelMeshAsync(_baseModel: any, _callback: Function): void;
2824
- Materials: Dictionary<BABYLON.StandardMaterial>;
2825
- Textures: Dictionary<BABYLON.Texture>;
2826
- GetMaterial(_textureData: any, _scene: BABYLON.Scene): void;
2827
- GetTexture(_textureData: any, _scene: BABYLON.Scene): void;
2828
- MergeMaterials: Dictionary<BABYLON.CustomMaterial>;
2829
- GetMergeMaterial(_textureData: any, _scene: BABYLON.Scene): void;
2830
- delete(_isAll?: boolean): void;
2831
- GetWalls(_url: string, _projectId: string): Promise<void>;
2832
- }
2833
-
2834
- export default class Sight {
2835
- alpha: number;
2836
- focus: BABYLON.Vector3;
2837
- radius: number;
2838
- beta: number;
2839
- minimumLimit: number;
2840
- maximumLimit: number;
2841
- minBeta: number;
2842
- maxBeta: number;
2843
- setVisual(_visual: any): void;
2844
- setLimit(_miniLimit: number, _maxiLimit: number): void;
2845
- setBeta(_minBeta: number, _maxBeta: number): void;
2846
- }
2847
-
2848
- export default class Tools {
2849
- static vector3ToJson(_old: BABYLON.Vector3): any;
2850
- static vector3ARRToJson(_olds: BABYLON.Vector3[]): void;
2851
- static ToVector3(_old: any): void;
2852
- static ToARRVector3(_olds: any[]): void;
2853
- static computeBounds(_mscene: BABYLON.Mesh): void;
2854
- static computeBoundsToARR(_meshs: Array<BABYLON.Mesh>): void;
2855
- static Expand(_polygon: Array<BABYLON.Vector3>, _expand: number): void;
2856
- static norm(_x: number, _y: number): void;
2857
- static MergeMeshes(_meshes: Array<BABYLON.Mesh>, _app: App): void;
2858
- static DeconsTructMesh(_mesh: any, _height: any, _app: App): void;
2859
- static getVisualAngle(_bound: BABYLON.BoundingInfo, _app: App): void;
2860
- static pathTransformation(_oldPath: Array<BABYLON.Vector3>, _radius: number): void;
2861
- static createTube(_id: string, _paths: Array<BABYLON.Vector3>, _radius: number, _app: App): void;
2862
- static getAngleFromVector2(_startV: BABYLON.Vector2, _coreV: BABYLON.Vector2, _endV: BABYLON.Vector2): void;
2863
- static getAngleFromVector3(_startV: BABYLON.Vector3, _coreV: BABYLON.Vector3, _endV: BABYLON.Vector3): void;
2864
- static RandomNumBoth(_Min: any, _Max: any): void;
2865
- }
2866
-
2867
- export default class ToolTips {
2868
- app: App;
2869
- url: string;
2870
- ele: HTMLDivElement;
2871
- time: number;
2872
- id: string;
2873
- isOK: boolean;
2874
- _text: string;
2875
- constructor(_parent: HTMLElement, _app: App);
2876
- update(_e: BABYLON.PointerInfo): void;
2877
- close(): void;
2878
- setBackground(_url: string): void;
2879
- }
2880
-
2881
- export default class App {
1
+ /*
2
+ @author gzmaijing
3
+ @email mj@gzmaijing.com
4
+ */
5
+ declare module MX3D{
6
+ export class App {
2882
7
  canvas: HTMLCanvasElement;
2883
8
  engine: BABYLON.Engine;
2884
9
  scene: BABYLON.Scene;
@@ -2903,7 +28,7 @@ export default class App {
2903
28
  dispose(): void;
2904
29
  }
2905
30
 
2906
- export default class Capacity {
31
+ export class Capacity {
2907
32
  anchor: IObject;
2908
33
  mesh: BABYLON.Mesh;
2909
34
  ratio: number;
@@ -2913,12 +38,12 @@ export default class Capacity {
2913
38
  dispose(): void;
2914
39
  }
2915
40
 
2916
- export default class CapacityBuilder {
41
+ export class CapacityBuilder {
2917
42
  static createCapacity(_obj: IObject, _RATIO: number, _text: string, _fontSize?: string): void;
2918
43
  static createTextMesh(_obj: IObject, _text: string, _RATIO: number, _fontSize?: string, _color?: string): void;
2919
44
  }
2920
45
 
2921
- export default class EffectMgr {
46
+ export class EffectMgr {
2922
47
  static colors: {};
2923
48
  static init(): void;
2924
49
  }
@@ -2929,7 +54,7 @@ export enum EffectType {
2929
54
  Transparent = 2
2930
55
  }
2931
56
 
2932
- export default class Environment {
57
+ export class Environment {
2933
58
  app: App;
2934
59
  lights: any;
2935
60
  _color: BABYLON.Color4;
@@ -2964,7 +89,7 @@ export enum EventType {
2964
89
  out = "out"
2965
90
  }
2966
91
 
2967
- export default class HeatMap implements BaseNode {
92
+ export class HeatMap implements BaseNode {
2968
93
  id: string;
2969
94
  scene: BABYLON.Scene;
2970
95
  anchor: string;
@@ -2976,7 +101,7 @@ export default class HeatMap implements BaseNode {
2976
101
  dispose(): void;
2977
102
  }
2978
103
 
2979
- export default class HeatMapBuilder {
104
+ export class HeatMapBuilder {
2980
105
  static createMatrixHeatMap(_data: {
2981
106
  anchor: BABYLON.Mesh | BABYLON.InstancedMesh;
2982
107
  rootUrl: string;
@@ -3022,7 +147,7 @@ export default class HeatMapBuilder {
3022
147
  }): void;
3023
148
  }
3024
149
 
3025
- export default class Icon implements BaseNode {
150
+ export class Icon implements BaseNode {
3026
151
  id: string;
3027
152
  scene: BABYLON.Scene;
3028
153
  pint: BABYLON.Mesh;
@@ -3051,7 +176,7 @@ export default class Icon implements BaseNode {
3051
176
  isEnabled(_isEnabled: boolean): void;
3052
177
  }
3053
178
 
3054
- export default class IconFromMesh implements BaseNode {
179
+ export class IconFromMesh implements BaseNode {
3055
180
  id: string;
3056
181
  scene: BABYLON.Scene;
3057
182
  instance: BABYLON.Mesh;
@@ -3072,7 +197,7 @@ export default class IconFromMesh implements BaseNode {
3072
197
  isEnabled(_bool: boolean): void;
3073
198
  }
3074
199
 
3075
- export default class UI {
200
+ export class UI {
3076
201
  static createIconFromMesh(_id: string, _anchor: IObject, _url: string, _scaling: number, _height: number): void;
3077
202
  static createIcon(_id: string, _anchor: IObject, _size: {
3078
203
  width: number;
@@ -3080,20 +205,20 @@ export default class UI {
3080
205
  }, _height: number): void;
3081
206
  }
3082
207
 
3083
- export default class Directional extends LightObject {
208
+ export class Directional extends LightObject {
3084
209
  direction: BABYLON.Vector3;
3085
210
  position: BABYLON.Vector3;
3086
211
  light: BABYLON.DirectionalLight;
3087
212
  load(): void;
3088
213
  }
3089
214
 
3090
- export default class Hemispheric extends LightObject {
215
+ export class Hemispheric extends LightObject {
3091
216
  direction: BABYLON.Vector3;
3092
217
  light: BABYLON.HemisphericLight;
3093
218
  load(): void;
3094
219
  }
3095
220
 
3096
- export default interface ILightObject {
221
+ export interface ILightObject {
3097
222
  id: string;
3098
223
  sceneId: string;
3099
224
  name: string;
@@ -3104,7 +229,7 @@ export default interface ILightObject {
3104
229
  load: Function;
3105
230
  }
3106
231
 
3107
- export default class LightObject implements ILightObject {
232
+ export class LightObject implements ILightObject {
3108
233
  id: string;
3109
234
  sceneId: string;
3110
235
  name: string;
@@ -3124,17 +249,15 @@ export enum LightType {
3124
249
  Directional = "Directional",
3125
250
  Hemispheric = "Hemispheric"
3126
251
  }
3127
- let typeFromat: Function;
3128
- export default typeFromat;
3129
252
 
3130
- export default class Point extends LightObject {
253
+ export class Point extends LightObject {
3131
254
  position: BABYLON.Vector3;
3132
255
  light: BABYLON.PointLight;
3133
256
  range: number;
3134
257
  load(): void;
3135
258
  }
3136
259
 
3137
- export default class Spot extends LightObject {
260
+ export class Spot extends LightObject {
3138
261
  direction: BABYLON.Vector3;
3139
262
  position: BABYLON.Vector3;
3140
263
  angle: number;
@@ -3144,10 +267,10 @@ export default class Spot extends LightObject {
3144
267
  load(): void;
3145
268
  }
3146
269
 
3147
- export default class CabinetObject extends DefaultObject {
270
+ export class CabinetObject extends DefaultObject {
3148
271
  }
3149
272
 
3150
- export default class ConduitObject extends DefaultObject {
273
+ export class ConduitObject extends DefaultObject {
3151
274
  alpha: number;
3152
275
  color: string;
3153
276
  bind(_m: any): void;
@@ -3159,12 +282,12 @@ export default class ConduitObject extends DefaultObject {
3159
282
  setTransparent(_alpha?: number): void;
3160
283
  }
3161
284
 
3162
- export default class CornerObject extends DefaultObject {
285
+ export class CornerObject extends DefaultObject {
3163
286
  height: number;
3164
287
  bind(_m: any): void;
3165
288
  }
3166
289
 
3167
- export default class DefaultObject implements IObject {
290
+ export class DefaultObject implements IObject {
3168
291
  app: App;
3169
292
  id: string;
3170
293
  name: string;
@@ -3172,7 +295,6 @@ export default class DefaultObject implements IObject {
3172
295
  modelId: string;
3173
296
  instance: BABYLON.Mesh | BABYLON.InstancedMesh;
3174
297
  objectType: string;
3175
- modelType: string;
3176
298
  action: BABYLON.ActionManager;
3177
299
  executes: Dictionary<BABYLON.ExecuteCodeAction>;
3178
300
  clickEvents: Dictionary<Function>;
@@ -3183,6 +305,8 @@ export default class DefaultObject implements IObject {
3183
305
  isloop: boolean;
3184
306
  isAutoPlay: boolean;
3185
307
  constructor(_app: App);
308
+ customNumber: string;
309
+ customType: string;
3186
310
  showBoundingBox: boolean;
3187
311
  setEnabled(_value: boolean): void;
3188
312
  bind(_m: any): void;
@@ -3200,17 +324,17 @@ export default class DefaultObject implements IObject {
3200
324
  focus(): void;
3201
325
  }
3202
326
 
3203
- export default class DoorObject extends DefaultObject {
327
+ export class DoorObject extends DefaultObject {
3204
328
  height: number;
3205
329
  bind(_m: any): void;
3206
330
  }
3207
331
 
3208
- export default class FloorObject extends DefaultObject {
332
+ export class FloorObject extends DefaultObject {
3209
333
  height: number;
3210
334
  bind(_m: any): void;
3211
335
  }
3212
336
 
3213
- export default interface IBase {
337
+ export interface IBase {
3214
338
  app: App;
3215
339
  id: string;
3216
340
  name: string;
@@ -3218,10 +342,11 @@ export default interface IBase {
3218
342
  objectType: string;
3219
343
  }
3220
344
 
3221
- export default interface IObject extends IBase {
345
+ export interface IObject extends IBase {
346
+ customNumber: string;
347
+ customType: string;
3222
348
  modelId: string;
3223
349
  instance: BABYLON.Mesh | BABYLON.InstancedMesh;
3224
- modelType: string;
3225
350
  Sight: Sight;
3226
351
  effectType: EffectType;
3227
352
  bind(_m?: any): any;
@@ -3240,7 +365,7 @@ export default interface IObject extends IBase {
3240
365
  computeView(): any;
3241
366
  }
3242
367
 
3243
- export default class LeakWaterObject extends DefaultObject {
368
+ export class LeakWaterObject extends DefaultObject {
3244
369
  bind(_l: any): void;
3245
370
  computeView(): void;
3246
371
  addEventListener(_type: string, _callback: Function): void;
@@ -3294,7 +419,7 @@ export enum ObjectType {
3294
419
  optimizedWall = "optimizedWall"
3295
420
  }
3296
421
 
3297
- export default class Project {
422
+ export class Project {
3298
423
  app: App;
3299
424
  id: string;
3300
425
  root: IObject;
@@ -3305,16 +430,17 @@ export default class Project {
3305
430
  clear(): void;
3306
431
  optimization(): void;
3307
432
  computeView(): void;
3308
- getChildNodes(_id: string): void;
3309
- getTrees(): void;
3310
- find(_id: string): void;
3311
- findFormObjectType(_type: ObjectType, _isCurent?: boolean): void;
3312
- show(): void;
3313
- getBounding(): void;
3314
- flyTo(): void;
433
+ getChildsById(_id: string, _includeSub?: boolean): void;
434
+ getSceneTree(_id?: string, _excludeTypes?: Array<string>): void;
435
+ findObjectById(_id: string): void;
436
+ findObjectsByType(_type: ObjectType): void;
437
+ computeSight(_objs: Array<IObject>): void;
438
+ findObjectByCustomNumber(): void;
439
+ findObjectsByCustomType(): void;
440
+ switchLevel(_id?: string, _isFocus?: boolean, _includeSub?: boolean): void;
3315
441
  }
3316
442
 
3317
- export default class RegionObject extends DefaultObject {
443
+ export class RegionObject extends DefaultObject {
3318
444
  index: number;
3319
445
  height: number;
3320
446
  constructor(app: App, _storey: any);
@@ -3327,38 +453,38 @@ export default class RegionObject extends DefaultObject {
3327
453
  dispose(): void;
3328
454
  }
3329
455
 
3330
- export default class UI3DTextObject extends DefaultObject {
456
+ export class UI3DTextObject extends DefaultObject {
3331
457
  bind(_u: any): void;
3332
458
  }
3333
459
 
3334
- export default class VirtualBoxObject extends DefaultObject {
460
+ export class VirtualBoxObject extends DefaultObject {
3335
461
  bind(_m: any): Promise<void>;
3336
462
  }
3337
463
 
3338
- export default class WallObject extends DefaultObject {
464
+ export class WallObject extends DefaultObject {
3339
465
  nativeMaterial: BABYLON.StandardMaterial;
3340
466
  baseModel: any;
3341
467
  height: number;
3342
468
  bind(_w: any): void;
3343
469
  }
3344
470
 
3345
- export default class WindowObject extends DefaultObject {
471
+ export class WindowObject extends DefaultObject {
3346
472
  height: number;
3347
473
  bind(_m: any): void;
3348
474
  }
3349
475
 
3350
- export default class ArrayEx<T> extends Array<T> {
476
+ export class ArrayEx<T> extends Array<T> {
3351
477
  remove(_val: any): void;
3352
478
  }
3353
479
 
3354
- export default interface BaseNode {
480
+ export interface BaseNode {
3355
481
  id: string;
3356
482
  scene: BABYLON.Scene;
3357
483
  dispose(): any;
3358
484
  isEnabled(bool: boolean): any;
3359
485
  }
3360
486
 
3361
- export default class Camera {
487
+ export class Camera {
3362
488
  app: App;
3363
489
  camera: BABYLON.ArcRotateCamera;
3364
490
  frustrum: number;
@@ -3366,14 +492,14 @@ export default class Camera {
3366
492
  constructor(_app: App);
3367
493
  orthographic(): void;
3368
494
  perspective(): void;
3369
- focusingFromProperty(_visualAngle: Sight): void;
3370
495
  flyTo(_visualAngle: Sight, _sheep?: number): void;
496
+ getSightJson(): void;
3371
497
  translation(_visualAngle: Sight, _sheep?: number): void;
3372
498
  computeCameraView(): void;
3373
499
  _wheel(_p: any): void;
3374
500
  }
3375
501
 
3376
- export default class Dictionary<T> {
502
+ export class Dictionary<T> {
3377
503
  map: {
3378
504
  [key: string]: T;
3379
505
  };
@@ -3387,11 +513,11 @@ export default class Dictionary<T> {
3387
513
  clear(): void;
3388
514
  }
3389
515
 
3390
- export default class GUID {
516
+ export class GUID {
3391
517
  static getGUID(_length: number): void;
3392
518
  }
3393
519
 
3394
- export default class Resources {
520
+ export class Resources {
3395
521
  app: App;
3396
522
  walls: Dictionary<BABYLON.AbstractMesh>;
3397
523
  resources: Dictionary<BABYLON.AssetContainer>;
@@ -3412,7 +538,7 @@ export default class Resources {
3412
538
  GetWalls(_url: string, _projectId: string): Promise<void>;
3413
539
  }
3414
540
 
3415
- export default class Sight {
541
+ export class Sight {
3416
542
  alpha: number;
3417
543
  focus: BABYLON.Vector3;
3418
544
  radius: number;
@@ -3421,12 +547,13 @@ export default class Sight {
3421
547
  maximumLimit: number;
3422
548
  minBeta: number;
3423
549
  maxBeta: number;
3424
- setVisual(_visual: any): void;
550
+ toJosn(_sightJson: any): void;
551
+ toString(): void;
3425
552
  setLimit(_miniLimit: number, _maxiLimit: number): void;
3426
553
  setBeta(_minBeta: number, _maxBeta: number): void;
3427
554
  }
3428
555
 
3429
- export default class Tools {
556
+ export class Tools {
3430
557
  static vector3ToJson(_old: BABYLON.Vector3): any;
3431
558
  static vector3ARRToJson(_olds: BABYLON.Vector3[]): void;
3432
559
  static ToVector3(_old: any): void;
@@ -3445,7 +572,7 @@ export default class Tools {
3445
572
  static RandomNumBoth(_Min: any, _Max: any): void;
3446
573
  }
3447
574
 
3448
- export default class ToolTips {
575
+ export class ToolTips {
3449
576
  app: App;
3450
577
  url: string;
3451
578
  ele: HTMLDivElement;
@@ -3460,3 +587,4 @@ export default class ToolTips {
3460
587
  dispose(): void;
3461
588
  }
3462
589
 
590
+ }