mx3d 2025.4.93 → 2025.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,131 +1,147 @@
1
- declare module 'mx3d' {
2
- let accessToken: string;
3
- let pk: string;
4
- let sl: string;
5
- let rl: string;
1
+ import * as axios from 'axios';
2
+ import { Scene } from '@babylonjs/core/scene';
3
+ import { Engine } from '@babylonjs/core/Engines/engine';
4
+ import { AdvancedDynamicTexture } from '@babylonjs/gui/2D/advancedDynamicTexture';
5
+ import { GlowLayer } from '@babylonjs/core/Layers/glowLayer';
6
+ import { PositionGizmo } from '@babylonjs/core/Gizmos/positionGizmo';
7
+ import { Vector3 } from '@babylonjs/core/Maths/math.vector';
8
+ import { Mesh } from '@babylonjs/core/Meshes/mesh';
9
+ import { InstancedMesh } from '@babylonjs/core/Meshes/instancedMesh';
10
+ import { ArcRotateCamera } from '@babylonjs/core/Cameras/arcRotateCamera';
11
+ import { FreeCamera } from '@babylonjs/core/Cameras/freeCamera';
12
+ import { StandardMaterial } from '@babylonjs/core/Materials/standardMaterial';
13
+ import { Texture } from '@babylonjs/core/Materials/Textures/texture';
14
+ import { NodeMaterial } from '@babylonjs/core/Materials/Node/nodeMaterial';
15
+ import { AbstractMesh } from '@babylonjs/core/Meshes/abstractMesh';
16
+ import { AssetContainer } from '@babylonjs/core/assetContainer';
17
+ import { CustomMaterial } from '@babylonjs/materials/custom/customMaterial';
18
+ import { PointerInfo } from '@babylonjs/core/Events/pointerEvents';
19
+ import { KeyboardInfo } from '@babylonjs/core/Events/keyboardEvents';
20
+ import { HighlightLayer } from '@babylonjs/core/Layers/highlightLayer';
21
+ import { Color3 } from '@babylonjs/core/Maths/math.color';
22
+ import { TextBlock, MultiLine, Rectangle } from '@babylonjs/gui/2D/controls';
23
+
24
+ declare enum StatusType {
25
+ Opaque = 0,
26
+ Flash = 1,
27
+ Transparent = 2
28
+ }
6
29
 
7
- export class AlarmFlashing {
8
- static colors: {
9
- 1: Runtime.Color3;
10
- 2: Runtime.Color3;
11
- 3: Runtime.Color3;
12
- 4: Runtime.Color3;
13
- 5: Runtime.Color3;
14
- 6: Runtime.Color3;
15
- };
16
- static init(): void;
17
- }
30
+ declare class Sight {
31
+ alpha: number;
32
+ focus: Vector3;
33
+ radius: number;
34
+ beta: number;
35
+ minimumLimit: number;
36
+ maximumLimit: number;
37
+ minBeta: number;
38
+ maxBeta: number;
39
+ toJosn(_sightJson: any): void;
40
+ toString(): string;
41
+ setLimit(_miniLimit: number, _maxiLimit: number): void;
42
+ setBeta(_minBeta: number, _maxBeta: number): void;
43
+ }
18
44
 
19
- export class App {
20
- canvas: HTMLCanvasElement;
21
- engine: Runtime.Engine;
22
- scene: Runtime.Scene;
23
- camera: CameraController;
24
- iEvent: IEvent;
25
- highlightLayer: Runtime.HighlightLayer;
26
- container: Runtime.AdvancedDynamicTexture;
27
- fps: HTMLDivElement;
28
- resources: Resources;
29
- environment: Environment;
30
- project: Project;
31
- toolTips: ToolTips;
32
- gl: Runtime.GlowLayer;
33
- positionGizmo: Runtime.PositionGizmo;
34
- private SM2;
35
- constructor(_config: { container: HTMLElement; sl?: string; rl?: string });
36
- load(_config: { pk?: string; fileUrl?: string; isDefaultLevel?: boolean; isDefaultMutual?: boolean; progress?: Function; complete?: Function; onError?: Function }): Promise<Error>;
37
- isDefaultMutual: boolean;
38
- set defaultMutual(value: boolean);
39
- dispose(): void;
40
- }
45
+ declare enum ObjectType {
46
+ Cabinet = "Cabinet",
47
+ RackModel = "RackModel",
48
+ Corner = "Corner",
49
+ Other = "Other",
50
+ Door = "Door",
51
+ Floor = "Floor",
52
+ LeakWater = "LeakWater",
53
+ UI3D = "UI3D",
54
+ VirtualBox = "VirtualBox",
55
+ Wall = "Wall",
56
+ Window = "Window",
57
+ Conduit = "Conduit",
58
+ Building = "Building",
59
+ Storey = "Storey",
60
+ Campus = "Campus",
61
+ Project = "Project"
62
+ }
41
63
 
42
- export class Builder {
43
- static createMatrixCloud(_data: {
44
- anchor: IObject;
45
- value: {
46
- maxX: number;
47
- maxY: number;
48
- data: Array<{
49
- x: number;
50
- y: number;
51
- value: number;
52
- }>;
53
- };
54
- displayValues: boolean;
55
- height: number;
56
- isLevelRender: boolean;
57
- isAlpha: boolean;
58
- isParticle: boolean;
59
- radius: number;
60
- range: {
61
- max: number;
62
- min: number;
63
- };
64
- }): HeatMap;
65
- private static _getMatrixParticleTex;
66
- static createPunctateCloud(_data: {
67
- anchor: IObject;
68
- value: number;
69
- radius: number;
70
- isLevelRender: boolean;
71
- displayValues: boolean;
72
- isAlpha: boolean;
73
- isParticle: boolean;
74
- range: {
75
- max: number;
76
- min: number;
77
- };
78
- }): HeatMap;
79
- static createColumnCloud(_data: {
80
- anchor: IObject;
81
- data: Array<{
82
- index: number;
83
- value: number;
84
- }>;
85
- isLevelRender: boolean;
86
- displayValues: boolean;
87
- isAlpha: boolean;
88
- isParticle: boolean;
89
- radius: number;
90
- range: {
91
- max: number;
92
- min: number;
93
- };
94
- }): HeatMap;
95
- private static _getColumnarParticleTex;
96
- private static createTempVlaue;
97
- static createCapacity(obj: IObject, RATIO: number, _text: string, _fontSize?: string): Capacity;
98
- static createTextMesh(obj: IObject, _text: string, RATIO: number, _fontSize?: string, _color?: string): Runtime.Mesh;
99
- static create2DLine(
100
- _id: string,
101
- _objs: Array<IObject>,
102
- _options?: {
103
- width: number;
104
- color: string;
105
- isDotted: boolean;
106
- },
107
- ): Line;
108
- static create3DLine(
109
- _id: string,
110
- _objs: Array<IObject>,
111
- _options?: {
112
- width: number;
113
- color: string;
114
- },
115
- ): LineFromMesh;
116
- }
64
+ declare class BaseModel {
65
+ extension: string;
66
+ groupId: string;
67
+ heat: number;
68
+ height: number;
69
+ insertTime: string;
70
+ isTiling: boolean;
71
+ length: number;
72
+ modelId: string;
73
+ modelName: string;
74
+ modelType: ObjectType;
75
+ modelTypeName: string;
76
+ width: number;
77
+ }
117
78
 
118
- export class Capacity {
119
- anchor: IObject;
120
- mesh: Runtime.Mesh;
121
- ratio: number;
122
- color: string;
123
- textMesh: Runtime.Mesh;
124
- constructor(_object: IObject, RATIO: number);
125
- dispose(): void;
126
- }
79
+ interface IBase {
80
+ app: App;
81
+ id: string;
82
+ name: string;
83
+ parentId: string;
84
+ objectType: string;
85
+ customNumber: string;
86
+ customType: string;
87
+ baseModel: BaseModel | undefined;
88
+ instance: Mesh | InstancedMesh;
89
+ Sight: Sight;
90
+ loadProperties(_m: any): void;
91
+ bind(): any;
92
+ completed(): any;
93
+ setEnabled(isEnabled: boolean): any;
94
+ toJson(): any;
95
+ getInto(_isFocus?: boolean): any;
96
+ goBack(): any;
97
+ }
98
+
99
+ declare enum EventType {
100
+ leftClick = "leftClick",
101
+ rightClick = "rightClick",
102
+ doubleClick = "doubleClick",
103
+ eover = "eover",
104
+ longPress = "longPress",
105
+ out = "out",
106
+ click = "click"
107
+ }
108
+
109
+ interface IObject extends IBase {
110
+ statusType: StatusType;
111
+ showBoundingBox: boolean;
112
+ optimization(isOptimization: boolean): any;
113
+ setFlash(level: number): any;
114
+ setTransparent(): any;
115
+ setOpaque(): any;
116
+ addEventListener(type: EventType, callback: Function): any;
117
+ removeEventListener(type: EventType): any;
118
+ computeView(): any;
119
+ alwaysActive(): any;
120
+ }
121
+
122
+ declare class CameraController {
123
+ app: App;
124
+ arcRotateCamera: ArcRotateCamera;
125
+ frustrum: number;
126
+ freeCamera: FreeCamera;
127
+ _isAutoRotation: boolean;
128
+ autoRotationSpeed: number;
129
+ constructor(_app: App);
130
+ orthographic(_object?: IBase): void;
131
+ startAutoRotation(_autoRotationSpeed?: number): void;
132
+ stopAutoRotation(): void;
133
+ perspective(_object?: IBase): void;
134
+ flyTo(_Sight?: Sight, _sheep?: number): void;
135
+ flyToObject(_object: IObject, _sheep?: number): void;
136
+ lookToTheFront(_object: IObject, _sheep?: number): void;
137
+ getSightJson(): string;
138
+ private computeCameraView;
139
+ _wheel(p: any): void;
140
+ switchArcRotateCamera(): void;
141
+ switchFPSCamera(): void;
142
+ }
127
143
 
128
- export class Environment {
144
+ declare class Environment {
129
145
  private app;
130
146
  private lights;
131
147
  private _color;
@@ -152,1036 +168,359 @@ declare module 'mx3d' {
152
168
  showFps(cssText?: string): void;
153
169
  hideFps(): void;
154
170
  showDebug(): void;
155
- }
171
+ }
172
+
173
+ declare class Dictionary<T> {
174
+ map: {
175
+ [key: string]: T;
176
+ };
177
+ constructor();
178
+ add(key: string, value: T): void;
179
+ find(key: string): T;
180
+ remove(key: string): void;
181
+ termRemove(callback: Function): void;
182
+ showAll(): void;
183
+ count(): number;
184
+ clear(): void;
185
+ }
156
186
 
157
- export class HeatMap implements BaseNode {
187
+ declare class Project {
188
+ private app;
158
189
  id: string;
159
- anchor: IObject;
160
- mesh: Runtime.Mesh;
161
- displayValue: boolean;
162
- texts: Array<Runtime.TextBlock>;
163
- constructor(_anchor: IObject);
164
- isEnabled(_bool: boolean): void;
165
- set displayValues(_value: boolean);
190
+ current: IBase;
191
+ root: string;
192
+ levelEvent: Function;
193
+ objectDatas: Dictionary<IBase>;
194
+ constructor(_app: App);
195
+ clear(): void;
196
+ optimization(): void;
197
+ getChildsById(_id: string, _includeSub?: boolean): Array<IBase>;
198
+ getSceneTree(_id?: string, _excludeTypes?: Array<string>): any;
199
+ findObjectById(_id: string): IBase;
200
+ findObjectByCustomNumber(_customNumber: string): IBase;
201
+ findObjectsByCustomType(_customType: string, queryParameters?: {
202
+ isCurrent: boolean;
203
+ isEnabled: boolean;
204
+ }): Array<IBase>;
205
+ findObjectsByType(_type: ObjectType): Array<IBase>;
206
+ computeSight(_objs: Array<IBase>): any;
207
+ switchLevel(_id?: string, _isFocus?: boolean): void;
208
+ goBack(): void;
209
+ getObjectTypes(_parentId?: string): Array<ObjectType>;
210
+ getCustomTypes(_parentId?: string): Array<ObjectType>;
211
+ }
212
+
213
+ declare class Resources {
214
+ app: App;
215
+ walls: Dictionary<AbstractMesh>;
216
+ resources: Dictionary<AssetContainer>;
217
+ ndoeMats: Dictionary<NodeMaterial>;
218
+ transparentBox: Mesh;
219
+ BOX: Mesh;
220
+ FogTex: Texture;
221
+ wallTop: StandardMaterial;
222
+ constructor(_app: App);
223
+ loadModelMesh(baseModel: any): Promise<AssetContainer>;
224
+ loadModelMeshAsync(baseModel: any, callback: Function): void;
225
+ Materials: Dictionary<StandardMaterial>;
226
+ Textures: Dictionary<Texture>;
227
+ GetMaterial(textureData: any): StandardMaterial;
228
+ GetTexture(textureData: any): Texture;
229
+ LoadLightMap(id: string, name: string): Texture;
230
+ MergeMaterials: Dictionary<CustomMaterial>;
231
+ GetMergeMaterial(textureData: any): CustomMaterial;
232
+ delete(isAll?: boolean): void;
233
+ GetWalls(url: string, projectId: string): Promise<void>;
234
+ setTransparent(_visibility?: number): void;
235
+ setTransparentById(modelId: string, _visibility?: number): void;
236
+ }
237
+
238
+ declare class ToolTips {
239
+ app: App;
240
+ url: string;
241
+ ele: HTMLDivElement;
242
+ private _text;
243
+ set text(vlaue: string);
244
+ constructor(_app: App);
245
+ update(e: PointerInfo): void;
246
+ close(): void;
247
+ setBackground(_url: string): void;
166
248
  dispose(): void;
167
- }
249
+ }
168
250
 
169
- export class Icon implements BaseNode {
170
- id: string;
171
- scene: Runtime.Scene;
172
- pint: Runtime.Mesh;
173
- private textDics;
174
- private _line;
175
- rect: Runtime.Rectangle;
176
- private _background;
177
- size: {
178
- width: number;
179
- height: number;
251
+ interface IEvent {
252
+ runRender(): void;
253
+ onPointer(e: PointerInfo): void;
254
+ onKeyboard(e: KeyboardInfo): void;
255
+ registerAfterRender(): void;
256
+ }
257
+
258
+ declare class App {
259
+ canvas: HTMLCanvasElement;
260
+ engine: Engine;
261
+ scene: Scene;
262
+ camera: CameraController;
263
+ iEvent: IEvent;
264
+ highlightLayer: HighlightLayer;
265
+ container: AdvancedDynamicTexture;
266
+ fps: HTMLDivElement;
267
+ resources: Resources;
268
+ environment: Environment;
269
+ project: Project;
270
+ toolTips: ToolTips;
271
+ gl: GlowLayer;
272
+ positionGizmo: PositionGizmo;
273
+ private SM2;
274
+ constructor(_config: {
275
+ container: HTMLElement;
276
+ sl?: string;
277
+ rl?: string;
278
+ });
279
+ load(_config: {
280
+ pk?: string;
281
+ fileUrl?: string;
282
+ isDefaultLevel?: boolean;
283
+ isDefaultMutual?: boolean;
284
+ progress?: Function;
285
+ complete?: Function;
286
+ onError?: Function;
287
+ }): Promise<Error>;
288
+ isDefaultMutual: boolean;
289
+ set defaultMutual(value: boolean);
290
+ dispose(): void;
291
+ }
292
+
293
+ declare class AlarmFlashing {
294
+ static colors: {
295
+ 1: Color3;
296
+ 2: Color3;
297
+ 3: Color3;
298
+ 4: Color3;
299
+ 5: Color3;
300
+ 6: Color3;
180
301
  };
181
- height: number;
182
- container: Runtime.AdvancedDynamicTexture;
183
- constructor(_id: string, _scene: Runtime.Scene);
184
- set background(_url: string);
185
- addEventListener(_action: Function): void;
186
- setTexts(
187
- _textArr: [
188
- {
189
- text: string;
190
- fontSize: string;
191
- color: string;
192
- top: number;
193
- left: number;
194
- },
195
- ],
196
- ): void;
197
- line(_line: { width: number; color: string }): void;
302
+ static init(): void;
303
+ }
304
+
305
+ declare class Capacity {
306
+ anchor: IObject;
307
+ mesh: Mesh;
308
+ ratio: number;
309
+ color: string;
310
+ textMesh: Mesh;
311
+ constructor(_object: IObject, RATIO: number);
198
312
  dispose(): void;
199
- isEnabled(_isEnabled: boolean): void;
200
- }
313
+ }
201
314
 
202
- export class IconFromMesh implements BaseNode {
315
+ interface BaseNode {
203
316
  id: string;
204
- scene: Runtime.Scene;
205
- instance: Runtime.Mesh;
206
- url: string;
207
- scaling: number;
208
- textArr: [
209
- {
210
- text: string;
211
- fontSize: string;
212
- top: number;
213
- left: number;
214
- color?: string;
215
- },
216
- ];
217
- constructor(_id: string, _anchor: Runtime.Vector3, _scaling: number, _height: number, _scene: Runtime.Scene);
218
- setBackground(_url: string): Promise<unknown>;
219
- addEventListener(_action: Function): void;
220
- setColor(color: string): void;
221
- setContents(
222
- _textArr: [
223
- {
224
- text: string;
225
- fontSize: string;
226
- top: number;
227
- left: number;
228
- color?: string;
229
- },
230
- ],
231
- ): Promise<unknown>;
232
- dispose(): void;
317
+ dispose(): any;
318
+ isEnabled(bool: boolean): any;
319
+ }
320
+
321
+ declare class HeatMap implements BaseNode {
322
+ id: string;
323
+ anchor: IObject;
324
+ mesh: Mesh;
325
+ displayValue: boolean;
326
+ texts: Array<TextBlock>;
327
+ constructor(_anchor: IObject);
233
328
  isEnabled(_bool: boolean): void;
234
- }
329
+ set displayValues(_value: boolean);
330
+ dispose(): void;
331
+ }
235
332
 
236
- export class Line {
333
+ declare class LineFromMesh {
237
334
  id: string;
238
335
  objs: Array<IObject>;
239
- instance: Runtime.MultiLine;
336
+ instance: Mesh;
240
337
  color: string;
241
338
  width: number;
242
- isDotted: boolean;
243
339
  update(): void;
244
340
  addEventListener(_action: Function): void;
245
341
  isEnabled(_isEnabled: boolean): void;
246
342
  dispose(): void;
247
- }
343
+ }
248
344
 
249
- export class LineFromMesh {
345
+ declare class Line {
250
346
  id: string;
251
347
  objs: Array<IObject>;
252
- instance: Runtime.Mesh;
348
+ instance: MultiLine;
253
349
  color: string;
254
350
  width: number;
351
+ isDotted: boolean;
255
352
  update(): void;
256
353
  addEventListener(_action: Function): void;
257
354
  isEnabled(_isEnabled: boolean): void;
258
355
  dispose(): void;
259
- }
260
-
261
- enum StatusType {
262
- Opaque = 0,
263
- Flash = 1,
264
- Transparent = 2,
265
- }
356
+ }
266
357
 
267
- export class UI {
268
- static createIconFromMesh(_id: string, _anchor: IObject, _scaling: number, _height: number): IconFromMesh;
269
- static createIcon(
270
- _id: string,
271
- _anchor: IObject,
272
- _size: {
273
- width: number;
358
+ declare class Builder {
359
+ static createMatrixCloud(_data: {
360
+ anchor: IObject;
361
+ value: {
362
+ maxX: number;
363
+ maxY: number;
364
+ data: Array<{
365
+ x: number;
366
+ y: number;
367
+ value: number;
368
+ }>;
369
+ };
370
+ displayValues: boolean;
274
371
  height: number;
275
- },
276
- _height: number,
277
- ): Icon;
278
- }
279
-
280
- export class TileLoader {
281
- app: App;
282
- constructor(_app: App);
283
- load(url: string): Promise<void>;
284
- }
285
-
286
- export class CloudEffect implements IEffect {
287
- app: App;
288
- cloudNum: number;
289
- canvas: HTMLCanvasElement;
290
- canvasCloudCtx: CanvasRenderingContext2D;
291
- clouds: Array<Cloud>;
292
- X: number;
293
- Y: number;
294
- constructor(_app: App);
295
- start(): void;
296
- close(): void;
297
- render(): void;
298
- clearCanvasCloud(): void;
299
- }
300
- export class Cloud {
301
- rainSpeed: number;
302
- ctx: CanvasRenderingContext2D;
303
- c: string;
304
- x: number;
305
- y: number;
306
- r: number;
307
- v: {
308
- x: number;
309
- y: number;
310
- };
311
- color: {
312
- r: number;
313
- g: number;
314
- b: number;
315
- a: number;
316
- };
317
- X: number;
318
- constructor(ctx: any, x: any, y: any, _X: any);
319
- init(x: number, y: number): void;
320
- draw(): void;
321
- gradient(): CanvasGradient;
322
- updatePosition(): void;
323
- wrapPosition(): void;
324
- render(): void;
325
- }
326
-
327
- enum EffectType {
328
- Thunder = 'Thunder',
329
- Rain = 'Rain',
330
- Cloud = 'Cloud',
331
- }
332
- export class Effect {
333
- static effects: Dictionary<IEffect>;
334
- static add(_effectType: EffectType, _app: App): void;
335
- static remove(_effectType: EffectType): void;
336
- static removeAll(): void;
337
- }
338
-
339
- interface IEffect {
340
- start: Function;
341
- close: Function;
342
- }
343
-
344
- export class RainEffect implements IEffect {
345
- app: App;
346
- rainNum: number;
347
- canvas: HTMLCanvasElement;
348
- canvasRainCtx: CanvasRenderingContext2D;
349
- rains: Array<Rain>;
350
- X: number;
351
- Y: number;
352
- constructor(_app: App);
353
- start(): void;
354
- close(): void;
355
- render(): void;
356
- clearCanvasRain(): void;
357
- }
358
- export class Rain {
359
- rainSpeed: number;
360
- ctx: CanvasRenderingContext2D;
361
- Y: number;
362
- x: number;
363
- y: number;
364
- r: number;
365
- c: string;
366
- v: {
367
- y: number;
368
- };
369
- constructor(ctx: any, x: any, y: any, r: any, _Y: any);
370
- init(x: number, y: number, r: number): void;
371
- draw(): void;
372
- updatePosition(): void;
373
- wrapPosition(): void;
374
- render(): void;
375
- }
376
-
377
- export class ThunderEffect implements IEffect {
378
- app: App;
379
- thunderNum: number;
380
- canvas: HTMLCanvasElement;
381
- canvasThunderCtx: CanvasRenderingContext2D;
382
- thunders: Array<Thunder>;
383
- X: number;
384
- Y: number;
385
- constructor(_app: App);
386
- start(): void;
387
- close(): void;
388
- render(): void;
389
- clearCanvasThunder(): void;
390
- }
391
- export class Thunder {
392
- ctx: CanvasRenderingContext2D;
393
- x: number;
394
- y: number;
395
- r: number;
396
- l: any;
397
- c: string;
398
- Y: number;
399
- X: number;
400
- constructor(ctx: any, x: any, y: any, r: any, _X: any, _Y: any);
401
- init(x: number, y: number, r: number): void;
402
- draw(): void;
403
- updateParams(): void;
404
- render(): void;
405
- }
406
-
407
- export class DefaultEvent implements IEvent {
408
- app: App;
409
- isMove: number;
410
- waitingTime: number;
411
- touchtime: number;
412
- constructor(_app: App);
413
- registerAfterRender(): void;
414
- runRender(): void;
415
- onPointer(pointerInfo: Runtime.PointerInfo): void;
416
- onKeyboard(kbInfo: Runtime.KeyboardInfo): void;
417
- }
418
-
419
- enum EventType {
420
- leftClick = 'leftClick',
421
- rightClick = 'rightClick',
422
- doubleClick = 'doubleClick',
423
- eover = 'eover',
424
- longPress = 'longPress',
425
- out = 'out',
426
- click = 'click',
427
- }
428
-
429
- export class FPSCameraEvent implements IEvent {
430
- app: App;
431
- isFPS: boolean;
432
- angle: number;
433
- direction: Runtime.Vector3;
434
- isMoveLeft: boolean;
435
- isMoveRight: boolean;
436
- isMoveDown: boolean;
437
- isMoveUp: boolean;
438
- constructor(_app: App);
439
- registerAfterRender(): void;
440
- runRender(): void;
441
- onPointer(pointerInfo: Runtime.PointerInfo): void;
442
- onKeyboard(_e: Runtime.KeyboardInfo): void;
443
- }
444
-
445
- interface IEvent {
446
- runRender(): void;
447
- onPointer(e: Runtime.PointerInfo): void;
448
- onKeyboard(e: Runtime.KeyboardInfo): void;
449
- registerAfterRender(): void;
450
- }
451
-
452
- export class ElectricMap {
453
- private container;
454
- private engine;
455
- private scene;
456
- private camera;
457
- private modelUrl;
458
- private dataUrl;
459
- private maxPotential;
460
- private minPotential;
461
- private colors;
462
- private sphere;
463
- constructor(_container: HTMLCanvasElement, _modelUrl: string, _dataUrl: string);
464
- load(): Promise<void>;
465
- setBuffer(index?: number): void;
466
- private laodData;
467
- private valueToColor;
468
- }
372
+ isLevelRender: boolean;
373
+ isAlpha: boolean;
374
+ isParticle: boolean;
375
+ radius: number;
376
+ range: {
377
+ max: number;
378
+ min: number;
379
+ };
380
+ }): HeatMap;
381
+ private static _getMatrixParticleTex;
382
+ static createPunctateCloud(_data: {
383
+ anchor: IObject;
384
+ value: number;
385
+ radius: number;
386
+ isLevelRender: boolean;
387
+ displayValues: boolean;
388
+ isAlpha: boolean;
389
+ isParticle: boolean;
390
+ range: {
391
+ max: number;
392
+ min: number;
393
+ };
394
+ }): HeatMap;
395
+ static createColumnCloud(_data: {
396
+ anchor: IObject;
397
+ data: Array<{
398
+ index: number;
399
+ value: number;
400
+ }>;
401
+ isLevelRender: boolean;
402
+ displayValues: boolean;
403
+ isAlpha: boolean;
404
+ isParticle: boolean;
405
+ radius: number;
406
+ range: {
407
+ max: number;
408
+ min: number;
409
+ };
410
+ }): HeatMap;
411
+ private static _getColumnarParticleTex;
412
+ private static createTempVlaue;
413
+ static createCapacity(obj: IObject, RATIO: number, _text: string, _fontSize?: string): Capacity;
414
+ static createTextMesh(obj: IObject, _text: string, RATIO: number, _fontSize?: string, _color?: string): Mesh;
415
+ static create2DLine(_id: string, _objs: Array<IObject>, _options?: {
416
+ width: number;
417
+ color: string;
418
+ isDotted: boolean;
419
+ }): Line;
420
+ static create3DLine(_id: string, _objs: Array<IObject>, _options?: {
421
+ width: number;
422
+ color: string;
423
+ }): LineFromMesh;
424
+ }
469
425
 
470
- export class BABYLONLayer implements CustomLayerInterface {
426
+ declare class Icon implements BaseNode {
471
427
  id: string;
472
- type: 'custom';
473
- renderingMode?: '3d' | '2d';
474
- map: Map;
475
- worldMatrix: Matrix;
476
- camera: Camera;
477
428
  scene: Scene;
478
- engine: Engine;
479
- highlightLayer: HighlightLayer;
480
- iEvent: DefaultEvent;
481
- container: AdvancedDynamicTexture;
482
- toolTips: ToolTips;
483
- environment: Environment;
484
- resources: Resources;
485
- project: Project;
486
- positionGizmo: PositionGizmo;
487
- constructor(_map: Map, _worldMatrix: Matrix);
488
- render(gl: any, matrix: any): void;
489
- onAdd(map: Map, gl: WebGLRenderingContext | WebGL2RenderingContext): Promise<void>;
490
- }
491
-
492
- export class CoordinateConverter {
493
- private sourceProjection;
494
- private targetProjection;
495
- private originXY;
496
- private translationVector;
497
- private rotationAngle;
498
- constructor(originLonLat: [number, number], originXY: Vector2, rotationAngle: number);
499
- lonLatToXY(lonLat: [number, number]): Vector2;
500
- xyToLonLat(xy: Vector2): [number, number];
501
- }
502
-
503
- export class GeoJsonLayer {
504
- static convert(container: HTMLElement): Promise<void>;
505
- }
506
-
507
- export class GisLayer {
508
- map: maplibregl.Map;
509
- worldOrigin: maplibregl.LngLatLike;
510
- worldAltitude: number;
511
- worldRotate: number[];
512
- MAPTILER_KEY: string;
513
- WEBGLLayer: BABYLONLayer;
514
- constructor(container: HTMLElement);
515
- }
516
-
517
- export class HubService {
518
- static connection: any;
519
- static listener(_Url: string): Promise<void>;
520
- static start(): Promise<void>;
521
- }
522
-
523
- export class Directional extends LightObject {
524
- direction: Runtime.Vector3;
525
- position: Runtime.Vector3;
526
- light: Runtime.DirectionalLight;
527
- load(): void;
528
- }
529
-
530
- export class Hemispheric extends LightObject {
531
- direction: Runtime.Vector3;
532
- light: Runtime.HemisphericLight;
533
- load(): void;
534
- }
535
-
536
- interface ILightObject {
537
- id: string;
538
- sceneId: string;
539
- name: string;
540
- light: Runtime.Light;
541
- color: string;
542
- lightType: string;
543
- intensity: number;
544
- load: Function;
545
- }
546
-
547
- export class LightObject implements ILightObject {
548
- id: string;
549
- sceneId: string;
550
- name: string;
551
- light: Runtime.Light;
552
- color: string;
553
- objectType: string;
554
- lightType: string;
555
- intensity: number;
556
- app: App;
557
- constructor(_app: App);
558
- load(): void;
559
- }
560
-
561
- enum LightType {
562
- Point = 'Point',
563
- Spot = 'Spot',
564
- Directional = 'Directional',
565
- Hemispheric = 'Hemispheric',
566
- }
567
- declare let typeFromat: Function;
568
- typeFromat;
569
-
570
- export class Point extends LightObject {
571
- position: Runtime.Vector3;
572
- light: Runtime.PointLight;
573
- range: number;
574
- load(): void;
575
- }
576
-
577
- export class Spot extends LightObject {
578
- direction: Runtime.Vector3;
579
- position: Runtime.Vector3;
580
- angle: number;
581
- exponent: number;
582
- range: number;
583
- light: Runtime.SpotLight;
584
- load(): void;
585
- }
586
-
587
- export class MJGLLoader {
588
- static load(app: App, _data: any, progress?: Function): Promise<void>;
589
- }
590
-
591
- export class Mx3dLoader {
592
- static load(app: App, _data: any, progress?: Function): Promise<void>;
593
- }
594
-
595
- export class Mx3dV1Loader {
596
- static load(app: App, _data: any, progress?: Function): Promise<void>;
597
- }
598
-
599
- export class BaseModel {
600
- extension: string;
601
- groupId: string;
602
- heat: number;
603
- height: number;
604
- insertTime: string;
605
- isTiling: boolean;
606
- length: number;
607
- modelId: string;
608
- modelName: string;
609
- modelType: ObjectType;
610
- modelTypeName: string;
611
- width: number;
612
- }
613
-
614
- export class BuildingObject extends DefaultObject {
615
- completed(): void;
616
- getInto(_isFocus?: boolean): void;
617
- goBack(): void;
618
- }
619
-
620
- export class CabinetObject extends DefaultObject {
621
- rack: Runtime.Mesh | Runtime.InstancedMesh;
622
- computeView(): void;
623
- setEnabled(_value: boolean): void;
624
- bind(): void;
625
- loadRacks(_data: Array<RackModel>): void;
626
- unloadRacks(): void;
627
- open(): void;
628
- close(): void;
629
- }
630
-
631
- export class CampusObject extends IRegion {
632
- position: Runtime.Vector3;
633
- rotation: Runtime.Vector3;
634
- addEventListener(_type: string, _callback: Function): void;
635
- removeEventListener(_type: string): void;
636
- setEnabled(_isEnabled: boolean): void;
637
- loadProperties(_m: any): void;
638
- bind(): void;
639
- }
640
-
641
- export class ConduitObject extends DefaultObject {
642
- alpha: number;
643
- color: string;
644
- pints: Runtime.Vector3[];
645
- radius: number;
646
- loadProperties(_m: any): void;
647
- setEnabled(_value: boolean): void;
648
- bind(): void;
649
- setColor(_color?: string): void;
650
- reColor(): void;
651
- computeView(): void;
652
- setFlash(_level?: number): void;
653
- setOpaque(): void;
654
- setTransparent(alpha?: number): void;
655
- }
656
-
657
- export class Config {
658
- static project: string;
659
- }
660
-
661
- export class CornerObject implements IObject {
662
- app: App;
663
- id: string;
664
- name: string;
665
- parentId: string;
666
- objectType: string;
667
- height: number;
668
- customNumber: string;
669
- customType: string;
670
- instance: Runtime.Mesh | Runtime.InstancedMesh;
671
- Sight: Sight;
672
- statusType: StatusType;
673
- showBoundingBox: boolean;
674
- pints: any;
675
- constructor(_app: App);
676
- getInto(): void;
677
- goBack(): void;
678
- baseModel: baseModel;
679
- loadProperties(_m: any): void;
680
- alwaysActive(): void;
681
- optimization(_isOptimization: boolean): void;
682
- setFlash(_level: number): void;
683
- setEnabled(isEnabled: any): void;
684
- addEventListener(_type: string, _callback: Function): void;
685
- removeEventListener(_type: string): void;
686
- computeView(): void;
687
- bind(): boolean;
688
- toJson(): {
689
- id: string;
690
- parentId: string;
691
- name: string;
692
- customNumber: string;
693
- customType: string;
694
- objectType: string;
695
- };
696
- completed(): void;
697
- setOpaque(): void;
698
- setTransparent(): void;
699
- }
700
-
701
- export class DefaultObject implements IObject {
702
- app: App;
703
- id: string;
704
- name: string;
705
- customNumber: string;
706
- customType: string;
707
- parentId: string;
708
- baseModel: baseModel;
709
- instance: Runtime.Mesh | Runtime.InstancedMesh;
710
- objectType: string;
711
- action: Runtime.ActionManager;
712
- executes: Dictionary<Runtime.ExecuteCodeAction>;
713
- clickEvents: Dictionary<Function>;
714
- touchtime: number;
715
- statusType: StatusType;
716
- Sight: Sight;
717
- animation: boolean;
718
- isLoop: boolean;
719
- isAutoPlay: boolean;
720
- position: Runtime.Vector3;
721
- rotation: Runtime.Vector3;
722
- scaling: Runtime.Vector3;
723
- constructor(_app: App);
724
- loadProperties(_m: any): void;
725
- setEnabled(_value: boolean): void;
726
- set showBoundingBox(_value: boolean);
727
- get showBoundingBox(): boolean;
728
- set isPickable(_value: boolean);
729
- get isPickable(): boolean;
730
- bind(): void;
731
- completed(): void;
732
- computeView(): void;
733
- optimization(_isOptimization: boolean): void;
734
- alwaysActive(): void;
735
- addEventListener(type: EventType, callback: Function): void;
736
- removeEventListener(type: string): void;
737
- setFlash(_level: number): void;
738
- setOpaque(): void;
739
- setTransparent(alpha?: number, enableEdges?: boolean): void;
740
- setColor(_color?: string): void;
741
- play(): void;
742
- stop(): void;
743
- toJson(): {
744
- id: string;
745
- parentId: string;
746
- name: string;
747
- customNumber: string;
748
- customType: string;
749
- objectType: string;
750
- };
751
- getInto(): void;
752
- goBack(): void;
753
- }
754
-
755
- export class DoorObject extends DefaultObject {
756
- height: number;
757
- loadProperties(_m: any): void;
758
- setEnabled(_value: boolean): void;
759
- bind(): void;
760
- }
761
-
762
- export class EmptyProject implements IBase {
763
- app: App;
764
- id: string;
765
- name: string;
766
- parentId: string;
767
- objectType: string;
768
- customNumber: string;
769
- customType: string;
770
- baseModel: BaseModel;
771
- instance: Mesh | InstancedMesh;
772
- Sight: Sight;
773
- storey: StoreyObject | CampusObject;
774
- loadProperties(_m: any): void;
775
- bind(): void;
776
- completed(): void;
777
- setEnabled(_isEnabled: boolean): void;
778
- toJson(): {
779
- id: string;
780
- parentId: string;
781
- name: string;
782
- objectType: string;
783
- };
784
- getInto(_isFocus?: boolean): void;
785
- goBack(): void;
786
- }
787
-
788
- export class FloorObject extends DefaultObject {
789
- height: number;
790
- vectors: Runtime.Vector3[];
791
- buckles: Runtime.Vector3[][];
792
- loadProperties(_m: any): void;
793
- setEnabled(_value: boolean): void;
794
- bind(): void;
795
- computeView(): void;
796
- setOpaque(): void;
797
- }
798
-
799
- interface IBase {
800
- app: App;
801
- id: string;
802
- name: string;
803
- parentId: string;
804
- objectType: string;
805
- customNumber: string;
806
- customType: string;
807
- baseModel: BaseModel | undefined;
808
- instance: Runtime.Mesh | Runtime.InstancedMesh;
809
- Sight: Sight;
810
- loadProperties(_m: any): void;
811
- bind(): any;
812
- completed(): any;
813
- setEnabled(isEnabled: boolean): any;
814
- toJson(): any;
815
- getInto(_isFocus?: boolean): any;
816
- goBack(): any;
817
- }
818
-
819
- interface IObject extends IBase {
820
- statusType: StatusType;
821
- showBoundingBox: boolean;
822
- optimization(isOptimization: boolean): any;
823
- setFlash(level: number): any;
824
- setTransparent(): any;
825
- setOpaque(): any;
826
- addEventListener(type: EventType, callback: Function): any;
827
- removeEventListener(type: EventType): any;
828
- computeView(): any;
829
- alwaysActive(): any;
830
- }
831
-
832
- export class IRegion implements IBase {
833
- app: App;
834
- id: string;
835
- name: string;
836
- parentId: string;
837
- objectType: string;
838
- baseModel: baseModel;
839
- customNumber: string;
840
- customType: string;
841
- autoSight: boolean;
842
- Sight: Sight;
843
- instance: Runtime.Mesh | Runtime.InstancedMesh;
844
- position: Runtime.Vector3;
845
- rotation: Runtime.Vector3;
846
- index: number;
847
- layerName: string;
848
- layerHeight: number;
849
- action: Runtime.ActionManager;
850
- executes: Dictionary<Runtime.ExecuteCodeAction>;
851
- clickEvents: Dictionary<Function>;
852
- touchtime: number;
853
- constructor(_app: App);
854
- loadProperties(_m: any): void;
855
- bind(): void;
856
- completed(): void;
857
- setEnabled(_isEnabled: boolean): void;
858
- addEventListener(type: string, callback: Function): void;
859
- removeEventListener(type: string): void;
860
- load(isOptimized: boolean, _objs: Array<any>): void;
861
- toJson(): {
862
- id: string;
863
- parentId: string;
864
- name: string;
865
- customNumber: string;
866
- customType: string;
867
- objectType: string;
868
- index: number;
869
- layerHeight: number;
870
- layerName: string;
871
- };
872
- computeView(): void;
873
- getInto(): void;
874
- goBack(): void;
875
- }
876
-
877
- export class LeakWaterObject extends DefaultObject {
878
- lines: Runtime.Vector3[];
879
- loadProperties(_l: any): void;
880
- setEnabled(_value: boolean): void;
881
- bind(): void;
882
- completed(): void;
883
- computeView(): void;
884
- addEventListener(type: string, callback: Function): void;
885
- removeEventListener(type: string): void;
886
- }
887
-
888
- enum ObjectType {
889
- Cabinet = 'Cabinet',
890
- RackModel = 'RackModel',
891
- Corner = 'Corner',
892
- Other = 'Other',
893
- Door = 'Door',
894
- Floor = 'Floor',
895
- LeakWater = 'LeakWater',
896
- UI3D = 'UI3D',
897
- VirtualBox = 'VirtualBox',
898
- Wall = 'Wall',
899
- Window = 'Window',
900
- Conduit = 'Conduit',
901
- Building = 'Building',
902
- Storey = 'Storey',
903
- Campus = 'Campus',
904
- Project = 'Project',
905
- }
906
-
907
- export class OptimizedWallObject extends DefaultObject {
908
- nativeMaterial: Runtime.StandardMaterial;
909
- loadProperties(_w: any): void;
910
- bind(): void;
911
- }
912
-
913
- export class Project {
914
- private app;
915
- id: string;
916
- current: IBase;
917
- root: string;
918
- levelEvent: Function;
919
- objectDatas: Dictionary<IBase>;
920
- constructor(_app: App);
921
- clear(): void;
922
- optimization(): void;
923
- getChildsById(_id: string, _includeSub?: boolean): Array<IBase>;
924
- getSceneTree(_id?: string, _excludeTypes?: Array<string>): any;
925
- findObjectById(_id: string): IBase;
926
- findObjectByCustomNumber(_customNumber: string): IBase;
927
- findObjectsByCustomType(
928
- _customType: string,
929
- queryParameters?: {
930
- isCurrent: boolean;
931
- isEnabled: boolean;
932
- },
933
- ): Array<IBase>;
934
- findObjectsByType(_type: ObjectType): Array<IBase>;
935
- computeSight(_objs: Array<IBase>): any;
936
- switchLevel(_id?: string, _isFocus?: boolean): void;
937
- goBack(): void;
938
- getObjectTypes(_parentId?: string): Array<ObjectType>;
939
- getCustomTypes(_parentId?: string): Array<ObjectType>;
940
- }
941
-
942
- export class RackModel {
943
- id: string;
944
- name: string;
945
- uHeight: number;
946
- uStart: number;
947
- color: string;
948
- frontImgUrl: string;
949
- backImgUrl: string;
950
- direction: boolean;
951
- width: number;
952
- depth: number;
953
- }
954
-
955
- export class RackObject implements IObject {
956
- app: App;
957
- id: string;
958
- name: string;
959
- parentId: string;
960
- objectType: ObjectType;
961
- customNumber: string;
962
- customType: string;
963
- baseModel: BaseModel;
964
- instance: Mesh | InstancedMesh;
965
- Sight: Sight;
966
- statusType: StatusType;
967
- showBoundingBox: boolean;
968
- action: Runtime.ActionManager;
969
- executes: Dictionary<Runtime.ExecuteCodeAction>;
970
- clickEvents: Dictionary<Function>;
971
- touchtime: number;
972
- uHeight: number;
973
- uStart: number;
974
- color: string;
975
- frontImgUrl: string;
976
- backImgUrl: string;
977
- direction: boolean;
978
- width: number;
979
- depth: number;
980
- constructor(_app: App, _parentId: string);
981
- setEnabled(isEnabled: boolean): void;
982
- loadProperties(_m: RackModel): void;
983
- bind(): void;
984
- optimization(_isOptimization: boolean): void;
985
- alwaysActive(): void;
986
- addEventListener(type: EventType, callback: Function): void;
987
- removeEventListener(type: string): void;
988
- setFlash(_level: number): void;
989
- setOpaque(): void;
990
- setTransparent(alpha?: number): void;
991
- setColor(_color?: string): void;
992
- computeView(): void;
993
- completed(): void;
994
- toJson(): {
995
- id: string;
996
- parentId: string;
997
- name: string;
998
- customNumber: string;
999
- customType: string;
1000
- objectType: ObjectType;
1001
- };
1002
- getInto(): void;
1003
- goBack(): void;
1004
- }
1005
-
1006
- export class StoreyObject extends IRegion {
1007
- scaling: Runtime.Vector3;
1008
- autoSight: boolean;
1009
- loadProperties(_m: any): void;
1010
- bind(): void;
1011
- alwaysActive(): void;
1012
- completed(): void;
1013
- computeView(): void;
1014
- getInto(_isFocus?: boolean): void;
1015
- }
1016
-
1017
- export class UI3DTextObject extends DefaultObject {
1018
- tconfig: {
1019
- color: string;
1020
- position: any;
1021
- rotation: any;
1022
- scaling: any;
1023
- clearColor: string;
429
+ pint: Mesh;
430
+ private textDics;
431
+ private _line;
432
+ rect: Rectangle;
433
+ private _background;
434
+ size: {
435
+ width: number;
436
+ height: number;
1024
437
  };
1025
- isLookAt: boolean;
1026
- setEnabled(_value: boolean): void;
1027
- loadProperties(_u: any): void;
1028
- bind(): void;
1029
- }
1030
-
1031
- export class VirtualBoxObject extends DefaultObject {
1032
- virtualType: string;
1033
- color: Runtime.Color3;
1034
- alpha: number;
1035
- isEdges: boolean;
1036
- edgesWidth: number;
1037
- edgesColor: Runtime.Color4;
1038
- loadProperties(_m: any): void;
1039
- setEnabled(_value: boolean): void;
1040
- bind(): void;
1041
- }
1042
-
1043
- export class WallObject extends DefaultObject {
1044
- nativeMaterial: Runtime.StandardMaterial;
1045
- height: number;
1046
- walls: Runtime.Mesh[];
1047
- loadProperties(_m: any): void;
1048
- setEnabled(_value: boolean): void;
1049
- bind(): void;
1050
- completed(): void;
1051
- setOpaque(): void;
1052
- }
1053
-
1054
- export class WindowObject extends DefaultObject {
1055
438
  height: number;
1056
- loadProperties(_m: any): void;
1057
- setEnabled(_value: boolean): void;
1058
- bind(): void;
1059
- }
1060
-
1061
- export class ArrayEx<T> extends Array<T> {
1062
- remove(val: any): void;
1063
- }
439
+ container: AdvancedDynamicTexture;
440
+ constructor(_id: string, _scene: Scene);
441
+ set background(_url: string);
442
+ addEventListener(_action: Function): void;
443
+ setTexts(_textArr: [{
444
+ text: string;
445
+ fontSize: string;
446
+ color: string;
447
+ top: number;
448
+ left: number;
449
+ }]): void;
450
+ line(_line: {
451
+ width: number;
452
+ color: string;
453
+ }): void;
454
+ dispose(): void;
455
+ isEnabled(_isEnabled: boolean): void;
456
+ }
1064
457
 
1065
- interface BaseNode {
458
+ declare class IconFromMesh implements BaseNode {
1066
459
  id: string;
1067
- dispose(): any;
1068
- isEnabled(bool: boolean): any;
1069
- }
1070
-
1071
- export class CameraController {
1072
- app: App;
1073
- arcRotateCamera: Runtime.ArcRotateCamera;
1074
- frustrum: number;
1075
- freeCamera: Runtime.FreeCamera;
1076
- _isAutoRotation: boolean;
1077
- autoRotationSpeed: number;
1078
- constructor(_app: App);
1079
- orthographic(_object?: IBase): void;
1080
- startAutoRotation(_autoRotationSpeed?: number): void;
1081
- stopAutoRotation(): void;
1082
- perspective(_object?: IBase): void;
1083
- flyTo(_Sight?: Sight, _sheep?: number): void;
1084
- flyToObject(_object: IObject, _sheep?: number): void;
1085
- lookToTheFront(_object: IObject, _sheep?: number): void;
1086
- getSightJson(): string;
1087
- private computeCameraView;
1088
- _wheel(p: any): void;
1089
- switchArcRotateCamera(): void;
1090
- switchFPSCamera(): void;
1091
- }
1092
-
1093
- export class Dictionary<T> {
1094
- map: {
1095
- [key: string]: T;
1096
- };
1097
- constructor();
1098
- add(key: string, value: T): void;
1099
- find(key: string): T;
1100
- remove(key: string): void;
1101
- termRemove(callback: Function): void;
1102
- showAll(): void;
1103
- count(): number;
1104
- clear(): void;
1105
- }
1106
-
1107
- export class GUID {
1108
- static getGUID(length: number): string;
1109
- }
1110
-
1111
- export class RES {
1112
- static de(str: string): any;
1113
- static en(word: any): string;
1114
- }
460
+ scene: Scene;
461
+ instance: Mesh;
462
+ url: string;
463
+ scaling: number;
464
+ textArr: [{
465
+ text: string;
466
+ fontSize: string;
467
+ top: number;
468
+ left: number;
469
+ color?: string;
470
+ }];
471
+ constructor(_id: string, _anchor: Vector3, _scaling: number, _height: number, _scene: Scene);
472
+ setBackground(_url: string): Promise<unknown>;
473
+ addEventListener(_action: Function): void;
474
+ setColor(color: string): void;
475
+ setContents(_textArr: [{
476
+ text: string;
477
+ fontSize: string;
478
+ top: number;
479
+ left: number;
480
+ color?: string;
481
+ }]): Promise<unknown>;
482
+ dispose(): void;
483
+ isEnabled(_bool: boolean): void;
484
+ }
1115
485
 
1116
- export class Resources {
1117
- app: App;
1118
- walls: Dictionary<Runtime.AbstractMesh>;
1119
- resources: Dictionary<Runtime.AssetContainer>;
1120
- ndoeMats: Dictionary<Runtime.NodeMaterial>;
1121
- transparentBox: Runtime.Mesh;
1122
- BOX: Runtime.Mesh;
1123
- FogTex: Runtime.Texture;
1124
- constructor(_app: App);
1125
- loadModelMesh(baseModel: any): Promise<Runtime.AssetContainer>;
1126
- loadModelMeshAsync(baseModel: any, callback: Function): void;
1127
- Materials: Dictionary<Runtime.StandardMaterial>;
1128
- Textures: Dictionary<Runtime.Texture>;
1129
- GetMaterial(textureData: any): Runtime.StandardMaterial;
1130
- GetTexture(textureData: any): Runtime.Texture;
1131
- LoadLightMap(id: string, name: string): Runtime.Texture;
1132
- MergeMaterials: Dictionary<Runtime.CustomMaterial>;
1133
- GetMergeMaterial(textureData: any): Runtime.CustomMaterial;
1134
- delete(isAll?: boolean): void;
1135
- GetWalls(url: string, projectId: string): Promise<void>;
1136
- setTransparent(_visibility?: number): void;
1137
- setTransparentById(modelId: string, _visibility?: number): void;
1138
- }
486
+ declare class UI {
487
+ static createIconFromMesh(_id: string, _anchor: IObject, _scaling: number, _height: number): IconFromMesh;
488
+ static createIcon(_id: string, _anchor: IObject, _size: {
489
+ width: number;
490
+ height: number;
491
+ }, _height: number): Icon;
492
+ }
1139
493
 
1140
- export class Sight {
1141
- alpha: number;
1142
- focus: Runtime.Vector3;
1143
- radius: number;
1144
- beta: number;
1145
- minimumLimit: number;
1146
- maximumLimit: number;
1147
- minBeta: number;
1148
- maxBeta: number;
1149
- toJosn(_sightJson: any): void;
1150
- toString(): string;
1151
- setLimit(_miniLimit: number, _maxiLimit: number): void;
1152
- setBeta(_minBeta: number, _maxBeta: number): void;
1153
- }
494
+ interface IEffect {
495
+ start: Function;
496
+ close: Function;
497
+ }
1154
498
 
1155
- export class ToolTips {
1156
- app: App;
1157
- url: string;
1158
- ele: HTMLDivElement;
1159
- private _text;
1160
- set text(vlaue: string);
1161
- constructor(_app: App);
1162
- update(e: Runtime.PointerInfo): void;
1163
- close(): void;
1164
- setBackground(_url: string): void;
1165
- dispose(): void;
1166
- }
499
+ declare enum EffectType {
500
+ Thunder = "Thunder",
501
+ Rain = "Rain",
502
+ Cloud = "Cloud"
503
+ }
504
+ declare class Effect {
505
+ static effects: Dictionary<IEffect>;
506
+ static add(_effectType: EffectType, _app: App): void;
507
+ static remove(_effectType: EffectType): void;
508
+ static removeAll(): void;
509
+ }
1167
510
 
1168
- export class Tools {
1169
- static vector3ToJson(old: Runtime.Vector3): any;
1170
- static vector3ARRToJson(olds: Runtime.Vector3[]): Runtime.Vector3[];
1171
- static ToVector3(old: any): Runtime.Vector3;
1172
- static ToARRVector3(olds: any[]): Runtime.Vector3[];
1173
- static computeBounds(mscene: Runtime.Mesh | AbstractMesh): Runtime.BoundingInfo;
1174
- static computeBoundsToARR(_meshs: Array<Runtime.Mesh>): Runtime.BoundingInfo;
1175
- static Expand(polygon: Array<Runtime.Vector3>, expand: number): Array<Runtime.Vector3>;
1176
- static norm(x: number, y: number): number;
1177
- static MergeMeshes(meshes: Array<Runtime.Mesh>, app: App): Runtime.Mesh;
1178
- static DeconsTructMesh(mesh: any, height: any, app: App): Array<Runtime.Mesh>;
1179
- static getVisualAngle(_bound: Runtime.BoundingInfo, app: App): any;
1180
- static pathTransformation(oldPath: Array<Runtime.Vector3>, radius: number): any[];
1181
- static createTube(id: string, paths: Array<Runtime.Vector3>, radius: number, app: App): Runtime.Mesh;
1182
- static getAngleFromVector2(startV: Runtime.Vector2, coreV: Runtime.Vector2, endV: Runtime.Vector2): number;
1183
- static getAngleFromVector3(startV: Runtime.Vector3, coreV: Runtime.Vector3, endV: Runtime.Vector3): number;
1184
- static RandomNumBoth(Min: any, Max: any): any;
1185
- static rand(min: number, max: number): number;
1186
- }
511
+ declare class MX3D {
512
+ static set accessToken(token: string);
513
+ static get accessToken(): string;
514
+ static App: typeof App;
515
+ static Request: axios.AxiosInstance;
516
+ static AlarmFlashing: typeof AlarmFlashing;
517
+ static UI: typeof UI;
518
+ static Builder: typeof Builder;
519
+ static ObjectType: typeof ObjectType;
520
+ static EffectType: typeof EffectType;
521
+ static EventType: typeof EventType;
522
+ static StatusType: typeof StatusType;
523
+ static Effect: typeof Effect;
1187
524
  }
525
+
526
+ export { MX3D as default };