qg3dviewer 1.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/LICENSE +21 -0
- package/README.md +94 -0
- package/dist/controls/CameraControls.d.ts +14 -0
- package/dist/controls/SetupCameraControls.d.ts +35 -0
- package/dist/controls/SetupFlying.d.ts +2 -0
- package/dist/convert/PlyToSplatConverter.d.ts +1 -0
- package/dist/convert/SplatToPlyConverter.d.ts +1 -0
- package/dist/events/EventConstants.d.ts +438 -0
- package/dist/events/EventListener.d.ts +2 -0
- package/dist/events/Events.d.ts +12 -0
- package/dist/events/SetupGlobalEV.d.ts +2 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.es.js +6817 -0
- package/dist/index.umd.js +747 -0
- package/dist/internal/Index.d.ts +1 -0
- package/dist/internal/WebglVars.d.ts +31 -0
- package/dist/mapviewer/Reall3dMapViewer.d.ts +59 -0
- package/dist/mapviewer/Reall3dMapViewerOptions.d.ts +34 -0
- package/dist/mapviewer/events/MapEventListener.d.ts +2 -0
- package/dist/mapviewer/tween/SetupTween.d.ts +2 -0
- package/dist/mapviewer/utils/MapUtils.d.ts +6 -0
- package/dist/mapviewer/warpsplatmesh/WarpSplatMesh.d.ts +23 -0
- package/dist/meshs/boundbox/BoundBox.d.ts +7 -0
- package/dist/meshs/controlplane/ArrowHelper.d.ts +12 -0
- package/dist/meshs/controlplane/SetupControlPlane.d.ts +2 -0
- package/dist/meshs/focusmaker/SetupFocusMarker.d.ts +2 -0
- package/dist/meshs/mark/MarkCirclePlan.d.ts +36 -0
- package/dist/meshs/mark/MarkDistanceLine.d.ts +38 -0
- package/dist/meshs/mark/MarkMulitPlans.d.ts +40 -0
- package/dist/meshs/mark/MarkMultiLines.d.ts +37 -0
- package/dist/meshs/mark/MarkSinglePoint.d.ts +23 -0
- package/dist/meshs/mark/SetupMark.d.ts +2 -0
- package/dist/meshs/mark/data/MarkData.d.ts +6 -0
- package/dist/meshs/mark/data/MarkDataCirclePlan.d.ts +34 -0
- package/dist/meshs/mark/data/MarkDataDistanceLine.d.ts +34 -0
- package/dist/meshs/mark/data/MarkDataMultiLines.d.ts +32 -0
- package/dist/meshs/mark/data/MarkDataMultiPlans.d.ts +36 -0
- package/dist/meshs/mark/data/MarkDataSinglePoint.d.ts +24 -0
- package/dist/meshs/splatmesh/SetupSplatMesh.d.ts +2 -0
- package/dist/meshs/splatmesh/SplatMesh.d.ts +38 -0
- package/dist/meshs/splatmesh/SplatMeshOptions.d.ts +106 -0
- package/dist/modeldata/ModelData.d.ts +205 -0
- package/dist/modeldata/ModelOptions.d.ts +17 -0
- package/dist/modeldata/SplatTexdata.d.ts +40 -0
- package/dist/modeldata/SplatTexdataManager.d.ts +5 -0
- package/dist/modeldata/loaders/FileLoader.d.ts +2 -0
- package/dist/modeldata/loaders/PlyLoader.d.ts +5 -0
- package/dist/modeldata/loaders/SogLoader.d.ts +2 -0
- package/dist/modeldata/loaders/SplatLoader.d.ts +2 -0
- package/dist/modeldata/loaders/SpxLoader.d.ts +2 -0
- package/dist/modeldata/loaders/SpzLoader.d.ts +2 -0
- package/dist/modeldata/text/SetupGaussianText.d.ts +2 -0
- package/dist/modeldata/wasm/WasmParser.d.ts +19 -0
- package/dist/raycaster/SetupRaycaster.d.ts +2 -0
- package/dist/sorter/SetupSorter.d.ts +2 -0
- package/dist/sorter/Sorter.d.ts +1 -0
- package/dist/tools/brush-selection.d.ts +10 -0
- package/dist/tools/lasso-selection.d.ts +10 -0
- package/dist/tools/polygon-selection.d.ts +10 -0
- package/dist/tools/rect-selection.d.ts +8 -0
- package/dist/tools/tool-manager.d.ts +15 -0
- package/dist/utils/CommonUtils.d.ts +171 -0
- package/dist/utils/ViewerUtils.d.ts +10 -0
- package/dist/utils/consts/GlobalConstants.d.ts +62 -0
- package/dist/utils/consts/Index.d.ts +2 -0
- package/dist/utils/consts/WkConstants.d.ts +76 -0
- package/dist/viewer/Reall3dViewer.d.ts +57 -0
- package/dist/viewer/Reall3dViewerOptions.d.ts +174 -0
- package/package.json +50 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export declare const ViewerVersion = "v2.0.0-dev";
|
|
2
|
+
export declare const isMobile: boolean;
|
|
3
|
+
export declare const HalfChars = "QWERTYUIOPLKJHGFDSAZXCVBNM1234567890qwertyuioplkjhgfdsazxcvbnm`~!@#$%^&*()-_=+\\|]}[{'\";::,<.>//? \t";
|
|
4
|
+
export declare const BlankingTimeOfSmallScene: number;
|
|
5
|
+
export declare const BlankingTimeOfLargeScene: number;
|
|
6
|
+
export declare const BinHeaderSize = 140;
|
|
7
|
+
export declare const SpxHeaderSize = 128;
|
|
8
|
+
export declare const DataSize36 = 36;
|
|
9
|
+
export declare const DataSize32 = 32;
|
|
10
|
+
export declare const SplatDataSize32 = 32;
|
|
11
|
+
export declare const SplatDataSize20 = 20;
|
|
12
|
+
export declare const SplatDataSize16 = 16;
|
|
13
|
+
export declare const WasmBlockSize: number;
|
|
14
|
+
export declare const MobileDownloadLimitSplatCount: number;
|
|
15
|
+
export declare const PcDownloadLimitSplatCount: number;
|
|
16
|
+
export declare const SH_C0 = 0.28209479177387814;
|
|
17
|
+
export declare const MinQualityLevel = 1;
|
|
18
|
+
export declare const DefaultQualityLevel = 5;
|
|
19
|
+
export declare const MaxQualityLevel = 9;
|
|
20
|
+
/** 【官方创建者Reall3d】Creater: Reall3d */
|
|
21
|
+
export declare const SpxCreaterReall3d = 0;
|
|
22
|
+
/** 【spx中定义的公开格式】spx open format */
|
|
23
|
+
export declare const SpxOpenFormat0 = 0;
|
|
24
|
+
/** 【spx中定义的公开数据块格式】Open Block Content Format 20, basic data */
|
|
25
|
+
export declare const SpxBlockFormatData20 = 20;
|
|
26
|
+
/** 【spx中定义的公开数据块格式】Open Block Content Format 19, basic data */
|
|
27
|
+
export declare const SpxBlockFormatData19 = 19;
|
|
28
|
+
/** 【spx中定义的公开数据块格式】Open Block Content Format 190, basic data */
|
|
29
|
+
export declare const SpxBlockFormatData190 = 190;
|
|
30
|
+
/** 【spx中定义的公开数据块格式】Open Block Content Format 1, data of SH degree 1 (SH1 only) */
|
|
31
|
+
export declare const SpxBlockFormatSH1 = 1;
|
|
32
|
+
/** 【spx中定义的公开数据块格式】Open Block Content Format 2, data of SH degree 2 (SH1 + SH2) */
|
|
33
|
+
export declare const SpxBlockFormatSH2 = 2;
|
|
34
|
+
/** 【spx中定义的公开数据块格式】Open Block Content Format 3, data of SH degree 3 (SH3 only) */
|
|
35
|
+
export declare const SpxBlockFormatSH3 = 3;
|
|
36
|
+
/** 【spx中定义的公开数据块格式】Open Block Content Format 4, data of SH degree 1~3 (SH1 + SH2 + SH3) */
|
|
37
|
+
export declare const SpxBlockFormatSH4 = 4;
|
|
38
|
+
/** 【Reall3D扩展的专属格式】the exclusive format extended by reall3d */
|
|
39
|
+
export declare const SpxExclusiveFormatReall3d = 3141592653;
|
|
40
|
+
/**
|
|
41
|
+
* 【排序类型】
|
|
42
|
+
* 并不存在一种即性能高效又普遍适用的排序方法,这里提供默认方式作为普适性使用,以及其他多种方式供个性化场景选择使用。
|
|
43
|
+
*
|
|
44
|
+
* 允许按不同场景选择参数,配合调优的近端分段参数depthNearRate或depthNearValue一并写入meta达到个性化优化效果。
|
|
45
|
+
* 注意应避免动态切换排序类型,否则可能因为不相吻合而适得其反
|
|
46
|
+
* 例:室内迷宫场景,即使场景尺寸远大于2000,但实际拐弯抹角每个角度可能都最多看10个深度尺寸,
|
|
47
|
+
* 这时选择【2010】并设定depthNearValue=10就是合适的。
|
|
48
|
+
*
|
|
49
|
+
* 默认以外的排序类型都是为了具体个性化场景而准备的,应当具体实验后再确定选用。
|
|
50
|
+
*/
|
|
51
|
+
export declare enum SortTypes {
|
|
52
|
+
/** 默认,按视图投影矩阵计算z-depth进行全量排序 */
|
|
53
|
+
Default = 1,
|
|
54
|
+
/** 按相机方向计算z-depth进行排序,剔除背后和远端数据,仅渲染近端,有遮挡只能看到近端场景时适用 */
|
|
55
|
+
ZdepthFrontNearest2010 = 2010,
|
|
56
|
+
/** 按相机方向计算z-depth进行排序,剔除背后数据 */
|
|
57
|
+
ZdepthFront2011 = 2011,
|
|
58
|
+
/** 按相机方向计算z-depth进行排序,剔除背后数据,分近端远端两段排序,用以提高近端渲染精度 */
|
|
59
|
+
ZdepthFrontNearFar2012 = 2012,
|
|
60
|
+
/** 按相机方向计算z-depth进行排序,不剔除数据,分近端远端两段排序,用以提高近端渲染精度 */
|
|
61
|
+
ZdepthFullNearFar2112 = 2112
|
|
62
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** Splat纹理 */
|
|
2
|
+
export declare const WkTexdata: string;
|
|
3
|
+
/** Splat索引 */
|
|
4
|
+
export declare const WkSplatIndex: string;
|
|
5
|
+
/** Splat索引传递完成 */
|
|
6
|
+
export declare const WkSplatIndexDone: string;
|
|
7
|
+
/** 当前模型已下载数据的最大半径 */
|
|
8
|
+
export declare const WkCurrentMaxRadius: string;
|
|
9
|
+
/** 模型的最大半径(小场景bin格式用) */
|
|
10
|
+
export declare const WkMaxRadius: string;
|
|
11
|
+
/** 模型中心点高度(小场景bin格式用) */
|
|
12
|
+
export declare const WkTopY: string;
|
|
13
|
+
/** 纹理索引 */
|
|
14
|
+
export declare const WkIndex: string;
|
|
15
|
+
/** 数据版本(时间戳) */
|
|
16
|
+
export declare const WkVersion: string;
|
|
17
|
+
/** 渲染的高斯数量 */
|
|
18
|
+
export declare const WkRenderSplatCount: string;
|
|
19
|
+
/** 可见的高斯数量 */
|
|
20
|
+
export declare const WkVisibleSplatCount: string;
|
|
21
|
+
/** 模型中的高斯数量 */
|
|
22
|
+
export declare const WkModelSplatCount: string;
|
|
23
|
+
/** 排序开始时间 */
|
|
24
|
+
export declare const WkSortStartTime: string;
|
|
25
|
+
/** 排序消耗时间 */
|
|
26
|
+
export declare const WkSortTime: string;
|
|
27
|
+
/** 纹理就绪 */
|
|
28
|
+
export declare const WkTextureReady: string;
|
|
29
|
+
/** 模型数据缓冲 */
|
|
30
|
+
export declare const WkSplatDataBuffer: string;
|
|
31
|
+
/** 是否大场景 */
|
|
32
|
+
export declare const WkIsBigSceneMode: string;
|
|
33
|
+
/** 最大渲染数量 */
|
|
34
|
+
export declare const WkMaxRenderCount: string;
|
|
35
|
+
/** bin格式版本 */
|
|
36
|
+
export declare const WkBinVersion: string;
|
|
37
|
+
/** 视图投影矩阵 */
|
|
38
|
+
export declare const WkViewProjection: string;
|
|
39
|
+
/** 上传纹理的版本 */
|
|
40
|
+
export declare const WkUploadTextureVersion: string;
|
|
41
|
+
/** 排序用已就绪的坐标 */
|
|
42
|
+
export declare const WkXyz: string;
|
|
43
|
+
/** 排序用已就绪的水印坐标 */
|
|
44
|
+
export declare const WkWxyz: string;
|
|
45
|
+
/** 包围盒 */
|
|
46
|
+
export declare const WkMinX: string;
|
|
47
|
+
/** 包围盒 */
|
|
48
|
+
export declare const WkMaxX: string;
|
|
49
|
+
/** 包围盒 */
|
|
50
|
+
export declare const WkMinY: string;
|
|
51
|
+
/** 包围盒 */
|
|
52
|
+
export declare const WkMaxY: string;
|
|
53
|
+
/** 包围盒 */
|
|
54
|
+
export declare const WkMinZ: string;
|
|
55
|
+
/** 包围盒 */
|
|
56
|
+
export declare const WkMaxZ: string;
|
|
57
|
+
/** 初始化 */
|
|
58
|
+
export declare const WkInit: string;
|
|
59
|
+
/** 水印数量 */
|
|
60
|
+
export declare const WkWatermarkCount: string;
|
|
61
|
+
/** 相机方向 */
|
|
62
|
+
export declare const WkCameraDirection: string;
|
|
63
|
+
/** 相机位置 */
|
|
64
|
+
export declare const WkCameraPosition: string;
|
|
65
|
+
/** 渲染质量级别 */
|
|
66
|
+
export declare const WkQualityLevel: string;
|
|
67
|
+
/** 更新参数 */
|
|
68
|
+
export declare const WkUpdateParams: string;
|
|
69
|
+
/** 排序桶使用的位数 */
|
|
70
|
+
export declare const WkBucketBits: string;
|
|
71
|
+
/** 排序类型 */
|
|
72
|
+
export declare const WkSortType: string;
|
|
73
|
+
/** 深度远近分段比例 */
|
|
74
|
+
export declare const WkDepthNearRate: string;
|
|
75
|
+
/** 深度远近分段值(设定时优先) */
|
|
76
|
+
export declare const WkDepthNearValue: string;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ModelOptions } from '../modeldata/ModelOptions';
|
|
2
|
+
import { Reall3dViewerOptions } from './Reall3dViewerOptions';
|
|
3
|
+
/**
|
|
4
|
+
* Built-in Gaussian Splatting model viewer
|
|
5
|
+
*/
|
|
6
|
+
export declare class Reall3dViewer {
|
|
7
|
+
private disposed;
|
|
8
|
+
private splatMesh;
|
|
9
|
+
private events;
|
|
10
|
+
private updateTime;
|
|
11
|
+
private metaMatrix;
|
|
12
|
+
needUpdate: boolean;
|
|
13
|
+
constructor(opts?: Reall3dViewerOptions);
|
|
14
|
+
private init;
|
|
15
|
+
/**
|
|
16
|
+
* 允许拖拽本地文件进行渲染
|
|
17
|
+
*/
|
|
18
|
+
private enableDropLocalFile;
|
|
19
|
+
/**
|
|
20
|
+
* 刷新
|
|
21
|
+
*/
|
|
22
|
+
update(): void;
|
|
23
|
+
fire(n: number, p1?: any, p2?: any): void;
|
|
24
|
+
/**
|
|
25
|
+
* 设定或者获取最新配置项
|
|
26
|
+
* @param opts 配置项
|
|
27
|
+
* @returns 最新配置项
|
|
28
|
+
*/
|
|
29
|
+
options(opts?: Reall3dViewerOptions): Reall3dViewerOptions;
|
|
30
|
+
/**
|
|
31
|
+
* 重置
|
|
32
|
+
*/
|
|
33
|
+
reset(opts?: Reall3dViewerOptions): void;
|
|
34
|
+
/**
|
|
35
|
+
* 光圈过渡切换显示
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
switchDeiplayMode(): void;
|
|
39
|
+
/**
|
|
40
|
+
* 添加场景
|
|
41
|
+
* @param sceneUrl 场景地址
|
|
42
|
+
*/
|
|
43
|
+
addScene(sceneUrl: string): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* 添加要渲染的高斯模型(小场景模式)
|
|
46
|
+
* @param urlOpts 高斯模型链接或元数据文件链接或选项
|
|
47
|
+
*/
|
|
48
|
+
addModel(urlOpts: string | ModelOptions, useMeta?: boolean): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* 根据需要暴露的接口
|
|
51
|
+
*/
|
|
52
|
+
private initGsApi;
|
|
53
|
+
/**
|
|
54
|
+
* 销毁渲染器不再使用
|
|
55
|
+
*/
|
|
56
|
+
dispose(): void;
|
|
57
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { PerspectiveCamera, Renderer, Scene } from 'three';
|
|
2
|
+
import { OrbitControls } from 'three/examples/jsm/Addons.js';
|
|
3
|
+
import { Events } from '../events/Events';
|
|
4
|
+
import { TransitionEffects } from '../meshs/splatmesh/SplatMeshOptions';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration options for Reall3dViewer
|
|
7
|
+
*/
|
|
8
|
+
export interface Reall3dViewerOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Specify a custom renderer instance. If undefined, one will be created automatically.
|
|
11
|
+
*/
|
|
12
|
+
renderer?: Renderer | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Specify a custom scene instance. If undefined, one will be created automatically.
|
|
15
|
+
*/
|
|
16
|
+
scene?: Scene | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Specify a custom camera instance. If undefined, one will be created automatically.
|
|
19
|
+
*/
|
|
20
|
+
camera?: PerspectiveCamera | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Orbit controls instance
|
|
23
|
+
*/
|
|
24
|
+
controls?: OrbitControls;
|
|
25
|
+
/**
|
|
26
|
+
* Renderer event manager
|
|
27
|
+
*/
|
|
28
|
+
viewerEvents?: Events | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Debug mode flag. Defaults to false in production.
|
|
31
|
+
*/
|
|
32
|
+
debugMode?: boolean | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Large scene mode flag. Cannot be modified after initialization.
|
|
35
|
+
*/
|
|
36
|
+
bigSceneMode?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Point cloud rendering mode. Defaults to true.
|
|
39
|
+
* Can be dynamically updated via viewer.options()
|
|
40
|
+
*/
|
|
41
|
+
pointcloudMode?: boolean | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Maximum renderable Gaussian points count for mobile devices.
|
|
44
|
+
* Can be dynamically updated via viewer.options()
|
|
45
|
+
*/
|
|
46
|
+
maxRenderCountOfMobile?: number | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Maximum renderable Gaussian points count for PC.
|
|
49
|
+
* Can be dynamically updated via viewer.options()
|
|
50
|
+
*/
|
|
51
|
+
maxRenderCountOfPc?: number | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Color brightness factor. Defaults to 1.1.
|
|
54
|
+
*/
|
|
55
|
+
lightFactor?: number | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Container element or its selector. Defaults to '#gsviewer'.
|
|
58
|
+
* If no container is found when creating canvas, one will be automatically created under body.
|
|
59
|
+
*/
|
|
60
|
+
root?: HTMLElement | string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Camera field of view. Defaults to 45.
|
|
63
|
+
*/
|
|
64
|
+
fov?: number | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Camera near clipping plane. Defaults to 0.1.
|
|
67
|
+
*/
|
|
68
|
+
near?: number | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Camera far clipping plane. Defaults to 1000.
|
|
71
|
+
*/
|
|
72
|
+
far?: number | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Camera position. Defaults to [0, -5, 15].
|
|
75
|
+
*/
|
|
76
|
+
position?: number[] | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Camera look-at target. Defaults to [0, 0, 0].
|
|
79
|
+
*/
|
|
80
|
+
lookAt?: number[] | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Camera up vector. Defaults to [0, -1, 0].
|
|
83
|
+
*/
|
|
84
|
+
lookUp?: number[] | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Auto-rotation flag. Defaults to true.
|
|
87
|
+
* Can be dynamically updated via viewer.options()
|
|
88
|
+
*/
|
|
89
|
+
autoRotate?: boolean | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Damping effect flag. Defaults to true.
|
|
92
|
+
*/
|
|
93
|
+
enableDamping?: boolean | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Zoom control flag. Defaults to true.
|
|
96
|
+
*/
|
|
97
|
+
enableZoom?: boolean | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Rotation control flag. Defaults to true.
|
|
100
|
+
*/
|
|
101
|
+
enableRotate?: boolean | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* Pan control flag. Defaults to true.
|
|
104
|
+
*/
|
|
105
|
+
enablePan?: boolean | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Minimum camera distance
|
|
108
|
+
*/
|
|
109
|
+
minDistance?: number | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Maximum camera distance
|
|
112
|
+
*/
|
|
113
|
+
maxDistance?: number | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Minimum polar angle (vertical rotation limit)
|
|
116
|
+
*/
|
|
117
|
+
minPolarAngle?: number | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* Maximum polar angle (vertical rotation limit)
|
|
120
|
+
*/
|
|
121
|
+
maxPolarAngle?: number | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Keyboard controls flag. Defaults to true.
|
|
124
|
+
*/
|
|
125
|
+
enableKeyboard?: boolean | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* Annotation mode flag. Defaults to false.
|
|
128
|
+
*/
|
|
129
|
+
markMode?: boolean | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* Annotation type (point/lines/plans/distance/area/circle)
|
|
132
|
+
*/
|
|
133
|
+
markType?: 'point' | 'lines' | 'plans' | 'distance' | 'area' | 'circle' | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Annotation visibility flag. Defaults to true.
|
|
136
|
+
*/
|
|
137
|
+
markVisible?: boolean | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* Meter scale (how many meters per unit length). Defaults to 1.
|
|
140
|
+
*/
|
|
141
|
+
meterScale?: number | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* Disable local file drag-and-drop flag. Defaults to false.
|
|
144
|
+
*/
|
|
145
|
+
disableDropLocalFile?: boolean | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Spherical harmonics rendering level. Defaults to the maximum renderable level of model data.
|
|
148
|
+
*/
|
|
149
|
+
shDegree?: number | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* Background color (defaults to '#000000')
|
|
152
|
+
*/
|
|
153
|
+
background?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Render quality level (1~9, default to 5)
|
|
156
|
+
*/
|
|
157
|
+
qualityLevel?: number;
|
|
158
|
+
/**
|
|
159
|
+
* Sort type (default to SortTypes.Default)
|
|
160
|
+
*/
|
|
161
|
+
sortType?: number;
|
|
162
|
+
/**
|
|
163
|
+
* disable transition effect on load; defaults to false
|
|
164
|
+
*/
|
|
165
|
+
disableTransitionEffectOnLoad?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* transition effect type; defaults to ModelCenterCirccle
|
|
168
|
+
*/
|
|
169
|
+
transitionEffect?: TransitionEffects;
|
|
170
|
+
/**
|
|
171
|
+
* Auto play background audio (defaults to false)
|
|
172
|
+
*/
|
|
173
|
+
autoPlayBgAudio?: boolean;
|
|
174
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "qg3dviewer",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.umd.js",
|
|
6
|
+
"module": "./dist/index.es.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.es.js",
|
|
12
|
+
"require": "./dist/index.umd.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"package.json",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "vite --config vite.config.dev.ts",
|
|
22
|
+
"build:demo": "tsc && vite build --config vite.config.dev.ts",
|
|
23
|
+
"build": "tsc && vite build",
|
|
24
|
+
"preview": "vite preview"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"fflate": "^0.8.2",
|
|
28
|
+
"lzma": "^2.3.2",
|
|
29
|
+
"xz-decompress": "^0.2.3"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/node": "^22.13.5",
|
|
33
|
+
"@types/three": "^0.171.0",
|
|
34
|
+
"@vituum/vite-plugin-postcss": "^1.1.0",
|
|
35
|
+
"less": "^4.2.2",
|
|
36
|
+
"typescript": "^5.6.3",
|
|
37
|
+
"vite": "^6.1.1",
|
|
38
|
+
"vite-plugin-dts": "^4.5.4",
|
|
39
|
+
"vite-plugin-glsl": "^1.4.2",
|
|
40
|
+
"vite-plugin-svg-icons": "^2.0.1"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@gotoeasy/three-tile": "^0.8.7",
|
|
44
|
+
"@tweenjs/tween.js": "^25.0.0",
|
|
45
|
+
"three": "^0.171.0"
|
|
46
|
+
},
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"keywords": [],
|
|
49
|
+
"author": ""
|
|
50
|
+
}
|