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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 reall3d.com
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<p align=center>
|
|
2
|
+
<img style="width:128px;height:128px" src="https://gotoeasy.github.io/reall3d/logo.png"/>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Reall3dViewer
|
|
6
|
+
|
|
7
|
+
`Reall3dViewer` is a 3D Gaussian Splatting viewer built on Three.js. Crafting an exceptional 3DGS viewer is no small feat, which is why we've chosen to open-source our project. We hope to harness the collective wisdom and efforts of the community to drive the advancement of 3DGS applications together!
|
|
8
|
+
|
|
9
|
+
<br>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://github.com/reall3d-com/Reall3dViewer/blob/master/README_ZH.md"><img src="https://img.shields.io/badge/readme-Chinese-brightgreen.svg"></a>
|
|
13
|
+
<a href="https://github.com/microsoft/TypeScript"><img src="https://img.shields.io/badge/lang-TypeScript-brightgreen.svg"></a>
|
|
14
|
+
<a href="https://github.com/mrdoob/three.js"><img src="https://img.shields.io/badge/base-Threejs-brightgreen.svg"></a>
|
|
15
|
+
<a href="https://github.com/reall3d-com/Reall3dViewer/releases/latest"><img src="https://img.shields.io/github/release/reall3d-com/Reall3dViewer.svg"></a>
|
|
16
|
+
<a href="https://github.com/reall3d-com/Reall3dViewer/blob/master/LICENSE"><img src="https://img.shields.io/github/license/reall3d-com/Reall3dViewer"></a>
|
|
17
|
+
<p>
|
|
18
|
+
|
|
19
|
+
<br>
|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
- [x] Support formats: `.ply`, `.splat`, `.spx`, `.spz(v2,v3)`
|
|
23
|
+
- [x] Support mark and measurement
|
|
24
|
+
- [x] Support text watermark
|
|
25
|
+
- [x] Support 1st to 3rd degree spherical harmonics
|
|
26
|
+
- [x] Support rendering models within maps
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## Live demo
|
|
30
|
+
- https://reall3d.com/reall3dviewer/index.html
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## `.spx`
|
|
34
|
+
|
|
35
|
+
- Format Specification: https://github.com/reall3d-com/Reall3dViewer/blob/main/SPX_EN.md
|
|
36
|
+
- Conversion Tool: https://github.com/gotoeasy/gsbox
|
|
37
|
+
|
|
38
|
+
## Basic Usage
|
|
39
|
+
|
|
40
|
+
use source code
|
|
41
|
+
```shell
|
|
42
|
+
# develop
|
|
43
|
+
npm run dev
|
|
44
|
+
|
|
45
|
+
# build
|
|
46
|
+
npm run build
|
|
47
|
+
|
|
48
|
+
# open a web browser to render your 3dgs model
|
|
49
|
+
# http://hostname:port/index.html?url=your-model-link-address
|
|
50
|
+
|
|
51
|
+
# .spx file can be obtained through conversion using the gsbox
|
|
52
|
+
gsbox p2x -i /path/to/input.ply -o /path/to/output.spx -sh 0
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
use npm package [sample project here](https://github.com/reall3d-com/reall3dviewer-samples-use-npm-package)
|
|
56
|
+
```shell
|
|
57
|
+
# install
|
|
58
|
+
npm install @reall3d/reall3dviewer
|
|
59
|
+
|
|
60
|
+
# use built-in viewer
|
|
61
|
+
const viewer = new Reall3dViewer({ root: '#gsviewer' });
|
|
62
|
+
viewer.addModel(`https://reall3d.com/demo-models/yz.spx`);
|
|
63
|
+
|
|
64
|
+
# use splat mesh
|
|
65
|
+
const splatMesh = new SplatMesh({ renderer, scene, controls});
|
|
66
|
+
splatMesh.addModel({ url: 'https://reall3d.com/demo-models/yz.spx' });
|
|
67
|
+
scene.add(splatMesh);
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Docs(By Zread)
|
|
71
|
+
- https://zread.ai/reall3d-com/Reall3dViewer
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## TODO
|
|
75
|
+
- Continuously optimize and enhance rendering performance
|
|
76
|
+
- Large scene
|
|
77
|
+
|
|
78
|
+
## Release History
|
|
79
|
+
https://github.com/reall3d-com/Reall3dViewer/releases
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## Acknowledgments
|
|
83
|
+
We would like to express our gratitude to the following projects for their valuable reference implementations
|
|
84
|
+
- https://github.com/antimatter15/splat
|
|
85
|
+
- https://github.com/mkkellogg/GaussianSplats3D
|
|
86
|
+
- https://github.com/huggingface/gsplat.js
|
|
87
|
+
- https://github.com/playcanvas/supersplat
|
|
88
|
+
- https://github.com/sxguojf/three-tile
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## Contact
|
|
92
|
+
Feel free to submit an issue on the project page. Our commercial version offers a 3DGS model format optimization tool and supports embedding watermarks to protect model ownership. Please don't hesitate to contact us.
|
|
93
|
+
- Site: https://reall3d.com
|
|
94
|
+
- Email: ai@geohold.com
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
2
|
+
import { Reall3dViewerOptions } from '../viewer/Reall3dViewerOptions';
|
|
3
|
+
/**
|
|
4
|
+
* 旋转控制器
|
|
5
|
+
*/
|
|
6
|
+
export declare class CameraControls extends OrbitControls {
|
|
7
|
+
constructor(opts: Reall3dViewerOptions);
|
|
8
|
+
updateByOptions(opts?: Reall3dViewerOptions): void;
|
|
9
|
+
/**
|
|
10
|
+
* 更新旋转轴
|
|
11
|
+
*/
|
|
12
|
+
updateRotateAxis(): void;
|
|
13
|
+
set: any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Events } from '../events/Events';
|
|
2
|
+
/**
|
|
3
|
+
* 相机参数信息
|
|
4
|
+
*/
|
|
5
|
+
export interface CameraInfo {
|
|
6
|
+
/**
|
|
7
|
+
* 相机视场
|
|
8
|
+
*/
|
|
9
|
+
fov?: number;
|
|
10
|
+
/**
|
|
11
|
+
* 相机近截面距离
|
|
12
|
+
*/
|
|
13
|
+
near?: number;
|
|
14
|
+
/**
|
|
15
|
+
* 相机远截面距离
|
|
16
|
+
*/
|
|
17
|
+
far?: number;
|
|
18
|
+
/**
|
|
19
|
+
* 相机宽高比
|
|
20
|
+
*/
|
|
21
|
+
aspect?: number;
|
|
22
|
+
/**
|
|
23
|
+
* 相机位置
|
|
24
|
+
*/
|
|
25
|
+
position: number[];
|
|
26
|
+
/**
|
|
27
|
+
* 相机注视点
|
|
28
|
+
*/
|
|
29
|
+
lookAt?: number[];
|
|
30
|
+
/**
|
|
31
|
+
* 相机上向量
|
|
32
|
+
*/
|
|
33
|
+
lookUp?: number[];
|
|
34
|
+
}
|
|
35
|
+
export declare function setupCameraControls(events: Events): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function handlePlyToSplatConversion(inputFile: File): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function handleFileConversion(inputFile: File): Promise<void>;
|
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
/** 帧率循环调用 */
|
|
2
|
+
export declare const RunLoopByFrame: number;
|
|
3
|
+
/** 定时循环调用 */
|
|
4
|
+
export declare const RunLoopByTime: number;
|
|
5
|
+
/** 提交元数据到服务器 */
|
|
6
|
+
export declare const HttpPostMetaData: number;
|
|
7
|
+
/** 取文本高斯数据 */
|
|
8
|
+
export declare const HttpQueryGaussianText: number;
|
|
9
|
+
/** 计算平面中心点 */
|
|
10
|
+
export declare const ComputePlansCenter: number;
|
|
11
|
+
/** 计算多个平面的面积 */
|
|
12
|
+
export declare const ComputePlansArea: number;
|
|
13
|
+
/** 按数据重新计算多个平面的面积 */
|
|
14
|
+
export declare const ReComputePlansArea: number;
|
|
15
|
+
/** 计算三角面的面积 */
|
|
16
|
+
export declare const ComputePoint3Area: number;
|
|
17
|
+
/** 取得相关对象 */
|
|
18
|
+
export declare const GetWorker: number;
|
|
19
|
+
/** 取得相关对象 */
|
|
20
|
+
export declare const GetCanvas: number;
|
|
21
|
+
/** 取得相关对象 */
|
|
22
|
+
export declare const GetCamera: number;
|
|
23
|
+
/** 取得相关对象 */
|
|
24
|
+
export declare const GetControls: number;
|
|
25
|
+
/** 取得当前相机参数信息 */
|
|
26
|
+
export declare const GetCameraInfo: number;
|
|
27
|
+
/** 设定相机视点 */
|
|
28
|
+
export declare const CameraSetLookAt: number;
|
|
29
|
+
/** 取相机视点 */
|
|
30
|
+
export declare const GetCameraLookAt: number;
|
|
31
|
+
/** 取相机上向量 */
|
|
32
|
+
export declare const GetCameraLookUp: number;
|
|
33
|
+
/** 取相机位置 */
|
|
34
|
+
export declare const GetCameraPosition: number;
|
|
35
|
+
/** 取相机Fov */
|
|
36
|
+
export declare const GetCameraFov: number;
|
|
37
|
+
/** 控制器更新 */
|
|
38
|
+
export declare const ControlsUpdate: number;
|
|
39
|
+
/** 控制器更新旋转轴 */
|
|
40
|
+
export declare const ControlsUpdateRotateAxis: number;
|
|
41
|
+
/** 取视图投影矩阵数组 */
|
|
42
|
+
export declare const GetViewProjectionMatrixArray: number;
|
|
43
|
+
/** 取视图投影矩阵 */
|
|
44
|
+
export declare const GetViewProjectionMatrix: number;
|
|
45
|
+
/** 排序 */
|
|
46
|
+
export declare const WorkerSort: number;
|
|
47
|
+
/** 销毁 */
|
|
48
|
+
export declare const WorkerDispose: number;
|
|
49
|
+
/** 销毁 */
|
|
50
|
+
export declare const EventListenerDispose: number;
|
|
51
|
+
/** 编码 base64 */
|
|
52
|
+
export declare const EncodeBase64: number;
|
|
53
|
+
/** 解码 base64 */
|
|
54
|
+
export declare const DecodeBase64: number;
|
|
55
|
+
/** 开始自动旋转 */
|
|
56
|
+
export declare const StartAutoRotate: number;
|
|
57
|
+
/** 停止自动旋转 */
|
|
58
|
+
export declare const StopAutoRotate: number;
|
|
59
|
+
/** 加载模型开始 */
|
|
60
|
+
export declare const LoaderModelStart: number;
|
|
61
|
+
/** 渲染信息 */
|
|
62
|
+
export declare const Information: number;
|
|
63
|
+
/** 当前时点限制渲染的的高斯点数(包含了附加的动态文字水印数) */
|
|
64
|
+
export declare const GetMaxRenderCount: number;
|
|
65
|
+
/** 渲染帧率 */
|
|
66
|
+
export declare const ComputeFps: number;
|
|
67
|
+
/** Splat全局变量 */
|
|
68
|
+
export declare const CreateSplatUniforms: number;
|
|
69
|
+
/** Splat几何体 */
|
|
70
|
+
export declare const CreateSplatGeometry: number;
|
|
71
|
+
/** Splat材质 */
|
|
72
|
+
export declare const CreateSplatMaterial: number;
|
|
73
|
+
/** Splat网格 */
|
|
74
|
+
export declare const CreateSplatMesh: number;
|
|
75
|
+
/** 取Splat几何体 */
|
|
76
|
+
export declare const GetSplatGeometry: number;
|
|
77
|
+
/** 取Splat材质 */
|
|
78
|
+
export declare const GetSplatMaterial: number;
|
|
79
|
+
/** Splat更新焦距 */
|
|
80
|
+
export declare const SplatUpdateFocal: number;
|
|
81
|
+
/** Splat更新视口 */
|
|
82
|
+
export declare const SplatUpdateViewport: number;
|
|
83
|
+
/** Splat更新索引缓冲数据 */
|
|
84
|
+
export declare const SplatUpdateSplatIndex: number;
|
|
85
|
+
/** Splat更新纹理 */
|
|
86
|
+
export declare const SplatUpdateTexture: number;
|
|
87
|
+
/** Splat更新使用中索引 */
|
|
88
|
+
export declare const SplatUpdateUsingIndex: number;
|
|
89
|
+
/** Splat更新点云模式 */
|
|
90
|
+
export declare const SplatUpdatePointMode: number;
|
|
91
|
+
/** Splat更新场景模式 */
|
|
92
|
+
export declare const SplatUpdateBigSceneMode: number;
|
|
93
|
+
/** Splat更新亮度系数 */
|
|
94
|
+
export declare const SplatUpdateLightFactor: number;
|
|
95
|
+
/** Splat更新中心高点 */
|
|
96
|
+
export declare const SplatUpdateTopY: number;
|
|
97
|
+
/** Splat更新可见半径 */
|
|
98
|
+
export declare const SplatUpdateCurrentVisibleRadius: number;
|
|
99
|
+
/** Splat更新光圈半径 */
|
|
100
|
+
export declare const SplatUpdateCurrentLightRadius: number;
|
|
101
|
+
/** Splat更新标记点 */
|
|
102
|
+
export declare const SplatUpdateMarkPoint: number;
|
|
103
|
+
/** Splat更新系统时间 */
|
|
104
|
+
export declare const SplatUpdatePerformanceNow: number;
|
|
105
|
+
/** Splat更新水印显示与否 */
|
|
106
|
+
export declare const SplatUpdateShowWaterMark: number;
|
|
107
|
+
/** Splat更新调试效果 */
|
|
108
|
+
export declare const SplatUpdateDebugEffect: number;
|
|
109
|
+
/** Splat更新球谐系数级别 */
|
|
110
|
+
export declare const SplatUpdateShDegree: number;
|
|
111
|
+
/** Splat几何体销毁 */
|
|
112
|
+
export declare const SplatGeometryDispose: number;
|
|
113
|
+
/** Splat材质销毁 */
|
|
114
|
+
export declare const SplatMaterialDispose: number;
|
|
115
|
+
/** 默认渲染帧率计数器更新 */
|
|
116
|
+
export declare const CountFpsDefault: number;
|
|
117
|
+
/** 默认渲染帧率 */
|
|
118
|
+
export declare const GetFpsDefault: number;
|
|
119
|
+
/** 真实渲染帧率计数器更新 */
|
|
120
|
+
export declare const CountFpsReal: number;
|
|
121
|
+
/** 真实渲染帧率 */
|
|
122
|
+
export declare const GetFpsReal: number;
|
|
123
|
+
/** 销毁 */
|
|
124
|
+
export declare const ViewerUtilsDispose: number;
|
|
125
|
+
/** 销毁 */
|
|
126
|
+
export declare const CommonUtilsDispose: number;
|
|
127
|
+
/** 取得渲染器选项 */
|
|
128
|
+
export declare const GetOptions: number;
|
|
129
|
+
/** 画布尺寸 */
|
|
130
|
+
export declare const GetCanvasSize: number;
|
|
131
|
+
/** 取渲染器 */
|
|
132
|
+
export declare const GetRenderer: number;
|
|
133
|
+
/** 取场景 */
|
|
134
|
+
export declare const GetScene: number;
|
|
135
|
+
/** 渲染器销毁 */
|
|
136
|
+
export declare const ViewerDispose: number;
|
|
137
|
+
/** 是否相机视角发生变化需要渲染 */
|
|
138
|
+
export declare const IsCameraChangedNeedUpdate: number;
|
|
139
|
+
/** 是否相机视角发生变化需要重新加载数据 */
|
|
140
|
+
export declare const IsCameraChangedNeedLoadData: number;
|
|
141
|
+
/** 是否大场景模式 */
|
|
142
|
+
export declare const IsBigSceneMode: number;
|
|
143
|
+
/** 是否点云模式 */
|
|
144
|
+
export declare const IsPointcloudMode: number;
|
|
145
|
+
/** 是否调试模式 */
|
|
146
|
+
export declare const IsDebugMode: number;
|
|
147
|
+
/** 添加模型 */
|
|
148
|
+
export declare const SplatTexdataManagerAddModel: number;
|
|
149
|
+
/** 数据是否有变化(大场景用) */
|
|
150
|
+
export declare const SplatTexdataManagerDataChanged: number;
|
|
151
|
+
/** 销毁 */
|
|
152
|
+
export declare const SplatTexdataManagerDispose: number;
|
|
153
|
+
/** 销毁 */
|
|
154
|
+
export declare const SplatMeshDispose: number;
|
|
155
|
+
/** 切换显示模式(通常仅小场景使用) */
|
|
156
|
+
export declare const SplatMeshSwitchDisplayMode: number;
|
|
157
|
+
/** 小场景渐进加载(圆圈扩大) */
|
|
158
|
+
export declare const SplatMeshCycleZoom: number;
|
|
159
|
+
/** 转字符串 */
|
|
160
|
+
export declare const Vector3ToString: number;
|
|
161
|
+
/** 模型文件下载开始 */
|
|
162
|
+
export declare const OnFetchStart: number;
|
|
163
|
+
/** 模型文件下载中 */
|
|
164
|
+
export declare const OnFetching: number;
|
|
165
|
+
/** 模型文件下载结束 */
|
|
166
|
+
export declare const OnFetchStop: number;
|
|
167
|
+
/** 是否加载中(小场景适用) */
|
|
168
|
+
export declare const IsFetching: number;
|
|
169
|
+
/** 数据上传就绪的渲染数(小场景适用) */
|
|
170
|
+
export declare const OnTextureReadySplatCount: number;
|
|
171
|
+
/** 数据是否已下载结束并准备就绪(小场景适用) */
|
|
172
|
+
export declare const IsSmallSceneRenderDataReady: number;
|
|
173
|
+
/** 是否可以更新纹理 */
|
|
174
|
+
export declare const CanUpdateTexture: number;
|
|
175
|
+
/** 检查执行键盘按键动作处理 */
|
|
176
|
+
export declare const KeyActionCheckAndExecute: number;
|
|
177
|
+
/** 视线轴旋转 */
|
|
178
|
+
export declare const RotateAt: number;
|
|
179
|
+
/** 视线轴左旋 */
|
|
180
|
+
export declare const RotateLeft: number;
|
|
181
|
+
/** 视线轴右旋 */
|
|
182
|
+
export declare const RotateRight: number;
|
|
183
|
+
/** 取活动点数据 */
|
|
184
|
+
export declare const GetSplatActivePoints: number;
|
|
185
|
+
/** 射线拾取点 */
|
|
186
|
+
export declare const RaycasterRayIntersectPoints: number;
|
|
187
|
+
/** 射线与点的距离 */
|
|
188
|
+
export declare const RaycasterRayDistanceToPoint: number;
|
|
189
|
+
/** 调整视点为拾取点 */
|
|
190
|
+
export declare const SelectPointAndLookAt: number;
|
|
191
|
+
/** 标注选点 */
|
|
192
|
+
export declare const SelectMarkPoint: number;
|
|
193
|
+
/** 清除标注选点 */
|
|
194
|
+
export declare const ClearMarkPoint: number;
|
|
195
|
+
/** 取焦点标记材质 */
|
|
196
|
+
export declare const GetFocusMarkerMaterial: number;
|
|
197
|
+
/** 刷新焦点标记网格 */
|
|
198
|
+
export declare const FocusMarkerUpdate: number;
|
|
199
|
+
/** 取相机方向 */
|
|
200
|
+
export declare const GetCameraDirection: number;
|
|
201
|
+
/** 焦点标记材质设定透明度 */
|
|
202
|
+
export declare const FocusMarkerSetOpacity: number;
|
|
203
|
+
/** 焦点标记更新缩放比例 */
|
|
204
|
+
export declare const FocusMarkerUpdateScale: number;
|
|
205
|
+
/** 焦点标记自动消失 */
|
|
206
|
+
export declare const FocusMarkerAutoDisappear: number;
|
|
207
|
+
/** 控制平面 */
|
|
208
|
+
export declare const GetControlPlane: number;
|
|
209
|
+
/** 控制平面显示控制 */
|
|
210
|
+
export declare const ControlPlaneSwitchVisible: number;
|
|
211
|
+
/** 控制平面刷新 */
|
|
212
|
+
export declare const ControlPlaneUpdate: number;
|
|
213
|
+
/** 控制平面是否可见 */
|
|
214
|
+
export declare const IsControlPlaneVisible: number;
|
|
215
|
+
/** 渲染前处理 */
|
|
216
|
+
export declare const OnViewerBeforeUpdate: number;
|
|
217
|
+
/** 渲染处理 */
|
|
218
|
+
export declare const OnViewerUpdate: number;
|
|
219
|
+
/** 渲染后处理 */
|
|
220
|
+
export declare const OnViewerAfterUpdate: number;
|
|
221
|
+
/** 设定水印文字 */
|
|
222
|
+
export declare const OnSetWaterMark: number;
|
|
223
|
+
/** 取当前缓存的水印文字 */
|
|
224
|
+
export declare const GetCachedWaterMark: number;
|
|
225
|
+
/** 通知渲染器需要刷新 */
|
|
226
|
+
export declare const NotifyViewerNeedUpdate: number;
|
|
227
|
+
/** 通知渲染器需要刷新 */
|
|
228
|
+
export declare const ViewerNeedUpdate: number;
|
|
229
|
+
/** 更新渲染器选项的点云模式 */
|
|
230
|
+
export declare const ViewerSetPointcloudMode: number;
|
|
231
|
+
/** 渲染器检查是否需要刷新 */
|
|
232
|
+
export declare const ViewerCheckNeedUpdate: number;
|
|
233
|
+
/** 渲染器设定Splat点云模式 */
|
|
234
|
+
export declare const SplatSetPointcloudMode: number;
|
|
235
|
+
/** 渲染器切换Splat显示模式 */
|
|
236
|
+
export declare const SplatSwitchDisplayMode: number;
|
|
237
|
+
/** 取标注包裹元素 */
|
|
238
|
+
export declare const GetMarkWarpElement: number;
|
|
239
|
+
/** 取CSS3DRenderer */
|
|
240
|
+
export declare const GetCSS3DRenderer: number;
|
|
241
|
+
/** 销毁 */
|
|
242
|
+
export declare const CSS3DRendererDispose: number;
|
|
243
|
+
/** 添加标注弱引用缓存 */
|
|
244
|
+
export declare const AddMarkToWeakRef: number;
|
|
245
|
+
/** 从弱引用缓存取标注对象 */
|
|
246
|
+
export declare const GetMarkFromWeakRef: number;
|
|
247
|
+
/** 删除标注弱引用缓存 */
|
|
248
|
+
export declare const DeleteMarkWeakRef: number;
|
|
249
|
+
/** 按数据更新指定名称的标注 */
|
|
250
|
+
export declare const UpdateMarkByName: number;
|
|
251
|
+
/** 按米比例尺更新全部标注 */
|
|
252
|
+
export declare const UpdateAllMarkByMeterScale: number;
|
|
253
|
+
/** 按名称取标注数据 */
|
|
254
|
+
export declare const GetMarkDataByName: number;
|
|
255
|
+
/** 标注点 */
|
|
256
|
+
export declare const MarkPoint: number;
|
|
257
|
+
/** 标注线 */
|
|
258
|
+
export declare const MarkLine: number;
|
|
259
|
+
/** 标注面 */
|
|
260
|
+
export declare const MarkPlan: number;
|
|
261
|
+
/** 标注距离 */
|
|
262
|
+
export declare const MarkDistance: number;
|
|
263
|
+
/** 标注面积 */
|
|
264
|
+
export declare const MarkArea: number;
|
|
265
|
+
/** 标注结束 */
|
|
266
|
+
export declare const MarkFinish: number;
|
|
267
|
+
/** 标注更新可见状态 */
|
|
268
|
+
export declare const MarkUpdateVisible: number;
|
|
269
|
+
/** 标注数据保存 */
|
|
270
|
+
export declare const MetaMarkSaveData: number;
|
|
271
|
+
/** 保存小场景相机信息 */
|
|
272
|
+
export declare const MetaSaveSmallSceneCameraInfo: number;
|
|
273
|
+
/** 标注数据删除 */
|
|
274
|
+
export declare const MetaMarkRemoveData: number;
|
|
275
|
+
/** 保存水印 */
|
|
276
|
+
export declare const MetaSaveWatermark: number;
|
|
277
|
+
/** 加载小场景元数据(相机初始化,标注待激活显示) */
|
|
278
|
+
export declare const LoadSmallSceneMetaData: number;
|
|
279
|
+
/** 遍历销毁并清空Object3D的子对象 */
|
|
280
|
+
export declare const TraverseDisposeAndClear: number;
|
|
281
|
+
/** 取消当前正在进行的标注 */
|
|
282
|
+
export declare const CancelCurrentMark: number;
|
|
283
|
+
/** 取高斯文本 */
|
|
284
|
+
export declare const GetGaussianText: number;
|
|
285
|
+
/** 设定高斯文本 */
|
|
286
|
+
export declare const SetGaussianText: number;
|
|
287
|
+
/** 取相机飞行轨迹 */
|
|
288
|
+
export declare const GetFlyPositions: number;
|
|
289
|
+
/** 取相机飞行轨迹(数组形式,用于存盘) */
|
|
290
|
+
export declare const GetFlyPositionArray: number;
|
|
291
|
+
/** 取相机飞行视点轨迹(数组形式,用于存盘) */
|
|
292
|
+
export declare const GetFlyTargetArray: number;
|
|
293
|
+
/** 添加相机飞行轨迹点 */
|
|
294
|
+
export declare const AddFlyPosition: number;
|
|
295
|
+
/** 保存相机飞行轨迹点 */
|
|
296
|
+
export declare const FlySavePositions: number;
|
|
297
|
+
/** 清空相机飞行轨迹点 */
|
|
298
|
+
export declare const ClearFlyPosition: number;
|
|
299
|
+
/** 设定相机飞行轨迹 */
|
|
300
|
+
export declare const OnSetFlyPositions: number;
|
|
301
|
+
/** 设定相机飞行视点轨迹 */
|
|
302
|
+
export declare const OnSetFlyTargets: number;
|
|
303
|
+
/** 相机飞行控制 */
|
|
304
|
+
export declare const Flying: number;
|
|
305
|
+
/** 相机飞行控制(仅一次) */
|
|
306
|
+
export declare const FlyOnce: number;
|
|
307
|
+
/** 允许相机飞行控制 */
|
|
308
|
+
export declare const FlyEnable: number;
|
|
309
|
+
/** 禁止相机飞行控制 */
|
|
310
|
+
export declare const FlyDisable: number;
|
|
311
|
+
/** 取SplatMesh实例 */
|
|
312
|
+
export declare const GetSplatMesh: number;
|
|
313
|
+
/** 打印信息(开发调试用) */
|
|
314
|
+
export declare const PrintInfo: number;
|
|
315
|
+
/** 上传纹理 */
|
|
316
|
+
export declare const UploadSplatTexture: number;
|
|
317
|
+
/** 上传纹理完成 */
|
|
318
|
+
export declare const UploadSplatTextureDone: number;
|
|
319
|
+
/** 球谐系数纹理高度 */
|
|
320
|
+
export declare const GetShTexheight: number;
|
|
321
|
+
/** Splat更新球谐系数纹理(1,2级) */
|
|
322
|
+
export declare const SplatUpdateSh12Texture: number;
|
|
323
|
+
/** Splat更新球谐系数纹理(3级) */
|
|
324
|
+
export declare const SplatUpdateSh3Texture: number;
|
|
325
|
+
/** 模型数据的球谐系数级别 */
|
|
326
|
+
export declare const GetModelShDegree: number;
|
|
327
|
+
/** 当前以多少球谐系数级别在显示 */
|
|
328
|
+
export declare const GetCurrentDisplayShDegree: number;
|
|
329
|
+
/** 取模型包围盒中心点 */
|
|
330
|
+
export declare const GetAabbCenter: number;
|
|
331
|
+
/** 聚焦包围盒中心点 */
|
|
332
|
+
export declare const FocusAabbCenter: number;
|
|
333
|
+
/** 渲染obj模型 */
|
|
334
|
+
export declare const OnLoadAndRenderObj: number;
|
|
335
|
+
/** 取内存中的元数据 */
|
|
336
|
+
export declare const GetMeta: number;
|
|
337
|
+
/** Splat更新标记 */
|
|
338
|
+
export declare const SplatUpdateFlagValue: number;
|
|
339
|
+
/** 小场景开始时间变迁效果 */
|
|
340
|
+
export declare const OnSmallSceneTimeChange: number;
|
|
341
|
+
/** 取元数据中配置的矩阵 */
|
|
342
|
+
export declare const GetMetaMatrix: number;
|
|
343
|
+
/** 更新包围盒数据 */
|
|
344
|
+
export declare const SplatUpdateBoundBox: number;
|
|
345
|
+
/** 更新包围盒数据 */
|
|
346
|
+
export declare const SplatSetBoundBoxVisible: number;
|
|
347
|
+
/** 更新包围球半径 */
|
|
348
|
+
export declare const SplatUpdateMaxRadius: number;
|
|
349
|
+
/** Splat更新动作时间 */
|
|
350
|
+
export declare const SplatUpdatePerformanceAct: number;
|
|
351
|
+
/** 小场景显示完成 */
|
|
352
|
+
export declare const OnSmallSceneShowDone: number;
|
|
353
|
+
/** 小场景粒子效果加载模式(0,1,2) */
|
|
354
|
+
export declare const SplatUpdateParticleMode: number;
|
|
355
|
+
/** 更新最小最大像素直径限制 */
|
|
356
|
+
export declare const SplatUpdateMinMaxPixelDiameter: number;
|
|
357
|
+
/** 更新最低可渲染透明度(0~255) */
|
|
358
|
+
export declare const SplatUpdateMinAlpha: number;
|
|
359
|
+
/** 更新是否使用近似计算替代exp的标记 */
|
|
360
|
+
export declare const SplatUpdateUseSimilarExp: number;
|
|
361
|
+
/** 更新质量级别 */
|
|
362
|
+
export declare const OnQualityLevelChanged: number;
|
|
363
|
+
/** 创建地图渲染器 */
|
|
364
|
+
export declare const MapCreateRenderer: number;
|
|
365
|
+
/** 创建地图场景 */
|
|
366
|
+
export declare const MapCreateScene: number;
|
|
367
|
+
/** 创建地图相机 */
|
|
368
|
+
export declare const MapCreateCamera: number;
|
|
369
|
+
/** 创建地图控制器 */
|
|
370
|
+
export declare const MapCreateControls: number;
|
|
371
|
+
/** 创建光源 */
|
|
372
|
+
export declare const MapCreateDirLight: number;
|
|
373
|
+
/** 取一个活动的splatMesh实例(仅用于地图单个高斯模型调整) */
|
|
374
|
+
export declare const MapGetSplatMesh: number;
|
|
375
|
+
/** 按X轴旋转 */
|
|
376
|
+
export declare const MapSplatMeshRotateX: number;
|
|
377
|
+
/** 按Y轴旋转 */
|
|
378
|
+
export declare const MapSplatMeshRotateY: number;
|
|
379
|
+
/** 按Z轴旋转 */
|
|
380
|
+
export declare const MapSplatMeshRotateZ: number;
|
|
381
|
+
/** 按X轴平移 */
|
|
382
|
+
export declare const MapSplatMeshMoveX: number;
|
|
383
|
+
/** 按Y轴平移 */
|
|
384
|
+
export declare const MapSplatMeshMoveY: number;
|
|
385
|
+
/** 按Z轴平移 */
|
|
386
|
+
export declare const MapSplatMeshMoveZ: number;
|
|
387
|
+
/** 设定位置 */
|
|
388
|
+
export declare const MapSplatMeshSetPosition: number;
|
|
389
|
+
/** 缩放 */
|
|
390
|
+
export declare const MapSplatMeshScale: number;
|
|
391
|
+
/** 切换显示隐藏 */
|
|
392
|
+
export declare const MapSplatMeshShowHide: number;
|
|
393
|
+
/** 保存模型矩阵 */
|
|
394
|
+
export declare const MapSplatMeshSaveModelMatrix: number;
|
|
395
|
+
/** 对多个SplatMesh实例的渲染顺序进行排序 */
|
|
396
|
+
export declare const MapSortSplatMeshRenderOrder: number;
|
|
397
|
+
/** 遍历并清空销毁场景中的所有对象 */
|
|
398
|
+
export declare const MapSceneTraverseDispose: number;
|
|
399
|
+
/** 飞向目标 */
|
|
400
|
+
export declare const MapFlyToTarget: number;
|
|
401
|
+
/** 相机飞行控制 */
|
|
402
|
+
export declare const TweenFly: number;
|
|
403
|
+
/** 相机飞行控制(仅一次) */
|
|
404
|
+
export declare const TweenFlyOnce: number;
|
|
405
|
+
/** 允许相机飞行控制 */
|
|
406
|
+
export declare const TweenFlyEnable: number;
|
|
407
|
+
/** 禁止相机飞行控制 */
|
|
408
|
+
export declare const TweenFlyDisable: number;
|
|
409
|
+
/** 飞行暂停 */
|
|
410
|
+
export declare const FlyingPause: number;
|
|
411
|
+
/** 飞行继续 */
|
|
412
|
+
export declare const FlyingContinue: number;
|
|
413
|
+
/** 飞行播放 */
|
|
414
|
+
export declare const FlyingPlay: number;
|
|
415
|
+
/** 取设定的渲染质量级别(1~9) */
|
|
416
|
+
export declare const GetRenderQualityLevel: number;
|
|
417
|
+
/** 取设定的排序类型 */
|
|
418
|
+
export declare const GetSortType: number;
|
|
419
|
+
/** 更新排序类型 */
|
|
420
|
+
export declare const UpdateSortType: number;
|
|
421
|
+
/** 更新渲染质量级别 */
|
|
422
|
+
export declare const UpdateQualityLevel: number;
|
|
423
|
+
/** 更新Worker相关参数 */
|
|
424
|
+
export declare const WorkerUpdateParams: number;
|
|
425
|
+
/** Splat更新特效类型 */
|
|
426
|
+
export declare const SplatUpdateTransitionEffect: number;
|
|
427
|
+
/** SplatMesh是否已创建 */
|
|
428
|
+
export declare const IsSplatMeshCreated: number;
|
|
429
|
+
/** 取背景音乐对象 */
|
|
430
|
+
export declare const GetBgAudio: number;
|
|
431
|
+
/** 播放背景音乐 */
|
|
432
|
+
export declare const PlaytBgAudio: number;
|
|
433
|
+
/** 背景音乐音量渐进调小 */
|
|
434
|
+
export declare const SetBgAudioVolumeDown: number;
|
|
435
|
+
/** 背景音乐音量渐进调大 */
|
|
436
|
+
export declare const SetBgAudioVolumeUp: number;
|
|
437
|
+
/** 停止背景音乐 */
|
|
438
|
+
export declare const StopBgAudio: number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class Events {
|
|
2
|
+
private map;
|
|
3
|
+
private functions;
|
|
4
|
+
constructor();
|
|
5
|
+
on(key: number | string, fn?: Function, multiFn?: boolean): Function | Function[];
|
|
6
|
+
fire(key: number | string, ...args: any): any;
|
|
7
|
+
tryFire(key: number | string, ...args: any): any;
|
|
8
|
+
off(key: number | string): void;
|
|
9
|
+
clear(): void;
|
|
10
|
+
function(name: string, fn: Function): void;
|
|
11
|
+
invoke(name: string, ...args: any[]): any;
|
|
12
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './viewer/Reall3dViewer';
|
|
2
|
+
export * from './mapviewer/Reall3dMapViewer';
|
|
3
|
+
export * from './meshs/splatmesh/SplatMesh';
|
|
4
|
+
export * from './tools/tool-manager';
|
|
5
|
+
export * from './tools/brush-selection';
|
|
6
|
+
export * from './tools/lasso-selection';
|
|
7
|
+
export * from './tools/polygon-selection';
|
|
8
|
+
export * from './tools/rect-selection';
|
|
9
|
+
export * from './events/Events';
|
|
10
|
+
export * from './events/EventConstants';
|
|
11
|
+
export * from './events/EventListener';
|