@reall3d/reall3dviewer 2.5.7 → 3.0.0

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 CHANGED
@@ -118,6 +118,7 @@ declare class Events {
118
118
  fire(key: number | string, ...args: any): any;
119
119
  tryFire(key: number | string, ...args: any): any;
120
120
  off(key: number | string): void;
121
+ replace(key: number | string, fn?: Function): void;
121
122
  clear(): void;
122
123
  }
123
124
 
@@ -190,6 +191,8 @@ export declare interface MetaData {
190
191
  disableRightClickFocus?: boolean;
191
192
  /** Audio */
192
193
  audio?: any;
194
+ /** bg Audio */
195
+ bgAudio?: string;
193
196
  /** render quality level */
194
197
  qualityLevel?: number;
195
198
  /** sort type */
@@ -206,10 +209,6 @@ export declare interface MetaData {
206
209
  minAlpha?: number;
207
210
  /** Enable particle loading effect (small scenes) */
208
211
  particleMode?: boolean;
209
- /** is large scene */
210
- isLargeScene?: boolean;
211
- /** cut size */
212
- cutSize?: number;
213
212
  /** Transformation matrix */
214
213
  transform?: number[];
215
214
  /** Geolocation (EPSG:4326 WGS 84) */
@@ -231,12 +230,6 @@ export declare interface MetaData {
231
230
  */
232
231
  pcLodDistances?: number[];
233
232
  mobileLodDistances?: number[];
234
- mobileLodCacheCount?: number;
235
- pcLodCacheCount?: number;
236
- /**
237
- * Environment(skybox) flag. Defaults to false.
238
- */
239
- enableEnvironment?: boolean;
240
233
  /**
241
234
  * View mode. 1:First-Person View, 3:Third-Person View.
242
235
  */
@@ -255,6 +248,27 @@ export declare interface MetaData {
255
248
  autuUpdateVirtualGroundPosition?: boolean;
256
249
  minimap?: MinimapOptions;
257
250
  audioMask?: CircularAudioMaskOptions;
251
+ /**
252
+ * 是否使用GPU缓存,默认false(true:使用GPU缓存,false:使用内存缓存)
253
+ * 较高端设备可尝试GPU缓存调优性能,应按实际调配
254
+ */
255
+ useGpuCache?: boolean;
256
+ /**
257
+ * PC端大场景时文件缓存数量,默认 DefaultLodCacheFileCount
258
+ * 设定值太小可能达不到缓存效果反而产生影响;设定值太大可能引起浏览器内存限制,或者引起内存分配失败等运行期异常
259
+ * 应结合目标设备能力以及切割的数据文件大小,综合判断设定
260
+ */
261
+ pcLodCacheFileCount?: number;
262
+ /**
263
+ * 移动端大场景时文件缓存数量,默认 DefaultLodCacheFileCount
264
+ * 设定值太小可能达不到缓存效果反而产生影响;设定值太大可能引起浏览器内存限制,或者引起内存分配失败等运行期异常
265
+ * 应结合目标设备能力以及切割的数据文件大小,综合判断设定
266
+ */
267
+ mobileLodCacheFileCount?: number;
268
+ /** Color brightness factor. Defaults to DefaultLightFactor */
269
+ lightFactor?: number | undefined;
270
+ /** Background color (defaults to '#000000') */
271
+ background?: string;
258
272
  }
259
273
 
260
274
  export declare interface MinimapOptions {
@@ -448,7 +462,7 @@ export declare class Reall3dViewer {
448
462
  constructor(opts?: Reall3dViewerOptions);
449
463
  private init;
450
464
  /**
451
- * 允许拖拽本地文件进行渲染
465
+ * 允许拖拽本地文件进行渲染(支持模型文件、*.meta.json文件、*.scene.json文件)
452
466
  */
453
467
  private enableDropLocalFile;
454
468
  /**
@@ -482,10 +496,6 @@ export declare class Reall3dViewer {
482
496
  */
483
497
  addModel(urlOpts: string | ModelOptions): Promise<void>;
484
498
  private loadGlb;
485
- /**
486
- * 根据需要暴露的接口
487
- */
488
- private initGsApi;
489
499
  /**
490
500
  * 销毁渲染器不再使用
491
501
  */
@@ -529,16 +539,6 @@ export declare interface Reall3dViewerOptions {
529
539
  * Can be dynamically updated via viewer.options()
530
540
  */
531
541
  pointcloudMode?: boolean | undefined;
532
- /**
533
- * Maximum renderable Gaussian points count for mobile devices.
534
- * Can be dynamically updated via viewer.options()
535
- */
536
- maxRenderCountOfMobile?: number | undefined;
537
- /**
538
- * Maximum renderable Gaussian points count for PC.
539
- * Can be dynamically updated via viewer.options()
540
- */
541
- maxRenderCountOfPc?: number | undefined;
542
542
  /**
543
543
  * Color brightness factor. Defaults to 1.1.
544
544
  */
@@ -665,10 +665,6 @@ export declare interface Reall3dViewerOptions {
665
665
  * Auto play background audio (defaults to false)
666
666
  */
667
667
  autoPlayBgAudio?: boolean;
668
- /**
669
- * Environment(skybox) flag. Defaults to false.
670
- */
671
- enableEnvironment?: boolean;
672
668
  /**
673
669
  * View mode. 1:First-Person View, 3:Third-Person View.
674
670
  */
@@ -696,7 +692,7 @@ export declare class SplatMesh extends Mesh {
696
692
  * @param opts 配置项
697
693
  * @returns 最新配置项
698
694
  */
699
- options(opts?: SplatMeshOptions): SplatMeshOptions;
695
+ options(opts?: any): any;
700
696
  /**
701
697
  * 添加渲染指定高斯模型
702
698
  * @param opts 高斯模型选项
@@ -759,20 +755,6 @@ export declare interface SplatMeshOptions {
759
755
  * Can be updated dynamically via viewer.options()
760
756
  */
761
757
  pointcloudMode?: boolean;
762
- /**
763
- * Maximum number of Gaussians to render on mobile devices,
764
- * Can be updated dynamically via viewer.options()
765
- */
766
- maxRenderCountOfMobile?: number;
767
- /**
768
- * Maximum number of Gaussians to render on PC,
769
- * Can be updated dynamically via viewer.options()
770
- */
771
- maxRenderCountOfPc?: number;
772
- /**
773
- * Brightness scale factor; defaults to 1.0
774
- */
775
- lightFactor?: number;
776
758
  /**
777
759
  * Whether to display a watermark; defaults to false
778
760
  */
@@ -805,22 +787,6 @@ export declare interface SplatMeshOptions {
805
787
  * transition effect type; defaults to ModelCenterCirccle
806
788
  */
807
789
  transitionEffect?: TransitionEffects;
808
- /**
809
- * 最小可渲染直径像素
810
- */
811
- minPixelDiameter?: number;
812
- /**
813
- * 最大直径像素
814
- */
815
- maxPixelDiameter?: number;
816
- /**
817
- * 最小可渲染透明度
818
- */
819
- minAlpha?: number;
820
- /**
821
- * Environment(skybox) flag. Defaults to false.
822
- */
823
- enableEnvironment?: boolean;
824
790
  /**
825
791
  * View mode. 1:First-Person View, 3:Third-Person View.
826
792
  */