@realsee/five 5.0.0-alpha.20 → 5.0.0-alpha.201
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/README.md +18 -8
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +134 -0
- package/docs/assets/icons.css +1043 -0
- package/docs/assets/main.js +52 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1414 -0
- package/docs/classes/five.AnimationFrameLoop.html +15 -0
- package/docs/classes/five.BVH.html +10 -0
- package/docs/classes/five.BVHIntersect.html +1 -0
- package/docs/classes/five.BVHNode.html +7 -0
- package/docs/classes/five.BVHVector3.html +1 -0
- package/docs/classes/five.Camera.html +11 -0
- package/docs/classes/five.Clipper.html +1 -0
- package/docs/classes/five.Five.html +333 -0
- package/docs/classes/five.InternalWebGLRenderer.html +1 -0
- package/docs/classes/five.IntersectMesh.html +1 -0
- package/docs/classes/five.Model.html +91 -0
- package/docs/classes/five.NetworkSubscribe.html +50 -0
- package/docs/classes/five.PBMContainer.html +17 -0
- package/docs/classes/five.PBMGroup.html +19 -0
- package/docs/classes/five.PBMMaterial.html +29 -0
- package/docs/classes/five.PBMMesh.html +7 -0
- package/docs/classes/five.PanoCircleMesh.html +7 -0
- package/docs/classes/five.PanoCircleMeshCustom.html +7 -0
- package/docs/classes/five.PanoCircleMeshSolid.html +7 -0
- package/docs/classes/five.Scene.html +3 -0
- package/docs/classes/five.Subscribe.html +56 -0
- package/docs/classes/five.TextureLoader.html +1 -0
- package/docs/classes/five.Tile3D.html +34 -0
- package/docs/classes/five.Tile3DModel.html +15 -0
- package/docs/classes/five.TileBoundingSphere.html +1 -0
- package/docs/classes/five.TileCacheNode.html +1 -0
- package/docs/classes/five.TileCubeTextureTarget.html +1 -0
- package/docs/classes/five.TileCullingVolume.html +1 -0
- package/docs/classes/five.TileOrientedBoundingBox.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 +32 -0
- package/docs/classes/five.XRButton.html +1 -0
- package/docs/classes/gltf_loader.DDSLoader.html +1 -0
- package/docs/classes/gltf_loader.DRACOLoader.html +1 -0
- package/docs/classes/gltf_loader.GLTFLoader.html +17 -0
- package/docs/classes/gltf_loader.GLTFObject.html +7 -0
- package/docs/classes/gltf_loader.GLTFParser.html +1 -0
- package/docs/classes/gltf_loader.THREEGLTFLoader.html +1 -0
- package/docs/classes/line.Line.html +1 -0
- package/docs/classes/line.LineGeometry.html +1 -0
- package/docs/classes/line.LineMaterial.html +1 -0
- package/docs/classes/line.LineSegmentsGeometry.html +1 -0
- package/docs/classes/line.THREE_Line2.html +1 -0
- package/docs/classes/line.THREE_LineSegments2.html +1 -0
- package/docs/classes/react.Store.html +29 -0
- package/docs/classes/server.BVH.html +10 -0
- package/docs/classes/server.BVHIntersect.html +1 -0
- package/docs/classes/server.BVHNode.html +7 -0
- package/docs/classes/server.BVHVector3.html +1 -0
- package/docs/classes/server.Model.html +70 -0
- package/docs/classes/server.PBMContainer.html +7 -0
- package/docs/classes/server.PBMGroup.html +9 -0
- package/docs/classes/server.PBMMesh.html +7 -0
- package/docs/classes/sticker.Sticker.html +32 -0
- package/docs/classes/vfx.Airflow.html +1 -0
- package/docs/classes/vfx.Flame.html +1 -0
- package/docs/classes/vfx.Particle.html +89 -0
- package/docs/classes/vfx.SpotLight.html +1 -0
- package/docs/index.html +166 -434
- package/docs/interfaces/five.AddableObject.html +9 -0
- package/docs/interfaces/five.AnimationFrame.html +1 -0
- package/docs/interfaces/five.CameraPose.html +1 -0
- package/docs/interfaces/five.ClipperParameter.html +1 -0
- package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +28 -0
- package/docs/interfaces/five.EventCallback.html +400 -0
- package/docs/interfaces/five.FiveInitArgs.html +111 -0
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +17 -0
- package/docs/interfaces/five.ImageOptions.html +18 -0
- package/docs/interfaces/five.ImageURLMappings.html +1 -0
- package/docs/interfaces/five.ImageURLOptions.html +15 -0
- package/docs/interfaces/five.IntersectMeshInterface.html +3 -0
- package/docs/interfaces/five.Intersection.html +7 -0
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +15 -0
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +20 -0
- package/docs/interfaces/five.ModelEventCallback.html +26 -0
- package/docs/interfaces/five.ModelLodOptions.html +1 -0
- package/docs/interfaces/five.MotionKeyframe.html +1 -0
- package/docs/interfaces/five.MovePanoOptions.html +42 -0
- package/docs/interfaces/five.NetworkOptions.html +9 -0
- package/docs/interfaces/five.PBMPanoPicture.html +7 -0
- package/docs/interfaces/five.PBMParameters.html +29 -0
- package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +1 -0
- package/docs/interfaces/five.PanoCircleMeshInterface.html +19 -0
- package/docs/interfaces/five.PanoCircleMeshOptions.html +1 -0
- package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +1 -0
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +35 -0
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +20 -0
- package/docs/interfaces/five.Pose.html +37 -0
- package/docs/interfaces/five.Scissor.html +14 -0
- package/docs/interfaces/five.State.html +21 -0
- package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -0
- package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -0
- package/docs/interfaces/five.SubscribeMixinType.off.html +1 -0
- package/docs/interfaces/five.SubscribeMixinType.on.html +1 -0
- package/docs/interfaces/five.SubscribeMixinType.once.html +1 -0
- package/docs/interfaces/five.TextureOptions.html +20 -0
- 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.TileCubeNode.html +1 -0
- package/docs/interfaces/five.TileCubeTree.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 +9 -0
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +31 -0
- package/docs/interfaces/five.WebXRSelectParams.html +1 -0
- package/docs/interfaces/five.WorkCubeImage.html +13 -0
- package/docs/interfaces/five.WorkImage.html +21 -0
- package/docs/interfaces/five.WorkInitial.html +13 -0
- package/docs/interfaces/five.WorkModel.html +11 -0
- package/docs/interfaces/five.WorkModelTiles.html +3 -0
- package/docs/interfaces/five.WorkObserver.html +27 -0
- package/docs/interfaces/five.WorkTile.html +1 -0
- package/docs/interfaces/five.WorkVideo.html +9 -0
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +31 -0
- package/docs/interfaces/gltf_loader.DDS.html +1 -0
- package/docs/interfaces/gltf_loader.GLTF.html +7 -0
- package/docs/interfaces/gltf_loader.GLTFReference.html +1 -0
- package/docs/interfaces/gltf_loader.THREEGLTF.html +1 -0
- package/docs/interfaces/react.FiveActionReactCallbacks.html +52 -0
- package/docs/interfaces/react.FiveInjectionTypes.html +181 -0
- package/docs/interfaces/react.PropTypeOfFiveFeatures.html +1 -0
- package/docs/interfaces/server.Intersection.html +7 -0
- package/docs/interfaces/server.ModelEventCallback.html +18 -0
- package/docs/interfaces/sticker.IntersectionLike.html +8 -0
- package/docs/interfaces/vfx.ParticleArgs.html +75 -0
- package/docs/interfaces/vfx.ParticleTweenKeyframe.html +1 -0
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +60 -0
- package/docs/modules/five.SubscribeMixinType.html +1 -0
- package/docs/modules/five.html +465 -3002
- package/docs/modules/gltf_loader.html +1 -155
- package/docs/modules/line.html +1 -202
- package/docs/modules/react.html +130 -1507
- package/docs/modules/server.html +18 -526
- package/docs/modules/sticker.html +1 -151
- package/docs/modules/vfx.html +1 -0
- package/docs/modules/vue.html +115 -0
- package/docs/modules.html +1 -136
- package/exporters/staticify.js +210 -0
- package/five/index.d.ts +1465 -286
- package/five/index.js +362 -1
- package/gltf-loader/index.d.ts +90 -5
- package/gltf-loader/index.js +260 -1
- package/line/index.d.ts +15 -2
- package/line/index.js +260 -1
- package/package.json +12 -11
- package/react/index.d.ts +73 -72
- package/react/index.js +260 -1
- package/scripts/five-staticify.js +26 -0
- package/server/index.d.ts +222 -27
- package/server/index.js +357 -1
- package/sticker/index.d.ts +2 -1
- package/sticker/index.js +260 -1
- package/templates/quick-start/package.json +1 -1
- package/umd/five-gltf-loader.js +1 -2
- package/umd/five-line.js +1 -2
- package/umd/five-react.js +1 -2
- package/umd/five-sticker.js +1 -2
- package/umd/five-vfx.js +1 -0
- package/umd/five-vue.js +1 -0
- package/umd/five.js +1 -1
- package/umd/five.js.LICENSE.txt +58 -118
- package/vfx/index.d.ts +264 -0
- package/vfx/index.js +260 -0
- package/vue/index.d.ts +441 -0
- package/vue/index.js +260 -0
- package/docs/assets/css/main.css +0 -2660
- package/docs/assets/js/main.js +0 -248
- package/docs/assets/js/search.js +0 -1
- package/docs/classes/five.camera.html +0 -323
- package/docs/classes/five.five-1.html +0 -2670
- package/docs/classes/five.hashcubetexture.html +0 -252
- package/docs/classes/five.internalwebglrenderer.html +0 -212
- package/docs/classes/five.model.html +0 -982
- package/docs/classes/five.pbmgroup.html +0 -427
- package/docs/classes/five.pbmmaterial.html +0 -533
- package/docs/classes/five.pbmmesh.html +0 -254
- package/docs/classes/five.scene.html +0 -263
- package/docs/classes/five.subscribe.html +0 -569
- package/docs/classes/gltf_loader.gltfloader.html +0 -412
- package/docs/classes/gltf_loader.gltfobject.html +0 -287
- package/docs/classes/line.line-1.html +0 -381
- package/docs/classes/line.linegeometry.html +0 -524
- package/docs/classes/line.linematerial.html +0 -300
- package/docs/classes/line.linesegmentsgeometry.html +0 -471
- package/docs/classes/react.store.html +0 -605
- package/docs/classes/server.model.html +0 -823
- package/docs/classes/server.pbmgroup.html +0 -366
- package/docs/classes/server.pbmmesh.html +0 -335
- package/docs/classes/sticker.sticker-1.html +0 -465
- package/docs/interfaces/five.addableobject.html +0 -234
- package/docs/interfaces/five.depthpanoramacontrollercustominitargs.html +0 -420
- package/docs/interfaces/five.eventcallback.html +0 -2548
- package/docs/interfaces/five.fiveinitargs.html +0 -707
- package/docs/interfaces/five.floorplancontrollercustominitargs.html +0 -295
- package/docs/interfaces/five.imageoptions.html +0 -332
- package/docs/interfaces/five.intersection.html +0 -227
- package/docs/interfaces/five.intersectmeshinterface.html +0 -188
- package/docs/interfaces/five.modelcontrollercustominitargs.html +0 -366
- package/docs/interfaces/five.modeleventcallback.html +0 -367
- package/docs/interfaces/five.movepanooptions.html +0 -469
- package/docs/interfaces/five.panocirclemeshinterface.html +0 -361
- package/docs/interfaces/five.panoramacontrollercustominitargs.html +0 -464
- package/docs/interfaces/five.panoramalikecontrollercustominitargs.html +0 -364
- package/docs/interfaces/five.pbmparameters.html +0 -474
- package/docs/interfaces/five.pose.html +0 -270
- package/docs/interfaces/five.scissor.html +0 -252
- package/docs/interfaces/five.state.html +0 -300
- package/docs/interfaces/five.subscribemixintype.emit.html +0 -180
- package/docs/interfaces/five.subscribemixintype.haslistener.html +0 -171
- package/docs/interfaces/five.subscribemixintype.off.html +0 -198
- package/docs/interfaces/five.subscribemixintype.on.html +0 -213
- package/docs/interfaces/five.subscribemixintype.once.html +0 -210
- package/docs/interfaces/five.topviewcontrollercustominitargs.html +0 -226
- package/docs/interfaces/five.vrpanoramacontrollercustominitargs.html +0 -452
- package/docs/interfaces/gltf_loader.gltf.html +0 -304
- package/docs/interfaces/react.fiveactionreactcallbacks.html +0 -580
- package/docs/interfaces/react.fiveinjectiontypes.html +0 -1625
- package/docs/interfaces/react.injectfivetoprops.html +0 -280
- package/docs/interfaces/server.intersection.html +0 -308
- package/docs/interfaces/server.modeleventcallback.html +0 -409
- package/docs/interfaces/sticker.intersectionlike.html +0 -223
- package/docs/modules/five.subscribemixintype.html +0 -143
- package/scripts/export-five-resource/chfs.exe +0 -0
- package/scripts/export-five-resource/fileify.js +0 -192
- package/scripts/export-five-resource/format-work.js +0 -71
- package/scripts/export-five-resource/staticify.js +0 -327
- package/scripts/transcode-model/BufferGeometryUtils.js +0 -832
- package/scripts/transcode-model/LoaderSupport.js +0 -1545
- package/scripts/transcode-model/MTLLoader.js +0 -602
- package/scripts/transcode-model/OBJLoader2.js +0 -1470
- package/scripts/transcode-model/obj2pbm.js +0 -65
- /package/docs/assets/{images/icons.png → icons.png} +0 -0
- /package/docs/assets/{images/icons@2x.png → icons@2x.png} +0 -0
- /package/docs/assets/{images/widgets.png → widgets.png} +0 -0
- /package/docs/assets/{images/widgets@2x.png → widgets@2x.png} +0 -0
- /package/resource/{basis_transcoder.js → basis/basis_transcoder.js} +0 -0
- /package/resource/{basis_transcoder.wasm → basis/basis_transcoder.wasm} +0 -0
- /package/resource/{draco_decoder.js → gltf/draco_decoder.js} +0 -0
- /package/resource/{draco_decoder.wasm → gltf/draco_decoder.wasm} +0 -0
- /package/resource/{draco_wasm_wrapper.js → gltf/draco_wasm_wrapper.js} +0 -0
package/five/index.d.ts
CHANGED
|
@@ -1,24 +1,169 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Matrix3 } from 'three';
|
|
2
|
+
import { Matrix4 } from 'three';
|
|
3
|
+
import { Plane } from 'three';
|
|
3
4
|
import * as THREE_2 from 'three';
|
|
5
|
+
import { Vector3 } from 'three';
|
|
4
6
|
|
|
5
7
|
export declare interface AddableObject extends THREE_2.Object3D {
|
|
8
|
+
/** 是否需要渲染一次 */
|
|
6
9
|
needsRender?: boolean;
|
|
10
|
+
/** 动画 */
|
|
7
11
|
mixer?: THREE_2.AnimationMixer;
|
|
12
|
+
/** 设置当前分辨率 */
|
|
8
13
|
setResolution?(width: number, height: number): void;
|
|
14
|
+
/** 设置当前时间 */
|
|
15
|
+
setTime?(time: number): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare interface AnimationFrame {
|
|
19
|
+
callback: (time: number, deltaTime: number, ...args: any[]) => void;
|
|
20
|
+
once: boolean;
|
|
21
|
+
delay: number;
|
|
22
|
+
order: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export declare class AnimationFrameLoop {
|
|
26
|
+
private frames;
|
|
27
|
+
private time;
|
|
28
|
+
private stoped;
|
|
29
|
+
private context?;
|
|
30
|
+
private requestId;
|
|
31
|
+
private static sharedInstance?;
|
|
32
|
+
static get shared(): AnimationFrameLoop;
|
|
33
|
+
static getFrameTime(): number;
|
|
34
|
+
constructor();
|
|
35
|
+
private loop;
|
|
36
|
+
setContext(context: any): void;
|
|
37
|
+
getContext(): any;
|
|
38
|
+
private requestAnimationFrame;
|
|
39
|
+
private cancelAnimationFrame;
|
|
40
|
+
private remove;
|
|
41
|
+
/**
|
|
42
|
+
* 添加到动画循环
|
|
43
|
+
* @param callback - 动画循环回调
|
|
44
|
+
* @param once - 是否只回调一次
|
|
45
|
+
* @param delay - 延迟多少个动画循环回调
|
|
46
|
+
* @param order - 优先级,数字越小越早被调用
|
|
47
|
+
* @returns 移除动画循环函数
|
|
48
|
+
*/
|
|
49
|
+
add(callback: AnimationFrame["callback"], once?: boolean, delay?: number, order?: number): () => void;
|
|
50
|
+
disponse(): void;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export declare class BVH {
|
|
54
|
+
trianglesArray?: Float32Array;
|
|
55
|
+
offsetArray?: Uint32Array;
|
|
56
|
+
rootNode?: BVHNode;
|
|
57
|
+
create(trianglesArray: Float32Array): this;
|
|
58
|
+
splitNode(maxTrianglesPerNode: number): this;
|
|
59
|
+
/**
|
|
60
|
+
* 计算射线与三角形的碰撞
|
|
61
|
+
* @param rayOrigin - 射线的原点坐标
|
|
62
|
+
* @param rayDirection - 设想的方向向量
|
|
63
|
+
* @param backfaceCulling - 是否背面剔除
|
|
64
|
+
* @return 碰撞焦点数组
|
|
65
|
+
*/
|
|
66
|
+
intersectRay(rayOrigin: BVHVector3, rayDirection: BVHVector3, backfaceCulling: boolean): BVHIntersect[];
|
|
67
|
+
dispose(): void;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export declare class BVHIntersect {
|
|
71
|
+
triangle: [BVHVector3, BVHVector3, BVHVector3];
|
|
72
|
+
intersectionPoint: BVHVector3;
|
|
73
|
+
constructor(triangle: [BVHVector3, BVHVector3, BVHVector3], intersectionPoint: BVHVector3);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* A node in the BVH structure
|
|
78
|
+
* @param extents - the min coords of this node's bounding box
|
|
79
|
+
* @param startIndex - an index in the bbox array, where the first element of this node is located
|
|
80
|
+
* @param endIndex - an index in the bbox array, where the last of this node is located, plus 1 (meaning that its non-inclusive).
|
|
81
|
+
* @param level - distance of this node from the root for the bvh tree. root node has level=0, its children have level=1 etc.
|
|
82
|
+
*/
|
|
83
|
+
export declare class BVHNode {
|
|
84
|
+
extents: ArrayLike<number>;
|
|
85
|
+
startIndex: number;
|
|
86
|
+
endIndex: number;
|
|
87
|
+
node0?: BVHNode;
|
|
88
|
+
node1?: BVHNode;
|
|
89
|
+
constructor(extents: ArrayLike<number>, startIndex: number, endIndex: number);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export declare class BVHVector3 {
|
|
93
|
+
x: number;
|
|
94
|
+
y: number;
|
|
95
|
+
z: number;
|
|
96
|
+
constructor(x: number, y: number, z: number);
|
|
97
|
+
copy(v: BVHVector3): this;
|
|
98
|
+
set(x: number, y: number, z: number): this;
|
|
99
|
+
fromArray(array: number[], firstElementPos?: number): this;
|
|
100
|
+
add(v: BVHVector3): this;
|
|
101
|
+
multiplyScalar(scalar: number): this;
|
|
102
|
+
subVectors(a: BVHVector3, b: BVHVector3): this;
|
|
103
|
+
dot(v: BVHVector3): number;
|
|
104
|
+
cross(v: BVHVector3): this;
|
|
105
|
+
crossVectors(a: BVHVector3, b: BVHVector3): this;
|
|
106
|
+
clone(): BVHVector3;
|
|
9
107
|
}
|
|
10
108
|
|
|
11
109
|
/** Five 相机 */
|
|
12
|
-
export declare class Camera extends THREE_2.
|
|
110
|
+
export declare class Camera extends THREE_2.Camera {
|
|
111
|
+
fov: number;
|
|
112
|
+
aspect: number;
|
|
113
|
+
near: number;
|
|
114
|
+
far: number;
|
|
115
|
+
perspToOrtho: THREE_2.Vector2;
|
|
116
|
+
orthoDistance: number;
|
|
13
117
|
/** 相机姿态 */
|
|
14
|
-
pose:
|
|
15
|
-
|
|
118
|
+
pose: CameraPose;
|
|
119
|
+
private perspectiveCamera;
|
|
120
|
+
private orthographicCamera;
|
|
121
|
+
needsRender: boolean;
|
|
122
|
+
private lastValues;
|
|
123
|
+
constructor(fov: number, aspect?: number, near?: number, far?: number, perspToOrtho?: THREE_2.Vector2, orthoDistance?: number);
|
|
124
|
+
getDirection(target: THREE_2.Vector3): THREE_2.Vector3;
|
|
16
125
|
/** 通过相机参数反算姿态 */
|
|
17
|
-
computePose():
|
|
126
|
+
computePose(distance?: number): this;
|
|
18
127
|
/** 设置相机姿态 */
|
|
19
|
-
setFromPose(pose: Partial<
|
|
128
|
+
setFromPose(pose: Partial<CameraPose>): this;
|
|
20
129
|
/** 拷贝相机姿态 */
|
|
21
|
-
copyPose():
|
|
130
|
+
copyPose(): CameraPose;
|
|
131
|
+
private computeProjectionMatrix;
|
|
132
|
+
setViewOffset(fullWidth: number, fullHeight: number, x: number, y: number, width: number, height: number): void;
|
|
133
|
+
clearViewOffset(): void;
|
|
134
|
+
updateProjectionMatrix(): void;
|
|
135
|
+
get perspectiveProjectionMatrix(): THREE_2.Matrix4;
|
|
136
|
+
get perspectiveProjectionMatrixInverse(): THREE_2.Matrix4;
|
|
137
|
+
get orthographicProjectionMatrix(): THREE_2.Matrix4;
|
|
138
|
+
get orthographicProjectionMatrixInverse(): THREE_2.Matrix4;
|
|
139
|
+
updateTime(_time: number, _deltaTime: number): void;
|
|
140
|
+
get isPerspectiveCamera(): boolean;
|
|
141
|
+
get isOrthographicCamera(): boolean;
|
|
142
|
+
copy(source: this, recursive?: boolean): this;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export declare interface CameraPose {
|
|
146
|
+
longitude: number;
|
|
147
|
+
latitude: number;
|
|
148
|
+
fov: number;
|
|
149
|
+
distance: number;
|
|
150
|
+
offset: THREE_2.Vector3;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export declare class Clipper {
|
|
154
|
+
numPlanes: number;
|
|
155
|
+
clipperPlanes: Float32Array | null;
|
|
156
|
+
clipperFloors: number[] | null;
|
|
157
|
+
private static sharedInstance?;
|
|
158
|
+
static get shared(): Clipper;
|
|
159
|
+
constructor();
|
|
160
|
+
update(clipperParameter: ClipperParameter | ClipperParameter[], camera: THREE_2.Camera): void;
|
|
161
|
+
private projectPlanes;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export declare interface ClipperParameter {
|
|
165
|
+
clippingBoxMatrix: THREE_2.Matrix4;
|
|
166
|
+
floorIndex?: number;
|
|
22
167
|
}
|
|
23
168
|
|
|
24
169
|
export declare type ControllerCustomInitTypes = {
|
|
@@ -28,6 +173,8 @@ export declare type ControllerCustomInitTypes = {
|
|
|
28
173
|
VRPanorama: VRPanoramaControllerCustomInitArgs;
|
|
29
174
|
Model: ModelControllerCustomInitArgs;
|
|
30
175
|
DepthPanorama: DepthPanoramaControllerCustomInitArgs;
|
|
176
|
+
Mapview: MapviewControllerCustomInitArgs;
|
|
177
|
+
XRPanorama: XRPanoramaControllerCustomInitArgs;
|
|
31
178
|
};
|
|
32
179
|
|
|
33
180
|
export declare type ControllerEventTypes = {
|
|
@@ -81,7 +228,7 @@ export declare type ControllerEventTypes = {
|
|
|
81
228
|
* 观察点位被选择
|
|
82
229
|
* @param panoIndex - 选择的点位
|
|
83
230
|
*/
|
|
84
|
-
panoSelected(panoIndex: number): void;
|
|
231
|
+
panoSelected(panoIndex: number | null): void;
|
|
85
232
|
/**
|
|
86
233
|
* 意图要移动到某个点位 可以通过 `return false` 阻止
|
|
87
234
|
* @param panoIndex - 图要移动到的点位下标
|
|
@@ -161,6 +308,7 @@ export declare type ControllerEventTypes = {
|
|
|
161
308
|
wantsGesture(type: GestureTypes, pointers: {
|
|
162
309
|
x: number;
|
|
163
310
|
y: number;
|
|
311
|
+
delta?: number;
|
|
164
312
|
}[], final: boolean): void | false;
|
|
165
313
|
/**
|
|
166
314
|
* 手势 触发
|
|
@@ -171,6 +319,7 @@ export declare type ControllerEventTypes = {
|
|
|
171
319
|
gesture(type: GestureTypes, pointers: {
|
|
172
320
|
x: number;
|
|
173
321
|
y: number;
|
|
322
|
+
delta?: number;
|
|
174
323
|
}[], final: boolean): void;
|
|
175
324
|
/**
|
|
176
325
|
* 意图要触发 pan 手势(滑动屏幕), 可以通过 `return false` 阻止
|
|
@@ -202,15 +351,17 @@ export declare type ControllerEventTypes = {
|
|
|
202
351
|
* 意图要触发 tap 手势(点击屏幕), 可以通过 `return false` 阻止
|
|
203
352
|
* @param raycaster - 点击对应的三维射线
|
|
204
353
|
* @param tapPosition - 点击对应的屏幕位置
|
|
354
|
+
* @param final - 是否手势结束
|
|
205
355
|
* @returns 可以通过 `return false` 阻止
|
|
206
356
|
*/
|
|
207
|
-
wantsTapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2): void | false;
|
|
357
|
+
wantsTapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, final: boolean): void | false;
|
|
208
358
|
/**
|
|
209
359
|
* tap 手势(点击屏幕) 被触发
|
|
210
360
|
* @param raycaster - 点击对应的三维射线
|
|
211
361
|
* @param tapPosition - 点击对应的屏幕位置
|
|
362
|
+
* @param final - 是否手势结束
|
|
212
363
|
*/
|
|
213
|
-
tapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2): void;
|
|
364
|
+
tapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, final: boolean): void;
|
|
214
365
|
/**
|
|
215
366
|
* 意图要触发 pinch 手势(双指缩放),可以通过 `return false` 阻止
|
|
216
367
|
* @param scale - 缩放数值
|
|
@@ -219,6 +370,23 @@ export declare type ControllerEventTypes = {
|
|
|
219
370
|
* @returns 可以通过 `return false` 阻止
|
|
220
371
|
*/
|
|
221
372
|
wantsPinchGesture(scale: number, nextFov: number, final: boolean): void | false;
|
|
373
|
+
/**
|
|
374
|
+
* 意图要触发 press 手势(长按屏幕), 可以通过 `return false` 阻止
|
|
375
|
+
* @param raycaster - 长按对应的三维射线
|
|
376
|
+
* @param tapPosition - 长按对应的屏幕位置
|
|
377
|
+
* @param duration - 长按持续时间
|
|
378
|
+
* @param final - 是否手势结束
|
|
379
|
+
* @returns 可以通过 `return false` 阻止
|
|
380
|
+
*/
|
|
381
|
+
wantsPressGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, duration: number, isFinal: boolean): void | false;
|
|
382
|
+
/**
|
|
383
|
+
* tap 手势(点击屏幕) 被触发
|
|
384
|
+
* @param raycaster - 点击对应的三维射线
|
|
385
|
+
* @param tapPosition - 点击对应的屏幕位置
|
|
386
|
+
* @param duration - 长按持续时间
|
|
387
|
+
* @param final - 是否手势结束
|
|
388
|
+
*/
|
|
389
|
+
pressGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, duration: number, isFinal: boolean): void;
|
|
222
390
|
/**
|
|
223
391
|
* pinch 手势(双指缩放) 被触发
|
|
224
392
|
* @param scale - 缩放数值
|
|
@@ -288,80 +456,49 @@ export declare type ControllerEventTypes = {
|
|
|
288
456
|
* @param panoIndex - 加载点位下标
|
|
289
457
|
* @param observer - 对应的 observer 详情
|
|
290
458
|
*/
|
|
291
|
-
textureLoaded(panoIndex: number, observer: WorkObserver): void;
|
|
459
|
+
textureLoaded(panoIndex: number, observer: WorkObserver, meta: (NetWorkMeta | null)[]): void;
|
|
292
460
|
/**
|
|
293
461
|
* 抛出错误
|
|
294
462
|
* @param error - 抛出错误
|
|
295
463
|
*/
|
|
296
464
|
error(error: Error): void;
|
|
465
|
+
/**
|
|
466
|
+
* webXR模式开始,webxr session完成坐标系矫正
|
|
467
|
+
*/
|
|
468
|
+
webXRSessionStart(): void;
|
|
469
|
+
/**
|
|
470
|
+
* webXR模式结束,webxr session销毁
|
|
471
|
+
*/
|
|
472
|
+
webXRSessionEnd(): void;
|
|
473
|
+
/**
|
|
474
|
+
* webXR模式结束,webxr session销毁
|
|
475
|
+
* axes代表控制杆,axes数组的0-1元素分别代表左控制器的左(-1)右(1),左控制器的上(-1)下(1),axes数组的2-3元素同理
|
|
476
|
+
*/
|
|
477
|
+
webXRSelected(type: WebXRSelectType, params?: Partial<WebXRSelectParams>): void;
|
|
297
478
|
};
|
|
298
479
|
|
|
480
|
+
/**
|
|
481
|
+
* URL 地址的转换
|
|
482
|
+
* @param source - url 原地址
|
|
483
|
+
* @param options - url 转换参数
|
|
484
|
+
* @returns url 转换结果
|
|
485
|
+
*/
|
|
486
|
+
export declare function defaultImageURLTransform(source: string, options: ImageURLOptions): string;
|
|
487
|
+
|
|
299
488
|
export declare interface DepthPanoramaControllerCustomInitArgs extends PanoramaLikeControllerCustomInitArgs {
|
|
300
489
|
/** 最远可移动观察点距离 */
|
|
301
490
|
maxAccessibleDistance?: number;
|
|
491
|
+
/**
|
|
492
|
+
* 点击地面观察点标识的判定范围
|
|
493
|
+
* @description
|
|
494
|
+
* 如果在判定范围内则确定去到目标点,
|
|
495
|
+
* 否则寻找点击位置方向最适合的点(可能会走到一个离相机更近的点)。
|
|
496
|
+
*/
|
|
497
|
+
panoTapTriggerRadius?: number;
|
|
302
498
|
/** 地面观察点标识自定义创建器 */
|
|
303
|
-
panoCircleMeshCreator?: () => PanoCircleMeshInterface;
|
|
499
|
+
panoCircleMeshCreator?: (panoIndex: number) => PanoCircleMeshInterface;
|
|
304
500
|
}
|
|
305
501
|
|
|
306
|
-
/**
|
|
307
|
-
* 动画变化曲线
|
|
308
|
-
*/
|
|
309
|
-
export declare const Easing: {
|
|
310
|
-
Linear: {
|
|
311
|
-
None: (amount: number) => number;
|
|
312
|
-
};
|
|
313
|
-
Quadratic: {
|
|
314
|
-
In: (amount: number) => number;
|
|
315
|
-
Out: (amount: number) => number;
|
|
316
|
-
InOut: (amount: number) => number;
|
|
317
|
-
};
|
|
318
|
-
Cubic: {
|
|
319
|
-
In: (amount: number) => number;
|
|
320
|
-
Out: (amount: number) => number;
|
|
321
|
-
InOut: (amount: number) => number;
|
|
322
|
-
};
|
|
323
|
-
Quartic: {
|
|
324
|
-
In: (amount: number) => number;
|
|
325
|
-
Out: (amount: number) => number;
|
|
326
|
-
InOut: (amount: number) => number;
|
|
327
|
-
};
|
|
328
|
-
Quintic: {
|
|
329
|
-
In: (amount: number) => number;
|
|
330
|
-
Out: (amount: number) => number;
|
|
331
|
-
InOut: (amount: number) => number;
|
|
332
|
-
};
|
|
333
|
-
Sinusoidal: {
|
|
334
|
-
In: (amount: number) => number;
|
|
335
|
-
Out: (amount: number) => number;
|
|
336
|
-
InOut: (amount: number) => number;
|
|
337
|
-
};
|
|
338
|
-
Exponential: {
|
|
339
|
-
In: (amount: number) => number;
|
|
340
|
-
Out: (amount: number) => number;
|
|
341
|
-
InOut: (amount: number) => number;
|
|
342
|
-
};
|
|
343
|
-
Circular: {
|
|
344
|
-
In: (amount: number) => number;
|
|
345
|
-
Out: (amount: number) => number;
|
|
346
|
-
InOut: (amount: number) => number;
|
|
347
|
-
};
|
|
348
|
-
Elastic: {
|
|
349
|
-
In: (amount: number) => number;
|
|
350
|
-
Out: (amount: number) => number;
|
|
351
|
-
InOut: (amount: number) => number;
|
|
352
|
-
};
|
|
353
|
-
Back: {
|
|
354
|
-
In: (amount: number) => number;
|
|
355
|
-
Out: (amount: number) => number;
|
|
356
|
-
InOut: (amount: number) => number;
|
|
357
|
-
};
|
|
358
|
-
Bounce: {
|
|
359
|
-
In: (amount: number) => number;
|
|
360
|
-
Out: (amount: number) => number;
|
|
361
|
-
InOut: (amount: number) => number;
|
|
362
|
-
};
|
|
363
|
-
};
|
|
364
|
-
|
|
365
502
|
/**
|
|
366
503
|
* Five 事件列表
|
|
367
504
|
* @description
|
|
@@ -382,19 +519,25 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
382
519
|
*/
|
|
383
520
|
error(error: Error): void;
|
|
384
521
|
/**
|
|
385
|
-
*
|
|
522
|
+
* 准备加载 Work 数据
|
|
386
523
|
* @param input - 输入的 work
|
|
387
524
|
* @param work - 归一化的标准 work
|
|
388
525
|
* @param state - 加载时的姿态
|
|
389
526
|
*/
|
|
390
|
-
willLoad(input: any, work: Work, state: Omit<State, "offset">): void;
|
|
527
|
+
willLoad(input: any, work: Work, state: Omit<State, "offset" | "distance">): void;
|
|
391
528
|
/**
|
|
392
529
|
* 开始加载 Work 数据
|
|
393
530
|
* @param input - 输入的 work
|
|
394
531
|
* @param work - 归一化的标准 work
|
|
395
532
|
* @param state - 加载时的姿态
|
|
396
533
|
*/
|
|
397
|
-
load(input: any, work: Work, state: Omit<State, "offset">): void;
|
|
534
|
+
load(input: any, work: Work, state: Omit<State, "offset" | "distance">): void;
|
|
535
|
+
/**
|
|
536
|
+
* 加载完 Work 数据
|
|
537
|
+
* @param input - 输入的 work
|
|
538
|
+
* @param work - 归一化的标准 work
|
|
539
|
+
*/
|
|
540
|
+
loaded(input: any, work: Work): void;
|
|
398
541
|
/**
|
|
399
542
|
* 模型开始加载
|
|
400
543
|
* @param workModel - 归一化的标准 work 中的 model 值
|
|
@@ -496,13 +639,21 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
496
639
|
* @param prevMode - 上本质是一个模态
|
|
497
640
|
* @param panoIndex - 初始化动画结束后的点位下标
|
|
498
641
|
* @param toPose - 初始化动画结束后的状态
|
|
642
|
+
* @param userAction - 是否用户触发
|
|
499
643
|
*/
|
|
500
|
-
modeChange(mode: Mode, prevMode: Mode, panoIndex: number, toPose: Pose): void;
|
|
644
|
+
modeChange(mode: Mode, prevMode: Mode, panoIndex: number, toPose: Pose, userAction: boolean): void;
|
|
501
645
|
/**
|
|
502
646
|
* 帮助元素显应的变换
|
|
503
647
|
* @param visible - 帮助元素的是否开启
|
|
504
648
|
*/
|
|
505
649
|
helpersVisibleChange(visible: boolean): void;
|
|
650
|
+
/**
|
|
651
|
+
* 网络资源分析
|
|
652
|
+
* @param source - 资源地址
|
|
653
|
+
* @param state - 状态
|
|
654
|
+
* @param detail - 详情
|
|
655
|
+
*/
|
|
656
|
+
network(source: string, type: NetworkType, state: NetworkState, detail: string): void;
|
|
506
657
|
/** five 被析构。 插件中请监听用于自身析构 */
|
|
507
658
|
dispose(): void;
|
|
508
659
|
};
|
|
@@ -521,6 +672,7 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
521
672
|
* ```
|
|
522
673
|
*/
|
|
523
674
|
export declare class Five extends Subscribe<EventTypes> {
|
|
675
|
+
static get version(): string;
|
|
524
676
|
/**
|
|
525
677
|
* Five 的显示模式,可以通过 `five.changeMode` `five.setState` 来切换
|
|
526
678
|
* @description
|
|
@@ -531,6 +683,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
531
683
|
* Topview 户型图模式
|
|
532
684
|
* DepthPanorama 深度图游走模式
|
|
533
685
|
* VRPanorama VR眼镜模式
|
|
686
|
+
* XRPanorama VR硬件模式
|
|
534
687
|
* ```
|
|
535
688
|
*/
|
|
536
689
|
static Mode: Mirror<Mode>;
|
|
@@ -539,62 +692,6 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
539
692
|
* 请使用 `import { Line } from "@realsee/five/line"` 代替;
|
|
540
693
|
*/
|
|
541
694
|
static Line: any;
|
|
542
|
-
/** Five 的动画函数*/
|
|
543
|
-
static Easing: {
|
|
544
|
-
Linear: {
|
|
545
|
-
None: (amount: number) => number;
|
|
546
|
-
};
|
|
547
|
-
Quadratic: {
|
|
548
|
-
In: (amount: number) => number;
|
|
549
|
-
Out: (amount: number) => number;
|
|
550
|
-
InOut: (amount: number) => number;
|
|
551
|
-
};
|
|
552
|
-
Cubic: {
|
|
553
|
-
In: (amount: number) => number;
|
|
554
|
-
Out: (amount: number) => number;
|
|
555
|
-
InOut: (amount: number) => number;
|
|
556
|
-
};
|
|
557
|
-
Quartic: {
|
|
558
|
-
In: (amount: number) => number;
|
|
559
|
-
Out: (amount: number) => number;
|
|
560
|
-
InOut: (amount: number) => number;
|
|
561
|
-
};
|
|
562
|
-
Quintic: {
|
|
563
|
-
In: (amount: number) => number;
|
|
564
|
-
Out: (amount: number) => number;
|
|
565
|
-
InOut: (amount: number) => number;
|
|
566
|
-
};
|
|
567
|
-
Sinusoidal: {
|
|
568
|
-
In: (amount: number) => number;
|
|
569
|
-
Out: (amount: number) => number;
|
|
570
|
-
InOut: (amount: number) => number;
|
|
571
|
-
};
|
|
572
|
-
Exponential: {
|
|
573
|
-
In: (amount: number) => number;
|
|
574
|
-
Out: (amount: number) => number;
|
|
575
|
-
InOut: (amount: number) => number;
|
|
576
|
-
};
|
|
577
|
-
Circular: {
|
|
578
|
-
In: (amount: number) => number;
|
|
579
|
-
Out: (amount: number) => number;
|
|
580
|
-
InOut: (amount: number) => number;
|
|
581
|
-
};
|
|
582
|
-
Elastic: {
|
|
583
|
-
In: (amount: number) => number;
|
|
584
|
-
Out: (amount: number) => number;
|
|
585
|
-
InOut: (amount: number) => number;
|
|
586
|
-
};
|
|
587
|
-
Back: {
|
|
588
|
-
In: (amount: number) => number;
|
|
589
|
-
Out: (amount: number) => number;
|
|
590
|
-
InOut: (amount: number) => number;
|
|
591
|
-
};
|
|
592
|
-
Bounce: {
|
|
593
|
-
In: (amount: number) => number;
|
|
594
|
-
Out: (amount: number) => number;
|
|
595
|
-
InOut: (amount: number) => number;
|
|
596
|
-
};
|
|
597
|
-
};
|
|
598
695
|
/**
|
|
599
696
|
* 自动播放状态是否暂停
|
|
600
697
|
* @description
|
|
@@ -607,6 +704,10 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
607
704
|
currentMode?: Mode;
|
|
608
705
|
/** 内部使用的 `THREE.Scene` */
|
|
609
706
|
scene: Scene;
|
|
707
|
+
/** 内部使用的产生视差的物体Scene `THREE.Scene` */
|
|
708
|
+
parallaxScene: Scene;
|
|
709
|
+
/** 用于承载nerf物体的scene `THREE.Scene` */
|
|
710
|
+
nerfScene: Scene;
|
|
610
711
|
/** 内部使用的 `Camera` */
|
|
611
712
|
camera: Camera;
|
|
612
713
|
/**
|
|
@@ -627,11 +728,9 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
627
728
|
* 如果初始化时传入了 `renderer` 则直接时该值
|
|
628
729
|
* 否则会通过 `preserveDrawingBuffer` `backgroundColor` `backgroundAlpha` `antialias` 创建一个 `THREE.WebGLRenderer`
|
|
629
730
|
*/
|
|
630
|
-
renderer
|
|
731
|
+
renderer?: THREE_2.WebGLRenderer;
|
|
631
732
|
/** 当前加载的模型 */
|
|
632
733
|
model: Model;
|
|
633
|
-
/** 当前加载的 work 数据 */
|
|
634
|
-
work?: Work;
|
|
635
734
|
/**
|
|
636
735
|
* 是否需要渲染
|
|
637
736
|
* @description
|
|
@@ -652,7 +751,13 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
652
751
|
* 可以动态对配置在 `work` 数据中的模型贴图在 runtime 做 url 调整。
|
|
653
752
|
* 平衡加载时间和图片质量
|
|
654
753
|
*/
|
|
655
|
-
textureOptions:
|
|
754
|
+
textureOptions: TextureOptions;
|
|
755
|
+
/**
|
|
756
|
+
* 模型lod的配置参数
|
|
757
|
+
* @description
|
|
758
|
+
* 可以配置加载模型lod的相关参数
|
|
759
|
+
*/
|
|
760
|
+
modelLodOptions: ModelLodOptions;
|
|
656
761
|
/**
|
|
657
762
|
* 模型贴图的配置参数
|
|
658
763
|
* @description
|
|
@@ -683,24 +788,56 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
683
788
|
plugins: {
|
|
684
789
|
[key: string]: FivePluginInstance<any>;
|
|
685
790
|
};
|
|
686
|
-
|
|
791
|
+
ident: string;
|
|
792
|
+
/** 包围盒子 */
|
|
793
|
+
private boundingMesh;
|
|
794
|
+
private stopAnimationLoop?;
|
|
795
|
+
private fps;
|
|
687
796
|
private helperGroup;
|
|
688
797
|
private modeChangeDuration;
|
|
689
798
|
private onlyRenderIfNeeds;
|
|
690
|
-
private
|
|
799
|
+
private poweredByRealsee;
|
|
691
800
|
private controller?;
|
|
692
801
|
private destroyed;
|
|
693
802
|
private stateSynced;
|
|
694
803
|
private controllerInits;
|
|
695
804
|
private panoramaLikeSavedPose;
|
|
696
805
|
private extraElements;
|
|
697
|
-
private moveToPanoQueue?;
|
|
698
806
|
private getPixelsRenderTarget;
|
|
699
|
-
private tweenCoordinates?;
|
|
700
807
|
private readyCallbacks;
|
|
701
808
|
private modelPending;
|
|
702
|
-
private
|
|
809
|
+
private syncingState;
|
|
810
|
+
/**
|
|
811
|
+
* 是否开启 IOS EDR 模式
|
|
812
|
+
* 需要客户端配合
|
|
813
|
+
* 并且开启 five.enablepostProcessing = true
|
|
814
|
+
*/
|
|
815
|
+
private _enableIOSEDR;
|
|
816
|
+
private lastLoadWorkTask;
|
|
817
|
+
private requestProxy;
|
|
818
|
+
private networkSubscribe;
|
|
819
|
+
private screenBuffers?;
|
|
820
|
+
private analysis?;
|
|
821
|
+
private renderSwitch01;
|
|
822
|
+
/**
|
|
823
|
+
* gpu_picking
|
|
824
|
+
*/
|
|
825
|
+
private gpuPickingRenderTarget;
|
|
826
|
+
private meshReplaceMaterialMap;
|
|
827
|
+
private meshOriginMaterialMap;
|
|
828
|
+
private copyEffect;
|
|
703
829
|
constructor(initArgs?: FiveInitArgs);
|
|
830
|
+
/**
|
|
831
|
+
* GPU Picking 获取选中的 mesh
|
|
832
|
+
* @param x - 屏幕坐标 x
|
|
833
|
+
* @param y - 屏幕坐标 y
|
|
834
|
+
* @param colorMap - 需要选取的 mesh 的颜色与 uuid 的映射
|
|
835
|
+
* @param modelColor - 指定的模型颜色
|
|
836
|
+
* @returns 选中 mesh 的 uuid
|
|
837
|
+
*/
|
|
838
|
+
getGPUPicking(x: number, y: number, colorMap: {
|
|
839
|
+
[key: string]: THREE_2.Color;
|
|
840
|
+
}, pixelRatio?: number, modelColor?: THREE_2.Vector3): string | false;
|
|
704
841
|
/**
|
|
705
842
|
* 析构 five 对象。
|
|
706
843
|
* @description
|
|
@@ -725,6 +862,19 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
725
862
|
*/
|
|
726
863
|
get helperVisible(): boolean;
|
|
727
864
|
set helperVisible(visible: boolean);
|
|
865
|
+
/**
|
|
866
|
+
* 是否开启 IOS EDR 模式
|
|
867
|
+
* 需要客户端配合
|
|
868
|
+
* 并且开启 five.enablepostProcessing = true
|
|
869
|
+
*/
|
|
870
|
+
get enableIOSEDR(): boolean;
|
|
871
|
+
set enableIOSEDR(enable: boolean);
|
|
872
|
+
/**
|
|
873
|
+
* 是否开启后处理
|
|
874
|
+
*/
|
|
875
|
+
get enablePostProcessing(): boolean;
|
|
876
|
+
set enablePostProcessing(enable: boolean);
|
|
877
|
+
updateConfiguration(args: Pick<FiveInitArgs, "panorama" | "model" | "floorplan" | "topview" | "mapview" | "depthPanorama" | "vrPanorama" | "imageOptions" | "textureOptions">): void;
|
|
728
878
|
/**
|
|
729
879
|
* 将显示区域加载到页面 DOM 中
|
|
730
880
|
* @description
|
|
@@ -771,9 +921,21 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
771
921
|
* 会 Promise.reject。运动完成则 Promise.resolve
|
|
772
922
|
* @param pose - 相机目标位置
|
|
773
923
|
* @param duration - 动画触发的时常
|
|
924
|
+
* @param userAction - 是否用户触发
|
|
774
925
|
* @returns Promise 是否移动成功
|
|
775
926
|
*/
|
|
776
|
-
updateCamera(pose: Partial<Pose
|
|
927
|
+
updateCamera(pose: Partial<Omit<Pose, "offset">>, duration: number, userAction?: boolean): Promise<void>;
|
|
928
|
+
/**
|
|
929
|
+
* 通过帧动画移动相机。(不触发点位移动)
|
|
930
|
+
* @description
|
|
931
|
+
* 如果动画中途被打断(用户触发行为,或者调用 setState, load, changeMode)的等
|
|
932
|
+
* 会 Promise.reject。运动完成则 Promise.resolve
|
|
933
|
+
* @param keyframes - 动画帧
|
|
934
|
+
* @param duration - 动画触发的时常
|
|
935
|
+
* @param userAction - 是否用户触发
|
|
936
|
+
* @returns Promise 是否移动成功
|
|
937
|
+
*/
|
|
938
|
+
updateCameraWithKeyframes(keyframes: MotionKeyframe<Exclude<keyof Pose, "offset">>[], duration: number, userAction?: boolean): Promise<void>;
|
|
777
939
|
/**
|
|
778
940
|
* 获取当前相机经纬度
|
|
779
941
|
* @deprecated 请使用使用 getPose
|
|
@@ -793,26 +955,8 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
793
955
|
phi: number;
|
|
794
956
|
lookAtVector: THREE_2.Vector3;
|
|
795
957
|
};
|
|
796
|
-
/**
|
|
797
|
-
|
|
798
|
-
* @description
|
|
799
|
-
* 同初始化的 initBasisLoader 参数。用于初始化 basisLoader。
|
|
800
|
-
* basisLoader 只会初始化一次,一旦初始化则不会再修改。
|
|
801
|
-
*
|
|
802
|
-
* @param transcoderResourcePath - basis 解析器路径
|
|
803
|
-
* 如果不设置,使用默认解析器 basis 解析器。
|
|
804
|
-
* 可以传入解析器的 `resourcePath`, 则使用指定的解析器
|
|
805
|
-
* @example
|
|
806
|
-
* ```
|
|
807
|
-
* // 使用默认解析器
|
|
808
|
-
* five.initialBasisLoader();
|
|
809
|
-
*
|
|
810
|
-
* // 使用指定解析器
|
|
811
|
-
* // 会调用这个目录下的 basis_transcoder.js basis_transcoder.wasm 文件作为解析器
|
|
812
|
-
* five.initialBasisLoader("https://vrlab-public.ljcdn.com/release/static/image/release/five/basis/");
|
|
813
|
-
* ```
|
|
814
|
-
*/
|
|
815
|
-
initBasisLoader(transcoderResourcePath?: string): void;
|
|
958
|
+
/** 当前加载的 work 数据 */
|
|
959
|
+
get work(): Work;
|
|
816
960
|
/**
|
|
817
961
|
* 加载 Work 数据
|
|
818
962
|
* @param inputWork - Work 数据
|
|
@@ -822,15 +966,17 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
822
966
|
* - State 自定义姿态
|
|
823
967
|
* @param duration - 切换时间
|
|
824
968
|
*/
|
|
825
|
-
load(inputWork: Work | LooseWork | any
|
|
969
|
+
load(inputWork: Work | LooseWork | any | Promise<Work | LooseWork | any>, state?: "inherit" | "initial" | Partial<Omit<State, "offset">>, duration?: number, userAction?: boolean): Promise<void>;
|
|
970
|
+
private load_;
|
|
826
971
|
/**
|
|
827
972
|
* 切换模态
|
|
828
973
|
* @param mode - 切换到的模态
|
|
829
974
|
* @param state - 切换完成时的姿态
|
|
830
975
|
* @param duration - 模态切换动画用时
|
|
831
976
|
* @param userAction - 是否时用户动作触发 默认 true
|
|
977
|
+
* @param force - 必须重新初始化 controller
|
|
832
978
|
*/
|
|
833
|
-
changeMode<T extends Mode>(mode: T, state?: Partial<Omit<State, "mode">>, duration?: number, userAction?: boolean): Promise<void>;
|
|
979
|
+
changeMode<T extends Mode>(mode: T, state?: Partial<Omit<State, "mode">>, duration?: number, userAction?: boolean, force?: boolean): Promise<void>;
|
|
834
980
|
/**
|
|
835
981
|
* 获取画面中的像素颜色
|
|
836
982
|
* @param x - 获取像素区域的起始坐标 x
|
|
@@ -844,11 +990,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
844
990
|
/**
|
|
845
991
|
* 获取显示用的画布(Canvas DOM节点)
|
|
846
992
|
*/
|
|
847
|
-
getElement(): HTMLCanvasElement;
|
|
848
|
-
/**
|
|
849
|
-
* 但停自动播放
|
|
850
|
-
*/
|
|
851
|
-
pause(): void;
|
|
993
|
+
getElement(): HTMLCanvasElement | undefined;
|
|
852
994
|
/**
|
|
853
995
|
* 强制渲染
|
|
854
996
|
* @description
|
|
@@ -860,7 +1002,12 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
860
1002
|
*
|
|
861
1003
|
* @param callback - 渲染完成回调
|
|
862
1004
|
*/
|
|
863
|
-
render(callback?: () => void, updateObjectResolution?: boolean):
|
|
1005
|
+
render(callback?: () => void, updateObjectResolution?: boolean): THREE_2.WebGLRenderTarget;
|
|
1006
|
+
updateTime(time: number, deltaTime: number, ...args: any[]): void;
|
|
1007
|
+
/**
|
|
1008
|
+
* 但停自动播放
|
|
1009
|
+
*/
|
|
1010
|
+
pause(): void;
|
|
864
1011
|
play(): void;
|
|
865
1012
|
/**
|
|
866
1013
|
* 转化到 Panorama 模态,并移动到对应序号的观察点。
|
|
@@ -868,7 +1015,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
868
1015
|
* @param options - 移动点位参数
|
|
869
1016
|
* @param userAction - 是否用户触犯
|
|
870
1017
|
*/
|
|
871
|
-
moveToPano(panoIndex: number, options?: MovePanoOptions, userAction?: boolean): void
|
|
1018
|
+
moveToPano(panoIndex: number, options?: MovePanoOptions, userAction?: boolean): Promise<void>;
|
|
872
1019
|
/**
|
|
873
1020
|
* 预加载点位图片资源
|
|
874
1021
|
* @param panoIndex - 观察点序号
|
|
@@ -910,16 +1057,34 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
910
1057
|
* ```
|
|
911
1058
|
* @param state - 目标状态
|
|
912
1059
|
* @param immediately - 是否马上转换,马上转换会尽快达到目标状态,尽量减少中间状态,更少动画。
|
|
1060
|
+
* @param userAction - 是否是用户触发的动作
|
|
913
1061
|
*/
|
|
914
|
-
setState(state: Partial<State>, immediately?: boolean): void;
|
|
1062
|
+
setState(state: Partial<State>, immediately?: boolean, userAction?: boolean): void;
|
|
915
1063
|
aroundScissor(callback: () => void): void;
|
|
916
1064
|
private syncState;
|
|
917
|
-
|
|
1065
|
+
/**
|
|
1066
|
+
* 当前页面静态
|
|
1067
|
+
*/
|
|
1068
|
+
ready(args?: {
|
|
1069
|
+
tile?: boolean;
|
|
1070
|
+
}): Promise<void>;
|
|
1071
|
+
/**
|
|
1072
|
+
* 请求全屏
|
|
1073
|
+
*/
|
|
1074
|
+
requestFullscreen(): void;
|
|
1075
|
+
/**
|
|
1076
|
+
* 退出全屏
|
|
1077
|
+
*/
|
|
1078
|
+
exitFullscreen(): void;
|
|
918
1079
|
private throwError;
|
|
919
1080
|
private loadModel;
|
|
920
1081
|
private commonParams;
|
|
921
1082
|
private saveControllerPose;
|
|
922
1083
|
private applyController;
|
|
1084
|
+
/** 移除事件绑定 */
|
|
1085
|
+
private removeEventListeners;
|
|
1086
|
+
/** 销毁GPU Picking 所用的材质 */
|
|
1087
|
+
private diposeGPUPickingMaterial;
|
|
923
1088
|
}
|
|
924
1089
|
|
|
925
1090
|
/** Five 初始化参数 */
|
|
@@ -1005,7 +1170,7 @@ export declare interface FiveInitArgs {
|
|
|
1005
1170
|
* 可以动态对配置在 `work` 数据中的模型贴图在 runtime 做 url 调整。
|
|
1006
1171
|
* 平衡加载时间和图片质量
|
|
1007
1172
|
*/
|
|
1008
|
-
textureOptions?:
|
|
1173
|
+
textureOptions?: TextureOptions;
|
|
1009
1174
|
/**
|
|
1010
1175
|
* 是否按需渲染
|
|
1011
1176
|
* @description
|
|
@@ -1035,7 +1200,7 @@ export declare interface FiveInitArgs {
|
|
|
1035
1200
|
*
|
|
1036
1201
|
* // 使用指定解析器
|
|
1037
1202
|
* // 会调用这个目录下的 basis_transcoder.js basis_transcoder.wasm 文件作为解析器
|
|
1038
|
-
* initialBasisLoader: "https://
|
|
1203
|
+
* initialBasisLoader: "https://vr-public.realsee-cdn.cn/release/static/image/release/five/basis/"
|
|
1039
1204
|
* ```
|
|
1040
1205
|
*/
|
|
1041
1206
|
initialBasisLoader?: boolean | string;
|
|
@@ -1055,15 +1220,19 @@ export declare interface FiveInitArgs {
|
|
|
1055
1220
|
floorplan?: ControllerCustomInitTypes["Floorplan"];
|
|
1056
1221
|
/** 户型图模式下的特定参数 */
|
|
1057
1222
|
topview?: ControllerCustomInitTypes["Topview"];
|
|
1223
|
+
/** 地图模式下的特定参数 */
|
|
1224
|
+
mapview?: ControllerCustomInitTypes["Mapview"];
|
|
1058
1225
|
/** 深度图游走模式下的特定参数 */
|
|
1059
1226
|
depthPanorama?: ControllerCustomInitTypes["DepthPanorama"];
|
|
1060
1227
|
/** VR眼镜模式下的特定参数 */
|
|
1061
1228
|
vrPanorama?: ControllerCustomInitTypes["VRPanorama"];
|
|
1229
|
+
/** XR眼镜模式下的特定参数 */
|
|
1230
|
+
xrPanorama?: ControllerCustomInitTypes["XRPanorama"];
|
|
1062
1231
|
/**
|
|
1063
1232
|
* 模式间切换时的过度动画时间
|
|
1064
1233
|
* @description
|
|
1065
1234
|
* 单位毫秒
|
|
1066
|
-
* @default `
|
|
1235
|
+
* @default `800`
|
|
1067
1236
|
*/
|
|
1068
1237
|
modeChangeDuration?: number;
|
|
1069
1238
|
/**
|
|
@@ -1072,6 +1241,30 @@ export declare interface FiveInitArgs {
|
|
|
1072
1241
|
* 详见插件部分。
|
|
1073
1242
|
*/
|
|
1074
1243
|
plugins?: (FivePlugin<void> | FivePluginInit<FivePlugin<any, any>> | FivePluginInit<FivePlugin<void, any>>)[];
|
|
1244
|
+
/**
|
|
1245
|
+
* 是否展示 powered by 如视
|
|
1246
|
+
*/
|
|
1247
|
+
poweredByRealsee?: boolean;
|
|
1248
|
+
/**
|
|
1249
|
+
* 是否使用webgl2渲染执行环境, 默认值 false
|
|
1250
|
+
*/
|
|
1251
|
+
webgl2?: boolean;
|
|
1252
|
+
/**
|
|
1253
|
+
* 是否开启模型裁切
|
|
1254
|
+
*/
|
|
1255
|
+
localClippingEnabled?: boolean;
|
|
1256
|
+
/**
|
|
1257
|
+
* 请求代理
|
|
1258
|
+
* @param url - 发起的请求
|
|
1259
|
+
* @returns 返回的请求
|
|
1260
|
+
*/
|
|
1261
|
+
requestProxy?(url: string): string | Promise<string>;
|
|
1262
|
+
/**
|
|
1263
|
+
* 模型lod相关的配置,maxDepth为加载的最大深度
|
|
1264
|
+
*/
|
|
1265
|
+
modelLod?: {
|
|
1266
|
+
maxDepth?: number;
|
|
1267
|
+
};
|
|
1075
1268
|
}
|
|
1076
1269
|
|
|
1077
1270
|
/**
|
|
@@ -1116,48 +1309,75 @@ export declare interface FloorplanControllerCustomInitArgs {
|
|
|
1116
1309
|
maxFov?: number;
|
|
1117
1310
|
/** 最小相机可视角度 */
|
|
1118
1311
|
minFov?: number;
|
|
1312
|
+
/** 鼠标焦点环自定义创建器 */
|
|
1313
|
+
intersectMeshCreator?: () => IntersectMeshInterface;
|
|
1119
1314
|
}
|
|
1120
1315
|
|
|
1121
|
-
export declare type GestureTypes = "pan" | "tap" | "pinch" | "mouseWheel";
|
|
1316
|
+
export declare type GestureTypes = "pan" | "tap" | "pinch" | "press" | "mouseWheel";
|
|
1122
1317
|
|
|
1123
1318
|
export declare function getViewportScale(): number;
|
|
1124
1319
|
|
|
1125
|
-
export declare class HashCubeTexture extends THREE_2.CubeTexture {
|
|
1126
|
-
/** 识别哈希 */
|
|
1127
|
-
hash: string;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
1320
|
/**
|
|
1131
1321
|
* 图片参数
|
|
1132
1322
|
*/
|
|
1133
1323
|
export declare interface ImageOptions {
|
|
1134
|
-
key?: string;
|
|
1135
1324
|
/**
|
|
1136
1325
|
* url 地址转化
|
|
1137
1326
|
* @param url - 原始地址
|
|
1138
1327
|
* @param options - 当前地址参数
|
|
1139
1328
|
* @returns 转化后地址
|
|
1140
1329
|
*/
|
|
1141
|
-
transform?: (url: string, options:
|
|
1142
|
-
/** 图片尺寸参数 */
|
|
1330
|
+
transform?: (url: string, options: ImageURLOptions) => string;
|
|
1331
|
+
/** 图片尺寸参数 尽量使用 2 的幂次 如 512 1024 2048 */
|
|
1143
1332
|
size?: number;
|
|
1144
1333
|
/** 图片质量参数(0-100) */
|
|
1145
1334
|
quality?: number;
|
|
1146
|
-
/**
|
|
1147
|
-
format?:
|
|
1148
|
-
/**
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1335
|
+
/** 图片格式参数 */
|
|
1336
|
+
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
1337
|
+
/** 锐化参数 海外不支持 */
|
|
1338
|
+
sharpen?: number;
|
|
1339
|
+
mappings?: ImageURLMappings;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
export declare function imageSupport(): Promise<{
|
|
1343
|
+
avif: boolean;
|
|
1344
|
+
webp: boolean;
|
|
1345
|
+
}>;
|
|
1346
|
+
|
|
1347
|
+
export declare interface ImageURLMappings {
|
|
1348
|
+
[publicDomain: string]: {
|
|
1349
|
+
"pano": [string, string];
|
|
1350
|
+
"tile": [string, string];
|
|
1351
|
+
"texture": [string];
|
|
1352
|
+
"default": [string];
|
|
1353
|
+
};
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
export declare interface ImageURLOptions {
|
|
1357
|
+
/** 图片类型标识 */
|
|
1358
|
+
key: string;
|
|
1359
|
+
/** 图片尺寸参数 尽量使用 2 的幂次 如 256 512 1024 */
|
|
1360
|
+
size?: number;
|
|
1361
|
+
/** 图片质量参数(0-100) */
|
|
1362
|
+
quality?: number;
|
|
1363
|
+
/** 图片格式参数 */
|
|
1364
|
+
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
1365
|
+
/** 图片裁切 */
|
|
1366
|
+
cut?: [x: number, y: number, width: number, height: number];
|
|
1367
|
+
/** 锐化参数 海外不支持 */
|
|
1368
|
+
sharpen?: number;
|
|
1369
|
+
/** url匹配规则 */
|
|
1370
|
+
mappings?: ImageURLMappings;
|
|
1152
1371
|
}
|
|
1153
1372
|
|
|
1154
1373
|
export declare class InternalWebGLRenderer extends THREE_2.WebGLRenderer {
|
|
1155
|
-
constructor({ preserveDrawingBuffer, backgroundColor, backgroundAlpha, pixelRatio, antialias }: {
|
|
1374
|
+
constructor({ preserveDrawingBuffer, backgroundColor, backgroundAlpha, pixelRatio, antialias, webgl2, }: {
|
|
1156
1375
|
preserveDrawingBuffer?: boolean;
|
|
1157
1376
|
backgroundColor?: number | THREE_2.Color;
|
|
1158
1377
|
backgroundAlpha?: number;
|
|
1159
1378
|
pixelRatio?: number;
|
|
1160
1379
|
antialias?: boolean;
|
|
1380
|
+
webgl2?: boolean;
|
|
1161
1381
|
});
|
|
1162
1382
|
}
|
|
1163
1383
|
|
|
@@ -1172,6 +1392,15 @@ export declare interface Intersection {
|
|
|
1172
1392
|
distance: number;
|
|
1173
1393
|
}
|
|
1174
1394
|
|
|
1395
|
+
export declare class IntersectMesh extends THREE_2.Object3D implements IntersectMeshInterface {
|
|
1396
|
+
private ringMesh;
|
|
1397
|
+
constructor();
|
|
1398
|
+
dispose(): void;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* 地面提示点位接口
|
|
1403
|
+
*/
|
|
1175
1404
|
export declare interface IntersectMeshInterface extends THREE_2.Object3D {
|
|
1176
1405
|
dispose(): void;
|
|
1177
1406
|
}
|
|
@@ -1233,7 +1462,15 @@ export declare type LooseWorkPanorama = {
|
|
|
1233
1462
|
front: string;
|
|
1234
1463
|
back: string;
|
|
1235
1464
|
video?: LooseWorkVideo;
|
|
1236
|
-
|
|
1465
|
+
luminance?: {
|
|
1466
|
+
up: string;
|
|
1467
|
+
down: string;
|
|
1468
|
+
right: string;
|
|
1469
|
+
left: string;
|
|
1470
|
+
front: string;
|
|
1471
|
+
back: string;
|
|
1472
|
+
};
|
|
1473
|
+
tiles?: number[];
|
|
1237
1474
|
};
|
|
1238
1475
|
|
|
1239
1476
|
export declare type LooseWorkVideo = {
|
|
@@ -1242,6 +1479,23 @@ export declare type LooseWorkVideo = {
|
|
|
1242
1479
|
size: number[];
|
|
1243
1480
|
};
|
|
1244
1481
|
|
|
1482
|
+
export declare interface MapviewControllerCustomInitArgs {
|
|
1483
|
+
/** 默认偏航角 */
|
|
1484
|
+
defaultLongitude?: number;
|
|
1485
|
+
/** 默认俯仰角 */
|
|
1486
|
+
defaultLatitude?: number;
|
|
1487
|
+
/** 默认相机距离 */
|
|
1488
|
+
defaultDistance?: number;
|
|
1489
|
+
/** 最大俯仰角 */
|
|
1490
|
+
maxLatitude?: number;
|
|
1491
|
+
/** 最小俯仰角 */
|
|
1492
|
+
minLatitude?: number;
|
|
1493
|
+
/** 最大相机距离 */
|
|
1494
|
+
maxDistance?: number;
|
|
1495
|
+
/** 最小相机距离 */
|
|
1496
|
+
minDistance?: number;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1245
1499
|
export declare type Mirror<T extends string> = Record<T, T>;
|
|
1246
1500
|
|
|
1247
1501
|
/**
|
|
@@ -1250,6 +1504,7 @@ export declare type Mirror<T extends string> = Record<T, T>;
|
|
|
1250
1504
|
* - **Model**: 模型游走模式
|
|
1251
1505
|
* - **Floorplan**: 模型查看模式
|
|
1252
1506
|
* - **Topview**: 户型图模式
|
|
1507
|
+
* - **Mapview**: 地图模式
|
|
1253
1508
|
* - **DepthPanorama**: 深度图游走模式
|
|
1254
1509
|
* - **VRPanorama**: VR眼镜模式
|
|
1255
1510
|
*/
|
|
@@ -1258,6 +1513,8 @@ export declare type Mode =
|
|
|
1258
1513
|
"Floorplan" |
|
|
1259
1514
|
/** 户型图模式 */
|
|
1260
1515
|
"Topview" |
|
|
1516
|
+
/** 地图模式 */
|
|
1517
|
+
"Mapview" |
|
|
1261
1518
|
/** 全景图游走模式 */
|
|
1262
1519
|
"Panorama" |
|
|
1263
1520
|
/** VR眼镜模式 */
|
|
@@ -1265,7 +1522,9 @@ export declare type Mode =
|
|
|
1265
1522
|
/** 模型游走模式 */
|
|
1266
1523
|
"Model" |
|
|
1267
1524
|
/** 深度图游走模式 */
|
|
1268
|
-
"DepthPanorama"
|
|
1525
|
+
"DepthPanorama" |
|
|
1526
|
+
/** XR眼镜模式*/
|
|
1527
|
+
"XRPanorama";
|
|
1269
1528
|
|
|
1270
1529
|
/**
|
|
1271
1530
|
* Five 模型
|
|
@@ -1275,17 +1534,25 @@ export declare type Mode =
|
|
|
1275
1534
|
* 需要满足 your/path/filename.at3d.json_xxxxxx,
|
|
1276
1535
|
* 通过 json_xxxxxx(<dataURL>) 方式返回。
|
|
1277
1536
|
*/
|
|
1278
|
-
export declare class Model extends
|
|
1537
|
+
export declare class Model extends PBMContainer implements Subscribe<ModelEventType> {
|
|
1279
1538
|
/** 是否加载完成 */
|
|
1280
1539
|
loaded: boolean;
|
|
1281
1540
|
/** 是否未加载 */
|
|
1282
1541
|
empty: boolean;
|
|
1542
|
+
/** WorkCode */
|
|
1543
|
+
workCode: string;
|
|
1283
1544
|
/** 外接盒子的大小 */
|
|
1284
1545
|
bounding: THREE_2.Box3;
|
|
1285
1546
|
/** 当前显示的楼层 */
|
|
1286
1547
|
shownFloor: number | null;
|
|
1287
1548
|
/** 楼层的数量 */
|
|
1288
1549
|
floorLength: number;
|
|
1550
|
+
/** 模型瓦片 */
|
|
1551
|
+
originModel?: PBMContainer;
|
|
1552
|
+
/** 模型瓦片 */
|
|
1553
|
+
tiledModel?: Tile3DModel;
|
|
1554
|
+
/** 材质贴图参数 */
|
|
1555
|
+
textureOptions: TextureOptions;
|
|
1289
1556
|
/**
|
|
1290
1557
|
* 判断是否注册了事件
|
|
1291
1558
|
* 具体可查看 {@link Subscribe.hasListener}
|
|
@@ -1312,16 +1579,37 @@ export declare class Model extends PBMGroup implements Subscribe<ModelEventType>
|
|
|
1312
1579
|
*/
|
|
1313
1580
|
emit: SubscribeMixinType.emit<ModelEventType>;
|
|
1314
1581
|
/** bvh 树的计算结果 */
|
|
1315
|
-
bvhs:
|
|
1316
|
-
loaded
|
|
1582
|
+
bvhs: BVH[] & {
|
|
1583
|
+
loaded: boolean;
|
|
1317
1584
|
};
|
|
1318
|
-
|
|
1585
|
+
/** 网络代理 */
|
|
1586
|
+
private requestProxy?;
|
|
1587
|
+
/** 网络跟踪 */
|
|
1588
|
+
private networkSubscribe?;
|
|
1589
|
+
/** 安全域名 */
|
|
1590
|
+
private allowHosts?;
|
|
1591
|
+
private renderer?;
|
|
1592
|
+
constructor(options: {
|
|
1593
|
+
networkSubscribe?: NetworkSubscribe;
|
|
1594
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
1595
|
+
allowHosts?: string[];
|
|
1596
|
+
}, renderer?: THREE_2.WebGLRenderer);
|
|
1319
1597
|
/**
|
|
1320
1598
|
* 当前显示的楼层
|
|
1321
1599
|
* @deprecated
|
|
1322
1600
|
* 请用 shwonFloor 代替
|
|
1323
1601
|
*/
|
|
1324
1602
|
get shownfloor(): number | null;
|
|
1603
|
+
/**
|
|
1604
|
+
* 当前模型是否支持瓦片
|
|
1605
|
+
*/
|
|
1606
|
+
get hasTiles(): boolean;
|
|
1607
|
+
/**
|
|
1608
|
+
* 是否开启瓦片
|
|
1609
|
+
*/
|
|
1610
|
+
get enableTiles(): boolean;
|
|
1611
|
+
set enableTiles(enable: boolean);
|
|
1612
|
+
updateTexture(textureOptions: TextureOptions): Promise<void>;
|
|
1325
1613
|
/**
|
|
1326
1614
|
* 获取模型边界线
|
|
1327
1615
|
* @param threshold - 面片间夹角阈值
|
|
@@ -1345,7 +1633,9 @@ export declare class Model extends PBMGroup implements Subscribe<ModelEventType>
|
|
|
1345
1633
|
* ```
|
|
1346
1634
|
*/
|
|
1347
1635
|
show(): void;
|
|
1348
|
-
show(floorIndex: number,
|
|
1636
|
+
show(floorIndex: number, hiddenOpacity?: number): void;
|
|
1637
|
+
private at3dShow;
|
|
1638
|
+
private b3dmShow;
|
|
1349
1639
|
/**
|
|
1350
1640
|
* 计算模型射线碰撞检测
|
|
1351
1641
|
* @param raycaster - THREE 射线对象
|
|
@@ -1353,13 +1643,14 @@ export declare class Model extends PBMGroup implements Subscribe<ModelEventType>
|
|
|
1353
1643
|
* @returns 返回碰撞
|
|
1354
1644
|
*/
|
|
1355
1645
|
intersectRaycaster(raycaster: THREE_2.Raycaster, floors?: number | number[]): Intersection[];
|
|
1356
|
-
buildBVH():
|
|
1646
|
+
buildBVH(): void;
|
|
1357
1647
|
/**
|
|
1358
1648
|
* 加载模型
|
|
1359
1649
|
* @param workModel - work 的 model 内容
|
|
1360
1650
|
* @param imageOptions - 图片参数
|
|
1361
1651
|
*/
|
|
1362
|
-
load(workModel: WorkModel,
|
|
1652
|
+
load(workModel: WorkModel, textureOptions?: TextureOptions, modelLodOptions?: ModelLodOptions): Promise<void>;
|
|
1653
|
+
update(renderer: THREE_2.WebGLRenderer, camera: Camera): void;
|
|
1363
1654
|
/**
|
|
1364
1655
|
* 析构函数
|
|
1365
1656
|
* @description
|
|
@@ -1389,7 +1680,7 @@ export declare type ModelEventType = {
|
|
|
1389
1680
|
* 模型 bvh树 计算完成
|
|
1390
1681
|
* @description
|
|
1391
1682
|
* bvh 树用于高效的碰撞检测,可以在 `model.bvh` 属性来设置是否开启。默认开启。
|
|
1392
|
-
* bvh
|
|
1683
|
+
* bvh 树计算需要一定时间,可能会暂时影响一些性能。计算完毕后,会对碰撞检测带来质的提升。
|
|
1393
1684
|
*/
|
|
1394
1685
|
bvhLoaded(): void;
|
|
1395
1686
|
/** 模型三角面片结构加载完成 */
|
|
@@ -1408,7 +1699,19 @@ export declare type ModelEventType = {
|
|
|
1408
1699
|
* @param error - 错误对象
|
|
1409
1700
|
*/
|
|
1410
1701
|
error(error: Error): void;
|
|
1411
|
-
}
|
|
1702
|
+
} & Pick<TileEventType, typeof TILE_EVENT[number]>;
|
|
1703
|
+
|
|
1704
|
+
export declare interface ModelLodOptions {
|
|
1705
|
+
maxDepth?: number;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
export declare interface MotionKeyframe<K extends string> {
|
|
1709
|
+
progress: number;
|
|
1710
|
+
value: MotionValue<K>;
|
|
1711
|
+
key?: string;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
export declare type MotionValue<K extends string> = Record<K, number>;
|
|
1412
1715
|
|
|
1413
1716
|
/**
|
|
1414
1717
|
* 点位移动参数
|
|
@@ -1421,9 +1724,10 @@ export declare interface MovePanoOptions extends Partial<Omit<Pose, "offset">> {
|
|
|
1421
1724
|
* @description
|
|
1422
1725
|
* - `fly` 通过相机移动方式变化
|
|
1423
1726
|
* - `fade` 通过渐变方式变化
|
|
1727
|
+
* - `montage` 通过渐变穿插到黑屏方式变化
|
|
1424
1728
|
* - `instant` 通过插入黑屏方式变化
|
|
1425
1729
|
*/
|
|
1426
|
-
effect?: "fly" | "fade" | "instant";
|
|
1730
|
+
effect?: "fly" | "fade" | "montage" | "instant";
|
|
1427
1731
|
/**
|
|
1428
1732
|
* 运动耗时
|
|
1429
1733
|
* @description
|
|
@@ -1449,21 +1753,180 @@ export declare interface MovePanoOptions extends Partial<Omit<Pose, "offset">> {
|
|
|
1449
1753
|
moveCancelCallback?: () => void;
|
|
1450
1754
|
}
|
|
1451
1755
|
|
|
1756
|
+
export declare type NetWorkMeta = {
|
|
1757
|
+
origin: string;
|
|
1758
|
+
source: string;
|
|
1759
|
+
headers: {
|
|
1760
|
+
[name: string]: string;
|
|
1761
|
+
};
|
|
1762
|
+
requestTime: number;
|
|
1763
|
+
responseTime: number;
|
|
1764
|
+
costs: number;
|
|
1765
|
+
size?: number;
|
|
1766
|
+
};
|
|
1767
|
+
|
|
1768
|
+
export declare interface NetworkOptions {
|
|
1769
|
+
/** 超时时间 */
|
|
1770
|
+
timeout?: number;
|
|
1771
|
+
/** 请求代理 */
|
|
1772
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
1773
|
+
/** 网络消息追踪 */
|
|
1774
|
+
networkSubscribe?: NetworkSubscribe;
|
|
1775
|
+
/** 安全域名 */
|
|
1776
|
+
allowHosts?: string[];
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
export declare type NetworkResponse<T = any, E extends NetWorkMeta | NetWorkMeta[] = NetWorkMeta> = {
|
|
1780
|
+
body: T;
|
|
1781
|
+
meta: E;
|
|
1782
|
+
};
|
|
1783
|
+
|
|
1784
|
+
export declare type NetworkState = "ok" | "preload" | "error" | "proxy-error" | "timeout" | "forbidden";
|
|
1785
|
+
|
|
1786
|
+
export declare class NetworkSubscribe extends Subscribe<{
|
|
1787
|
+
network(source: string, type: NetworkType, state: NetworkState, detail: string): void;
|
|
1788
|
+
}> {
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
export declare type NetworkType = "XMLHttpRequest" | "Script" | "Image" | "Link";
|
|
1792
|
+
|
|
1793
|
+
export declare class PanoCircleMesh extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1794
|
+
needsRender: boolean;
|
|
1795
|
+
private currentStartTime;
|
|
1796
|
+
private currentMotion;
|
|
1797
|
+
private ringMotion;
|
|
1798
|
+
private tapMotion;
|
|
1799
|
+
private loadingOpacityMotion;
|
|
1800
|
+
private progressMotion;
|
|
1801
|
+
private progressOpacityMotion;
|
|
1802
|
+
private opacityMotion;
|
|
1803
|
+
private disableMotion;
|
|
1804
|
+
progress: number;
|
|
1805
|
+
opacity: number;
|
|
1806
|
+
current: boolean;
|
|
1807
|
+
loading: boolean;
|
|
1808
|
+
disabled: boolean;
|
|
1809
|
+
private panoMesh;
|
|
1810
|
+
constructor(options?: PanoCircleMeshOptions);
|
|
1811
|
+
setProgress(progress: number): void;
|
|
1812
|
+
setOpacity(opacity: number): void;
|
|
1813
|
+
setCurrent(current: boolean): void;
|
|
1814
|
+
setLoading(loading: boolean): void;
|
|
1815
|
+
setDisabled(disabled: boolean): void;
|
|
1816
|
+
tap(): Promise<void>;
|
|
1817
|
+
updateTime(time: number, deltaTime: number): void;
|
|
1818
|
+
dispose(): void;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
export declare class PanoCircleMeshCustom extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1822
|
+
needsRender: boolean;
|
|
1823
|
+
private currentStartTime;
|
|
1824
|
+
private currentMotion;
|
|
1825
|
+
private tapMotion;
|
|
1826
|
+
private loadingOpacityMotion;
|
|
1827
|
+
private progressMotion;
|
|
1828
|
+
private progressOpacityMotion;
|
|
1829
|
+
private opacityMotion;
|
|
1830
|
+
private disableMotion;
|
|
1831
|
+
progress: number;
|
|
1832
|
+
opacity: number;
|
|
1833
|
+
current: boolean;
|
|
1834
|
+
loading: boolean;
|
|
1835
|
+
disabled: boolean;
|
|
1836
|
+
private panoMesh;
|
|
1837
|
+
constructor(options?: PanoCircleMeshCustomOptions);
|
|
1838
|
+
setProgress(progress: number): void;
|
|
1839
|
+
setOpacity(opacity: number): void;
|
|
1840
|
+
setCurrent(current: boolean): void;
|
|
1841
|
+
setLoading(loading: boolean): void;
|
|
1842
|
+
setDisabled(disabled: boolean): void;
|
|
1843
|
+
tap(): Promise<void>;
|
|
1844
|
+
updateTime(time: number, deltaTime: number): void;
|
|
1845
|
+
dispose(): void;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
export declare interface PanoCircleMeshCustomOptions {
|
|
1849
|
+
scale?: number;
|
|
1850
|
+
color?: number;
|
|
1851
|
+
map?: THREE_2.Texture;
|
|
1852
|
+
mapAlpha?: number;
|
|
1853
|
+
borderWidth?: number;
|
|
1854
|
+
borderColor?: number;
|
|
1855
|
+
mapUseColor?: boolean;
|
|
1856
|
+
mapUseReverse?: boolean;
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
/**
|
|
1860
|
+
* 地面提示点位接口
|
|
1861
|
+
*
|
|
1862
|
+
* 点位状态
|
|
1863
|
+
* 1. 默认状态: 无任何操作的情况
|
|
1864
|
+
* 2. 高亮状态: 高亮,认为是合适的下一个点位,或者设备选中了某个点位
|
|
1865
|
+
* 3. 进度状态: 点位加载中,存在进度的情况
|
|
1866
|
+
* 4. 加载状态: 点位加载中,不存在进度的情况
|
|
1867
|
+
* 5. 不可用状态:点位不可用,存在点位,但是点位是个摆设
|
|
1868
|
+
* 6. 点击动画: 点位被选择,触发全景图切换
|
|
1869
|
+
* 7. 透明度改变: 一般会处理为近的点位透明度高,远的点位透明度低
|
|
1870
|
+
*/
|
|
1452
1871
|
export declare interface PanoCircleMeshInterface extends THREE_2.Object3D {
|
|
1453
1872
|
needsRender: boolean;
|
|
1873
|
+
hitTestMesh?: THREE_2.Mesh;
|
|
1874
|
+
/** 当前高亮 */
|
|
1875
|
+
current: boolean;
|
|
1876
|
+
/** 是否当前高亮 */
|
|
1877
|
+
setCurrent(current: boolean): void;
|
|
1454
1878
|
loading: boolean;
|
|
1879
|
+
setLoading(loading: boolean): void;
|
|
1455
1880
|
disabled: boolean;
|
|
1456
|
-
panoIndex: number;
|
|
1457
|
-
setLoading(shown: boolean): void;
|
|
1458
1881
|
setDisabled(disabled: boolean): void;
|
|
1882
|
+
progress: number;
|
|
1883
|
+
setProgress(progress: number): void;
|
|
1884
|
+
opacity: number;
|
|
1885
|
+
setOpacity(opacity: number): void;
|
|
1886
|
+
updateTime?(time: number, deltaTime: number): void;
|
|
1887
|
+
/** 点击交互 */
|
|
1888
|
+
tap?(): Promise<void>;
|
|
1889
|
+
dispose(): void;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
export declare interface PanoCircleMeshOptions {
|
|
1893
|
+
scale?: number;
|
|
1894
|
+
color?: number;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
export declare class PanoCircleMeshSolid extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
1898
|
+
needsRender: boolean;
|
|
1899
|
+
private currentStartTime;
|
|
1900
|
+
private currentMotion;
|
|
1901
|
+
private tapMotion;
|
|
1902
|
+
private loadingOpacityMotion;
|
|
1903
|
+
private progressMotion;
|
|
1904
|
+
private progressOpacityMotion;
|
|
1905
|
+
private opacityMotion;
|
|
1906
|
+
private disableMotion;
|
|
1907
|
+
progress: number;
|
|
1908
|
+
opacity: number;
|
|
1909
|
+
current: boolean;
|
|
1910
|
+
loading: boolean;
|
|
1911
|
+
disabled: boolean;
|
|
1912
|
+
private panoMesh;
|
|
1913
|
+
constructor(options?: PanoCircleMeshSolidOptions);
|
|
1459
1914
|
setProgress(progress: number): void;
|
|
1460
1915
|
setOpacity(opacity: number): void;
|
|
1916
|
+
setCurrent(current: boolean): void;
|
|
1917
|
+
setLoading(loading: boolean): void;
|
|
1918
|
+
setDisabled(disabled: boolean): void;
|
|
1919
|
+
tap(): Promise<void>;
|
|
1920
|
+
updateTime(time: number, deltaTime: number): void;
|
|
1461
1921
|
dispose(): void;
|
|
1462
1922
|
}
|
|
1463
1923
|
|
|
1924
|
+
export declare interface PanoCircleMeshSolidOptions {
|
|
1925
|
+
scale?: number;
|
|
1926
|
+
color?: number;
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1464
1929
|
export declare interface PanoramaControllerCustomInitArgs extends PanoramaLikeControllerCustomInitArgs {
|
|
1465
|
-
/** 自动亮度调整 默认 false */
|
|
1466
|
-
enableLuminanceAdaptiveEffect?: boolean;
|
|
1467
1930
|
/** 最远可移动观察点距离 */
|
|
1468
1931
|
maxAccessibleDistance?: number;
|
|
1469
1932
|
/**
|
|
@@ -1474,7 +1937,16 @@ export declare interface PanoramaControllerCustomInitArgs extends PanoramaLikeCo
|
|
|
1474
1937
|
*/
|
|
1475
1938
|
panoTapTriggerRadius?: number;
|
|
1476
1939
|
/** 地面观察点标识自定义创建器 */
|
|
1477
|
-
panoCircleMeshCreator?: () => PanoCircleMeshInterface;
|
|
1940
|
+
panoCircleMeshCreator?: (panoIndex: number) => PanoCircleMeshInterface;
|
|
1941
|
+
/**
|
|
1942
|
+
* 全景瓦片登记
|
|
1943
|
+
* @param fov - 当前 fov
|
|
1944
|
+
* @param viewSize - 当前绘制区域大小
|
|
1945
|
+
* @returns 返回瓦片等级
|
|
1946
|
+
*/
|
|
1947
|
+
tileLevelForFov?: false | ((fov: number, viewSize: THREE_2.Vector2) => number);
|
|
1948
|
+
/** 是否开启光照自适应效果 */
|
|
1949
|
+
luminanceAdaptiveEffectEnable?: boolean;
|
|
1478
1950
|
}
|
|
1479
1951
|
|
|
1480
1952
|
export declare interface PanoramaLikeControllerCustomInitArgs {
|
|
@@ -1502,14 +1974,31 @@ export declare interface PanoramaLikeControllerCustomInitArgs {
|
|
|
1502
1974
|
intersectMeshCreator?: () => IntersectMeshInterface;
|
|
1503
1975
|
}
|
|
1504
1976
|
|
|
1505
|
-
|
|
1977
|
+
/**
|
|
1978
|
+
* 解析 Work 数据
|
|
1979
|
+
* @param obj - work 数据,从如数开发者平台获取
|
|
1980
|
+
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
1981
|
+
* @param urlTransform - 配置参数, URL 解析规则
|
|
1982
|
+
* @returns - 签署过的 Work 数据结构
|
|
1983
|
+
*/
|
|
1984
|
+
export declare function parseWork(obj: Work | LooseWork | string | any, options?: ParseWorkOptions, urlTransform?: (origin: string, absolute: string, relative: string, type: "panorama" | "texture" | "model") => void): Work;
|
|
1985
|
+
|
|
1986
|
+
export declare type ParseWorkOptions = {
|
|
1987
|
+
/** 重写 work 中的资源前缀 */
|
|
1988
|
+
baseURL?: string;
|
|
1989
|
+
/** work 中的资源地址使用短地址 */
|
|
1990
|
+
shortPath?: boolean;
|
|
1991
|
+
/** work 中的资源使用 jsonp 方式发布 */
|
|
1992
|
+
jsonp?: boolean;
|
|
1993
|
+
/** work 中模型是否计算bvh碰撞数,默认计算 true */
|
|
1994
|
+
modelBvh?: boolean;
|
|
1995
|
+
};
|
|
1506
1996
|
|
|
1507
1997
|
/** PBM 模型组 */
|
|
1508
|
-
export declare class
|
|
1509
|
-
/** 楼层序号 */
|
|
1510
|
-
floorIndex: number;
|
|
1998
|
+
export declare class PBMContainer extends THREE_2.Group {
|
|
1511
1999
|
/** 是否需要更新按需渲染 */
|
|
1512
2000
|
needsRender: boolean;
|
|
2001
|
+
private enableTransparent;
|
|
1513
2002
|
/** 获取是否有透明参数 */
|
|
1514
2003
|
getTransparent(): boolean;
|
|
1515
2004
|
/** 设置透明参数 */
|
|
@@ -1524,39 +2013,41 @@ export declare class PBMGroup extends THREE_2.Group {
|
|
|
1524
2013
|
disposeGeometry(): void;
|
|
1525
2014
|
}
|
|
1526
2015
|
|
|
2016
|
+
/** PBM 模型组 */
|
|
2017
|
+
export declare class PBMGroup extends PBMContainer {
|
|
2018
|
+
/** 楼层序号 */
|
|
2019
|
+
floorIndex: number;
|
|
2020
|
+
}
|
|
2021
|
+
|
|
1527
2022
|
/** PBM 材质 */
|
|
1528
2023
|
export declare class PBMMaterial extends THREE_2.ShaderMaterial implements PBMParameters {
|
|
1529
|
-
/**
|
|
1530
|
-
|
|
1531
|
-
/**
|
|
1532
|
-
|
|
1533
|
-
/** 结束点位全景图 */
|
|
1534
|
-
pano1Map: HashCubeTexture | null;
|
|
1535
|
-
/** 结束点全景图变换矩阵 4x4 */
|
|
1536
|
-
pano1Matrix: THREE_2.Matrix4;
|
|
2024
|
+
/** 起始点 */
|
|
2025
|
+
pano0: PBMPanoPicture | null;
|
|
2026
|
+
/** 结束点 */
|
|
2027
|
+
pano1: PBMPanoPicture | null;
|
|
1537
2028
|
/** 模型贴图和全景图的混合程度 [0-1] */
|
|
1538
2029
|
modelAlpha: number;
|
|
1539
2030
|
/** 全景图混合程度 [0-1] */
|
|
1540
2031
|
progress: number;
|
|
1541
2032
|
/** 全景图通过过度黑色混合 */
|
|
1542
2033
|
useBlackTransition: boolean;
|
|
1543
|
-
perspToOrtho: number;
|
|
1544
2034
|
/** 模型透明度 */
|
|
1545
2035
|
opacity: number;
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
2036
|
+
originOpacity: number;
|
|
2037
|
+
/** 楼层参数*/
|
|
2038
|
+
floorIndex: number;
|
|
2039
|
+
/** 楼层切割参数*/
|
|
2040
|
+
floorInfo: THREE_2.Vector3 | null;
|
|
2041
|
+
/** 全局楼层参数*/
|
|
2042
|
+
globalFloorInfo: THREE_2.Vector3[] | null;
|
|
2043
|
+
/** 对外模型裁切参数*/
|
|
2044
|
+
clippers: ClipperParameter | ClipperParameter[] | null;
|
|
2045
|
+
/** 对内模型裁切参数 裁切平面*/
|
|
2046
|
+
clipperPlanesArray: Float32Array | null;
|
|
2047
|
+
/** 对内模型裁切参数 裁切盒关联楼层*/
|
|
2048
|
+
clipperFloors: number[] | null;
|
|
2049
|
+
/** 模型颜色*/
|
|
2050
|
+
modelColorInfo: THREE_2.Vector3 | null;
|
|
1560
2051
|
constructor(parameters?: Partial<PBMParameters>);
|
|
1561
2052
|
}
|
|
1562
2053
|
|
|
@@ -1568,39 +2059,43 @@ export declare class PBMMesh extends THREE_2.Mesh<THREE_2.BufferGeometry, PBMMat
|
|
|
1568
2059
|
needsRender: boolean;
|
|
1569
2060
|
}
|
|
1570
2061
|
|
|
1571
|
-
|
|
1572
|
-
export declare interface PBMParameters {
|
|
2062
|
+
export declare interface PBMPanoPicture {
|
|
1573
2063
|
/** 起始点位全景图 */
|
|
1574
|
-
|
|
2064
|
+
map: THREE_2.CubeTexture | TileCubeTextureTarget;
|
|
2065
|
+
/** 亮度增益 */
|
|
2066
|
+
luminanceMap: null | THREE_2.CubeTexture | TileCubeTextureTarget;
|
|
1575
2067
|
/** 起始点全景图变换矩阵 4x4 */
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
2068
|
+
matrix: THREE_2.Matrix4;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
/** PBM 材质参数 */
|
|
2072
|
+
export declare interface PBMParameters {
|
|
2073
|
+
/** 起始点 */
|
|
2074
|
+
pano0: PBMPanoPicture | null;
|
|
2075
|
+
/** 结束点 */
|
|
2076
|
+
pano1: PBMPanoPicture | null;
|
|
1581
2077
|
/** 模型贴图和全景图的混合程度 [0-1] */
|
|
1582
2078
|
modelAlpha: number;
|
|
1583
2079
|
/** 全景图混合程度 [0-1] */
|
|
1584
2080
|
progress: number;
|
|
1585
2081
|
/** 全景图通过过度黑色混合 */
|
|
1586
2082
|
useBlackTransition: boolean;
|
|
1587
|
-
perspToOrtho: number;
|
|
1588
2083
|
/** 模型透明度 */
|
|
1589
2084
|
opacity: number;
|
|
1590
|
-
/**
|
|
1591
|
-
|
|
1592
|
-
/**
|
|
1593
|
-
|
|
1594
|
-
/**
|
|
1595
|
-
|
|
1596
|
-
/**
|
|
1597
|
-
|
|
1598
|
-
/**
|
|
1599
|
-
|
|
1600
|
-
/**
|
|
1601
|
-
|
|
1602
|
-
/**
|
|
1603
|
-
|
|
2085
|
+
/** 整体楼层信息*/
|
|
2086
|
+
globalFloorInfo?: THREE_2.Vector3[] | null;
|
|
2087
|
+
/** 楼层参数*/
|
|
2088
|
+
floorIndex: number;
|
|
2089
|
+
/** 楼层切割参数*/
|
|
2090
|
+
floorInfo?: THREE_2.Vector3 | null;
|
|
2091
|
+
/** 模型裁切参数(工程侧调用)*/
|
|
2092
|
+
clippers?: ClipperParameter | ClipperParameter[] | null;
|
|
2093
|
+
/** 模型裁切平面参数(内部调用) */
|
|
2094
|
+
clipperPlanesArray?: Float32Array | null;
|
|
2095
|
+
/** 模型裁切平面参数(内部调用) */
|
|
2096
|
+
clipperFloors?: number[] | null;
|
|
2097
|
+
/** 模型颜色*/
|
|
2098
|
+
modelColorInfo?: THREE_2.Vector3 | null;
|
|
1604
2099
|
}
|
|
1605
2100
|
|
|
1606
2101
|
/**
|
|
@@ -1608,17 +2103,19 @@ export declare interface PBMParameters {
|
|
|
1608
2103
|
* [[include: coordinate.md]]
|
|
1609
2104
|
*/
|
|
1610
2105
|
export declare interface Pose {
|
|
1611
|
-
/** 相机俯仰角 */
|
|
1612
|
-
longitude: number;
|
|
1613
2106
|
/** 相机偏航角 */
|
|
2107
|
+
longitude: number;
|
|
2108
|
+
/** 相机俯仰角 */
|
|
1614
2109
|
latitude: number;
|
|
1615
2110
|
/** 相机可视角度(垂直)*/
|
|
1616
2111
|
fov: number;
|
|
1617
2112
|
/** 相机位置*/
|
|
1618
2113
|
offset: THREE_2.Vector3;
|
|
2114
|
+
/** 相机距离 */
|
|
2115
|
+
distance: number;
|
|
1619
2116
|
}
|
|
1620
2117
|
|
|
1621
|
-
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", "wantsPanGesture", "wantsInteriaPan", "panGesture", "interiaPan", "wantsPinchGesture", "pinchGesture", "wantsMouseWheel", "mouseWheel", "wantsShowIntersectionOnModel", "intersectionOnModelUpdate", "intersectionHidden", "textureStartLoad", "textureLoading", "textureAbort", "textureLoaded", "textureError"];
|
|
2118
|
+
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", "webXRSelected"];
|
|
1622
2119
|
|
|
1623
2120
|
/** Five 场景*/
|
|
1624
2121
|
export declare class Scene extends THREE_2.Scene {
|
|
@@ -1660,8 +2157,6 @@ export declare interface State extends Pose {
|
|
|
1660
2157
|
panoIndex: number;
|
|
1661
2158
|
}
|
|
1662
2159
|
|
|
1663
|
-
export declare function stringifyWork(work: Work): LooseWork;
|
|
1664
|
-
|
|
1665
2160
|
/**
|
|
1666
2161
|
* 监听者模式
|
|
1667
2162
|
* @template T - 预设的监听回调类型
|
|
@@ -1740,69 +2235,753 @@ export declare namespace SubscribeMixinType {
|
|
|
1740
2235
|
}
|
|
1741
2236
|
}
|
|
1742
2237
|
|
|
1743
|
-
export declare
|
|
2238
|
+
export declare class TextureLoader {
|
|
2239
|
+
private timeout?;
|
|
2240
|
+
private allowHosts?;
|
|
2241
|
+
private requestProxy?;
|
|
2242
|
+
private networkSubscribe?;
|
|
2243
|
+
constructor(options: NetworkOptions);
|
|
2244
|
+
setAllowHosts(allowHosts: string[]): void;
|
|
2245
|
+
setRequestProxy(requestProxy: (url: string) => string): void;
|
|
2246
|
+
setNetworkSubscribe(networkSubscribe: NetworkSubscribe): void;
|
|
2247
|
+
loadTexture(source: string, options?: {
|
|
2248
|
+
imageURL?: {
|
|
2249
|
+
transform?: (source: string, options: ImageURLOptions) => string;
|
|
2250
|
+
options?: ImageURLOptions;
|
|
2251
|
+
};
|
|
2252
|
+
flipY?: boolean;
|
|
2253
|
+
format?: THREE_2.PixelFormat;
|
|
2254
|
+
minFilter?: THREE_2.TextureFilter;
|
|
2255
|
+
magFilter?: THREE_2.TextureFilter;
|
|
2256
|
+
wrapS?: THREE_2.Wrapping;
|
|
2257
|
+
wrapT?: THREE_2.Wrapping;
|
|
2258
|
+
maxSize?: THREE_2.Vector2;
|
|
2259
|
+
viaAjax?: boolean;
|
|
2260
|
+
}, onLoad?: (response: NetworkResponse<THREE_2.Texture>) => void, onError?: (error: Error) => void, onProgress?: (percent: number) => void, renderer?: THREE_2.WebGLRenderer): Promise<NetworkResponse<THREE_2.Texture>>;
|
|
2261
|
+
loadCubeTexture(sources: WorkCubeImage, options: {
|
|
2262
|
+
imageURL?: {
|
|
2263
|
+
transform?: (source: string, options: ImageURLOptions) => string;
|
|
2264
|
+
options?: ImageURLOptions;
|
|
2265
|
+
};
|
|
2266
|
+
format?: THREE_2.PixelFormat;
|
|
2267
|
+
minFilter?: THREE_2.TextureFilter;
|
|
2268
|
+
magFilter?: THREE_2.TextureFilter;
|
|
2269
|
+
wrapS?: THREE_2.Wrapping;
|
|
2270
|
+
wrapT?: THREE_2.Wrapping;
|
|
2271
|
+
viaAjax?: boolean;
|
|
2272
|
+
}, onLoad: (response: NetworkResponse<THREE_2.CubeTexture, NetWorkMeta[]>) => void, onError: (error: Error) => void, onProgress: (percent: number) => void, renderer: THREE_2.WebGLRenderer): Promise<NetworkResponse<THREE_2.CubeTexture, NetWorkMeta[]>>;
|
|
2273
|
+
loadTiledCubeTexture(sources: WorkCubeImage, tileSources: WorkTile[], options: {
|
|
2274
|
+
tileImageSize?: number;
|
|
2275
|
+
tileMaxLevel?: number;
|
|
2276
|
+
imageURL?: {
|
|
2277
|
+
transform?: (source: string, options: ImageURLOptions) => string;
|
|
2278
|
+
options?: ImageURLOptions;
|
|
2279
|
+
};
|
|
2280
|
+
format?: THREE_2.PixelFormat;
|
|
2281
|
+
minFilter?: THREE_2.TextureFilter;
|
|
2282
|
+
magFilter?: THREE_2.TextureFilter;
|
|
2283
|
+
wrapS?: THREE_2.Wrapping;
|
|
2284
|
+
wrapT?: THREE_2.Wrapping;
|
|
2285
|
+
viaAjax?: boolean;
|
|
2286
|
+
}, onLoad: (response: NetworkResponse<TileCubeTextureTarget, NetWorkMeta[]>) => void, onError: (error: Error) => void, onProgress: (percent: number) => void, renderer: THREE_2.WebGLRenderer): Promise<NetworkResponse<TileCubeTextureTarget, NetWorkMeta[]>>;
|
|
1744
2287
|
}
|
|
1745
2288
|
|
|
1746
|
-
|
|
2289
|
+
/**
|
|
2290
|
+
* 图片参数
|
|
2291
|
+
*/
|
|
2292
|
+
export declare interface TextureOptions {
|
|
1747
2293
|
/**
|
|
1748
|
-
*
|
|
1749
|
-
* @
|
|
1750
|
-
*
|
|
2294
|
+
* url 地址转化
|
|
2295
|
+
* @param url - 原始地址
|
|
2296
|
+
* @param options - 当前地址参数
|
|
2297
|
+
* @returns 转化后地址
|
|
2298
|
+
*/
|
|
2299
|
+
transform?: (url: string, options: ImageURLOptions) => string;
|
|
2300
|
+
/** 图片尺寸参数 尽量使用 2 的幂次 如 256 512 1024 */
|
|
2301
|
+
size?: number;
|
|
2302
|
+
/** 图片质量参数(0-100) */
|
|
2303
|
+
quality?: number;
|
|
2304
|
+
/** 图片格式参数 */
|
|
2305
|
+
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
2306
|
+
/** 针对 textureOptions 是否自动通过模型贴图的数量计算需要的模型贴图的尺寸 默认 true */
|
|
2307
|
+
autoResize?: boolean;
|
|
2308
|
+
/** 锐化参数 海外不支持 */
|
|
2309
|
+
sharpen?: number;
|
|
2310
|
+
mappings?: ImageURLMappings;
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
/**
|
|
2314
|
+
* A Tile3DHeader represents a tile as Tileset3D. When a tile is first created, its content is not loaded;
|
|
2315
|
+
* the content is loaded on-demand when needed based on the view.
|
|
2316
|
+
* Do not construct this directly, instead access tiles through {@link Tileset3D#tileVisible}.
|
|
2317
|
+
*/
|
|
2318
|
+
export declare class Tile3D {
|
|
2319
|
+
cacheNode?: TileCacheNode<Tile3D>;
|
|
2320
|
+
tileset: Tileset3D;
|
|
2321
|
+
header: TilesetJSONNode;
|
|
2322
|
+
content?: TileContent;
|
|
2323
|
+
parent?: Tile3D;
|
|
2324
|
+
boundingVolume: TileOrientedBoundingBox;
|
|
2325
|
+
contentState: "UNLOADED" | "LOADING" | "PROCESSING" | "READY" | "FAILED";
|
|
2326
|
+
children: Tile3D[];
|
|
2327
|
+
depth: number;
|
|
2328
|
+
selectionDepth: number;
|
|
2329
|
+
transform: Matrix4;
|
|
2330
|
+
computedTransform: Matrix4;
|
|
2331
|
+
frameNumber: number;
|
|
2332
|
+
touchedFrameNumber: number;
|
|
2333
|
+
requestedFrameNumber: number;
|
|
2334
|
+
selectedFrameNumber: number;
|
|
2335
|
+
distanceToCamera: number;
|
|
2336
|
+
centerZDepth: number;
|
|
2337
|
+
screenSpaceError: number;
|
|
2338
|
+
visibilityPlaneMask: number;
|
|
2339
|
+
visible: boolean;
|
|
2340
|
+
shouldRefine: boolean;
|
|
2341
|
+
/**
|
|
2342
|
+
* @constructs
|
|
2343
|
+
* Create a TileHeader instance
|
|
2344
|
+
* @param tileset - Tileset3D instance
|
|
2345
|
+
* @param header - tile header - JSON loaded from a dataset
|
|
2346
|
+
* @param parentHeader - parent TileHeader instance
|
|
2347
|
+
*/
|
|
2348
|
+
constructor(tileset: Tileset3D, header: TilesetJSONNode, parentHeader?: Tile3D);
|
|
2349
|
+
get id(): string;
|
|
2350
|
+
get refine(): "REPLACE" | "ADD";
|
|
2351
|
+
get type(): "EMPTY" | "SCENEGRAPH" | "MESH";
|
|
2352
|
+
get contentUrl(): string;
|
|
2353
|
+
get siblingIndex(): number;
|
|
2354
|
+
get lodMetricType(): "geometricError";
|
|
2355
|
+
get lodMetricValue(): number;
|
|
2356
|
+
get hasEmptyContent(): boolean;
|
|
2357
|
+
get selected(): boolean;
|
|
2358
|
+
/** Returns true if tile is not an empty tile and not an external tileset */
|
|
2359
|
+
get hasRenderContent(): boolean;
|
|
2360
|
+
/** Returns true if tile has children */
|
|
2361
|
+
get hasChildren(): boolean;
|
|
2362
|
+
/**
|
|
2363
|
+
* Determines if the tile's content is ready. This is automatically `true` for
|
|
2364
|
+
* tiles with empty content.
|
|
2365
|
+
*/
|
|
2366
|
+
get contentReady(): boolean;
|
|
2367
|
+
/**
|
|
2368
|
+
* Determines if the tile has available content to render. `true` if the tile's
|
|
2369
|
+
* content is ready or if it has expired content this renders while new content loads; otherwise,
|
|
2370
|
+
*/
|
|
2371
|
+
get contentAvailable(): boolean;
|
|
2372
|
+
/** Returns true if tile has renderable content but it's unloaded */
|
|
2373
|
+
get hasUnloadedContent(): boolean;
|
|
2374
|
+
/**
|
|
2375
|
+
* Determines if the tile's content has not be requested. `true` if tile's
|
|
2376
|
+
* content has not be requested; otherwise, `false`.
|
|
2377
|
+
*/
|
|
2378
|
+
get contentUnloaded(): boolean;
|
|
2379
|
+
get contentFailed(): boolean;
|
|
2380
|
+
/** Get the tile's screen space error. */
|
|
2381
|
+
getScreenSpaceError(frameState: TileFrameState, useParentLodMetric: boolean): number;
|
|
2382
|
+
private getPriority;
|
|
2383
|
+
/**
|
|
2384
|
+
* Requests the tile's content.
|
|
2385
|
+
* The request may not be made if the Request Scheduler can't prioritize it.
|
|
2386
|
+
*/
|
|
2387
|
+
loadContent(): Promise<boolean>;
|
|
2388
|
+
unloadContent(): void;
|
|
2389
|
+
/**
|
|
2390
|
+
* Update the tile's visibility
|
|
2391
|
+
*/
|
|
2392
|
+
updateVisibility(frameState: TileFrameState): void;
|
|
2393
|
+
private visibility;
|
|
2394
|
+
/**
|
|
2395
|
+
* Computes the (potentially approximate) distance from the closest point of the tile's bounding volume to the camera.
|
|
2396
|
+
* @param frameState - The frame state.
|
|
2397
|
+
* @returns The distance, in meters, or zero if the camera is inside the bounding volume.
|
|
2398
|
+
*/
|
|
2399
|
+
private distanceToTile;
|
|
2400
|
+
private updateTransform;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
export declare class Tile3DModel extends PBMContainer {
|
|
2404
|
+
tileset?: Tileset3D;
|
|
2405
|
+
private options;
|
|
2406
|
+
private nodeGroup;
|
|
2407
|
+
private boundingGroup;
|
|
2408
|
+
private nodes;
|
|
2409
|
+
private boundings;
|
|
2410
|
+
private unloadTileQueue;
|
|
2411
|
+
private timer;
|
|
2412
|
+
private clock;
|
|
2413
|
+
private lastCameraTransform;
|
|
2414
|
+
private lastCameraAspect;
|
|
2415
|
+
private lastCameraFov;
|
|
2416
|
+
private sseDenominator;
|
|
2417
|
+
private lastCamera;
|
|
2418
|
+
private lastRenderer;
|
|
2419
|
+
private enabled;
|
|
2420
|
+
listener: Subscribe<TileEventType>;
|
|
2421
|
+
private basicTiles;
|
|
2422
|
+
private parseTask;
|
|
2423
|
+
private originModel;
|
|
2424
|
+
private renderer?;
|
|
2425
|
+
constructor(loaderOptions: Partial<Tile3DModelLoaderOptions>, originModel: PBMContainer, renderer?: THREE_2.WebGLRenderer);
|
|
2426
|
+
get enable(): boolean;
|
|
2427
|
+
set enable(value: boolean);
|
|
2428
|
+
load(url: WorkModelTiles): void;
|
|
2429
|
+
update(renderer: THREE_2.WebGLRenderer, camera: Camera): void;
|
|
2430
|
+
private tilesetUpdate;
|
|
2431
|
+
reset(): void;
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
/** Advanced loader options */
|
|
2435
|
+
export declare interface Tile3DModelLoaderOptions {
|
|
2436
|
+
updateInterval: number;
|
|
2437
|
+
maxMemoryUsage: number;
|
|
2438
|
+
maxScreenSpaceError: number;
|
|
2439
|
+
viewDistanceScale: number;
|
|
2440
|
+
throttleRequests: boolean;
|
|
2441
|
+
maxRequests: number;
|
|
2442
|
+
onNodeCreated: (node: PBMGroup) => void;
|
|
2443
|
+
allowHosts?: string[];
|
|
2444
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
2445
|
+
networkSubscribe?: NetworkSubscribe;
|
|
2446
|
+
maxDepth: number;
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
export declare const TILE_EVENT: readonly ["tileTextureUpload", "basicTileLoaded"];
|
|
2450
|
+
|
|
2451
|
+
export declare class TileBoundingSphere {
|
|
2452
|
+
center: Vector3;
|
|
2453
|
+
radius: number;
|
|
2454
|
+
constructor(center?: number[], radius?: number);
|
|
2455
|
+
fromCenterRadius(center: number[], radius: number): this;
|
|
2456
|
+
fromCornerPoints(corner: number[], oppositeCorner: number[]): this;
|
|
2457
|
+
equals(right: TileBoundingSphere): boolean;
|
|
2458
|
+
clone(): TileBoundingSphere;
|
|
2459
|
+
union(boundingSphere: TileBoundingSphere): TileBoundingSphere;
|
|
2460
|
+
expand(point: number[]): this;
|
|
2461
|
+
transform(transform: Matrix4): this;
|
|
2462
|
+
distanceSquaredTo(point: number[]): number;
|
|
2463
|
+
distanceTo(point: number[]): number;
|
|
2464
|
+
intersectPlane(plane: Plane): 0 | 1 | -1;
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
export declare interface TileBoundingVolume {
|
|
2468
|
+
/**
|
|
2469
|
+
* Applies a 4x4 affine transformation matrix to a bounding sphere.
|
|
2470
|
+
* @param sphere - The bounding sphere to apply the transformation to.
|
|
2471
|
+
* @param transform - The transformation matrix to apply to the bounding sphere.
|
|
2472
|
+
* @returns itself, i.e. the modified BoundingVolume.
|
|
1751
2473
|
*/
|
|
1752
|
-
|
|
2474
|
+
transform(transform: readonly number[]): this;
|
|
2475
|
+
/** Computes the estimated distance squared from the closest point on a bounding sphere to a point. */
|
|
2476
|
+
distanceSquaredTo(point: readonly number[]): number;
|
|
2477
|
+
/** Computes the estimated distance from the closest point on a bounding sphere to a point. */
|
|
2478
|
+
distanceTo(point: readonly number[]): number;
|
|
2479
|
+
/**
|
|
2480
|
+
* Determines which side of a plane the oriented bounding box is located.
|
|
2481
|
+
*
|
|
2482
|
+
* @param plane - The plane to test against.
|
|
2483
|
+
* @returns
|
|
2484
|
+
* - `INTERSECTION.INSIDE` if the entire box is on the side of the plane the normal is pointing.
|
|
2485
|
+
* - `INTERSECTION.OUTSIDE` if the entire box is on the opposite side.
|
|
2486
|
+
* - `INTERSECTION.INTERSECTING` if the box intersects the plane.
|
|
2487
|
+
*/
|
|
2488
|
+
intersectPlane(plane: Plane): number;
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
export declare class TileCacheNode<T> {
|
|
2492
|
+
item: T;
|
|
2493
|
+
previous: TileCacheNode<T> | null;
|
|
2494
|
+
next: TileCacheNode<T> | null;
|
|
2495
|
+
constructor(item: T, previous: TileCacheNode<T> | null, next: TileCacheNode<T> | null);
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
export declare interface TileContent {
|
|
2499
|
+
version: 1;
|
|
2500
|
+
magic: number;
|
|
2501
|
+
byteLength: number;
|
|
2502
|
+
header: {
|
|
2503
|
+
featureTableJsonByteLength: number;
|
|
2504
|
+
featureTableBinaryByteLength: number;
|
|
2505
|
+
batchTableJsonByteLength: number;
|
|
2506
|
+
batchTableBinaryByteLength: number;
|
|
2507
|
+
batchLength: number;
|
|
2508
|
+
};
|
|
2509
|
+
featureTableJson: Record<string, any>;
|
|
2510
|
+
featureTableBinary: Uint8Array;
|
|
2511
|
+
batchTableJson: Record<string, any>;
|
|
2512
|
+
batchTableBinary: Uint8Array;
|
|
2513
|
+
rotateYtoZ: boolean;
|
|
2514
|
+
gltfUpAxis: "X" | "Y" | "Z";
|
|
2515
|
+
gltfArrayBuffer: ArrayBuffer;
|
|
2516
|
+
gltfByteOffset: number;
|
|
2517
|
+
gltfByteLength: number;
|
|
2518
|
+
rtcCenter?: Float32Array;
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
export declare interface TileCubeNode {
|
|
2522
|
+
level: number;
|
|
2523
|
+
face: "up" | "down" | "left" | "right" | "front" | "back";
|
|
2524
|
+
position: THREE_2.Vector2;
|
|
2525
|
+
size: number;
|
|
2526
|
+
box: THREE_2.Box3;
|
|
2527
|
+
children: TileCubeNode[];
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
export declare class TileCubeTextureTarget {
|
|
2531
|
+
private tileTree;
|
|
2532
|
+
private tileSources;
|
|
2533
|
+
private options;
|
|
2534
|
+
private renderer;
|
|
2535
|
+
name: string;
|
|
2536
|
+
needsRender: boolean;
|
|
2537
|
+
private disposed;
|
|
2538
|
+
private loadedCubeNodes;
|
|
2539
|
+
private loadingCubeNodes;
|
|
2540
|
+
private baseCubeTexture;
|
|
2541
|
+
private _cubeRenderTarget;
|
|
2542
|
+
private textures;
|
|
2543
|
+
constructor(baseCubeTexture: THREE_2.CubeTexture, tileTree: TileCubeTree, tileSources: WorkTile[], options: {
|
|
2544
|
+
textureSize: number;
|
|
2545
|
+
tileImageSize: number;
|
|
2546
|
+
textureLoader: TextureLoader;
|
|
2547
|
+
imageURL?: {
|
|
2548
|
+
transform?: (source: string, options: ImageURLOptions) => string;
|
|
2549
|
+
options?: ImageURLOptions;
|
|
2550
|
+
};
|
|
2551
|
+
format?: THREE_2.PixelFormat;
|
|
2552
|
+
minFilter?: THREE_2.TextureFilter;
|
|
2553
|
+
magFilter?: THREE_2.TextureFilter;
|
|
2554
|
+
wrapS?: THREE_2.Wrapping;
|
|
2555
|
+
wrapT?: THREE_2.Wrapping;
|
|
2556
|
+
}, renderer: THREE_2.WebGLRenderer);
|
|
2557
|
+
get cubeRenderTarget(): THREE_2.WebGLCubeRenderTarget | null;
|
|
2558
|
+
set cubeRenderTarget(cubeRenderTarget: THREE_2.WebGLCubeRenderTarget | null);
|
|
2559
|
+
private requestTile;
|
|
2560
|
+
update(frustum: THREE_2.Frustum, level: number): void;
|
|
2561
|
+
get tilePending(): number;
|
|
2562
|
+
get texture(): THREE_2.Texture;
|
|
2563
|
+
dispose(): void;
|
|
2564
|
+
}
|
|
2565
|
+
|
|
2566
|
+
export declare interface TileCubeTree {
|
|
2567
|
+
children: TileCubeNode[];
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
export declare class TileCullingVolume {
|
|
2571
|
+
static get MASK_OUTSIDE(): number;
|
|
2572
|
+
static get MASK_INSIDE(): number;
|
|
2573
|
+
static get MASK_INDETERMINATE(): number;
|
|
2574
|
+
planes: Plane[];
|
|
2575
|
+
constructor(planes?: Plane[]);
|
|
2576
|
+
fromBoundingSphere(boundingSphere: {
|
|
2577
|
+
center: Vector3;
|
|
2578
|
+
radius: number;
|
|
2579
|
+
}): this;
|
|
2580
|
+
computeVisibilityWithPlaneMask(boundingVolume: TileBoundingVolume, parentPlaneMask: number): number;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
export declare type TileEventType = {
|
|
2584
|
+
/**
|
|
2585
|
+
* 最低级的瓦片加载(全局)
|
|
2586
|
+
*/
|
|
2587
|
+
basicTileLoaded(): void;
|
|
2588
|
+
/**
|
|
2589
|
+
* 瓦片材质上传
|
|
2590
|
+
*/
|
|
2591
|
+
tileTextureUpload(id: any): void;
|
|
2592
|
+
};
|
|
2593
|
+
|
|
2594
|
+
export declare type TileFrameState = {
|
|
2595
|
+
camera: {
|
|
2596
|
+
position: number[];
|
|
2597
|
+
direction: number[];
|
|
2598
|
+
up: number[];
|
|
2599
|
+
};
|
|
2600
|
+
height: number;
|
|
2601
|
+
cullingVolume: TileCullingVolume;
|
|
2602
|
+
frameNumber: number;
|
|
2603
|
+
sseDenominator: number;
|
|
2604
|
+
};
|
|
2605
|
+
|
|
2606
|
+
export declare class TileOrientedBoundingBox {
|
|
2607
|
+
center: Vector3;
|
|
2608
|
+
halfAxes: Matrix3;
|
|
2609
|
+
constructor(center?: number[], halfAxes?: number[]);
|
|
2610
|
+
clone(): TileOrientedBoundingBox;
|
|
2611
|
+
equals(right: TileOrientedBoundingBox): boolean;
|
|
2612
|
+
getBoundingSphere(result?: TileBoundingSphere): TileBoundingSphere;
|
|
2613
|
+
intersectPlane(plane: Plane): 0 | 1 | -1;
|
|
2614
|
+
distanceTo(point: number[]): number;
|
|
2615
|
+
distanceSquaredTo(point: number[]): number;
|
|
2616
|
+
computePlaneDistances(position: Vector3, direction: Vector3, result?: number[]): number[];
|
|
2617
|
+
transform(transformation: number[]): this;
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
/** Tracks one request */
|
|
2621
|
+
export declare type TileRequest<Identiy> = {
|
|
2622
|
+
identiy: Identiy;
|
|
2623
|
+
priority: number;
|
|
2624
|
+
getPriority: (identiy: Identiy) => number;
|
|
2625
|
+
resolve: (requestResult: TileRequestResult) => void;
|
|
2626
|
+
};
|
|
2627
|
+
|
|
2628
|
+
export declare type TileRequestResult = null | {
|
|
2629
|
+
done: () => void;
|
|
2630
|
+
};
|
|
2631
|
+
|
|
2632
|
+
/**
|
|
2633
|
+
* Used to issue a request, without having them "deeply queued" by the browser.
|
|
2634
|
+
* @todo - Track requests globally, across multiple servers
|
|
2635
|
+
*/
|
|
2636
|
+
export declare class TileRequestScheduler<Identiy> {
|
|
2637
|
+
private props;
|
|
2638
|
+
private activeRequestCount;
|
|
2639
|
+
/** Tracks the number of active requests and prioritizes/cancels queued requests. */
|
|
2640
|
+
private requestQueue;
|
|
2641
|
+
private requestMap;
|
|
2642
|
+
private deferred;
|
|
2643
|
+
constructor(props?: TileRequestSchedulerOptions);
|
|
2644
|
+
/**
|
|
2645
|
+
* Called by an application that wants to issue a request, without having it deeply queued by the browser
|
|
2646
|
+
*
|
|
2647
|
+
* When the returned promise resolved, it is OK for the application to issue a request.
|
|
2648
|
+
* The promise resolves to an object that contains a `done` method.
|
|
2649
|
+
* When the application's request has completed (or failed), the application must call the `done` function
|
|
2650
|
+
*
|
|
2651
|
+
* @param identiy - Identiy
|
|
2652
|
+
* @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
|
|
2653
|
+
* @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
|
|
2654
|
+
*/
|
|
2655
|
+
scheduleRequest(identiy: Identiy, getPriority?: (identiy: Identiy) => number): Promise<TileRequestResult>;
|
|
2656
|
+
private issueRequest;
|
|
2657
|
+
/** We check requests asynchronously, to prevent multiple updates */
|
|
2658
|
+
private issueNewRequests;
|
|
2659
|
+
/** Refresh all requests */
|
|
2660
|
+
private issueNewRequestsAsync;
|
|
2661
|
+
/** Ensure all requests have updated priorities, and that no longer valid requests are cancelled */
|
|
2662
|
+
private updateAllRequests;
|
|
2663
|
+
/** Update a single request by calling the callback */
|
|
2664
|
+
private updateRequest;
|
|
2665
|
+
}
|
|
2666
|
+
|
|
2667
|
+
/** RequestScheduler Options */
|
|
2668
|
+
export declare type TileRequestSchedulerOptions = {
|
|
2669
|
+
throttleRequests?: boolean;
|
|
2670
|
+
maxRequests?: number;
|
|
2671
|
+
};
|
|
2672
|
+
|
|
2673
|
+
export declare class Tileset3D {
|
|
2674
|
+
rawJson: any;
|
|
2675
|
+
options: Tileset3dOptions;
|
|
2676
|
+
root: Tile3D;
|
|
2677
|
+
traverser: Tileset3DTraverser;
|
|
2678
|
+
cache: TilesetCache;
|
|
2679
|
+
requestScheduler: TileRequestScheduler<string>;
|
|
2680
|
+
selectedTiles: Tile3D[];
|
|
2681
|
+
requestedTiles: Tile3D[];
|
|
2682
|
+
memoryUsageInBytes: number;
|
|
2683
|
+
frameNumber: number;
|
|
2684
|
+
private _tiles;
|
|
2685
|
+
private pendingCount;
|
|
2686
|
+
b3dmMapping: TilesetJSON['b3dmMapping'];
|
|
2687
|
+
/**
|
|
2688
|
+
* Create a new Tileset3D
|
|
2689
|
+
* @param json - TilesetJSON
|
|
2690
|
+
* @param options - Tileset3dOptions
|
|
2691
|
+
*/
|
|
2692
|
+
constructor(json: TilesetJSON, options: Tileset3dOptions);
|
|
2693
|
+
get maxMemoryUsage(): number;
|
|
2694
|
+
get asset(): any;
|
|
2695
|
+
get type(): any;
|
|
2696
|
+
get basePath(): any;
|
|
2697
|
+
get modelMatrix(): Matrix4;
|
|
2698
|
+
get geometricError(): number;
|
|
2699
|
+
get lodMetricType(): number;
|
|
2700
|
+
get lodMetricValue(): number;
|
|
2701
|
+
get refine(): 'ADD' | "REPLACE";
|
|
2702
|
+
get tiles(): Tile3D[];
|
|
2703
|
+
get floorInfo(): TilesetJSON['floorInfo'];
|
|
2704
|
+
/** Release resources */
|
|
2705
|
+
reset(): void;
|
|
2706
|
+
/** Is the tileset loaded (update needs to have been called at least once) */
|
|
2707
|
+
isLoaded(): boolean;
|
|
2708
|
+
/**
|
|
2709
|
+
* The callback to post-process tiles after traversal procedure
|
|
2710
|
+
* @param frameState - frame state for tile culling
|
|
2711
|
+
*/
|
|
2712
|
+
private onTraversalEnd;
|
|
2713
|
+
loadTile(tile: Tile3D): void;
|
|
2714
|
+
unloadTile(tile: Tile3D): void;
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
export declare interface Tileset3dOptions {
|
|
2718
|
+
throttleRequests: boolean;
|
|
2719
|
+
maxRequests: number;
|
|
2720
|
+
maxMemoryUsage: number;
|
|
2721
|
+
modelMatrix: Matrix4;
|
|
2722
|
+
maxScreenSpaceError: number;
|
|
2723
|
+
viewDistanceScale: number;
|
|
2724
|
+
onTileLoad: (tile: Tile3D) => any;
|
|
2725
|
+
onTileUnload: (tile: Tile3D) => any;
|
|
2726
|
+
onTileError: (tile: Tile3D, message: string) => any;
|
|
2727
|
+
contentLoader: (tile: Tile3D) => Promise<void> | undefined;
|
|
2728
|
+
onTraversalComplete: (selectedTiles: Tile3D[]) => Tile3D[];
|
|
2729
|
+
allowHosts?: string[];
|
|
2730
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
2731
|
+
networkSubscribe?: NetworkSubscribe;
|
|
2732
|
+
maxDepth: number;
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
export declare class Tileset3DTraverser {
|
|
2736
|
+
root: Tile3D | null;
|
|
2737
|
+
options: TilesetTraverserProps;
|
|
2738
|
+
requestedTiles: Record<string, Tile3D>;
|
|
2739
|
+
selectedTiles: Record<string, Tile3D>;
|
|
2740
|
+
emptyTiles: Record<string, Tile3D>;
|
|
2741
|
+
private _traversalStack;
|
|
2742
|
+
private _emptyTraversalStack;
|
|
2743
|
+
private _frameNumber;
|
|
2744
|
+
private maxDepth;
|
|
2745
|
+
constructor(options: TilesetTraverserProps);
|
|
2746
|
+
traverse(root: Tile3D, frameState: TileFrameState): void;
|
|
2747
|
+
reset(): void;
|
|
2748
|
+
private executeTraversal;
|
|
2749
|
+
private updateChildTiles;
|
|
2750
|
+
private updateAndPushChildren;
|
|
2751
|
+
updateTile(tile: Tile3D, frameState: TileFrameState): void;
|
|
2752
|
+
selectTile(tile: Tile3D, frameState: TileFrameState): void;
|
|
2753
|
+
loadTile(tile: Tile3D, frameNumber: number): void;
|
|
2754
|
+
touchTile(tile: Tile3D, frameState: TileFrameState): void;
|
|
2755
|
+
private canTraverse;
|
|
2756
|
+
private shouldLoadTile;
|
|
2757
|
+
private shouldSelectTile;
|
|
2758
|
+
private shouldRefine;
|
|
2759
|
+
private updateTileVisibility;
|
|
2760
|
+
private meetsScreenSpaceErrorEarly;
|
|
2761
|
+
private compareDistanceToCamera;
|
|
2762
|
+
private anyChildrenVisible;
|
|
2763
|
+
private executeEmptyTraversal;
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
export declare class TilesetCache {
|
|
2767
|
+
private list;
|
|
2768
|
+
private sentinel;
|
|
2769
|
+
constructor();
|
|
2770
|
+
reset(): void;
|
|
2771
|
+
touch(tile: Tile3D): void;
|
|
2772
|
+
add(tile: Tile3D, addCallback?: (tile: Tile3D) => void): void;
|
|
2773
|
+
unloadTile(tile: Tile3D, unloadCallback?: (tile: Tile3D) => void): void;
|
|
2774
|
+
unloadTiles(isOverMemory: () => boolean, unloadCallback?: (tile: Tile3D) => void): void;
|
|
2775
|
+
}
|
|
2776
|
+
|
|
2777
|
+
export declare interface TilesetJSON {
|
|
2778
|
+
asset: {
|
|
2779
|
+
gltfUpAxis: "X" | "Y" | "Z";
|
|
2780
|
+
version: "1.0";
|
|
2781
|
+
};
|
|
2782
|
+
basePath: string;
|
|
2783
|
+
lodMetricType: "geometricError";
|
|
2784
|
+
geometricError: number;
|
|
2785
|
+
lodMetricValue: number;
|
|
2786
|
+
root: TilesetJSONNode;
|
|
2787
|
+
type: "TILES3D";
|
|
2788
|
+
floorInfo: {
|
|
2789
|
+
ground: number;
|
|
2790
|
+
height: number;
|
|
2791
|
+
}[];
|
|
2792
|
+
b3dmMapping: {
|
|
2793
|
+
b3dm_base_url: string;
|
|
2794
|
+
b3dm_url: Record<string, string>;
|
|
2795
|
+
};
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2798
|
+
export declare interface TilesetJSONNode {
|
|
2799
|
+
boundingVolume: {
|
|
2800
|
+
box: number[];
|
|
2801
|
+
};
|
|
2802
|
+
content: {
|
|
2803
|
+
uri: string;
|
|
2804
|
+
};
|
|
2805
|
+
id: string;
|
|
2806
|
+
transform?: number[];
|
|
2807
|
+
contentUrl?: string;
|
|
2808
|
+
children: TilesetJSONNode[];
|
|
2809
|
+
lodMetricType: "geometricError";
|
|
2810
|
+
geometricError: number;
|
|
2811
|
+
lodMetricValue: number;
|
|
2812
|
+
refine: "REPLACE" | "ADD";
|
|
2813
|
+
type: "EMPTY" | "SCENEGRAPH" | "MESH";
|
|
1753
2814
|
}
|
|
1754
2815
|
|
|
1755
|
-
export declare type
|
|
1756
|
-
|
|
2816
|
+
export declare type TilesetTraverserProps = {
|
|
2817
|
+
loadSiblings: boolean;
|
|
2818
|
+
skipLevelOfDetail: boolean;
|
|
2819
|
+
maxScreenSpaceError: number;
|
|
2820
|
+
maxDepth: number;
|
|
2821
|
+
onTraversalEnd: (frameState: TileFrameState) => any;
|
|
2822
|
+
};
|
|
2823
|
+
|
|
2824
|
+
export declare interface TopviewControllerCustomInitArgs extends Omit<FloorplanControllerCustomInitArgs, "defaultLongitude" | "defaultLatitude" | "maxLatitude" | "minLatitude"> {
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
export declare interface VRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
2828
|
+
}
|
|
2829
|
+
|
|
2830
|
+
export declare type WebXREventTypes = {
|
|
2831
|
+
/** WebXR模式开始,session完成坐标系设置*/
|
|
2832
|
+
webXRSessionStart(): void;
|
|
2833
|
+
/** WebXR模式结束,销毁session*/
|
|
2834
|
+
webXRSessionEnd(): void;
|
|
2835
|
+
};
|
|
2836
|
+
|
|
2837
|
+
export declare interface WebXRSelectParams {
|
|
2838
|
+
axes: readonly number[];
|
|
2839
|
+
raycaster: THREE_2.Raycaster;
|
|
2840
|
+
}
|
|
2841
|
+
|
|
2842
|
+
export declare type WebXRSelectType = "Select" | "Squeeze" | "Axes" | "LeftButtonA" | "LeftButtonB" | "RightButtonA" | "RightButtonB" | "LeftAxesLeftTap" | "LeftAxesRightTap" | "LeftAxesUpTap" | "LeftAxesDownTap" | "RightAxesLeftTap" | "RightAxesRightTap" | "RightAxesUpTap" | "RightAxesDownTap";
|
|
2843
|
+
|
|
2844
|
+
export declare class Work {
|
|
2845
|
+
/** 名称 */
|
|
2846
|
+
name: string;
|
|
2847
|
+
/** 编号 */
|
|
2848
|
+
workCode: string;
|
|
2849
|
+
/** 允许访问的安全域名 */
|
|
2850
|
+
allowHosts: string[];
|
|
2851
|
+
/** 过期时间 */
|
|
2852
|
+
expire: Date;
|
|
2853
|
+
/** 初始化参数 */
|
|
1757
2854
|
initial: WorkInitial;
|
|
2855
|
+
/** 模型参数 */
|
|
1758
2856
|
model?: WorkModel;
|
|
2857
|
+
/** 全景点位信息 */
|
|
1759
2858
|
observers: WorkObserver[];
|
|
1760
|
-
|
|
2859
|
+
/** 包围盒子 */
|
|
2860
|
+
boundingBox: THREE_2.Box3;
|
|
2861
|
+
/** 数据签发人 */
|
|
2862
|
+
issuer: string;
|
|
2863
|
+
/** 原始数据 */
|
|
2864
|
+
raw: {
|
|
2865
|
+
works: string[];
|
|
2866
|
+
options: string;
|
|
2867
|
+
};
|
|
2868
|
+
/**
|
|
2869
|
+
* 解析 Work 数据
|
|
2870
|
+
* @param obj - work 数据,从如数开发者平台获取
|
|
2871
|
+
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
2872
|
+
* @param urlTransform - 配置参数, URL 解析规则
|
|
2873
|
+
* @returns - 签署过的 Work 数据结构
|
|
2874
|
+
*/
|
|
2875
|
+
static parse: typeof parseWork;
|
|
2876
|
+
constructor();
|
|
2877
|
+
toJSON(): any;
|
|
2878
|
+
}
|
|
1761
2879
|
|
|
1762
|
-
|
|
1763
|
-
|
|
2880
|
+
export declare interface WorkCubeImage {
|
|
2881
|
+
/** 全景图 up */
|
|
1764
2882
|
up: string;
|
|
2883
|
+
/** 全景图 down */
|
|
1765
2884
|
down: string;
|
|
2885
|
+
/** 全景图 right */
|
|
1766
2886
|
right: string;
|
|
2887
|
+
/** 全景图 left */
|
|
1767
2888
|
left: string;
|
|
2889
|
+
/** 全景图 front */
|
|
1768
2890
|
front: string;
|
|
2891
|
+
/** 全景图 back */
|
|
1769
2892
|
back: string;
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
/** 全景图 */
|
|
2896
|
+
export declare interface WorkImage extends WorkCubeImage {
|
|
2897
|
+
/** 深度图 */
|
|
1770
2898
|
depth?: string;
|
|
1771
|
-
|
|
1772
|
-
|
|
2899
|
+
/** 光照强度图 */
|
|
2900
|
+
luminance?: WorkCubeImage;
|
|
2901
|
+
/** 瓦片信息 */
|
|
2902
|
+
tiles?: WorkTile[];
|
|
2903
|
+
}
|
|
1773
2904
|
|
|
1774
2905
|
/** 初始化位姿参数 */
|
|
1775
|
-
export declare
|
|
2906
|
+
export declare interface WorkInitial extends Omit<State, "offset" | "distance"> {
|
|
2907
|
+
}
|
|
1776
2908
|
|
|
1777
2909
|
/** 模型数据 */
|
|
1778
|
-
export declare
|
|
2910
|
+
export declare interface WorkModel {
|
|
2911
|
+
/** 模型文件地址 at3d / domez */
|
|
1779
2912
|
file: string;
|
|
2913
|
+
/** 模型贴图文件地址 */
|
|
1780
2914
|
textures: string[];
|
|
2915
|
+
/** 模型贴图文件地址的父目录 */
|
|
1781
2916
|
textureBase: string;
|
|
2917
|
+
/** 是否开启 bvh 碰撞树,开启会大大加快射线碰撞的执行效率 */
|
|
1782
2918
|
bvh: boolean;
|
|
1783
|
-
|
|
1784
|
-
|
|
2919
|
+
tiles?: WorkModelTiles;
|
|
2920
|
+
maxDepth?: number;
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
/** 模型瓦片 */
|
|
2924
|
+
export declare interface WorkModelTiles {
|
|
2925
|
+
tileset_url: string;
|
|
2926
|
+
tileset_url_md5: string;
|
|
2927
|
+
b3md_mappings_url: string;
|
|
2928
|
+
b3md_mappings_url_md5: string;
|
|
2929
|
+
}
|
|
1785
2930
|
|
|
1786
2931
|
/** 每个点位的数据 */
|
|
1787
|
-
export declare
|
|
2932
|
+
export declare interface WorkObserver {
|
|
2933
|
+
/** 点位序号 */
|
|
1788
2934
|
panoIndex: number;
|
|
2935
|
+
/** 点位是否激活可用 */
|
|
1789
2936
|
active: boolean;
|
|
2937
|
+
/** 点位是否可加载 */
|
|
1790
2938
|
loadable: boolean;
|
|
1791
|
-
|
|
2939
|
+
/** 点位全景图 */
|
|
2940
|
+
images: WorkImage;
|
|
2941
|
+
/** 点位视频 */
|
|
1792
2942
|
video?: WorkVideo;
|
|
2943
|
+
/** 可以看到的相关点位序号 */
|
|
1793
2944
|
visibleNodes: number[];
|
|
2945
|
+
/** 可以连通的相关点位序号 */
|
|
1794
2946
|
accessibleNodes: number[];
|
|
2947
|
+
/** 点位和模型的旋转对齐关系四元数 */
|
|
1795
2948
|
quaternion: THREE_2.Quaternion;
|
|
2949
|
+
/** 点位和模型的地面位置坐标关系 */
|
|
1796
2950
|
standingPosition: THREE_2.Vector3;
|
|
2951
|
+
/** 点位和模型的观察点坐标关系 */
|
|
1797
2952
|
position: THREE_2.Vector3;
|
|
2953
|
+
/** 点位所在楼层 */
|
|
1798
2954
|
floorIndex: number;
|
|
1799
|
-
|
|
2955
|
+
/** 点位 derived_id */
|
|
2956
|
+
derivedId?: number;
|
|
2957
|
+
}
|
|
2958
|
+
|
|
2959
|
+
export declare interface WorkTile {
|
|
2960
|
+
level: number;
|
|
2961
|
+
size: number;
|
|
2962
|
+
up: string;
|
|
2963
|
+
down: string;
|
|
2964
|
+
right: string;
|
|
2965
|
+
left: string;
|
|
2966
|
+
front: string;
|
|
2967
|
+
back: string;
|
|
2968
|
+
}
|
|
1800
2969
|
|
|
1801
2970
|
/** 全景视频贴片 */
|
|
1802
|
-
export declare
|
|
2971
|
+
export declare interface WorkVideo {
|
|
2972
|
+
/** 视频源 url */
|
|
1803
2973
|
source: string;
|
|
2974
|
+
/** 视频源变化矩阵 */
|
|
1804
2975
|
matrix: THREE_2.Matrix4;
|
|
2976
|
+
/** 视频源长宽尺寸 */
|
|
1805
2977
|
size: THREE_2.Vector2;
|
|
1806
|
-
}
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
export declare class XRButton {
|
|
2981
|
+
static createButton(onClickHook: () => void): HTMLAnchorElement | HTMLButtonElement;
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2984
|
+
export declare interface XRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
2985
|
+
}
|
|
1807
2986
|
|
|
1808
2987
|
export { }
|