@realsee/five 5.0.0-alpha.132 → 5.0.0-alpha.136
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 +4 -4
- 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.Camera.html +1 -1
- package/docs/classes/five.Five.html +59 -52
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.IntersectMesh.html +1 -1
- package/docs/classes/five.LegacyPanoCircleMesh.html +1 -1
- package/docs/classes/five.Model.html +4 -4
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- package/docs/classes/five.PBMContainer.html +4 -4
- package/docs/classes/five.PBMGroup.html +4 -4
- package/docs/classes/five.PBMMaterial.html +8 -6
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PanoCircleMesh.html +1 -1
- package/docs/classes/five.Scene.html +1 -1
- package/docs/classes/five.Subscribe.html +2 -2
- package/docs/classes/five.Tile3D.html +34 -0
- package/docs/classes/five.Tile3DModel.html +5 -5
- package/docs/classes/five.TileBoundingSphere.html +1 -0
- package/docs/classes/five.TileCacheNode.html +1 -0
- package/docs/classes/five.TileCullingVolume.html +1 -0
- package/docs/classes/five.TileOrientedBoundingBox.html +1 -0
- package/docs/classes/five.TilePlane.html +1 -0
- package/docs/classes/five.TileRequestScheduler.html +16 -0
- package/docs/classes/five.Tileset3D.html +11 -0
- package/docs/classes/five.Tileset3DTraverser.html +1 -0
- package/docs/classes/five.TilesetCache.html +1 -0
- package/docs/classes/five.Work.html +1 -1
- package/docs/classes/five.XRButton.html +1 -0
- package/docs/classes/five.XRManager.html +85 -0
- package/docs/classes/gltf_loader.GLTFLoader.html +1 -1
- package/docs/classes/gltf_loader.GLTFObject.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/server.BVH.html +1 -1
- package/docs/classes/server.BVHIntersect.html +1 -1
- package/docs/classes/server.BVHNode.html +1 -1
- package/docs/classes/server.BVHVector3.html +1 -1
- package/docs/classes/server.Model.html +1 -1
- package/docs/classes/server.PBMGroup.html +1 -1
- package/docs/classes/server.PBMMesh.html +1 -1
- package/docs/classes/sticker.Sticker.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.CameraPose.html +1 -1
- package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.EventCallback.html +33 -27
- package/docs/interfaces/five.FiveInitArgs.html +10 -8
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +1 -1
- 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.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +1 -1
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModelEventCallback.html +1 -1
- package/docs/interfaces/five.MovePanoOptions.html +1 -1
- package/docs/interfaces/five.PBMPanoPicture.html +1 -1
- package/docs/interfaces/five.PBMParameters.html +7 -5
- package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.Scissor.html +1 -1
- package/docs/interfaces/five.State.html +1 -1
- 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.TextureOptions.html +1 -1
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +3 -0
- package/docs/interfaces/five.TileBoundingVolume.html +19 -0
- package/docs/interfaces/five.TileContent.html +1 -0
- package/docs/interfaces/five.Tileset3dOptions.html +1 -0
- package/docs/interfaces/five.TilesetJSON.html +1 -0
- package/docs/interfaces/five.TilesetJSONNode.html +1 -0
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.WorkCubeImage.html +1 -1
- package/docs/interfaces/five.WorkImage.html +1 -1
- package/docs/interfaces/five.WorkInitial.html +1 -1
- package/docs/interfaces/five.WorkModel.html +1 -1
- package/docs/interfaces/five.WorkModelTiles.html +1 -1
- package/docs/interfaces/five.WorkObserver.html +1 -1
- package/docs/interfaces/five.WorkTile.html +1 -1
- package/docs/interfaces/five.WorkVideo.html +1 -1
- package/docs/interfaces/gltf_loader.GLTF.html +1 -1
- package/docs/interfaces/react.FiveActionReactCallbacks.html +1 -1
- package/docs/interfaces/react.FiveInjectionTypes.html +4 -4
- package/docs/interfaces/react.PropTypeOfFiveFeatures.html +1 -1
- package/docs/interfaces/server.Intersection.html +1 -1
- package/docs/interfaces/server.ModelEventCallback.html +1 -1
- package/docs/interfaces/sticker.IntersectionLike.html +1 -1
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +1 -1
- package/docs/modules/five.SubscribeMixinType.html +1 -1
- package/docs/modules/five.html +13 -5
- 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/server.html +2 -2
- package/docs/modules/sticker.html +1 -1
- package/docs/modules/vue.html +1 -1
- package/docs/modules.html +1 -1
- package/five/index.d.ts +380 -285
- package/five/index.js +12 -12
- package/gltf-loader/index.js +2 -2
- package/line/index.js +2 -2
- package/package.json +1 -1
- package/react/index.js +2 -2
- package/server/index.d.ts +4 -2
- package/server/index.js +2 -2
- package/sticker/index.js +2 -2
- package/umd/five.js +1 -1
- package/vue/index.js +2 -2
package/five/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare interface AddableObject extends THREE_2.Object3D {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export declare interface AnimationFrame {
|
|
14
|
-
callback: (time: number, deltaTime: number) => void;
|
|
14
|
+
callback: (time: number, deltaTime: number, ...args: any[]) => void;
|
|
15
15
|
once: boolean;
|
|
16
16
|
delay: number;
|
|
17
17
|
order: number;
|
|
@@ -21,11 +21,17 @@ export declare class AnimationFrameLoop {
|
|
|
21
21
|
private frames;
|
|
22
22
|
private time;
|
|
23
23
|
private stoped;
|
|
24
|
+
private context?;
|
|
25
|
+
private requestId;
|
|
24
26
|
private static sharedInstance?;
|
|
25
27
|
static get shared(): AnimationFrameLoop;
|
|
26
28
|
static getFrameTime(): number;
|
|
27
29
|
constructor();
|
|
28
30
|
private loop;
|
|
31
|
+
setContext(context: any): void;
|
|
32
|
+
getContext(): any;
|
|
33
|
+
private requestAnimationFrame;
|
|
34
|
+
private cancelAnimationFrame;
|
|
29
35
|
private remove;
|
|
30
36
|
/**
|
|
31
37
|
* 添加到动画循环
|
|
@@ -39,51 +45,6 @@ export declare class AnimationFrameLoop {
|
|
|
39
45
|
disponse(): void;
|
|
40
46
|
}
|
|
41
47
|
|
|
42
|
-
declare interface B3DMMapping {
|
|
43
|
-
b3dm_base_url: string;
|
|
44
|
-
b3dm_url: Record<string, string>;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare class BoundingSphere {
|
|
48
|
-
center: Vector3;
|
|
49
|
-
radius: number;
|
|
50
|
-
constructor(center?: number[], radius?: number);
|
|
51
|
-
fromCenterRadius(center: number[], radius: number): this;
|
|
52
|
-
fromCornerPoints(corner: number[], oppositeCorner: number[]): this;
|
|
53
|
-
equals(right: BoundingSphere): boolean;
|
|
54
|
-
clone(): BoundingSphere;
|
|
55
|
-
union(boundingSphere: BoundingSphere): BoundingSphere;
|
|
56
|
-
expand(point: number[]): this;
|
|
57
|
-
transform(transform: Matrix4): this;
|
|
58
|
-
distanceSquaredTo(point: number[]): number;
|
|
59
|
-
distanceTo(point: number[]): number;
|
|
60
|
-
intersectPlane(plane: Plane): number;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
declare interface BoundingVolume {
|
|
64
|
-
/**
|
|
65
|
-
* Applies a 4x4 affine transformation matrix to a bounding sphere.
|
|
66
|
-
* @param sphere The bounding sphere to apply the transformation to.
|
|
67
|
-
* @param transform The transformation matrix to apply to the bounding sphere.
|
|
68
|
-
* @returns itself, i.e. the modified BoundingVolume.
|
|
69
|
-
*/
|
|
70
|
-
transform(transform: readonly number[]): this;
|
|
71
|
-
/** Computes the estimated distance squared from the closest point on a bounding sphere to a point. */
|
|
72
|
-
distanceSquaredTo(point: readonly number[]): number;
|
|
73
|
-
/** Computes the estimated distance from the closest point on a bounding sphere to a point. */
|
|
74
|
-
distanceTo(point: readonly number[]): number;
|
|
75
|
-
/**
|
|
76
|
-
* Determines which side of a plane the oriented bounding box is located.
|
|
77
|
-
*
|
|
78
|
-
* @param plane The plane to test against.
|
|
79
|
-
* @returns
|
|
80
|
-
* - `INTERSECTION.INSIDE` if the entire box is on the side of the plane the normal is pointing.
|
|
81
|
-
* - `INTERSECTION.OUTSIDE` if the entire box is on the opposite side.
|
|
82
|
-
* - `INTERSECTION.INTERSECTING` if the box intersects the plane.
|
|
83
|
-
*/
|
|
84
|
-
intersectPlane(plane: Plane): number;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
48
|
export declare class BVH {
|
|
88
49
|
trianglesArray?: Float32Array;
|
|
89
50
|
offsetArray?: Uint32Array;
|
|
@@ -140,13 +101,6 @@ export declare class BVHVector3 {
|
|
|
140
101
|
clone(): BVHVector3;
|
|
141
102
|
}
|
|
142
103
|
|
|
143
|
-
declare class CacheNode<T> {
|
|
144
|
-
item: T;
|
|
145
|
-
previous: CacheNode<T> | null;
|
|
146
|
-
next: CacheNode<T> | null;
|
|
147
|
-
constructor(item: T, previous: CacheNode<T> | null, next: CacheNode<T> | null);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
104
|
/** Five 相机 */
|
|
151
105
|
export declare class Camera extends THREE_2.PerspectiveCamera {
|
|
152
106
|
/** 相机姿态 */
|
|
@@ -176,6 +130,7 @@ export declare type ControllerCustomInitTypes = {
|
|
|
176
130
|
Model: ModelControllerCustomInitArgs;
|
|
177
131
|
DepthPanorama: DepthPanoramaControllerCustomInitArgs;
|
|
178
132
|
Mapview: MapviewControllerCustomInitArgs;
|
|
133
|
+
XRPanorama: XRPanoramaControllerCustomInitArgs;
|
|
179
134
|
};
|
|
180
135
|
|
|
181
136
|
export declare type ControllerEventTypes = {
|
|
@@ -463,22 +418,16 @@ export declare type ControllerEventTypes = {
|
|
|
463
418
|
* @param error - 抛出错误
|
|
464
419
|
*/
|
|
465
420
|
error(error: Error): void;
|
|
421
|
+
/**
|
|
422
|
+
* webXR模式开始,webxr session完成坐标系矫正
|
|
423
|
+
*/
|
|
424
|
+
webXRSessionStart(): void;
|
|
425
|
+
/**
|
|
426
|
+
* webXR模式结束,webxr session销毁
|
|
427
|
+
*/
|
|
428
|
+
webXRSessionEnd(): void;
|
|
466
429
|
};
|
|
467
430
|
|
|
468
|
-
declare class CullingVolume {
|
|
469
|
-
static get MASK_OUTSIDE(): number;
|
|
470
|
-
static get MASK_INSIDE(): number;
|
|
471
|
-
static get MASK_INDETERMINATE(): number;
|
|
472
|
-
planes: Plane[];
|
|
473
|
-
constructor(planes?: Plane[]);
|
|
474
|
-
fromBoundingSphere(boundingSphere: {
|
|
475
|
-
center: Vector3;
|
|
476
|
-
radius: number;
|
|
477
|
-
}): this;
|
|
478
|
-
computeVisibility(boundingVolume: BoundingVolume): number;
|
|
479
|
-
computeVisibilityWithPlaneMask(boundingVolume: BoundingVolume, parentPlaneMask: number): number;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
431
|
/**
|
|
483
432
|
* URL 地址的转换
|
|
484
433
|
* @param source - url 原地址
|
|
@@ -641,8 +590,9 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
641
590
|
* @param prevMode - 上本质是一个模态
|
|
642
591
|
* @param panoIndex - 初始化动画结束后的点位下标
|
|
643
592
|
* @param toPose - 初始化动画结束后的状态
|
|
593
|
+
* @param userAction - 是否用户触发
|
|
644
594
|
*/
|
|
645
|
-
modeChange(mode: Mode, prevMode: Mode, panoIndex: number, toPose: Pose): void;
|
|
595
|
+
modeChange(mode: Mode, prevMode: Mode, panoIndex: number, toPose: Pose, userAction: boolean): void;
|
|
646
596
|
/**
|
|
647
597
|
* 帮助元素显应的变换
|
|
648
598
|
* @param visible - 帮助元素的是否开启
|
|
@@ -683,6 +633,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
683
633
|
* Topview 户型图模式
|
|
684
634
|
* DepthPanorama 深度图游走模式
|
|
685
635
|
* VRPanorama VR眼镜模式
|
|
636
|
+
* XRPanorama VR硬件模式
|
|
686
637
|
* ```
|
|
687
638
|
*/
|
|
688
639
|
static Mode: Mirror<Mode>;
|
|
@@ -978,7 +929,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
978
929
|
* @param callback - 渲染完成回调
|
|
979
930
|
*/
|
|
980
931
|
render(callback?: () => void, updateObjectResolution?: boolean): THREE_2.WebGLRenderTarget;
|
|
981
|
-
updateTime(time: number, deltaTime: number): void;
|
|
932
|
+
updateTime(time: number, deltaTime: number, ...args: any[]): void;
|
|
982
933
|
/**
|
|
983
934
|
* 但停自动播放
|
|
984
935
|
*/
|
|
@@ -1037,8 +988,17 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
1037
988
|
setState(state: Partial<State>, immediately?: boolean, userAction?: boolean): void;
|
|
1038
989
|
aroundScissor(callback: () => void): void;
|
|
1039
990
|
private syncState;
|
|
991
|
+
/**
|
|
992
|
+
* 当前页面静态
|
|
993
|
+
*/
|
|
1040
994
|
ready(): Promise<void>;
|
|
995
|
+
/**
|
|
996
|
+
* 请求全屏
|
|
997
|
+
*/
|
|
1041
998
|
requestFullscreen(): void;
|
|
999
|
+
/**
|
|
1000
|
+
* 退出全屏
|
|
1001
|
+
*/
|
|
1042
1002
|
exitFullscreen(): void;
|
|
1043
1003
|
private throwError;
|
|
1044
1004
|
private loadModel;
|
|
@@ -1188,6 +1148,8 @@ export declare interface FiveInitArgs {
|
|
|
1188
1148
|
depthPanorama?: ControllerCustomInitTypes["DepthPanorama"];
|
|
1189
1149
|
/** VR眼镜模式下的特定参数 */
|
|
1190
1150
|
vrPanorama?: ControllerCustomInitTypes["VRPanorama"];
|
|
1151
|
+
/** XR眼镜模式下的特定参数 */
|
|
1152
|
+
xrPanorama?: ControllerCustomInitTypes["XRPanorama"];
|
|
1191
1153
|
/**
|
|
1192
1154
|
* 模式间切换时的过度动画时间
|
|
1193
1155
|
* @description
|
|
@@ -1244,11 +1206,6 @@ parameters: Parameters<T>[1]
|
|
|
1244
1206
|
*/
|
|
1245
1207
|
export declare type FivePluginInstance<T extends FivePlugin<any, any>> = ReturnType<T>;
|
|
1246
1208
|
|
|
1247
|
-
declare interface FloorInfo {
|
|
1248
|
-
ground: number;
|
|
1249
|
-
height: number;
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
1209
|
export declare interface FloorplanControllerCustomInitArgs {
|
|
1253
1210
|
/** 默认偏航角 */
|
|
1254
1211
|
defaultLongitude?: number;
|
|
@@ -1266,18 +1223,6 @@ export declare interface FloorplanControllerCustomInitArgs {
|
|
|
1266
1223
|
minFov?: number;
|
|
1267
1224
|
}
|
|
1268
1225
|
|
|
1269
|
-
declare type FrameState = {
|
|
1270
|
-
camera: {
|
|
1271
|
-
position: number[];
|
|
1272
|
-
direction: number[];
|
|
1273
|
-
up: number[];
|
|
1274
|
-
};
|
|
1275
|
-
height: number;
|
|
1276
|
-
cullingVolume: CullingVolume;
|
|
1277
|
-
frameNumber: number;
|
|
1278
|
-
sseDenominator: number;
|
|
1279
|
-
};
|
|
1280
|
-
|
|
1281
1226
|
export declare type GestureTypes = "pan" | "tap" | "pinch" | "press" | "mouseWheel";
|
|
1282
1227
|
|
|
1283
1228
|
export declare function getViewportScale(): number;
|
|
@@ -1395,21 +1340,6 @@ export declare class LegacyPanoCircleMesh extends THREE_2.Object3D implements Pa
|
|
|
1395
1340
|
dispose(): void;
|
|
1396
1341
|
}
|
|
1397
1342
|
|
|
1398
|
-
/** Advanced loader options */
|
|
1399
|
-
declare interface LoaderOptions {
|
|
1400
|
-
updateInterval: number;
|
|
1401
|
-
maxMemoryUsage: number;
|
|
1402
|
-
maxScreenSpaceError: number;
|
|
1403
|
-
viewDistanceScale: number;
|
|
1404
|
-
throttleRequests: boolean;
|
|
1405
|
-
maxRequests: number;
|
|
1406
|
-
onNodeCreated: (node: PBMGroup) => void;
|
|
1407
|
-
allowHosts?: string[];
|
|
1408
|
-
requestProxy?: (url: string) => string;
|
|
1409
|
-
networkSubscribe?: NetworkSubscribe;
|
|
1410
|
-
maxDepth?: number;
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
1343
|
export declare type LooseWork = {
|
|
1414
1344
|
bvh?: boolean;
|
|
1415
1345
|
modelAsync?: boolean;
|
|
@@ -1484,48 +1414,6 @@ export declare type LooseWorkVideo = {
|
|
|
1484
1414
|
size: number[];
|
|
1485
1415
|
};
|
|
1486
1416
|
|
|
1487
|
-
declare class ManagedArray<T> {
|
|
1488
|
-
private map;
|
|
1489
|
-
private array;
|
|
1490
|
-
private _length;
|
|
1491
|
-
constructor();
|
|
1492
|
-
/**
|
|
1493
|
-
* Gets or sets the length of the array.
|
|
1494
|
-
* If the set length is greater than the length of the internal array, the internal array is resized.
|
|
1495
|
-
*
|
|
1496
|
-
* @memberof ManagedArray.prototype
|
|
1497
|
-
* @type Number
|
|
1498
|
-
*/
|
|
1499
|
-
get length(): number;
|
|
1500
|
-
/**
|
|
1501
|
-
* Gets the element at an index.
|
|
1502
|
-
* @param { Number } index The index to get.
|
|
1503
|
-
*/
|
|
1504
|
-
get(index: number): T;
|
|
1505
|
-
/**
|
|
1506
|
-
* Sets the element at an index. Resizes the array if index is greater than the length of the array.
|
|
1507
|
-
*
|
|
1508
|
-
* @param {Number} index The index to set.
|
|
1509
|
-
* @param {*} element The element to set at index.
|
|
1510
|
-
*/
|
|
1511
|
-
set(index: number, element: T): void;
|
|
1512
|
-
delete(element: T): void;
|
|
1513
|
-
/**
|
|
1514
|
-
* Push an element into the array.
|
|
1515
|
-
*
|
|
1516
|
-
* @param {*} element The element to push.
|
|
1517
|
-
*/
|
|
1518
|
-
push(element: T): void;
|
|
1519
|
-
/**
|
|
1520
|
-
* Pop an element from the array.
|
|
1521
|
-
*
|
|
1522
|
-
* @returns {*} The last element in the array.
|
|
1523
|
-
*/
|
|
1524
|
-
pop(): T;
|
|
1525
|
-
reset(): void;
|
|
1526
|
-
find(target: T): boolean;
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
1417
|
export declare interface MapviewControllerCustomInitArgs {
|
|
1530
1418
|
/** 默认偏航角 */
|
|
1531
1419
|
defaultLongitude?: number;
|
|
@@ -1569,7 +1457,9 @@ export declare type Mode =
|
|
|
1569
1457
|
/** 模型游走模式 */
|
|
1570
1458
|
"Model" |
|
|
1571
1459
|
/** 深度图游走模式 */
|
|
1572
|
-
"DepthPanorama"
|
|
1460
|
+
"DepthPanorama" |
|
|
1461
|
+
/** XR眼镜模式*/
|
|
1462
|
+
"XRPanorama";
|
|
1573
1463
|
|
|
1574
1464
|
/**
|
|
1575
1465
|
* Five 模型
|
|
@@ -1800,23 +1690,6 @@ export declare class NetworkSubscribe extends Subscribe<{
|
|
|
1800
1690
|
|
|
1801
1691
|
export declare type NetworkType = "XMLHttpRequest" | "Script" | "Image" | "Link";
|
|
1802
1692
|
|
|
1803
|
-
declare class OrientedBoundingBox {
|
|
1804
|
-
center: Vector3;
|
|
1805
|
-
halfAxes: Matrix3;
|
|
1806
|
-
constructor(center?: number[], halfAxes?: number[]);
|
|
1807
|
-
get halfSize(): number[];
|
|
1808
|
-
get quaternion(): Quaternion;
|
|
1809
|
-
fromCenterHalfSizeQuaternion(center: number[], halfSize: number[], quaternion: number[]): this;
|
|
1810
|
-
clone(): OrientedBoundingBox;
|
|
1811
|
-
equals(right: OrientedBoundingBox): boolean;
|
|
1812
|
-
getBoundingSphere(result?: BoundingSphere): BoundingSphere;
|
|
1813
|
-
intersectPlane(plane: Plane): number;
|
|
1814
|
-
distanceTo(point: number[]): number;
|
|
1815
|
-
distanceSquaredTo(point: number[]): number;
|
|
1816
|
-
computePlaneDistances(position: Vector3, direction: Vector3, result?: number[]): number[];
|
|
1817
|
-
transform(transformation: number[]): this;
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
1693
|
export declare class PanoCircleMesh extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1821
1694
|
needsRender: boolean;
|
|
1822
1695
|
private loadingMesh;
|
|
@@ -1981,6 +1854,8 @@ export declare class PBMMaterial extends THREE_2.ShaderMaterial implements PBMPa
|
|
|
1981
1854
|
progress: number;
|
|
1982
1855
|
/** 全景图通过过度黑色混合 */
|
|
1983
1856
|
useBlackTransition: boolean;
|
|
1857
|
+
/** XR模式防止申请纹理显存时的黑色过渡 */
|
|
1858
|
+
useXRBlackTransition: boolean;
|
|
1984
1859
|
perspToOrtho: number;
|
|
1985
1860
|
/** 模型透明度 */
|
|
1986
1861
|
opacity: number;
|
|
@@ -2019,6 +1894,8 @@ export declare interface PBMParameters {
|
|
|
2019
1894
|
progress: number;
|
|
2020
1895
|
/** 全景图通过过度黑色混合 */
|
|
2021
1896
|
useBlackTransition: boolean;
|
|
1897
|
+
/** XR模式防止申请纹理显存时的黑色过渡 */
|
|
1898
|
+
useXRBlackTransition: boolean;
|
|
2022
1899
|
perspToOrtho: number;
|
|
2023
1900
|
/** 模型透明度 */
|
|
2024
1901
|
opacity: number;
|
|
@@ -2026,20 +1903,6 @@ export declare interface PBMParameters {
|
|
|
2026
1903
|
floorInfo?: THREE_2.Vector3 | null;
|
|
2027
1904
|
}
|
|
2028
1905
|
|
|
2029
|
-
declare class Plane {
|
|
2030
|
-
normal: Vector3;
|
|
2031
|
-
distance: number;
|
|
2032
|
-
constructor(normal?: number[], distance?: number);
|
|
2033
|
-
fromNormalDistance(normal: number[], distance: number): this;
|
|
2034
|
-
fromPointNormal(point: number[], normal: number[]): this;
|
|
2035
|
-
fromCoefficients(a: number, b: number, c: number, d: number): this;
|
|
2036
|
-
clone(): Plane;
|
|
2037
|
-
equals(right: Plane): boolean;
|
|
2038
|
-
getPointDistance(point: number[]): number;
|
|
2039
|
-
transform(matrix4: Matrix4): this;
|
|
2040
|
-
projectPointOntoPlane(point: number[], result?: number[]): Vector3;
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
1906
|
/**
|
|
2044
1907
|
* 相机位姿
|
|
2045
1908
|
* [[include: coordinate.md]]
|
|
@@ -2057,57 +1920,7 @@ export declare interface Pose {
|
|
|
2057
1920
|
distance: number;
|
|
2058
1921
|
}
|
|
2059
1922
|
|
|
2060
|
-
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"];
|
|
2061
|
-
|
|
2062
|
-
declare type RequestResult = null | {
|
|
2063
|
-
done: () => void;
|
|
2064
|
-
};
|
|
2065
|
-
|
|
2066
|
-
/**
|
|
2067
|
-
* Used to issue a request, without having them "deeply queued" by the browser.
|
|
2068
|
-
* @todo - Track requests globally, across multiple servers
|
|
2069
|
-
*/
|
|
2070
|
-
declare class RequestScheduler<Identiy> {
|
|
2071
|
-
private props;
|
|
2072
|
-
private activeRequestCount;
|
|
2073
|
-
/** Tracks the number of active requests and prioritizes/cancels queued requests. */
|
|
2074
|
-
private requestQueue;
|
|
2075
|
-
private requestMap;
|
|
2076
|
-
private deferred;
|
|
2077
|
-
constructor(props?: RequestSchedulerOptions);
|
|
2078
|
-
/**
|
|
2079
|
-
* Called by an application that wants to issue a request, without having it deeply queued by the browser
|
|
2080
|
-
*
|
|
2081
|
-
* When the returned promise resolved, it is OK for the application to issue a request.
|
|
2082
|
-
* The promise resolves to an object that contains a `done` method.
|
|
2083
|
-
* When the application's request has completed (or failed), the application must call the `done` function
|
|
2084
|
-
*
|
|
2085
|
-
* @param identiy
|
|
2086
|
-
* @param getPriority will be called when request "slots" open up,
|
|
2087
|
-
* allowing the caller to update priority or cancel the request
|
|
2088
|
-
* Highest priority executes first, priority < 0 cancels the request
|
|
2089
|
-
* @returns a promise
|
|
2090
|
-
* - resolves to a object (with a `done` field) when the request can be issued without queueing,
|
|
2091
|
-
* - resolves to `null` if the request has been cancelled (by the callback return < 0).
|
|
2092
|
-
* In this case the application should not issue the request
|
|
2093
|
-
*/
|
|
2094
|
-
scheduleRequest(identiy: Identiy, getPriority?: (identiy: Identiy) => number): Promise<RequestResult>;
|
|
2095
|
-
private issueRequest;
|
|
2096
|
-
/** We check requests asynchronously, to prevent multiple updates */
|
|
2097
|
-
private issueNewRequests;
|
|
2098
|
-
/** Refresh all requests */
|
|
2099
|
-
private issueNewRequestsAsync;
|
|
2100
|
-
/** Ensure all requests have updated priorities, and that no longer valid requests are cancelled */
|
|
2101
|
-
private updateAllRequests;
|
|
2102
|
-
/** Update a single request by calling the callback */
|
|
2103
|
-
private updateRequest;
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
/** RequestScheduler Options */
|
|
2107
|
-
declare type RequestSchedulerOptions = {
|
|
2108
|
-
throttleRequests?: boolean;
|
|
2109
|
-
maxRequests?: number;
|
|
2110
|
-
};
|
|
1923
|
+
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"];
|
|
2111
1924
|
|
|
2112
1925
|
/** Five 场景*/
|
|
2113
1926
|
export declare class Scene extends THREE_2.Scene {
|
|
@@ -2256,13 +2069,13 @@ export declare interface TextureOptions {
|
|
|
2256
2069
|
* the content is loaded on-demand when needed based on the view.
|
|
2257
2070
|
* Do not construct this directly, instead access tiles through {@link Tileset3D#tileVisible}.
|
|
2258
2071
|
*/
|
|
2259
|
-
declare class Tile3D {
|
|
2260
|
-
cacheNode?:
|
|
2072
|
+
export declare class Tile3D {
|
|
2073
|
+
cacheNode?: TileCacheNode<Tile3D>;
|
|
2261
2074
|
tileset: Tileset3D;
|
|
2262
2075
|
header: TilesetJSONNode;
|
|
2263
2076
|
content?: TileContent;
|
|
2264
2077
|
parent?: Tile3D;
|
|
2265
|
-
boundingVolume:
|
|
2078
|
+
boundingVolume: TileOrientedBoundingBox;
|
|
2266
2079
|
contentState: "UNLOADED" | "LOADING" | "PROCESSING" | "READY" | "FAILED";
|
|
2267
2080
|
children: Tile3D[];
|
|
2268
2081
|
depth: number;
|
|
@@ -2318,8 +2131,8 @@ declare class Tile3D {
|
|
|
2318
2131
|
get contentUnloaded(): boolean;
|
|
2319
2132
|
get contentFailed(): boolean;
|
|
2320
2133
|
/** Get the tile's screen space error. */
|
|
2321
|
-
getScreenSpaceError(frameState:
|
|
2322
|
-
getPriority
|
|
2134
|
+
getScreenSpaceError(frameState: TileFrameState, useParentLodMetric: boolean): number;
|
|
2135
|
+
private getPriority;
|
|
2323
2136
|
/**
|
|
2324
2137
|
* Requests the tile's content.
|
|
2325
2138
|
* The request may not be made if the Request Scheduler can't prioritize it.
|
|
@@ -2329,15 +2142,15 @@ declare class Tile3D {
|
|
|
2329
2142
|
/**
|
|
2330
2143
|
* Update the tile's visibility
|
|
2331
2144
|
*/
|
|
2332
|
-
updateVisibility(frameState:
|
|
2333
|
-
visibility
|
|
2145
|
+
updateVisibility(frameState: TileFrameState): void;
|
|
2146
|
+
private visibility;
|
|
2334
2147
|
/**
|
|
2335
2148
|
* Computes the (potentially approximate) distance from the closest point of the tile's bounding volume to the camera.
|
|
2336
|
-
* @param frameState The frame state.
|
|
2337
|
-
* @returns
|
|
2149
|
+
* @param frameState - The frame state.
|
|
2150
|
+
* @returns The distance, in meters, or zero if the camera is inside the bounding volume.
|
|
2338
2151
|
*/
|
|
2339
|
-
distanceToTile
|
|
2340
|
-
updateTransform
|
|
2152
|
+
private distanceToTile;
|
|
2153
|
+
private updateTransform;
|
|
2341
2154
|
}
|
|
2342
2155
|
|
|
2343
2156
|
export declare class Tile3DModel extends PBMContainer {
|
|
@@ -2357,16 +2170,78 @@ export declare class Tile3DModel extends PBMContainer {
|
|
|
2357
2170
|
private lastCamera;
|
|
2358
2171
|
private lastRenderer;
|
|
2359
2172
|
private enabled;
|
|
2360
|
-
constructor(loaderOptions?: Partial<
|
|
2173
|
+
constructor(loaderOptions?: Partial<Tile3DModelLoaderOptions>);
|
|
2361
2174
|
get enable(): boolean;
|
|
2362
2175
|
set enable(value: boolean);
|
|
2363
|
-
load(url:
|
|
2176
|
+
load(url: WorkModelTiles): void;
|
|
2364
2177
|
update(renderer: THREE_2.WebGLRenderer, camera: THREE_2.PerspectiveCamera): void;
|
|
2365
2178
|
private tilesetUpdate;
|
|
2366
2179
|
reset(): void;
|
|
2367
2180
|
}
|
|
2368
2181
|
|
|
2369
|
-
|
|
2182
|
+
/** Advanced loader options */
|
|
2183
|
+
export declare interface Tile3DModelLoaderOptions {
|
|
2184
|
+
updateInterval: number;
|
|
2185
|
+
maxMemoryUsage: number;
|
|
2186
|
+
maxScreenSpaceError: number;
|
|
2187
|
+
viewDistanceScale: number;
|
|
2188
|
+
throttleRequests: boolean;
|
|
2189
|
+
maxRequests: number;
|
|
2190
|
+
onNodeCreated: (node: PBMGroup) => void;
|
|
2191
|
+
allowHosts?: string[];
|
|
2192
|
+
requestProxy?: (url: string) => string;
|
|
2193
|
+
networkSubscribe?: NetworkSubscribe;
|
|
2194
|
+
maxDepth?: number;
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
export declare class TileBoundingSphere {
|
|
2198
|
+
center: Vector3;
|
|
2199
|
+
radius: number;
|
|
2200
|
+
constructor(center?: number[], radius?: number);
|
|
2201
|
+
fromCenterRadius(center: number[], radius: number): this;
|
|
2202
|
+
fromCornerPoints(corner: number[], oppositeCorner: number[]): this;
|
|
2203
|
+
equals(right: TileBoundingSphere): boolean;
|
|
2204
|
+
clone(): TileBoundingSphere;
|
|
2205
|
+
union(boundingSphere: TileBoundingSphere): TileBoundingSphere;
|
|
2206
|
+
expand(point: number[]): this;
|
|
2207
|
+
transform(transform: Matrix4): this;
|
|
2208
|
+
distanceSquaredTo(point: number[]): number;
|
|
2209
|
+
distanceTo(point: number[]): number;
|
|
2210
|
+
intersectPlane(plane: TilePlane): number;
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
export declare interface TileBoundingVolume {
|
|
2214
|
+
/**
|
|
2215
|
+
* Applies a 4x4 affine transformation matrix to a bounding sphere.
|
|
2216
|
+
* @param sphere - The bounding sphere to apply the transformation to.
|
|
2217
|
+
* @param transform - The transformation matrix to apply to the bounding sphere.
|
|
2218
|
+
* @returns itself, i.e. the modified BoundingVolume.
|
|
2219
|
+
*/
|
|
2220
|
+
transform(transform: readonly number[]): this;
|
|
2221
|
+
/** Computes the estimated distance squared from the closest point on a bounding sphere to a point. */
|
|
2222
|
+
distanceSquaredTo(point: readonly number[]): number;
|
|
2223
|
+
/** Computes the estimated distance from the closest point on a bounding sphere to a point. */
|
|
2224
|
+
distanceTo(point: readonly number[]): number;
|
|
2225
|
+
/**
|
|
2226
|
+
* Determines which side of a plane the oriented bounding box is located.
|
|
2227
|
+
*
|
|
2228
|
+
* @param plane - The plane to test against.
|
|
2229
|
+
* @returns
|
|
2230
|
+
* - `INTERSECTION.INSIDE` if the entire box is on the side of the plane the normal is pointing.
|
|
2231
|
+
* - `INTERSECTION.OUTSIDE` if the entire box is on the opposite side.
|
|
2232
|
+
* - `INTERSECTION.INTERSECTING` if the box intersects the plane.
|
|
2233
|
+
*/
|
|
2234
|
+
intersectPlane(plane: TilePlane): number;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
export declare class TileCacheNode<T> {
|
|
2238
|
+
item: T;
|
|
2239
|
+
previous: TileCacheNode<T> | null;
|
|
2240
|
+
next: TileCacheNode<T> | null;
|
|
2241
|
+
constructor(item: T, previous: TileCacheNode<T> | null, next: TileCacheNode<T> | null);
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
export declare interface TileContent {
|
|
2370
2245
|
version: 1;
|
|
2371
2246
|
magic: number;
|
|
2372
2247
|
byteLength: number;
|
|
@@ -2389,24 +2264,133 @@ declare interface TileContent {
|
|
|
2389
2264
|
rtcCenter?: Float32Array;
|
|
2390
2265
|
}
|
|
2391
2266
|
|
|
2392
|
-
declare class
|
|
2267
|
+
export declare class TileCullingVolume {
|
|
2268
|
+
static get MASK_OUTSIDE(): number;
|
|
2269
|
+
static get MASK_INSIDE(): number;
|
|
2270
|
+
static get MASK_INDETERMINATE(): number;
|
|
2271
|
+
planes: TilePlane[];
|
|
2272
|
+
constructor(planes?: TilePlane[]);
|
|
2273
|
+
fromBoundingSphere(boundingSphere: {
|
|
2274
|
+
center: Vector3;
|
|
2275
|
+
radius: number;
|
|
2276
|
+
}): this;
|
|
2277
|
+
computeVisibilityWithPlaneMask(boundingVolume: TileBoundingVolume, parentPlaneMask: number): number;
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
export declare type TileFrameState = {
|
|
2281
|
+
camera: {
|
|
2282
|
+
position: number[];
|
|
2283
|
+
direction: number[];
|
|
2284
|
+
up: number[];
|
|
2285
|
+
};
|
|
2286
|
+
height: number;
|
|
2287
|
+
cullingVolume: TileCullingVolume;
|
|
2288
|
+
frameNumber: number;
|
|
2289
|
+
sseDenominator: number;
|
|
2290
|
+
};
|
|
2291
|
+
|
|
2292
|
+
export declare class TileOrientedBoundingBox {
|
|
2293
|
+
center: Vector3;
|
|
2294
|
+
halfAxes: Matrix3;
|
|
2295
|
+
constructor(center?: number[], halfAxes?: number[]);
|
|
2296
|
+
get halfSize(): number[];
|
|
2297
|
+
get quaternion(): Quaternion;
|
|
2298
|
+
fromCenterHalfSizeQuaternion(center: number[], halfSize: number[], quaternion: number[]): this;
|
|
2299
|
+
clone(): TileOrientedBoundingBox;
|
|
2300
|
+
equals(right: TileOrientedBoundingBox): boolean;
|
|
2301
|
+
getBoundingSphere(result?: TileBoundingSphere): TileBoundingSphere;
|
|
2302
|
+
intersectPlane(plane: TilePlane): number;
|
|
2303
|
+
distanceTo(point: number[]): number;
|
|
2304
|
+
distanceSquaredTo(point: number[]): number;
|
|
2305
|
+
computePlaneDistances(position: Vector3, direction: Vector3, result?: number[]): number[];
|
|
2306
|
+
transform(transformation: number[]): this;
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
export declare class TilePlane {
|
|
2310
|
+
normal: Vector3;
|
|
2311
|
+
distance: number;
|
|
2312
|
+
constructor(normal?: number[], distance?: number);
|
|
2313
|
+
fromNormalDistance(normal: number[], distance: number): this;
|
|
2314
|
+
fromPointNormal(point: number[], normal: number[]): this;
|
|
2315
|
+
fromCoefficients(a: number, b: number, c: number, d: number): this;
|
|
2316
|
+
clone(): TilePlane;
|
|
2317
|
+
equals(right: TilePlane): boolean;
|
|
2318
|
+
getPointDistance(point: number[]): number;
|
|
2319
|
+
transform(matrix4: Matrix4): this;
|
|
2320
|
+
projectPointOntoPlane(point: number[], result?: number[]): Vector3;
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
/** Tracks one request */
|
|
2324
|
+
export declare type TileRequest<Identiy> = {
|
|
2325
|
+
identiy: Identiy;
|
|
2326
|
+
priority: number;
|
|
2327
|
+
getPriority: (identiy: Identiy) => number;
|
|
2328
|
+
resolve: (requestResult: TileRequestResult) => void;
|
|
2329
|
+
};
|
|
2330
|
+
|
|
2331
|
+
export declare type TileRequestResult = null | {
|
|
2332
|
+
done: () => void;
|
|
2333
|
+
};
|
|
2334
|
+
|
|
2335
|
+
/**
|
|
2336
|
+
* Used to issue a request, without having them "deeply queued" by the browser.
|
|
2337
|
+
* @todo - Track requests globally, across multiple servers
|
|
2338
|
+
*/
|
|
2339
|
+
export declare class TileRequestScheduler<Identiy> {
|
|
2340
|
+
private props;
|
|
2341
|
+
private activeRequestCount;
|
|
2342
|
+
/** Tracks the number of active requests and prioritizes/cancels queued requests. */
|
|
2343
|
+
private requestQueue;
|
|
2344
|
+
private requestMap;
|
|
2345
|
+
private deferred;
|
|
2346
|
+
constructor(props?: TileRequestSchedulerOptions);
|
|
2347
|
+
/**
|
|
2348
|
+
* Called by an application that wants to issue a request, without having it deeply queued by the browser
|
|
2349
|
+
*
|
|
2350
|
+
* When the returned promise resolved, it is OK for the application to issue a request.
|
|
2351
|
+
* The promise resolves to an object that contains a `done` method.
|
|
2352
|
+
* When the application's request has completed (or failed), the application must call the `done` function
|
|
2353
|
+
*
|
|
2354
|
+
* @param identiy - Identiy
|
|
2355
|
+
* @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
|
|
2356
|
+
* @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
|
|
2357
|
+
*/
|
|
2358
|
+
scheduleRequest(identiy: Identiy, getPriority?: (identiy: Identiy) => number): Promise<TileRequestResult>;
|
|
2359
|
+
private issueRequest;
|
|
2360
|
+
/** We check requests asynchronously, to prevent multiple updates */
|
|
2361
|
+
private issueNewRequests;
|
|
2362
|
+
/** Refresh all requests */
|
|
2363
|
+
private issueNewRequestsAsync;
|
|
2364
|
+
/** Ensure all requests have updated priorities, and that no longer valid requests are cancelled */
|
|
2365
|
+
private updateAllRequests;
|
|
2366
|
+
/** Update a single request by calling the callback */
|
|
2367
|
+
private updateRequest;
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2370
|
+
/** RequestScheduler Options */
|
|
2371
|
+
export declare type TileRequestSchedulerOptions = {
|
|
2372
|
+
throttleRequests?: boolean;
|
|
2373
|
+
maxRequests?: number;
|
|
2374
|
+
};
|
|
2375
|
+
|
|
2376
|
+
export declare class Tileset3D {
|
|
2393
2377
|
rawJson: any;
|
|
2394
2378
|
options: Tileset3dOptions;
|
|
2395
2379
|
root: Tile3D;
|
|
2396
2380
|
traverser: Tileset3DTraverser;
|
|
2397
2381
|
cache: TilesetCache;
|
|
2398
|
-
requestScheduler:
|
|
2382
|
+
requestScheduler: TileRequestScheduler<string>;
|
|
2399
2383
|
selectedTiles: Tile3D[];
|
|
2400
2384
|
requestedTiles: Tile3D[];
|
|
2401
2385
|
memoryUsageInBytes: number;
|
|
2402
2386
|
frameNumber: number;
|
|
2403
2387
|
private _tiles;
|
|
2404
2388
|
private pendingCount;
|
|
2405
|
-
b3dmMapping:
|
|
2389
|
+
b3dmMapping: TilesetJSON['b3dmMapping'];
|
|
2406
2390
|
/**
|
|
2407
2391
|
* Create a new Tileset3D
|
|
2408
|
-
* @param json
|
|
2409
|
-
* @param options
|
|
2392
|
+
* @param json - TilesetJSON
|
|
2393
|
+
* @param options - Tileset3dOptions
|
|
2410
2394
|
*/
|
|
2411
2395
|
constructor(json: TilesetJSON, options: Tileset3dOptions);
|
|
2412
2396
|
get maxMemoryUsage(): number;
|
|
@@ -2419,7 +2403,7 @@ declare class Tileset3D {
|
|
|
2419
2403
|
get lodMetricValue(): number;
|
|
2420
2404
|
get refine(): 'ADD' | "REPLACE";
|
|
2421
2405
|
get tiles(): Tile3D[];
|
|
2422
|
-
get floorInfo():
|
|
2406
|
+
get floorInfo(): TilesetJSON['floorInfo'];
|
|
2423
2407
|
/** Release resources */
|
|
2424
2408
|
reset(): void;
|
|
2425
2409
|
/** Is the tileset loaded (update needs to have been called at least once) */
|
|
@@ -2433,7 +2417,7 @@ declare class Tileset3D {
|
|
|
2433
2417
|
unloadTile(tile: Tile3D): void;
|
|
2434
2418
|
}
|
|
2435
2419
|
|
|
2436
|
-
declare interface Tileset3dOptions {
|
|
2420
|
+
export declare interface Tileset3dOptions {
|
|
2437
2421
|
throttleRequests: boolean;
|
|
2438
2422
|
maxRequests: number;
|
|
2439
2423
|
maxMemoryUsage: number;
|
|
@@ -2451,38 +2435,38 @@ declare interface Tileset3dOptions {
|
|
|
2451
2435
|
maxDepth?: number;
|
|
2452
2436
|
}
|
|
2453
2437
|
|
|
2454
|
-
declare class Tileset3DTraverser {
|
|
2438
|
+
export declare class Tileset3DTraverser {
|
|
2455
2439
|
root: Tile3D | null;
|
|
2456
2440
|
options: TilesetTraverserProps;
|
|
2457
2441
|
requestedTiles: Record<string, Tile3D>;
|
|
2458
2442
|
selectedTiles: Record<string, Tile3D>;
|
|
2459
2443
|
emptyTiles: Record<string, Tile3D>;
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2444
|
+
private _traversalStack;
|
|
2445
|
+
private _emptyTraversalStack;
|
|
2446
|
+
private _frameNumber;
|
|
2463
2447
|
constructor(options: TilesetTraverserProps);
|
|
2464
|
-
traverse(root: Tile3D, frameState:
|
|
2448
|
+
traverse(root: Tile3D, frameState: TileFrameState): void;
|
|
2465
2449
|
reset(): void;
|
|
2466
|
-
executeTraversal
|
|
2467
|
-
updateChildTiles
|
|
2468
|
-
updateAndPushChildren
|
|
2469
|
-
updateTile(tile: Tile3D, frameState:
|
|
2470
|
-
selectTile(tile: Tile3D, frameState:
|
|
2471
|
-
loadTile(tile: Tile3D, frameState:
|
|
2472
|
-
touchTile(tile: Tile3D, frameState:
|
|
2473
|
-
canTraverse
|
|
2474
|
-
shouldLoadTile
|
|
2475
|
-
shouldSelectTile
|
|
2476
|
-
shouldRefine
|
|
2477
|
-
updateTileVisibility
|
|
2478
|
-
meetsScreenSpaceErrorEarly
|
|
2479
|
-
compareDistanceToCamera
|
|
2480
|
-
anyChildrenVisible
|
|
2481
|
-
everyChildrenVisibleIsLoaded
|
|
2482
|
-
executeEmptyTraversal
|
|
2483
|
-
}
|
|
2484
|
-
|
|
2485
|
-
declare class TilesetCache {
|
|
2450
|
+
private executeTraversal;
|
|
2451
|
+
private updateChildTiles;
|
|
2452
|
+
private updateAndPushChildren;
|
|
2453
|
+
updateTile(tile: Tile3D, frameState: TileFrameState): void;
|
|
2454
|
+
selectTile(tile: Tile3D, frameState: TileFrameState): void;
|
|
2455
|
+
loadTile(tile: Tile3D, frameState: TileFrameState): void;
|
|
2456
|
+
touchTile(tile: Tile3D, frameState: TileFrameState): void;
|
|
2457
|
+
private canTraverse;
|
|
2458
|
+
private shouldLoadTile;
|
|
2459
|
+
private shouldSelectTile;
|
|
2460
|
+
private shouldRefine;
|
|
2461
|
+
private updateTileVisibility;
|
|
2462
|
+
private meetsScreenSpaceErrorEarly;
|
|
2463
|
+
private compareDistanceToCamera;
|
|
2464
|
+
private anyChildrenVisible;
|
|
2465
|
+
private everyChildrenVisibleIsLoaded;
|
|
2466
|
+
private executeEmptyTraversal;
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
export declare class TilesetCache {
|
|
2486
2470
|
private list;
|
|
2487
2471
|
private sentinel;
|
|
2488
2472
|
constructor();
|
|
@@ -2493,7 +2477,7 @@ declare class TilesetCache {
|
|
|
2493
2477
|
unloadTiles(isOverMemory: () => boolean, unloadCallback?: (tile: Tile3D) => void): void;
|
|
2494
2478
|
}
|
|
2495
2479
|
|
|
2496
|
-
declare interface TilesetJSON {
|
|
2480
|
+
export declare interface TilesetJSON {
|
|
2497
2481
|
asset: {
|
|
2498
2482
|
gltfUpAxis: "X" | "Y" | "Z";
|
|
2499
2483
|
version: "1.0";
|
|
@@ -2504,11 +2488,17 @@ declare interface TilesetJSON {
|
|
|
2504
2488
|
lodMetricValue: number;
|
|
2505
2489
|
root: TilesetJSONNode;
|
|
2506
2490
|
type: "TILES3D";
|
|
2507
|
-
floorInfo:
|
|
2508
|
-
|
|
2491
|
+
floorInfo: {
|
|
2492
|
+
ground: number;
|
|
2493
|
+
height: number;
|
|
2494
|
+
}[];
|
|
2495
|
+
b3dmMapping: {
|
|
2496
|
+
b3dm_base_url: string;
|
|
2497
|
+
b3dm_url: Record<string, string>;
|
|
2498
|
+
};
|
|
2509
2499
|
}
|
|
2510
2500
|
|
|
2511
|
-
declare interface TilesetJSONNode {
|
|
2501
|
+
export declare interface TilesetJSONNode {
|
|
2512
2502
|
boundingVolume: {
|
|
2513
2503
|
box: number[];
|
|
2514
2504
|
};
|
|
@@ -2526,12 +2516,12 @@ declare interface TilesetJSONNode {
|
|
|
2526
2516
|
type: "EMPTY" | "SCENEGRAPH" | "MESH";
|
|
2527
2517
|
}
|
|
2528
2518
|
|
|
2529
|
-
declare type TilesetTraverserProps = {
|
|
2519
|
+
export declare type TilesetTraverserProps = {
|
|
2530
2520
|
loadSiblings: boolean;
|
|
2531
2521
|
skipLevelOfDetail: boolean;
|
|
2532
2522
|
maxScreenSpaceError: number;
|
|
2533
2523
|
maxDepth?: number;
|
|
2534
|
-
onTraversalEnd: (frameState:
|
|
2524
|
+
onTraversalEnd: (frameState: TileFrameState) => any;
|
|
2535
2525
|
};
|
|
2536
2526
|
|
|
2537
2527
|
export declare interface TopviewControllerCustomInitArgs extends Omit<FloorplanControllerCustomInitArgs, "defaultLongitude" | "defaultLatitude" | "maxLatitude" | "minLatitude"> {
|
|
@@ -2540,6 +2530,13 @@ export declare interface TopviewControllerCustomInitArgs extends Omit<FloorplanC
|
|
|
2540
2530
|
export declare interface VRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
2541
2531
|
}
|
|
2542
2532
|
|
|
2533
|
+
declare type WebXREventTypes = {
|
|
2534
|
+
/** WebXR模式开始,session完成坐标系设置*/
|
|
2535
|
+
webXRSessionStart(): void;
|
|
2536
|
+
/** WebXR模式结束,销毁session*/
|
|
2537
|
+
webXRSessionEnd(): void;
|
|
2538
|
+
};
|
|
2539
|
+
|
|
2543
2540
|
export declare class Work {
|
|
2544
2541
|
/** 名称 */
|
|
2545
2542
|
name: string;
|
|
@@ -2624,13 +2621,6 @@ export declare interface WorkModelTiles {
|
|
|
2624
2621
|
b3md_mappings_url_md5: string;
|
|
2625
2622
|
}
|
|
2626
2623
|
|
|
2627
|
-
declare interface WorkModelTiles_2 {
|
|
2628
|
-
tileset_url: string;
|
|
2629
|
-
tileset_url_md5: string;
|
|
2630
|
-
b3md_mappings_url: string;
|
|
2631
|
-
b3md_mappings_url_md5: string;
|
|
2632
|
-
}
|
|
2633
|
-
|
|
2634
2624
|
/** 每个点位的数据 */
|
|
2635
2625
|
export declare interface WorkObserver {
|
|
2636
2626
|
/** 点位序号 */
|
|
@@ -2678,4 +2668,109 @@ export declare interface WorkVideo {
|
|
|
2678
2668
|
size: THREE_2.Vector2;
|
|
2679
2669
|
}
|
|
2680
2670
|
|
|
2671
|
+
export declare class XRButton {
|
|
2672
|
+
static createButton(onClickHook: () => void): HTMLAnchorElement | HTMLButtonElement;
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
declare class XRController {
|
|
2676
|
+
_targetRay: any;
|
|
2677
|
+
_grip: any;
|
|
2678
|
+
_hand: any;
|
|
2679
|
+
_axes: number[];
|
|
2680
|
+
constructor();
|
|
2681
|
+
getHandSpace(): any;
|
|
2682
|
+
getTargetRaySpace(): any;
|
|
2683
|
+
getGripSpace(): any;
|
|
2684
|
+
dispatchEvent(event: any): this;
|
|
2685
|
+
disconnect(inputSource: XRInputSource): this;
|
|
2686
|
+
getAxes(): number[];
|
|
2687
|
+
update(inputSource: any, frame: any, referenceSpace: any): this;
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
declare type XRControllerRay = {
|
|
2691
|
+
angularVelocity: THREE_2.Vector3;
|
|
2692
|
+
linearVelocity: THREE_2.Vector3;
|
|
2693
|
+
up: THREE_2.Vector3;
|
|
2694
|
+
matrix: THREE_2.Matrix4;
|
|
2695
|
+
position: THREE_2.Vector3;
|
|
2696
|
+
rotation: THREE_2.Euler;
|
|
2697
|
+
};
|
|
2698
|
+
|
|
2699
|
+
declare interface XRInitOption {
|
|
2700
|
+
/** 使用WEBXR的当前设备*/
|
|
2701
|
+
machineType: XRMachineType;
|
|
2702
|
+
/** 全景模式还是视差模式*/
|
|
2703
|
+
isPanorama: boolean;
|
|
2704
|
+
/** 使用的参考空间类型*/
|
|
2705
|
+
referenceSpaceType: XRReferenceSpaceType;
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2708
|
+
declare type XRMachineType = 'Pico' | 'Oculus';
|
|
2709
|
+
|
|
2710
|
+
export declare class XRManager extends Subscribe<WebXREventTypes> {
|
|
2711
|
+
/** 是否使用全景模式*/
|
|
2712
|
+
isPanorama: boolean;
|
|
2713
|
+
/** 当前的设备*/
|
|
2714
|
+
machineType: XRMachineType;
|
|
2715
|
+
/** 场景渲染器*/
|
|
2716
|
+
renderer: THREE_2.WebGLRenderer;
|
|
2717
|
+
/** opengles句柄*/
|
|
2718
|
+
gl: WebGLRenderingContext;
|
|
2719
|
+
/** 是否开启XR模式 */
|
|
2720
|
+
enabled: boolean;
|
|
2721
|
+
/** WebXR模式Context */
|
|
2722
|
+
session: XRSession | null;
|
|
2723
|
+
/** XR参考空间类型*/
|
|
2724
|
+
referenceSpaceType: XRReferenceSpaceType;
|
|
2725
|
+
/** XR参考空间 */
|
|
2726
|
+
referenceSpace: XRReferenceSpace | null;
|
|
2727
|
+
/** XR控制器 */
|
|
2728
|
+
controllers: XRController[];
|
|
2729
|
+
/** XR控制器控制数据 */
|
|
2730
|
+
inputSourcesMap: Map<XRInputSource, XRController>;
|
|
2731
|
+
/** XR双相机 */
|
|
2732
|
+
cameraVR: THREE_2.ArrayCamera;
|
|
2733
|
+
/** XR左眼相机*/
|
|
2734
|
+
cameraL: THREE_2.PerspectiveCamera;
|
|
2735
|
+
/** XR右眼相机*/
|
|
2736
|
+
cameraR: THREE_2.PerspectiveCamera;
|
|
2737
|
+
/** 是否在获取*/
|
|
2738
|
+
isPresenting: boolean;
|
|
2739
|
+
/** 视锥近面*/
|
|
2740
|
+
private currentDepthNear;
|
|
2741
|
+
/** 视锥远面*/
|
|
2742
|
+
private currentDepthFar;
|
|
2743
|
+
/** 左眼相机位姿*/
|
|
2744
|
+
private cameraLPos;
|
|
2745
|
+
/** 右眼相机位姿*/
|
|
2746
|
+
private cameraRPos;
|
|
2747
|
+
constructor(renderer: THREE_2.WebGLRenderer, gl: WebGLRenderingContext, options?: Partial<XRInitOption>);
|
|
2748
|
+
getController(index: number): XRControllerRay;
|
|
2749
|
+
getCameras(): any;
|
|
2750
|
+
private updateCamera;
|
|
2751
|
+
/**
|
|
2752
|
+
* @author jsantell / https://www.jsantell.com/
|
|
2753
|
+
*
|
|
2754
|
+
* Assumes 2 cameras that are parallel and share an X-axis, and that
|
|
2755
|
+
* the cameras' projection and world matrices have already been set.
|
|
2756
|
+
* And that near and far planes are identical for both cameras.
|
|
2757
|
+
* Visualization of this technique: https://computergraphics.stackexchange.com/a/4765
|
|
2758
|
+
*/
|
|
2759
|
+
private setProjectionFromUnion;
|
|
2760
|
+
/**
|
|
2761
|
+
* 获取THREEJS用于渲染XR场景的双眼相机
|
|
2762
|
+
* @param camera - 传统模式下渲染场景的THREEJS相机
|
|
2763
|
+
* @returns - 用于渲染XR场景的双眼相机
|
|
2764
|
+
*/
|
|
2765
|
+
getCamera(camera: THREE_2.PerspectiveCamera): any;
|
|
2766
|
+
private updateInputSources;
|
|
2767
|
+
private onSessionEvent;
|
|
2768
|
+
private onSessionEnd;
|
|
2769
|
+
private onRequestReferenceSpace;
|
|
2770
|
+
setSession(value: XRSession | null): void;
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
declare interface XRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2681
2776
|
export { }
|