@reall3d/reall3dviewer 0.1.4 → 0.1.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/dist/pkg.d.ts +98 -96
- package/dist/pkg.js +3405 -2540
- package/dist/pkg.umd.cjs +24 -20
- package/package.json +3 -1
package/dist/pkg.d.ts
CHANGED
|
@@ -63,77 +63,77 @@ declare class Events {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* Metadata
|
|
67
67
|
*/
|
|
68
68
|
export declare interface MetaData {
|
|
69
|
-
/**
|
|
69
|
+
/** Name */
|
|
70
70
|
name?: string;
|
|
71
|
-
/**
|
|
71
|
+
/** Version */
|
|
72
72
|
version?: string;
|
|
73
|
-
/**
|
|
73
|
+
/** Update date (YYYYMMDD) */
|
|
74
74
|
updateDate?: number;
|
|
75
|
-
/**
|
|
75
|
+
/** Enable auto-rotation */
|
|
76
76
|
autoRotate?: boolean;
|
|
77
|
-
/**
|
|
77
|
+
/** Enable debug mode */
|
|
78
78
|
debugMode?: boolean;
|
|
79
|
-
/**
|
|
79
|
+
/** Enable point-cloud rendering */
|
|
80
80
|
pointcloudMode?: boolean;
|
|
81
|
-
/**
|
|
81
|
+
/** Maximum render count for mobile */
|
|
82
82
|
maxRenderCountOfMobile?: number;
|
|
83
|
-
/** PC
|
|
83
|
+
/** Maximum render count for PC */
|
|
84
84
|
maxRenderCountOfPc?: number;
|
|
85
|
-
/**
|
|
85
|
+
/** Maximum download count for mobile splats */
|
|
86
86
|
mobileDownloadLimitSplatCount?: number;
|
|
87
|
-
/** PC
|
|
87
|
+
/** Maximum download count for PC splats */
|
|
88
88
|
pcDownloadLimitSplatCount?: number;
|
|
89
|
-
/**
|
|
89
|
+
/** Meter scale factor */
|
|
90
90
|
meterScale?: number;
|
|
91
|
-
/**
|
|
91
|
+
/** Text watermark */
|
|
92
92
|
watermark?: string;
|
|
93
|
-
/**
|
|
93
|
+
/** Display watermark */
|
|
94
94
|
showWatermark?: boolean;
|
|
95
|
-
/**
|
|
95
|
+
/** Display bounding box */
|
|
96
96
|
showBoundBox?: boolean;
|
|
97
|
-
/**
|
|
97
|
+
/** Camera parameters */
|
|
98
98
|
cameraInfo?: CameraInfo;
|
|
99
|
-
/**
|
|
99
|
+
/** Annotations */
|
|
100
100
|
marks?: any[];
|
|
101
|
-
/**
|
|
101
|
+
/** Fly-through camera positions */
|
|
102
102
|
flyPositions?: number[];
|
|
103
|
-
/**
|
|
103
|
+
/** Fly-through camera look-at points */
|
|
104
104
|
flyTargets?: number[];
|
|
105
|
-
/**
|
|
105
|
+
/** Enable particle loading effect (small scenes) */
|
|
106
106
|
particleMode?: boolean;
|
|
107
|
-
/**
|
|
107
|
+
/** Auto-cut count */
|
|
108
108
|
autoCut?: number;
|
|
109
|
-
/**
|
|
109
|
+
/** Transformation matrix */
|
|
110
110
|
transform?: number[];
|
|
111
|
-
/**
|
|
111
|
+
/** Geolocation (EPSG:4326 WGS 84) */
|
|
112
112
|
WGS84?: number[];
|
|
113
|
-
/**
|
|
113
|
+
/** Model URL */
|
|
114
114
|
url?: string;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* Gaussian Model Options
|
|
119
119
|
*/
|
|
120
120
|
export declare interface ModelOptions {
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
122
|
+
* Model URL
|
|
123
123
|
*/
|
|
124
124
|
url: string;
|
|
125
125
|
/**
|
|
126
|
-
*
|
|
126
|
+
* Model format (ply | splat | spx | spz | sog | obj), auto-detected by default
|
|
127
127
|
*/
|
|
128
|
-
format?: 'ply' | 'splat' | 'spx' | 'spz' | 'obj';
|
|
128
|
+
format?: 'ply' | 'splat' | 'spx' | 'spz' | 'sog' | 'obj';
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
130
|
+
* Whether to force re-download
|
|
131
131
|
*/
|
|
132
132
|
fetchReload?: boolean;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
|
-
*
|
|
136
|
+
* Built-in Map viewer with Gaussian Splatting model support
|
|
137
137
|
*/
|
|
138
138
|
export declare class Reall3dMapViewer extends EventDispatcher<tt.plugin.GLViewerEventMap> {
|
|
139
139
|
scene: Scene;
|
|
@@ -163,37 +163,38 @@ export declare class Reall3dMapViewer extends EventDispatcher<tt.plugin.GLViewer
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
|
-
*
|
|
166
|
+
* Configuration options for Reall3dMapViewer
|
|
167
167
|
*/
|
|
168
168
|
export declare interface Reall3dMapViewerOptions {
|
|
169
169
|
/**
|
|
170
|
-
*
|
|
170
|
+
* Container element or its selector (default: '#map').
|
|
171
|
+
* Will be automatically created if not found.
|
|
171
172
|
*/
|
|
172
173
|
root?: HTMLElement | string;
|
|
173
174
|
/**
|
|
174
|
-
*
|
|
175
|
+
* Enable keyboard controls (default: false)
|
|
175
176
|
*/
|
|
176
177
|
enableKeyboard?: boolean;
|
|
177
178
|
/**
|
|
178
|
-
*
|
|
179
|
+
* Minimum panning boundaries (default: [-20000, 0.1, -60000])
|
|
179
180
|
*/
|
|
180
181
|
minPan?: number[];
|
|
181
182
|
/**
|
|
182
|
-
*
|
|
183
|
+
* Maximum panning boundaries (default: [50000, 10000, 0])
|
|
183
184
|
*/
|
|
184
185
|
maxPan?: number[];
|
|
185
186
|
/**
|
|
186
|
-
*
|
|
187
|
+
* Background color (default: '#dbf0ff')
|
|
187
188
|
*/
|
|
188
189
|
background?: string;
|
|
189
190
|
/**
|
|
190
|
-
*
|
|
191
|
+
* Debug mode flag (default: false in production)
|
|
191
192
|
*/
|
|
192
193
|
debugMode?: boolean;
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
/**
|
|
196
|
-
*
|
|
197
|
+
* Built-in Gaussian Splatting model viewer
|
|
197
198
|
*/
|
|
198
199
|
export declare class Reall3dViewer {
|
|
199
200
|
private disposed;
|
|
@@ -249,151 +250,152 @@ export declare class Reall3dViewer {
|
|
|
249
250
|
}
|
|
250
251
|
|
|
251
252
|
/**
|
|
252
|
-
*
|
|
253
|
+
* Configuration options for Reall3dViewer
|
|
253
254
|
*/
|
|
254
255
|
export declare interface Reall3dViewerOptions {
|
|
255
256
|
/**
|
|
256
|
-
*
|
|
257
|
+
* Specify a custom renderer instance. If undefined, one will be created automatically.
|
|
257
258
|
*/
|
|
258
259
|
renderer?: Renderer | undefined;
|
|
259
260
|
/**
|
|
260
|
-
*
|
|
261
|
+
* Specify a custom scene instance. If undefined, one will be created automatically.
|
|
261
262
|
*/
|
|
262
263
|
scene?: Scene | undefined;
|
|
263
264
|
/**
|
|
264
|
-
*
|
|
265
|
+
* Specify a custom camera instance. If undefined, one will be created automatically.
|
|
265
266
|
*/
|
|
266
267
|
camera?: PerspectiveCamera | undefined;
|
|
267
268
|
/**
|
|
268
|
-
*
|
|
269
|
+
* Orbit controls instance
|
|
269
270
|
*/
|
|
270
271
|
controls?: OrbitControls;
|
|
271
272
|
/**
|
|
272
|
-
*
|
|
273
|
+
* Renderer event manager
|
|
273
274
|
*/
|
|
274
275
|
viewerEvents?: Events | undefined;
|
|
275
276
|
/**
|
|
276
|
-
*
|
|
277
|
+
* Debug mode flag. Defaults to false in production.
|
|
277
278
|
*/
|
|
278
279
|
debugMode?: boolean | undefined;
|
|
279
280
|
/**
|
|
280
|
-
*
|
|
281
|
+
* Large scene mode flag. Cannot be modified after initialization.
|
|
281
282
|
*/
|
|
282
283
|
bigSceneMode?: boolean;
|
|
283
284
|
/**
|
|
284
|
-
*
|
|
285
|
-
*
|
|
285
|
+
* Point cloud rendering mode. Defaults to true.
|
|
286
|
+
* Can be dynamically updated via viewer.options()
|
|
286
287
|
*/
|
|
287
288
|
pointcloudMode?: boolean | undefined;
|
|
288
289
|
/**
|
|
289
|
-
*
|
|
290
|
-
*
|
|
290
|
+
* Maximum renderable Gaussian points count for mobile devices.
|
|
291
|
+
* Can be dynamically updated via viewer.options()
|
|
291
292
|
*/
|
|
292
293
|
maxRenderCountOfMobile?: number | undefined;
|
|
293
294
|
/**
|
|
294
|
-
* PC
|
|
295
|
-
*
|
|
295
|
+
* Maximum renderable Gaussian points count for PC.
|
|
296
|
+
* Can be dynamically updated via viewer.options()
|
|
296
297
|
*/
|
|
297
298
|
maxRenderCountOfPc?: number | undefined;
|
|
298
299
|
/**
|
|
299
|
-
*
|
|
300
|
+
* Color brightness factor. Defaults to 1.1.
|
|
300
301
|
*/
|
|
301
302
|
lightFactor?: number | undefined;
|
|
302
303
|
/**
|
|
303
|
-
*
|
|
304
|
+
* Container element or its selector. Defaults to '#gsviewer'.
|
|
305
|
+
* If no container is found when creating canvas, one will be automatically created under body.
|
|
304
306
|
*/
|
|
305
307
|
root?: HTMLElement | string | undefined;
|
|
306
308
|
/**
|
|
307
|
-
*
|
|
309
|
+
* Camera field of view. Defaults to 45.
|
|
308
310
|
*/
|
|
309
311
|
fov?: number | undefined;
|
|
310
312
|
/**
|
|
311
|
-
*
|
|
313
|
+
* Camera near clipping plane. Defaults to 0.1.
|
|
312
314
|
*/
|
|
313
315
|
near?: number | undefined;
|
|
314
316
|
/**
|
|
315
|
-
*
|
|
317
|
+
* Camera far clipping plane. Defaults to 1000.
|
|
316
318
|
*/
|
|
317
319
|
far?: number | undefined;
|
|
318
320
|
/**
|
|
319
|
-
*
|
|
321
|
+
* Camera position. Defaults to [0, -5, 15].
|
|
320
322
|
*/
|
|
321
323
|
position?: number[] | undefined;
|
|
322
324
|
/**
|
|
323
|
-
*
|
|
325
|
+
* Camera look-at target. Defaults to [0, 0, 0].
|
|
324
326
|
*/
|
|
325
327
|
lookAt?: number[] | undefined;
|
|
326
328
|
/**
|
|
327
|
-
*
|
|
329
|
+
* Camera up vector. Defaults to [0, -1, 0].
|
|
328
330
|
*/
|
|
329
331
|
lookUp?: number[] | undefined;
|
|
330
332
|
/**
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
+
* Auto-rotation flag. Defaults to true.
|
|
334
|
+
* Can be dynamically updated via viewer.options()
|
|
333
335
|
*/
|
|
334
336
|
autoRotate?: boolean | undefined;
|
|
335
337
|
/**
|
|
336
|
-
*
|
|
338
|
+
* Damping effect flag. Defaults to true.
|
|
337
339
|
*/
|
|
338
340
|
enableDamping?: boolean | undefined;
|
|
339
341
|
/**
|
|
340
|
-
*
|
|
342
|
+
* Zoom control flag. Defaults to true.
|
|
341
343
|
*/
|
|
342
344
|
enableZoom?: boolean | undefined;
|
|
343
345
|
/**
|
|
344
|
-
*
|
|
346
|
+
* Rotation control flag. Defaults to true.
|
|
345
347
|
*/
|
|
346
348
|
enableRotate?: boolean | undefined;
|
|
347
349
|
/**
|
|
348
|
-
*
|
|
350
|
+
* Pan control flag. Defaults to true.
|
|
349
351
|
*/
|
|
350
352
|
enablePan?: boolean | undefined;
|
|
351
353
|
/**
|
|
352
|
-
*
|
|
354
|
+
* Minimum camera distance
|
|
353
355
|
*/
|
|
354
356
|
minDistance?: number | undefined;
|
|
355
357
|
/**
|
|
356
|
-
*
|
|
358
|
+
* Maximum camera distance
|
|
357
359
|
*/
|
|
358
360
|
maxDistance?: number | undefined;
|
|
359
361
|
/**
|
|
360
|
-
*
|
|
362
|
+
* Minimum polar angle (vertical rotation limit)
|
|
361
363
|
*/
|
|
362
364
|
minPolarAngle?: number | undefined;
|
|
363
365
|
/**
|
|
364
|
-
*
|
|
366
|
+
* Maximum polar angle (vertical rotation limit)
|
|
365
367
|
*/
|
|
366
368
|
maxPolarAngle?: number | undefined;
|
|
367
369
|
/**
|
|
368
|
-
*
|
|
370
|
+
* Keyboard controls flag. Defaults to true.
|
|
369
371
|
*/
|
|
370
372
|
enableKeyboard?: boolean | undefined;
|
|
371
373
|
/**
|
|
372
|
-
*
|
|
374
|
+
* Annotation mode flag. Defaults to false.
|
|
373
375
|
*/
|
|
374
376
|
markMode?: boolean | undefined;
|
|
375
377
|
/**
|
|
376
|
-
*
|
|
378
|
+
* Annotation type (point/lines/plans/distance/area/circle)
|
|
377
379
|
*/
|
|
378
380
|
markType?: 'point' | 'lines' | 'plans' | 'distance' | 'area' | 'circle' | undefined;
|
|
379
381
|
/**
|
|
380
|
-
*
|
|
382
|
+
* Annotation visibility flag. Defaults to true.
|
|
381
383
|
*/
|
|
382
384
|
markVisible?: boolean | undefined;
|
|
383
385
|
/**
|
|
384
|
-
*
|
|
386
|
+
* Meter scale (how many meters per unit length). Defaults to 1.
|
|
385
387
|
*/
|
|
386
388
|
meterScale?: number | undefined;
|
|
387
389
|
/**
|
|
388
|
-
*
|
|
390
|
+
* Disable local file drag-and-drop flag. Defaults to false.
|
|
389
391
|
*/
|
|
390
392
|
disableDropLocalFile?: boolean | undefined;
|
|
391
393
|
/**
|
|
392
|
-
*
|
|
394
|
+
* Spherical harmonics rendering level. Defaults to the maximum renderable level of model data.
|
|
393
395
|
*/
|
|
394
396
|
shDegree?: number | undefined;
|
|
395
397
|
/**
|
|
396
|
-
*
|
|
398
|
+
* Background color (defaults to '#000000')
|
|
397
399
|
*/
|
|
398
400
|
background?: string;
|
|
399
401
|
}
|
|
@@ -433,66 +435,66 @@ export declare class SplatMesh extends Mesh {
|
|
|
433
435
|
}
|
|
434
436
|
|
|
435
437
|
/**
|
|
436
|
-
*
|
|
438
|
+
* Splat mesh configuration options
|
|
437
439
|
*/
|
|
438
440
|
export declare interface SplatMeshOptions {
|
|
439
441
|
/**
|
|
440
|
-
*
|
|
442
|
+
* Name
|
|
441
443
|
*/
|
|
442
444
|
name?: string;
|
|
443
445
|
/**
|
|
444
|
-
*
|
|
446
|
+
* Renderer instance to be used
|
|
445
447
|
*/
|
|
446
448
|
renderer: Renderer;
|
|
447
449
|
/**
|
|
448
|
-
*
|
|
450
|
+
* Scene instance to be used
|
|
449
451
|
*/
|
|
450
452
|
scene: Scene;
|
|
451
453
|
/**
|
|
452
|
-
*
|
|
454
|
+
* Camera controls
|
|
453
455
|
*/
|
|
454
456
|
controls?: OrbitControls;
|
|
455
457
|
/**
|
|
456
|
-
*
|
|
458
|
+
* Renderer event manager
|
|
457
459
|
*/
|
|
458
460
|
viewerEvents?: Events;
|
|
459
461
|
/**
|
|
460
|
-
*
|
|
462
|
+
* Debug mode flag; defaults to false in production
|
|
461
463
|
*/
|
|
462
464
|
debugMode?: boolean;
|
|
463
465
|
/**
|
|
464
|
-
*
|
|
466
|
+
* Large-scene mode flag; cannot be changed after initialization
|
|
465
467
|
*/
|
|
466
468
|
bigSceneMode?: boolean;
|
|
467
469
|
/**
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
+
* Point-cloud rendering mode; defaults to true,
|
|
471
|
+
* Can be updated dynamically via viewer.options()
|
|
470
472
|
*/
|
|
471
473
|
pointcloudMode?: boolean;
|
|
472
474
|
/**
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
+
* Maximum number of Gaussians to render on mobile devices,
|
|
476
|
+
* Can be updated dynamically via viewer.options()
|
|
475
477
|
*/
|
|
476
478
|
maxRenderCountOfMobile?: number;
|
|
477
479
|
/**
|
|
478
|
-
* PC
|
|
479
|
-
*
|
|
480
|
+
* Maximum number of Gaussians to render on PC,
|
|
481
|
+
* Can be updated dynamically via viewer.options()
|
|
480
482
|
*/
|
|
481
483
|
maxRenderCountOfPc?: number;
|
|
482
484
|
/**
|
|
483
|
-
*
|
|
485
|
+
* Brightness scale factor; defaults to 1.0
|
|
484
486
|
*/
|
|
485
487
|
lightFactor?: number;
|
|
486
488
|
/**
|
|
487
|
-
*
|
|
489
|
+
* Whether to display a watermark; defaults to true
|
|
488
490
|
*/
|
|
489
491
|
showWatermark?: boolean;
|
|
490
492
|
/**
|
|
491
|
-
*
|
|
493
|
+
* Spherical harmonics rendering degree; defaults to 0
|
|
492
494
|
*/
|
|
493
495
|
shDegree?: number;
|
|
494
496
|
/**
|
|
495
|
-
*
|
|
497
|
+
* Enable depth testing; defaults to true
|
|
496
498
|
*/
|
|
497
499
|
depthTest?: boolean;
|
|
498
500
|
}
|