@realsee/five 6.0.0-alpha.1 → 6.0.0-alpha.10
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/search.js +1 -1
- package/docs/classes/five.AnimationFrameLoop.html +1 -1
- package/docs/classes/five.BVH.html +1 -1
- package/docs/classes/five.BVHIntersect.html +1 -1
- package/docs/classes/five.BVHNode.html +1 -1
- package/docs/classes/five.BVHVector3.html +1 -1
- package/docs/classes/five.BoxBoundingVolume.html +1 -1
- package/docs/classes/five.Camera.html +1 -1
- package/docs/classes/five.Clipper.html +1 -1
- package/docs/classes/five.CullingVolume.html +1 -1
- package/docs/classes/five.Five.html +75 -69
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.IntersectMesh.html +1 -1
- package/docs/classes/five.Model.html +21 -23
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- package/docs/classes/five.PBMContainer.html +1 -1
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMaterialReferenceCache.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMMeshMaterial.html +15 -11
- package/docs/classes/five.PanoCircleMesh.html +1 -1
- package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
- package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/five.RegionBoundingVolume.html +1 -1
- package/docs/classes/five.RequestScheduler.html +1 -1
- package/docs/classes/five.Scene.html +1 -1
- package/docs/classes/five.SphereBoundingVolume.html +1 -1
- package/docs/classes/five.Subscribe.html +1 -1
- package/docs/classes/five.TextureLoader.html +1 -1
- package/docs/classes/five.Tile.html +1 -1
- package/docs/classes/five.Tile3DModel.html +1 -1
- package/docs/classes/five.TileCubeTextureTarget.html +1 -1
- package/docs/classes/five.TileNode.html +1 -1
- package/docs/classes/five.Tileset.html +1 -1
- package/docs/classes/five.TilesetCache.html +1 -1
- package/docs/classes/five.TilesetTraverser.html +1 -1
- package/docs/classes/five.Work.html +12 -12
- package/docs/classes/five.XRButton.html +1 -1
- package/docs/classes/gltf_loader.DDSLoader.html +1 -1
- package/docs/classes/gltf_loader.DRACOLoader.html +1 -1
- package/docs/classes/gltf_loader.GLTFLoader.html +1 -1
- package/docs/classes/gltf_loader.GLTFObject.html +1 -1
- package/docs/classes/gltf_loader.GLTFParser.html +1 -1
- package/docs/classes/gltf_loader.THREEGLTFLoader.html +1 -1
- 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 +1 -1
- package/docs/classes/sticker.Sticker.html +1 -1
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +1 -1
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/enums/five.PBMPointColorType.html +1 -1
- package/docs/enums/five.PBMPointShapeType.html +1 -1
- package/docs/enums/five.PBMPointSizeType.html +1 -1
- package/docs/enums/five.VolumePlaneIntersect.html +1 -1
- package/docs/index.html +1 -1
- package/docs/interfaces/five.AddableObject.html +1 -1
- package/docs/interfaces/five.AnimationFrame.html +1 -1
- package/docs/interfaces/five.BaseEvent.html +1 -0
- package/docs/interfaces/five.BoundingVolume.html +1 -1
- package/docs/interfaces/five.CameraPose.html +1 -1
- package/docs/interfaces/five.ClipperParameter.html +1 -1
- package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +10 -10
- package/docs/interfaces/five.EventCallback.html +197 -93
- package/docs/interfaces/five.FiveInitArgs.html +1 -1
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +7 -7
- package/docs/interfaces/five.GestureEvent.html +1 -0
- package/docs/interfaces/five.ImageOptions.html +1 -1
- package/docs/interfaces/five.ImageURLMappings.html +1 -1
- package/docs/interfaces/five.ImageURLOptions.html +1 -1
- package/docs/interfaces/five.IntersectEvent.html +1 -0
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +1 -1
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +5 -5
- package/docs/interfaces/five.ModeChangeEvent.html +1 -0
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +8 -8
- package/docs/interfaces/five.ModelEvent.html +1 -0
- package/docs/interfaces/five.ModelLodOptions.html +1 -1
- package/docs/interfaces/five.ModelsEvent.html +1 -0
- package/docs/interfaces/five.MotionKeyframe.html +1 -1
- package/docs/interfaces/five.MovePanoOptions.html +9 -7
- package/docs/interfaces/five.NetworkOptions.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +1 -0
- package/docs/interfaces/five.ObjectEvent.html +1 -0
- package/docs/interfaces/five.PBMPanoPicture.html +1 -1
- package/docs/interfaces/five.PBMParameters.html +15 -11
- package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshOptions.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +1 -1
- package/docs/interfaces/five.PanoEvent.html +1 -0
- package/docs/interfaces/five.PanoTextureEvent.html +1 -0
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +10 -10
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +8 -8
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RenderEvent.html +1 -0
- package/docs/interfaces/five.Scissor.html +1 -1
- package/docs/interfaces/five.State.html +6 -6
- package/docs/interfaces/five.StateEvent.html +1 -0
- 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 -1
- package/docs/interfaces/five.TextureOptions.html +1 -1
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +1 -1
- package/docs/interfaces/five.TileCubeNode.html +1 -1
- package/docs/interfaces/five.TileCubeTree.html +1 -1
- package/docs/interfaces/five.TileHeader.html +1 -1
- package/docs/interfaces/five.TilesetHeader.html +1 -1
- package/docs/interfaces/five.TilesetOptions.html +1 -1
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +4 -4
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +8 -8
- package/docs/interfaces/five.WebXRAxesParams.html +1 -0
- package/docs/interfaces/five.WebXRControllerParams.html +1 -1
- package/docs/interfaces/five.WorkCubeImage.html +6 -6
- package/docs/interfaces/five.WorkImage.html +10 -10
- package/docs/interfaces/five.WorkInitial.html +9 -9
- package/docs/interfaces/five.WorkModel.html +6 -6
- package/docs/interfaces/five.WorkObserver.html +24 -16
- package/docs/interfaces/five.WorkOptions.html +7 -7
- package/docs/interfaces/five.WorkResolvedObserver.html +37 -0
- package/docs/interfaces/five.WorkTile.html +1 -1
- package/docs/interfaces/five.WorkVideo.html +4 -4
- package/docs/interfaces/five.WorksEvent.html +1 -0
- package/docs/interfaces/five.XRControllerEvent.html +1 -0
- package/docs/interfaces/five.XRGestureEvent.html +1 -0
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +8 -8
- package/docs/interfaces/five.XRSessionEvent.html +1 -0
- package/docs/interfaces/gltf_loader.DDS.html +1 -1
- package/docs/interfaces/gltf_loader.GLTF.html +1 -1
- package/docs/interfaces/gltf_loader.GLTFReference.html +1 -1
- package/docs/interfaces/gltf_loader.THREEGLTF.html +1 -1
- package/docs/interfaces/react.FiveActionReactCallbacks.html +3 -5
- package/docs/interfaces/react.FiveInjectionTypes.html +10 -15
- package/docs/interfaces/react.PropTypeOfFiveFeatures.html +1 -1
- package/docs/interfaces/sticker.IntersectionLike.html +1 -1
- package/docs/interfaces/vfx.ParticleArgs.html +1 -1
- package/docs/interfaces/vfx.ParticleTweenKeyframe.html +1 -1
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +3 -3
- package/docs/modules/five.SubscribeMixinType.html +1 -1
- package/docs/modules/five.html +387 -225
- package/docs/modules/gltf_loader.html +1 -1
- package/docs/modules/line.html +1 -1
- package/docs/modules/react.html +1 -1
- package/docs/modules/sticker.html +1 -1
- package/docs/modules/vfx.html +1 -1
- package/docs/modules/vue.html +1 -1
- package/docs/modules.html +1 -1
- package/five/index.d.ts +932 -619
- package/five/index.js +6 -6
- package/gltf-loader/index.js +3 -3
- package/line/index.js +3 -3
- package/package.json +1 -1
- package/react/index.d.ts +3 -2
- package/react/index.js +3 -3
- package/sticker/index.js +3 -3
- package/umd/five-gltf-loader.js +1 -1
- package/umd/five-line.js +1 -1
- package/umd/five-react.js +1 -1
- package/umd/five-sticker.js +1 -1
- package/umd/five-vue.js +1 -1
- package/umd/five.js +1 -1
- package/vfx/index.js +2 -2
- package/vue/index.d.ts +4 -3
- package/vue/index.js +3 -3
package/five/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="webxr" />
|
|
2
|
+
|
|
1
3
|
import * as THREE_2 from 'three';
|
|
2
4
|
|
|
3
5
|
export declare interface AddableObject extends THREE_2.Object3D {
|
|
@@ -46,6 +48,13 @@ export declare class AnimationFrameLoop {
|
|
|
46
48
|
disponse(): void;
|
|
47
49
|
}
|
|
48
50
|
|
|
51
|
+
export declare interface BaseEvent {
|
|
52
|
+
type: string;
|
|
53
|
+
timeStamp: number;
|
|
54
|
+
preventDefault(): void;
|
|
55
|
+
defaultPrevented: boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
49
58
|
export declare interface BoundingVolume {
|
|
50
59
|
type: 'box' | 'sphere' | 'regin';
|
|
51
60
|
applyMatrix4(matrix: THREE_2.Matrix4): this;
|
|
@@ -201,7 +210,7 @@ export declare class Clipper {
|
|
|
201
210
|
private static sharedInstance?;
|
|
202
211
|
static get shared(): Clipper;
|
|
203
212
|
constructor();
|
|
204
|
-
update(
|
|
213
|
+
update(clipperParameter: ClipperParameter | ClipperParameter[], camera: THREE_2.Camera): void;
|
|
205
214
|
private projectPlanes;
|
|
206
215
|
}
|
|
207
216
|
|
|
@@ -222,297 +231,69 @@ export declare type ControllerCustomInitTypes = {
|
|
|
222
231
|
};
|
|
223
232
|
|
|
224
233
|
export declare type ControllerEventTypes = {
|
|
225
|
-
/**
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
* - moveToPano 在加载全景图资源前触发
|
|
289
|
-
* - panoWillArrive 在加载全景图资源后触发
|
|
290
|
-
* @param panoId - 移动到的点位
|
|
291
|
-
* @param userAction - 是否用户触发
|
|
292
|
-
*/
|
|
293
|
-
moveToPano(panoId: WorkPanoId, userAction: boolean): void;
|
|
294
|
-
/**
|
|
295
|
-
* 开始加载某个观察点的全景资源
|
|
296
|
-
* @param panoId - 移动到的点位
|
|
297
|
-
*/
|
|
298
|
-
panoWillLoad(panoId: WorkPanoId): void;
|
|
299
|
-
/**
|
|
300
|
-
* 某个观察点的全景资源加载完成
|
|
301
|
-
* @param panoId - 对应的点位
|
|
302
|
-
*/
|
|
303
|
-
panoLoaded(panoId: WorkPanoId): void;
|
|
304
|
-
/**
|
|
305
|
-
* 某个观察点的全景资源加载失败
|
|
306
|
-
* @param error - 错误对象
|
|
307
|
-
* @param panoId - 对应的点位
|
|
308
|
-
*/
|
|
309
|
-
panoLoadError(error: Error, panoId: WorkPanoId): void;
|
|
310
|
-
/**
|
|
311
|
-
* 移动到某个观察点位被取消
|
|
312
|
-
* @description
|
|
313
|
-
* 这个有一些情况会导致
|
|
314
|
-
* - 移动过程中切换模态
|
|
315
|
-
* - 移动过程中 five 被析构
|
|
316
|
-
* - 移动过程点击切换到另一个点位
|
|
317
|
-
* @param panoId - 对应的点位
|
|
318
|
-
*/
|
|
319
|
-
moveToPanoCanceled(panoId: WorkPanoId): void;
|
|
320
|
-
/**
|
|
321
|
-
* 开始移动到某个观察点位
|
|
322
|
-
* @description
|
|
323
|
-
* 和 moveToPano 相比
|
|
324
|
-
* - moveToPano 在加载全景图资源前触发
|
|
325
|
-
* - panoWillArrive 在加载全景图资源后触发
|
|
326
|
-
* @param panoId - 移动到点位
|
|
327
|
-
* @param pose - 相机姿态
|
|
328
|
-
* @param userAction - 是否用户触发
|
|
329
|
-
*/
|
|
330
|
-
panoWillArrive(panoId: WorkPanoId, pose: Pose, userAction: boolean): void;
|
|
331
|
-
/**
|
|
332
|
-
* 移动到某个观察点位
|
|
333
|
-
* @param panoIndex - 移动到点位
|
|
334
|
-
* @param pose - 相机姿态
|
|
335
|
-
* @param userAction - 是否用户触发
|
|
336
|
-
*/
|
|
337
|
-
panoArrived(panoId: WorkPanoId, pose: Pose, userAction: boolean): void;
|
|
338
|
-
/**
|
|
339
|
-
* 移动中, 会告知移动状态(耗时百分比)
|
|
340
|
-
* @param panoId - 将要移动到的点位下标
|
|
341
|
-
* @param prevPanoId - 上一个点位下标
|
|
342
|
-
* @param progress - 整个过程经度 [0-1]
|
|
343
|
-
*/
|
|
344
|
-
movingToPano(panoId: WorkPanoId, prevPanoId: WorkPanoId, progress: number): void;
|
|
345
|
-
/**
|
|
346
|
-
* 意图要触发手势, 可以通过 `return false` 阻止
|
|
347
|
-
* @param type - 手势类型
|
|
348
|
-
* @param pointers - 手指位置
|
|
349
|
-
* @param final - 是否手势结束
|
|
350
|
-
* @returns 可以通过 `return false` 阻止
|
|
351
|
-
*/
|
|
352
|
-
wantsGesture(type: GestureTypes, pointers: {
|
|
353
|
-
x: number;
|
|
354
|
-
y: number;
|
|
355
|
-
delta?: number;
|
|
356
|
-
}[], final: boolean): void | false;
|
|
357
|
-
/**
|
|
358
|
-
* 手势 触发
|
|
359
|
-
* @param type - 手势类型
|
|
360
|
-
* @param pointers - 手指位置
|
|
361
|
-
* @param final - 是否手势结束
|
|
362
|
-
*/
|
|
363
|
-
gesture(type: GestureTypes, pointers: {
|
|
364
|
-
x: number;
|
|
365
|
-
y: number;
|
|
366
|
-
delta?: number;
|
|
367
|
-
}[], final: boolean): void;
|
|
368
|
-
/**
|
|
369
|
-
* 意图要触发 pan 手势(滑动屏幕), 可以通过 `return false` 阻止
|
|
370
|
-
* @param pose - 意图的相机姿态
|
|
371
|
-
* @param final - 是否手势结束
|
|
372
|
-
* @returns 可以通过 `return false` 阻止
|
|
373
|
-
*/
|
|
374
|
-
wantsPanGesture(pose: Pose, final: boolean): void | false;
|
|
375
|
-
/**
|
|
376
|
-
* pan 手势(滑动屏幕) 被触发
|
|
377
|
-
* @param pose - 相机姿态
|
|
378
|
-
* @param final - 是否手势结束
|
|
379
|
-
*/
|
|
380
|
-
panGesture(pose: Pose, final: boolean): void;
|
|
381
|
-
/**
|
|
382
|
-
* 意图要触发 pan 手势(滑动屏幕) 的惯性运动, 可以通过 `return false` 阻止
|
|
383
|
-
* @param pose - 意图的相机姿态
|
|
384
|
-
* @param final - 是否手势结束
|
|
385
|
-
* @returns 可以通过 `return false` 阻止
|
|
386
|
-
*/
|
|
387
|
-
wantsInteriaPan(pose: Pose): void | false;
|
|
388
|
-
/**
|
|
389
|
-
* pan 手势(滑动屏幕) 的惯性运动
|
|
390
|
-
* @param pose - 意图的相机姿态
|
|
391
|
-
* @param final - 是否手势结束
|
|
392
|
-
*/
|
|
393
|
-
interiaPan(pose: Pose, final: boolean): void;
|
|
394
|
-
/**
|
|
395
|
-
* 意图要触发 tap 手势(点击屏幕), 可以通过 `return false` 阻止
|
|
396
|
-
* @param raycaster - 点击对应的三维射线
|
|
397
|
-
* @param tapPosition - 点击对应的屏幕位置
|
|
398
|
-
* @param final - 是否手势结束
|
|
399
|
-
* @returns 可以通过 `return false` 阻止
|
|
400
|
-
*/
|
|
401
|
-
wantsTapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, final: boolean): void | false;
|
|
402
|
-
/**
|
|
403
|
-
* tap 手势(点击屏幕) 被触发
|
|
404
|
-
* @param raycaster - 点击对应的三维射线
|
|
405
|
-
* @param tapPosition - 点击对应的屏幕位置
|
|
406
|
-
* @param final - 是否手势结束
|
|
407
|
-
*/
|
|
408
|
-
tapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, final: boolean): void;
|
|
409
|
-
/**
|
|
410
|
-
* 意图要触发 pinch 手势(双指缩放),可以通过 `return false` 阻止
|
|
411
|
-
* @param scale - 缩放数值
|
|
412
|
-
* @param nextFov - 意图的fov变更
|
|
413
|
-
* @param final - 是否手势结束
|
|
414
|
-
* @returns 可以通过 `return false` 阻止
|
|
415
|
-
*/
|
|
416
|
-
wantsPinchGesture(scale: number, nextFov: number, final: boolean): void | false;
|
|
417
|
-
/**
|
|
418
|
-
* 意图要触发 press 手势(长按屏幕), 可以通过 `return false` 阻止
|
|
419
|
-
* @param raycaster - 长按对应的三维射线
|
|
420
|
-
* @param tapPosition - 长按对应的屏幕位置
|
|
421
|
-
* @param duration - 长按持续时间
|
|
422
|
-
* @param final - 是否手势结束
|
|
423
|
-
* @returns 可以通过 `return false` 阻止
|
|
424
|
-
*/
|
|
425
|
-
wantsPressGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, duration: number, isFinal: boolean): void | false;
|
|
426
|
-
/**
|
|
427
|
-
* tap 手势(点击屏幕) 被触发
|
|
428
|
-
* @param raycaster - 点击对应的三维射线
|
|
429
|
-
* @param tapPosition - 点击对应的屏幕位置
|
|
430
|
-
* @param duration - 长按持续时间
|
|
431
|
-
* @param final - 是否手势结束
|
|
432
|
-
*/
|
|
433
|
-
pressGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, duration: number, isFinal: boolean): void;
|
|
434
|
-
/**
|
|
435
|
-
* pinch 手势(双指缩放) 被触发
|
|
436
|
-
* @param scale - 缩放数值
|
|
437
|
-
* @param nextFov - 意图的fov变更
|
|
438
|
-
* @param final - 是否手势结束
|
|
439
|
-
*/
|
|
440
|
-
pinchGesture(scale: number, fov: number, final: boolean): void;
|
|
441
|
-
/**
|
|
442
|
-
* 意图要触发 鼠标滚轮 可以通过 `return false` 阻止
|
|
443
|
-
* @param delta - 滚轮数值
|
|
444
|
-
* @param nextFov - 意图的fov变更
|
|
445
|
-
* @param final - 是否手势结束
|
|
446
|
-
* @returns 可以通过 `return false` 阻止
|
|
447
|
-
*/
|
|
448
|
-
wantsMouseWheel(delta: number, nextFov: number, final: boolean): void | false;
|
|
449
|
-
/**
|
|
450
|
-
* 鼠标滚轮被触发
|
|
451
|
-
* @param delta - 滚轮数值
|
|
452
|
-
* @param nextFov - 意图的fov变更
|
|
453
|
-
* @param final - 是否手势结束
|
|
454
|
-
*/
|
|
455
|
-
mouseWheel(delta: number, fov: number, final: boolean): void;
|
|
456
|
-
/**
|
|
457
|
-
* 鼠标焦点环位置被重新计算
|
|
458
|
-
* @param intersection - 焦点碰撞结果
|
|
459
|
-
* @param mesh - 焦点环 mesh
|
|
460
|
-
*/
|
|
461
|
-
intersectionOnModelUpdate(intersection: Intersection, mesh: IntersectMeshInterface): void;
|
|
462
|
-
/**
|
|
463
|
-
* 意图要展示鼠标焦点环,可以通过 `return false` 阻止
|
|
464
|
-
* @param intersection - 焦点碰撞结果
|
|
465
|
-
* @returns 可以通过 `return false` 阻止
|
|
466
|
-
*/
|
|
467
|
-
wantsShowIntersectionOnModel(raycaster: THREE_2.Raycaster): void | false;
|
|
468
|
-
/** 鼠标焦点环被隐藏 */
|
|
469
|
-
intersectionHidden(): void;
|
|
470
|
-
/** 意图要退出VR眼镜模式 */
|
|
471
|
-
vrWantsToExit(): void;
|
|
472
|
-
/**
|
|
473
|
-
* 观察点的全景资源开始加载
|
|
474
|
-
* @param panoId - 加载点位
|
|
475
|
-
*/
|
|
476
|
-
textureStartLoad(panoId: WorkPanoId): void;
|
|
477
|
-
/**
|
|
478
|
-
* 观察点的全景资源加载中,可获取到进度
|
|
479
|
-
* @param progress - 加载进度 [0-1]
|
|
480
|
-
* @param panoId - 加载点位下标
|
|
481
|
-
*/
|
|
482
|
-
textureLoading(progress: number, panoId: WorkPanoId): void;
|
|
483
|
-
/**
|
|
484
|
-
* 观察点的全景资源加载被中止
|
|
485
|
-
* @param panoId - 加载点位
|
|
486
|
-
*/
|
|
487
|
-
textureAbort(panoId: WorkPanoId): void;
|
|
488
|
-
/**
|
|
489
|
-
* 观察点的全景资源加载失败
|
|
490
|
-
* @param error - 错误对象
|
|
491
|
-
* @param panoId - 加载点位
|
|
492
|
-
*/
|
|
493
|
-
textureError(error: Error, panoId: WorkPanoId): void;
|
|
494
|
-
/**
|
|
495
|
-
* 观察点的全景资源加载完成
|
|
496
|
-
* @param panoId - 加载点位
|
|
497
|
-
*/
|
|
498
|
-
textureLoaded(panoId: WorkPanoId, meta: (NetWorkMeta | null)[]): void;
|
|
499
|
-
/**
|
|
500
|
-
* 抛出错误
|
|
501
|
-
* @param error - 抛出错误
|
|
502
|
-
*/
|
|
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;
|
|
234
|
+
/** 手势 滑动屏幕 */
|
|
235
|
+
"gesture.pan"(event: GestureEvent): void;
|
|
236
|
+
/** 手势 点击屏幕 */
|
|
237
|
+
"gesture.tap"(event: GestureEvent): void;
|
|
238
|
+
/** 手势 长按屏幕 */
|
|
239
|
+
"gesture.press"(event: GestureEvent): void;
|
|
240
|
+
/** 手势 双指缩放 */
|
|
241
|
+
"gesture.pinch"(event: GestureEvent): void;
|
|
242
|
+
/** 手势 鼠标滚轮 */
|
|
243
|
+
"gesture.mousewheel"(event: GestureEvent): void;
|
|
244
|
+
/** 手势 鼠标移动 */
|
|
245
|
+
"gesture.mousemove"(event: GestureEvent): void;
|
|
246
|
+
/** 手势 惯性 */
|
|
247
|
+
"gesture.momentum"(event: GestureEvent): void;
|
|
248
|
+
/** 模态切换动画 开始 */
|
|
249
|
+
"initAnimation.start"(event: StateEvent): void;
|
|
250
|
+
/** 模态切换动画 结束 */
|
|
251
|
+
"initAnimation.end"(event: StateEvent): void;
|
|
252
|
+
/** 相机改变 */
|
|
253
|
+
"camera.update"(event: StateEvent): void;
|
|
254
|
+
"intersect.update"(event: IntersectEvent): void;
|
|
255
|
+
/** 选择 */
|
|
256
|
+
"pano.select"(event: PanoEvent): void;
|
|
257
|
+
/** 请求点位 */
|
|
258
|
+
"pano.request"(event: PanoEvent): void;
|
|
259
|
+
/** 运动去点位 */
|
|
260
|
+
"pano.moveTo"(event: PanoEvent): void;
|
|
261
|
+
/** 运动点位过程 */
|
|
262
|
+
"pano.moving"(event: PanoEvent): void;
|
|
263
|
+
/** 运动到达点位 */
|
|
264
|
+
"pano.arrived"(event: PanoEvent): void;
|
|
265
|
+
/** 取消运动点位 */
|
|
266
|
+
"pano.cancel"(event: PanoEvent): void;
|
|
267
|
+
/** 运动点位出错 */
|
|
268
|
+
"pano.error"(event: PanoEvent): void;
|
|
269
|
+
/** 加载全景材质 */
|
|
270
|
+
"pano.texture.load"(event: PanoTextureEvent): void;
|
|
271
|
+
/** 加载全景材质进度 */
|
|
272
|
+
"pano.texture.progress"(event: PanoTextureEvent): void;
|
|
273
|
+
/** 加载全景材质成功 */
|
|
274
|
+
"pano.texture.success"(event: PanoTextureEvent): void;
|
|
275
|
+
/** 加载全景材质失败 */
|
|
276
|
+
"pano.texture.error"(event: PanoTextureEvent): void;
|
|
277
|
+
/** 加载全景材质中止 */
|
|
278
|
+
"pano.texture.abort"(event: PanoTextureEvent): void;
|
|
279
|
+
/** VRPanorama 请求退出 */
|
|
280
|
+
"vr.requestExit"(event: BaseEvent): void;
|
|
281
|
+
/** XR 退出 */
|
|
282
|
+
"xr.session.end"(event: XRSessionEvent_2): void;
|
|
283
|
+
/** XR 进入 */
|
|
284
|
+
"xr.session.start"(event: XRSessionEvent_2): void;
|
|
285
|
+
/** XR 手势(按钮) */
|
|
286
|
+
"xr.gesture.tap"(event: XRGestureEvent): void;
|
|
287
|
+
/** XR 手势(按钮) */
|
|
288
|
+
"xr.gesture.press"(event: XRGestureEvent): void;
|
|
289
|
+
/** XR 手势(按钮) */
|
|
290
|
+
"xr.gesture.buttonUp"(event: XRGestureEvent): void;
|
|
291
|
+
/** XR 手势(按钮) */
|
|
292
|
+
"xr.gesture.buttonDown"(event: XRGestureEvent): void;
|
|
293
|
+
/** XR手柄更新*/
|
|
294
|
+
"xr.controller.update"(event: XRControllerEvent): void;
|
|
295
|
+
/** 抛出错误 */
|
|
296
|
+
"error"(error: Error): void;
|
|
516
297
|
};
|
|
517
298
|
|
|
518
299
|
export declare class CullingVolume {
|
|
@@ -545,7 +326,7 @@ export declare interface DepthPanoramaControllerCustomInitArgs extends PanoramaL
|
|
|
545
326
|
*/
|
|
546
327
|
panoTapTriggerRadius?: number;
|
|
547
328
|
/** 地面观察点标识自定义创建器 */
|
|
548
|
-
panoCircleMeshCreator?: (
|
|
329
|
+
panoCircleMeshCreator?: (pano: Pano) => PanoCircleMeshInterface;
|
|
549
330
|
}
|
|
550
331
|
|
|
551
332
|
/**
|
|
@@ -561,132 +342,51 @@ export declare interface EventCallback extends EventTypes {
|
|
|
561
342
|
* @description
|
|
562
343
|
* 具体事件列表 请查看 {@link EventCallback}
|
|
563
344
|
*/
|
|
564
|
-
export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROLLER_EVENT_NAMES[number]> & {
|
|
565
|
-
/**
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
/**
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
* 模型楼层切换
|
|
608
|
-
* @param shownFloor - 模型楼层
|
|
609
|
-
*/
|
|
610
|
-
modelShownFloorChange(shownFloor: number | null): void;
|
|
611
|
-
/**
|
|
612
|
-
* 渲染循环
|
|
613
|
-
* @param rendered - 是否渲染了
|
|
614
|
-
*/
|
|
615
|
-
renderFrame(rendered: boolean): void;
|
|
616
|
-
/**
|
|
617
|
-
* 当前 fps 变化
|
|
618
|
-
* @param fps - 当前刷新率
|
|
619
|
-
*/
|
|
620
|
-
fps(fps: number): void;
|
|
621
|
-
/**
|
|
622
|
-
* 当目标 state 变化时
|
|
623
|
-
* @param state - 当前姿态状态
|
|
624
|
-
* @param userAction - 是否用户触发
|
|
625
|
-
*/
|
|
626
|
-
stateChange(state: State, userAction: boolean): void;
|
|
627
|
-
/**
|
|
628
|
-
* 当前实时 state 变化时
|
|
629
|
-
* @param state - 当前姿态状态
|
|
630
|
-
* @param userAction - 是否用户触发
|
|
631
|
-
*/
|
|
632
|
-
currentStateChange(state: State, userAction: boolean): void;
|
|
633
|
-
/**
|
|
634
|
-
* 当 setState 方法被调用
|
|
635
|
-
* @param state - 当前姿态状态
|
|
636
|
-
*/
|
|
637
|
-
setState(state: State): void;
|
|
638
|
-
/**
|
|
639
|
-
* 当 state 被同步完成时
|
|
640
|
-
* @param state - 当前姿态状态
|
|
641
|
-
*/
|
|
642
|
-
stateSynced(state: State): void;
|
|
643
|
-
/**
|
|
644
|
-
* 意图要移动到某个点时, 可以通过 return false 阻止
|
|
645
|
-
* @param panoId - 意图要移动到点位
|
|
646
|
-
* @param options - 移动参数
|
|
647
|
-
* @param userAction - 是否用户触发
|
|
648
|
-
* @returns 可以通过 return false 阻止
|
|
649
|
-
*/
|
|
650
|
-
wantsMoveToPano(panoId: WorkPanoId, options: MovePanoOptions, userAction: boolean): void | false;
|
|
651
|
-
/**
|
|
652
|
-
* 同 wantsMoveToPano
|
|
653
|
-
* @description
|
|
654
|
-
* @param panoId - 意图要移动到点位
|
|
655
|
-
* @param options - 移动参数
|
|
656
|
-
* @param userAction - 是否用户触发
|
|
657
|
-
* @returns 可以通过 return false 阻止
|
|
658
|
-
*/
|
|
659
|
-
wantsToMoveToPano(panoId: WorkPanoId, options: MovePanoOptions, userAction: boolean): void;
|
|
660
|
-
/**
|
|
661
|
-
* 意图要切换到某个模态, 可以通过 return false 阻止
|
|
662
|
-
* @param mode - 意图要切换到的模态
|
|
663
|
-
* @param prevMode - 当前模态
|
|
664
|
-
* @returns 可以通过 return false 阻止
|
|
665
|
-
*/
|
|
666
|
-
wantsChangeMode(mode: Mode, prevMode: Mode): void | false;
|
|
667
|
-
/**
|
|
668
|
-
* 模态切换完成
|
|
669
|
-
* @param mode - 切换到的模态
|
|
670
|
-
* @param prevMode - 上本质是一个模态
|
|
671
|
-
* @param panoIndex - 初始化动画结束后的点位下标
|
|
672
|
-
* @param toPose - 初始化动画结束后的状态
|
|
673
|
-
* @param userAction - 是否用户触发
|
|
674
|
-
*/
|
|
675
|
-
modeChange(mode: Mode, prevMode: Mode, panoId: WorkPanoId, toPose: Pose, userAction: boolean): void;
|
|
676
|
-
/**
|
|
677
|
-
* 帮助元素显应的变换
|
|
678
|
-
* @param visible - 帮助元素的是否开启
|
|
679
|
-
*/
|
|
680
|
-
helpersVisibleChange(visible: boolean): void;
|
|
681
|
-
/**
|
|
682
|
-
* 网络资源分析
|
|
683
|
-
* @param source - 资源地址
|
|
684
|
-
* @param state - 状态
|
|
685
|
-
* @param detail - 详情
|
|
686
|
-
*/
|
|
687
|
-
network(source: string, type: NetworkType, state: NetworkState, detail: string): void;
|
|
345
|
+
export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROLLER_EVENT_NAMES[number]> & LegacyEventType & {
|
|
346
|
+
/** 请求点位 */
|
|
347
|
+
"pano.request"(event: PanoEvent): void;
|
|
348
|
+
/** 内部错误 */
|
|
349
|
+
"error"(error: Error): void;
|
|
350
|
+
/** 请求 work数据 */
|
|
351
|
+
"works.request"(event: WorksEvent): void;
|
|
352
|
+
/** 加载 work */
|
|
353
|
+
"works.load"(event: WorksEvent): void;
|
|
354
|
+
/** 加载 work 并 controller ready */
|
|
355
|
+
"works.ready"(event: WorksEvent): void;
|
|
356
|
+
/** 设置 state */
|
|
357
|
+
"state.set"(event: StateEvent): void;
|
|
358
|
+
/** 当 state 变化 */
|
|
359
|
+
"state.change"(event: StateEvent): void;
|
|
360
|
+
/** 当 state 同步完成 */
|
|
361
|
+
"state.synced"(event: StateEvent): void;
|
|
362
|
+
/** 当前 state 变化 */
|
|
363
|
+
"currentState.change"(event: StateEvent): void;
|
|
364
|
+
/** 当模型加载 */
|
|
365
|
+
"model.request"(event: ModelEvent): void;
|
|
366
|
+
/** 当模型修改楼层 */
|
|
367
|
+
"model.load"(event: ModelEvent): void;
|
|
368
|
+
/** 当模型错误 */
|
|
369
|
+
"model.error"(event: ModelEvent): void;
|
|
370
|
+
/** 当模型修改楼层 */
|
|
371
|
+
"model.changeShownFloor"(event: ModelEvent): void;
|
|
372
|
+
/** 模型加载完成 */
|
|
373
|
+
"models.load"(event: ModelsEvent): void;
|
|
374
|
+
/** 渲染前 */
|
|
375
|
+
"render.prepare"(event: RenderEvent): void;
|
|
376
|
+
/** 渲染后 */
|
|
377
|
+
"render"(event: RenderEvent): void;
|
|
378
|
+
/** 请求改变 mode */
|
|
379
|
+
"mode.change.request"(event: ModeChangeEvent): void;
|
|
380
|
+
/** 改变 mode */
|
|
381
|
+
"mode.change"(event: ModeChangeEvent): void;
|
|
382
|
+
/** 改变 helpers 元素可见 */
|
|
383
|
+
"helpers.visible"(event: ObjectEvent): void;
|
|
384
|
+
/** 网络资源 */
|
|
385
|
+
"network.resource"(event: NetworkResourceEvent): void;
|
|
386
|
+
/** 当前 fps 变化 */
|
|
387
|
+
"fps"(fps: number): void;
|
|
688
388
|
/** five 被析构。 插件中请监听用于自身析构 */
|
|
689
|
-
dispose(): void;
|
|
389
|
+
"dispose"(): void;
|
|
690
390
|
};
|
|
691
391
|
|
|
692
392
|
/**
|
|
@@ -732,11 +432,13 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
732
432
|
*/
|
|
733
433
|
paused: boolean;
|
|
734
434
|
/** 当前点位序号 */
|
|
735
|
-
|
|
435
|
+
pano: Pano;
|
|
736
436
|
/** 当前展示的模式 */
|
|
737
437
|
currentMode: Mode;
|
|
738
438
|
/** 内部使用的 `THREE.Scene` */
|
|
739
439
|
scene: Scene;
|
|
440
|
+
/** 供外部放置需要在xr场景下产生遮挡的物体们*/
|
|
441
|
+
xrCustomObjectsScene: THREE_2.Scene;
|
|
740
442
|
/** 内部使用的 `Camera` */
|
|
741
443
|
camera: Camera;
|
|
742
444
|
/**
|
|
@@ -760,6 +462,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
760
462
|
renderer?: THREE_2.WebGLRenderer;
|
|
761
463
|
/** 当前加载的模型 */
|
|
762
464
|
models: Models;
|
|
465
|
+
private lastModels;
|
|
763
466
|
/**
|
|
764
467
|
* 是否需要渲染
|
|
765
468
|
* @description
|
|
@@ -813,6 +516,19 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
813
516
|
* ```
|
|
814
517
|
*/
|
|
815
518
|
state: State;
|
|
519
|
+
info: null | {
|
|
520
|
+
memory: {
|
|
521
|
+
geometries: number;
|
|
522
|
+
textures: number;
|
|
523
|
+
};
|
|
524
|
+
render: {
|
|
525
|
+
calls: number;
|
|
526
|
+
frame: number;
|
|
527
|
+
lines: number;
|
|
528
|
+
points: number;
|
|
529
|
+
triangles: number;
|
|
530
|
+
};
|
|
531
|
+
};
|
|
816
532
|
/** 插件暴露的方法 */
|
|
817
533
|
plugins: {
|
|
818
534
|
[key: string]: FivePluginInstance<any>;
|
|
@@ -834,7 +550,6 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
834
550
|
private extraElements;
|
|
835
551
|
private getPixelsRenderTarget;
|
|
836
552
|
private readyCallbacks;
|
|
837
|
-
private modelPending;
|
|
838
553
|
private syncingState;
|
|
839
554
|
/**
|
|
840
555
|
* 是否开启 IOS EDR 模式
|
|
@@ -899,11 +614,17 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
899
614
|
*/
|
|
900
615
|
get enableIOSEDR(): boolean;
|
|
901
616
|
set enableIOSEDR(enable: boolean);
|
|
617
|
+
/**
|
|
618
|
+
* 后处理类型
|
|
619
|
+
*/
|
|
620
|
+
get postProcessingType(): PostProcessingType;
|
|
902
621
|
/**
|
|
903
622
|
* 是否开启EDL模式
|
|
904
623
|
*/
|
|
905
624
|
get enableEDL(): boolean;
|
|
906
625
|
set enableEDL(enable: boolean);
|
|
626
|
+
get enableHQ(): boolean;
|
|
627
|
+
set enableHQ(enable: boolean);
|
|
907
628
|
/**
|
|
908
629
|
* 是否开启后处理
|
|
909
630
|
*/
|
|
@@ -1031,7 +752,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
1031
752
|
/**
|
|
1032
753
|
* 获取观测点
|
|
1033
754
|
*/
|
|
1034
|
-
get observers():
|
|
755
|
+
get observers(): WorkResolvedObserver[];
|
|
1035
756
|
/**
|
|
1036
757
|
* 强制渲染
|
|
1037
758
|
* @description
|
|
@@ -1056,16 +777,14 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
1056
777
|
* @param options - 移动点位参数
|
|
1057
778
|
* @param userAction - 是否用户触犯
|
|
1058
779
|
*/
|
|
1059
|
-
moveToPano(
|
|
1060
|
-
moveToPano(panoIndex: number, options?: MovePanoOptions, userAction?: boolean): Promise<void>;
|
|
780
|
+
moveToPano(pano: Pano | PanoId | number, options?: MovePanoOptions, userAction?: boolean): Promise<void>;
|
|
1061
781
|
/**
|
|
1062
782
|
* 预加载点位图片资源
|
|
1063
|
-
* @param
|
|
783
|
+
* @param pano - 观察点序号
|
|
1064
784
|
* @param callback - 加载完成回调, 并传递加载用时。
|
|
1065
785
|
* @returns 加载完成的 Promise 参数同 callback
|
|
1066
786
|
*/
|
|
1067
|
-
preloadPano(
|
|
1068
|
-
preloadPano(panoIndex: number, callback?: (costs: number) => void): Promise<number>;
|
|
787
|
+
preloadPano(pano: Pano | PanoId | number, callback?: (costs: number) => void): Promise<number>;
|
|
1069
788
|
/**
|
|
1070
789
|
* 计算三维坐标对应到屏幕的二维坐标
|
|
1071
790
|
* @description
|
|
@@ -1125,8 +844,6 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
1125
844
|
private applyController;
|
|
1126
845
|
/** 移除事件绑定 */
|
|
1127
846
|
private removeEventListeners;
|
|
1128
|
-
/** 销毁GPU Picking 所用的材质 */
|
|
1129
|
-
private diposeGPUPickingMaterial;
|
|
1130
847
|
}
|
|
1131
848
|
|
|
1132
849
|
/** Five 初始化参数 */
|
|
@@ -1266,168 +983,611 @@ export declare interface FiveInitArgs {
|
|
|
1266
983
|
*/
|
|
1267
984
|
plugins?: (FivePlugin<void> | FivePluginInit<FivePlugin<any, any>> | FivePluginInit<FivePlugin<void, any>>)[];
|
|
1268
985
|
/**
|
|
1269
|
-
* 是否展示 powered by 如视
|
|
986
|
+
* 是否展示 powered by 如视
|
|
987
|
+
*/
|
|
988
|
+
poweredByRealsee?: boolean;
|
|
989
|
+
/**
|
|
990
|
+
* 是否使用webgl2渲染执行环境, 默认值 false
|
|
991
|
+
*/
|
|
992
|
+
webgl2?: boolean;
|
|
993
|
+
/**
|
|
994
|
+
* 是否开启模型裁切
|
|
995
|
+
*/
|
|
996
|
+
localClippingEnabled?: boolean;
|
|
997
|
+
/**
|
|
998
|
+
* 请求代理
|
|
999
|
+
* @param url - 发起的请求
|
|
1000
|
+
* @returns 返回的请求
|
|
1001
|
+
*/
|
|
1002
|
+
requestProxy?(url: string): string | Promise<string>;
|
|
1003
|
+
/**
|
|
1004
|
+
* 模型lod相关的配置,maxDepth为加载的最大深度
|
|
1005
|
+
*/
|
|
1006
|
+
modelLod?: {
|
|
1007
|
+
maxDepth?: number;
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* Five 插件
|
|
1013
|
+
* [[include:plugins.md]]
|
|
1014
|
+
* @template Parameters - 插件参数, 没有参数则为 void
|
|
1015
|
+
* @template Returns - 如果有参数则插件暴露的 api,没有参数则不传
|
|
1016
|
+
*/
|
|
1017
|
+
export declare type FivePlugin<Parameters = void, Returns = void> = Parameters extends void ? ((five: Five) => Returns) : ((five: Five, parameters: Parameters) => Returns);
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* 获取插件在Five中的初始化结构
|
|
1021
|
+
* @template T - Five 插件
|
|
1022
|
+
*/
|
|
1023
|
+
export declare type FivePluginInit<T extends FivePlugin<any, any>> = Parameters<T>[1] extends undefined ? [
|
|
1024
|
+
Plugin: T,
|
|
1025
|
+
instanceName: null | string
|
|
1026
|
+
] : [
|
|
1027
|
+
Plugin: T,
|
|
1028
|
+
instanceName: null | string,
|
|
1029
|
+
parameters: Parameters<T>[1]
|
|
1030
|
+
];
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* 获取插件暴露的 api
|
|
1034
|
+
* @template T - Five 插件
|
|
1035
|
+
*/
|
|
1036
|
+
export declare type FivePluginInstance<T extends FivePlugin<any, any>> = ReturnType<T>;
|
|
1037
|
+
|
|
1038
|
+
export declare interface FloorplanControllerCustomInitArgs {
|
|
1039
|
+
/** 默认俯仰角 */
|
|
1040
|
+
defaultLatitude?: number;
|
|
1041
|
+
/** 最大俯仰角 */
|
|
1042
|
+
maxLatitude?: number;
|
|
1043
|
+
/** 最小俯仰角 */
|
|
1044
|
+
minLatitude?: number;
|
|
1045
|
+
/** 默认相机可视角度(垂直),可作为 `zoom` */
|
|
1046
|
+
defaultFov?: number;
|
|
1047
|
+
/** 最大相机可视角度 */
|
|
1048
|
+
maxFov?: number;
|
|
1049
|
+
/** 最小相机可视角度 */
|
|
1050
|
+
minFov?: number;
|
|
1051
|
+
/** 鼠标焦点环自定义创建器 */
|
|
1052
|
+
intersectMeshCreator?: () => IntersectMeshInterface;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
export declare interface GestureEvent extends StateEvent {
|
|
1056
|
+
target: EventTarget | null;
|
|
1057
|
+
pointerType: 'touch' | 'pen' | 'mouse' | 'kinect';
|
|
1058
|
+
srcEvent: MouseEvent | TouchEvent | PointerEvent;
|
|
1059
|
+
pointers: {
|
|
1060
|
+
x: number;
|
|
1061
|
+
y: number;
|
|
1062
|
+
delta: number;
|
|
1063
|
+
buttons: number;
|
|
1064
|
+
coords: THREE_2.Vector2;
|
|
1065
|
+
raycaster: THREE_2.Raycaster;
|
|
1066
|
+
}[];
|
|
1067
|
+
isFirst: boolean;
|
|
1068
|
+
isFinal: boolean;
|
|
1069
|
+
scale: number;
|
|
1070
|
+
center: {
|
|
1071
|
+
x: number;
|
|
1072
|
+
y: number;
|
|
1073
|
+
delta: number;
|
|
1074
|
+
buttons: number;
|
|
1075
|
+
coords: THREE_2.Vector2;
|
|
1076
|
+
raycaster: THREE_2.Raycaster;
|
|
1077
|
+
};
|
|
1078
|
+
velocityX: number;
|
|
1079
|
+
velocityY: number;
|
|
1080
|
+
overallVelocityX: number;
|
|
1081
|
+
overallVelocityY: number;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
export declare type GestureTypes = "pan" | "tap" | "pinch" | "press" | "mouseWheel" | "mouseMove";
|
|
1085
|
+
|
|
1086
|
+
export declare function getViewportScale(): number;
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* 图片参数
|
|
1090
|
+
*/
|
|
1091
|
+
export declare interface ImageOptions {
|
|
1092
|
+
/**
|
|
1093
|
+
* url 地址转化
|
|
1094
|
+
* @param url - 原始地址
|
|
1095
|
+
* @param options - 当前地址参数
|
|
1096
|
+
* @returns 转化后地址
|
|
1097
|
+
*/
|
|
1098
|
+
transform?: (url: string, options: ImageURLOptions) => string;
|
|
1099
|
+
/** 图片尺寸参数 尽量使用 2 的幂次 如 512 1024 2048 */
|
|
1100
|
+
size?: number;
|
|
1101
|
+
/** 图片质量参数(0-100) */
|
|
1102
|
+
quality?: number;
|
|
1103
|
+
/** 图片格式参数 */
|
|
1104
|
+
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
1105
|
+
/** 锐化参数 海外不支持 */
|
|
1106
|
+
sharpen?: number;
|
|
1107
|
+
mappings?: ImageURLMappings;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
export declare function imageSupport(): Promise<{
|
|
1111
|
+
avif: boolean;
|
|
1112
|
+
webp: boolean;
|
|
1113
|
+
}>;
|
|
1114
|
+
|
|
1115
|
+
export declare interface ImageURLMappings {
|
|
1116
|
+
[publicDomain: string]: {
|
|
1117
|
+
"type"?: string;
|
|
1118
|
+
"pano": [string, string];
|
|
1119
|
+
"tile": [string, string];
|
|
1120
|
+
"model": [string, string];
|
|
1121
|
+
"texture": [string];
|
|
1122
|
+
"default": [string];
|
|
1123
|
+
};
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
export declare interface ImageURLOptions {
|
|
1127
|
+
/** 图片类型标识 */
|
|
1128
|
+
key: string;
|
|
1129
|
+
/** 图片尺寸参数 尽量使用 2 的幂次 如 256 512 1024 */
|
|
1130
|
+
size?: number;
|
|
1131
|
+
/** 图片质量参数(0-100) */
|
|
1132
|
+
quality?: number;
|
|
1133
|
+
/** 图片格式参数 */
|
|
1134
|
+
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
1135
|
+
/** 图片裁切 */
|
|
1136
|
+
cut?: [x: number, y: number, width: number, height: number];
|
|
1137
|
+
/** 锐化参数 海外不支持 */
|
|
1138
|
+
sharpen?: number;
|
|
1139
|
+
/** url匹配规则 */
|
|
1140
|
+
mappings?: ImageURLMappings;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
export declare class InternalWebGLRenderer extends THREE_2.WebGLRenderer {
|
|
1144
|
+
constructor({ preserveDrawingBuffer, backgroundColor, backgroundAlpha, pixelRatio, antialias, webgl2, }: {
|
|
1145
|
+
preserveDrawingBuffer?: boolean;
|
|
1146
|
+
backgroundColor?: number | THREE_2.Color;
|
|
1147
|
+
backgroundAlpha?: number;
|
|
1148
|
+
pixelRatio?: number;
|
|
1149
|
+
antialias?: boolean;
|
|
1150
|
+
webgl2?: boolean;
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
export declare interface IntersectEvent extends BaseEvent {
|
|
1155
|
+
object: THREE_2.Object3D;
|
|
1156
|
+
raycaster: THREE_2.Raycaster;
|
|
1157
|
+
intersection: Intersection | null;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
export declare interface Intersection {
|
|
1161
|
+
/** 焦点坐标 */
|
|
1162
|
+
point: THREE.Vector3;
|
|
1163
|
+
/** 焦点面片 */
|
|
1164
|
+
face?: {
|
|
1165
|
+
normal: THREE.Vector3;
|
|
1166
|
+
} | null;
|
|
1167
|
+
/** 焦点距离 */
|
|
1168
|
+
distance: number;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
export declare class IntersectMesh extends THREE_2.Object3D implements IntersectMeshInterface {
|
|
1172
|
+
private ringMesh;
|
|
1173
|
+
constructor();
|
|
1174
|
+
dispose(): void;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* 地面提示点位接口
|
|
1179
|
+
*/
|
|
1180
|
+
export declare interface IntersectMeshInterface extends THREE_2.Object3D {
|
|
1181
|
+
dispose(): void;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
export declare function isPanoId(id: any): id is PanoId;
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* 过时的事件列表
|
|
1188
|
+
*/
|
|
1189
|
+
export declare type LegacyEventType = {
|
|
1190
|
+
/**
|
|
1191
|
+
* 模态间切换动画开始
|
|
1192
|
+
* @param panoIndex - 当前点位
|
|
1193
|
+
* @param pose - 相机姿态
|
|
1194
|
+
* @param userAction - 是否用户触发
|
|
1195
|
+
*/
|
|
1196
|
+
initAnimationWillStart(panoIndex: number, pose: Pose, userAction: boolean): void;
|
|
1197
|
+
/**
|
|
1198
|
+
* 模态间切换动画结束
|
|
1199
|
+
* @param panoIndex - 当前点位
|
|
1200
|
+
* @param pose - 相机姿态
|
|
1201
|
+
* @param userAction - 是否用户触发
|
|
1202
|
+
*/
|
|
1203
|
+
initAnimationEnded(panoIndex: number, pose: Pose, userAction: boolean): void;
|
|
1204
|
+
/**
|
|
1205
|
+
* 意图要触发手势, 可以通过 `return false` 阻止
|
|
1206
|
+
* @param type - 手势类型
|
|
1207
|
+
* @param pointers - 手指位置
|
|
1208
|
+
* @param final - 是否手势结束
|
|
1209
|
+
* @returns 可以通过 `return false` 阻止
|
|
1210
|
+
*/
|
|
1211
|
+
wantsGesture(type: GestureTypes, pointers: {
|
|
1212
|
+
x: number;
|
|
1213
|
+
y: number;
|
|
1214
|
+
delta?: number;
|
|
1215
|
+
}[], final: boolean): void | false;
|
|
1216
|
+
/**
|
|
1217
|
+
* 手势 触发
|
|
1218
|
+
* @param type - 手势类型
|
|
1219
|
+
* @param pointers - 手指位置
|
|
1220
|
+
* @param final - 是否手势结束
|
|
1221
|
+
*/
|
|
1222
|
+
gesture(type: GestureTypes, pointers: {
|
|
1223
|
+
x: number;
|
|
1224
|
+
y: number;
|
|
1225
|
+
delta?: number;
|
|
1226
|
+
}[], final: boolean): void;
|
|
1227
|
+
/**
|
|
1228
|
+
* 意图要触发 pan 手势(滑动屏幕), 可以通过 `return false` 阻止
|
|
1229
|
+
* @param pose - 意图的相机姿态
|
|
1230
|
+
* @param final - 是否手势结束
|
|
1231
|
+
* @returns 可以通过 `return false` 阻止
|
|
1232
|
+
*/
|
|
1233
|
+
wantsPanGesture(pose: Pose, final: boolean): void | false;
|
|
1234
|
+
/**
|
|
1235
|
+
* pan 手势(滑动屏幕) 被触发
|
|
1236
|
+
* @param pose - 相机姿态
|
|
1237
|
+
* @param final - 是否手势结束
|
|
1238
|
+
*/
|
|
1239
|
+
panGesture(pose: Pose, final: boolean): void;
|
|
1240
|
+
/**
|
|
1241
|
+
* 意图要触发 tap 手势(点击屏幕), 可以通过 `return false` 阻止
|
|
1242
|
+
* @param raycaster - 点击对应的三维射线
|
|
1243
|
+
* @param tapPosition - 点击对应的屏幕位置
|
|
1244
|
+
* @param final - 是否手势结束
|
|
1245
|
+
* @returns 可以通过 `return false` 阻止
|
|
1246
|
+
*/
|
|
1247
|
+
wantsTapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, final: boolean): void | false;
|
|
1248
|
+
/**
|
|
1249
|
+
* tap 手势(点击屏幕) 被触发
|
|
1250
|
+
* @param raycaster - 点击对应的三维射线
|
|
1251
|
+
* @param tapPosition - 点击对应的屏幕位置
|
|
1252
|
+
* @param final - 是否手势结束
|
|
1253
|
+
*/
|
|
1254
|
+
tapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, final: boolean): void;
|
|
1255
|
+
/**
|
|
1256
|
+
* 意图要触发 pinch 手势(双指缩放),可以通过 `return false` 阻止
|
|
1257
|
+
* @param scale - 缩放数值
|
|
1258
|
+
* @param nextFov - 意图的fov变更
|
|
1259
|
+
* @param final - 是否手势结束
|
|
1260
|
+
* @returns 可以通过 `return false` 阻止
|
|
1261
|
+
*/
|
|
1262
|
+
wantsPinchGesture(scale: number, nextFov: number, final: boolean): void | false;
|
|
1263
|
+
/**
|
|
1264
|
+
* 意图要触发 press 手势(长按屏幕), 可以通过 `return false` 阻止
|
|
1265
|
+
* @param raycaster - 长按对应的三维射线
|
|
1266
|
+
* @param tapPosition - 长按对应的屏幕位置
|
|
1267
|
+
* @param duration - 长按持续时间
|
|
1268
|
+
* @param final - 是否手势结束
|
|
1269
|
+
* @returns 可以通过 `return false` 阻止
|
|
1270
|
+
*/
|
|
1271
|
+
wantsPressGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, duration: number, isFinal: boolean): void | false;
|
|
1272
|
+
/**
|
|
1273
|
+
* tap 手势(点击屏幕) 被触发
|
|
1274
|
+
* @param raycaster - 点击对应的三维射线
|
|
1275
|
+
* @param tapPosition - 点击对应的屏幕位置
|
|
1276
|
+
* @param duration - 长按持续时间
|
|
1277
|
+
* @param final - 是否手势结束
|
|
1278
|
+
*/
|
|
1279
|
+
pressGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, duration: number, isFinal: boolean): void;
|
|
1280
|
+
/**
|
|
1281
|
+
* pinch 手势(双指缩放) 被触发
|
|
1282
|
+
* @param scale - 缩放数值
|
|
1283
|
+
* @param nextFov - 意图的fov变更
|
|
1284
|
+
* @param final - 是否手势结束
|
|
1285
|
+
*/
|
|
1286
|
+
pinchGesture(scale: number, fov: number, final: boolean): void;
|
|
1287
|
+
/**
|
|
1288
|
+
* 意图要触发 鼠标滚轮 可以通过 `return false` 阻止
|
|
1289
|
+
* @param delta - 滚轮数值
|
|
1290
|
+
* @param nextFov - 意图的fov变更
|
|
1291
|
+
* @param final - 是否手势结束
|
|
1292
|
+
* @returns 可以通过 `return false` 阻止
|
|
1293
|
+
*/
|
|
1294
|
+
wantsMouseWheel(delta: number, nextFov: number, final: boolean): void | false;
|
|
1295
|
+
/**
|
|
1296
|
+
* 鼠标滚轮被触发
|
|
1297
|
+
* @param delta - 滚轮数值
|
|
1298
|
+
* @param nextFov - 意图的fov变更
|
|
1299
|
+
* @param final - 是否手势结束
|
|
1300
|
+
*/
|
|
1301
|
+
mouseWheel(delta: number, fov: number, final: boolean): void;
|
|
1302
|
+
/**
|
|
1303
|
+
* 意图要触发 pan 手势(滑动屏幕) 的惯性运动, 可以通过 `return false` 阻止
|
|
1304
|
+
* @param pose - 意图的相机姿态
|
|
1305
|
+
* @param final - 是否手势结束
|
|
1306
|
+
* @returns 可以通过 `return false` 阻止
|
|
1307
|
+
*/
|
|
1308
|
+
wantsInteriaPan(pose: Pose): void | false;
|
|
1309
|
+
/**
|
|
1310
|
+
* pan 手势(滑动屏幕) 的惯性运动
|
|
1311
|
+
* @param pose - 意图的相机姿态
|
|
1312
|
+
* @param final - 是否手势结束
|
|
1313
|
+
*/
|
|
1314
|
+
interiaPan(pose: Pose, final: boolean): void;
|
|
1315
|
+
/**
|
|
1316
|
+
* 意图要变化相机的可视角度 可以通过 `return false` 阻止
|
|
1317
|
+
* @deprecated
|
|
1318
|
+
* 建议通过 初始化设置的 `defaultFov`, `maxFov`, `minFov` 来限制
|
|
1319
|
+
* @param fov - 意图要变化相机的可视角度
|
|
1320
|
+
* @returns 可以通过 `return false` 阻止
|
|
1321
|
+
*/
|
|
1322
|
+
wantsChangeCameraFov(fov: number): void | false;
|
|
1323
|
+
/**
|
|
1324
|
+
* 相机姿态变化
|
|
1325
|
+
* @param pose - 相机姿态
|
|
1326
|
+
* @param userAction - 是否用户触发
|
|
1327
|
+
*/
|
|
1328
|
+
cameraUpdate(pose: Pose, userAction: boolean): void;
|
|
1329
|
+
/**
|
|
1330
|
+
* 相机姿态中可视角度变化
|
|
1331
|
+
* @param fov - 相机的可视角度
|
|
1332
|
+
* @param userAction - 是否用户触发
|
|
1333
|
+
*/
|
|
1334
|
+
cameraFovUpdate(fov: Pose["fov"], userAction: boolean): void;
|
|
1335
|
+
/**
|
|
1336
|
+
* 相机姿态中相机位置变化
|
|
1337
|
+
* @param offset - 相机位置
|
|
1338
|
+
* @param userAction - 是否用户触发
|
|
1339
|
+
*/
|
|
1340
|
+
cameraPositionUpdate(offset: Pose["offset"], userAction: boolean): void;
|
|
1341
|
+
/**
|
|
1342
|
+
* 相机姿态中相机方向变化
|
|
1343
|
+
* @param coordinates - 相机姿态的俯仰角和偏航角
|
|
1344
|
+
* @param userAction - 是否用户触发
|
|
1345
|
+
*/
|
|
1346
|
+
cameraDirectionUpdate(coordinates: Pick<Pose, "longitude" | "latitude">, userAction: boolean): void;
|
|
1347
|
+
/**
|
|
1348
|
+
* 鼠标焦点环位置被重新计算
|
|
1349
|
+
* @param intersection - 焦点碰撞结果
|
|
1350
|
+
* @param mesh - 焦点环 mesh
|
|
1351
|
+
*/
|
|
1352
|
+
intersectionOnModelUpdate(intersection: Intersection, mesh: THREE_2.Object3D): void;
|
|
1353
|
+
/**
|
|
1354
|
+
* 意图要展示鼠标焦点环,可以通过 `return false` 阻止
|
|
1355
|
+
* @param intersection - 焦点碰撞结果
|
|
1356
|
+
* @returns 可以通过 `return false` 阻止
|
|
1357
|
+
*/
|
|
1358
|
+
wantsShowIntersectionOnModel(raycaster: THREE_2.Raycaster): void | false;
|
|
1359
|
+
/** 鼠标焦点环被隐藏 */
|
|
1360
|
+
intersectionHidden(): void;
|
|
1361
|
+
/**
|
|
1362
|
+
* 意图要移动到某个点时, 可以通过 return false 阻止
|
|
1363
|
+
* @param panoIndex - 意图要移动到点位
|
|
1364
|
+
* @param options - 移动参数
|
|
1365
|
+
* @param userAction - 是否用户触发
|
|
1366
|
+
* @returns 可以通过 return false 阻止
|
|
1367
|
+
*/
|
|
1368
|
+
wantsMoveToPano(panoIndex: number, options: MovePanoOptions, userAction: boolean): void | false;
|
|
1369
|
+
/**
|
|
1370
|
+
* 同 wantsMoveToPano
|
|
1371
|
+
* @description
|
|
1372
|
+
* @param panoIndex - 意图要移动到点位
|
|
1373
|
+
* @param options - 移动参数
|
|
1374
|
+
* @param userAction - 是否用户触发
|
|
1375
|
+
* @returns 可以通过 return false 阻止
|
|
1376
|
+
*/
|
|
1377
|
+
wantsToMoveToPano(panoIndex: number, options: MovePanoOptions, userAction: boolean): void;
|
|
1378
|
+
/**
|
|
1379
|
+
* 观察点位被选择
|
|
1380
|
+
* @param panoIndex - 选择的点位
|
|
1381
|
+
*/
|
|
1382
|
+
panoSelected(panoIndex: number | null): void;
|
|
1383
|
+
/**
|
|
1384
|
+
* 开始加载并移动到某个观察点位
|
|
1385
|
+
* @description
|
|
1386
|
+
* 可 panoWillArrive 相比
|
|
1387
|
+
* - moveToPano 在加载全景图资源前触发
|
|
1388
|
+
* - panoWillArrive 在加载全景图资源后触发
|
|
1389
|
+
* @param panoIndex - 移动到的点位
|
|
1390
|
+
* @param userAction - 是否用户触发
|
|
1391
|
+
*/
|
|
1392
|
+
moveToPano(panoIndex: number, userAction: boolean): void;
|
|
1393
|
+
/**
|
|
1394
|
+
* 移动中, 会告知移动状态(耗时百分比)
|
|
1395
|
+
* @param panoIndex - 将要移动到的点位下标
|
|
1396
|
+
* @param prevPanoIndex - 上一个点位下标
|
|
1397
|
+
* @param progress - 整个过程经度 [0-1]
|
|
1398
|
+
*/
|
|
1399
|
+
movingToPano(panoIndex: number, prevPanoIndex: number, progress: number): void;
|
|
1400
|
+
/**
|
|
1401
|
+
* 开始加载某个观察点的全景资源
|
|
1402
|
+
* @param pano - 移动到的点位
|
|
1403
|
+
*/
|
|
1404
|
+
panoWillLoad(panoIndex: number): void;
|
|
1405
|
+
/**
|
|
1406
|
+
* 某个观察点的全景资源加载完成
|
|
1407
|
+
* @param panoIndex - 对应的点位
|
|
1408
|
+
*/
|
|
1409
|
+
panoLoaded(panoIndex: number): void;
|
|
1410
|
+
/**
|
|
1411
|
+
* 开始移动到某个观察点位
|
|
1412
|
+
* @description
|
|
1413
|
+
* 和 moveToPano 相比
|
|
1414
|
+
* - moveToPano 在加载全景图资源前触发
|
|
1415
|
+
* - panoWillArrive 在加载全景图资源后触发
|
|
1416
|
+
* @param panoIndex - 移动到点位
|
|
1417
|
+
* @param pose - 相机姿态
|
|
1418
|
+
* @param userAction - 是否用户触发
|
|
1419
|
+
*/
|
|
1420
|
+
panoWillArrive(panoIndex: number, pose: Pose, userAction: boolean): void;
|
|
1421
|
+
/**
|
|
1422
|
+
* 移动到某个观察点位
|
|
1423
|
+
* @param panoIndex - 移动到点位
|
|
1424
|
+
* @param pose - 相机姿态
|
|
1425
|
+
* @param userAction - 是否用户触发
|
|
1426
|
+
*/
|
|
1427
|
+
panoArrived(panoIndex: number, pose: Pose, userAction: boolean): void;
|
|
1428
|
+
/**
|
|
1429
|
+
* 某个观察点的全景资源加载失败
|
|
1430
|
+
* @param error - 错误对象
|
|
1431
|
+
* @param panoIndex - 对应的点位
|
|
1432
|
+
*/
|
|
1433
|
+
panoLoadError(error: Error, panoIndex: number): void;
|
|
1434
|
+
/**
|
|
1435
|
+
* 移动到某个观察点位被取消
|
|
1436
|
+
* @description
|
|
1437
|
+
* 这个有一些情况会导致
|
|
1438
|
+
* - 移动过程中切换模态
|
|
1439
|
+
* - 移动过程中 five 被析构
|
|
1440
|
+
* - 移动过程点击切换到另一个点位
|
|
1441
|
+
* @param panoIndex - 对应的点位
|
|
1442
|
+
*/
|
|
1443
|
+
moveToPanoCanceled(panoIndex: number): void;
|
|
1444
|
+
/**
|
|
1445
|
+
* 观察点的全景资源开始加载
|
|
1446
|
+
* @param panoIndex - 加载点位
|
|
1447
|
+
*/
|
|
1448
|
+
textureStartLoad(panoIndex: number): void;
|
|
1449
|
+
/**
|
|
1450
|
+
* 观察点的全景资源加载中,可获取到进度
|
|
1451
|
+
* @param progress - 加载进度 [0-1]
|
|
1452
|
+
* @param panoIndex - 加载点位下标
|
|
1453
|
+
*/
|
|
1454
|
+
textureLoading(progress: number, panoIndex: number): void;
|
|
1455
|
+
/**
|
|
1456
|
+
* 观察点的全景资源加载被中止
|
|
1457
|
+
* @param panoIndex - 加载点位
|
|
1458
|
+
*/
|
|
1459
|
+
textureAbort(panoIndex: number): void;
|
|
1460
|
+
/**
|
|
1461
|
+
* 观察点的全景资源加载失败
|
|
1462
|
+
* @param error - 错误对象
|
|
1463
|
+
* @param panoIndex - 加载点位
|
|
1464
|
+
*/
|
|
1465
|
+
textureError(error: Error, panoIndex: number): void;
|
|
1466
|
+
/**
|
|
1467
|
+
* 观察点的全景资源加载完成
|
|
1468
|
+
* @param panoIndex - 加载点位
|
|
1469
|
+
*/
|
|
1470
|
+
textureLoaded(panoIndex: number, meta: (NetWorkMeta | null)[]): void;
|
|
1471
|
+
/**
|
|
1472
|
+
* webXR模式开始,webxr session完成坐标系矫正
|
|
1473
|
+
*/
|
|
1474
|
+
webXRSessionStart(): void;
|
|
1475
|
+
/**
|
|
1476
|
+
* webXR模式结束,webxr session销毁
|
|
1477
|
+
*/
|
|
1478
|
+
webXRSessionEnd(): void;
|
|
1479
|
+
/**
|
|
1480
|
+
* axes代表控制杆,axes数组的0-1元素分别代表左控制器的左(-1)右(1),左控制器的上(-1)下(1),axes数组的2-3元素同理
|
|
1481
|
+
*/
|
|
1482
|
+
webXRControllerEvent(type: WebXRControllerType, key: WebXRControllerKey, params: WebXRControllerParams): void;
|
|
1483
|
+
/**
|
|
1484
|
+
* xr控制器的Axes原始实时数据状态
|
|
1485
|
+
*/
|
|
1486
|
+
webXRAxesUpdate(type: 'left' | 'right', param: WebXRAxesParams): void;
|
|
1487
|
+
/**
|
|
1488
|
+
* xr控制器的控制器射线更新
|
|
1489
|
+
*/
|
|
1490
|
+
webXRControllerRayUpdate(raycaster: {
|
|
1491
|
+
leftRay: THREE_2.Raycaster;
|
|
1492
|
+
rightRay: THREE_2.Raycaster;
|
|
1493
|
+
}): void;
|
|
1494
|
+
/**
|
|
1495
|
+
* 准备加载 Work 数据
|
|
1496
|
+
* @param input - 输入的 work
|
|
1497
|
+
* @param work - 归一化的标准 work
|
|
1498
|
+
* @param state - 加载时的姿态
|
|
1499
|
+
*/
|
|
1500
|
+
willLoad(input: any, work: Work, state: Partial<State>): void;
|
|
1501
|
+
/**
|
|
1502
|
+
* 开始加载 Work 数据
|
|
1503
|
+
* @param input - 输入的 work
|
|
1504
|
+
* @param work - 归一化的标准 work
|
|
1505
|
+
* @param state - 加载时的姿态
|
|
1506
|
+
*/
|
|
1507
|
+
load(input: any, work: Work, state: Partial<State>): void;
|
|
1508
|
+
/**
|
|
1509
|
+
* 加载完 Work 数据
|
|
1510
|
+
* @param input - 输入的 work
|
|
1511
|
+
* @param work - 归一化的标准 work
|
|
1512
|
+
*/
|
|
1513
|
+
loaded(input: any, work: Work): void;
|
|
1514
|
+
/**
|
|
1515
|
+
* 当目标 state 变化时
|
|
1516
|
+
* @param state - 当前姿态状态
|
|
1517
|
+
* @param userAction - 是否用户触发
|
|
1518
|
+
*/
|
|
1519
|
+
stateChange(state: State, userAction: boolean): void;
|
|
1520
|
+
/**
|
|
1521
|
+
* 当前实时 state 变化时
|
|
1522
|
+
* @param state - 当前姿态状态
|
|
1523
|
+
* @param userAction - 是否用户触发
|
|
1524
|
+
*/
|
|
1525
|
+
currentStateChange(state: State, userAction: boolean): void;
|
|
1526
|
+
/**
|
|
1527
|
+
* 当 setState 方法被调用
|
|
1528
|
+
* @param state - 当前姿态状态
|
|
1529
|
+
*/
|
|
1530
|
+
setState(state: State): void;
|
|
1531
|
+
/**
|
|
1532
|
+
* 当 state 被同步完成时
|
|
1533
|
+
* @param state - 当前姿态状态
|
|
1534
|
+
*/
|
|
1535
|
+
stateSynced(state: State): void;
|
|
1536
|
+
/**
|
|
1537
|
+
* 模型开始加载
|
|
1538
|
+
* @param workModel - 归一化的标准 work 中的 model 值
|
|
1539
|
+
*/
|
|
1540
|
+
modelWillLoad(workModel: WorkModel): void;
|
|
1541
|
+
/**
|
|
1542
|
+
* 模型加载错误
|
|
1543
|
+
* @param error - 错误对象
|
|
1544
|
+
* @param model - 加载完的 model
|
|
1545
|
+
*/
|
|
1546
|
+
modelLoadError(error: Error, model: Model): void;
|
|
1547
|
+
/**
|
|
1548
|
+
* 模型加载完成
|
|
1549
|
+
* @param models - 加载完的 model
|
|
1550
|
+
*/
|
|
1551
|
+
modelLoaded(model: Model): void;
|
|
1552
|
+
/**
|
|
1553
|
+
* 模型楼层切换
|
|
1554
|
+
* @param shownFloor - 模型楼层
|
|
1270
1555
|
*/
|
|
1271
|
-
|
|
1556
|
+
modelShownFloorChange(shownFloor: number | null, floorLength: number): void;
|
|
1272
1557
|
/**
|
|
1273
|
-
*
|
|
1558
|
+
* 渲染循环
|
|
1559
|
+
* @param rendered - 是否渲染了
|
|
1274
1560
|
*/
|
|
1275
|
-
|
|
1561
|
+
renderFrame(rendered: boolean): void;
|
|
1276
1562
|
/**
|
|
1277
|
-
*
|
|
1563
|
+
* 意图要切换到某个模态, 可以通过 return false 阻止
|
|
1564
|
+
* @param mode - 意图要切换到的模态
|
|
1565
|
+
* @param prevMode - 当前模态
|
|
1566
|
+
* @returns 可以通过 return false 阻止
|
|
1278
1567
|
*/
|
|
1279
|
-
|
|
1568
|
+
wantsChangeMode(mode: Mode, prevMode: Mode): void | false;
|
|
1280
1569
|
/**
|
|
1281
|
-
*
|
|
1282
|
-
* @param
|
|
1283
|
-
* @
|
|
1570
|
+
* 模态切换完成
|
|
1571
|
+
* @param mode - 切换到的模态
|
|
1572
|
+
* @param prevMode - 上本质是一个模态
|
|
1573
|
+
* @param panoIndex - 初始化动画结束后的点位下标
|
|
1574
|
+
* @param toPose - 初始化动画结束后的状态
|
|
1575
|
+
* @param userAction - 是否用户触发
|
|
1284
1576
|
*/
|
|
1285
|
-
|
|
1577
|
+
modeChange(mode: Mode, prevMode: Mode, panoIndex: number, toPose: Pose, userAction: boolean): void;
|
|
1286
1578
|
/**
|
|
1287
|
-
*
|
|
1579
|
+
* 帮助元素显应的变换
|
|
1580
|
+
* @param visible - 帮助元素的是否开启
|
|
1288
1581
|
*/
|
|
1289
|
-
|
|
1290
|
-
maxDepth?: number;
|
|
1291
|
-
};
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
/**
|
|
1295
|
-
* Five 插件
|
|
1296
|
-
* [[include:plugins.md]]
|
|
1297
|
-
* @template Parameters - 插件参数, 没有参数则为 void
|
|
1298
|
-
* @template Returns - 如果有参数则插件暴露的 api,没有参数则不传
|
|
1299
|
-
*/
|
|
1300
|
-
export declare type FivePlugin<Parameters = void, Returns = void> = Parameters extends void ? ((five: Five) => Returns) : ((five: Five, parameters: Parameters) => Returns);
|
|
1301
|
-
|
|
1302
|
-
/**
|
|
1303
|
-
* 获取插件在Five中的初始化结构
|
|
1304
|
-
* @template T - Five 插件
|
|
1305
|
-
*/
|
|
1306
|
-
export declare type FivePluginInit<T extends FivePlugin<any, any>> = Parameters<T>[1] extends undefined ? [
|
|
1307
|
-
Plugin: T,
|
|
1308
|
-
instanceName: null | string
|
|
1309
|
-
] : [
|
|
1310
|
-
Plugin: T,
|
|
1311
|
-
instanceName: null | string,
|
|
1312
|
-
parameters: Parameters<T>[1]
|
|
1313
|
-
];
|
|
1314
|
-
|
|
1315
|
-
/**
|
|
1316
|
-
* 获取插件暴露的 api
|
|
1317
|
-
* @template T - Five 插件
|
|
1318
|
-
*/
|
|
1319
|
-
export declare type FivePluginInstance<T extends FivePlugin<any, any>> = ReturnType<T>;
|
|
1320
|
-
|
|
1321
|
-
export declare interface FloorplanControllerCustomInitArgs {
|
|
1322
|
-
/** 默认俯仰角 */
|
|
1323
|
-
defaultLatitude?: number;
|
|
1324
|
-
/** 最大俯仰角 */
|
|
1325
|
-
maxLatitude?: number;
|
|
1326
|
-
/** 最小俯仰角 */
|
|
1327
|
-
minLatitude?: number;
|
|
1328
|
-
/** 默认相机可视角度(垂直),可作为 `zoom` */
|
|
1329
|
-
defaultFov?: number;
|
|
1330
|
-
/** 最大相机可视角度 */
|
|
1331
|
-
maxFov?: number;
|
|
1332
|
-
/** 最小相机可视角度 */
|
|
1333
|
-
minFov?: number;
|
|
1334
|
-
/** 鼠标焦点环自定义创建器 */
|
|
1335
|
-
intersectMeshCreator?: () => IntersectMeshInterface;
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
export declare type GestureTypes = "pan" | "tap" | "pinch" | "press" | "mouseWheel";
|
|
1339
|
-
|
|
1340
|
-
export declare function getViewportScale(): number;
|
|
1341
|
-
|
|
1342
|
-
/**
|
|
1343
|
-
* 图片参数
|
|
1344
|
-
*/
|
|
1345
|
-
export declare interface ImageOptions {
|
|
1582
|
+
helpersVisibleChange(visible: boolean): void;
|
|
1346
1583
|
/**
|
|
1347
|
-
*
|
|
1348
|
-
* @param
|
|
1349
|
-
* @param
|
|
1350
|
-
* @
|
|
1584
|
+
* 网络资源分析
|
|
1585
|
+
* @param source - 资源地址
|
|
1586
|
+
* @param state - 状态
|
|
1587
|
+
* @param detail - 详情
|
|
1351
1588
|
*/
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
size?: number;
|
|
1355
|
-
/** 图片质量参数(0-100) */
|
|
1356
|
-
quality?: number;
|
|
1357
|
-
/** 图片格式参数 */
|
|
1358
|
-
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
1359
|
-
/** 锐化参数 海外不支持 */
|
|
1360
|
-
sharpen?: number;
|
|
1361
|
-
mappings?: ImageURLMappings;
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
|
-
export declare function imageSupport(): Promise<{
|
|
1365
|
-
avif: boolean;
|
|
1366
|
-
webp: boolean;
|
|
1367
|
-
}>;
|
|
1368
|
-
|
|
1369
|
-
export declare interface ImageURLMappings {
|
|
1370
|
-
[publicDomain: string]: {
|
|
1371
|
-
"type"?: string;
|
|
1372
|
-
"pano": [string, string];
|
|
1373
|
-
"tile": [string, string];
|
|
1374
|
-
"model": [string, string];
|
|
1375
|
-
"texture": [string];
|
|
1376
|
-
"default": [string];
|
|
1377
|
-
};
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
export declare interface ImageURLOptions {
|
|
1381
|
-
/** 图片类型标识 */
|
|
1382
|
-
key: string;
|
|
1383
|
-
/** 图片尺寸参数 尽量使用 2 的幂次 如 256 512 1024 */
|
|
1384
|
-
size?: number;
|
|
1385
|
-
/** 图片质量参数(0-100) */
|
|
1386
|
-
quality?: number;
|
|
1387
|
-
/** 图片格式参数 */
|
|
1388
|
-
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
1389
|
-
/** 图片裁切 */
|
|
1390
|
-
cut?: [x: number, y: number, width: number, height: number];
|
|
1391
|
-
/** 锐化参数 海外不支持 */
|
|
1392
|
-
sharpen?: number;
|
|
1393
|
-
/** url匹配规则 */
|
|
1394
|
-
mappings?: ImageURLMappings;
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
export declare class InternalWebGLRenderer extends THREE_2.WebGLRenderer {
|
|
1398
|
-
constructor({ preserveDrawingBuffer, backgroundColor, backgroundAlpha, pixelRatio, antialias, webgl2, }: {
|
|
1399
|
-
preserveDrawingBuffer?: boolean;
|
|
1400
|
-
backgroundColor?: number | THREE_2.Color;
|
|
1401
|
-
backgroundAlpha?: number;
|
|
1402
|
-
pixelRatio?: number;
|
|
1403
|
-
antialias?: boolean;
|
|
1404
|
-
webgl2?: boolean;
|
|
1405
|
-
});
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
|
-
export declare interface Intersection {
|
|
1409
|
-
/** 焦点坐标 */
|
|
1410
|
-
point: THREE.Vector3;
|
|
1411
|
-
/** 焦点面片 */
|
|
1412
|
-
face?: {
|
|
1413
|
-
normal: THREE.Vector3;
|
|
1414
|
-
} | null;
|
|
1415
|
-
/** 焦点距离 */
|
|
1416
|
-
distance: number;
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
export declare class IntersectMesh extends THREE_2.Object3D implements IntersectMeshInterface {
|
|
1420
|
-
private ringMesh;
|
|
1421
|
-
constructor();
|
|
1422
|
-
dispose(): void;
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
/**
|
|
1426
|
-
* 地面提示点位接口
|
|
1427
|
-
*/
|
|
1428
|
-
export declare interface IntersectMeshInterface extends THREE_2.Object3D {
|
|
1429
|
-
dispose(): void;
|
|
1430
|
-
}
|
|
1589
|
+
network(source: string, type: NetworkType, state: NetworkState, detail: string): void;
|
|
1590
|
+
};
|
|
1431
1591
|
|
|
1432
1592
|
export declare type LooseWork = {
|
|
1433
1593
|
work_code?: string;
|
|
@@ -1579,6 +1739,11 @@ export declare type Mode =
|
|
|
1579
1739
|
/** XR眼镜模式*/
|
|
1580
1740
|
"XRPanorama";
|
|
1581
1741
|
|
|
1742
|
+
export declare interface ModeChangeEvent extends StateEvent {
|
|
1743
|
+
prevMode: Mode;
|
|
1744
|
+
mode: Mode;
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1582
1747
|
/**
|
|
1583
1748
|
* Five 模型
|
|
1584
1749
|
* @description
|
|
@@ -1600,11 +1765,10 @@ export declare class Model extends THREE_2.Object3D {
|
|
|
1600
1765
|
}[];
|
|
1601
1766
|
onError: (error: Error) => void;
|
|
1602
1767
|
onShownFloorChange: (floorIndex: number | null) => void;
|
|
1768
|
+
onLoad: () => void;
|
|
1603
1769
|
/** 外接盒子的大小 */
|
|
1604
1770
|
bounding: THREE_2.Box3;
|
|
1605
|
-
/**
|
|
1606
|
-
shownFloor: number | null;
|
|
1607
|
-
/** 楼层的数量 */
|
|
1771
|
+
/** 所有楼层 */
|
|
1608
1772
|
floorLength: number;
|
|
1609
1773
|
/** 材质贴图参数 */
|
|
1610
1774
|
textureOptions: TextureOptions;
|
|
@@ -1625,6 +1789,7 @@ export declare class Model extends THREE_2.Object3D {
|
|
|
1625
1789
|
constructor(options?: {
|
|
1626
1790
|
onError?: (error: Error) => void;
|
|
1627
1791
|
onShownFloorChange?: (floorIndex: number | null) => void;
|
|
1792
|
+
onLoad?: () => void;
|
|
1628
1793
|
});
|
|
1629
1794
|
get empty(): boolean;
|
|
1630
1795
|
/** 获取材质参数 */
|
|
@@ -1634,13 +1799,10 @@ export declare class Model extends THREE_2.Object3D {
|
|
|
1634
1799
|
/**
|
|
1635
1800
|
* 当前显示的楼层
|
|
1636
1801
|
*/
|
|
1802
|
+
get shownFloor(): PBMParameters['floorIndex'] | null;
|
|
1803
|
+
set shownFloor(floorIndex: PBMParameters['floorIndex'] | null);
|
|
1637
1804
|
get shownfloor(): PBMParameters['floorIndex'] | null;
|
|
1638
1805
|
set shownfloor(floorIndex: PBMParameters['floorIndex'] | null);
|
|
1639
|
-
/**
|
|
1640
|
-
* 裁切
|
|
1641
|
-
*/
|
|
1642
|
-
get clippers(): PBMParameters['clippers'];
|
|
1643
|
-
set clippers(clippers: PBMParameters['clippers']);
|
|
1644
1806
|
/**
|
|
1645
1807
|
* 显示某楼层
|
|
1646
1808
|
* @example
|
|
@@ -1649,7 +1811,12 @@ export declare class Model extends THREE_2.Object3D {
|
|
|
1649
1811
|
* model.show(1) //显示第一楼层
|
|
1650
1812
|
* ```
|
|
1651
1813
|
*/
|
|
1652
|
-
show(floorIndex?:
|
|
1814
|
+
show(floorIndex?: PBMParameters['floorIndex'] | null): void;
|
|
1815
|
+
/**
|
|
1816
|
+
* 裁切
|
|
1817
|
+
*/
|
|
1818
|
+
get clippers(): PBMParameters['clippers'];
|
|
1819
|
+
set clippers(clippers: PBMParameters['clippers']);
|
|
1653
1820
|
/**
|
|
1654
1821
|
* 获取模型边界线
|
|
1655
1822
|
* @param sphere - 获取区域
|
|
@@ -1686,23 +1853,34 @@ export declare class Model extends THREE_2.Object3D {
|
|
|
1686
1853
|
export declare interface ModelControllerCustomInitArgs extends PanoramaLikeControllerCustomInitArgs {
|
|
1687
1854
|
}
|
|
1688
1855
|
|
|
1856
|
+
export declare interface ModelEvent extends BaseEvent {
|
|
1857
|
+
model: Model;
|
|
1858
|
+
work: Work;
|
|
1859
|
+
error: Error | null;
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1689
1862
|
export declare interface ModelLodOptions {
|
|
1690
1863
|
maxDepth?: number;
|
|
1691
1864
|
}
|
|
1692
1865
|
|
|
1693
|
-
export declare type ModelMaterialValues = Pick<PBMParameters, 'pano0' | 'pano1' | 'modelAlpha' | 'progress' | 'useBlackTransition' | 'opacity' | 'constantColor' | 'useEDL' | 'pointShape' | 'pointColorType' | 'pointSizeType' | 'pointSize' | 'pointMinSize' | 'pointMaxSize' | 'pointSizeAdaptiveScale' | 'gradientTexture'>;
|
|
1866
|
+
export declare type ModelMaterialValues = Pick<PBMParameters, 'pano0' | 'pano1' | 'modelAlpha' | 'progress' | 'useBlackTransition' | 'opacity' | 'constantColor' | 'useEDL' | 'useHQWeight' | 'useHQDepth' | 'pointShape' | 'pointColorType' | 'pointSizeType' | 'pointSize' | 'pointMinSize' | 'pointMaxSize' | 'pointSizeAdaptiveScale' | 'gradientTexture'>;
|
|
1694
1867
|
|
|
1695
1868
|
export declare type Models = Model[] & {
|
|
1696
1869
|
needsRender: boolean;
|
|
1697
1870
|
bounding: THREE_2.Box3;
|
|
1698
1871
|
loaded: boolean;
|
|
1699
1872
|
refined: boolean;
|
|
1873
|
+
materialVersion: string;
|
|
1700
1874
|
intersectRaycaster(raycaster: THREE_2.Raycaster): Intersection[];
|
|
1701
1875
|
setMaterial(values: Partial<ModelMaterialValues>): void;
|
|
1702
1876
|
getMaterial(): ModelMaterialValues;
|
|
1703
1877
|
update(renderer: THREE_2.WebGLRenderer, camera: Camera, mode: Mode): void;
|
|
1704
1878
|
};
|
|
1705
1879
|
|
|
1880
|
+
export declare interface ModelsEvent extends BaseEvent {
|
|
1881
|
+
models: Models;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1706
1884
|
export declare interface MotionKeyframe<K extends string> {
|
|
1707
1885
|
progress: number;
|
|
1708
1886
|
value: MotionValue<K>;
|
|
@@ -1714,7 +1892,7 @@ export declare type MotionValue<K extends string> = Record<K, number>;
|
|
|
1714
1892
|
/**
|
|
1715
1893
|
* 点位移动参数
|
|
1716
1894
|
*/
|
|
1717
|
-
export declare interface MovePanoOptions extends Partial<Omit<
|
|
1895
|
+
export declare interface MovePanoOptions extends Partial<Omit<State, "offset" | 'distance' | 'mode'>> {
|
|
1718
1896
|
/** 是否通过初始化参数限制 fov, latitude */
|
|
1719
1897
|
limit?: boolean;
|
|
1720
1898
|
/**
|
|
@@ -1737,9 +1915,9 @@ export declare interface MovePanoOptions extends Partial<Omit<Pose, "offset">> {
|
|
|
1737
1915
|
/** 运动曲线函数 */
|
|
1738
1916
|
easing?: (k: number) => number;
|
|
1739
1917
|
/** 运动开始回调 */
|
|
1740
|
-
moveStartCallback?: (
|
|
1918
|
+
moveStartCallback?: (toState: State) => void;
|
|
1741
1919
|
/** 运动结束回调 */
|
|
1742
|
-
moveEndCallback?: (
|
|
1920
|
+
moveEndCallback?: (state: State) => void;
|
|
1743
1921
|
/**
|
|
1744
1922
|
* 运动被取消回调
|
|
1745
1923
|
* @description
|
|
@@ -1774,6 +1952,13 @@ export declare interface NetworkOptions {
|
|
|
1774
1952
|
allowHosts?: string[];
|
|
1775
1953
|
}
|
|
1776
1954
|
|
|
1955
|
+
export declare interface NetworkResourceEvent extends BaseEvent {
|
|
1956
|
+
source: string;
|
|
1957
|
+
requestType: NetworkType;
|
|
1958
|
+
requestState: NetworkState;
|
|
1959
|
+
detail: string;
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1777
1962
|
export declare type NetworkResponse<T = any, E extends NetWorkMeta | NetWorkMeta[] = NetWorkMeta> = {
|
|
1778
1963
|
body: T;
|
|
1779
1964
|
meta: E;
|
|
@@ -1788,6 +1973,15 @@ export declare class NetworkSubscribe extends Subscribe<{
|
|
|
1788
1973
|
|
|
1789
1974
|
export declare type NetworkType = "XMLHttpRequest" | "Script" | "Image" | "Link";
|
|
1790
1975
|
|
|
1976
|
+
export declare interface ObjectEvent extends BaseEvent {
|
|
1977
|
+
object: THREE_2.Object3D;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
export declare type Pano = {
|
|
1981
|
+
workCode: string;
|
|
1982
|
+
panoIndex: number;
|
|
1983
|
+
};
|
|
1984
|
+
|
|
1791
1985
|
export declare class PanoCircleMesh extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1792
1986
|
needsRender: boolean;
|
|
1793
1987
|
private currentStartTime;
|
|
@@ -1924,6 +2118,19 @@ export declare interface PanoCircleMeshSolidOptions {
|
|
|
1924
2118
|
color?: number;
|
|
1925
2119
|
}
|
|
1926
2120
|
|
|
2121
|
+
export declare function panoEqual(a: Pano, b: Pano): boolean;
|
|
2122
|
+
|
|
2123
|
+
export declare interface PanoEvent extends StateEvent {
|
|
2124
|
+
prevPano: Pano;
|
|
2125
|
+
progress: number;
|
|
2126
|
+
options: MovePanoOptions;
|
|
2127
|
+
error: Error | null;
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
export declare type PanoId = `${Pano['workCode']}[${number}]`;
|
|
2131
|
+
|
|
2132
|
+
export declare function panoParse(panoId: PanoId): Pano;
|
|
2133
|
+
|
|
1927
2134
|
export declare interface PanoramaControllerCustomInitArgs extends PanoramaLikeControllerCustomInitArgs {
|
|
1928
2135
|
/** 最远可移动观察点距离 */
|
|
1929
2136
|
maxAccessibleDistance?: number;
|
|
@@ -1935,7 +2142,7 @@ export declare interface PanoramaControllerCustomInitArgs extends PanoramaLikeCo
|
|
|
1935
2142
|
*/
|
|
1936
2143
|
panoTapTriggerRadius?: number;
|
|
1937
2144
|
/** 地面观察点标识自定义创建器 */
|
|
1938
|
-
panoCircleMeshCreator?: (
|
|
2145
|
+
panoCircleMeshCreator?: (pano: Pano) => PanoCircleMeshInterface;
|
|
1939
2146
|
/**
|
|
1940
2147
|
* 全景瓦片登记
|
|
1941
2148
|
* @param fov - 当前 fov
|
|
@@ -1970,6 +2177,15 @@ export declare interface PanoramaLikeControllerCustomInitArgs {
|
|
|
1970
2177
|
intersectMeshCreator?: () => IntersectMeshInterface;
|
|
1971
2178
|
}
|
|
1972
2179
|
|
|
2180
|
+
export declare function panoStringify(pano: Pano): PanoId;
|
|
2181
|
+
|
|
2182
|
+
export declare interface PanoTextureEvent extends BaseEvent {
|
|
2183
|
+
pano: Pano;
|
|
2184
|
+
progress: number;
|
|
2185
|
+
meta: NetWorkMeta[] | null;
|
|
2186
|
+
error: Error | null;
|
|
2187
|
+
}
|
|
2188
|
+
|
|
1973
2189
|
/**
|
|
1974
2190
|
* 解析 Work 数据
|
|
1975
2191
|
* @param obj - work 数据,从如数开发者平台获取
|
|
@@ -1979,6 +2195,8 @@ export declare interface PanoramaLikeControllerCustomInitArgs {
|
|
|
1979
2195
|
export declare function parseWork(obj: Work | LooseWork | string | any, options?: ParseWorkOptions): Work;
|
|
1980
2196
|
|
|
1981
2197
|
export declare type ParseWorkOptions = {
|
|
2198
|
+
/** 重置 WorkCode */
|
|
2199
|
+
workCode?: string | ((input: any) => string);
|
|
1982
2200
|
/** 重写资源前缀 */
|
|
1983
2201
|
baseURL?: string;
|
|
1984
2202
|
/** 资源地址使用短地址 */
|
|
@@ -2067,6 +2285,10 @@ export declare class PBMMeshMaterial extends THREE_2.ShaderMaterial implements P
|
|
|
2067
2285
|
clippers: ClipperParameter[] | null;
|
|
2068
2286
|
/** edl*/
|
|
2069
2287
|
useEDL: boolean;
|
|
2288
|
+
/** hq*/
|
|
2289
|
+
useHQWeight: boolean;
|
|
2290
|
+
/** HQDepthMask*/
|
|
2291
|
+
useHQDepth: boolean;
|
|
2070
2292
|
/** 点云着色方式*/
|
|
2071
2293
|
pointColorType: PBMPointColorType;
|
|
2072
2294
|
/** 点云大小绘制方式*/
|
|
@@ -2118,6 +2340,10 @@ export declare interface PBMParameters {
|
|
|
2118
2340
|
constantColor: THREE_2.Vector3 | null;
|
|
2119
2341
|
/** 是否使用EDL*/
|
|
2120
2342
|
useEDL: boolean;
|
|
2343
|
+
/** 是否使用HQ*/
|
|
2344
|
+
useHQWeight: boolean;
|
|
2345
|
+
/** 是否使用HQ_DEPTH_MASK*/
|
|
2346
|
+
useHQDepth: boolean;
|
|
2121
2347
|
/** 点云形状*/
|
|
2122
2348
|
pointShape: PBMPointShapeType;
|
|
2123
2349
|
/** 点云着色方式*/
|
|
@@ -2168,7 +2394,9 @@ export declare interface Pose {
|
|
|
2168
2394
|
distance: number;
|
|
2169
2395
|
}
|
|
2170
2396
|
|
|
2171
|
-
export declare
|
|
2397
|
+
export declare type PostProcessingType = 'edl' | 'hq' | 'luminance' | null;
|
|
2398
|
+
|
|
2399
|
+
export declare const PROXY_CONTROLLER_EVENT_NAMES: readonly ["gesture.pan", "gesture.tap", "gesture.press", "gesture.pinch", "gesture.mousewheel", "gesture.mousemove", "gesture.momentum", "initAnimation.start", "initAnimation.end", "camera.update", "intersect.update", "pano.select", "pano.moveTo", "pano.moving", "pano.arrived", "pano.cancel", "pano.error", "pano.texture.load", "pano.texture.progress", "pano.texture.success", "pano.texture.error", "pano.texture.abort", "xr.session.start", "xr.session.end", "xr.gesture.tap", "xr.gesture.press", "xr.gesture.buttonUp", "xr.gesture.buttonDown"];
|
|
2172
2400
|
|
|
2173
2401
|
export declare class RegionBoundingVolume implements BoundingVolume {
|
|
2174
2402
|
type: "regin";
|
|
@@ -2197,6 +2425,23 @@ export declare type RegionBoundingVolumeJson = {
|
|
|
2197
2425
|
region: number[];
|
|
2198
2426
|
};
|
|
2199
2427
|
|
|
2428
|
+
export declare interface RenderEvent extends BaseEvent {
|
|
2429
|
+
needsRender: boolean;
|
|
2430
|
+
info: null | {
|
|
2431
|
+
memory: {
|
|
2432
|
+
geometries: number;
|
|
2433
|
+
textures: number;
|
|
2434
|
+
};
|
|
2435
|
+
render: {
|
|
2436
|
+
calls: number;
|
|
2437
|
+
frame: number;
|
|
2438
|
+
lines: number;
|
|
2439
|
+
points: number;
|
|
2440
|
+
triangles: number;
|
|
2441
|
+
};
|
|
2442
|
+
};
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2200
2445
|
export declare type RequestResult = null | {
|
|
2201
2446
|
done: () => void;
|
|
2202
2447
|
};
|
|
@@ -2297,10 +2542,15 @@ export declare type SphereBoundingVolumeJson = {
|
|
|
2297
2542
|
export declare interface State extends Pose {
|
|
2298
2543
|
/** 模态 */
|
|
2299
2544
|
mode: Mode;
|
|
2545
|
+
/** workCode */
|
|
2546
|
+
workCode: string;
|
|
2300
2547
|
/** 观察点序号 */
|
|
2301
2548
|
panoIndex: number;
|
|
2302
|
-
|
|
2303
|
-
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
export declare interface StateEvent extends BaseEvent {
|
|
2552
|
+
state: State;
|
|
2553
|
+
userAction: boolean;
|
|
2304
2554
|
}
|
|
2305
2555
|
|
|
2306
2556
|
/**
|
|
@@ -2525,8 +2775,8 @@ export declare class Tile3DModel extends THREE_2.Object3D {
|
|
|
2525
2775
|
disposed: boolean;
|
|
2526
2776
|
needsRender: boolean;
|
|
2527
2777
|
lastRefineTime: number;
|
|
2528
|
-
|
|
2529
|
-
|
|
2778
|
+
nodeGroup: THREE_2.Group;
|
|
2779
|
+
debugBoundingGroup: THREE_2.Group;
|
|
2530
2780
|
private nodes;
|
|
2531
2781
|
private debugBoundings;
|
|
2532
2782
|
private unloadTileQueue;
|
|
@@ -2779,26 +3029,36 @@ export declare enum VolumePlaneIntersect {
|
|
|
2779
3029
|
export declare interface VRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
2780
3030
|
}
|
|
2781
3031
|
|
|
2782
|
-
export declare
|
|
3032
|
+
export declare interface WebXRAxesParams {
|
|
3033
|
+
raycaster: {
|
|
3034
|
+
leftRay: THREE_2.Raycaster;
|
|
3035
|
+
rightRay: THREE_2.Raycaster;
|
|
3036
|
+
};
|
|
3037
|
+
axesState: {
|
|
3038
|
+
up: number;
|
|
3039
|
+
down: number;
|
|
3040
|
+
left: number;
|
|
3041
|
+
right: number;
|
|
3042
|
+
};
|
|
3043
|
+
deltaTime: number;
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
export declare type WebXRControllerKey = XRGestureEvent['buttons'];
|
|
2783
3047
|
|
|
2784
3048
|
export declare interface WebXRControllerParams {
|
|
2785
|
-
raycaster:
|
|
3049
|
+
raycaster: {
|
|
3050
|
+
leftRay: THREE_2.Raycaster;
|
|
3051
|
+
rightRay: THREE_2.Raycaster;
|
|
3052
|
+
};
|
|
2786
3053
|
}
|
|
2787
3054
|
|
|
2788
|
-
export declare type WebXRControllerType = 'tap' | 'press' | 'axes';
|
|
2789
|
-
|
|
2790
|
-
export declare type WebXREventTypes = {
|
|
2791
|
-
/** WebXR模式开始,session完成坐标系设置*/
|
|
2792
|
-
webXRSessionStart(): void;
|
|
2793
|
-
/** WebXR模式结束,销毁session*/
|
|
2794
|
-
webXRSessionEnd(): void;
|
|
2795
|
-
};
|
|
3055
|
+
export declare type WebXRControllerType = 'tap' | 'press' | 'axes' | 'buttonUp' | 'buttonDown';
|
|
2796
3056
|
|
|
2797
3057
|
export declare class Work {
|
|
2798
3058
|
/** 名称 */
|
|
2799
3059
|
name: string;
|
|
2800
3060
|
/** 编号 */
|
|
2801
|
-
workCode:
|
|
3061
|
+
workCode: string;
|
|
2802
3062
|
/** 允许访问的安全域名 */
|
|
2803
3063
|
allowHosts: string[];
|
|
2804
3064
|
/** 过期时间 */
|
|
@@ -2829,8 +3089,6 @@ export declare class Work {
|
|
|
2829
3089
|
toJSON(): any;
|
|
2830
3090
|
}
|
|
2831
3091
|
|
|
2832
|
-
export declare type WorkCode = string;
|
|
2833
|
-
|
|
2834
3092
|
export declare interface WorkCubeImage {
|
|
2835
3093
|
/** 全景图 up */
|
|
2836
3094
|
up: string;
|
|
@@ -2858,10 +3116,11 @@ export declare interface WorkImage extends WorkCubeImage {
|
|
|
2858
3116
|
|
|
2859
3117
|
/** 初始化位姿参数 */
|
|
2860
3118
|
export declare interface WorkInitial {
|
|
3119
|
+
work: Work;
|
|
2861
3120
|
/** 模态 */
|
|
2862
3121
|
mode?: Mode;
|
|
2863
3122
|
/** 点位序号 */
|
|
2864
|
-
|
|
3123
|
+
panoIndex?: number;
|
|
2865
3124
|
/** 相机水平角 */
|
|
2866
3125
|
longitude?: number;
|
|
2867
3126
|
/** 相机俯仰角 */
|
|
@@ -2899,8 +3158,12 @@ export declare interface WorkObserver {
|
|
|
2899
3158
|
work: Work;
|
|
2900
3159
|
/** 序号 */
|
|
2901
3160
|
index: number;
|
|
3161
|
+
/** 序号 */
|
|
3162
|
+
panoIndex: number;
|
|
3163
|
+
/** 点位序号 */
|
|
3164
|
+
panoId: PanoId;
|
|
2902
3165
|
/** 点位序号 */
|
|
2903
|
-
|
|
3166
|
+
pano: Pano;
|
|
2904
3167
|
/** 点位所在楼层 */
|
|
2905
3168
|
floorIndex: number;
|
|
2906
3169
|
/** 点位 derived_id */
|
|
@@ -2914,9 +3177,13 @@ export declare interface WorkObserver {
|
|
|
2914
3177
|
/** 点位视频 */
|
|
2915
3178
|
video?: WorkVideo;
|
|
2916
3179
|
/** 可以看到的相关点位序号 */
|
|
2917
|
-
|
|
3180
|
+
visibleNodes: number[];
|
|
3181
|
+
/** 可以看到的相关点位序号 */
|
|
3182
|
+
visibleIds: PanoId[];
|
|
2918
3183
|
/** 可以连通的相关点位序号 */
|
|
2919
|
-
|
|
3184
|
+
accessibleNodes: number[];
|
|
3185
|
+
/** 可以看到的相关点位序号 */
|
|
3186
|
+
accessibleIds: PanoId[];
|
|
2920
3187
|
/** 点位和模型的地面坐标 */
|
|
2921
3188
|
standingPosition: THREE_2.Vector3;
|
|
2922
3189
|
/** 点位和模型的观察点坐标 */
|
|
@@ -2942,16 +3209,25 @@ export declare interface WorkOptions {
|
|
|
2942
3209
|
modelMaxScreenSpaceError?: number;
|
|
2943
3210
|
}
|
|
2944
3211
|
|
|
2945
|
-
export declare
|
|
3212
|
+
export declare interface WorkResolvedObserver extends WorkObserver {
|
|
3213
|
+
isResolved: true;
|
|
3214
|
+
}
|
|
2946
3215
|
|
|
2947
3216
|
export declare type Works = ReadonlyArray<Work> & {
|
|
2948
|
-
resolvedObservers:
|
|
3217
|
+
resolvedObservers: WorkResolvedObserver[];
|
|
2949
3218
|
initial: WorkInitial;
|
|
2950
|
-
getWork(workCode:
|
|
2951
|
-
getResolvedObserver(
|
|
3219
|
+
getWork(workCode: string): Work | undefined;
|
|
3220
|
+
getResolvedObserver(pano: PanoId | Pano | number): WorkResolvedObserver | undefined;
|
|
2952
3221
|
update(): void;
|
|
2953
3222
|
};
|
|
2954
3223
|
|
|
3224
|
+
export declare interface WorksEvent extends BaseEvent {
|
|
3225
|
+
input: any;
|
|
3226
|
+
works: Works;
|
|
3227
|
+
state: Partial<State>;
|
|
3228
|
+
userAction: boolean;
|
|
3229
|
+
}
|
|
3230
|
+
|
|
2955
3231
|
export declare interface WorkTile {
|
|
2956
3232
|
level: number;
|
|
2957
3233
|
size: number;
|
|
@@ -2977,7 +3253,44 @@ export declare class XRButton {
|
|
|
2977
3253
|
static createButton(onClickHook: () => void): HTMLAnchorElement | HTMLButtonElement;
|
|
2978
3254
|
}
|
|
2979
3255
|
|
|
3256
|
+
export declare interface XRControllerEvent extends BaseEvent {
|
|
3257
|
+
controller: {
|
|
3258
|
+
type: 'left' | 'right';
|
|
3259
|
+
axes: {
|
|
3260
|
+
up: number;
|
|
3261
|
+
down: number;
|
|
3262
|
+
left: number;
|
|
3263
|
+
right: number;
|
|
3264
|
+
};
|
|
3265
|
+
raycaster: {
|
|
3266
|
+
leftRay: THREE_2.Raycaster;
|
|
3267
|
+
rightRay: THREE_2.Raycaster;
|
|
3268
|
+
};
|
|
3269
|
+
deltaTime: number;
|
|
3270
|
+
};
|
|
3271
|
+
}
|
|
3272
|
+
|
|
3273
|
+
export declare interface XRGestureEvent extends BaseEvent {
|
|
3274
|
+
session: XRSession | null;
|
|
3275
|
+
buttons: 'A' | 'B' | 'X' | 'Y' | 'RightTrigger' | 'RightPinch' | 'LeftTrigger' | 'LeftPinch' | 'LeftAxesLeft' | 'LeftAxesRight' | 'LeftAxesUp' | 'LeftAxesDown' | 'RightAxesLeft' | 'RightAxesRight' | 'RightAxesUp' | 'RightAxesDown';
|
|
3276
|
+
machineType: 'Pico' | 'Oculus';
|
|
3277
|
+
isFirst: boolean;
|
|
3278
|
+
isFinal: boolean;
|
|
3279
|
+
controllers: {
|
|
3280
|
+
raycaster: {
|
|
3281
|
+
leftRay: THREE_2.Raycaster;
|
|
3282
|
+
rightRay: THREE_2.Raycaster;
|
|
3283
|
+
};
|
|
3284
|
+
};
|
|
3285
|
+
}
|
|
3286
|
+
|
|
2980
3287
|
export declare interface XRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
2981
3288
|
}
|
|
2982
3289
|
|
|
3290
|
+
declare interface XRSessionEvent_2 extends BaseEvent {
|
|
3291
|
+
session: XRSession | null;
|
|
3292
|
+
machineType: 'Pico' | 'Oculus';
|
|
3293
|
+
}
|
|
3294
|
+
export { XRSessionEvent_2 as XRSessionEvent }
|
|
3295
|
+
|
|
2983
3296
|
export { }
|