@realsee/five 6.8.0-alpha.2 → 6.8.0-alpha.21

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 (715) hide show
  1. package/AGENTS_READ_ME.md +4 -0
  2. package/AI_CONTEXT.md +4 -0
  3. package/README.md +9 -6
  4. package/{guides → ai_guides}/README.md +12 -2
  5. package/ai_guides/ai-doc-guidelines.md +102 -0
  6. package/{guides → ai_guides}/api.md +24 -1
  7. package/ai_guides/features/3dtile.md +172 -0
  8. package/{guides → ai_guides}/features/camera-animation.md +24 -3
  9. package/{guides → ai_guides}/features/clipper.md +2 -0
  10. package/{guides/features/coordnate-system.md → ai_guides/features/coordinate-system.md} +2 -0
  11. package/{guides → ai_guides}/features/event.md +2 -0
  12. package/{guides → ai_guides}/features/five.md +4 -0
  13. package/ai_guides/features/flowing-light-2d-pass.md +438 -0
  14. package/ai_guides/features/flowing-light-3d-pass.md +420 -0
  15. package/ai_guides/features/gaussian-blur-pass.md +202 -0
  16. package/{guides → ai_guides}/features/gesture.md +3 -0
  17. package/{guides → ai_guides}/features/get-screen-pixels.md +2 -0
  18. package/{guides → ai_guides}/features/image-options.md +3 -0
  19. package/{guides → ai_guides}/features/load-external-model.md +21 -0
  20. package/ai_guides/features/load-progress.md +140 -0
  21. package/ai_guides/features/material.md +153 -0
  22. package/{guides → ai_guides}/features/mode.md +4 -0
  23. package/{guides → ai_guides}/features/model.md +4 -1
  24. package/{guides → ai_guides}/features/move-pano-effect.md +2 -0
  25. package/{guides → ai_guides}/features/multi-work.md +2 -0
  26. package/ai_guides/features/pano-filter.md +148 -0
  27. package/{guides → ai_guides}/features/pano-tile.md +7 -14
  28. package/ai_guides/features/pano-uv.md +131 -0
  29. package/ai_guides/features/parameter.md +153 -0
  30. package/ai_guides/features/plugin.md +210 -0
  31. package/{guides → ai_guides}/features/postprocessing.md +39 -4
  32. package/{guides → ai_guides}/features/raycast.md +11 -0
  33. package/{guides → ai_guides}/features/request-proxy.md +2 -0
  34. package/{guides → ai_guides}/features/screen-project.md +2 -0
  35. package/{guides → ai_guides}/features/state.md +2 -0
  36. package/ai_guides/features/view-layer.md +187 -0
  37. package/{guides → ai_guides}/features/work.md +63 -2
  38. package/{guides → ai_guides}/glossary.md +26 -5
  39. package/{guides → ai_guides}/intro.md +1 -1
  40. package/{guides → ai_guides}/quick-start.md +1 -0
  41. package/ai_guides/release_notes/6.8.md +208 -0
  42. package/{guides → ai_guides}/template.md +17 -3
  43. package/docs/00_FOR_AI_AGENTS.md +11 -0
  44. package/docs/README.md +4 -7
  45. package/docs/assets/hierarchy.js +1 -1
  46. package/docs/assets/navigation.js +1 -1
  47. package/docs/assets/search.js +1 -1
  48. package/docs/classes/five.AdaptiveLuminancePass.html +7 -6
  49. package/docs/classes/five.BoundingMesh.html +2 -2
  50. package/docs/classes/five.Camera.html +1 -1
  51. package/docs/classes/five.EyeDomeLightingPass.html +1 -1
  52. package/docs/classes/five.Five.html +73 -72
  53. package/docs/classes/five.FivePass.html +1 -1
  54. package/docs/classes/five.Histogram.html +19 -0
  55. package/docs/classes/five.InternalWebGLRenderer.html +1 -1
  56. package/docs/classes/five.Model.html +31 -31
  57. package/docs/classes/five.ModelScene.html +1 -1
  58. package/docs/classes/five.NetworkSubscribe.html +1 -1
  59. package/docs/classes/five.PBMContainer.html +1 -1
  60. package/docs/classes/five.PBMCustomShader.html +42 -3
  61. package/docs/classes/five.PBMGSObject.html +5 -3
  62. package/docs/classes/five.PBMGroup.html +1 -1
  63. package/docs/classes/five.PBMMesh.html +1 -1
  64. package/docs/classes/five.PBMMeshMaterial.html +16 -7
  65. package/docs/classes/five.PBMPanoFilter.html +61 -0
  66. package/docs/classes/five.PBMPointCloud.html +1 -1
  67. package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
  68. package/docs/classes/five.PBMSkinnedMesh.html +1 -1
  69. package/docs/classes/five.PBMUpdateable.html +41 -0
  70. package/docs/classes/five.PanoCircleMesh.html +1 -1
  71. package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
  72. package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
  73. package/docs/classes/five.Parameter.html +57 -53
  74. package/docs/classes/five.Scene.html +1 -1
  75. package/docs/classes/five.Subscribe.html +1 -1
  76. package/docs/classes/five.Tile.html +1 -1
  77. package/docs/classes/five.Tile3D.html +30 -26
  78. package/docs/classes/five.TileNode.html +1 -1
  79. package/docs/classes/five.Trajectory.html +1 -1
  80. package/docs/classes/five.TrajectoryNode.html +1 -1
  81. package/docs/classes/five.Work.html +16 -16
  82. package/docs/classes/five.WorkResolvedObserver.html +27 -2
  83. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  84. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  85. package/docs/classes/gltf-loader.GLTFLoader.html +1 -1
  86. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  87. package/docs/classes/gltf-loader.GLTFParser.html +1 -1
  88. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  89. package/docs/classes/line.Line.html +1 -1
  90. package/docs/classes/line.LineGeometry.html +1 -1
  91. package/docs/classes/line.LineMaterial.html +1 -1
  92. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  93. package/docs/classes/line.THREE_Line2.html +1 -1
  94. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  95. package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
  96. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  97. package/docs/classes/sticker.Sticker.html +1 -1
  98. package/docs/classes/vfx.Airflow.html +1 -1
  99. package/docs/classes/vfx.Flame.html +1 -1
  100. package/docs/classes/vfx.Particle.html +1 -1
  101. package/docs/classes/vfx.ParticleGPU.html +1 -1
  102. package/docs/classes/vfx.SpotLight.html +1 -1
  103. package/docs/documents/README.html +11 -2
  104. package/docs/documents/ai-doc-guidelines.html +60 -15
  105. package/docs/documents/api.html +40 -15
  106. package/docs/documents/features_3dtile.html +142 -45
  107. package/docs/documents/features_camera-animation.html +62 -5
  108. package/docs/documents/features_clipper.html +3 -0
  109. package/docs/documents/{features_coordnate-system.html → features_coordinate-system.html} +4 -1
  110. package/docs/documents/features_event.html +3 -0
  111. package/docs/documents/features_five.html +4 -0
  112. package/docs/documents/features_flowing-light-2d-pass.html +356 -0
  113. package/docs/documents/features_flowing-light-3d-pass.html +351 -0
  114. package/docs/documents/features_gaussian-blur-pass.html +182 -0
  115. package/docs/documents/features_gesture.html +4 -0
  116. package/docs/documents/features_get-screen-pixels.html +3 -0
  117. package/docs/documents/features_image-options.html +3 -0
  118. package/docs/documents/features_load-external-model.html +25 -2
  119. package/docs/documents/features_load-progress.html +110 -0
  120. package/docs/documents/features_material.html +341 -0
  121. package/docs/documents/features_mode.html +5 -0
  122. package/docs/documents/features_model.html +5 -1
  123. package/docs/documents/features_move-pano-effect.html +3 -0
  124. package/docs/documents/features_multi-work.html +3 -0
  125. package/docs/documents/features_pano-filter.html +122 -0
  126. package/docs/documents/features_pano-tile.html +34 -19
  127. package/docs/documents/features_pano-uv.html +82 -0
  128. package/docs/documents/features_parameter.html +76 -56
  129. package/docs/documents/features_plugin.html +105 -0
  130. package/docs/documents/features_postprocessing.html +22 -5
  131. package/docs/documents/features_raycast.html +4 -1
  132. package/docs/documents/features_request-proxy.html +3 -0
  133. package/docs/documents/features_screen-project.html +3 -0
  134. package/docs/documents/features_state.html +3 -0
  135. package/docs/documents/features_view-layer.html +158 -0
  136. package/docs/documents/features_work.html +63 -2
  137. package/docs/documents/glossary.html +31 -6
  138. package/docs/documents/intro.html +1 -1
  139. package/docs/documents/quick-start.html +1 -0
  140. package/docs/documents/release_notes_6.8.html +189 -0
  141. package/docs/documents/template.html +45 -4
  142. package/docs/functions/five.loadAt3d.html +1 -1
  143. package/docs/functions/five.loadB3dm.html +1 -1
  144. package/docs/functions/five.loadDome.html +1 -1
  145. package/docs/functions/five.loadDomez.html +1 -1
  146. package/docs/functions/five.loadFbx.html +1 -1
  147. package/docs/functions/five.loadGltf.html +1 -1
  148. package/docs/functions/five.loadPbm.html +1 -1
  149. package/docs/functions/five.loadPly.html +1 -1
  150. package/docs/functions/five.loadPnts.html +1 -1
  151. package/docs/functions/five.loadSplat.html +1 -1
  152. package/docs/functions/five.loadSpz.html +1 -1
  153. package/docs/functions/five.loadX3p.html +1 -1
  154. package/docs/functions/five.parseWork.html +1 -1
  155. package/docs/functions/vue.useFiveWorks.html +2 -2
  156. package/docs/hierarchy.html +1 -1
  157. package/docs/index.html +11 -2
  158. package/docs/interfaces/five.AddableObject.html +1 -1
  159. package/docs/interfaces/five.AjaxOptions.html +1 -1
  160. package/docs/interfaces/five.BaseEvent.html +2 -2
  161. package/docs/interfaces/five.EventCallback.html +53 -47
  162. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
  163. package/docs/interfaces/five.GestureEvent.html +2 -2
  164. package/docs/interfaces/five.ImageOptions.html +1 -1
  165. package/docs/interfaces/five.IntersectEvent.html +2 -2
  166. package/docs/interfaces/five.IntersectMesh.html +1 -1
  167. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  168. package/docs/interfaces/five.Intersection.html +4 -3
  169. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +6 -6
  170. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
  171. package/docs/interfaces/five.ModeChangeEvent.html +2 -2
  172. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  173. package/docs/interfaces/five.ModelEvent.html +2 -2
  174. package/docs/interfaces/five.ModelSceneEvent.html +2 -2
  175. package/docs/interfaces/five.ModelTileEvent.html +8 -0
  176. package/docs/interfaces/five.MovePanoOptions.html +7 -7
  177. package/docs/interfaces/five.NetworkAbortError.html +1 -1
  178. package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
  179. package/docs/interfaces/five.NetworkOptions.html +1 -1
  180. package/docs/interfaces/five.NetworkProxyError.html +1 -1
  181. package/docs/interfaces/five.NetworkResourceEvent.html +2 -2
  182. package/docs/interfaces/five.NetworkResponseError.html +1 -1
  183. package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
  184. package/docs/interfaces/five.ObjectEvent.html +2 -2
  185. package/docs/interfaces/five.PBMClipperParameter.html +2 -2
  186. package/docs/interfaces/five.PBMCustomShaderInitArgs.html +2 -2
  187. package/docs/interfaces/five.PBMCustomShaderSlots.html +2 -2
  188. package/docs/interfaces/five.PBMMaterial.html +1 -1
  189. package/docs/interfaces/five.PBMMeshMaterialParameters.html +5 -3
  190. package/docs/interfaces/five.PBMPanoDepth.html +5 -5
  191. package/docs/interfaces/five.PBMPanoFilterValue.html +6 -0
  192. package/docs/interfaces/five.PBMPanoPicture.html +8 -6
  193. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
  194. package/docs/interfaces/five.PBMRefinedScreen.html +2 -2
  195. package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
  196. package/docs/interfaces/five.PanoEvent.html +2 -2
  197. package/docs/interfaces/five.PanoTextureEvent.html +2 -2
  198. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
  199. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  200. package/docs/interfaces/five.ParameterMaterialValue.html +42 -38
  201. package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
  202. package/docs/interfaces/five.ParameterValue.html +56 -52
  203. package/docs/interfaces/five.Pose.html +1 -1
  204. package/docs/interfaces/five.RenderEvent.html +2 -2
  205. package/docs/interfaces/five.ResolvedParameterValue.html +56 -52
  206. package/docs/interfaces/five.RgbaData.html +7 -0
  207. package/docs/interfaces/five.SplatData.html +2 -2
  208. package/docs/interfaces/five.State.html +1 -1
  209. package/docs/interfaces/five.StateEvent.html +2 -2
  210. package/docs/interfaces/five.TextureOptions.html +1 -1
  211. package/docs/interfaces/five.Tile3DOptions.html +2 -2
  212. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -7
  213. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
  214. package/docs/interfaces/five.ViewLayer.html +30 -26
  215. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  216. package/docs/interfaces/five.WorkImage.html +1 -1
  217. package/docs/interfaces/five.WorkModel.html +8 -8
  218. package/docs/interfaces/five.WorkModelLayer.html +6 -6
  219. package/docs/interfaces/five.WorkObserver.html +27 -2
  220. package/docs/interfaces/five.WorkTile.html +1 -1
  221. package/docs/interfaces/five.WorksEvent.html +2 -2
  222. package/docs/interfaces/five.XRControllerEvent.html +2 -2
  223. package/docs/interfaces/five.XRGestureEvent.html +2 -2
  224. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
  225. package/docs/interfaces/five.XRSessionEvent.html +2 -2
  226. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  227. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  228. package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
  229. package/docs/interfaces/plugins.DynamicPathLinePluginController.html +1 -1
  230. package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
  231. package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
  232. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  233. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  234. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  235. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  236. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  237. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  238. package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
  239. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
  240. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
  241. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  242. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  243. package/docs/interfaces/plugins.TrajectoryController.html +1 -1
  244. package/docs/interfaces/react.FiveInjectionTypes.html +13 -13
  245. package/docs/modules/five.html +1 -1
  246. package/docs/modules.html +1 -1
  247. package/docs/types/five.ControllerEventTypes.html +27 -25
  248. package/docs/types/five.EasingFunction.html +1 -0
  249. package/docs/types/five.EventTypes.html +27 -25
  250. package/docs/types/five.FivePlugin.html +1 -1
  251. package/docs/types/five.FivePluginInit.html +1 -1
  252. package/docs/types/five.FivePluginInstance.html +1 -1
  253. package/docs/types/five.NetworkProgressCallback.html +1 -1
  254. package/docs/types/five.PBMAlphaMode.html +1 -1
  255. package/docs/types/five.PBMColorStyle.html +1 -1
  256. package/docs/types/five.PBMFloorStyle.html +1 -1
  257. package/docs/types/five.PBMMeshShaderType.html +1 -1
  258. package/docs/types/five.PBMPointBack.html +1 -1
  259. package/docs/types/five.PBMPointCloudShaderType.html +1 -1
  260. package/docs/types/five.PBMPointShape.html +1 -1
  261. package/docs/types/five.PBMPointSize.html +1 -1
  262. package/docs/types/five.PBMTransition.html +1 -1
  263. package/docs/types/five.ParseOptions.html +6 -6
  264. package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
  265. package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
  266. package/five/application/analysis.d.ts +40 -0
  267. package/five/application/controllers.d.ts +41 -0
  268. package/five/application/events-legacy.d.ts +454 -0
  269. package/five/application/events.d.ts +69 -0
  270. package/five/application/five.d.ts +519 -0
  271. package/five/application/fiveInitArgs.d.ts +176 -0
  272. package/five/application/fiveLoadOptions.d.ts +21 -0
  273. package/five/application/generateDefaultVideoElement.d.ts +2 -0
  274. package/five/application/getViewportScale.d.ts +2 -0
  275. package/five/application/initLights.d.ts +3 -0
  276. package/five/application/mode.d.ts +28 -0
  277. package/five/application/renderPoweredByRealsee.d.ts +3 -0
  278. package/five/assets/cardboard-png-data-url.d.ts +2 -0
  279. package/five/assets/gradient-png-data-url.d.ts +2 -0
  280. package/five/assets/loading-png-data-url.d.ts +2 -0
  281. package/five/assets/phone-png-data-url.d.ts +2 -0
  282. package/five/assets/realsee-png-data-url.d.ts +2 -0
  283. package/five/bvh/bvhMath.d.ts +33 -0
  284. package/five/bvh/bvhMesh.d.ts +7 -0
  285. package/five/bvh/bvhNode.d.ts +29 -0
  286. package/five/bvh/bvhObject.d.ts +18 -0
  287. package/five/bvh/bvhPoints.d.ts +6 -0
  288. package/five/bvh/index.d.ts +10 -0
  289. package/five/bvh/worker.d.ts +35 -0
  290. package/five/cardboard/helper.d.ts +2 -0
  291. package/five/cardboard/index.d.ts +13 -0
  292. package/five/cardboard/sensor.d.ts +158 -0
  293. package/five/certificates/hardware.d.ts +1 -0
  294. package/five/controllers/base.d.ts +167 -0
  295. package/five/controllers/events.d.ts +71 -0
  296. package/five/controllers/floorplan.d.ts +119 -0
  297. package/five/controllers/mapview.d.ts +139 -0
  298. package/five/controllers/model.d.ts +57 -0
  299. package/five/controllers/panorama.d.ts +143 -0
  300. package/five/controllers/panoramaLike.d.ts +87 -0
  301. package/five/controllers/topview.d.ts +42 -0
  302. package/five/controllers/vrPanorama.d.ts +56 -0
  303. package/five/controllers/xrPanorama.d.ts +81 -0
  304. package/five/core/camera.d.ts +65 -0
  305. package/five/core/internalWebGLRenderer.d.ts +14 -0
  306. package/five/core/panoVideo.d.ts +18 -0
  307. package/five/core/scene.d.ts +10 -0
  308. package/five/core/tiling.d.ts +43 -0
  309. package/five/declare.d.ts +2 -1
  310. package/five/gaussian-splatting/util/renderData.d.ts +52 -0
  311. package/five/gaussian-splatting/wasm/data.d.ts +20 -0
  312. package/five/gaussian-splatting/wasm/sort.d.ts +18 -0
  313. package/five/gaussian-splatting/worker/dataWorker.d.ts +1 -0
  314. package/five/gaussian-splatting/worker/sortWorker.d.ts +1 -0
  315. package/five/index.d.ts +60 -4637
  316. package/five/index.js +193 -341
  317. package/five/index.mjs +26455 -31011
  318. package/five/meshes/boundingMesh.d.ts +12 -0
  319. package/five/meshes/intersectMesh.d.ts +8 -0
  320. package/five/meshes/panoCircleMesh.d.ts +35 -0
  321. package/five/meshes/panoCircleMeshCustom.d.ts +40 -0
  322. package/five/meshes/panoCircleMeshSolid.d.ts +34 -0
  323. package/five/meshes/panoSphereMesh.d.ts +27 -0
  324. package/five/model/helpers/coordinate-transform.d.ts +3 -0
  325. package/five/model/helpers/ellipsoid-coordinates.d.ts +14 -0
  326. package/five/model/helpers/get-edges-by-sphere.d.ts +8 -0
  327. package/five/model/helpers/get-recommend-tile3d-parameters.d.ts +8 -0
  328. package/five/model/index.d.ts +70 -0
  329. package/five/model/intersection.d.ts +18 -0
  330. package/five/model/loaders/at3d.d.ts +12 -0
  331. package/five/model/loaders/b3dm.d.ts +9 -0
  332. package/five/model/loaders/dome.d.ts +22 -0
  333. package/five/model/loaders/domez.d.ts +11 -0
  334. package/five/model/loaders/fbx.d.ts +8 -0
  335. package/five/model/loaders/glTF-helpers/extensions/CESIUM_RTC.d.ts +9 -0
  336. package/five/model/loaders/glTF-helpers/extensions/EXT_meshopt_compression.d.ts +8 -0
  337. package/five/model/loaders/glTF-helpers/extensions/EXT_texture_webp.d.ts +11 -0
  338. package/five/model/loaders/glTF-helpers/extensions/KHR_animation_pointer.d.ts +6 -0
  339. package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +25 -0
  340. package/five/model/loaders/glTF-helpers/extensions/KHR_draco_mesh_compression.d.ts +11 -0
  341. package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +9 -0
  342. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_clearcoat.d.ts +10 -0
  343. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_emissive_strength.d.ts +10 -0
  344. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_sheen.d.ts +10 -0
  345. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_transmission.d.ts +10 -0
  346. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_unlit.d.ts +10 -0
  347. package/five/model/loaders/glTF-helpers/extensions/KHR_mesh_quantization.d.ts +6 -0
  348. package/five/model/loaders/glTF-helpers/extensions/KHR_node_visibility.d.ts +10 -0
  349. package/five/model/loaders/glTF-helpers/extensions/KHR_texture_basisu.d.ts +9 -0
  350. package/five/model/loaders/glTF-helpers/extensions/KHR_texture_transform.d.ts +10 -0
  351. package/five/model/loaders/glTF-helpers/extensions/REALSEE_materials_lightmap.d.ts +7 -0
  352. package/five/model/loaders/glTF-helpers/extensions/base.d.ts +24 -0
  353. package/five/model/loaders/glTF-helpers/glTF.d.ts +713 -0
  354. package/five/model/loaders/glTF-helpers/index.d.ts +47 -0
  355. package/five/model/loaders/glTF-helpers/parser.d.ts +114 -0
  356. package/five/model/loaders/glTF-helpers/type.d.ts +14 -0
  357. package/five/model/loaders/gltf.d.ts +10 -0
  358. package/five/model/loaders/obj.d.ts +9 -0
  359. package/five/model/loaders/pbm.d.ts +26 -0
  360. package/five/model/loaders/ply.d.ts +24 -0
  361. package/five/model/loaders/pnts.d.ts +8 -0
  362. package/five/model/loaders/protobuf/dome.d.ts +540 -0
  363. package/five/model/loaders/protobuf/pbm.d.ts +203 -0
  364. package/five/model/loaders/shared.d.ts +16 -0
  365. package/five/model/loaders/splat.d.ts +8 -0
  366. package/five/model/loaders/spz.d.ts +14 -0
  367. package/five/model/loaders/tile3d-helpers/feature-table.d.ts +15 -0
  368. package/five/model/loaders/tile3d-helpers/gl-type.d.ts +20 -0
  369. package/five/model/loaders/tile3d-helpers/parse-gltf-array-buffer.d.ts +2 -0
  370. package/five/model/loaders/tile3d-helpers/parse-header.d.ts +2 -0
  371. package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.d.ts +2 -0
  372. package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.worker.d.ts +6 -0
  373. package/five/model/loaders/tile3d-helpers/parse-table.d.ts +3 -0
  374. package/five/model/loaders/tile3d-helpers/tile3d-type.d.ts +35 -0
  375. package/five/model/loaders/x3p.d.ts +22 -0
  376. package/five/model/materials/pbmMaterial.d.ts +137 -0
  377. package/five/model/materials/pbmMeshMaterial.d.ts +126 -0
  378. package/five/model/materials/pbmPointCloudMaterial.d.ts +70 -0
  379. package/five/model/model-scene.d.ts +172 -0
  380. package/five/model/model.d.ts +209 -0
  381. package/five/model/objects/pbmContainer.d.ts +28 -0
  382. package/five/model/objects/pbmGaussianSplattingObject.d.ts +43 -0
  383. package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +55 -0
  384. package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -0
  385. package/five/model/objects/pbmGroup.d.ts +8 -0
  386. package/five/model/objects/pbmMesh.d.ts +10 -0
  387. package/five/model/objects/pbmPointCloud.d.ts +7 -0
  388. package/five/model/parameter.d.ts +140 -0
  389. package/five/model/shaders/pbm_gaussian_splatting/fragment.d.ts +2 -0
  390. package/five/model/shaders/pbm_gaussian_splatting/vertex.d.ts +2 -0
  391. package/five/model/shaders/pbm_mesh_basic/fragment.d.ts +2 -0
  392. package/five/model/shaders/pbm_mesh_basic/vertex.d.ts +2 -0
  393. package/five/model/shaders/pbm_mesh_none/fragment.d.ts +2 -0
  394. package/five/model/shaders/pbm_mesh_none/vertex.d.ts +2 -0
  395. package/five/model/shaders/pbm_mesh_phong/fragment.d.ts +2 -0
  396. package/five/model/shaders/pbm_mesh_phong/vertex.d.ts +2 -0
  397. package/five/model/shaders/pbm_mesh_standard/fragment.d.ts +2 -0
  398. package/five/model/shaders/pbm_mesh_standard/vertex.d.ts +2 -0
  399. package/five/model/shaders/pbm_pointcloud/fragment.d.ts +2 -0
  400. package/five/model/shaders/pbm_pointcloud/vertex.d.ts +2 -0
  401. package/five/model/tile3d/header.d.ts +88 -0
  402. package/five/model/tile3d/index.d.ts +214 -0
  403. package/five/model/tile3d/tile-cache.d.ts +18 -0
  404. package/five/model/tile3d/tile-content.d.ts +10 -0
  405. package/five/model/tile3d/tile-node.d.ts +24 -0
  406. package/five/model/tile3d/tile-request-scheduler.d.ts +17 -0
  407. package/five/model/tile3d/tile.d.ts +79 -0
  408. package/five/model/tile3d/tileset-base-traverser.d.ts +59 -0
  409. package/five/model/tile3d/tileset-most-detail-traverser.d.ts +14 -0
  410. package/five/model/tile3d/tileset-normal-traverser.d.ts +15 -0
  411. package/five/model/tile3d/tileset-skip-traverser.d.ts +60 -0
  412. package/five/model/tile3d/tileset.d.ts +69 -0
  413. package/five/model/tile3d/trajectory-content.d.ts +9 -0
  414. package/five/model/tile3d/trajectory-node.d.ts +15 -0
  415. package/five/model/tile3d/trajectory.d.ts +30 -0
  416. package/five/model/tile3d/types.d.ts +33 -0
  417. package/five/model/view-layer.d.ts +20 -0
  418. package/five/renderer/five-renderer.d.ts +17 -0
  419. package/five/renderer/index.d.ts +3 -0
  420. package/five/renderer/postprocessing/composer.d.ts +37 -0
  421. package/five/renderer/postprocessing/index.d.ts +7 -0
  422. package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +17 -0
  423. package/five/renderer/postprocessing/passes/eye-dome-lighting-pass.d.ts +14 -0
  424. package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +36 -0
  425. package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +36 -0
  426. package/five/renderer/postprocessing/passes/gaussian-blur-pass.d.ts +12 -0
  427. package/five/renderer/postprocessing/passes/pass.d.ts +38 -0
  428. package/five/renderer/scene-renderers/point-cloud-high-quality-scene-renderer.d.ts +11 -0
  429. package/five/renderer/scene-renderers/scene-renderer.d.ts +9 -0
  430. package/five/renderer/scene-renderers/ssaa-scene-renderer.d.ts +15 -0
  431. package/five/renderer/tools/full-screen-quad.d.ts +15 -0
  432. package/five/renderer/tools/render-cube-to-equirectangular.d.ts +7 -0
  433. package/five/renderer/tools/render-full-screen-depth.d.ts +2 -0
  434. package/five/renderer/tools/render-full-screen.d.ts +2 -0
  435. package/five/texture/histogram.d.ts +54 -0
  436. package/five/texture/imageBitmap.d.ts +13 -0
  437. package/five/texture/initTexture.d.ts +3 -0
  438. package/five/texture/loader.d.ts +39 -0
  439. package/five/texture/textureData.d.ts +11 -0
  440. package/five/thirdparty/fflate.d.ts +1407 -0
  441. package/five/thirdparty/hammer.d.ts +375 -0
  442. package/five/thirdparty/jsrsasign.d.ts +753 -0
  443. package/five/thirdparty/meshopt_decoder.d.ts +15 -0
  444. package/five/three-version-check.d.ts +1 -0
  445. package/five/types/addableObject.d.ts +12 -0
  446. package/five/types/cube.d.ts +1 -0
  447. package/five/types/gestureInput.d.ts +24 -0
  448. package/five/types/imageOptions.d.ts +20 -0
  449. package/five/types/intersectMeshInterface.d.ts +8 -0
  450. package/five/types/movePanoEffect.d.ts +13 -0
  451. package/five/types/movePanoOptions.d.ts +36 -0
  452. package/five/types/panoCircleMeshInterface.d.ts +34 -0
  453. package/five/types/plugin.d.ts +25 -0
  454. package/five/types/pose.d.ts +17 -0
  455. package/five/types/state.d.ts +20 -0
  456. package/five/types/viewport.d.ts +22 -0
  457. package/five/utils/ajax.d.ts +66 -0
  458. package/five/utils/animationFrameLoop.d.ts +45 -0
  459. package/five/utils/array.d.ts +31 -0
  460. package/five/utils/asyncTaskQueue.d.ts +8 -0
  461. package/five/utils/bufferGeometry.d.ts +33 -0
  462. package/five/utils/calculateProgress.d.ts +39 -0
  463. package/five/utils/calculateThreeMouse.d.ts +13 -0
  464. package/five/utils/canplayVideo.d.ts +2 -0
  465. package/five/utils/clamp.d.ts +2 -0
  466. package/five/utils/clock.d.ts +17 -0
  467. package/five/utils/createSymbol.d.ts +5 -0
  468. package/five/utils/decodeText.d.ts +2 -0
  469. package/five/utils/deepEqual.d.ts +2 -0
  470. package/five/utils/deepFreeze.d.ts +2 -0
  471. package/five/utils/defineProperty.d.ts +9 -0
  472. package/five/utils/detector.d.ts +14 -0
  473. package/five/utils/distance.d.ts +10 -0
  474. package/five/utils/draco.d.ts +26 -0
  475. package/five/utils/easing.d.ts +63 -0
  476. package/five/utils/event.d.ts +159 -0
  477. package/five/utils/formatRad.d.ts +7 -0
  478. package/five/utils/imageSupport.d.ts +6 -0
  479. package/five/utils/imageURL.d.ts +42 -0
  480. package/five/utils/isEmptyObject.d.ts +2 -0
  481. package/five/utils/isNil.d.ts +6 -0
  482. package/five/utils/isNumber.d.ts +2 -0
  483. package/five/utils/isPowerOfTwo.d.ts +2 -0
  484. package/five/utils/isPromise.d.ts +2 -0
  485. package/five/utils/isSimilar.d.ts +6 -0
  486. package/five/utils/json.d.ts +7 -0
  487. package/five/utils/ktx2.d.ts +30 -0
  488. package/five/utils/lzma/index.d.ts +2 -0
  489. package/five/utils/lzma/lzma.d.ts +3 -0
  490. package/five/utils/lzma/lzmaWASM.d.ts +2 -0
  491. package/five/utils/lzma/lzmaWorker.d.ts +14 -0
  492. package/five/utils/memoryUsage.d.ts +29 -0
  493. package/five/utils/motion.d.ts +38 -0
  494. package/five/utils/noop.d.ts +6 -0
  495. package/five/utils/now.d.ts +7 -0
  496. package/five/utils/pano.d.ts +9 -0
  497. package/five/utils/pick.d.ts +3 -0
  498. package/five/utils/poseUtils.d.ts +5 -0
  499. package/five/utils/renderCubeTextureToCubeRenderTarget.d.ts +3 -0
  500. package/five/utils/renderDepth.d.ts +2 -0
  501. package/five/utils/renderTexturesToCubeRenderTarget.d.ts +10 -0
  502. package/five/utils/requestPermission.d.ts +3 -0
  503. package/five/utils/shaderContentFix.d.ts +7 -0
  504. package/five/utils/shaderMaterial.d.ts +20 -0
  505. package/five/utils/stateUtils.d.ts +5 -0
  506. package/five/utils/string-pattern.d.ts +8 -0
  507. package/five/utils/subscribe.d.ts +67 -0
  508. package/five/utils/tileCube.d.ts +19 -0
  509. package/five/utils/toFastProperties.d.ts +1 -0
  510. package/five/utils/typedCache.d.ts +10 -0
  511. package/five/utils/uniform.d.ts +15 -0
  512. package/five/utils/url.d.ts +35 -0
  513. package/five/utils/uuid.d.ts +5 -0
  514. package/five/utils/values.d.ts +2 -0
  515. package/five/utils/vectorCoordinates.d.ts +29 -0
  516. package/five/utils/volume.d.ts +111 -0
  517. package/five/utils/webglError.d.ts +7 -0
  518. package/five/utils/worker.d.ts +26 -0
  519. package/five/webxr/XRControllerModelFactory.d.ts +28 -0
  520. package/five/webxr/motionHelper.d.ts +68 -0
  521. package/five/webxr/xrButton.d.ts +4 -0
  522. package/five/webxr/xrController.d.ts +24 -0
  523. package/five/webxr/xrManager.d.ts +84 -0
  524. package/five/work/_ALLOW_HOST.d.ts +2 -0
  525. package/five/work/index.d.ts +6 -0
  526. package/five/work/keychain.d.ts +5 -0
  527. package/five/work/looseWorkType.d.ts +121 -0
  528. package/five/work/verify.d.ts +7 -0
  529. package/five/work/work.d.ts +236 -0
  530. package/five/work/workFetcher.d.ts +4 -0
  531. package/five/work/workJson.d.ts +3 -0
  532. package/five/work/workJsonType.d.ts +73 -0
  533. package/five/work/workObserverUtils.d.ts +36 -0
  534. package/five/work/workParser.d.ts +6 -0
  535. package/five/work/workResolvedObserver.d.ts +12 -0
  536. package/five/work/workVerify.d.ts +2 -0
  537. package/five/work/works.d.ts +10 -0
  538. package/gltf-loader/gltf-object.d.ts +17 -0
  539. package/gltf-loader/index.d.ts +60 -160
  540. package/gltf-loader/index.js +9 -9
  541. package/gltf-loader/index.mjs +1351 -1451
  542. package/gltf-loader/thirdparty/DDSLoader.d.ts +23 -0
  543. package/gltf-loader/thirdparty/DRACOLoader.d.ts +18 -0
  544. package/gltf-loader/thirdparty/GLTFLoader.d.ts +59 -0
  545. package/line/circle_png.d.ts +1 -0
  546. package/line/index.d.ts +19 -69
  547. package/line/index.js +4 -4
  548. package/line/index.mjs +334 -513
  549. package/line/utils/Line2.d.ts +7 -0
  550. package/line/utils/LineGeometry.d.ts +10 -0
  551. package/line/utils/LineMaterial.d.ts +20 -0
  552. package/line/utils/LineSegments2.d.ts +11 -0
  553. package/line/utils/LineSegmentsGeometry.d.ts +15 -0
  554. package/llms.txt +43 -31
  555. package/package.json +11 -2
  556. package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
  557. package/plugins/BackgroundPlugin/index.d.ts +5 -0
  558. package/plugins/BackgroundPlugin/typings.d.ts +44 -0
  559. package/plugins/BasePlugin/index.d.ts +119 -0
  560. package/plugins/DynamicPathLinePlugin/Controller.d.ts +167 -0
  561. package/plugins/DynamicPathLinePlugin/index.d.ts +5 -0
  562. package/plugins/DynamicPathLinePlugin/line2/Line2.d.ts +7 -0
  563. package/plugins/DynamicPathLinePlugin/line2/LineGeometry.d.ts +10 -0
  564. package/plugins/DynamicPathLinePlugin/line2/LineMaterial.d.ts +17 -0
  565. package/plugins/DynamicPathLinePlugin/line2/LineSegments2.d.ts +11 -0
  566. package/plugins/DynamicPathLinePlugin/line2/LineSegmentsGeometry.d.ts +15 -0
  567. package/plugins/DynamicPathLinePlugin/typing.d.ts +129 -0
  568. package/plugins/DynamicPathLinePlugin/typings.d.ts +72 -0
  569. package/plugins/ItemMaskPlugin/Controller.d.ts +48 -0
  570. package/plugins/ItemMaskPlugin/index.d.ts +5 -0
  571. package/plugins/ItemMaskPlugin/typing.d.ts +58 -0
  572. package/plugins/OrientationPlugin/Controller.d.ts +82 -0
  573. package/plugins/OrientationPlugin/RoundedBoxGeometry.d.ts +11 -0
  574. package/plugins/OrientationPlugin/index.d.ts +6 -0
  575. package/plugins/OrientationPlugin/typing.d.ts +25 -0
  576. package/plugins/PanoAnimePlugin/Controller.d.ts +46 -0
  577. package/plugins/PanoAnimePlugin/index.d.ts +5 -0
  578. package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
  579. package/plugins/PluginTemplate/Controller.d.ts +27 -0
  580. package/plugins/PluginTemplate/index.d.ts +5 -0
  581. package/plugins/PluginTemplate/typing.d.ts +21 -0
  582. package/plugins/TrajectoryPlugin/Controller.d.ts +85 -0
  583. package/plugins/TrajectoryPlugin/index.d.ts +6 -0
  584. package/plugins/TrajectoryPlugin/typing.d.ts +25 -0
  585. package/plugins/index.d.ts +9 -1102
  586. package/plugins/index.js +17 -21
  587. package/plugins/index.mjs +3342 -4245
  588. package/plugins/thirdParty/CSS3DRenderer.d.ts +32 -0
  589. package/plugins/thirdParty/OrbitControls.d.ts +78 -0
  590. package/plugins/utils/absoluteUrl.d.ts +5 -0
  591. package/plugins/utils/clamp.d.ts +2 -0
  592. package/plugins/utils/loadImage.d.ts +1 -0
  593. package/plugins/utils/motion.d.ts +38 -0
  594. package/plugins/utils/now.d.ts +6 -0
  595. package/plugins/utils/uuid.d.ts +5 -0
  596. package/react/canvas.d.ts +19 -0
  597. package/react/context.d.ts +11 -0
  598. package/react/createProvider.d.ts +95 -0
  599. package/react/createStore.d.ts +144 -0
  600. package/react/hooks/unsafe__useFiveInstance.d.ts +9 -0
  601. package/react/hooks/useFiveAction.d.ts +147 -0
  602. package/react/hooks/useFiveCameraDirection.d.ts +7 -0
  603. package/react/hooks/useFiveCameraRaycaster.d.ts +7 -0
  604. package/react/hooks/useFiveCurrentObserver.d.ts +11 -0
  605. package/react/hooks/useFiveCurrentState.d.ts +15 -0
  606. package/react/hooks/useFiveEventCallback.d.ts +12 -0
  607. package/react/hooks/useFiveFloor.d.ts +15 -0
  608. package/react/hooks/useFiveHelper.d.ts +14 -0
  609. package/react/hooks/useFiveModelBounding.d.ts +5 -0
  610. package/react/hooks/useFiveModelEffect.d.ts +14 -0
  611. package/react/hooks/useFiveModelIntersectRaycaster.d.ts +22 -0
  612. package/react/hooks/useFiveModelReadyState.d.ts +8 -0
  613. package/react/hooks/useFiveProject2d.d.ts +20 -0
  614. package/react/hooks/useFiveSceneEffect.d.ts +21 -0
  615. package/react/hooks/useFiveState.d.ts +6 -0
  616. package/react/hooks/useFiveWork.d.ts +29 -0
  617. package/react/index.d.ts +24 -830
  618. package/react/index.js +3 -3
  619. package/react/index.mjs +572 -783
  620. package/react/rendererPool.d.ts +7 -0
  621. package/react/withFive.d.ts +213 -0
  622. package/shader-lib/EvenessPlane/index.d.ts +10 -0
  623. package/shader-lib/PointCloudExpand/index.d.ts +59 -0
  624. package/shader-lib/PolygonCuter/index.d.ts +52 -0
  625. package/shader-lib/PolygonCuter/worker.d.ts +14 -0
  626. package/shader-lib/ShineModel/index.d.ts +7 -0
  627. package/shader-lib/SweepModel/index.d.ts +7 -0
  628. package/shader-lib/index.d.ts +5 -86
  629. package/shader-lib/index.js +13 -14
  630. package/shader-lib/index.mjs +424 -824
  631. package/sticker/geometry.d.ts +3 -0
  632. package/sticker/index.d.ts +68 -71
  633. package/sticker/index.js +3 -3
  634. package/sticker/index.mjs +102 -142
  635. package/umd/five-gltf-loader.js +9 -9
  636. package/umd/five-line.js +4 -4
  637. package/umd/five-plugins.js +17 -21
  638. package/umd/five-react.js +3 -3
  639. package/umd/five-shader-lib.js +13 -14
  640. package/umd/five-sticker.js +3 -3
  641. package/umd/five-vfx.js +21 -21
  642. package/umd/five-vue.js +3 -3
  643. package/umd/five.js +188 -336
  644. package/vfx/airflow/airflow.d.ts +18 -0
  645. package/vfx/airflow/fragment-shader.d.ts +2 -0
  646. package/vfx/airflow/vertex-shader.d.ts +2 -0
  647. package/vfx/common/scale-shader.d.ts +2 -0
  648. package/vfx/common/simplex-noise-shader.d.ts +2 -0
  649. package/vfx/frame/fragment-shader.d.ts +2 -0
  650. package/vfx/frame/frame.d.ts +22 -0
  651. package/vfx/frame/vertex-shader.d.ts +2 -0
  652. package/vfx/index.d.ts +7 -363
  653. package/vfx/index.js +21 -21
  654. package/vfx/index.mjs +454 -910
  655. package/vfx/particle/fragment-shader.d.ts +2 -0
  656. package/vfx/particle/instance.d.ts +36 -0
  657. package/vfx/particle/particle.d.ts +205 -0
  658. package/vfx/particle/utils.d.ts +11 -0
  659. package/vfx/particle/vertex-shader.d.ts +2 -0
  660. package/vfx/particle-gpu/fragment-shader.d.ts +2 -0
  661. package/vfx/particle-gpu/instance.d.ts +36 -0
  662. package/vfx/particle-gpu/particle.d.ts +95 -0
  663. package/vfx/particle-gpu/utils.d.ts +11 -0
  664. package/vfx/particle-gpu/vertex-shader.d.ts +2 -0
  665. package/vfx/spotLight/fragment-shader.d.ts +2 -0
  666. package/vfx/spotLight/spotLight.d.ts +15 -0
  667. package/vfx/spotLight/vertex-shader.d.ts +2 -0
  668. package/vue/context.d.ts +7 -0
  669. package/vue/hooks/FiveCanvas.d.ts +36 -0
  670. package/vue/hooks/FiveProvider.d.ts +35 -0
  671. package/vue/hooks/unsafe__useFiveInject.d.ts +9 -0
  672. package/vue/hooks/useFiveAction.d.ts +178 -0
  673. package/vue/hooks/useFiveCameraDirection.d.ts +8 -0
  674. package/vue/hooks/useFiveCameraRaycaster.d.ts +8 -0
  675. package/vue/hooks/useFiveCurrentObserver.d.ts +12 -0
  676. package/vue/hooks/useFiveCurrentState.d.ts +16 -0
  677. package/vue/hooks/useFiveEventCallback.d.ts +11 -0
  678. package/vue/hooks/useFiveFloor.d.ts +16 -0
  679. package/vue/hooks/useFiveHelper.d.ts +15 -0
  680. package/vue/hooks/useFiveModel.d.ts +7 -0
  681. package/vue/hooks/useFiveModelBounding.d.ts +7 -0
  682. package/vue/hooks/useFiveModelIntersectRaycaster.d.ts +23 -0
  683. package/vue/hooks/useFiveModelReadyState.d.ts +9 -0
  684. package/vue/hooks/useFiveProject2d.d.ts +26 -0
  685. package/vue/hooks/useFiveScene.d.ts +6 -0
  686. package/vue/hooks/useFiveState.d.ts +16 -0
  687. package/vue/hooks/useFiveWork.d.ts +30 -0
  688. package/vue/index.d.ts +23 -467
  689. package/vue/index.js +3 -3
  690. package/vue/index.mjs +309 -301
  691. package/vue/rendererPool.d.ts +10 -0
  692. package/work-downloader/components/model-3d-tile.d.ts +2 -0
  693. package/work-downloader/components/model.d.ts +3 -0
  694. package/work-downloader/components/observer.d.ts +7 -0
  695. package/work-downloader/download.d.ts +16 -0
  696. package/work-downloader/index.d.ts +2 -33
  697. package/work-downloader/index.js +3 -3
  698. package/work-downloader/index.mjs +317 -556
  699. package/work-downloader/type.d.ts +28 -0
  700. package/work-downloader/utils/download-to-file.d.ts +1 -0
  701. package/work-downloader/utils/image-processing.d.ts +7 -0
  702. package/work-downloader/utils/join-url.d.ts +2 -0
  703. package/work-downloader/utils/log.d.ts +1 -0
  704. package/work-downloader/utils/relative-url.d.ts +1 -0
  705. package/docs/documents/five.FivePlugin.plugin.html +0 -60
  706. package/docs/documents/plugin.html +0 -60
  707. package/docs/media/five.ts +0 -2881
  708. package/docs/media/pass.ts +0 -64
  709. package/guides/ai-doc-guidelines.md +0 -72
  710. package/guides/features/3dtile.md +0 -264
  711. package/guides/features/parameter.md +0 -178
  712. package/guides/plugin.md +0 -206
  713. /package/{guides → ai_guides}/release_notes/6.6.md +0 -0
  714. /package/{guides → ai_guides}/release_notes/6.7.md +0 -0
  715. /package/{guides → ai_guides}/support.md +0 -0
package/react/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2026/1/28
5
- * Version: 6.8.0-alpha.2
4
+ * Generated: 3/19/2026
5
+ * Version: 6.8.0-alpha.21
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,786 +252,575 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */import * as u from "react";
256
- import * as p from "three";
257
- import { getViewportScale as ae, Five as ue } from "@realsee/five";
258
- var E = function(e, n) {
259
- return E = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, r) {
260
- t.__proto__ = r;
261
- } || function(t, r) {
262
- for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
263
- }, E(e, n);
255
+ */import * as e from "react";
256
+ import * as t from "three";
257
+ import { Five as n, getViewportScale as r } from "@realsee/five";
258
+ //#region build/react/rendererPool.js
259
+ var i = [], a = [];
260
+ function o({ preserveDrawingBuffer: e = !0, webgl2: n = !1 } = {}) {
261
+ if (typeof window > "u") return;
262
+ let r = null;
263
+ if (r = n ? i.shift() : a.shift(), !r) {
264
+ if (n) {
265
+ let n = document.createElement("canvas"), i = n.getContext("webgl2");
266
+ i ? r = new t.WebGLRenderer({
267
+ preserveDrawingBuffer: e,
268
+ antialias: !0,
269
+ alpha: !0,
270
+ stencil: !0,
271
+ canvas: n,
272
+ context: i
273
+ }) : (console.error("error occurred when getting webgl2 canvas context, mybe webgl2 not support, fallback to webgl."), r = new t.WebGLRenderer({
274
+ preserveDrawingBuffer: e,
275
+ antialias: !1,
276
+ alpha: !0,
277
+ stencil: !0
278
+ }));
279
+ } else r = new t.WebGLRenderer({
280
+ preserveDrawingBuffer: e,
281
+ antialias: !1,
282
+ alpha: !0,
283
+ stencil: !0
284
+ });
285
+ r.outputEncoding = t.sRGBEncoding;
286
+ }
287
+ return r.autoClear = !0, r;
288
+ }
289
+ function s(e) {
290
+ e && (e.capabilities.isWebGL2 ? a.indexOf(e) === -1 && a.push(e) : i.indexOf(e) === -1 && i.push(e));
291
+ }
292
+ //#endregion
293
+ //#region build/react/context.js
294
+ var c = e.createContext(null);
295
+ function l() {
296
+ let t = e.useContext(c);
297
+ if (!t) throw Error("FiveProvider never found.");
298
+ return t.five;
299
+ }
300
+ function u() {
301
+ let t = e.useContext(c);
302
+ if (!t) throw Error("FiveProvider never found.");
303
+ return t.loadWork;
304
+ }
305
+ //#endregion
306
+ //#region build/react/createProvider.js
307
+ function d(e, t) {
308
+ let n = Array.isArray(e) ? e : [e], r = Array.isArray(t) ? t : [t];
309
+ if (n.length !== r.length) return !1;
310
+ for (let e = 0; e < n.length; e++) if (n[e].workCode !== r[e].workCode) return !1;
311
+ return !0;
312
+ }
313
+ function f(t = {}) {
314
+ return class extends e.Component {
315
+ constructor(e) {
316
+ super(e), this.__fiveEventDisposers = [], this.__fiveDisposeTimer = null, this.five = new n(Object.assign(Object.assign({}, t), { renderer: void 0 })), this.loadWork = this.loadWork.bind(this), this.state = {};
317
+ }
318
+ loadWork(e, t, n, r = !0) {
319
+ if (this.props.work) throw Error("props 'works' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");
320
+ return this.five.load(e, t, n, r);
321
+ }
322
+ shouldComponentUpdate(e) {
323
+ return this.five.renderer && this.five && e.work && !d(e.work, this.five.works) && this.five.load(e.work, e.initialState, e.initialOptions), !0;
324
+ }
325
+ componentDidMount() {
326
+ var e;
327
+ clearTimeout(this.__fiveDisposeTimer), this.__fiveDisposeTimer = null;
328
+ let n;
329
+ if (typeof window < "u") {
330
+ n = o({
331
+ webgl2: t == null ? void 0 : t.webgl2,
332
+ preserveDrawingBuffer: t == null ? void 0 : t.preserveDrawingBuffer
333
+ });
334
+ let e = r() === 1 ? window.devicePixelRatio : 1;
335
+ n == null || n.setPixelRatio(e);
336
+ }
337
+ this.five.renderer = n, this.setState({ renderer: n }), this.__fiveEventDisposers.push(this.five.on("load", () => {
338
+ this.props.onWorksChange && this.props.onWorksChange(this.five.works);
339
+ })), this.__fiveEventDisposers.push(this.five.on("stateChange", (e, t) => {
340
+ this.props.onStateChange && this.props.onStateChange(e, t);
341
+ })), this.__fiveEventDisposers.push(this.five.on("currentStateChange", (e, t) => {
342
+ this.props.onCurrentStateChange && this.props.onCurrentStateChange(e, t);
343
+ })), this.__fiveEventDisposers.push(this.five.on("error", (e) => {
344
+ this.props.onError ? this.props.onError(e) : console.warn(e.message);
345
+ }));
346
+ let i = this.props.work || this.props.initialWork;
347
+ i && this.five.load(i, this.props.initialState, this.props.initialOptions, (e = this.props.initialUserAction) == null ? !0 : e);
348
+ }
349
+ componentWillUnmount() {
350
+ var e;
351
+ (e = this.five.controller) == null || e.destroy();
352
+ let t = this.five.renderer;
353
+ this.five.renderer = void 0, s(t), this.setState({ renderer: void 0 }), this.__fiveDisposeTimer = setTimeout(() => {
354
+ this.__fiveDisposeTimer = null, this.five.dispose();
355
+ }, 1e3);
356
+ }
357
+ render() {
358
+ let t = this.five, n = this.loadWork, r = this.state.renderer;
359
+ return e.createElement(c.Provider, { value: {
360
+ renderer: r,
361
+ five: t,
362
+ loadWork: n
363
+ } }, this.props.children);
364
+ }
365
+ };
366
+ }
367
+ //#endregion
368
+ //#region build/react/canvas.js
369
+ var p = typeof window < "u" ? e.useLayoutEffect : e.useEffect, m = {
370
+ display: "inline-block",
371
+ overflow: "hidden"
372
+ }, h = ({ width: t, height: n }) => {
373
+ let r = l(), i = e.createRef(), a = Object.assign({
374
+ width: t,
375
+ height: n
376
+ }, m);
377
+ return p(() => {
378
+ let e = i.current;
379
+ if (!e || !r.renderer) return;
380
+ let a = r.renderer.domElement;
381
+ if (a.parentNode !== null && a.parentNode !== e) throw Error("There are more than 2 fiveCanvas in this context.");
382
+ return a.parentNode !== e && e.appendChild(a), r.camera.aspect = t / n, r.camera.updateProjectionMatrix(), r.renderer.setSize(t, n), r.refresh({
383
+ width: t,
384
+ height: n
385
+ }), r.needsRender = !0, () => {
386
+ a.parentNode === e && e.removeChild(a);
387
+ };
388
+ }, [
389
+ r,
390
+ r.renderer,
391
+ t,
392
+ n,
393
+ i.current
394
+ ]), e.createElement("div", {
395
+ ref: i,
396
+ style: a
397
+ });
264
398
  };
265
- function B(e, n) {
266
- if (typeof n != "function" && n !== null)
267
- throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
268
- E(e, n);
269
- function t() {
270
- this.constructor = e;
271
- }
272
- e.prototype = n === null ? Object.create(n) : (t.prototype = n.prototype, new t());
273
- }
274
- var h = function() {
275
- return h = Object.assign || function(n) {
276
- for (var t, r = 1, o = arguments.length; r < o; r++) {
277
- t = arguments[r];
278
- for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (n[a] = t[a]);
279
- }
280
- return n;
281
- }, h.apply(this, arguments);
282
- };
283
- function w(e, n, t) {
284
- if (t || arguments.length === 2) for (var r = 0, o = n.length, a; r < o; r++)
285
- (a || !(r in n)) && (a || (a = Array.prototype.slice.call(n, 0, r)), a[r] = n[r]);
286
- return e.concat(a || Array.prototype.slice.call(n));
287
- }
288
- var k = [], R = [];
289
- function ie(e) {
290
- var n = e === void 0 ? {} : e, t = n.preserveDrawingBuffer, r = t === void 0 ? !0 : t, o = n.webgl2, a = o === void 0 ? !1 : o;
291
- if (typeof window != "undefined") {
292
- var i = null;
293
- if (a ? i = k.shift() : i = R.shift(), !i) {
294
- if (a) {
295
- var s = document.createElement("canvas"), c = s.getContext("webgl2");
296
- c ? i = new p.WebGLRenderer({ preserveDrawingBuffer: r, antialias: !0, alpha: !0, stencil: !0, canvas: s, context: c }) : (console.error("error occurred when getting webgl2 canvas context, mybe webgl2 not support, fallback to webgl."), i = new p.WebGLRenderer({ preserveDrawingBuffer: r, antialias: !1, alpha: !0, stencil: !0 }));
297
- } else
298
- i = new p.WebGLRenderer({ preserveDrawingBuffer: r, antialias: !1, alpha: !0, stencil: !0 });
299
- i.outputEncoding = p.sRGBEncoding;
300
- }
301
- return i.autoClear = !0, i;
302
- }
303
- }
304
- function se(e) {
305
- if (e) {
306
- var n = e.capabilities.isWebGL2;
307
- n ? R.indexOf(e) === -1 && R.push(e) : k.indexOf(e) === -1 && k.push(e);
308
- }
309
- }
310
- var L = u.createContext(null);
311
- function v() {
312
- var e = u.useContext(L);
313
- if (!e)
314
- throw new Error("FiveProvider never found.");
315
- return e.five;
316
- }
317
- function H() {
318
- var e = u.useContext(L);
319
- if (!e)
320
- throw new Error("FiveProvider never found.");
321
- return e.loadWork;
322
- }
323
- function ce(e, n) {
324
- var t = Array.isArray(e) ? e : [e], r = Array.isArray(n) ? n : [n];
325
- if (t.length !== r.length)
326
- return !1;
327
- for (var o = 0; o < t.length; o++)
328
- if (t[o].workCode !== r[o].workCode)
329
- return !1;
330
- return !0;
331
- }
332
- function Ge(e) {
333
- return e === void 0 && (e = {}), /** @class */
334
- (function(n) {
335
- B(t, n);
336
- function t(r) {
337
- var o = n.call(this, r) || this;
338
- return o.__fiveEventDisposers = [], o.__fiveDisposeTimer = null, o.five = new ue(h(h({}, e), { renderer: void 0 })), o.loadWork = o.loadWork.bind(o), o.state = {}, o;
339
- }
340
- return t.prototype.loadWork = function(r, o, a, i) {
341
- if (i === void 0 && (i = !0), this.props.work)
342
- throw new Error("props 'works' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");
343
- return this.five.load(r, o, a, i);
344
- }, t.prototype.shouldComponentUpdate = function(r) {
345
- return this.five.renderer && this.five && r.work && !ce(r.work, this.five.works) && this.five.load(r.work, r.initialState, r.initialOptions), !0;
346
- }, t.prototype.componentDidMount = function() {
347
- var r = this, o;
348
- clearTimeout(this.__fiveDisposeTimer), this.__fiveDisposeTimer = null;
349
- var a;
350
- if (typeof window != "undefined") {
351
- a = ie({
352
- webgl2: e == null ? void 0 : e.webgl2,
353
- preserveDrawingBuffer: e == null ? void 0 : e.preserveDrawingBuffer
354
- });
355
- var i = ae(), s = i === 1 ? window.devicePixelRatio : 1;
356
- a == null || a.setPixelRatio(s);
357
- }
358
- this.five.renderer = a, this.setState({ renderer: a }), this.__fiveEventDisposers.push(this.five.on("load", function() {
359
- r.props.onWorksChange && r.props.onWorksChange(r.five.works);
360
- })), this.__fiveEventDisposers.push(this.five.on("stateChange", function(l, d) {
361
- r.props.onStateChange && r.props.onStateChange(l, d);
362
- })), this.__fiveEventDisposers.push(this.five.on("currentStateChange", function(l, d) {
363
- r.props.onCurrentStateChange && r.props.onCurrentStateChange(l, d);
364
- })), this.__fiveEventDisposers.push(this.five.on("error", function(l) {
365
- r.props.onError ? r.props.onError(l) : console.warn(l.message);
366
- }));
367
- var c = this.props.work || this.props.initialWork;
368
- c && this.five.load(c, this.props.initialState, this.props.initialOptions, (o = this.props.initialUserAction) !== null && o !== void 0 ? o : !0);
369
- }, t.prototype.componentWillUnmount = function() {
370
- var r = this, o;
371
- (o = this.five.controller) === null || o === void 0 || o.destroy();
372
- var a = this.five.renderer;
373
- this.five.renderer = void 0, se(a), this.setState({ renderer: void 0 }), this.__fiveDisposeTimer = setTimeout(function() {
374
- r.__fiveDisposeTimer = null, r.five.dispose();
375
- }, 1e3);
376
- }, t.prototype.render = function() {
377
- var r = this.five, o = this.loadWork, a = this.state.renderer;
378
- return u.createElement(L.Provider, {
379
- value: { renderer: a, five: r, loadWork: o }
380
- }, this.props.children);
381
- }, t;
382
- })(u.Component);
383
- }
384
- var fe = typeof window != "undefined" ? u.useLayoutEffect : u.useEffect, le = {
385
- display: "inline-block",
386
- overflow: "hidden"
387
- }, Ie = function(e) {
388
- var n = e.width, t = e.height, r = v(), o = u.createRef(), a = h({ width: n, height: t }, le);
389
- return fe(function() {
390
- var i = o.current;
391
- if (i && r.renderer) {
392
- var s = r.renderer.domElement;
393
- if (s.parentNode !== null && s.parentNode !== i)
394
- throw new Error("There are more than 2 fiveCanvas in this context.");
395
- return s.parentNode !== i && i.appendChild(s), r.camera.aspect = n / t, r.camera.updateProjectionMatrix(), r.renderer.setSize(n, t), r.refresh({ width: n, height: t }), r.needsRender = !0, function() {
396
- s.parentNode === i && i.removeChild(s);
397
- };
398
- }
399
- }, [r, r.renderer, n, t, o.current]), u.createElement("div", { ref: o, style: a });
400
- };
401
- function qe() {
402
- return v();
403
- }
404
- function ve(e, n) {
405
- var t = v(), r = [t];
406
- n !== void 0 && (r = r.concat(n)), u.useLayoutEffect(function() {
407
- return e(t.scene);
408
- }, r);
409
- }
410
- var ze = ve;
411
- function Ae() {
412
- var e = v(), n = H(), t = u.useState(function() {
413
- return e.works;
414
- }), r = t[0], o = t[1];
415
- return u.useLayoutEffect(function() {
416
- return e.on("load", function() {
417
- return o(e.works);
418
- });
419
- }, [e]), [r, n];
420
- }
421
- function U(e) {
422
- return h({}, e.state);
423
- }
424
- function Je() {
425
- var e = v(), n = u.useState(function() {
426
- return U(e);
427
- }), t = n[0], r = n[1], o = u.useCallback(function(a, i, s) {
428
- i === void 0 && (i = !1), s === void 0 && (s = !0);
429
- var c = typeof a == "function" ? a(e.getCurrentState()) : a;
430
- e.setState(c, i, s);
431
- }, [e]);
432
- return u.useLayoutEffect(function() {
433
- return e.on("stateChange", function() {
434
- return r(U(e));
435
- });
436
- }, [e]), [t, o];
437
- }
438
- function Ke() {
439
- var e = v(), n = u.useState(function() {
440
- return e.getCurrentState();
441
- }), t = n[0], r = n[1], o = u.useCallback(function(a, i, s) {
442
- i === void 0 && (i = !1), s === void 0 && (s = !0);
443
- var c = typeof a == "function" ? a(e.getCurrentState()) : a;
444
- e.setState(c, i, s);
445
- }, [e]);
446
- return u.useLayoutEffect(function() {
447
- return e.on("currentStateChange", function() {
448
- return r(e.getCurrentState());
449
- });
450
- }, [e]), [t, o];
451
- }
452
- function Qe() {
453
- var e = v(), n = u.useState(function() {
454
- return e.getCurrentState();
455
- }), t = n[0], r = n[1];
456
- return u.useLayoutEffect(function() {
457
- return e.on("currentStateChange", function() {
458
- return r(e.getCurrentState());
459
- });
460
- }, [e]), e.works.getObserver(t);
461
- }
462
- function Xe(e, n, t) {
463
- var r = v(), o = [r, e];
464
- t !== void 0 && (o = o.concat(t)), u.useLayoutEffect(function() {
465
- return r.on(e, n);
466
- }, o);
467
- }
468
- function Ye() {
469
- var e = v(), n = u.useCallback(function(i, s) {
470
- return e.updateCamera(i, s);
471
- }, [e]), t = u.useCallback(e.getPixels.bind(e), [e]), r = u.useCallback(function(i) {
472
- return e.render(i);
473
- }, [e]), o = u.useCallback(function() {
474
- return e.needsRender = !0;
475
- }, [e]), a = u.useCallback(function(i, s) {
476
- return e.preloadPano(i, s);
477
- }, [e]);
478
- return { updateCamera: n, getPixels: t, render: r, needsRender: o, preloadPano: a };
479
- }
480
- function Ze() {
481
- var e = v(), n = u.useState(function() {
482
- return Symbol();
483
- });
484
- n[0];
485
- var t = n[1];
486
- u.useLayoutEffect(function() {
487
- return e.on("cameraUpdate", function() {
488
- return t(Symbol());
489
- });
490
- }, [e]);
491
- var r = u.useCallback(function(o, a) {
492
- return e.project2d(o, a);
493
- }, [e]);
494
- return r;
495
- }
496
- function j(e) {
497
- var n = e.camera.getWorldDirection(new p.Vector3()), t = new p.Raycaster(e.camera.position, n);
498
- return t;
499
- }
500
- function er() {
501
- var e = v(), n = u.useState(function() {
502
- return j(e);
503
- }), t = n[0], r = n[1];
504
- return u.useLayoutEffect(function() {
505
- return e.on("cameraUpdate", function() {
506
- return r(j(e));
507
- });
508
- }, [e]), t;
509
- }
510
- function T(e) {
511
- return e.camera.getWorldDirection(new p.Vector3());
512
- }
513
- function rr() {
514
- var e = v(), n = u.useState(function() {
515
- return T(e);
516
- }), t = n[0], r = n[1];
517
- return u.useLayoutEffect(function() {
518
- return e.on("cameraUpdate", function() {
519
- return r(T(e));
520
- });
521
- }, [e]), t;
522
- }
523
- function tr() {
524
- var e = v(), n = u.useCallback(function(t) {
525
- return e.model.intersectRaycaster(t);
526
- }, [e]);
527
- return n;
528
- }
529
- function N(e) {
530
- return e.model.empty ? "Empty" : "Loaded";
531
- }
532
- function nr() {
533
- var e = v(), n = u.useState(function() {
534
- return N(e);
535
- }), t = n[0], r = n[1];
536
- return u.useLayoutEffect(function() {
537
- return e.on("modelLoaded", function() {
538
- return r(N(e));
539
- });
540
- }, [e]), t;
541
- }
542
- function or() {
543
- var e = v(), n = u.useState(e.model.shownFloor), t = n[0], r = n[1], o = u.useState(e.model.floorLength), a = o[0], i = o[1], s = u.useCallback(function(c) {
544
- typeof c == "number" ? e.model.show(c) : e.model.show();
545
- }, [e]);
546
- return u.useLayoutEffect(function() {
547
- var c = [];
548
- return c.push(e.on("modelShownFloorChange", function() {
549
- return r(e.model.shownFloor);
550
- })), c.push(e.on("modelLoaded", function() {
551
- return i(e.model.floorLength);
552
- })), function() {
553
- for (var l; l = c.shift(); )
554
- l();
555
- };
556
- }, [e]), [t, a, s];
557
- }
558
- function ar() {
559
- var e = v(), n = u.useState(e.helperVisible), t = n[0], r = n[1], o = u.useCallback(function(a) {
560
- e.helperVisible = a;
561
- }, [e]);
562
- return u.useLayoutEffect(function() {
563
- return e.on("helpersVisibleChange", function(a) {
564
- return r(a);
565
- });
566
- }, [e]), [t, o];
567
- }
568
- var ur = "$five";
569
- function f(e, n) {
570
- return n.indexOf(e) >= 0;
571
- }
572
- function $(e, n) {
573
- for (var t = 0, r = Object.keys(n); t < r.length; t++) {
574
- var o = r[t];
575
- n[o] !== void 0 && (e[o] = n[o]);
576
- }
577
- }
578
- function de(e, n) {
579
- var t = f("state", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
580
- if (t)
581
- return h({}, e.state);
582
- }, [e, o]);
583
- return u.useLayoutEffect(function() {
584
- if (t)
585
- return e.on("stateChange", function() {
586
- return a(Symbol());
587
- });
588
- }, [e]), [i, o];
589
- }
590
- function pe(e, n) {
591
- var t = f("currentState", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
592
- if (t)
593
- return e.getCurrentState();
594
- }, [e, o]);
595
- return u.useLayoutEffect(function() {
596
- if (t)
597
- return e.on("currentStateChange", function() {
598
- return a(Symbol());
599
- });
600
- }, [e]), [i, o];
601
- }
602
- function he(e, n) {
603
- var t = f("currentObserver", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
604
- if (t)
605
- return e.getCurrentState();
606
- }, [e, o]);
607
- u.useLayoutEffect(function() {
608
- if (t)
609
- return e.on("currentStateChange", function() {
610
- return a(Symbol());
611
- });
612
- }, [e]);
613
- var s = void 0;
614
- return i && (s = e.works.getObserver(i)), [s, o];
615
- }
616
- function ge(e, n) {
617
- var t = f("unsafe__fiveInstance", n);
618
- return [t ? e : void 0];
619
- }
620
- function me(e, n) {
621
- var t = f("works", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
622
- if (t)
623
- return e.works;
624
- }, [e, o]);
625
- return u.useLayoutEffect(function() {
626
- if (t)
627
- return e.on("load", function() {
628
- return a(Symbol());
629
- });
630
- }, [e]), [i, o];
631
- }
632
- function ye(e, n) {
633
- var t = f("model", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
634
- if (t)
635
- return e.model;
636
- }, [e, o]);
637
- return u.useLayoutEffect(function() {
638
- if (t)
639
- return e.on("modelLoaded", function() {
640
- return a(Symbol());
641
- });
642
- }, [e]), [i, o];
643
- }
644
- function Se(e, n) {
645
- var t = f("scene", n);
646
- return [t ? e.scene : void 0];
647
- }
648
- function we(e, n) {
649
- var t = f("cameraDirection", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
650
- if (t)
651
- return e.camera.getWorldDirection(new p.Vector3());
652
- }, [e, o]);
653
- return u.useLayoutEffect(function() {
654
- if (t)
655
- return e.on("cameraUpdate", function() {
656
- return a(Symbol());
657
- });
658
- }, [e]), [i, o];
659
- }
660
- function be(e, n) {
661
- var t = f("cameraRaycaster", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
662
- if (t) {
663
- var s = e.camera.getWorldDirection(new p.Vector3()), c = new p.Raycaster(e.camera.position, s);
664
- return c;
665
- }
666
- }, [e, o]);
667
- return u.useLayoutEffect(function() {
668
- if (t)
669
- return e.on("cameraUpdate", function() {
670
- return a(Symbol());
671
- });
672
- }, [e]), [i, o];
673
- }
674
- function Ce(e, n) {
675
- var t = f("modelReadyState", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
676
- if (t)
677
- return e.model.empty ? "Empty" : "Loaded";
678
- }, [e, o]);
679
- return u.useLayoutEffect(function() {
680
- if (t)
681
- return e.on("modelLoaded", function() {
682
- return a(Symbol());
683
- });
684
- }, [e]), [i, o];
685
- }
686
- function Fe(e, n) {
687
- var t = f("shownFloor", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
688
- if (t)
689
- return e.model.shownFloor;
690
- }, [e, o]);
691
- return u.useLayoutEffect(function() {
692
- if (t)
693
- return e.on("modelShownFloorChange", function() {
694
- return a(Symbol());
695
- });
696
- }, [e]), [i, o];
697
- }
698
- function Ee(e, n) {
699
- var t = f("helperVisible", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
700
- if (t)
701
- return e.helperVisible;
702
- }, [e, o]);
703
- return u.useLayoutEffect(function() {
704
- if (t)
705
- return e.on("helpersVisibleChange", function() {
706
- return a(Symbol());
707
- });
708
- }, [e]), [i, o];
709
- }
710
- function ke(e, n) {
711
- if (f("loadWork", n))
712
- return e;
713
- }
714
- function Re(e, n) {
715
- if (f("setState", n))
716
- return function() {
717
- for (var t = [], r = 0; r < arguments.length; r++)
718
- t[r] = arguments[r];
719
- return e.setState.apply(e, t);
720
- };
721
- }
722
- function Le(e, n) {
723
- if (f("on", n))
724
- return function() {
725
- for (var t = [], r = 0; r < arguments.length; r++)
726
- t[r] = arguments[r];
727
- return e.on.apply(e, t);
728
- };
729
- }
730
- function Ve(e, n) {
731
- if (f("on", n))
732
- return function() {
733
- for (var t = [], r = 0; r < arguments.length; r++)
734
- t[r] = arguments[r];
735
- return e.once.apply(e, t);
736
- };
737
- }
738
- function Pe(e, n) {
739
- if (f("off", n))
740
- return function() {
741
- for (var t = [], r = 0; r < arguments.length; r++)
742
- t[r] = arguments[r];
743
- return e.off.apply(e, t);
744
- };
745
- }
746
- function _e(e, n) {
747
- if (f("intersectRaycaster", n))
748
- return function() {
749
- for (var t, r = [], o = 0; o < arguments.length; o++)
750
- r[o] = arguments[o];
751
- return (t = e.model).intersectRaycaster.apply(t, r);
752
- };
753
- }
754
- function xe(e, n) {
755
- if (f("project2d", n))
756
- return function() {
757
- for (var t = [], r = 0; r < arguments.length; r++)
758
- t[r] = arguments[r];
759
- return e.project2d.apply(e, t);
760
- };
761
- }
762
- function De(e, n) {
763
- if (f("updateCamera", n))
764
- return function() {
765
- for (var t = [], r = 0; r < arguments.length; r++)
766
- t[r] = arguments[r];
767
- return e.updateCamera.apply(e, t);
768
- };
769
- }
770
- function We(e, n) {
771
- if (f("getPixels", n))
772
- return e.getPixels.bind(e);
773
- }
774
- function Oe(e, n) {
775
- if (f("render", n))
776
- return function() {
777
- for (var t = [], r = 0; r < arguments.length; r++)
778
- t[r] = arguments[r];
779
- return e.render.apply(e, t);
780
- };
781
- }
782
- function Me(e, n) {
783
- if (f("needsRender", n))
784
- return function() {
785
- e.needsRender = !0;
786
- };
787
- }
788
- function Ue(e, n) {
789
- if (f("preloadPano", n))
790
- return function() {
791
- for (var t = [], r = 0; r < arguments.length; r++)
792
- t[r] = arguments[r];
793
- return e.preloadPano.apply(e, t);
794
- };
795
- }
796
- function je(e, n) {
797
- if (f("showFloor", n))
798
- return function(t) {
799
- typeof t == "number" ? e.model.show(t) : e.model.show();
800
- };
801
- }
802
- function Te(e, n) {
803
- if (f("toggleHelperVisible", n))
804
- return function(t) {
805
- e.helperVisible = t;
806
- };
807
- }
808
- function ir(e) {
809
- return function(n) {
810
- return u.forwardRef(function(t, r) {
811
- var o = v(), a = H(), i = ge(o, e)[0], s = de(o, e), c = s[0], l = s[1], d = pe(o, e), m = d[0], g = d[1], S = he(o, e), b = S[0], C = S[1], V = me(o, e), G = V[0], I = V[1], P = ye(o, e), q = P[0], z = P[1], A = Se(o, e)[0], _ = we(o, e), J = _[0], K = _[1], x = be(o, e), Q = x[0], X = x[1], D = Ce(o, e), Y = D[0], Z = D[1], W = Fe(o, e), ee = W[0], re = W[1], O = Ee(o, e), te = O[0], ne = O[1], M = u.useMemo(function() {
812
- var y = {};
813
- return $(y, {
814
- setState: Re(o, e),
815
- loadWork: ke(a, e),
816
- on: Le(o, e),
817
- once: Ve(o, e),
818
- off: Pe(o, e),
819
- intersectRaycaster: _e(o, e),
820
- project2d: xe(o, e),
821
- updateCamera: De(o, e),
822
- getPixels: We(o, e),
823
- render: Oe(o, e),
824
- needsRender: Me(o, e),
825
- preloadPano: Ue(o, e),
826
- showFloor: je(o, e),
827
- toggleHelperVisible: Te(o, e)
828
- }), y;
829
- }, [o, a]), oe = u.useMemo(function() {
830
- var y = h({}, M);
831
- return $(y, {
832
- unsafe__fiveInstance: i,
833
- state: c,
834
- currentState: m,
835
- currentObserver: b,
836
- work: G,
837
- model: q,
838
- scene: A,
839
- cameraDirection: J,
840
- cameraRaycaster: Q,
841
- modelReadyState: Y,
842
- shownFloor: ee,
843
- helperVisible: te
844
- }), y;
845
- }, [
846
- o,
847
- M,
848
- l,
849
- g,
850
- C,
851
- I,
852
- z,
853
- K,
854
- X,
855
- Z,
856
- re,
857
- ne
858
- ]);
859
- return u.createElement(n, h({ ref: r, $five: oe }, t));
860
- });
861
- };
862
- }
863
- function sr() {
864
- for (var e = [], n = 0; n < arguments.length; n++)
865
- e[n] = arguments[n];
866
- return e;
867
- }
868
- function F(e, n) {
869
- for (var t = {}, r = n.length, o = -1; ++o < r; ) {
870
- var a = n[o];
871
- a in e && (t[a] = e[a]);
872
- }
873
- return t;
874
- }
875
- function Ne(e, n) {
876
- return typeof e == "number" && typeof n == "number" && isNaN(e) && isNaN(n) ? !0 : e === n;
877
- }
878
- function $e(e, n) {
879
- for (var t = 0; t < e.length; t++)
880
- for (var r = 0; r < n.length; r++)
881
- if (e[t] === n[r])
882
- return !0;
883
- return !1;
884
- }
885
- var Be = (
886
- /** @class */
887
- (function() {
888
- function e(n, t) {
889
- this.values = n, this.listeners = [], this.onValuesChange = t;
890
- }
891
- return e.prototype.on = function(n, t) {
892
- var r = this, o = [n, t];
893
- return this.listeners.push(o), function() {
894
- var a = r.listeners.indexOf(o);
895
- a >= 0 && r.listeners.splice(a, 1);
896
- };
897
- }, e.prototype.getValues = function(n) {
898
- return F(this.values, n);
899
- }, e.prototype.setValues = function(n, t) {
900
- var r = [];
901
- for (var o in t)
902
- n.indexOf(o) >= 0 && !Ne(t[o], this.values[o]) && r.push(o);
903
- if (r.length !== 0) {
904
- for (var a = h({}, this.values), i = 0, s = r; i < s.length; i++) {
905
- var c = s[i];
906
- this.values[c] = t[c];
907
- }
908
- this.onValuesChange && this.onValuesChange(this.values, a);
909
- for (var l = 0, d = this.listeners; l < d.length; l++) {
910
- var m = d[l], g = m[0], S = m[1];
911
- if ($e(g, r)) {
912
- var b = F(a, g), C = F(this.values, g);
913
- S(C, b);
914
- }
915
- }
916
- }
917
- }, e;
918
- })()
919
- );
920
- function cr(e) {
921
- var n = u.createContext(null);
922
- return {
923
- /**
924
- * 使用 Store
925
- * @param names - 获取的 Store 字段
926
- * @returns [值, 修改值方法]
927
- */
928
- useStore: function(t) {
929
- var r = u.useContext(n);
930
- if (r === null)
931
- throw new Error("StoreProvider never found.");
932
- var o = u.useRef(!0), a = u.useState(r.getValues(t)), i = a[0], s = a[1], c = w([r], t, !0);
933
- u.useLayoutEffect(function() {
934
- return o.current ? o.current = !1 : s(r.getValues(t)), r.on(t, function(d) {
935
- return s(d);
936
- });
937
- }, c);
938
- var l = u.useCallback(function(d) {
939
- return r.setValues(t, d);
940
- }, c);
941
- return [i, l];
942
- },
943
- /**
944
- * 使用 Store (仅设置值)
945
- * @param names - 获取的 Store 字段
946
- * @returns 修改值方法
947
- */
948
- useStoreSetter: function(t) {
949
- var r = u.useContext(n);
950
- if (r === null)
951
- throw new Error("StoreProvider never found.");
952
- var o = u.useCallback(function(a) {
953
- return r.setValues(t, a);
954
- }, w([r], t, !0));
955
- return o;
956
- },
957
- /**
958
- * 监听 Store 变化
959
- * @param names - Store 字段
960
- * @param callback - 监听变化的回调函数
961
- * @param deps - 依赖对象
962
- */
963
- watchStore: function(t, r, o) {
964
- var a = u.useContext(n);
965
- if (a === null)
966
- throw new Error("StoreProvider never found.");
967
- var i = w([a], t, !0);
968
- o !== void 0 && (i = i.concat(o)), u.useLayoutEffect(function() {
969
- return a.on(t, r);
970
- }, i);
971
- },
972
- useStoreAction: function(t) {
973
- var r = u.useContext(n);
974
- if (r === null)
975
- throw new Error("StoreProvider never found.");
976
- var o = u.useCallback(function() {
977
- for (var a = [], i = 0; i < arguments.length; i++)
978
- a[i] = arguments[i];
979
- var s = e[t], c = s[0], l = s.slice(1), d = function() {
980
- return r.getValues(l);
981
- }, m = function(g) {
982
- return r.setValues(l, g);
983
- };
984
- return c.apply(void 0, w([d, m], a, !1));
985
- }, []);
986
- return o;
987
- },
988
- /**
989
- * Store Provider.
990
- * 内部组件均可和 store 交互
991
- */
992
- StoreProvider: (
993
- /** @class */
994
- (function(t) {
995
- B(r, t);
996
- function r(o) {
997
- var a = t.call(this, o) || this;
998
- return a.store = new Be(o.initialValue, function() {
999
- for (var i, s = [], c = 0; c < arguments.length; c++)
1000
- s[c] = arguments[c];
1001
- a.props.onValuesChange && (i = a.props).onValuesChange.apply(i, s);
1002
- }), a;
1003
- }
1004
- return r.prototype.shouldComponentUpdate = function(o) {
1005
- return o.children !== this.props.children;
1006
- }, r.prototype.render = function() {
1007
- return u.createElement(n.Provider, { value: this.store }, this.props.children);
1008
- }, r;
1009
- })(u.Component)
1010
- )
1011
- };
1012
- }
1013
- export {
1014
- Ie as FiveCanvas,
1015
- ur as INJECTION_PROPNAME,
1016
- Be as Store,
1017
- sr as createFiveFeature,
1018
- Ge as createFiveProvider,
1019
- cr as createStore,
1020
- qe as unsafe__useFiveInstance,
1021
- Ye as useFiveAction,
1022
- rr as useFiveCameraDirection,
1023
- er as useFiveCameraRaycaster,
1024
- Qe as useFiveCurrentObserver,
1025
- Ke as useFiveCurrentState,
1026
- Xe as useFiveEventCallback,
1027
- or as useFiveFloor,
1028
- ar as useFiveHelper,
1029
- tr as useFiveModelIntersectRaycaster,
1030
- nr as useFiveModelReadyState,
1031
- Ze as useFiveProject2d,
1032
- ze as useFiveScene,
1033
- ve as useFiveSceneEffect,
1034
- Je as useFiveState,
1035
- Ae as useFiveWork,
1036
- ir as withFive
399
+ //#endregion
400
+ //#region build/react/hooks/unsafe__useFiveInstance.js
401
+ function g() {
402
+ return l();
403
+ }
404
+ //#endregion
405
+ //#region build/react/hooks/useFiveSceneEffect.js
406
+ function _(t, n) {
407
+ let r = l(), i = [r];
408
+ n !== void 0 && (i = i.concat(n)), e.useLayoutEffect(() => t(r.scene), i);
409
+ }
410
+ var v = _;
411
+ //#endregion
412
+ //#region build/react/hooks/useFiveWork.js
413
+ function y() {
414
+ let t = l(), n = u(), [r, i] = e.useState(() => t.works);
415
+ return e.useLayoutEffect(() => t.on("load", () => i(t.works)), [t]), [r, n];
416
+ }
417
+ //#endregion
418
+ //#region build/react/hooks/useFiveState.js
419
+ function b(e) {
420
+ return Object.assign({}, e.state);
421
+ }
422
+ function x() {
423
+ let t = l(), [n, r] = e.useState(() => b(t)), i = e.useCallback((e, n = !1, r = !0) => {
424
+ let i = typeof e == "function" ? e(t.getCurrentState()) : e;
425
+ t.setState(i, n, r);
426
+ }, [t]);
427
+ return e.useLayoutEffect(() => t.on("stateChange", () => r(b(t))), [t]), [n, i];
428
+ }
429
+ //#endregion
430
+ //#region build/react/hooks/useFiveCurrentState.js
431
+ function S() {
432
+ let t = l(), [n, r] = e.useState(() => t.getCurrentState()), i = e.useCallback((e, n = !1, r = !0) => {
433
+ let i = typeof e == "function" ? e(t.getCurrentState()) : e;
434
+ t.setState(i, n, r);
435
+ }, [t]);
436
+ return e.useLayoutEffect(() => t.on("currentStateChange", () => r(t.getCurrentState())), [t]), [n, i];
437
+ }
438
+ //#endregion
439
+ //#region build/react/hooks/useFiveCurrentObserver.js
440
+ function C() {
441
+ let t = l(), [n, r] = e.useState(() => t.getCurrentState());
442
+ return e.useLayoutEffect(() => t.on("currentStateChange", () => r(t.getCurrentState())), [t]), t.works.getObserver(n);
443
+ }
444
+ //#endregion
445
+ //#region build/react/hooks/useFiveEventCallback.js
446
+ function w(t, n, r) {
447
+ let i = l(), a = [i, t];
448
+ r !== void 0 && (a = a.concat(r)), e.useLayoutEffect(() => i.on(t, n), a);
449
+ }
450
+ //#endregion
451
+ //#region build/react/hooks/useFiveAction.js
452
+ function T() {
453
+ let t = l();
454
+ return {
455
+ updateCamera: e.useCallback((e, n) => t.updateCamera(e, n), [t]),
456
+ getPixels: e.useCallback(t.getPixels.bind(t), [t]),
457
+ render: e.useCallback((e) => t.render(e), [t]),
458
+ needsRender: e.useCallback(() => t.needsRender = !0, [t]),
459
+ preloadPano: e.useCallback((e, n) => t.preloadPano(e, n), [t])
460
+ };
461
+ }
462
+ //#endregion
463
+ //#region build/react/hooks/useFiveProject2d.js
464
+ function E() {
465
+ let t = l(), [n, r] = e.useState(() => Symbol());
466
+ return e.useLayoutEffect(() => t.on("cameraUpdate", () => r(Symbol())), [t]), e.useCallback((e, n) => t.project2d(e, n), [t]);
467
+ }
468
+ //#endregion
469
+ //#region build/react/hooks/useFiveCameraRaycaster.js
470
+ function D(e) {
471
+ let n = e.camera.getWorldDirection(new t.Vector3());
472
+ return new t.Raycaster(e.camera.position, n);
473
+ }
474
+ function O() {
475
+ let t = l(), [n, r] = e.useState(() => D(t));
476
+ return e.useLayoutEffect(() => t.on("cameraUpdate", () => r(D(t))), [t]), n;
477
+ }
478
+ //#endregion
479
+ //#region build/react/hooks/useFiveCameraDirection.js
480
+ function k(e) {
481
+ return e.camera.getWorldDirection(new t.Vector3());
482
+ }
483
+ function A() {
484
+ let t = l(), [n, r] = e.useState(() => k(t));
485
+ return e.useLayoutEffect(() => t.on("cameraUpdate", () => r(k(t))), [t]), n;
486
+ }
487
+ //#endregion
488
+ //#region build/react/hooks/useFiveModelIntersectRaycaster.js
489
+ function j() {
490
+ let t = l();
491
+ return e.useCallback((e) => t.model.intersectRaycaster(e), [t]);
492
+ }
493
+ //#endregion
494
+ //#region build/react/hooks/useFiveModelReadyState.js
495
+ function M(e) {
496
+ return e.model.empty ? "Empty" : "Loaded";
497
+ }
498
+ function ee() {
499
+ let t = l(), [n, r] = e.useState(() => M(t));
500
+ return e.useLayoutEffect(() => t.on("modelLoaded", () => r(M(t))), [t]), n;
501
+ }
502
+ //#endregion
503
+ //#region build/react/hooks/useFiveFloor.js
504
+ function N() {
505
+ let t = l(), [n, r] = e.useState(t.model.shownFloor), [i, a] = e.useState(t.model.floorLength), o = e.useCallback((e) => {
506
+ typeof e == "number" ? t.model.show(e) : t.model.show();
507
+ }, [t]);
508
+ return e.useLayoutEffect(() => {
509
+ let e = [];
510
+ return e.push(t.on("modelShownFloorChange", () => r(t.model.shownFloor))), e.push(t.on("modelLoaded", () => a(t.model.floorLength))), () => {
511
+ let t;
512
+ for (; t = e.shift();) t();
513
+ };
514
+ }, [t]), [
515
+ n,
516
+ i,
517
+ o
518
+ ];
519
+ }
520
+ //#endregion
521
+ //#region build/react/hooks/useFiveHelper.js
522
+ function te() {
523
+ let t = l(), [n, r] = e.useState(t.helperVisible), i = e.useCallback((e) => {
524
+ t.helperVisible = e;
525
+ }, [t]);
526
+ return e.useLayoutEffect(() => t.on("helpersVisibleChange", (e) => r(e)), [t]), [n, i];
527
+ }
528
+ //#endregion
529
+ //#region build/react/withFive.js
530
+ var ne = "$five";
531
+ function P(e, t) {
532
+ return t.indexOf(e) >= 0;
533
+ }
534
+ function F(e, t) {
535
+ for (let n of Object.keys(t)) t[n] !== void 0 && (e[n] = t[n]);
536
+ }
537
+ function I(t, n) {
538
+ let r = P("state", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
539
+ if (r) return Object.assign({}, t.state);
540
+ }, [t, i]);
541
+ return e.useLayoutEffect(() => {
542
+ if (r) return t.on("stateChange", () => a(Symbol()));
543
+ }, [t]), [o, i];
544
+ }
545
+ function L(t, n) {
546
+ let r = P("currentState", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
547
+ if (r) return t.getCurrentState();
548
+ }, [t, i]);
549
+ return e.useLayoutEffect(() => {
550
+ if (r) return t.on("currentStateChange", () => a(Symbol()));
551
+ }, [t]), [o, i];
552
+ }
553
+ function R(t, n) {
554
+ let r = P("currentObserver", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
555
+ if (r) return t.getCurrentState();
556
+ }, [t, i]);
557
+ e.useLayoutEffect(() => {
558
+ if (r) return t.on("currentStateChange", () => a(Symbol()));
559
+ }, [t]);
560
+ let s;
561
+ return o && (s = t.works.getObserver(o)), [s, i];
562
+ }
563
+ function z(e, t) {
564
+ return [P("unsafe__fiveInstance", t) ? e : void 0];
565
+ }
566
+ function B(t, n) {
567
+ let r = P("works", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
568
+ if (r) return t.works;
569
+ }, [t, i]);
570
+ return e.useLayoutEffect(() => {
571
+ if (r) return t.on("load", () => a(Symbol()));
572
+ }, [t]), [o, i];
573
+ }
574
+ function V(t, n) {
575
+ let r = P("model", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
576
+ if (r) return t.model;
577
+ }, [t, i]);
578
+ return e.useLayoutEffect(() => {
579
+ if (r) return t.on("modelLoaded", () => a(Symbol()));
580
+ }, [t]), [o, i];
581
+ }
582
+ function H(e, t) {
583
+ return [P("scene", t) ? e.scene : void 0];
584
+ }
585
+ function U(n, r) {
586
+ let i = P("cameraDirection", r), [a, o] = e.useState(Symbol()), s = e.useMemo(() => {
587
+ if (i) return n.camera.getWorldDirection(new t.Vector3());
588
+ }, [n, a]);
589
+ return e.useLayoutEffect(() => {
590
+ if (i) return n.on("cameraUpdate", () => o(Symbol()));
591
+ }, [n]), [s, a];
592
+ }
593
+ function W(n, r) {
594
+ let i = P("cameraRaycaster", r), [a, o] = e.useState(Symbol()), s = e.useMemo(() => {
595
+ if (i) {
596
+ let e = n.camera.getWorldDirection(new t.Vector3());
597
+ return new t.Raycaster(n.camera.position, e);
598
+ }
599
+ }, [n, a]);
600
+ return e.useLayoutEffect(() => {
601
+ if (i) return n.on("cameraUpdate", () => o(Symbol()));
602
+ }, [n]), [s, a];
603
+ }
604
+ function G(t, n) {
605
+ let r = P("modelReadyState", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
606
+ if (r) return t.model.empty ? "Empty" : "Loaded";
607
+ }, [t, i]);
608
+ return e.useLayoutEffect(() => {
609
+ if (r) return t.on("modelLoaded", () => a(Symbol()));
610
+ }, [t]), [o, i];
611
+ }
612
+ function K(t, n) {
613
+ let r = P("shownFloor", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
614
+ if (r) return t.model.shownFloor;
615
+ }, [t, i]);
616
+ return e.useLayoutEffect(() => {
617
+ if (r) return t.on("modelShownFloorChange", () => a(Symbol()));
618
+ }, [t]), [o, i];
619
+ }
620
+ function q(t, n) {
621
+ let r = P("helperVisible", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
622
+ if (r) return t.helperVisible;
623
+ }, [t, i]);
624
+ return e.useLayoutEffect(() => {
625
+ if (r) return t.on("helpersVisibleChange", () => a(Symbol()));
626
+ }, [t]), [o, i];
627
+ }
628
+ function J(e, t) {
629
+ if (P("loadWork", t)) return e;
630
+ }
631
+ function Y(e, t) {
632
+ if (P("setState", t)) return (...t) => e.setState(...t);
633
+ }
634
+ function X(e, t) {
635
+ if (P("on", t)) return (...t) => e.on(...t);
636
+ }
637
+ function re(e, t) {
638
+ if (P("on", t)) return (...t) => e.once(...t);
639
+ }
640
+ function ie(e, t) {
641
+ if (P("off", t)) return (...t) => e.off(...t);
642
+ }
643
+ function ae(e, t) {
644
+ if (P("intersectRaycaster", t)) return (...t) => e.model.intersectRaycaster(...t);
645
+ }
646
+ function oe(e, t) {
647
+ if (P("project2d", t)) return (...t) => e.project2d(...t);
648
+ }
649
+ function se(e, t) {
650
+ if (P("updateCamera", t)) return (...t) => e.updateCamera(...t);
651
+ }
652
+ function ce(e, t) {
653
+ if (P("getPixels", t)) return e.getPixels.bind(e);
654
+ }
655
+ function le(e, t) {
656
+ if (P("render", t)) return (...t) => e.render(...t);
657
+ }
658
+ function Z(e, t) {
659
+ if (P("needsRender", t)) return () => {
660
+ e.needsRender = !0;
661
+ };
662
+ }
663
+ function ue(e, t) {
664
+ if (P("preloadPano", t)) return (...t) => e.preloadPano(...t);
665
+ }
666
+ function de(e, t) {
667
+ if (P("showFloor", t)) return (t) => {
668
+ typeof t == "number" ? e.model.show(t) : e.model.show();
669
+ };
670
+ }
671
+ function fe(e, t) {
672
+ if (P("toggleHelperVisible", t)) return (t) => {
673
+ e.helperVisible = t;
674
+ };
675
+ }
676
+ function pe(t) {
677
+ return function(n) {
678
+ return e.forwardRef((r, i) => {
679
+ let a = l(), o = u(), [s] = z(a, t), [c, d] = I(a, t), [f, p] = L(a, t), [m, h] = R(a, t), [g, _] = B(a, t), [v, y] = V(a, t), [b] = H(a, t), [x, S] = U(a, t), [C, w] = W(a, t), [T, E] = G(a, t), [D, O] = K(a, t), [k, A] = q(a, t), j = e.useMemo(() => {
680
+ let e = {};
681
+ return F(e, {
682
+ setState: Y(a, t),
683
+ loadWork: J(o, t),
684
+ on: X(a, t),
685
+ once: re(a, t),
686
+ off: ie(a, t),
687
+ intersectRaycaster: ae(a, t),
688
+ project2d: oe(a, t),
689
+ updateCamera: se(a, t),
690
+ getPixels: ce(a, t),
691
+ render: le(a, t),
692
+ needsRender: Z(a, t),
693
+ preloadPano: ue(a, t),
694
+ showFloor: de(a, t),
695
+ toggleHelperVisible: fe(a, t)
696
+ }), e;
697
+ }, [a, o]), M = e.useMemo(() => {
698
+ let e = Object.assign({}, j);
699
+ return F(e, {
700
+ unsafe__fiveInstance: s,
701
+ state: c,
702
+ currentState: f,
703
+ currentObserver: m,
704
+ work: g,
705
+ model: v,
706
+ scene: b,
707
+ cameraDirection: x,
708
+ cameraRaycaster: C,
709
+ modelReadyState: T,
710
+ shownFloor: D,
711
+ helperVisible: k
712
+ }), e;
713
+ }, [
714
+ a,
715
+ j,
716
+ d,
717
+ p,
718
+ h,
719
+ _,
720
+ y,
721
+ S,
722
+ w,
723
+ E,
724
+ O,
725
+ A
726
+ ]);
727
+ return e.createElement(n, Object.assign({
728
+ ref: i,
729
+ $five: M
730
+ }, r));
731
+ });
732
+ };
733
+ }
734
+ function me(...e) {
735
+ return e;
736
+ }
737
+ //#endregion
738
+ //#region build/react/createStore.js
739
+ function Q(e, t) {
740
+ let n = {}, r = t.length, i = -1;
741
+ for (; ++i < r;) {
742
+ let r = t[i];
743
+ r in e && (n[r] = e[r]);
744
+ }
745
+ return n;
746
+ }
747
+ function he(e, t) {
748
+ return typeof e == "number" && typeof t == "number" && isNaN(e) && isNaN(t) ? !0 : e === t;
749
+ }
750
+ function ge(e, t) {
751
+ for (let n = 0; n < e.length; n++) for (let r = 0; r < t.length; r++) if (e[n] === t[r]) return !0;
752
+ return !1;
753
+ }
754
+ var $ = class {
755
+ constructor(e, t) {
756
+ this.values = e, this.listeners = [], this.onValuesChange = t;
757
+ }
758
+ on(e, t) {
759
+ let n = [e, t];
760
+ return this.listeners.push(n), () => {
761
+ let e = this.listeners.indexOf(n);
762
+ e >= 0 && this.listeners.splice(e, 1);
763
+ };
764
+ }
765
+ getValues(e) {
766
+ return Q(this.values, e);
767
+ }
768
+ setValues(e, t) {
769
+ let n = [];
770
+ for (let r in t) e.indexOf(r) >= 0 && !he(t[r], this.values[r]) && n.push(r);
771
+ if (n.length === 0) return;
772
+ let r = Object.assign({}, this.values);
773
+ for (let e of n) this.values[e] = t[e];
774
+ this.onValuesChange && this.onValuesChange(this.values, r);
775
+ for (let [e, t] of this.listeners) {
776
+ if (!ge(e, n)) continue;
777
+ let i = Q(r, e);
778
+ t(Q(this.values, e), i);
779
+ }
780
+ }
1037
781
  };
782
+ function _e(t) {
783
+ let n = e.createContext(null);
784
+ return {
785
+ useStore(t) {
786
+ let r = e.useContext(n);
787
+ if (r === null) throw Error("StoreProvider never found.");
788
+ let i = e.useRef(!0), [a, o] = e.useState(r.getValues(t)), s = [r, ...t];
789
+ return e.useLayoutEffect(() => (i.current ? i.current = !1 : o(r.getValues(t)), r.on(t, (e) => o(e))), s), [a, e.useCallback((e) => r.setValues(t, e), s)];
790
+ },
791
+ useStoreSetter(t) {
792
+ let r = e.useContext(n);
793
+ if (r === null) throw Error("StoreProvider never found.");
794
+ return e.useCallback((e) => r.setValues(t, e), [r, ...t]);
795
+ },
796
+ watchStore(t, r, i) {
797
+ let a = e.useContext(n);
798
+ if (a === null) throw Error("StoreProvider never found.");
799
+ let o = [a, ...t];
800
+ i !== void 0 && (o = o.concat(i)), e.useLayoutEffect(() => a.on(t, r), o);
801
+ },
802
+ useStoreAction(r) {
803
+ let i = e.useContext(n);
804
+ if (i === null) throw Error("StoreProvider never found.");
805
+ return e.useCallback((...e) => {
806
+ let [n, ...a] = t[r];
807
+ return n(() => i.getValues(a), (e) => i.setValues(a, e), ...e);
808
+ }, []);
809
+ },
810
+ StoreProvider: class extends e.Component {
811
+ constructor(e) {
812
+ super(e), this.store = new $(e.initialValue, (...e) => {
813
+ this.props.onValuesChange && this.props.onValuesChange(...e);
814
+ });
815
+ }
816
+ shouldComponentUpdate(e) {
817
+ return e.children !== this.props.children;
818
+ }
819
+ render() {
820
+ return e.createElement(n.Provider, { value: this.store }, this.props.children);
821
+ }
822
+ }
823
+ };
824
+ }
825
+ //#endregion
826
+ export { h as FiveCanvas, ne as INJECTION_PROPNAME, $ as Store, me as createFiveFeature, f as createFiveProvider, _e as createStore, g as unsafe__useFiveInstance, T as useFiveAction, A as useFiveCameraDirection, O as useFiveCameraRaycaster, C as useFiveCurrentObserver, S as useFiveCurrentState, w as useFiveEventCallback, N as useFiveFloor, te as useFiveHelper, j as useFiveModelIntersectRaycaster, ee as useFiveModelReadyState, E as useFiveProject2d, v as useFiveScene, _ as useFiveSceneEffect, x as useFiveState, y as useFiveWork, pe as withFive };