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