@realsee/five 5.0.0-alpha.126 → 5.0.0-alpha.129
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.Camera.html +1 -1
- package/docs/classes/five.Five.html +46 -46
- 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 +33 -23
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- package/docs/classes/five.PBMContainer.html +5 -5
- package/docs/classes/five.PBMGroup.html +4 -4
- package/docs/classes/five.PBMMaterial.html +10 -8
- 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 +1 -1
- package/docs/classes/five.Tile3DModel.html +15 -0
- package/docs/classes/five.Work.html +11 -11
- 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 +5 -5
- package/docs/interfaces/five.FiveInitArgs.html +12 -10
- 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 +3 -3
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +15 -0
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModelEventCallback.html +7 -7
- package/docs/interfaces/five.MovePanoOptions.html +5 -3
- package/docs/interfaces/five.PBMPanoPicture.html +1 -1
- package/docs/interfaces/five.PBMParameters.html +5 -3
- 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 +5 -3
- package/docs/interfaces/five.Scissor.html +1 -1
- package/docs/interfaces/five.State.html +5 -3
- 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.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 +2 -2
- package/docs/interfaces/five.WorkModel.html +6 -6
- package/docs/interfaces/five.WorkModelTiles.html +3 -0
- package/docs/interfaces/five.WorkObserver.html +12 -12
- 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 +1 -1
- 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 +12 -11
- 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 +1 -1
- 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 +576 -4
- package/five/index.js +12 -12
- package/gltf-loader/index.js +2 -2
- package/line/index.js +2 -2
- package/package.json +2 -1
- package/react/index.js +2 -2
- package/server/index.d.ts +15 -1
- package/server/index.js +3 -3
- package/sticker/index.js +2 -2
- package/umd/five.js +1 -1
- package/vue/index.js +2 -2
package/five/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import Matrix3 from '@math.gl/core/dist/esm/classes/matrix3';
|
|
2
|
+
import Matrix4 from '@math.gl/core/dist/esm/classes/matrix4';
|
|
3
|
+
import Quaternion from '@math.gl/core/dist/esm/classes/quaternion';
|
|
1
4
|
import * as THREE_2 from 'three';
|
|
5
|
+
import Vector3 from '@math.gl/core/dist/esm/classes/vector3';
|
|
2
6
|
|
|
3
7
|
export declare interface AddableObject extends THREE_2.Object3D {
|
|
4
8
|
needsRender?: boolean;
|
|
@@ -35,6 +39,51 @@ export declare class AnimationFrameLoop {
|
|
|
35
39
|
disponse(): void;
|
|
36
40
|
}
|
|
37
41
|
|
|
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
|
+
|
|
38
87
|
export declare class BVH {
|
|
39
88
|
trianglesArray?: Float32Array;
|
|
40
89
|
offsetArray?: Uint32Array;
|
|
@@ -91,6 +140,13 @@ export declare class BVHVector3 {
|
|
|
91
140
|
clone(): BVHVector3;
|
|
92
141
|
}
|
|
93
142
|
|
|
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
|
+
|
|
94
150
|
/** Five 相机 */
|
|
95
151
|
export declare class Camera extends THREE_2.PerspectiveCamera {
|
|
96
152
|
/** 相机姿态 */
|
|
@@ -119,6 +175,7 @@ export declare type ControllerCustomInitTypes = {
|
|
|
119
175
|
VRPanorama: VRPanoramaControllerCustomInitArgs;
|
|
120
176
|
Model: ModelControllerCustomInitArgs;
|
|
121
177
|
DepthPanorama: DepthPanoramaControllerCustomInitArgs;
|
|
178
|
+
Mapview: MapviewControllerCustomInitArgs;
|
|
122
179
|
};
|
|
123
180
|
|
|
124
181
|
export declare type ControllerEventTypes = {
|
|
@@ -408,6 +465,20 @@ export declare type ControllerEventTypes = {
|
|
|
408
465
|
error(error: Error): void;
|
|
409
466
|
};
|
|
410
467
|
|
|
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
|
+
|
|
411
482
|
/**
|
|
412
483
|
* URL 地址的转换
|
|
413
484
|
* @param source - url 原地址
|
|
@@ -455,14 +526,14 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
455
526
|
* @param work - 归一化的标准 work
|
|
456
527
|
* @param state - 加载时的姿态
|
|
457
528
|
*/
|
|
458
|
-
willLoad(input: any, work: Work, state: Omit<State, "offset">): void;
|
|
529
|
+
willLoad(input: any, work: Work, state: Omit<State, "offset" | "distance">): void;
|
|
459
530
|
/**
|
|
460
531
|
* 开始加载 Work 数据
|
|
461
532
|
* @param input - 输入的 work
|
|
462
533
|
* @param work - 归一化的标准 work
|
|
463
534
|
* @param state - 加载时的姿态
|
|
464
535
|
*/
|
|
465
|
-
load(input: any, work: Work, state: Omit<State, "offset">): void;
|
|
536
|
+
load(input: any, work: Work, state: Omit<State, "offset" | "distance">): void;
|
|
466
537
|
/**
|
|
467
538
|
* 加载完 Work 数据
|
|
468
539
|
* @param input - 输入的 work
|
|
@@ -768,7 +839,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
768
839
|
set enableIOSEDR(enable: boolean);
|
|
769
840
|
get enablePostProcessing(): boolean;
|
|
770
841
|
set enablePostProcessing(enable: boolean);
|
|
771
|
-
updateConfiguration(args: Pick<FiveInitArgs, "panorama" | "model" | "floorplan" | "topview" | "depthPanorama" | "vrPanorama" | "imageOptions">): void;
|
|
842
|
+
updateConfiguration(args: Pick<FiveInitArgs, "panorama" | "model" | "floorplan" | "topview" | "mapview" | "depthPanorama" | "vrPanorama" | "imageOptions">): void;
|
|
772
843
|
/**
|
|
773
844
|
* 将显示区域加载到页面 DOM 中
|
|
774
845
|
* @description
|
|
@@ -1110,6 +1181,8 @@ export declare interface FiveInitArgs {
|
|
|
1110
1181
|
floorplan?: ControllerCustomInitTypes["Floorplan"];
|
|
1111
1182
|
/** 户型图模式下的特定参数 */
|
|
1112
1183
|
topview?: ControllerCustomInitTypes["Topview"];
|
|
1184
|
+
/** 地图模式下的特定参数 */
|
|
1185
|
+
mapview?: ControllerCustomInitTypes["Mapview"];
|
|
1113
1186
|
/** 深度图游走模式下的特定参数 */
|
|
1114
1187
|
depthPanorama?: ControllerCustomInitTypes["DepthPanorama"];
|
|
1115
1188
|
/** VR眼镜模式下的特定参数 */
|
|
@@ -1164,6 +1237,11 @@ parameters: Parameters<T>[1]
|
|
|
1164
1237
|
*/
|
|
1165
1238
|
export declare type FivePluginInstance<T extends FivePlugin<any, any>> = ReturnType<T>;
|
|
1166
1239
|
|
|
1240
|
+
declare interface FloorInfo {
|
|
1241
|
+
ground: number;
|
|
1242
|
+
height: number;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1167
1245
|
export declare interface FloorplanControllerCustomInitArgs {
|
|
1168
1246
|
/** 默认偏航角 */
|
|
1169
1247
|
defaultLongitude?: number;
|
|
@@ -1181,6 +1259,18 @@ export declare interface FloorplanControllerCustomInitArgs {
|
|
|
1181
1259
|
minFov?: number;
|
|
1182
1260
|
}
|
|
1183
1261
|
|
|
1262
|
+
declare type FrameState = {
|
|
1263
|
+
camera: {
|
|
1264
|
+
position: number[];
|
|
1265
|
+
direction: number[];
|
|
1266
|
+
up: number[];
|
|
1267
|
+
};
|
|
1268
|
+
height: number;
|
|
1269
|
+
cullingVolume: CullingVolume;
|
|
1270
|
+
frameNumber: number;
|
|
1271
|
+
sseDenominator: number;
|
|
1272
|
+
};
|
|
1273
|
+
|
|
1184
1274
|
export declare type GestureTypes = "pan" | "tap" | "pinch" | "press" | "mouseWheel";
|
|
1185
1275
|
|
|
1186
1276
|
export declare function getViewportScale(): number;
|
|
@@ -1207,6 +1297,11 @@ export declare interface ImageOptions {
|
|
|
1207
1297
|
mappings?: ImageURLMappings;
|
|
1208
1298
|
}
|
|
1209
1299
|
|
|
1300
|
+
export declare function imageSupport(): Promise<{
|
|
1301
|
+
avif: boolean;
|
|
1302
|
+
webp: boolean;
|
|
1303
|
+
}>;
|
|
1304
|
+
|
|
1210
1305
|
export declare interface ImageURLMappings {
|
|
1211
1306
|
[publicDomain: string]: {
|
|
1212
1307
|
"pano": [string, string];
|
|
@@ -1293,6 +1388,20 @@ export declare class LegacyPanoCircleMesh extends THREE_2.Object3D implements Pa
|
|
|
1293
1388
|
dispose(): void;
|
|
1294
1389
|
}
|
|
1295
1390
|
|
|
1391
|
+
/** Advanced loader options */
|
|
1392
|
+
declare interface LoaderOptions {
|
|
1393
|
+
updateInterval: number;
|
|
1394
|
+
maxMemoryUsage: number;
|
|
1395
|
+
maxScreenSpaceError: number;
|
|
1396
|
+
viewDistanceScale: number;
|
|
1397
|
+
throttleRequests: boolean;
|
|
1398
|
+
maxRequests: number;
|
|
1399
|
+
onNodeCreated: (node: PBMGroup) => void;
|
|
1400
|
+
allowHosts?: string[];
|
|
1401
|
+
networkSubscribe?: NetworkSubscribe;
|
|
1402
|
+
maxDepth?: number;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1296
1405
|
export declare type LooseWork = {
|
|
1297
1406
|
bvh?: boolean;
|
|
1298
1407
|
modelAsync?: boolean;
|
|
@@ -1367,6 +1476,65 @@ export declare type LooseWorkVideo = {
|
|
|
1367
1476
|
size: number[];
|
|
1368
1477
|
};
|
|
1369
1478
|
|
|
1479
|
+
declare class ManagedArray<T> {
|
|
1480
|
+
private map;
|
|
1481
|
+
private array;
|
|
1482
|
+
private _length;
|
|
1483
|
+
constructor();
|
|
1484
|
+
/**
|
|
1485
|
+
* Gets or sets the length of the array.
|
|
1486
|
+
* If the set length is greater than the length of the internal array, the internal array is resized.
|
|
1487
|
+
*
|
|
1488
|
+
* @memberof ManagedArray.prototype
|
|
1489
|
+
* @type Number
|
|
1490
|
+
*/
|
|
1491
|
+
get length(): number;
|
|
1492
|
+
/**
|
|
1493
|
+
* Gets the element at an index.
|
|
1494
|
+
* @param { Number } index The index to get.
|
|
1495
|
+
*/
|
|
1496
|
+
get(index: number): T;
|
|
1497
|
+
/**
|
|
1498
|
+
* Sets the element at an index. Resizes the array if index is greater than the length of the array.
|
|
1499
|
+
*
|
|
1500
|
+
* @param {Number} index The index to set.
|
|
1501
|
+
* @param {*} element The element to set at index.
|
|
1502
|
+
*/
|
|
1503
|
+
set(index: number, element: T): void;
|
|
1504
|
+
delete(element: T): void;
|
|
1505
|
+
/**
|
|
1506
|
+
* Push an element into the array.
|
|
1507
|
+
*
|
|
1508
|
+
* @param {*} element The element to push.
|
|
1509
|
+
*/
|
|
1510
|
+
push(element: T): void;
|
|
1511
|
+
/**
|
|
1512
|
+
* Pop an element from the array.
|
|
1513
|
+
*
|
|
1514
|
+
* @returns {*} The last element in the array.
|
|
1515
|
+
*/
|
|
1516
|
+
pop(): T;
|
|
1517
|
+
reset(): void;
|
|
1518
|
+
find(target: T): boolean;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
export declare interface MapviewControllerCustomInitArgs {
|
|
1522
|
+
/** 默认偏航角 */
|
|
1523
|
+
defaultLongitude?: number;
|
|
1524
|
+
/** 默认俯仰角 */
|
|
1525
|
+
defaultLatitude?: number;
|
|
1526
|
+
/** 默认相机距离 */
|
|
1527
|
+
defaultDistance?: number;
|
|
1528
|
+
/** 最大俯仰角 */
|
|
1529
|
+
maxLatitude?: number;
|
|
1530
|
+
/** 最小俯仰角 */
|
|
1531
|
+
minLatitude?: number;
|
|
1532
|
+
/** 最大相机距离 */
|
|
1533
|
+
maxDistance?: number;
|
|
1534
|
+
/** 最小相机距离 */
|
|
1535
|
+
minDistance?: number;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1370
1538
|
export declare type Mirror<T extends string> = Record<T, T>;
|
|
1371
1539
|
|
|
1372
1540
|
/**
|
|
@@ -1375,6 +1543,7 @@ export declare type Mirror<T extends string> = Record<T, T>;
|
|
|
1375
1543
|
* - **Model**: 模型游走模式
|
|
1376
1544
|
* - **Floorplan**: 模型查看模式
|
|
1377
1545
|
* - **Topview**: 户型图模式
|
|
1546
|
+
* - **Mapview**: 地图模式
|
|
1378
1547
|
* - **DepthPanorama**: 深度图游走模式
|
|
1379
1548
|
* - **VRPanorama**: VR眼镜模式
|
|
1380
1549
|
*/
|
|
@@ -1383,6 +1552,8 @@ export declare type Mode =
|
|
|
1383
1552
|
"Floorplan" |
|
|
1384
1553
|
/** 户型图模式 */
|
|
1385
1554
|
"Topview" |
|
|
1555
|
+
/** 地图模式 */
|
|
1556
|
+
"Mapview" |
|
|
1386
1557
|
/** 全景图游走模式 */
|
|
1387
1558
|
"Panorama" |
|
|
1388
1559
|
/** VR眼镜模式 */
|
|
@@ -1411,6 +1582,10 @@ export declare class Model extends PBMContainer implements Subscribe<ModelEventT
|
|
|
1411
1582
|
shownFloor: number | null;
|
|
1412
1583
|
/** 楼层的数量 */
|
|
1413
1584
|
floorLength: number;
|
|
1585
|
+
/** 模型瓦片 */
|
|
1586
|
+
originModel?: PBMContainer;
|
|
1587
|
+
/** 模型瓦片 */
|
|
1588
|
+
tiledModel?: Tile3DModel;
|
|
1414
1589
|
/**
|
|
1415
1590
|
* 判断是否注册了事件
|
|
1416
1591
|
* 具体可查看 {@link Subscribe.hasListener}
|
|
@@ -1454,6 +1629,15 @@ export declare class Model extends PBMContainer implements Subscribe<ModelEventT
|
|
|
1454
1629
|
* 请用 shwonFloor 代替
|
|
1455
1630
|
*/
|
|
1456
1631
|
get shownfloor(): number | null;
|
|
1632
|
+
/**
|
|
1633
|
+
* 当前模型是否支持瓦片
|
|
1634
|
+
*/
|
|
1635
|
+
get hasTiles(): boolean;
|
|
1636
|
+
/**
|
|
1637
|
+
* 是否开启瓦片
|
|
1638
|
+
*/
|
|
1639
|
+
get enableTiles(): boolean;
|
|
1640
|
+
set enableTiles(enable: boolean);
|
|
1457
1641
|
/**
|
|
1458
1642
|
* 获取模型边界线
|
|
1459
1643
|
* @param threshold - 面片间夹角阈值
|
|
@@ -1478,6 +1662,8 @@ export declare class Model extends PBMContainer implements Subscribe<ModelEventT
|
|
|
1478
1662
|
*/
|
|
1479
1663
|
show(): void;
|
|
1480
1664
|
show(floorIndex: number, hiddenOpacity?: number): void;
|
|
1665
|
+
private at3dShow;
|
|
1666
|
+
private b3dmShow;
|
|
1481
1667
|
/**
|
|
1482
1668
|
* 计算模型射线碰撞检测
|
|
1483
1669
|
* @param raycaster - THREE 射线对象
|
|
@@ -1492,6 +1678,7 @@ export declare class Model extends PBMContainer implements Subscribe<ModelEventT
|
|
|
1492
1678
|
* @param imageOptions - 图片参数
|
|
1493
1679
|
*/
|
|
1494
1680
|
load(workModel: WorkModel, textureOptions?: TextureOptions): Promise<void>;
|
|
1681
|
+
update(renderer: THREE_2.WebGLRenderer, camera: THREE_2.PerspectiveCamera): void;
|
|
1495
1682
|
/**
|
|
1496
1683
|
* 析构函数
|
|
1497
1684
|
* @description
|
|
@@ -1602,6 +1789,23 @@ export declare class NetworkSubscribe extends Subscribe<{
|
|
|
1602
1789
|
|
|
1603
1790
|
export declare type NetworkType = "XMLHttpRequest" | "Script" | "Image" | "Link";
|
|
1604
1791
|
|
|
1792
|
+
declare class OrientedBoundingBox {
|
|
1793
|
+
center: Vector3;
|
|
1794
|
+
halfAxes: Matrix3;
|
|
1795
|
+
constructor(center?: number[], halfAxes?: number[]);
|
|
1796
|
+
get halfSize(): number[];
|
|
1797
|
+
get quaternion(): Quaternion;
|
|
1798
|
+
fromCenterHalfSizeQuaternion(center: number[], halfSize: number[], quaternion: number[]): this;
|
|
1799
|
+
clone(): OrientedBoundingBox;
|
|
1800
|
+
equals(right: OrientedBoundingBox): boolean;
|
|
1801
|
+
getBoundingSphere(result?: BoundingSphere): BoundingSphere;
|
|
1802
|
+
intersectPlane(plane: Plane): number;
|
|
1803
|
+
distanceTo(point: number[]): number;
|
|
1804
|
+
distanceSquaredTo(point: number[]): number;
|
|
1805
|
+
computePlaneDistances(position: Vector3, direction: Vector3, result?: number[]): number[];
|
|
1806
|
+
transform(transformation: number[]): this;
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1605
1809
|
export declare class PanoCircleMesh extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1606
1810
|
needsRender: boolean;
|
|
1607
1811
|
private loadingMesh;
|
|
@@ -1764,6 +1968,8 @@ export declare class PBMMaterial extends THREE_2.ShaderMaterial implements PBMPa
|
|
|
1764
1968
|
/** 模型透明度 */
|
|
1765
1969
|
opacity: number;
|
|
1766
1970
|
originOpacity: number;
|
|
1971
|
+
/** 楼层切割参数*/
|
|
1972
|
+
floorInfo: THREE_2.Vector3 | null;
|
|
1767
1973
|
constructor(parameters?: Partial<PBMParameters>);
|
|
1768
1974
|
}
|
|
1769
1975
|
|
|
@@ -1799,6 +2005,22 @@ export declare interface PBMParameters {
|
|
|
1799
2005
|
perspToOrtho: number;
|
|
1800
2006
|
/** 模型透明度 */
|
|
1801
2007
|
opacity: number;
|
|
2008
|
+
/** 楼层切割参数*/
|
|
2009
|
+
floorInfo?: THREE_2.Vector3 | null;
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
declare class Plane {
|
|
2013
|
+
normal: Vector3;
|
|
2014
|
+
distance: number;
|
|
2015
|
+
constructor(normal?: number[], distance?: number);
|
|
2016
|
+
fromNormalDistance(normal: number[], distance: number): this;
|
|
2017
|
+
fromPointNormal(point: number[], normal: number[]): this;
|
|
2018
|
+
fromCoefficients(a: number, b: number, c: number, d: number): this;
|
|
2019
|
+
clone(): Plane;
|
|
2020
|
+
equals(right: Plane): boolean;
|
|
2021
|
+
getPointDistance(point: number[]): number;
|
|
2022
|
+
transform(matrix4: Matrix4): this;
|
|
2023
|
+
projectPointOntoPlane(point: number[], result?: number[]): Vector3;
|
|
1802
2024
|
}
|
|
1803
2025
|
|
|
1804
2026
|
/**
|
|
@@ -1814,10 +2036,62 @@ export declare interface Pose {
|
|
|
1814
2036
|
fov: number;
|
|
1815
2037
|
/** 相机位置*/
|
|
1816
2038
|
offset: THREE_2.Vector3;
|
|
2039
|
+
/** 相机距离 */
|
|
2040
|
+
distance: number;
|
|
1817
2041
|
}
|
|
1818
2042
|
|
|
1819
2043
|
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"];
|
|
1820
2044
|
|
|
2045
|
+
declare type RequestResult = null | {
|
|
2046
|
+
done: () => void;
|
|
2047
|
+
};
|
|
2048
|
+
|
|
2049
|
+
/**
|
|
2050
|
+
* Used to issue a request, without having them "deeply queued" by the browser.
|
|
2051
|
+
* @todo - Track requests globally, across multiple servers
|
|
2052
|
+
*/
|
|
2053
|
+
declare class RequestScheduler<Identiy> {
|
|
2054
|
+
private props;
|
|
2055
|
+
private activeRequestCount;
|
|
2056
|
+
/** Tracks the number of active requests and prioritizes/cancels queued requests. */
|
|
2057
|
+
private requestQueue;
|
|
2058
|
+
private requestMap;
|
|
2059
|
+
private deferred;
|
|
2060
|
+
constructor(props?: RequestSchedulerOptions);
|
|
2061
|
+
/**
|
|
2062
|
+
* Called by an application that wants to issue a request, without having it deeply queued by the browser
|
|
2063
|
+
*
|
|
2064
|
+
* When the returned promise resolved, it is OK for the application to issue a request.
|
|
2065
|
+
* The promise resolves to an object that contains a `done` method.
|
|
2066
|
+
* When the application's request has completed (or failed), the application must call the `done` function
|
|
2067
|
+
*
|
|
2068
|
+
* @param identiy
|
|
2069
|
+
* @param getPriority will be called when request "slots" open up,
|
|
2070
|
+
* allowing the caller to update priority or cancel the request
|
|
2071
|
+
* Highest priority executes first, priority < 0 cancels the request
|
|
2072
|
+
* @returns a promise
|
|
2073
|
+
* - resolves to a object (with a `done` field) when the request can be issued without queueing,
|
|
2074
|
+
* - resolves to `null` if the request has been cancelled (by the callback return < 0).
|
|
2075
|
+
* In this case the application should not issue the request
|
|
2076
|
+
*/
|
|
2077
|
+
scheduleRequest(identiy: Identiy, getPriority?: (identiy: Identiy) => number): Promise<RequestResult>;
|
|
2078
|
+
private issueRequest;
|
|
2079
|
+
/** We check requests asynchronously, to prevent multiple updates */
|
|
2080
|
+
private issueNewRequests;
|
|
2081
|
+
/** Refresh all requests */
|
|
2082
|
+
private issueNewRequestsAsync;
|
|
2083
|
+
/** Ensure all requests have updated priorities, and that no longer valid requests are cancelled */
|
|
2084
|
+
private updateAllRequests;
|
|
2085
|
+
/** Update a single request by calling the callback */
|
|
2086
|
+
private updateRequest;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
/** RequestScheduler Options */
|
|
2090
|
+
declare type RequestSchedulerOptions = {
|
|
2091
|
+
throttleRequests?: boolean;
|
|
2092
|
+
maxRequests?: number;
|
|
2093
|
+
};
|
|
2094
|
+
|
|
1821
2095
|
/** Five 场景*/
|
|
1822
2096
|
export declare class Scene extends THREE_2.Scene {
|
|
1823
2097
|
add(...objects: AddableObject[]): this;
|
|
@@ -1960,6 +2234,288 @@ export declare interface TextureOptions {
|
|
|
1960
2234
|
mappings?: ImageURLMappings;
|
|
1961
2235
|
}
|
|
1962
2236
|
|
|
2237
|
+
/**
|
|
2238
|
+
* A Tile3DHeader represents a tile as Tileset3D. When a tile is first created, its content is not loaded;
|
|
2239
|
+
* the content is loaded on-demand when needed based on the view.
|
|
2240
|
+
* Do not construct this directly, instead access tiles through {@link Tileset3D#tileVisible}.
|
|
2241
|
+
*/
|
|
2242
|
+
declare class Tile3D {
|
|
2243
|
+
cacheNode?: CacheNode<Tile3D>;
|
|
2244
|
+
tileset: Tileset3D;
|
|
2245
|
+
header: TilesetJSONNode;
|
|
2246
|
+
content?: TileContent;
|
|
2247
|
+
parent?: Tile3D;
|
|
2248
|
+
boundingVolume: OrientedBoundingBox;
|
|
2249
|
+
contentState: "UNLOADED" | "LOADING" | "PROCESSING" | "READY" | "FAILED";
|
|
2250
|
+
children: Tile3D[];
|
|
2251
|
+
depth: number;
|
|
2252
|
+
selectionDepth: number;
|
|
2253
|
+
transform: Matrix4;
|
|
2254
|
+
computedTransform: Matrix4;
|
|
2255
|
+
frameNumber: number;
|
|
2256
|
+
touchedFrameNumber: number;
|
|
2257
|
+
requestedFrameNumber: number;
|
|
2258
|
+
selectedFrameNumber: number;
|
|
2259
|
+
distanceToCamera: number;
|
|
2260
|
+
centerZDepth: number;
|
|
2261
|
+
screenSpaceError: number;
|
|
2262
|
+
visibilityPlaneMask: number;
|
|
2263
|
+
visible: boolean;
|
|
2264
|
+
shouldRefine: boolean;
|
|
2265
|
+
/**
|
|
2266
|
+
* @constructs
|
|
2267
|
+
* Create a TileHeader instance
|
|
2268
|
+
* @param tileset - Tileset3D instance
|
|
2269
|
+
* @param header - tile header - JSON loaded from a dataset
|
|
2270
|
+
* @param parentHeader - parent TileHeader instance
|
|
2271
|
+
*/
|
|
2272
|
+
constructor(tileset: Tileset3D, header: TilesetJSONNode, parentHeader?: Tile3D);
|
|
2273
|
+
get id(): string;
|
|
2274
|
+
get refine(): "REPLACE" | "ADD";
|
|
2275
|
+
get type(): "EMPTY" | "SCENEGRAPH" | "MESH";
|
|
2276
|
+
get contentUrl(): string;
|
|
2277
|
+
get lodMetricType(): "geometricError";
|
|
2278
|
+
get lodMetricValue(): number;
|
|
2279
|
+
get hasEmptyContent(): boolean;
|
|
2280
|
+
get selected(): boolean;
|
|
2281
|
+
/** Returns true if tile is not an empty tile and not an external tileset */
|
|
2282
|
+
get hasRenderContent(): boolean;
|
|
2283
|
+
/** Returns true if tile has children */
|
|
2284
|
+
get hasChildren(): boolean;
|
|
2285
|
+
/**
|
|
2286
|
+
* Determines if the tile's content is ready. This is automatically `true` for
|
|
2287
|
+
* tiles with empty content.
|
|
2288
|
+
*/
|
|
2289
|
+
get contentReady(): boolean;
|
|
2290
|
+
/**
|
|
2291
|
+
* Determines if the tile has available content to render. `true` if the tile's
|
|
2292
|
+
* content is ready or if it has expired content this renders while new content loads; otherwise,
|
|
2293
|
+
*/
|
|
2294
|
+
get contentAvailable(): boolean;
|
|
2295
|
+
/** Returns true if tile has renderable content but it's unloaded */
|
|
2296
|
+
get hasUnloadedContent(): boolean;
|
|
2297
|
+
/**
|
|
2298
|
+
* Determines if the tile's content has not be requested. `true` if tile's
|
|
2299
|
+
* content has not be requested; otherwise, `false`.
|
|
2300
|
+
*/
|
|
2301
|
+
get contentUnloaded(): boolean;
|
|
2302
|
+
get contentFailed(): boolean;
|
|
2303
|
+
/** Get the tile's screen space error. */
|
|
2304
|
+
getScreenSpaceError(frameState: FrameState, useParentLodMetric: boolean): number;
|
|
2305
|
+
getPriority(): number;
|
|
2306
|
+
/**
|
|
2307
|
+
* Requests the tile's content.
|
|
2308
|
+
* The request may not be made if the Request Scheduler can't prioritize it.
|
|
2309
|
+
*/
|
|
2310
|
+
loadContent(): Promise<boolean>;
|
|
2311
|
+
unloadContent(): void;
|
|
2312
|
+
/**
|
|
2313
|
+
* Update the tile's visibility
|
|
2314
|
+
*/
|
|
2315
|
+
updateVisibility(frameState: FrameState): void;
|
|
2316
|
+
visibility(frameState: FrameState, parentVisibilityPlaneMask: number): number;
|
|
2317
|
+
/**
|
|
2318
|
+
* Computes the (potentially approximate) distance from the closest point of the tile's bounding volume to the camera.
|
|
2319
|
+
* @param frameState The frame state.
|
|
2320
|
+
* @returns {Number} The distance, in meters, or zero if the camera is inside the bounding volume.
|
|
2321
|
+
*/
|
|
2322
|
+
distanceToTile(frameState: FrameState): number;
|
|
2323
|
+
updateTransform(parentTransform?: Matrix4): void;
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
export declare class Tile3DModel extends PBMContainer {
|
|
2327
|
+
tileset?: Tileset3D;
|
|
2328
|
+
private options;
|
|
2329
|
+
private nodeGroup;
|
|
2330
|
+
private boundingGroup;
|
|
2331
|
+
private nodes;
|
|
2332
|
+
private boundings;
|
|
2333
|
+
private unloadTileQueue;
|
|
2334
|
+
private timer;
|
|
2335
|
+
private clock;
|
|
2336
|
+
private lastCameraTransform;
|
|
2337
|
+
private lastCameraAspect;
|
|
2338
|
+
private lastCameraFov;
|
|
2339
|
+
private sseDenominator;
|
|
2340
|
+
private lastCamera;
|
|
2341
|
+
private lastRenderer;
|
|
2342
|
+
private enabled;
|
|
2343
|
+
constructor(loaderOptions?: Partial<LoaderOptions>);
|
|
2344
|
+
get enable(): boolean;
|
|
2345
|
+
set enable(value: boolean);
|
|
2346
|
+
load(url: WorkModelTiles_2): void;
|
|
2347
|
+
update(renderer: THREE_2.WebGLRenderer, camera: THREE_2.PerspectiveCamera): void;
|
|
2348
|
+
private tilesetUpdate;
|
|
2349
|
+
reset(): void;
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
declare interface TileContent {
|
|
2353
|
+
version: 1;
|
|
2354
|
+
magic: number;
|
|
2355
|
+
byteLength: number;
|
|
2356
|
+
header: {
|
|
2357
|
+
featureTableJsonByteLength: number;
|
|
2358
|
+
featureTableBinaryByteLength: number;
|
|
2359
|
+
batchTableJsonByteLength: number;
|
|
2360
|
+
batchTableBinaryByteLength: number;
|
|
2361
|
+
batchLength: number;
|
|
2362
|
+
};
|
|
2363
|
+
featureTableJson: Record<string, any>;
|
|
2364
|
+
featureTableBinary: Uint8Array;
|
|
2365
|
+
batchTableJson: Record<string, any>;
|
|
2366
|
+
batchTableBinary: Uint8Array;
|
|
2367
|
+
rotateYtoZ: boolean;
|
|
2368
|
+
gltfUpAxis: "X" | "Y" | "Z";
|
|
2369
|
+
gltfArrayBuffer: ArrayBuffer;
|
|
2370
|
+
gltfByteOffset: number;
|
|
2371
|
+
gltfByteLength: number;
|
|
2372
|
+
rtcCenter?: Float32Array;
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
declare class Tileset3D {
|
|
2376
|
+
rawJson: any;
|
|
2377
|
+
options: Tileset3dOptions;
|
|
2378
|
+
root: Tile3D;
|
|
2379
|
+
traverser: Tileset3DTraverser;
|
|
2380
|
+
cache: TilesetCache;
|
|
2381
|
+
requestScheduler: RequestScheduler<string>;
|
|
2382
|
+
selectedTiles: Tile3D[];
|
|
2383
|
+
requestedTiles: Tile3D[];
|
|
2384
|
+
memoryUsageInBytes: number;
|
|
2385
|
+
frameNumber: number;
|
|
2386
|
+
private _tiles;
|
|
2387
|
+
private pendingCount;
|
|
2388
|
+
b3dmMapping: B3DMMapping;
|
|
2389
|
+
/**
|
|
2390
|
+
* Create a new Tileset3D
|
|
2391
|
+
* @param json
|
|
2392
|
+
* @param options
|
|
2393
|
+
*/
|
|
2394
|
+
constructor(json: TilesetJSON, options: Tileset3dOptions);
|
|
2395
|
+
get maxMemoryUsage(): number;
|
|
2396
|
+
get asset(): any;
|
|
2397
|
+
get type(): any;
|
|
2398
|
+
get basePath(): any;
|
|
2399
|
+
get modelMatrix(): Matrix4;
|
|
2400
|
+
get geometricError(): number;
|
|
2401
|
+
get lodMetricType(): number;
|
|
2402
|
+
get lodMetricValue(): number;
|
|
2403
|
+
get refine(): 'ADD' | "REPLACE";
|
|
2404
|
+
get tiles(): Tile3D[];
|
|
2405
|
+
get floorInfo(): FloorInfo[];
|
|
2406
|
+
/** Release resources */
|
|
2407
|
+
reset(): void;
|
|
2408
|
+
/** Is the tileset loaded (update needs to have been called at least once) */
|
|
2409
|
+
isLoaded(): boolean;
|
|
2410
|
+
/**
|
|
2411
|
+
* The callback to post-process tiles after traversal procedure
|
|
2412
|
+
* @param frameState - frame state for tile culling
|
|
2413
|
+
*/
|
|
2414
|
+
private onTraversalEnd;
|
|
2415
|
+
loadTile(tile: Tile3D): void;
|
|
2416
|
+
unloadTile(tile: Tile3D): void;
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
declare interface Tileset3dOptions {
|
|
2420
|
+
throttleRequests: boolean;
|
|
2421
|
+
maxRequests: number;
|
|
2422
|
+
maxMemoryUsage: number;
|
|
2423
|
+
modelMatrix: Matrix4;
|
|
2424
|
+
maxScreenSpaceError: number;
|
|
2425
|
+
viewDistanceScale: number;
|
|
2426
|
+
onTileLoad: (tile: Tile3D) => any;
|
|
2427
|
+
onTileUnload: (tile: Tile3D) => any;
|
|
2428
|
+
onTileError: (tile: Tile3D, message: string) => any;
|
|
2429
|
+
contentLoader: (tile: Tile3D) => Promise<void>;
|
|
2430
|
+
onTraversalComplete: (selectedTiles: Tile3D[]) => Tile3D[];
|
|
2431
|
+
allowHosts?: string[];
|
|
2432
|
+
networkSubscribe?: NetworkSubscribe;
|
|
2433
|
+
maxDepth?: number;
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
declare class Tileset3DTraverser {
|
|
2437
|
+
root: Tile3D | null;
|
|
2438
|
+
options: TilesetTraverserProps;
|
|
2439
|
+
requestedTiles: Record<string, Tile3D>;
|
|
2440
|
+
selectedTiles: Record<string, Tile3D>;
|
|
2441
|
+
emptyTiles: Record<string, Tile3D>;
|
|
2442
|
+
protected _traversalStack: ManagedArray<Tile3D>;
|
|
2443
|
+
protected _emptyTraversalStack: ManagedArray<Tile3D>;
|
|
2444
|
+
protected _frameNumber: number | null;
|
|
2445
|
+
constructor(options: TilesetTraverserProps);
|
|
2446
|
+
traverse(root: Tile3D, frameState: FrameState): void;
|
|
2447
|
+
reset(): void;
|
|
2448
|
+
executeTraversal(root: Tile3D, frameState: FrameState): void;
|
|
2449
|
+
updateChildTiles(tile: Tile3D, frameState: FrameState): boolean;
|
|
2450
|
+
updateAndPushChildren(tile: Tile3D, frameState: FrameState, stack: ManagedArray<Tile3D>, depth: number): boolean;
|
|
2451
|
+
updateTile(tile: Tile3D, frameState: FrameState): void;
|
|
2452
|
+
selectTile(tile: Tile3D, frameState: FrameState): void;
|
|
2453
|
+
loadTile(tile: Tile3D, frameState: FrameState): void;
|
|
2454
|
+
touchTile(tile: Tile3D, frameState: FrameState): void;
|
|
2455
|
+
canTraverse(tile: Tile3D, frameState: FrameState, useParentMetric?: boolean, ignoreVisibility?: boolean): boolean;
|
|
2456
|
+
shouldLoadTile(tile: Tile3D): boolean;
|
|
2457
|
+
shouldSelectTile(tile: Tile3D): boolean;
|
|
2458
|
+
shouldRefine(tile: Tile3D, frameState: FrameState, useParentMetric: boolean): boolean;
|
|
2459
|
+
updateTileVisibility(tile: Tile3D, frameState: FrameState): void;
|
|
2460
|
+
meetsScreenSpaceErrorEarly(tile: Tile3D, frameState: FrameState): boolean;
|
|
2461
|
+
compareDistanceToCamera(a: Tile3D, b: Tile3D): number;
|
|
2462
|
+
anyChildrenVisible(tile: Tile3D, frameState: FrameState): boolean;
|
|
2463
|
+
everyChildrenVisibleIsLoaded(tile: Tile3D): boolean;
|
|
2464
|
+
executeEmptyTraversal(root: Tile3D, frameState: FrameState): boolean;
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
declare class TilesetCache {
|
|
2468
|
+
private list;
|
|
2469
|
+
private sentinel;
|
|
2470
|
+
constructor();
|
|
2471
|
+
reset(): void;
|
|
2472
|
+
touch(tile: Tile3D): void;
|
|
2473
|
+
add(tile: Tile3D, addCallback?: (tile: Tile3D) => void): void;
|
|
2474
|
+
unloadTile(tile: Tile3D, unloadCallback?: (tile: Tile3D) => void): void;
|
|
2475
|
+
unloadTiles(isOverMemory: () => boolean, unloadCallback?: (tile: Tile3D) => void): void;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
declare interface TilesetJSON {
|
|
2479
|
+
asset: {
|
|
2480
|
+
gltfUpAxis: "X" | "Y" | "Z";
|
|
2481
|
+
version: "1.0";
|
|
2482
|
+
};
|
|
2483
|
+
basePath: string;
|
|
2484
|
+
lodMetricType: "geometricError";
|
|
2485
|
+
geometricError: number;
|
|
2486
|
+
lodMetricValue: number;
|
|
2487
|
+
root: TilesetJSONNode;
|
|
2488
|
+
type: "TILES3D";
|
|
2489
|
+
floorInfo: FloorInfo[] | [];
|
|
2490
|
+
b3dmMapping: B3DMMapping;
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
declare interface TilesetJSONNode {
|
|
2494
|
+
boundingVolume: {
|
|
2495
|
+
box: number[];
|
|
2496
|
+
};
|
|
2497
|
+
content: {
|
|
2498
|
+
uri: string;
|
|
2499
|
+
};
|
|
2500
|
+
id: string;
|
|
2501
|
+
transform?: number[];
|
|
2502
|
+
contentUrl?: string;
|
|
2503
|
+
children: TilesetJSONNode[];
|
|
2504
|
+
lodMetricType: "geometricError";
|
|
2505
|
+
geometricError: number;
|
|
2506
|
+
lodMetricValue: number;
|
|
2507
|
+
refine: "REPLACE" | "ADD";
|
|
2508
|
+
type: "EMPTY" | "SCENEGRAPH" | "MESH";
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
declare type TilesetTraverserProps = {
|
|
2512
|
+
loadSiblings: boolean;
|
|
2513
|
+
skipLevelOfDetail: boolean;
|
|
2514
|
+
maxScreenSpaceError: number;
|
|
2515
|
+
maxDepth?: number;
|
|
2516
|
+
onTraversalEnd: (frameState: FrameState) => any;
|
|
2517
|
+
};
|
|
2518
|
+
|
|
1963
2519
|
export declare interface TopviewControllerCustomInitArgs extends Omit<FloorplanControllerCustomInitArgs, "defaultLongitude" | "defaultLatitude" | "maxLatitude" | "minLatitude"> {
|
|
1964
2520
|
}
|
|
1965
2521
|
|
|
@@ -2026,7 +2582,7 @@ export declare interface WorkImage extends WorkCubeImage {
|
|
|
2026
2582
|
}
|
|
2027
2583
|
|
|
2028
2584
|
/** 初始化位姿参数 */
|
|
2029
|
-
export declare interface WorkInitial extends Omit<State, "offset"> {
|
|
2585
|
+
export declare interface WorkInitial extends Omit<State, "offset" | "distance"> {
|
|
2030
2586
|
}
|
|
2031
2587
|
|
|
2032
2588
|
/** 模型数据 */
|
|
@@ -2039,6 +2595,22 @@ export declare interface WorkModel {
|
|
|
2039
2595
|
textureBase: string;
|
|
2040
2596
|
/** 是否开启 bvh 碰撞树,开启会大大加快射线碰撞的执行效率 */
|
|
2041
2597
|
bvh: boolean;
|
|
2598
|
+
tiles?: WorkModelTiles;
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
/** 模型瓦片 */
|
|
2602
|
+
export declare interface WorkModelTiles {
|
|
2603
|
+
tileset_url: string;
|
|
2604
|
+
tileset_url_md5: string;
|
|
2605
|
+
b3md_mappings_url: string;
|
|
2606
|
+
b3md_mappings_url_md5: string;
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2609
|
+
declare interface WorkModelTiles_2 {
|
|
2610
|
+
tileset_url: string;
|
|
2611
|
+
tileset_url_md5: string;
|
|
2612
|
+
b3md_mappings_url: string;
|
|
2613
|
+
b3md_mappings_url_md5: string;
|
|
2042
2614
|
}
|
|
2043
2615
|
|
|
2044
2616
|
/** 每个点位的数据 */
|