mx3d 0.1.2 → 0.1.3
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 +243 -244
- package/mx3d.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2,128 +2,128 @@
|
|
|
2
2
|
@author gzmaijing
|
|
3
3
|
@email mj@gzmaijing.com
|
|
4
4
|
*/
|
|
5
|
-
declare module MX3D{
|
|
6
|
-
export
|
|
5
|
+
declare module MX3D {
|
|
6
|
+
export class App {
|
|
7
7
|
canvas: HTMLCanvasElement;
|
|
8
|
-
engine:
|
|
9
|
-
scene:
|
|
8
|
+
engine: any;
|
|
9
|
+
scene: any;
|
|
10
10
|
CameraController: CameraController;
|
|
11
|
-
HighlightLayer:
|
|
12
|
-
container:
|
|
11
|
+
HighlightLayer: any;
|
|
12
|
+
container: any;
|
|
13
13
|
fps: HTMLDivElement;
|
|
14
14
|
Resources: Resources;
|
|
15
15
|
Environment: Environment;
|
|
16
16
|
Project: Project;
|
|
17
17
|
ToolTips: ToolTips;
|
|
18
18
|
constructor(_config: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
container: HTMLElement;
|
|
20
|
+
sl?: string;
|
|
21
|
+
rl?: string;
|
|
22
22
|
});
|
|
23
23
|
load(_config: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
pk: string;
|
|
25
|
+
progress?: Function;
|
|
26
|
+
complete?: Function;
|
|
27
27
|
}): Promise<void>;
|
|
28
28
|
dispose(): void;
|
|
29
|
-
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
export
|
|
31
|
+
export class Builder {
|
|
32
32
|
static createCapacity(_obj: IObject, _RATIO: number, _text: string, _fontSize?: string): void;
|
|
33
33
|
static createTextMesh(_obj: IObject, _text: string, _RATIO: number, _fontSize?: string, _color?: string): void;
|
|
34
34
|
static createMatrixCloud(_data: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
35
|
+
anchor: IObject;
|
|
36
|
+
value: {
|
|
37
|
+
maxX: number;
|
|
38
|
+
maxY: number;
|
|
39
|
+
data: Array<{
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
value: number;
|
|
43
|
+
}>;
|
|
44
|
+
};
|
|
45
|
+
displayValues: boolean;
|
|
46
|
+
height: number;
|
|
47
|
+
isLevelRender: boolean;
|
|
48
|
+
isAlpha: boolean;
|
|
49
|
+
isParticle: boolean;
|
|
50
|
+
radius: number;
|
|
51
|
+
range: {
|
|
52
|
+
max: number;
|
|
53
|
+
min: number;
|
|
54
|
+
};
|
|
55
55
|
}): void;
|
|
56
56
|
static createPunctateCloud(_data: {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
anchor: IObject;
|
|
58
|
+
value: number;
|
|
59
|
+
radius: number;
|
|
60
|
+
isLevelRender: boolean;
|
|
61
|
+
displayValues: boolean;
|
|
62
|
+
isAlpha: boolean;
|
|
63
|
+
isParticle: boolean;
|
|
64
|
+
range: {
|
|
65
|
+
max: number;
|
|
66
|
+
min: number;
|
|
67
|
+
};
|
|
68
68
|
}): void;
|
|
69
69
|
createColumnCloud(_data: {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
70
|
+
anchor: IObject;
|
|
71
|
+
data: Array<{
|
|
72
|
+
index: number;
|
|
73
|
+
value: number;
|
|
74
|
+
}>;
|
|
75
|
+
isLevelRender: boolean;
|
|
76
|
+
displayValues: boolean;
|
|
77
|
+
isAlpha: boolean;
|
|
78
|
+
isParticle: boolean;
|
|
79
|
+
radius: number;
|
|
80
|
+
range: {
|
|
81
|
+
max: number;
|
|
82
|
+
min: number;
|
|
83
|
+
};
|
|
84
84
|
}): void;
|
|
85
85
|
static create2DLine(_id: string, _objs: Array<IObject>, _options?: {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
_width: number;
|
|
87
|
+
_color: string;
|
|
88
|
+
isDotted: boolean;
|
|
89
89
|
}): void;
|
|
90
90
|
static create3DLine(_id: string, _objs: Array<IObject>, _options?: {
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
_width: number;
|
|
92
|
+
_color: string;
|
|
93
93
|
}): void;
|
|
94
|
-
}
|
|
94
|
+
}
|
|
95
95
|
|
|
96
|
-
export
|
|
96
|
+
export class Capacity {
|
|
97
97
|
anchor: IObject;
|
|
98
|
-
mesh:
|
|
98
|
+
mesh: any;
|
|
99
99
|
ratio: number;
|
|
100
100
|
color: string;
|
|
101
|
-
textMesh:
|
|
101
|
+
textMesh: any;
|
|
102
102
|
constructor(_object: IObject, _RATIO: number);
|
|
103
103
|
dispose(): void;
|
|
104
|
-
}
|
|
104
|
+
}
|
|
105
105
|
|
|
106
|
-
export
|
|
106
|
+
export class EffectMgr {
|
|
107
107
|
static colors: {};
|
|
108
108
|
static init(): void;
|
|
109
|
-
}
|
|
109
|
+
}
|
|
110
110
|
|
|
111
|
-
export enum EffectType {
|
|
111
|
+
export enum EffectType {
|
|
112
112
|
Opaque = 0,
|
|
113
113
|
Flash = 1,
|
|
114
114
|
Transparent = 2
|
|
115
|
-
}
|
|
115
|
+
}
|
|
116
116
|
|
|
117
|
-
export
|
|
117
|
+
export class Environment {
|
|
118
118
|
app: App;
|
|
119
119
|
lights: any;
|
|
120
|
-
_color:
|
|
121
|
-
background:
|
|
120
|
+
_color: any;
|
|
121
|
+
background: any;
|
|
122
122
|
reflexEnabled: boolean;
|
|
123
123
|
reflexIntensity: number;
|
|
124
124
|
constructor(_app: App);
|
|
125
125
|
set fogDistance(_value: number);
|
|
126
|
-
set color(_value:
|
|
126
|
+
set color(_value: any);
|
|
127
127
|
reflex(_url: string, _intensity: number): void;
|
|
128
128
|
setBackground(_url: string): void;
|
|
129
129
|
setReflexEnabled(_reflexEnabled: boolean): void;
|
|
@@ -138,150 +138,150 @@ export class Environment {
|
|
|
138
138
|
hideFps(): void;
|
|
139
139
|
showDebug(): void;
|
|
140
140
|
setLightIntensity(_intensity?: number): void;
|
|
141
|
-
}
|
|
141
|
+
}
|
|
142
142
|
|
|
143
|
-
export
|
|
143
|
+
export class DefaultEvent implements IEvent {
|
|
144
144
|
app: App;
|
|
145
145
|
runRender(): void;
|
|
146
|
-
onPointer(_pointerInfo:
|
|
147
|
-
onKeyboard(_kbInfo:
|
|
148
|
-
}
|
|
146
|
+
onPointer(_pointerInfo: any): void;
|
|
147
|
+
onKeyboard(_kbInfo: any): void;
|
|
148
|
+
}
|
|
149
149
|
|
|
150
|
-
export
|
|
150
|
+
export class FPSCameraEvent implements IEvent {
|
|
151
151
|
app: App;
|
|
152
152
|
isFPS: boolean;
|
|
153
153
|
angle: number;
|
|
154
|
-
direction:
|
|
154
|
+
direction: any;
|
|
155
155
|
isMoveLeft: boolean;
|
|
156
156
|
isMoveRight: boolean;
|
|
157
157
|
isMoveDown: boolean;
|
|
158
158
|
isMoveUp: boolean;
|
|
159
159
|
runRender(): void;
|
|
160
|
-
onPointer(_pointerInfo:
|
|
161
|
-
onKeyboard(_e:
|
|
162
|
-
}
|
|
160
|
+
onPointer(_pointerInfo: any): void;
|
|
161
|
+
onKeyboard(_e: any): void;
|
|
162
|
+
}
|
|
163
163
|
|
|
164
|
-
export
|
|
164
|
+
export interface IEvent {
|
|
165
165
|
runRender(): void;
|
|
166
|
-
onPointer(e:
|
|
167
|
-
onKeyboard(e:
|
|
168
|
-
}
|
|
166
|
+
onPointer(e: any): void;
|
|
167
|
+
onKeyboard(e: any): void;
|
|
168
|
+
}
|
|
169
169
|
|
|
170
|
-
export enum EventType {
|
|
170
|
+
export enum EventType {
|
|
171
171
|
leftClick = "leftClick",
|
|
172
172
|
rightClick = "rightClick",
|
|
173
173
|
doubleClick = "doubleClick",
|
|
174
174
|
eover = "eover",
|
|
175
175
|
longPress = "longPress",
|
|
176
176
|
out = "out"
|
|
177
|
-
}
|
|
177
|
+
}
|
|
178
178
|
|
|
179
|
-
export
|
|
179
|
+
export class HeatMap implements BaseNode {
|
|
180
180
|
id: string;
|
|
181
181
|
anchor: IObject;
|
|
182
|
-
mesh:
|
|
182
|
+
mesh: any;
|
|
183
183
|
displayValue: boolean;
|
|
184
|
-
texts: Array<
|
|
184
|
+
texts: Array<any>;
|
|
185
185
|
constructor(_anchor: string);
|
|
186
186
|
isEnabled(_bool: boolean): void;
|
|
187
187
|
set displayValues(_value: boolean);
|
|
188
188
|
dispose(): void;
|
|
189
|
-
}
|
|
189
|
+
}
|
|
190
190
|
|
|
191
|
-
export
|
|
191
|
+
export class Icon implements BaseNode {
|
|
192
192
|
id: string;
|
|
193
|
-
scene:
|
|
194
|
-
pint:
|
|
195
|
-
rect:
|
|
193
|
+
scene: any;
|
|
194
|
+
pint: any;
|
|
195
|
+
rect: any;
|
|
196
196
|
onPointerClick: Function;
|
|
197
197
|
size: {
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
width: number;
|
|
199
|
+
height: number;
|
|
200
200
|
};
|
|
201
201
|
height: number;
|
|
202
|
-
container:
|
|
203
|
-
constructor(_id: string, _scene:
|
|
202
|
+
container: any;
|
|
203
|
+
constructor(_id: string, _scene: any);
|
|
204
204
|
set background(_url: string);
|
|
205
205
|
addEventListener(_action: Function): void;
|
|
206
206
|
setTexts(_textArr: [{
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
text: string;
|
|
208
|
+
fontSize: string;
|
|
209
|
+
color: string;
|
|
210
|
+
top: number;
|
|
211
|
+
left: number;
|
|
212
212
|
}]): void;
|
|
213
213
|
line(_line: {
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
width: number;
|
|
215
|
+
color: string;
|
|
216
216
|
}): void;
|
|
217
217
|
dispose(): void;
|
|
218
218
|
isEnabled(_isEnabled: boolean): void;
|
|
219
|
-
}
|
|
219
|
+
}
|
|
220
220
|
|
|
221
|
-
export
|
|
221
|
+
export class IconFromMesh implements BaseNode {
|
|
222
222
|
id: string;
|
|
223
|
-
scene:
|
|
224
|
-
instance:
|
|
223
|
+
scene: any;
|
|
224
|
+
instance: any;
|
|
225
225
|
url: string;
|
|
226
226
|
scaling: number;
|
|
227
|
-
constructor(_id: string, _anchor:
|
|
227
|
+
constructor(_id: string, _anchor: any, _url: string, _scaling: number, _height: number, _scene: any);
|
|
228
228
|
setBackground(): void;
|
|
229
229
|
addEventListener(_action: Function): void;
|
|
230
230
|
setColor(_color: string): void;
|
|
231
231
|
setContents(_textArr: [{
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
232
|
+
text: string;
|
|
233
|
+
fontSize: string;
|
|
234
|
+
top: number;
|
|
235
|
+
left: number;
|
|
236
|
+
color?: string;
|
|
237
237
|
}]): void;
|
|
238
238
|
dispose(): void;
|
|
239
239
|
isEnabled(_bool: boolean): void;
|
|
240
|
-
}
|
|
240
|
+
}
|
|
241
241
|
|
|
242
|
-
export
|
|
242
|
+
export class UI {
|
|
243
243
|
static createIconFromMesh(_id: string, _anchor: IObject, _url: string, _scaling: number, _height: number): void;
|
|
244
244
|
static createIcon(_id: string, _anchor: IObject, _size: {
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
width: number;
|
|
246
|
+
height: number;
|
|
247
247
|
}, _height: number): void;
|
|
248
|
-
}
|
|
248
|
+
}
|
|
249
249
|
|
|
250
|
-
export
|
|
250
|
+
export class HubService {
|
|
251
251
|
static connection: any;
|
|
252
252
|
static listener(_Url: string): Promise<void>;
|
|
253
253
|
static start(): Promise<void>;
|
|
254
|
-
}
|
|
254
|
+
}
|
|
255
255
|
|
|
256
|
-
export
|
|
257
|
-
direction:
|
|
258
|
-
position:
|
|
259
|
-
light:
|
|
256
|
+
export class Directional extends LightObject {
|
|
257
|
+
direction: any;
|
|
258
|
+
position: any;
|
|
259
|
+
light: any;
|
|
260
260
|
load(): void;
|
|
261
|
-
}
|
|
261
|
+
}
|
|
262
262
|
|
|
263
|
-
export
|
|
264
|
-
direction:
|
|
265
|
-
light:
|
|
263
|
+
export class Hemispheric extends LightObject {
|
|
264
|
+
direction: any;
|
|
265
|
+
light: any;
|
|
266
266
|
load(): void;
|
|
267
|
-
}
|
|
267
|
+
}
|
|
268
268
|
|
|
269
|
-
export
|
|
269
|
+
export interface ILightObject {
|
|
270
270
|
id: string;
|
|
271
271
|
sceneId: string;
|
|
272
272
|
name: string;
|
|
273
|
-
light:
|
|
273
|
+
light: any;
|
|
274
274
|
color: string;
|
|
275
275
|
lightType: string;
|
|
276
276
|
intensity: number;
|
|
277
277
|
load: Function;
|
|
278
|
-
}
|
|
278
|
+
}
|
|
279
279
|
|
|
280
|
-
export
|
|
280
|
+
export class LightObject implements ILightObject {
|
|
281
281
|
id: string;
|
|
282
282
|
sceneId: string;
|
|
283
283
|
name: string;
|
|
284
|
-
light:
|
|
284
|
+
light: any;
|
|
285
285
|
color: string;
|
|
286
286
|
objectType: string;
|
|
287
287
|
lightType: string;
|
|
@@ -289,59 +289,59 @@ export class LightObject implements ILightObject {
|
|
|
289
289
|
app: App;
|
|
290
290
|
constructor(_app: App);
|
|
291
291
|
load(): void;
|
|
292
|
-
}
|
|
292
|
+
}
|
|
293
293
|
|
|
294
|
-
export enum LightType {
|
|
294
|
+
export enum LightType {
|
|
295
295
|
Point = "Point",
|
|
296
296
|
Spot = "Spot",
|
|
297
297
|
Directional = "Directional",
|
|
298
298
|
Hemispheric = "Hemispheric"
|
|
299
|
-
}
|
|
299
|
+
}
|
|
300
300
|
|
|
301
|
-
export
|
|
302
|
-
position:
|
|
303
|
-
light:
|
|
301
|
+
export class Point extends LightObject {
|
|
302
|
+
position: any;
|
|
303
|
+
light: any;
|
|
304
304
|
range: number;
|
|
305
305
|
load(): void;
|
|
306
|
-
}
|
|
306
|
+
}
|
|
307
307
|
|
|
308
|
-
export
|
|
309
|
-
direction:
|
|
310
|
-
position:
|
|
308
|
+
export class Spot extends LightObject {
|
|
309
|
+
direction: any;
|
|
310
|
+
position: any;
|
|
311
311
|
angle: number;
|
|
312
312
|
exponent: number;
|
|
313
313
|
range: number;
|
|
314
|
-
light:
|
|
314
|
+
light: any;
|
|
315
315
|
load(): void;
|
|
316
|
-
}
|
|
316
|
+
}
|
|
317
317
|
|
|
318
|
-
export
|
|
318
|
+
export class BabylonLayer {
|
|
319
319
|
readonly id: string;
|
|
320
320
|
readonly type: "custom";
|
|
321
321
|
readonly renderingMode: "3d";
|
|
322
322
|
drones: {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
323
|
+
x: number;
|
|
324
|
+
y: number;
|
|
325
|
+
z: number;
|
|
326
326
|
};
|
|
327
327
|
initialCoordinates: [];
|
|
328
328
|
recalculateProjectionMatrix(_coordinates: []): void;
|
|
329
329
|
onAdd: (_map: any, _gl: WebGLRenderingContext) => void;
|
|
330
330
|
render: (_gl: WebGLRenderingContext, _matrix: number[]) => void;
|
|
331
|
-
}
|
|
331
|
+
}
|
|
332
332
|
|
|
333
|
-
export
|
|
333
|
+
export class Earth {
|
|
334
334
|
initialCoordinates: [];
|
|
335
335
|
map: any;
|
|
336
336
|
load(_action: Function): void;
|
|
337
337
|
laodScene(_url: string, _initialCoordinates: []): void;
|
|
338
338
|
flyTo(_center?: [], _zoom?: number, _bearing?: number, _pitch?: number, _duration?: number): void;
|
|
339
|
-
}
|
|
339
|
+
}
|
|
340
340
|
|
|
341
|
-
export
|
|
342
|
-
}
|
|
341
|
+
export class CabinetObject extends DefaultObject {
|
|
342
|
+
}
|
|
343
343
|
|
|
344
|
-
export
|
|
344
|
+
export class ConduitObject extends DefaultObject {
|
|
345
345
|
alpha: number;
|
|
346
346
|
color: string;
|
|
347
347
|
bind(_m: any): void;
|
|
@@ -351,23 +351,23 @@ export class ConduitObject extends DefaultObject {
|
|
|
351
351
|
setFlash(_level?: number): void;
|
|
352
352
|
setOpaque(): void;
|
|
353
353
|
setTransparent(_alpha?: number): void;
|
|
354
|
-
}
|
|
354
|
+
}
|
|
355
355
|
|
|
356
|
-
export
|
|
356
|
+
export class CornerObject extends DefaultObject {
|
|
357
357
|
height: number;
|
|
358
358
|
bind(_m: any): void;
|
|
359
|
-
}
|
|
359
|
+
}
|
|
360
360
|
|
|
361
|
-
export
|
|
361
|
+
export class DefaultObject implements IObject {
|
|
362
362
|
app: App;
|
|
363
363
|
id: string;
|
|
364
364
|
name: string;
|
|
365
365
|
parentId: string;
|
|
366
366
|
modelId: string;
|
|
367
|
-
instance:
|
|
367
|
+
instance: any | any;
|
|
368
368
|
objectType: string;
|
|
369
|
-
action:
|
|
370
|
-
executes: Dictionary<
|
|
369
|
+
action: any;
|
|
370
|
+
executes: Dictionary<any>;
|
|
371
371
|
clickEvents: Dictionary<Function>;
|
|
372
372
|
touchtime: number;
|
|
373
373
|
effectType: EffectType;
|
|
@@ -391,31 +391,31 @@ export class DefaultObject implements IObject {
|
|
|
391
391
|
setTransparent(_alpha?: number): void;
|
|
392
392
|
play(): void;
|
|
393
393
|
stop(): void;
|
|
394
|
-
}
|
|
394
|
+
}
|
|
395
395
|
|
|
396
|
-
export
|
|
396
|
+
export class DoorObject extends DefaultObject {
|
|
397
397
|
height: number;
|
|
398
398
|
bind(_m: any): void;
|
|
399
|
-
}
|
|
399
|
+
}
|
|
400
400
|
|
|
401
|
-
export
|
|
401
|
+
export class FloorObject extends DefaultObject {
|
|
402
402
|
height: number;
|
|
403
403
|
bind(_m: any): void;
|
|
404
|
-
}
|
|
404
|
+
}
|
|
405
405
|
|
|
406
|
-
export
|
|
406
|
+
export interface IBase {
|
|
407
407
|
app: App;
|
|
408
408
|
id: string;
|
|
409
409
|
name: string;
|
|
410
410
|
parentId: string;
|
|
411
411
|
objectType: string;
|
|
412
|
-
}
|
|
412
|
+
}
|
|
413
413
|
|
|
414
|
-
export
|
|
414
|
+
export interface IObject extends IBase {
|
|
415
415
|
customNumber: string;
|
|
416
416
|
customType: string;
|
|
417
417
|
modelId: string;
|
|
418
|
-
instance:
|
|
418
|
+
instance: any | any;
|
|
419
419
|
Sight: Sight;
|
|
420
420
|
effectType: EffectType;
|
|
421
421
|
bind(_m?: any): any;
|
|
@@ -430,16 +430,16 @@ export interface IObject extends IBase {
|
|
|
430
430
|
play(isloop: boolean): any;
|
|
431
431
|
stop(): any;
|
|
432
432
|
computeView(): any;
|
|
433
|
-
}
|
|
433
|
+
}
|
|
434
434
|
|
|
435
|
-
export
|
|
435
|
+
export class LeakWaterObject extends DefaultObject {
|
|
436
436
|
bind(_l: any): void;
|
|
437
437
|
computeView(): void;
|
|
438
438
|
addEventListener(_type: string, _callback: Function): void;
|
|
439
439
|
removeEventListener(_type: string): void;
|
|
440
|
-
}
|
|
440
|
+
}
|
|
441
441
|
|
|
442
|
-
export enum ObjectType {
|
|
442
|
+
export enum ObjectType {
|
|
443
443
|
Region = "Region",
|
|
444
444
|
Cabinet = "Cabinet",
|
|
445
445
|
Corner = "Corner",
|
|
@@ -452,9 +452,9 @@ export enum ObjectType {
|
|
|
452
452
|
Wall = "Wall",
|
|
453
453
|
Window = "Window",
|
|
454
454
|
Conduit = "Conduit"
|
|
455
|
-
}
|
|
455
|
+
}
|
|
456
456
|
|
|
457
|
-
export
|
|
457
|
+
export class Project {
|
|
458
458
|
app: App;
|
|
459
459
|
id: string;
|
|
460
460
|
root: IObject;
|
|
@@ -473,9 +473,9 @@ export class Project {
|
|
|
473
473
|
findObjectByCustomNumber(): void;
|
|
474
474
|
findObjectsByCustomType(): void;
|
|
475
475
|
switchLevel(_id?: string, _isFocus?: boolean, _includeSub?: boolean): void;
|
|
476
|
-
}
|
|
476
|
+
}
|
|
477
477
|
|
|
478
|
-
export
|
|
478
|
+
export class RegionObject extends DefaultObject {
|
|
479
479
|
index: number;
|
|
480
480
|
height: number;
|
|
481
481
|
constructor(app: App, _storey: any);
|
|
@@ -486,41 +486,41 @@ export class RegionObject extends DefaultObject {
|
|
|
486
486
|
setEnabled(_value: boolean): void;
|
|
487
487
|
getBounding(): void;
|
|
488
488
|
dispose(): void;
|
|
489
|
-
}
|
|
489
|
+
}
|
|
490
490
|
|
|
491
|
-
export
|
|
491
|
+
export class UI3DTextObject extends DefaultObject {
|
|
492
492
|
bind(_u: any): void;
|
|
493
|
-
}
|
|
493
|
+
}
|
|
494
494
|
|
|
495
|
-
export
|
|
495
|
+
export class VirtualBoxObject extends DefaultObject {
|
|
496
496
|
bind(_m: any): Promise<void>;
|
|
497
|
-
}
|
|
497
|
+
}
|
|
498
498
|
|
|
499
|
-
export
|
|
499
|
+
export class WallObject extends DefaultObject {
|
|
500
500
|
nativeMaterial: BABYLON.StandardMaterial;
|
|
501
501
|
baseModel: any;
|
|
502
502
|
height: number;
|
|
503
503
|
bind(_w: any): void;
|
|
504
|
-
}
|
|
504
|
+
}
|
|
505
505
|
|
|
506
|
-
export
|
|
506
|
+
export class WindowObject extends DefaultObject {
|
|
507
507
|
height: number;
|
|
508
508
|
bind(_m: any): void;
|
|
509
|
-
}
|
|
509
|
+
}
|
|
510
510
|
|
|
511
|
-
export
|
|
511
|
+
export class ArrayEx<T> extends Array<T> {
|
|
512
512
|
remove(_val: any): void;
|
|
513
|
-
}
|
|
513
|
+
}
|
|
514
514
|
|
|
515
|
-
export
|
|
515
|
+
export interface BaseNode {
|
|
516
516
|
id: string;
|
|
517
517
|
dispose(): any;
|
|
518
518
|
isEnabled(bool: boolean): any;
|
|
519
|
-
}
|
|
519
|
+
}
|
|
520
520
|
|
|
521
|
-
export
|
|
521
|
+
export class CameraController {
|
|
522
522
|
app: App;
|
|
523
|
-
camera:
|
|
523
|
+
camera: any;
|
|
524
524
|
frustrum: number;
|
|
525
525
|
isOverLook: boolean;
|
|
526
526
|
constructor(_app: App);
|
|
@@ -533,11 +533,11 @@ export class CameraController {
|
|
|
533
533
|
_wheel(_p: any): void;
|
|
534
534
|
switchArcRotateCamera(): void;
|
|
535
535
|
switchFPSCamera(): void;
|
|
536
|
-
}
|
|
536
|
+
}
|
|
537
537
|
|
|
538
|
-
export
|
|
538
|
+
export class Dictionary<T> {
|
|
539
539
|
map: {
|
|
540
|
-
|
|
540
|
+
[key: string]: T;
|
|
541
541
|
};
|
|
542
542
|
constructor();
|
|
543
543
|
add(_key: string, _value: T): void;
|
|
@@ -547,36 +547,36 @@ export class Dictionary<T> {
|
|
|
547
547
|
showAll(): void;
|
|
548
548
|
count(): void;
|
|
549
549
|
clear(): void;
|
|
550
|
-
}
|
|
550
|
+
}
|
|
551
551
|
|
|
552
|
-
export
|
|
552
|
+
export class GUID {
|
|
553
553
|
static getGUID(_length: number): void;
|
|
554
|
-
}
|
|
554
|
+
}
|
|
555
555
|
|
|
556
|
-
export
|
|
556
|
+
export class Resources {
|
|
557
557
|
app: App;
|
|
558
|
-
walls: Dictionary<
|
|
559
|
-
resources: Dictionary<
|
|
560
|
-
ndoeMats: Dictionary<
|
|
561
|
-
transparentBox:
|
|
562
|
-
BOX:
|
|
563
|
-
FogTex:
|
|
558
|
+
walls: Dictionary<any>;
|
|
559
|
+
resources: Dictionary<any>;
|
|
560
|
+
ndoeMats: Dictionary<any>;
|
|
561
|
+
transparentBox: any;
|
|
562
|
+
BOX: any;
|
|
563
|
+
FogTex: any;
|
|
564
564
|
constructor(_app: App);
|
|
565
565
|
loadModelMesh(_baseModel: any): Promise<void>;
|
|
566
566
|
loadModelMeshAsync(_baseModel: any, _callback: Function): void;
|
|
567
|
-
Materials: Dictionary<
|
|
568
|
-
Textures: Dictionary<
|
|
569
|
-
GetMaterial(_textureData: any, _scene:
|
|
570
|
-
GetTexture(_textureData: any, _scene:
|
|
571
|
-
MergeMaterials: Dictionary<
|
|
572
|
-
GetMergeMaterial(_textureData: any, _scene:
|
|
567
|
+
Materials: Dictionary<any>;
|
|
568
|
+
Textures: Dictionary<any>;
|
|
569
|
+
GetMaterial(_textureData: any, _scene: any): void;
|
|
570
|
+
GetTexture(_textureData: any, _scene: any): void;
|
|
571
|
+
MergeMaterials: Dictionary<any>;
|
|
572
|
+
GetMergeMaterial(_textureData: any, _scene: any): void;
|
|
573
573
|
delete(_isAll?: boolean): void;
|
|
574
574
|
GetWalls(_url: string, _projectId: string): Promise<void>;
|
|
575
|
-
}
|
|
575
|
+
}
|
|
576
576
|
|
|
577
|
-
export
|
|
577
|
+
export class Sight {
|
|
578
578
|
alpha: number;
|
|
579
|
-
focus:
|
|
579
|
+
focus: any;
|
|
580
580
|
radius: number;
|
|
581
581
|
beta: number;
|
|
582
582
|
minimumLimit: number;
|
|
@@ -587,28 +587,28 @@ export class Sight {
|
|
|
587
587
|
toString(): void;
|
|
588
588
|
setLimit(_miniLimit: number, _maxiLimit: number): void;
|
|
589
589
|
setBeta(_minBeta: number, _maxBeta: number): void;
|
|
590
|
-
}
|
|
590
|
+
}
|
|
591
591
|
|
|
592
|
-
export
|
|
593
|
-
static vector3ToJson(_old:
|
|
594
|
-
static vector3ARRToJson(_olds:
|
|
592
|
+
export class Tools {
|
|
593
|
+
static vector3ToJson(_old: any): any;
|
|
594
|
+
static vector3ARRToJson(_olds: any[]): void;
|
|
595
595
|
static ToVector3(_old: any): void;
|
|
596
596
|
static ToARRVector3(_olds: any[]): void;
|
|
597
|
-
static computeBounds(_mscene:
|
|
598
|
-
static computeBoundsToARR(_meshs: Array<
|
|
599
|
-
static Expand(_polygon: Array<
|
|
597
|
+
static computeBounds(_mscene: any): void;
|
|
598
|
+
static computeBoundsToARR(_meshs: Array<any>): void;
|
|
599
|
+
static Expand(_polygon: Array<any>, _expand: number): void;
|
|
600
600
|
static norm(_x: number, _y: number): void;
|
|
601
|
-
static MergeMeshes(_meshes: Array<
|
|
601
|
+
static MergeMeshes(_meshes: Array<any>, _app: App): void;
|
|
602
602
|
static DeconsTructMesh(_mesh: any, _height: any, _app: App): void;
|
|
603
|
-
static getVisualAngle(_bound:
|
|
604
|
-
static pathTransformation(_oldPath: Array<
|
|
605
|
-
static createTube(_id: string, _paths: Array<
|
|
606
|
-
static getAngleFromVector2(_startV:
|
|
607
|
-
static getAngleFromVector3(_startV:
|
|
603
|
+
static getVisualAngle(_bound: any, _app: App): void;
|
|
604
|
+
static pathTransformation(_oldPath: Array<any>, _radius: number): void;
|
|
605
|
+
static createTube(_id: string, _paths: Array<any>, _radius: number, _app: App): void;
|
|
606
|
+
static getAngleFromVector2(_startV: any, _coreV: any, _endV: any): void;
|
|
607
|
+
static getAngleFromVector3(_startV: any, _coreV: any, _endV: any): void;
|
|
608
608
|
static RandomNumBoth(_Min: any, _Max: any): void;
|
|
609
|
-
}
|
|
609
|
+
}
|
|
610
610
|
|
|
611
|
-
export
|
|
611
|
+
export class ToolTips {
|
|
612
612
|
app: App;
|
|
613
613
|
url: string;
|
|
614
614
|
ele: HTMLDivElement;
|
|
@@ -617,10 +617,9 @@ export class ToolTips {
|
|
|
617
617
|
isOK: boolean;
|
|
618
618
|
_text: string;
|
|
619
619
|
constructor(_parent: HTMLElement, _app: App);
|
|
620
|
-
update(_e:
|
|
620
|
+
update(_e: any): void;
|
|
621
621
|
close(): void;
|
|
622
622
|
setBackground(_url: string): void;
|
|
623
623
|
dispose(): void;
|
|
624
|
+
}
|
|
624
625
|
}
|
|
625
|
-
|
|
626
|
-
}
|
package/mx3d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.MX3D=e():t.MX3D=e()}(window,(function(){return function(t){var e={};function o(r){if(e[r])return e[r].exports;var c=e[r]={i:r,l:!1,exports:{}};return t[r].call(c.exports,c,c.exports,o),c.l=!0,c.exports}return o.m=t,o.c=e,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var c in t)o.d(r,c,function(e){return t[e]}.bind(null,c));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,o){"use strict";o.r(e),o.d(e,"default",(function(){return s}));class r{static init(){}}r.colors={};var c,n;!function(t){t[t.Opaque=0]="Opaque",t[t.Flash=1]="Flash",t[t.Transparent=2]="Transparent"}(c||(c={})),function(t){t.leftClick="leftClick",t.rightClick="rightClick",t.doubleClick="doubleClick",t.eover="eover",t.longPress="longPress",t.out="out"}(n||(n={}));class s{}s.sl="https://www.wodashijie.com/",s.rl="https://models.wodashijie.com/",s.App=class{constructor(t){}async load(t){}dispose(){}},s.Tools=class{static vector3ToJson(t){}static vector3ARRToJson(t){}static ToVector3(t){}static ToARRVector3(t){}static computeBounds(t){}static computeBoundsToARR(t){}static Expand(t,e){}static norm(t,e){}static MergeMeshes(t,e){}static DeconsTructMesh(t,e,o){}static getVisualAngle(t,e){}static pathTransformation(t,e){}static createTube(t,e,o=.05,r){}static getAngleFromVector2(t,e,o){}static getAngleFromVector3(t,e,o){}static RandomNumBoth(t,e){}},s.Earth=class{constructor(){this.initialCoordinates=[]}load(t){}laodScene(t,e){}flyTo(t=this.initialCoordinates,e=18,o=130,r=75,c=12e3){}},s.EffectMgr=r,s.HubService=class{static async listener(t){}static async start(){}},s.UI=class{static createIconFromMesh(t,e,o,r,c){}static createIcon(t,e,o,r){}},s.Builder=class{static createCapacity(t,e,o,r="200px"){}static createTextMesh(t,e,o,r="200px",c="white"){}static createMatrixCloud(t){}static createPunctateCloud(t){}createColumnCloud(t){}static create2DLine(t,e,o){}static create3DLine(t,e,o){}},s.EffectType=c,s.EventType=n}]).default}));
|