@realsee/five 5.0.0-alpha.12 → 5.0.0-alpha.120

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.
Files changed (199) hide show
  1. package/README.md +75 -63
  2. package/docs/.nojekyll +1 -0
  3. package/docs/assets/highlight.css +134 -0
  4. package/docs/assets/icons.css +1043 -0
  5. package/docs/assets/{images/icons.png → icons.png} +0 -0
  6. package/docs/assets/{images/icons@2x.png → icons@2x.png} +0 -0
  7. package/docs/assets/main.js +52 -0
  8. package/docs/assets/search.js +1 -0
  9. package/docs/assets/style.css +1413 -0
  10. package/docs/assets/{images/widgets.png → widgets.png} +0 -0
  11. package/docs/assets/{images/widgets@2x.png → widgets@2x.png} +0 -0
  12. package/docs/classes/five.AnimationFrameLoop.html +15 -0
  13. package/docs/classes/five.BVH.html +10 -0
  14. package/docs/classes/five.BVHIntersect.html +1 -0
  15. package/docs/classes/five.BVHNode.html +7 -0
  16. package/docs/classes/five.BVHVector3.html +1 -0
  17. package/docs/classes/five.Camera.html +11 -0
  18. package/docs/classes/five.Five.html +303 -0
  19. package/docs/classes/five.InternalWebGLRenderer.html +1 -0
  20. package/docs/classes/five.IntersectMesh.html +1 -0
  21. package/docs/classes/five.LegacyPanoCircleMesh.html +5 -0
  22. package/docs/classes/five.Model.html +77 -0
  23. package/docs/classes/five.NetworkSubscribe.html +50 -0
  24. package/docs/classes/five.PBMContainer.html +17 -0
  25. package/docs/classes/five.PBMGroup.html +19 -0
  26. package/docs/classes/five.PBMMaterial.html +15 -0
  27. package/docs/classes/five.PBMMesh.html +7 -0
  28. package/docs/classes/five.PanoCircleMesh.html +7 -0
  29. package/docs/classes/five.Scene.html +3 -0
  30. package/docs/classes/five.Subscribe.html +56 -0
  31. package/docs/classes/five.Work.html +30 -0
  32. package/docs/classes/gltf_loader.GLTFLoader.html +17 -0
  33. package/docs/classes/gltf_loader.GLTFObject.html +7 -0
  34. package/docs/classes/line.Line.html +1 -0
  35. package/docs/classes/line.LineGeometry.html +1 -0
  36. package/docs/classes/line.LineMaterial.html +1 -0
  37. package/docs/classes/line.LineSegmentsGeometry.html +1 -0
  38. package/docs/classes/line.THREE_Line2.html +1 -0
  39. package/docs/classes/line.THREE_LineSegments2.html +1 -0
  40. package/docs/classes/react.Store.html +29 -0
  41. package/docs/classes/server.BVH.html +10 -0
  42. package/docs/classes/server.BVHIntersect.html +1 -0
  43. package/docs/classes/server.BVHNode.html +7 -0
  44. package/docs/classes/server.BVHVector3.html +1 -0
  45. package/docs/classes/server.Model.html +63 -0
  46. package/docs/classes/server.PBMGroup.html +9 -0
  47. package/docs/classes/server.PBMMesh.html +7 -0
  48. package/docs/classes/sticker.Sticker.html +32 -0
  49. package/docs/index.html +166 -421
  50. package/docs/interfaces/five.AddableObject.html +1 -0
  51. package/docs/interfaces/five.AnimationFrame.html +1 -0
  52. package/docs/interfaces/five.CameraPose.html +1 -0
  53. package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +28 -0
  54. package/docs/interfaces/five.EventCallback.html +391 -0
  55. package/docs/interfaces/five.FiveInitArgs.html +98 -0
  56. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +15 -0
  57. package/docs/interfaces/five.ImageOptions.html +18 -0
  58. package/docs/interfaces/five.ImageURLMappings.html +1 -0
  59. package/docs/interfaces/five.ImageURLOptions.html +17 -0
  60. package/docs/interfaces/five.IntersectMeshInterface.html +3 -0
  61. package/docs/interfaces/five.Intersection.html +7 -0
  62. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +20 -0
  63. package/docs/interfaces/five.ModelEventCallback.html +22 -0
  64. package/docs/interfaces/five.MovePanoOptions.html +40 -0
  65. package/docs/interfaces/five.PBMPanoPicture.html +7 -0
  66. package/docs/interfaces/five.PBMParameters.html +15 -0
  67. package/docs/interfaces/five.PanoCircleMeshInterface.html +19 -0
  68. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +28 -0
  69. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +20 -0
  70. package/docs/interfaces/five.Pose.html +35 -0
  71. package/docs/interfaces/five.Scissor.html +14 -0
  72. package/docs/interfaces/five.State.html +19 -0
  73. package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -0
  74. package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -0
  75. package/docs/interfaces/five.SubscribeMixinType.off.html +1 -0
  76. package/docs/interfaces/five.SubscribeMixinType.on.html +1 -0
  77. package/docs/interfaces/five.SubscribeMixinType.once.html +1 -0
  78. package/docs/interfaces/five.TextureOptions.html +20 -0
  79. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -0
  80. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +24 -0
  81. package/docs/interfaces/five.WorkCubeImage.html +13 -0
  82. package/docs/interfaces/five.WorkImage.html +21 -0
  83. package/docs/interfaces/five.WorkInitial.html +13 -0
  84. package/docs/interfaces/five.WorkModel.html +11 -0
  85. package/docs/interfaces/five.WorkObserver.html +25 -0
  86. package/docs/interfaces/five.WorkTile.html +1 -0
  87. package/docs/interfaces/five.WorkVideo.html +9 -0
  88. package/docs/interfaces/gltf_loader.GLTF.html +7 -0
  89. package/docs/interfaces/react.FiveActionReactCallbacks.html +62 -0
  90. package/docs/interfaces/react.FiveInjectionTypes.html +191 -0
  91. package/docs/interfaces/react.PropTypeOfFiveFeatures.html +1 -0
  92. package/docs/interfaces/server.Intersection.html +7 -0
  93. package/docs/interfaces/server.ModelEventCallback.html +18 -0
  94. package/docs/interfaces/sticker.IntersectionLike.html +8 -0
  95. package/docs/modules/five.SubscribeMixinType.html +1 -0
  96. package/docs/modules/five.html +481 -0
  97. package/docs/modules/gltf_loader.html +1 -0
  98. package/docs/modules/line.html +1 -0
  99. package/docs/modules/react.html +130 -1178
  100. package/docs/modules/server.html +18 -0
  101. package/docs/modules/sticker.html +1 -0
  102. package/docs/modules.html +1 -120
  103. package/exporters/staticify.js +210 -0
  104. package/{index.d.ts → five/index.d.ts} +612 -325
  105. package/five/index.js +372 -0
  106. package/gltf-loader/index.d.ts +75 -0
  107. package/gltf-loader/index.js +260 -0
  108. package/line/index.d.ts +68 -0
  109. package/line/index.js +260 -0
  110. package/package.json +21 -18
  111. package/react/index.d.ts +164 -96
  112. package/react/index.js +260 -1
  113. package/resource/{basis_transcoder.js → basis/basis_transcoder.js} +0 -0
  114. package/resource/{basis_transcoder.wasm → basis/basis_transcoder.wasm} +0 -0
  115. package/resource/gltf/draco_decoder.js +31 -0
  116. package/resource/gltf/draco_decoder.wasm +0 -0
  117. package/resource/gltf/draco_wasm_wrapper.js +119 -0
  118. package/scripts/five-staticify.js +26 -0
  119. package/server/index.d.ts +183 -27
  120. package/server/index.js +367 -1
  121. package/sticker/index.d.ts +70 -0
  122. package/sticker/index.js +260 -0
  123. package/templates/plugin/examples/index.html +1 -1
  124. package/templates/quick-start/README.md +1 -1
  125. package/templates/quick-start/index.tsx +1 -1
  126. package/templates/quick-start/package.json +1 -1
  127. package/templates/react-component/examples/index.html +1 -1
  128. package/templates/react-component/examples/index.tsx +4 -4
  129. package/templates/react-component/lib/index.tsx +5 -5
  130. package/umd/five-gltf-loader.js +2 -0
  131. package/umd/five-gltf-loader.js.LICENSE.txt +14 -0
  132. package/umd/five-line.js +2 -0
  133. package/umd/five-line.js.LICENSE.txt +14 -0
  134. package/umd/five-react.js +2 -0
  135. package/umd/five-react.js.LICENSE.txt +14 -0
  136. package/umd/five-sticker.js +2 -0
  137. package/umd/five-sticker.js.LICENSE.txt +14 -0
  138. package/umd/five.js +2 -0
  139. package/umd/five.js.LICENSE.txt +116 -0
  140. package/bundles/five.js +0 -2
  141. package/bundles/five.js.LICENSE.txt +0 -160
  142. package/docs/assets/css/main.css +0 -2660
  143. package/docs/assets/js/main.js +0 -248
  144. package/docs/assets/js/search.js +0 -1
  145. package/docs/classes/index.five.html +0 -2463
  146. package/docs/classes/index.fivecamera.html +0 -311
  147. package/docs/classes/index.fivehashcubetexture.html +0 -240
  148. package/docs/classes/index.fiveline.html +0 -342
  149. package/docs/classes/index.fivelinegeometry.html +0 -500
  150. package/docs/classes/index.fivelinematerial.html +0 -276
  151. package/docs/classes/index.fivelinesegmentsgeometry.html +0 -447
  152. package/docs/classes/index.fivescene.html +0 -186
  153. package/docs/classes/index.internalwebglrenderer.html +0 -200
  154. package/docs/classes/index.model.html +0 -883
  155. package/docs/classes/index.pbmgroup.html +0 -415
  156. package/docs/classes/index.pbmmaterial.html +0 -521
  157. package/docs/classes/index.pbmmesh.html +0 -242
  158. package/docs/classes/index.subscribe.html +0 -556
  159. package/docs/classes/react.store.html +0 -584
  160. package/docs/interfaces/index.depthpanoramacontrollercustominitargs.html +0 -408
  161. package/docs/interfaces/index.eventcallback.html +0 -2452
  162. package/docs/interfaces/index.fiveinitargs.html +0 -695
  163. package/docs/interfaces/index.floorplancontrollercustominitargs.html +0 -283
  164. package/docs/interfaces/index.imageoptions.html +0 -320
  165. package/docs/interfaces/index.intersection.html +0 -215
  166. package/docs/interfaces/index.intersectmeshinterface.html +0 -176
  167. package/docs/interfaces/index.modelcontrollercustominitargs.html +0 -354
  168. package/docs/interfaces/index.modeleventcallback.html +0 -316
  169. package/docs/interfaces/index.movepanooptions.html +0 -457
  170. package/docs/interfaces/index.panocirclemeshinterface.html +0 -349
  171. package/docs/interfaces/index.panoramacontrollercustominitargs.html +0 -433
  172. package/docs/interfaces/index.panoramalikecontrollercustominitargs.html +0 -352
  173. package/docs/interfaces/index.pbmparameters.html +0 -462
  174. package/docs/interfaces/index.pose.html +0 -258
  175. package/docs/interfaces/index.scissor.html +0 -240
  176. package/docs/interfaces/index.state.html +0 -288
  177. package/docs/interfaces/index.subscribemixintype.emit.html +0 -180
  178. package/docs/interfaces/index.subscribemixintype.haslistener.html +0 -171
  179. package/docs/interfaces/index.subscribemixintype.off.html +0 -198
  180. package/docs/interfaces/index.subscribemixintype.on.html +0 -213
  181. package/docs/interfaces/index.subscribemixintype.once.html +0 -210
  182. package/docs/interfaces/index.topviewcontrollercustominitargs.html +0 -214
  183. package/docs/interfaces/index.vrpanoramacontrollercustominitargs.html +0 -420
  184. package/docs/interfaces/react.fiveactionreactcallbacks.html +0 -559
  185. package/docs/interfaces/react.fiveinjectiontypes.html +0 -1473
  186. package/docs/interfaces/react.injectfivetoprops.html +0 -259
  187. package/docs/modules/index.html +0 -3024
  188. package/docs/modules/index.subscribemixintype.html +0 -143
  189. package/five.js.LICENSE.txt +0 -160
  190. package/index.js +0 -1
  191. package/scripts/export-five-resource/chfs.exe +0 -0
  192. package/scripts/export-five-resource/fileify.js +0 -192
  193. package/scripts/export-five-resource/format-work.js +0 -71
  194. package/scripts/export-five-resource/staticify.js +0 -327
  195. package/scripts/transcode-model/BufferGeometryUtils.js +0 -832
  196. package/scripts/transcode-model/LoaderSupport.js +0 -1545
  197. package/scripts/transcode-model/MTLLoader.js +0 -602
  198. package/scripts/transcode-model/OBJLoader2.js +0 -1470
  199. package/scripts/transcode-model/obj2pbm.js +0 -65
@@ -1,7 +1,117 @@
1
- /// <reference types="hammerjs" />
2
-
3
1
  import * as THREE_2 from 'three';
4
2
 
3
+ export declare interface AddableObject extends THREE_2.Object3D {
4
+ needsRender?: boolean;
5
+ mixer?: THREE_2.AnimationMixer;
6
+ setResolution?(width: number, height: number): void;
7
+ }
8
+
9
+ export declare interface AnimationFrame {
10
+ callback: (time: number, deltaTime: number) => void;
11
+ once: boolean;
12
+ delay: number;
13
+ order: number;
14
+ }
15
+
16
+ export declare class AnimationFrameLoop {
17
+ private frames;
18
+ private time;
19
+ private stoped;
20
+ private static sharedInstance?;
21
+ static get shared(): AnimationFrameLoop;
22
+ static getFrameTime(): number;
23
+ constructor();
24
+ private loop;
25
+ private remove;
26
+ /**
27
+ * 添加到动画循环
28
+ * @param callback - 动画循环回调
29
+ * @param once - 是否只回调一次
30
+ * @param delay - 延迟多少个动画循环回调
31
+ * @param order - 优先级,数字越小越早被调用
32
+ * @returns 移除动画循环函数
33
+ */
34
+ add(callback: AnimationFrame["callback"], once?: boolean, delay?: number, order?: number): () => void;
35
+ disponse(): void;
36
+ }
37
+
38
+ export declare class BVH {
39
+ trianglesArray?: Float32Array;
40
+ offsetArray?: Uint32Array;
41
+ rootNode?: BVHNode;
42
+ create(trianglesArray: Float32Array): this;
43
+ splitNode(maxTrianglesPerNode: number): this;
44
+ /**
45
+ * 计算射线与三角形的碰撞
46
+ * @param rayOrigin - 射线的原点坐标
47
+ * @param rayDirection - 设想的方向向量
48
+ * @param backfaceCulling - 是否背面剔除
49
+ * @return 碰撞焦点数组
50
+ */
51
+ intersectRay(rayOrigin: BVHVector3, rayDirection: BVHVector3, backfaceCulling: boolean): BVHIntersect[];
52
+ dispose(): void;
53
+ }
54
+
55
+ export declare class BVHIntersect {
56
+ triangle: [BVHVector3, BVHVector3, BVHVector3];
57
+ intersectionPoint: BVHVector3;
58
+ constructor(triangle: [BVHVector3, BVHVector3, BVHVector3], intersectionPoint: BVHVector3);
59
+ }
60
+
61
+ /**
62
+ * A node in the BVH structure
63
+ * @param extents - the min coords of this node's bounding box
64
+ * @param startIndex - an index in the bbox array, where the first element of this node is located
65
+ * @param endIndex - an index in the bbox array, where the last of this node is located, plus 1 (meaning that its non-inclusive).
66
+ * @param level - distance of this node from the root for the bvh tree. root node has level=0, its children have level=1 etc.
67
+ */
68
+ export declare class BVHNode {
69
+ extents: ArrayLike<number>;
70
+ startIndex: number;
71
+ endIndex: number;
72
+ node0?: BVHNode;
73
+ node1?: BVHNode;
74
+ constructor(extents: ArrayLike<number>, startIndex: number, endIndex: number);
75
+ }
76
+
77
+ export declare class BVHVector3 {
78
+ x: number;
79
+ y: number;
80
+ z: number;
81
+ constructor(x: number, y: number, z: number);
82
+ copy(v: BVHVector3): this;
83
+ set(x: number, y: number, z: number): this;
84
+ fromArray(array: number[], firstElementPos?: number): this;
85
+ add(v: BVHVector3): this;
86
+ multiplyScalar(scalar: number): this;
87
+ subVectors(a: BVHVector3, b: BVHVector3): this;
88
+ dot(v: BVHVector3): number;
89
+ cross(v: BVHVector3): this;
90
+ crossVectors(a: BVHVector3, b: BVHVector3): this;
91
+ clone(): BVHVector3;
92
+ }
93
+
94
+ /** Five 相机 */
95
+ export declare class Camera extends THREE_2.PerspectiveCamera {
96
+ /** 相机姿态 */
97
+ pose: CameraPose;
98
+ constructor(fov: number);
99
+ /** 通过相机参数反算姿态 */
100
+ computePose(): this;
101
+ /** 设置相机姿态 */
102
+ setFromPose(pose: Partial<CameraPose>): this;
103
+ /** 拷贝相机姿态 */
104
+ copyPose(): CameraPose;
105
+ }
106
+
107
+ export declare interface CameraPose {
108
+ longitude: number;
109
+ latitude: number;
110
+ fov: number;
111
+ distance: number;
112
+ offset: THREE_2.Vector3;
113
+ }
114
+
5
115
  export declare type ControllerCustomInitTypes = {
6
116
  Floorplan: FloorplanControllerCustomInitArgs;
7
117
  Topview: TopviewControllerCustomInitArgs;
@@ -62,7 +172,7 @@ export declare type ControllerEventTypes = {
62
172
  * 观察点位被选择
63
173
  * @param panoIndex - 选择的点位
64
174
  */
65
- panoSelected(panoIndex: number): void;
175
+ panoSelected(panoIndex: number | null): void;
66
176
  /**
67
177
  * 意图要移动到某个点位 可以通过 `return false` 阻止
68
178
  * @param panoIndex - 图要移动到的点位下标
@@ -142,6 +252,7 @@ export declare type ControllerEventTypes = {
142
252
  wantsGesture(type: GestureTypes, pointers: {
143
253
  x: number;
144
254
  y: number;
255
+ delta?: number;
145
256
  }[], final: boolean): void | false;
146
257
  /**
147
258
  * 手势 触发
@@ -152,6 +263,7 @@ export declare type ControllerEventTypes = {
152
263
  gesture(type: GestureTypes, pointers: {
153
264
  x: number;
154
265
  y: number;
266
+ delta?: number;
155
267
  }[], final: boolean): void;
156
268
  /**
157
269
  * 意图要触发 pan 手势(滑动屏幕), 可以通过 `return false` 阻止
@@ -183,15 +295,17 @@ export declare type ControllerEventTypes = {
183
295
  * 意图要触发 tap 手势(点击屏幕), 可以通过 `return false` 阻止
184
296
  * @param raycaster - 点击对应的三维射线
185
297
  * @param tapPosition - 点击对应的屏幕位置
298
+ * @param final - 是否手势结束
186
299
  * @returns 可以通过 `return false` 阻止
187
300
  */
188
- wantsTapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2): void | false;
301
+ wantsTapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, final: boolean): void | false;
189
302
  /**
190
303
  * tap 手势(点击屏幕) 被触发
191
304
  * @param raycaster - 点击对应的三维射线
192
305
  * @param tapPosition - 点击对应的屏幕位置
306
+ * @param final - 是否手势结束
193
307
  */
194
- tapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2): void;
308
+ tapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, final: boolean): void;
195
309
  /**
196
310
  * 意图要触发 pinch 手势(双指缩放),可以通过 `return false` 阻止
197
311
  * @param scale - 缩放数值
@@ -200,6 +314,23 @@ export declare type ControllerEventTypes = {
200
314
  * @returns 可以通过 `return false` 阻止
201
315
  */
202
316
  wantsPinchGesture(scale: number, nextFov: number, final: boolean): void | false;
317
+ /**
318
+ * 意图要触发 press 手势(长按屏幕), 可以通过 `return false` 阻止
319
+ * @param raycaster - 长按对应的三维射线
320
+ * @param tapPosition - 长按对应的屏幕位置
321
+ * @param duration - 长按持续时间
322
+ * @param final - 是否手势结束
323
+ * @returns 可以通过 `return false` 阻止
324
+ */
325
+ wantsPressGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, duration: number, isFinal: boolean): void | false;
326
+ /**
327
+ * tap 手势(点击屏幕) 被触发
328
+ * @param raycaster - 点击对应的三维射线
329
+ * @param tapPosition - 点击对应的屏幕位置
330
+ * @param duration - 长按持续时间
331
+ * @param final - 是否手势结束
332
+ */
333
+ pressGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, duration: number, isFinal: boolean): void;
203
334
  /**
204
335
  * pinch 手势(双指缩放) 被触发
205
336
  * @param scale - 缩放数值
@@ -269,7 +400,7 @@ export declare type ControllerEventTypes = {
269
400
  * @param panoIndex - 加载点位下标
270
401
  * @param observer - 对应的 observer 详情
271
402
  */
272
- textureLoaded(panoIndex: number, observer: WorkObserver): void;
403
+ textureLoaded(panoIndex: number, observer: WorkObserver, meta: (NetWorkMeta | null)[]): void;
273
404
  /**
274
405
  * 抛出错误
275
406
  * @param error - 抛出错误
@@ -277,72 +408,28 @@ export declare type ControllerEventTypes = {
277
408
  error(error: Error): void;
278
409
  };
279
410
 
411
+ /**
412
+ * URL 地址的转换
413
+ * @param source - url 原地址
414
+ * @param options - url 转换参数
415
+ * @returns url 转换结果
416
+ */
417
+ export declare function defaultImageURLTransform(source: string, options: ImageURLOptions): string;
418
+
280
419
  export declare interface DepthPanoramaControllerCustomInitArgs extends PanoramaLikeControllerCustomInitArgs {
281
420
  /** 最远可移动观察点距离 */
282
421
  maxAccessibleDistance?: number;
422
+ /**
423
+ * 点击地面观察点标识的判定范围
424
+ * @description
425
+ * 如果在判定范围内则确定去到目标点,
426
+ * 否则寻找点击位置方向最适合的点(可能会走到一个离相机更近的点)。
427
+ */
428
+ panoTapTriggerRadius?: number;
283
429
  /** 地面观察点标识自定义创建器 */
284
430
  panoCircleMeshCreator?: () => PanoCircleMeshInterface;
285
431
  }
286
432
 
287
- /**
288
- * 动画变化曲线
289
- */
290
- export declare const Easing: {
291
- Linear: {
292
- None: (amount: number) => number;
293
- };
294
- Quadratic: {
295
- In: (amount: number) => number;
296
- Out: (amount: number) => number;
297
- InOut: (amount: number) => number;
298
- };
299
- Cubic: {
300
- In: (amount: number) => number;
301
- Out: (amount: number) => number;
302
- InOut: (amount: number) => number;
303
- };
304
- Quartic: {
305
- In: (amount: number) => number;
306
- Out: (amount: number) => number;
307
- InOut: (amount: number) => number;
308
- };
309
- Quintic: {
310
- In: (amount: number) => number;
311
- Out: (amount: number) => number;
312
- InOut: (amount: number) => number;
313
- };
314
- Sinusoidal: {
315
- In: (amount: number) => number;
316
- Out: (amount: number) => number;
317
- InOut: (amount: number) => number;
318
- };
319
- Exponential: {
320
- In: (amount: number) => number;
321
- Out: (amount: number) => number;
322
- InOut: (amount: number) => number;
323
- };
324
- Circular: {
325
- In: (amount: number) => number;
326
- Out: (amount: number) => number;
327
- InOut: (amount: number) => number;
328
- };
329
- Elastic: {
330
- In: (amount: number) => number;
331
- Out: (amount: number) => number;
332
- InOut: (amount: number) => number;
333
- };
334
- Back: {
335
- In: (amount: number) => number;
336
- Out: (amount: number) => number;
337
- InOut: (amount: number) => number;
338
- };
339
- Bounce: {
340
- In: (amount: number) => number;
341
- Out: (amount: number) => number;
342
- InOut: (amount: number) => number;
343
- };
344
- };
345
-
346
433
  /**
347
434
  * Five 事件列表
348
435
  * @description
@@ -363,7 +450,7 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
363
450
  */
364
451
  error(error: Error): void;
365
452
  /**
366
- * 开始加载 Work 数据
453
+ * 准备加载 Work 数据
367
454
  * @param input - 输入的 work
368
455
  * @param work - 归一化的标准 work
369
456
  * @param state - 加载时的姿态
@@ -376,6 +463,12 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
376
463
  * @param state - 加载时的姿态
377
464
  */
378
465
  load(input: any, work: Work, state: Omit<State, "offset">): void;
466
+ /**
467
+ * 加载完 Work 数据
468
+ * @param input - 输入的 work
469
+ * @param work - 归一化的标准 work
470
+ */
471
+ loaded(input: any, work: Work): void;
379
472
  /**
380
473
  * 模型开始加载
381
474
  * @param workModel - 归一化的标准 work 中的 model 值
@@ -410,8 +503,16 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
410
503
  * @param model - 加载完的 model 本质是一个 {@link PBMGroup}
411
504
  */
412
505
  modelLoaded(model: Model): void;
413
- /** 每帧渲染完成 */
414
- renderFrame(): void;
506
+ /**
507
+ * 模型楼层切换
508
+ * @param shownFloor - 模型楼层
509
+ */
510
+ modelShownFloorChange(shownFloor: number | null, totalFloorLength: number): void;
511
+ /**
512
+ * 渲染循环
513
+ * @param rendered - 是否渲染了
514
+ */
515
+ renderFrame(rendered: boolean): void;
415
516
  /**
416
517
  * 当前 fps 变化
417
518
  * @param fps - 当前刷新率
@@ -471,6 +572,18 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
471
572
  * @param toPose - 初始化动画结束后的状态
472
573
  */
473
574
  modeChange(mode: Mode, prevMode: Mode, panoIndex: number, toPose: Pose): void;
575
+ /**
576
+ * 帮助元素显应的变换
577
+ * @param visible - 帮助元素的是否开启
578
+ */
579
+ helpersVisibleChange(visible: boolean): void;
580
+ /**
581
+ * 网络资源分析
582
+ * @param source - 资源地址
583
+ * @param state - 状态
584
+ * @param detail - 详情
585
+ */
586
+ network(source: string, type: NetworkType, state: NetworkState, detail: string): void;
474
587
  /** five 被析构。 插件中请监听用于自身析构 */
475
588
  dispose(): void;
476
589
  };
@@ -502,64 +615,11 @@ export declare class Five extends Subscribe<EventTypes> {
502
615
  * ```
503
616
  */
504
617
  static Mode: Mirror<Mode>;
505
- /** Five 线条*/
506
- static FiveLine: typeof FiveLine;
507
- /** Five 的动画函数*/
508
- static Easing: {
509
- Linear: {
510
- None: (amount: number) => number;
511
- };
512
- Quadratic: {
513
- In: (amount: number) => number;
514
- Out: (amount: number) => number;
515
- InOut: (amount: number) => number;
516
- };
517
- Cubic: {
518
- In: (amount: number) => number;
519
- Out: (amount: number) => number;
520
- InOut: (amount: number) => number;
521
- };
522
- Quartic: {
523
- In: (amount: number) => number;
524
- Out: (amount: number) => number;
525
- InOut: (amount: number) => number;
526
- };
527
- Quintic: {
528
- In: (amount: number) => number;
529
- Out: (amount: number) => number;
530
- InOut: (amount: number) => number;
531
- };
532
- Sinusoidal: {
533
- In: (amount: number) => number;
534
- Out: (amount: number) => number;
535
- InOut: (amount: number) => number;
536
- };
537
- Exponential: {
538
- In: (amount: number) => number;
539
- Out: (amount: number) => number;
540
- InOut: (amount: number) => number;
541
- };
542
- Circular: {
543
- In: (amount: number) => number;
544
- Out: (amount: number) => number;
545
- InOut: (amount: number) => number;
546
- };
547
- Elastic: {
548
- In: (amount: number) => number;
549
- Out: (amount: number) => number;
550
- InOut: (amount: number) => number;
551
- };
552
- Back: {
553
- In: (amount: number) => number;
554
- Out: (amount: number) => number;
555
- InOut: (amount: number) => number;
556
- };
557
- Bounce: {
558
- In: (amount: number) => number;
559
- Out: (amount: number) => number;
560
- InOut: (amount: number) => number;
561
- };
562
- };
618
+ /**
619
+ * @deprecated
620
+ * 请使用 `import { Line } from "@realsee/five/line"` 代替;
621
+ */
622
+ static Line: any;
563
623
  /**
564
624
  * 自动播放状态是否暂停
565
625
  * @description
@@ -571,9 +631,9 @@ export declare class Five extends Subscribe<EventTypes> {
571
631
  /** 当前展示的模式 */
572
632
  currentMode?: Mode;
573
633
  /** 内部使用的 `THREE.Scene` */
574
- scene: FiveScene;
634
+ scene: Scene;
575
635
  /** 内部使用的 `Camera` */
576
- camera: FiveCamera;
636
+ camera: Camera;
577
637
  /**
578
638
  * 当前设置的 `scissor`
579
639
  * @description
@@ -592,11 +652,9 @@ export declare class Five extends Subscribe<EventTypes> {
592
652
  * 如果初始化时传入了 `renderer` 则直接时该值
593
653
  * 否则会通过 `preserveDrawingBuffer` `backgroundColor` `backgroundAlpha` `antialias` 创建一个 `THREE.WebGLRenderer`
594
654
  */
595
- renderer: THREE_2.WebGLRenderer;
655
+ renderer?: THREE_2.WebGLRenderer;
596
656
  /** 当前加载的模型 */
597
657
  model: Model;
598
- /** 当前加载的 work 数据 */
599
- work?: Work;
600
658
  /**
601
659
  * 是否需要渲染
602
660
  * @description
@@ -617,7 +675,7 @@ export declare class Five extends Subscribe<EventTypes> {
617
675
  * 可以动态对配置在 `work` 数据中的模型贴图在 runtime 做 url 调整。
618
676
  * 平衡加载时间和图片质量
619
677
  */
620
- textureOptions: ImageOptions;
678
+ textureOptions: TextureOptions;
621
679
  /**
622
680
  * 模型贴图的配置参数
623
681
  * @description
@@ -648,20 +706,34 @@ export declare class Five extends Subscribe<EventTypes> {
648
706
  plugins: {
649
707
  [key: string]: FivePluginInstance<any>;
650
708
  };
651
- private ident;
709
+ ident: string;
710
+ private stopAnimationLoop?;
711
+ private fps;
712
+ private helperGroup;
652
713
  private modeChangeDuration;
653
714
  private onlyRenderIfNeeds;
654
- private maxFps;
715
+ private poweredByRealsee;
655
716
  private controller?;
656
717
  private destroyed;
657
- private statePending;
658
718
  private stateSynced;
659
719
  private controllerInits;
660
720
  private panoramaLikeSavedPose;
661
721
  private extraElements;
662
- private moveToPanoQueue?;
663
722
  private getPixelsRenderTarget;
664
- private tweenCoordinates?;
723
+ private readyCallbacks;
724
+ private modelPending;
725
+ private syncingState;
726
+ /**
727
+ * 是否开启 IOS EDR 模式
728
+ * 需要客户端配合
729
+ * 并且开启 five.enablepostProcessing = true
730
+ */
731
+ private _enableIOSEDR;
732
+ private lastLoadWorkTask;
733
+ private networkSubscribe;
734
+ private screenBuffer?;
735
+ private analysis?;
736
+ private renderSwitch01;
665
737
  constructor(initArgs?: FiveInitArgs);
666
738
  /**
667
739
  * 析构 five 对象。
@@ -682,6 +754,21 @@ export declare class Five extends Subscribe<EventTypes> {
682
754
  * ```
683
755
  */
684
756
  setScissor(scissor: Scissor): void;
757
+ /**
758
+ * 帮助元素显示/隐藏
759
+ */
760
+ get helperVisible(): boolean;
761
+ set helperVisible(visible: boolean);
762
+ /**
763
+ * 是否开启 IOS EDR 模式
764
+ * 需要客户端配合
765
+ * 并且开启 five.enablepostProcessing = true
766
+ */
767
+ get enableIOSEDR(): boolean;
768
+ set enableIOSEDR(enable: boolean);
769
+ get enablePostProcessing(): boolean;
770
+ set enablePostProcessing(enable: boolean);
771
+ updateConfiguration(args: Pick<FiveInitArgs, "panorama" | "model" | "floorplan" | "topview" | "depthPanorama" | "vrPanorama" | "imageOptions">): void;
685
772
  /**
686
773
  * 将显示区域加载到页面 DOM 中
687
774
  * @description
@@ -719,6 +806,8 @@ export declare class Five extends Subscribe<EventTypes> {
719
806
  * 获取当前相机姿态, 可以使用 getCurrentState 代替
720
807
  */
721
808
  getPose(): Pose;
809
+ getSize(target: THREE_2.Vector2): THREE_2.Vector2;
810
+ getDrawingBufferSize(target: THREE_2.Vector2): THREE_2.Vector2;
722
811
  /**
723
812
  * 移动相机。(不触发点位移动)
724
813
  * @description
@@ -726,9 +815,10 @@ export declare class Five extends Subscribe<EventTypes> {
726
815
  * 会 Promise.reject。运动完成则 Promise.resolve
727
816
  * @param pose - 相机目标位置
728
817
  * @param duration - 动画触发的时常
818
+ * @param userAction - 是否用户触发
729
819
  * @returns Promise 是否移动成功
730
820
  */
731
- updateCamera(pose: Partial<Pose>, duration: number): Promise<void>;
821
+ updateCamera(pose: Partial<Omit<Pose, "offset">>, duration: number, userAction?: boolean): Promise<void>;
732
822
  /**
733
823
  * 获取当前相机经纬度
734
824
  * @deprecated 请使用使用 getPose
@@ -768,6 +858,8 @@ export declare class Five extends Subscribe<EventTypes> {
768
858
  * ```
769
859
  */
770
860
  initBasisLoader(transcoderResourcePath?: string): void;
861
+ /** 当前加载的 work 数据 */
862
+ get work(): Work;
771
863
  /**
772
864
  * 加载 Work 数据
773
865
  * @param inputWork - Work 数据
@@ -777,15 +869,17 @@ export declare class Five extends Subscribe<EventTypes> {
777
869
  * - State 自定义姿态
778
870
  * @param duration - 切换时间
779
871
  */
780
- load(inputWork: Work | LooseWork | any, state?: "inherit" | "initial" | Partial<Omit<State, "offset">>, duration?: number): void;
872
+ load(inputWork: Work | LooseWork | any | Promise<Work | LooseWork | any>, state?: "inherit" | "initial" | Partial<Omit<State, "offset">>, duration?: number, userAction?: boolean): Promise<void>;
873
+ private load_;
781
874
  /**
782
875
  * 切换模态
783
876
  * @param mode - 切换到的模态
784
877
  * @param state - 切换完成时的姿态
785
878
  * @param duration - 模态切换动画用时
786
879
  * @param userAction - 是否时用户动作触发 默认 true
880
+ * @param force - 必须重新初始化 controller
787
881
  */
788
- changeMode<T extends Mode>(mode: T, state?: Partial<Omit<State, "mode">>, duration?: number, userAction?: boolean): Promise<void>;
882
+ changeMode<T extends Mode>(mode: T, state?: Partial<Omit<State, "mode">>, duration?: number, userAction?: boolean, force?: boolean): Promise<void>;
789
883
  /**
790
884
  * 获取画面中的像素颜色
791
885
  * @param x - 获取像素区域的起始坐标 x
@@ -799,11 +893,7 @@ export declare class Five extends Subscribe<EventTypes> {
799
893
  /**
800
894
  * 获取显示用的画布(Canvas DOM节点)
801
895
  */
802
- getElement(): HTMLCanvasElement;
803
- /**
804
- * 但停自动播放
805
- */
806
- pause(): void;
896
+ getElement(): HTMLCanvasElement | undefined;
807
897
  /**
808
898
  * 强制渲染
809
899
  * @description
@@ -815,7 +905,12 @@ export declare class Five extends Subscribe<EventTypes> {
815
905
  *
816
906
  * @param callback - 渲染完成回调
817
907
  */
818
- render(callback?: () => void): void;
908
+ render(callback?: () => void, updateObjectResolution?: boolean): THREE_2.WebGLRenderTarget;
909
+ updateTime(time: number, deltaTime: number): void;
910
+ /**
911
+ * 但停自动播放
912
+ */
913
+ pause(): void;
819
914
  play(): void;
820
915
  /**
821
916
  * 转化到 Panorama 模态,并移动到对应序号的观察点。
@@ -844,7 +939,7 @@ export declare class Five extends Subscribe<EventTypes> {
844
939
  * 获取当前在屏幕视锥中的 mesh。
845
940
  * @param object - 如果传入则检查这个对象中的mesh,如果不传,则检查整个 scene
846
941
  */
847
- getRenderMeshes(object?: THREE_2.Object3D): THREE_2.Object3D[];
942
+ getRenderObjects(object?: THREE_2.Object3D): THREE_2.Object3D[];
848
943
  getCurrentState(): State;
849
944
  /**
850
945
  * 设置 State
@@ -865,33 +960,21 @@ export declare class Five extends Subscribe<EventTypes> {
865
960
  * ```
866
961
  * @param state - 目标状态
867
962
  * @param immediately - 是否马上转换,马上转换会尽快达到目标状态,尽量减少中间状态,更少动画。
963
+ * @param userAction - 是否是用户触发的动作
868
964
  */
869
- setState(state: Partial<State>, immediately?: boolean): void;
965
+ setState(state: Partial<State>, immediately?: boolean, userAction?: boolean): void;
966
+ aroundScissor(callback: () => void): void;
870
967
  private syncState;
871
- private updateResolution;
968
+ ready(): Promise<void>;
969
+ requestFullscreen(): void;
970
+ exitFullscreen(): void;
872
971
  private throwError;
873
972
  private loadModel;
874
973
  private commonParams;
875
974
  private saveControllerPose;
876
975
  private applyController;
877
- }
878
-
879
- /** Five 相机 */
880
- export declare class FiveCamera extends THREE_2.PerspectiveCamera {
881
- /** 相机姿态 */
882
- pose: Pose;
883
- constructor(fov: number);
884
- /** 通过相机参数反算姿态 */
885
- computePose(): void;
886
- /** 设置相机姿态 */
887
- setFromPose(pose: Partial<Pose>): void;
888
- /** 拷贝相机姿态 */
889
- copyPose(): Pose;
890
- }
891
-
892
- export declare class FiveHashCubeTexture extends THREE_2.CubeTexture {
893
- /** 识别哈希 */
894
- hash: string;
976
+ /** 移除事件绑定 */
977
+ private removeEventListeners;
895
978
  }
896
979
 
897
980
  /** Five 初始化参数 */
@@ -977,7 +1060,7 @@ export declare interface FiveInitArgs {
977
1060
  * 可以动态对配置在 `work` 数据中的模型贴图在 runtime 做 url 调整。
978
1061
  * 平衡加载时间和图片质量
979
1062
  */
980
- textureOptions?: ImageOptions;
1063
+ textureOptions?: TextureOptions;
981
1064
  /**
982
1065
  * 是否按需渲染
983
1066
  * @description
@@ -1044,58 +1127,14 @@ export declare interface FiveInitArgs {
1044
1127
  * 详见插件部分。
1045
1128
  */
1046
1129
  plugins?: (FivePlugin<void> | FivePluginInit<FivePlugin<any, any>> | FivePluginInit<FivePlugin<void, any>>)[];
1047
- }
1048
-
1049
- export declare class FiveLine extends THREE_2.Object3D {
1050
- private line;
1051
- private points;
1052
- constructor(vector0?: THREE_2.Vector3, vector1?: THREE_2.Vector3);
1053
- setPoints(vector0: THREE_2.Vector3, vector1: THREE_2.Vector3): void;
1054
- getPoints(): THREE_2.Vector3[];
1055
- setMaterial(map: ConstructorParameters<typeof FiveLineMaterial>[0]): void;
1056
- setResolution(width: number, height: number): void;
1057
- }
1058
-
1059
- export declare class FiveLineGeometry extends FiveLineSegmentsGeometry {
1060
- constructor();
1061
- setPositions(array: ArrayLike<number>): this;
1062
- setColors(array: ArrayLike<number>): this;
1063
- fromLine(line: THREE_2.Line): this;
1064
- copy(): this;
1065
- }
1066
-
1067
- export declare class FiveLineMaterial extends THREE_2.ShaderMaterial {
1068
- color: number | THREE_2.Vector3;
1069
- dashed: boolean;
1070
- dashScale: number;
1071
- dashSize: number;
1072
- gapSize: number;
1073
- resolution: THREE_2.Vector2;
1074
- constructor(parameters: FiveLineMaterialParameters);
1075
- }
1076
-
1077
- export declare type FiveLineMaterialParameters = {
1078
- color?: number | THREE_2.Vector3;
1079
- linewidth?: number;
1080
- dashed?: boolean;
1081
- dashScale?: number;
1082
- dashSize?: number;
1083
- gapSize?: number;
1084
- resolution?: THREE_2.Vector2;
1085
- };
1086
-
1087
- export declare class FiveLineSegmentsGeometry extends THREE_2.InstancedBufferGeometry {
1088
- constructor();
1089
- applyMatrix4(matrix: THREE_2.Matrix4): this;
1090
- setPositions(array: ArrayLike<number> | number[]): this;
1091
- setColors(array: Float32Array | number[]): this;
1092
- fromWireframeGeometry(geometry: THREE_2.WireframeGeometry): this;
1093
- fromEdgesGeometry(geometry: THREE_2.EdgesGeometry): this;
1094
- fromMesh(mesh: THREE_2.Mesh): this;
1095
- fromLineSegments(lineSegments: THREE_2.LineSegments): this;
1096
- computeBoundingBox(): void;
1097
- computeBoundingSphere(): void;
1098
- toJSON(): void;
1130
+ /**
1131
+ * 是否展示 powered by 如视
1132
+ */
1133
+ poweredByRealsee?: boolean;
1134
+ /**
1135
+ * 是否使用webgl2渲染执行环境, 默认值 false
1136
+ */
1137
+ webgl2?: boolean;
1099
1138
  }
1100
1139
 
1101
1140
  /**
@@ -1125,10 +1164,6 @@ parameters: Parameters<T>[1]
1125
1164
  */
1126
1165
  export declare type FivePluginInstance<T extends FivePlugin<any, any>> = ReturnType<T>;
1127
1166
 
1128
- /** Five 场景*/
1129
- export declare class FiveScene extends THREE_2.Scene {
1130
- }
1131
-
1132
1167
  export declare interface FloorplanControllerCustomInitArgs {
1133
1168
  /** 默认偏航角 */
1134
1169
  defaultLongitude?: number;
@@ -1146,7 +1181,7 @@ export declare interface FloorplanControllerCustomInitArgs {
1146
1181
  minFov?: number;
1147
1182
  }
1148
1183
 
1149
- export declare type GestureTypes = "pan" | "tap" | "pinch" | "mouseWheel";
1184
+ export declare type GestureTypes = "pan" | "tap" | "pinch" | "press" | "mouseWheel";
1150
1185
 
1151
1186
  export declare function getViewportScale(): number;
1152
1187
 
@@ -1154,33 +1189,60 @@ export declare function getViewportScale(): number;
1154
1189
  * 图片参数
1155
1190
  */
1156
1191
  export declare interface ImageOptions {
1157
- key?: string;
1158
1192
  /**
1159
1193
  * url 地址转化
1160
1194
  * @param url - 原始地址
1161
1195
  * @param options - 当前地址参数
1162
1196
  * @returns 转化后地址
1163
1197
  */
1164
- transform?: (url: string, options: ImageOptions) => string;
1165
- /** 图片尺寸参数 */
1198
+ transform?: (url: string, options: ImageURLOptions) => string;
1199
+ /** 图片尺寸参数 尽量使用 2 的幂次 如 512 1024 2048 */
1166
1200
  size?: number;
1167
1201
  /** 图片质量参数(0-100) */
1168
1202
  quality?: number;
1169
- /** 图片格式参数(jpg, png) */
1170
- format?: string;
1171
- /** basis loader 是否初始化完成 */
1172
- basisLoaderInitialized?: boolean;
1173
- /** 针对 textureOptions 是否自动通过模型贴图的数量计算需要的模型贴图的尺寸 默认 true */
1174
- autoResize?: boolean;
1203
+ /** 图片格式参数 */
1204
+ format?: "jpg" | "png" | "heif" | "webp" | "avif";
1205
+ /** 锐化参数 海外不支持 */
1206
+ sharpen?: number;
1207
+ mappings?: ImageURLMappings;
1208
+ }
1209
+
1210
+ export declare interface ImageURLMappings {
1211
+ [publicDomain: string]: {
1212
+ "pano": [string, string];
1213
+ "tile": [string, string];
1214
+ "texture": [string];
1215
+ "default": [string];
1216
+ };
1217
+ }
1218
+
1219
+ export declare interface ImageURLOptions {
1220
+ /** 图片类型标识 */
1221
+ key: string;
1222
+ /** basisLoader 是否初始化完成 */
1223
+ basisLoaderInitialized: boolean;
1224
+ /** 图片尺寸参数 尽量使用 2 的幂次 如 256 512 1024 */
1225
+ size?: number;
1226
+ /** 图片质量参数(0-100) */
1227
+ quality?: number;
1228
+ /** 图片格式参数 */
1229
+ format?: "jpg" | "png" | "heif" | "webp" | "avif";
1230
+ /** 图片裁切 */
1231
+ cut?: [x: number, y: number, width: number, height: number];
1232
+ /** 锐化参数 海外不支持 */
1233
+ sharpen?: number;
1234
+ /** url匹配规则 */
1235
+ mappings?: ImageURLMappings;
1175
1236
  }
1176
1237
 
1177
1238
  export declare class InternalWebGLRenderer extends THREE_2.WebGLRenderer {
1178
- constructor({ preserveDrawingBuffer, backgroundColor, backgroundAlpha, pixelRatio, antialias }: {
1239
+ constructor({ preserveDrawingBuffer, backgroundColor, backgroundAlpha, pixelRatio, antialias, webgl2 }: {
1179
1240
  preserveDrawingBuffer?: boolean;
1180
1241
  backgroundColor?: number | THREE_2.Color;
1181
1242
  backgroundAlpha?: number;
1182
1243
  pixelRatio?: number;
1183
1244
  antialias?: boolean;
1245
+ webgl2?: boolean;
1184
1246
  });
1185
1247
  }
1186
1248
 
@@ -1195,10 +1257,42 @@ export declare interface Intersection {
1195
1257
  distance: number;
1196
1258
  }
1197
1259
 
1260
+ export declare class IntersectMesh extends THREE_2.Object3D implements IntersectMeshInterface {
1261
+ private ringMesh;
1262
+ constructor();
1263
+ dispose(): void;
1264
+ }
1265
+
1266
+ /**
1267
+ * 地面提示点位接口
1268
+ */
1198
1269
  export declare interface IntersectMeshInterface extends THREE_2.Object3D {
1199
1270
  dispose(): void;
1200
1271
  }
1201
1272
 
1273
+ export declare class LegacyPanoCircleMesh extends THREE_2.Object3D implements PanoCircleMeshInterface {
1274
+ needsRender: boolean;
1275
+ hitTestMesh: THREE_2.Mesh<THREE_2.BufferGeometry, THREE_2.MeshBasicMaterial>;
1276
+ current: boolean;
1277
+ loading: boolean;
1278
+ disabled: boolean;
1279
+ progress: number;
1280
+ opacity: number;
1281
+ private centerMesh;
1282
+ private loadingMesh;
1283
+ private progressMotion;
1284
+ private opacityMotion;
1285
+ private stopInterval?;
1286
+ constructor();
1287
+ setLoading(shown: boolean): void;
1288
+ setDisabled(disabled: boolean): void;
1289
+ setProgress(progress: number): void;
1290
+ setOpacity(opacity: number): void;
1291
+ setCurrent(current: boolean): void;
1292
+ updateTime(time: number, deltaTime: number): void;
1293
+ dispose(): void;
1294
+ }
1295
+
1202
1296
  export declare type LooseWork = {
1203
1297
  bvh?: boolean;
1204
1298
  modelAsync?: boolean;
@@ -1230,9 +1324,9 @@ export declare type LooseWorkModel = {
1230
1324
 
1231
1325
  export declare type LooseWorkObserver = {
1232
1326
  active?: boolean;
1327
+ index?: number;
1233
1328
  visible_nodes: number[];
1234
1329
  accessible_nodes: number[];
1235
- index: number;
1236
1330
  quaternion: {
1237
1331
  y: number;
1238
1332
  x: number;
@@ -1248,7 +1342,7 @@ export declare type LooseWorkObserver = {
1248
1342
  export declare type LooseWorkPanorama = {
1249
1343
  active?: boolean;
1250
1344
  loadable?: boolean;
1251
- index: number;
1345
+ index?: number;
1252
1346
  up: string;
1253
1347
  down: string;
1254
1348
  right: string;
@@ -1256,7 +1350,15 @@ export declare type LooseWorkPanorama = {
1256
1350
  front: string;
1257
1351
  back: string;
1258
1352
  video?: LooseWorkVideo;
1259
- tiles?: string;
1353
+ luminance?: {
1354
+ up: string;
1355
+ down: string;
1356
+ right: string;
1357
+ left: string;
1358
+ front: string;
1359
+ back: string;
1360
+ };
1361
+ tiles?: number[];
1260
1362
  };
1261
1363
 
1262
1364
  export declare type LooseWorkVideo = {
@@ -1298,7 +1400,7 @@ export declare type Mode =
1298
1400
  * 需要满足 your/path/filename.at3d.json_xxxxxx,
1299
1401
  * 通过 json_xxxxxx(<dataURL>) 方式返回。
1300
1402
  */
1301
- export declare class Model extends PBMGroup implements Subscribe<ModelEventType> {
1403
+ export declare class Model extends PBMContainer implements Subscribe<ModelEventType> {
1302
1404
  /** 是否加载完成 */
1303
1405
  loaded: boolean;
1304
1406
  /** 是否未加载 */
@@ -1306,7 +1408,9 @@ export declare class Model extends PBMGroup implements Subscribe<ModelEventType>
1306
1408
  /** 外接盒子的大小 */
1307
1409
  bounding: THREE_2.Box3;
1308
1410
  /** 当前显示的楼层 */
1309
- shownfloor: number | null;
1411
+ shownFloor: number | null;
1412
+ /** 楼层的数量 */
1413
+ floorLength: number;
1310
1414
  /**
1311
1415
  * 判断是否注册了事件
1312
1416
  * 具体可查看 {@link Subscribe.hasListener}
@@ -1333,18 +1437,36 @@ export declare class Model extends PBMGroup implements Subscribe<ModelEventType>
1333
1437
  */
1334
1438
  emit: SubscribeMixinType.emit<ModelEventType>;
1335
1439
  /** bvh 树的计算结果 */
1336
- bvhs: any[] & {
1337
- loaded?: boolean;
1440
+ bvhs: BVH[] & {
1441
+ loaded: boolean;
1338
1442
  };
1339
- constructor();
1443
+ /** 网络跟踪 */
1444
+ private networkSubscribe?;
1445
+ /** 安全域名 */
1446
+ private allowHosts?;
1447
+ constructor(options?: {
1448
+ networkSubscribe?: NetworkSubscribe;
1449
+ allowHosts?: string[];
1450
+ });
1451
+ /**
1452
+ * 当前显示的楼层
1453
+ * @deprecated
1454
+ * 请用 shwonFloor 代替
1455
+ */
1456
+ get shownfloor(): number | null;
1340
1457
  /**
1341
1458
  * 获取模型边界线
1342
1459
  * @param threshold - 面片间夹角阈值
1343
1460
  * @returns 所有模型边界线
1344
1461
  */
1345
1462
  getEdges(threshold?: number): THREE_2.Line3[];
1346
- /** 获取当前楼层数 */
1463
+ /**
1464
+ * 获取当前楼层数
1465
+ * @deprecated
1466
+ * 请使用 floorLength 参数代替
1467
+ */
1347
1468
  hasFloors(): number;
1469
+ private hasFloors_;
1348
1470
  /**
1349
1471
  * 显示某楼层
1350
1472
  * @example
@@ -1355,7 +1477,7 @@ export declare class Model extends PBMGroup implements Subscribe<ModelEventType>
1355
1477
  * ```
1356
1478
  */
1357
1479
  show(): void;
1358
- show(floorIndex: number, hideOpacity?: number): void;
1480
+ show(floorIndex: number, hiddenOpacity?: number): void;
1359
1481
  /**
1360
1482
  * 计算模型射线碰撞检测
1361
1483
  * @param raycaster - THREE 射线对象
@@ -1363,13 +1485,13 @@ export declare class Model extends PBMGroup implements Subscribe<ModelEventType>
1363
1485
  * @returns 返回碰撞
1364
1486
  */
1365
1487
  intersectRaycaster(raycaster: THREE_2.Raycaster, floors?: number | number[]): Intersection[];
1366
- buildBVH(): Promise<void>;
1488
+ buildBVH(): void;
1367
1489
  /**
1368
1490
  * 加载模型
1369
1491
  * @param workModel - work 的 model 内容
1370
1492
  * @param imageOptions - 图片参数
1371
1493
  */
1372
- load(workModel: WorkModel, imageOptions?: ImageOptions): void;
1494
+ load(workModel: WorkModel, textureOptions?: TextureOptions): Promise<void>;
1373
1495
  /**
1374
1496
  * 析构函数
1375
1497
  * @description
@@ -1408,6 +1530,11 @@ export declare type ModelEventType = {
1408
1530
  materialLoaded(): void;
1409
1531
  /** 模型加载完成 */
1410
1532
  loaded(): void;
1533
+ /**
1534
+ * 显示楼层改变
1535
+ * @param shownFloor - 显示的楼层
1536
+ */
1537
+ shownFloorChange(shownFloor: number | null, totalFloorLength: number): void;
1411
1538
  /**
1412
1539
  * 内部错误
1413
1540
  * @param error - 错误对象
@@ -1426,9 +1553,10 @@ export declare interface MovePanoOptions extends Partial<Omit<Pose, "offset">> {
1426
1553
  * @description
1427
1554
  * - `fly` 通过相机移动方式变化
1428
1555
  * - `fade` 通过渐变方式变化
1556
+ * - `montage` 通过渐变穿插到黑屏方式变化
1429
1557
  * - `instant` 通过插入黑屏方式变化
1430
1558
  */
1431
- effect?: "fly" | "fade" | "instant";
1559
+ effect?: "fly" | "fade" | "montage" | "instant";
1432
1560
  /**
1433
1561
  * 运动耗时
1434
1562
  * @description
@@ -1454,15 +1582,84 @@ export declare interface MovePanoOptions extends Partial<Omit<Pose, "offset">> {
1454
1582
  moveCancelCallback?: () => void;
1455
1583
  }
1456
1584
 
1585
+ export declare type NetWorkMeta = {
1586
+ source: string;
1587
+ headers: {
1588
+ [name: string]: string;
1589
+ };
1590
+ requestTime: number;
1591
+ responseTime: number;
1592
+ costs: number;
1593
+ size?: number;
1594
+ };
1595
+
1596
+ export declare type NetworkState = "ok" | "preload" | "error" | "timeout" | "forbidden";
1597
+
1598
+ export declare class NetworkSubscribe extends Subscribe<{
1599
+ network(source: string, type: NetworkType, state: NetworkState, detail: string): void;
1600
+ }> {
1601
+ }
1602
+
1603
+ export declare type NetworkType = "XMLHttpRequest" | "Script" | "Image" | "Link";
1604
+
1605
+ export declare class PanoCircleMesh extends THREE_2.Object3D implements PanoCircleMeshInterface {
1606
+ needsRender: boolean;
1607
+ private loadingMesh;
1608
+ private disableMesh;
1609
+ private centerMesh;
1610
+ private ringMesh;
1611
+ private progressMesh;
1612
+ private ringRotateMotion;
1613
+ private tapMotion;
1614
+ private progressMotion;
1615
+ private progressOpacityMotion;
1616
+ private opacityMotion;
1617
+ progress: number;
1618
+ opacity: number;
1619
+ current: boolean;
1620
+ loading: boolean;
1621
+ disabled: boolean;
1622
+ constructor();
1623
+ setProgress(progress: number): void;
1624
+ setOpacity(opacity: number): void;
1625
+ setCurrent(current: boolean): void;
1626
+ setLoading(loading: boolean): void;
1627
+ setDisabled(disabled: boolean): void;
1628
+ tap(): Promise<void>;
1629
+ updateTime(time: number, deltaTime: number): void;
1630
+ dispose(): void;
1631
+ }
1632
+
1633
+ /**
1634
+ * 地面提示点位接口
1635
+ *
1636
+ * 点位状态
1637
+ * 1. 默认状态: 无任何操作的情况
1638
+ * 2. 高亮状态: 高亮,认为是合适的下一个点位,或者设备选中了某个点位
1639
+ * 3. 进度状态: 点位加载中,存在进度的情况
1640
+ * 4. 加载状态: 点位加载中,不存在进度的情况
1641
+ * 5. 不可用状态:点位不可用,存在点位,但是点位是个摆设
1642
+ * 6. 点击动画: 点位被选择,触发全景图切换
1643
+ * 7. 透明度改变: 一般会处理为近的点位透明度高,远的点位透明度低
1644
+ */
1457
1645
  export declare interface PanoCircleMeshInterface extends THREE_2.Object3D {
1458
1646
  needsRender: boolean;
1647
+ hitTestMesh?: THREE_2.Mesh;
1648
+ /** 当前高亮 */
1649
+ current: boolean;
1650
+ /** 是否当前高亮 */
1651
+ setCurrent(current: boolean): void;
1459
1652
  loading: boolean;
1653
+ setLoading(loading: boolean): void;
1460
1654
  disabled: boolean;
1461
- panoIndex: number;
1462
- setLoading(shown: boolean): void;
1463
1655
  setDisabled(disabled: boolean): void;
1656
+ progress: number;
1464
1657
  setProgress(progress: number): void;
1658
+ opacity: number;
1465
1659
  setOpacity(opacity: number): void;
1660
+ updateTime?(time: number, deltaTime: number): void;
1661
+ /** 点击交互 */
1662
+ tap?(): Promise<void>;
1466
1663
  dispose(): void;
1467
1664
  }
1468
1665
 
@@ -1478,6 +1675,7 @@ export declare interface PanoramaControllerCustomInitArgs extends PanoramaLikeCo
1478
1675
  panoTapTriggerRadius?: number;
1479
1676
  /** 地面观察点标识自定义创建器 */
1480
1677
  panoCircleMeshCreator?: () => PanoCircleMeshInterface;
1678
+ tileLevelForFov?: false | ((fov: number, viewSize: THREE_2.Vector2) => number);
1481
1679
  }
1482
1680
 
1483
1681
  export declare interface PanoramaLikeControllerCustomInitArgs {
@@ -1505,14 +1703,31 @@ export declare interface PanoramaLikeControllerCustomInitArgs {
1505
1703
  intersectMeshCreator?: () => IntersectMeshInterface;
1506
1704
  }
1507
1705
 
1508
- export declare function parseWork(obj: Work | LooseWork | any): Work;
1706
+ /**
1707
+ * 解析 Work 数据
1708
+ * @param obj - work 数据,从如数开发者平台获取
1709
+ * @param options - 配置参数, 可以在此二次设置 baseURL 等参数
1710
+ * @param urlTransform - 配置参数, URL 解析规则
1711
+ * @returns - 签署过的 Work 数据结构
1712
+ */
1713
+ export declare function parseWork(obj: Work | LooseWork | string | any, options?: ParseWorkOptions, urlTransform?: (origin: string, absolute: string, relative: string, type: "panorama" | "texture" | "model") => void): Work;
1714
+
1715
+ export declare type ParseWorkOptions = {
1716
+ /** 重写 work 中的资源前缀 */
1717
+ baseURL?: string;
1718
+ /** work 中的资源地址使用短地址 */
1719
+ shortPath?: boolean;
1720
+ /** work 中的资源使用 jsonp 方式发布 */
1721
+ jsonp?: boolean;
1722
+ /** work 中模型是否计算bvh碰撞数,默认计算 true */
1723
+ modelBvh?: boolean;
1724
+ };
1509
1725
 
1510
1726
  /** PBM 模型组 */
1511
- export declare class PBMGroup extends THREE_2.Group {
1512
- /** 楼层序号 */
1513
- floorIndex: number;
1727
+ export declare class PBMContainer extends THREE_2.Group {
1514
1728
  /** 是否需要更新按需渲染 */
1515
1729
  needsRender: boolean;
1730
+ private enableTransparent;
1516
1731
  /** 获取是否有透明参数 */
1517
1732
  getTransparent(): boolean;
1518
1733
  /** 设置透明参数 */
@@ -1527,16 +1742,18 @@ export declare class PBMGroup extends THREE_2.Group {
1527
1742
  disposeGeometry(): void;
1528
1743
  }
1529
1744
 
1745
+ /** PBM 模型组 */
1746
+ export declare class PBMGroup extends PBMContainer {
1747
+ /** 楼层序号 */
1748
+ floorIndex: number;
1749
+ }
1750
+
1530
1751
  /** PBM 材质 */
1531
1752
  export declare class PBMMaterial extends THREE_2.ShaderMaterial implements PBMParameters {
1532
- /** 起始点位全景图 */
1533
- pano0Map: FiveHashCubeTexture | null;
1534
- /** 起始点全景图变换矩阵 4x4 */
1535
- pano0Matrix: THREE_2.Matrix4;
1536
- /** 结束点位全景图 */
1537
- pano1Map: FiveHashCubeTexture | null;
1538
- /** 结束点全景图变换矩阵 4x4 */
1539
- pano1Matrix: THREE_2.Matrix4;
1753
+ /** 起始点 */
1754
+ pano0: PBMPanoPicture | null;
1755
+ /** 结束点 */
1756
+ pano1: PBMPanoPicture | null;
1540
1757
  /** 模型贴图和全景图的混合程度 [0-1] */
1541
1758
  modelAlpha: number;
1542
1759
  /** 全景图混合程度 [0-1] */
@@ -1546,20 +1763,7 @@ export declare class PBMMaterial extends THREE_2.ShaderMaterial implements PBMPa
1546
1763
  perspToOrtho: number;
1547
1764
  /** 模型透明度 */
1548
1765
  opacity: number;
1549
- /** 起始点位深度, 需要使用深度参与计算全景图混合的话 */
1550
- pano0DepthMap: THREE_2.CubeTexture | null;
1551
- /** 全景视频贴图 */
1552
- panoVideoMap: THREE_2.VideoTexture | null;
1553
- /** 全景视频尺寸 */
1554
- panoVideoSize: THREE_2.Vector2;
1555
- /** 全景视频贴图变换矩阵 */
1556
- panoVideoMatrix: THREE_2.Matrix4;
1557
- /** 全景视频透明度 [0-1] */
1558
- panoVideoAlpha: number;
1559
- /** 瓦片材质 */
1560
- panoTileMap: THREE_2.Texture | null;
1561
- /** 瓦片寻址规则 */
1562
- panoTileMappings: THREE_2.Vector4[][] | null;
1766
+ originOpacity: number;
1563
1767
  constructor(parameters?: Partial<PBMParameters>);
1564
1768
  }
1565
1769
 
@@ -1571,16 +1775,21 @@ export declare class PBMMesh extends THREE_2.Mesh<THREE_2.BufferGeometry, PBMMat
1571
1775
  needsRender: boolean;
1572
1776
  }
1573
1777
 
1574
- /** PBM 材质参数 */
1575
- export declare interface PBMParameters {
1778
+ export declare interface PBMPanoPicture {
1576
1779
  /** 起始点位全景图 */
1577
- pano0Map: FiveHashCubeTexture | null;
1780
+ map: THREE_2.CubeTexture;
1781
+ /** 亮度增益 */
1782
+ luminanceMap: THREE_2.CubeTexture | null;
1578
1783
  /** 起始点全景图变换矩阵 4x4 */
1579
- pano0Matrix: THREE_2.Matrix4;
1580
- /** 结束点位全景图 */
1581
- pano1Map: FiveHashCubeTexture | null;
1582
- /** 结束点位全景图变换矩阵 */
1583
- pano1Matrix: THREE_2.Matrix4;
1784
+ matrix: THREE_2.Matrix4;
1785
+ }
1786
+
1787
+ /** PBM 材质参数 */
1788
+ export declare interface PBMParameters {
1789
+ /** 起始点 */
1790
+ pano0: PBMPanoPicture | null;
1791
+ /** 结束点 */
1792
+ pano1: PBMPanoPicture | null;
1584
1793
  /** 模型贴图和全景图的混合程度 [0-1] */
1585
1794
  modelAlpha: number;
1586
1795
  /** 全景图混合程度 [0-1] */
@@ -1590,20 +1799,6 @@ export declare interface PBMParameters {
1590
1799
  perspToOrtho: number;
1591
1800
  /** 模型透明度 */
1592
1801
  opacity: number;
1593
- /** 起始点位深度, 需要使用深度参与计算全景图混合的话 */
1594
- pano0DepthMap: THREE_2.CubeTexture | null;
1595
- /** 全景视频贴图 */
1596
- panoVideoMap: THREE_2.VideoTexture | null;
1597
- /** 全景视频尺寸 */
1598
- panoVideoSize: THREE_2.Vector2;
1599
- /** 全景视频贴图变换矩阵 */
1600
- panoVideoMatrix: THREE_2.Matrix4;
1601
- /** 全景视频透明度 [0-1] */
1602
- panoVideoAlpha: number;
1603
- /** 瓦片材质 */
1604
- panoTileMap: THREE_2.Texture | null;
1605
- /** 瓦片寻址规则 */
1606
- panoTileMappings: THREE_2.Vector4[][] | null;
1607
1802
  }
1608
1803
 
1609
1804
  /**
@@ -1611,9 +1806,9 @@ export declare interface PBMParameters {
1611
1806
  * [[include: coordinate.md]]
1612
1807
  */
1613
1808
  export declare interface Pose {
1614
- /** 相机俯仰角 */
1615
- longitude: number;
1616
1809
  /** 相机偏航角 */
1810
+ longitude: number;
1811
+ /** 相机俯仰角 */
1617
1812
  latitude: number;
1618
1813
  /** 相机可视角度(垂直)*/
1619
1814
  fov: number;
@@ -1621,7 +1816,13 @@ export declare interface Pose {
1621
1816
  offset: THREE_2.Vector3;
1622
1817
  }
1623
1818
 
1624
- 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"];
1819
+ export declare const PROXY_CONTROLLER_EVENT_NAMES: readonly ["cameraDirectionUpdate", "cameraUpdate", "cameraPositionUpdate", "panoSelected", "moveToPano", "moveToPanoCanceled", "panoWillArrive", "movingToPano", "panoArrived", "panoWillLoad", "panoLoaded", "panoLoadError", "initAnimationEnded", "initAnimationWillStart", "wantsGesture", "gesture", "wantsTapGesture", "tapGesture", "wantsPressGesture", "pressGesture", "wantsPanGesture", "wantsInteriaPan", "panGesture", "interiaPan", "wantsPinchGesture", "pinchGesture", "wantsMouseWheel", "mouseWheel", "wantsShowIntersectionOnModel", "intersectionOnModelUpdate", "intersectionHidden", "textureStartLoad", "textureLoading", "textureAbort", "textureLoaded", "textureError"];
1820
+
1821
+ /** Five 场景*/
1822
+ export declare class Scene extends THREE_2.Scene {
1823
+ add(...objects: AddableObject[]): this;
1824
+ remove(...objects: AddableObject[]): this;
1825
+ }
1625
1826
 
1626
1827
  /**
1627
1828
  * 显示区域裁剪参数
@@ -1657,8 +1858,6 @@ export declare interface State extends Pose {
1657
1858
  panoIndex: number;
1658
1859
  }
1659
1860
 
1660
- export declare function stringifyWork(work: Work): LooseWork;
1661
-
1662
1861
  /**
1663
1862
  * 监听者模式
1664
1863
  * @template T - 预设的监听回调类型
@@ -1737,68 +1936,156 @@ export declare namespace SubscribeMixinType {
1737
1936
  }
1738
1937
  }
1739
1938
 
1939
+ /**
1940
+ * 图片参数
1941
+ */
1942
+ export declare interface TextureOptions {
1943
+ /**
1944
+ * url 地址转化
1945
+ * @param url - 原始地址
1946
+ * @param options - 当前地址参数
1947
+ * @returns 转化后地址
1948
+ */
1949
+ transform?: (url: string, options: ImageURLOptions) => string;
1950
+ /** 图片尺寸参数 尽量使用 2 的幂次 如 256 512 1024 */
1951
+ size?: number;
1952
+ /** 图片质量参数(0-100) */
1953
+ quality?: number;
1954
+ /** 图片格式参数 */
1955
+ format?: "jpg" | "png" | "heif" | "webp" | "avif";
1956
+ /** 针对 textureOptions 是否自动通过模型贴图的数量计算需要的模型贴图的尺寸 默认 true */
1957
+ autoResize?: boolean;
1958
+ /** 锐化参数 海外不支持 */
1959
+ sharpen?: number;
1960
+ mappings?: ImageURLMappings;
1961
+ }
1962
+
1740
1963
  export declare interface TopviewControllerCustomInitArgs extends Omit<FloorplanControllerCustomInitArgs, "defaultLongitude" | "defaultLatitude" | "maxLatitude" | "minLatitude"> {
1741
1964
  }
1742
1965
 
1743
1966
  export declare interface VRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
1744
- /**
1745
- * webvrPolyfill 的设置对象
1746
- * @description
1747
- * 只可被设置一次,所有的 five 实例共用这个设置
1748
- */
1749
- webvrPolyfillConfig?: any;
1750
1967
  }
1751
1968
 
1752
- export declare type Work = {
1753
- uuid: string;
1969
+ export declare class Work {
1970
+ /** 名称 */
1971
+ name: string;
1972
+ /** 编号 */
1973
+ workCode: string;
1974
+ /** 允许访问的安全域名 */
1975
+ allowHosts: string[];
1976
+ /** 过期时间 */
1977
+ expire: Date;
1978
+ /** 初始化参数 */
1754
1979
  initial: WorkInitial;
1980
+ /** 模型参数 */
1755
1981
  model?: WorkModel;
1982
+ /** 全景点位信息 */
1756
1983
  observers: WorkObserver[];
1757
- };
1984
+ /** 数据签发人 */
1985
+ issuer: string;
1986
+ /** 原始数据 */
1987
+ raw: {
1988
+ works: string[];
1989
+ options: string;
1990
+ };
1991
+ /**
1992
+ * 解析 Work 数据
1993
+ * @param obj - work 数据,从如数开发者平台获取
1994
+ * @param options - 配置参数, 可以在此二次设置 baseURL 等参数
1995
+ * @param urlTransform - 配置参数, URL 解析规则
1996
+ * @returns - 签署过的 Work 数据结构
1997
+ */
1998
+ static parse: typeof parseWork;
1999
+ constructor();
2000
+ toJSON(): any;
2001
+ }
1758
2002
 
1759
- /** 全景图 */
1760
- export declare type WorkImages = {
2003
+ export declare interface WorkCubeImage {
2004
+ /** 全景图 up */
1761
2005
  up: string;
2006
+ /** 全景图 down */
1762
2007
  down: string;
2008
+ /** 全景图 right */
1763
2009
  right: string;
2010
+ /** 全景图 left */
1764
2011
  left: string;
2012
+ /** 全景图 front */
1765
2013
  front: string;
2014
+ /** 全景图 back */
1766
2015
  back: string;
2016
+ }
2017
+
2018
+ /** 全景图 */
2019
+ export declare interface WorkImage extends WorkCubeImage {
2020
+ /** 深度图 */
1767
2021
  depth?: string;
1768
- tiles?: string;
1769
- };
2022
+ /** 光照强度图 */
2023
+ luminance?: WorkCubeImage;
2024
+ /** 瓦片信息 */
2025
+ tiles?: WorkTile[];
2026
+ }
1770
2027
 
1771
2028
  /** 初始化位姿参数 */
1772
- export declare type WorkInitial = Omit<State, "offset">;
2029
+ export declare interface WorkInitial extends Omit<State, "offset"> {
2030
+ }
1773
2031
 
1774
2032
  /** 模型数据 */
1775
- export declare type WorkModel = {
2033
+ export declare interface WorkModel {
2034
+ /** 模型文件地址 at3d / domez */
1776
2035
  file: string;
2036
+ /** 模型贴图文件地址 */
1777
2037
  textures: string[];
2038
+ /** 模型贴图文件地址的父目录 */
1778
2039
  textureBase: string;
2040
+ /** 是否开启 bvh 碰撞树,开启会大大加快射线碰撞的执行效率 */
1779
2041
  bvh: boolean;
1780
- async: boolean;
1781
- };
2042
+ }
1782
2043
 
1783
2044
  /** 每个点位的数据 */
1784
- export declare type WorkObserver = {
2045
+ export declare interface WorkObserver {
2046
+ /** 点位序号 */
2047
+ panoIndex: number;
2048
+ /** 点位是否激活可用 */
1785
2049
  active: boolean;
2050
+ /** 点位是否可加载 */
1786
2051
  loadable: boolean;
1787
- images: WorkImages;
2052
+ /** 点位全景图 */
2053
+ images: WorkImage;
2054
+ /** 点位视频 */
1788
2055
  video?: WorkVideo;
2056
+ /** 可以看到的相关点位序号 */
1789
2057
  visibleNodes: number[];
2058
+ /** 可以连通的相关点位序号 */
1790
2059
  accessibleNodes: number[];
2060
+ /** 点位和模型的旋转对齐关系四元数 */
1791
2061
  quaternion: THREE_2.Quaternion;
2062
+ /** 点位和模型的地面位置坐标关系 */
1792
2063
  standingPosition: THREE_2.Vector3;
2064
+ /** 点位和模型的观察点坐标关系 */
1793
2065
  position: THREE_2.Vector3;
2066
+ /** 点位所在楼层 */
1794
2067
  floorIndex: number;
1795
- };
2068
+ }
2069
+
2070
+ export declare interface WorkTile {
2071
+ level: number;
2072
+ size: number;
2073
+ up: string;
2074
+ down: string;
2075
+ right: string;
2076
+ left: string;
2077
+ front: string;
2078
+ back: string;
2079
+ }
1796
2080
 
1797
2081
  /** 全景视频贴片 */
1798
- export declare type WorkVideo = {
2082
+ export declare interface WorkVideo {
2083
+ /** 视频源 url */
1799
2084
  source: string;
2085
+ /** 视频源变化矩阵 */
1800
2086
  matrix: THREE_2.Matrix4;
2087
+ /** 视频源长宽尺寸 */
1801
2088
  size: THREE_2.Vector2;
1802
- };
2089
+ }
1803
2090
 
1804
2091
  export { }