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