@realsee/five 5.0.0-alpha.99 → 6.0.0-alpha.1
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/docs/assets/highlight.css +1 -1
- package/docs/assets/main.js +2 -2
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +28 -2
- package/docs/classes/five.AnimationFrameLoop.html +5 -5
- package/docs/classes/five.BVH.html +2 -2
- package/docs/classes/five.BVHIntersect.html +1 -1
- package/docs/classes/five.BVHNode.html +2 -2
- package/docs/classes/five.BVHVector3.html +1 -1
- package/docs/classes/five.BoxBoundingVolume.html +1 -0
- package/docs/classes/five.Camera.html +6 -6
- package/docs/classes/five.Clipper.html +1 -0
- package/docs/classes/five.CullingVolume.html +1 -0
- package/docs/classes/five.Five.html +118 -83
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.IntersectMesh.html +1 -1
- package/docs/classes/five.Model.html +37 -54
- package/docs/classes/five.NetworkSubscribe.html +22 -15
- package/docs/classes/five.PBMContainer.html +8 -12
- package/docs/classes/five.PBMGroup.html +2 -18
- package/docs/classes/five.PBMMaterialReferenceCache.html +1 -0
- package/docs/classes/five.PBMMesh.html +3 -5
- package/docs/classes/five.PBMMeshMaterial.html +41 -0
- package/docs/classes/five.PanoCircleMesh.html +4 -4
- package/docs/classes/five.PanoCircleMeshCustom.html +7 -0
- package/docs/classes/five.PanoCircleMeshSolid.html +7 -0
- package/docs/classes/five.RegionBoundingVolume.html +1 -0
- package/docs/classes/five.RequestScheduler.html +16 -0
- package/docs/classes/five.Scene.html +2 -2
- package/docs/classes/five.SphereBoundingVolume.html +1 -0
- package/docs/classes/five.Subscribe.html +24 -17
- package/docs/classes/five.TextureLoader.html +1 -0
- package/docs/classes/five.Tile.html +1 -0
- package/docs/classes/five.Tile3DModel.html +1 -0
- package/docs/classes/five.TileCubeTextureTarget.html +1 -0
- package/docs/classes/five.TileNode.html +1 -0
- package/docs/classes/five.Tileset.html +5 -0
- package/docs/classes/five.TilesetCache.html +1 -0
- package/docs/classes/five.TilesetTraverser.html +1 -0
- package/docs/classes/five.Work.html +21 -10
- package/docs/classes/five.XRButton.html +1 -0
- package/docs/classes/gltf_loader.DDSLoader.html +1 -0
- package/docs/classes/gltf_loader.DRACOLoader.html +1 -0
- package/docs/classes/gltf_loader.GLTFLoader.html +8 -8
- package/docs/classes/gltf_loader.GLTFObject.html +3 -3
- package/docs/classes/gltf_loader.GLTFParser.html +1 -0
- package/docs/classes/gltf_loader.THREEGLTFLoader.html +1 -0
- package/docs/classes/line.Line.html +1 -1
- package/docs/classes/line.LineGeometry.html +1 -1
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +1 -1
- package/docs/classes/line.THREE_Line2.html +1 -1
- package/docs/classes/line.THREE_LineSegments2.html +1 -1
- package/docs/classes/react.Store.html +13 -13
- package/docs/classes/sticker.Sticker.html +9 -9
- package/docs/classes/vfx.Airflow.html +1 -0
- package/docs/classes/vfx.Flame.html +1 -0
- package/docs/classes/vfx.Particle.html +89 -0
- package/docs/classes/vfx.SpotLight.html +1 -0
- package/docs/enums/five.PBMPointColorType.html +1 -0
- package/docs/enums/five.PBMPointShapeType.html +1 -0
- package/docs/enums/five.PBMPointSizeType.html +1 -0
- package/docs/enums/five.VolumePlaneIntersect.html +1 -0
- package/docs/index.html +2 -2
- package/docs/interfaces/five.AddableObject.html +9 -1
- package/docs/interfaces/five.AnimationFrame.html +1 -1
- package/docs/interfaces/five.BoundingVolume.html +1 -0
- package/docs/interfaces/five.CameraPose.html +1 -1
- package/docs/interfaces/five.ClipperParameter.html +1 -0
- package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +12 -14
- package/docs/interfaces/five.EventCallback.html +107 -127
- package/docs/interfaces/five.FiveInitArgs.html +39 -32
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ImageOptions.html +8 -6
- package/docs/interfaces/five.ImageURLMappings.html +1 -0
- package/docs/interfaces/five.ImageURLOptions.html +15 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +2 -2
- package/docs/interfaces/five.Intersection.html +4 -4
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +11 -0
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +9 -11
- package/docs/interfaces/five.ModelLodOptions.html +1 -0
- package/docs/interfaces/five.MotionKeyframe.html +1 -0
- package/docs/interfaces/five.MovePanoOptions.html +17 -14
- package/docs/interfaces/five.NetworkOptions.html +9 -0
- package/docs/interfaces/five.PBMPanoPicture.html +4 -4
- package/docs/interfaces/five.PBMParameters.html +32 -8
- package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +1 -0
- package/docs/interfaces/five.PanoCircleMeshInterface.html +5 -5
- package/docs/interfaces/five.PanoCircleMeshOptions.html +1 -0
- package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +1 -0
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +19 -14
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +9 -11
- package/docs/interfaces/five.Pose.html +9 -7
- package/docs/interfaces/five.Scissor.html +6 -6
- package/docs/interfaces/five.State.html +13 -9
- package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.off.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.on.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.once.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.waitUnitl.html +1 -0
- package/docs/interfaces/five.TextureOptions.html +9 -7
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +3 -0
- package/docs/interfaces/five.TileCubeNode.html +1 -0
- package/docs/interfaces/five.TileCubeTree.html +1 -0
- package/docs/interfaces/five.TileHeader.html +1 -0
- package/docs/interfaces/five.TilesetHeader.html +1 -0
- package/docs/interfaces/five.TilesetOptions.html +1 -0
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +6 -4
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +17 -12
- package/docs/interfaces/five.WebXRControllerParams.html +1 -0
- package/docs/interfaces/five.WorkCubeImage.html +7 -7
- package/docs/interfaces/five.WorkImage.html +11 -11
- package/docs/interfaces/five.WorkInitial.html +13 -9
- package/docs/interfaces/five.WorkModel.html +9 -7
- package/docs/interfaces/five.WorkObserver.html +21 -15
- package/docs/interfaces/five.WorkOptions.html +15 -0
- package/docs/interfaces/five.WorkTile.html +1 -1
- package/docs/interfaces/five.WorkVideo.html +5 -5
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +29 -0
- package/docs/interfaces/gltf_loader.DDS.html +1 -0
- package/docs/interfaces/gltf_loader.GLTF.html +2 -2
- package/docs/interfaces/gltf_loader.GLTFReference.html +1 -0
- package/docs/interfaces/gltf_loader.THREEGLTF.html +1 -0
- package/docs/interfaces/react.FiveActionReactCallbacks.html +11 -21
- package/docs/interfaces/react.FiveInjectionTypes.html +40 -45
- package/docs/interfaces/react.PropTypeOfFiveFeatures.html +1 -1
- package/docs/interfaces/sticker.IntersectionLike.html +4 -4
- package/docs/interfaces/vfx.ParticleArgs.html +75 -0
- package/docs/interfaces/vfx.ParticleTweenKeyframe.html +1 -0
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +60 -0
- package/docs/modules/five.SubscribeMixinType.html +1 -1
- package/docs/modules/five.html +124 -122
- package/docs/modules/gltf_loader.html +1 -1
- package/docs/modules/line.html +1 -1
- package/docs/modules/react.html +36 -36
- package/docs/modules/sticker.html +1 -1
- package/docs/modules/vfx.html +1 -0
- package/docs/modules/vue.html +115 -0
- package/docs/modules.html +1 -1
- package/exporters/staticify.js +14 -7
- package/five/index.d.ts +1263 -329
- package/five/index.js +9 -19
- package/gltf-loader/index.d.ts +90 -5
- package/gltf-loader/index.js +3 -3
- package/line/index.d.ts +1 -0
- package/line/index.js +3 -3
- package/package.json +10 -6
- package/react/index.d.ts +61 -69
- package/react/index.js +3 -3
- package/resource/basis/1.16/basis_transcoder.js +22 -0
- package/resource/basis/{basis_transcoder.wasm → 1.16/basis_transcoder.wasm} +0 -0
- package/resource/basis/README.md +5 -0
- package/resource/draco/1.5.6/draco_decoder.js +34 -0
- package/resource/draco/1.5.6/draco_decoder.wasm +0 -0
- package/resource/draco/1.5.6/draco_decoder_gltf.js +33 -0
- package/resource/draco/1.5.6/draco_decoder_gltf.wasm +0 -0
- package/resource/draco/1.5.6/draco_encoder.js +35 -0
- package/resource/draco/1.5.6/draco_encoder.wasm +0 -0
- package/resource/draco/1.5.6/draco_encoder_wrapper.js +97 -0
- package/resource/draco/1.5.6/draco_wasm_wrapper.js +117 -0
- package/resource/draco/1.5.6/draco_wasm_wrapper_gltf.js +116 -0
- package/resource/draco/README.md +5 -0
- package/scripts/five-staticify.js +6 -1
- package/sticker/index.d.ts +2 -1
- package/sticker/index.js +3 -3
- package/umd/five-gltf-loader.js +1 -2
- package/umd/five-line.js +1 -2
- package/umd/five-react.js +1 -2
- package/umd/five-sticker.js +1 -2
- package/umd/five-vfx.js +1 -0
- package/umd/five-vue.js +1 -0
- package/umd/five.js +1 -1
- package/umd/five.js.LICENSE.txt +5 -21
- package/vfx/index.d.ts +264 -0
- package/vfx/index.js +260 -0
- package/vue/index.d.ts +443 -0
- package/vue/index.js +260 -0
- package/docs/classes/five.LegacyPanoCircleMesh.html +0 -5
- package/docs/classes/five.PBMMaterial.html +0 -15
- package/docs/classes/server.BVH.html +0 -10
- package/docs/classes/server.BVHIntersect.html +0 -1
- package/docs/classes/server.BVHNode.html +0 -7
- package/docs/classes/server.BVHVector3.html +0 -1
- package/docs/classes/server.Model.html +0 -63
- package/docs/classes/server.PBMGroup.html +0 -9
- package/docs/classes/server.PBMMesh.html +0 -7
- package/docs/interfaces/five.ModelEventCallback.html +0 -22
- package/docs/interfaces/server.Intersection.html +0 -7
- package/docs/interfaces/server.ModelEventCallback.html +0 -18
- package/docs/modules/server.html +0 -18
- package/resource/basis/basis_transcoder.js +0 -22
- package/resource/gltf/draco_decoder.js +0 -31
- package/resource/gltf/draco_decoder.wasm +0 -0
- package/resource/gltf/draco_wasm_wrapper.js +0 -119
- package/server/index.d.ts +0 -556
- package/server/index.js +0 -367
package/five/index.d.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import * as THREE_2 from 'three';
|
|
2
2
|
|
|
3
3
|
export declare interface AddableObject extends THREE_2.Object3D {
|
|
4
|
+
/** 是否需要渲染一次 */
|
|
4
5
|
needsRender?: boolean;
|
|
6
|
+
/** 动画 */
|
|
5
7
|
mixer?: THREE_2.AnimationMixer;
|
|
8
|
+
/** 设置当前分辨率 */
|
|
6
9
|
setResolution?(width: number, height: number): void;
|
|
10
|
+
/** 设置当前时间 */
|
|
11
|
+
setTime?(time: number): void;
|
|
7
12
|
}
|
|
8
13
|
|
|
9
14
|
export declare interface AnimationFrame {
|
|
10
|
-
callback: (time: number, deltaTime: number) => void;
|
|
15
|
+
callback: (time: number, deltaTime: number, ...args: any[]) => void;
|
|
11
16
|
once: boolean;
|
|
12
17
|
delay: number;
|
|
13
18
|
order: number;
|
|
@@ -17,11 +22,17 @@ export declare class AnimationFrameLoop {
|
|
|
17
22
|
private frames;
|
|
18
23
|
private time;
|
|
19
24
|
private stoped;
|
|
25
|
+
private context?;
|
|
26
|
+
private requestId;
|
|
20
27
|
private static sharedInstance?;
|
|
21
28
|
static get shared(): AnimationFrameLoop;
|
|
22
29
|
static getFrameTime(): number;
|
|
23
30
|
constructor();
|
|
24
31
|
private loop;
|
|
32
|
+
setContext(context: any): void;
|
|
33
|
+
getContext(): any;
|
|
34
|
+
private requestAnimationFrame;
|
|
35
|
+
private cancelAnimationFrame;
|
|
25
36
|
private remove;
|
|
26
37
|
/**
|
|
27
38
|
* 添加到动画循环
|
|
@@ -35,6 +46,48 @@ export declare class AnimationFrameLoop {
|
|
|
35
46
|
disponse(): void;
|
|
36
47
|
}
|
|
37
48
|
|
|
49
|
+
export declare interface BoundingVolume {
|
|
50
|
+
type: 'box' | 'sphere' | 'regin';
|
|
51
|
+
applyMatrix4(matrix: THREE_2.Matrix4): this;
|
|
52
|
+
getBoundingBox(target: THREE_2.Box3): THREE_2.Box3;
|
|
53
|
+
toGeometry(): THREE_2.BufferGeometry;
|
|
54
|
+
getCenter(result: THREE_2.Vector3): THREE_2.Vector3;
|
|
55
|
+
distanceSquaredTo(point: THREE_2.Vector3): number;
|
|
56
|
+
distanceTo(point: THREE_2.Vector3): number;
|
|
57
|
+
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
58
|
+
intersectRay(ray: THREE_2.Ray): boolean;
|
|
59
|
+
clone(): BoundingVolume;
|
|
60
|
+
copy(boundingVolume: this): this;
|
|
61
|
+
fromJson(json: any): this;
|
|
62
|
+
toJson(): BoundingVolumeJson;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export declare type BoundingVolumeJson = RegionBoundingVolumeJson | BoxBoundingVolumeJson | SphereBoundingVolumeJson;
|
|
66
|
+
|
|
67
|
+
export declare class BoxBoundingVolume implements BoundingVolume {
|
|
68
|
+
type: "box";
|
|
69
|
+
center: THREE_2.Vector3;
|
|
70
|
+
halfSize: THREE_2.Vector3;
|
|
71
|
+
rotation: THREE_2.Matrix3;
|
|
72
|
+
constructor();
|
|
73
|
+
fromJson({ box }: BoxBoundingVolumeJson): this;
|
|
74
|
+
toJson(): BoxBoundingVolumeJson;
|
|
75
|
+
copy(boxBoundingVolume: BoxBoundingVolume): this;
|
|
76
|
+
clone(): BoxBoundingVolume;
|
|
77
|
+
applyMatrix4(matrix: THREE_2.Matrix4): this;
|
|
78
|
+
getCenter(result: THREE_2.Vector3): THREE_2.Vector3;
|
|
79
|
+
distanceSquaredTo(point: THREE_2.Vector3): number;
|
|
80
|
+
distanceTo(point: THREE_2.Vector3): number;
|
|
81
|
+
getBoundingBox(target: THREE_2.Box3): THREE_2.Box3;
|
|
82
|
+
toGeometry(): THREE_2.BufferGeometry;
|
|
83
|
+
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
84
|
+
intersectRay(ray: THREE_2.Ray): boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export declare type BoxBoundingVolumeJson = {
|
|
88
|
+
box: number[];
|
|
89
|
+
};
|
|
90
|
+
|
|
38
91
|
export declare class BVH {
|
|
39
92
|
trianglesArray?: Float32Array;
|
|
40
93
|
offsetArray?: Uint32Array;
|
|
@@ -49,6 +102,7 @@ export declare class BVH {
|
|
|
49
102
|
* @return 碰撞焦点数组
|
|
50
103
|
*/
|
|
51
104
|
intersectRay(rayOrigin: BVHVector3, rayDirection: BVHVector3, backfaceCulling: boolean): BVHIntersect[];
|
|
105
|
+
trianglesInSphere(center: BVHVector3, radius: number): Float32Array;
|
|
52
106
|
dispose(): void;
|
|
53
107
|
}
|
|
54
108
|
|
|
@@ -92,16 +146,44 @@ export declare class BVHVector3 {
|
|
|
92
146
|
}
|
|
93
147
|
|
|
94
148
|
/** Five 相机 */
|
|
95
|
-
export declare class Camera extends THREE_2.
|
|
149
|
+
export declare class Camera extends THREE_2.Camera {
|
|
150
|
+
fov: number;
|
|
151
|
+
aspect: number;
|
|
152
|
+
near: number;
|
|
153
|
+
far: number;
|
|
154
|
+
perspToOrtho: THREE_2.Vector2;
|
|
155
|
+
orthoDistance: number;
|
|
96
156
|
/** 相机姿态 */
|
|
97
157
|
pose: CameraPose;
|
|
98
|
-
|
|
158
|
+
private perspectiveCamera;
|
|
159
|
+
private orthographicCamera;
|
|
160
|
+
needsRender: boolean;
|
|
161
|
+
private lastValues;
|
|
162
|
+
constructor(fov: number, aspect?: number, near?: number, far?: number, perspToOrtho?: THREE_2.Vector2, orthoDistance?: number);
|
|
163
|
+
get zoom(): number;
|
|
164
|
+
get top(): number;
|
|
165
|
+
get bottom(): number;
|
|
166
|
+
get left(): number;
|
|
167
|
+
get right(): number;
|
|
168
|
+
getDirection(target: THREE_2.Vector3): THREE_2.Vector3;
|
|
99
169
|
/** 通过相机参数反算姿态 */
|
|
100
|
-
computePose(): this;
|
|
170
|
+
computePose(distance?: number): this;
|
|
101
171
|
/** 设置相机姿态 */
|
|
102
172
|
setFromPose(pose: Partial<CameraPose>): this;
|
|
103
173
|
/** 拷贝相机姿态 */
|
|
104
174
|
copyPose(): CameraPose;
|
|
175
|
+
private computeProjectionMatrix;
|
|
176
|
+
setViewOffset(fullWidth: number, fullHeight: number, x: number, y: number, width: number, height: number): void;
|
|
177
|
+
clearViewOffset(): void;
|
|
178
|
+
updateProjectionMatrix(): void;
|
|
179
|
+
get perspectiveProjectionMatrix(): THREE_2.Matrix4;
|
|
180
|
+
get perspectiveProjectionMatrixInverse(): THREE_2.Matrix4;
|
|
181
|
+
get orthographicProjectionMatrix(): THREE_2.Matrix4;
|
|
182
|
+
get orthographicProjectionMatrixInverse(): THREE_2.Matrix4;
|
|
183
|
+
updateTime(_time: number, _deltaTime: number): void;
|
|
184
|
+
get isPerspectiveCamera(): boolean;
|
|
185
|
+
get isOrthographicCamera(): boolean;
|
|
186
|
+
copy(source: this, recursive?: boolean): this;
|
|
105
187
|
}
|
|
106
188
|
|
|
107
189
|
export declare interface CameraPose {
|
|
@@ -112,6 +194,22 @@ export declare interface CameraPose {
|
|
|
112
194
|
offset: THREE_2.Vector3;
|
|
113
195
|
}
|
|
114
196
|
|
|
197
|
+
export declare class Clipper {
|
|
198
|
+
numPlanes: number;
|
|
199
|
+
clipperPlanes: Float32Array | null;
|
|
200
|
+
clipperFloors: number[] | null;
|
|
201
|
+
private static sharedInstance?;
|
|
202
|
+
static get shared(): Clipper;
|
|
203
|
+
constructor();
|
|
204
|
+
update(clipperParameters: ClipperParameter[], camera: THREE_2.Camera): void;
|
|
205
|
+
private projectPlanes;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export declare interface ClipperParameter {
|
|
209
|
+
clippingBoxMatrix: THREE_2.Matrix4;
|
|
210
|
+
floorIndex?: number;
|
|
211
|
+
}
|
|
212
|
+
|
|
115
213
|
export declare type ControllerCustomInitTypes = {
|
|
116
214
|
Floorplan: FloorplanControllerCustomInitArgs;
|
|
117
215
|
Topview: TopviewControllerCustomInitArgs;
|
|
@@ -119,23 +217,25 @@ export declare type ControllerCustomInitTypes = {
|
|
|
119
217
|
VRPanorama: VRPanoramaControllerCustomInitArgs;
|
|
120
218
|
Model: ModelControllerCustomInitArgs;
|
|
121
219
|
DepthPanorama: DepthPanoramaControllerCustomInitArgs;
|
|
220
|
+
Mapview: MapviewControllerCustomInitArgs;
|
|
221
|
+
XRPanorama: XRPanoramaControllerCustomInitArgs;
|
|
122
222
|
};
|
|
123
223
|
|
|
124
224
|
export declare type ControllerEventTypes = {
|
|
125
225
|
/**
|
|
126
226
|
* 模态间切换动画开始
|
|
127
|
-
* @param
|
|
227
|
+
* @param panoId - 当前点位
|
|
128
228
|
* @param pose - 相机姿态
|
|
129
229
|
* @param userAction - 是否用户触发
|
|
130
230
|
*/
|
|
131
|
-
initAnimationWillStart(
|
|
231
|
+
initAnimationWillStart(panoId: WorkPanoId, pose: Pose, userAction: boolean): void;
|
|
132
232
|
/**
|
|
133
233
|
* 模态间切换动画结束
|
|
134
|
-
* @param
|
|
234
|
+
* @param panoId - 当前点位
|
|
135
235
|
* @param pose - 相机姿态
|
|
136
236
|
* @param userAction - 是否用户触发
|
|
137
237
|
*/
|
|
138
|
-
initAnimationEnded(
|
|
238
|
+
initAnimationEnded(panoId: WorkPanoId, pose: Pose, userAction: boolean): void;
|
|
139
239
|
/**
|
|
140
240
|
* 意图要变化相机的可视角度 可以通过 `return false` 阻止
|
|
141
241
|
* @deprecated
|
|
@@ -170,43 +270,43 @@ export declare type ControllerEventTypes = {
|
|
|
170
270
|
cameraDirectionUpdate(coordinates: Pick<Pose, "longitude" | "latitude">, userAction: boolean): void;
|
|
171
271
|
/**
|
|
172
272
|
* 观察点位被选择
|
|
173
|
-
* @param
|
|
273
|
+
* @param panoId - 选择的点位
|
|
174
274
|
*/
|
|
175
|
-
panoSelected(
|
|
275
|
+
panoSelected(panoId: WorkPanoId | null): void;
|
|
176
276
|
/**
|
|
177
277
|
* 意图要移动到某个点位 可以通过 `return false` 阻止
|
|
178
|
-
* @param
|
|
278
|
+
* @param panoId - 图要移动到的点位
|
|
179
279
|
* @param options - 移动参数
|
|
180
280
|
* @param userAction - 是否用户触发
|
|
181
281
|
* @returns 可以通过 `return false` 阻止
|
|
182
282
|
*/
|
|
183
|
-
wantsMoveToPano(
|
|
283
|
+
wantsMoveToPano(panoId: WorkPanoId, options: MovePanoOptions, userAction: boolean): void | false;
|
|
184
284
|
/**
|
|
185
285
|
* 开始加载并移动到某个观察点位
|
|
186
286
|
* @description
|
|
187
287
|
* 可 panoWillArrive 相比
|
|
188
288
|
* - moveToPano 在加载全景图资源前触发
|
|
189
289
|
* - panoWillArrive 在加载全景图资源后触发
|
|
190
|
-
* @param
|
|
290
|
+
* @param panoId - 移动到的点位
|
|
191
291
|
* @param userAction - 是否用户触发
|
|
192
292
|
*/
|
|
193
|
-
moveToPano(
|
|
293
|
+
moveToPano(panoId: WorkPanoId, userAction: boolean): void;
|
|
194
294
|
/**
|
|
195
295
|
* 开始加载某个观察点的全景资源
|
|
196
|
-
* @param
|
|
296
|
+
* @param panoId - 移动到的点位
|
|
197
297
|
*/
|
|
198
|
-
panoWillLoad(
|
|
298
|
+
panoWillLoad(panoId: WorkPanoId): void;
|
|
199
299
|
/**
|
|
200
300
|
* 某个观察点的全景资源加载完成
|
|
201
|
-
* @param
|
|
301
|
+
* @param panoId - 对应的点位
|
|
202
302
|
*/
|
|
203
|
-
panoLoaded(
|
|
303
|
+
panoLoaded(panoId: WorkPanoId): void;
|
|
204
304
|
/**
|
|
205
305
|
* 某个观察点的全景资源加载失败
|
|
206
306
|
* @param error - 错误对象
|
|
207
|
-
* @param
|
|
307
|
+
* @param panoId - 对应的点位
|
|
208
308
|
*/
|
|
209
|
-
panoLoadError(error: Error,
|
|
309
|
+
panoLoadError(error: Error, panoId: WorkPanoId): void;
|
|
210
310
|
/**
|
|
211
311
|
* 移动到某个观察点位被取消
|
|
212
312
|
* @description
|
|
@@ -214,34 +314,34 @@ export declare type ControllerEventTypes = {
|
|
|
214
314
|
* - 移动过程中切换模态
|
|
215
315
|
* - 移动过程中 five 被析构
|
|
216
316
|
* - 移动过程点击切换到另一个点位
|
|
217
|
-
* @param
|
|
317
|
+
* @param panoId - 对应的点位
|
|
218
318
|
*/
|
|
219
|
-
moveToPanoCanceled(
|
|
319
|
+
moveToPanoCanceled(panoId: WorkPanoId): void;
|
|
220
320
|
/**
|
|
221
321
|
* 开始移动到某个观察点位
|
|
222
322
|
* @description
|
|
223
323
|
* 和 moveToPano 相比
|
|
224
324
|
* - moveToPano 在加载全景图资源前触发
|
|
225
325
|
* - panoWillArrive 在加载全景图资源后触发
|
|
226
|
-
* @param
|
|
326
|
+
* @param panoId - 移动到点位
|
|
227
327
|
* @param pose - 相机姿态
|
|
228
328
|
* @param userAction - 是否用户触发
|
|
229
329
|
*/
|
|
230
|
-
panoWillArrive(
|
|
330
|
+
panoWillArrive(panoId: WorkPanoId, pose: Pose, userAction: boolean): void;
|
|
231
331
|
/**
|
|
232
332
|
* 移动到某个观察点位
|
|
233
|
-
* @param panoIndex -
|
|
333
|
+
* @param panoIndex - 移动到点位
|
|
234
334
|
* @param pose - 相机姿态
|
|
235
335
|
* @param userAction - 是否用户触发
|
|
236
336
|
*/
|
|
237
|
-
panoArrived(
|
|
337
|
+
panoArrived(panoId: WorkPanoId, pose: Pose, userAction: boolean): void;
|
|
238
338
|
/**
|
|
239
339
|
* 移动中, 会告知移动状态(耗时百分比)
|
|
240
|
-
* @param
|
|
241
|
-
* @param
|
|
340
|
+
* @param panoId - 将要移动到的点位下标
|
|
341
|
+
* @param prevPanoId - 上一个点位下标
|
|
242
342
|
* @param progress - 整个过程经度 [0-1]
|
|
243
343
|
*/
|
|
244
|
-
movingToPano(
|
|
344
|
+
movingToPano(panoId: WorkPanoId, prevPanoId: WorkPanoId, progress: number): void;
|
|
245
345
|
/**
|
|
246
346
|
* 意图要触发手势, 可以通过 `return false` 阻止
|
|
247
347
|
* @param type - 手势类型
|
|
@@ -371,50 +471,68 @@ export declare type ControllerEventTypes = {
|
|
|
371
471
|
vrWantsToExit(): void;
|
|
372
472
|
/**
|
|
373
473
|
* 观察点的全景资源开始加载
|
|
374
|
-
* @param
|
|
375
|
-
* @param observer - 对应的 observer 详情
|
|
474
|
+
* @param panoId - 加载点位
|
|
376
475
|
*/
|
|
377
|
-
textureStartLoad(
|
|
476
|
+
textureStartLoad(panoId: WorkPanoId): void;
|
|
378
477
|
/**
|
|
379
478
|
* 观察点的全景资源加载中,可获取到进度
|
|
380
479
|
* @param progress - 加载进度 [0-1]
|
|
381
|
-
* @param
|
|
382
|
-
* @param observer - 对应的 observer 详情
|
|
480
|
+
* @param panoId - 加载点位下标
|
|
383
481
|
*/
|
|
384
|
-
textureLoading(progress: number,
|
|
482
|
+
textureLoading(progress: number, panoId: WorkPanoId): void;
|
|
385
483
|
/**
|
|
386
484
|
* 观察点的全景资源加载被中止
|
|
387
|
-
* @param
|
|
388
|
-
* @param observer - 对应的 observer 详情
|
|
485
|
+
* @param panoId - 加载点位
|
|
389
486
|
*/
|
|
390
|
-
textureAbort(
|
|
487
|
+
textureAbort(panoId: WorkPanoId): void;
|
|
391
488
|
/**
|
|
392
489
|
* 观察点的全景资源加载失败
|
|
393
490
|
* @param error - 错误对象
|
|
394
|
-
* @param
|
|
395
|
-
* @param observer - 对应的 observer 详情
|
|
491
|
+
* @param panoId - 加载点位
|
|
396
492
|
*/
|
|
397
|
-
textureError(error: Error,
|
|
493
|
+
textureError(error: Error, panoId: WorkPanoId): void;
|
|
398
494
|
/**
|
|
399
495
|
* 观察点的全景资源加载完成
|
|
400
|
-
* @param
|
|
401
|
-
* @param observer - 对应的 observer 详情
|
|
496
|
+
* @param panoId - 加载点位
|
|
402
497
|
*/
|
|
403
|
-
textureLoaded(
|
|
498
|
+
textureLoaded(panoId: WorkPanoId, meta: (NetWorkMeta | null)[]): void;
|
|
404
499
|
/**
|
|
405
500
|
* 抛出错误
|
|
406
501
|
* @param error - 抛出错误
|
|
407
502
|
*/
|
|
408
503
|
error(error: Error): void;
|
|
504
|
+
/**
|
|
505
|
+
* webXR模式开始,webxr session完成坐标系矫正
|
|
506
|
+
*/
|
|
507
|
+
webXRSessionStart(): void;
|
|
508
|
+
/**
|
|
509
|
+
* webXR模式结束,webxr session销毁
|
|
510
|
+
*/
|
|
511
|
+
webXRSessionEnd(): void;
|
|
512
|
+
/**
|
|
513
|
+
* axes代表控制杆,axes数组的0-1元素分别代表左控制器的左(-1)右(1),左控制器的上(-1)下(1),axes数组的2-3元素同理
|
|
514
|
+
*/
|
|
515
|
+
webXRControllerEvent(type: WebXRControllerType, key: WebXRControllerKey, params: WebXRControllerParams): void;
|
|
409
516
|
};
|
|
410
517
|
|
|
518
|
+
export declare class CullingVolume {
|
|
519
|
+
static get MASK_OUTSIDE(): number;
|
|
520
|
+
static get MASK_INSIDE(): number;
|
|
521
|
+
static get MASK_INDETERMINATE(): number;
|
|
522
|
+
planes: THREE_2.Plane[];
|
|
523
|
+
constructor(planes?: THREE_2.Plane[]);
|
|
524
|
+
setFromFrustum(frustum: THREE_2.Frustum): this;
|
|
525
|
+
computeVisibility(boundingVolume: BoundingVolume): VolumePlaneIntersect;
|
|
526
|
+
computeVisibilityWithPlaneMask(boundingVolume: BoundingVolume, parentPlaneMask: number): number;
|
|
527
|
+
}
|
|
528
|
+
|
|
411
529
|
/**
|
|
412
530
|
* URL 地址的转换
|
|
413
|
-
* @param
|
|
531
|
+
* @param source - url 原地址
|
|
414
532
|
* @param options - url 转换参数
|
|
415
533
|
* @returns url 转换结果
|
|
416
534
|
*/
|
|
417
|
-
export declare function defaultImageURLTransform(
|
|
535
|
+
export declare function defaultImageURLTransform(source: string, options: ImageURLOptions): string;
|
|
418
536
|
|
|
419
537
|
export declare interface DepthPanoramaControllerCustomInitArgs extends PanoramaLikeControllerCustomInitArgs {
|
|
420
538
|
/** 最远可移动观察点距离 */
|
|
@@ -427,7 +545,7 @@ export declare interface DepthPanoramaControllerCustomInitArgs extends PanoramaL
|
|
|
427
545
|
*/
|
|
428
546
|
panoTapTriggerRadius?: number;
|
|
429
547
|
/** 地面观察点标识自定义创建器 */
|
|
430
|
-
panoCircleMeshCreator?: () => PanoCircleMeshInterface;
|
|
548
|
+
panoCircleMeshCreator?: (panoId: WorkPanoId) => PanoCircleMeshInterface;
|
|
431
549
|
}
|
|
432
550
|
|
|
433
551
|
/**
|
|
@@ -452,62 +570,44 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
452
570
|
/**
|
|
453
571
|
* 准备加载 Work 数据
|
|
454
572
|
* @param input - 输入的 work
|
|
455
|
-
* @param
|
|
573
|
+
* @param works - 归一化的标准 work
|
|
456
574
|
* @param state - 加载时的姿态
|
|
457
575
|
*/
|
|
458
|
-
willLoad(input: any,
|
|
576
|
+
willLoad(input: any, works: Works, state: Partial<State>): void;
|
|
459
577
|
/**
|
|
460
578
|
* 开始加载 Work 数据
|
|
461
579
|
* @param input - 输入的 work
|
|
462
|
-
* @param
|
|
580
|
+
* @param works - 归一化的标准 work
|
|
463
581
|
* @param state - 加载时的姿态
|
|
464
582
|
*/
|
|
465
|
-
load(input: any,
|
|
583
|
+
load(input: any, works: Works, state: Partial<State>): void;
|
|
466
584
|
/**
|
|
467
585
|
* 加载完 Work 数据
|
|
468
586
|
* @param input - 输入的 work
|
|
469
|
-
* @param
|
|
587
|
+
* @param works - 归一化的标准 work
|
|
470
588
|
*/
|
|
471
|
-
loaded(input: any,
|
|
589
|
+
loaded(input: any, works: Works): void;
|
|
472
590
|
/**
|
|
473
591
|
* 模型开始加载
|
|
474
592
|
* @param workModel - 归一化的标准 work 中的 model 值
|
|
475
593
|
*/
|
|
476
594
|
modelWillLoad(workModel: WorkModel): void;
|
|
477
|
-
/**
|
|
478
|
-
* 模型三角面片结构加载完成
|
|
479
|
-
* @param model - 加载完的 model 本质是一个 {@link PBMGroup}
|
|
480
|
-
*/
|
|
481
|
-
modelGeometryLoaded(model: Model): void;
|
|
482
|
-
/**
|
|
483
|
-
* 模型材质结构加载完成
|
|
484
|
-
* @param model - 加载完的 model 本质是一个 {@link PBMGroup}
|
|
485
|
-
*/
|
|
486
|
-
modelMaterialLoaded(model: Model): void;
|
|
487
|
-
/**
|
|
488
|
-
* 模型 bvh树 计算完成
|
|
489
|
-
* @description
|
|
490
|
-
* bvh 树用于高效的碰撞检测,可以在 `model.bvh` 属性来设置是否开启。默认开启。
|
|
491
|
-
* bvh 树计算需要一定事件,可能会暂时影响一些性能。计算完毕后,会对碰撞检测带来质的提升。
|
|
492
|
-
* @param model - 加载完的 model 本质是一个 {@link PBMGroup}
|
|
493
|
-
*/
|
|
494
|
-
modelBvhLoaded(model: Model): void;
|
|
495
595
|
/**
|
|
496
596
|
* 模型加载错误
|
|
497
597
|
* @param error - 错误对象
|
|
498
|
-
* @param model - 加载完的 model
|
|
598
|
+
* @param model - 加载完的 model
|
|
499
599
|
*/
|
|
500
600
|
modelLoadError(error: Error, model: Model): void;
|
|
501
601
|
/**
|
|
502
602
|
* 模型加载完成
|
|
503
|
-
* @param
|
|
603
|
+
* @param models - 加载完的 model
|
|
504
604
|
*/
|
|
505
|
-
modelLoaded(
|
|
605
|
+
modelLoaded(models: Models): void;
|
|
506
606
|
/**
|
|
507
607
|
* 模型楼层切换
|
|
508
608
|
* @param shownFloor - 模型楼层
|
|
509
609
|
*/
|
|
510
|
-
modelShownFloorChange(shownFloor: number | null
|
|
610
|
+
modelShownFloorChange(shownFloor: number | null): void;
|
|
511
611
|
/**
|
|
512
612
|
* 渲染循环
|
|
513
613
|
* @param rendered - 是否渲染了
|
|
@@ -542,21 +642,21 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
542
642
|
stateSynced(state: State): void;
|
|
543
643
|
/**
|
|
544
644
|
* 意图要移动到某个点时, 可以通过 return false 阻止
|
|
545
|
-
* @param
|
|
645
|
+
* @param panoId - 意图要移动到点位
|
|
546
646
|
* @param options - 移动参数
|
|
547
647
|
* @param userAction - 是否用户触发
|
|
548
648
|
* @returns 可以通过 return false 阻止
|
|
549
649
|
*/
|
|
550
|
-
wantsMoveToPano(
|
|
650
|
+
wantsMoveToPano(panoId: WorkPanoId, options: MovePanoOptions, userAction: boolean): void | false;
|
|
551
651
|
/**
|
|
552
652
|
* 同 wantsMoveToPano
|
|
553
653
|
* @description
|
|
554
|
-
* @param
|
|
654
|
+
* @param panoId - 意图要移动到点位
|
|
555
655
|
* @param options - 移动参数
|
|
556
656
|
* @param userAction - 是否用户触发
|
|
557
657
|
* @returns 可以通过 return false 阻止
|
|
558
658
|
*/
|
|
559
|
-
wantsToMoveToPano(
|
|
659
|
+
wantsToMoveToPano(panoId: WorkPanoId, options: MovePanoOptions, userAction: boolean): void;
|
|
560
660
|
/**
|
|
561
661
|
* 意图要切换到某个模态, 可以通过 return false 阻止
|
|
562
662
|
* @param mode - 意图要切换到的模态
|
|
@@ -570,8 +670,9 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
570
670
|
* @param prevMode - 上本质是一个模态
|
|
571
671
|
* @param panoIndex - 初始化动画结束后的点位下标
|
|
572
672
|
* @param toPose - 初始化动画结束后的状态
|
|
673
|
+
* @param userAction - 是否用户触发
|
|
573
674
|
*/
|
|
574
|
-
modeChange(mode: Mode, prevMode: Mode,
|
|
675
|
+
modeChange(mode: Mode, prevMode: Mode, panoId: WorkPanoId, toPose: Pose, userAction: boolean): void;
|
|
575
676
|
/**
|
|
576
677
|
* 帮助元素显应的变换
|
|
577
678
|
* @param visible - 帮助元素的是否开启
|
|
@@ -602,6 +703,9 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
602
703
|
* ```
|
|
603
704
|
*/
|
|
604
705
|
export declare class Five extends Subscribe<EventTypes> {
|
|
706
|
+
static get version(): string;
|
|
707
|
+
static get dracoPath(): string;
|
|
708
|
+
static set dracoPath(path: string);
|
|
605
709
|
/**
|
|
606
710
|
* Five 的显示模式,可以通过 `five.changeMode` `five.setState` 来切换
|
|
607
711
|
* @description
|
|
@@ -612,6 +716,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
612
716
|
* Topview 户型图模式
|
|
613
717
|
* DepthPanorama 深度图游走模式
|
|
614
718
|
* VRPanorama VR眼镜模式
|
|
719
|
+
* XRPanorama VR硬件模式
|
|
615
720
|
* ```
|
|
616
721
|
*/
|
|
617
722
|
static Mode: Mirror<Mode>;
|
|
@@ -627,9 +732,9 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
627
732
|
*/
|
|
628
733
|
paused: boolean;
|
|
629
734
|
/** 当前点位序号 */
|
|
630
|
-
|
|
735
|
+
panoId: WorkPanoId;
|
|
631
736
|
/** 当前展示的模式 */
|
|
632
|
-
currentMode
|
|
737
|
+
currentMode: Mode;
|
|
633
738
|
/** 内部使用的 `THREE.Scene` */
|
|
634
739
|
scene: Scene;
|
|
635
740
|
/** 内部使用的 `Camera` */
|
|
@@ -654,7 +759,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
654
759
|
*/
|
|
655
760
|
renderer?: THREE_2.WebGLRenderer;
|
|
656
761
|
/** 当前加载的模型 */
|
|
657
|
-
|
|
762
|
+
models: Models;
|
|
658
763
|
/**
|
|
659
764
|
* 是否需要渲染
|
|
660
765
|
* @description
|
|
@@ -676,6 +781,12 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
676
781
|
* 平衡加载时间和图片质量
|
|
677
782
|
*/
|
|
678
783
|
textureOptions: TextureOptions;
|
|
784
|
+
/**
|
|
785
|
+
* 模型lod的配置参数
|
|
786
|
+
* @description
|
|
787
|
+
* 可以配置加载模型lod的相关参数
|
|
788
|
+
*/
|
|
789
|
+
modelLodOptions: ModelLodOptions;
|
|
679
790
|
/**
|
|
680
791
|
* 模型贴图的配置参数
|
|
681
792
|
* @description
|
|
@@ -707,8 +818,11 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
707
818
|
[key: string]: FivePluginInstance<any>;
|
|
708
819
|
};
|
|
709
820
|
ident: string;
|
|
821
|
+
/** 包围盒子 */
|
|
822
|
+
private boundingMesh;
|
|
710
823
|
private stopAnimationLoop?;
|
|
711
824
|
private fps;
|
|
825
|
+
private modelGroup;
|
|
712
826
|
private helperGroup;
|
|
713
827
|
private modeChangeDuration;
|
|
714
828
|
private onlyRenderIfNeeds;
|
|
@@ -717,7 +831,6 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
717
831
|
private destroyed;
|
|
718
832
|
private stateSynced;
|
|
719
833
|
private controllerInits;
|
|
720
|
-
private panoramaLikeSavedPose;
|
|
721
834
|
private extraElements;
|
|
722
835
|
private getPixelsRenderTarget;
|
|
723
836
|
private readyCallbacks;
|
|
@@ -730,11 +843,31 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
730
843
|
*/
|
|
731
844
|
private _enableIOSEDR;
|
|
732
845
|
private lastLoadWorkTask;
|
|
846
|
+
private requestProxy;
|
|
733
847
|
private networkSubscribe;
|
|
734
|
-
private
|
|
848
|
+
private screenBuffers?;
|
|
735
849
|
private analysis?;
|
|
736
850
|
private renderSwitch01;
|
|
851
|
+
/**
|
|
852
|
+
* gpu_picking
|
|
853
|
+
*/
|
|
854
|
+
private gpuPickingRenderTarget;
|
|
855
|
+
private meshReplaceMaterialMap;
|
|
856
|
+
private meshOriginMaterialMap;
|
|
857
|
+
private copyEffect;
|
|
737
858
|
constructor(initArgs?: FiveInitArgs);
|
|
859
|
+
get panoIndex(): number;
|
|
860
|
+
/**
|
|
861
|
+
* GPU Picking 获取选中的 mesh
|
|
862
|
+
* @param x - 屏幕坐标 x
|
|
863
|
+
* @param y - 屏幕坐标 y
|
|
864
|
+
* @param colorMap - 需要选取的 mesh 的颜色与 uuid 的映射
|
|
865
|
+
* @param color - 指定的模型颜色
|
|
866
|
+
* @returns 选中 mesh 的 uuid
|
|
867
|
+
*/
|
|
868
|
+
getGPUPicking(x: number, y: number, colorMap: {
|
|
869
|
+
[key: string]: THREE_2.Color;
|
|
870
|
+
}, pixelRatio?: number, color?: THREE_2.Vector3): string | false;
|
|
738
871
|
/**
|
|
739
872
|
* 析构 five 对象。
|
|
740
873
|
* @description
|
|
@@ -766,9 +899,17 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
766
899
|
*/
|
|
767
900
|
get enableIOSEDR(): boolean;
|
|
768
901
|
set enableIOSEDR(enable: boolean);
|
|
902
|
+
/**
|
|
903
|
+
* 是否开启EDL模式
|
|
904
|
+
*/
|
|
905
|
+
get enableEDL(): boolean;
|
|
906
|
+
set enableEDL(enable: boolean);
|
|
907
|
+
/**
|
|
908
|
+
* 是否开启后处理
|
|
909
|
+
*/
|
|
769
910
|
get enablePostProcessing(): boolean;
|
|
770
911
|
set enablePostProcessing(enable: boolean);
|
|
771
|
-
updateConfiguration(args: Pick<FiveInitArgs, "panorama" | "model" | "floorplan" | "topview" | "depthPanorama" | "vrPanorama" | "imageOptions">): void;
|
|
912
|
+
updateConfiguration(args: Pick<FiveInitArgs, "panorama" | "model" | "floorplan" | "topview" | "mapview" | "depthPanorama" | "vrPanorama" | "imageOptions" | "textureOptions">): void;
|
|
772
913
|
/**
|
|
773
914
|
* 将显示区域加载到页面 DOM 中
|
|
774
915
|
* @description
|
|
@@ -819,6 +960,17 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
819
960
|
* @returns Promise 是否移动成功
|
|
820
961
|
*/
|
|
821
962
|
updateCamera(pose: Partial<Omit<Pose, "offset">>, duration: number, userAction?: boolean): Promise<void>;
|
|
963
|
+
/**
|
|
964
|
+
* 通过帧动画移动相机。(不触发点位移动)
|
|
965
|
+
* @description
|
|
966
|
+
* 如果动画中途被打断(用户触发行为,或者调用 setState, load, changeMode)的等
|
|
967
|
+
* 会 Promise.reject。运动完成则 Promise.resolve
|
|
968
|
+
* @param keyframes - 动画帧
|
|
969
|
+
* @param duration - 动画触发的时常
|
|
970
|
+
* @param userAction - 是否用户触发
|
|
971
|
+
* @returns Promise 是否移动成功
|
|
972
|
+
*/
|
|
973
|
+
updateCameraWithKeyframes(keyframes: MotionKeyframe<Exclude<keyof Pose, "offset">>[], duration: number, userAction?: boolean): Promise<void>;
|
|
822
974
|
/**
|
|
823
975
|
* 获取当前相机经纬度
|
|
824
976
|
* @deprecated 请使用使用 getPose
|
|
@@ -838,28 +990,10 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
838
990
|
phi: number;
|
|
839
991
|
lookAtVector: THREE_2.Vector3;
|
|
840
992
|
};
|
|
841
|
-
/**
|
|
842
|
-
* 初始化 initBasisLoader
|
|
843
|
-
* @description
|
|
844
|
-
* 同初始化的 initBasisLoader 参数。用于初始化 basisLoader。
|
|
845
|
-
* basisLoader 只会初始化一次,一旦初始化则不会再修改。
|
|
846
|
-
*
|
|
847
|
-
* @param transcoderResourcePath - basis 解析器路径
|
|
848
|
-
* 如果不设置,使用默认解析器 basis 解析器。
|
|
849
|
-
* 可以传入解析器的 `resourcePath`, 则使用指定的解析器
|
|
850
|
-
* @example
|
|
851
|
-
* ```
|
|
852
|
-
* // 使用默认解析器
|
|
853
|
-
* five.initialBasisLoader();
|
|
854
|
-
*
|
|
855
|
-
* // 使用指定解析器
|
|
856
|
-
* // 会调用这个目录下的 basis_transcoder.js basis_transcoder.wasm 文件作为解析器
|
|
857
|
-
* five.initialBasisLoader("https://vrlab-public.ljcdn.com/release/static/image/release/five/basis/");
|
|
858
|
-
* ```
|
|
859
|
-
*/
|
|
860
|
-
initBasisLoader(transcoderResourcePath?: string): void;
|
|
861
993
|
/** 当前加载的 work 数据 */
|
|
862
|
-
get
|
|
994
|
+
get works(): Works;
|
|
995
|
+
get work(): Work | undefined;
|
|
996
|
+
get model(): Model;
|
|
863
997
|
/**
|
|
864
998
|
* 加载 Work 数据
|
|
865
999
|
* @param inputWork - Work 数据
|
|
@@ -869,7 +1003,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
869
1003
|
* - State 自定义姿态
|
|
870
1004
|
* @param duration - 切换时间
|
|
871
1005
|
*/
|
|
872
|
-
load(inputWork: Work | LooseWork |
|
|
1006
|
+
load(inputWork: string | Work | LooseWork | string[] | Work[] | LooseWork[] | LooseWorkWithExtrinsics[] | Promise<Work | LooseWork | Work[] | LooseWork[] | LooseWorkWithExtrinsics[]>, state?: "inherit" | "initial" | Partial<State>, duration?: number, userAction?: boolean): Promise<void>;
|
|
873
1007
|
private load_;
|
|
874
1008
|
/**
|
|
875
1009
|
* 切换模态
|
|
@@ -894,6 +1028,10 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
894
1028
|
* 获取显示用的画布(Canvas DOM节点)
|
|
895
1029
|
*/
|
|
896
1030
|
getElement(): HTMLCanvasElement | undefined;
|
|
1031
|
+
/**
|
|
1032
|
+
* 获取观测点
|
|
1033
|
+
*/
|
|
1034
|
+
get observers(): WorkObserver[];
|
|
897
1035
|
/**
|
|
898
1036
|
* 强制渲染
|
|
899
1037
|
* @description
|
|
@@ -906,9 +1044,9 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
906
1044
|
* @param callback - 渲染完成回调
|
|
907
1045
|
*/
|
|
908
1046
|
render(callback?: () => void, updateObjectResolution?: boolean): THREE_2.WebGLRenderTarget;
|
|
909
|
-
updateTime(time: number, deltaTime: number): void;
|
|
1047
|
+
updateTime(time: number, deltaTime: number, ...args: any[]): void;
|
|
910
1048
|
/**
|
|
911
|
-
*
|
|
1049
|
+
* 暂停自动播放
|
|
912
1050
|
*/
|
|
913
1051
|
pause(): void;
|
|
914
1052
|
play(): void;
|
|
@@ -918,13 +1056,15 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
918
1056
|
* @param options - 移动点位参数
|
|
919
1057
|
* @param userAction - 是否用户触犯
|
|
920
1058
|
*/
|
|
921
|
-
moveToPano(
|
|
1059
|
+
moveToPano(panoId: WorkPanoId, options?: MovePanoOptions, userAction?: boolean): Promise<void>;
|
|
1060
|
+
moveToPano(panoIndex: number, options?: MovePanoOptions, userAction?: boolean): Promise<void>;
|
|
922
1061
|
/**
|
|
923
1062
|
* 预加载点位图片资源
|
|
924
1063
|
* @param panoIndex - 观察点序号
|
|
925
1064
|
* @param callback - 加载完成回调, 并传递加载用时。
|
|
926
1065
|
* @returns 加载完成的 Promise 参数同 callback
|
|
927
1066
|
*/
|
|
1067
|
+
preloadPano(panoId: WorkPanoId, callback?: (costs: number) => void): Promise<number>;
|
|
928
1068
|
preloadPano(panoIndex: number, callback?: (costs: number) => void): Promise<number>;
|
|
929
1069
|
/**
|
|
930
1070
|
* 计算三维坐标对应到屏幕的二维坐标
|
|
@@ -965,16 +1105,28 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
965
1105
|
setState(state: Partial<State>, immediately?: boolean, userAction?: boolean): void;
|
|
966
1106
|
aroundScissor(callback: () => void): void;
|
|
967
1107
|
private syncState;
|
|
968
|
-
|
|
1108
|
+
/**
|
|
1109
|
+
* 当前页面静态
|
|
1110
|
+
*/
|
|
1111
|
+
ready(args?: {
|
|
1112
|
+
tile?: boolean;
|
|
1113
|
+
}): Promise<void>;
|
|
1114
|
+
/**
|
|
1115
|
+
* 请求全屏
|
|
1116
|
+
*/
|
|
969
1117
|
requestFullscreen(): void;
|
|
1118
|
+
/**
|
|
1119
|
+
* 退出全屏
|
|
1120
|
+
*/
|
|
970
1121
|
exitFullscreen(): void;
|
|
971
1122
|
private throwError;
|
|
972
1123
|
private loadModel;
|
|
973
1124
|
private commonParams;
|
|
974
|
-
private saveControllerPose;
|
|
975
1125
|
private applyController;
|
|
976
1126
|
/** 移除事件绑定 */
|
|
977
1127
|
private removeEventListeners;
|
|
1128
|
+
/** 销毁GPU Picking 所用的材质 */
|
|
1129
|
+
private diposeGPUPickingMaterial;
|
|
978
1130
|
}
|
|
979
1131
|
|
|
980
1132
|
/** Five 初始化参数 */
|
|
@@ -1076,24 +1228,6 @@ export declare interface FiveInitArgs {
|
|
|
1076
1228
|
* @default `false`
|
|
1077
1229
|
*/
|
|
1078
1230
|
maxFps?: number | false;
|
|
1079
|
-
/**
|
|
1080
|
-
* 是否初始化 `basisLoader`。
|
|
1081
|
-
* @description
|
|
1082
|
-
* 当你需要加载 basis 格式图片时请启用。
|
|
1083
|
-
* 如果设置为 `true` 使用默认解析器 basis 解析器。
|
|
1084
|
-
* 如果要自定义,可以传入解析器的 `resourcePath`, 则使用指定的解析器
|
|
1085
|
-
* @default `false`
|
|
1086
|
-
* @example
|
|
1087
|
-
* ```
|
|
1088
|
-
* // 使用默认解析器
|
|
1089
|
-
* initialBasisLoader: true
|
|
1090
|
-
*
|
|
1091
|
-
* // 使用指定解析器
|
|
1092
|
-
* // 会调用这个目录下的 basis_transcoder.js basis_transcoder.wasm 文件作为解析器
|
|
1093
|
-
* initialBasisLoader: "https://vrlab-public.ljcdn.com/release/static/image/release/five/basis/"
|
|
1094
|
-
* ```
|
|
1095
|
-
*/
|
|
1096
|
-
initialBasisLoader?: boolean | string;
|
|
1097
1231
|
/**
|
|
1098
1232
|
* 外挂视频对象。
|
|
1099
1233
|
* @description
|
|
@@ -1110,15 +1244,19 @@ export declare interface FiveInitArgs {
|
|
|
1110
1244
|
floorplan?: ControllerCustomInitTypes["Floorplan"];
|
|
1111
1245
|
/** 户型图模式下的特定参数 */
|
|
1112
1246
|
topview?: ControllerCustomInitTypes["Topview"];
|
|
1247
|
+
/** 地图模式下的特定参数 */
|
|
1248
|
+
mapview?: ControllerCustomInitTypes["Mapview"];
|
|
1113
1249
|
/** 深度图游走模式下的特定参数 */
|
|
1114
1250
|
depthPanorama?: ControllerCustomInitTypes["DepthPanorama"];
|
|
1115
1251
|
/** VR眼镜模式下的特定参数 */
|
|
1116
1252
|
vrPanorama?: ControllerCustomInitTypes["VRPanorama"];
|
|
1253
|
+
/** XR眼镜模式下的特定参数 */
|
|
1254
|
+
xrPanorama?: ControllerCustomInitTypes["XRPanorama"];
|
|
1117
1255
|
/**
|
|
1118
1256
|
* 模式间切换时的过度动画时间
|
|
1119
1257
|
* @description
|
|
1120
1258
|
* 单位毫秒
|
|
1121
|
-
* @default `
|
|
1259
|
+
* @default `800`
|
|
1122
1260
|
*/
|
|
1123
1261
|
modeChangeDuration?: number;
|
|
1124
1262
|
/**
|
|
@@ -1131,6 +1269,26 @@ export declare interface FiveInitArgs {
|
|
|
1131
1269
|
* 是否展示 powered by 如视
|
|
1132
1270
|
*/
|
|
1133
1271
|
poweredByRealsee?: boolean;
|
|
1272
|
+
/**
|
|
1273
|
+
* 是否使用webgl2渲染执行环境, 默认值 false
|
|
1274
|
+
*/
|
|
1275
|
+
webgl2?: boolean;
|
|
1276
|
+
/**
|
|
1277
|
+
* 是否开启模型裁切
|
|
1278
|
+
*/
|
|
1279
|
+
localClippingEnabled?: boolean;
|
|
1280
|
+
/**
|
|
1281
|
+
* 请求代理
|
|
1282
|
+
* @param url - 发起的请求
|
|
1283
|
+
* @returns 返回的请求
|
|
1284
|
+
*/
|
|
1285
|
+
requestProxy?(url: string): string | Promise<string>;
|
|
1286
|
+
/**
|
|
1287
|
+
* 模型lod相关的配置,maxDepth为加载的最大深度
|
|
1288
|
+
*/
|
|
1289
|
+
modelLod?: {
|
|
1290
|
+
maxDepth?: number;
|
|
1291
|
+
};
|
|
1134
1292
|
}
|
|
1135
1293
|
|
|
1136
1294
|
/**
|
|
@@ -1161,8 +1319,6 @@ parameters: Parameters<T>[1]
|
|
|
1161
1319
|
export declare type FivePluginInstance<T extends FivePlugin<any, any>> = ReturnType<T>;
|
|
1162
1320
|
|
|
1163
1321
|
export declare interface FloorplanControllerCustomInitArgs {
|
|
1164
|
-
/** 默认偏航角 */
|
|
1165
|
-
defaultLongitude?: number;
|
|
1166
1322
|
/** 默认俯仰角 */
|
|
1167
1323
|
defaultLatitude?: number;
|
|
1168
1324
|
/** 最大俯仰角 */
|
|
@@ -1175,6 +1331,8 @@ export declare interface FloorplanControllerCustomInitArgs {
|
|
|
1175
1331
|
maxFov?: number;
|
|
1176
1332
|
/** 最小相机可视角度 */
|
|
1177
1333
|
minFov?: number;
|
|
1334
|
+
/** 鼠标焦点环自定义创建器 */
|
|
1335
|
+
intersectMeshCreator?: () => IntersectMeshInterface;
|
|
1178
1336
|
}
|
|
1179
1337
|
|
|
1180
1338
|
export declare type GestureTypes = "pan" | "tap" | "pinch" | "press" | "mouseWheel";
|
|
@@ -1198,34 +1356,61 @@ export declare interface ImageOptions {
|
|
|
1198
1356
|
quality?: number;
|
|
1199
1357
|
/** 图片格式参数 */
|
|
1200
1358
|
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
1359
|
+
/** 锐化参数 海外不支持 */
|
|
1360
|
+
sharpen?: number;
|
|
1361
|
+
mappings?: ImageURLMappings;
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
export declare function imageSupport(): Promise<{
|
|
1365
|
+
avif: boolean;
|
|
1366
|
+
webp: boolean;
|
|
1367
|
+
}>;
|
|
1368
|
+
|
|
1369
|
+
export declare interface ImageURLMappings {
|
|
1370
|
+
[publicDomain: string]: {
|
|
1371
|
+
"type"?: string;
|
|
1372
|
+
"pano": [string, string];
|
|
1373
|
+
"tile": [string, string];
|
|
1374
|
+
"model": [string, string];
|
|
1375
|
+
"texture": [string];
|
|
1376
|
+
"default": [string];
|
|
1377
|
+
};
|
|
1201
1378
|
}
|
|
1202
1379
|
|
|
1203
1380
|
export declare interface ImageURLOptions {
|
|
1381
|
+
/** 图片类型标识 */
|
|
1204
1382
|
key: string;
|
|
1205
|
-
|
|
1383
|
+
/** 图片尺寸参数 尽量使用 2 的幂次 如 256 512 1024 */
|
|
1206
1384
|
size?: number;
|
|
1385
|
+
/** 图片质量参数(0-100) */
|
|
1207
1386
|
quality?: number;
|
|
1387
|
+
/** 图片格式参数 */
|
|
1208
1388
|
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
1389
|
+
/** 图片裁切 */
|
|
1209
1390
|
cut?: [x: number, y: number, width: number, height: number];
|
|
1391
|
+
/** 锐化参数 海外不支持 */
|
|
1210
1392
|
sharpen?: number;
|
|
1393
|
+
/** url匹配规则 */
|
|
1394
|
+
mappings?: ImageURLMappings;
|
|
1211
1395
|
}
|
|
1212
1396
|
|
|
1213
1397
|
export declare class InternalWebGLRenderer extends THREE_2.WebGLRenderer {
|
|
1214
|
-
constructor({ preserveDrawingBuffer, backgroundColor, backgroundAlpha, pixelRatio, antialias }: {
|
|
1398
|
+
constructor({ preserveDrawingBuffer, backgroundColor, backgroundAlpha, pixelRatio, antialias, webgl2, }: {
|
|
1215
1399
|
preserveDrawingBuffer?: boolean;
|
|
1216
1400
|
backgroundColor?: number | THREE_2.Color;
|
|
1217
1401
|
backgroundAlpha?: number;
|
|
1218
1402
|
pixelRatio?: number;
|
|
1219
1403
|
antialias?: boolean;
|
|
1404
|
+
webgl2?: boolean;
|
|
1220
1405
|
});
|
|
1221
1406
|
}
|
|
1222
1407
|
|
|
1223
1408
|
export declare interface Intersection {
|
|
1224
1409
|
/** 焦点坐标 */
|
|
1225
|
-
point:
|
|
1410
|
+
point: THREE.Vector3;
|
|
1226
1411
|
/** 焦点面片 */
|
|
1227
1412
|
face?: {
|
|
1228
|
-
normal:
|
|
1413
|
+
normal: THREE.Vector3;
|
|
1229
1414
|
} | null;
|
|
1230
1415
|
/** 焦点距离 */
|
|
1231
1416
|
distance: number;
|
|
@@ -1244,45 +1429,24 @@ export declare interface IntersectMeshInterface extends THREE_2.Object3D {
|
|
|
1244
1429
|
dispose(): void;
|
|
1245
1430
|
}
|
|
1246
1431
|
|
|
1247
|
-
export declare class LegacyPanoCircleMesh extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1248
|
-
needsRender: boolean;
|
|
1249
|
-
hitTestMesh: THREE_2.Mesh<THREE_2.BufferGeometry, THREE_2.MeshBasicMaterial>;
|
|
1250
|
-
current: boolean;
|
|
1251
|
-
loading: boolean;
|
|
1252
|
-
disabled: boolean;
|
|
1253
|
-
progress: number;
|
|
1254
|
-
opacity: number;
|
|
1255
|
-
private centerMesh;
|
|
1256
|
-
private loadingMesh;
|
|
1257
|
-
private progressMotion;
|
|
1258
|
-
private opacityMotion;
|
|
1259
|
-
private stopInterval?;
|
|
1260
|
-
constructor();
|
|
1261
|
-
setLoading(shown: boolean): void;
|
|
1262
|
-
setDisabled(disabled: boolean): void;
|
|
1263
|
-
setProgress(progress: number): void;
|
|
1264
|
-
setOpacity(opacity: number): void;
|
|
1265
|
-
setCurrent(current: boolean): void;
|
|
1266
|
-
updateTime(time: number, deltaTime: number): void;
|
|
1267
|
-
dispose(): void;
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
1432
|
export declare type LooseWork = {
|
|
1271
|
-
|
|
1433
|
+
work_code?: string;
|
|
1434
|
+
code?: string;
|
|
1272
1435
|
modelAsync?: boolean;
|
|
1273
1436
|
initial?: LooseWorkInitial;
|
|
1274
1437
|
base_url?: string;
|
|
1275
1438
|
model?: LooseWorkModel;
|
|
1276
|
-
panorama
|
|
1439
|
+
panorama?: {
|
|
1277
1440
|
base_url?: string;
|
|
1278
1441
|
pano_high_cube_base_url?: string;
|
|
1279
1442
|
info?: LooseWorkPanorama[];
|
|
1280
1443
|
list?: LooseWorkPanorama[];
|
|
1281
1444
|
};
|
|
1282
|
-
observers
|
|
1445
|
+
observers?: LooseWorkObserver[];
|
|
1283
1446
|
};
|
|
1284
1447
|
|
|
1285
1448
|
export declare type LooseWorkInitial = {
|
|
1449
|
+
mode?: string;
|
|
1286
1450
|
pano_index?: number;
|
|
1287
1451
|
pano?: number;
|
|
1288
1452
|
longitude?: number;
|
|
@@ -1291,9 +1455,23 @@ export declare type LooseWorkInitial = {
|
|
|
1291
1455
|
};
|
|
1292
1456
|
|
|
1293
1457
|
export declare type LooseWorkModel = {
|
|
1294
|
-
file_url
|
|
1458
|
+
file_url?: string;
|
|
1295
1459
|
material_textures?: string[];
|
|
1296
1460
|
material_base_url?: string;
|
|
1461
|
+
tiles?: {
|
|
1462
|
+
type?: 'point_cloud' | 'mesh' | string;
|
|
1463
|
+
name?: string;
|
|
1464
|
+
up_axis?: string;
|
|
1465
|
+
tileset_url: string;
|
|
1466
|
+
};
|
|
1467
|
+
layers?: [
|
|
1468
|
+
{
|
|
1469
|
+
type?: 'point_cloud' | 'mesh' | string;
|
|
1470
|
+
name?: string;
|
|
1471
|
+
up_axis?: string;
|
|
1472
|
+
tileset_url: string;
|
|
1473
|
+
}
|
|
1474
|
+
];
|
|
1297
1475
|
};
|
|
1298
1476
|
|
|
1299
1477
|
export declare type LooseWorkObserver = {
|
|
@@ -1341,6 +1519,36 @@ export declare type LooseWorkVideo = {
|
|
|
1341
1519
|
size: number[];
|
|
1342
1520
|
};
|
|
1343
1521
|
|
|
1522
|
+
export declare type LooseWorkWithExtrinsics = {
|
|
1523
|
+
work: LooseWork;
|
|
1524
|
+
debug?: boolean;
|
|
1525
|
+
/** 位姿 */
|
|
1526
|
+
transform?: number[];
|
|
1527
|
+
/** 可视区域 */
|
|
1528
|
+
viewerRequestVolume?: BoundingVolumeJson;
|
|
1529
|
+
/** 模型显示最大细化层级 */
|
|
1530
|
+
modelMaxLevelOfDetail?: number;
|
|
1531
|
+
/** 模型最大内存缓存 */
|
|
1532
|
+
modelMaxMemoryUsage?: number;
|
|
1533
|
+
/** 模型网络最大请求并发数 */
|
|
1534
|
+
modelMaxRequests?: number;
|
|
1535
|
+
/** 模型屏幕空间误差计算最大值 */
|
|
1536
|
+
modelMaxScreenSpaceError?: number;
|
|
1537
|
+
};
|
|
1538
|
+
|
|
1539
|
+
export declare interface MapviewControllerCustomInitArgs {
|
|
1540
|
+
/** 默认俯仰角 */
|
|
1541
|
+
defaultLatitude?: number;
|
|
1542
|
+
/** 默认相机距离 */
|
|
1543
|
+
defaultDistance?: number;
|
|
1544
|
+
/** 最大俯仰角 */
|
|
1545
|
+
maxLatitude?: number;
|
|
1546
|
+
/** 最小俯仰角 */
|
|
1547
|
+
minLatitude?: number;
|
|
1548
|
+
/** 鼠标焦点环自定义创建器 */
|
|
1549
|
+
intersectMeshCreator?: () => IntersectMeshInterface;
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1344
1552
|
export declare type Mirror<T extends string> = Record<T, T>;
|
|
1345
1553
|
|
|
1346
1554
|
/**
|
|
@@ -1349,6 +1557,7 @@ export declare type Mirror<T extends string> = Record<T, T>;
|
|
|
1349
1557
|
* - **Model**: 模型游走模式
|
|
1350
1558
|
* - **Floorplan**: 模型查看模式
|
|
1351
1559
|
* - **Topview**: 户型图模式
|
|
1560
|
+
* - **Mapview**: 地图模式
|
|
1352
1561
|
* - **DepthPanorama**: 深度图游走模式
|
|
1353
1562
|
* - **VRPanorama**: VR眼镜模式
|
|
1354
1563
|
*/
|
|
@@ -1357,6 +1566,8 @@ export declare type Mode =
|
|
|
1357
1566
|
"Floorplan" |
|
|
1358
1567
|
/** 户型图模式 */
|
|
1359
1568
|
"Topview" |
|
|
1569
|
+
/** 地图模式 */
|
|
1570
|
+
"Mapview" |
|
|
1360
1571
|
/** 全景图游走模式 */
|
|
1361
1572
|
"Panorama" |
|
|
1362
1573
|
/** VR眼镜模式 */
|
|
@@ -1364,7 +1575,9 @@ export declare type Mode =
|
|
|
1364
1575
|
/** 模型游走模式 */
|
|
1365
1576
|
"Model" |
|
|
1366
1577
|
/** 深度图游走模式 */
|
|
1367
|
-
"DepthPanorama"
|
|
1578
|
+
"DepthPanorama" |
|
|
1579
|
+
/** XR眼镜模式*/
|
|
1580
|
+
"XRPanorama";
|
|
1368
1581
|
|
|
1369
1582
|
/**
|
|
1370
1583
|
* Five 模型
|
|
@@ -1374,98 +1587,94 @@ export declare type Mode =
|
|
|
1374
1587
|
* 需要满足 your/path/filename.at3d.json_xxxxxx,
|
|
1375
1588
|
* 通过 json_xxxxxx(<dataURL>) 方式返回。
|
|
1376
1589
|
*/
|
|
1377
|
-
export declare class Model extends
|
|
1378
|
-
/**
|
|
1379
|
-
|
|
1380
|
-
/**
|
|
1381
|
-
|
|
1590
|
+
export declare class Model extends THREE_2.Object3D {
|
|
1591
|
+
/** work */
|
|
1592
|
+
work: Work | null;
|
|
1593
|
+
/** 模型的不同图层 */
|
|
1594
|
+
viewLayers: {
|
|
1595
|
+
name: string;
|
|
1596
|
+
type: string;
|
|
1597
|
+
upAxis: string;
|
|
1598
|
+
coordinates: string;
|
|
1599
|
+
scene: Tile3DModel;
|
|
1600
|
+
}[];
|
|
1601
|
+
onError: (error: Error) => void;
|
|
1602
|
+
onShownFloorChange: (floorIndex: number | null) => void;
|
|
1382
1603
|
/** 外接盒子的大小 */
|
|
1383
1604
|
bounding: THREE_2.Box3;
|
|
1384
1605
|
/** 当前显示的楼层 */
|
|
1385
1606
|
shownFloor: number | null;
|
|
1386
1607
|
/** 楼层的数量 */
|
|
1387
1608
|
floorLength: number;
|
|
1388
|
-
/**
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
* 解除事件
|
|
1405
|
-
* 具体可查看 {@link Subscribe.off}
|
|
1406
|
-
*/
|
|
1407
|
-
off: SubscribeMixinType.off<ModelEventType>;
|
|
1408
|
-
/**
|
|
1409
|
-
* 触发事件
|
|
1410
|
-
* 具体可查看 {@link Subscribe.emit}
|
|
1411
|
-
*/
|
|
1412
|
-
emit: SubscribeMixinType.emit<ModelEventType>;
|
|
1413
|
-
/** bvh 树的计算结果 */
|
|
1414
|
-
bvhs: BVH[] & {
|
|
1415
|
-
loaded: boolean;
|
|
1416
|
-
};
|
|
1417
|
-
/** 网络跟踪 */
|
|
1418
|
-
private networkSubscribe?;
|
|
1419
|
-
/** 安全域名 */
|
|
1420
|
-
private allowHosts?;
|
|
1609
|
+
/** 材质贴图参数 */
|
|
1610
|
+
textureOptions: TextureOptions;
|
|
1611
|
+
/** 模型是否已经细化 */
|
|
1612
|
+
refined: boolean;
|
|
1613
|
+
/** 模型已经加载 */
|
|
1614
|
+
loaded: boolean;
|
|
1615
|
+
/** 当前样式参数 */
|
|
1616
|
+
materialVersion: string;
|
|
1617
|
+
private _materialValues;
|
|
1618
|
+
private _materialVersionMap;
|
|
1619
|
+
private _floorIndex;
|
|
1620
|
+
private _clippers;
|
|
1621
|
+
/** 样式缓存 */
|
|
1622
|
+
private cache;
|
|
1623
|
+
needsRender: boolean;
|
|
1624
|
+
private disposed;
|
|
1421
1625
|
constructor(options?: {
|
|
1422
|
-
|
|
1423
|
-
|
|
1626
|
+
onError?: (error: Error) => void;
|
|
1627
|
+
onShownFloorChange?: (floorIndex: number | null) => void;
|
|
1424
1628
|
});
|
|
1629
|
+
get empty(): boolean;
|
|
1630
|
+
/** 获取材质参数 */
|
|
1631
|
+
getMaterial(): ModelMaterialValues;
|
|
1632
|
+
/** 设置材质参数 */
|
|
1633
|
+
setMaterial(values: Partial<ModelMaterialValues>): void;
|
|
1425
1634
|
/**
|
|
1426
1635
|
* 当前显示的楼层
|
|
1427
|
-
* @deprecated
|
|
1428
|
-
* 请用 shwonFloor 代替
|
|
1429
|
-
*/
|
|
1430
|
-
get shownfloor(): number | null;
|
|
1431
|
-
/**
|
|
1432
|
-
* 获取模型边界线
|
|
1433
|
-
* @param threshold - 面片间夹角阈值
|
|
1434
|
-
* @returns 所有模型边界线
|
|
1435
1636
|
*/
|
|
1436
|
-
|
|
1637
|
+
get shownfloor(): PBMParameters['floorIndex'] | null;
|
|
1638
|
+
set shownfloor(floorIndex: PBMParameters['floorIndex'] | null);
|
|
1437
1639
|
/**
|
|
1438
|
-
*
|
|
1439
|
-
* @deprecated
|
|
1440
|
-
* 请使用 floorLength 参数代替
|
|
1640
|
+
* 裁切
|
|
1441
1641
|
*/
|
|
1442
|
-
|
|
1443
|
-
|
|
1642
|
+
get clippers(): PBMParameters['clippers'];
|
|
1643
|
+
set clippers(clippers: PBMParameters['clippers']);
|
|
1444
1644
|
/**
|
|
1445
1645
|
* 显示某楼层
|
|
1446
1646
|
* @example
|
|
1447
1647
|
* ```
|
|
1448
1648
|
* model.show() //显示全部楼层
|
|
1449
1649
|
* model.show(1) //显示第一楼层
|
|
1450
|
-
* model.show(1, 0) //显示第一楼层, 并且其他楼层透明度为 0
|
|
1451
1650
|
* ```
|
|
1452
1651
|
*/
|
|
1453
|
-
show(): void;
|
|
1454
|
-
|
|
1652
|
+
show(floorIndex?: number | null): void;
|
|
1653
|
+
/**
|
|
1654
|
+
* 获取模型边界线
|
|
1655
|
+
* @param sphere - 获取区域
|
|
1656
|
+
* @param threshold - 面片间夹角阈值
|
|
1657
|
+
* @returns 所有模型边界线
|
|
1658
|
+
*/
|
|
1659
|
+
getEdgesBySphere(sphere: THREE_2.Sphere, threshold?: number): THREE_2.Line3[];
|
|
1455
1660
|
/**
|
|
1456
1661
|
* 计算模型射线碰撞检测
|
|
1457
1662
|
* @param raycaster - THREE 射线对象
|
|
1458
1663
|
* @param floors - 和某一楼层做碰撞检测, 不传为和所有楼层做碰撞检测
|
|
1459
1664
|
* @returns 返回碰撞
|
|
1460
1665
|
*/
|
|
1461
|
-
intersectRaycaster(raycaster: THREE_2.Raycaster
|
|
1462
|
-
buildBVH(): void;
|
|
1666
|
+
intersectRaycaster(raycaster: THREE_2.Raycaster): Intersection[];
|
|
1463
1667
|
/**
|
|
1464
1668
|
* 加载模型
|
|
1465
|
-
* @param
|
|
1669
|
+
* @param work - work 的
|
|
1466
1670
|
* @param imageOptions - 图片参数
|
|
1467
1671
|
*/
|
|
1468
|
-
load(
|
|
1672
|
+
load(work: Work, options?: {
|
|
1673
|
+
networkSubscribe?: NetworkSubscribe;
|
|
1674
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
1675
|
+
textureOptions?: TextureOptions;
|
|
1676
|
+
}): Promise<void>;
|
|
1677
|
+
update(renderer: THREE_2.WebGLRenderer, camera: Camera, mode: Mode): void;
|
|
1469
1678
|
/**
|
|
1470
1679
|
* 析构函数
|
|
1471
1680
|
* @description
|
|
@@ -1477,45 +1686,31 @@ export declare class Model extends PBMContainer implements Subscribe<ModelEventT
|
|
|
1477
1686
|
export declare interface ModelControllerCustomInitArgs extends PanoramaLikeControllerCustomInitArgs {
|
|
1478
1687
|
}
|
|
1479
1688
|
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
* @description
|
|
1483
|
-
* 可以通过 `five.model.on(METHOD_NAME, METHOD)` 调用
|
|
1484
|
-
*/
|
|
1485
|
-
export declare interface ModelEventCallback extends ModelEventType {
|
|
1689
|
+
export declare interface ModelLodOptions {
|
|
1690
|
+
maxDepth?: number;
|
|
1486
1691
|
}
|
|
1487
1692
|
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
*/
|
|
1500
|
-
bvhLoaded(): void;
|
|
1501
|
-
/** 模型三角面片结构加载完成 */
|
|
1502
|
-
geometryLoaded(): void;
|
|
1503
|
-
/** 模型材质结构加载完成 */
|
|
1504
|
-
materialLoaded(): void;
|
|
1505
|
-
/** 模型加载完成 */
|
|
1506
|
-
loaded(): void;
|
|
1507
|
-
/**
|
|
1508
|
-
* 显示楼层改变
|
|
1509
|
-
* @param shownFloor - 显示的楼层
|
|
1510
|
-
*/
|
|
1511
|
-
shownFloorChange(shownFloor: number | null, totalFloorLength: number): void;
|
|
1512
|
-
/**
|
|
1513
|
-
* 内部错误
|
|
1514
|
-
* @param error - 错误对象
|
|
1515
|
-
*/
|
|
1516
|
-
error(error: Error): void;
|
|
1693
|
+
export declare type ModelMaterialValues = Pick<PBMParameters, 'pano0' | 'pano1' | 'modelAlpha' | 'progress' | 'useBlackTransition' | 'opacity' | 'constantColor' | 'useEDL' | 'pointShape' | 'pointColorType' | 'pointSizeType' | 'pointSize' | 'pointMinSize' | 'pointMaxSize' | 'pointSizeAdaptiveScale' | 'gradientTexture'>;
|
|
1694
|
+
|
|
1695
|
+
export declare type Models = Model[] & {
|
|
1696
|
+
needsRender: boolean;
|
|
1697
|
+
bounding: THREE_2.Box3;
|
|
1698
|
+
loaded: boolean;
|
|
1699
|
+
refined: boolean;
|
|
1700
|
+
intersectRaycaster(raycaster: THREE_2.Raycaster): Intersection[];
|
|
1701
|
+
setMaterial(values: Partial<ModelMaterialValues>): void;
|
|
1702
|
+
getMaterial(): ModelMaterialValues;
|
|
1703
|
+
update(renderer: THREE_2.WebGLRenderer, camera: Camera, mode: Mode): void;
|
|
1517
1704
|
};
|
|
1518
1705
|
|
|
1706
|
+
export declare interface MotionKeyframe<K extends string> {
|
|
1707
|
+
progress: number;
|
|
1708
|
+
value: MotionValue<K>;
|
|
1709
|
+
key?: string;
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
export declare type MotionValue<K extends string> = Record<K, number>;
|
|
1713
|
+
|
|
1519
1714
|
/**
|
|
1520
1715
|
* 点位移动参数
|
|
1521
1716
|
*/
|
|
@@ -1527,9 +1722,10 @@ export declare interface MovePanoOptions extends Partial<Omit<Pose, "offset">> {
|
|
|
1527
1722
|
* @description
|
|
1528
1723
|
* - `fly` 通过相机移动方式变化
|
|
1529
1724
|
* - `fade` 通过渐变方式变化
|
|
1725
|
+
* - `montage` 通过渐变穿插到黑屏方式变化
|
|
1530
1726
|
* - `instant` 通过插入黑屏方式变化
|
|
1531
1727
|
*/
|
|
1532
|
-
effect?: "fly" | "fade" | "instant";
|
|
1728
|
+
effect?: "fly" | "fade" | "montage" | "instant";
|
|
1533
1729
|
/**
|
|
1534
1730
|
* 运动耗时
|
|
1535
1731
|
* @description
|
|
@@ -1541,9 +1737,9 @@ export declare interface MovePanoOptions extends Partial<Omit<Pose, "offset">> {
|
|
|
1541
1737
|
/** 运动曲线函数 */
|
|
1542
1738
|
easing?: (k: number) => number;
|
|
1543
1739
|
/** 运动开始回调 */
|
|
1544
|
-
moveStartCallback?: (
|
|
1740
|
+
moveStartCallback?: (panoId: WorkPanoId, toPose: Pose) => void;
|
|
1545
1741
|
/** 运动结束回调 */
|
|
1546
|
-
moveEndCallback?: (
|
|
1742
|
+
moveEndCallback?: (panoId: WorkPanoId, pose: Pose) => void;
|
|
1547
1743
|
/**
|
|
1548
1744
|
* 运动被取消回调
|
|
1549
1745
|
* @description
|
|
@@ -1556,6 +1752,7 @@ export declare interface MovePanoOptions extends Partial<Omit<Pose, "offset">> {
|
|
|
1556
1752
|
}
|
|
1557
1753
|
|
|
1558
1754
|
export declare type NetWorkMeta = {
|
|
1755
|
+
origin: string;
|
|
1559
1756
|
source: string;
|
|
1560
1757
|
headers: {
|
|
1561
1758
|
[name: string]: string;
|
|
@@ -1566,7 +1763,23 @@ export declare type NetWorkMeta = {
|
|
|
1566
1763
|
size?: number;
|
|
1567
1764
|
};
|
|
1568
1765
|
|
|
1569
|
-
export declare
|
|
1766
|
+
export declare interface NetworkOptions {
|
|
1767
|
+
/** 超时时间 */
|
|
1768
|
+
timeout?: number;
|
|
1769
|
+
/** 请求代理 */
|
|
1770
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
1771
|
+
/** 网络消息追踪 */
|
|
1772
|
+
networkSubscribe?: NetworkSubscribe;
|
|
1773
|
+
/** 安全域名 */
|
|
1774
|
+
allowHosts?: string[];
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
export declare type NetworkResponse<T = any, E extends NetWorkMeta | NetWorkMeta[] = NetWorkMeta> = {
|
|
1778
|
+
body: T;
|
|
1779
|
+
meta: E;
|
|
1780
|
+
};
|
|
1781
|
+
|
|
1782
|
+
export declare type NetworkState = "ok" | "preload" | "error" | "proxy-error" | "timeout" | "forbidden";
|
|
1570
1783
|
|
|
1571
1784
|
export declare class NetworkSubscribe extends Subscribe<{
|
|
1572
1785
|
network(source: string, type: NetworkType, state: NetworkState, detail: string): void;
|
|
@@ -1577,22 +1790,22 @@ export declare type NetworkType = "XMLHttpRequest" | "Script" | "Image" | "Link"
|
|
|
1577
1790
|
|
|
1578
1791
|
export declare class PanoCircleMesh extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1579
1792
|
needsRender: boolean;
|
|
1580
|
-
private
|
|
1581
|
-
private
|
|
1582
|
-
private
|
|
1583
|
-
private ringMesh;
|
|
1584
|
-
private progressMesh;
|
|
1585
|
-
private ringRotateMotion;
|
|
1793
|
+
private currentStartTime;
|
|
1794
|
+
private currentMotion;
|
|
1795
|
+
private ringMotion;
|
|
1586
1796
|
private tapMotion;
|
|
1797
|
+
private loadingOpacityMotion;
|
|
1587
1798
|
private progressMotion;
|
|
1588
1799
|
private progressOpacityMotion;
|
|
1589
1800
|
private opacityMotion;
|
|
1801
|
+
private disableMotion;
|
|
1590
1802
|
progress: number;
|
|
1591
1803
|
opacity: number;
|
|
1592
1804
|
current: boolean;
|
|
1593
1805
|
loading: boolean;
|
|
1594
1806
|
disabled: boolean;
|
|
1595
|
-
|
|
1807
|
+
private panoMesh;
|
|
1808
|
+
constructor(options?: PanoCircleMeshOptions);
|
|
1596
1809
|
setProgress(progress: number): void;
|
|
1597
1810
|
setOpacity(opacity: number): void;
|
|
1598
1811
|
setCurrent(current: boolean): void;
|
|
@@ -1603,6 +1816,44 @@ export declare class PanoCircleMesh extends THREE_2.Object3D implements PanoCirc
|
|
|
1603
1816
|
dispose(): void;
|
|
1604
1817
|
}
|
|
1605
1818
|
|
|
1819
|
+
export declare class PanoCircleMeshCustom extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1820
|
+
needsRender: boolean;
|
|
1821
|
+
private currentStartTime;
|
|
1822
|
+
private currentMotion;
|
|
1823
|
+
private tapMotion;
|
|
1824
|
+
private loadingOpacityMotion;
|
|
1825
|
+
private progressMotion;
|
|
1826
|
+
private progressOpacityMotion;
|
|
1827
|
+
private opacityMotion;
|
|
1828
|
+
private disableMotion;
|
|
1829
|
+
progress: number;
|
|
1830
|
+
opacity: number;
|
|
1831
|
+
current: boolean;
|
|
1832
|
+
loading: boolean;
|
|
1833
|
+
disabled: boolean;
|
|
1834
|
+
private panoMesh;
|
|
1835
|
+
constructor(options?: PanoCircleMeshCustomOptions);
|
|
1836
|
+
setProgress(progress: number): void;
|
|
1837
|
+
setOpacity(opacity: number): void;
|
|
1838
|
+
setCurrent(current: boolean): void;
|
|
1839
|
+
setLoading(loading: boolean): void;
|
|
1840
|
+
setDisabled(disabled: boolean): void;
|
|
1841
|
+
tap(): Promise<void>;
|
|
1842
|
+
updateTime(time: number, deltaTime: number): void;
|
|
1843
|
+
dispose(): void;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
export declare interface PanoCircleMeshCustomOptions {
|
|
1847
|
+
scale?: number;
|
|
1848
|
+
color?: number;
|
|
1849
|
+
map?: THREE_2.Texture;
|
|
1850
|
+
mapAlpha?: number;
|
|
1851
|
+
borderWidth?: number;
|
|
1852
|
+
borderColor?: number;
|
|
1853
|
+
mapUseColor?: boolean;
|
|
1854
|
+
mapUseReverse?: boolean;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1606
1857
|
/**
|
|
1607
1858
|
* 地面提示点位接口
|
|
1608
1859
|
*
|
|
@@ -1636,6 +1887,43 @@ export declare interface PanoCircleMeshInterface extends THREE_2.Object3D {
|
|
|
1636
1887
|
dispose(): void;
|
|
1637
1888
|
}
|
|
1638
1889
|
|
|
1890
|
+
export declare interface PanoCircleMeshOptions {
|
|
1891
|
+
scale?: number;
|
|
1892
|
+
color?: number;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
export declare class PanoCircleMeshSolid extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1896
|
+
needsRender: boolean;
|
|
1897
|
+
private currentStartTime;
|
|
1898
|
+
private currentMotion;
|
|
1899
|
+
private tapMotion;
|
|
1900
|
+
private loadingOpacityMotion;
|
|
1901
|
+
private progressMotion;
|
|
1902
|
+
private progressOpacityMotion;
|
|
1903
|
+
private opacityMotion;
|
|
1904
|
+
private disableMotion;
|
|
1905
|
+
progress: number;
|
|
1906
|
+
opacity: number;
|
|
1907
|
+
current: boolean;
|
|
1908
|
+
loading: boolean;
|
|
1909
|
+
disabled: boolean;
|
|
1910
|
+
private panoMesh;
|
|
1911
|
+
constructor(options?: PanoCircleMeshSolidOptions);
|
|
1912
|
+
setProgress(progress: number): void;
|
|
1913
|
+
setOpacity(opacity: number): void;
|
|
1914
|
+
setCurrent(current: boolean): void;
|
|
1915
|
+
setLoading(loading: boolean): void;
|
|
1916
|
+
setDisabled(disabled: boolean): void;
|
|
1917
|
+
tap(): Promise<void>;
|
|
1918
|
+
updateTime(time: number, deltaTime: number): void;
|
|
1919
|
+
dispose(): void;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
export declare interface PanoCircleMeshSolidOptions {
|
|
1923
|
+
scale?: number;
|
|
1924
|
+
color?: number;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1639
1927
|
export declare interface PanoramaControllerCustomInitArgs extends PanoramaLikeControllerCustomInitArgs {
|
|
1640
1928
|
/** 最远可移动观察点距离 */
|
|
1641
1929
|
maxAccessibleDistance?: number;
|
|
@@ -1647,13 +1935,19 @@ export declare interface PanoramaControllerCustomInitArgs extends PanoramaLikeCo
|
|
|
1647
1935
|
*/
|
|
1648
1936
|
panoTapTriggerRadius?: number;
|
|
1649
1937
|
/** 地面观察点标识自定义创建器 */
|
|
1650
|
-
panoCircleMeshCreator?: () => PanoCircleMeshInterface;
|
|
1938
|
+
panoCircleMeshCreator?: (panoId: WorkPanoId) => PanoCircleMeshInterface;
|
|
1939
|
+
/**
|
|
1940
|
+
* 全景瓦片登记
|
|
1941
|
+
* @param fov - 当前 fov
|
|
1942
|
+
* @param viewSize - 当前绘制区域大小
|
|
1943
|
+
* @returns 返回瓦片等级
|
|
1944
|
+
*/
|
|
1651
1945
|
tileLevelForFov?: false | ((fov: number, viewSize: THREE_2.Vector2) => number);
|
|
1946
|
+
/** 是否开启光照自适应效果 */
|
|
1947
|
+
luminanceAdaptiveEffectEnable?: boolean;
|
|
1652
1948
|
}
|
|
1653
1949
|
|
|
1654
1950
|
export declare interface PanoramaLikeControllerCustomInitArgs {
|
|
1655
|
-
/** 默认相机偏航角 */
|
|
1656
|
-
defaultLongitude?: number;
|
|
1657
1951
|
/** 默认相机俯仰角 */
|
|
1658
1952
|
defaultLatitude?: number;
|
|
1659
1953
|
/** 最大相机俯仰角 */
|
|
@@ -1682,46 +1976,77 @@ export declare interface PanoramaLikeControllerCustomInitArgs {
|
|
|
1682
1976
|
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
1683
1977
|
* @returns - 签署过的 Work 数据结构
|
|
1684
1978
|
*/
|
|
1685
|
-
export declare function parseWork(obj: Work | LooseWork | string | any, options?: ParseWorkOptions
|
|
1979
|
+
export declare function parseWork(obj: Work | LooseWork | string | any, options?: ParseWorkOptions): Work;
|
|
1686
1980
|
|
|
1687
1981
|
export declare type ParseWorkOptions = {
|
|
1688
|
-
/**
|
|
1982
|
+
/** 重写资源前缀 */
|
|
1689
1983
|
baseURL?: string;
|
|
1690
|
-
/**
|
|
1984
|
+
/** 资源地址使用短地址 */
|
|
1691
1985
|
shortPath?: boolean;
|
|
1692
|
-
/**
|
|
1986
|
+
/** 资源使用 jsonp 方式发布 */
|
|
1693
1987
|
jsonp?: boolean;
|
|
1694
|
-
/**
|
|
1695
|
-
|
|
1988
|
+
/** 调试 */
|
|
1989
|
+
debug?: boolean;
|
|
1990
|
+
/** 位姿 */
|
|
1991
|
+
transform?: THREE_2.Matrix4 | number[];
|
|
1992
|
+
/** 可视区域 */
|
|
1993
|
+
viewerRequestVolume?: BoundingVolume | BoundingVolumeJson;
|
|
1994
|
+
/** 模型显示最大细化层级 */
|
|
1995
|
+
modelMaxLevelOfDetail?: number;
|
|
1996
|
+
/** 模型最大内存缓存 */
|
|
1997
|
+
modelMaxMemoryUsage?: number;
|
|
1998
|
+
/** 模型网络最大请求并发数 */
|
|
1999
|
+
modelMaxRequests?: number;
|
|
2000
|
+
/** 模型屏幕空间误差计算最大值 */
|
|
2001
|
+
modelMaxScreenSpaceError?: number;
|
|
1696
2002
|
};
|
|
1697
2003
|
|
|
1698
2004
|
/** PBM 模型组 */
|
|
1699
2005
|
export declare class PBMContainer extends THREE_2.Group {
|
|
2006
|
+
pbmMaterialParametersVersion: number;
|
|
1700
2007
|
/** 是否需要更新按需渲染 */
|
|
1701
2008
|
needsRender: boolean;
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
setTransparent(bool: boolean): void;
|
|
2009
|
+
/** 当前样式参数 */
|
|
2010
|
+
materialParameters: PBMParameters;
|
|
2011
|
+
cache: PBMMaterialReferenceCache;
|
|
2012
|
+
constructor();
|
|
1707
2013
|
/** 获取材质参数 */
|
|
1708
|
-
getMaterial(): PBMParameters
|
|
2014
|
+
getMaterial(): PBMParameters;
|
|
1709
2015
|
/** 设置材质参数 */
|
|
1710
2016
|
setMaterial(parameters: Partial<PBMParameters>): void;
|
|
2017
|
+
update(renderer: THREE_2.WebGLRenderer, camera: Camera): void;
|
|
1711
2018
|
/** 析构材质 */
|
|
1712
|
-
|
|
1713
|
-
/** 析构模型网格 */
|
|
1714
|
-
disposeGeometry(): void;
|
|
2019
|
+
dispose(): void;
|
|
1715
2020
|
}
|
|
1716
2021
|
|
|
1717
2022
|
/** PBM 模型组 */
|
|
1718
|
-
export declare class PBMGroup extends
|
|
1719
|
-
|
|
1720
|
-
|
|
2023
|
+
export declare class PBMGroup extends THREE_2.Group {
|
|
2024
|
+
needsRender: boolean;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
export declare class PBMMaterialReferenceCache {
|
|
2028
|
+
cache: Record<string, {
|
|
2029
|
+
count: number;
|
|
2030
|
+
value: any;
|
|
2031
|
+
dispose: () => void;
|
|
2032
|
+
}>;
|
|
2033
|
+
clear(): void;
|
|
2034
|
+
get<T>(key: string, create: () => {
|
|
2035
|
+
value: T;
|
|
2036
|
+
dispose: () => void;
|
|
2037
|
+
}): T;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
/** PBM 对象 */
|
|
2041
|
+
export declare class PBMMesh extends THREE_2.Mesh<THREE_2.BufferGeometry, PBMMeshMaterial[]> {
|
|
2042
|
+
/** 是否需要更新按需渲染 */
|
|
2043
|
+
needsRender: boolean;
|
|
1721
2044
|
}
|
|
1722
2045
|
|
|
1723
2046
|
/** PBM 材质 */
|
|
1724
|
-
export declare class
|
|
2047
|
+
export declare class PBMMeshMaterial extends THREE_2.ShaderMaterial implements PBMParameters {
|
|
2048
|
+
/** 更新版本 */
|
|
2049
|
+
pbmMaterialParametersVersion: number;
|
|
1725
2050
|
/** 起始点 */
|
|
1726
2051
|
pano0: PBMPanoPicture | null;
|
|
1727
2052
|
/** 结束点 */
|
|
@@ -1732,26 +2057,41 @@ export declare class PBMMaterial extends THREE_2.ShaderMaterial implements PBMPa
|
|
|
1732
2057
|
progress: number;
|
|
1733
2058
|
/** 全景图通过过度黑色混合 */
|
|
1734
2059
|
useBlackTransition: boolean;
|
|
1735
|
-
perspToOrtho: number;
|
|
1736
2060
|
/** 模型透明度 */
|
|
1737
2061
|
opacity: number;
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
/** PBM 对象 */
|
|
1743
|
-
export declare class PBMMesh extends THREE_2.Mesh<THREE_2.BufferGeometry, PBMMaterial[]> {
|
|
1744
|
-
/** 楼层序号 */
|
|
2062
|
+
/** 模型颜色*/
|
|
2063
|
+
constantColor: THREE_2.Vector3 | null;
|
|
2064
|
+
/** 楼层参数*/
|
|
1745
2065
|
floorIndex: number;
|
|
1746
|
-
/**
|
|
1747
|
-
|
|
2066
|
+
/** 对外模型裁切参数*/
|
|
2067
|
+
clippers: ClipperParameter[] | null;
|
|
2068
|
+
/** edl*/
|
|
2069
|
+
useEDL: boolean;
|
|
2070
|
+
/** 点云着色方式*/
|
|
2071
|
+
pointColorType: PBMPointColorType;
|
|
2072
|
+
/** 点云大小绘制方式*/
|
|
2073
|
+
pointSizeType: PBMPointSizeType;
|
|
2074
|
+
/** 点云形状*/
|
|
2075
|
+
pointShape: PBMPointShapeType;
|
|
2076
|
+
/** 点云基础大小*/
|
|
2077
|
+
pointSize: number;
|
|
2078
|
+
/** 自适应点云大小因子*/
|
|
2079
|
+
pointSizeAdaptiveScale: number;
|
|
2080
|
+
/** 点云最大尺寸*/
|
|
2081
|
+
pointMinSize: number;
|
|
2082
|
+
/** 点云最小尺寸*/
|
|
2083
|
+
pointMaxSize: number;
|
|
2084
|
+
/** 高程彩色图*/
|
|
2085
|
+
gradientTexture: THREE_2.Texture | null;
|
|
2086
|
+
constructor(parameters?: Partial<PBMParameters>);
|
|
2087
|
+
update(renderer: THREE_2.WebGLRenderer, camera: Camera, cache: PBMMaterialReferenceCache): void;
|
|
1748
2088
|
}
|
|
1749
2089
|
|
|
1750
2090
|
export declare interface PBMPanoPicture {
|
|
1751
2091
|
/** 起始点位全景图 */
|
|
1752
|
-
map: THREE_2.CubeTexture;
|
|
2092
|
+
map: THREE_2.CubeTexture | TileCubeTextureTarget;
|
|
1753
2093
|
/** 亮度增益 */
|
|
1754
|
-
luminanceMap: THREE_2.CubeTexture |
|
|
2094
|
+
luminanceMap: null | THREE_2.CubeTexture | TileCubeTextureTarget;
|
|
1755
2095
|
/** 起始点全景图变换矩阵 4x4 */
|
|
1756
2096
|
matrix: THREE_2.Matrix4;
|
|
1757
2097
|
}
|
|
@@ -1768,9 +2108,47 @@ export declare interface PBMParameters {
|
|
|
1768
2108
|
progress: number;
|
|
1769
2109
|
/** 全景图通过过度黑色混合 */
|
|
1770
2110
|
useBlackTransition: boolean;
|
|
1771
|
-
perspToOrtho: number;
|
|
1772
2111
|
/** 模型透明度 */
|
|
1773
2112
|
opacity: number;
|
|
2113
|
+
/** 楼层参数*/
|
|
2114
|
+
floorIndex: number;
|
|
2115
|
+
/** 模型裁切参数(工程侧调用)*/
|
|
2116
|
+
clippers: ClipperParameter[] | null;
|
|
2117
|
+
/** 模型颜色*/
|
|
2118
|
+
constantColor: THREE_2.Vector3 | null;
|
|
2119
|
+
/** 是否使用EDL*/
|
|
2120
|
+
useEDL: boolean;
|
|
2121
|
+
/** 点云形状*/
|
|
2122
|
+
pointShape: PBMPointShapeType;
|
|
2123
|
+
/** 点云着色方式*/
|
|
2124
|
+
pointColorType: PBMPointColorType;
|
|
2125
|
+
/** 点云大小绘制方式*/
|
|
2126
|
+
pointSizeType: PBMPointSizeType;
|
|
2127
|
+
/** 点云基础大小*/
|
|
2128
|
+
pointSize: number;
|
|
2129
|
+
/** 点云最大尺寸*/
|
|
2130
|
+
pointMinSize: number;
|
|
2131
|
+
/** 点云最小尺寸*/
|
|
2132
|
+
pointMaxSize: number;
|
|
2133
|
+
/** 自适应点云尺寸因子*/
|
|
2134
|
+
pointSizeAdaptiveScale: number;
|
|
2135
|
+
/** 高程彩色图*/
|
|
2136
|
+
gradientTexture: THREE_2.Texture | null;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
export declare enum PBMPointColorType {
|
|
2140
|
+
RGB = "rgb",
|
|
2141
|
+
ALTITUDE = "altitude"
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
export declare enum PBMPointShapeType {
|
|
2145
|
+
SQUARE = "square",
|
|
2146
|
+
CIRCLE = "circle"
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
export declare enum PBMPointSizeType {
|
|
2150
|
+
FIXED = "fixed",
|
|
2151
|
+
ADAPTIVE = "adaptive"
|
|
1774
2152
|
}
|
|
1775
2153
|
|
|
1776
2154
|
/**
|
|
@@ -1778,17 +2156,87 @@ export declare interface PBMParameters {
|
|
|
1778
2156
|
* [[include: coordinate.md]]
|
|
1779
2157
|
*/
|
|
1780
2158
|
export declare interface Pose {
|
|
1781
|
-
/** 相机俯仰角 */
|
|
1782
|
-
longitude: number;
|
|
1783
2159
|
/** 相机偏航角 */
|
|
2160
|
+
longitude: number;
|
|
2161
|
+
/** 相机俯仰角 */
|
|
1784
2162
|
latitude: number;
|
|
1785
2163
|
/** 相机可视角度(垂直)*/
|
|
1786
2164
|
fov: number;
|
|
1787
2165
|
/** 相机位置*/
|
|
1788
2166
|
offset: THREE_2.Vector3;
|
|
2167
|
+
/** 相机距离 */
|
|
2168
|
+
distance: number;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
export declare const PROXY_CONTROLLER_EVENT_NAMES: readonly ["cameraDirectionUpdate", "cameraUpdate", "cameraPositionUpdate", "panoSelected", "moveToPano", "moveToPanoCanceled", "panoWillArrive", "movingToPano", "panoArrived", "panoWillLoad", "panoLoaded", "panoLoadError", "initAnimationEnded", "initAnimationWillStart", "wantsGesture", "gesture", "wantsTapGesture", "tapGesture", "wantsPressGesture", "pressGesture", "wantsPanGesture", "wantsInteriaPan", "panGesture", "interiaPan", "wantsPinchGesture", "pinchGesture", "wantsMouseWheel", "mouseWheel", "wantsShowIntersectionOnModel", "intersectionOnModelUpdate", "intersectionHidden", "textureStartLoad", "textureLoading", "textureAbort", "textureLoaded", "textureError", "webXRSessionStart", "webXRSessionEnd", "webXRControllerEvent"];
|
|
2172
|
+
|
|
2173
|
+
export declare class RegionBoundingVolume implements BoundingVolume {
|
|
2174
|
+
type: "regin";
|
|
2175
|
+
west: number;
|
|
2176
|
+
south: number;
|
|
2177
|
+
east: number;
|
|
2178
|
+
north: number;
|
|
2179
|
+
minHeight: number;
|
|
2180
|
+
maxHeight: number;
|
|
2181
|
+
constructor();
|
|
2182
|
+
fromJson({ region }: RegionBoundingVolumeJson): this;
|
|
2183
|
+
toJson(): RegionBoundingVolumeJson;
|
|
2184
|
+
copy(regionBoundingVolume: RegionBoundingVolume): this;
|
|
2185
|
+
clone(): RegionBoundingVolume;
|
|
2186
|
+
getBoundingBox(target: THREE_2.Box3): THREE_2.Box3;
|
|
2187
|
+
toGeometry(): THREE_2.BufferGeometry;
|
|
2188
|
+
applyMatrix4(matrix: THREE_2.Matrix4): this;
|
|
2189
|
+
getCenter(result: THREE_2.Vector3): THREE_2.Vector3;
|
|
2190
|
+
distanceTo(point: THREE_2.Vector3): number;
|
|
2191
|
+
distanceSquaredTo(point: THREE_2.Vector3): number;
|
|
2192
|
+
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
2193
|
+
intersectRay(ray: THREE_2.Ray): boolean;
|
|
1789
2194
|
}
|
|
1790
2195
|
|
|
1791
|
-
export declare
|
|
2196
|
+
export declare type RegionBoundingVolumeJson = {
|
|
2197
|
+
region: number[];
|
|
2198
|
+
};
|
|
2199
|
+
|
|
2200
|
+
export declare type RequestResult = null | {
|
|
2201
|
+
done: () => void;
|
|
2202
|
+
};
|
|
2203
|
+
|
|
2204
|
+
/**
|
|
2205
|
+
* Used to issue a request, without having them "deeply queued" by the browser.
|
|
2206
|
+
* @todo - Track requests globally, across multiple servers
|
|
2207
|
+
*/
|
|
2208
|
+
export declare class RequestScheduler<Identiy> {
|
|
2209
|
+
static DEFAULT_MAX_REQUESTS: number;
|
|
2210
|
+
maxRequests: number;
|
|
2211
|
+
private activeRequests;
|
|
2212
|
+
/** Tracks the number of active requests and prioritizes/cancels queued requests. */
|
|
2213
|
+
private requestQueue;
|
|
2214
|
+
private requestMap;
|
|
2215
|
+
private deferred;
|
|
2216
|
+
constructor();
|
|
2217
|
+
/**
|
|
2218
|
+
* Called by an application that wants to issue a request, without having it deeply queued by the browser
|
|
2219
|
+
*
|
|
2220
|
+
* When the returned promise resolved, it is OK for the application to issue a request.
|
|
2221
|
+
* The promise resolves to an object that contains a `done` method.
|
|
2222
|
+
* When the application's request has completed (or failed), the application must call the `done` function
|
|
2223
|
+
*
|
|
2224
|
+
* @param identiy - Identiy
|
|
2225
|
+
* @param getPriority - will be called when request "slots" open up, allowing the caller to update priority or cancel the request Highest priority executes first, priority less than 0 cancels the request
|
|
2226
|
+
* @returns a promise resolves to a object (with a `done` field) when the request can be issued without queueing, resolves to `null` if the request has been cancelled (by the callback return less than 0). In this case the application should not issue the request
|
|
2227
|
+
*/
|
|
2228
|
+
scheduleRequest(identiy: Identiy, getPriority: (identiy: Identiy) => number): Promise<RequestResult>;
|
|
2229
|
+
reset(): void;
|
|
2230
|
+
private issueRequest;
|
|
2231
|
+
/** We check requests asynchronously, to prevent multiple updates */
|
|
2232
|
+
private issueNewRequests;
|
|
2233
|
+
/** Refresh all requests */
|
|
2234
|
+
private issueNewRequestsAsync;
|
|
2235
|
+
/** Ensure all requests have updated priorities, and that no longer valid requests are cancelled */
|
|
2236
|
+
private updateAllRequests;
|
|
2237
|
+
/** Update a single request by calling the callback */
|
|
2238
|
+
private updateRequest;
|
|
2239
|
+
}
|
|
1792
2240
|
|
|
1793
2241
|
/** Five 场景*/
|
|
1794
2242
|
export declare class Scene extends THREE_2.Scene {
|
|
@@ -1814,6 +2262,29 @@ export declare interface Scissor {
|
|
|
1814
2262
|
height: number;
|
|
1815
2263
|
}
|
|
1816
2264
|
|
|
2265
|
+
export declare class SphereBoundingVolume implements BoundingVolume {
|
|
2266
|
+
type: "sphere";
|
|
2267
|
+
center: THREE_2.Vector3;
|
|
2268
|
+
radius: number;
|
|
2269
|
+
constructor();
|
|
2270
|
+
fromJson({ sphere }: SphereBoundingVolumeJson): this;
|
|
2271
|
+
toJson(): SphereBoundingVolumeJson;
|
|
2272
|
+
copy(sphereBoundingVolume: SphereBoundingVolume): this;
|
|
2273
|
+
clone(): SphereBoundingVolume;
|
|
2274
|
+
getBoundingBox(target: THREE_2.Box3): THREE_2.Box3;
|
|
2275
|
+
toGeometry(): THREE_2.BufferGeometry;
|
|
2276
|
+
applyMatrix4(matrix: THREE_2.Matrix4): this;
|
|
2277
|
+
getCenter(result: THREE_2.Vector3): THREE_2.Vector3;
|
|
2278
|
+
distanceSquaredTo(point: THREE_2.Vector3): number;
|
|
2279
|
+
distanceTo(point: THREE_2.Vector3): number;
|
|
2280
|
+
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
2281
|
+
intersectRay(ray: THREE_2.Ray): boolean;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
export declare type SphereBoundingVolumeJson = {
|
|
2285
|
+
sphere: number[];
|
|
2286
|
+
};
|
|
2287
|
+
|
|
1817
2288
|
/**
|
|
1818
2289
|
* 状态
|
|
1819
2290
|
* @description
|
|
@@ -1828,6 +2299,8 @@ export declare interface State extends Pose {
|
|
|
1828
2299
|
mode: Mode;
|
|
1829
2300
|
/** 观察点序号 */
|
|
1830
2301
|
panoIndex: number;
|
|
2302
|
+
/** 观察点id */
|
|
2303
|
+
panoId: string;
|
|
1831
2304
|
}
|
|
1832
2305
|
|
|
1833
2306
|
/**
|
|
@@ -1884,6 +2357,13 @@ export declare class Subscribe<T extends SubscribeEventMap> {
|
|
|
1884
2357
|
* @template K - 预设的监听事件名称
|
|
1885
2358
|
*/
|
|
1886
2359
|
emit<K extends keyof T>(name: K, ...data: Parameters<T[K]>): boolean;
|
|
2360
|
+
/**
|
|
2361
|
+
* 等待事件
|
|
2362
|
+
* @param name - 事件类型
|
|
2363
|
+
* @returns 触发事件的数据
|
|
2364
|
+
* @template K - 预设的监听事件名称
|
|
2365
|
+
*/
|
|
2366
|
+
waitUnitl<K extends keyof T>(name: K): Promise<Parameters<T[K]>>;
|
|
1887
2367
|
}
|
|
1888
2368
|
|
|
1889
2369
|
export declare type SubscribeEventMap = {
|
|
@@ -1906,6 +2386,52 @@ export declare namespace SubscribeMixinType {
|
|
|
1906
2386
|
export interface emit<T extends SubscribeEventMap> {
|
|
1907
2387
|
<K extends keyof T>(name: K, ...data: Parameters<T[K]>): boolean;
|
|
1908
2388
|
}
|
|
2389
|
+
export interface waitUnitl<T extends SubscribeEventMap> {
|
|
2390
|
+
<K extends keyof T>(name: K): Promise<Parameters<T[K]>>;
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
export declare class TextureLoader {
|
|
2395
|
+
loadTexture(source: string, options?: {
|
|
2396
|
+
imageURL?: {
|
|
2397
|
+
transform?: (source: string, options: ImageURLOptions) => string;
|
|
2398
|
+
options?: ImageURLOptions;
|
|
2399
|
+
};
|
|
2400
|
+
flipY?: boolean;
|
|
2401
|
+
format?: THREE_2.PixelFormat;
|
|
2402
|
+
minFilter?: THREE_2.TextureFilter;
|
|
2403
|
+
magFilter?: THREE_2.TextureFilter;
|
|
2404
|
+
wrapS?: THREE_2.Wrapping;
|
|
2405
|
+
wrapT?: THREE_2.Wrapping;
|
|
2406
|
+
maxSize?: THREE_2.Vector2;
|
|
2407
|
+
viaAjax?: boolean;
|
|
2408
|
+
} & NetworkOptions, onLoad?: (response: NetworkResponse<THREE_2.Texture>) => void, onError?: (error: Error) => void, onProgress?: (percent: number) => void, renderer?: THREE_2.WebGLRenderer): Promise<NetworkResponse<THREE_2.Texture>>;
|
|
2409
|
+
loadCubeTexture(sources: WorkCubeImage, options: {
|
|
2410
|
+
imageURL?: {
|
|
2411
|
+
transform?: (source: string, options: ImageURLOptions) => string;
|
|
2412
|
+
options?: ImageURLOptions;
|
|
2413
|
+
};
|
|
2414
|
+
format?: THREE_2.PixelFormat;
|
|
2415
|
+
minFilter?: THREE_2.TextureFilter;
|
|
2416
|
+
magFilter?: THREE_2.TextureFilter;
|
|
2417
|
+
wrapS?: THREE_2.Wrapping;
|
|
2418
|
+
wrapT?: THREE_2.Wrapping;
|
|
2419
|
+
viaAjax?: boolean;
|
|
2420
|
+
} & NetworkOptions, onLoad: (response: NetworkResponse<THREE_2.CubeTexture, NetWorkMeta[]>) => void, onError: (error: Error) => void, onProgress: (percent: number) => void, renderer: THREE_2.WebGLRenderer): Promise<NetworkResponse<THREE_2.CubeTexture, NetWorkMeta[]>>;
|
|
2421
|
+
loadTiledCubeTexture(sources: WorkCubeImage, tileSources: WorkTile[], options: {
|
|
2422
|
+
tileImageSize?: number;
|
|
2423
|
+
tileMaxLevel?: number;
|
|
2424
|
+
imageURL?: {
|
|
2425
|
+
transform?: (source: string, options: ImageURLOptions) => string;
|
|
2426
|
+
options?: ImageURLOptions;
|
|
2427
|
+
};
|
|
2428
|
+
format?: THREE_2.PixelFormat;
|
|
2429
|
+
minFilter?: THREE_2.TextureFilter;
|
|
2430
|
+
magFilter?: THREE_2.TextureFilter;
|
|
2431
|
+
wrapS?: THREE_2.Wrapping;
|
|
2432
|
+
wrapT?: THREE_2.Wrapping;
|
|
2433
|
+
viaAjax?: boolean;
|
|
2434
|
+
} & NetworkOptions, onLoad: (response: NetworkResponse<TileCubeTextureTarget, NetWorkMeta[]>) => void, onError: (error: Error) => void, onProgress: (percent: number) => void, renderer: THREE_2.WebGLRenderer): Promise<NetworkResponse<TileCubeTextureTarget, NetWorkMeta[]>>;
|
|
1909
2435
|
}
|
|
1910
2436
|
|
|
1911
2437
|
/**
|
|
@@ -1927,19 +2453,352 @@ export declare interface TextureOptions {
|
|
|
1927
2453
|
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
1928
2454
|
/** 针对 textureOptions 是否自动通过模型贴图的数量计算需要的模型贴图的尺寸 默认 true */
|
|
1929
2455
|
autoResize?: boolean;
|
|
2456
|
+
/** 锐化参数 海外不支持 */
|
|
2457
|
+
sharpen?: number;
|
|
2458
|
+
mappings?: ImageURLMappings;
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
export declare class Tile {
|
|
2462
|
+
id: string;
|
|
2463
|
+
tileset: Tileset;
|
|
2464
|
+
parent: Tile | null;
|
|
2465
|
+
geometricError: number;
|
|
2466
|
+
type: 'SCENEGRAPH' | 'EMPTY' | 'TILESET' | 'MESH';
|
|
2467
|
+
content: {
|
|
2468
|
+
uri: string;
|
|
2469
|
+
group?: number;
|
|
2470
|
+
boundingVolume?: BoundingVolume;
|
|
2471
|
+
data?: TileContentData;
|
|
2472
|
+
loadState: 'LOADING' | 'UNLOADED' | 'READY' | 'FAILED';
|
|
2473
|
+
byteLength: number;
|
|
2474
|
+
} | null;
|
|
2475
|
+
extras: Record<string, any>;
|
|
2476
|
+
refine: TileHeader['refine'];
|
|
2477
|
+
boundingVolume?: BoundingVolume;
|
|
2478
|
+
viewerRequestVolume?: BoundingVolume;
|
|
2479
|
+
transform: THREE_2.Matrix4;
|
|
2480
|
+
children: Tile[];
|
|
2481
|
+
state: {
|
|
2482
|
+
visible: boolean;
|
|
2483
|
+
frameNumber: number;
|
|
2484
|
+
selectedFrameNumber: number;
|
|
2485
|
+
requestedFrameNumber: number;
|
|
2486
|
+
touchedFrameNumber: number;
|
|
2487
|
+
selectionDepth: number;
|
|
2488
|
+
centerZDepth: number;
|
|
2489
|
+
shouldRefine: boolean;
|
|
2490
|
+
distanceToCamera: number;
|
|
2491
|
+
screenSpaceError: number;
|
|
2492
|
+
inRequestVolume: boolean;
|
|
2493
|
+
visibilityPlaneMask: number;
|
|
2494
|
+
};
|
|
2495
|
+
constructor(id: string, header: TileHeader, tileset: Tileset, parent?: Tile);
|
|
2496
|
+
updateState(frameState: TilesetFrameState): void;
|
|
2497
|
+
get selected(): boolean;
|
|
2498
|
+
get hasChildren(): boolean;
|
|
2499
|
+
get siblingIndex(): number;
|
|
2500
|
+
get hasTilesetContent(): boolean;
|
|
2501
|
+
get hasRenderContent(): boolean;
|
|
2502
|
+
get contentAvailable(): boolean;
|
|
2503
|
+
get hasUnloadedContent(): boolean;
|
|
2504
|
+
get hasEmptyContent(): boolean;
|
|
2505
|
+
get contentReady(): boolean;
|
|
2506
|
+
get contentByteLength(): number;
|
|
2507
|
+
loadContent(): Promise<boolean>;
|
|
2508
|
+
unloadContent(): boolean;
|
|
2509
|
+
getScreenSpaceError(frameState: TilesetFrameState, distanceToCamera: number, useParentGeometricError: boolean): number;
|
|
2510
|
+
getPriority(): number;
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
export declare class Tile3DModel extends THREE_2.Object3D {
|
|
2514
|
+
static DEFAULT_MAX_LEVEL_OF_DETAIL: number;
|
|
2515
|
+
static DEFAULT_MAX_MEMORY_USAGE: number;
|
|
2516
|
+
static DEFAULT_MAX_SCREEN_SPACE_ERROR: number;
|
|
2517
|
+
static DEFAULT_MAX_REQUESTS: number;
|
|
2518
|
+
workCode: string;
|
|
2519
|
+
tileset: Tileset;
|
|
2520
|
+
maxLevelOfDetail: number;
|
|
2521
|
+
boundingBox: THREE_2.Box3;
|
|
2522
|
+
needsRefined: boolean;
|
|
2523
|
+
refined: boolean;
|
|
2524
|
+
loaded: boolean;
|
|
2525
|
+
disposed: boolean;
|
|
2526
|
+
needsRender: boolean;
|
|
2527
|
+
lastRefineTime: number;
|
|
2528
|
+
private nodeGroup;
|
|
2529
|
+
private debugBoundingGroup;
|
|
2530
|
+
private nodes;
|
|
2531
|
+
private debugBoundings;
|
|
2532
|
+
private unloadTileQueue;
|
|
2533
|
+
constructor(workCode: string, tilesetHeader: TilesetHeader, options: Partial<Tile3DModelLoaderOptions>);
|
|
2534
|
+
get debug(): boolean;
|
|
2535
|
+
set debug(value: boolean);
|
|
2536
|
+
get maxMemoryUsage(): number;
|
|
2537
|
+
set maxMemoryUsage(value: number);
|
|
2538
|
+
get viewDistanceScale(): number;
|
|
2539
|
+
set viewDistanceScale(value: number);
|
|
2540
|
+
get maxRequests(): number;
|
|
2541
|
+
set maxRequests(value: number);
|
|
2542
|
+
get maxScreenSpaceError(): number;
|
|
2543
|
+
set maxScreenSpaceError(value: number);
|
|
2544
|
+
loadContent(tile: Tile, options: {
|
|
2545
|
+
allowHosts?: string[];
|
|
2546
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
2547
|
+
networkSubscribe?: NetworkSubscribe;
|
|
2548
|
+
}): Promise<boolean>;
|
|
2549
|
+
intersectRaycaster(raycaster: THREE_2.Raycaster): Intersection[];
|
|
2550
|
+
update(renderer: THREE_2.WebGLRenderer, camera: Camera): void;
|
|
2551
|
+
dispose(): void;
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
/** Advanced loader options */
|
|
2555
|
+
export declare interface Tile3DModelLoaderOptions {
|
|
2556
|
+
resourcePath: string;
|
|
2557
|
+
allowHosts?: string[];
|
|
2558
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
2559
|
+
networkSubscribe?: NetworkSubscribe;
|
|
2560
|
+
onError?: (error: Error) => void;
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
export declare type TileContentData = {
|
|
2564
|
+
type: 'b3dm' | 'pnts' | 'at3d' | 'pbm';
|
|
2565
|
+
byteLength: number;
|
|
2566
|
+
uri: string;
|
|
2567
|
+
object: TileNode;
|
|
2568
|
+
};
|
|
2569
|
+
|
|
2570
|
+
export declare interface TileCubeNode {
|
|
2571
|
+
level: number;
|
|
2572
|
+
face: "up" | "down" | "left" | "right" | "front" | "back";
|
|
2573
|
+
position: THREE_2.Vector2;
|
|
2574
|
+
size: number;
|
|
2575
|
+
box: THREE_2.Box3;
|
|
2576
|
+
children: TileCubeNode[];
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
export declare class TileCubeTextureTarget {
|
|
2580
|
+
private tileTree;
|
|
2581
|
+
private tileSources;
|
|
2582
|
+
private options;
|
|
2583
|
+
private renderer;
|
|
2584
|
+
name: string;
|
|
2585
|
+
needsRender: boolean;
|
|
2586
|
+
private disposed;
|
|
2587
|
+
private loadedCubeNodes;
|
|
2588
|
+
private loadingCubeNodes;
|
|
2589
|
+
private baseCubeTexture;
|
|
2590
|
+
private _cubeRenderTarget;
|
|
2591
|
+
private textures;
|
|
2592
|
+
constructor(baseCubeTexture: THREE_2.CubeTexture, tileTree: TileCubeTree, tileSources: WorkTile[], options: {
|
|
2593
|
+
textureSize: number;
|
|
2594
|
+
tileImageSize: number;
|
|
2595
|
+
textureLoader: TextureLoader;
|
|
2596
|
+
imageURL?: {
|
|
2597
|
+
transform?: (source: string, options: ImageURLOptions) => string;
|
|
2598
|
+
options?: ImageURLOptions;
|
|
2599
|
+
};
|
|
2600
|
+
format?: THREE_2.PixelFormat;
|
|
2601
|
+
minFilter?: THREE_2.TextureFilter;
|
|
2602
|
+
magFilter?: THREE_2.TextureFilter;
|
|
2603
|
+
wrapS?: THREE_2.Wrapping;
|
|
2604
|
+
wrapT?: THREE_2.Wrapping;
|
|
2605
|
+
} & NetworkOptions, renderer: THREE_2.WebGLRenderer);
|
|
2606
|
+
get cubeRenderTarget(): THREE_2.WebGLCubeRenderTarget | null;
|
|
2607
|
+
set cubeRenderTarget(cubeRenderTarget: THREE_2.WebGLCubeRenderTarget | null);
|
|
2608
|
+
private requestTile;
|
|
2609
|
+
update(frustum: THREE_2.Frustum, level: number): void;
|
|
2610
|
+
get tilePending(): number;
|
|
2611
|
+
get texture(): THREE_2.Texture;
|
|
2612
|
+
dispose(): void;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
export declare interface TileCubeTree {
|
|
2616
|
+
children: TileCubeNode[];
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
export declare interface TileHeader {
|
|
2620
|
+
content?: {
|
|
2621
|
+
uri: string;
|
|
2622
|
+
group?: number;
|
|
2623
|
+
boundingVolume?: BoundingVolumeJson;
|
|
2624
|
+
};
|
|
2625
|
+
geometricError: number;
|
|
2626
|
+
refine?: "REPLACE" | "ADD";
|
|
2627
|
+
boundingVolume?: BoundingVolumeJson;
|
|
2628
|
+
viewerRequestVolume?: BoundingVolumeJson;
|
|
2629
|
+
transform?: number[];
|
|
2630
|
+
children?: TileHeader[];
|
|
2631
|
+
extras?: Record<string, any>;
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
export declare class TileNode extends THREE_2.Group {
|
|
2635
|
+
bvhTree: BVH | undefined;
|
|
2636
|
+
objType: 'mesh' | 'points';
|
|
2637
|
+
constructor(obj: THREE_2.Object3D, objType: 'mesh' | 'points');
|
|
2638
|
+
buildBvhTree(): void;
|
|
2639
|
+
intersectRaycaster(raycaster: THREE_2.Raycaster): Intersection[];
|
|
2640
|
+
dispose(): void;
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
export declare class Tileset {
|
|
2644
|
+
static DEFAULT_VIEW_DISTANCE_SCALE: number;
|
|
2645
|
+
static DEFAULT_MAX_MEMORY_USAGE: number;
|
|
2646
|
+
static DEFAULT_MAX_SCREEN_SPACE_ERROR: number;
|
|
2647
|
+
static DEFAULT_MAX_REQUESTS: number;
|
|
2648
|
+
asset: {
|
|
2649
|
+
version: string;
|
|
2650
|
+
tilesetVersion: string;
|
|
2651
|
+
gltfUpAxis: "X" | "Y" | "Z";
|
|
2652
|
+
};
|
|
2653
|
+
id: string;
|
|
2654
|
+
frameNumber: number;
|
|
2655
|
+
properties: Record<string, any>;
|
|
2656
|
+
options: TilesetOptions;
|
|
2657
|
+
root: Tile;
|
|
2658
|
+
transfrom: THREE_2.Matrix4;
|
|
2659
|
+
geometricError: number;
|
|
2660
|
+
traverser: TilesetTraverser;
|
|
2661
|
+
cache: TilesetCache;
|
|
2662
|
+
requestScheduler: RequestScheduler<string>;
|
|
2663
|
+
private memoryUsageInBytes;
|
|
2664
|
+
maxMemoryUsage: number;
|
|
2665
|
+
viewDistanceScale: number;
|
|
2666
|
+
tiles: Map<string, Tile>;
|
|
2667
|
+
private pendingCount;
|
|
2668
|
+
constructor(id: string, header: TilesetHeader, options: TilesetOptions);
|
|
2669
|
+
get maxRequests(): number;
|
|
2670
|
+
set maxRequests(value: number);
|
|
2671
|
+
get maxScreenSpaceError(): number;
|
|
2672
|
+
set maxScreenSpaceError(value: number);
|
|
2673
|
+
get selectedTiles(): Map<string, Tile>;
|
|
2674
|
+
get needsRefinedTiles(): Map<string, Tile>;
|
|
2675
|
+
/** Release resources */
|
|
2676
|
+
reset(): void;
|
|
2677
|
+
/** Is the tileset loaded (update needs to have been called at least once) */
|
|
2678
|
+
isLoaded(): boolean;
|
|
2679
|
+
/**
|
|
2680
|
+
* The callback to post-process tiles after traversal procedure
|
|
2681
|
+
* @param frameState - frame state for tile culling
|
|
2682
|
+
*/
|
|
2683
|
+
private onTraversalEnd;
|
|
2684
|
+
loadTile(tile: Tile): void;
|
|
2685
|
+
unloadTile(tile: Tile): void;
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
export declare class TilesetCache {
|
|
2689
|
+
private cacheNodeMap;
|
|
2690
|
+
private list;
|
|
2691
|
+
private sentinel;
|
|
2692
|
+
constructor();
|
|
2693
|
+
reset(): void;
|
|
2694
|
+
touch(tile: Tile): void;
|
|
2695
|
+
add(tile: Tile, addCallback?: (tile: Tile) => void): void;
|
|
2696
|
+
unloadTile(tile: Tile, unloadCallback?: (tile: Tile) => void): void;
|
|
2697
|
+
unloadTiles(isOverMemory: () => boolean, unloadCallback?: (tile: Tile) => void): void;
|
|
2698
|
+
toArray(): Tile[];
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2701
|
+
export declare type TilesetFrameState = {
|
|
2702
|
+
camera: {
|
|
2703
|
+
position: THREE.Vector3;
|
|
2704
|
+
direction: THREE.Vector3;
|
|
2705
|
+
up: THREE.Vector3;
|
|
2706
|
+
};
|
|
2707
|
+
height: number;
|
|
2708
|
+
cullingVolume: CullingVolume;
|
|
2709
|
+
frameNumber: number;
|
|
2710
|
+
sseDenominator: number;
|
|
2711
|
+
maxLevelOfDetail: number;
|
|
2712
|
+
};
|
|
2713
|
+
|
|
2714
|
+
export declare interface TilesetHeader {
|
|
2715
|
+
asset: {
|
|
2716
|
+
version: string;
|
|
2717
|
+
tilesetVersion?: string;
|
|
2718
|
+
gltfUpAxis?: "X" | "Y" | "Z";
|
|
2719
|
+
};
|
|
2720
|
+
properties?: Record<string, any>;
|
|
2721
|
+
geometricError: number;
|
|
2722
|
+
root: TileHeader;
|
|
2723
|
+
}
|
|
2724
|
+
|
|
2725
|
+
export declare interface TilesetOptions {
|
|
2726
|
+
onTileLoad: (tile: Tile) => any;
|
|
2727
|
+
onTileUnload: (tile: Tile) => any;
|
|
2728
|
+
onTileError: (tile: Tile, error: Error) => any;
|
|
2729
|
+
contentLoader: (tile: Tile) => Promise<boolean>;
|
|
2730
|
+
allowHosts?: string[];
|
|
2731
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
2732
|
+
networkSubscribe?: NetworkSubscribe;
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
export declare class TilesetTraverser {
|
|
2736
|
+
static DEFAULT_SKIP_LEVEL_OF_DETAIL: boolean;
|
|
2737
|
+
static DEFAULT_LOAD_SIBLINGS: boolean;
|
|
2738
|
+
static DEFAULT_MAX_SCREEN_SPACE_ERROR: number;
|
|
2739
|
+
root: Tile | null;
|
|
2740
|
+
loadSiblings: boolean;
|
|
2741
|
+
skipLevelOfDetail: boolean;
|
|
2742
|
+
maxScreenSpaceError: number;
|
|
2743
|
+
onTraversalEnd: (frameState: TilesetFrameState) => any;
|
|
2744
|
+
requestedTiles: Map<string, Tile>;
|
|
2745
|
+
selectedTiles: Map<string, Tile>;
|
|
2746
|
+
needsRefinedTiles: Map<string, Tile>;
|
|
2747
|
+
emptyTiles: Map<string, Tile>;
|
|
2748
|
+
private _traversalStack;
|
|
2749
|
+
private _emptyTraversalStack;
|
|
2750
|
+
constructor(onTraversalEnd: (frameState: TilesetFrameState) => any);
|
|
2751
|
+
traverse(root: Tile, frameState: TilesetFrameState): void;
|
|
2752
|
+
reset(): void;
|
|
2753
|
+
private executeTraversal;
|
|
2754
|
+
private updateChildTiles;
|
|
2755
|
+
private updateAndPushChildren;
|
|
2756
|
+
updateTile(tile: Tile, frameState: TilesetFrameState): void;
|
|
2757
|
+
selectTile(tile: Tile, frameState: TilesetFrameState): void;
|
|
2758
|
+
loadTile(tile: Tile, frameNumber: number): void;
|
|
2759
|
+
touchTile(tile: Tile, frameState: TilesetFrameState): void;
|
|
2760
|
+
private canTraverse;
|
|
2761
|
+
private shouldLoadTile;
|
|
2762
|
+
private shouldSelectTile;
|
|
2763
|
+
private shouldRefine;
|
|
2764
|
+
private updateTileVisibility;
|
|
2765
|
+
private meetsScreenSpaceErrorEarly;
|
|
2766
|
+
private compareDistanceToCamera;
|
|
2767
|
+
private executeEmptyTraversal;
|
|
1930
2768
|
}
|
|
1931
2769
|
|
|
1932
2770
|
export declare interface TopviewControllerCustomInitArgs extends Omit<FloorplanControllerCustomInitArgs, "defaultLongitude" | "defaultLatitude" | "maxLatitude" | "minLatitude"> {
|
|
1933
2771
|
}
|
|
1934
2772
|
|
|
2773
|
+
export declare enum VolumePlaneIntersect {
|
|
2774
|
+
Outside = -1,
|
|
2775
|
+
Intersecting = 0,
|
|
2776
|
+
Inside = 1
|
|
2777
|
+
}
|
|
2778
|
+
|
|
1935
2779
|
export declare interface VRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
1936
2780
|
}
|
|
1937
2781
|
|
|
2782
|
+
export declare type WebXRControllerKey = 'A' | 'B' | 'X' | 'Y' | 'RightTrigger' | 'RightPinch' | 'LeftTrigger' | 'LeftPinch' | 'LeftAxesLeft' | 'LeftAxesRight' | 'LeftAxesUp' | 'LeftAxesDown' | 'RightAxesLeft' | 'RightAxesRight' | 'RightAxesUp' | 'RightAxesDown';
|
|
2783
|
+
|
|
2784
|
+
export declare interface WebXRControllerParams {
|
|
2785
|
+
raycaster: THREE_2.Raycaster[];
|
|
2786
|
+
}
|
|
2787
|
+
|
|
2788
|
+
export declare type WebXRControllerType = 'tap' | 'press' | 'axes';
|
|
2789
|
+
|
|
2790
|
+
export declare type WebXREventTypes = {
|
|
2791
|
+
/** WebXR模式开始,session完成坐标系设置*/
|
|
2792
|
+
webXRSessionStart(): void;
|
|
2793
|
+
/** WebXR模式结束,销毁session*/
|
|
2794
|
+
webXRSessionEnd(): void;
|
|
2795
|
+
};
|
|
2796
|
+
|
|
1938
2797
|
export declare class Work {
|
|
1939
2798
|
/** 名称 */
|
|
1940
2799
|
name: string;
|
|
1941
2800
|
/** 编号 */
|
|
1942
|
-
workCode:
|
|
2801
|
+
workCode: WorkCode;
|
|
1943
2802
|
/** 允许访问的安全域名 */
|
|
1944
2803
|
allowHosts: string[];
|
|
1945
2804
|
/** 过期时间 */
|
|
@@ -1952,12 +2811,26 @@ export declare class Work {
|
|
|
1952
2811
|
observers: WorkObserver[];
|
|
1953
2812
|
/** 数据签发人 */
|
|
1954
2813
|
issuer: string;
|
|
2814
|
+
/** 控制参数 */
|
|
2815
|
+
options: WorkOptions;
|
|
1955
2816
|
/** 原始数据 */
|
|
1956
|
-
raw:
|
|
1957
|
-
|
|
2817
|
+
raw: {
|
|
2818
|
+
works: string[];
|
|
2819
|
+
options: string;
|
|
2820
|
+
};
|
|
2821
|
+
/**
|
|
2822
|
+
* 解析 Work 数据
|
|
2823
|
+
* @param obj - work 数据,从如数开发者平台获取
|
|
2824
|
+
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
2825
|
+
* @returns - 签署过的 Work 数据结构
|
|
2826
|
+
*/
|
|
2827
|
+
static parse: typeof parseWork;
|
|
2828
|
+
constructor(obj: Work | LooseWork | (Work | LooseWork)[] | any, options: ParseWorkOptions);
|
|
1958
2829
|
toJSON(): any;
|
|
1959
2830
|
}
|
|
1960
2831
|
|
|
2832
|
+
export declare type WorkCode = string;
|
|
2833
|
+
|
|
1961
2834
|
export declare interface WorkCubeImage {
|
|
1962
2835
|
/** 全景图 up */
|
|
1963
2836
|
up: string;
|
|
@@ -1984,25 +2857,54 @@ export declare interface WorkImage extends WorkCubeImage {
|
|
|
1984
2857
|
}
|
|
1985
2858
|
|
|
1986
2859
|
/** 初始化位姿参数 */
|
|
1987
|
-
export declare interface WorkInitial
|
|
2860
|
+
export declare interface WorkInitial {
|
|
2861
|
+
/** 模态 */
|
|
2862
|
+
mode?: Mode;
|
|
2863
|
+
/** 点位序号 */
|
|
2864
|
+
panoId?: string;
|
|
2865
|
+
/** 相机水平角 */
|
|
2866
|
+
longitude?: number;
|
|
2867
|
+
/** 相机俯仰角 */
|
|
2868
|
+
latitude?: number;
|
|
2869
|
+
/** 相机可视角度(垂直)*/
|
|
2870
|
+
fov?: number;
|
|
2871
|
+
/** 相机观察点位置 [x, y, z] */
|
|
2872
|
+
offset?: THREE_2.Vector3;
|
|
2873
|
+
/** 相机距离观察点距离 */
|
|
2874
|
+
distance?: number;
|
|
1988
2875
|
}
|
|
1989
2876
|
|
|
1990
2877
|
/** 模型数据 */
|
|
1991
2878
|
export declare interface WorkModel {
|
|
2879
|
+
/** work */
|
|
2880
|
+
work: Work;
|
|
1992
2881
|
/** 模型文件地址 at3d / domez */
|
|
1993
|
-
file
|
|
2882
|
+
file?: string;
|
|
1994
2883
|
/** 模型贴图文件地址 */
|
|
1995
|
-
textures
|
|
2884
|
+
textures?: string[];
|
|
1996
2885
|
/** 模型贴图文件地址的父目录 */
|
|
1997
|
-
textureBase
|
|
1998
|
-
/**
|
|
1999
|
-
|
|
2886
|
+
textureBase?: string;
|
|
2887
|
+
/** 3d tile */
|
|
2888
|
+
layers: {
|
|
2889
|
+
type: 'point_cloud' | 'mesh';
|
|
2890
|
+
name: string;
|
|
2891
|
+
upAxis: string;
|
|
2892
|
+
tileset: string;
|
|
2893
|
+
}[];
|
|
2000
2894
|
}
|
|
2001
2895
|
|
|
2002
2896
|
/** 每个点位的数据 */
|
|
2003
2897
|
export declare interface WorkObserver {
|
|
2898
|
+
/** work */
|
|
2899
|
+
work: Work;
|
|
2900
|
+
/** 序号 */
|
|
2901
|
+
index: number;
|
|
2004
2902
|
/** 点位序号 */
|
|
2005
|
-
|
|
2903
|
+
panoId: WorkPanoId;
|
|
2904
|
+
/** 点位所在楼层 */
|
|
2905
|
+
floorIndex: number;
|
|
2906
|
+
/** 点位 derived_id */
|
|
2907
|
+
derivedId?: number;
|
|
2006
2908
|
/** 点位是否激活可用 */
|
|
2007
2909
|
active: boolean;
|
|
2008
2910
|
/** 点位是否可加载 */
|
|
@@ -2012,19 +2914,44 @@ export declare interface WorkObserver {
|
|
|
2012
2914
|
/** 点位视频 */
|
|
2013
2915
|
video?: WorkVideo;
|
|
2014
2916
|
/** 可以看到的相关点位序号 */
|
|
2015
|
-
|
|
2917
|
+
visibleIds: string[];
|
|
2016
2918
|
/** 可以连通的相关点位序号 */
|
|
2017
|
-
|
|
2018
|
-
/**
|
|
2019
|
-
quaternion: THREE_2.Quaternion;
|
|
2020
|
-
/** 点位和模型的地面位置坐标关系 */
|
|
2919
|
+
accessibleIds: string[];
|
|
2920
|
+
/** 点位和模型的地面坐标 */
|
|
2021
2921
|
standingPosition: THREE_2.Vector3;
|
|
2022
|
-
/**
|
|
2922
|
+
/** 点位和模型的观察点坐标 */
|
|
2023
2923
|
position: THREE_2.Vector3;
|
|
2024
|
-
/**
|
|
2025
|
-
|
|
2924
|
+
/** 点位和模型的旋转对齐关系四元数 */
|
|
2925
|
+
quaternion: THREE_2.Quaternion;
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
export declare interface WorkOptions {
|
|
2929
|
+
/** 调试 */
|
|
2930
|
+
debug?: boolean;
|
|
2931
|
+
/** 位姿修正 */
|
|
2932
|
+
transform: THREE_2.Matrix4;
|
|
2933
|
+
/** 可观测区域 */
|
|
2934
|
+
viewerRequestVolume?: BoundingVolume;
|
|
2935
|
+
/** 模型显示最大细化层级 */
|
|
2936
|
+
modelMaxLevelOfDetail?: number;
|
|
2937
|
+
/** 模型最大内存缓存 */
|
|
2938
|
+
modelMaxMemoryUsage?: number;
|
|
2939
|
+
/** 模型网络最大请求并发数 */
|
|
2940
|
+
modelMaxRequests?: number;
|
|
2941
|
+
/** 模型屏幕空间误差计算最大值 */
|
|
2942
|
+
modelMaxScreenSpaceError?: number;
|
|
2026
2943
|
}
|
|
2027
2944
|
|
|
2945
|
+
export declare type WorkPanoId = string;
|
|
2946
|
+
|
|
2947
|
+
export declare type Works = ReadonlyArray<Work> & {
|
|
2948
|
+
resolvedObservers: WorkObserver[];
|
|
2949
|
+
initial: WorkInitial;
|
|
2950
|
+
getWork(workCode: WorkCode): Work | undefined;
|
|
2951
|
+
getResolvedObserver(panoId: WorkPanoId): WorkObserver | undefined;
|
|
2952
|
+
update(): void;
|
|
2953
|
+
};
|
|
2954
|
+
|
|
2028
2955
|
export declare interface WorkTile {
|
|
2029
2956
|
level: number;
|
|
2030
2957
|
size: number;
|
|
@@ -2046,4 +2973,11 @@ export declare interface WorkVideo {
|
|
|
2046
2973
|
size: THREE_2.Vector2;
|
|
2047
2974
|
}
|
|
2048
2975
|
|
|
2976
|
+
export declare class XRButton {
|
|
2977
|
+
static createButton(onClickHook: () => void): HTMLAnchorElement | HTMLButtonElement;
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
export declare interface XRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
2981
|
+
}
|
|
2982
|
+
|
|
2049
2983
|
export { }
|