@realsee/five 5.0.0-alpha.14 → 5.0.0-alpha.140

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 (221) hide show
  1. package/README.md +21 -11
  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 +310 -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 +87 -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 +19 -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.Tile3D.html +34 -0
  32. package/docs/classes/five.Tile3DModel.html +15 -0
  33. package/docs/classes/five.TileBoundingSphere.html +1 -0
  34. package/docs/classes/five.TileCacheNode.html +1 -0
  35. package/docs/classes/five.TileCullingVolume.html +1 -0
  36. package/docs/classes/five.TileOrientedBoundingBox.html +1 -0
  37. package/docs/classes/five.TilePlane.html +1 -0
  38. package/docs/classes/five.TileRequestScheduler.html +16 -0
  39. package/docs/classes/five.Tileset3D.html +11 -0
  40. package/docs/classes/five.Tileset3DTraverser.html +1 -0
  41. package/docs/classes/five.TilesetCache.html +1 -0
  42. package/docs/classes/five.Work.html +30 -0
  43. package/docs/classes/five.XRButton.html +1 -0
  44. package/docs/classes/gltf_loader.GLTFLoader.html +17 -0
  45. package/docs/classes/gltf_loader.GLTFObject.html +7 -0
  46. package/docs/classes/line.Line.html +1 -0
  47. package/docs/classes/line.LineGeometry.html +1 -0
  48. package/docs/classes/line.LineMaterial.html +1 -0
  49. package/docs/classes/line.LineSegmentsGeometry.html +1 -0
  50. package/docs/classes/line.THREE_Line2.html +1 -0
  51. package/docs/classes/line.THREE_LineSegments2.html +1 -0
  52. package/docs/classes/react.Store.html +29 -0
  53. package/docs/classes/server.BVH.html +10 -0
  54. package/docs/classes/server.BVHIntersect.html +1 -0
  55. package/docs/classes/server.BVHNode.html +7 -0
  56. package/docs/classes/server.BVHVector3.html +1 -0
  57. package/docs/classes/server.Model.html +63 -0
  58. package/docs/classes/server.PBMGroup.html +9 -0
  59. package/docs/classes/server.PBMMesh.html +7 -0
  60. package/docs/classes/sticker.Sticker.html +32 -0
  61. package/docs/index.html +166 -422
  62. package/docs/interfaces/five.AddableObject.html +1 -0
  63. package/docs/interfaces/five.AnimationFrame.html +1 -0
  64. package/docs/interfaces/five.CameraPose.html +1 -0
  65. package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +28 -0
  66. package/docs/interfaces/five.EventCallback.html +399 -0
  67. package/docs/interfaces/five.FiveInitArgs.html +107 -0
  68. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +15 -0
  69. package/docs/interfaces/five.ImageOptions.html +18 -0
  70. package/docs/interfaces/five.ImageURLMappings.html +1 -0
  71. package/docs/interfaces/five.ImageURLOptions.html +17 -0
  72. package/docs/interfaces/five.IntersectMeshInterface.html +3 -0
  73. package/docs/interfaces/five.Intersection.html +7 -0
  74. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +15 -0
  75. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +20 -0
  76. package/docs/interfaces/five.ModelEventCallback.html +22 -0
  77. package/docs/interfaces/five.MovePanoOptions.html +42 -0
  78. package/docs/interfaces/five.PBMPanoPicture.html +7 -0
  79. package/docs/interfaces/five.PBMParameters.html +19 -0
  80. package/docs/interfaces/five.PanoCircleMeshInterface.html +19 -0
  81. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +33 -0
  82. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +20 -0
  83. package/docs/interfaces/five.Pose.html +37 -0
  84. package/docs/interfaces/five.Scissor.html +14 -0
  85. package/docs/interfaces/five.State.html +21 -0
  86. package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -0
  87. package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -0
  88. package/docs/interfaces/five.SubscribeMixinType.off.html +1 -0
  89. package/docs/interfaces/five.SubscribeMixinType.on.html +1 -0
  90. package/docs/interfaces/five.SubscribeMixinType.once.html +1 -0
  91. package/docs/interfaces/five.TextureOptions.html +20 -0
  92. package/docs/interfaces/five.Tile3DModelLoaderOptions.html +3 -0
  93. package/docs/interfaces/five.TileBoundingVolume.html +19 -0
  94. package/docs/interfaces/five.TileContent.html +1 -0
  95. package/docs/interfaces/five.Tileset3dOptions.html +1 -0
  96. package/docs/interfaces/five.TilesetJSON.html +1 -0
  97. package/docs/interfaces/five.TilesetJSONNode.html +1 -0
  98. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -0
  99. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +29 -0
  100. package/docs/interfaces/five.WorkCubeImage.html +13 -0
  101. package/docs/interfaces/five.WorkImage.html +21 -0
  102. package/docs/interfaces/five.WorkInitial.html +13 -0
  103. package/docs/interfaces/five.WorkModel.html +11 -0
  104. package/docs/interfaces/five.WorkModelTiles.html +3 -0
  105. package/docs/interfaces/five.WorkObserver.html +25 -0
  106. package/docs/interfaces/five.WorkTile.html +1 -0
  107. package/docs/interfaces/five.WorkVideo.html +9 -0
  108. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +29 -0
  109. package/docs/interfaces/gltf_loader.GLTF.html +7 -0
  110. package/docs/interfaces/react.FiveActionReactCallbacks.html +62 -0
  111. package/docs/interfaces/react.FiveInjectionTypes.html +191 -0
  112. package/docs/interfaces/react.PropTypeOfFiveFeatures.html +1 -0
  113. package/docs/interfaces/server.Intersection.html +7 -0
  114. package/docs/interfaces/server.ModelEventCallback.html +18 -0
  115. package/docs/interfaces/sticker.IntersectionLike.html +8 -0
  116. package/docs/interfaces/vue.FiveActionVueCallbacks.html +62 -0
  117. package/docs/modules/five.SubscribeMixinType.html +1 -0
  118. package/docs/modules/five.html +496 -0
  119. package/docs/modules/gltf_loader.html +1 -0
  120. package/docs/modules/line.html +1 -0
  121. package/docs/modules/react.html +130 -1374
  122. package/docs/modules/server.html +18 -0
  123. package/docs/modules/sticker.html +1 -0
  124. package/docs/modules/vue.html +112 -0
  125. package/docs/modules.html +1 -120
  126. package/exporters/staticify.js +210 -0
  127. package/{index.d.ts → five/index.d.ts} +1208 -329
  128. package/five/index.js +372 -0
  129. package/gltf-loader/index.d.ts +75 -0
  130. package/gltf-loader/index.js +260 -0
  131. package/line/index.d.ts +68 -0
  132. package/line/index.js +260 -0
  133. package/package.json +25 -17
  134. package/react/index.d.ts +84 -22
  135. package/react/index.js +260 -1
  136. package/resource/{basis_transcoder.js → basis/basis_transcoder.js} +0 -0
  137. package/resource/{basis_transcoder.wasm → basis/basis_transcoder.wasm} +0 -0
  138. package/resource/gltf/draco_decoder.js +31 -0
  139. package/resource/gltf/draco_decoder.wasm +0 -0
  140. package/resource/gltf/draco_wasm_wrapper.js +119 -0
  141. package/scripts/five-staticify.js +26 -0
  142. package/server/index.d.ts +197 -26
  143. package/server/index.js +367 -1
  144. package/sticker/index.d.ts +70 -0
  145. package/sticker/index.js +260 -0
  146. package/templates/quick-start/README.md +1 -1
  147. package/templates/quick-start/package.json +1 -1
  148. package/templates/react-component/lib/index.tsx +3 -3
  149. package/umd/five-gltf-loader.js +2 -0
  150. package/umd/five-gltf-loader.js.LICENSE.txt +14 -0
  151. package/umd/five-line.js +2 -0
  152. package/umd/five-line.js.LICENSE.txt +14 -0
  153. package/umd/five-react.js +2 -0
  154. package/umd/five-react.js.LICENSE.txt +14 -0
  155. package/umd/five-sticker.js +2 -0
  156. package/umd/five-sticker.js.LICENSE.txt +14 -0
  157. package/umd/five-vue.js +1 -0
  158. package/umd/five.js +2 -0
  159. package/umd/five.js.LICENSE.txt +116 -0
  160. package/vue/index.d.ts +433 -0
  161. package/vue/index.js +260 -0
  162. package/bundles/five.js +0 -2
  163. package/bundles/five.js.LICENSE.txt +0 -160
  164. package/docs/assets/css/main.css +0 -2660
  165. package/docs/assets/js/main.js +0 -248
  166. package/docs/assets/js/search.js +0 -1
  167. package/docs/classes/index.five.html +0 -2498
  168. package/docs/classes/index.fivecamera.html +0 -311
  169. package/docs/classes/index.fivehashcubetexture.html +0 -240
  170. package/docs/classes/index.fiveline.html +0 -342
  171. package/docs/classes/index.fivelinegeometry.html +0 -500
  172. package/docs/classes/index.fivelinematerial.html +0 -276
  173. package/docs/classes/index.fivelinesegmentsgeometry.html +0 -447
  174. package/docs/classes/index.fivescene.html +0 -186
  175. package/docs/classes/index.internalwebglrenderer.html +0 -200
  176. package/docs/classes/index.model.html +0 -883
  177. package/docs/classes/index.pbmgroup.html +0 -415
  178. package/docs/classes/index.pbmmaterial.html +0 -521
  179. package/docs/classes/index.pbmmesh.html +0 -242
  180. package/docs/classes/index.subscribe.html +0 -556
  181. package/docs/classes/react.store.html +0 -584
  182. package/docs/interfaces/index.depthpanoramacontrollercustominitargs.html +0 -408
  183. package/docs/interfaces/index.eventcallback.html +0 -2452
  184. package/docs/interfaces/index.fiveinitargs.html +0 -695
  185. package/docs/interfaces/index.floorplancontrollercustominitargs.html +0 -283
  186. package/docs/interfaces/index.imageoptions.html +0 -320
  187. package/docs/interfaces/index.intersection.html +0 -215
  188. package/docs/interfaces/index.intersectmeshinterface.html +0 -176
  189. package/docs/interfaces/index.modelcontrollercustominitargs.html +0 -354
  190. package/docs/interfaces/index.modeleventcallback.html +0 -316
  191. package/docs/interfaces/index.movepanooptions.html +0 -457
  192. package/docs/interfaces/index.panocirclemeshinterface.html +0 -349
  193. package/docs/interfaces/index.panoramacontrollercustominitargs.html +0 -433
  194. package/docs/interfaces/index.panoramalikecontrollercustominitargs.html +0 -352
  195. package/docs/interfaces/index.pbmparameters.html +0 -462
  196. package/docs/interfaces/index.pose.html +0 -258
  197. package/docs/interfaces/index.scissor.html +0 -240
  198. package/docs/interfaces/index.state.html +0 -288
  199. package/docs/interfaces/index.subscribemixintype.emit.html +0 -180
  200. package/docs/interfaces/index.subscribemixintype.haslistener.html +0 -171
  201. package/docs/interfaces/index.subscribemixintype.off.html +0 -198
  202. package/docs/interfaces/index.subscribemixintype.on.html +0 -213
  203. package/docs/interfaces/index.subscribemixintype.once.html +0 -210
  204. package/docs/interfaces/index.topviewcontrollercustominitargs.html +0 -214
  205. package/docs/interfaces/index.vrpanoramacontrollercustominitargs.html +0 -420
  206. package/docs/interfaces/react.fiveactionreactcallbacks.html +0 -559
  207. package/docs/interfaces/react.fiveinjectiontypes.html +0 -1473
  208. package/docs/interfaces/react.injectfivetoprops.html +0 -259
  209. package/docs/modules/index.html +0 -3027
  210. package/docs/modules/index.subscribemixintype.html +0 -143
  211. package/five.js.LICENSE.txt +0 -160
  212. package/index.js +0 -1
  213. package/scripts/export-five-resource/chfs.exe +0 -0
  214. package/scripts/export-five-resource/fileify.js +0 -192
  215. package/scripts/export-five-resource/format-work.js +0 -71
  216. package/scripts/export-five-resource/staticify.js +0 -327
  217. package/scripts/transcode-model/BufferGeometryUtils.js +0 -832
  218. package/scripts/transcode-model/LoaderSupport.js +0 -1545
  219. package/scripts/transcode-model/MTLLoader.js +0 -602
  220. package/scripts/transcode-model/OBJLoader2.js +0 -1470
  221. package/scripts/transcode-model/obj2pbm.js +0 -65
@@ -0,0 +1,116 @@
1
+ /*!
2
+ Copyright (c) 2011, Yahoo! Inc. All rights reserved.
3
+ Code licensed under the BSD License:
4
+ http://developer.yahoo.com/yui/license.html
5
+ version: 2.9.0
6
+ */
7
+
8
+ /*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ */
9
+
10
+ /*! *****************************************************************************
11
+ Copyright (c) Microsoft Corporation.
12
+
13
+ Permission to use, copy, modify, and/or distribute this software for any
14
+ purpose with or without fee is hereby granted.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
17
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
19
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
20
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
21
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22
+ PERFORMANCE OF THIS SOFTWARE.
23
+ ***************************************************************************** */
24
+
25
+ /**
26
+ * @license
27
+ * CryptoJS
28
+ *
29
+ * Copyright (c) 2009-2013 Jeff Mott
30
+ *
31
+ * Permission is hereby granted, free of charge, to any person obtaining
32
+ * a copy of this software and associated documentation files (the
33
+ * "Software"), to deal in the Software without restriction, including
34
+ * without limitation the rights to use, copy, modify, merge, publish,
35
+ * distribute, sublicense, and/or sell copies of the Software, and to
36
+ * permit persons to whom the Software is furnished to do so, subject to
37
+ * the following conditions:
38
+ *
39
+ * The above copyright notice and this permission notice shall be
40
+ * included in all copies or substantial portions of the Software.
41
+ *
42
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
43
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
45
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
46
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
47
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
48
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49
+ *
50
+ * https://code.google.com/p/crypto-js/wiki/License
51
+ * PART: ext/cryptojs
52
+ */
53
+
54
+ /**
55
+ * @license
56
+ * RSA and ECC in JavaScript
57
+ *
58
+ * Copyright (c) 2003-2005 Tom Wu All Rights Reserved.
59
+ *
60
+ * Permission is hereby granted, free of charge, to any person obtaining
61
+ * a copy of this software and associated documentation files (the
62
+ * "Software"), to deal in the Software without restriction, including
63
+ * without limitation the rights to use, copy, modify, merge, publish,
64
+ * distribute, sublicense, and/or sell copies of the Software, and to
65
+ * permit persons to whom the Software is furnished to do so, subject to
66
+ * the following conditions:
67
+ *
68
+ * The above copyright notice and this permission notice shall be
69
+ * included in all copies or substantial portions of the Software.
70
+ *
71
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
72
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
73
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
74
+ *
75
+ * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
76
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
77
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
78
+ * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
79
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
80
+ *
81
+ * In addition, the following condition applies:
82
+ *
83
+ * All redistributions must retain an intact copy of this copyright notice
84
+ * and disclaimer.
85
+ *
86
+ * http://www-cs-students.stanford.edu/~tjw/jsbn/
87
+ * LICENSE: BSD License
88
+ * PART: ext/{base64,jsbn,jsbn2,prgn4,rng,rsa,rsa2}
89
+ */
90
+
91
+ /**
92
+ * @license
93
+ * The 'jsrsasign'(RSA-Sign JavaScript Library) License
94
+ *
95
+ * Copyright (c) 2010-2021 Kenji Urushima
96
+ *
97
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
98
+ * of this software and associated documentation files (the "Software"), to deal
99
+ * in the Software without restriction, including without limitation the rights
100
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
101
+ * copies of the Software, and to permit persons to whom the Software is
102
+ * furnished to do so, subject to the following conditions:
103
+ *
104
+ * The above copyright notice and this permission notice shall be included in
105
+ * all copies or substantial portions of the Software.
106
+ *
107
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
108
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
109
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
110
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
111
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
112
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
113
+ * THE SOFTWARE.
114
+ *
115
+ * LICENSE: MIT License
116
+ */
package/vue/index.d.ts ADDED
@@ -0,0 +1,433 @@
1
+ import { AllowedComponentProps } from 'vue';
2
+ import { ComponentCustomProps } from 'vue';
3
+ import { ComponentOptionsMixin } from 'vue';
4
+ import { DeepReadonly } from 'vue';
5
+ import { DefineComponent } from 'vue';
6
+ import { EventCallback } from '@realsee/five';
7
+ import { Five } from '@realsee/five';
8
+ import { FiveInitArgs } from '@realsee/five';
9
+ import { Intersection } from '@realsee/five';
10
+ import { Model } from '@realsee/five';
11
+ import { Pose } from '@realsee/five';
12
+ import { PropType } from 'vue';
13
+ import { Ref } from 'vue';
14
+ import { RendererElement } from 'vue';
15
+ import { RendererNode } from 'vue';
16
+ import { Scene } from '@realsee/five';
17
+ import { State } from '@realsee/five';
18
+ import * as THREE_2 from 'three';
19
+ import { VNode } from 'vue';
20
+ import { VNodeProps } from 'vue';
21
+ import { Work } from '@realsee/five';
22
+ import { WorkObserver } from '@realsee/five';
23
+
24
+ /**
25
+ * Five 命令集合
26
+ */
27
+ export declare interface FiveActionVueCallbacks {
28
+ /**
29
+ * 移动相机。(不触发点位移动)
30
+ * @description
31
+ * 如果动画中途被打断(用户触发行为,或者调用 setState, load, changeMode)的等
32
+ * 会 Promise.reject。运动完成则 Promise.resolve
33
+ * @param pose - 相机目标位置
34
+ * @param duration - 动画触发的时常
35
+ * @returns Promise 是否移动成功
36
+ */
37
+ updateCamera(pose: Pose, duration: number): Promise<void>;
38
+ /**
39
+ * 初始化 initBasisLoader
40
+ * @description
41
+ * 同初始化的 initBasisLoader 参数。用于初始化 basisLoader。
42
+ * basisLoader 只会初始化一次,一旦初始化则不会再修改。
43
+ *
44
+ * @param transcoderResourcePath - basis 解析器路径
45
+ * 如果不设置,使用默认解析器 basis 解析器。
46
+ * 可以传入解析器的 `resourcePath`, 则使用指定的解析器
47
+ * @example
48
+ * ```
49
+ * // 使用默认解析器
50
+ * initialBasisLoader();
51
+ *
52
+ * // 使用指定解析器
53
+ * // 会调用这个目录下的 basis_transcoder.js basis_transcoder.wasm 文件作为解析器
54
+ * initialBasisLoader("https://vrlab-public.ljcdn.com/release/static/image/release/five/basis/");
55
+ * ```
56
+ */
57
+ initBasisLoader(transcoderResourcePath?: string): void;
58
+ /**
59
+ * 获取画面中的像素颜色
60
+ * @param x - 获取像素区域的起始坐标 x
61
+ * @param y - 获取像素区域的起始坐标 y
62
+ * @param width - 获取像素区域的宽度
63
+ * @param height - 获取像素区域的高度
64
+ * @param pixelRatio - 获取区域的像素比
65
+ * @returns rgba颜色平铺的 Uint8Array
66
+ */
67
+ getPixels(x: number, y: number, width: number, height: number, pixelRatio?: number): Uint8Array;
68
+ /**
69
+ * 强制渲染
70
+ * @description
71
+ * 调用 `render()` 和 `needsRender()` 均可在按需渲染时,使得画面渲染一次
72
+ * 区别在于:
73
+ * - `needsRender()` 为在下帧渲染画面
74
+ * - `render()` 在当前帧渲染画面
75
+ * 推荐使用 `needsRender()`, 可以更加流畅。但是如果需要截图等同步操作,可以使用 `render()`
76
+ *
77
+ * @param callback - 渲染完成回调
78
+ */
79
+ render(callback?: () => void): void;
80
+ /**
81
+ * 下一帧渲染
82
+ * @description
83
+ * 调用 `render()` 和 `needsRender()` 均可在按需渲染时,使得画面渲染一次
84
+ * 区别在于:
85
+ * - `needsRender()` 为在下帧渲染画面
86
+ * - `render()` 在当前帧渲染画面
87
+ * 推荐使用 `needsRender()`, 可以更加流畅。但是如果需要截图等同步操作,可以使用 `render()`
88
+ */
89
+ needsRender(): void;
90
+ /**
91
+ * 预加载点位图片资源
92
+ * @param panoIndex - 观察点序号
93
+ * @param callback - 加载完成回调, 并传递加载用时。
94
+ * @returns 加载完成的 Promise 参数同 callback
95
+ */
96
+ preloadPano(panoIndex: number, callback?: (costs: number) => void): Promise<number>;
97
+ }
98
+
99
+ /**
100
+ * Five 渲染区域组件
101
+ * @description Five 渲染区域组件,请在 FiveProvider 内使用
102
+ * @param width - 渲染区域的宽度
103
+ * @param height - 渲染区域的高度
104
+ * @returns Vue 元素
105
+ * @example
106
+ * ```typescript
107
+ * <FiveProvider :initialWork="work">
108
+ * <FiveCanvas width="512" height="512"/>
109
+ * </FiveProvider>
110
+ * ```
111
+ */
112
+ export declare const FiveCanvas: DefineComponent< {
113
+ width: {
114
+ type: PropType<number>;
115
+ required: true;
116
+ };
117
+ height: {
118
+ type: PropType<number>;
119
+ required: true;
120
+ };
121
+ }, () => VNode<RendererNode, RendererElement, {
122
+ [key: string]: any;
123
+ }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
124
+ width: number;
125
+ height: number;
126
+ } & {}>, {}>;
127
+
128
+ export declare type FiveModelIntersectRaycaster = (raycaster: Ref<THREE_2.Raycaster> | THREE_2.Raycaster) => Ref<Intersection[]>;
129
+
130
+ /**
131
+ * Five 实例化Five 组件
132
+ *
133
+ * 在 FiveProvider 下,可以使用 FiveCanvas 来创建渲染画布。
134
+ * 以及使用 useFiveState useFiveEventCallback等 Five Vue Composition API 来对 FiveProvider 进行操作
135
+ * @description Five 创建Five实例的组件
136
+ * @param FiveProviderComponent - Five 参数
137
+ * @example
138
+ * ```typescript
139
+ * <FiveProvider :initialWork="work">
140
+ * <FiveCanvas width="512" height="512"/>
141
+ * </FiveProvider>
142
+ * ```
143
+ */
144
+ export declare const FiveProvider: FiveProviderComponent;
145
+
146
+ export declare type FiveProviderComponent = DefineComponent<{
147
+ work: PropType<Work>;
148
+ initialWork: PropType<Work | Promise<Work>>;
149
+ initialState: PropType<"inherit" | "initial" | Partial<Omit<State, "offset">>>;
150
+ initialUserAction: BooleanConstructor;
151
+ onWorkChange: PropType<(work: Work) => void>;
152
+ onStateChange: PropType<(state: State, userAction: boolean) => void>;
153
+ onCurrentStateChange: PropType<(state: State, userAction: boolean) => void>;
154
+ onError: PropType<(error: Error) => void>;
155
+ fiveInitArgs: {
156
+ type: PropType<Omit<FiveInitArgs, "renderer" | "scissor">>;
157
+ default: () => {};
158
+ };
159
+ style: ObjectConstructor;
160
+ }, {
161
+ five: Readonly<Five>;
162
+ }>;
163
+
164
+ export declare type Project2d = (vector3: THREE_2.Vector3 | Ref<THREE_2.Vector3>, testModel: boolean) => Ref<THREE_2.Vector2 | null>;
165
+
166
+ /**
167
+ * Five Vue Hooks: 获取 five 实例
168
+ * @description 不到万不得已,并不推荐直接使用。
169
+ * @deprecated 不到万不得已,并不推荐直接使用。
170
+ * @returns five 实例
171
+ */
172
+ export declare function unsafe__useFiveInject(): Five;
173
+
174
+ /**
175
+ * Five Vue Hooks: 使用 Five 的命令
176
+ *
177
+ * @function updateCamera
178
+ * ```
179
+ * 移动相机。(不触发点位移动)
180
+ * 如果动画中途被打断(用户触发行为,或者调用 setState, load, changeMode)的等
181
+ * 会 Promise.reject。运动完成则 Promise.resolve
182
+ *
183
+ * // params pose - 相机目标位置
184
+ * // params duration - 动画触发的时常
185
+ * // params Promise - 是否移动成功
186
+ * updateCamera(pose: Pose, duration: number): Promise<void>
187
+ * ```
188
+ *
189
+ * @function initBasisLoader
190
+ * ```
191
+ * 初始化 initBasisLoader
192
+ * 同初始化的 initBasisLoader 参数。用于初始化 basisLoader。
193
+ * basisLoader 只会初始化一次,一旦初始化则不会再修改。
194
+ *
195
+ * // param transcoderResourcePath
196
+ * // 如果不设置,使用默认解析器 basis 解析器。
197
+ * // 可以传入解析器的 `resourcePath`, 则使用指定的解析器
198
+ * initBasisLoader(transcoderResourcePath?: string): void,
199
+ * ```
200
+ *
201
+ * @function getPixels
202
+ * ```
203
+ * 获取画面中的像素颜色
204
+ * // param x - 获取像素区域的起始坐标 x
205
+ * // param y - 获取像素区域的起始坐标 y
206
+ * // param width - 获取像素区域的宽度
207
+ * // param height - 获取像素区域的高度
208
+ * // param pixelRatio - 获取区域的像素比
209
+ * // returns rgba颜色平铺的 Uint8Array
210
+ * getPixels(x: number, y: number, width: number, height: number, pixelRatio?: number): Uint8Array,
211
+ * ```
212
+ *
213
+ * @function render
214
+ * ```
215
+ * 强制渲染
216
+ * 调用 render() 和 needsRender() 均可在按需渲染时,使得画面渲染一次
217
+ * 区别在于:
218
+ * - needsRender() 为在下帧渲染画面
219
+ * - render() 在当前帧渲染画面
220
+ * 推荐使用 needsRender(), 可以更加流畅。但是如果需要截图等同步操作,可以使用 render()
221
+ *
222
+ * // param callback 渲染完成回调
223
+ * render(callback?: () => void): void,
224
+ * ```
225
+ *
226
+ * @function needsRender
227
+ * ```
228
+ * 下一帧渲染
229
+ * 调用 render() 和 needsRender() 均可在按需渲染时,使得画面渲染一次
230
+ * 区别在于:
231
+ * - needsRender() 为在下帧渲染画面
232
+ * - render() 在当前帧渲染画面
233
+ * 推荐使用 needsRender(), 可以更加流畅。但是如果需要截图等同步操作,可以使用 render()
234
+ * needsRender(): void,
235
+ * ```
236
+ *
237
+ * @function preloadPano
238
+ * ```
239
+ * 预加载点位图片资源
240
+ * // param panoIndex - 观察点序号
241
+ * // param callback - 加载完成回调, 并传递加载用时。
242
+ * // returns 加载完成的 Promise 参数同 callback
243
+ * preloadPano(panoIndex: number, callback?: (costs: number) => void): Promise<number>
244
+ * ```
245
+ *
246
+ * @example
247
+ * ```
248
+ * const { updateCamera, initBasisLoader, getPixels, render, needsRender, preloadPano } = useFiveAction();
249
+ * ```
250
+ */
251
+ export declare function useFiveAction(): FiveActionVueCallbacks;
252
+
253
+ /**
254
+ * Five Vue Hooks: 得到当前相机的方向(单位向量)
255
+ * @returns 当前相机方向的单位向量
256
+ */
257
+ export declare function useFiveCameraDirection(): Ref<THREE_2.Vector3>;
258
+
259
+ /**
260
+ * Five Vue Hooks: 得到当前相机的方向(射线对象)
261
+ * @returns 当前相机方向的射线对象
262
+ */
263
+ export declare function useFiveCameraRaycaster(): Ref<THREE_2.Raycaster>;
264
+
265
+ /**
266
+ * Five Vue Hooks: Five 的当前观测点
267
+ * @returns 当前观测点, 如果 work 未加载则为 null
268
+ * @example
269
+ * ```
270
+ * const observer = useFiveCurrentObserver();
271
+ * ```
272
+ */
273
+ export declare function useFiveCurrentObserver(): Ref<WorkObserver | null>;
274
+
275
+ /**
276
+ * Five Vue Hooks: Five 的实时状态
277
+ * @returns
278
+ * [ currentState: Five 的实时状态, setState: 设置 Five 的状态 ]
279
+ * @example
280
+ * ```
281
+ * const [ currentState, setState ] = useFiveCurrentState;
282
+ * ```
283
+ */
284
+ export declare function useFiveCurrentState(): [
285
+ currentState: Ref<State>,
286
+ setState: (state: Partial<State> | ((prevState: State) => Partial<State>), immediately?: boolean, userAction?: boolean) => void
287
+ ];
288
+
289
+ /**
290
+ * Five Vue Hooks: Five 事件监听
291
+ * 具体事件列表 请查看 Five.EventCallback
292
+ * @example
293
+ * ```
294
+ * useFiveEventCallback("cameraUpdate", pose => {});
295
+ * ```
296
+ */
297
+ export declare function useFiveEventCallback<T extends keyof EventCallback>(name: T, callback: EventCallback[T]): void;
298
+
299
+ /**
300
+ * Five Vue Hooks: Five 楼层
301
+ * @returns
302
+ * [ shownFloor: Five 当前显示的楼层, null 为都显示, showFloor: 设置显示楼层,不传参数为都显示 ]
303
+ * @example
304
+ * ```
305
+ * const [ shownFloor, showFloor ] = useFiveHelper;
306
+ * ```
307
+ */
308
+ export declare function useFiveFloor(): [
309
+ shownFloor: Ref<number | null>,
310
+ totalFloorLength: Ref<number>,
311
+ showFloor: (floorIndex?: number) => void
312
+ ];
313
+
314
+ /**
315
+ * Five Vue Hooks: Five 帮助元素的隐藏/显示
316
+ * @returns
317
+ * [ helperVisible: Five 帮助元素是否显示, toggleHelperVisible: 设置 帮助元素的隐藏/显示 ]
318
+ * @example
319
+ * ```
320
+ * const [ helperVisible, toggleHelperVisible ] = useFiveHelper;
321
+ * ```
322
+ */
323
+ export declare function useFiveHelper(): [
324
+ helperVisible: Ref<boolean>,
325
+ toggleHelperVisible: (visible: boolean) => void
326
+ ];
327
+
328
+ /**
329
+ * Five Vue Hooks: 获取当前模型
330
+ */
331
+ export declare function useFiveModel(): Ref<Model>;
332
+
333
+ /**
334
+ * Five Vue Hooks: 获取当前模型的包围盒
335
+ */
336
+ export declare function useFiveModelBounding(): Ref<THREE_2.Box3>;
337
+
338
+ /**
339
+ * Five Vue Hooks: 获取当前模型碰撞检测方法
340
+ *
341
+ * @function fiveModelIntersectRaycaster
342
+ * ```
343
+ * 计算模型射线碰撞检测
344
+ * // param raycaster THREE 射线对象
345
+ * // param floors 和某一楼层做碰撞检测, 不传为和所有楼层做碰撞检测
346
+ * // returns 返回碰撞
347
+ * intersectRaycaster(raycaster: THREE.Raycaster, floors?: number | number[]): Intersection[]
348
+ * ```
349
+ * @example
350
+ * ```
351
+ * const fiveModelIntersectRaycaster = useFiveModelIntersectRaycaster();
352
+ * const intersects = fiveModelIntersectRaycaster(raycaster);
353
+ * ```
354
+ */
355
+ export declare function useFiveModelIntersectRaycaster(): FiveModelIntersectRaycaster;
356
+
357
+ /**
358
+ * Five Vue Hooks: 获取当前模型加载状态
359
+ * @returns
360
+ * "Loaded": 加载完成
361
+ * "Empty" 加载未完成
362
+ */
363
+ export declare function useFiveModelReadyState(): Ref<"Loaded" | "Empty">;
364
+
365
+ /**
366
+ * Five Vue Hooks: 将三维的坐标对应到二维屏幕
367
+ *
368
+ * @function project2d
369
+ * ```
370
+ * 计算模型射线碰撞检测
371
+ * // param vector 三维的坐标
372
+ * // param testModel 是否和模型检测,如果检测,则被模型遮挡会返回 null
373
+ * // returns 三维的坐标 或者 null
374
+ * project2d(vector: THREE.Vector3 | Ref<THREE.Vector3>, testModel: boolean)
375
+ * v2: Ref<THREE.Vector2 | null>
376
+ * ```
377
+ *
378
+ * @example
379
+ * ```
380
+ * const project2d = useFiveProject2d();
381
+ * project2d(new THREE.Vector3(0, 0, 0));
382
+ * ```
383
+ */
384
+ export declare function useFiveProject2d(): Project2d;
385
+
386
+ /**
387
+ * Five Vue Hooks: 获取scene
388
+ */
389
+ export declare function useFiveScene(): Scene;
390
+
391
+ /**
392
+ * Five Vue Hooks: Five 的目标状态
393
+ * @returns
394
+ * [ currentState: Five 的目标状态, setState: 设置 Five 的状态 ]
395
+ * @example
396
+ * ```
397
+ * const [ state, setState ] = useFiveState;
398
+ * ```
399
+ */
400
+ export declare function useFiveState(): [
401
+ curState: Ref<State>,
402
+ setState: (state: Partial<State> | ((prevState: State) => Partial<State>), immediately?: boolean, userAction?: boolean) => void
403
+ ];
404
+
405
+ /**
406
+ * Five Vue Hooks: 获取/设置当前的 Work
407
+ *
408
+ * @returns
409
+ * [ work: 获取当前的 Work, loadWork: 设置 Work ]
410
+
411
+ * @function loadWork
412
+ * ```
413
+ * 加载 Work 数据
414
+ * // param work Work 数据
415
+ * // param state 初始化姿态
416
+ * // - "inherit" 使用当前姿态
417
+ * // - "initial" 使用 Work 数据中的 initial 姿态
418
+ * // - State 自定义姿态
419
+ * // param duration 切换时间
420
+ * (work: Work, state?: "inherit" | "initial" | Partial<Omit<State, "offset">>, duration?: number) => void
421
+ * ```
422
+ *
423
+ * @example
424
+ * ```
425
+ * const [ work, loadWork ] = useFiveWork;
426
+ * ```
427
+ */
428
+ export declare function useFiveWork(): [
429
+ work: DeepReadonly<Ref<Work | undefined>>,
430
+ loadWork: (work: Work, state?: "inherit" | "initial" | Partial<Omit<State, "offset">>, duration?: number, userAction?: boolean) => Promise<void>
431
+ ];
432
+
433
+ export { }