@reall3d/reall3dviewer 0.1.3 → 0.1.4
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 +16 -7
- package/dist/pkg.js +2627 -2028
- package/dist/pkg.umd.cjs +322 -278
- package/package.json +1 -1
package/dist/pkg.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { AmbientLight } from 'three';
|
|
|
2
2
|
import { DirectionalLight } from 'three';
|
|
3
3
|
import { EventDispatcher } from 'three';
|
|
4
4
|
import { MapControls } from 'three/examples/jsm/controls/MapControls.js';
|
|
5
|
-
import { Matrix4 } from 'three';
|
|
6
5
|
import { Mesh } from 'three';
|
|
6
|
+
import { Object3D } from 'three';
|
|
7
7
|
import { OrbitControls } from 'three/examples/jsm/Addons.js';
|
|
8
8
|
import { PerspectiveCamera } from 'three';
|
|
9
9
|
import { Renderer } from 'three';
|
|
@@ -11,6 +11,13 @@ import { Scene } from 'three';
|
|
|
11
11
|
import * as tt from '@gotoeasy/three-tile';
|
|
12
12
|
import { WebGLRenderer } from 'three';
|
|
13
13
|
|
|
14
|
+
declare class BoundBox extends Object3D {
|
|
15
|
+
private boxLines;
|
|
16
|
+
constructor(minX?: number, minY?: number, minZ?: number, maxX?: number, maxY?: number, maxZ?: number);
|
|
17
|
+
update(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, show?: boolean): void;
|
|
18
|
+
dispose(): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
/**
|
|
15
22
|
* 相机参数信息
|
|
16
23
|
*/
|
|
@@ -85,6 +92,8 @@ export declare interface MetaData {
|
|
|
85
92
|
watermark?: string;
|
|
86
93
|
/** 是否显示水印 */
|
|
87
94
|
showWatermark?: boolean;
|
|
95
|
+
/** 是否显示包围盒 */
|
|
96
|
+
showBoundBox?: boolean;
|
|
88
97
|
/** 相机参数 */
|
|
89
98
|
cameraInfo?: CameraInfo;
|
|
90
99
|
/** 标注 */
|
|
@@ -93,6 +102,8 @@ export declare interface MetaData {
|
|
|
93
102
|
flyPositions?: number[];
|
|
94
103
|
/** 飞翔相机注视点 */
|
|
95
104
|
flyTargets?: number[];
|
|
105
|
+
/** 是否粒子加载效果,小场景用 */
|
|
106
|
+
particleMode?: boolean;
|
|
96
107
|
/** 自动切割数量 */
|
|
97
108
|
autoCut?: number;
|
|
98
109
|
/** 变换矩阵 */
|
|
@@ -112,9 +123,9 @@ export declare interface ModelOptions {
|
|
|
112
123
|
*/
|
|
113
124
|
url: string;
|
|
114
125
|
/**
|
|
115
|
-
* 模型格式(ply | splat | spx | spz),默认自动识别
|
|
126
|
+
* 模型格式(ply | splat | spx | spz | obj),默认自动识别
|
|
116
127
|
*/
|
|
117
|
-
format?: 'ply' | 'splat' | 'spx' | 'spz';
|
|
128
|
+
format?: 'ply' | 'splat' | 'spx' | 'spz' | 'obj';
|
|
118
129
|
/**
|
|
119
130
|
* 是否重新下载
|
|
120
131
|
*/
|
|
@@ -189,6 +200,7 @@ export declare class Reall3dViewer {
|
|
|
189
200
|
private splatMesh;
|
|
190
201
|
private events;
|
|
191
202
|
private updateTime;
|
|
203
|
+
private metaMatrix;
|
|
192
204
|
needUpdate: boolean;
|
|
193
205
|
constructor(opts?: Reall3dViewerOptions);
|
|
194
206
|
private init;
|
|
@@ -395,6 +407,7 @@ export declare class SplatMesh extends Mesh {
|
|
|
395
407
|
private disposed;
|
|
396
408
|
private events;
|
|
397
409
|
private opts;
|
|
410
|
+
boundBox: BoundBox;
|
|
398
411
|
/**
|
|
399
412
|
* 构造函数
|
|
400
413
|
* @param options 渲染器、场景、相机都应该传入
|
|
@@ -439,10 +452,6 @@ export declare interface SplatMeshOptions {
|
|
|
439
452
|
* 控制器
|
|
440
453
|
*/
|
|
441
454
|
controls?: OrbitControls;
|
|
442
|
-
/**
|
|
443
|
-
* 模型矩阵
|
|
444
|
-
*/
|
|
445
|
-
matrix?: Matrix4;
|
|
446
455
|
/**
|
|
447
456
|
* 渲染器事件管理器
|
|
448
457
|
*/
|