@realsee/five 5.0.0-alpha.99 → 6.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +116 -83
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.IntersectMesh.html +1 -1
- package/docs/classes/five.Model.html +37 -37
- package/docs/classes/five.NetworkSubscribe.html +22 -15
- package/docs/classes/five.PBMContainer.html +9 -11
- 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 -113
- 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.ModelEventCallback.html +7 -13
- 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 +7 -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 -43
- 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 +130 -113
- 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 +1194 -247
- 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/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,23 +570,23 @@ 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 值
|
|
@@ -542,21 +660,21 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
542
660
|
stateSynced(state: State): void;
|
|
543
661
|
/**
|
|
544
662
|
* 意图要移动到某个点时, 可以通过 return false 阻止
|
|
545
|
-
* @param
|
|
663
|
+
* @param panoId - 意图要移动到点位
|
|
546
664
|
* @param options - 移动参数
|
|
547
665
|
* @param userAction - 是否用户触发
|
|
548
666
|
* @returns 可以通过 return false 阻止
|
|
549
667
|
*/
|
|
550
|
-
wantsMoveToPano(
|
|
668
|
+
wantsMoveToPano(panoId: WorkPanoId, options: MovePanoOptions, userAction: boolean): void | false;
|
|
551
669
|
/**
|
|
552
670
|
* 同 wantsMoveToPano
|
|
553
671
|
* @description
|
|
554
|
-
* @param
|
|
672
|
+
* @param panoId - 意图要移动到点位
|
|
555
673
|
* @param options - 移动参数
|
|
556
674
|
* @param userAction - 是否用户触发
|
|
557
675
|
* @returns 可以通过 return false 阻止
|
|
558
676
|
*/
|
|
559
|
-
wantsToMoveToPano(
|
|
677
|
+
wantsToMoveToPano(panoId: WorkPanoId, options: MovePanoOptions, userAction: boolean): void;
|
|
560
678
|
/**
|
|
561
679
|
* 意图要切换到某个模态, 可以通过 return false 阻止
|
|
562
680
|
* @param mode - 意图要切换到的模态
|
|
@@ -570,8 +688,9 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
570
688
|
* @param prevMode - 上本质是一个模态
|
|
571
689
|
* @param panoIndex - 初始化动画结束后的点位下标
|
|
572
690
|
* @param toPose - 初始化动画结束后的状态
|
|
691
|
+
* @param userAction - 是否用户触发
|
|
573
692
|
*/
|
|
574
|
-
modeChange(mode: Mode, prevMode: Mode,
|
|
693
|
+
modeChange(mode: Mode, prevMode: Mode, panoId: WorkPanoId, toPose: Pose, userAction: boolean): void;
|
|
575
694
|
/**
|
|
576
695
|
* 帮助元素显应的变换
|
|
577
696
|
* @param visible - 帮助元素的是否开启
|
|
@@ -602,6 +721,9 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
602
721
|
* ```
|
|
603
722
|
*/
|
|
604
723
|
export declare class Five extends Subscribe<EventTypes> {
|
|
724
|
+
static get version(): string;
|
|
725
|
+
static get dracoPath(): string;
|
|
726
|
+
static set dracoPath(path: string);
|
|
605
727
|
/**
|
|
606
728
|
* Five 的显示模式,可以通过 `five.changeMode` `five.setState` 来切换
|
|
607
729
|
* @description
|
|
@@ -612,6 +734,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
612
734
|
* Topview 户型图模式
|
|
613
735
|
* DepthPanorama 深度图游走模式
|
|
614
736
|
* VRPanorama VR眼镜模式
|
|
737
|
+
* XRPanorama VR硬件模式
|
|
615
738
|
* ```
|
|
616
739
|
*/
|
|
617
740
|
static Mode: Mirror<Mode>;
|
|
@@ -627,9 +750,9 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
627
750
|
*/
|
|
628
751
|
paused: boolean;
|
|
629
752
|
/** 当前点位序号 */
|
|
630
|
-
|
|
753
|
+
panoId: WorkPanoId;
|
|
631
754
|
/** 当前展示的模式 */
|
|
632
|
-
currentMode
|
|
755
|
+
currentMode: Mode;
|
|
633
756
|
/** 内部使用的 `THREE.Scene` */
|
|
634
757
|
scene: Scene;
|
|
635
758
|
/** 内部使用的 `Camera` */
|
|
@@ -676,6 +799,12 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
676
799
|
* 平衡加载时间和图片质量
|
|
677
800
|
*/
|
|
678
801
|
textureOptions: TextureOptions;
|
|
802
|
+
/**
|
|
803
|
+
* 模型lod的配置参数
|
|
804
|
+
* @description
|
|
805
|
+
* 可以配置加载模型lod的相关参数
|
|
806
|
+
*/
|
|
807
|
+
modelLodOptions: ModelLodOptions;
|
|
679
808
|
/**
|
|
680
809
|
* 模型贴图的配置参数
|
|
681
810
|
* @description
|
|
@@ -707,6 +836,8 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
707
836
|
[key: string]: FivePluginInstance<any>;
|
|
708
837
|
};
|
|
709
838
|
ident: string;
|
|
839
|
+
/** 包围盒子 */
|
|
840
|
+
private boundingMesh;
|
|
710
841
|
private stopAnimationLoop?;
|
|
711
842
|
private fps;
|
|
712
843
|
private helperGroup;
|
|
@@ -717,7 +848,6 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
717
848
|
private destroyed;
|
|
718
849
|
private stateSynced;
|
|
719
850
|
private controllerInits;
|
|
720
|
-
private panoramaLikeSavedPose;
|
|
721
851
|
private extraElements;
|
|
722
852
|
private getPixelsRenderTarget;
|
|
723
853
|
private readyCallbacks;
|
|
@@ -730,11 +860,31 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
730
860
|
*/
|
|
731
861
|
private _enableIOSEDR;
|
|
732
862
|
private lastLoadWorkTask;
|
|
863
|
+
private requestProxy;
|
|
733
864
|
private networkSubscribe;
|
|
734
|
-
private
|
|
865
|
+
private screenBuffers?;
|
|
735
866
|
private analysis?;
|
|
736
867
|
private renderSwitch01;
|
|
868
|
+
/**
|
|
869
|
+
* gpu_picking
|
|
870
|
+
*/
|
|
871
|
+
private gpuPickingRenderTarget;
|
|
872
|
+
private meshReplaceMaterialMap;
|
|
873
|
+
private meshOriginMaterialMap;
|
|
874
|
+
private copyEffect;
|
|
737
875
|
constructor(initArgs?: FiveInitArgs);
|
|
876
|
+
get panoIndex(): number;
|
|
877
|
+
/**
|
|
878
|
+
* GPU Picking 获取选中的 mesh
|
|
879
|
+
* @param x - 屏幕坐标 x
|
|
880
|
+
* @param y - 屏幕坐标 y
|
|
881
|
+
* @param colorMap - 需要选取的 mesh 的颜色与 uuid 的映射
|
|
882
|
+
* @param color - 指定的模型颜色
|
|
883
|
+
* @returns 选中 mesh 的 uuid
|
|
884
|
+
*/
|
|
885
|
+
getGPUPicking(x: number, y: number, colorMap: {
|
|
886
|
+
[key: string]: THREE_2.Color;
|
|
887
|
+
}, pixelRatio?: number, color?: THREE_2.Vector3): string | false;
|
|
738
888
|
/**
|
|
739
889
|
* 析构 five 对象。
|
|
740
890
|
* @description
|
|
@@ -766,9 +916,17 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
766
916
|
*/
|
|
767
917
|
get enableIOSEDR(): boolean;
|
|
768
918
|
set enableIOSEDR(enable: boolean);
|
|
919
|
+
/**
|
|
920
|
+
* 是否开启EDL模式
|
|
921
|
+
*/
|
|
922
|
+
get enableEDL(): boolean;
|
|
923
|
+
set enableEDL(enable: boolean);
|
|
924
|
+
/**
|
|
925
|
+
* 是否开启后处理
|
|
926
|
+
*/
|
|
769
927
|
get enablePostProcessing(): boolean;
|
|
770
928
|
set enablePostProcessing(enable: boolean);
|
|
771
|
-
updateConfiguration(args: Pick<FiveInitArgs, "panorama" | "model" | "floorplan" | "topview" | "depthPanorama" | "vrPanorama" | "imageOptions">): void;
|
|
929
|
+
updateConfiguration(args: Pick<FiveInitArgs, "panorama" | "model" | "floorplan" | "topview" | "mapview" | "depthPanorama" | "vrPanorama" | "imageOptions" | "textureOptions">): void;
|
|
772
930
|
/**
|
|
773
931
|
* 将显示区域加载到页面 DOM 中
|
|
774
932
|
* @description
|
|
@@ -819,6 +977,17 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
819
977
|
* @returns Promise 是否移动成功
|
|
820
978
|
*/
|
|
821
979
|
updateCamera(pose: Partial<Omit<Pose, "offset">>, duration: number, userAction?: boolean): Promise<void>;
|
|
980
|
+
/**
|
|
981
|
+
* 通过帧动画移动相机。(不触发点位移动)
|
|
982
|
+
* @description
|
|
983
|
+
* 如果动画中途被打断(用户触发行为,或者调用 setState, load, changeMode)的等
|
|
984
|
+
* 会 Promise.reject。运动完成则 Promise.resolve
|
|
985
|
+
* @param keyframes - 动画帧
|
|
986
|
+
* @param duration - 动画触发的时常
|
|
987
|
+
* @param userAction - 是否用户触发
|
|
988
|
+
* @returns Promise 是否移动成功
|
|
989
|
+
*/
|
|
990
|
+
updateCameraWithKeyframes(keyframes: MotionKeyframe<Exclude<keyof Pose, "offset">>[], duration: number, userAction?: boolean): Promise<void>;
|
|
822
991
|
/**
|
|
823
992
|
* 获取当前相机经纬度
|
|
824
993
|
* @deprecated 请使用使用 getPose
|
|
@@ -838,28 +1007,9 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
838
1007
|
phi: number;
|
|
839
1008
|
lookAtVector: THREE_2.Vector3;
|
|
840
1009
|
};
|
|
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
1010
|
/** 当前加载的 work 数据 */
|
|
862
|
-
get
|
|
1011
|
+
get works(): Works;
|
|
1012
|
+
get work(): Work | undefined;
|
|
863
1013
|
/**
|
|
864
1014
|
* 加载 Work 数据
|
|
865
1015
|
* @param inputWork - Work 数据
|
|
@@ -869,7 +1019,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
869
1019
|
* - State 自定义姿态
|
|
870
1020
|
* @param duration - 切换时间
|
|
871
1021
|
*/
|
|
872
|
-
load(inputWork: Work | LooseWork |
|
|
1022
|
+
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
1023
|
private load_;
|
|
874
1024
|
/**
|
|
875
1025
|
* 切换模态
|
|
@@ -906,9 +1056,9 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
906
1056
|
* @param callback - 渲染完成回调
|
|
907
1057
|
*/
|
|
908
1058
|
render(callback?: () => void, updateObjectResolution?: boolean): THREE_2.WebGLRenderTarget;
|
|
909
|
-
updateTime(time: number, deltaTime: number): void;
|
|
1059
|
+
updateTime(time: number, deltaTime: number, ...args: any[]): void;
|
|
910
1060
|
/**
|
|
911
|
-
*
|
|
1061
|
+
* 暂停自动播放
|
|
912
1062
|
*/
|
|
913
1063
|
pause(): void;
|
|
914
1064
|
play(): void;
|
|
@@ -918,13 +1068,15 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
918
1068
|
* @param options - 移动点位参数
|
|
919
1069
|
* @param userAction - 是否用户触犯
|
|
920
1070
|
*/
|
|
921
|
-
moveToPano(
|
|
1071
|
+
moveToPano(panoId: WorkPanoId, options?: MovePanoOptions, userAction?: boolean): Promise<void>;
|
|
1072
|
+
moveToPano(panoIndex: number, options?: MovePanoOptions, userAction?: boolean): Promise<void>;
|
|
922
1073
|
/**
|
|
923
1074
|
* 预加载点位图片资源
|
|
924
1075
|
* @param panoIndex - 观察点序号
|
|
925
1076
|
* @param callback - 加载完成回调, 并传递加载用时。
|
|
926
1077
|
* @returns 加载完成的 Promise 参数同 callback
|
|
927
1078
|
*/
|
|
1079
|
+
preloadPano(panoId: WorkPanoId, callback?: (costs: number) => void): Promise<number>;
|
|
928
1080
|
preloadPano(panoIndex: number, callback?: (costs: number) => void): Promise<number>;
|
|
929
1081
|
/**
|
|
930
1082
|
* 计算三维坐标对应到屏幕的二维坐标
|
|
@@ -965,16 +1117,28 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
965
1117
|
setState(state: Partial<State>, immediately?: boolean, userAction?: boolean): void;
|
|
966
1118
|
aroundScissor(callback: () => void): void;
|
|
967
1119
|
private syncState;
|
|
968
|
-
|
|
1120
|
+
/**
|
|
1121
|
+
* 当前页面静态
|
|
1122
|
+
*/
|
|
1123
|
+
ready(args?: {
|
|
1124
|
+
tile?: boolean;
|
|
1125
|
+
}): Promise<void>;
|
|
1126
|
+
/**
|
|
1127
|
+
* 请求全屏
|
|
1128
|
+
*/
|
|
969
1129
|
requestFullscreen(): void;
|
|
1130
|
+
/**
|
|
1131
|
+
* 退出全屏
|
|
1132
|
+
*/
|
|
970
1133
|
exitFullscreen(): void;
|
|
971
1134
|
private throwError;
|
|
972
1135
|
private loadModel;
|
|
973
1136
|
private commonParams;
|
|
974
|
-
private saveControllerPose;
|
|
975
1137
|
private applyController;
|
|
976
1138
|
/** 移除事件绑定 */
|
|
977
1139
|
private removeEventListeners;
|
|
1140
|
+
/** 销毁GPU Picking 所用的材质 */
|
|
1141
|
+
private diposeGPUPickingMaterial;
|
|
978
1142
|
}
|
|
979
1143
|
|
|
980
1144
|
/** Five 初始化参数 */
|
|
@@ -1076,24 +1240,6 @@ export declare interface FiveInitArgs {
|
|
|
1076
1240
|
* @default `false`
|
|
1077
1241
|
*/
|
|
1078
1242
|
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
1243
|
/**
|
|
1098
1244
|
* 外挂视频对象。
|
|
1099
1245
|
* @description
|
|
@@ -1110,15 +1256,19 @@ export declare interface FiveInitArgs {
|
|
|
1110
1256
|
floorplan?: ControllerCustomInitTypes["Floorplan"];
|
|
1111
1257
|
/** 户型图模式下的特定参数 */
|
|
1112
1258
|
topview?: ControllerCustomInitTypes["Topview"];
|
|
1259
|
+
/** 地图模式下的特定参数 */
|
|
1260
|
+
mapview?: ControllerCustomInitTypes["Mapview"];
|
|
1113
1261
|
/** 深度图游走模式下的特定参数 */
|
|
1114
1262
|
depthPanorama?: ControllerCustomInitTypes["DepthPanorama"];
|
|
1115
1263
|
/** VR眼镜模式下的特定参数 */
|
|
1116
1264
|
vrPanorama?: ControllerCustomInitTypes["VRPanorama"];
|
|
1265
|
+
/** XR眼镜模式下的特定参数 */
|
|
1266
|
+
xrPanorama?: ControllerCustomInitTypes["XRPanorama"];
|
|
1117
1267
|
/**
|
|
1118
1268
|
* 模式间切换时的过度动画时间
|
|
1119
1269
|
* @description
|
|
1120
1270
|
* 单位毫秒
|
|
1121
|
-
* @default `
|
|
1271
|
+
* @default `800`
|
|
1122
1272
|
*/
|
|
1123
1273
|
modeChangeDuration?: number;
|
|
1124
1274
|
/**
|
|
@@ -1131,6 +1281,26 @@ export declare interface FiveInitArgs {
|
|
|
1131
1281
|
* 是否展示 powered by 如视
|
|
1132
1282
|
*/
|
|
1133
1283
|
poweredByRealsee?: boolean;
|
|
1284
|
+
/**
|
|
1285
|
+
* 是否使用webgl2渲染执行环境, 默认值 false
|
|
1286
|
+
*/
|
|
1287
|
+
webgl2?: boolean;
|
|
1288
|
+
/**
|
|
1289
|
+
* 是否开启模型裁切
|
|
1290
|
+
*/
|
|
1291
|
+
localClippingEnabled?: boolean;
|
|
1292
|
+
/**
|
|
1293
|
+
* 请求代理
|
|
1294
|
+
* @param url - 发起的请求
|
|
1295
|
+
* @returns 返回的请求
|
|
1296
|
+
*/
|
|
1297
|
+
requestProxy?(url: string): string | Promise<string>;
|
|
1298
|
+
/**
|
|
1299
|
+
* 模型lod相关的配置,maxDepth为加载的最大深度
|
|
1300
|
+
*/
|
|
1301
|
+
modelLod?: {
|
|
1302
|
+
maxDepth?: number;
|
|
1303
|
+
};
|
|
1134
1304
|
}
|
|
1135
1305
|
|
|
1136
1306
|
/**
|
|
@@ -1161,8 +1331,6 @@ parameters: Parameters<T>[1]
|
|
|
1161
1331
|
export declare type FivePluginInstance<T extends FivePlugin<any, any>> = ReturnType<T>;
|
|
1162
1332
|
|
|
1163
1333
|
export declare interface FloorplanControllerCustomInitArgs {
|
|
1164
|
-
/** 默认偏航角 */
|
|
1165
|
-
defaultLongitude?: number;
|
|
1166
1334
|
/** 默认俯仰角 */
|
|
1167
1335
|
defaultLatitude?: number;
|
|
1168
1336
|
/** 最大俯仰角 */
|
|
@@ -1175,6 +1343,8 @@ export declare interface FloorplanControllerCustomInitArgs {
|
|
|
1175
1343
|
maxFov?: number;
|
|
1176
1344
|
/** 最小相机可视角度 */
|
|
1177
1345
|
minFov?: number;
|
|
1346
|
+
/** 鼠标焦点环自定义创建器 */
|
|
1347
|
+
intersectMeshCreator?: () => IntersectMeshInterface;
|
|
1178
1348
|
}
|
|
1179
1349
|
|
|
1180
1350
|
export declare type GestureTypes = "pan" | "tap" | "pinch" | "press" | "mouseWheel";
|
|
@@ -1198,34 +1368,61 @@ export declare interface ImageOptions {
|
|
|
1198
1368
|
quality?: number;
|
|
1199
1369
|
/** 图片格式参数 */
|
|
1200
1370
|
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
1371
|
+
/** 锐化参数 海外不支持 */
|
|
1372
|
+
sharpen?: number;
|
|
1373
|
+
mappings?: ImageURLMappings;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
export declare function imageSupport(): Promise<{
|
|
1377
|
+
avif: boolean;
|
|
1378
|
+
webp: boolean;
|
|
1379
|
+
}>;
|
|
1380
|
+
|
|
1381
|
+
export declare interface ImageURLMappings {
|
|
1382
|
+
[publicDomain: string]: {
|
|
1383
|
+
"type"?: string;
|
|
1384
|
+
"pano": [string, string];
|
|
1385
|
+
"tile": [string, string];
|
|
1386
|
+
"model": [string, string];
|
|
1387
|
+
"texture": [string];
|
|
1388
|
+
"default": [string];
|
|
1389
|
+
};
|
|
1201
1390
|
}
|
|
1202
1391
|
|
|
1203
1392
|
export declare interface ImageURLOptions {
|
|
1393
|
+
/** 图片类型标识 */
|
|
1204
1394
|
key: string;
|
|
1205
|
-
|
|
1395
|
+
/** 图片尺寸参数 尽量使用 2 的幂次 如 256 512 1024 */
|
|
1206
1396
|
size?: number;
|
|
1397
|
+
/** 图片质量参数(0-100) */
|
|
1207
1398
|
quality?: number;
|
|
1399
|
+
/** 图片格式参数 */
|
|
1208
1400
|
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
1401
|
+
/** 图片裁切 */
|
|
1209
1402
|
cut?: [x: number, y: number, width: number, height: number];
|
|
1403
|
+
/** 锐化参数 海外不支持 */
|
|
1210
1404
|
sharpen?: number;
|
|
1405
|
+
/** url匹配规则 */
|
|
1406
|
+
mappings?: ImageURLMappings;
|
|
1211
1407
|
}
|
|
1212
1408
|
|
|
1213
1409
|
export declare class InternalWebGLRenderer extends THREE_2.WebGLRenderer {
|
|
1214
|
-
constructor({ preserveDrawingBuffer, backgroundColor, backgroundAlpha, pixelRatio, antialias }: {
|
|
1410
|
+
constructor({ preserveDrawingBuffer, backgroundColor, backgroundAlpha, pixelRatio, antialias, webgl2, }: {
|
|
1215
1411
|
preserveDrawingBuffer?: boolean;
|
|
1216
1412
|
backgroundColor?: number | THREE_2.Color;
|
|
1217
1413
|
backgroundAlpha?: number;
|
|
1218
1414
|
pixelRatio?: number;
|
|
1219
1415
|
antialias?: boolean;
|
|
1416
|
+
webgl2?: boolean;
|
|
1220
1417
|
});
|
|
1221
1418
|
}
|
|
1222
1419
|
|
|
1223
1420
|
export declare interface Intersection {
|
|
1224
1421
|
/** 焦点坐标 */
|
|
1225
|
-
point:
|
|
1422
|
+
point: THREE.Vector3;
|
|
1226
1423
|
/** 焦点面片 */
|
|
1227
1424
|
face?: {
|
|
1228
|
-
normal:
|
|
1425
|
+
normal: THREE.Vector3;
|
|
1229
1426
|
} | null;
|
|
1230
1427
|
/** 焦点距离 */
|
|
1231
1428
|
distance: number;
|
|
@@ -1244,45 +1441,24 @@ export declare interface IntersectMeshInterface extends THREE_2.Object3D {
|
|
|
1244
1441
|
dispose(): void;
|
|
1245
1442
|
}
|
|
1246
1443
|
|
|
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
1444
|
export declare type LooseWork = {
|
|
1271
|
-
|
|
1445
|
+
work_code?: string;
|
|
1446
|
+
code?: string;
|
|
1272
1447
|
modelAsync?: boolean;
|
|
1273
1448
|
initial?: LooseWorkInitial;
|
|
1274
1449
|
base_url?: string;
|
|
1275
1450
|
model?: LooseWorkModel;
|
|
1276
|
-
panorama
|
|
1451
|
+
panorama?: {
|
|
1277
1452
|
base_url?: string;
|
|
1278
1453
|
pano_high_cube_base_url?: string;
|
|
1279
1454
|
info?: LooseWorkPanorama[];
|
|
1280
1455
|
list?: LooseWorkPanorama[];
|
|
1281
1456
|
};
|
|
1282
|
-
observers
|
|
1457
|
+
observers?: LooseWorkObserver[];
|
|
1283
1458
|
};
|
|
1284
1459
|
|
|
1285
1460
|
export declare type LooseWorkInitial = {
|
|
1461
|
+
mode?: string;
|
|
1286
1462
|
pano_index?: number;
|
|
1287
1463
|
pano?: number;
|
|
1288
1464
|
longitude?: number;
|
|
@@ -1291,9 +1467,12 @@ export declare type LooseWorkInitial = {
|
|
|
1291
1467
|
};
|
|
1292
1468
|
|
|
1293
1469
|
export declare type LooseWorkModel = {
|
|
1294
|
-
file_url
|
|
1470
|
+
file_url?: string;
|
|
1295
1471
|
material_textures?: string[];
|
|
1296
1472
|
material_base_url?: string;
|
|
1473
|
+
tiles?: {
|
|
1474
|
+
tileset_url: string;
|
|
1475
|
+
};
|
|
1297
1476
|
};
|
|
1298
1477
|
|
|
1299
1478
|
export declare type LooseWorkObserver = {
|
|
@@ -1341,6 +1520,36 @@ export declare type LooseWorkVideo = {
|
|
|
1341
1520
|
size: number[];
|
|
1342
1521
|
};
|
|
1343
1522
|
|
|
1523
|
+
export declare type LooseWorkWithExtrinsics = {
|
|
1524
|
+
work: LooseWork;
|
|
1525
|
+
debug?: boolean;
|
|
1526
|
+
/** 位姿 */
|
|
1527
|
+
transform?: number[];
|
|
1528
|
+
/** 可视区域 */
|
|
1529
|
+
viewerRequestVolume?: BoundingVolumeJson;
|
|
1530
|
+
/** 模型显示最大细化层级 */
|
|
1531
|
+
modelMaxLevelOfDetail?: number;
|
|
1532
|
+
/** 模型最大内存缓存 */
|
|
1533
|
+
modelMaxMemoryUsage?: number;
|
|
1534
|
+
/** 模型网络最大请求并发数 */
|
|
1535
|
+
modelMaxRequests?: number;
|
|
1536
|
+
/** 模型屏幕空间误差计算最大值 */
|
|
1537
|
+
modelMaxScreenSpaceError?: number;
|
|
1538
|
+
};
|
|
1539
|
+
|
|
1540
|
+
export declare interface MapviewControllerCustomInitArgs {
|
|
1541
|
+
/** 默认俯仰角 */
|
|
1542
|
+
defaultLatitude?: number;
|
|
1543
|
+
/** 默认相机距离 */
|
|
1544
|
+
defaultDistance?: number;
|
|
1545
|
+
/** 最大俯仰角 */
|
|
1546
|
+
maxLatitude?: number;
|
|
1547
|
+
/** 最小俯仰角 */
|
|
1548
|
+
minLatitude?: number;
|
|
1549
|
+
/** 鼠标焦点环自定义创建器 */
|
|
1550
|
+
intersectMeshCreator?: () => IntersectMeshInterface;
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1344
1553
|
export declare type Mirror<T extends string> = Record<T, T>;
|
|
1345
1554
|
|
|
1346
1555
|
/**
|
|
@@ -1349,6 +1558,7 @@ export declare type Mirror<T extends string> = Record<T, T>;
|
|
|
1349
1558
|
* - **Model**: 模型游走模式
|
|
1350
1559
|
* - **Floorplan**: 模型查看模式
|
|
1351
1560
|
* - **Topview**: 户型图模式
|
|
1561
|
+
* - **Mapview**: 地图模式
|
|
1352
1562
|
* - **DepthPanorama**: 深度图游走模式
|
|
1353
1563
|
* - **VRPanorama**: VR眼镜模式
|
|
1354
1564
|
*/
|
|
@@ -1357,6 +1567,8 @@ export declare type Mode =
|
|
|
1357
1567
|
"Floorplan" |
|
|
1358
1568
|
/** 户型图模式 */
|
|
1359
1569
|
"Topview" |
|
|
1570
|
+
/** 地图模式 */
|
|
1571
|
+
"Mapview" |
|
|
1360
1572
|
/** 全景图游走模式 */
|
|
1361
1573
|
"Panorama" |
|
|
1362
1574
|
/** VR眼镜模式 */
|
|
@@ -1364,7 +1576,9 @@ export declare type Mode =
|
|
|
1364
1576
|
/** 模型游走模式 */
|
|
1365
1577
|
"Model" |
|
|
1366
1578
|
/** 深度图游走模式 */
|
|
1367
|
-
"DepthPanorama"
|
|
1579
|
+
"DepthPanorama" |
|
|
1580
|
+
/** XR眼镜模式*/
|
|
1581
|
+
"XRPanorama";
|
|
1368
1582
|
|
|
1369
1583
|
/**
|
|
1370
1584
|
* Five 模型
|
|
@@ -1375,16 +1589,20 @@ export declare type Mode =
|
|
|
1375
1589
|
* 通过 json_xxxxxx(<dataURL>) 方式返回。
|
|
1376
1590
|
*/
|
|
1377
1591
|
export declare class Model extends PBMContainer implements Subscribe<ModelEventType> {
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
/** 是否未加载 */
|
|
1381
|
-
empty: boolean;
|
|
1592
|
+
static get dracoPath(): string;
|
|
1593
|
+
static set dracoPath(path: string);
|
|
1382
1594
|
/** 外接盒子的大小 */
|
|
1383
1595
|
bounding: THREE_2.Box3;
|
|
1384
1596
|
/** 当前显示的楼层 */
|
|
1385
1597
|
shownFloor: number | null;
|
|
1386
1598
|
/** 楼层的数量 */
|
|
1387
1599
|
floorLength: number;
|
|
1600
|
+
/** 材质贴图参数 */
|
|
1601
|
+
textureOptions: TextureOptions;
|
|
1602
|
+
/** 模型是否已经细化 */
|
|
1603
|
+
refined: boolean;
|
|
1604
|
+
/** 模型已经加载 */
|
|
1605
|
+
loaded: boolean;
|
|
1388
1606
|
/**
|
|
1389
1607
|
* 判断是否注册了事件
|
|
1390
1608
|
* 具体可查看 {@link Subscribe.hasListener}
|
|
@@ -1410,37 +1628,27 @@ export declare class Model extends PBMContainer implements Subscribe<ModelEventT
|
|
|
1410
1628
|
* 具体可查看 {@link Subscribe.emit}
|
|
1411
1629
|
*/
|
|
1412
1630
|
emit: SubscribeMixinType.emit<ModelEventType>;
|
|
1413
|
-
/**
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
private
|
|
1419
|
-
|
|
1420
|
-
private allowHosts?;
|
|
1421
|
-
constructor(options?: {
|
|
1422
|
-
networkSubscribe?: NetworkSubscribe;
|
|
1423
|
-
allowHosts?: string[];
|
|
1424
|
-
});
|
|
1631
|
+
/**
|
|
1632
|
+
* 等待事件
|
|
1633
|
+
* 具体可查看 {@link Subscribe.waitUnitl}
|
|
1634
|
+
*/
|
|
1635
|
+
waitUnitl: SubscribeMixinType.waitUnitl<ModelEventType>;
|
|
1636
|
+
private renderer?;
|
|
1637
|
+
constructor(renderer?: THREE_2.WebGLRenderer);
|
|
1425
1638
|
/**
|
|
1426
1639
|
* 当前显示的楼层
|
|
1427
1640
|
* @deprecated
|
|
1428
1641
|
* 请用 shwonFloor 代替
|
|
1429
1642
|
*/
|
|
1430
1643
|
get shownfloor(): number | null;
|
|
1644
|
+
get empty(): boolean;
|
|
1431
1645
|
/**
|
|
1432
1646
|
* 获取模型边界线
|
|
1647
|
+
* @param sphere - 获取区域
|
|
1433
1648
|
* @param threshold - 面片间夹角阈值
|
|
1434
1649
|
* @returns 所有模型边界线
|
|
1435
1650
|
*/
|
|
1436
|
-
|
|
1437
|
-
/**
|
|
1438
|
-
* 获取当前楼层数
|
|
1439
|
-
* @deprecated
|
|
1440
|
-
* 请使用 floorLength 参数代替
|
|
1441
|
-
*/
|
|
1442
|
-
hasFloors(): number;
|
|
1443
|
-
private hasFloors_;
|
|
1651
|
+
getEdgesBySphere(sphere: THREE_2.Sphere, threshold?: number): THREE_2.Line3[];
|
|
1444
1652
|
/**
|
|
1445
1653
|
* 显示某楼层
|
|
1446
1654
|
* @example
|
|
@@ -1450,8 +1658,7 @@ export declare class Model extends PBMContainer implements Subscribe<ModelEventT
|
|
|
1450
1658
|
* model.show(1, 0) //显示第一楼层, 并且其他楼层透明度为 0
|
|
1451
1659
|
* ```
|
|
1452
1660
|
*/
|
|
1453
|
-
show(): void;
|
|
1454
|
-
show(floorIndex: number, hiddenOpacity?: number): void;
|
|
1661
|
+
show(floorIndex?: number | null): void;
|
|
1455
1662
|
/**
|
|
1456
1663
|
* 计算模型射线碰撞检测
|
|
1457
1664
|
* @param raycaster - THREE 射线对象
|
|
@@ -1459,13 +1666,17 @@ export declare class Model extends PBMContainer implements Subscribe<ModelEventT
|
|
|
1459
1666
|
* @returns 返回碰撞
|
|
1460
1667
|
*/
|
|
1461
1668
|
intersectRaycaster(raycaster: THREE_2.Raycaster, floors?: number | number[]): Intersection[];
|
|
1462
|
-
buildBVH(): void;
|
|
1463
1669
|
/**
|
|
1464
1670
|
* 加载模型
|
|
1465
|
-
* @param
|
|
1671
|
+
* @param work - work 的
|
|
1466
1672
|
* @param imageOptions - 图片参数
|
|
1467
1673
|
*/
|
|
1468
|
-
load(
|
|
1674
|
+
load(work: Work, options?: {
|
|
1675
|
+
networkSubscribe?: NetworkSubscribe;
|
|
1676
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
1677
|
+
textureOptions?: TextureOptions;
|
|
1678
|
+
}): Promise<Tile3DModel | null>;
|
|
1679
|
+
update(renderer: THREE_2.WebGLRenderer, camera: Camera): void;
|
|
1469
1680
|
/**
|
|
1470
1681
|
* 析构函数
|
|
1471
1682
|
* @description
|
|
@@ -1491,19 +1702,10 @@ export declare interface ModelEventCallback extends ModelEventType {
|
|
|
1491
1702
|
* 具体事件列表 请查看 {@link ModelEventCallback}
|
|
1492
1703
|
*/
|
|
1493
1704
|
export declare type ModelEventType = {
|
|
1494
|
-
/**
|
|
1495
|
-
* 模型 bvh树 计算完成
|
|
1496
|
-
* @description
|
|
1497
|
-
* bvh 树用于高效的碰撞检测,可以在 `model.bvh` 属性来设置是否开启。默认开启。
|
|
1498
|
-
* bvh 树计算需要一定事件,可能会暂时影响一些性能。计算完毕后,会对碰撞检测带来质的提升。
|
|
1499
|
-
*/
|
|
1500
|
-
bvhLoaded(): void;
|
|
1501
|
-
/** 模型三角面片结构加载完成 */
|
|
1502
|
-
geometryLoaded(): void;
|
|
1503
|
-
/** 模型材质结构加载完成 */
|
|
1504
|
-
materialLoaded(): void;
|
|
1505
1705
|
/** 模型加载完成 */
|
|
1506
1706
|
loaded(): void;
|
|
1707
|
+
/** 模型细化 */
|
|
1708
|
+
refined(): void;
|
|
1507
1709
|
/**
|
|
1508
1710
|
* 显示楼层改变
|
|
1509
1711
|
* @param shownFloor - 显示的楼层
|
|
@@ -1516,6 +1718,18 @@ export declare type ModelEventType = {
|
|
|
1516
1718
|
error(error: Error): void;
|
|
1517
1719
|
};
|
|
1518
1720
|
|
|
1721
|
+
export declare interface ModelLodOptions {
|
|
1722
|
+
maxDepth?: number;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
export declare interface MotionKeyframe<K extends string> {
|
|
1726
|
+
progress: number;
|
|
1727
|
+
value: MotionValue<K>;
|
|
1728
|
+
key?: string;
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
export declare type MotionValue<K extends string> = Record<K, number>;
|
|
1732
|
+
|
|
1519
1733
|
/**
|
|
1520
1734
|
* 点位移动参数
|
|
1521
1735
|
*/
|
|
@@ -1527,9 +1741,10 @@ export declare interface MovePanoOptions extends Partial<Omit<Pose, "offset">> {
|
|
|
1527
1741
|
* @description
|
|
1528
1742
|
* - `fly` 通过相机移动方式变化
|
|
1529
1743
|
* - `fade` 通过渐变方式变化
|
|
1744
|
+
* - `montage` 通过渐变穿插到黑屏方式变化
|
|
1530
1745
|
* - `instant` 通过插入黑屏方式变化
|
|
1531
1746
|
*/
|
|
1532
|
-
effect?: "fly" | "fade" | "instant";
|
|
1747
|
+
effect?: "fly" | "fade" | "montage" | "instant";
|
|
1533
1748
|
/**
|
|
1534
1749
|
* 运动耗时
|
|
1535
1750
|
* @description
|
|
@@ -1541,9 +1756,9 @@ export declare interface MovePanoOptions extends Partial<Omit<Pose, "offset">> {
|
|
|
1541
1756
|
/** 运动曲线函数 */
|
|
1542
1757
|
easing?: (k: number) => number;
|
|
1543
1758
|
/** 运动开始回调 */
|
|
1544
|
-
moveStartCallback?: (
|
|
1759
|
+
moveStartCallback?: (panoId: WorkPanoId, toPose: Pose) => void;
|
|
1545
1760
|
/** 运动结束回调 */
|
|
1546
|
-
moveEndCallback?: (
|
|
1761
|
+
moveEndCallback?: (panoId: WorkPanoId, pose: Pose) => void;
|
|
1547
1762
|
/**
|
|
1548
1763
|
* 运动被取消回调
|
|
1549
1764
|
* @description
|
|
@@ -1556,6 +1771,7 @@ export declare interface MovePanoOptions extends Partial<Omit<Pose, "offset">> {
|
|
|
1556
1771
|
}
|
|
1557
1772
|
|
|
1558
1773
|
export declare type NetWorkMeta = {
|
|
1774
|
+
origin: string;
|
|
1559
1775
|
source: string;
|
|
1560
1776
|
headers: {
|
|
1561
1777
|
[name: string]: string;
|
|
@@ -1566,7 +1782,23 @@ export declare type NetWorkMeta = {
|
|
|
1566
1782
|
size?: number;
|
|
1567
1783
|
};
|
|
1568
1784
|
|
|
1569
|
-
export declare
|
|
1785
|
+
export declare interface NetworkOptions {
|
|
1786
|
+
/** 超时时间 */
|
|
1787
|
+
timeout?: number;
|
|
1788
|
+
/** 请求代理 */
|
|
1789
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
1790
|
+
/** 网络消息追踪 */
|
|
1791
|
+
networkSubscribe?: NetworkSubscribe;
|
|
1792
|
+
/** 安全域名 */
|
|
1793
|
+
allowHosts?: string[];
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
export declare type NetworkResponse<T = any, E extends NetWorkMeta | NetWorkMeta[] = NetWorkMeta> = {
|
|
1797
|
+
body: T;
|
|
1798
|
+
meta: E;
|
|
1799
|
+
};
|
|
1800
|
+
|
|
1801
|
+
export declare type NetworkState = "ok" | "preload" | "error" | "proxy-error" | "timeout" | "forbidden";
|
|
1570
1802
|
|
|
1571
1803
|
export declare class NetworkSubscribe extends Subscribe<{
|
|
1572
1804
|
network(source: string, type: NetworkType, state: NetworkState, detail: string): void;
|
|
@@ -1577,22 +1809,49 @@ export declare type NetworkType = "XMLHttpRequest" | "Script" | "Image" | "Link"
|
|
|
1577
1809
|
|
|
1578
1810
|
export declare class PanoCircleMesh extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1579
1811
|
needsRender: boolean;
|
|
1580
|
-
private
|
|
1581
|
-
private
|
|
1582
|
-
private
|
|
1583
|
-
private ringMesh;
|
|
1584
|
-
private progressMesh;
|
|
1585
|
-
private ringRotateMotion;
|
|
1812
|
+
private currentStartTime;
|
|
1813
|
+
private currentMotion;
|
|
1814
|
+
private ringMotion;
|
|
1586
1815
|
private tapMotion;
|
|
1816
|
+
private loadingOpacityMotion;
|
|
1587
1817
|
private progressMotion;
|
|
1588
1818
|
private progressOpacityMotion;
|
|
1589
1819
|
private opacityMotion;
|
|
1820
|
+
private disableMotion;
|
|
1590
1821
|
progress: number;
|
|
1591
1822
|
opacity: number;
|
|
1592
1823
|
current: boolean;
|
|
1593
1824
|
loading: boolean;
|
|
1594
1825
|
disabled: boolean;
|
|
1595
|
-
|
|
1826
|
+
private panoMesh;
|
|
1827
|
+
constructor(options?: PanoCircleMeshOptions);
|
|
1828
|
+
setProgress(progress: number): void;
|
|
1829
|
+
setOpacity(opacity: number): void;
|
|
1830
|
+
setCurrent(current: boolean): void;
|
|
1831
|
+
setLoading(loading: boolean): void;
|
|
1832
|
+
setDisabled(disabled: boolean): void;
|
|
1833
|
+
tap(): Promise<void>;
|
|
1834
|
+
updateTime(time: number, deltaTime: number): void;
|
|
1835
|
+
dispose(): void;
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
export declare class PanoCircleMeshCustom extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1839
|
+
needsRender: boolean;
|
|
1840
|
+
private currentStartTime;
|
|
1841
|
+
private currentMotion;
|
|
1842
|
+
private tapMotion;
|
|
1843
|
+
private loadingOpacityMotion;
|
|
1844
|
+
private progressMotion;
|
|
1845
|
+
private progressOpacityMotion;
|
|
1846
|
+
private opacityMotion;
|
|
1847
|
+
private disableMotion;
|
|
1848
|
+
progress: number;
|
|
1849
|
+
opacity: number;
|
|
1850
|
+
current: boolean;
|
|
1851
|
+
loading: boolean;
|
|
1852
|
+
disabled: boolean;
|
|
1853
|
+
private panoMesh;
|
|
1854
|
+
constructor(options?: PanoCircleMeshCustomOptions);
|
|
1596
1855
|
setProgress(progress: number): void;
|
|
1597
1856
|
setOpacity(opacity: number): void;
|
|
1598
1857
|
setCurrent(current: boolean): void;
|
|
@@ -1603,6 +1862,17 @@ export declare class PanoCircleMesh extends THREE_2.Object3D implements PanoCirc
|
|
|
1603
1862
|
dispose(): void;
|
|
1604
1863
|
}
|
|
1605
1864
|
|
|
1865
|
+
export declare interface PanoCircleMeshCustomOptions {
|
|
1866
|
+
scale?: number;
|
|
1867
|
+
color?: number;
|
|
1868
|
+
map?: THREE_2.Texture;
|
|
1869
|
+
mapAlpha?: number;
|
|
1870
|
+
borderWidth?: number;
|
|
1871
|
+
borderColor?: number;
|
|
1872
|
+
mapUseColor?: boolean;
|
|
1873
|
+
mapUseReverse?: boolean;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1606
1876
|
/**
|
|
1607
1877
|
* 地面提示点位接口
|
|
1608
1878
|
*
|
|
@@ -1636,6 +1906,43 @@ export declare interface PanoCircleMeshInterface extends THREE_2.Object3D {
|
|
|
1636
1906
|
dispose(): void;
|
|
1637
1907
|
}
|
|
1638
1908
|
|
|
1909
|
+
export declare interface PanoCircleMeshOptions {
|
|
1910
|
+
scale?: number;
|
|
1911
|
+
color?: number;
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
export declare class PanoCircleMeshSolid extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1915
|
+
needsRender: boolean;
|
|
1916
|
+
private currentStartTime;
|
|
1917
|
+
private currentMotion;
|
|
1918
|
+
private tapMotion;
|
|
1919
|
+
private loadingOpacityMotion;
|
|
1920
|
+
private progressMotion;
|
|
1921
|
+
private progressOpacityMotion;
|
|
1922
|
+
private opacityMotion;
|
|
1923
|
+
private disableMotion;
|
|
1924
|
+
progress: number;
|
|
1925
|
+
opacity: number;
|
|
1926
|
+
current: boolean;
|
|
1927
|
+
loading: boolean;
|
|
1928
|
+
disabled: boolean;
|
|
1929
|
+
private panoMesh;
|
|
1930
|
+
constructor(options?: PanoCircleMeshSolidOptions);
|
|
1931
|
+
setProgress(progress: number): void;
|
|
1932
|
+
setOpacity(opacity: number): void;
|
|
1933
|
+
setCurrent(current: boolean): void;
|
|
1934
|
+
setLoading(loading: boolean): void;
|
|
1935
|
+
setDisabled(disabled: boolean): void;
|
|
1936
|
+
tap(): Promise<void>;
|
|
1937
|
+
updateTime(time: number, deltaTime: number): void;
|
|
1938
|
+
dispose(): void;
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
export declare interface PanoCircleMeshSolidOptions {
|
|
1942
|
+
scale?: number;
|
|
1943
|
+
color?: number;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1639
1946
|
export declare interface PanoramaControllerCustomInitArgs extends PanoramaLikeControllerCustomInitArgs {
|
|
1640
1947
|
/** 最远可移动观察点距离 */
|
|
1641
1948
|
maxAccessibleDistance?: number;
|
|
@@ -1647,13 +1954,19 @@ export declare interface PanoramaControllerCustomInitArgs extends PanoramaLikeCo
|
|
|
1647
1954
|
*/
|
|
1648
1955
|
panoTapTriggerRadius?: number;
|
|
1649
1956
|
/** 地面观察点标识自定义创建器 */
|
|
1650
|
-
panoCircleMeshCreator?: () => PanoCircleMeshInterface;
|
|
1957
|
+
panoCircleMeshCreator?: (panoId: WorkPanoId) => PanoCircleMeshInterface;
|
|
1958
|
+
/**
|
|
1959
|
+
* 全景瓦片登记
|
|
1960
|
+
* @param fov - 当前 fov
|
|
1961
|
+
* @param viewSize - 当前绘制区域大小
|
|
1962
|
+
* @returns 返回瓦片等级
|
|
1963
|
+
*/
|
|
1651
1964
|
tileLevelForFov?: false | ((fov: number, viewSize: THREE_2.Vector2) => number);
|
|
1965
|
+
/** 是否开启光照自适应效果 */
|
|
1966
|
+
luminanceAdaptiveEffectEnable?: boolean;
|
|
1652
1967
|
}
|
|
1653
1968
|
|
|
1654
1969
|
export declare interface PanoramaLikeControllerCustomInitArgs {
|
|
1655
|
-
/** 默认相机偏航角 */
|
|
1656
|
-
defaultLongitude?: number;
|
|
1657
1970
|
/** 默认相机俯仰角 */
|
|
1658
1971
|
defaultLatitude?: number;
|
|
1659
1972
|
/** 最大相机俯仰角 */
|
|
@@ -1682,32 +1995,45 @@ export declare interface PanoramaLikeControllerCustomInitArgs {
|
|
|
1682
1995
|
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
1683
1996
|
* @returns - 签署过的 Work 数据结构
|
|
1684
1997
|
*/
|
|
1685
|
-
export declare function parseWork(obj: Work | LooseWork | string | any, options?: ParseWorkOptions
|
|
1998
|
+
export declare function parseWork(obj: Work | LooseWork | string | any, options?: ParseWorkOptions): Work;
|
|
1686
1999
|
|
|
1687
2000
|
export declare type ParseWorkOptions = {
|
|
1688
|
-
/**
|
|
2001
|
+
/** 重写资源前缀 */
|
|
1689
2002
|
baseURL?: string;
|
|
1690
|
-
/**
|
|
2003
|
+
/** 资源地址使用短地址 */
|
|
1691
2004
|
shortPath?: boolean;
|
|
1692
|
-
/**
|
|
2005
|
+
/** 资源使用 jsonp 方式发布 */
|
|
1693
2006
|
jsonp?: boolean;
|
|
1694
|
-
/**
|
|
1695
|
-
|
|
2007
|
+
/** 调试 */
|
|
2008
|
+
debug?: boolean;
|
|
2009
|
+
/** 位姿 */
|
|
2010
|
+
transform?: THREE_2.Matrix4 | number[];
|
|
2011
|
+
/** 可视区域 */
|
|
2012
|
+
viewerRequestVolume?: BoundingVolume | BoundingVolumeJson;
|
|
2013
|
+
/** 模型显示最大细化层级 */
|
|
2014
|
+
modelMaxLevelOfDetail?: number;
|
|
2015
|
+
/** 模型最大内存缓存 */
|
|
2016
|
+
modelMaxMemoryUsage?: number;
|
|
2017
|
+
/** 模型网络最大请求并发数 */
|
|
2018
|
+
modelMaxRequests?: number;
|
|
2019
|
+
/** 模型屏幕空间误差计算最大值 */
|
|
2020
|
+
modelMaxScreenSpaceError?: number;
|
|
1696
2021
|
};
|
|
1697
2022
|
|
|
1698
2023
|
/** PBM 模型组 */
|
|
1699
2024
|
export declare class PBMContainer extends THREE_2.Group {
|
|
2025
|
+
pbmMaterialParametersVersion: number;
|
|
1700
2026
|
/** 是否需要更新按需渲染 */
|
|
1701
2027
|
needsRender: boolean;
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
setTransparent(bool: boolean): void;
|
|
2028
|
+
/** 当前样式参数 */
|
|
2029
|
+
materialParameters: PBMParameters;
|
|
2030
|
+
cache: PBMMaterialReferenceCache;
|
|
2031
|
+
constructor();
|
|
1707
2032
|
/** 获取材质参数 */
|
|
1708
|
-
getMaterial(): PBMParameters
|
|
2033
|
+
getMaterial(): PBMParameters;
|
|
1709
2034
|
/** 设置材质参数 */
|
|
1710
2035
|
setMaterial(parameters: Partial<PBMParameters>): void;
|
|
2036
|
+
update(renderer: THREE_2.WebGLRenderer, camera: Camera): void;
|
|
1711
2037
|
/** 析构材质 */
|
|
1712
2038
|
disposeMaterial(): void;
|
|
1713
2039
|
/** 析构模型网格 */
|
|
@@ -1715,13 +2041,33 @@ export declare class PBMContainer extends THREE_2.Group {
|
|
|
1715
2041
|
}
|
|
1716
2042
|
|
|
1717
2043
|
/** PBM 模型组 */
|
|
1718
|
-
export declare class PBMGroup extends
|
|
1719
|
-
|
|
1720
|
-
|
|
2044
|
+
export declare class PBMGroup extends THREE_2.Group {
|
|
2045
|
+
needsRender: boolean;
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
export declare class PBMMaterialReferenceCache {
|
|
2049
|
+
cache: Record<string, {
|
|
2050
|
+
count: number;
|
|
2051
|
+
value: any;
|
|
2052
|
+
dispose: () => void;
|
|
2053
|
+
}>;
|
|
2054
|
+
clear(): void;
|
|
2055
|
+
get<T>(key: string, create: () => {
|
|
2056
|
+
value: T;
|
|
2057
|
+
dispose: () => void;
|
|
2058
|
+
}): T;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
/** PBM 对象 */
|
|
2062
|
+
export declare class PBMMesh extends THREE_2.Mesh<THREE_2.BufferGeometry, PBMMeshMaterial[]> {
|
|
2063
|
+
/** 是否需要更新按需渲染 */
|
|
2064
|
+
needsRender: boolean;
|
|
1721
2065
|
}
|
|
1722
2066
|
|
|
1723
2067
|
/** PBM 材质 */
|
|
1724
|
-
export declare class
|
|
2068
|
+
export declare class PBMMeshMaterial extends THREE_2.ShaderMaterial implements PBMParameters {
|
|
2069
|
+
/** 更新版本 */
|
|
2070
|
+
pbmMaterialParametersVersion: number;
|
|
1725
2071
|
/** 起始点 */
|
|
1726
2072
|
pano0: PBMPanoPicture | null;
|
|
1727
2073
|
/** 结束点 */
|
|
@@ -1732,26 +2078,41 @@ export declare class PBMMaterial extends THREE_2.ShaderMaterial implements PBMPa
|
|
|
1732
2078
|
progress: number;
|
|
1733
2079
|
/** 全景图通过过度黑色混合 */
|
|
1734
2080
|
useBlackTransition: boolean;
|
|
1735
|
-
perspToOrtho: number;
|
|
1736
2081
|
/** 模型透明度 */
|
|
1737
2082
|
opacity: number;
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
/** PBM 对象 */
|
|
1743
|
-
export declare class PBMMesh extends THREE_2.Mesh<THREE_2.BufferGeometry, PBMMaterial[]> {
|
|
1744
|
-
/** 楼层序号 */
|
|
2083
|
+
/** 模型颜色*/
|
|
2084
|
+
constantColor: THREE_2.Vector3 | null;
|
|
2085
|
+
/** 楼层参数*/
|
|
1745
2086
|
floorIndex: number;
|
|
1746
|
-
/**
|
|
1747
|
-
|
|
2087
|
+
/** 对外模型裁切参数*/
|
|
2088
|
+
clippers: ClipperParameter[] | null;
|
|
2089
|
+
/** edl*/
|
|
2090
|
+
useEDL: boolean;
|
|
2091
|
+
/** 点云着色方式*/
|
|
2092
|
+
pointColorType: PBMPointColorType;
|
|
2093
|
+
/** 点云大小绘制方式*/
|
|
2094
|
+
pointSizeType: PBMPointSizeType;
|
|
2095
|
+
/** 点云形状*/
|
|
2096
|
+
pointShape: PBMPointShapeType;
|
|
2097
|
+
/** 点云基础大小*/
|
|
2098
|
+
pointSize: number;
|
|
2099
|
+
/** 自适应点云大小因子*/
|
|
2100
|
+
pointSizeAdaptiveScale: number;
|
|
2101
|
+
/** 点云最大尺寸*/
|
|
2102
|
+
pointMinSize: number;
|
|
2103
|
+
/** 点云最小尺寸*/
|
|
2104
|
+
pointMaxSize: number;
|
|
2105
|
+
/** 高程彩色图*/
|
|
2106
|
+
gradientTexture: THREE_2.Texture | null;
|
|
2107
|
+
constructor(parameters?: Partial<PBMParameters>);
|
|
2108
|
+
update(renderer: THREE_2.WebGLRenderer, camera: Camera, cache: PBMMaterialReferenceCache): void;
|
|
1748
2109
|
}
|
|
1749
2110
|
|
|
1750
2111
|
export declare interface PBMPanoPicture {
|
|
1751
2112
|
/** 起始点位全景图 */
|
|
1752
|
-
map: THREE_2.CubeTexture;
|
|
2113
|
+
map: THREE_2.CubeTexture | TileCubeTextureTarget;
|
|
1753
2114
|
/** 亮度增益 */
|
|
1754
|
-
luminanceMap: THREE_2.CubeTexture |
|
|
2115
|
+
luminanceMap: null | THREE_2.CubeTexture | TileCubeTextureTarget;
|
|
1755
2116
|
/** 起始点全景图变换矩阵 4x4 */
|
|
1756
2117
|
matrix: THREE_2.Matrix4;
|
|
1757
2118
|
}
|
|
@@ -1768,9 +2129,47 @@ export declare interface PBMParameters {
|
|
|
1768
2129
|
progress: number;
|
|
1769
2130
|
/** 全景图通过过度黑色混合 */
|
|
1770
2131
|
useBlackTransition: boolean;
|
|
1771
|
-
perspToOrtho: number;
|
|
1772
2132
|
/** 模型透明度 */
|
|
1773
2133
|
opacity: number;
|
|
2134
|
+
/** 楼层参数*/
|
|
2135
|
+
floorIndex: number;
|
|
2136
|
+
/** 模型裁切参数(工程侧调用)*/
|
|
2137
|
+
clippers: ClipperParameter[] | null;
|
|
2138
|
+
/** 模型颜色*/
|
|
2139
|
+
constantColor: THREE_2.Vector3 | null;
|
|
2140
|
+
/** 是否使用EDL*/
|
|
2141
|
+
useEDL: boolean;
|
|
2142
|
+
/** 点云形状*/
|
|
2143
|
+
pointShape: PBMPointShapeType;
|
|
2144
|
+
/** 点云着色方式*/
|
|
2145
|
+
pointColorType: PBMPointColorType;
|
|
2146
|
+
/** 点云大小绘制方式*/
|
|
2147
|
+
pointSizeType: PBMPointSizeType;
|
|
2148
|
+
/** 点云基础大小*/
|
|
2149
|
+
pointSize: number;
|
|
2150
|
+
/** 点云最大尺寸*/
|
|
2151
|
+
pointMinSize: number;
|
|
2152
|
+
/** 点云最小尺寸*/
|
|
2153
|
+
pointMaxSize: number;
|
|
2154
|
+
/** 自适应点云尺寸因子*/
|
|
2155
|
+
pointSizeAdaptiveScale: number;
|
|
2156
|
+
/** 高程彩色图*/
|
|
2157
|
+
gradientTexture: THREE_2.Texture | null;
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
export declare enum PBMPointColorType {
|
|
2161
|
+
RGB = "rgb",
|
|
2162
|
+
ALTITUDE = "altitude"
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
export declare enum PBMPointShapeType {
|
|
2166
|
+
SQUARE = "square",
|
|
2167
|
+
CIRCLE = "circle"
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
export declare enum PBMPointSizeType {
|
|
2171
|
+
FIXED = "fixed",
|
|
2172
|
+
ADAPTIVE = "adaptive"
|
|
1774
2173
|
}
|
|
1775
2174
|
|
|
1776
2175
|
/**
|
|
@@ -1778,17 +2177,87 @@ export declare interface PBMParameters {
|
|
|
1778
2177
|
* [[include: coordinate.md]]
|
|
1779
2178
|
*/
|
|
1780
2179
|
export declare interface Pose {
|
|
1781
|
-
/** 相机俯仰角 */
|
|
1782
|
-
longitude: number;
|
|
1783
2180
|
/** 相机偏航角 */
|
|
2181
|
+
longitude: number;
|
|
2182
|
+
/** 相机俯仰角 */
|
|
1784
2183
|
latitude: number;
|
|
1785
2184
|
/** 相机可视角度(垂直)*/
|
|
1786
2185
|
fov: number;
|
|
1787
2186
|
/** 相机位置*/
|
|
1788
2187
|
offset: THREE_2.Vector3;
|
|
2188
|
+
/** 相机距离 */
|
|
2189
|
+
distance: number;
|
|
1789
2190
|
}
|
|
1790
2191
|
|
|
1791
|
-
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"];
|
|
2192
|
+
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"];
|
|
2193
|
+
|
|
2194
|
+
export declare class RegionBoundingVolume implements BoundingVolume {
|
|
2195
|
+
type: "regin";
|
|
2196
|
+
west: number;
|
|
2197
|
+
south: number;
|
|
2198
|
+
east: number;
|
|
2199
|
+
north: number;
|
|
2200
|
+
minHeight: number;
|
|
2201
|
+
maxHeight: number;
|
|
2202
|
+
constructor();
|
|
2203
|
+
fromJson({ region }: RegionBoundingVolumeJson): this;
|
|
2204
|
+
toJson(): RegionBoundingVolumeJson;
|
|
2205
|
+
copy(regionBoundingVolume: RegionBoundingVolume): this;
|
|
2206
|
+
clone(): RegionBoundingVolume;
|
|
2207
|
+
getBoundingBox(target: THREE_2.Box3): THREE_2.Box3;
|
|
2208
|
+
toGeometry(): THREE_2.BufferGeometry;
|
|
2209
|
+
applyMatrix4(matrix: THREE_2.Matrix4): this;
|
|
2210
|
+
getCenter(result: THREE_2.Vector3): THREE_2.Vector3;
|
|
2211
|
+
distanceTo(point: THREE_2.Vector3): number;
|
|
2212
|
+
distanceSquaredTo(point: THREE_2.Vector3): number;
|
|
2213
|
+
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
2214
|
+
intersectRay(ray: THREE_2.Ray): boolean;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
export declare type RegionBoundingVolumeJson = {
|
|
2218
|
+
region: number[];
|
|
2219
|
+
};
|
|
2220
|
+
|
|
2221
|
+
export declare type RequestResult = null | {
|
|
2222
|
+
done: () => void;
|
|
2223
|
+
};
|
|
2224
|
+
|
|
2225
|
+
/**
|
|
2226
|
+
* Used to issue a request, without having them "deeply queued" by the browser.
|
|
2227
|
+
* @todo - Track requests globally, across multiple servers
|
|
2228
|
+
*/
|
|
2229
|
+
export declare class RequestScheduler<Identiy> {
|
|
2230
|
+
static DEFAULT_MAX_REQUESTS: number;
|
|
2231
|
+
maxRequests: number;
|
|
2232
|
+
private activeRequests;
|
|
2233
|
+
/** Tracks the number of active requests and prioritizes/cancels queued requests. */
|
|
2234
|
+
private requestQueue;
|
|
2235
|
+
private requestMap;
|
|
2236
|
+
private deferred;
|
|
2237
|
+
constructor();
|
|
2238
|
+
/**
|
|
2239
|
+
* Called by an application that wants to issue a request, without having it deeply queued by the browser
|
|
2240
|
+
*
|
|
2241
|
+
* When the returned promise resolved, it is OK for the application to issue a request.
|
|
2242
|
+
* The promise resolves to an object that contains a `done` method.
|
|
2243
|
+
* When the application's request has completed (or failed), the application must call the `done` function
|
|
2244
|
+
*
|
|
2245
|
+
* @param identiy - Identiy
|
|
2246
|
+
* @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
|
|
2247
|
+
* @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
|
|
2248
|
+
*/
|
|
2249
|
+
scheduleRequest(identiy: Identiy, getPriority: (identiy: Identiy) => number): Promise<RequestResult>;
|
|
2250
|
+
reset(): void;
|
|
2251
|
+
private issueRequest;
|
|
2252
|
+
/** We check requests asynchronously, to prevent multiple updates */
|
|
2253
|
+
private issueNewRequests;
|
|
2254
|
+
/** Refresh all requests */
|
|
2255
|
+
private issueNewRequestsAsync;
|
|
2256
|
+
/** Ensure all requests have updated priorities, and that no longer valid requests are cancelled */
|
|
2257
|
+
private updateAllRequests;
|
|
2258
|
+
/** Update a single request by calling the callback */
|
|
2259
|
+
private updateRequest;
|
|
2260
|
+
}
|
|
1792
2261
|
|
|
1793
2262
|
/** Five 场景*/
|
|
1794
2263
|
export declare class Scene extends THREE_2.Scene {
|
|
@@ -1814,6 +2283,29 @@ export declare interface Scissor {
|
|
|
1814
2283
|
height: number;
|
|
1815
2284
|
}
|
|
1816
2285
|
|
|
2286
|
+
export declare class SphereBoundingVolume implements BoundingVolume {
|
|
2287
|
+
type: "sphere";
|
|
2288
|
+
center: THREE_2.Vector3;
|
|
2289
|
+
radius: number;
|
|
2290
|
+
constructor();
|
|
2291
|
+
fromJson({ sphere }: SphereBoundingVolumeJson): this;
|
|
2292
|
+
toJson(): SphereBoundingVolumeJson;
|
|
2293
|
+
copy(sphereBoundingVolume: SphereBoundingVolume): this;
|
|
2294
|
+
clone(): SphereBoundingVolume;
|
|
2295
|
+
getBoundingBox(target: THREE_2.Box3): THREE_2.Box3;
|
|
2296
|
+
toGeometry(): THREE_2.BufferGeometry;
|
|
2297
|
+
applyMatrix4(matrix: THREE_2.Matrix4): this;
|
|
2298
|
+
getCenter(result: THREE_2.Vector3): THREE_2.Vector3;
|
|
2299
|
+
distanceSquaredTo(point: THREE_2.Vector3): number;
|
|
2300
|
+
distanceTo(point: THREE_2.Vector3): number;
|
|
2301
|
+
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
2302
|
+
intersectRay(ray: THREE_2.Ray): boolean;
|
|
2303
|
+
}
|
|
2304
|
+
|
|
2305
|
+
export declare type SphereBoundingVolumeJson = {
|
|
2306
|
+
sphere: number[];
|
|
2307
|
+
};
|
|
2308
|
+
|
|
1817
2309
|
/**
|
|
1818
2310
|
* 状态
|
|
1819
2311
|
* @description
|
|
@@ -1828,6 +2320,8 @@ export declare interface State extends Pose {
|
|
|
1828
2320
|
mode: Mode;
|
|
1829
2321
|
/** 观察点序号 */
|
|
1830
2322
|
panoIndex: number;
|
|
2323
|
+
/** 观察点id */
|
|
2324
|
+
panoId: string;
|
|
1831
2325
|
}
|
|
1832
2326
|
|
|
1833
2327
|
/**
|
|
@@ -1884,6 +2378,13 @@ export declare class Subscribe<T extends SubscribeEventMap> {
|
|
|
1884
2378
|
* @template K - 预设的监听事件名称
|
|
1885
2379
|
*/
|
|
1886
2380
|
emit<K extends keyof T>(name: K, ...data: Parameters<T[K]>): boolean;
|
|
2381
|
+
/**
|
|
2382
|
+
* 等待事件
|
|
2383
|
+
* @param name - 事件类型
|
|
2384
|
+
* @returns 触发事件的数据
|
|
2385
|
+
* @template K - 预设的监听事件名称
|
|
2386
|
+
*/
|
|
2387
|
+
waitUnitl<K extends keyof T>(name: K): Promise<Parameters<T[K]>>;
|
|
1887
2388
|
}
|
|
1888
2389
|
|
|
1889
2390
|
export declare type SubscribeEventMap = {
|
|
@@ -1906,6 +2407,52 @@ export declare namespace SubscribeMixinType {
|
|
|
1906
2407
|
export interface emit<T extends SubscribeEventMap> {
|
|
1907
2408
|
<K extends keyof T>(name: K, ...data: Parameters<T[K]>): boolean;
|
|
1908
2409
|
}
|
|
2410
|
+
export interface waitUnitl<T extends SubscribeEventMap> {
|
|
2411
|
+
<K extends keyof T>(name: K): Promise<Parameters<T[K]>>;
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
export declare class TextureLoader {
|
|
2416
|
+
loadTexture(source: string, options?: {
|
|
2417
|
+
imageURL?: {
|
|
2418
|
+
transform?: (source: string, options: ImageURLOptions) => string;
|
|
2419
|
+
options?: ImageURLOptions;
|
|
2420
|
+
};
|
|
2421
|
+
flipY?: boolean;
|
|
2422
|
+
format?: THREE_2.PixelFormat;
|
|
2423
|
+
minFilter?: THREE_2.TextureFilter;
|
|
2424
|
+
magFilter?: THREE_2.TextureFilter;
|
|
2425
|
+
wrapS?: THREE_2.Wrapping;
|
|
2426
|
+
wrapT?: THREE_2.Wrapping;
|
|
2427
|
+
maxSize?: THREE_2.Vector2;
|
|
2428
|
+
viaAjax?: boolean;
|
|
2429
|
+
} & 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>>;
|
|
2430
|
+
loadCubeTexture(sources: WorkCubeImage, options: {
|
|
2431
|
+
imageURL?: {
|
|
2432
|
+
transform?: (source: string, options: ImageURLOptions) => string;
|
|
2433
|
+
options?: ImageURLOptions;
|
|
2434
|
+
};
|
|
2435
|
+
format?: THREE_2.PixelFormat;
|
|
2436
|
+
minFilter?: THREE_2.TextureFilter;
|
|
2437
|
+
magFilter?: THREE_2.TextureFilter;
|
|
2438
|
+
wrapS?: THREE_2.Wrapping;
|
|
2439
|
+
wrapT?: THREE_2.Wrapping;
|
|
2440
|
+
viaAjax?: boolean;
|
|
2441
|
+
} & 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[]>>;
|
|
2442
|
+
loadTiledCubeTexture(sources: WorkCubeImage, tileSources: WorkTile[], options: {
|
|
2443
|
+
tileImageSize?: number;
|
|
2444
|
+
tileMaxLevel?: number;
|
|
2445
|
+
imageURL?: {
|
|
2446
|
+
transform?: (source: string, options: ImageURLOptions) => string;
|
|
2447
|
+
options?: ImageURLOptions;
|
|
2448
|
+
};
|
|
2449
|
+
format?: THREE_2.PixelFormat;
|
|
2450
|
+
minFilter?: THREE_2.TextureFilter;
|
|
2451
|
+
magFilter?: THREE_2.TextureFilter;
|
|
2452
|
+
wrapS?: THREE_2.Wrapping;
|
|
2453
|
+
wrapT?: THREE_2.Wrapping;
|
|
2454
|
+
viaAjax?: boolean;
|
|
2455
|
+
} & NetworkOptions, onLoad: (response: NetworkResponse<TileCubeTextureTarget, NetWorkMeta[]>) => void, onError: (error: Error) => void, onProgress: (percent: number) => void, renderer: THREE_2.WebGLRenderer): Promise<NetworkResponse<TileCubeTextureTarget, NetWorkMeta[]>>;
|
|
1909
2456
|
}
|
|
1910
2457
|
|
|
1911
2458
|
/**
|
|
@@ -1927,19 +2474,350 @@ export declare interface TextureOptions {
|
|
|
1927
2474
|
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
1928
2475
|
/** 针对 textureOptions 是否自动通过模型贴图的数量计算需要的模型贴图的尺寸 默认 true */
|
|
1929
2476
|
autoResize?: boolean;
|
|
2477
|
+
/** 锐化参数 海外不支持 */
|
|
2478
|
+
sharpen?: number;
|
|
2479
|
+
mappings?: ImageURLMappings;
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
export declare class Tile {
|
|
2483
|
+
id: string;
|
|
2484
|
+
tileset: Tileset;
|
|
2485
|
+
parent: Tile | null;
|
|
2486
|
+
geometricError: number;
|
|
2487
|
+
type: 'SCENEGRAPH' | 'EMPTY' | 'TILESET' | 'MESH';
|
|
2488
|
+
content: {
|
|
2489
|
+
uri: string;
|
|
2490
|
+
group?: number;
|
|
2491
|
+
boundingVolume?: BoundingVolume;
|
|
2492
|
+
data?: TileContentData;
|
|
2493
|
+
loadState: 'LOADING' | 'UNLOADED' | 'READY' | 'FAILED';
|
|
2494
|
+
byteLength: number;
|
|
2495
|
+
} | null;
|
|
2496
|
+
extras: Record<string, any>;
|
|
2497
|
+
refine: TileHeader['refine'];
|
|
2498
|
+
boundingVolume?: BoundingVolume;
|
|
2499
|
+
viewerRequestVolume?: BoundingVolume;
|
|
2500
|
+
transform: THREE_2.Matrix4;
|
|
2501
|
+
children: Tile[];
|
|
2502
|
+
state: {
|
|
2503
|
+
visible: boolean;
|
|
2504
|
+
frameNumber: number;
|
|
2505
|
+
selectedFrameNumber: number;
|
|
2506
|
+
requestedFrameNumber: number;
|
|
2507
|
+
touchedFrameNumber: number;
|
|
2508
|
+
selectionDepth: number;
|
|
2509
|
+
centerZDepth: number;
|
|
2510
|
+
shouldRefine: boolean;
|
|
2511
|
+
distanceToCamera: number;
|
|
2512
|
+
screenSpaceError: number;
|
|
2513
|
+
inRequestVolume: boolean;
|
|
2514
|
+
visibilityPlaneMask: number;
|
|
2515
|
+
};
|
|
2516
|
+
constructor(id: string, header: TileHeader, tileset: Tileset, parent?: Tile);
|
|
2517
|
+
updateState(frameState: TilesetFrameState): void;
|
|
2518
|
+
get selected(): boolean;
|
|
2519
|
+
get hasChildren(): boolean;
|
|
2520
|
+
get siblingIndex(): number;
|
|
2521
|
+
get hasTilesetContent(): boolean;
|
|
2522
|
+
get hasRenderContent(): boolean;
|
|
2523
|
+
get contentAvailable(): boolean;
|
|
2524
|
+
get hasUnloadedContent(): boolean;
|
|
2525
|
+
get hasEmptyContent(): boolean;
|
|
2526
|
+
get contentReady(): boolean;
|
|
2527
|
+
get contentByteLength(): number;
|
|
2528
|
+
loadContent(): Promise<boolean>;
|
|
2529
|
+
unloadContent(): boolean;
|
|
2530
|
+
getScreenSpaceError(frameState: TilesetFrameState, distanceToCamera: number, useParentGeometricError: boolean): number;
|
|
2531
|
+
private getPriority;
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
export declare class Tile3DModel extends THREE_2.Object3D {
|
|
2535
|
+
static DEFAULT_MAX_LEVEL_OF_DETAIL: number;
|
|
2536
|
+
static DEFAULT_MAX_MEMORY_USAGE: number;
|
|
2537
|
+
static DEFAULT_MAX_SCREEN_SPACE_ERROR: number;
|
|
2538
|
+
static DEFAULT_MAX_REQUESTS: number;
|
|
2539
|
+
workCode: string;
|
|
2540
|
+
tileset: Tileset;
|
|
2541
|
+
maxLevelOfDetail: number;
|
|
2542
|
+
boundingBox: THREE_2.Box3;
|
|
2543
|
+
needsRefined: boolean;
|
|
2544
|
+
refined: boolean;
|
|
2545
|
+
disposed: boolean;
|
|
2546
|
+
needsRender: boolean;
|
|
2547
|
+
lastRefineTime: number;
|
|
2548
|
+
private nodeGroup;
|
|
2549
|
+
private debugBoundingGroup;
|
|
2550
|
+
private nodes;
|
|
2551
|
+
private debugBoundings;
|
|
2552
|
+
private unloadTileQueue;
|
|
2553
|
+
constructor(workCode: string, tilesetHeader: TilesetHeader, options: Partial<Tile3DModelLoaderOptions>);
|
|
2554
|
+
get debug(): boolean;
|
|
2555
|
+
set debug(value: boolean);
|
|
2556
|
+
get maxMemoryUsage(): number;
|
|
2557
|
+
set maxMemoryUsage(value: number);
|
|
2558
|
+
get viewDistanceScale(): number;
|
|
2559
|
+
set viewDistanceScale(value: number);
|
|
2560
|
+
get maxRequests(): number;
|
|
2561
|
+
set maxRequests(value: number);
|
|
2562
|
+
get maxScreenSpaceError(): number;
|
|
2563
|
+
set maxScreenSpaceError(value: number);
|
|
2564
|
+
loadContent(tile: Tile, options: {
|
|
2565
|
+
allowHosts?: string[];
|
|
2566
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
2567
|
+
networkSubscribe?: NetworkSubscribe;
|
|
2568
|
+
}): Promise<boolean>;
|
|
2569
|
+
intersectRaycaster(raycaster: THREE_2.Raycaster): Intersection[];
|
|
2570
|
+
update(renderer: THREE_2.WebGLRenderer, camera: Camera): void;
|
|
2571
|
+
dispose(): void;
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
/** Advanced loader options */
|
|
2575
|
+
export declare interface Tile3DModelLoaderOptions {
|
|
2576
|
+
resourcePath: string;
|
|
2577
|
+
allowHosts?: string[];
|
|
2578
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
2579
|
+
networkSubscribe?: NetworkSubscribe;
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
export declare type TileContentData = {
|
|
2583
|
+
type: 'b3dm' | 'pnts' | 'at3d' | 'pbm';
|
|
2584
|
+
byteLength: number;
|
|
2585
|
+
uri: string;
|
|
2586
|
+
object: TileNode;
|
|
2587
|
+
};
|
|
2588
|
+
|
|
2589
|
+
export declare interface TileCubeNode {
|
|
2590
|
+
level: number;
|
|
2591
|
+
face: "up" | "down" | "left" | "right" | "front" | "back";
|
|
2592
|
+
position: THREE_2.Vector2;
|
|
2593
|
+
size: number;
|
|
2594
|
+
box: THREE_2.Box3;
|
|
2595
|
+
children: TileCubeNode[];
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
export declare class TileCubeTextureTarget {
|
|
2599
|
+
private tileTree;
|
|
2600
|
+
private tileSources;
|
|
2601
|
+
private options;
|
|
2602
|
+
private renderer;
|
|
2603
|
+
name: string;
|
|
2604
|
+
needsRender: boolean;
|
|
2605
|
+
private disposed;
|
|
2606
|
+
private loadedCubeNodes;
|
|
2607
|
+
private loadingCubeNodes;
|
|
2608
|
+
private baseCubeTexture;
|
|
2609
|
+
private _cubeRenderTarget;
|
|
2610
|
+
private textures;
|
|
2611
|
+
constructor(baseCubeTexture: THREE_2.CubeTexture, tileTree: TileCubeTree, tileSources: WorkTile[], options: {
|
|
2612
|
+
textureSize: number;
|
|
2613
|
+
tileImageSize: number;
|
|
2614
|
+
textureLoader: TextureLoader;
|
|
2615
|
+
imageURL?: {
|
|
2616
|
+
transform?: (source: string, options: ImageURLOptions) => string;
|
|
2617
|
+
options?: ImageURLOptions;
|
|
2618
|
+
};
|
|
2619
|
+
format?: THREE_2.PixelFormat;
|
|
2620
|
+
minFilter?: THREE_2.TextureFilter;
|
|
2621
|
+
magFilter?: THREE_2.TextureFilter;
|
|
2622
|
+
wrapS?: THREE_2.Wrapping;
|
|
2623
|
+
wrapT?: THREE_2.Wrapping;
|
|
2624
|
+
} & NetworkOptions, renderer: THREE_2.WebGLRenderer);
|
|
2625
|
+
get cubeRenderTarget(): THREE_2.WebGLCubeRenderTarget | null;
|
|
2626
|
+
set cubeRenderTarget(cubeRenderTarget: THREE_2.WebGLCubeRenderTarget | null);
|
|
2627
|
+
private requestTile;
|
|
2628
|
+
update(frustum: THREE_2.Frustum, level: number): void;
|
|
2629
|
+
get tilePending(): number;
|
|
2630
|
+
get texture(): THREE_2.Texture;
|
|
2631
|
+
dispose(): void;
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
export declare interface TileCubeTree {
|
|
2635
|
+
children: TileCubeNode[];
|
|
2636
|
+
}
|
|
2637
|
+
|
|
2638
|
+
export declare interface TileHeader {
|
|
2639
|
+
content?: {
|
|
2640
|
+
uri: string;
|
|
2641
|
+
group?: number;
|
|
2642
|
+
boundingVolume?: BoundingVolumeJson;
|
|
2643
|
+
};
|
|
2644
|
+
geometricError: number;
|
|
2645
|
+
refine?: "REPLACE" | "ADD";
|
|
2646
|
+
boundingVolume?: BoundingVolumeJson;
|
|
2647
|
+
viewerRequestVolume?: BoundingVolumeJson;
|
|
2648
|
+
transform?: number[];
|
|
2649
|
+
children?: TileHeader[];
|
|
2650
|
+
extras?: Record<string, any>;
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2653
|
+
export declare class TileNode extends THREE_2.Group {
|
|
2654
|
+
bvhTree: BVH | undefined;
|
|
2655
|
+
objType: 'mesh' | 'points';
|
|
2656
|
+
constructor(obj: THREE_2.Object3D, objType: 'mesh' | 'points');
|
|
2657
|
+
buildBvhTree(): void;
|
|
2658
|
+
intersectRaycaster(raycaster: THREE_2.Raycaster): Intersection[];
|
|
2659
|
+
dispose(): void;
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
export declare class Tileset {
|
|
2663
|
+
static DEFAULT_VIEW_DISTANCE_SCALE: number;
|
|
2664
|
+
static DEFAULT_MAX_MEMORY_USAGE: number;
|
|
2665
|
+
static DEFAULT_MAX_SCREEN_SPACE_ERROR: number;
|
|
2666
|
+
static DEFAULT_MAX_REQUESTS: number;
|
|
2667
|
+
asset: {
|
|
2668
|
+
version: string;
|
|
2669
|
+
tilesetVersion: string;
|
|
2670
|
+
gltfUpAxis: "X" | "Y" | "Z";
|
|
2671
|
+
};
|
|
2672
|
+
id: string;
|
|
2673
|
+
frameNumber: number;
|
|
2674
|
+
properties: Record<string, any>;
|
|
2675
|
+
options: TilesetOptions;
|
|
2676
|
+
root: Tile;
|
|
2677
|
+
transfrom: THREE_2.Matrix4;
|
|
2678
|
+
geometricError: number;
|
|
2679
|
+
traverser: TilesetTraverser;
|
|
2680
|
+
cache: TilesetCache;
|
|
2681
|
+
requestScheduler: RequestScheduler<string>;
|
|
2682
|
+
private memoryUsageInBytes;
|
|
2683
|
+
maxMemoryUsage: number;
|
|
2684
|
+
viewDistanceScale: number;
|
|
2685
|
+
tiles: Map<string, Tile>;
|
|
2686
|
+
private pendingCount;
|
|
2687
|
+
constructor(id: string, header: TilesetHeader, options: TilesetOptions);
|
|
2688
|
+
get maxRequests(): number;
|
|
2689
|
+
set maxRequests(value: number);
|
|
2690
|
+
get maxScreenSpaceError(): number;
|
|
2691
|
+
set maxScreenSpaceError(value: number);
|
|
2692
|
+
get selectedTiles(): Map<string, Tile>;
|
|
2693
|
+
get needsRefinedTiles(): Map<string, Tile>;
|
|
2694
|
+
/** Release resources */
|
|
2695
|
+
reset(): void;
|
|
2696
|
+
/** Is the tileset loaded (update needs to have been called at least once) */
|
|
2697
|
+
isLoaded(): boolean;
|
|
2698
|
+
/**
|
|
2699
|
+
* The callback to post-process tiles after traversal procedure
|
|
2700
|
+
* @param frameState - frame state for tile culling
|
|
2701
|
+
*/
|
|
2702
|
+
private onTraversalEnd;
|
|
2703
|
+
loadTile(tile: Tile): void;
|
|
2704
|
+
unloadTile(tile: Tile): void;
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2707
|
+
export declare class TilesetCache {
|
|
2708
|
+
private cacheNodeMap;
|
|
2709
|
+
private list;
|
|
2710
|
+
private sentinel;
|
|
2711
|
+
constructor();
|
|
2712
|
+
reset(): void;
|
|
2713
|
+
touch(tile: Tile): void;
|
|
2714
|
+
add(tile: Tile, addCallback?: (tile: Tile) => void): void;
|
|
2715
|
+
unloadTile(tile: Tile, unloadCallback?: (tile: Tile) => void): void;
|
|
2716
|
+
unloadTiles(isOverMemory: () => boolean, unloadCallback?: (tile: Tile) => void): void;
|
|
2717
|
+
toArray(): Tile[];
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
export declare type TilesetFrameState = {
|
|
2721
|
+
camera: {
|
|
2722
|
+
position: THREE.Vector3;
|
|
2723
|
+
direction: THREE.Vector3;
|
|
2724
|
+
up: THREE.Vector3;
|
|
2725
|
+
};
|
|
2726
|
+
height: number;
|
|
2727
|
+
cullingVolume: CullingVolume;
|
|
2728
|
+
frameNumber: number;
|
|
2729
|
+
sseDenominator: number;
|
|
2730
|
+
maxLevelOfDetail: number;
|
|
2731
|
+
};
|
|
2732
|
+
|
|
2733
|
+
export declare interface TilesetHeader {
|
|
2734
|
+
asset: {
|
|
2735
|
+
version: string;
|
|
2736
|
+
tilesetVersion?: string;
|
|
2737
|
+
gltfUpAxis?: "X" | "Y" | "Z";
|
|
2738
|
+
};
|
|
2739
|
+
properties?: Record<string, any>;
|
|
2740
|
+
geometricError: number;
|
|
2741
|
+
root: TileHeader;
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
export declare interface TilesetOptions {
|
|
2745
|
+
onTileLoad: (tile: Tile) => any;
|
|
2746
|
+
onTileUnload: (tile: Tile) => any;
|
|
2747
|
+
onTileError: (tile: Tile, message: string) => any;
|
|
2748
|
+
contentLoader: (tile: Tile) => Promise<boolean>;
|
|
2749
|
+
allowHosts?: string[];
|
|
2750
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
2751
|
+
networkSubscribe?: NetworkSubscribe;
|
|
2752
|
+
}
|
|
2753
|
+
|
|
2754
|
+
export declare class TilesetTraverser {
|
|
2755
|
+
static DEFAULT_SKIP_LEVEL_OF_DETAIL: boolean;
|
|
2756
|
+
static DEFAULT_LOAD_SIBLINGS: boolean;
|
|
2757
|
+
static DEFAULT_MAX_SCREEN_SPACE_ERROR: number;
|
|
2758
|
+
root: Tile | null;
|
|
2759
|
+
loadSiblings: boolean;
|
|
2760
|
+
skipLevelOfDetail: boolean;
|
|
2761
|
+
maxScreenSpaceError: number;
|
|
2762
|
+
onTraversalEnd: (frameState: TilesetFrameState) => any;
|
|
2763
|
+
requestedTiles: Map<string, Tile>;
|
|
2764
|
+
selectedTiles: Map<string, Tile>;
|
|
2765
|
+
needsRefinedTiles: Map<string, Tile>;
|
|
2766
|
+
emptyTiles: Map<string, Tile>;
|
|
2767
|
+
private _traversalStack;
|
|
2768
|
+
private _emptyTraversalStack;
|
|
2769
|
+
constructor(onTraversalEnd: (frameState: TilesetFrameState) => any);
|
|
2770
|
+
traverse(root: Tile, frameState: TilesetFrameState): void;
|
|
2771
|
+
reset(): void;
|
|
2772
|
+
private executeTraversal;
|
|
2773
|
+
private updateChildTiles;
|
|
2774
|
+
private updateAndPushChildren;
|
|
2775
|
+
updateTile(tile: Tile, frameState: TilesetFrameState): void;
|
|
2776
|
+
selectTile(tile: Tile, frameState: TilesetFrameState): void;
|
|
2777
|
+
loadTile(tile: Tile, frameNumber: number): void;
|
|
2778
|
+
touchTile(tile: Tile, frameState: TilesetFrameState): void;
|
|
2779
|
+
private canTraverse;
|
|
2780
|
+
private shouldLoadTile;
|
|
2781
|
+
private shouldSelectTile;
|
|
2782
|
+
private shouldRefine;
|
|
2783
|
+
private updateTileVisibility;
|
|
2784
|
+
private meetsScreenSpaceErrorEarly;
|
|
2785
|
+
private compareDistanceToCamera;
|
|
2786
|
+
private executeEmptyTraversal;
|
|
1930
2787
|
}
|
|
1931
2788
|
|
|
1932
2789
|
export declare interface TopviewControllerCustomInitArgs extends Omit<FloorplanControllerCustomInitArgs, "defaultLongitude" | "defaultLatitude" | "maxLatitude" | "minLatitude"> {
|
|
1933
2790
|
}
|
|
1934
2791
|
|
|
2792
|
+
export declare enum VolumePlaneIntersect {
|
|
2793
|
+
Outside = -1,
|
|
2794
|
+
Intersecting = 0,
|
|
2795
|
+
Inside = 1
|
|
2796
|
+
}
|
|
2797
|
+
|
|
1935
2798
|
export declare interface VRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
1936
2799
|
}
|
|
1937
2800
|
|
|
2801
|
+
export declare type WebXRControllerKey = 'A' | 'B' | 'X' | 'Y' | 'RightTrigger' | 'RightPinch' | 'LeftTrigger' | 'LeftPinch' | 'LeftAxesLeft' | 'LeftAxesRight' | 'LeftAxesUp' | 'LeftAxesDown' | 'RightAxesLeft' | 'RightAxesRight' | 'RightAxesUp' | 'RightAxesDown';
|
|
2802
|
+
|
|
2803
|
+
export declare interface WebXRControllerParams {
|
|
2804
|
+
raycaster: THREE_2.Raycaster[];
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
export declare type WebXRControllerType = 'tap' | 'press' | 'axes';
|
|
2808
|
+
|
|
2809
|
+
export declare type WebXREventTypes = {
|
|
2810
|
+
/** WebXR模式开始,session完成坐标系设置*/
|
|
2811
|
+
webXRSessionStart(): void;
|
|
2812
|
+
/** WebXR模式结束,销毁session*/
|
|
2813
|
+
webXRSessionEnd(): void;
|
|
2814
|
+
};
|
|
2815
|
+
|
|
1938
2816
|
export declare class Work {
|
|
1939
2817
|
/** 名称 */
|
|
1940
2818
|
name: string;
|
|
1941
2819
|
/** 编号 */
|
|
1942
|
-
workCode:
|
|
2820
|
+
workCode: WorkCode;
|
|
1943
2821
|
/** 允许访问的安全域名 */
|
|
1944
2822
|
allowHosts: string[];
|
|
1945
2823
|
/** 过期时间 */
|
|
@@ -1952,12 +2830,26 @@ export declare class Work {
|
|
|
1952
2830
|
observers: WorkObserver[];
|
|
1953
2831
|
/** 数据签发人 */
|
|
1954
2832
|
issuer: string;
|
|
2833
|
+
/** 控制参数 */
|
|
2834
|
+
options: WorkOptions;
|
|
1955
2835
|
/** 原始数据 */
|
|
1956
|
-
raw:
|
|
1957
|
-
|
|
2836
|
+
raw: {
|
|
2837
|
+
works: string[];
|
|
2838
|
+
options: string;
|
|
2839
|
+
};
|
|
2840
|
+
/**
|
|
2841
|
+
* 解析 Work 数据
|
|
2842
|
+
* @param obj - work 数据,从如数开发者平台获取
|
|
2843
|
+
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
2844
|
+
* @returns - 签署过的 Work 数据结构
|
|
2845
|
+
*/
|
|
2846
|
+
static parse: typeof parseWork;
|
|
2847
|
+
constructor(obj: Work | LooseWork | (Work | LooseWork)[] | any, options: ParseWorkOptions);
|
|
1958
2848
|
toJSON(): any;
|
|
1959
2849
|
}
|
|
1960
2850
|
|
|
2851
|
+
export declare type WorkCode = string;
|
|
2852
|
+
|
|
1961
2853
|
export declare interface WorkCubeImage {
|
|
1962
2854
|
/** 全景图 up */
|
|
1963
2855
|
up: string;
|
|
@@ -1984,25 +2876,48 @@ export declare interface WorkImage extends WorkCubeImage {
|
|
|
1984
2876
|
}
|
|
1985
2877
|
|
|
1986
2878
|
/** 初始化位姿参数 */
|
|
1987
|
-
export declare interface WorkInitial
|
|
2879
|
+
export declare interface WorkInitial {
|
|
2880
|
+
/** 模态 */
|
|
2881
|
+
mode?: Mode;
|
|
2882
|
+
/** 点位序号 */
|
|
2883
|
+
panoId?: string;
|
|
2884
|
+
/** 相机水平角 */
|
|
2885
|
+
longitude?: number;
|
|
2886
|
+
/** 相机俯仰角 */
|
|
2887
|
+
latitude?: number;
|
|
2888
|
+
/** 相机可视角度(垂直)*/
|
|
2889
|
+
fov?: number;
|
|
2890
|
+
/** 相机观察点位置 [x, y, z] */
|
|
2891
|
+
offset?: THREE_2.Vector3;
|
|
2892
|
+
/** 相机距离观察点距离 */
|
|
2893
|
+
distance?: number;
|
|
1988
2894
|
}
|
|
1989
2895
|
|
|
1990
2896
|
/** 模型数据 */
|
|
1991
2897
|
export declare interface WorkModel {
|
|
2898
|
+
/** work */
|
|
2899
|
+
work: Work;
|
|
1992
2900
|
/** 模型文件地址 at3d / domez */
|
|
1993
|
-
file
|
|
2901
|
+
file?: string;
|
|
1994
2902
|
/** 模型贴图文件地址 */
|
|
1995
|
-
textures
|
|
2903
|
+
textures?: string[];
|
|
1996
2904
|
/** 模型贴图文件地址的父目录 */
|
|
1997
|
-
textureBase
|
|
1998
|
-
|
|
1999
|
-
bvh: boolean;
|
|
2905
|
+
textureBase?: string;
|
|
2906
|
+
tileset?: string;
|
|
2000
2907
|
}
|
|
2001
2908
|
|
|
2002
2909
|
/** 每个点位的数据 */
|
|
2003
2910
|
export declare interface WorkObserver {
|
|
2911
|
+
/** work */
|
|
2912
|
+
work: Work;
|
|
2913
|
+
/** 序号 */
|
|
2914
|
+
index: number;
|
|
2004
2915
|
/** 点位序号 */
|
|
2005
|
-
|
|
2916
|
+
panoId: WorkPanoId;
|
|
2917
|
+
/** 点位所在楼层 */
|
|
2918
|
+
floorIndex: number;
|
|
2919
|
+
/** 点位 derived_id */
|
|
2920
|
+
derivedId?: number;
|
|
2006
2921
|
/** 点位是否激活可用 */
|
|
2007
2922
|
active: boolean;
|
|
2008
2923
|
/** 点位是否可加载 */
|
|
@@ -2012,19 +2927,44 @@ export declare interface WorkObserver {
|
|
|
2012
2927
|
/** 点位视频 */
|
|
2013
2928
|
video?: WorkVideo;
|
|
2014
2929
|
/** 可以看到的相关点位序号 */
|
|
2015
|
-
|
|
2930
|
+
visibleIds: string[];
|
|
2016
2931
|
/** 可以连通的相关点位序号 */
|
|
2017
|
-
|
|
2018
|
-
/**
|
|
2019
|
-
quaternion: THREE_2.Quaternion;
|
|
2020
|
-
/** 点位和模型的地面位置坐标关系 */
|
|
2932
|
+
accessibleIds: string[];
|
|
2933
|
+
/** 点位和模型的地面坐标 */
|
|
2021
2934
|
standingPosition: THREE_2.Vector3;
|
|
2022
|
-
/**
|
|
2935
|
+
/** 点位和模型的观察点坐标 */
|
|
2023
2936
|
position: THREE_2.Vector3;
|
|
2024
|
-
/**
|
|
2025
|
-
|
|
2937
|
+
/** 点位和模型的旋转对齐关系四元数 */
|
|
2938
|
+
quaternion: THREE_2.Quaternion;
|
|
2026
2939
|
}
|
|
2027
2940
|
|
|
2941
|
+
export declare interface WorkOptions {
|
|
2942
|
+
/** 调试 */
|
|
2943
|
+
debug?: boolean;
|
|
2944
|
+
/** 位姿修正 */
|
|
2945
|
+
transform: THREE_2.Matrix4;
|
|
2946
|
+
/** 可观测区域 */
|
|
2947
|
+
viewerRequestVolume?: BoundingVolume;
|
|
2948
|
+
/** 模型显示最大细化层级 */
|
|
2949
|
+
modelMaxLevelOfDetail?: number;
|
|
2950
|
+
/** 模型最大内存缓存 */
|
|
2951
|
+
modelMaxMemoryUsage?: number;
|
|
2952
|
+
/** 模型网络最大请求并发数 */
|
|
2953
|
+
modelMaxRequests?: number;
|
|
2954
|
+
/** 模型屏幕空间误差计算最大值 */
|
|
2955
|
+
modelMaxScreenSpaceError?: number;
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
export declare type WorkPanoId = string;
|
|
2959
|
+
|
|
2960
|
+
export declare type Works = ReadonlyArray<Work> & {
|
|
2961
|
+
resolvedObservers: WorkObserver[];
|
|
2962
|
+
initial: WorkInitial;
|
|
2963
|
+
getWork(workCode: WorkCode): Work | undefined;
|
|
2964
|
+
getResolvedObserver(panoId: WorkPanoId): WorkObserver | undefined;
|
|
2965
|
+
update(): void;
|
|
2966
|
+
};
|
|
2967
|
+
|
|
2028
2968
|
export declare interface WorkTile {
|
|
2029
2969
|
level: number;
|
|
2030
2970
|
size: number;
|
|
@@ -2046,4 +2986,11 @@ export declare interface WorkVideo {
|
|
|
2046
2986
|
size: THREE_2.Vector2;
|
|
2047
2987
|
}
|
|
2048
2988
|
|
|
2989
|
+
export declare class XRButton {
|
|
2990
|
+
static createButton(onClickHook: () => void): HTMLAnchorElement | HTMLButtonElement;
|
|
2991
|
+
}
|
|
2992
|
+
|
|
2993
|
+
export declare interface XRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2049
2996
|
export { }
|